@seed-design/lynx-react 0.7.0 → 0.8.0

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 (245) hide show
  1. package/lib/components/Accordion/Accordion.jsx +2 -2
  2. package/lib/components/ActionButton/ActionButton.jsx +1 -1
  3. package/lib/components/AlertDialog/AlertDialog.d.ts +64 -0
  4. package/lib/components/AlertDialog/AlertDialog.d.ts.map +1 -0
  5. package/lib/components/AlertDialog/AlertDialog.jsx +138 -0
  6. package/lib/components/AlertDialog/AlertDialog.namespace.d.ts +2 -0
  7. package/lib/components/AlertDialog/AlertDialog.namespace.d.ts.map +1 -0
  8. package/lib/components/AlertDialog/AlertDialog.namespace.js +17 -0
  9. package/lib/components/AlertDialog/index.d.ts +3 -0
  10. package/lib/components/AlertDialog/index.d.ts.map +1 -0
  11. package/lib/components/AppBar/AppBar.d.ts +14 -1
  12. package/lib/components/AppBar/AppBar.d.ts.map +1 -1
  13. package/lib/components/AppBar/AppBar.jsx +46 -10
  14. package/lib/components/AppBar/AppBar.namespace.d.ts +1 -1
  15. package/lib/components/AppBar/AppBar.namespace.d.ts.map +1 -1
  16. package/lib/components/AppBar/index.d.ts +1 -1
  17. package/lib/components/AppBar/index.d.ts.map +1 -1
  18. package/lib/components/AttachmentDisplay/AttachmentDisplay.d.ts +182 -0
  19. package/lib/components/AttachmentDisplay/AttachmentDisplay.d.ts.map +1 -0
  20. package/lib/components/AttachmentDisplay/AttachmentDisplay.jsx +444 -0
  21. package/lib/components/AttachmentDisplay/index.d.ts +2 -0
  22. package/lib/components/AttachmentDisplay/index.d.ts.map +1 -0
  23. package/lib/components/AttachmentInput/AttachmentInput.d.ts +179 -0
  24. package/lib/components/AttachmentInput/AttachmentInput.d.ts.map +1 -0
  25. package/lib/components/AttachmentInput/AttachmentInput.jsx +520 -0
  26. package/lib/components/AttachmentInput/index.d.ts +2 -0
  27. package/lib/components/AttachmentInput/index.d.ts.map +1 -0
  28. package/lib/components/BottomSheet/BottomSheet.d.ts +1 -1
  29. package/lib/components/BottomSheet/BottomSheet.d.ts.map +1 -1
  30. package/lib/components/BottomSheet/BottomSheet.jsx +1 -7
  31. package/lib/components/Callout/Callout.jsx +2 -2
  32. package/lib/components/Checkbox/Checkbox.jsx +2 -2
  33. package/lib/components/Chip/Chip.jsx +2 -2
  34. package/lib/components/ChipTabs/ChipTabs.d.ts +41 -0
  35. package/lib/components/ChipTabs/ChipTabs.d.ts.map +1 -0
  36. package/lib/components/ChipTabs/ChipTabs.jsx +39 -0
  37. package/lib/components/ChipTabs/ChipTabs.namespace.d.ts +2 -0
  38. package/lib/components/ChipTabs/ChipTabs.namespace.d.ts.map +1 -0
  39. package/lib/components/ChipTabs/ChipTabs.namespace.js +13 -0
  40. package/lib/components/ChipTabs/index.d.ts +3 -0
  41. package/lib/components/ChipTabs/index.d.ts.map +1 -0
  42. package/lib/components/ContextualFloatingButton/ContextualFloatingButton.d.ts +18 -0
  43. package/lib/components/ContextualFloatingButton/ContextualFloatingButton.d.ts.map +1 -0
  44. package/lib/components/ContextualFloatingButton/ContextualFloatingButton.jsx +113 -0
  45. package/lib/components/ContextualFloatingButton/index.d.ts +2 -0
  46. package/lib/components/ContextualFloatingButton/index.d.ts.map +1 -0
  47. package/lib/components/Dialog/Dialog.d.ts +87 -0
  48. package/lib/components/Dialog/Dialog.d.ts.map +1 -0
  49. package/lib/components/Dialog/Dialog.jsx +147 -0
  50. package/lib/components/Dialog/Dialog.namespace.d.ts +2 -0
  51. package/lib/components/Dialog/Dialog.namespace.d.ts.map +1 -0
  52. package/lib/components/Dialog/Dialog.namespace.js +18 -0
  53. package/lib/components/Dialog/index.d.ts +3 -0
  54. package/lib/components/Dialog/index.d.ts.map +1 -0
  55. package/lib/components/FloatingActionButton/FloatingActionButton.d.ts +23 -0
  56. package/lib/components/FloatingActionButton/FloatingActionButton.d.ts.map +1 -0
  57. package/lib/components/FloatingActionButton/FloatingActionButton.jsx +76 -0
  58. package/lib/components/FloatingActionButton/FloatingActionButton.namespace.d.ts +2 -0
  59. package/lib/components/FloatingActionButton/FloatingActionButton.namespace.d.ts.map +1 -0
  60. package/lib/components/FloatingActionButton/FloatingActionButton.namespace.js +10 -0
  61. package/lib/components/FloatingActionButton/index.d.ts +3 -0
  62. package/lib/components/FloatingActionButton/index.d.ts.map +1 -0
  63. package/lib/components/HelpBubble/HelpBubble.d.ts +67 -0
  64. package/lib/components/HelpBubble/HelpBubble.d.ts.map +1 -0
  65. package/lib/components/HelpBubble/HelpBubble.jsx +600 -0
  66. package/lib/components/HelpBubble/HelpBubble.namespace.d.ts +2 -0
  67. package/lib/components/HelpBubble/HelpBubble.namespace.d.ts.map +1 -0
  68. package/lib/components/HelpBubble/HelpBubble.namespace.js +18 -0
  69. package/lib/components/HelpBubble/index.d.ts +3 -0
  70. package/lib/components/HelpBubble/index.d.ts.map +1 -0
  71. package/lib/components/Icon/Icon.d.ts +1 -0
  72. package/lib/components/Icon/Icon.d.ts.map +1 -1
  73. package/lib/components/Icon/Icon.jsx +3 -2
  74. package/lib/components/IdentityPlaceholder/IdentityPlaceholder.d.ts +28 -0
  75. package/lib/components/IdentityPlaceholder/IdentityPlaceholder.d.ts.map +1 -0
  76. package/lib/components/IdentityPlaceholder/IdentityPlaceholder.jsx +37 -0
  77. package/lib/components/IdentityPlaceholder/IdentityPlaceholder.namespace.d.ts +2 -0
  78. package/lib/components/IdentityPlaceholder/IdentityPlaceholder.namespace.d.ts.map +1 -0
  79. package/lib/components/IdentityPlaceholder/IdentityPlaceholder.namespace.js +9 -0
  80. package/lib/components/IdentityPlaceholder/identity-placeholder-business.js +4 -0
  81. package/lib/components/IdentityPlaceholder/identity-placeholder-person.js +4 -0
  82. package/lib/components/IdentityPlaceholder/index.d.ts +3 -0
  83. package/lib/components/IdentityPlaceholder/index.d.ts.map +1 -0
  84. package/lib/components/InputButton/InputButton.d.ts +2 -0
  85. package/lib/components/InputButton/InputButton.d.ts.map +1 -1
  86. package/lib/components/InputButton/InputButton.jsx +40 -8
  87. package/lib/components/List/List.d.ts +1 -1
  88. package/lib/components/List/List.d.ts.map +1 -1
  89. package/lib/components/List/List.jsx +26 -12
  90. package/lib/components/Menu/Menu.d.ts.map +1 -1
  91. package/lib/components/Menu/Menu.jsx +15 -5
  92. package/lib/components/PageBanner/PageBanner.d.ts +3 -0
  93. package/lib/components/PageBanner/PageBanner.d.ts.map +1 -1
  94. package/lib/components/PageBanner/PageBanner.jsx +49 -11
  95. package/lib/components/QuantityPicker/QuantityPicker.d.ts +53 -0
  96. package/lib/components/QuantityPicker/QuantityPicker.d.ts.map +1 -0
  97. package/lib/components/QuantityPicker/QuantityPicker.jsx +282 -0
  98. package/lib/components/QuantityPicker/QuantityPicker.namespace.d.ts +2 -0
  99. package/lib/components/QuantityPicker/QuantityPicker.namespace.d.ts.map +1 -0
  100. package/lib/components/QuantityPicker/QuantityPicker.namespace.js +11 -0
  101. package/lib/components/QuantityPicker/index.d.ts +3 -0
  102. package/lib/components/QuantityPicker/index.d.ts.map +1 -0
  103. package/lib/components/RadioGroup/RadioGroup.jsx +2 -2
  104. package/lib/components/ReactionButton/ReactionButton.d.ts +1 -1
  105. package/lib/components/ReactionButton/ReactionButton.d.ts.map +1 -1
  106. package/lib/components/ReactionButton/ReactionButton.jsx +22 -13
  107. package/lib/components/ScrollFog/ScrollFog.d.ts +41 -0
  108. package/lib/components/ScrollFog/ScrollFog.d.ts.map +1 -0
  109. package/lib/components/ScrollFog/ScrollFog.jsx +65 -0
  110. package/lib/components/ScrollFog/index.d.ts +2 -0
  111. package/lib/components/ScrollFog/index.d.ts.map +1 -0
  112. package/lib/components/SegmentedControl/SegmentedControl.jsx +2 -2
  113. package/lib/components/Select/Select.d.ts +112 -0
  114. package/lib/components/Select/Select.d.ts.map +1 -0
  115. package/lib/components/Select/Select.jsx +885 -0
  116. package/lib/components/Select/Select.namespace.d.ts +2 -0
  117. package/lib/components/Select/Select.namespace.d.ts.map +1 -0
  118. package/lib/components/Select/Select.namespace.js +23 -0
  119. package/lib/components/Select/index.d.ts +3 -0
  120. package/lib/components/Select/index.d.ts.map +1 -0
  121. package/lib/components/Skeleton/Skeleton.d.ts +15 -0
  122. package/lib/components/Skeleton/Skeleton.d.ts.map +1 -0
  123. package/lib/components/Skeleton/Skeleton.jsx +18 -0
  124. package/lib/components/Skeleton/index.d.ts +2 -0
  125. package/lib/components/Skeleton/index.d.ts.map +1 -0
  126. package/lib/components/Slider/Slider.d.ts +101 -0
  127. package/lib/components/Slider/Slider.d.ts.map +1 -0
  128. package/lib/components/Slider/Slider.jsx +573 -0
  129. package/lib/components/Slider/Slider.namespace.d.ts +2 -0
  130. package/lib/components/Slider/Slider.namespace.d.ts.map +1 -0
  131. package/lib/components/Slider/Slider.namespace.js +19 -0
  132. package/lib/components/Slider/Slider.utils.d.ts +19 -0
  133. package/lib/components/Slider/Slider.utils.d.ts.map +1 -0
  134. package/lib/components/Slider/Slider.utils.js +106 -0
  135. package/lib/components/Slider/index.d.ts +3 -0
  136. package/lib/components/Slider/index.d.ts.map +1 -0
  137. package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.d.ts.map +1 -1
  138. package/lib/components/SwipeableMenuSheet/SwipeableMenuSheet.jsx +22 -8
  139. package/lib/components/Switch/Switch.d.ts.map +1 -1
  140. package/lib/components/Switch/Switch.jsx +5 -3
  141. package/lib/components/Tabs/Tabs.d.ts +34 -2
  142. package/lib/components/Tabs/Tabs.d.ts.map +1 -1
  143. package/lib/components/Tabs/Tabs.jsx +186 -56
  144. package/lib/components/Tabs/Tabs.utils.d.ts +14 -1
  145. package/lib/components/Tabs/Tabs.utils.d.ts.map +1 -1
  146. package/lib/components/Tabs/Tabs.utils.js +24 -3
  147. package/lib/components/Tabs/index.d.ts +1 -1
  148. package/lib/components/Tabs/index.d.ts.map +1 -1
  149. package/lib/components/index.d.ts +14 -0
  150. package/lib/components/index.d.ts.map +1 -1
  151. package/lib/hooks/useControllableState.d.ts +1 -14
  152. package/lib/hooks/useControllableState.d.ts.map +1 -1
  153. package/lib/hooks/usePressTap.d.ts +1 -27
  154. package/lib/hooks/usePressTap.d.ts.map +1 -1
  155. package/lib/hooks/useScaleFeedback.d.ts +1 -1
  156. package/lib/hooks/useScaleFeedback.js +1 -1
  157. package/lib/index.js +29 -6
  158. package/lib/{hooks/useControllableState.js → packages/lynx-react-headless/use-controllable-state/lib/index.js} +2 -3
  159. package/lib/{hooks/usePressTap.js → packages/lynx-react-headless/use-press-tap/lib/index.js} +13 -10
  160. package/lib/types.d.ts +1 -0
  161. package/lib/types.d.ts.map +1 -1
  162. package/package.json +9 -5
  163. package/src/components/ActionButton/ActionButton.test.tsx +7 -7
  164. package/src/components/AlertDialog/AlertDialog.namespace.ts +22 -0
  165. package/src/components/AlertDialog/AlertDialog.test.tsx +226 -0
  166. package/src/components/AlertDialog/AlertDialog.tsx +374 -0
  167. package/src/components/AlertDialog/index.ts +24 -0
  168. package/src/components/AppBar/AppBar.namespace.ts +1 -0
  169. package/src/components/AppBar/AppBar.test.tsx +257 -0
  170. package/src/components/AppBar/AppBar.tsx +109 -14
  171. package/src/components/AppBar/index.ts +1 -0
  172. package/src/components/AttachmentDisplay/AttachmentDisplay.tsx +886 -0
  173. package/src/components/AttachmentDisplay/index.ts +48 -0
  174. package/src/components/AttachmentInput/AttachmentInput.tsx +1001 -0
  175. package/src/components/AttachmentInput/index.ts +49 -0
  176. package/src/components/BottomSheet/BottomSheet.test.tsx +22 -7
  177. package/src/components/BottomSheet/BottomSheet.tsx +1 -19
  178. package/src/components/ChipTabs/ChipTabs.namespace.ts +14 -0
  179. package/src/components/ChipTabs/ChipTabs.tsx +119 -0
  180. package/src/components/ChipTabs/index.ts +16 -0
  181. package/src/components/ContextualFloatingButton/ContextualFloatingButton.test.tsx +63 -0
  182. package/src/components/ContextualFloatingButton/ContextualFloatingButton.tsx +232 -0
  183. package/src/components/ContextualFloatingButton/index.ts +4 -0
  184. package/src/components/Dialog/Dialog.namespace.ts +24 -0
  185. package/src/components/Dialog/Dialog.test.tsx +172 -0
  186. package/src/components/Dialog/Dialog.tsx +373 -0
  187. package/src/components/Dialog/index.ts +26 -0
  188. package/src/components/FloatingActionButton/FloatingActionButton.namespace.ts +8 -0
  189. package/src/components/FloatingActionButton/FloatingActionButton.test.tsx +59 -0
  190. package/src/components/FloatingActionButton/FloatingActionButton.tsx +207 -0
  191. package/src/components/FloatingActionButton/index.ts +10 -0
  192. package/src/components/HelpBubble/HelpBubble.namespace.ts +24 -0
  193. package/src/components/HelpBubble/HelpBubble.tsx +998 -0
  194. package/src/components/HelpBubble/index.ts +26 -0
  195. package/src/components/Icon/Icon.test.tsx +57 -5
  196. package/src/components/Icon/Icon.tsx +16 -2
  197. package/src/components/IdentityPlaceholder/IdentityPlaceholder.namespace.ts +6 -0
  198. package/src/components/IdentityPlaceholder/IdentityPlaceholder.tsx +103 -0
  199. package/src/components/IdentityPlaceholder/assets.d.ts +4 -0
  200. package/src/components/IdentityPlaceholder/identity-placeholder-business.webp +0 -0
  201. package/src/components/IdentityPlaceholder/identity-placeholder-person.webp +0 -0
  202. package/src/components/IdentityPlaceholder/index.ts +8 -0
  203. package/src/components/InputButton/InputButton.test.tsx +128 -1
  204. package/src/components/InputButton/InputButton.tsx +60 -9
  205. package/src/components/List/List.test.tsx +54 -2
  206. package/src/components/List/List.tsx +43 -10
  207. package/src/components/Menu/Menu.tsx +14 -4
  208. package/src/components/Menu/__tests__/Menu.test.tsx +34 -0
  209. package/src/components/PageBanner/PageBanner.test.tsx +110 -3
  210. package/src/components/PageBanner/PageBanner.tsx +83 -19
  211. package/src/components/QuantityPicker/QuantityPicker.namespace.ts +10 -0
  212. package/src/components/QuantityPicker/QuantityPicker.test.tsx +235 -0
  213. package/src/components/QuantityPicker/QuantityPicker.tsx +605 -0
  214. package/src/components/QuantityPicker/index.ts +14 -0
  215. package/src/components/ReactionButton/ReactionButton.feedback.test.tsx +50 -0
  216. package/src/components/ReactionButton/ReactionButton.test.tsx +6 -4
  217. package/src/components/ReactionButton/ReactionButton.tsx +20 -12
  218. package/src/components/ScrollFog/ScrollFog.test.tsx +222 -0
  219. package/src/components/ScrollFog/ScrollFog.tsx +172 -0
  220. package/src/components/ScrollFog/index.ts +1 -0
  221. package/src/components/Select/Select.namespace.ts +34 -0
  222. package/src/components/Select/Select.test.tsx +297 -0
  223. package/src/components/Select/Select.tsx +1483 -0
  224. package/src/components/Select/index.ts +39 -0
  225. package/src/components/Skeleton/Skeleton.test.tsx +64 -0
  226. package/src/components/Skeleton/Skeleton.tsx +45 -0
  227. package/src/components/Skeleton/index.ts +1 -0
  228. package/src/components/Slider/Slider.namespace.ts +26 -0
  229. package/src/components/Slider/Slider.test.tsx +260 -0
  230. package/src/components/Slider/Slider.tsx +897 -0
  231. package/src/components/Slider/Slider.utils.ts +167 -0
  232. package/src/components/Slider/index.ts +30 -0
  233. package/src/components/SwipeableMenuSheet/SwipeableMenuSheet.test.tsx +21 -1
  234. package/src/components/SwipeableMenuSheet/SwipeableMenuSheet.tsx +30 -7
  235. package/src/components/Switch/Switch.tsx +14 -13
  236. package/src/components/Tabs/Tabs.test.tsx +218 -1
  237. package/src/components/Tabs/Tabs.tsx +346 -75
  238. package/src/components/Tabs/Tabs.utils.ts +51 -1
  239. package/src/components/Tabs/index.ts +17 -1
  240. package/src/components/index.ts +14 -0
  241. package/src/hooks/useControllableState.ts +1 -43
  242. package/src/hooks/usePressTap.test.ts +23 -11
  243. package/src/hooks/usePressTap.ts +1 -60
  244. package/src/hooks/useScaleFeedback.ts +1 -1
  245. package/src/types.ts +1 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AttachmentInput.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentInput/AttachmentInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AACxC,OAAO,KAAK,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAEL,KAAK,2BAA2B,EACjC,MA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B,eAAO,MAAM,+BAA+B,uGAsB1C,CAAC;AAGH,MAAM,WAAW,gCACf,SAAQ,IAAI,CAAC,sBAAsB,EAAE,UAAU,CAAC,EAC9C,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,SAAS,GAAG,qBAAqB,CAAC;IACvE,MAAM,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IACtC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,KAAK,EAAE,mBAAmB,KAAK,KAAK,CAAC,SAAS,CAAC,CAAC;CAChF;AAED,eAAO,MAAM,2BAA2B,mGAetC,CAAC;AAGH,MAAM,WAAW,oCACf,SAAQ,sBAAsB,EAC5B,IAAI,CAAC,eAAe,EAAE,SAAS,GAAG,qBAAqB,CAAC,EACxD,kBAAkB,EAClB,sBAAsB;CAAG;AAE7B,eAAO,MAAM,+BAA+B,uGAqC1C,CAAC;AAGH,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,EAAE,CAAC,OAAO,EAAE,2BAA2B,KAAK,KAAK,CAAC,SAAS,CAAC;CACrE;AAED,eAAO,MAAM,sBAAsB,GAAI,cAAc,2BAA2B,oBACzC,CAAC;AAExC,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;4BAHyB,2BAA2B;CAsB/E,CAAC"}
@@ -0,0 +1,520 @@
1
+ import { useControllableState } from "../../packages/lynx-react-headless/use-controllable-state/lib/index.js";
2
+ import { usePressTap } from "../../packages/lynx-react-headless/use-press-tap/lib/index.js";
3
+ import { toArray } from "../../utils/children.js";
4
+ import { mergeProps } from "../../utils/merge-props.js";
5
+ import { createSlotRecipeContext } from "../../utils/create-slot-recipe-context.jsx";
6
+ import { IconSlotProvider, InternalIcon } from "../Icon/Icon.jsx";
7
+ import { useFieldContext } from "../Field/context.js";
8
+ import * as React from "@lynx-js/react";
9
+ import clsx from "clsx";
10
+ import { attachmentInput } from "@seed-design/lynx-css/recipes/attachment-input";
11
+ import { attachmentInputItem } from "@seed-design/lynx-css/recipes/attachment-input-item";
12
+ import { attachmentInputTrigger } from "@seed-design/lynx-css/recipes/attachment-input-trigger";
13
+ //#region src/components/AttachmentInput/AttachmentInput.tsx
14
+ function pickNativeViewProps(props) {
15
+ return {
16
+ id: props.id,
17
+ flatten: props.flatten,
18
+ style: props.style,
19
+ "accessibility-label": props["accessibility-label"],
20
+ "accessibility-traits": props["accessibility-traits"],
21
+ "accessibility-element": props["accessibility-element"],
22
+ "accessibility-value": props["accessibility-value"],
23
+ "accessibility-role-description": props["accessibility-role-description"],
24
+ "accessibility-elements-hidden": props["accessibility-elements-hidden"],
25
+ "accessibility-heading": props["accessibility-heading"],
26
+ "accessibility-actions": props["accessibility-actions"],
27
+ "accessibility-exclusive-focus": props["accessibility-exclusive-focus"],
28
+ "ios-platform-accessibility-id": props["ios-platform-accessibility-id"]
29
+ };
30
+ }
31
+ var rootRecipe = createSlotRecipeContext(attachmentInput);
32
+ var triggerRecipe = createSlotRecipeContext(attachmentInputTrigger);
33
+ var itemRecipe = createSlotRecipeContext(attachmentInputItem);
34
+ var AttachmentInputContextObject = React.createContext(null);
35
+ var AttachmentInputItemContextObject = React.createContext(null);
36
+ function useAttachmentInputContext() {
37
+ const context = React.useContext(AttachmentInputContextObject);
38
+ if (!context) throw new Error("AttachmentInput components must be used within AttachmentInput.Root");
39
+ return context;
40
+ }
41
+ function useAttachmentInputItemContext() {
42
+ const context = React.useContext(AttachmentInputItemContextObject);
43
+ if (!context) throw new Error("AttachmentInput item components must be used within AttachmentInput.Item");
44
+ return context;
45
+ }
46
+ function isAcceptedType(file, accept) {
47
+ if (!accept) return true;
48
+ const patterns = (Array.isArray(accept) ? accept : accept.split(",")).map((value) => value.trim().toLowerCase()).filter(Boolean);
49
+ const fileName = file.name.toLowerCase();
50
+ const fileType = file.type.toLowerCase();
51
+ return patterns.some((pattern) => {
52
+ if (pattern.startsWith(".")) return fileName.endsWith(pattern);
53
+ if (pattern.endsWith("/*")) return fileType.startsWith(pattern.slice(0, -1));
54
+ if (pattern.includes("*")) {
55
+ const [type] = pattern.split("/");
56
+ return fileType.startsWith(`${type}/`);
57
+ }
58
+ return fileType === pattern;
59
+ });
60
+ }
61
+ function isImageAcceptPattern(pattern) {
62
+ if (pattern.startsWith("image/")) return true;
63
+ return [
64
+ ".avif",
65
+ ".bmp",
66
+ ".gif",
67
+ ".heic",
68
+ ".heif",
69
+ ".jpeg",
70
+ ".jpg",
71
+ ".png",
72
+ ".webp"
73
+ ].some((extension) => pattern === extension);
74
+ }
75
+ function getAcceptType(accept) {
76
+ if (!accept) return void 0;
77
+ const patterns = (Array.isArray(accept) ? accept : accept.split(",")).map((value) => value.trim().toLowerCase()).filter(Boolean);
78
+ return patterns.length > 0 && patterns.every(isImageAcceptPattern) ? "image" : void 0;
79
+ }
80
+ function formatFileSize(bytes) {
81
+ if (bytes === 0) return "0 B";
82
+ const units = [
83
+ "B",
84
+ "KB",
85
+ "MB",
86
+ "GB",
87
+ "TB"
88
+ ];
89
+ const index = Math.min(Math.floor(Math.log(bytes) / Math.log(1024)), units.length - 1);
90
+ return `${Number.parseFloat((bytes / 1024 ** index).toFixed(1))} ${units[index]}`;
91
+ }
92
+ function useAttachmentInput(props = {}) {
93
+ const { acceptedFileEntries: value, defaultAcceptedFileEntries = [], onAcceptedFileEntriesChange, onFileAccept, onFileReject, accept, disabled: disabledProp, required: requiredProp, invalid: invalidProp, readOnly: readOnlyProp, maxFiles: maxFilesProp = 1, maxFileSize = Number.POSITIVE_INFINITY, minFileSize = 0, validate, onSelectFiles, onSelectError } = props;
94
+ const fieldContext = useFieldContext({ strict: false });
95
+ const disabled = disabledProp ?? fieldContext?.disabled ?? false;
96
+ const required = requiredProp ?? fieldContext?.required ?? false;
97
+ const invalid = invalidProp ?? fieldContext?.invalid ?? false;
98
+ const readOnly = readOnlyProp ?? fieldContext?.readOnly ?? false;
99
+ const maxFiles = Math.max(1, maxFilesProp);
100
+ const [acceptedFileEntries, setAcceptedFileEntries] = useControllableState({
101
+ value,
102
+ defaultValue: defaultAcceptedFileEntries,
103
+ onChange: onAcceptedFileEntriesChange
104
+ });
105
+ const entries = acceptedFileEntries ?? [];
106
+ const entriesRef = React.useRef(entries);
107
+ entriesRef.current = entries;
108
+ const optionsRef = React.useRef({
109
+ disabled,
110
+ readOnly,
111
+ accept,
112
+ maxFiles,
113
+ maxFileSize,
114
+ minFileSize,
115
+ validate,
116
+ onSelectFiles,
117
+ onSelectError,
118
+ onFileAccept,
119
+ onFileReject
120
+ });
121
+ optionsRef.current = {
122
+ disabled,
123
+ readOnly,
124
+ accept,
125
+ maxFiles,
126
+ maxFileSize,
127
+ minFileSize,
128
+ validate,
129
+ onSelectFiles,
130
+ onSelectError,
131
+ onFileAccept,
132
+ onFileReject
133
+ };
134
+ const idCounterRef = React.useRef(0);
135
+ const pickerRequestRef = React.useRef(0);
136
+ const mountedRef = React.useRef(true);
137
+ React.useEffect(() => {
138
+ return () => {
139
+ mountedRef.current = false;
140
+ pickerRequestRef.current += 1;
141
+ };
142
+ }, []);
143
+ const multiple = maxFiles > 1;
144
+ const maxFilesReached = entries.length >= maxFiles;
145
+ const triggerDisabled = disabled || readOnly || maxFilesReached;
146
+ const acceptType = getAcceptType(accept);
147
+ const updateFileEntryStatus = React.useCallback((id, details) => {
148
+ const next = entriesRef.current.map((entry) => entry.id === id ? {
149
+ ...entry,
150
+ ...details
151
+ } : entry);
152
+ entriesRef.current = next;
153
+ setAcceptedFileEntries(next);
154
+ }, [setAcceptedFileEntries]);
155
+ const validateFiles = React.useCallback((files) => {
156
+ const { accept: currentAccept, maxFileSize: currentMaxFileSize, minFileSize: currentMinFileSize, maxFiles: currentMaxFiles, validate: currentValidate } = optionsRef.current;
157
+ const accepted = [];
158
+ const rejected = [];
159
+ let addedCount = 0;
160
+ for (const file of files) {
161
+ const errors = [];
162
+ if (entriesRef.current.length + addedCount >= currentMaxFiles) errors.push("TOO_MANY_FILES");
163
+ if (!isAcceptedType(file, currentAccept)) errors.push("INVALID_TYPE");
164
+ if (file.size > currentMaxFileSize) errors.push("FILE_TOO_LARGE");
165
+ if (file.size < currentMinFileSize) errors.push("FILE_TOO_SMALL");
166
+ const customErrors = currentValidate?.(file);
167
+ if (customErrors) errors.push(...customErrors);
168
+ if (errors.length > 0) rejected.push({
169
+ file,
170
+ errors
171
+ });
172
+ else {
173
+ accepted.push(file);
174
+ addedCount += 1;
175
+ }
176
+ }
177
+ return {
178
+ accepted,
179
+ rejected
180
+ };
181
+ }, []);
182
+ const setFileEntries = React.useCallback((files) => {
183
+ const currentOptions = optionsRef.current;
184
+ if (currentOptions.disabled || currentOptions.readOnly) return;
185
+ const { accepted, rejected } = validateFiles(files);
186
+ const acceptedEntries = accepted.map((file) => ({
187
+ id: `attachment-${Date.now()}-${++idCounterRef.current}`,
188
+ file,
189
+ status: "pending"
190
+ }));
191
+ if (acceptedEntries.length > 0) {
192
+ const acceptedForCallback = currentOptions.maxFiles > 1 ? acceptedEntries : [acceptedEntries[0]];
193
+ const nextEntries = currentOptions.maxFiles > 1 ? [...entriesRef.current, ...acceptedEntries] : acceptedForCallback;
194
+ entriesRef.current = nextEntries;
195
+ setAcceptedFileEntries(nextEntries);
196
+ currentOptions.onFileAccept?.(acceptedForCallback, { updateFileEntryStatus });
197
+ }
198
+ if (rejected.length > 0) currentOptions.onFileReject?.(rejected);
199
+ }, [
200
+ setAcceptedFileEntries,
201
+ updateFileEntryStatus,
202
+ validateFiles
203
+ ]);
204
+ const openFilePicker = React.useCallback(() => {
205
+ const currentOptions = optionsRef.current;
206
+ if (currentOptions.disabled || currentOptions.readOnly || entriesRef.current.length >= currentOptions.maxFiles) return;
207
+ const picker = currentOptions.onSelectFiles;
208
+ if (!picker) return;
209
+ const requestId = ++pickerRequestRef.current;
210
+ let result;
211
+ try {
212
+ result = picker();
213
+ } catch (error) {
214
+ currentOptions.onSelectError?.(error);
215
+ return;
216
+ }
217
+ Promise.resolve(result).then((files) => {
218
+ if (!mountedRef.current || requestId !== pickerRequestRef.current) return;
219
+ if (!Array.isArray(files) || files.length === 0) return;
220
+ if (optionsRef.current.disabled || optionsRef.current.readOnly) return;
221
+ setFileEntries(files);
222
+ }).catch((error) => {
223
+ if (mountedRef.current && requestId === pickerRequestRef.current) optionsRef.current.onSelectError?.(error);
224
+ });
225
+ }, [setFileEntries]);
226
+ const removeFileEntry = React.useCallback((id) => {
227
+ if (optionsRef.current.readOnly) return;
228
+ const next = entriesRef.current.filter((entry) => entry.id !== id);
229
+ entriesRef.current = next;
230
+ setAcceptedFileEntries(next);
231
+ }, [setAcceptedFileEntries]);
232
+ const clearFileEntries = React.useCallback(() => {
233
+ if (optionsRef.current.readOnly) return;
234
+ entriesRef.current = [];
235
+ setAcceptedFileEntries([]);
236
+ }, [setAcceptedFileEntries]);
237
+ const reorderFileEntry = React.useCallback((fromIndex, toIndex) => {
238
+ if (optionsRef.current.disabled || optionsRef.current.readOnly) return;
239
+ const currentEntries = entriesRef.current;
240
+ if (fromIndex < 0 || toIndex < 0 || fromIndex >= currentEntries.length || toIndex >= currentEntries.length || fromIndex === toIndex) return;
241
+ const next = [...currentEntries];
242
+ const [entry] = next.splice(fromIndex, 1);
243
+ next.splice(toIndex, 0, entry);
244
+ entriesRef.current = next;
245
+ setAcceptedFileEntries(next);
246
+ }, [setAcceptedFileEntries]);
247
+ const stateProps = {
248
+ "data-disabled": triggerDisabled,
249
+ "data-readonly": readOnly,
250
+ "data-invalid": invalid,
251
+ "data-required": required
252
+ };
253
+ return {
254
+ ...props,
255
+ acceptedFileEntries: entries,
256
+ currentFileEntryCount: entries.length,
257
+ acceptType,
258
+ multiple,
259
+ maxFiles,
260
+ disabled,
261
+ required,
262
+ invalid,
263
+ readOnly,
264
+ triggerDisabled,
265
+ stateProps,
266
+ openFilePicker,
267
+ setFileEntries,
268
+ updateFileEntryStatus,
269
+ removeFileEntry,
270
+ clearFileEntries,
271
+ reorderFileEntry
272
+ };
273
+ }
274
+ var AttachmentInputRoot = React.forwardRef((props, forwardedRef) => {
275
+ const [variantProps, otherProps] = attachmentInput.splitVariantProps(props);
276
+ const { children, className, acceptedFileEntries, defaultAcceptedFileEntries, onAcceptedFileEntriesChange, onFileReject, onFileAccept, accept, disabled, required, invalid, readOnly, maxFiles, maxFileSize, minFileSize, validate, onSelectFiles, onSelectError } = otherProps;
277
+ const api = useAttachmentInput({
278
+ acceptedFileEntries,
279
+ defaultAcceptedFileEntries,
280
+ onAcceptedFileEntriesChange,
281
+ onFileReject,
282
+ onFileAccept,
283
+ accept,
284
+ disabled,
285
+ required,
286
+ invalid,
287
+ readOnly,
288
+ maxFiles,
289
+ maxFileSize,
290
+ minFileSize,
291
+ validate,
292
+ onSelectFiles,
293
+ onSelectError
294
+ });
295
+ const classes = attachmentInput(variantProps);
296
+ return <AttachmentInputContextObject.Provider value={api}>
297
+ <rootRecipe.ClassNamesProvider value={classes}>
298
+ <view {...mergeProps(forwardedRef ? { ref: forwardedRef } : {}, api.stateProps, pickNativeViewProps(props))} className={clsx(classes.root, className)}>
299
+ {children}
300
+ </view>
301
+ </rootRecipe.ClassNamesProvider>
302
+ </AttachmentInputContextObject.Provider>;
303
+ });
304
+ AttachmentInputRoot.displayName = "AttachmentInputRoot";
305
+ var AttachmentInputContainer = React.forwardRef(({ children, className, ...nativeProps }, forwardedRef) => {
306
+ const classes = rootRecipe.useClassNames();
307
+ return <scroll-view {...mergeProps(forwardedRef ? { ref: forwardedRef } : {}, nativeProps)} scroll-orientation="horizontal" scroll-bar-enable={false} className={clsx(classes.container, className)}>
308
+ <view className={classes.containerContent}>{children}</view>
309
+ </scroll-view>;
310
+ });
311
+ AttachmentInputContainer.displayName = "AttachmentInputContainer";
312
+ var AttachmentInputItemGroup = React.forwardRef(({ children, className, ...nativeProps }, forwardedRef) => {
313
+ const classes = rootRecipe.useClassNames();
314
+ return <view {...mergeProps(forwardedRef ? { ref: forwardedRef } : {}, nativeProps)} className={clsx(classes.itemGroup, className)}>
315
+ {children}
316
+ </view>;
317
+ });
318
+ AttachmentInputItemGroup.displayName = "AttachmentInputItemGroup";
319
+ var AttachmentInputTrigger = React.forwardRef((props, forwardedRef) => {
320
+ const [variantProps, restProps] = attachmentInputTrigger.splitVariantProps(props);
321
+ const { children, className, bindtap, "main-thread:bindtap": mainThreadBindtap, "accessibility-element": accessibilityElement = true, "accessibility-traits": accessibilityTraits, ...nativeProps } = restProps;
322
+ const context = useAttachmentInputContext();
323
+ const press = usePressTap({
324
+ disabled: context.triggerDisabled,
325
+ onTap: (event) => {
326
+ context.openFilePicker();
327
+ bindtap?.(event);
328
+ },
329
+ mainThreadOnTap: mainThreadBindtap
330
+ });
331
+ const classes = attachmentInputTrigger({
332
+ ...variantProps,
333
+ pressed: press.pressed,
334
+ disabled: context.triggerDisabled
335
+ });
336
+ return <triggerRecipe.ClassNamesProvider value={classes}>
337
+ <view {...mergeProps(forwardedRef ? { ref: forwardedRef } : {}, press, nativeProps)} accessibility-element={accessibilityElement} accessibility-traits={accessibilityTraits ?? (context.triggerDisabled ? "disabled" : "button")} className={clsx(classes.root, className)}>
338
+ {children}
339
+ </view>
340
+ </triggerRecipe.ClassNamesProvider>;
341
+ });
342
+ AttachmentInputTrigger.displayName = "AttachmentInputTrigger";
343
+ var AttachmentInputTriggerIcon = React.forwardRef(({ image, general, children, className, ...nativeProps }, forwardedRef) => {
344
+ const context = useAttachmentInputContext();
345
+ const classes = attachmentInputTrigger({
346
+ pressed: false,
347
+ disabled: context.triggerDisabled
348
+ });
349
+ const icon = context.acceptType === "image" ? image ?? children : general ?? children;
350
+ if (!React.isValidElement(icon)) return null;
351
+ return <triggerRecipe.ClassNamesProvider value={classes}>
352
+ <InternalIcon icon={icon} {...mergeProps(forwardedRef ? { ref: forwardedRef } : {}, nativeProps)} className={clsx(classes.icon, className)} />
353
+ </triggerRecipe.ClassNamesProvider>;
354
+ });
355
+ AttachmentInputTriggerIcon.displayName = "AttachmentInputTriggerIcon";
356
+ var AttachmentInputTriggerItemCount = React.forwardRef(({ children, className, ...nativeProps }, forwardedRef) => {
357
+ const context = useAttachmentInputContext();
358
+ const classes = attachmentInputTrigger({
359
+ pressed: false,
360
+ disabled: context.triggerDisabled
361
+ });
362
+ return <triggerRecipe.ClassNamesProvider value={classes}>
363
+ <view {...mergeProps(forwardedRef ? { ref: forwardedRef } : {}, nativeProps)} className={clsx(classes.itemCountArea, className)}>
364
+ <text className={classes.itemCount}>{context.currentFileEntryCount}</text>
365
+ <text className={classes.maxItemCount}>/{context.maxFiles}</text>
366
+ {children}
367
+ </view>
368
+ </triggerRecipe.ClassNamesProvider>;
369
+ });
370
+ AttachmentInputTriggerItemCount.displayName = "AttachmentInputTriggerItemCount";
371
+ var AttachmentInputItem = React.forwardRef(({ fileEntry, children, className, ...props }, forwardedRef) => {
372
+ const root = useAttachmentInputContext();
373
+ const [variantProps] = attachmentInputItem.splitVariantProps(props);
374
+ const type = variantProps.type ?? root.acceptType ?? "general";
375
+ const classes = attachmentInputItem({
376
+ ...variantProps,
377
+ type,
378
+ disabled: root.disabled,
379
+ readOnly: root.readOnly,
380
+ pressed: false,
381
+ dragging: variantProps.dragging ?? false
382
+ });
383
+ const imageSource = fileEntry.file.previewUrl ?? fileEntry.file.uri;
384
+ const itemContext = {
385
+ ...fileEntry,
386
+ imageProps: type === "image" && imageSource ? {
387
+ src: imageSource,
388
+ alt: fileEntry.file.name
389
+ } : void 0,
390
+ removeButtonProps: { bindtap: () => {
391
+ if (!root.readOnly) root.removeFileEntry(fileEntry.id);
392
+ } }
393
+ };
394
+ return <AttachmentInputItemContextObject.Provider value={itemContext}>
395
+ <itemRecipe.ClassNamesProvider value={classes}>
396
+ <view {...mergeProps(forwardedRef ? { ref: forwardedRef } : {}, root.stateProps, pickNativeViewProps(props))} className={clsx(classes.root, className)}>
397
+ {children}
398
+ </view>
399
+ </itemRecipe.ClassNamesProvider>
400
+ </AttachmentInputItemContextObject.Provider>;
401
+ });
402
+ AttachmentInputItem.displayName = "AttachmentInputItem";
403
+ var AttachmentInputItemName = React.forwardRef(({ children, className, ...nativeProps }, forwardedRef) => {
404
+ const item = useAttachmentInputItemContext();
405
+ const classes = itemRecipe.useClassNames();
406
+ return <text {...mergeProps(forwardedRef ? { ref: forwardedRef } : {}, nativeProps)} text-maxline="1" className={clsx(classes.name, className)}>
407
+ {children ?? item.file.name}
408
+ </text>;
409
+ });
410
+ AttachmentInputItemName.displayName = "AttachmentInputItemName";
411
+ var AttachmentInputItemSize = React.forwardRef(({ children, className, formatBytes = formatFileSize, ...nativeProps }, forwardedRef) => {
412
+ const item = useAttachmentInputItemContext();
413
+ const classes = itemRecipe.useClassNames();
414
+ return <text {...mergeProps(forwardedRef ? { ref: forwardedRef } : {}, nativeProps)} className={clsx(classes.size, className)}>
415
+ {children ?? formatBytes(item.file.size)}
416
+ </text>;
417
+ });
418
+ AttachmentInputItemSize.displayName = "AttachmentInputItemSize";
419
+ var AttachmentInputItemSurface = React.forwardRef(({ children, className, ...nativeProps }, forwardedRef) => {
420
+ const classes = itemRecipe.useClassNames();
421
+ return <view {...mergeProps(forwardedRef ? { ref: forwardedRef } : {}, nativeProps)} className={clsx(classes.surface, className)}>
422
+ {children}
423
+ </view>;
424
+ });
425
+ AttachmentInputItemSurface.displayName = "AttachmentInputItemSurface";
426
+ var AttachmentInputItemImage = React.forwardRef(({ className, "accessibility-label": accessibilityLabel, ...nativeProps }, forwardedRef) => {
427
+ const item = useAttachmentInputItemContext();
428
+ const classes = itemRecipe.useClassNames();
429
+ if (!item.imageProps) return null;
430
+ return <image {...mergeProps(forwardedRef ? { ref: forwardedRef } : {}, nativeProps)} src={item.imageProps.src} accessibility-label={accessibilityLabel ?? item.imageProps.alt} className={clsx(classes.image, className)} />;
431
+ });
432
+ AttachmentInputItemImage.displayName = "AttachmentInputItemImage";
433
+ var AttachmentInputItemThumbnail = React.forwardRef(({ children, className, ...nativeProps }, forwardedRef) => {
434
+ const classes = itemRecipe.useClassNames();
435
+ return <view {...mergeProps(forwardedRef ? { ref: forwardedRef } : {}, nativeProps)} className={clsx(classes.thumbnail, className)}>
436
+ <IconSlotProvider value={{ classNames: { icon: classes.thumbnailIcon } }}>
437
+ {children}
438
+ </IconSlotProvider>
439
+ </view>;
440
+ });
441
+ AttachmentInputItemThumbnail.displayName = "AttachmentInputItemThumbnail";
442
+ var AttachmentInputItemMetadata = React.forwardRef(({ children, className, ...nativeProps }, forwardedRef) => {
443
+ const classes = itemRecipe.useClassNames();
444
+ return <view {...mergeProps(forwardedRef ? { ref: forwardedRef } : {}, nativeProps)} className={clsx(classes.metadata, className)}>
445
+ {children}
446
+ </view>;
447
+ });
448
+ AttachmentInputItemMetadata.displayName = "AttachmentInputItemMetadata";
449
+ var AttachmentInputItemBadge = React.forwardRef(({ children, className, ...nativeProps }, forwardedRef) => {
450
+ const classes = itemRecipe.useClassNames();
451
+ return <view {...mergeProps(forwardedRef ? { ref: forwardedRef } : {}, nativeProps)} className={clsx(classes.badge, className)}>
452
+ <text className={classes.badgeLabel}>{children}</text>
453
+ </view>;
454
+ });
455
+ AttachmentInputItemBadge.displayName = "AttachmentInputItemBadge";
456
+ var AttachmentInputItemActionButton = React.forwardRef(({ children, className, bindtap, ...nativeProps }, forwardedRef) => {
457
+ const classes = itemRecipe.useClassNames();
458
+ const actionChildren = toArray(children).map((child) => {
459
+ if (typeof child === "string" || typeof child === "number") return <text className={classes.actionLabel}>{child}</text>;
460
+ return child;
461
+ });
462
+ return <view {...mergeProps(forwardedRef ? { ref: forwardedRef } : {}, nativeProps, { bindtap })} className={clsx(classes.actionButton, className)}>
463
+ <IconSlotProvider value={{ classNames: { icon: classes.actionIcon } }}>
464
+ {actionChildren}
465
+ </IconSlotProvider>
466
+ </view>;
467
+ });
468
+ AttachmentInputItemActionButton.displayName = "AttachmentInputItemActionButton";
469
+ var AttachmentInputItemBackdrop = React.forwardRef(({ status, children, className, ...nativeProps }, forwardedRef) => {
470
+ const entry = useAttachmentInputItemContext();
471
+ const classes = itemRecipe.useClassNames();
472
+ if (entry.status !== status) return null;
473
+ return <view {...mergeProps(forwardedRef ? { ref: forwardedRef } : {}, nativeProps)} className={clsx(classes.backdrop, className)}>
474
+ {typeof children === "function" ? children(entry) : children}
475
+ </view>;
476
+ });
477
+ AttachmentInputItemBackdrop.displayName = "AttachmentInputItemBackdrop";
478
+ var AttachmentInputItemRemoveButton = React.forwardRef((props, forwardedRef) => {
479
+ const { children, className, bindtap, "main-thread:bindtap": mainThreadBindtap, "accessibility-element": accessibilityElement = true, "accessibility-traits": accessibilityTraits, ...nativeProps } = props;
480
+ const item = useAttachmentInputItemContext();
481
+ const context = useAttachmentInputContext();
482
+ const press = usePressTap({
483
+ disabled: context.readOnly,
484
+ onTap: (event) => {
485
+ context.removeFileEntry(item.id);
486
+ bindtap?.(event);
487
+ },
488
+ mainThreadOnTap: mainThreadBindtap
489
+ });
490
+ const classes = itemRecipe.useClassNames();
491
+ return <view {...mergeProps(forwardedRef ? { ref: forwardedRef } : {}, press, nativeProps)} accessibility-element={accessibilityElement} accessibility-traits={accessibilityTraits ?? (context.readOnly ? "disabled" : "button")} className={clsx(classes.removeButton, className)}>
492
+ <IconSlotProvider value={{ classNames: { icon: classes.removeIcon } }}>
493
+ {children}
494
+ </IconSlotProvider>
495
+ </view>;
496
+ });
497
+ AttachmentInputItemRemoveButton.displayName = "AttachmentInputItemRemoveButton";
498
+ var AttachmentInputContext = ({ children }) => children(useAttachmentInputContext());
499
+ var AttachmentInput = {
500
+ Root: AttachmentInputRoot,
501
+ Container: AttachmentInputContainer,
502
+ ItemGroup: AttachmentInputItemGroup,
503
+ Trigger: AttachmentInputTrigger,
504
+ TriggerIcon: AttachmentInputTriggerIcon,
505
+ TriggerItemCount: AttachmentInputTriggerItemCount,
506
+ Item: AttachmentInputItem,
507
+ ItemName: AttachmentInputItemName,
508
+ ItemSize: AttachmentInputItemSize,
509
+ ItemImage: AttachmentInputItemImage,
510
+ ItemThumbnail: AttachmentInputItemThumbnail,
511
+ ItemMetadata: AttachmentInputItemMetadata,
512
+ ItemBadge: AttachmentInputItemBadge,
513
+ ItemActionButton: AttachmentInputItemActionButton,
514
+ ItemBackdrop: AttachmentInputItemBackdrop,
515
+ ItemRemoveButton: AttachmentInputItemRemoveButton,
516
+ ItemSurface: AttachmentInputItemSurface,
517
+ Context: AttachmentInputContext
518
+ };
519
+ //#endregion
520
+ export { AttachmentInput, AttachmentInputContainer, AttachmentInputContext, AttachmentInputItem, AttachmentInputItemActionButton, AttachmentInputItemBackdrop, AttachmentInputItemBadge, AttachmentInputItemGroup, AttachmentInputItemImage, AttachmentInputItemMetadata, AttachmentInputItemName, AttachmentInputItemRemoveButton, AttachmentInputItemSize, AttachmentInputItemSurface, AttachmentInputItemThumbnail, AttachmentInputRoot, AttachmentInputTrigger, AttachmentInputTriggerIcon, AttachmentInputTriggerItemCount, useAttachmentInput, useAttachmentInputContext, useAttachmentInputItemContext };
@@ -0,0 +1,2 @@
1
+ export { AttachmentInput, AttachmentInputRoot, AttachmentInputContainer, AttachmentInputItemGroup, AttachmentInputTrigger, AttachmentInputTriggerIcon, AttachmentInputTriggerItemCount, AttachmentInputItem, AttachmentInputItemName, AttachmentInputItemSize, AttachmentInputItemImage, AttachmentInputItemThumbnail, AttachmentInputItemMetadata, AttachmentInputItemBadge, AttachmentInputItemActionButton, AttachmentInputItemBackdrop, AttachmentInputItemSurface, AttachmentInputItemRemoveButton, AttachmentInputContext, useAttachmentInput, useAttachmentInputContext, useAttachmentInputItemContext, type NativeFile, type AttachmentFileError, type AttachmentFileRejection, type AttachmentFileStatusDetails, type AttachmentFileEntry, type AttachmentInputProps, type AttachmentInputStateProps, type AttachmentInputContextValue, type AttachmentInputRootProps, type AttachmentInputContainerProps, type AttachmentInputItemGroupProps, type AttachmentInputTriggerProps, type AttachmentInputTriggerIconProps, type AttachmentInputTriggerItemCountProps, type AttachmentInputItemProps, type AttachmentInputItemNameProps, type AttachmentInputItemSizeProps, type AttachmentInputItemSurfaceProps, type AttachmentInputItemImageProps, type AttachmentInputItemThumbnailProps, type AttachmentInputItemMetadataProps, type AttachmentInputItemBadgeProps, type AttachmentInputItemBackdropProps, type AttachmentInputItemActionButtonProps, type AttachmentInputItemRemoveButtonProps, } from './AttachmentInput';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/AttachmentInput/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,wBAAwB,EACxB,wBAAwB,EACxB,sBAAsB,EACtB,0BAA0B,EAC1B,+BAA+B,EAC/B,mBAAmB,EACnB,uBAAuB,EACvB,uBAAuB,EACvB,wBAAwB,EACxB,4BAA4B,EAC5B,2BAA2B,EAC3B,wBAAwB,EACxB,+BAA+B,EAC/B,2BAA2B,EAC3B,0BAA0B,EAC1B,+BAA+B,EAC/B,sBAAsB,EACtB,kBAAkB,EAClB,yBAAyB,EACzB,6BAA6B,EAC7B,KAAK,UAAU,EACf,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,2BAA2B,EAChC,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,2BAA2B,EAChC,KAAK,wBAAwB,EAC7B,KAAK,6BAA6B,EAClC,KAAK,6BAA6B,EAClC,KAAK,2BAA2B,EAChC,KAAK,+BAA+B,EACpC,KAAK,oCAAoC,EACzC,KAAK,wBAAwB,EAC7B,KAAK,4BAA4B,EACjC,KAAK,4BAA4B,EACjC,KAAK,+BAA+B,EACpC,KAAK,6BAA6B,EAClC,KAAK,iCAAiC,EACtC,KAAK,gCAAgC,EACrC,KAAK,6BAA6B,EAClC,KAAK,gCAAgC,EACrC,KAAK,oCAAoC,EACzC,KAAK,oCAAoC,GAC1C,MAAM,mBAAmB,CAAC"}
@@ -73,7 +73,7 @@ export interface BottomSheetHeaderProps extends BottomSheetSlotProps {
73
73
  export declare const BottomSheetHeader: LynxForwardRefComponent<unknown, BottomSheetSlotProps>;
74
74
  export interface BottomSheetBodyProps extends BottomSheetSlotProps {
75
75
  }
76
- export declare const BottomSheetBody: LynxForwardRefComponent<unknown, BottomSheetBodyProps>;
76
+ export declare const BottomSheetBody: LynxForwardRefComponent<unknown, BottomSheetSlotProps>;
77
77
  export interface BottomSheetFooterProps extends BottomSheetSlotProps {
78
78
  }
79
79
  export declare const BottomSheetFooter: LynxForwardRefComponent<unknown, BottomSheetSlotProps>;
@@ -1 +1 @@
1
- {"version":3,"file":"BottomSheet.d.ts","sourceRoot":"","sources":["../../../src/components/BottomSheet/BottomSheet.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAML,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,YAAY,EAEjB,KAAK,cAAc,EACpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAML,KAAK,yBAAyB,EAC9B,KAAK,eAAe,EACpB,KAAK,YAAY,EAEjB,KAAK,aAAa,EACnB,MAAM,gBAAgB,CAAC;AAIxB,OAAO,KAAK,EACV,kBAAkB,EAClB,sBAAsB,EAGvB,MAAM,aAAa,CAAC;AAKrB,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,yBAAyB,CAC5D,eAAe,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CACtC,CAAC;AAmEF,MAAM,MAAM,kBAAkB,GAAG,YAAY,CAAC;AAE9C,MAAM,WAAW,oBACf,SAAQ,uBAAuB,EAC7B,IAAI,CAAC,cAAc,EAAE,MAAM,GAAG,aAAa,GAAG,cAAc,CAAC;IAC/D;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACxC;AAED;;;;;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{
148
148
  }
149
149
  var BottomSheetHeader = createViewSlot("header");
150
150
  BottomSheetHeader.displayName = "BottomSheetHeader";
151
- var BottomSheetBody = forwardRef((props, ref) => {
152
- const { children, className, style } = props;
153
- const classNames = useClassNames();
154
- return <scroll-view {...ref ? { ref } : {}} scroll-y className={clsx(classNames.body, className)} style={style}>
155
- {children}
156
- </scroll-view>;
157
- });
151
+ var BottomSheetBody = createViewSlot("body");
158
152
  BottomSheetBody.displayName = "BottomSheetBody";
159
153
  var BottomSheetFooter = createViewSlot("footer");
160
154
  BottomSheetFooter.displayName = "BottomSheetFooter";
@@ -1,5 +1,5 @@
1
- import { useControllableState } from "../../hooks/useControllableState.js";
2
- import { usePressTap } from "../../hooks/usePressTap.js";
1
+ import { useControllableState } from "../../packages/lynx-react-headless/use-controllable-state/lib/index.js";
2
+ import { usePressTap } from "../../packages/lynx-react-headless/use-press-tap/lib/index.js";
3
3
  import { useScaleFeedback } from "../../hooks/useScaleFeedback.js";
4
4
  import { mergeProps } from "../../utils/merge-props.js";
5
5
  import { createSlotRecipeContext } from "../../utils/create-slot-recipe-context.jsx";
@@ -1,5 +1,5 @@
1
- import { useControllableState } from "../../hooks/useControllableState.js";
2
- import { usePressTap } from "../../hooks/usePressTap.js";
1
+ import { useControllableState } from "../../packages/lynx-react-headless/use-controllable-state/lib/index.js";
2
+ import { usePressTap } from "../../packages/lynx-react-headless/use-press-tap/lib/index.js";
3
3
  import { useScaleFeedback } from "../../hooks/useScaleFeedback.js";
4
4
  import { mergeProps } from "../../utils/merge-props.js";
5
5
  import { InternalIcon } from "../Icon/Icon.jsx";
@@ -1,5 +1,5 @@
1
- import { useControllableState } from "../../hooks/useControllableState.js";
2
- import { usePressTap } from "../../hooks/usePressTap.js";
1
+ import { useControllableState } from "../../packages/lynx-react-headless/use-controllable-state/lib/index.js";
2
+ import { usePressTap } from "../../packages/lynx-react-headless/use-press-tap/lib/index.js";
3
3
  import { useScaleFeedback } from "../../hooks/useScaleFeedback.js";
4
4
  import { mergeProps } from "../../utils/merge-props.js";
5
5
  import { createSlotRecipeContext } from "../../utils/create-slot-recipe-context.jsx";
@@ -0,0 +1,41 @@
1
+ import { ChipTabsVariantProps } from '@seed-design/lynx-css/recipes/chip-tabs';
2
+ import { TabsCarouselCameraProps, TabsCarouselProps, TabsContentProps, TabsListProps, TabsRootProps, TabsTriggerProps } from '../Tabs/Tabs';
3
+ import * as React from "@lynx-js/react";
4
+ type ChipTabsPublicVariantProps = Omit<ChipTabsVariantProps, "selected" | "pressed" | "disabled" | "inCarousel">;
5
+ /**
6
+ * @platform Lynx
7
+ *
8
+ * 웹 대비 미지원 기능:
9
+ * - `lazyMount`, `unmountOnExit`: native viewpager가 모든 page slot을 유지해야 함
10
+ * - 키보드 포커스와 roving tabindex
11
+ */
12
+ export interface ChipTabsRootProps extends Omit<TabsRootProps, "size" | "contentLayout" | "stickyList" | "triggerLayout">, ChipTabsPublicVariantProps {
13
+ }
14
+ /**
15
+ * Chip recipe와 Tabs의 controlled state, horizontal scrolling, and native pager behavior를 결합합니다.
16
+ */
17
+ export declare const ChipTabsRoot: React.ForwardRefExoticComponent<ChipTabsRootProps & React.RefAttributes<unknown>>;
18
+ export interface ChipTabsListProps extends Omit<TabsListProps, "scrollAlign"> {
19
+ /** 선택한 chip을 목록 안에서 정렬할 방식입니다. @defaultValue "nearest" */
20
+ scrollAlign?: TabsListProps["scrollAlign"];
21
+ }
22
+ /**
23
+ * ChipTabs는 이미 보이는 선택 chip을 움직이지 않도록 기본적으로 `"nearest"`를 사용합니다.
24
+ */
25
+ export declare const ChipTabsList: React.ForwardRefExoticComponent<Omit<ChipTabsListProps, "ref"> & React.RefAttributes<unknown>>;
26
+ /** Native text label and optional inline notification slot을 갖는 chip trigger입니다. */
27
+ export interface ChipTabsTriggerProps extends TabsTriggerProps {
28
+ }
29
+ export declare const ChipTabsTrigger: React.ForwardRefExoticComponent<TabsTriggerProps & React.RefAttributes<unknown>>;
30
+ export interface ChipTabsContentProps extends TabsContentProps {
31
+ }
32
+ export declare const ChipTabsContent: React.ForwardRefExoticComponent<TabsContentProps & React.RefAttributes<unknown>>;
33
+ /** @platform Lynx native viewpager를 사용하므로 Tabs Carousel의 미지원 prop과 동일합니다. */
34
+ export interface ChipTabsCarouselProps extends TabsCarouselProps {
35
+ }
36
+ export declare const ChipTabsCarousel: React.ForwardRefExoticComponent<TabsCarouselProps & React.RefAttributes<unknown>>;
37
+ export interface ChipTabsCarouselCameraProps extends TabsCarouselCameraProps {
38
+ }
39
+ export declare const ChipTabsCarouselCamera: React.ForwardRefExoticComponent<TabsCarouselCameraProps & React.RefAttributes<unknown>>;
40
+ export {};
41
+ //# sourceMappingURL=ChipTabs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChipTabs.d.ts","sourceRoot":"","sources":["../../../src/components/ChipTabs/ChipTabs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AAExC,OAAO,EAAY,KAAK,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAI9F,OAAO,EAOL,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACtB,MAAM,cAAc,CAAC;AAUtB,KAAK,0BAA0B,GAAG,IAAI,CACpC,oBAAoB,EACpB,UAAU,GAAG,SAAS,GAAG,UAAU,GAAG,YAAY,CACnD,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,WAAW,iBACf,SAAQ,IAAI,CAAC,aAAa,EAAE,MAAM,GAAG,eAAe,GAAG,YAAY,GAAG,eAAe,CAAC,EACpF,0BAA0B;CAAG;AAEjC;;GAEG;AACH,eAAO,MAAM,YAAY,mFA0BvB,CAAC;AAKH,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,aAAa,EAAE,aAAa,CAAC;IAC3E,0DAA0D;IAC1D,WAAW,CAAC,EAAE,aAAa,CAAC,aAA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