@cdx-ui/components 0.0.1-alpha.34 → 0.0.1-alpha.36

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 (83) 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/ProgressBar/index.js +45 -0
  15. package/lib/commonjs/components/ProgressBar/index.js.map +1 -0
  16. package/lib/commonjs/components/ProgressBar/styles.js +10 -0
  17. package/lib/commonjs/components/ProgressBar/styles.js.map +1 -0
  18. package/lib/commonjs/components/ProgressSegmented/styles.js +5 -5
  19. package/lib/commonjs/components/ProgressSegmented/styles.js.map +1 -1
  20. package/lib/commonjs/components/index.js +24 -0
  21. package/lib/commonjs/components/index.js.map +1 -1
  22. package/lib/module/components/{Form/FormLabelRoot.js → Field/FieldLabel.js} +3 -3
  23. package/lib/module/components/Field/FieldLabel.js.map +1 -0
  24. package/lib/module/components/Field/FieldLabel.web.js +17 -0
  25. package/lib/module/components/Field/FieldLabel.web.js.map +1 -0
  26. package/lib/module/components/Field/index.js +155 -0
  27. package/lib/module/components/Field/index.js.map +1 -0
  28. package/lib/module/components/Field/styles.js +12 -0
  29. package/lib/module/components/Field/styles.js.map +1 -0
  30. package/lib/module/components/Form/FormRoot.js.map +1 -1
  31. package/lib/module/components/Form/index.js +8 -216
  32. package/lib/module/components/Form/index.js.map +1 -1
  33. package/lib/module/components/Form/styles.js +0 -48
  34. package/lib/module/components/Form/styles.js.map +1 -1
  35. package/lib/module/components/ProgressBar/index.js +41 -0
  36. package/lib/module/components/ProgressBar/index.js.map +1 -0
  37. package/lib/module/components/ProgressBar/styles.js +6 -0
  38. package/lib/module/components/ProgressBar/styles.js.map +1 -0
  39. package/lib/module/components/ProgressSegmented/styles.js +5 -5
  40. package/lib/module/components/ProgressSegmented/styles.js.map +1 -1
  41. package/lib/module/components/index.js +2 -0
  42. package/lib/module/components/index.js.map +1 -1
  43. package/lib/typescript/components/{Form/FormLabelRoot.d.ts → Field/FieldLabel.d.ts} +5 -5
  44. package/lib/typescript/components/Field/FieldLabel.d.ts.map +1 -0
  45. package/lib/typescript/components/{Form/FormLabelRoot.web.d.ts → Field/FieldLabel.web.d.ts} +3 -7
  46. package/lib/typescript/components/Field/FieldLabel.web.d.ts.map +1 -0
  47. package/lib/typescript/components/Field/index.d.ts +26 -0
  48. package/lib/typescript/components/Field/index.d.ts.map +1 -0
  49. package/lib/typescript/components/Field/styles.d.ts +16 -0
  50. package/lib/typescript/components/Field/styles.d.ts.map +1 -0
  51. package/lib/typescript/components/Form/FormRoot.d.ts +2 -0
  52. package/lib/typescript/components/Form/FormRoot.d.ts.map +1 -1
  53. package/lib/typescript/components/Form/index.d.ts +4 -61
  54. package/lib/typescript/components/Form/index.d.ts.map +1 -1
  55. package/lib/typescript/components/Form/styles.d.ts +0 -20
  56. package/lib/typescript/components/Form/styles.d.ts.map +1 -1
  57. package/lib/typescript/components/ProgressBar/index.d.ts +17 -0
  58. package/lib/typescript/components/ProgressBar/index.d.ts.map +1 -0
  59. package/lib/typescript/components/ProgressBar/styles.d.ts +5 -0
  60. package/lib/typescript/components/ProgressBar/styles.d.ts.map +1 -0
  61. package/lib/typescript/components/ProgressSegmented/styles.d.ts.map +1 -1
  62. package/lib/typescript/components/index.d.ts +2 -0
  63. package/lib/typescript/components/index.d.ts.map +1 -1
  64. package/package.json +4 -4
  65. package/src/components/{Form/FormLabelRoot.tsx → Field/FieldLabel.tsx} +4 -4
  66. package/src/components/Field/FieldLabel.web.tsx +25 -0
  67. package/src/components/Field/index.tsx +171 -0
  68. package/src/components/Field/styles.ts +32 -0
  69. package/src/components/Form/FormRoot.tsx +1 -0
  70. package/src/components/Form/index.tsx +11 -245
  71. package/src/components/Form/styles.ts +1 -73
  72. package/src/components/ProgressBar/index.tsx +53 -0
  73. package/src/components/ProgressBar/styles.ts +9 -0
  74. package/src/components/ProgressSegmented/styles.ts +6 -5
  75. package/src/components/index.ts +2 -0
  76. package/lib/commonjs/components/Form/FormLabelRoot.js.map +0 -1
  77. package/lib/commonjs/components/Form/FormLabelRoot.web.js.map +0 -1
  78. package/lib/module/components/Form/FormLabelRoot.js.map +0 -1
  79. package/lib/module/components/Form/FormLabelRoot.web.js +0 -13
  80. package/lib/module/components/Form/FormLabelRoot.web.js.map +0 -1
  81. package/lib/typescript/components/Form/FormLabelRoot.d.ts.map +0 -1
  82. package/lib/typescript/components/Form/FormLabelRoot.web.d.ts.map +0 -1
  83. package/src/components/Form/FormLabelRoot.web.tsx +0 -18
@@ -1,53 +1,5 @@
1
1
  "use strict";
2
2
 
3
3
  import { cva } from 'class-variance-authority';
4
- import { COLOR_TEXT_INVALID, COLOR_TEXT_SECONDARY, DISABLED_OPACITY } from '../../styles/primitives';
5
4
  export const formRootVariants = cva(['flex-col gap-4']);
6
- export const formFieldVariants = cva(['flex-col gap-1.5 mb-4', 'web:last:mb-0', DISABLED_OPACITY]);
7
- export const formLabelVariants = cva(['flex-row items-center', DISABLED_OPACITY, 'web:cursor-pointer', 'font-medium data-[invalid=true]:text-red-600'], {
8
- variants: {
9
- size: {
10
- default: 'text-sm',
11
- small: 'text-xs'
12
- }
13
- },
14
- defaultVariants: {
15
- size: 'default'
16
- }
17
- });
18
- export const formHelperVariants = cva(['flex-row items-center']);
19
- export const formHelperTextVariants = cva([COLOR_TEXT_SECONDARY], {
20
- variants: {
21
- size: {
22
- default: 'text-xs',
23
- small: 'text-[11px]'
24
- }
25
- },
26
- defaultVariants: {
27
- size: 'default'
28
- }
29
- });
30
- export const formErrorVariants = cva(['flex-row items-center gap-1']);
31
- export const formErrorTextVariants = cva([COLOR_TEXT_INVALID, 'font-medium'], {
32
- variants: {
33
- size: {
34
- default: 'text-xs',
35
- small: 'text-[11px]'
36
- }
37
- },
38
- defaultVariants: {
39
- size: 'default'
40
- }
41
- });
42
- export const formErrorIconVariants = cva([COLOR_TEXT_INVALID], {
43
- variants: {
44
- size: {
45
- default: 'size-3.5',
46
- small: 'size-3'
47
- }
48
- },
49
- defaultVariants: {
50
- size: 'default'
51
- }
52
- });
53
5
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["cva","COLOR_TEXT_INVALID","COLOR_TEXT_SECONDARY","DISABLED_OPACITY","formRootVariants","formFieldVariants","formLabelVariants","variants","size","default","small","defaultVariants","formHelperVariants","formHelperTextVariants","formErrorVariants","formErrorTextVariants","formErrorIconVariants"],"sourceRoot":"../../../../src","sources":["components/Form/styles.ts"],"mappings":";;AAAA,SAASA,GAAG,QAA2B,0BAA0B;AACjE,SACEC,kBAAkB,EAClBC,oBAAoB,EACpBC,gBAAgB,QACX,yBAAyB;AAEhC,OAAO,MAAMC,gBAAgB,GAAGJ,GAAG,CAAC,CAAC,gBAAgB,CAAC,CAAC;AAEvD,OAAO,MAAMK,iBAAiB,GAAGL,GAAG,CAAC,CAAC,uBAAuB,EAAE,eAAe,EAAEG,gBAAgB,CAAC,CAAC;AAElG,OAAO,MAAMG,iBAAiB,GAAGN,GAAG,CAClC,CACE,uBAAuB,EACvBG,gBAAgB,EAChB,oBAAoB,EACpB,8CAA8C,CAC/C,EACD;EACEI,QAAQ,EAAE;IACRC,IAAI,EAAE;MACJC,OAAO,EAAE,SAAS;MAClBC,KAAK,EAAE;IACT;EACF,CAAC;EACDC,eAAe,EAAE;IACfH,IAAI,EAAE;EACR;AACF,CACF,CAAC;AAED,OAAO,MAAMI,kBAAkB,GAAGZ,GAAG,CAAC,CAAC,uBAAuB,CAAC,CAAC;AAEhE,OAAO,MAAMa,sBAAsB,GAAGb,GAAG,CAAC,CAACE,oBAAoB,CAAC,EAAE;EAChEK,QAAQ,EAAE;IACRC,IAAI,EAAE;MACJC,OAAO,EAAE,SAAS;MAClBC,KAAK,EAAE;IACT;EACF,CAAC;EACDC,eAAe,EAAE;IACfH,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAEF,OAAO,MAAMM,iBAAiB,GAAGd,GAAG,CAAC,CAAC,6BAA6B,CAAC,CAAC;AAErE,OAAO,MAAMe,qBAAqB,GAAGf,GAAG,CAAC,CAACC,kBAAkB,EAAE,aAAa,CAAC,EAAE;EAC5EM,QAAQ,EAAE;IACRC,IAAI,EAAE;MACJC,OAAO,EAAE,SAAS;MAClBC,KAAK,EAAE;IACT;EACF,CAAC;EACDC,eAAe,EAAE;IACfH,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAEF,OAAO,MAAMQ,qBAAqB,GAAGhB,GAAG,CAAC,CAACC,kBAAkB,CAAC,EAAE;EAC7DM,QAAQ,EAAE;IACRC,IAAI,EAAE;MACJC,OAAO,EAAE,UAAU;MACnBC,KAAK,EAAE;IACT;EACF,CAAC;EACDC,eAAe,EAAE;IACfH,IAAI,EAAE;EACR;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["cva","formRootVariants"],"sourceRoot":"../../../../src","sources":["components/Form/styles.ts"],"mappings":";;AAAA,SAASA,GAAG,QAAQ,0BAA0B;AAE9C,OAAO,MAAMC,gBAAgB,GAAGD,GAAG,CAAC,CAAC,gBAAgB,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+
3
+ import { forwardRef } from 'react';
4
+ import { View } from 'react-native';
5
+ import { createProgress } from '@cdx-ui/primitives';
6
+ import { cn } from '@cdx-ui/utils';
7
+ import { progressBarIndicatorVariants, progressBarTrackVariants } from './styles';
8
+ import { jsx as _jsx } from "react/jsx-runtime";
9
+ const ProgressPrimitive = createProgress({
10
+ Root: View,
11
+ Indicator: View
12
+ });
13
+ const ProgressBarRoot = /*#__PURE__*/forwardRef(({
14
+ className,
15
+ style,
16
+ ...props
17
+ }, ref) => {
18
+ const trackClass = cn(progressBarTrackVariants(), className);
19
+ return /*#__PURE__*/_jsx(ProgressPrimitive, {
20
+ ref: ref,
21
+ className: trackClass,
22
+ style: style,
23
+ ...props
24
+ });
25
+ });
26
+ ProgressBarRoot.displayName = 'ProgressBar';
27
+ const ProgressBarIndicator = /*#__PURE__*/forwardRef(({
28
+ className,
29
+ style,
30
+ ...props
31
+ }, ref) => /*#__PURE__*/_jsx(ProgressPrimitive.Indicator, {
32
+ ref: ref,
33
+ className: cn(progressBarIndicatorVariants(), className),
34
+ style: style,
35
+ ...props
36
+ }));
37
+ ProgressBarIndicator.displayName = 'ProgressBar.Indicator';
38
+ export const ProgressBar = Object.assign(ProgressBarRoot, {
39
+ Indicator: ProgressBarIndicator
40
+ });
41
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["forwardRef","View","createProgress","cn","progressBarIndicatorVariants","progressBarTrackVariants","jsx","_jsx","ProgressPrimitive","Root","Indicator","ProgressBarRoot","className","style","props","ref","trackClass","displayName","ProgressBarIndicator","ProgressBar","Object","assign"],"sourceRoot":"../../../../src","sources":["components/ProgressBar/index.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,OAAO;AAClC,SAASC,IAAI,QAAwB,cAAc;AACnD,SAASC,cAAc,QAA6B,oBAAoB;AACxE,SAASC,EAAE,QAAQ,eAAe;AAClC,SACEC,4BAA4B,EAC5BC,wBAAwB,QAEnB,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAElB,MAAMC,iBAAiB,GAAGN,cAAc,CAAC;EACvCO,IAAI,EAAER,IAAI;EACVS,SAAS,EAAET;AACb,CAAC,CAAC;AAUF,MAAMU,eAAe,gBAAGX,UAAU,CAChC,CAAC;EAAEY,SAAS;EAAEC,KAAK;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,KAAK;EACvC,MAAMC,UAAU,GAAGb,EAAE,CAACE,wBAAwB,CAAC,CAAC,EAAEO,SAAS,CAAC;EAE5D,oBAAOL,IAAA,CAACC,iBAAiB;IAACO,GAAG,EAAEA,GAAI;IAACH,SAAS,EAAEI,UAAW;IAACH,KAAK,EAAEA,KAAM;IAAA,GAAKC;EAAK,CAAG,CAAC;AACxF,CACF,CAAC;AAEDH,eAAe,CAACM,WAAW,GAAG,aAAa;AAE3C,MAAMC,oBAAoB,gBAAGlB,UAAU,CACrC,CAAC;EAAEY,SAAS;EAAEC,KAAK;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,kBAClCR,IAAA,CAACC,iBAAiB,CAACE,SAAS;EAC1BK,GAAG,EAAEA,GAAI;EACTH,SAAS,EAAET,EAAE,CAACC,4BAA4B,CAAC,CAAC,EAAEQ,SAAS,CAAE;EACzDC,KAAK,EAAEA,KAAM;EAAA,GACTC;AAAK,CACV,CAEL,CAAC;AAEDI,oBAAoB,CAACD,WAAW,GAAG,uBAAuB;AAM1D,OAAO,MAAME,WAAW,GAAGC,MAAM,CAACC,MAAM,CAACV,eAAe,EAAE;EACxDD,SAAS,EAAEQ;AACb,CAAC,CAAiC","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ import { cva } from 'class-variance-authority';
4
+ export const progressBarTrackVariants = cva(['w-full flex-row overflow-hidden rounded-full bg-surface-action-tint h-1']);
5
+ export const progressBarIndicatorVariants = cva(['rounded-full bg-surface-action-strong']);
6
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["cva","progressBarTrackVariants","progressBarIndicatorVariants"],"sourceRoot":"../../../../src","sources":["components/ProgressBar/styles.ts"],"mappings":";;AAAA,SAASA,GAAG,QAA2B,0BAA0B;AAEjE,OAAO,MAAMC,wBAAwB,GAAGD,GAAG,CAAC,CAC1C,yEAAyE,CAC1E,CAAC;AAEF,OAAO,MAAME,4BAA4B,GAAGF,GAAG,CAAC,CAAC,uCAAuC,CAAC,CAAC","ignoreList":[]}
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
 
3
3
  import { cva } from 'class-variance-authority';
4
- export const progressSegmentedVariants = cva(['flex-row gap-1 w-full']);
5
- export const segmentVariants = cva(['flex-1 h-2 rounded'], {
4
+ export const progressSegmentedVariants = cva(['flex-row gap-1 w-full rounded overflow-hidden']);
5
+ export const segmentVariants = cva(['flex-1 h-1'], {
6
6
  variants: {
7
7
  state: {
8
- complete: 'bg-slate-900',
9
- incomplete: 'bg-slate-300',
10
- inprogress: 'bg-gradient-to-r from-slate-900 from-50% to-slate-300 to-50%'
8
+ complete: 'bg-surface-action-strong',
9
+ incomplete: 'bg-surface-action-tint',
10
+ inprogress: 'bg-gradient-to-r from-surface-action-strong from-50% to-surface-action-tint to-50%'
11
11
  }
12
12
  },
13
13
  defaultVariants: {
@@ -1 +1 @@
1
- {"version":3,"names":["cva","progressSegmentedVariants","segmentVariants","variants","state","complete","incomplete","inprogress","defaultVariants"],"sourceRoot":"../../../../src","sources":["components/ProgressSegmented/styles.ts"],"mappings":";;AAAA,SAASA,GAAG,QAA2B,0BAA0B;AAEjE,OAAO,MAAMC,yBAAyB,GAAGD,GAAG,CAAC,CAAC,uBAAuB,CAAC,CAAC;AAEvE,OAAO,MAAME,eAAe,GAAGF,GAAG,CAAC,CAAC,oBAAoB,CAAC,EAAE;EACzDG,QAAQ,EAAE;IACRC,KAAK,EAAE;MACLC,QAAQ,EAAE,cAAc;MACxBC,UAAU,EAAE,cAAc;MAC1BC,UAAU,EAAE;IACd;EACF,CAAC;EACDC,eAAe,EAAE;IACfJ,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["cva","progressSegmentedVariants","segmentVariants","variants","state","complete","incomplete","inprogress","defaultVariants"],"sourceRoot":"../../../../src","sources":["components/ProgressSegmented/styles.ts"],"mappings":";;AAAA,SAASA,GAAG,QAA2B,0BAA0B;AAEjE,OAAO,MAAMC,yBAAyB,GAAGD,GAAG,CAAC,CAAC,+CAA+C,CAAC,CAAC;AAE/F,OAAO,MAAME,eAAe,GAAGF,GAAG,CAAC,CAAC,YAAY,CAAC,EAAE;EACjDG,QAAQ,EAAE;IACRC,KAAK,EAAE;MACLC,QAAQ,EAAE,0BAA0B;MACpCC,UAAU,EAAE,wBAAwB;MACpCC,UAAU,EACR;IACJ;EACF,CAAC;EACDC,eAAe,EAAE;IACfJ,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]}
@@ -9,10 +9,12 @@ export * from './Card';
9
9
  export * from './Checkbox';
10
10
  export * from './Chip';
11
11
  export * from './Dialog';
12
+ export * from './Field';
12
13
  export * from './Form';
13
14
  export * from './Image';
14
15
  export * from './Input';
15
16
  export * from './Link';
17
+ export * from './ProgressBar';
16
18
  export * from './ProgressSegmented';
17
19
  export * from './Select';
18
20
  export * from './VirtualizedList';
@@ -1 +1 @@
1
- {"version":3,"names":["HStack","VStack"],"sourceRoot":"../../../src","sources":["components/index.ts"],"mappings":";;AAAA,cAAc,eAAe;AAC7B,cAAc,UAAU;AACxB,cAAc,eAAe;AAC7B,cAAc,OAAO;AACrB,cAAc,UAAU;AACxB,cAAc,QAAQ;AACtB,cAAc,YAAY;AAC1B,cAAc,QAAQ;AACtB,cAAc,UAAU;AACxB,cAAc,QAAQ;AACtB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,qBAAqB;AACnC,cAAc,UAAU;AACxB,cAAc,mBAAmB;AACjC,cAAc,UAAU;AACxB,SAASA,MAAM,EAAEC,MAAM,QAAQ,SAAS;AACxC,cAAc,WAAW;AACzB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,cAAc","ignoreList":[]}
1
+ {"version":3,"names":["HStack","VStack"],"sourceRoot":"../../../src","sources":["components/index.ts"],"mappings":";;AAAA,cAAc,eAAe;AAC7B,cAAc,UAAU;AACxB,cAAc,eAAe;AAC7B,cAAc,OAAO;AACrB,cAAc,UAAU;AACxB,cAAc,QAAQ;AACtB,cAAc,YAAY;AAC1B,cAAc,QAAQ;AACtB,cAAc,UAAU;AACxB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,eAAe;AAC7B,cAAc,qBAAqB;AACnC,cAAc,UAAU;AACxB,cAAc,mBAAmB;AACjC,cAAc,UAAU;AACxB,SAASA,MAAM,EAAEC,MAAM,QAAQ,SAAS;AACxC,cAAc,WAAW;AACzB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,cAAc","ignoreList":[]}
@@ -1,6 +1,6 @@
1
1
  import { Text, TextProps, type GestureResponderEvent } from 'react-native';
2
- export type FormLabelRootProps = TextProps & {
3
- /** @platform web — forwarded on web; ignored here (see `FormLabelRoot.web`). */
2
+ export type BaseFieldLabelProps = TextProps & {
3
+ /** @platform web — forwarded on web; ignored here (see `FieldLabelRoot.web`). */
4
4
  htmlFor?: string;
5
5
  /** Optional; composed with label tap-to-focus on native. */
6
6
  onPress?: ((event: GestureResponderEvent) => void) | null;
@@ -9,10 +9,10 @@ export type FormLabelRootProps = TextProps & {
9
9
  * Native: `Text` label row — tap focuses the field input via form context
10
10
  * (parity with `<label htmlFor>` on web).
11
11
  */
12
- export declare const FormLabelRoot: import("react").ForwardRefExoticComponent<TextProps & {
13
- /** @platform web — forwarded on web; ignored here (see `FormLabelRoot.web`). */
12
+ export declare const BaseFieldLabel: import("react").ForwardRefExoticComponent<TextProps & {
13
+ /** @platform web — forwarded on web; ignored here (see `FieldLabelRoot.web`). */
14
14
  htmlFor?: string;
15
15
  /** Optional; composed with label tap-to-focus on native. */
16
16
  onPress?: ((event: GestureResponderEvent) => void) | null;
17
17
  } & import("react").RefAttributes<Text>>;
18
- //# sourceMappingURL=FormLabelRoot.d.ts.map
18
+ //# sourceMappingURL=FieldLabel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FieldLabel.d.ts","sourceRoot":"","sources":["../../../../src/components/Field/FieldLabel.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAG3E,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG;IAC5C,iFAAiF;IACjF,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,cAAc;IAVzB,iFAAiF;cACvE,MAAM;IAChB,4DAA4D;cAClD,CAAC,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAC,GAAG,IAAI;wCAsB1D,CAAC"}
@@ -1,20 +1,16 @@
1
1
  import React, { type ReactNode } from 'react';
2
2
  import type { ViewProps } from 'react-native';
3
- export type FormLabelRootProps = ViewProps & {
3
+ export type BaseFieldLabelProps = ViewProps & {
4
4
  htmlFor?: string;
5
5
  children?: ReactNode;
6
- /** Mirrors field invalid state from form context (`data-[invalid=true]` styling). */
7
- 'data-invalid'?: string;
8
6
  /** @platform native — ignored on DOM `<label>`; set by form primitive for Uniwind. */
9
7
  dataSet?: Record<string, string>;
10
8
  };
11
9
  /** Real `<label>` so clicking the label focuses the associated control (`htmlFor` → input `id`). */
12
- export declare const FormLabelRoot: React.ForwardRefExoticComponent<ViewProps & {
10
+ export declare const BaseFieldLabel: React.ForwardRefExoticComponent<ViewProps & {
13
11
  htmlFor?: string;
14
12
  children?: ReactNode;
15
- /** Mirrors field invalid state from form context (`data-[invalid=true]` styling). */
16
- 'data-invalid'?: string;
17
13
  /** @platform native — ignored on DOM `<label>`; set by form primitive for Uniwind. */
18
14
  dataSet?: Record<string, string>;
19
15
  } & React.RefAttributes<HTMLLabelElement>>;
20
- //# sourceMappingURL=FormLabelRoot.web.d.ts.map
16
+ //# sourceMappingURL=FieldLabel.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FieldLabel.web.d.ts","sourceRoot":"","sources":["../../../../src/components/Field/FieldLabel.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAc,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAI9C,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,sFAAsF;IACtF,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC,CAAC;AAEF,oGAAoG;AACpG,eAAO,MAAM,cAAc;cAPf,MAAM;eACL,SAAS;IACpB,sFAAsF;cAC5E,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;0CAahC,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { View } from 'react-native';
2
+ import { IFieldErrorProps, IFieldHelperProps, IFieldLabelProps, type IFieldRootProps } from '@cdx-ui/primitives';
3
+ import { type FieldRootVariantProps, type FieldLabelVariantProps, type FieldHelperVariantProps, type FieldErrorVariantProps } from './styles';
4
+ /**
5
+ * Field wrapper + context. For **initial focus**, pass `autoFocus` on `Input.Field` (not here).
6
+ */
7
+ export interface FieldRootProps extends IFieldRootProps, FieldRootVariantProps {
8
+ }
9
+ declare const FieldRoot: import("react").ForwardRefExoticComponent<FieldRootProps & import("react").RefAttributes<View>>;
10
+ export interface FieldLabelProps extends IFieldLabelProps, FieldLabelVariantProps {
11
+ }
12
+ declare const FieldLabel: import("react").ForwardRefExoticComponent<FieldLabelProps & import("react").RefAttributes<View>>;
13
+ export interface FieldHelperProps extends IFieldHelperProps, FieldHelperVariantProps {
14
+ }
15
+ declare const FieldHelper: import("react").ForwardRefExoticComponent<FieldHelperProps & import("react").RefAttributes<View>>;
16
+ export interface FieldErrorProps extends IFieldErrorProps, FieldErrorVariantProps {
17
+ }
18
+ declare const FieldError: import("react").ForwardRefExoticComponent<FieldErrorProps & import("react").RefAttributes<View>>;
19
+ type FieldCompoundComponent = typeof FieldRoot & {
20
+ Label: typeof FieldLabel;
21
+ Helper: typeof FieldHelper;
22
+ Error: typeof FieldError;
23
+ };
24
+ export declare const Field: FieldCompoundComponent;
25
+ export {};
26
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Field/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAQ,IAAI,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAEL,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,KAAK,eAAe,EACrB,MAAM,oBAAoB,CAAC;AAI5B,OAAO,EAQL,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC5B,MAAM,UAAU,CAAC;AAoBlB;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,eAAe,EAAE,qBAAqB;CAAG;AAEjF,QAAA,MAAM,SAAS,iGAUd,CAAC;AAQF,MAAM,WAAW,eAAgB,SAAQ,gBAAgB,EAAE,sBAAsB;CAAG;AAEpF,QAAA,MAAM,UAAU,kGAqBf,CAAC;AAQF,MAAM,WAAW,gBAAiB,SAAQ,iBAAiB,EAAE,uBAAuB;CAAG;AAEvF,QAAA,MAAM,WAAW,mGAWhB,CAAC;AAwBF,MAAM,WAAW,eAAgB,SAAQ,gBAAgB,EAAE,sBAAsB;CAAG;AAEpF,QAAA,MAAM,UAAU,kGAcf,CAAC;AAQF,KAAK,sBAAsB,GAAG,OAAO,SAAS,GAAG;IAC/C,KAAK,EAAE,OAAO,UAAU,CAAC;IACzB,MAAM,EAAE,OAAO,WAAW,CAAC;IAC3B,KAAK,EAAE,OAAO,UAAU,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,KAAK,EAIZ,sBAAsB,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { type VariantProps } from 'class-variance-authority';
2
+ export declare const fieldRootVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
3
+ export declare const fieldLabelVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
4
+ export declare const fieldHelperVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
5
+ export declare const fieldHelperTextVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
6
+ export declare const fieldErrorVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
7
+ export declare const fieldErrorTextVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
8
+ export declare const fieldErrorIconVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
9
+ export type FieldRootVariantProps = VariantProps<typeof fieldRootVariants>;
10
+ export type FieldLabelVariantProps = VariantProps<typeof fieldLabelVariants>;
11
+ export type FieldHelperVariantProps = VariantProps<typeof fieldHelperVariants>;
12
+ export type FieldHelperTextVariantProps = VariantProps<typeof fieldHelperTextVariants>;
13
+ export type FieldErrorVariantProps = VariantProps<typeof fieldErrorVariants>;
14
+ export type FieldErrorTextVariantProps = VariantProps<typeof fieldErrorTextVariants>;
15
+ export type FieldErrorIconVariantProps = VariantProps<typeof fieldErrorIconVariants>;
16
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Field/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,eAAO,MAAM,iBAAiB,oFAA6D,CAAC;AAE5F,eAAO,MAAM,kBAAkB,oFAQ7B,CAAC;AAEH,eAAO,MAAM,mBAAmB,oFAAiC,CAAC;AAElE,eAAO,MAAM,uBAAuB,oFAA4C,CAAC;AAEjF,eAAO,MAAM,kBAAkB,oFAAuC,CAAC;AAEvE,eAAO,MAAM,sBAAsB,oFAA0C,CAAC;AAE9E,eAAO,MAAM,sBAAsB,oFAA2C,CAAC;AAE/E,MAAM,MAAM,qBAAqB,GAAG,YAAY,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC3E,MAAM,MAAM,sBAAsB,GAAG,YAAY,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC7E,MAAM,MAAM,uBAAuB,GAAG,YAAY,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAC/E,MAAM,MAAM,2BAA2B,GAAG,YAAY,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACvF,MAAM,MAAM,sBAAsB,GAAG,YAAY,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC7E,MAAM,MAAM,0BAA0B,GAAG,YAAY,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACrF,MAAM,MAAM,0BAA0B,GAAG,YAAY,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
@@ -3,10 +3,12 @@ export type BaseFormRootProps = ViewProps & {
3
3
  onSubmit?: (e: React.SyntheticEvent) => void;
4
4
  action?: string | ((formData: FormData) => void | Promise<void>);
5
5
  method?: string;
6
+ className?: string;
6
7
  };
7
8
  export declare const BaseFormRoot: import("react").ForwardRefExoticComponent<ViewProps & {
8
9
  onSubmit?: (e: React.SyntheticEvent) => void;
9
10
  action?: string | ((formData: FormData) => void | Promise<void>);
10
11
  method?: string;
12
+ className?: string;
11
13
  } & import("react").RefAttributes<View>>;
12
14
  //# sourceMappingURL=FormRoot.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FormRoot.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/FormRoot.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG;IAC1C,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,cAAc,KAAK,IAAI,CAAC;IAC7C,MAAM,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,QAAQ,EAAE,QAAQ,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IACjE,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,YAAY;eALZ,CAAC,CAAC,EAAE,KAAK,CAAC,cAAc,KAAK,IAAI;aACnC,MAAM,GAAG,CAAC,CAAC,QAAQ,EAAE,QAAQ,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;aACvD,MAAM;wCAUhB,CAAC"}
1
+ {"version":3,"file":"FormRoot.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/FormRoot.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG;IAC1C,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,cAAc,KAAK,IAAI,CAAC;IAC7C,MAAM,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,QAAQ,EAAE,QAAQ,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IACjE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,YAAY;eANZ,CAAC,CAAC,EAAE,KAAK,CAAC,cAAc,KAAK,IAAI;aACnC,MAAM,GAAG,CAAC,CAAC,QAAQ,EAAE,QAAQ,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;aACvD,MAAM;gBACH,MAAM;wCAUnB,CAAC"}
@@ -1,64 +1,7 @@
1
- import { type ReactNode } from 'react';
2
- import { Text, View, type ViewProps, type TextProps } from 'react-native';
3
- import { type IFormProps, type IFormFieldProps } from '@cdx-ui/primitives';
4
- import { type IconProps } from '../Icon';
1
+ import React from 'react';
2
+ import { View } from 'react-native';
5
3
  import { type BaseFormRootProps } from './FormRoot';
6
- export interface FormProps extends BaseFormRootProps, IFormProps {
7
- className?: string;
8
- children?: ReactNode;
4
+ export interface FormProps extends BaseFormRootProps {
9
5
  }
10
- declare const FormRoot: import("react").ForwardRefExoticComponent<FormProps & import("react").RefAttributes<View>>;
11
- /**
12
- * Field wrapper + context. For **initial focus**, pass `autoFocus` on `Input.Field` (not here).
13
- */
14
- export interface FormFieldProps extends Omit<ViewProps, 'id' | 'name'>, IFormFieldProps {
15
- className?: string;
16
- children?: ReactNode;
17
- size?: 'default' | 'small';
18
- }
19
- declare const FormField: import("react").ForwardRefExoticComponent<FormFieldProps & import("react").RefAttributes<View>>;
20
- export interface FormLabelProps extends ViewProps {
21
- className?: string;
22
- children?: ReactNode;
23
- /** @platform web — passed to `<label htmlFor>`; defaults to the field input id. */
24
- htmlFor?: string;
25
- }
26
- declare const FormLabel: import("react").ForwardRefExoticComponent<FormLabelProps & import("react").RefAttributes<View>>;
27
- export interface FormHelperProps extends ViewProps {
28
- className?: string;
29
- children?: ReactNode;
30
- }
31
- declare const FormHelper: import("react").ForwardRefExoticComponent<FormHelperProps & import("react").RefAttributes<View>>;
32
- export interface FormHelperTextProps extends TextProps {
33
- className?: string;
34
- children?: ReactNode;
35
- }
36
- declare const FormHelperText: import("react").ForwardRefExoticComponent<FormHelperTextProps & import("react").RefAttributes<Text>>;
37
- export interface FormErrorProps extends ViewProps {
38
- className?: string;
39
- children?: ReactNode;
40
- }
41
- declare const FormError: import("react").ForwardRefExoticComponent<FormErrorProps & import("react").RefAttributes<View>>;
42
- export interface FormErrorTextProps extends TextProps {
43
- className?: string;
44
- children?: ReactNode;
45
- }
46
- declare const FormErrorText: import("react").ForwardRefExoticComponent<FormErrorTextProps & import("react").RefAttributes<Text>>;
47
- export interface FormErrorIconProps extends Omit<IconProps, 'children'> {
48
- }
49
- declare const FormErrorIcon: {
50
- ({ className, style, as, ...props }: FormErrorIconProps): import("react/jsx-runtime").JSX.Element;
51
- displayName: string;
52
- };
53
- type FormCompoundComponent = typeof FormRoot & {
54
- Field: typeof FormField;
55
- Label: typeof FormLabel;
56
- Helper: typeof FormHelper;
57
- HelperText: typeof FormHelperText;
58
- Error: typeof FormError;
59
- ErrorText: typeof FormErrorText;
60
- ErrorIcon: typeof FormErrorIcon;
61
- };
62
- export declare const Form: FormCompoundComponent;
63
- export {};
6
+ export declare const Form: React.ForwardRefExoticComponent<FormProps & React.RefAttributes<View>>;
64
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAC1E,OAAO,EAAc,KAAK,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAEvF,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC;AA8ClE,MAAM,WAAW,SAAU,SAAQ,iBAAiB,EAAE,UAAU;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,QAAA,MAAM,QAAQ,4FAQZ,CAAC;AAQH;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,SAAS,EAAE,IAAI,GAAG,MAAM,CAAC,EAAE,eAAe;IACrF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,IAAI,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;CAC5B;AAED,QAAA,MAAM,SAAS,iGAgBd,CAAC;AAQF,MAAM,WAAW,cAAe,SAAQ,SAAS;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,mFAAmF;IACnF,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAID,QAAA,MAAM,SAAS,iGAsBd,CAAC;AAQF,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,QAAA,MAAM,UAAU,kGAUf,CAAC;AAQF,MAAM,WAAW,mBAAoB,SAAQ,SAAS;IACpD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,QAAA,MAAM,cAAc,sGAWnB,CAAC;AAQF,MAAM,WAAW,cAAe,SAAQ,SAAS;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,QAAA,MAAM,SAAS,iGAUd,CAAC;AAQF,MAAM,WAAW,kBAAmB,SAAQ,SAAS;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,QAAA,MAAM,aAAa,qGAWlB,CAAC;AAQF,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;CAAG;AAE1E,QAAA,MAAM,aAAa;yCAAwC,kBAAkB;;CAK5E,CAAC;AAQF,KAAK,qBAAqB,GAAG,OAAO,QAAQ,GAAG;IAC7C,KAAK,EAAE,OAAO,SAAS,CAAC;IACxB,KAAK,EAAE,OAAO,SAAS,CAAC;IACxB,MAAM,EAAE,OAAO,UAAU,CAAC;IAC1B,UAAU,EAAE,OAAO,cAAc,CAAC;IAClC,KAAK,EAAE,OAAO,SAAS,CAAC;IACxB,SAAS,EAAE,OAAO,aAAa,CAAC;IAChC,SAAS,EAAE,OAAO,aAAa,CAAC;CACjC,CAAC;AAEF,eAAO,MAAM,IAAI,EAQX,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGpC,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAelE,MAAM,WAAW,SAAU,SAAQ,iBAAiB;CAAG;AAkBvD,eAAO,MAAM,IAAI,wEAAW,CAAC"}
@@ -1,22 +1,2 @@
1
- import { type VariantProps } from 'class-variance-authority';
2
1
  export declare const formRootVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
3
- export declare const formFieldVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
4
- export declare const formLabelVariants: (props?: ({
5
- size?: "small" | "default" | null | undefined;
6
- } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
- export declare const formHelperVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
8
- export declare const formHelperTextVariants: (props?: ({
9
- size?: "small" | "default" | null | undefined;
10
- } & import("class-variance-authority/types").ClassProp) | undefined) => string;
11
- export declare const formErrorVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
12
- export declare const formErrorTextVariants: (props?: ({
13
- size?: "small" | "default" | null | undefined;
14
- } & import("class-variance-authority/types").ClassProp) | undefined) => string;
15
- export declare const formErrorIconVariants: (props?: ({
16
- size?: "small" | "default" | null | undefined;
17
- } & import("class-variance-authority/types").ClassProp) | undefined) => string;
18
- export type FormLabelVariantProps = VariantProps<typeof formLabelVariants>;
19
- export type FormHelperTextVariantProps = VariantProps<typeof formHelperTextVariants>;
20
- export type FormErrorTextVariantProps = VariantProps<typeof formErrorTextVariants>;
21
- export type FormErrorIconVariantProps = VariantProps<typeof formErrorIconVariants>;
22
2
  //# sourceMappingURL=styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAOlE,eAAO,MAAM,gBAAgB,oFAA0B,CAAC;AAExD,eAAO,MAAM,iBAAiB,oFAAoE,CAAC;AAEnG,eAAO,MAAM,iBAAiB;;8EAkB7B,CAAC;AAEF,eAAO,MAAM,kBAAkB,oFAAiC,CAAC;AAEjE,eAAO,MAAM,sBAAsB;;8EAUjC,CAAC;AAEH,eAAO,MAAM,iBAAiB,oFAAuC,CAAC;AAEtE,eAAO,MAAM,qBAAqB;;8EAUhC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;8EAUhC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,YAAY,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC3E,MAAM,MAAM,0BAA0B,GAAG,YAAY,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACrF,MAAM,MAAM,yBAAyB,GAAG,YAAY,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACnF,MAAM,MAAM,yBAAyB,GAAG,YAAY,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,oFAA0B,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { View, type ViewProps } from 'react-native';
2
+ import { type IProgressProps } from '@cdx-ui/primitives';
3
+ import { type ProgressBarTrackVariantProps } from './styles';
4
+ export interface ProgressBarProps extends IProgressProps, ProgressBarTrackVariantProps {
5
+ readonly className?: string;
6
+ }
7
+ export interface ProgressBarIndicatorProps extends ViewProps {
8
+ readonly className?: string;
9
+ }
10
+ declare const ProgressBarRoot: import("react").ForwardRefExoticComponent<ProgressBarProps & import("react").RefAttributes<View>>;
11
+ declare const ProgressBarIndicator: import("react").ForwardRefExoticComponent<ProgressBarIndicatorProps & import("react").RefAttributes<View>>;
12
+ type ProgressBarCompoundComponent = typeof ProgressBarRoot & {
13
+ Indicator: typeof ProgressBarIndicator;
14
+ };
15
+ export declare const ProgressBar: ProgressBarCompoundComponent;
16
+ export {};
17
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ProgressBar/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAkB,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzE,OAAO,EAGL,KAAK,4BAA4B,EAClC,MAAM,UAAU,CAAC;AAOlB,MAAM,WAAW,gBAAiB,SAAQ,cAAc,EAAE,4BAA4B;IACpF,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,yBAA0B,SAAQ,SAAS;IAC1D,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,QAAA,MAAM,eAAe,mGAMpB,CAAC;AAIF,QAAA,MAAM,oBAAoB,4GASzB,CAAC;AAIF,KAAK,4BAA4B,GAAG,OAAO,eAAe,GAAG;IAC3D,SAAS,EAAE,OAAO,oBAAoB,CAAC;CACxC,CAAC;AAEF,eAAO,MAAM,WAAW,EAElB,4BAA4B,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { type VariantProps } from 'class-variance-authority';
2
+ export declare const progressBarTrackVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
3
+ export declare const progressBarIndicatorVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
4
+ export type ProgressBarTrackVariantProps = VariantProps<typeof progressBarTrackVariants>;
5
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/ProgressBar/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,eAAO,MAAM,wBAAwB,oFAEnC,CAAC;AAEH,eAAO,MAAM,4BAA4B,oFAAiD,CAAC;AAE3F,MAAM,MAAM,4BAA4B,GAAG,YAAY,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/ProgressSegmented/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,eAAO,MAAM,yBAAyB,oFAAiC,CAAC;AAExE,eAAO,MAAM,eAAe;;8EAW1B,CAAC;AAEH,MAAM,MAAM,yBAAyB,GAAG,YAAY,CAAC,OAAO,yBAAyB,CAAC,CAAC;AACvF,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,OAAO,eAAe,CAAC,CAAC"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/ProgressSegmented/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,eAAO,MAAM,yBAAyB,oFAAyD,CAAC;AAEhG,eAAO,MAAM,eAAe;;8EAY1B,CAAC;AAEH,MAAM,MAAM,yBAAyB,GAAG,YAAY,CAAC,OAAO,yBAAyB,CAAC,CAAC;AACvF,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,OAAO,eAAe,CAAC,CAAC"}
@@ -7,10 +7,12 @@ 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';
13
14
  export * from './Link';
15
+ export * from './ProgressBar';
14
16
  export * from './ProgressSegmented';
15
17
  export * from './Select';
16
18
  export * from './VirtualizedList';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,qBAAqB,CAAC;AACpC,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACzC,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACzC,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cdx-ui/components",
3
- "version": "0.0.1-alpha.34",
3
+ "version": "0.0.1-alpha.36",
4
4
  "main": "lib/commonjs/index.js",
5
5
  "module": "lib/module/index.js",
6
6
  "react-native": "src/index.ts",
@@ -66,9 +66,9 @@
66
66
  "@gorhom/bottom-sheet": "^5.2.6",
67
67
  "class-variance-authority": "^0.7.1",
68
68
  "uniwind": "1.6.1",
69
- "@cdx-ui/primitives": "0.0.1-alpha.34",
70
- "@cdx-ui/utils": "0.0.1-alpha.34",
71
- "@cdx-ui/icons": "0.0.1-alpha.34"
69
+ "@cdx-ui/primitives": "0.0.1-alpha.36",
70
+ "@cdx-ui/utils": "0.0.1-alpha.36",
71
+ "@cdx-ui/icons": "0.0.1-alpha.36"
72
72
  },
73
73
  "devDependencies": {
74
74
  "@types/react": "*",
@@ -2,8 +2,8 @@ import { forwardRef } from 'react';
2
2
  import { Text, TextProps, type GestureResponderEvent } from 'react-native';
3
3
  import { composeEventHandlers, useFormControlContext } from '@cdx-ui/utils';
4
4
 
5
- export type FormLabelRootProps = TextProps & {
6
- /** @platform web — forwarded on web; ignored here (see `FormLabelRoot.web`). */
5
+ export type BaseFieldLabelProps = TextProps & {
6
+ /** @platform web — forwarded on web; ignored here (see `FieldLabelRoot.web`). */
7
7
  htmlFor?: string;
8
8
  /** Optional; composed with label tap-to-focus on native. */
9
9
  onPress?: ((event: GestureResponderEvent) => void) | null;
@@ -13,7 +13,7 @@ export type FormLabelRootProps = TextProps & {
13
13
  * Native: `Text` label row — tap focuses the field input via form context
14
14
  * (parity with `<label htmlFor>` on web).
15
15
  */
16
- export const FormLabelRoot = forwardRef<Text, FormLabelRootProps>(
16
+ export const BaseFieldLabel = forwardRef<Text, BaseFieldLabelProps>(
17
17
  ({ htmlFor: _omitHtmlFor, onPress, ...props }, ref) => {
18
18
  void _omitHtmlFor;
19
19
 
@@ -30,4 +30,4 @@ export const FormLabelRoot = forwardRef<Text, FormLabelRootProps>(
30
30
  },
31
31
  );
32
32
 
33
- FormLabelRoot.displayName = 'FormLabelRoot';
33
+ BaseFieldLabel.displayName = 'BaseFieldLabel';
@@ -0,0 +1,25 @@
1
+ import React, { forwardRef, type ReactNode } from 'react';
2
+ import type { ViewProps } from 'react-native';
3
+
4
+ // TODO: Why does dataSet need to be decomposed into individual data attributes?
5
+
6
+ export type BaseFieldLabelProps = ViewProps & {
7
+ htmlFor?: string;
8
+ children?: ReactNode;
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 BaseFieldLabel = forwardRef<HTMLLabelElement, BaseFieldLabelProps>((props, ref) => {
15
+ return (
16
+ <label
17
+ ref={ref}
18
+ {...(props as React.LabelHTMLAttributes<HTMLLabelElement>)}
19
+ data-invalid={props.dataSet?.invalid}
20
+ data-required={props.dataSet?.required}
21
+ />
22
+ );
23
+ });
24
+
25
+ BaseFieldLabel.displayName = 'BaseFieldLabel';