@cdx-ui/components 0.0.1-beta.65 → 0.0.1-beta.66

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 (242) hide show
  1. package/lib/commonjs/components/AlertDialog/index.js +12 -10
  2. package/lib/commonjs/components/AlertDialog/index.js.map +1 -1
  3. package/lib/commonjs/components/Avatar/index.js +125 -25
  4. package/lib/commonjs/components/Avatar/index.js.map +1 -1
  5. package/lib/commonjs/components/Button/index.js +127 -28
  6. package/lib/commonjs/components/Button/index.js.map +1 -1
  7. package/lib/commonjs/components/Button/styles.js +9 -3
  8. package/lib/commonjs/components/Button/styles.js.map +1 -1
  9. package/lib/commonjs/components/CLAUDE.md +115 -11
  10. package/lib/commonjs/components/Checkbox/index.js +69 -22
  11. package/lib/commonjs/components/Checkbox/index.js.map +1 -1
  12. package/lib/commonjs/components/Checkbox/styles.js +1 -1
  13. package/lib/commonjs/components/Checkbox/styles.js.map +1 -1
  14. package/lib/commonjs/components/Chip/index.js +44 -36
  15. package/lib/commonjs/components/Chip/index.js.map +1 -1
  16. package/lib/commonjs/components/Chip/styles.js +6 -35
  17. package/lib/commonjs/components/Chip/styles.js.map +1 -1
  18. package/lib/commonjs/components/Dialog/index.js +92 -72
  19. package/lib/commonjs/components/Dialog/index.js.map +1 -1
  20. package/lib/commonjs/components/Field/index.js +70 -26
  21. package/lib/commonjs/components/Field/index.js.map +1 -1
  22. package/lib/commonjs/components/Form/index.js +5 -12
  23. package/lib/commonjs/components/Form/index.js.map +1 -1
  24. package/lib/commonjs/components/IconButton/index.js +5 -33
  25. package/lib/commonjs/components/IconButton/index.js.map +1 -1
  26. package/lib/commonjs/components/Input/index.js +50 -20
  27. package/lib/commonjs/components/Input/index.js.map +1 -1
  28. package/lib/commonjs/components/Link/index.js +14 -7
  29. package/lib/commonjs/components/Link/index.js.map +1 -1
  30. package/lib/commonjs/components/ListItem/index.js +129 -54
  31. package/lib/commonjs/components/ListItem/index.js.map +1 -1
  32. package/lib/commonjs/components/OtpInput/index.js +94 -28
  33. package/lib/commonjs/components/OtpInput/index.js.map +1 -1
  34. package/lib/commonjs/components/ProgressBar/index.js +8 -13
  35. package/lib/commonjs/components/ProgressBar/index.js.map +1 -1
  36. package/lib/commonjs/components/Radio/index.js +51 -53
  37. package/lib/commonjs/components/Radio/index.js.map +1 -1
  38. package/lib/commonjs/components/Select/index.js +112 -46
  39. package/lib/commonjs/components/Select/index.js.map +1 -1
  40. package/lib/commonjs/components/Select/styles.js +2 -2
  41. package/lib/commonjs/components/Select/styles.js.map +1 -1
  42. package/lib/commonjs/components/Switch/BaseSwitch.js +23 -13
  43. package/lib/commonjs/components/Switch/BaseSwitch.js.map +1 -1
  44. package/lib/commonjs/components/Switch/BaseSwitch.web.js +25 -21
  45. package/lib/commonjs/components/Switch/BaseSwitch.web.js.map +1 -1
  46. package/lib/commonjs/components/Switch/index.js +34 -3
  47. package/lib/commonjs/components/Switch/index.js.map +1 -1
  48. package/lib/commonjs/components/Tile/index.js +150 -77
  49. package/lib/commonjs/components/Tile/index.js.map +1 -1
  50. package/lib/commonjs/figma/Chip.figma.js +2 -2
  51. package/lib/commonjs/figma/Chip.figma.js.map +1 -1
  52. package/lib/commonjs/utils/positionToDataIcon.js +41 -0
  53. package/lib/commonjs/utils/positionToDataIcon.js.map +1 -0
  54. package/lib/module/components/AlertDialog/index.js +13 -11
  55. package/lib/module/components/AlertDialog/index.js.map +1 -1
  56. package/lib/module/components/Avatar/index.js +128 -28
  57. package/lib/module/components/Avatar/index.js.map +1 -1
  58. package/lib/module/components/Button/index.js +130 -32
  59. package/lib/module/components/Button/index.js.map +1 -1
  60. package/lib/module/components/Button/styles.js +8 -2
  61. package/lib/module/components/Button/styles.js.map +1 -1
  62. package/lib/module/components/CLAUDE.md +115 -11
  63. package/lib/module/components/Checkbox/index.js +72 -25
  64. package/lib/module/components/Checkbox/index.js.map +1 -1
  65. package/lib/module/components/Checkbox/styles.js +1 -1
  66. package/lib/module/components/Checkbox/styles.js.map +1 -1
  67. package/lib/module/components/Chip/index.js +47 -39
  68. package/lib/module/components/Chip/index.js.map +1 -1
  69. package/lib/module/components/Chip/styles.js +6 -35
  70. package/lib/module/components/Chip/styles.js.map +1 -1
  71. package/lib/module/components/Dialog/index.js +96 -76
  72. package/lib/module/components/Dialog/index.js.map +1 -1
  73. package/lib/module/components/Field/index.js +74 -31
  74. package/lib/module/components/Field/index.js.map +1 -1
  75. package/lib/module/components/Form/index.js +7 -14
  76. package/lib/module/components/Form/index.js.map +1 -1
  77. package/lib/module/components/IconButton/index.js +6 -34
  78. package/lib/module/components/IconButton/index.js.map +1 -1
  79. package/lib/module/components/Input/index.js +53 -23
  80. package/lib/module/components/Input/index.js.map +1 -1
  81. package/lib/module/components/Link/index.js +16 -8
  82. package/lib/module/components/Link/index.js.map +1 -1
  83. package/lib/module/components/ListItem/index.js +134 -59
  84. package/lib/module/components/ListItem/index.js.map +1 -1
  85. package/lib/module/components/OtpInput/index.js +94 -28
  86. package/lib/module/components/OtpInput/index.js.map +1 -1
  87. package/lib/module/components/ProgressBar/index.js +9 -14
  88. package/lib/module/components/ProgressBar/index.js.map +1 -1
  89. package/lib/module/components/Radio/index.js +54 -57
  90. package/lib/module/components/Radio/index.js.map +1 -1
  91. package/lib/module/components/Select/index.js +118 -52
  92. package/lib/module/components/Select/index.js.map +1 -1
  93. package/lib/module/components/Select/styles.js +2 -2
  94. package/lib/module/components/Select/styles.js.map +1 -1
  95. package/lib/module/components/Switch/BaseSwitch.js +24 -14
  96. package/lib/module/components/Switch/BaseSwitch.js.map +1 -1
  97. package/lib/module/components/Switch/BaseSwitch.web.js +26 -22
  98. package/lib/module/components/Switch/BaseSwitch.web.js.map +1 -1
  99. package/lib/module/components/Switch/index.js +35 -4
  100. package/lib/module/components/Switch/index.js.map +1 -1
  101. package/lib/module/components/Tile/index.js +155 -83
  102. package/lib/module/components/Tile/index.js.map +1 -1
  103. package/lib/module/figma/Chip.figma.js +2 -2
  104. package/lib/module/figma/Chip.figma.js.map +1 -1
  105. package/lib/module/utils/positionToDataIcon.js +38 -0
  106. package/lib/module/utils/positionToDataIcon.js.map +1 -0
  107. package/lib/typescript/components/AlertDialog/index.d.ts.map +1 -1
  108. package/lib/typescript/components/Avatar/index.d.ts +6 -2
  109. package/lib/typescript/components/Avatar/index.d.ts.map +1 -1
  110. package/lib/typescript/components/Button/index.d.ts +31 -8
  111. package/lib/typescript/components/Button/index.d.ts.map +1 -1
  112. package/lib/typescript/components/Button/styles.d.ts +2 -1
  113. package/lib/typescript/components/Button/styles.d.ts.map +1 -1
  114. package/lib/typescript/components/Checkbox/index.d.ts +3 -1
  115. package/lib/typescript/components/Checkbox/index.d.ts.map +1 -1
  116. package/lib/typescript/components/Chip/index.d.ts +19 -9
  117. package/lib/typescript/components/Chip/index.d.ts.map +1 -1
  118. package/lib/typescript/components/Chip/styles.d.ts +0 -1
  119. package/lib/typescript/components/Chip/styles.d.ts.map +1 -1
  120. package/lib/typescript/components/Dialog/index.d.ts +12 -6
  121. package/lib/typescript/components/Dialog/index.d.ts.map +1 -1
  122. package/lib/typescript/components/Dialog/styles.d.ts +1 -1
  123. package/lib/typescript/components/Field/index.d.ts +14 -7
  124. package/lib/typescript/components/Field/index.d.ts.map +1 -1
  125. package/lib/typescript/components/Form/index.d.ts +4 -4
  126. package/lib/typescript/components/Form/index.d.ts.map +1 -1
  127. package/lib/typescript/components/IconButton/index.d.ts.map +1 -1
  128. package/lib/typescript/components/Input/index.d.ts +11 -3
  129. package/lib/typescript/components/Input/index.d.ts.map +1 -1
  130. package/lib/typescript/components/Link/index.d.ts +2 -0
  131. package/lib/typescript/components/Link/index.d.ts.map +1 -1
  132. package/lib/typescript/components/ListItem/index.d.ts +28 -6
  133. package/lib/typescript/components/ListItem/index.d.ts.map +1 -1
  134. package/lib/typescript/components/OtpInput/index.d.ts +1 -1
  135. package/lib/typescript/components/OtpInput/index.d.ts.map +1 -1
  136. package/lib/typescript/components/ProgressBar/index.d.ts +4 -4
  137. package/lib/typescript/components/ProgressBar/index.d.ts.map +1 -1
  138. package/lib/typescript/components/Radio/index.d.ts +4 -0
  139. package/lib/typescript/components/Radio/index.d.ts.map +1 -1
  140. package/lib/typescript/components/Select/index.d.ts +35 -2
  141. package/lib/typescript/components/Select/index.d.ts.map +1 -1
  142. package/lib/typescript/components/Select/styles.d.ts.map +1 -1
  143. package/lib/typescript/components/Switch/BaseSwitch.d.ts +12 -5
  144. package/lib/typescript/components/Switch/BaseSwitch.d.ts.map +1 -1
  145. package/lib/typescript/components/Switch/BaseSwitch.web.d.ts +11 -5
  146. package/lib/typescript/components/Switch/BaseSwitch.web.d.ts.map +1 -1
  147. package/lib/typescript/components/Switch/index.d.ts +5 -1
  148. package/lib/typescript/components/Switch/index.d.ts.map +1 -1
  149. package/lib/typescript/components/Tile/index.d.ts +8 -2
  150. package/lib/typescript/components/Tile/index.d.ts.map +1 -1
  151. package/lib/typescript/utils/positionToDataIcon.d.ts +29 -0
  152. package/lib/typescript/utils/positionToDataIcon.d.ts.map +1 -0
  153. package/package.json +5 -5
  154. package/src/components/AlertDialog/index.tsx +13 -14
  155. package/src/components/Avatar/index.tsx +134 -44
  156. package/src/components/Button/index.tsx +216 -44
  157. package/src/components/Button/styles.ts +50 -38
  158. package/src/components/CLAUDE.md +115 -11
  159. package/src/components/Checkbox/index.tsx +93 -32
  160. package/src/components/Checkbox/styles.ts +1 -1
  161. package/src/components/Chip/index.tsx +88 -61
  162. package/src/components/Chip/styles.ts +6 -18
  163. package/src/components/Dialog/index.tsx +139 -99
  164. package/src/components/Field/index.tsx +113 -49
  165. package/src/components/Form/index.tsx +18 -14
  166. package/src/components/IconButton/index.tsx +7 -31
  167. package/src/components/Input/index.tsx +75 -32
  168. package/src/components/Link/index.tsx +38 -12
  169. package/src/components/ListItem/index.tsx +158 -73
  170. package/src/components/OtpInput/index.tsx +126 -43
  171. package/src/components/ProgressBar/index.tsx +11 -16
  172. package/src/components/Radio/index.tsx +76 -54
  173. package/src/components/Select/index.tsx +174 -59
  174. package/src/components/Select/styles.ts +1 -2
  175. package/src/components/Switch/BaseSwitch.tsx +38 -16
  176. package/src/components/Switch/BaseSwitch.web.tsx +28 -35
  177. package/src/components/Switch/index.tsx +51 -4
  178. package/src/components/Tile/index.tsx +145 -94
  179. package/src/utils/positionToDataIcon.ts +34 -0
  180. package/lib/commonjs/components/Field/FieldLabel.js +0 -33
  181. package/lib/commonjs/components/Field/FieldLabel.js.map +0 -1
  182. package/lib/commonjs/components/Field/FieldLabel.web.js +0 -22
  183. package/lib/commonjs/components/Field/FieldLabel.web.js.map +0 -1
  184. package/lib/commonjs/components/Form/FormRoot.js +0 -25
  185. package/lib/commonjs/components/Form/FormRoot.js.map +0 -1
  186. package/lib/commonjs/components/Form/FormRoot.web.js +0 -17
  187. package/lib/commonjs/components/Form/FormRoot.web.js.map +0 -1
  188. package/lib/commonjs/components/Input/BaseInput.android.js +0 -20
  189. package/lib/commonjs/components/Input/BaseInput.android.js.map +0 -1
  190. package/lib/commonjs/components/Input/BaseInput.js +0 -13
  191. package/lib/commonjs/components/Input/BaseInput.js.map +0 -1
  192. package/lib/commonjs/components/Input/BaseInput.web.js +0 -50
  193. package/lib/commonjs/components/Input/BaseInput.web.js.map +0 -1
  194. package/lib/commonjs/components/Select/SelectTriggerHost.js +0 -10
  195. package/lib/commonjs/components/Select/SelectTriggerHost.js.map +0 -1
  196. package/lib/commonjs/components/Select/SelectTriggerHost.web.js +0 -102
  197. package/lib/commonjs/components/Select/SelectTriggerHost.web.js.map +0 -1
  198. package/lib/module/components/Field/FieldLabel.js +0 -29
  199. package/lib/module/components/Field/FieldLabel.js.map +0 -1
  200. package/lib/module/components/Field/FieldLabel.web.js +0 -17
  201. package/lib/module/components/Field/FieldLabel.web.js.map +0 -1
  202. package/lib/module/components/Form/FormRoot.js +0 -21
  203. package/lib/module/components/Form/FormRoot.js.map +0 -1
  204. package/lib/module/components/Form/FormRoot.web.js +0 -12
  205. package/lib/module/components/Form/FormRoot.web.js.map +0 -1
  206. package/lib/module/components/Input/BaseInput.android.js +0 -16
  207. package/lib/module/components/Input/BaseInput.android.js.map +0 -1
  208. package/lib/module/components/Input/BaseInput.js +0 -4
  209. package/lib/module/components/Input/BaseInput.js.map +0 -1
  210. package/lib/module/components/Input/BaseInput.web.js +0 -45
  211. package/lib/module/components/Input/BaseInput.web.js.map +0 -1
  212. package/lib/module/components/Select/SelectTriggerHost.js +0 -7
  213. package/lib/module/components/Select/SelectTriggerHost.js.map +0 -1
  214. package/lib/module/components/Select/SelectTriggerHost.web.js +0 -97
  215. package/lib/module/components/Select/SelectTriggerHost.web.js.map +0 -1
  216. package/lib/typescript/components/Field/FieldLabel.d.ts +0 -18
  217. package/lib/typescript/components/Field/FieldLabel.d.ts.map +0 -1
  218. package/lib/typescript/components/Field/FieldLabel.web.d.ts +0 -16
  219. package/lib/typescript/components/Field/FieldLabel.web.d.ts.map +0 -1
  220. package/lib/typescript/components/Form/FormRoot.d.ts +0 -14
  221. package/lib/typescript/components/Form/FormRoot.d.ts.map +0 -1
  222. package/lib/typescript/components/Form/FormRoot.web.d.ts +0 -10
  223. package/lib/typescript/components/Form/FormRoot.web.d.ts.map +0 -1
  224. package/lib/typescript/components/Input/BaseInput.android.d.ts +0 -3
  225. package/lib/typescript/components/Input/BaseInput.android.d.ts.map +0 -1
  226. package/lib/typescript/components/Input/BaseInput.d.ts +0 -2
  227. package/lib/typescript/components/Input/BaseInput.d.ts.map +0 -1
  228. package/lib/typescript/components/Input/BaseInput.web.d.ts +0 -3
  229. package/lib/typescript/components/Input/BaseInput.web.d.ts.map +0 -1
  230. package/lib/typescript/components/Select/SelectTriggerHost.d.ts +0 -3
  231. package/lib/typescript/components/Select/SelectTriggerHost.d.ts.map +0 -1
  232. package/lib/typescript/components/Select/SelectTriggerHost.web.d.ts +0 -16
  233. package/lib/typescript/components/Select/SelectTriggerHost.web.d.ts.map +0 -1
  234. package/src/components/Field/FieldLabel.tsx +0 -33
  235. package/src/components/Field/FieldLabel.web.tsx +0 -25
  236. package/src/components/Form/FormRoot.tsx +0 -20
  237. package/src/components/Form/FormRoot.web.tsx +0 -12
  238. package/src/components/Input/BaseInput.android.tsx +0 -13
  239. package/src/components/Input/BaseInput.tsx +0 -1
  240. package/src/components/Input/BaseInput.web.tsx +0 -41
  241. package/src/components/Select/SelectTriggerHost.tsx +0 -4
  242. package/src/components/Select/SelectTriggerHost.web.tsx +0 -143
@@ -1,6 +1,7 @@
1
1
  import { forwardRef } from 'react';
2
2
  import { Pressable, View } from 'react-native';
3
- import { cn } from '@cdx-ui/utils';
3
+ import { mergeDataAttributes, type IUseSwitchReturn } from '@cdx-ui/primitives';
4
+ import { cn, composeEventHandlers } from '@cdx-ui/utils';
4
5
  import {
5
6
  switchThumbVariants,
6
7
  switchTrackVariants,
@@ -9,58 +10,50 @@ import {
9
10
  } from './styles';
10
11
 
11
12
  export interface BaseSwitchProps {
12
- value?: boolean;
13
- onValueChange?: (value: boolean) => void;
14
- disabled?: boolean;
15
- states?: Record<string, boolean | undefined>;
16
- dataSet?: Record<string, string>;
13
+ switchState: IUseSwitchReturn;
17
14
  className?: string;
18
15
  size?: SwitchVariantProps['size'];
16
+ accessibilityLabel?: string;
19
17
  onFocus?: () => void;
20
18
  onBlur?: () => void;
21
19
  }
22
20
 
21
+ /**
22
+ * Web host for `Switch`. Renders a custom `Pressable` + `View` toggle (preserving
23
+ * the existing visual contract) wired to the resolved state in `switchState`.
24
+ *
25
+ * `role="switch"` + `aria-checked` + keyboard semantics satisfy the same a11y
26
+ * contract that an `<input type="checkbox" role="switch">` would provide, without
27
+ * the visual rework an input swap would require (see spike notes in PR).
28
+ */
23
29
  export const BaseSwitch = forwardRef<View, BaseSwitchProps>(
24
- (
25
- {
26
- value,
27
- onValueChange,
28
- disabled,
29
- states,
30
- dataSet,
31
- className,
32
- size = 'md',
33
- onFocus,
34
- onBlur,
35
- ...props
36
- },
37
- ref,
38
- ) => {
39
- const isChecked = value ?? states?.checked ?? false;
40
- const isDisabled = disabled ?? states?.disabled ?? false;
41
- const isInvalid = states?.invalid ?? false;
42
-
30
+ ({ switchState, className, size = 'md', accessibilityLabel, onFocus, onBlur, ...props }, ref) => {
43
31
  return (
44
32
  <Pressable
45
33
  ref={ref}
46
34
  role="switch"
47
- aria-checked={isChecked}
48
- aria-disabled={isDisabled}
49
- disabled={isDisabled}
50
- onPress={() => onValueChange?.(!isChecked)}
51
- onFocus={onFocus}
52
- onBlur={onBlur}
35
+ aria-checked={switchState.checked}
36
+ aria-disabled={switchState.isDisabled}
37
+ accessibilityLabel={accessibilityLabel}
38
+ disabled={switchState.isDisabled}
39
+ onPress={() => switchState.setChecked(!switchState.checked)}
40
+ onFocus={composeEventHandlers(onFocus, switchState.focusProps.onFocus as () => void)}
41
+ onBlur={composeEventHandlers(onBlur, switchState.focusProps.onBlur as () => void)}
42
+ onHoverIn={switchState.hoverProps.onHoverIn as () => void}
43
+ onHoverOut={switchState.hoverProps.onHoverOut as () => void}
53
44
  tabIndex={0}
54
45
  className={cn(
55
46
  switchTrackVariants({ size }),
56
- switchWebTrackColorVariants({ isChecked, isInvalid }),
47
+ switchWebTrackColorVariants({
48
+ isChecked: switchState.checked,
49
+ isInvalid: switchState.isInvalid,
50
+ }),
57
51
  className,
58
52
  )}
59
- // @ts-expect-error dataSet is a RNW/Uniwind prop not in Pressable types
60
- dataSet={dataSet}
61
53
  {...props}
54
+ {...mergeDataAttributes(props, switchState.dataAttrs)}
62
55
  >
63
- <View className={cn(switchThumbVariants({ size, isChecked }))} />
56
+ <View className={cn(switchThumbVariants({ size, isChecked: switchState.checked }))} />
64
57
  </Pressable>
65
58
  );
66
59
  },
@@ -1,11 +1,58 @@
1
- import { type ISwitchProps, createSwitch } from '@cdx-ui/primitives';
1
+ import { forwardRef } from 'react';
2
+ import type { Switch as RNSwitch, View } from 'react-native';
3
+ import {
4
+ dataAttributes,
5
+ mergeDataAttributes,
6
+ useSwitch,
7
+ type ISwitchProps,
8
+ } from '@cdx-ui/primitives';
2
9
  import { BaseSwitch } from './BaseSwitch';
3
10
  import type { SwitchVariantProps } from './styles';
4
11
 
5
- const SwitchPrimitive = createSwitch({ Root: BaseSwitch });
6
-
7
12
  export interface SwitchProps extends ISwitchProps, SwitchVariantProps {
8
13
  className?: string;
14
+ accessibilityLabel?: string;
15
+ onFocus?: () => void;
16
+ onBlur?: () => void;
9
17
  }
10
18
 
11
- export const Switch = SwitchPrimitive;
19
+ export const Switch = forwardRef<RNSwitch | View, SwitchProps>(
20
+ (
21
+ {
22
+ className,
23
+ size,
24
+ value,
25
+ isChecked,
26
+ defaultValue,
27
+ disabled,
28
+ isDisabled,
29
+ isInvalid,
30
+ onValueChange,
31
+ ...props
32
+ },
33
+ ref,
34
+ ) => {
35
+ const switchState = useSwitch({
36
+ value,
37
+ isChecked,
38
+ defaultValue,
39
+ disabled,
40
+ isDisabled,
41
+ isInvalid,
42
+ onValueChange,
43
+ });
44
+
45
+ return (
46
+ <BaseSwitch
47
+ ref={ref as never}
48
+ switchState={switchState}
49
+ className={className}
50
+ size={size}
51
+ {...props}
52
+ {...mergeDataAttributes(props, dataAttributes({ slot: 'switch' }))}
53
+ />
54
+ );
55
+ },
56
+ );
57
+
58
+ Switch.displayName = 'Switch';
@@ -1,19 +1,22 @@
1
- import { forwardRef, type ReactNode } from 'react';
2
- import { Pressable, Text, View, type TextProps, type ViewProps } from 'react-native';
1
+ import { forwardRef, useMemo, type ReactNode } from 'react';
2
+ import { Text, View, type TextProps, type ViewProps } from 'react-native';
3
3
  import {
4
- createTile,
4
+ Slot,
5
+ TileGroup as TileGroupPrimitive,
6
+ TileRoot as TileRootPrimitive,
7
+ dataAttributes,
8
+ mergeDataAttributes,
9
+ useTileContext,
5
10
  type ITileGroupMultipleProps,
6
11
  type ITileGroupSingleProps,
7
12
  type ITileIndicatorProps,
8
13
  type ITileLeadingSlotProps,
9
14
  type ITileProps,
10
15
  type ITileTrailingSlotProps,
11
- useTileContext,
12
16
  } from '@cdx-ui/primitives';
13
17
  import { Check } from '@cdx-ui/icons';
14
- import { dataAttributes } from '@cdx-ui/primitives';
15
- import { cn, useStyleContext, withStyleContext } from '@cdx-ui/utils';
16
- import { checkboxIndicatorVariants, checkboxIconVariants } from '../Checkbox/styles';
18
+ import { cn, ParentContext, useParentContext, useStyleContext } from '@cdx-ui/utils';
19
+ import { checkboxIconVariants, checkboxIndicatorVariants } from '../Checkbox/styles';
17
20
  import { Icon } from '../Icon';
18
21
  import { radioIndicatorVariants, radioInnerDotVariants } from '../Radio/styles';
19
22
  import {
@@ -32,9 +35,6 @@ import {
32
35
  const TILE_SCOPE = 'TILE';
33
36
  const TILE_GROUP_SCOPE = 'TILE_GROUP';
34
37
 
35
- const RootPressable = withStyleContext(Pressable, TILE_SCOPE);
36
- const GroupView = withStyleContext(View, TILE_GROUP_SCOPE);
37
-
38
38
  interface TileGroupStyleContext {
39
39
  shape?: TileVariantProps['shape'];
40
40
  }
@@ -47,17 +47,6 @@ const useTileGroupStyleContext = (): TileGroupStyleContext => {
47
47
  return ctx ?? {};
48
48
  };
49
49
 
50
- const TilePrimitive = createTile({
51
- Pressable: RootPressable,
52
- Group: GroupView,
53
- LeadingSlot: View,
54
- Content: View,
55
- Title: Text,
56
- Description: Text,
57
- Indicator: View,
58
- TrailingSlot: View,
59
- });
60
-
61
50
  // =============================================================================
62
51
  // TILE GROUP
63
52
  // =============================================================================
@@ -72,7 +61,7 @@ const TilePrimitive = createTile({
72
61
  * - `direction="column"` + `spacing="none"` — tight vertical stack (rows touch).
73
62
  * - `direction="row"` + `spacing="default"` — side-by-side horizontal layout.
74
63
  *
75
- * `shape` (when set) is propagated to child `Tile`s via `withStyleContext`, matching the
64
+ * `shape` (when set) is propagated to child `Tile`s via `ParentContext`, matching the
76
65
  * Avatar size-propagation pattern. A per-tile `shape` prop overrides the inherited value.
77
66
  */
78
67
  export interface TileGroupSingleProps extends ITileGroupSingleProps, TileGroupVariantProps {
@@ -88,17 +77,24 @@ export interface TileGroupMultipleProps extends ITileGroupMultipleProps, TileGro
88
77
  export type TileGroupProps = TileGroupSingleProps | TileGroupMultipleProps;
89
78
 
90
79
  const TileGroup = forwardRef<View, TileGroupProps>(
91
- ({ className, style, children, direction, spacing, shape, ...props }, ref) => (
92
- <TilePrimitive.Group
93
- ref={ref as never}
94
- className={cn(tileGroupVariants({ direction, spacing }), className)}
95
- style={style}
96
- context={{ shape }}
97
- {...props}
98
- >
99
- {children}
100
- </TilePrimitive.Group>
101
- ),
80
+ ({ className, style, children, direction, spacing, shape, ...props }, ref) => {
81
+ const parent = useParentContext();
82
+ const ctx = useMemo(() => ({ ...parent, [TILE_GROUP_SCOPE]: { shape } }), [parent, shape]);
83
+
84
+ return (
85
+ <ParentContext.Provider value={ctx}>
86
+ <TileGroupPrimitive
87
+ ref={ref}
88
+ className={cn(tileGroupVariants({ direction, spacing }), className)}
89
+ style={style}
90
+ {...(props as TileGroupProps)}
91
+ {...mergeDataAttributes(props, dataAttributes({ slot: 'tile-group' }))}
92
+ >
93
+ {children}
94
+ </TileGroupPrimitive>
95
+ </ParentContext.Provider>
96
+ );
97
+ },
102
98
  );
103
99
 
104
100
  TileGroup.displayName = 'Tile.Group';
@@ -112,19 +108,24 @@ export interface TileProps extends ITileProps, TileVariantProps {
112
108
  }
113
109
 
114
110
  const TileRoot = forwardRef<View, TileProps>(
115
- ({ shape: shapeProp, showSeparator, className, style, context, ...props }, ref) => {
111
+ ({ shape: shapeProp, showSeparator, className, style, ...props }, ref) => {
116
112
  const { shape: inheritedShape } = useTileGroupStyleContext();
117
113
  const shape = shapeProp ?? inheritedShape ?? 'card';
118
114
  const computedClassName = cn(tileRootVariants({ shape, showSeparator }), className);
119
115
 
116
+ const parent = useParentContext();
117
+ const ctx = useMemo(() => ({ ...parent, [TILE_SCOPE]: { shape } }), [parent, shape]);
118
+
120
119
  return (
121
- <TilePrimitive
122
- ref={ref as never}
123
- className={computedClassName}
124
- context={{ ...context, shape }}
125
- style={style}
126
- {...props}
127
- />
120
+ <ParentContext.Provider value={ctx}>
121
+ <TileRootPrimitive
122
+ ref={ref}
123
+ className={computedClassName}
124
+ style={style}
125
+ {...props}
126
+ {...mergeDataAttributes(props, dataAttributes({ slot: 'tile' }))}
127
+ />
128
+ </ParentContext.Provider>
128
129
  );
129
130
  },
130
131
  );
@@ -135,69 +136,104 @@ TileRoot.displayName = 'Tile';
135
136
  // SLOTS
136
137
  // =============================================================================
137
138
 
139
+ const leadingSlotStyle = { flexShrink: 0 as const };
140
+
138
141
  export interface TileLeadingSlotProps extends ITileLeadingSlotProps {
142
+ asChild?: boolean;
139
143
  className?: string;
140
144
  }
141
145
 
142
146
  const TileLeadingSlot = forwardRef<View, TileLeadingSlotProps>(
143
- ({ className, style, ...props }, ref) => (
144
- <TilePrimitive.LeadingSlot
145
- ref={ref as never}
146
- className={cn(tileLeadingSlotVariants(), className)}
147
- style={style}
148
- {...props}
149
- />
150
- ),
147
+ ({ asChild, className, style, 'aria-hidden': ariaHidden, ...props }, ref) => {
148
+ const accessibilityElementsHidden = ariaHidden !== false;
149
+ const Comp = asChild ? Slot : View;
150
+ return (
151
+ <Comp
152
+ ref={ref}
153
+ accessibilityElementsHidden={accessibilityElementsHidden}
154
+ aria-hidden={ariaHidden ?? true}
155
+ className={cn(tileLeadingSlotVariants(), className)}
156
+ style={[leadingSlotStyle, style]}
157
+ {...props}
158
+ {...mergeDataAttributes(props, dataAttributes({ slot: 'tile-leading' }))}
159
+ />
160
+ );
161
+ },
151
162
  );
152
163
 
153
164
  TileLeadingSlot.displayName = 'Tile.LeadingSlot';
154
165
 
166
+ const contentStyle = {
167
+ flex: 1,
168
+ flexDirection: 'column' as const,
169
+ minWidth: 0,
170
+ };
171
+
155
172
  export interface TileContentProps extends ViewProps {
173
+ asChild?: boolean;
156
174
  className?: string;
157
175
  }
158
176
 
159
- const TileContent = forwardRef<View, TileContentProps>(({ className, style, ...props }, ref) => (
160
- <TilePrimitive.Content
161
- ref={ref as never}
162
- className={cn(tileContentVariants(), className)}
163
- style={style}
164
- {...props}
165
- />
166
- ));
177
+ const TileContent = forwardRef<View, TileContentProps>(
178
+ ({ asChild, className, style, ...props }, ref) => {
179
+ const Comp = asChild ? Slot : View;
180
+ return (
181
+ <Comp
182
+ ref={ref}
183
+ className={cn(tileContentVariants(), className)}
184
+ style={[contentStyle, style]}
185
+ {...props}
186
+ {...mergeDataAttributes(props, dataAttributes({ slot: 'tile-content' }))}
187
+ />
188
+ );
189
+ },
190
+ );
167
191
 
168
192
  TileContent.displayName = 'Tile.Content';
169
193
 
194
+ const noUnderlineStyle = { textDecorationLine: 'none' as const };
195
+
170
196
  export interface TileTitleProps extends TextProps {
197
+ asChild?: boolean;
171
198
  className?: string;
172
199
  }
173
200
 
174
201
  const TileTitle = forwardRef<Text, TileTitleProps>(
175
- ({ className, style, numberOfLines = 1, ...props }, ref) => (
176
- <TilePrimitive.Title
177
- ref={ref as never}
178
- className={cn(tileTitleVariants(), className)}
179
- style={style}
180
- numberOfLines={numberOfLines}
181
- {...props}
182
- />
183
- ),
202
+ ({ asChild, className, style, numberOfLines = 1, ...props }, ref) => {
203
+ const Comp = asChild ? Slot : Text;
204
+ return (
205
+ <Comp
206
+ ref={ref}
207
+ className={cn(tileTitleVariants(), className)}
208
+ style={[noUnderlineStyle, style]}
209
+ numberOfLines={numberOfLines}
210
+ {...props}
211
+ {...mergeDataAttributes(props, dataAttributes({ slot: 'tile-title' }))}
212
+ />
213
+ );
214
+ },
184
215
  );
185
216
 
186
217
  TileTitle.displayName = 'Tile.Title';
187
218
 
188
219
  export interface TileDescriptionProps extends TextProps {
220
+ asChild?: boolean;
189
221
  className?: string;
190
222
  }
191
223
 
192
224
  const TileDescription = forwardRef<Text, TileDescriptionProps>(
193
- ({ className, style, ...props }, ref) => (
194
- <TilePrimitive.Description
195
- ref={ref as never}
196
- className={cn(tileDescriptionVariants(), className)}
197
- style={style}
198
- {...props}
199
- />
200
- ),
225
+ ({ asChild, className, style, ...props }, ref) => {
226
+ const Comp = asChild ? Slot : Text;
227
+ return (
228
+ <Comp
229
+ ref={ref}
230
+ className={cn(tileDescriptionVariants(), className)}
231
+ style={[noUnderlineStyle, style]}
232
+ {...props}
233
+ {...mergeDataAttributes(props, dataAttributes({ slot: 'tile-description' }))}
234
+ />
235
+ );
236
+ },
201
237
  );
202
238
 
203
239
  TileDescription.displayName = 'Tile.Description';
@@ -205,7 +241,7 @@ TileDescription.displayName = 'Tile.Description';
205
241
  /**
206
242
  * Decorative selection affordance. Renders pure CVA-styled Views — no interactive hooks,
207
243
  * no nested Pressable, zero runtime overhead. The Tile root owns the press target and
208
- * ARIA role; this subtree is `aria-hidden` via `createTileIndicator`.
244
+ * ARIA role; this subtree is `aria-hidden`.
209
245
  *
210
246
  * The visual is inferred from the tile context: `single` (radio semantics) → radio ring,
211
247
  * `multiple` (checkbox semantics) → checkbox square. An explicit `indicatorType` prop
@@ -235,40 +271,55 @@ function TileIndicatorVisual({ indicatorType }: { indicatorType?: 'radio' | 'che
235
271
  );
236
272
  }
237
273
 
274
+ const indicatorStyle = { flexShrink: 0 as const, pointerEvents: 'none' as const };
275
+
238
276
  export interface TileIndicatorProps extends ITileIndicatorProps {
277
+ asChild?: boolean;
239
278
  className?: string;
240
279
  children?: ReactNode;
241
280
  }
242
281
 
243
282
  const TileIndicator = forwardRef<View, TileIndicatorProps>(
244
- ({ className, children, style, indicatorType, ...props }, ref) => (
245
- <TilePrimitive.Indicator
246
- ref={ref as never}
247
- className={cn(tileIndicatorVariants(), className)}
248
- style={style}
249
- indicatorType={indicatorType}
250
- {...props}
251
- >
252
- {children ?? <TileIndicatorVisual indicatorType={indicatorType} />}
253
- </TilePrimitive.Indicator>
254
- ),
283
+ ({ asChild, className, children, style, indicatorType, ...props }, ref) => {
284
+ const Comp = asChild ? Slot : View;
285
+ return (
286
+ <Comp
287
+ ref={ref}
288
+ accessibilityElementsHidden
289
+ aria-hidden
290
+ className={cn(tileIndicatorVariants(), className)}
291
+ style={[indicatorStyle, style]}
292
+ {...props}
293
+ {...mergeDataAttributes(props, dataAttributes({ slot: 'tile-indicator' }))}
294
+ >
295
+ {children ?? <TileIndicatorVisual indicatorType={indicatorType} />}
296
+ </Comp>
297
+ );
298
+ },
255
299
  );
256
300
 
257
301
  TileIndicator.displayName = 'Tile.Indicator';
258
302
 
303
+ const trailingSlotStyle = { flexShrink: 0 as const };
304
+
259
305
  export interface TileTrailingSlotProps extends ITileTrailingSlotProps {
306
+ asChild?: boolean;
260
307
  className?: string;
261
308
  }
262
309
 
263
310
  const TileTrailingSlot = forwardRef<View, TileTrailingSlotProps>(
264
- ({ className, style, ...props }, ref) => (
265
- <TilePrimitive.TrailingSlot
266
- ref={ref as never}
267
- className={cn(tileTrailingSlotVariants(), className)}
268
- style={style}
269
- {...props}
270
- />
271
- ),
311
+ ({ asChild, className, style, ...props }, ref) => {
312
+ const Comp = asChild ? Slot : View;
313
+ return (
314
+ <Comp
315
+ ref={ref}
316
+ className={cn(tileTrailingSlotVariants(), className)}
317
+ style={[trailingSlotStyle, style]}
318
+ {...props}
319
+ {...mergeDataAttributes(props, dataAttributes({ slot: 'tile-trailing' }))}
320
+ />
321
+ );
322
+ },
272
323
  );
273
324
 
274
325
  TileTrailingSlot.displayName = 'Tile.TrailingSlot';
@@ -0,0 +1,34 @@
1
+ import { dataAttributes } from '@cdx-ui/primitives';
2
+
3
+ /**
4
+ * Position hint accepted by icon/spinner-bearing styled slots
5
+ * (`Button.Icon`, `Button.Spinner`, `Chip.Icon`, etc.). Maps to a logical
6
+ * `data-icon` attribute that CVA targets for leading/trailing padding.
7
+ *
8
+ * `'leading'` → `data-icon="inline-start"`
9
+ * `'trailing'` → `data-icon="inline-end"`
10
+ */
11
+ export type IconSlotPosition = 'leading' | 'trailing';
12
+
13
+ /**
14
+ * Returns the data-attribute spread props for the requested position, or
15
+ * `undefined` when no position is set (so the attribute is omitted entirely
16
+ * and baseline spacing applies).
17
+ *
18
+ * Spread the result onto the rendered element:
19
+ *
20
+ * ```tsx
21
+ * <Icon {...positionToDataIcon(position)} />
22
+ * ```
23
+ *
24
+ * Spacing rules live in CVA variant strings, targeting the attribute via
25
+ * logical-property utilities so RTL flips automatically:
26
+ *
27
+ * ```ts
28
+ * cva(['data-[icon=inline-start]:me-1.5 data-[icon=inline-end]:ms-1.5'], { ... });
29
+ * ```
30
+ */
31
+ export function positionToDataIcon(position?: IconSlotPosition) {
32
+ if (!position) return undefined;
33
+ return dataAttributes({ icon: position === 'leading' ? 'inline-start' : 'inline-end' });
34
+ }
@@ -1,33 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.BaseFieldLabel = void 0;
7
- var _react = require("react");
8
- var _reactNative = require("react-native");
9
- var _utils = require("@cdx-ui/utils");
10
- var _jsxRuntime = require("react/jsx-runtime");
11
- /**
12
- * Native: `Text` label row — tap focuses the field input via form context
13
- * (parity with `<label htmlFor>` on web).
14
- */
15
- const BaseFieldLabel = exports.BaseFieldLabel = /*#__PURE__*/(0, _react.forwardRef)(({
16
- htmlFor: _omitHtmlFor,
17
- onPress,
18
- ...props
19
- }, ref) => {
20
- void _omitHtmlFor;
21
- const {
22
- focusInput,
23
- isDisabled
24
- } = (0, _utils.useFormControlContext)();
25
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
26
- ref: ref,
27
- ...props,
28
- disabled: Boolean(isDisabled),
29
- onPress: (0, _utils.composeEventHandlers)(onPress, () => focusInput?.())
30
- });
31
- });
32
- BaseFieldLabel.displayName = 'BaseFieldLabel';
33
- //# sourceMappingURL=FieldLabel.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","require","_reactNative","_utils","_jsxRuntime","BaseFieldLabel","exports","forwardRef","htmlFor","_omitHtmlFor","onPress","props","ref","focusInput","isDisabled","useFormControlContext","jsx","Text","disabled","Boolean","composeEventHandlers","displayName"],"sourceRoot":"../../../../src","sources":["components/Field/FieldLabel.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,cAAc,GAAAC,OAAA,CAAAD,cAAA,gBAAG,IAAAE,iBAAU,EACtC,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,cAAc,CAACgB,WAAW,GAAG,gBAAgB","ignoreList":[]}
@@ -1,22 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.BaseFieldLabel = void 0;
7
- var _react = _interopRequireWildcard(require("react"));
8
- var _jsxRuntime = require("react/jsx-runtime");
9
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
10
- // TODO: Why does dataSet need to be decomposed into individual data attributes?
11
-
12
- /** Real `<label>` so clicking the label focuses the associated control (`htmlFor` → input `id`). */
13
- const BaseFieldLabel = exports.BaseFieldLabel = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
14
- return /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
15
- ref: ref,
16
- ...props,
17
- "data-invalid": props.dataSet?.invalid,
18
- "data-required": props.dataSet?.required
19
- });
20
- });
21
- BaseFieldLabel.displayName = 'BaseFieldLabel';
22
- //# sourceMappingURL=FieldLabel.web.js.map
@@ -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","BaseFieldLabel","exports","forwardRef","props","ref","jsx","dataSet","invalid","required","displayName"],"sourceRoot":"../../../../src","sources":["components/Field/FieldLabel.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;AAG1D;;AASA;AACO,MAAMkB,cAAc,GAAAC,OAAA,CAAAD,cAAA,gBAAG,IAAAE,iBAAU,EAAwC,CAACC,KAAK,EAAEC,GAAG,KAAK;EAC9F,oBACE,IAAAxB,WAAA,CAAAyB,GAAA;IACED,GAAG,EAAEA,GAAI;IAAA,GACJD,KAAK;IACV,gBAAcA,KAAK,CAACG,OAAO,EAAEC,OAAQ;IACrC,iBAAeJ,KAAK,CAACG,OAAO,EAAEE;EAAS,CACxC,CAAC;AAEN,CAAC,CAAC;AAEFR,cAAc,CAACS,WAAW,GAAG,gBAAgB","ignoreList":[]}
@@ -1,25 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.BaseFormRoot = void 0;
7
- var _react = require("react");
8
- var _reactNative = require("react-native");
9
- var _jsxRuntime = require("react/jsx-runtime");
10
- const BaseFormRoot = exports.BaseFormRoot = /*#__PURE__*/(0, _react.forwardRef)(({
11
- onSubmit: _onSubmit,
12
- action: _action,
13
- method: _method,
14
- ...props
15
- }, ref) => {
16
- void _onSubmit;
17
- void _action;
18
- void _method;
19
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
20
- ref: ref,
21
- ...props
22
- });
23
- });
24
- BaseFormRoot.displayName = 'BaseFormRoot';
25
- //# sourceMappingURL=FormRoot.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","require","_reactNative","_jsxRuntime","BaseFormRoot","exports","forwardRef","onSubmit","_onSubmit","action","_action","method","_method","props","ref","jsx","View","displayName"],"sourceRoot":"../../../../src","sources":["components/Form/FormRoot.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAAoD,IAAAE,WAAA,GAAAF,OAAA;AAS7C,MAAMG,YAAY,GAAAC,OAAA,CAAAD,YAAA,gBAAG,IAAAE,iBAAU,EACpC,CAAC;EAAEC,QAAQ,EAAEC,SAAS;EAAEC,MAAM,EAAEC,OAAO;EAAEC,MAAM,EAAEC,OAAO;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,KAAK;EAC5E,KAAKN,SAAS;EACd,KAAKE,OAAO;EACZ,KAAKE,OAAO;EACZ,oBAAO,IAAAT,WAAA,CAAAY,GAAA,EAACb,YAAA,CAAAc,IAAI;IAACF,GAAG,EAAEA,GAAI;IAAA,GAAKD;EAAK,CAAG,CAAC;AACtC,CACF,CAAC;AAEDT,YAAY,CAACa,WAAW,GAAG,cAAc","ignoreList":[]}
@@ -1,17 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.BaseFormRoot = void 0;
7
- var _react = _interopRequireWildcard(require("react"));
8
- var _jsxRuntime = require("react/jsx-runtime");
9
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
10
- const BaseFormRoot = exports.BaseFormRoot = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
11
- return /*#__PURE__*/(0, _jsxRuntime.jsx)("form", {
12
- ref: ref,
13
- ...props
14
- });
15
- });
16
- BaseFormRoot.displayName = 'BaseFormRoot';
17
- //# sourceMappingURL=FormRoot.web.js.map
@@ -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","BaseFormRoot","exports","forwardRef","props","ref","jsx","displayName"],"sourceRoot":"../../../../src","sources":["components/Form/FormRoot.web.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA0C,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;AAOnC,MAAMkB,YAAY,GAAAC,OAAA,CAAAD,YAAA,gBAAG,IAAAE,iBAAU,EAAqC,CAACC,KAAK,EAAEC,GAAG,KAAK;EACzF,oBAAO,IAAAxB,WAAA,CAAAyB,GAAA;IAAMD,GAAG,EAAEA,GAAI;IAAA,GAAKD;EAAK,CAAG,CAAC;AACtC,CAAC,CAAC;AAEFH,YAAY,CAACM,WAAW,GAAG,cAAc","ignoreList":[]}