@cdx-ui/components 0.0.1-alpha.35 → 0.0.1-alpha.37

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.
Files changed (77) hide show
  1. package/lib/commonjs/components/{Form/FormLabelRoot.js → Field/FieldLabel.js} +4 -4
  2. package/lib/commonjs/components/Field/FieldLabel.js.map +1 -0
  3. package/lib/commonjs/components/{Form/FormLabelRoot.web.js → Field/FieldLabel.web.js} +9 -5
  4. package/lib/commonjs/components/Field/FieldLabel.web.js.map +1 -0
  5. package/lib/commonjs/components/Field/index.js +158 -0
  6. package/lib/commonjs/components/Field/index.js.map +1 -0
  7. package/lib/commonjs/components/Field/styles.js +16 -0
  8. package/lib/commonjs/components/Field/styles.js.map +1 -0
  9. package/lib/commonjs/components/Form/FormRoot.js.map +1 -1
  10. package/lib/commonjs/components/Form/index.js +6 -213
  11. package/lib/commonjs/components/Form/index.js.map +1 -1
  12. package/lib/commonjs/components/Form/styles.js +1 -49
  13. package/lib/commonjs/components/Form/styles.js.map +1 -1
  14. package/lib/commonjs/components/OtpInput/index.js +83 -0
  15. package/lib/commonjs/components/OtpInput/index.js.map +1 -0
  16. package/lib/commonjs/components/OtpInput/styles.js +48 -0
  17. package/lib/commonjs/components/OtpInput/styles.js.map +1 -0
  18. package/lib/commonjs/components/index.js +24 -0
  19. package/lib/commonjs/components/index.js.map +1 -1
  20. package/lib/module/components/{Form/FormLabelRoot.js → Field/FieldLabel.js} +3 -3
  21. package/lib/module/components/Field/FieldLabel.js.map +1 -0
  22. package/lib/module/components/Field/FieldLabel.web.js +17 -0
  23. package/lib/module/components/Field/FieldLabel.web.js.map +1 -0
  24. package/lib/module/components/Field/index.js +155 -0
  25. package/lib/module/components/Field/index.js.map +1 -0
  26. package/lib/module/components/Field/styles.js +12 -0
  27. package/lib/module/components/Field/styles.js.map +1 -0
  28. package/lib/module/components/Form/FormRoot.js.map +1 -1
  29. package/lib/module/components/Form/index.js +8 -216
  30. package/lib/module/components/Form/index.js.map +1 -1
  31. package/lib/module/components/Form/styles.js +0 -48
  32. package/lib/module/components/Form/styles.js.map +1 -1
  33. package/lib/module/components/OtpInput/index.js +79 -0
  34. package/lib/module/components/OtpInput/index.js.map +1 -0
  35. package/lib/module/components/OtpInput/styles.js +44 -0
  36. package/lib/module/components/OtpInput/styles.js.map +1 -0
  37. package/lib/module/components/index.js +2 -0
  38. package/lib/module/components/index.js.map +1 -1
  39. package/lib/typescript/components/{Form/FormLabelRoot.d.ts → Field/FieldLabel.d.ts} +5 -5
  40. package/lib/typescript/components/Field/FieldLabel.d.ts.map +1 -0
  41. package/lib/typescript/components/{Form/FormLabelRoot.web.d.ts → Field/FieldLabel.web.d.ts} +3 -7
  42. package/lib/typescript/components/Field/FieldLabel.web.d.ts.map +1 -0
  43. package/lib/typescript/components/Field/index.d.ts +26 -0
  44. package/lib/typescript/components/Field/index.d.ts.map +1 -0
  45. package/lib/typescript/components/Field/styles.d.ts +16 -0
  46. package/lib/typescript/components/Field/styles.d.ts.map +1 -0
  47. package/lib/typescript/components/Form/FormRoot.d.ts +2 -0
  48. package/lib/typescript/components/Form/FormRoot.d.ts.map +1 -1
  49. package/lib/typescript/components/Form/index.d.ts +4 -61
  50. package/lib/typescript/components/Form/index.d.ts.map +1 -1
  51. package/lib/typescript/components/Form/styles.d.ts +0 -20
  52. package/lib/typescript/components/Form/styles.d.ts.map +1 -1
  53. package/lib/typescript/components/OtpInput/index.d.ts +11 -0
  54. package/lib/typescript/components/OtpInput/index.d.ts.map +1 -0
  55. package/lib/typescript/components/OtpInput/styles.d.ts +14 -0
  56. package/lib/typescript/components/OtpInput/styles.d.ts.map +1 -0
  57. package/lib/typescript/components/index.d.ts +2 -0
  58. package/lib/typescript/components/index.d.ts.map +1 -1
  59. package/package.json +4 -4
  60. package/src/components/{Form/FormLabelRoot.tsx → Field/FieldLabel.tsx} +4 -4
  61. package/src/components/Field/FieldLabel.web.tsx +25 -0
  62. package/src/components/Field/index.tsx +171 -0
  63. package/src/components/Field/styles.ts +32 -0
  64. package/src/components/Form/FormRoot.tsx +1 -0
  65. package/src/components/Form/index.tsx +11 -245
  66. package/src/components/Form/styles.ts +1 -73
  67. package/src/components/OtpInput/index.tsx +79 -0
  68. package/src/components/OtpInput/styles.ts +45 -0
  69. package/src/components/index.ts +2 -0
  70. package/lib/commonjs/components/Form/FormLabelRoot.js.map +0 -1
  71. package/lib/commonjs/components/Form/FormLabelRoot.web.js.map +0 -1
  72. package/lib/module/components/Form/FormLabelRoot.js.map +0 -1
  73. package/lib/module/components/Form/FormLabelRoot.web.js +0 -13
  74. package/lib/module/components/Form/FormLabelRoot.web.js.map +0 -1
  75. package/lib/typescript/components/Form/FormLabelRoot.d.ts.map +0 -1
  76. package/lib/typescript/components/Form/FormLabelRoot.web.d.ts.map +0 -1
  77. package/src/components/Form/FormLabelRoot.web.tsx +0 -18
@@ -1,58 +1,23 @@
1
- import { forwardRef, type ReactNode } from 'react';
2
- import { Text, View, type ViewProps, type TextProps } from 'react-native';
3
- import { createForm, type IFormProps, type IFormFieldProps } from '@cdx-ui/primitives';
4
- import { cn, withStyleContext, useStyleContext } from '@cdx-ui/utils';
5
- import { Icon, type IconProps } from '../Icon';
1
+ import React, { forwardRef } from 'react';
2
+ import { View } from 'react-native';
3
+ import { createForm } from '@cdx-ui/primitives';
4
+ import { cn } from '@cdx-ui/utils';
6
5
  import { BaseFormRoot, type BaseFormRootProps } from './FormRoot';
7
- import { FormLabelRoot } from './FormLabelRoot';
8
- import {
9
- formRootVariants,
10
- formFieldVariants,
11
- formLabelVariants,
12
- formHelperVariants,
13
- formHelperTextVariants,
14
- formErrorVariants,
15
- formErrorTextVariants,
16
- formErrorIconVariants,
17
- } from './styles';
18
-
19
- // =============================================================================
20
- // SCOPE + CONTEXT
21
- // =============================================================================
22
-
23
- const SCOPE = 'FORM';
24
-
25
- const FieldRoot = withStyleContext(View, SCOPE);
26
-
27
- interface FormFieldStyleContext {
28
- size?: 'default' | 'small';
29
- }
30
-
31
- const useFormStyleContext = () => useStyleContext(SCOPE) as FormFieldStyleContext;
6
+ import { formRootVariants } from './styles';
32
7
 
33
8
  // =============================================================================
34
9
  // PRIMITIVE
35
10
  // =============================================================================
36
11
 
37
- const FormPrimitive = createForm({
38
- Root: BaseFormRoot,
39
- Field: FieldRoot,
40
- Error: View,
41
- ErrorText: Text,
42
- ErrorIcon: View,
43
- Label: FormLabelRoot,
44
- Helper: View,
45
- HelperText: Text,
46
- });
12
+ const FormPrimitive = createForm({ Root: BaseFormRoot });
13
+
14
+ FormPrimitive.displayName = 'FormPrimitive';
47
15
 
48
16
  // =============================================================================
49
17
  // FORM ROOT (container — <form> on web, <View> on RN)
50
18
  // =============================================================================
51
19
 
52
- export interface FormProps extends BaseFormRootProps, IFormProps {
53
- className?: string;
54
- children?: ReactNode;
55
- }
20
+ export interface FormProps extends BaseFormRootProps {}
56
21
 
57
22
  const FormRoot = forwardRef<View, FormProps>(({ className, children, style, ...props }, ref) => {
58
23
  const computedClassName = cn(formRootVariants(), className);
@@ -67,206 +32,7 @@ const FormRoot = forwardRef<View, FormProps>(({ className, children, style, ...p
67
32
  FormRoot.displayName = 'Form';
68
33
 
69
34
  // =============================================================================
70
- // FORM FIELD (per-field wrapper — provides context for label/error/helper/input)
71
- // =============================================================================
72
-
73
- /**
74
- * Field wrapper + context. For **initial focus**, pass `autoFocus` on `Input.Field` (not here).
75
- */
76
- export interface FormFieldProps extends Omit<ViewProps, 'id' | 'name'>, IFormFieldProps {
77
- className?: string;
78
- children?: ReactNode;
79
- size?: 'default' | 'small';
80
- }
81
-
82
- const FormField = forwardRef<View, FormFieldProps>(
83
- ({ size = 'default', className, children, style, ...props }, ref) => {
84
- const computedClassName = cn(formFieldVariants(), className);
85
-
86
- return (
87
- <FormPrimitive.Field
88
- ref={ref}
89
- className={computedClassName}
90
- style={style}
91
- context={{ size }}
92
- {...props}
93
- >
94
- {children}
95
- </FormPrimitive.Field>
96
- );
97
- },
98
- );
99
-
100
- FormField.displayName = 'Form.Field';
101
-
102
- // =============================================================================
103
- // FORM LABEL
104
- // =============================================================================
105
-
106
- export interface FormLabelProps extends ViewProps {
107
- className?: string;
108
- children?: ReactNode;
109
- /** @platform web — passed to `<label htmlFor>`; defaults to the field input id. */
110
- htmlFor?: string;
111
- }
112
-
113
- // TODO: Accept accessibility labels for required indicator as props to support i18n
114
-
115
- const FormLabel = forwardRef<View, FormLabelProps>(
116
- ({ className, children, style, htmlFor, ...props }, ref) => {
117
- const { size } = useFormStyleContext();
118
- const labelClassName = cn(formLabelVariants({ size }), className);
119
-
120
- return (
121
- <FormPrimitive.Label
122
- ref={ref}
123
- className={labelClassName}
124
- style={style}
125
- htmlFor={htmlFor}
126
- requiredIndicator={
127
- <Text className="text-red-500" aria-hidden>
128
- {' *'}
129
- </Text>
130
- }
131
- {...props}
132
- >
133
- {children}
134
- </FormPrimitive.Label>
135
- );
136
- },
137
- );
138
-
139
- FormLabel.displayName = 'Form.Label';
140
-
141
- // =============================================================================
142
- // FORM HELPER
143
- // =============================================================================
144
-
145
- export interface FormHelperProps extends ViewProps {
146
- className?: string;
147
- children?: ReactNode;
148
- }
149
-
150
- const FormHelper = forwardRef<View, FormHelperProps>(
151
- ({ className, children, style, ...props }, ref) => {
152
- const computedClassName = cn(formHelperVariants(), className);
153
-
154
- return (
155
- <FormPrimitive.Helper ref={ref} className={computedClassName} style={style} {...props}>
156
- {children}
157
- </FormPrimitive.Helper>
158
- );
159
- },
160
- );
161
-
162
- FormHelper.displayName = 'Form.Helper';
163
-
164
- // =============================================================================
165
- // FORM HELPER TEXT
166
- // =============================================================================
167
-
168
- export interface FormHelperTextProps extends TextProps {
169
- className?: string;
170
- children?: ReactNode;
171
- }
172
-
173
- const FormHelperText = forwardRef<Text, FormHelperTextProps>(
174
- ({ className, children, style, ...props }, ref) => {
175
- const { size } = useFormStyleContext();
176
- const computedClassName = cn(formHelperTextVariants({ size }), className);
177
-
178
- return (
179
- <FormPrimitive.HelperText ref={ref} className={computedClassName} style={style} {...props}>
180
- {children}
181
- </FormPrimitive.HelperText>
182
- );
183
- },
184
- );
185
-
186
- FormHelperText.displayName = 'Form.HelperText';
187
-
188
- // =============================================================================
189
- // FORM ERROR
190
- // =============================================================================
191
-
192
- export interface FormErrorProps extends ViewProps {
193
- className?: string;
194
- children?: ReactNode;
195
- }
196
-
197
- const FormError = forwardRef<View, FormErrorProps>(
198
- ({ className, children, style, ...props }, ref) => {
199
- const computedClassName = cn(formErrorVariants(), className);
200
-
201
- return (
202
- <FormPrimitive.Error ref={ref} className={computedClassName} style={style} {...props}>
203
- {children}
204
- </FormPrimitive.Error>
205
- );
206
- },
207
- );
208
-
209
- FormError.displayName = 'Form.Error';
210
-
211
- // =============================================================================
212
- // FORM ERROR TEXT
35
+ // EXPORT
213
36
  // =============================================================================
214
37
 
215
- export interface FormErrorTextProps extends TextProps {
216
- className?: string;
217
- children?: ReactNode;
218
- }
219
-
220
- const FormErrorText = forwardRef<Text, FormErrorTextProps>(
221
- ({ className, children, style, ...props }, ref) => {
222
- const { size } = useFormStyleContext();
223
- const computedClassName = cn(formErrorTextVariants({ size }), className);
224
-
225
- return (
226
- <FormPrimitive.ErrorText ref={ref} className={computedClassName} style={style} {...props}>
227
- {children}
228
- </FormPrimitive.ErrorText>
229
- );
230
- },
231
- );
232
-
233
- FormErrorText.displayName = 'Form.ErrorText';
234
-
235
- // =============================================================================
236
- // FORM ERROR ICON
237
- // =============================================================================
238
-
239
- export interface FormErrorIconProps extends Omit<IconProps, 'children'> {}
240
-
241
- const FormErrorIcon = ({ className, style, as, ...props }: FormErrorIconProps) => {
242
- const { size } = useFormStyleContext();
243
- const computedClassName = cn(formErrorIconVariants({ size }), className);
244
-
245
- return <Icon as={as} className={computedClassName} style={style} {...props} />;
246
- };
247
-
248
- FormErrorIcon.displayName = 'Form.ErrorIcon';
249
-
250
- // =============================================================================
251
- // COMPOUND EXPORT
252
- // =============================================================================
253
-
254
- type FormCompoundComponent = typeof FormRoot & {
255
- Field: typeof FormField;
256
- Label: typeof FormLabel;
257
- Helper: typeof FormHelper;
258
- HelperText: typeof FormHelperText;
259
- Error: typeof FormError;
260
- ErrorText: typeof FormErrorText;
261
- ErrorIcon: typeof FormErrorIcon;
262
- };
263
-
264
- export const Form = Object.assign(FormRoot, {
265
- Field: FormField,
266
- Label: FormLabel,
267
- Helper: FormHelper,
268
- HelperText: FormHelperText,
269
- Error: FormError,
270
- ErrorText: FormErrorText,
271
- ErrorIcon: FormErrorIcon,
272
- }) as FormCompoundComponent;
38
+ export const Form = FormRoot;
@@ -1,75 +1,3 @@
1
- import { cva, type VariantProps } from 'class-variance-authority';
2
- import {
3
- COLOR_TEXT_INVALID,
4
- COLOR_TEXT_SECONDARY,
5
- DISABLED_OPACITY,
6
- } from '../../styles/primitives';
1
+ import { cva } from 'class-variance-authority';
7
2
 
8
3
  export const formRootVariants = cva(['flex-col gap-4']);
9
-
10
- export const formFieldVariants = cva(['flex-col gap-1.5 mb-4', 'web:last:mb-0', DISABLED_OPACITY]);
11
-
12
- export const formLabelVariants = cva(
13
- [
14
- 'flex-row items-center',
15
- DISABLED_OPACITY,
16
- 'web:cursor-pointer',
17
- 'font-medium data-[invalid=true]:text-red-600',
18
- ],
19
- {
20
- variants: {
21
- size: {
22
- default: 'text-sm',
23
- small: 'text-xs',
24
- },
25
- },
26
- defaultVariants: {
27
- size: 'default',
28
- },
29
- },
30
- );
31
-
32
- export const formHelperVariants = cva(['flex-row items-center']);
33
-
34
- export const formHelperTextVariants = cva([COLOR_TEXT_SECONDARY], {
35
- variants: {
36
- size: {
37
- default: 'text-xs',
38
- small: 'text-[11px]',
39
- },
40
- },
41
- defaultVariants: {
42
- size: 'default',
43
- },
44
- });
45
-
46
- export const formErrorVariants = cva(['flex-row items-center gap-1']);
47
-
48
- export const formErrorTextVariants = cva([COLOR_TEXT_INVALID, 'font-medium'], {
49
- variants: {
50
- size: {
51
- default: 'text-xs',
52
- small: 'text-[11px]',
53
- },
54
- },
55
- defaultVariants: {
56
- size: 'default',
57
- },
58
- });
59
-
60
- export const formErrorIconVariants = cva([COLOR_TEXT_INVALID], {
61
- variants: {
62
- size: {
63
- default: 'size-3.5',
64
- small: 'size-3',
65
- },
66
- },
67
- defaultVariants: {
68
- size: 'default',
69
- },
70
- });
71
-
72
- export type FormLabelVariantProps = VariantProps<typeof formLabelVariants>;
73
- export type FormHelperTextVariantProps = VariantProps<typeof formHelperTextVariants>;
74
- export type FormErrorTextVariantProps = VariantProps<typeof formErrorTextVariants>;
75
- export type FormErrorIconVariantProps = VariantProps<typeof formErrorIconVariants>;
@@ -0,0 +1,79 @@
1
+ import type { ComponentProps, ComponentRef, ForwardedRef } from 'react';
2
+ import { forwardRef } from 'react';
3
+ import type { View } from 'react-native';
4
+ import { createOtpInput, type IOtpInputRootProps } from '@cdx-ui/primitives';
5
+ import { cn, useStyleContext, withStyleContext } from '@cdx-ui/utils';
6
+ import { HStack } from '../Stack/HStack';
7
+ import { Input, type InputProps } from '../Input';
8
+ import type { InputVariantProps } from '../Input/styles';
9
+ import {
10
+ otpCellVariants,
11
+ otpFieldVariants,
12
+ otpRootVariants,
13
+ type OtpInputVariantProps,
14
+ } from './styles';
15
+
16
+ const SCOPE = 'OTP_INPUT';
17
+
18
+ const OtpRoot = withStyleContext(HStack, SCOPE);
19
+
20
+ const useOtpInputStyleContext = () => useStyleContext(SCOPE) as InputVariantProps;
21
+
22
+ const OtpStyledCell = forwardRef<View, InputProps>(
23
+ ({ className, children, ...props }, ref: ForwardedRef<View>) => {
24
+ const { size, variant } = useOtpInputStyleContext();
25
+ return (
26
+ <Input
27
+ ref={ref}
28
+ variant={variant}
29
+ size={size}
30
+ className={cn(otpCellVariants({ size }), className)}
31
+ {...props}
32
+ >
33
+ {children}
34
+ </Input>
35
+ );
36
+ },
37
+ );
38
+
39
+ OtpStyledCell.displayName = 'OtpInput.Cell';
40
+
41
+ const OtpStyledField = forwardRef<
42
+ ComponentRef<typeof Input.Field>,
43
+ ComponentProps<typeof Input.Field>
44
+ >(({ className, ...props }, ref) => {
45
+ const { size } = useOtpInputStyleContext();
46
+ return <Input.Field ref={ref} className={cn(otpFieldVariants({ size }), className)} {...props} />;
47
+ });
48
+
49
+ OtpStyledField.displayName = 'OtpInput.Field';
50
+
51
+ const OtpPrimitive = createOtpInput({
52
+ Root: OtpRoot,
53
+ Cell: OtpStyledCell,
54
+ Field: OtpStyledField,
55
+ });
56
+
57
+ export interface OtpInputProps extends Omit<IOtpInputRootProps, 'size'>, OtpInputVariantProps {
58
+ variant?: NonNullable<InputProps['variant']>;
59
+ size?: NonNullable<InputProps['size']>;
60
+ className?: string;
61
+ }
62
+
63
+ export const OtpInput = forwardRef<View, OtpInputProps>(
64
+ ({ variant = 'outline', size = 'default', fullWidth = true, className, style, ...rest }, ref) => {
65
+ const rootClassName = cn(otpRootVariants({ size, fullWidth }), className);
66
+
67
+ return (
68
+ <OtpPrimitive
69
+ ref={ref}
70
+ className={rootClassName}
71
+ style={style}
72
+ context={{ variant, size }}
73
+ {...rest}
74
+ />
75
+ );
76
+ },
77
+ );
78
+
79
+ OtpInput.displayName = 'OtpInput';
@@ -0,0 +1,45 @@
1
+ import { cva, type VariantProps } from 'class-variance-authority';
2
+
3
+ export const otpRootVariants = cva('flex-row items-stretch gap-2.5', {
4
+ variants: {
5
+ size: {
6
+ default: '',
7
+ small: '',
8
+ },
9
+ fullWidth: {
10
+ true: 'w-full self-stretch justify-center',
11
+ false: 'self-start',
12
+ },
13
+ },
14
+ defaultVariants: {
15
+ size: 'default',
16
+ fullWidth: true,
17
+ },
18
+ });
19
+
20
+ /** Narrow cell chrome: overrides Input root `w-full` / wide horizontal padding for one digit. */
21
+ export const otpCellVariants = cva('shrink-0 justify-center', {
22
+ variants: {
23
+ size: {
24
+ default: 'w-12 min-w-12 max-w-12 px-1',
25
+ small: 'w-10 min-w-10 max-w-10 px-0.5',
26
+ },
27
+ },
28
+ defaultVariants: {
29
+ size: 'default',
30
+ },
31
+ });
32
+
33
+ export const otpFieldVariants = cva('min-w-0 w-full text-center tabular-nums', {
34
+ variants: {
35
+ size: {
36
+ default: 'text-xl leading-6',
37
+ small: 'text-base leading-5',
38
+ },
39
+ },
40
+ defaultVariants: {
41
+ size: 'default',
42
+ },
43
+ });
44
+
45
+ export type OtpInputVariantProps = VariantProps<typeof otpRootVariants>;
@@ -7,9 +7,11 @@ export * from './Card';
7
7
  export * from './Checkbox';
8
8
  export * from './Chip';
9
9
  export * from './Dialog';
10
+ export * from './Field';
10
11
  export * from './Form';
11
12
  export * from './Image';
12
13
  export * from './Input';
14
+ export * from './OtpInput';
13
15
  export * from './Link';
14
16
  export * from './ProgressBar';
15
17
  export * from './ProgressSegmented';
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","require","_reactNative","_utils","_jsxRuntime","FormLabelRoot","exports","forwardRef","htmlFor","_omitHtmlFor","onPress","props","ref","focusInput","isDisabled","useFormControlContext","jsx","Text","disabled","Boolean","composeEventHandlers","displayName"],"sourceRoot":"../../../../src","sources":["components/Form/FormLabelRoot.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAA4E,IAAAG,WAAA,GAAAH,OAAA;AAS5E;AACA;AACA;AACA;AACO,MAAMI,aAAa,GAAAC,OAAA,CAAAD,aAAA,gBAAG,IAAAE,iBAAU,EACrC,CAAC;EAAEC,OAAO,EAAEC,YAAY;EAAEC,OAAO;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,KAAK;EACrD,KAAKH,YAAY;EAEjB,MAAM;IAAEI,UAAU;IAAEC;EAAW,CAAC,GAAG,IAAAC,4BAAqB,EAAC,CAAC;EAE1D,oBACE,IAAAX,WAAA,CAAAY,GAAA,EAACd,YAAA,CAAAe,IAAI;IACHL,GAAG,EAAEA,GAAI;IAAA,GACLD,KAAK;IACTO,QAAQ,EAAEC,OAAO,CAACL,UAAU,CAAE;IAC9BJ,OAAO,EAAE,IAAAU,2BAAoB,EAACV,OAAO,EAAE,MAAMG,UAAU,GAAG,CAAC;EAAE,CAC9D,CAAC;AAEN,CACF,CAAC;AAEDR,aAAa,CAACgB,WAAW,GAAG,eAAe","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","FormLabelRoot","exports","forwardRef","props","ref","jsx","displayName"],"sourceRoot":"../../../../src","sources":["components/Form/FormLabelRoot.web.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA0D,IAAAC,WAAA,GAAAD,OAAA;AAAA,SAAAD,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAY1D;AACO,MAAMkB,aAAa,GAAAC,OAAA,CAAAD,aAAA,gBAAG,IAAAE,iBAAU,EAAuC,CAACC,KAAK,EAAEC,GAAG,KAAK;EAC5F,oBAAO,IAAAxB,WAAA,CAAAyB,GAAA;IAAOD,GAAG,EAAEA,GAAI;IAAA,GAAMD;EAAK,CAAmD,CAAC;AACxF,CAAC,CAAC;AAEFH,aAAa,CAACM,WAAW,GAAG,eAAe","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["forwardRef","Text","composeEventHandlers","useFormControlContext","jsx","_jsx","FormLabelRoot","htmlFor","_omitHtmlFor","onPress","props","ref","focusInput","isDisabled","disabled","Boolean","displayName"],"sourceRoot":"../../../../src","sources":["components/Form/FormLabelRoot.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,OAAO;AAClC,SAASC,IAAI,QAA+C,cAAc;AAC1E,SAASC,oBAAoB,EAAEC,qBAAqB,QAAQ,eAAe;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAS5E;AACA;AACA;AACA;AACA,OAAO,MAAMC,aAAa,gBAAGN,UAAU,CACrC,CAAC;EAAEO,OAAO,EAAEC,YAAY;EAAEC,OAAO;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,KAAK;EACrD,KAAKH,YAAY;EAEjB,MAAM;IAAEI,UAAU;IAAEC;EAAW,CAAC,GAAGV,qBAAqB,CAAC,CAAC;EAE1D,oBACEE,IAAA,CAACJ,IAAI;IACHU,GAAG,EAAEA,GAAI;IAAA,GACLD,KAAK;IACTI,QAAQ,EAAEC,OAAO,CAACF,UAAU,CAAE;IAC9BJ,OAAO,EAAEP,oBAAoB,CAACO,OAAO,EAAE,MAAMG,UAAU,GAAG,CAAC;EAAE,CAC9D,CAAC;AAEN,CACF,CAAC;AAEDN,aAAa,CAACU,WAAW,GAAG,eAAe","ignoreList":[]}
@@ -1,13 +0,0 @@
1
- "use strict";
2
-
3
- import React, { forwardRef } from 'react';
4
- import { jsx as _jsx } from "react/jsx-runtime";
5
- /** Real `<label>` so clicking the label focuses the associated control (`htmlFor` → input `id`). */
6
- export const FormLabelRoot = /*#__PURE__*/forwardRef((props, ref) => {
7
- return /*#__PURE__*/_jsx("label", {
8
- ref: ref,
9
- ...props
10
- });
11
- });
12
- FormLabelRoot.displayName = 'FormLabelRoot';
13
- //# sourceMappingURL=FormLabelRoot.web.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","forwardRef","jsx","_jsx","FormLabelRoot","props","ref","displayName"],"sourceRoot":"../../../../src","sources":["components/Form/FormLabelRoot.web.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAwB,OAAO;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAY1D;AACA,OAAO,MAAMC,aAAa,gBAAGH,UAAU,CAAuC,CAACI,KAAK,EAAEC,GAAG,KAAK;EAC5F,oBAAOH,IAAA;IAAOG,GAAG,EAAEA,GAAI;IAAA,GAAMD;EAAK,CAAmD,CAAC;AACxF,CAAC,CAAC;AAEFD,aAAa,CAACG,WAAW,GAAG,eAAe","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormLabelRoot.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/FormLabelRoot.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAG3E,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG;IAC3C,gFAAgF;IAChF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,4DAA4D;IAC5D,OAAO,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC;CAC3D,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,aAAa;IAVxB,gFAAgF;cACtE,MAAM;IAChB,4DAA4D;cAClD,CAAC,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAC,GAAG,IAAI;wCAsB1D,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormLabelRoot.web.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/FormLabelRoot.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAc,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG;IAC3C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,qFAAqF;IACrF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,sFAAsF;IACtF,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC,CAAC;AAEF,oGAAoG;AACpG,eAAO,MAAM,aAAa;cATd,MAAM;eACL,SAAS;IACpB,qFAAqF;qBACpE,MAAM;IACvB,sFAAsF;cAC5E,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;0CAMhC,CAAC"}
@@ -1,18 +0,0 @@
1
- import React, { forwardRef, type ReactNode } from 'react';
2
- import type { ViewProps } from 'react-native';
3
-
4
- export type FormLabelRootProps = ViewProps & {
5
- htmlFor?: string;
6
- children?: ReactNode;
7
- /** Mirrors field invalid state from form context (`data-[invalid=true]` styling). */
8
- 'data-invalid'?: string;
9
- /** @platform native — ignored on DOM `<label>`; set by form primitive for Uniwind. */
10
- dataSet?: Record<string, string>;
11
- };
12
-
13
- /** Real `<label>` so clicking the label focuses the associated control (`htmlFor` → input `id`). */
14
- export const FormLabelRoot = forwardRef<HTMLLabelElement, FormLabelRootProps>((props, ref) => {
15
- return <label ref={ref} {...(props as React.LabelHTMLAttributes<HTMLLabelElement>)} />;
16
- });
17
-
18
- FormLabelRoot.displayName = 'FormLabelRoot';