@pickle-ui/react-native 1.0.0-beta.1 → 1.0.0-beta.3

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 (255) hide show
  1. package/README.md +62 -24
  2. package/dist/components/Badge.js +1 -1
  3. package/dist/components/Badge.js.map +1 -1
  4. package/dist/components/Button.d.ts.map +1 -1
  5. package/dist/components/Button.js +27 -23
  6. package/dist/components/Button.js.map +1 -1
  7. package/dist/components/Card.d.ts.map +1 -1
  8. package/dist/components/Card.js +7 -4
  9. package/dist/components/Card.js.map +1 -1
  10. package/dist/components/Flex.d.ts +25 -0
  11. package/dist/components/Flex.d.ts.map +1 -0
  12. package/dist/components/Flex.js +24 -0
  13. package/dist/components/Flex.js.map +1 -0
  14. package/dist/components/Grid.d.ts +36 -0
  15. package/dist/components/Grid.d.ts.map +1 -0
  16. package/dist/components/Grid.js +68 -0
  17. package/dist/components/Grid.js.map +1 -0
  18. package/dist/components/Separator.d.ts +11 -0
  19. package/dist/components/Separator.d.ts.map +1 -0
  20. package/dist/components/Separator.js +12 -0
  21. package/dist/components/Separator.js.map +1 -0
  22. package/dist/components/Spinner.d.ts +14 -0
  23. package/dist/components/Spinner.d.ts.map +1 -0
  24. package/dist/components/Spinner.js +41 -0
  25. package/dist/components/Spinner.js.map +1 -0
  26. package/dist/components/Text.d.ts.map +1 -1
  27. package/dist/components/Text.js +5 -4
  28. package/dist/components/Text.js.map +1 -1
  29. package/dist/components/XStack.d.ts +4 -0
  30. package/dist/components/XStack.d.ts.map +1 -0
  31. package/dist/components/XStack.js +6 -0
  32. package/dist/components/XStack.js.map +1 -0
  33. package/dist/components/YStack.d.ts +4 -0
  34. package/dist/components/YStack.d.ts.map +1 -0
  35. package/dist/components/YStack.js +6 -0
  36. package/dist/components/YStack.js.map +1 -0
  37. package/dist/components/_internal/InputFrame.d.ts +13 -0
  38. package/dist/components/_internal/InputFrame.d.ts.map +1 -0
  39. package/dist/components/_internal/InputFrame.js +14 -0
  40. package/dist/components/_internal/InputFrame.js.map +1 -0
  41. package/dist/components/_internal/StoryItem.d.ts +6 -0
  42. package/dist/components/_internal/StoryItem.d.ts.map +1 -0
  43. package/dist/components/_internal/StoryItem.js +9 -0
  44. package/dist/components/_internal/StoryItem.js.map +1 -0
  45. package/dist/components/_internal/layout.d.ts +79 -0
  46. package/dist/components/_internal/layout.d.ts.map +1 -0
  47. package/dist/components/_internal/layout.js +73 -0
  48. package/dist/components/_internal/layout.js.map +1 -0
  49. package/dist/components/_internal/useControllableState.d.ts +7 -0
  50. package/dist/components/_internal/useControllableState.d.ts.map +1 -0
  51. package/dist/components/_internal/useControllableState.js +17 -0
  52. package/dist/components/_internal/useControllableState.js.map +1 -0
  53. package/dist/components/form/Checkbox.d.ts +26 -0
  54. package/dist/components/form/Checkbox.d.ts.map +1 -0
  55. package/dist/components/form/Checkbox.js +43 -0
  56. package/dist/components/form/Checkbox.js.map +1 -0
  57. package/dist/components/form/Form.context.d.ts +34 -0
  58. package/dist/components/form/Form.context.d.ts.map +1 -0
  59. package/dist/components/form/Form.context.js +53 -0
  60. package/dist/components/form/Form.context.js.map +1 -0
  61. package/dist/components/form/Form.d.ts +33 -0
  62. package/dist/components/form/Form.d.ts.map +1 -0
  63. package/dist/components/form/Form.js +36 -0
  64. package/dist/components/form/Form.js.map +1 -0
  65. package/dist/components/form/FormCheckbox.d.ts +7 -0
  66. package/dist/components/form/FormCheckbox.d.ts.map +1 -0
  67. package/dist/components/form/FormCheckbox.js +24 -0
  68. package/dist/components/form/FormCheckbox.js.map +1 -0
  69. package/dist/components/form/FormDescription.d.ts +4 -0
  70. package/dist/components/form/FormDescription.d.ts.map +1 -0
  71. package/dist/components/form/FormDescription.js +7 -0
  72. package/dist/components/form/FormDescription.js.map +1 -0
  73. package/dist/components/form/FormError.d.ts +5 -0
  74. package/dist/components/form/FormError.d.ts.map +1 -0
  75. package/dist/components/form/FormError.js +8 -0
  76. package/dist/components/form/FormError.js.map +1 -0
  77. package/dist/components/form/FormField.d.ts +17 -0
  78. package/dist/components/form/FormField.d.ts.map +1 -0
  79. package/dist/components/form/FormField.js +36 -0
  80. package/dist/components/form/FormField.js.map +1 -0
  81. package/dist/components/form/FormInput.d.ts +10 -0
  82. package/dist/components/form/FormInput.d.ts.map +1 -0
  83. package/dist/components/form/FormInput.js +36 -0
  84. package/dist/components/form/FormInput.js.map +1 -0
  85. package/dist/components/form/FormInputGroup.d.ts +8 -0
  86. package/dist/components/form/FormInputGroup.d.ts.map +1 -0
  87. package/dist/components/form/FormInputGroup.js +18 -0
  88. package/dist/components/form/FormInputGroup.js.map +1 -0
  89. package/dist/components/form/FormLabel.d.ts +4 -0
  90. package/dist/components/form/FormLabel.d.ts.map +1 -0
  91. package/dist/components/form/FormLabel.js +7 -0
  92. package/dist/components/form/FormLabel.js.map +1 -0
  93. package/dist/components/form/FormRadioGroup.d.ts +11 -0
  94. package/dist/components/form/FormRadioGroup.d.ts.map +1 -0
  95. package/dist/components/form/FormRadioGroup.js +24 -0
  96. package/dist/components/form/FormRadioGroup.js.map +1 -0
  97. package/dist/components/form/FormRoot.d.ts +13 -0
  98. package/dist/components/form/FormRoot.d.ts.map +1 -0
  99. package/dist/components/form/FormRoot.js +19 -0
  100. package/dist/components/form/FormRoot.js.map +1 -0
  101. package/dist/components/form/FormTextarea.d.ts +7 -0
  102. package/dist/components/form/FormTextarea.d.ts.map +1 -0
  103. package/dist/components/form/FormTextarea.js +27 -0
  104. package/dist/components/form/FormTextarea.js.map +1 -0
  105. package/dist/components/form/Input.d.ts +17 -0
  106. package/dist/components/form/Input.d.ts.map +1 -0
  107. package/dist/components/form/Input.js +32 -0
  108. package/dist/components/form/Input.js.map +1 -0
  109. package/dist/components/form/InputGroup.context.d.ts +10 -0
  110. package/dist/components/form/InputGroup.context.d.ts.map +1 -0
  111. package/dist/components/form/InputGroup.context.js +8 -0
  112. package/dist/components/form/InputGroup.context.js.map +1 -0
  113. package/dist/components/form/InputGroup.d.ts +31 -0
  114. package/dist/components/form/InputGroup.d.ts.map +1 -0
  115. package/dist/components/form/InputGroup.js +123 -0
  116. package/dist/components/form/InputGroup.js.map +1 -0
  117. package/dist/components/form/RadioGroup.d.ts +29 -0
  118. package/dist/components/form/RadioGroup.d.ts.map +1 -0
  119. package/dist/components/form/RadioGroup.js +42 -0
  120. package/dist/components/form/RadioGroup.js.map +1 -0
  121. package/dist/components/form/Textarea.d.ts +19 -0
  122. package/dist/components/form/Textarea.d.ts.map +1 -0
  123. package/dist/components/form/Textarea.js +26 -0
  124. package/dist/components/form/Textarea.js.map +1 -0
  125. package/dist/entries/checkbox.d.ts +3 -0
  126. package/dist/entries/checkbox.d.ts.map +1 -0
  127. package/dist/entries/checkbox.js +2 -0
  128. package/dist/entries/checkbox.js.map +1 -0
  129. package/dist/entries/flex.d.ts +3 -0
  130. package/dist/entries/flex.d.ts.map +1 -0
  131. package/dist/entries/flex.js +2 -0
  132. package/dist/entries/flex.js.map +1 -0
  133. package/dist/entries/form.d.ts +3 -0
  134. package/dist/entries/form.d.ts.map +1 -0
  135. package/dist/entries/form.js +2 -0
  136. package/dist/entries/form.js.map +1 -0
  137. package/dist/entries/grid.d.ts +3 -0
  138. package/dist/entries/grid.d.ts.map +1 -0
  139. package/dist/entries/grid.js +2 -0
  140. package/dist/entries/grid.js.map +1 -0
  141. package/dist/entries/input-group.d.ts +3 -0
  142. package/dist/entries/input-group.d.ts.map +1 -0
  143. package/dist/entries/input-group.js +2 -0
  144. package/dist/entries/input-group.js.map +1 -0
  145. package/dist/entries/input.d.ts +3 -0
  146. package/dist/entries/input.d.ts.map +1 -0
  147. package/dist/entries/input.js +2 -0
  148. package/dist/entries/input.js.map +1 -0
  149. package/dist/entries/radio-group.d.ts +3 -0
  150. package/dist/entries/radio-group.d.ts.map +1 -0
  151. package/dist/entries/radio-group.js +2 -0
  152. package/dist/entries/radio-group.js.map +1 -0
  153. package/dist/entries/separator.d.ts +3 -0
  154. package/dist/entries/separator.d.ts.map +1 -0
  155. package/dist/entries/separator.js +2 -0
  156. package/dist/entries/separator.js.map +1 -0
  157. package/dist/entries/spinner.d.ts +3 -0
  158. package/dist/entries/spinner.d.ts.map +1 -0
  159. package/dist/entries/spinner.js +2 -0
  160. package/dist/entries/spinner.js.map +1 -0
  161. package/dist/entries/textarea.d.ts +3 -0
  162. package/dist/entries/textarea.d.ts.map +1 -0
  163. package/dist/entries/textarea.js +2 -0
  164. package/dist/entries/textarea.js.map +1 -0
  165. package/dist/entries/x-stack.d.ts +3 -0
  166. package/dist/entries/x-stack.d.ts.map +1 -0
  167. package/dist/entries/x-stack.js +2 -0
  168. package/dist/entries/x-stack.js.map +1 -0
  169. package/dist/entries/y-stack.d.ts +3 -0
  170. package/dist/entries/y-stack.d.ts.map +1 -0
  171. package/dist/entries/y-stack.js +2 -0
  172. package/dist/entries/y-stack.js.map +1 -0
  173. package/dist/index.d.ts +12 -0
  174. package/dist/index.d.ts.map +1 -1
  175. package/dist/index.js +12 -0
  176. package/dist/index.js.map +1 -1
  177. package/package.json +8 -3
  178. package/src/base.css +23 -5
  179. package/src/components/Badge.tsx +1 -1
  180. package/src/components/Button.tsx +27 -23
  181. package/src/components/Card.tsx +12 -8
  182. package/src/components/Flex.stories.tsx +58 -0
  183. package/src/components/Flex.test.tsx +57 -0
  184. package/src/components/Flex.tsx +52 -0
  185. package/src/components/Grid.stories.tsx +55 -0
  186. package/src/components/Grid.test.tsx +140 -0
  187. package/src/components/Grid.tsx +166 -0
  188. package/src/components/Separator.stories.tsx +39 -0
  189. package/src/components/Separator.test.tsx +25 -0
  190. package/src/components/Separator.tsx +30 -0
  191. package/src/components/Spinner.stories.tsx +35 -0
  192. package/src/components/Spinner.test.tsx +30 -0
  193. package/src/components/Spinner.tsx +75 -0
  194. package/src/components/Text.stories.tsx +49 -0
  195. package/src/components/Text.tsx +5 -4
  196. package/src/components/XStack.stories.tsx +46 -0
  197. package/src/components/XStack.test.tsx +13 -0
  198. package/src/components/XStack.tsx +7 -0
  199. package/src/components/YStack.stories.tsx +46 -0
  200. package/src/components/YStack.test.tsx +13 -0
  201. package/src/components/YStack.tsx +7 -0
  202. package/src/components/_internal/InputFrame.tsx +50 -0
  203. package/src/components/_internal/StoryItem.tsx +24 -0
  204. package/src/components/_internal/layout.ts +103 -0
  205. package/src/components/_internal/useControllableState.ts +25 -0
  206. package/src/components/form/Checkbox.stories.tsx +67 -0
  207. package/src/components/form/Checkbox.test.tsx +88 -0
  208. package/src/components/form/Checkbox.tsx +167 -0
  209. package/src/components/form/Form.context.ts +91 -0
  210. package/src/components/form/Form.stories.tsx +152 -0
  211. package/src/components/form/Form.test.tsx +195 -0
  212. package/src/components/form/Form.tsx +51 -0
  213. package/src/components/form/FormCheckbox.tsx +42 -0
  214. package/src/components/form/FormDescription.tsx +14 -0
  215. package/src/components/form/FormError.tsx +20 -0
  216. package/src/components/form/FormField.tsx +82 -0
  217. package/src/components/form/FormInput.tsx +70 -0
  218. package/src/components/form/FormInputGroup.tsx +30 -0
  219. package/src/components/form/FormLabel.tsx +17 -0
  220. package/src/components/form/FormRadioGroup.tsx +48 -0
  221. package/src/components/form/FormRoot.tsx +41 -0
  222. package/src/components/form/FormTextarea.tsx +56 -0
  223. package/src/components/form/Input.stories.tsx +105 -0
  224. package/src/components/form/Input.test.tsx +76 -0
  225. package/src/components/form/Input.tsx +81 -0
  226. package/src/components/form/InputGroup.context.ts +11 -0
  227. package/src/components/form/InputGroup.stories.tsx +129 -0
  228. package/src/components/form/InputGroup.test.tsx +95 -0
  229. package/src/components/form/InputGroup.tsx +266 -0
  230. package/src/components/form/RadioGroup.stories.tsx +62 -0
  231. package/src/components/form/RadioGroup.test.tsx +98 -0
  232. package/src/components/form/RadioGroup.tsx +151 -0
  233. package/src/components/form/Textarea.stories.tsx +61 -0
  234. package/src/components/form/Textarea.test.tsx +35 -0
  235. package/src/components/form/Textarea.tsx +74 -0
  236. package/src/entries/checkbox.ts +2 -0
  237. package/src/entries/flex.ts +2 -0
  238. package/src/entries/form.ts +13 -0
  239. package/src/entries/grid.ts +2 -0
  240. package/src/entries/input-group.ts +8 -0
  241. package/src/entries/input.ts +2 -0
  242. package/src/entries/radio-group.ts +5 -0
  243. package/src/entries/separator.ts +2 -0
  244. package/src/entries/spinner.ts +2 -0
  245. package/src/entries/textarea.ts +2 -0
  246. package/src/entries/x-stack.ts +2 -0
  247. package/src/entries/y-stack.ts +2 -0
  248. package/src/fonts.test.tsx +244 -0
  249. package/src/index.ts +12 -0
  250. package/src/styles.css +12 -0
  251. package/dist/components/_internal/Spinner.d.ts +0 -9
  252. package/dist/components/_internal/Spinner.d.ts.map +0 -1
  253. package/dist/components/_internal/Spinner.js +0 -31
  254. package/dist/components/_internal/Spinner.js.map +0 -1
  255. package/src/components/_internal/Spinner.tsx +0 -49
@@ -0,0 +1,123 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Children, createContext, isValidElement, use, useImperativeHandle, useMemo, useRef, useState, } from 'react';
3
+ import { Pressable, Text, View } from 'react-native';
4
+ import { cn } from '../../lib/cn';
5
+ import { InputFrame } from '../_internal/InputFrame';
6
+ import { Button } from '../Button';
7
+ import { Input } from './Input';
8
+ import { InputGroupStateContext } from './InputGroup.context';
9
+ // The web's addon paddings minus the 1pt border. Addons holding a button sit
10
+ // closer to the edge, like the web's `has-[>button]` margins.
11
+ const addonClasses = {
12
+ 'block-end': 'w-full justify-start px-[11px] pb-[11px]',
13
+ 'block-start': 'w-full justify-start px-[11px] pt-[11px]',
14
+ 'inline-end': 'pe-[11px]',
15
+ 'inline-start': 'ps-[11px]',
16
+ };
17
+ const buttonAddonClasses = {
18
+ 'block-end': '',
19
+ 'block-start': '',
20
+ 'inline-end': 'pe-[3px]',
21
+ 'inline-start': 'ps-[3px]',
22
+ };
23
+ const InputGroupContext = createContext(null);
24
+ /** Pressing an addon focuses the field, like clicking it on the web. */
25
+ function InputGroupAddon({ align = 'inline-start', children, className, ...props }) {
26
+ const group = useInputGroup('Addon');
27
+ return (_jsx(Pressable, { accessible: false, className: cn('flex-row items-center justify-center gap-2', addonClasses[align], className), onPress: group.focusInput, ...props, children: Children.map(children, (child) => typeof child === 'string' || typeof child === 'number' ? (_jsx(Text, { className: "text-foreground font-sans text-[14px]", children: child })) : (child)) }));
28
+ }
29
+ function InputGroupButton({ align = 'inline-end', className, size = 'icon-xs', variant = 'ghost', ...props }) {
30
+ return (_jsx(InputGroupAddon, { align: align, className: buttonAddonClasses[align], children: _jsx(Button, { className: className, size: size, variant: variant, ...props }) }));
31
+ }
32
+ function InputGroupInput({ className, onBlur, onFocus, ref, ...props }) {
33
+ const group = useInputGroup('Input');
34
+ const inputRef = useRef(null);
35
+ useImperativeHandle(ref, () => inputRef.current);
36
+ return (_jsx(Input, { className: cn(group.hasInlineStart && 'ps-2', group.hasInlineEnd && 'pe-2', className), onBlur: (event) => {
37
+ group.setFocused(false);
38
+ onBlur?.(event);
39
+ }, onFocus: (event) => {
40
+ group.setFocused(true);
41
+ onFocus?.(event);
42
+ }, ref: (node) => {
43
+ inputRef.current = node;
44
+ // The group focuses the input when an addon is pressed.
45
+ group.setInput(node);
46
+ }, unstyled: true, ...props }));
47
+ }
48
+ /** Places addons around the input and frames the group like an `Input`. */
49
+ function InputGroupRoot({ children, className, ...props }) {
50
+ const [focused, setFocused] = useState(false);
51
+ const inputRef = useRef(null);
52
+ const state = use(InputGroupStateContext);
53
+ const sorted = sortChildren(children);
54
+ const { parts } = sorted;
55
+ const disabled = sorted.disabled || Boolean(state?.disabled);
56
+ const invalid = sorted.invalid || Boolean(state?.invalid);
57
+ const hasInlineEnd = parts['inline-end'].length > 0;
58
+ const hasInlineStart = parts['inline-start'].length > 0;
59
+ const context = useMemo(() => ({
60
+ focusInput: () => inputRef.current?.focus(),
61
+ hasInlineEnd,
62
+ hasInlineStart,
63
+ setFocused,
64
+ setInput: (input) => {
65
+ inputRef.current = input;
66
+ },
67
+ }), [hasInlineEnd, hasInlineStart]);
68
+ const hasBlock = parts['block-start'].length > 0 || parts['block-end'].length > 0;
69
+ const row = [
70
+ ...parts['inline-start'],
71
+ ...parts.field,
72
+ ...parts['inline-end'],
73
+ ];
74
+ return (_jsx(InputGroupContext, { value: context, children: _jsx(InputFrame, { className: cn(hasBlock ? 'flex-col' : 'h-8 items-center', className), disabled: disabled, focused: focused, invalid: invalid, role: "group", ...props, children: hasBlock ? (_jsxs(_Fragment, { children: [parts['block-start'], _jsx(View, { className: "flex-row items-center", children: row }), parts['block-end']] })) : (row) }) }));
75
+ }
76
+ function InputGroupText({ className, ...props }) {
77
+ return (_jsx(Text, { className: cn('text-muted-foreground font-sans text-[14px]', className), numberOfLines: 1, ...props }));
78
+ }
79
+ /**
80
+ * Splits the group's direct children by `align`, since React Native has no
81
+ * CSS `order`, and reads `disabled` and `invalid` from its inputs.
82
+ */
83
+ function sortChildren(children) {
84
+ const parts = {
85
+ 'block-end': [],
86
+ 'block-start': [],
87
+ field: [],
88
+ 'inline-end': [],
89
+ 'inline-start': [],
90
+ };
91
+ let disabled = false;
92
+ let invalid = false;
93
+ for (const child of Children.toArray(children)) {
94
+ if (isValidElement(child) &&
95
+ (child.type === InputGroupAddon || child.type === InputGroupButton)) {
96
+ const fallback = child.type === InputGroupButton ? 'inline-end' : 'inline-start';
97
+ parts[child.props.align ?? fallback].push(child);
98
+ }
99
+ else {
100
+ if (isValidElement(child) &&
101
+ child.type === InputGroupInput) {
102
+ disabled || (disabled = Boolean(child.props.disabled));
103
+ invalid || (invalid = Boolean(child.props.invalid));
104
+ }
105
+ parts.field.push(child);
106
+ }
107
+ }
108
+ return { disabled, invalid, parts };
109
+ }
110
+ function useInputGroup(part) {
111
+ const group = use(InputGroupContext);
112
+ if (!group)
113
+ throw new Error(`InputGroup.${part} must be inside an InputGroup.`);
114
+ return group;
115
+ }
116
+ const InputGroup = Object.assign(InputGroupRoot, {
117
+ Addon: InputGroupAddon,
118
+ Button: InputGroupButton,
119
+ Input: InputGroupInput,
120
+ Text: InputGroupText,
121
+ });
122
+ export { InputGroup };
123
+ //# sourceMappingURL=InputGroup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputGroup.js","sourceRoot":"","sources":["../../../src/components/form/InputGroup.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,QAAQ,EACR,aAAa,EACb,cAAc,EAEd,GAAG,EACH,mBAAmB,EACnB,OAAO,EACP,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,SAAS,EAAE,IAAI,EAAkB,IAAI,EAAE,MAAM,cAAc,CAAC;AAErE,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAoB,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,KAAK,EAAmB,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAU9D,6EAA6E;AAC7E,8DAA8D;AAC9D,MAAM,YAAY,GAAG;IACnB,WAAW,EAAE,0CAA0C;IACvD,aAAa,EAAE,0CAA0C;IACzD,YAAY,EAAE,WAAW;IACzB,cAAc,EAAE,WAAW;CACnB,CAAC;AACX,MAAM,kBAAkB,GAAG;IACzB,WAAW,EAAE,EAAE;IACf,aAAa,EAAE,EAAE;IACjB,YAAY,EAAE,UAAU;IACxB,cAAc,EAAE,UAAU;CAClB,CAAC;AAUX,MAAM,iBAAiB,GAAG,aAAa,CAAgC,IAAI,CAAC,CAAC;AAgB7E,wEAAwE;AACxE,SAAS,eAAe,CAAC,EACvB,KAAK,GAAG,cAAc,EACtB,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACa;IACrB,MAAM,KAAK,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC;IAErC,OAAO,CACL,KAAC,SAAS,IACR,UAAU,EAAE,KAAK,EACjB,SAAS,EAAE,EAAE,CACX,4CAA4C,EAC5C,YAAY,CAAC,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AAG,CAAC,iBAAiB,CAAC,CAAC;IACrC,IAAI,CAAC,KAAK;QACR,MAAM,IAAI,KAAK,CAAC,cAAc,IAAI,gCAAgC,CAAC,CAAC;IACtE,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,cAAc,EAAE;IAC/C,KAAK,EAAE,eAAe;IACtB,MAAM,EAAE,gBAAgB;IACxB,KAAK,EAAE,eAAe;IACtB,IAAI,EAAE,cAAc;CACrB,CAAC,CAAC;AAEH,OAAO,EAAE,UAAU,EAAE,CAAC"}
@@ -0,0 +1,29 @@
1
+ import { Pressable, View } from 'react-native';
2
+ export type RadioGroupItemProps = Omit<React.ComponentProps<typeof Pressable>, 'children' | 'disabled'> & {
3
+ /** Class overrides for the row around the circle and label, the dot and the label. */
4
+ classNames?: {
5
+ field?: string;
6
+ indicator?: string;
7
+ label?: string;
8
+ };
9
+ disabled?: boolean;
10
+ /** Marks the choice as invalid, like the web's `aria-invalid`. */
11
+ invalid?: boolean;
12
+ /** Text next to the circle; pressing it selects the item and names it. */
13
+ label?: React.ReactNode;
14
+ size?: 'md' | 'sm';
15
+ value: string;
16
+ };
17
+ export type RadioGroupProps = React.ComponentProps<typeof View> & {
18
+ defaultValue?: string;
19
+ disabled?: boolean;
20
+ onValueChange?: (value: string) => void;
21
+ value?: string;
22
+ };
23
+ declare function RadioGroupItem({ accessibilityState, className, classNames, disabled: disabledProp, invalid, label, size, value, ...props }: RadioGroupItemProps): import("react").JSX.Element;
24
+ declare function RadioGroupRoot({ className, defaultValue, disabled, onValueChange, value: valueProp, ...props }: RadioGroupProps): import("react").JSX.Element;
25
+ declare const RadioGroup: typeof RadioGroupRoot & {
26
+ Item: typeof RadioGroupItem;
27
+ };
28
+ export { RadioGroup, RadioGroupItem };
29
+ //# sourceMappingURL=RadioGroup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../../../src/components/form/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AAEH,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,CAAC"}
@@ -0,0 +1,42 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { createContext, use, useMemo } from 'react';
3
+ import { Pressable, Text, View } from 'react-native';
4
+ import { cn } from '../../lib/cn';
5
+ import { useControllableState } from '../_internal/useControllableState';
6
+ // Same sizes as `RadioGroup` in @pickle-ui/react. `hitSlop` stretches the
7
+ // circle to a 44pt touch target, vertically only when a label widens it.
8
+ const controlClasses = { md: 'size-4', sm: 'size-3.5' };
9
+ const indicatorClasses = { md: 'size-2', sm: 'size-1.5' };
10
+ const controlHitSlop = { md: 14, sm: 15 };
11
+ const fieldHitSlop = {
12
+ md: { bottom: 14, top: 14 },
13
+ sm: { bottom: 15, top: 15 },
14
+ };
15
+ const RadioGroupContext = createContext(null);
16
+ function RadioGroupItem({ accessibilityState, className, classNames, disabled: disabledProp = false, invalid = false, label, size = 'md', value, ...props }) {
17
+ const group = use(RadioGroupContext);
18
+ if (!group)
19
+ throw new Error('RadioGroup.Item must be inside a RadioGroup.');
20
+ const checked = group.value === value;
21
+ const disabled = group.disabled || disabledProp;
22
+ return (_jsxs(Pressable, { accessibilityState: { ...accessibilityState, checked, disabled }, "aria-checked": checked, "aria-disabled": disabled, className: label
23
+ ? cn('flex-row items-center gap-2', classNames?.field)
24
+ : 'self-start', disabled: disabled, hitSlop: label ? fieldHitSlop[size] : controlHitSlop[size], onPress: () => group.onSelect(value), role: "radio", ...props, children: [_jsx(View, { className: cn('border-input bg-background items-center justify-center rounded-full border', controlClasses[size], checked && 'border-primary', invalid && 'border-destructive', disabled && 'opacity-50', className), children: checked ? (_jsx(View, { className: cn('bg-primary rounded-full', indicatorClasses[size], classNames?.indicator) })) : null }), label ? (_jsx(Text, { className: cn('font-sans text-sm leading-none font-medium', disabled ? 'text-muted-foreground' : 'text-foreground', classNames?.label), children: label })) : null] }));
25
+ }
26
+ function RadioGroupRoot({ className, defaultValue, disabled = false, onValueChange, value: valueProp, ...props }) {
27
+ const [value, setValue] = useControllableState(valueProp, defaultValue, onValueChange);
28
+ const context = useMemo(() => ({
29
+ disabled,
30
+ onSelect: (next) => {
31
+ if (next !== value)
32
+ setValue(next);
33
+ },
34
+ value,
35
+ }), [disabled, setValue, value]);
36
+ return (_jsx(RadioGroupContext, { value: context, children: _jsx(View, { className: cn('gap-2', className), role: "radiogroup", ...props }) }));
37
+ }
38
+ const RadioGroup = Object.assign(RadioGroupRoot, {
39
+ Item: RadioGroupItem,
40
+ });
41
+ export { RadioGroup, RadioGroupItem };
42
+ //# sourceMappingURL=RadioGroup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RadioGroup.js","sourceRoot":"","sources":["../../../src/components/form/RadioGroup.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAErD,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAEzE,0EAA0E;AAC1E,yEAAyE;AACzE,MAAM,cAAc,GAAG,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAW,CAAC;AACjE,MAAM,gBAAgB,GAAG,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAW,CAAC;AACnE,MAAM,cAAc,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAW,CAAC;AACnD,MAAM,YAAY,GAAG;IACnB,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE;IAC3B,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE;CACnB,CAAC;AAQX,MAAM,iBAAiB,G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0 +1,19 @@
1
+ import { TextInput } from 'react-native';
2
+ export type TextareaProps = Omit<React.ComponentProps<typeof TextInput>, 'multiline'> & {
3
+ /** Class overrides for the inner `TextInput`; `className` styles the control around it. */
4
+ classNames?: {
5
+ textarea?: string;
6
+ };
7
+ /** Dims the field and stops editing, like the web's `disabled`. */
8
+ disabled?: boolean;
9
+ /** Marks the value as invalid, like the web's `aria-invalid`. */
10
+ invalid?: boolean;
11
+ size?: 'lg' | 'md' | 'sm';
12
+ };
13
+ /**
14
+ * A multi-line text field that grows with its content from three lines, like
15
+ * `Textarea` in @pickle-ui/react. Set a `min-h-*` class on
16
+ * `classNames.textarea` to change the minimum.
17
+ */
18
+ export declare function Textarea({ className, classNames, disabled, editable, invalid, onBlur, onFocus, size, ...props }: TextareaProps): import("react").JSX.Element;
19
+ //# sourceMappingURL=Textarea.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../src/components/form/Textarea.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAWzC,MAAM,MAAM,aAAa,GAAG,IAAI,CAC9B,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,EACtC,WAAW,CACZ,GAAG;IACF,2FAA2F;IAC3F,UAAU,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACnC,mEAAmE;IACnE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iEAAiE;IACjE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CAC3B,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,EACvB,SAAS,EACT,UAAU,EACV,QAAgB,EAChB,QAAe,EACf,OAAe,EACf,MAAM,EACN,OAAO,EACP,IAAW,EACX,GAAG,KAAK,EACT,EAAE,aAAa,+BAiCf"}
@@ -0,0 +1,26 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useState } from 'react';
3
+ import { TextInput } from 'react-native';
4
+ import { cn } from '../../lib/cn';
5
+ import { InputFrame } from '../_internal/InputFrame';
6
+ const sizeClasses = {
7
+ lg: 'min-h-18 px-[11px]',
8
+ md: 'min-h-17.5 px-[11px]',
9
+ sm: 'min-h-16 px-[9px]',
10
+ };
11
+ /**
12
+ * A multi-line text field that grows with its content from three lines, like
13
+ * `Textarea` in @pickle-ui/react. Set a `min-h-*` class on
14
+ * `classNames.textarea` to change the minimum.
15
+ */
16
+ export function Textarea({ className, classNames, disabled = false, editable = true, invalid = false, onBlur, onFocus, size = 'md', ...props }) {
17
+ const [focused, setFocused] = useState(false);
18
+ return (_jsx(InputFrame, { className: className, disabled: disabled, focused: focused, invalid: invalid, children: _jsx(TextInput, { accessibilityState: { disabled }, className: cn('text-foreground web:field-sizing-content web:resize-none flex-1 py-2 font-sans text-sm outline-none', sizeClasses[size], classNames?.textarea), editable: editable && !disabled, multiline: true, onBlur: (event) => {
19
+ setFocused(false);
20
+ onBlur?.(event);
21
+ }, onFocus: (event) => {
22
+ setFocused(true);
23
+ onFocus?.(event);
24
+ }, placeholderTextColorClassName: "accent-muted-foreground/72", textAlignVertical: "top", ...props }) }));
25
+ }
26
+ //# sourceMappingURL=Textarea.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Textarea.js","sourceRoot":"","sources":["../../../src/components/form/Textarea.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,MAAM,WAAW,GAAG;IAClB,EAAE,EAAE,oBAAoB;IACxB,EAAE,EAAE,sBAAsB;IAC1B,EAAE,EAAE,mBAAmB;CACf,CAAC;AAeX;;;;GAIG;AACH,MAAM,UAAU,QAAQ,CAAC,EACvB,SAAS,EACT,UAAU,EACV,QAAQ,GAAG,KAAK,EAChB,QAAQ,GAAG,IAAI,EACf,OAAO,GAAG,KAAK,EACf,MAAM,EACN,OAAO,EACP,IAAI,GAAG,IAAI,EACX,GAAG,KAAK,EACM;IACd,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE9C,OAAO,CACL,KAAC,UAAU,IACT,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,YAEhB,KAAC,SAAS,IACR,kBAAkB,EAAE,EAAE,QAAQ,EAAE,EAChC,SAAS,EAAE,EAAE,CACX,qGAAqG,EACrG,WAAW,CAAC,IAAI,CAAC,EACjB,UAAU,EAAE,QAAQ,CACrB,EACD,QAAQ,EAAE,QAAQ,IAAI,CAAC,QAAQ,EAC/B,SAAS,QACT,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE;gBAChB,UAAU,CAAC,KAAK,CAAC,CAAC;gBAClB,MAAM,EAAE,CAAC,KAAK,CAAC,CAAC;YAClB,CAAC,EACD,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;gBACjB,UAAU,CAAC,IAAI,CAAC,CAAC;gBACjB,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC;YACnB,CAAC,EACD,6BAA6B,EAAC,4BAA4B,EAC1D,iBAAiB,EAAC,KAAK,KACnB,KAAK,GACT,GACS,CACd,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { Checkbox } from '../components/form/Checkbox';
2
+ export type { CheckboxProps } from '../components/form/Checkbox';
3
+ //# sourceMappingURL=checkbox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../src/entries/checkbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,YAAY,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { Checkbox } from '../components/form/Checkbox';
2
+ //# sourceMappingURL=checkbox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkbox.js","sourceRoot":"","sources":["../../src/entries/checkbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { Flex } from '../components/Flex';
2
+ export type { FlexProps } from '../components/Flex';
3
+ //# sourceMappingURL=flex.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flex.d.ts","sourceRoot":"","sources":["../../src/entries/flex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,YAAY,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { Flex } from '../components/Flex';
2
+ //# sourceMappingURL=flex.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flex.js","sourceRoot":"","sources":["../../src/entries/flex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { Form } from '../components/form/Form';
2
+ export type { FormCheckboxProps, FormDescriptionProps, FormErrorProps, FormFieldProps, FormInputGroupProps, FormInputProps, FormLabelProps, FormProps, FormRadioGroupProps, FormTextareaProps, } from '../components/form/Form';
3
+ //# sourceMappingURL=form.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../src/entries/form.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,YAAY,EACV,iBAAiB,EACjB,oBAAoB,EACpB,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,SAAS,EACT,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,yBAAyB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { Form } from '../components/form/Form';
2
+ //# sourceMappingURL=form.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form.js","sourceRoot":"","sources":["../../src/entries/form.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { Grid } from '../components/Grid';
2
+ export type { GridProps } from '../components/Grid';
3
+ //# sourceMappingURL=grid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"grid.d.ts","sourceRoot":"","sources":["../../src/entries/grid.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,YAAY,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { Grid } from '../components/Grid';
2
+ //# sourceMappingURL=grid.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"grid.js","sourceRoot":"","sources":["../../src/entries/grid.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { InputGroup } from '../components/form/InputGroup';
2
+ export type { InputGroupAddonProps, InputGroupButtonProps, InputGroupInputProps, InputGroupProps, InputGroupTextProps, } from '../components/form/InputGroup';
3
+ //# sourceMappingURL=input-group.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input-group.d.ts","sourceRoot":"","sources":["../../src/entries/input-group.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,YAAY,EACV,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,EACf,mBAAmB,GACpB,MAAM,+BAA+B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { InputGroup } from '../components/form/InputGroup';
2
+ //# sourceMappingURL=input-group.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input-group.js","sourceRoot":"","sources":["../../src/entries/input-group.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { Input } from '../components/form/Input';
2
+ export type { InputProps } from '../components/form/Input';
3
+ //# sourceMappingURL=input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/entries/input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AACjD,YAAY,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { Input } from '../components/form/Input';
2
+ //# sourceMappingURL=input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input.js","sourceRoot":"","sources":["../../src/entries/input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { RadioGroup } from '../components/form/RadioGroup';
2
+ export type { RadioGroupItemProps, RadioGroupProps, } from '../components/form/RadioGroup';
3
+ //# sourceMappingURL=radio-group.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../src/entries/radio-group.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,YAAY,EACV,mBAAmB,EACnB,eAAe,GAChB,MAAM,+BAA+B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { RadioGroup } from '../components/form/RadioGroup';
2
+ //# sourceMappingURL=radio-group.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"radio-group.js","sourceRoot":"","sources":["../../src/entries/radio-group.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { Separator } from '../components/Separator';
2
+ export type { SeparatorProps } from '../components/Separator';
3
+ //# sourceMappingURL=separator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"separator.d.ts","sourceRoot":"","sources":["../../src/entries/separator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,YAAY,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { Separator } from '../components/Separator';
2
+ //# sourceMappingURL=separator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"separator.js","sourceRoot":"","sources":["../../src/entries/separator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { Spinner } from '../components/Spinner';
2
+ export type { SpinnerProps } from '../components/Spinner';
3
+ //# sourceMappingURL=spinner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spinner.d.ts","sourceRoot":"","sources":["../../src/entries/spinner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,YAAY,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { Spinner } from '../components/Spinner';
2
+ //# sourceMappingURL=spinner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spinner.js","sourceRoot":"","sources":["../../src/entries/spinner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { Textarea } from '../components/form/Textarea';
2
+ export type { TextareaProps } from '../components/form/Textarea';
3
+ //# sourceMappingURL=textarea.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../src/entries/textarea.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,YAAY,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { Textarea } from '../components/form/Textarea';
2
+ //# sourceMappingURL=textarea.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textarea.js","sourceRoot":"","sources":["../../src/entries/textarea.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { XStack } from '../components/XStack';
2
+ export type { XStackProps } from '../components/XStack';
3
+ //# sourceMappingURL=x-stack.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"x-stack.d.ts","sourceRoot":"","sources":["../../src/entries/x-stack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,YAAY,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { XStack } from '../components/XStack';
2
+ //# sourceMappingURL=x-stack.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"x-stack.js","sourceRoot":"","sources":["../../src/entries/x-stack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { YStack } from '../components/YStack';
2
+ export type { YStackProps } from '../components/YStack';
3
+ //# sourceMappingURL=y-stack.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"y-stack.d.ts","sourceRoot":"","sources":["../../src/entries/y-stack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,YAAY,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { YStack } from '../components/YStack';
2
+ //# sourceMappingURL=y-stack.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"y-stack.js","sourceRoot":"","sources":["../../src/entries/y-stack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,8 +1,20 @@
1
1
  export * from './entries/badge';
2
2
  export * from './entries/button';
3
3
  export * from './entries/card';
4
+ export * from './entries/checkbox';
4
5
  export * from './entries/cn';
6
+ export * from './entries/flex';
7
+ export * from './entries/form';
8
+ export * from './entries/grid';
9
+ export * from './entries/input';
10
+ export * from './entries/input-group';
11
+ export * from './entries/radio-group';
12
+ export * from './entries/separator';
13
+ export * from './entries/spinner';
5
14
  export * from './entries/text';
15
+ export * from './entries/textarea';
6
16
  export * from './entries/theme';
7
17
  export * from './entries/use-color-token';
18
+ export * from './entries/x-stack';
19
+ export * from './entries/y-stack';
8
20
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC"}
package/dist/index.js CHANGED
@@ -3,8 +3,20 @@
3
3
  export * from './entries/badge';
4
4
  export * from './entries/button';
5
5
  export * from './entries/card';
6
+ export * from './entries/checkbox';
6
7
  export * from './entries/cn';
8
+ export * from './entries/flex';
9
+ export * from './entries/form';
10
+ export * from './entries/grid';
11
+ export * from './entries/input';
12
+ export * from './entries/input-group';
13
+ export * from './entries/radio-group';
14
+ export * from './entries/separator';
15
+ export * from './entries/spinner';
7
16
  export * from './entries/text';
17
+ export * from './entries/textarea';
8
18
  export * from './entries/theme';
9
19
  export * from './entries/use-color-token';
20
+ export * from './entries/x-stack';
21
+ export * from './entries/y-stack';
10
22
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,yEAAyE;AACzE,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,yEAAyE;AACzE,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pickle-ui/react-native",
3
- "version": "1.0.0-beta.1",
3
+ "version": "1.0.0-beta.3",
4
4
  "type": "module",
5
5
  "description": "React Native components for Expo, styled with Pickle UI's tokens through Uniwind.",
6
6
  "main": "dist/index.js",
@@ -52,6 +52,7 @@
52
52
  "@pickle-ui/tokens": "1.0.0-beta.7"
53
53
  },
54
54
  "devDependencies": {
55
+ "@hookform/resolvers": "^5.4.0",
55
56
  "@react-native/assets-registry": "0.88.0",
56
57
  "@react-native/jest-preset": "^0.88.1",
57
58
  "@storybook/addon-docs": "^10.6.3",
@@ -60,14 +61,16 @@
60
61
  "@tailwindcss/vite": "^4.3.3",
61
62
  "@testing-library/react-native": "^14.1.0",
62
63
  "@types/jest": "^30.0.0",
64
+ "@types/node": "^25.9.3",
63
65
  "@types/react": "^19.3.0",
64
66
  "babel-preset-expo": "^58.0.21",
65
67
  "expo": "^58.0.20",
66
68
  "jest": "^30.5.2",
67
69
  "jest-expo": "~58.0.12",
68
70
  "react": "19.3.0",
69
- "react-doctor": "^0.5.6",
71
+ "react-doctor": "^0.9.18",
70
72
  "react-dom": "19.3.0",
73
+ "react-hook-form": "^7.79.0",
71
74
  "react-native": "0.88.0",
72
75
  "react-native-svg": "^15.16.0",
73
76
  "react-native-web": "^0.21.4",
@@ -76,10 +79,12 @@
76
79
  "test-renderer": "^1.3.1",
77
80
  "typescript": "^6.0.3",
78
81
  "uniwind": "^1.13.0",
79
- "vite": "^8.3.5"
82
+ "vite": "^8.3.5",
83
+ "zod": "4.0.17"
80
84
  },
81
85
  "peerDependencies": {
82
86
  "react": "^19.0.0",
87
+ "react-hook-form": "^7.0.0",
83
88
  "react-native": "*",
84
89
  "tailwindcss": "^4.0.0",
85
90
  "uniwind": "^1.13.0"