@wistia/ui 0.15.14-beta.1e41934b.72b042b → 0.15.14-beta.a458371c.6fd5976
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +4 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.mjs +4 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -2373,6 +2373,10 @@ type FormFieldProps = ComponentPropsWithoutRef<'div'> & {
|
|
|
2373
2373
|
* The name attribute of the field. It will map to the form data passed into `useFormState`.
|
|
2374
2374
|
*/
|
|
2375
2375
|
name: string;
|
|
2376
|
+
/**
|
|
2377
|
+
* Use if label describes a required form component
|
|
2378
|
+
*/
|
|
2379
|
+
required?: boolean;
|
|
2376
2380
|
/**
|
|
2377
2381
|
* A value that overrides the basic value. This should pair with `onChange`.
|
|
2378
2382
|
*/
|
|
@@ -2386,7 +2390,7 @@ type FormFieldProps = ComponentPropsWithoutRef<'div'> & {
|
|
|
2386
2390
|
* FormField is a compound component that combines a label, form control, and optional description and error message.
|
|
2387
2391
|
*/
|
|
2388
2392
|
declare const FormField: {
|
|
2389
|
-
({ children, description, error, id, label, labelPosition, name, value, ...props }: FormFieldProps): JSX$1.Element;
|
|
2393
|
+
({ children, description, error, id, label, labelPosition, name, required, value, ...props }: FormFieldProps): JSX$1.Element;
|
|
2390
2394
|
displayName: string;
|
|
2391
2395
|
};
|
|
2392
2396
|
|
package/dist/index.d.ts
CHANGED
|
@@ -2373,6 +2373,10 @@ type FormFieldProps = ComponentPropsWithoutRef<'div'> & {
|
|
|
2373
2373
|
* The name attribute of the field. It will map to the form data passed into `useFormState`.
|
|
2374
2374
|
*/
|
|
2375
2375
|
name: string;
|
|
2376
|
+
/**
|
|
2377
|
+
* Use if label describes a required form component
|
|
2378
|
+
*/
|
|
2379
|
+
required?: boolean;
|
|
2376
2380
|
/**
|
|
2377
2381
|
* A value that overrides the basic value. This should pair with `onChange`.
|
|
2378
2382
|
*/
|
|
@@ -2386,7 +2390,7 @@ type FormFieldProps = ComponentPropsWithoutRef<'div'> & {
|
|
|
2386
2390
|
* FormField is a compound component that combines a label, form control, and optional description and error message.
|
|
2387
2391
|
*/
|
|
2388
2392
|
declare const FormField: {
|
|
2389
|
-
({ children, description, error, id, label, labelPosition, name, value, ...props }: FormFieldProps): JSX$1.Element;
|
|
2393
|
+
({ children, description, error, id, label, labelPosition, name, required, value, ...props }: FormFieldProps): JSX$1.Element;
|
|
2390
2394
|
displayName: string;
|
|
2391
2395
|
};
|
|
2392
2396
|
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.15.14-beta.
|
|
3
|
+
* @license @wistia/ui v0.15.14-beta.a458371c.6fd5976
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -14787,6 +14787,7 @@ var FormField = ({
|
|
|
14787
14787
|
label,
|
|
14788
14788
|
labelPosition,
|
|
14789
14789
|
name,
|
|
14790
|
+
required = false,
|
|
14790
14791
|
value,
|
|
14791
14792
|
...props
|
|
14792
14793
|
}) => {
|
|
@@ -14836,7 +14837,7 @@ var FormField = ({
|
|
|
14836
14837
|
...props,
|
|
14837
14838
|
"data-label-position": labelPosition ?? formState.labelPosition,
|
|
14838
14839
|
children: [
|
|
14839
|
-
!isIntegratedLabel && /* @__PURE__ */ jsx283(Label, { htmlFor: computedId, children: label }),
|
|
14840
|
+
!isIntegratedLabel && /* @__PURE__ */ jsx283(Label, { htmlFor: computedId, required, children: label }),
|
|
14840
14841
|
isNotNil28(description) ? /* @__PURE__ */ jsx283(FormControlLabelDescription, { id: descriptionId, children: description }) : null,
|
|
14841
14842
|
cloneElement8(children, childProps),
|
|
14842
14843
|
isNotNil28(computedError) ? /* @__PURE__ */ jsxs46(Fragment9, { children: [
|
|
@@ -16856,6 +16857,7 @@ var StyledTrigger2 = styled91(Trigger3)`
|
|
|
16856
16857
|
outline: 1px solid var(--wui-input-color-border);
|
|
16857
16858
|
outline-offset: -2px;
|
|
16858
16859
|
border-radius: var(--wui-input-border-radius);
|
|
16860
|
+
min-width: 200px;
|
|
16859
16861
|
text-align: left;
|
|
16860
16862
|
display: inline-flex;
|
|
16861
16863
|
align-items: center;
|
|
@@ -16999,7 +17001,6 @@ var StyledItem = styled92(Item)`
|
|
|
16999
17001
|
align-items: ${({ $checkmarkVerticalAlign }) => $checkmarkVerticalAlign === "center" ? "center" : "flex-start"};
|
|
17000
17002
|
background-color: transparent;
|
|
17001
17003
|
display: flex;
|
|
17002
|
-
gap: var(--wui-space-01);
|
|
17003
17004
|
padding: var(--wui-select-option-padding);
|
|
17004
17005
|
justify-content: space-between;
|
|
17005
17006
|
font-size: var(--font-size);
|