@cdx-ui/components 0.3.3 → 0.3.5
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/coverage.svg +1 -1
- package/docs/components/color-field/content.md +2 -2
- package/docs/components/content.md +4 -4
- package/docs/components/date-field/content.md +2 -2
- package/docs/components/date-time-field/content.md +2 -2
- package/docs/components/input/content.md +20 -2
- package/docs/components/input/design.md +1 -1
- package/docs/components/insurance-disclosure/content.md +1 -1
- package/docs/components/otp-input/content.md +2 -2
- package/docs/components/select/content.md +365 -24
- package/docs/components/text/content.md +97 -0
- package/docs/foundations/expressions/icons/content.md +1 -1
- package/docs/llms.txt +6 -4
- package/docs/patterns/forms/content.md +152 -0
- package/docs/resources/release-notes/0.3.3/content.md +23 -0
- package/docs/resources/release-notes/0.3.4/content.md +27 -0
- package/docs/resources/release-notes/content.md +2 -0
- package/lib/commonjs/components/Chip/styles.js +3 -1
- package/lib/commonjs/components/Chip/styles.js.map +1 -1
- package/lib/commonjs/components/Drawer/index.js +1 -1
- package/lib/commonjs/components/Drawer/index.js.map +1 -1
- package/lib/commonjs/components/Input/index.js.map +1 -1
- package/lib/commonjs/components/Input/styles.js +13 -6
- package/lib/commonjs/components/Input/styles.js.map +1 -1
- package/lib/commonjs/components/OtpInput/index.js.map +1 -1
- package/lib/commonjs/components/Select/index.js +326 -24
- package/lib/commonjs/components/Select/index.js.map +1 -1
- package/lib/commonjs/components/Select/styles.js +32 -1
- package/lib/commonjs/components/Select/styles.js.map +1 -1
- package/lib/commonjs/components/picker/surfaces.js +18 -3
- package/lib/commonjs/components/picker/surfaces.js.map +1 -1
- package/lib/module/components/Chip/styles.js +3 -1
- package/lib/module/components/Chip/styles.js.map +1 -1
- package/lib/module/components/Drawer/index.js +1 -1
- package/lib/module/components/Drawer/index.js.map +1 -1
- package/lib/module/components/Input/index.js.map +1 -1
- package/lib/module/components/Input/styles.js +14 -6
- package/lib/module/components/Input/styles.js.map +1 -1
- package/lib/module/components/OtpInput/index.js.map +1 -1
- package/lib/module/components/Select/index.js +328 -26
- package/lib/module/components/Select/index.js.map +1 -1
- package/lib/module/components/Select/styles.js +31 -0
- package/lib/module/components/Select/styles.js.map +1 -1
- package/lib/module/components/picker/surfaces.js +17 -3
- package/lib/module/components/picker/surfaces.js.map +1 -1
- package/lib/typescript/components/Chip/styles.d.ts.map +1 -1
- package/lib/typescript/components/ColorField/styles.d.ts +4 -2
- package/lib/typescript/components/ColorField/styles.d.ts.map +1 -1
- package/lib/typescript/components/DateField/styles.d.ts +4 -2
- package/lib/typescript/components/DateField/styles.d.ts.map +1 -1
- package/lib/typescript/components/Input/index.d.ts +3 -2
- package/lib/typescript/components/Input/index.d.ts.map +1 -1
- package/lib/typescript/components/Input/styles.d.ts +1 -1
- package/lib/typescript/components/Input/styles.d.ts.map +1 -1
- package/lib/typescript/components/OtpInput/index.d.ts +3 -2
- package/lib/typescript/components/OtpInput/index.d.ts.map +1 -1
- package/lib/typescript/components/Select/index.d.ts +73 -6
- package/lib/typescript/components/Select/index.d.ts.map +1 -1
- package/lib/typescript/components/Select/styles.d.ts +9 -0
- package/lib/typescript/components/Select/styles.d.ts.map +1 -1
- package/lib/typescript/components/picker/surfaces.d.ts +14 -3
- package/lib/typescript/components/picker/surfaces.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/components/Chip/styles.ts +3 -1
- package/src/components/ColorField/styles.ts +3 -1
- package/src/components/DateField/styles.ts +6 -1
- package/src/components/Drawer/index.tsx +1 -1
- package/src/components/Input/index.tsx +3 -2
- package/src/components/Input/styles.ts +35 -15
- package/src/components/OtpInput/index.tsx +3 -2
- package/src/components/Select/index.tsx +411 -29
- package/src/components/Select/styles.ts +36 -0
- package/src/components/picker/surfaces.tsx +29 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type InputVariantProps } from '../Input/styles';
|
|
2
2
|
export declare const colorFieldVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
3
3
|
export declare const colorFieldGroupVariants: (props?: ({
|
|
4
|
-
variant?: "outline" | null | undefined;
|
|
4
|
+
variant?: "outline" | "subtle" | null | undefined;
|
|
5
5
|
size?: "small" | "default" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
export declare const colorFieldInputVariants: (props?: ({
|
|
@@ -9,5 +9,7 @@ export declare const colorFieldInputVariants: (props?: ({
|
|
|
9
9
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
10
|
export declare const colorFieldInputPlaceholderVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
11
11
|
export declare const colorFieldSlotVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
12
|
-
export type ColorFieldGroupVariantProps = InputVariantProps
|
|
12
|
+
export type ColorFieldGroupVariantProps = Omit<InputVariantProps, 'variant'> & {
|
|
13
|
+
variant?: 'outline';
|
|
14
|
+
};
|
|
13
15
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/ColorField/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,KAAK,iBAAiB,EACvB,MAAM,iBAAiB,CAAC;AAEzB,eAAO,MAAM,kBAAkB,oFAAiB,CAAC;AAEjD,eAAO,MAAM,uBAAuB;;;8EAAoB,CAAC;AAEzD,eAAO,MAAM,uBAAuB;;8EAAqB,CAAC;AAE1D,eAAO,MAAM,kCAAkC,oFAAgC,CAAC;AAEhF,eAAO,MAAM,sBAAsB,oFAAoB,CAAC;AAExD,MAAM,MAAM,2BAA2B,GAAG,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/ColorField/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,KAAK,iBAAiB,EACvB,MAAM,iBAAiB,CAAC;AAEzB,eAAO,MAAM,kBAAkB,oFAAiB,CAAC;AAEjD,eAAO,MAAM,uBAAuB;;;8EAAoB,CAAC;AAEzD,eAAO,MAAM,uBAAuB;;8EAAqB,CAAC;AAE1D,eAAO,MAAM,kCAAkC,oFAAgC,CAAC;AAEhF,eAAO,MAAM,sBAAsB,oFAAoB,CAAC;AAExD,MAAM,MAAM,2BAA2B,GAAG,IAAI,CAAC,iBAAiB,EAAE,SAAS,CAAC,GAAG;IAC7E,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type VariantProps } from '@cdx-ui/utils';
|
|
2
2
|
export declare const dateFieldRootVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
3
3
|
export declare const dateFieldGroupVariants: (props?: ({
|
|
4
|
-
variant?: "outline" | null | undefined;
|
|
4
|
+
variant?: "outline" | "subtle" | null | undefined;
|
|
5
5
|
size?: "small" | "default" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
export declare const dateFieldInputVariants: (props?: ({
|
|
@@ -11,5 +11,7 @@ export declare const dateFieldSegmentVariants: (props?: ({
|
|
|
11
11
|
literal?: boolean | null | undefined;
|
|
12
12
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
13
13
|
export declare const dateFieldSuffixVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
14
|
-
export type DateFieldGroupVariantProps = VariantProps<typeof dateFieldGroupVariants
|
|
14
|
+
export type DateFieldGroupVariantProps = Omit<VariantProps<typeof dateFieldGroupVariants>, 'variant'> & {
|
|
15
|
+
variant?: 'outline';
|
|
16
|
+
};
|
|
15
17
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/DateField/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAGvD,eAAO,MAAM,qBAAqB,oFAAiB,CAAC;AAEpD,eAAO,MAAM,sBAAsB;;;8EAAoB,CAAC;AAExD,eAAO,MAAM,sBAAsB;;8EAmBlC,CAAC;AAEF,eAAO,MAAM,wBAAwB;;8EAkBpC,CAAC;AAEF,eAAO,MAAM,uBAAuB,oFAAoB,CAAC;AAEzD,MAAM,MAAM,0BAA0B,GAAG,YAAY,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/DateField/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAGvD,eAAO,MAAM,qBAAqB,oFAAiB,CAAC;AAEpD,eAAO,MAAM,sBAAsB;;;8EAAoB,CAAC;AAExD,eAAO,MAAM,sBAAsB;;8EAmBlC,CAAC;AAEF,eAAO,MAAM,wBAAwB;;8EAkBpC,CAAC;AAEF,eAAO,MAAM,uBAAuB,oFAAoB,CAAC;AAEzD,MAAM,MAAM,0BAA0B,GAAG,IAAI,CAC3C,YAAY,CAAC,OAAO,sBAAsB,CAAC,EAC3C,SAAS,CACV,GAAG;IACF,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB,CAAC"}
|
|
@@ -10,10 +10,11 @@ export interface InputProps extends ViewProps, IInputFieldProps {
|
|
|
10
10
|
/** Shell content — typically `Input.Field` plus optional `Input.Slot`/`Input.Icon`. */
|
|
11
11
|
children?: ReactNode;
|
|
12
12
|
/**
|
|
13
|
-
* Visual style variant.
|
|
13
|
+
* Visual style variant. `outline` is a bordered field on the page surface; `subtle` is a
|
|
14
|
+
* filled, borderless field for dense or nested surfaces such as a search field in a popup.
|
|
14
15
|
* @default 'outline'
|
|
15
16
|
*/
|
|
16
|
-
variant?: 'outline';
|
|
17
|
+
variant?: 'outline' | 'subtle';
|
|
17
18
|
/**
|
|
18
19
|
* Height, padding, and field font size.
|
|
19
20
|
* @default 'default'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAE,KAAK,SAAS,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,EAML,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,eAAe,EACrB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAkB/C,MAAM,WAAW,UAAW,SAAQ,SAAS,EAAE,gBAAgB;IAC7D,+EAA+E;IAC/E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gFAAgF;IAChF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uFAAuF;IACvF,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAE,KAAK,SAAS,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,EAML,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,eAAe,EACrB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAkB/C,MAAM,WAAW,UAAW,SAAQ,SAAS,EAAE,gBAAgB;IAC7D,+EAA+E;IAC/E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gFAAgF;IAChF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uFAAuF;IACvF,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;;OAIG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC/B;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;CAC5B;AAED,QAAA,MAAM,SAAS,6FAyBd,CAAC;AAQF,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG;IAC1C,gFAAgF;IAChF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2FAA2F;IAC3F,6BAA6B,CAAC,EAAE,MAAM,CAAC;CACxC,CAAC;AAEF,QAAA,MAAM,UAAU,uGAqBf,CAAC;AAQF,MAAM,WAAW,cAAe,SAAQ,SAAS,EAAE,eAAe;IAChE,+EAA+E;IAC/E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,+EAA+E;IAC/E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,QAAA,MAAM,SAAS,iGAiBd,CAAC;AAQF,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,GAAG,IAAI,GAAG,OAAO,CAAC;IAClF,6EAA6E;IAC7E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,EAAE,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;CACtB;AAED,QAAA,MAAM,SAAS;kDAAiD,cAAc;;CA4B7E,CAAC;AAQF,KAAK,sBAAsB,GAAG,OAAO,SAAS,GAAG;IAC/C,KAAK,EAAE,OAAO,UAAU,CAAC;IACzB,IAAI,EAAE,OAAO,SAAS,CAAC;IACvB,IAAI,EAAE,OAAO,SAAS,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,KAAK,EAIZ,sBAAsB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type VariantProps } from '@cdx-ui/utils';
|
|
2
2
|
export declare const inputRootVariants: (props?: ({
|
|
3
|
-
variant?: "outline" | null | undefined;
|
|
3
|
+
variant?: "outline" | "subtle" | null | undefined;
|
|
4
4
|
size?: "small" | "default" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
6
|
export declare const inputFieldVariants: (props?: ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAevD,eAAO,MAAM,iBAAiB;;;8EAmE7B,CAAC;AAEF,eAAO,MAAM,kBAAkB;;8EA2B9B,CAAC;AAEF,eAAO,MAAM,iBAAiB,oFAA4D,CAAC;AAE3F,eAAO,MAAM,iBAAiB;;8EAU5B,CAAC;AAEH,eAAO,MAAM,6BAA6B,oFAAmC,CAAC;AAE9E,MAAM,MAAM,iBAAiB,GAAG,YAAY,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
|
|
@@ -3,7 +3,8 @@ import { type IOtpInputRootProps, type OtpInputFieldProps } from '@cdx-ui/primit
|
|
|
3
3
|
import { type InputProps } from '../Input';
|
|
4
4
|
import { type InputVariantProps } from '../Input/styles';
|
|
5
5
|
import { type OtpInputVariantProps } from './styles';
|
|
6
|
-
export interface OtpInputCellProps extends ViewProps, InputVariantProps {
|
|
6
|
+
export interface OtpInputCellProps extends ViewProps, Omit<InputVariantProps, 'variant'> {
|
|
7
|
+
variant?: 'outline';
|
|
7
8
|
className?: string;
|
|
8
9
|
children?: React.ReactNode;
|
|
9
10
|
isInvalid?: boolean;
|
|
@@ -24,7 +25,7 @@ declare const OtpStyledField: import("react").ForwardRefExoticComponent<OtpInput
|
|
|
24
25
|
className?: string;
|
|
25
26
|
} & import("react").RefAttributes<TextInput>>;
|
|
26
27
|
export interface OtpInputProps extends Omit<IOtpInputRootProps, 'size'>, OtpInputVariantProps {
|
|
27
|
-
variant?:
|
|
28
|
+
variant?: 'outline';
|
|
28
29
|
size?: NonNullable<InputProps['size']>;
|
|
29
30
|
className?: string;
|
|
30
31
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/OtpInput/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,EAQL,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACxB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,KAAK,iBAAiB,EAAsB,MAAM,iBAAiB,CAAC;AAC7E,OAAO,EAIL,KAAK,oBAAoB,EAC1B,MAAM,UAAU,CAAC;AAMlB,MAAM,WAAW,iBAAkB,SAAQ,SAAS,EAAE,iBAAiB;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/OtpInput/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,EAQL,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACxB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,KAAK,iBAAiB,EAAsB,MAAM,iBAAiB,CAAC;AAC7E,OAAO,EAIL,KAAK,oBAAoB,EAC1B,MAAM,UAAU,CAAC;AAMlB,MAAM,WAAW,iBAAkB,SAAQ,SAAS,EAAE,IAAI,CAAC,iBAAiB,EAAE,SAAS,CAAC;IACtF,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,QAAA,MAAM,aAAa,oGAoBlB,CAAC;AAIF,MAAM,MAAM,wBAAwB,GAAG,kBAAkB,GAAG;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnF;;;;;GAKG;AACH,QAAA,MAAM,cAAc;gBARsD,MAAM;6CAwB9E,CAAC;AAIH,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,kBAAkB,EAAE,MAAM,CAAC,EAAE,oBAAoB;IAC3F,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,IAAI,CAAC,EAAE,WAAW,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,YAAY,gGAuFjB,CAAC;AAIF,KAAK,yBAAyB,GAAG,OAAO,YAAY,GAAG;IACrD,IAAI,EAAE,OAAO,aAAa,CAAC;IAC3B,KAAK,EAAE,OAAO,cAAc,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAGf,yBAAyB,CAAC"}
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
-
import { Text, type TextProps, View, type ViewProps } from 'react-native';
|
|
3
|
-
import { type ISelectContentProps, type ISelectItemLabelProps, type ISelectItemProps, type ISelectProps, type ISelectTriggerProps, type ISelectValueProps } from '@cdx-ui/primitives';
|
|
2
|
+
import { Text, type TextInput, type TextProps, View, type ViewProps } from 'react-native';
|
|
3
|
+
import { type ISelectContentProps, type ISelectEmptyProps, type ISelectItemLabelProps, type ISelectItemProps, type ISelectProps, type ISelectSearchProps, type ISelectTriggerProps, type ISelectValueProps } from '@cdx-ui/primitives';
|
|
4
4
|
import { IconProps } from '../Icon';
|
|
5
|
+
import { type InputProps } from '../Input';
|
|
5
6
|
import { type IconSlotPosition } from '../../utils/positionToDataIcon';
|
|
6
7
|
import { type SelectVariantProps } from './styles';
|
|
7
|
-
export
|
|
8
|
+
export type { SelectFilter, SelectItemData, SelectType, SelectValueRenderProps, } from '@cdx-ui/primitives';
|
|
9
|
+
/**
|
|
10
|
+
* `type` narrows `value` / `defaultValue` / `onValueChange` to `string` (single, the default)
|
|
11
|
+
* or `string[]` (multiple).
|
|
12
|
+
*/
|
|
13
|
+
export type SelectProps = ViewProps & SelectVariantProps & ISelectProps & {
|
|
8
14
|
className?: string;
|
|
9
|
-
}
|
|
15
|
+
};
|
|
10
16
|
declare const SelectRoot: import("react").ForwardRefExoticComponent<SelectProps & import("react").RefAttributes<View>>;
|
|
11
17
|
export interface SelectTriggerProps extends ISelectTriggerProps {
|
|
12
18
|
/**
|
|
@@ -35,7 +41,7 @@ export interface SelectTriggerProps extends ISelectTriggerProps {
|
|
|
35
41
|
children?: ReactNode;
|
|
36
42
|
}
|
|
37
43
|
declare const SelectTrigger: import("react").ForwardRefExoticComponent<SelectTriggerProps & import("react").RefAttributes<View>>;
|
|
38
|
-
export interface SelectValueProps extends TextProps, ISelectValueProps {
|
|
44
|
+
export interface SelectValueProps extends Omit<TextProps, 'children'>, ISelectValueProps {
|
|
39
45
|
asChild?: boolean;
|
|
40
46
|
className?: string;
|
|
41
47
|
}
|
|
@@ -58,16 +64,74 @@ declare const SelectIcon: {
|
|
|
58
64
|
({ asChild, className, style, as, position, ...props }: SelectIconProps): import("react/jsx-runtime").JSX.Element | null;
|
|
59
65
|
displayName: string;
|
|
60
66
|
};
|
|
67
|
+
export interface SelectSearchProps extends ISelectSearchProps {
|
|
68
|
+
/**
|
|
69
|
+
* Merge the search wiring onto the single child text input instead of rendering the default
|
|
70
|
+
* `Input` with a search icon.
|
|
71
|
+
*/
|
|
72
|
+
asChild?: boolean;
|
|
73
|
+
/** Additional Uniwind/Tailwind classes, merged after the search container's own styles. */
|
|
74
|
+
className?: string;
|
|
75
|
+
/**
|
|
76
|
+
* `Input` variant of the default search field. Ignored when `asChild` is set.
|
|
77
|
+
* @default 'subtle'
|
|
78
|
+
*/
|
|
79
|
+
variant?: InputProps['variant'];
|
|
80
|
+
/** The text input to render when `asChild` is set. Otherwise not rendered. */
|
|
81
|
+
children?: ReactNode;
|
|
82
|
+
}
|
|
83
|
+
declare const SelectSearch: import("react").ForwardRefExoticComponent<SelectSearchProps & import("react").RefAttributes<TextInput>>;
|
|
84
|
+
export interface SelectEmptyProps extends ISelectEmptyProps {
|
|
85
|
+
asChild?: boolean;
|
|
86
|
+
/** Additional Uniwind/Tailwind classes, merged after the empty state's own styles. */
|
|
87
|
+
className?: string;
|
|
88
|
+
}
|
|
89
|
+
declare const SelectEmpty: import("react").ForwardRefExoticComponent<SelectEmptyProps & import("react").RefAttributes<View>>;
|
|
61
90
|
export interface SelectContentProps extends ViewProps, ISelectContentProps {
|
|
62
91
|
asChild?: boolean;
|
|
63
92
|
className?: string;
|
|
64
93
|
}
|
|
94
|
+
/** Without `asChild`, direct children are sorted into regions (see `partitionPopupChildren`). */
|
|
65
95
|
declare const SelectContent: import("react").ForwardRefExoticComponent<SelectContentProps & import("react").RefAttributes<View>>;
|
|
96
|
+
export interface SelectBottomSheetProps extends ViewProps {
|
|
97
|
+
/** Render the consumer's child as the sheet body, skipping the region split. */
|
|
98
|
+
asChild?: boolean;
|
|
99
|
+
/** Additional Uniwind/Tailwind classes, merged after the sheet body's own styles. */
|
|
100
|
+
className?: string;
|
|
101
|
+
/**
|
|
102
|
+
* Accessible name of the visually hidden dismiss button on web, where the surface is the
|
|
103
|
+
* `Select.Content` dropdown.
|
|
104
|
+
* @default 'Dismiss'
|
|
105
|
+
*/
|
|
106
|
+
dismissAccessibilityLabel?: string;
|
|
107
|
+
/** `Select.Search`, `Select.Item` elements, and `Select.Empty`, as in `Select.Content`. */
|
|
108
|
+
children?: ReactNode;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Presents the options in a bottom sheet on iOS and Android, in place of `Select.Content`. The
|
|
112
|
+
* sheet keeps `Select.Search` and the results above the soft keyboard, and closes on swipe
|
|
113
|
+
* down, backdrop press, Android back, and the VoiceOver escape gesture without changing the
|
|
114
|
+
* value. On web it renders the `Select.Content` dropdown. Requires `BottomSheet.Provider`.
|
|
115
|
+
*/
|
|
116
|
+
declare const SelectBottomSheet: import("react").ForwardRefExoticComponent<SelectBottomSheetProps & import("react").RefAttributes<View>>;
|
|
117
|
+
export interface SelectItemControlProps extends ViewProps {
|
|
118
|
+
/** Render the consumer's child element in place of the default checkbox glyph. */
|
|
119
|
+
asChild?: boolean;
|
|
120
|
+
/** Additional Uniwind/Tailwind classes, merged after the control's own styles. */
|
|
121
|
+
className?: string;
|
|
122
|
+
/** The element to render when `asChild` is set. Otherwise not rendered. */
|
|
123
|
+
children?: ReactNode;
|
|
124
|
+
}
|
|
125
|
+
declare const SelectItemControl: {
|
|
126
|
+
({ asChild, className, style, children, ...props }: SelectItemControlProps): import("react/jsx-runtime").JSX.Element;
|
|
127
|
+
displayName: string;
|
|
128
|
+
};
|
|
66
129
|
export interface SelectItemProps extends ISelectItemProps {
|
|
67
130
|
asChild?: boolean;
|
|
68
131
|
/**
|
|
69
132
|
* Replaces the default selected-item checkmark. The replacement is rendered
|
|
70
133
|
* only while the item is selected. Pass `null` to suppress the indicator.
|
|
134
|
+
* The default checkmark is omitted when the item contains a `Select.ItemControl`.
|
|
71
135
|
*/
|
|
72
136
|
indicator?: ReactNode;
|
|
73
137
|
className?: string;
|
|
@@ -84,9 +148,12 @@ type SelectCompoundComponent = typeof SelectRoot & {
|
|
|
84
148
|
Value: typeof SelectValue;
|
|
85
149
|
Icon: typeof SelectIcon;
|
|
86
150
|
Content: typeof SelectContent;
|
|
151
|
+
BottomSheet: typeof SelectBottomSheet;
|
|
152
|
+
Search: typeof SelectSearch;
|
|
153
|
+
Empty: typeof SelectEmpty;
|
|
87
154
|
Item: typeof SelectItem;
|
|
88
155
|
ItemLabel: typeof SelectItemLabel;
|
|
156
|
+
ItemControl: typeof SelectItemControl;
|
|
89
157
|
};
|
|
90
158
|
export declare const Select: SelectCompoundComponent;
|
|
91
|
-
export {};
|
|
92
159
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAY,IAAI,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGpG,OAAO,EAeL,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EAGvB,MAAM,oBAAoB,CAAC;AAW5B,OAAO,EAAQ,SAAS,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAIlD,OAAO,EAAsB,KAAK,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAC3F,OAAO,EACL,KAAK,kBAAkB,EAWxB,MAAM,UAAU,CAAC;AAElB,YAAY,EACV,YAAY,EACZ,cAAc,EACd,UAAU,EACV,sBAAsB,GACvB,MAAM,oBAAoB,CAAC;AAe5B;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,SAAS,GACjC,kBAAkB,GAClB,YAAY,GAAG;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAE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AyBpB,CAAC;AAQF,KAAK,uBAAuB,GAAG,OAAO,UAAU,GAAG;IACjD,OAAO,EAAE,OAAO,aAAa,CAAC;IAC9B,KAAK,EAAE,OAAO,WAAW,CAAC;IAC1B,IAAI,EAAE,OAAO,UAAU,CAAC;IACxB,OAAO,EAAE,OAAO,aAAa,CAAC;IAC9B,WAAW,EAAE,OAAO,iBAAiB,CAAC;IACtC,MAAM,EAAE,OAAO,YAAY,CAAC;IAC5B,KAAK,EAAE,OAAO,WAAW,CAAC;IAC1B,IAAI,EAAE,OAAO,UAAU,CAAC;IACxB,SAAS,EAAE,OAAO,eAAe,CAAC;IAClC,WAAW,EAAE,OAAO,iBAAiB,CAAC;CACvC,CAAC;AAEF,eAAO,MAAM,MAAM,EAWb,uBAAuB,CAAC"}
|
|
@@ -9,5 +9,14 @@ export declare const selectValueVariants: (props?: ({
|
|
|
9
9
|
export declare const selectIconVariants: (props?: ({
|
|
10
10
|
size?: "small" | "default" | null | undefined;
|
|
11
11
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
12
|
+
export declare const selectItemVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
13
|
+
export declare const selectSearchVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
14
|
+
export declare const selectSearchListboxVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
15
|
+
export declare const selectBottomSheetVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
16
|
+
export declare const selectBottomSheetListboxVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
17
|
+
export declare const selectEmptyVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
18
|
+
export declare const selectEmptyTextVariants: (props?: ({
|
|
19
|
+
size?: "small" | "default" | null | undefined;
|
|
20
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
12
21
|
export type SelectVariantProps = VariantProps<typeof selectTriggerVariants>;
|
|
13
22
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAKvD,eAAO,MAAM,qBAAqB;;;8EAqEjC,CAAC;AAIF,eAAO,MAAM,mBAAmB;;8EAoB/B,CAAC;AAIF,eAAO,MAAM,kBAAkB;;8EAiB9B,CAAC;
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAKvD,eAAO,MAAM,qBAAqB;;;8EAqEjC,CAAC;AAIF,eAAO,MAAM,mBAAmB;;8EAoB/B,CAAC;AAIF,eAAO,MAAM,kBAAkB;;8EAiB9B,CAAC;AAMF,eAAO,MAAM,kBAAkB,oFAAoE,CAAC;AAIpG,eAAO,MAAM,oBAAoB,oFAAgB,CAAC;AAElD,eAAO,MAAM,2BAA2B,oFAEtC,CAAC;AAIH,eAAO,MAAM,yBAAyB,oFAAuB,CAAC;AAE9D,eAAO,MAAM,gCAAgC,oFAAgB,CAAC;AAI9D,eAAO,MAAM,mBAAmB,oFAAqB,CAAC;AAEtD,eAAO,MAAM,uBAAuB;;8EAUlC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,YAAY,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|
|
@@ -11,10 +11,21 @@ export declare function PickerDialogSurface({ open, setOpen, registerSurface, ch
|
|
|
11
11
|
type PickerBottomSheetSurfaceProps = {
|
|
12
12
|
open: boolean;
|
|
13
13
|
setOpen: (open: boolean) => void;
|
|
14
|
-
registerSurface
|
|
14
|
+
registerSurface?: (type: 'bottomSheet') => void;
|
|
15
|
+
/**
|
|
16
|
+
* Lays the children out in a container that fills the sheet, so a fixed header can sit above a
|
|
17
|
+
* `BottomSheet.ScrollView`. By default the children size a `BottomSheet.View`.
|
|
18
|
+
*/
|
|
19
|
+
fill?: boolean;
|
|
15
20
|
children: ReactNode;
|
|
16
|
-
} & Pick<BottomSheetModalProps, 'snapPoints' | 'enableDynamicSizing'>;
|
|
17
|
-
|
|
21
|
+
} & Pick<BottomSheetModalProps, 'snapPoints' | 'enableDynamicSizing' | 'keyboardBehavior' | 'keyboardBlurBehavior' | 'accessible'>;
|
|
22
|
+
/**
|
|
23
|
+
* Text input for a picker sheet. It registers with the sheet's keyboard handling, which moves
|
|
24
|
+
* the sheet for a focused `BottomSheetTextInput` only; a plain `TextInput` stays under the
|
|
25
|
+
* keyboard.
|
|
26
|
+
*/
|
|
27
|
+
export declare const PickerSheetTextInput: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<import("@gorhom/bottom-sheet/lib/typescript/components/bottomSheetTextInput").BottomSheetTextInputProps & import("react").RefAttributes<import("react-native-gesture-handler").TextInput | undefined>>>;
|
|
28
|
+
export declare function PickerBottomSheetSurface({ open, setOpen, registerSurface, fill, children, snapPoints, enableDynamicSizing, ...modalProps }: PickerBottomSheetSurfaceProps): import("react/jsx-runtime").JSX.Element;
|
|
18
29
|
interface PickerPopoverSurfaceProps {
|
|
19
30
|
open: boolean;
|
|
20
31
|
setOpen: (open: boolean) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"surfaces.d.ts","sourceRoot":"","sources":["../../../../src/components/picker/surfaces.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA4C,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACjG,OAAO,EAAc,IAAI,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"surfaces.d.ts","sourceRoot":"","sources":["../../../../src/components/picker/surfaces.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA4C,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;A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S,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;IAClC,UAAU,CAAC,EAAE,SAAS,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;IACpC,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,kBAAkB,CAAC;CAC5B;AAED,wBAAgB,oBAAoB,CAAC,EACnC,IAAI,EACJ,OAAO,EACP,eAAe,EACf,SAAS,EACT,UAAU,EACV,QAAQ,EACR,SAAS,EACT,gBAAgB,EAChB,QAAQ,EACR,KAAgB,GACjB,EAAE,yBAAyB,kDA+D3B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cdx-ui/components",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -106,10 +106,10 @@
|
|
|
106
106
|
"@marceloterreiro/flash-calendar": "2.0.0",
|
|
107
107
|
"react-native-reanimated-carousel": "5.0.0-beta.5",
|
|
108
108
|
"uniwind": "1.10.0",
|
|
109
|
-
"@cdx-ui/
|
|
110
|
-
"@cdx-ui/
|
|
111
|
-
"@cdx-ui/
|
|
112
|
-
"@cdx-ui/
|
|
109
|
+
"@cdx-ui/utils": "0.3.5",
|
|
110
|
+
"@cdx-ui/formatters": "0.3.5",
|
|
111
|
+
"@cdx-ui/icons": "0.3.5",
|
|
112
|
+
"@cdx-ui/primitives": "0.3.5"
|
|
113
113
|
},
|
|
114
114
|
"devDependencies": {
|
|
115
115
|
"@dnd-kit/core": "6.3.1",
|
|
@@ -20,7 +20,9 @@ export const chipRootVariants = cva(
|
|
|
20
20
|
{
|
|
21
21
|
variants: {
|
|
22
22
|
variant: {
|
|
23
|
-
|
|
23
|
+
// Explicit `border-0` keeps `borderWidth` defined when a chip switches from `outline`.
|
|
24
|
+
// Android otherwise stops painting the label inside the `overflow-hidden` root.
|
|
25
|
+
subtle: ['border-0'],
|
|
24
26
|
outline: ['bg-transparent', 'border'],
|
|
25
27
|
},
|
|
26
28
|
color: {
|
|
@@ -17,4 +17,6 @@ export const colorFieldInputPlaceholderVariants = inputFieldPlaceholderVariants;
|
|
|
17
17
|
|
|
18
18
|
export const colorFieldSlotVariants = inputSlotVariants;
|
|
19
19
|
|
|
20
|
-
export type ColorFieldGroupVariantProps = InputVariantProps
|
|
20
|
+
export type ColorFieldGroupVariantProps = Omit<InputVariantProps, 'variant'> & {
|
|
21
|
+
variant?: 'outline';
|
|
22
|
+
};
|
|
@@ -48,4 +48,9 @@ export const dateFieldSegmentVariants = cva(
|
|
|
48
48
|
|
|
49
49
|
export const dateFieldSuffixVariants = inputSlotVariants;
|
|
50
50
|
|
|
51
|
-
export type DateFieldGroupVariantProps =
|
|
51
|
+
export type DateFieldGroupVariantProps = Omit<
|
|
52
|
+
VariantProps<typeof dateFieldGroupVariants>,
|
|
53
|
+
'variant'
|
|
54
|
+
> & {
|
|
55
|
+
variant?: 'outline';
|
|
56
|
+
};
|
|
@@ -268,7 +268,7 @@ const DrawerPermanentPanel = ({
|
|
|
268
268
|
const animatedStyle = useAnimatedStyle(() => {
|
|
269
269
|
const value = extent.get();
|
|
270
270
|
return isHorizontal ? { width: value } : { height: value };
|
|
271
|
-
}, [isHorizontal]);
|
|
271
|
+
}, [extent, isHorizontal]);
|
|
272
272
|
|
|
273
273
|
return (
|
|
274
274
|
<Animated.View
|
|
@@ -37,10 +37,11 @@ export interface InputProps extends ViewProps, IInputFieldProps {
|
|
|
37
37
|
/** Shell content — typically `Input.Field` plus optional `Input.Slot`/`Input.Icon`. */
|
|
38
38
|
children?: ReactNode;
|
|
39
39
|
/**
|
|
40
|
-
* Visual style variant.
|
|
40
|
+
* Visual style variant. `outline` is a bordered field on the page surface; `subtle` is a
|
|
41
|
+
* filled, borderless field for dense or nested surfaces such as a search field in a popup.
|
|
41
42
|
* @default 'outline'
|
|
42
43
|
*/
|
|
43
|
-
variant?: 'outline';
|
|
44
|
+
variant?: 'outline' | 'subtle';
|
|
44
45
|
/**
|
|
45
46
|
* Height, padding, and field font size.
|
|
46
47
|
* @default 'default'
|
|
@@ -1,40 +1,60 @@
|
|
|
1
1
|
import { cva, type VariantProps } from '@cdx-ui/utils';
|
|
2
2
|
import { DISABLED_CURSOR, TRANSITION_COLORS, WEB_NARROW_FIELD_TEXT } from '../../styles/constants';
|
|
3
3
|
|
|
4
|
+
// State border colors are listed after each variant's resting border so they win on native,
|
|
5
|
+
// where Uniwind resolves equal-specificity conflicts by class order.
|
|
6
|
+
const FIELD_STATE_BORDER = [
|
|
7
|
+
'web:data-[focus=true]:data-[invalid=false]:ring-stroke-action',
|
|
8
|
+
'web:data-[focus=true]:data-[invalid=false]:border-stroke-action',
|
|
9
|
+
'web:data-[focus=true]:data-[invalid=true]:ring-stroke-danger',
|
|
10
|
+
'web:data-[focus=true]:data-[invalid=true]:border-stroke-danger',
|
|
11
|
+
'native:data-[field-state=focused]:border-stroke-action',
|
|
12
|
+
'native:data-[field-state=focused-invalid]:border-stroke-danger',
|
|
13
|
+
'data-[invalid=true]:border-stroke-danger',
|
|
14
|
+
];
|
|
15
|
+
|
|
4
16
|
export const inputRootVariants = cva(
|
|
5
17
|
[
|
|
6
18
|
'w-full flex-row items-center overflow-hidden',
|
|
7
|
-
'
|
|
8
|
-
'border-solid border-stroke-primary',
|
|
19
|
+
'border-solid',
|
|
9
20
|
'web:border-default native:border-[length:var(--border-width-default)]',
|
|
10
21
|
'rounded-[var(--border-radius-default)]',
|
|
11
22
|
TRANSITION_COLORS,
|
|
12
|
-
'data-[disabled=true]:bg-surface-secondary',
|
|
13
23
|
'data-[disabled=true]:opacity-[var(--opacity-disabled)]',
|
|
14
24
|
DISABLED_CURSOR,
|
|
15
25
|
'data-[readonly=true]:cursor-default',
|
|
16
|
-
'data-[readonly=true]:bg-surface-secondary',
|
|
17
|
-
'web:data-[hover=true]:data-[focus=false]:data-[invalid=false]:border-stroke-hover',
|
|
18
26
|
// Web: inset ring avoids a border-width change so the shell never shifts on focus and
|
|
19
|
-
// no per-size padding compensation is required.
|
|
20
|
-
// the two read as a single focus outline
|
|
27
|
+
// no per-size padding compensation is required. Each variant recolors the border to match
|
|
28
|
+
// the ring so the two read as a single focus outline.
|
|
21
29
|
'web:data-[focus=true]:ring-inset',
|
|
22
30
|
'web:data-[focus=true]:ring-[length:var(--border-width-focused)]',
|
|
23
|
-
'web:data-[focus=true]:data-[invalid=false]:ring-stroke-action',
|
|
24
|
-
'web:data-[focus=true]:data-[invalid=false]:border-stroke-action',
|
|
25
|
-
'web:data-[focus=true]:data-[invalid=true]:ring-stroke-danger',
|
|
26
|
-
'web:data-[focus=true]:data-[invalid=true]:border-stroke-danger',
|
|
27
31
|
// Native: thicker border on focus; size variants below subtract a hairline of padding
|
|
28
32
|
// so layout doesn't shift by 1px.
|
|
29
33
|
'native:data-[focus=true]:border-[length:var(--border-width-focused)]',
|
|
30
|
-
'native:data-[field-state=focused]:border-stroke-action',
|
|
31
|
-
'native:data-[field-state=focused-invalid]:border-stroke-danger',
|
|
32
|
-
'data-[invalid=true]:border-stroke-danger',
|
|
33
34
|
],
|
|
34
35
|
{
|
|
35
36
|
variants: {
|
|
36
37
|
variant: {
|
|
37
|
-
outline: [
|
|
38
|
+
outline: [
|
|
39
|
+
'bg-surface-primary',
|
|
40
|
+
'border-stroke-primary',
|
|
41
|
+
'data-[disabled=true]:bg-surface-secondary',
|
|
42
|
+
'data-[readonly=true]:bg-surface-secondary',
|
|
43
|
+
'web:data-[hover=true]:data-[focus=false]:data-[invalid=false]:border-stroke-hover',
|
|
44
|
+
...FIELD_STATE_BORDER,
|
|
45
|
+
],
|
|
46
|
+
// Filled, borderless at rest. The border stays at full width in a transparent color so
|
|
47
|
+
// focus and invalid recolor it without resizing the shell. Read-only drops the fill for a
|
|
48
|
+
// quiet outline because `surface-secondary` matches the fill in dark mode.
|
|
49
|
+
subtle: [
|
|
50
|
+
'bg-surface-neutral-subtle',
|
|
51
|
+
'border-transparent',
|
|
52
|
+
'web:data-[hover=true]:data-[focus=false]:data-[invalid=false]:data-[readonly=false]:bg-surface-neutral-subtle-hover',
|
|
53
|
+
'data-[readonly=true]:bg-transparent',
|
|
54
|
+
'web:data-[readonly=true]:data-[invalid=false]:border-stroke-secondary',
|
|
55
|
+
'native:data-[readonly=true]:border-stroke-secondary',
|
|
56
|
+
...FIELD_STATE_BORDER,
|
|
57
|
+
],
|
|
38
58
|
},
|
|
39
59
|
size: {
|
|
40
60
|
default: [
|
|
@@ -26,7 +26,8 @@ const SCOPE = 'OTP_INPUT';
|
|
|
26
26
|
|
|
27
27
|
const useOtpInputStyleContext = () => useStyleContext(SCOPE) as Partial<InputVariantProps>;
|
|
28
28
|
|
|
29
|
-
export interface OtpInputCellProps extends ViewProps, InputVariantProps {
|
|
29
|
+
export interface OtpInputCellProps extends ViewProps, Omit<InputVariantProps, 'variant'> {
|
|
30
|
+
variant?: 'outline';
|
|
30
31
|
className?: string;
|
|
31
32
|
children?: React.ReactNode;
|
|
32
33
|
isInvalid?: boolean;
|
|
@@ -87,7 +88,7 @@ const OtpStyledField = forwardRef<TextInput, OtpInputFieldStyledProps>((props, r
|
|
|
87
88
|
OtpStyledField.displayName = 'OtpInput.Field';
|
|
88
89
|
|
|
89
90
|
export interface OtpInputProps extends Omit<IOtpInputRootProps, 'size'>, OtpInputVariantProps {
|
|
90
|
-
variant?:
|
|
91
|
+
variant?: 'outline';
|
|
91
92
|
size?: NonNullable<InputProps['size']>;
|
|
92
93
|
className?: string;
|
|
93
94
|
}
|