@tribepad/themis 1.0.10 → 1.0.12
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/elements/Accordion/Accordion.types.d.ts +44 -4
- package/dist/elements/Accordion/Accordion.types.d.ts.map +1 -1
- package/dist/elements/Accordion/index.js +1 -1
- package/dist/elements/Accordion/index.js.map +1 -1
- package/dist/elements/Accordion/index.mjs +1 -1
- package/dist/elements/Accordion/index.mjs.map +1 -1
- package/dist/elements/AlertDialog/AlertDialog.types.d.ts +19 -2
- package/dist/elements/AlertDialog/AlertDialog.types.d.ts.map +1 -1
- package/dist/elements/AlertDialog/index.js +1 -1
- package/dist/elements/AlertDialog/index.js.map +1 -1
- package/dist/elements/AlertDialog/index.mjs +1 -1
- package/dist/elements/AlertDialog/index.mjs.map +1 -1
- package/dist/elements/Avatar/Avatar.d.ts +1 -21
- package/dist/elements/Avatar/Avatar.d.ts.map +1 -1
- package/dist/elements/Avatar/Avatar.types.d.ts +30 -11
- package/dist/elements/Avatar/Avatar.types.d.ts.map +1 -1
- package/dist/elements/Avatar/AvatarGroup.d.ts +1 -17
- package/dist/elements/Avatar/AvatarGroup.d.ts.map +1 -1
- package/dist/elements/Avatar/index.js +1 -1
- package/dist/elements/Avatar/index.js.map +1 -1
- package/dist/elements/Avatar/index.mjs +1 -1
- package/dist/elements/Avatar/index.mjs.map +1 -1
- package/dist/elements/Badge/Badge.types.d.ts +16 -9
- package/dist/elements/Badge/Badge.types.d.ts.map +1 -1
- package/dist/elements/Badge/index.js +1 -1
- package/dist/elements/Badge/index.js.map +1 -1
- package/dist/elements/Badge/index.mjs +1 -1
- package/dist/elements/Badge/index.mjs.map +1 -1
- package/dist/elements/Breadcrumbs/Breadcrumbs.d.ts +2 -34
- package/dist/elements/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/dist/elements/Breadcrumbs/Breadcrumbs.types.d.ts +25 -2
- package/dist/elements/Breadcrumbs/Breadcrumbs.types.d.ts.map +1 -1
- package/dist/elements/Breadcrumbs/index.js +1 -1
- package/dist/elements/Breadcrumbs/index.js.map +1 -1
- package/dist/elements/Breadcrumbs/index.mjs +1 -1
- package/dist/elements/Breadcrumbs/index.mjs.map +1 -1
- package/dist/elements/Button/Button.d.ts +1 -24
- package/dist/elements/Button/Button.d.ts.map +1 -1
- package/dist/elements/Button/Button.types.d.ts +28 -7
- package/dist/elements/Button/Button.types.d.ts.map +1 -1
- package/dist/elements/ButtonGroup/ButtonGroup.d.ts +3 -14
- package/dist/elements/ButtonGroup/ButtonGroup.d.ts.map +1 -1
- package/dist/elements/ButtonGroup/ButtonGroup.types.d.ts +14 -5
- package/dist/elements/ButtonGroup/ButtonGroup.types.d.ts.map +1 -1
- package/dist/elements/ButtonGroup/index.js +1 -1
- package/dist/elements/ButtonGroup/index.js.map +1 -1
- package/dist/elements/ButtonGroup/index.mjs +1 -1
- package/dist/elements/ButtonGroup/index.mjs.map +1 -1
- package/dist/elements/Card/Card.d.ts +9 -94
- package/dist/elements/Card/Card.d.ts.map +1 -1
- package/dist/elements/Card/Card.types.d.ts +69 -17
- package/dist/elements/Card/Card.types.d.ts.map +1 -1
- package/dist/elements/Card/index.js +1 -1
- package/dist/elements/Card/index.js.map +1 -1
- package/dist/elements/Card/index.mjs +1 -1
- package/dist/elements/Card/index.mjs.map +1 -1
- package/dist/elements/Carousel/Carousel.types.d.ts +26 -7
- package/dist/elements/Carousel/Carousel.types.d.ts.map +1 -1
- package/dist/elements/Chart/Chart.d.ts +2 -40
- package/dist/elements/Chart/Chart.d.ts.map +1 -1
- package/dist/elements/Chart/Chart.types.d.ts +25 -10
- package/dist/elements/Chart/Chart.types.d.ts.map +1 -1
- package/dist/elements/Chart/index.js +1 -1
- package/dist/elements/Chart/index.js.map +1 -1
- package/dist/elements/Chart/index.mjs +1 -1
- package/dist/elements/Chart/index.mjs.map +1 -1
- package/dist/elements/Checkbox/Checkbox.d.ts +1 -31
- package/dist/elements/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/elements/Checkbox/Checkbox.types.d.ts +33 -1
- package/dist/elements/Checkbox/Checkbox.types.d.ts.map +1 -1
- package/dist/elements/Checkbox/index.js +1 -1
- package/dist/elements/Checkbox/index.js.map +1 -1
- package/dist/elements/Checkbox/index.mjs +1 -1
- package/dist/elements/Checkbox/index.mjs.map +1 -1
- package/dist/elements/CheckboxGroup/CheckboxGroup.d.ts +1 -26
- package/dist/elements/CheckboxGroup/CheckboxGroup.d.ts.map +1 -1
- package/dist/elements/CheckboxGroup/CheckboxGroup.types.d.ts +48 -4
- package/dist/elements/CheckboxGroup/CheckboxGroup.types.d.ts.map +1 -1
- package/dist/elements/CheckboxGroup/index.js +1 -1
- package/dist/elements/CheckboxGroup/index.js.map +1 -1
- package/dist/elements/CheckboxGroup/index.mjs +1 -1
- package/dist/elements/CheckboxGroup/index.mjs.map +1 -1
- package/dist/elements/Combobox/Combobox.d.ts +1 -30
- package/dist/elements/Combobox/Combobox.d.ts.map +1 -1
- package/dist/elements/Combobox/Combobox.types.d.ts +38 -4
- package/dist/elements/Combobox/Combobox.types.d.ts.map +1 -1
- package/dist/elements/Combobox/index.js +1 -1
- package/dist/elements/Combobox/index.js.map +1 -1
- package/dist/elements/Combobox/index.mjs +1 -1
- package/dist/elements/Combobox/index.mjs.map +1 -1
- package/dist/elements/Dropdown/Dropdown.d.ts +10 -124
- package/dist/elements/Dropdown/Dropdown.d.ts.map +1 -1
- package/dist/elements/Dropdown/Dropdown.types.d.ts +53 -8
- package/dist/elements/Dropdown/Dropdown.types.d.ts.map +1 -1
- package/dist/elements/FileField/FileField.d.ts +2 -39
- package/dist/elements/FileField/FileField.d.ts.map +1 -1
- package/dist/elements/FileField/FileField.types.d.ts +31 -13
- package/dist/elements/FileField/FileField.types.d.ts.map +1 -1
- package/dist/elements/FileField/index.js +1 -1
- package/dist/elements/FileField/index.js.map +1 -1
- package/dist/elements/FileField/index.mjs +1 -1
- package/dist/elements/FileField/index.mjs.map +1 -1
- package/dist/elements/FormLayout/FormLayout.d.ts +2 -37
- package/dist/elements/FormLayout/FormLayout.d.ts.map +1 -1
- package/dist/elements/FormLayout/FormLayout.types.d.ts +19 -3
- package/dist/elements/FormLayout/FormLayout.types.d.ts.map +1 -1
- package/dist/elements/MatrixGrid/MatrixGrid.d.ts +2 -29
- package/dist/elements/MatrixGrid/MatrixGrid.d.ts.map +1 -1
- package/dist/elements/MatrixGrid/MatrixGrid.types.d.ts +22 -1
- package/dist/elements/MatrixGrid/MatrixGrid.types.d.ts.map +1 -1
- package/dist/elements/MatrixGrid/index.js +1 -1
- package/dist/elements/MatrixGrid/index.js.map +1 -1
- package/dist/elements/MatrixGrid/index.mjs +1 -1
- package/dist/elements/MatrixGrid/index.mjs.map +1 -1
- package/dist/elements/Modal/Modal.types.d.ts +69 -9
- package/dist/elements/Modal/Modal.types.d.ts.map +1 -1
- package/dist/elements/Pagination/Pagination.d.ts +2 -28
- package/dist/elements/Pagination/Pagination.d.ts.map +1 -1
- package/dist/elements/Pagination/Pagination.types.d.ts +26 -1
- package/dist/elements/Pagination/Pagination.types.d.ts.map +1 -1
- package/dist/elements/Pagination/index.js +1 -1
- package/dist/elements/Pagination/index.js.map +1 -1
- package/dist/elements/Pagination/index.mjs +1 -1
- package/dist/elements/Pagination/index.mjs.map +1 -1
- package/dist/elements/Panel/Panel.types.d.ts +67 -9
- package/dist/elements/Panel/Panel.types.d.ts.map +1 -1
- package/dist/elements/PasswordField/PasswordField.d.ts +2 -26
- package/dist/elements/PasswordField/PasswordField.d.ts.map +1 -1
- package/dist/elements/PasswordField/PasswordField.types.d.ts +27 -2
- package/dist/elements/PasswordField/PasswordField.types.d.ts.map +1 -1
- package/dist/elements/PasswordField/index.js +1 -1
- package/dist/elements/PasswordField/index.js.map +1 -1
- package/dist/elements/PasswordField/index.mjs +1 -1
- package/dist/elements/PasswordField/index.mjs.map +1 -1
- package/dist/elements/Progress/Progress.types.d.ts +25 -3
- package/dist/elements/Progress/Progress.types.d.ts.map +1 -1
- package/dist/elements/Progress/index.js +1 -1
- package/dist/elements/Progress/index.js.map +1 -1
- package/dist/elements/Progress/index.mjs +1 -1
- package/dist/elements/Progress/index.mjs.map +1 -1
- package/dist/elements/RadioGroup/RadioGroup.d.ts +1 -26
- package/dist/elements/RadioGroup/RadioGroup.d.ts.map +1 -1
- package/dist/elements/RadioGroup/RadioGroup.types.d.ts +43 -4
- package/dist/elements/RadioGroup/RadioGroup.types.d.ts.map +1 -1
- package/dist/elements/RadioGroup/index.js +1 -1
- package/dist/elements/RadioGroup/index.js.map +1 -1
- package/dist/elements/RadioGroup/index.mjs +1 -1
- package/dist/elements/RadioGroup/index.mjs.map +1 -1
- package/dist/elements/RatingScale/RatingScale.d.ts +2 -30
- package/dist/elements/RatingScale/RatingScale.d.ts.map +1 -1
- package/dist/elements/RatingScale/RatingScale.types.d.ts +29 -1
- package/dist/elements/RatingScale/RatingScale.types.d.ts.map +1 -1
- package/dist/elements/RatingScale/index.js +1 -1
- package/dist/elements/RatingScale/index.js.map +1 -1
- package/dist/elements/RatingScale/index.mjs +1 -1
- package/dist/elements/RatingScale/index.mjs.map +1 -1
- package/dist/elements/SearchField/SearchField.d.ts +2 -26
- package/dist/elements/SearchField/SearchField.d.ts.map +1 -1
- package/dist/elements/SearchField/SearchField.types.d.ts +26 -2
- package/dist/elements/SearchField/SearchField.types.d.ts.map +1 -1
- package/dist/elements/SearchField/index.js +1 -1
- package/dist/elements/SearchField/index.js.map +1 -1
- package/dist/elements/SearchField/index.mjs +1 -1
- package/dist/elements/SearchField/index.mjs.map +1 -1
- package/dist/elements/Select/Select.d.ts +3 -61
- package/dist/elements/Select/Select.d.ts.map +1 -1
- package/dist/elements/Select/Select.types.d.ts +52 -4
- package/dist/elements/Select/Select.types.d.ts.map +1 -1
- package/dist/elements/Select/index.js +1 -1
- package/dist/elements/Select/index.js.map +1 -1
- package/dist/elements/Select/index.mjs +1 -1
- package/dist/elements/Select/index.mjs.map +1 -1
- package/dist/elements/SituationalJudgement/SituationalJudgement.d.ts +2 -28
- package/dist/elements/SituationalJudgement/SituationalJudgement.d.ts.map +1 -1
- package/dist/elements/SituationalJudgement/SituationalJudgement.types.d.ts +23 -1
- package/dist/elements/SituationalJudgement/SituationalJudgement.types.d.ts.map +1 -1
- package/dist/elements/SituationalJudgement/index.js +1 -1
- package/dist/elements/SituationalJudgement/index.js.map +1 -1
- package/dist/elements/SituationalJudgement/index.mjs +1 -1
- package/dist/elements/SituationalJudgement/index.mjs.map +1 -1
- package/dist/elements/Skeleton/Skeleton.types.d.ts +11 -6
- package/dist/elements/Skeleton/Skeleton.types.d.ts.map +1 -1
- package/dist/elements/Skeleton/index.js +1 -1
- package/dist/elements/Skeleton/index.js.map +1 -1
- package/dist/elements/Skeleton/index.mjs +1 -1
- package/dist/elements/Skeleton/index.mjs.map +1 -1
- package/dist/elements/Switch/Switch.types.d.ts +31 -7
- package/dist/elements/Switch/Switch.types.d.ts.map +1 -1
- package/dist/elements/Switch/index.js +1 -1
- package/dist/elements/Switch/index.js.map +1 -1
- package/dist/elements/Switch/index.mjs +1 -1
- package/dist/elements/Switch/index.mjs.map +1 -1
- package/dist/elements/Table/Table.d.ts +7 -79
- package/dist/elements/Table/Table.d.ts.map +1 -1
- package/dist/elements/Table/Table.types.d.ts +82 -17
- package/dist/elements/Table/Table.types.d.ts.map +1 -1
- package/dist/elements/Table/index.js +1 -1
- package/dist/elements/Table/index.js.map +1 -1
- package/dist/elements/Table/index.mjs +1 -1
- package/dist/elements/Table/index.mjs.map +1 -1
- package/dist/elements/Tabs/Tabs.types.d.ts +61 -5
- package/dist/elements/Tabs/Tabs.types.d.ts.map +1 -1
- package/dist/elements/Tabs/index.js +1 -1
- package/dist/elements/Tabs/index.js.map +1 -1
- package/dist/elements/Tabs/index.mjs +1 -1
- package/dist/elements/Tabs/index.mjs.map +1 -1
- package/dist/elements/TextField/TextField.d.ts +6 -71
- package/dist/elements/TextField/TextField.d.ts.map +1 -1
- package/dist/elements/TextField/TextField.types.d.ts +76 -12
- package/dist/elements/TextField/TextField.types.d.ts.map +1 -1
- package/dist/elements/TextField/index.js +1 -1
- package/dist/elements/TextField/index.js.map +1 -1
- package/dist/elements/TextField/index.mjs +1 -1
- package/dist/elements/TextField/index.mjs.map +1 -1
- package/dist/elements/Toast/Toast.types.d.ts +12 -20
- package/dist/elements/Toast/Toast.types.d.ts.map +1 -1
- package/dist/elements/Toast/Toaster.d.ts +2 -5
- package/dist/elements/Toast/Toaster.d.ts.map +1 -1
- package/dist/elements/Toast/index.js +1 -1
- package/dist/elements/Toast/index.js.map +1 -1
- package/dist/elements/Toast/index.mjs +1 -1
- package/dist/elements/Toast/index.mjs.map +1 -1
- package/dist/elements/Tooltip/Tooltip.types.d.ts +39 -4
- package/dist/elements/Tooltip/Tooltip.types.d.ts.map +1 -1
- package/dist/elements/Tooltip/index.js +1 -1
- package/dist/elements/Tooltip/index.js.map +1 -1
- package/dist/elements/Tooltip/index.mjs +1 -1
- package/dist/elements/Tooltip/index.mjs.map +1 -1
- package/dist/elements/index.js +1 -1
- package/dist/elements/index.js.map +1 -1
- package/dist/elements/index.mjs +1 -1
- package/dist/elements/index.mjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -15,46 +15,28 @@ export { inputVariants, labelVariants, descriptionVariants, errorMessageVariants
|
|
|
15
15
|
* TextFieldLabel Sub-component
|
|
16
16
|
* Styled label with optional required indicator
|
|
17
17
|
*/
|
|
18
|
-
export declare const TextFieldLabel: import("react").ForwardRefExoticComponent<
|
|
19
|
-
state: "default" | "error" | "disabled";
|
|
20
|
-
children?: any;
|
|
21
|
-
className?: string | undefined;
|
|
22
|
-
htmlFor?: string | undefined;
|
|
23
|
-
} & Omit<import("react-aria-components").LabelProps, "className" | "children" | "state" | "htmlFor"> & import("react").RefAttributes<HTMLLabelElement>>;
|
|
18
|
+
export declare const TextFieldLabel: import("react").ForwardRefExoticComponent<import("./TextField.types").TextFieldLabelPropsOwn & Omit<import("react-aria-components").LabelProps, keyof import("./TextField.types").TextFieldLabelPropsOwn> & import("react").RefAttributes<HTMLLabelElement>>;
|
|
24
19
|
/**
|
|
25
20
|
* TextFieldInput Sub-component
|
|
26
21
|
* Styled input with size and state variants
|
|
27
22
|
*/
|
|
28
|
-
export declare const TextFieldInput: import("react").ForwardRefExoticComponent<
|
|
29
|
-
size: "default" | "sm" | "lg";
|
|
30
|
-
state: "success" | "default" | "readonly" | "error" | "disabled";
|
|
31
|
-
className?: string | undefined;
|
|
32
|
-
} & Omit<import("react-aria-components").InputProps, "className" | "size" | "state"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
23
|
+
export declare const TextFieldInput: import("react").ForwardRefExoticComponent<import("./TextField.types").TextFieldInputPropsOwn & Omit<import("react-aria-components").InputProps, keyof import("./TextField.types").TextFieldInputPropsOwn> & import("react").RefAttributes<HTMLInputElement>>;
|
|
33
24
|
/**
|
|
34
25
|
* TextFieldDescription Sub-component
|
|
35
26
|
* Helper text displayed below the input
|
|
36
27
|
*/
|
|
37
|
-
export declare const TextFieldDescription: import("react").ForwardRefExoticComponent<
|
|
38
|
-
children?: any;
|
|
39
|
-
className?: string | undefined;
|
|
40
|
-
} & Omit<import("react-aria-components").TextProps, "className" | "children"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
28
|
+
export declare const TextFieldDescription: import("react").ForwardRefExoticComponent<import("./TextField.types").TextFieldDescriptionPropsOwn & Omit<import("react-aria-components").TextProps, keyof import("./TextField.types").TextFieldDescriptionPropsOwn> & import("react").RefAttributes<HTMLDivElement>>;
|
|
41
29
|
/**
|
|
42
30
|
* TextFieldError Sub-component
|
|
43
31
|
* Error message displayed when field is invalid
|
|
44
32
|
* Note: We use AriaFieldError with explicit role="alert" for screen reader announcements
|
|
45
33
|
*/
|
|
46
|
-
export declare const TextFieldError: import("react").ForwardRefExoticComponent<
|
|
47
|
-
children?: any;
|
|
48
|
-
className?: string | undefined;
|
|
49
|
-
} & Omit<import("react-aria-components").TextProps, "className" | "children"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
34
|
+
export declare const TextFieldError: import("react").ForwardRefExoticComponent<import("./TextField.types").TextFieldErrorPropsOwn & Omit<import("react-aria-components").TextProps, keyof import("./TextField.types").TextFieldErrorPropsOwn> & import("react").RefAttributes<HTMLDivElement>>;
|
|
50
35
|
/**
|
|
51
36
|
* TextFieldSuccess Sub-component
|
|
52
37
|
* Success message displayed when field is valid
|
|
53
38
|
*/
|
|
54
|
-
export declare const TextFieldSuccess: import("react").ForwardRefExoticComponent<
|
|
55
|
-
children?: any;
|
|
56
|
-
className?: string | undefined;
|
|
57
|
-
} & Omit<import("react-aria-components").TextProps, "className" | "children"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
39
|
+
export declare const TextFieldSuccess: import("react").ForwardRefExoticComponent<import("./TextField.types").TextFieldDescriptionPropsOwn & Omit<import("react-aria-components").TextProps, keyof import("./TextField.types").TextFieldDescriptionPropsOwn> & import("react").RefAttributes<HTMLDivElement>>;
|
|
58
40
|
/**
|
|
59
41
|
* TextField Component
|
|
60
42
|
* Fully accessible text input with React Aria and themed styling
|
|
@@ -67,53 +49,6 @@ export declare const TextFieldSuccess: import("react").ForwardRefExoticComponent
|
|
|
67
49
|
* type="email"
|
|
68
50
|
* />
|
|
69
51
|
*/
|
|
70
|
-
export declare const TextField: import("react").ForwardRefExoticComponent<
|
|
71
|
-
size: "default" | "sm" | "lg";
|
|
72
|
-
type: "search" | "text" | "url" | "email" | "password";
|
|
73
|
-
disableCopyPaste: boolean;
|
|
74
|
-
prefixSize: number;
|
|
75
|
-
suffixSize: number;
|
|
76
|
-
expandOnFocus: boolean;
|
|
77
|
-
collapsedWidth: string;
|
|
78
|
-
isIconHidden: boolean;
|
|
79
|
-
className?: string | undefined;
|
|
80
|
-
children?: any;
|
|
81
|
-
id?: string | undefined;
|
|
82
|
-
'aria-label'?: string | undefined;
|
|
83
|
-
'aria-labelledby'?: string | undefined;
|
|
84
|
-
'aria-describedby'?: string | undefined;
|
|
85
|
-
'aria-live'?: "off" | "polite" | "assertive" | undefined;
|
|
86
|
-
'aria-hidden'?: boolean | undefined;
|
|
87
|
-
'data-testid'?: string | undefined;
|
|
88
|
-
label?: string | undefined;
|
|
89
|
-
description?: string | undefined;
|
|
90
|
-
errorMessage?: string | undefined;
|
|
91
|
-
successMessage?: string | undefined;
|
|
92
|
-
isRequired?: boolean | undefined;
|
|
93
|
-
isReadOnly?: boolean | undefined;
|
|
94
|
-
isDisabled?: boolean | undefined;
|
|
95
|
-
isInvalid?: boolean | undefined;
|
|
96
|
-
isValid?: boolean | undefined;
|
|
97
|
-
placeholder?: string | undefined;
|
|
98
|
-
value?: string | undefined;
|
|
99
|
-
defaultValue?: string | undefined;
|
|
100
|
-
name?: string | undefined;
|
|
101
|
-
autoFocus?: boolean | undefined;
|
|
102
|
-
autoComplete?: "off" | "name" | "on" | "tel" | "url" | "email" | "additional-name" | "address-level1" | "address-level2" | "address-level3" | "address-level4" | "address-line1" | "address-line2" | "address-line3" | "bday-day" | "bday-month" | "bday-year" | "cc-csc" | "cc-exp" | "cc-exp-month" | "cc-exp-year" | "cc-family-name" | "cc-given-name" | "cc-name" | "cc-number" | "cc-type" | "country" | "country-name" | "current-password" | "family-name" | "given-name" | "honorific-prefix" | "honorific-suffix" | "new-password" | "one-time-code" | "organization" | "postal-code" | "street-address" | "transaction-amount" | "transaction-currency" | "username" | "tel-area-code" | "tel-country-code" | "tel-extension" | "tel-local" | "tel-national" | "nickname" | "organization-title" | "cc-additional-name" | "language" | "bday" | "sex" | "impp" | "photo" | undefined;
|
|
103
|
-
maxLength?: number | undefined;
|
|
104
|
-
minLength?: number | undefined;
|
|
105
|
-
pattern?: string | undefined;
|
|
106
|
-
patternDescription?: string | undefined;
|
|
107
|
-
prefix?: any;
|
|
108
|
-
suffix?: any;
|
|
109
|
-
showPasswordToggle?: boolean | undefined;
|
|
110
|
-
onSubmit?: ((value: string) => void) | undefined;
|
|
111
|
-
onClear?: (() => void) | undefined;
|
|
112
|
-
}> & Omit<import("react-aria-components").TextFieldProps, "className" | "children" | "id" | "aria-label" | "aria-labelledby" | "aria-describedby" | "aria-live" | "aria-hidden" | "data-testid" | "pattern" | "type" | "isDisabled" | "value" | "autoFocus" | "name" | "onSubmit" | "size" | "label" | "autoComplete" | "defaultValue" | "maxLength" | "minLength" | "prefix" | "isReadOnly" | "isInvalid" | "isRequired" | "description" | "errorMessage" | "onClear" | "successMessage" | "isValid" | "placeholder" | "patternDescription" | "disableCopyPaste" | "suffix" | "prefixSize" | "suffixSize" | "expandOnFocus" | "collapsedWidth" | "showPasswordToggle" | "isIconHidden"> & {
|
|
113
|
-
onChange?: (value: string) => void;
|
|
114
|
-
validate?: (value: string) => string | undefined | null;
|
|
115
|
-
prefix?: import("react").ReactNode;
|
|
116
|
-
suffix?: import("react").ReactNode;
|
|
117
|
-
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
52
|
+
export declare const TextField: import("react").ForwardRefExoticComponent<import("./TextField.types").TextFieldPropsOwn & Omit<import("react-aria-components").TextFieldProps, keyof import("./TextField.types").TextFieldPropsOwn> & import("react").RefAttributes<HTMLDivElement>>;
|
|
118
53
|
export { inputVariants as textFieldInputVariants, labelVariants as textFieldLabelVariants };
|
|
119
54
|
//# sourceMappingURL=TextField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../../src/elements/TextField/TextField.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AAEH,OAAO,iBAAiB,CAAC;AAqBzB,OAAO,EACL,aAAa,EACb,aAAa,EACb,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,oBAAoB,CAAC;AAI5B,OAAO,EACL,aAAa,EACb,aAAa,EACb,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,GACvB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../../src/elements/TextField/TextField.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AAEH,OAAO,iBAAiB,CAAC;AAqBzB,OAAO,EACL,aAAa,EACb,aAAa,EACb,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,oBAAoB,CAAC;AAI5B,OAAO,EACL,aAAa,EACb,aAAa,EACb,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,GACvB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,8PAY1B,CAAC;AAIF;;;GAGG;AACH,eAAO,MAAM,cAAc,8PAU1B,CAAC;AAIF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,uQAahC,CAAC;AAIF;;;;GAIG;AACH,eAAO,MAAM,cAAc,2PAY1B,CAAC;AAIF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,uQAa5B,CAAC;AAIF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,SAAS,sPAmTrB,CAAC;AAIF,OAAO,EAAE,aAAa,IAAI,sBAAsB,EAAE,aAAa,IAAI,sBAAsB,EAAE,CAAC"}
|
|
@@ -188,12 +188,53 @@ export declare const TextFieldPropsSchema: z.ZodObject<{
|
|
|
188
188
|
onSubmit: z.ZodOptional<z.ZodCustom<(value: string) => void, (value: string) => void>>;
|
|
189
189
|
onClear: z.ZodOptional<z.ZodCustom<() => void, () => void>>;
|
|
190
190
|
}, z.core.$strip>;
|
|
191
|
-
export
|
|
192
|
-
|
|
193
|
-
|
|
191
|
+
export interface TextFieldPropsOwn {
|
|
192
|
+
className?: string;
|
|
193
|
+
children?: ReactNode;
|
|
194
|
+
id?: string;
|
|
195
|
+
'aria-label'?: string;
|
|
196
|
+
'aria-labelledby'?: string;
|
|
197
|
+
'aria-describedby'?: string;
|
|
198
|
+
'aria-live'?: 'off' | 'polite' | 'assertive';
|
|
199
|
+
'aria-hidden'?: boolean;
|
|
200
|
+
'data-testid'?: string;
|
|
201
|
+
size?: 'sm' | 'default' | 'lg';
|
|
202
|
+
label?: string;
|
|
203
|
+
description?: string;
|
|
204
|
+
errorMessage?: string;
|
|
205
|
+
successMessage?: string;
|
|
206
|
+
type?: 'text' | 'email' | 'password' | 'url' | 'search';
|
|
207
|
+
isRequired?: boolean;
|
|
208
|
+
isReadOnly?: boolean;
|
|
209
|
+
isDisabled?: boolean;
|
|
210
|
+
isInvalid?: boolean;
|
|
211
|
+
isValid?: boolean;
|
|
212
|
+
placeholder?: string;
|
|
213
|
+
value?: string;
|
|
214
|
+
defaultValue?: string;
|
|
215
|
+
name?: string;
|
|
216
|
+
autoFocus?: boolean;
|
|
217
|
+
autoComplete?: AutoCompleteValueType;
|
|
218
|
+
maxLength?: number;
|
|
219
|
+
minLength?: number;
|
|
220
|
+
pattern?: string;
|
|
221
|
+
patternDescription?: string;
|
|
222
|
+
disableCopyPaste?: boolean;
|
|
194
223
|
prefix?: ReactNode;
|
|
195
224
|
suffix?: ReactNode;
|
|
196
|
-
|
|
225
|
+
prefixSize?: number;
|
|
226
|
+
suffixSize?: number;
|
|
227
|
+
expandOnFocus?: boolean;
|
|
228
|
+
collapsedWidth?: string;
|
|
229
|
+
showPasswordToggle?: boolean;
|
|
230
|
+
isIconHidden?: boolean;
|
|
231
|
+
onSubmit?: (value: string) => void;
|
|
232
|
+
onClear?: () => void;
|
|
233
|
+
onChange?: (value: string) => void;
|
|
234
|
+
validate?: (value: string) => string | undefined | null;
|
|
235
|
+
inputMode?: 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search';
|
|
236
|
+
}
|
|
237
|
+
export type TextFieldProps = TextFieldPropsOwn & Omit<AriaTextFieldProps, keyof TextFieldPropsOwn>;
|
|
197
238
|
/**
|
|
198
239
|
* Label props schema for TextField label sub-component
|
|
199
240
|
*/
|
|
@@ -207,7 +248,13 @@ export declare const TextFieldLabelPropsSchema: z.ZodObject<{
|
|
|
207
248
|
disabled: "disabled";
|
|
208
249
|
}>>>;
|
|
209
250
|
}, z.core.$strip>;
|
|
210
|
-
export
|
|
251
|
+
export interface TextFieldLabelPropsOwn {
|
|
252
|
+
children?: ReactNode;
|
|
253
|
+
className?: string;
|
|
254
|
+
htmlFor?: string;
|
|
255
|
+
state?: 'default' | 'error' | 'disabled';
|
|
256
|
+
}
|
|
257
|
+
export type TextFieldLabelProps = TextFieldLabelPropsOwn & Omit<AriaLabelProps, keyof TextFieldLabelPropsOwn>;
|
|
211
258
|
/**
|
|
212
259
|
* Input props schema for TextField input sub-component
|
|
213
260
|
*/
|
|
@@ -226,7 +273,12 @@ export declare const TextFieldInputPropsSchema: z.ZodObject<{
|
|
|
226
273
|
disabled: "disabled";
|
|
227
274
|
}>>>;
|
|
228
275
|
}, z.core.$strip>;
|
|
229
|
-
export
|
|
276
|
+
export interface TextFieldInputPropsOwn {
|
|
277
|
+
className?: string;
|
|
278
|
+
size?: 'sm' | 'default' | 'lg';
|
|
279
|
+
state?: 'default' | 'error' | 'success' | 'disabled' | 'readonly';
|
|
280
|
+
}
|
|
281
|
+
export type TextFieldInputProps = TextFieldInputPropsOwn & Omit<AriaInputProps, keyof TextFieldInputPropsOwn>;
|
|
230
282
|
/**
|
|
231
283
|
* Description text props schema for TextField description sub-component
|
|
232
284
|
*/
|
|
@@ -234,7 +286,11 @@ export declare const TextFieldDescriptionPropsSchema: z.ZodObject<{
|
|
|
234
286
|
children: z.ZodOptional<z.ZodAny>;
|
|
235
287
|
className: z.ZodOptional<z.ZodString>;
|
|
236
288
|
}, z.core.$strip>;
|
|
237
|
-
export
|
|
289
|
+
export interface TextFieldDescriptionPropsOwn {
|
|
290
|
+
children?: ReactNode;
|
|
291
|
+
className?: string;
|
|
292
|
+
}
|
|
293
|
+
export type TextFieldDescriptionProps = TextFieldDescriptionPropsOwn & Omit<AriaTextProps, keyof TextFieldDescriptionPropsOwn>;
|
|
238
294
|
/**
|
|
239
295
|
* Error message props schema for TextField error sub-component
|
|
240
296
|
*/
|
|
@@ -242,7 +298,11 @@ export declare const TextFieldErrorPropsSchema: z.ZodObject<{
|
|
|
242
298
|
children: z.ZodOptional<z.ZodAny>;
|
|
243
299
|
className: z.ZodOptional<z.ZodString>;
|
|
244
300
|
}, z.core.$strip>;
|
|
245
|
-
export
|
|
301
|
+
export interface TextFieldErrorPropsOwn {
|
|
302
|
+
children?: ReactNode;
|
|
303
|
+
className?: string;
|
|
304
|
+
}
|
|
305
|
+
export type TextFieldErrorProps = TextFieldErrorPropsOwn & Omit<AriaTextProps, keyof TextFieldErrorPropsOwn>;
|
|
246
306
|
/**
|
|
247
307
|
* Success message props schema for TextField success sub-component
|
|
248
308
|
* @see DECISIONS.md Decision 5
|
|
@@ -251,11 +311,15 @@ export declare const TextFieldSuccessPropsSchema: z.ZodObject<{
|
|
|
251
311
|
children: z.ZodOptional<z.ZodAny>;
|
|
252
312
|
className: z.ZodOptional<z.ZodString>;
|
|
253
313
|
}, z.core.$strip>;
|
|
254
|
-
export
|
|
314
|
+
export interface TextFieldSuccessPropsOwn {
|
|
315
|
+
children?: ReactNode;
|
|
316
|
+
className?: string;
|
|
317
|
+
}
|
|
318
|
+
export type TextFieldSuccessProps = TextFieldSuccessPropsOwn & Omit<AriaTextProps, keyof TextFieldSuccessPropsOwn>;
|
|
255
319
|
/**
|
|
256
320
|
* CVA variant configuration types
|
|
257
321
|
*/
|
|
258
|
-
export type TextFieldSize =
|
|
259
|
-
export type InputState =
|
|
260
|
-
export type LabelState =
|
|
322
|
+
export type TextFieldSize = TextFieldPropsOwn['size'];
|
|
323
|
+
export type InputState = TextFieldInputPropsOwn['state'];
|
|
324
|
+
export type LabelState = TextFieldLabelPropsOwn['state'];
|
|
261
325
|
//# sourceMappingURL=TextField.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextField.types.d.ts","sourceRoot":"","sources":["../../../src/elements/TextField/TextField.types.ts"],"names":[],"mappings":"AAAA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M,mBAAmB,GAAG,sBAAsB,GACtD,IAAI,CAAC,aAAa,EAAE,MAAM,sBAAsB,CAAC,CAAC;AAEpD;;;GAGG;AACH,eAAO,MAAM,2BAA2B;;;iBAGtC,CAAC;AAEH,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,qBAAqB,GAAG,wBAAwB,GAC1D,IAAI,CAAC,aAAa,EAAE,MAAM,wBAAwB,CAAC,CAAC;AAEtD;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC;AACtD,MAAM,MAAM,UAAU,GAAG,sBAAsB,CAAC,OAAO,CAAC,CAAC;AACzD,MAAM,MAAM,UAAU,GAAG,sBAAsB,CAAC,OAAO,CAAC,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
'use strict';var react=require('react'),reactAriaComponents=require('react-aria-components'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),lucideReact=require('lucide-react'),classVarianceAuthority=require('class-variance-authority'),jsxRuntime=require('react/jsx-runtime'),zod=require('zod');function d(...t){return tailwindMerge.twMerge(clsx.clsx(t))}var ae="data-[pressed]:scale-[0.97]";var ne="data-[hovered]:shadow-md";var U="hc:data-[hovered]:outline hc:data-[hovered]:outline-2 hc:data-[hovered]:outline-foreground",q="hc:data-[pressed]:outline hc:data-[pressed]:outline-2 hc:data-[pressed]:outline-offset-1 hc:data-[pressed]:outline-foreground",se="disabled:pointer-events-none disabled:opacity-50";var le=classVarianceAuthority.cva("inline-flex justify-center min-h-[44px] min-w-[44px] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50",{variants:{fullWidth:{true:"w-full",false:""},inVerticalGroup:{true:"items-stretch",false:"items-center"}},defaultVariants:{fullWidth:false,inVerticalGroup:false}}),de=classVarianceAuthority.cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 relative cursor-pointer",{variants:{variant:{default:"bg-[var(--primary-action)] text-[var(--primary-action-foreground)] shadow-md hover:bg-[var(--primary-action-hover)] data-[pressed]:bg-[var(--primary-action)]/80",destructive:"bg-[var(--destructive-background)] text-[var(--destructive-foreground)] shadow-md hover:bg-[var(--destructive-background)]/90 data-[pressed]:bg-[var(--destructive-background)]/80",outline:"border border-[var(--input-border)] bg-[var(--page-background)] hover:bg-[var(--input-border)] data-[pressed]:bg-[var(--input-border)]",secondary:"bg-[var(--secondary)] text-[var(--secondary-foreground)] shadow-md hover:bg-[var(--secondary)]/80 data-[pressed]:bg-[var(--secondary)]/70",ghost:"hover:bg-[var(--accent)] hover:text-[var(--accent-foreground)] data-[pressed]:bg-[var(--accent)]",link:"text-[var(--text-link)] underline-offset-4 hover:underline data-[pressed]:text-[var(--text-link-hover)]"},fullWidth:{true:"w-full",false:""},visualSize:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3 text-xs",lg:"h-11 rounded-md px-8",icon:"h-10 w-10",dot:"h-5 w-5 rounded-full p-0 min-h-0 min-w-0"},paywall:{true:"!bg-[var(--paywall)] !text-[var(--paywall-foreground)] !shadow-md hover:!bg-[var(--paywall)]/90 !cursor-not-allowed !border-transparent",false:""}},defaultVariants:{variant:"default",visualSize:"default",paywall:false}});var Ve=react.createContext(null);Ve.displayName="ButtonGroupContext";function we(){return react.useContext(Ve)}var Ce=react.createContext(null);Ce.displayName="ButtonGroupItemContext";function Ie(){return react.useContext(Ce)}classVarianceAuthority.cva("inline-flex items-center gap-0",{variants:{orientation:{horizontal:"flex-row",vertical:"flex-col w-full"}},defaultVariants:{orientation:"horizontal"}});var Le=classVarianceAuthority.cva("",{variants:{orientation:{horizontal:"min-w-[44px]",vertical:"flex min-h-[44px]"},position:{first:"",middle:"",last:"",only:""}},compoundVariants:[{orientation:"horizontal",position:"first",className:"rounded-r-none border-r-0"},{orientation:"horizontal",position:"middle",className:"rounded-none border-r-0"},{orientation:"horizontal",position:"last",className:"rounded-l-none"},{orientation:"vertical",position:"first",className:"rounded-b-none border-b-0"},{orientation:"vertical",position:"middle",className:"rounded-none border-b-0"},{orientation:"vertical",position:"last",className:"rounded-t-none"}],defaultVariants:{orientation:"horizontal",position:"only"}});classVarianceAuthority.cva("bg-[var(--border)]",{variants:{orientation:{horizontal:"w-px h-6 mx-1",vertical:"h-px w-full my-1"}},defaultVariants:{orientation:"horizontal"}});var R=react.memo(react.forwardRef(({className:t,buttonVisualClassName:o,variant:r,size:a,visualSize:s,fullWidth:c,loading:i=false,loadingText:g="Loading...",shortcut:h,children:m,isDisabled:u,paywall:l=false,paywallRedirect:L,paywallDescription:ee,onPress:te,...H},F)=>{let O=react.useId(),T=we(),S=Ie(),y=r??T?.variant??"default",W=a??T?.size,$=u??T?.isDisabled??false,v=T?.orientation==="vertical",A=c||v,k=S?Le({orientation:T?.orientation??"horizontal",position:S.position}):"",E=s??W??"default";return process.env.NODE_ENV!=="production"&&(E==="dot"||E==="icon")&&!H["aria-label"]&&!m&&console.warn('[Button] visualSize="dot" or "icon" requires aria-label when no visible text is provided (WCAG 1.1.1)'),jsxRuntime.jsx(reactAriaComponents.Button,{ref:F,isDisabled:$||i||void 0,"aria-disabled":l?true:void 0,"aria-describedby":l?O:void 0,onPress:P=>{if(l){L&&window.open(L,"_blank","noopener,noreferrer");return}te?.(P);},className:d(le({fullWidth:A,inVerticalGroup:v}),t),...H,children:P=>jsxRuntime.jsxs("span",{className:d(de({variant:y,visualSize:E,paywall:l,fullWidth:A}),k,o,ae,ne,U,q),"data-pressed":P.isPressed||void 0,children:[i&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(lucideReact.Loader2,{className:"motion-safe:animate-spin","aria-hidden":"true"}),jsxRuntime.jsx("span",{className:"sr-only","aria-live":"polite",children:g})]}),!i&&m,l&&jsxRuntime.jsx(lucideReact.Zap,{"data-testid":"zap-icon","aria-hidden":"true",className:"ml-1"}),l&&jsxRuntime.jsxs("span",{id:O,className:"sr-only",children:["Premium feature: ",ee||"Upgrade required to access this feature"]}),P.isFocusVisible&&h&&jsxRuntime.jsx("kbd",{className:"ml-auto hidden text-xs opacity-60 lg:inline",children:h}),P.isPressed&&jsxRuntime.jsx("span",{className:"absolute inset-0 rounded-[inherit] bg-current opacity-10 motion-safe:animate-in motion-safe:zoom-in-95","aria-hidden":"true"})]})})}));R.displayName="Button";var Ae=()=>jsxRuntime.jsxs("svg",{"data-testid":"password-toggle-icon-show",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jsxRuntime.jsx("path",{d:"M1 8s3-5 7-5 7 5 7 5-3 5-7 5-7-5-7-5z"}),jsxRuntime.jsx("circle",{cx:"8",cy:"8",r:"2"})]}),ke=()=>jsxRuntime.jsxs("svg",{"data-testid":"password-toggle-icon-hide",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jsxRuntime.jsx("path",{d:"M10.5 5.5l-5 5"}),jsxRuntime.jsx("path",{d:"M1 8s3-5 7-5c1.5 0 2.8.6 4 1.5M15 8s-1.5 2.5-4 4"}),jsxRuntime.jsx("path",{d:"M3 13l2-2m7-7l2-2"}),jsxRuntime.jsx("circle",{cx:"8",cy:"8",r:"2"})]});var G=classVarianceAuthority.cva("flex w-full rounded-md border bg-[var(--content-background)] shadow-xs px-3 py-2 text-sm ring-offset-[var(--content-background)] file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-[var(--content-foreground)] placeholder:text-[var(--menu-muted)] transition-all duration-200",{variants:{size:{sm:"h-9 text-xs px-2 py-1",default:"h-10 px-3 py-2",lg:"h-11 px-4 py-3 text-base"},state:{default:"border-[var(--input-border)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2",error:"border-[var(--destructive-background)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--destructive-background)] focus-visible:ring-offset-2",success:"border-[var(--success-background)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--success-ring)] focus-visible:ring-offset-2",disabled:"cursor-not-allowed opacity-50",readonly:"cursor-default bg-[var(--content-background)] opacity-70"}},defaultVariants:{size:"default",state:"default"}}),M=classVarianceAuthority.cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{state:{default:"text-[var(--content-foreground)]",error:"text-[var(--destructive-foreground)]",disabled:"opacity-50 cursor-not-allowed"}},defaultVariants:{state:"default"}}),ce=classVarianceAuthority.cva("text-sm text-[var(--content-foreground)]"),ze=classVarianceAuthority.cva("text-sm text-[var(--destructive-foreground)] font-medium mt-1.5"),X=classVarianceAuthority.cva("text-sm text-[var(--success-foreground)] font-medium mt-1.5");function Re({expandOnFocus:t,collapsedWidth:o,value:r,defaultValue:a,userOnFocus:s,userOnBlur:c}){let[i,g]=react.useState(false),h=react.useCallback(l=>{t&&g(true),s?.(l);},[t,s]),m=react.useCallback(l=>{t&&l.target.value===""&&g(false),c?.(l);},[t,c]),u=react.useMemo(()=>t?i||(r!==void 0?r!=="":a!==void 0&&a!=="")?"100%":o:void 0,[t,i,r,a,o]);return {handleFocus:h,handleBlur:m,inputWidth:u}}function _e({disableCopyPaste:t}){let[o,r]=react.useState(false),[a,s]=react.useState("");react.useEffect(()=>{t&&typeof process<"u"&&process.env.NODE_ENV==="development"&&console.warn("[TextField] Copy/paste prevention should only be used for security-critical fields like password confirmation. This feature can break assistive technology workflows and password managers.");},[t]);let c=react.useCallback(i=>{t&&(i.preventDefault(),r(true),s("Pasting is not allowed in this field. Please type your entry."),setTimeout(()=>{r(false),s("");},400));},[t]);return {isShaking:o,screenReaderMessage:a,handlePaste:c}}function Ge({type:t,showPasswordToggle:o}){let[r,a]=react.useState(false),s=react.useCallback(()=>{a(i=>!i);},[]),c=react.useMemo(()=>t==="password"&&o&&r?"text":t,[t,o,r]);return {showPassword:r,actualType:c,handlePasswordToggle:s}}var We=react.forwardRef(({className:t,state:o="default",children:r,...a},s)=>jsxRuntime.jsx(reactAriaComponents.Label,{ref:s,className:d(M({state:o}),t),...a,children:r}));We.displayName="TextFieldLabel";var $e=react.forwardRef(({className:t,size:o="default",state:r="default",...a},s)=>jsxRuntime.jsx(reactAriaComponents.Input,{ref:s,className:d(G({size:o,state:r}),se,t),...a}));$e.displayName="TextFieldInput";var je=react.forwardRef(({className:t,children:o,...r},a)=>jsxRuntime.jsx(reactAriaComponents.Text,{ref:a,slot:"description",className:d(ce(),t),...r,children:o}));je.displayName="TextFieldDescription";var me=react.forwardRef(({className:t,children:o,...r},a)=>jsxRuntime.jsx(reactAriaComponents.FieldError,{ref:a,...r,className:d(ze(),t),children:jsxRuntime.jsxs("span",{className:"flex items-center gap-2",role:"alert",children:[jsxRuntime.jsx(lucideReact.CircleAlert,{className:"h-4 w-4"}),o]})}));me.displayName="TextFieldError";var Ye=react.forwardRef(({className:t,children:o,...r},a)=>jsxRuntime.jsx(reactAriaComponents.Text,{ref:a,slot:"description",className:d(X(),t),...r,children:o}));Ye.displayName="TextFieldSuccess";var Ue=react.forwardRef(({className:t,size:o="default",label:r,description:a,errorMessage:s,successMessage:c,type:i="text",isRequired:g=false,isReadOnly:h=false,isDisabled:m=false,isInvalid:u=false,isValid:l=false,id:L,autoComplete:ee,disableCopyPaste:te=false,pattern:H,patternDescription:F,expandOnFocus:O=false,collapsedWidth:T="200px",prefix:S,suffix:y,prefixSize:W=16,suffixSize:$=16,showPasswordToggle:v,isIconHidden:A=false,onSubmit:k,onClear:E,value:B,defaultValue:j,onFocus:P,onBlur:Ze,...z},Je)=>{let xe=react.useId(),Qe=react.useId(),et=L||Qe,{handleFocus:tt,handleBlur:ot,inputWidth:rt}=Re({expandOnFocus:O,collapsedWidth:T,value:B,defaultValue:j,userOnFocus:P,userOnBlur:Ze}),{isShaking:at,screenReaderMessage:he,handlePaste:nt}=_e({disableCopyPaste:te}),{showPassword:oe,actualType:it,handlePasswordToggle:ve}=Ge({type:i,showPasswordToggle:v}),f=i==="search",[st,be]=react.useState(j??""),D=B!==void 0,b=D?B:st,lt=react.useCallback(p=>{D||be(p),z.onChange?.(p);},[D,z]),Y=react.useCallback(()=>{D||be(""),z.onChange?.(""),E?.();},[D,z,E]),dt=react.useCallback(p=>{p.key==="Enter"&&k&&k(b),p.key==="Escape"&&b&&(p.preventDefault(),Y());},[b,k,Y]),pt=react.useMemo(()=>m?"disabled":h?"readonly":u?"error":l?"success":"default",[m,h,u,l]),ut=react.useMemo(()=>m?"disabled":u?"error":"default",[m,u]),ge=react.useMemo(()=>a&&F?`${a} ${F}`:a||F,[a,F]),N=react.useMemo(()=>f&&!A&&!S?jsxRuntime.jsx(lucideReact.Search,{className:o==="sm"?"h-3.5 w-3.5":o==="lg"?"h-5 w-5":"h-4 w-4"}):S,[f,A,S,o]),ye=react.useMemo(()=>{let p={left:12,right:12};if(N){let re=typeof N=="string"?N.length*8+16:W+16;p.left=re;}if(i==="password"&&v)p.right=32;else if(f&&b)p.right=44;else if(y){let re=typeof y=="string"?y.length*8+16:$+16;p.right=re;}return p},[N,S,y,W,$,i,v,f,b]),Te=react.useMemo(()=>i==="password"&&v?jsxRuntime.jsx(R,{variant:"ghost",visualSize:"icon",onPress:ve,"aria-label":oe?"Hide password":"Show password",className:"!min-h-0 !min-w-0 h-8 w-8",children:oe?jsxRuntime.jsx(ke,{}):jsxRuntime.jsx(Ae,{})}):f&&b?jsxRuntime.jsx(R,{variant:"ghost",visualSize:"icon",onPress:Y,"aria-label":"Clear search",className:"!min-h-0 !min-w-0 h-8 w-8",children:jsxRuntime.jsx(lucideReact.X,{className:o==="sm"?"h-3 w-3":o==="lg"?"h-5 w-5":"h-4 w-4"})}):y,[i,v,oe,y,ve,f,b,o,Y]),Se=i==="password"&&v||f&&!!b;return jsxRuntime.jsxs(reactAriaComponents.TextField,{ref:Je,className:d("flex flex-col gap-1.5",t),isRequired:g,isReadOnly:h,isDisabled:m,isInvalid:u,value:f?b:B,defaultValue:f?void 0:j,onChange:f?lt:void 0,...z,children:[r&&jsxRuntime.jsxs(reactAriaComponents.Label,{className:d(M({state:ut})),children:[r,g&&jsxRuntime.jsx("span",{className:"ml-1 text-[var(--destructive-background)]","aria-hidden":"true",children:jsxRuntime.jsx("strong",{children:"*"})})]}),ge&&jsxRuntime.jsx(reactAriaComponents.Text,{slot:"description",className:d(ce()),children:ge}),jsxRuntime.jsxs("div",{className:"relative flex items-center motion-safe:transition-all motion-safe:duration-200",style:{width:rt},children:[N&&jsxRuntime.jsx("div",{"data-testid":"textfield-prefix",className:"absolute left-3 flex items-center justify-center pointer-events-none text-[var(--content-foreground)]","aria-hidden":"true",children:N}),jsxRuntime.jsx(reactAriaComponents.Input,{type:it,id:et,className:d(G({size:o,state:pt}),se,at&&"shake"),style:{width:"100%",paddingLeft:`${ye.left}px`,paddingRight:`${ye.right}px`},autoComplete:ee,pattern:H,onPaste:nt,onFocus:tt,onBlur:ot,onKeyDown:f?dt:void 0,"aria-required":g?"true":void 0,"aria-readonly":h?"true":void 0,"aria-errormessage":u&&s?xe:void 0}),Te&&jsxRuntime.jsx("div",{"data-testid":"textfield-suffix",className:d("absolute right-3 flex items-center justify-center text-[var(--content-foreground)]",Se?"":"pointer-events-none"),"aria-hidden":Se?void 0:"true",children:Te})]}),l&&c&&!u&&jsxRuntime.jsx(reactAriaComponents.Text,{slot:"description",className:d(X()),children:c}),u&&s&&jsxRuntime.jsx(me,{id:xe,children:s}),he&&jsxRuntime.jsx("div",{className:"sr-only",role:"status","aria-live":"polite","aria-atomic":"true",children:he})]})});Ue.displayName="TextField";var qe=zod.z.object({className:zod.z.string().optional(),children:zod.z.any().optional(),id:zod.z.string().optional(),"aria-label":zod.z.string().optional(),"aria-labelledby":zod.z.string().optional(),"aria-describedby":zod.z.string().optional(),"aria-live":zod.z.enum(["off","polite","assertive"]).optional(),"aria-hidden":zod.z.boolean().optional(),"data-testid":zod.z.string().optional()});var Xe=zod.z.enum(["off","on","name","honorific-prefix","given-name","additional-name","family-name","honorific-suffix","nickname","email","username","new-password","current-password","one-time-code","organization-title","organization","street-address","address-line1","address-line2","address-line3","address-level4","address-level3","address-level2","address-level1","country","country-name","postal-code","cc-name","cc-given-name","cc-additional-name","cc-family-name","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc","cc-type","transaction-currency","transaction-amount","language","bday","bday-day","bday-month","bday-year","sex","tel","tel-country-code","tel-national","tel-area-code","tel-local","tel-extension","impp","url","photo"]),Ct=[/\(\.\*\)\+/,/\(\.\+\)\+/,/\([^)]*\)\{.*,.*\}/,/\(\?!\)/,/\(\?<=\)/],Ke=t=>{for(let r of Ct)if(r.test(t))return false;return !((t.match(/[*+{}]/g)||[]).length>5)},It=qe.extend({size:zod.z.enum(["sm","default","lg"]).optional().default("default"),label:zod.z.string().optional(),description:zod.z.string().optional(),errorMessage:zod.z.string().optional(),successMessage:zod.z.string().optional(),type:zod.z.enum(["text","email","password","url","search"]).optional().default("text"),isRequired:zod.z.boolean().optional(),isReadOnly:zod.z.boolean().optional(),isDisabled:zod.z.boolean().optional(),isInvalid:zod.z.boolean().optional(),isValid:zod.z.boolean().optional(),placeholder:zod.z.string().optional(),value:zod.z.string().optional(),defaultValue:zod.z.string().optional(),name:zod.z.string().optional(),autoFocus:zod.z.boolean().optional(),autoComplete:Xe.optional(),maxLength:zod.z.number().optional(),minLength:zod.z.number().optional(),pattern:zod.z.string().optional(),patternDescription:zod.z.string().optional(),disableCopyPaste:zod.z.boolean().optional().default(false),prefix:zod.z.any().optional(),suffix:zod.z.any().optional(),prefixSize:zod.z.number().optional().default(16),suffixSize:zod.z.number().optional().default(16),expandOnFocus:zod.z.boolean().optional().default(false),collapsedWidth:zod.z.string().optional().default("200px"),showPasswordToggle:zod.z.boolean().optional(),isIconHidden:zod.z.boolean().optional().default(false),onSubmit:zod.z.custom().optional(),onClear:zod.z.custom().optional()}).refine(t=>!t.pattern||t.patternDescription,{message:"patternDescription is required when pattern is provided",path:["patternDescription"]}).refine(t=>!t.pattern||Ke(t.pattern),{message:"Unsafe regex pattern detected. Pattern may cause ReDoS vulnerability. Avoid patterns like (.*)+, (.+)+, or excessive quantifiers.",path:["pattern"]}).refine(t=>!(t.successMessage&&t.errorMessage),{message:"Cannot provide both successMessage and errorMessage. Use one based on validation state.",path:["successMessage"]}).refine(t=>(typeof process<"u"&&process.env.NODE_ENV==="development"&&t.isValid&&t.isInvalid&&console.error("[TextField] Both isValid and isInvalid are true. isInvalid takes precedence."),true)),Lt=zod.z.object({children:zod.z.any().optional(),className:zod.z.string().optional(),htmlFor:zod.z.string().optional(),state:zod.z.enum(["default","error","disabled"]).optional().default("default")}),At=zod.z.object({className:zod.z.string().optional(),size:zod.z.enum(["sm","default","lg"]).optional().default("default"),state:zod.z.enum(["default","error","success","disabled","readonly"]).optional().default("default")}),kt=zod.z.object({children:zod.z.any().optional(),className:zod.z.string().optional()}),Bt=zod.z.object({children:zod.z.any().optional(),className:zod.z.string().optional()}),zt=zod.z.object({children:zod.z.any().optional(),className:zod.z.string().optional()});exports.AutoCompleteValueSchema=Xe;exports.TextField=Ue;exports.TextFieldDescription=je;exports.TextFieldDescriptionPropsSchema=kt;exports.TextFieldError=me;exports.TextFieldErrorPropsSchema=Bt;exports.TextFieldInput=$e;exports.TextFieldInputPropsSchema=At;exports.TextFieldLabel=We;exports.TextFieldLabelPropsSchema=Lt;exports.TextFieldPropsSchema=It;exports.TextFieldSuccess=Ye;exports.TextFieldSuccessPropsSchema=zt;exports.inputVariants=G;exports.labelVariants=M;exports.successMessageVariants=X;exports.textFieldInputVariants=G;exports.textFieldLabelVariants=M;exports.validatePatternSafety=Ke;//# sourceMappingURL=index.js.map
|
|
2
|
+
'use strict';var react=require('react'),reactAriaComponents=require('react-aria-components'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),lucideReact=require('lucide-react'),classVarianceAuthority=require('class-variance-authority'),jsxRuntime=require('react/jsx-runtime'),zod=require('zod');function d(...t){return tailwindMerge.twMerge(clsx.clsx(t))}var ae="data-[pressed]:scale-[0.97]";var ne="data-[hovered]:shadow-md";var q="hc:data-[hovered]:outline hc:data-[hovered]:outline-2 hc:data-[hovered]:outline-foreground",U="hc:data-[pressed]:outline hc:data-[pressed]:outline-2 hc:data-[pressed]:outline-offset-1 hc:data-[pressed]:outline-foreground",se="disabled:pointer-events-none disabled:opacity-50";var le=classVarianceAuthority.cva("inline-flex justify-center min-h-[44px] min-w-[44px] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50",{variants:{fullWidth:{true:"w-full",false:""},inVerticalGroup:{true:"items-stretch",false:"items-center"}},defaultVariants:{fullWidth:false,inVerticalGroup:false}}),de=classVarianceAuthority.cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 relative cursor-pointer",{variants:{variant:{default:"bg-[var(--primary-action)] text-[var(--primary-action-foreground)] shadow-md hover:bg-[var(--primary-action-hover)] data-[pressed]:bg-[var(--primary-action)]/80",destructive:"bg-[var(--destructive-background)] text-[var(--destructive-foreground)] shadow-md hover:bg-[var(--destructive-background)]/90 data-[pressed]:bg-[var(--destructive-background)]/80",outline:"border border-[var(--input-border)] bg-[var(--page-background)] hover:bg-[var(--input-border)] data-[pressed]:bg-[var(--input-border)]",secondary:"bg-[var(--secondary)] text-[var(--secondary-foreground)] shadow-md hover:bg-[var(--secondary)]/80 data-[pressed]:bg-[var(--secondary)]/70",ghost:"hover:bg-[var(--accent)] hover:text-[var(--accent-foreground)] data-[pressed]:bg-[var(--accent)]",link:"text-[var(--text-link)] underline-offset-4 hover:underline data-[pressed]:text-[var(--text-link-hover)]"},fullWidth:{true:"w-full",false:""},visualSize:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3 text-xs",lg:"h-11 rounded-md px-8",icon:"h-10 w-10",dot:"h-5 w-5 rounded-full p-0 min-h-0 min-w-0"},paywall:{true:"!bg-[var(--paywall)] !text-[var(--paywall-foreground)] !shadow-md hover:!bg-[var(--paywall)]/90 !cursor-not-allowed !border-transparent",false:""}},defaultVariants:{variant:"default",visualSize:"default",paywall:false}});var Ne=react.createContext(null);Ne.displayName="ButtonGroupContext";function Ve(){return react.useContext(Ne)}var Ce=react.createContext(null);Ce.displayName="ButtonGroupItemContext";function Ie(){return react.useContext(Ce)}classVarianceAuthority.cva("inline-flex items-center gap-0",{variants:{orientation:{horizontal:"flex-row",vertical:"flex-col w-full"}},defaultVariants:{orientation:"horizontal"}});var Le=classVarianceAuthority.cva("",{variants:{orientation:{horizontal:"min-w-[44px]",vertical:"flex min-h-[44px]"},position:{first:"",middle:"",last:"",only:""}},compoundVariants:[{orientation:"horizontal",position:"first",className:"rounded-r-none border-r-0"},{orientation:"horizontal",position:"middle",className:"rounded-none border-r-0"},{orientation:"horizontal",position:"last",className:"rounded-l-none"},{orientation:"vertical",position:"first",className:"rounded-b-none border-b-0"},{orientation:"vertical",position:"middle",className:"rounded-none border-b-0"},{orientation:"vertical",position:"last",className:"rounded-t-none"}],defaultVariants:{orientation:"horizontal",position:"only"}});classVarianceAuthority.cva("bg-[var(--border)]",{variants:{orientation:{horizontal:"w-px h-6 mx-1",vertical:"h-px w-full my-1"}},defaultVariants:{orientation:"horizontal"}});var R=react.memo(react.forwardRef(({className:t,buttonVisualClassName:o,variant:r,size:a,visualSize:s,fullWidth:p,loading:i=false,loadingText:v="Loading...",shortcut:g,children:m,isDisabled:c,paywall:l=false,paywallRedirect:L,paywallDescription:ee,onPress:te,...G},P)=>{let H=react.useId(),y=Ve(),S=Ie(),T=r??y?.variant??"default",W=a??y?.size,$=c??y?.isDisabled??false,b=y?.orientation==="vertical",A=p||b,k=S?Le({orientation:y?.orientation??"horizontal",position:S.position}):"",w=s??W??"default";return process.env.NODE_ENV!=="production"&&(w==="dot"||w==="icon")&&!G["aria-label"]&&!m&&console.warn('[Button] visualSize="dot" or "icon" requires aria-label when no visible text is provided (WCAG 1.1.1)'),jsxRuntime.jsx(reactAriaComponents.Button,{ref:P,isDisabled:$||i||void 0,"aria-disabled":l?true:void 0,"aria-describedby":l?H:void 0,onPress:F=>{if(l){L&&window.open(L,"_blank","noopener,noreferrer");return}te?.(F);},className:d(le({fullWidth:A,inVerticalGroup:b}),t),...G,children:F=>jsxRuntime.jsxs("span",{className:d(de({variant:T,visualSize:w,paywall:l,fullWidth:A}),k,o,ae,ne,q,U),"data-pressed":F.isPressed||void 0,children:[i&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(lucideReact.Loader2,{className:"motion-safe:animate-spin","aria-hidden":"true"}),jsxRuntime.jsx("span",{className:"sr-only","aria-live":"polite",children:v})]}),!i&&m,l&&jsxRuntime.jsx(lucideReact.Zap,{"data-testid":"zap-icon","aria-hidden":"true",className:"ml-1"}),l&&jsxRuntime.jsxs("span",{id:H,className:"sr-only",children:["Premium feature: ",ee||"Upgrade required to access this feature"]}),F.isFocusVisible&&g&&jsxRuntime.jsx("kbd",{className:"ml-auto hidden text-xs opacity-60 lg:inline",children:g}),F.isPressed&&jsxRuntime.jsx("span",{className:"absolute inset-0 rounded-[inherit] bg-current opacity-10 motion-safe:animate-in motion-safe:zoom-in-95","aria-hidden":"true"})]})})}));R.displayName="Button";var Ae=()=>jsxRuntime.jsxs("svg",{"data-testid":"password-toggle-icon-show",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jsxRuntime.jsx("path",{d:"M1 8s3-5 7-5 7 5 7 5-3 5-7 5-7-5-7-5z"}),jsxRuntime.jsx("circle",{cx:"8",cy:"8",r:"2"})]}),ke=()=>jsxRuntime.jsxs("svg",{"data-testid":"password-toggle-icon-hide",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jsxRuntime.jsx("path",{d:"M10.5 5.5l-5 5"}),jsxRuntime.jsx("path",{d:"M1 8s3-5 7-5c1.5 0 2.8.6 4 1.5M15 8s-1.5 2.5-4 4"}),jsxRuntime.jsx("path",{d:"M3 13l2-2m7-7l2-2"}),jsxRuntime.jsx("circle",{cx:"8",cy:"8",r:"2"})]});var M=classVarianceAuthority.cva("flex w-full rounded-md border bg-[var(--content-background)] shadow-xs px-3 py-2 text-sm ring-offset-[var(--content-background)] file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-[var(--content-foreground)] placeholder:text-[var(--menu-muted)] transition-all duration-200",{variants:{size:{sm:"h-9 text-xs px-2 py-1",default:"h-10 px-3 py-2",lg:"h-11 px-4 py-3 text-base"},state:{default:"border-[var(--input-border)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2",error:"border-[var(--destructive-background)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--destructive-background)] focus-visible:ring-offset-2",success:"border-[var(--success-background)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--success-ring)] focus-visible:ring-offset-2",disabled:"cursor-not-allowed opacity-50",readonly:"cursor-default bg-[var(--content-background)] opacity-70"}},defaultVariants:{size:"default",state:"default"}}),_=classVarianceAuthority.cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{variants:{state:{default:"text-[var(--content-foreground)]",error:"text-[var(--destructive-foreground)]",disabled:"opacity-50 cursor-not-allowed"}},defaultVariants:{state:"default"}}),pe=classVarianceAuthority.cva("text-sm text-[var(--content-foreground)]"),Be=classVarianceAuthority.cva("text-sm text-[var(--destructive-foreground)] font-medium mt-1.5"),X=classVarianceAuthority.cva("text-sm text-[var(--success-foreground)] font-medium mt-1.5");function Re({expandOnFocus:t,collapsedWidth:o,value:r,defaultValue:a,userOnFocus:s,userOnBlur:p}){let[i,v]=react.useState(false),g=react.useCallback(l=>{t&&v(true),s?.(l);},[t,s]),m=react.useCallback(l=>{t&&l.target.value===""&&v(false),p?.(l);},[t,p]),c=react.useMemo(()=>t?i||(r!==void 0?r!=="":a!==void 0&&a!=="")?"100%":o:void 0,[t,i,r,a,o]);return {handleFocus:g,handleBlur:m,inputWidth:c}}function ze({disableCopyPaste:t}){let[o,r]=react.useState(false),[a,s]=react.useState("");react.useEffect(()=>{t&&typeof process<"u"&&process.env.NODE_ENV==="development"&&console.warn("[TextField] Copy/paste prevention should only be used for security-critical fields like password confirmation. This feature can break assistive technology workflows and password managers.");},[t]);let p=react.useCallback(i=>{t&&(i.preventDefault(),r(true),s("Pasting is not allowed in this field. Please type your entry."),setTimeout(()=>{r(false),s("");},400));},[t]);return {isShaking:o,screenReaderMessage:a,handlePaste:p}}function Me({type:t,showPasswordToggle:o}){let[r,a]=react.useState(false),s=react.useCallback(()=>{a(i=>!i);},[]),p=react.useMemo(()=>t==="password"&&o&&r?"text":t,[t,o,r]);return {showPassword:r,actualType:p,handlePasswordToggle:s}}var We=react.forwardRef(({className:t,state:o="default",children:r,...a},s)=>jsxRuntime.jsx(reactAriaComponents.Label,{ref:s,className:d(_({state:o}),t),...a,children:r}));We.displayName="TextFieldLabel";var $e=react.forwardRef(({className:t,size:o="default",state:r="default",...a},s)=>jsxRuntime.jsx(reactAriaComponents.Input,{ref:s,className:d(M({size:o,state:r}),se,t),...a}));$e.displayName="TextFieldInput";var je=react.forwardRef(({className:t,children:o,...r},a)=>jsxRuntime.jsx(reactAriaComponents.Text,{ref:a,slot:"description",className:d(pe(),t),...r,children:o}));je.displayName="TextFieldDescription";var me=react.forwardRef(({className:t,children:o,...r},a)=>jsxRuntime.jsx(reactAriaComponents.FieldError,{ref:a,...r,className:d(Be(),t),children:jsxRuntime.jsxs("span",{className:"flex items-center gap-2",role:"alert",children:[jsxRuntime.jsx(lucideReact.CircleAlert,{className:"h-4 w-4"}),o]})}));me.displayName="TextFieldError";var Ye=react.forwardRef(({className:t,children:o,...r},a)=>jsxRuntime.jsx(reactAriaComponents.Text,{ref:a,slot:"description",className:d(X(),t),...r,children:o}));Ye.displayName="TextFieldSuccess";var qe=react.forwardRef(({className:t,size:o="default",label:r,description:a,errorMessage:s,successMessage:p,type:i="text",isRequired:v=false,isReadOnly:g=false,isDisabled:m=false,isInvalid:c=false,isValid:l=false,id:L,autoComplete:ee,disableCopyPaste:te=false,pattern:G,patternDescription:P,expandOnFocus:H=false,collapsedWidth:y="200px",prefix:S,suffix:T,prefixSize:W=16,suffixSize:$=16,showPasswordToggle:b,isIconHidden:A=false,onSubmit:k,onClear:w,value:O,defaultValue:j,onFocus:F,onBlur:Ze,...B},Je)=>{let xe=react.useId(),Qe=react.useId(),et=L||Qe,{handleFocus:tt,handleBlur:ot,inputWidth:rt}=Re({expandOnFocus:H,collapsedWidth:y,value:O,defaultValue:j,userOnFocus:F,userOnBlur:Ze}),{isShaking:at,screenReaderMessage:ge,handlePaste:nt}=ze({disableCopyPaste:te}),{showPassword:oe,actualType:it,handlePasswordToggle:be}=Me({type:i,showPasswordToggle:b}),f=i==="search",[st,he]=react.useState(j??""),D=O!==void 0,h=D?O:st,lt=react.useCallback(u=>{D||he(u),B.onChange?.(u);},[D,B]),Y=react.useCallback(()=>{D||he(""),B.onChange?.(""),w?.();},[D,B,w]),dt=react.useCallback(u=>{u.key==="Enter"&&k&&k(h),u.key==="Escape"&&h&&(u.preventDefault(),Y());},[h,k,Y]),ut=react.useMemo(()=>m?"disabled":g?"readonly":c?"error":l?"success":"default",[m,g,c,l]),ct=react.useMemo(()=>m?"disabled":c?"error":"default",[m,c]),ve=react.useMemo(()=>a&&P?`${a} ${P}`:a||P,[a,P]),E=react.useMemo(()=>f&&!A&&!S?jsxRuntime.jsx(lucideReact.Search,{className:o==="sm"?"h-3.5 w-3.5":o==="lg"?"h-5 w-5":"h-4 w-4"}):S,[f,A,S,o]),Te=react.useMemo(()=>{let u={left:12,right:12};if(E){let re=typeof E=="string"?E.length*8+16:W+16;u.left=re;}if(i==="password"&&b)u.right=32;else if(f&&h)u.right=44;else if(T){let re=typeof T=="string"?T.length*8+16:$+16;u.right=re;}return u},[E,S,T,W,$,i,b,f,h]),ye=react.useMemo(()=>i==="password"&&b?jsxRuntime.jsx(R,{variant:"ghost",visualSize:"icon",onPress:be,"aria-label":oe?"Hide password":"Show password",className:"!min-h-0 !min-w-0 h-8 w-8",children:oe?jsxRuntime.jsx(ke,{}):jsxRuntime.jsx(Ae,{})}):f&&h?jsxRuntime.jsx(R,{variant:"ghost",visualSize:"icon",onPress:Y,"aria-label":"Clear search",className:"!min-h-0 !min-w-0 h-8 w-8",children:jsxRuntime.jsx(lucideReact.X,{className:o==="sm"?"h-3 w-3":o==="lg"?"h-5 w-5":"h-4 w-4"})}):T,[i,b,oe,T,be,f,h,o,Y]),Se=i==="password"&&b||f&&!!h;return jsxRuntime.jsxs(reactAriaComponents.TextField,{ref:Je,className:d("flex flex-col gap-1.5",t),isRequired:v,isReadOnly:g,isDisabled:m,isInvalid:c,value:f?h:O,defaultValue:f?void 0:j,onChange:f?lt:void 0,...B,children:[r&&jsxRuntime.jsxs(reactAriaComponents.Label,{className:d(_({state:ct})),children:[r,v&&jsxRuntime.jsx("span",{className:"ml-1 text-[var(--destructive-background)]","aria-hidden":"true",children:jsxRuntime.jsx("strong",{children:"*"})})]}),ve&&jsxRuntime.jsx(reactAriaComponents.Text,{slot:"description",className:d(pe()),children:ve}),jsxRuntime.jsxs("div",{className:"relative flex items-center motion-safe:transition-all motion-safe:duration-200",style:{width:rt},children:[E&&jsxRuntime.jsx("div",{"data-testid":"textfield-prefix",className:"absolute left-3 flex items-center justify-center pointer-events-none text-[var(--content-foreground)]","aria-hidden":"true",children:E}),jsxRuntime.jsx(reactAriaComponents.Input,{type:it,id:et,className:d(M({size:o,state:ut}),se,at&&"shake"),style:{width:"100%",paddingLeft:`${Te.left}px`,paddingRight:`${Te.right}px`},autoComplete:ee,pattern:G,onPaste:nt,onFocus:tt,onBlur:ot,onKeyDown:f?dt:void 0,"aria-required":v?"true":void 0,"aria-readonly":g?"true":void 0,"aria-errormessage":c&&s?xe:void 0}),ye&&jsxRuntime.jsx("div",{"data-testid":"textfield-suffix",className:d("absolute right-3 flex items-center justify-center text-[var(--content-foreground)]",Se?"":"pointer-events-none"),"aria-hidden":Se?void 0:"true",children:ye})]}),l&&p&&!c&&jsxRuntime.jsx(reactAriaComponents.Text,{slot:"description",className:d(X()),children:p}),c&&s&&jsxRuntime.jsx(me,{id:xe,children:s}),ge&&jsxRuntime.jsx("div",{className:"sr-only",role:"status","aria-live":"polite","aria-atomic":"true",children:ge})]})});qe.displayName="TextField";var Ue=zod.z.object({className:zod.z.string().optional(),children:zod.z.any().optional(),id:zod.z.string().optional(),"aria-label":zod.z.string().optional(),"aria-labelledby":zod.z.string().optional(),"aria-describedby":zod.z.string().optional(),"aria-live":zod.z.enum(["off","polite","assertive"]).optional(),"aria-hidden":zod.z.boolean().optional(),"data-testid":zod.z.string().optional()});var Xe=zod.z.enum(["off","on","name","honorific-prefix","given-name","additional-name","family-name","honorific-suffix","nickname","email","username","new-password","current-password","one-time-code","organization-title","organization","street-address","address-line1","address-line2","address-line3","address-level4","address-level3","address-level2","address-level1","country","country-name","postal-code","cc-name","cc-given-name","cc-additional-name","cc-family-name","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc","cc-type","transaction-currency","transaction-amount","language","bday","bday-day","bday-month","bday-year","sex","tel","tel-country-code","tel-national","tel-area-code","tel-local","tel-extension","impp","url","photo"]),Ct=[/\(\.\*\)\+/,/\(\.\+\)\+/,/\([^)]*\)\{.*,.*\}/,/\(\?!\)/,/\(\?<=\)/],Ke=t=>{for(let r of Ct)if(r.test(t))return false;return !((t.match(/[*+{}]/g)||[]).length>5)},It=Ue.extend({size:zod.z.enum(["sm","default","lg"]).optional().default("default"),label:zod.z.string().optional(),description:zod.z.string().optional(),errorMessage:zod.z.string().optional(),successMessage:zod.z.string().optional(),type:zod.z.enum(["text","email","password","url","search"]).optional().default("text"),isRequired:zod.z.boolean().optional(),isReadOnly:zod.z.boolean().optional(),isDisabled:zod.z.boolean().optional(),isInvalid:zod.z.boolean().optional(),isValid:zod.z.boolean().optional(),placeholder:zod.z.string().optional(),value:zod.z.string().optional(),defaultValue:zod.z.string().optional(),name:zod.z.string().optional(),autoFocus:zod.z.boolean().optional(),autoComplete:Xe.optional(),maxLength:zod.z.number().optional(),minLength:zod.z.number().optional(),pattern:zod.z.string().optional(),patternDescription:zod.z.string().optional(),disableCopyPaste:zod.z.boolean().optional().default(false),prefix:zod.z.any().optional(),suffix:zod.z.any().optional(),prefixSize:zod.z.number().optional().default(16),suffixSize:zod.z.number().optional().default(16),expandOnFocus:zod.z.boolean().optional().default(false),collapsedWidth:zod.z.string().optional().default("200px"),showPasswordToggle:zod.z.boolean().optional(),isIconHidden:zod.z.boolean().optional().default(false),onSubmit:zod.z.custom().optional(),onClear:zod.z.custom().optional()}).refine(t=>!t.pattern||t.patternDescription,{message:"patternDescription is required when pattern is provided",path:["patternDescription"]}).refine(t=>!t.pattern||Ke(t.pattern),{message:"Unsafe regex pattern detected. Pattern may cause ReDoS vulnerability. Avoid patterns like (.*)+, (.+)+, or excessive quantifiers.",path:["pattern"]}).refine(t=>!(t.successMessage&&t.errorMessage),{message:"Cannot provide both successMessage and errorMessage. Use one based on validation state.",path:["successMessage"]}).refine(t=>(typeof process<"u"&&process.env.NODE_ENV==="development"&&t.isValid&&t.isInvalid&&console.error("[TextField] Both isValid and isInvalid are true. isInvalid takes precedence."),true)),Lt=zod.z.object({children:zod.z.any().optional(),className:zod.z.string().optional(),htmlFor:zod.z.string().optional(),state:zod.z.enum(["default","error","disabled"]).optional().default("default")}),At=zod.z.object({className:zod.z.string().optional(),size:zod.z.enum(["sm","default","lg"]).optional().default("default"),state:zod.z.enum(["default","error","success","disabled","readonly"]).optional().default("default")}),kt=zod.z.object({children:zod.z.any().optional(),className:zod.z.string().optional()}),Ot=zod.z.object({children:zod.z.any().optional(),className:zod.z.string().optional()}),Bt=zod.z.object({children:zod.z.any().optional(),className:zod.z.string().optional()});exports.AutoCompleteValueSchema=Xe;exports.TextField=qe;exports.TextFieldDescription=je;exports.TextFieldDescriptionPropsSchema=kt;exports.TextFieldError=me;exports.TextFieldErrorPropsSchema=Ot;exports.TextFieldInput=$e;exports.TextFieldInputPropsSchema=At;exports.TextFieldLabel=We;exports.TextFieldLabelPropsSchema=Lt;exports.TextFieldPropsSchema=It;exports.TextFieldSuccess=Ye;exports.TextFieldSuccessPropsSchema=Bt;exports.inputVariants=M;exports.labelVariants=_;exports.successMessageVariants=X;exports.textFieldInputVariants=M;exports.textFieldLabelVariants=_;exports.validatePatternSafety=Ke;//# sourceMappingURL=index.js.map
|
|
3
3
|
//# sourceMappingURL=index.js.map
|