@moduix/react-tailwind 1.0.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 (380) hide show
  1. package/LICENSE.md +9 -0
  2. package/README.md +130 -0
  3. package/THIRD_PARTY_NOTICES.md +49 -0
  4. package/dist/components/accordion/Accordion.d.ts +13 -0
  5. package/dist/components/accordion/Accordion.js +78 -0
  6. package/dist/components/accordion/index.d.ts +1 -0
  7. package/dist/components/accordion/index.js +1 -0
  8. package/dist/components/alert/Alert.d.ts +14 -0
  9. package/dist/components/alert/Alert.js +93 -0
  10. package/dist/components/alert/index.d.ts +1 -0
  11. package/dist/components/alert/index.js +1 -0
  12. package/dist/components/angle-slider/AngleSlider.d.ts +26 -0
  13. package/dist/components/angle-slider/AngleSlider.js +107 -0
  14. package/dist/components/angle-slider/index.d.ts +1 -0
  15. package/dist/components/angle-slider/index.js +1 -0
  16. package/dist/components/aspect-ratio/AspectRatio.d.ts +8 -0
  17. package/dist/components/aspect-ratio/AspectRatio.js +23 -0
  18. package/dist/components/aspect-ratio/index.d.ts +1 -0
  19. package/dist/components/aspect-ratio/index.js +1 -0
  20. package/dist/components/avatar/Avatar.d.ts +17 -0
  21. package/dist/components/avatar/Avatar.js +66 -0
  22. package/dist/components/avatar/index.d.ts +1 -0
  23. package/dist/components/avatar/index.js +1 -0
  24. package/dist/components/badge/Badge.d.ts +11 -0
  25. package/dist/components/badge/Badge.js +60 -0
  26. package/dist/components/badge/index.d.ts +1 -0
  27. package/dist/components/badge/index.js +1 -0
  28. package/dist/components/bleed/Bleed.d.ts +12 -0
  29. package/dist/components/bleed/Bleed.js +49 -0
  30. package/dist/components/bleed/index.d.ts +1 -0
  31. package/dist/components/bleed/index.js +1 -0
  32. package/dist/components/breadcrumbs/Breadcrumbs.d.ts +21 -0
  33. package/dist/components/breadcrumbs/Breadcrumbs.js +105 -0
  34. package/dist/components/breadcrumbs/index.d.ts +1 -0
  35. package/dist/components/breadcrumbs/index.js +1 -0
  36. package/dist/components/button/Button.d.ts +18 -0
  37. package/dist/components/button/Button.js +84 -0
  38. package/dist/components/button/index.d.ts +1 -0
  39. package/dist/components/button/index.js +1 -0
  40. package/dist/components/card/Card.d.ts +19 -0
  41. package/dist/components/card/Card.js +135 -0
  42. package/dist/components/card/index.d.ts +1 -0
  43. package/dist/components/card/index.js +1 -0
  44. package/dist/components/carousel/Carousel.d.ts +20 -0
  45. package/dist/components/carousel/Carousel.js +145 -0
  46. package/dist/components/carousel/index.d.ts +1 -0
  47. package/dist/components/carousel/index.js +1 -0
  48. package/dist/components/chart/Chart.d.ts +18 -0
  49. package/dist/components/chart/Chart.js +183 -0
  50. package/dist/components/chart/index.d.ts +1 -0
  51. package/dist/components/chart/index.js +1 -0
  52. package/dist/components/checkbox/Checkbox.d.ts +20 -0
  53. package/dist/components/checkbox/Checkbox.js +83 -0
  54. package/dist/components/checkbox/index.d.ts +1 -0
  55. package/dist/components/checkbox/index.js +1 -0
  56. package/dist/components/clipboard/Clipboard.d.ts +15 -0
  57. package/dist/components/clipboard/Clipboard.js +105 -0
  58. package/dist/components/clipboard/index.d.ts +1 -0
  59. package/dist/components/clipboard/index.js +1 -0
  60. package/dist/components/close-button/CloseButton.d.ts +14 -0
  61. package/dist/components/close-button/CloseButton.js +50 -0
  62. package/dist/components/close-button/index.d.ts +1 -0
  63. package/dist/components/close-button/index.js +1 -0
  64. package/dist/components/collapsible/Collapsible.d.ts +11 -0
  65. package/dist/components/collapsible/Collapsible.js +67 -0
  66. package/dist/components/collapsible/index.d.ts +1 -0
  67. package/dist/components/collapsible/index.js +1 -0
  68. package/dist/components/color-picker/ColorPicker.d.ts +38 -0
  69. package/dist/components/color-picker/ColorPicker.js +354 -0
  70. package/dist/components/color-picker/index.d.ts +1 -0
  71. package/dist/components/color-picker/index.js +1 -0
  72. package/dist/components/combobox/Combobox.d.ts +30 -0
  73. package/dist/components/combobox/Combobox.js +208 -0
  74. package/dist/components/combobox/index.d.ts +1 -0
  75. package/dist/components/combobox/index.js +1 -0
  76. package/dist/components/command-palette/CommandPalette.d.ts +45 -0
  77. package/dist/components/command-palette/CommandPalette.js +376 -0
  78. package/dist/components/command-palette/index.d.ts +1 -0
  79. package/dist/components/command-palette/index.js +1 -0
  80. package/dist/components/container/Container.d.ts +12 -0
  81. package/dist/components/container/Container.js +123 -0
  82. package/dist/components/container/index.d.ts +1 -0
  83. package/dist/components/container/index.js +1 -0
  84. package/dist/components/date-input/DateInput.d.ts +17 -0
  85. package/dist/components/date-input/DateInput.js +87 -0
  86. package/dist/components/date-input/index.d.ts +1 -0
  87. package/dist/components/date-input/index.js +1 -0
  88. package/dist/components/date-picker/DatePicker.d.ts +66 -0
  89. package/dist/components/date-picker/DatePicker.js +430 -0
  90. package/dist/components/date-picker/index.d.ts +2 -0
  91. package/dist/components/date-picker/index.js +1 -0
  92. package/dist/components/dialog/Dialog.d.ts +25 -0
  93. package/dist/components/dialog/Dialog.js +147 -0
  94. package/dist/components/dialog/index.d.ts +2 -0
  95. package/dist/components/dialog/index.js +1 -0
  96. package/dist/components/drawer/Drawer.d.ts +40 -0
  97. package/dist/components/drawer/Drawer.js +202 -0
  98. package/dist/components/drawer/index.d.ts +1 -0
  99. package/dist/components/drawer/index.js +1 -0
  100. package/dist/components/editable/Editable.d.ts +16 -0
  101. package/dist/components/editable/Editable.js +120 -0
  102. package/dist/components/editable/index.d.ts +1 -0
  103. package/dist/components/editable/index.js +1 -0
  104. package/dist/components/empty/Empty.d.ts +9 -0
  105. package/dist/components/empty/Empty.js +73 -0
  106. package/dist/components/empty/index.d.ts +1 -0
  107. package/dist/components/empty/index.js +1 -0
  108. package/dist/components/field/Field.d.ts +17 -0
  109. package/dist/components/field/Field.js +103 -0
  110. package/dist/components/field/index.d.ts +1 -0
  111. package/dist/components/field/index.js +1 -0
  112. package/dist/components/fieldset/Fieldset.d.ts +10 -0
  113. package/dist/components/fieldset/Fieldset.js +54 -0
  114. package/dist/components/fieldset/index.d.ts +1 -0
  115. package/dist/components/fieldset/index.js +1 -0
  116. package/dist/components/file-upload/FileUpload.d.ts +31 -0
  117. package/dist/components/file-upload/FileUpload.js +199 -0
  118. package/dist/components/file-upload/index.d.ts +1 -0
  119. package/dist/components/file-upload/index.js +1 -0
  120. package/dist/components/floating-panel/FloatingPanel.d.ts +34 -0
  121. package/dist/components/floating-panel/FloatingPanel.js +209 -0
  122. package/dist/components/floating-panel/index.d.ts +1 -0
  123. package/dist/components/floating-panel/index.js +1 -0
  124. package/dist/components/heading/Heading.d.ts +15 -0
  125. package/dist/components/heading/Heading.js +60 -0
  126. package/dist/components/heading/index.d.ts +1 -0
  127. package/dist/components/heading/index.js +1 -0
  128. package/dist/components/highlight/Highlight.d.ts +7 -0
  129. package/dist/components/highlight/Highlight.js +16 -0
  130. package/dist/components/highlight/index.d.ts +1 -0
  131. package/dist/components/highlight/index.js +1 -0
  132. package/dist/components/hover-card/HoverCard.d.ts +19 -0
  133. package/dist/components/hover-card/HoverCard.js +93 -0
  134. package/dist/components/hover-card/index.d.ts +1 -0
  135. package/dist/components/hover-card/index.js +1 -0
  136. package/dist/components/image/Image.d.ts +13 -0
  137. package/dist/components/image/Image.js +25 -0
  138. package/dist/components/image/index.d.ts +1 -0
  139. package/dist/components/image/index.js +1 -0
  140. package/dist/components/image-cropper/ImageCropper.d.ts +17 -0
  141. package/dist/components/image-cropper/ImageCropper.js +95 -0
  142. package/dist/components/image-cropper/index.d.ts +1 -0
  143. package/dist/components/image-cropper/index.js +1 -0
  144. package/dist/components/input/Input.d.ts +12 -0
  145. package/dist/components/input/Input.js +38 -0
  146. package/dist/components/input/index.d.ts +1 -0
  147. package/dist/components/input/index.js +1 -0
  148. package/dist/components/input-group/InputGroup.d.ts +25 -0
  149. package/dist/components/input-group/InputGroup.js +131 -0
  150. package/dist/components/input-group/index.d.ts +1 -0
  151. package/dist/components/input-group/index.js +1 -0
  152. package/dist/components/json-tree-view/JsonTreeView.d.ts +8 -0
  153. package/dist/components/json-tree-view/JsonTreeView.js +39 -0
  154. package/dist/components/json-tree-view/index.d.ts +1 -0
  155. package/dist/components/json-tree-view/index.js +1 -0
  156. package/dist/components/kbd/Kbd.d.ts +5 -0
  157. package/dist/components/kbd/Kbd.js +30 -0
  158. package/dist/components/kbd/index.d.ts +1 -0
  159. package/dist/components/kbd/index.js +1 -0
  160. package/dist/components/lightbox/Lightbox.d.ts +46 -0
  161. package/dist/components/lightbox/Lightbox.js +232 -0
  162. package/dist/components/lightbox/index.d.ts +2 -0
  163. package/dist/components/lightbox/index.js +1 -0
  164. package/dist/components/list/List.d.ts +21 -0
  165. package/dist/components/list/List.js +106 -0
  166. package/dist/components/list/index.d.ts +1 -0
  167. package/dist/components/list/index.js +1 -0
  168. package/dist/components/listbox/Listbox.d.ts +28 -0
  169. package/dist/components/listbox/Listbox.js +179 -0
  170. package/dist/components/listbox/index.d.ts +1 -0
  171. package/dist/components/listbox/index.js +1 -0
  172. package/dist/components/marquee/Marquee.d.ts +12 -0
  173. package/dist/components/marquee/Marquee.js +93 -0
  174. package/dist/components/marquee/index.d.ts +1 -0
  175. package/dist/components/marquee/index.js +1 -0
  176. package/dist/components/menu/Menu.d.ts +51 -0
  177. package/dist/components/menu/Menu.js +300 -0
  178. package/dist/components/menu/index.d.ts +1 -0
  179. package/dist/components/menu/index.js +1 -0
  180. package/dist/components/native-select/NativeSelect.d.ts +9 -0
  181. package/dist/components/native-select/NativeSelect.js +38 -0
  182. package/dist/components/native-select/index.d.ts +1 -0
  183. package/dist/components/native-select/index.js +1 -0
  184. package/dist/components/navigation-menu/NavigationMenu.d.ts +18 -0
  185. package/dist/components/navigation-menu/NavigationMenu.js +119 -0
  186. package/dist/components/navigation-menu/index.d.ts +1 -0
  187. package/dist/components/navigation-menu/index.js +1 -0
  188. package/dist/components/number-input/NumberInput.d.ts +18 -0
  189. package/dist/components/number-input/NumberInput.js +105 -0
  190. package/dist/components/number-input/index.d.ts +1 -0
  191. package/dist/components/number-input/index.js +1 -0
  192. package/dist/components/pagination/Pagination.d.ts +17 -0
  193. package/dist/components/pagination/Pagination.js +115 -0
  194. package/dist/components/pagination/index.d.ts +1 -0
  195. package/dist/components/pagination/index.js +1 -0
  196. package/dist/components/password-input/PasswordInput.d.ts +16 -0
  197. package/dist/components/password-input/PasswordInput.js +87 -0
  198. package/dist/components/password-input/index.d.ts +1 -0
  199. package/dist/components/password-input/index.js +1 -0
  200. package/dist/components/pin-input/PinInput.d.ts +19 -0
  201. package/dist/components/pin-input/PinInput.js +83 -0
  202. package/dist/components/pin-input/index.d.ts +1 -0
  203. package/dist/components/pin-input/index.js +1 -0
  204. package/dist/components/popover/Popover.d.ts +29 -0
  205. package/dist/components/popover/Popover.js +177 -0
  206. package/dist/components/popover/index.d.ts +1 -0
  207. package/dist/components/popover/index.js +1 -0
  208. package/dist/components/progress-circular/ProgressCircular.d.ts +18 -0
  209. package/dist/components/progress-circular/ProgressCircular.js +94 -0
  210. package/dist/components/progress-circular/index.d.ts +1 -0
  211. package/dist/components/progress-circular/index.js +1 -0
  212. package/dist/components/progress-linear/ProgressLinear.d.ts +14 -0
  213. package/dist/components/progress-linear/ProgressLinear.js +73 -0
  214. package/dist/components/progress-linear/index.d.ts +1 -0
  215. package/dist/components/progress-linear/index.js +1 -0
  216. package/dist/components/qr-code/QrCode.d.ts +11 -0
  217. package/dist/components/qr-code/QrCode.js +63 -0
  218. package/dist/components/qr-code/index.d.ts +1 -0
  219. package/dist/components/qr-code/index.js +1 -0
  220. package/dist/components/radio-group/RadioGroup.d.ts +25 -0
  221. package/dist/components/radio-group/RadioGroup.js +108 -0
  222. package/dist/components/radio-group/index.d.ts +2 -0
  223. package/dist/components/radio-group/index.js +1 -0
  224. package/dist/components/rating-group/RatingGroup.d.ts +27 -0
  225. package/dist/components/rating-group/RatingGroup.js +92 -0
  226. package/dist/components/rating-group/index.d.ts +2 -0
  227. package/dist/components/rating-group/index.js +1 -0
  228. package/dist/components/scroll-area/ScrollArea.d.ts +23 -0
  229. package/dist/components/scroll-area/ScrollArea.js +77 -0
  230. package/dist/components/scroll-area/index.d.ts +2 -0
  231. package/dist/components/scroll-area/index.js +1 -0
  232. package/dist/components/segment-group/SegmentGroup.d.ts +25 -0
  233. package/dist/components/segment-group/SegmentGroup.js +119 -0
  234. package/dist/components/segment-group/index.d.ts +1 -0
  235. package/dist/components/segment-group/index.js +1 -0
  236. package/dist/components/select/Select.d.ts +39 -0
  237. package/dist/components/select/Select.js +239 -0
  238. package/dist/components/select/index.d.ts +1 -0
  239. package/dist/components/select/index.js +1 -0
  240. package/dist/components/separator/Separator.d.ts +12 -0
  241. package/dist/components/separator/Separator.js +96 -0
  242. package/dist/components/separator/index.d.ts +1 -0
  243. package/dist/components/separator/index.js +1 -0
  244. package/dist/components/sidebar/Sidebar.d.ts +61 -0
  245. package/dist/components/sidebar/Sidebar.js +400 -0
  246. package/dist/components/sidebar/index.d.ts +1 -0
  247. package/dist/components/sidebar/index.js +1 -0
  248. package/dist/components/signature-pad/SignaturePad.d.ts +15 -0
  249. package/dist/components/signature-pad/SignaturePad.js +133 -0
  250. package/dist/components/signature-pad/index.d.ts +1 -0
  251. package/dist/components/signature-pad/index.js +1 -0
  252. package/dist/components/simple-grid/SimpleGrid.d.ts +16 -0
  253. package/dist/components/simple-grid/SimpleGrid.js +43 -0
  254. package/dist/components/simple-grid/index.d.ts +1 -0
  255. package/dist/components/simple-grid/index.js +1 -0
  256. package/dist/components/skeleton/Skeleton.d.ts +18 -0
  257. package/dist/components/skeleton/Skeleton.js +30 -0
  258. package/dist/components/skeleton/index.d.ts +1 -0
  259. package/dist/components/skeleton/index.js +1 -0
  260. package/dist/components/slider/Slider.d.ts +23 -0
  261. package/dist/components/slider/Slider.js +122 -0
  262. package/dist/components/slider/index.d.ts +1 -0
  263. package/dist/components/slider/index.js +1 -0
  264. package/dist/components/spinner/Spinner.d.ts +11 -0
  265. package/dist/components/spinner/Spinner.js +57 -0
  266. package/dist/components/spinner/index.d.ts +1 -0
  267. package/dist/components/spinner/index.js +1 -0
  268. package/dist/components/split-button/SplitButton.d.ts +36 -0
  269. package/dist/components/split-button/SplitButton.js +125 -0
  270. package/dist/components/split-button/index.d.ts +1 -0
  271. package/dist/components/split-button/index.js +1 -0
  272. package/dist/components/splitter/Splitter.d.ts +11 -0
  273. package/dist/components/splitter/Splitter.js +66 -0
  274. package/dist/components/splitter/index.d.ts +1 -0
  275. package/dist/components/splitter/index.js +1 -0
  276. package/dist/components/stack/Stack.d.ts +26 -0
  277. package/dist/components/stack/Stack.js +57 -0
  278. package/dist/components/stack/index.d.ts +1 -0
  279. package/dist/components/stack/index.js +1 -0
  280. package/dist/components/steps/Steps.d.ts +25 -0
  281. package/dist/components/steps/Steps.js +122 -0
  282. package/dist/components/steps/index.d.ts +1 -0
  283. package/dist/components/steps/index.js +1 -0
  284. package/dist/components/swap/Swap.d.ts +16 -0
  285. package/dist/components/swap/Swap.js +38 -0
  286. package/dist/components/swap/index.d.ts +1 -0
  287. package/dist/components/swap/index.js +1 -0
  288. package/dist/components/switch/Switch.d.ts +20 -0
  289. package/dist/components/switch/Switch.js +58 -0
  290. package/dist/components/switch/index.d.ts +1 -0
  291. package/dist/components/switch/index.js +1 -0
  292. package/dist/components/table/Table.d.ts +39 -0
  293. package/dist/components/table/Table.js +191 -0
  294. package/dist/components/table/index.d.ts +1 -0
  295. package/dist/components/table/index.js +1 -0
  296. package/dist/components/tabs/Tabs.d.ts +19 -0
  297. package/dist/components/tabs/Tabs.js +71 -0
  298. package/dist/components/tabs/index.d.ts +1 -0
  299. package/dist/components/tabs/index.js +1 -0
  300. package/dist/components/tag/Tag.d.ts +16 -0
  301. package/dist/components/tag/Tag.js +92 -0
  302. package/dist/components/tag/index.d.ts +1 -0
  303. package/dist/components/tag/index.js +1 -0
  304. package/dist/components/tags-input/TagsInput.d.ts +20 -0
  305. package/dist/components/tags-input/TagsInput.js +145 -0
  306. package/dist/components/tags-input/index.d.ts +1 -0
  307. package/dist/components/tags-input/index.js +1 -0
  308. package/dist/components/text/Text.d.ts +25 -0
  309. package/dist/components/text/Text.js +79 -0
  310. package/dist/components/text/index.d.ts +1 -0
  311. package/dist/components/text/index.js +1 -0
  312. package/dist/components/textarea/Textarea.d.ts +3 -0
  313. package/dist/components/textarea/Textarea.js +17 -0
  314. package/dist/components/textarea/index.d.ts +1 -0
  315. package/dist/components/textarea/index.js +1 -0
  316. package/dist/components/timer/Timer.d.ts +18 -0
  317. package/dist/components/timer/Timer.js +94 -0
  318. package/dist/components/timer/index.d.ts +1 -0
  319. package/dist/components/timer/index.js +1 -0
  320. package/dist/components/toast/Toast.d.ts +17 -0
  321. package/dist/components/toast/Toast.js +107 -0
  322. package/dist/components/toast/index.d.ts +1 -0
  323. package/dist/components/toast/index.js +1 -0
  324. package/dist/components/toc/Toc.d.ts +23 -0
  325. package/dist/components/toc/Toc.js +144 -0
  326. package/dist/components/toc/index.d.ts +1 -0
  327. package/dist/components/toc/index.js +1 -0
  328. package/dist/components/toggle/Toggle.d.ts +15 -0
  329. package/dist/components/toggle/Toggle.js +55 -0
  330. package/dist/components/toggle/index.d.ts +2 -0
  331. package/dist/components/toggle/index.js +1 -0
  332. package/dist/components/toggle-group/ToggleGroup.d.ts +24 -0
  333. package/dist/components/toggle-group/ToggleGroup.js +102 -0
  334. package/dist/components/toggle-group/index.d.ts +2 -0
  335. package/dist/components/toggle-group/index.js +1 -0
  336. package/dist/components/tooltip/Tooltip.d.ts +20 -0
  337. package/dist/components/tooltip/Tooltip.js +105 -0
  338. package/dist/components/tooltip/index.d.ts +1 -0
  339. package/dist/components/tooltip/index.js +1 -0
  340. package/dist/components/tour/Tour.d.ts +29 -0
  341. package/dist/components/tour/Tour.js +176 -0
  342. package/dist/components/tour/index.d.ts +1 -0
  343. package/dist/components/tour/index.js +1 -0
  344. package/dist/components/tree-view/TreeView.d.ts +38 -0
  345. package/dist/components/tree-view/TreeView.js +189 -0
  346. package/dist/components/tree-view/index.d.ts +1 -0
  347. package/dist/components/tree-view/index.js +1 -0
  348. package/dist/components/typeset/Typeset.d.ts +5 -0
  349. package/dist/components/typeset/Typeset.js +34 -0
  350. package/dist/components/typeset/Typeset.module.js +6 -0
  351. package/dist/components/typeset/Typeset_module.css +466 -0
  352. package/dist/components/typeset/index.d.ts +1 -0
  353. package/dist/components/typeset/index.js +1 -0
  354. package/dist/internal/cn.d.ts +2 -0
  355. package/dist/internal/cn.js +40 -0
  356. package/dist/internal/icons/ui/Icons.d.ts +24 -0
  357. package/dist/internal/icons/ui/Icons.js +229 -0
  358. package/dist/internal/icons/ui/index.d.ts +1 -0
  359. package/dist/internal/icons/ui/index.js +1 -0
  360. package/dist/internal/overlayPortal.d.ts +13 -0
  361. package/dist/internal/overlayPortal.js +20 -0
  362. package/dist/locale.d.ts +1 -0
  363. package/dist/locale.js +1 -0
  364. package/dist/presets/contrast.css +65 -0
  365. package/dist/presets/dense.css +78 -0
  366. package/dist/presets/soft.css +77 -0
  367. package/dist/styles/animations.css +371 -0
  368. package/dist/styles/borders.css +10 -0
  369. package/dist/styles/colors.css +122 -0
  370. package/dist/styles/opacity.css +5 -0
  371. package/dist/styles/radius.css +11 -0
  372. package/dist/styles/shadows.css +5 -0
  373. package/dist/styles/sizing.css +11 -0
  374. package/dist/styles/spacing.css +26 -0
  375. package/dist/styles/style.css +180 -0
  376. package/dist/styles/transforms.css +4 -0
  377. package/dist/styles/transitions.css +32 -0
  378. package/dist/styles/typography.css +37 -0
  379. package/dist/styles/z-index.css +13 -0
  380. package/package.json +459 -0
@@ -0,0 +1,400 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { ark } from "@ark-ui/react/factory";
4
+ import { createContext, forwardRef, useContext } from "react";
5
+ import { cn } from "../../internal/cn.js";
6
+ import { ChevronLeftIcon } from "../../internal/icons/ui/index.js";
7
+ import { Input } from "../input/index.js";
8
+ import { Separator } from "../separator/index.js";
9
+ import { Splitter, useSplitterContext } from "../splitter/index.js";
10
+ import { Tooltip } from "../tooltip/index.js";
11
+ const sidebarPanel = {
12
+ id: 'sidebar',
13
+ minSize: '3rem',
14
+ maxSize: '18rem',
15
+ collapsible: true,
16
+ collapsedSize: '3rem'
17
+ };
18
+ const contentPanel = {
19
+ id: 'content'
20
+ };
21
+ const defaultPanelsBySide = {
22
+ left: [
23
+ sidebarPanel,
24
+ contentPanel
25
+ ],
26
+ right: [
27
+ contentPanel,
28
+ sidebarPanel
29
+ ]
30
+ };
31
+ const SidebarConfigContext = /*#__PURE__*/ createContext({
32
+ panelId: 'sidebar',
33
+ side: 'left'
34
+ });
35
+ function getDefaultSidebarSize(side) {
36
+ if ('left' === side) return [
37
+ '16rem'
38
+ ];
39
+ const defaultSize = [];
40
+ defaultSize[1] = '16rem';
41
+ return defaultSize;
42
+ }
43
+ function getDefaultPanels(side, panelId) {
44
+ const panels = defaultPanelsBySide[side];
45
+ return panels.map((panel)=>'sidebar' === panel.id ? {
46
+ ...panel,
47
+ id: panelId
48
+ } : panel);
49
+ }
50
+ function toggleSidebarPanel(splitter, panelId) {
51
+ if (splitter.isPanelCollapsed(panelId)) return void splitter.expandPanel(panelId);
52
+ splitter.collapsePanel(panelId);
53
+ }
54
+ const Sidebar_SidebarRoot = /*#__PURE__*/ forwardRef(function({ className, defaultSize, panelId = 'sidebar', side = 'left', ...props }, ref) {
55
+ return /*#__PURE__*/ jsx(SidebarConfigContext.Provider, {
56
+ value: {
57
+ panelId,
58
+ side
59
+ },
60
+ children: /*#__PURE__*/ jsx(Splitter.Root, {
61
+ ...props,
62
+ ref: ref,
63
+ panels: getDefaultPanels(side, panelId),
64
+ defaultSize: defaultSize ?? getDefaultSidebarSize(side),
65
+ orientation: "horizontal",
66
+ "data-side": side,
67
+ "data-slot": "sidebar-root",
68
+ className: cn('isolate h-dvh min-h-96 w-full min-w-0 rounded-none border border-border bg-background text-foreground shadow-none', className)
69
+ })
70
+ });
71
+ });
72
+ function useSidebar() {
73
+ const config = useContext(SidebarConfigContext);
74
+ const splitter = useSplitterContext();
75
+ const collapsed = splitter.isPanelCollapsed(config.panelId);
76
+ return {
77
+ collapsed,
78
+ side: config.side,
79
+ state: collapsed ? 'collapsed' : 'expanded',
80
+ toggleSidebar: ()=>toggleSidebarPanel(splitter, config.panelId)
81
+ };
82
+ }
83
+ const Sidebar_SidebarPanel = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
84
+ const config = useContext(SidebarConfigContext);
85
+ const splitter = useSplitterContext();
86
+ const collapsed = splitter.isPanelCollapsed(config.panelId);
87
+ return /*#__PURE__*/ jsx(Splitter.Panel, {
88
+ ...props,
89
+ ref: ref,
90
+ id: config.panelId,
91
+ "data-side": config.side,
92
+ "data-slot": "sidebar-panel",
93
+ "data-state": collapsed ? 'collapsed' : 'expanded',
94
+ className: cn('group/sidebar-panel @container/sidebar-panel relative flex min-h-0 min-w-0 flex-col overflow-hidden bg-card p-0 text-card-foreground transition-colors duration-200 ease-in-out motion-reduce:transition-none', className)
95
+ });
96
+ });
97
+ const Sidebar_SidebarInset = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
98
+ const { side } = useContext(SidebarConfigContext);
99
+ return /*#__PURE__*/ jsx(Splitter.Panel, {
100
+ ...props,
101
+ ref: ref,
102
+ id: "content",
103
+ "data-side": side,
104
+ "data-slot": "sidebar-inset",
105
+ className: cn('relative min-w-0 overflow-auto bg-background p-0 text-foreground', className)
106
+ });
107
+ });
108
+ const Sidebar_SidebarResizeTrigger = /*#__PURE__*/ forwardRef(function({ children, className, 'aria-label': ariaLabel = 'Resize sidebar', ...props }, ref) {
109
+ const { panelId, side } = useContext(SidebarConfigContext);
110
+ const id = 'left' === side ? `${panelId}:content` : `content:${panelId}`;
111
+ return /*#__PURE__*/ jsx(Splitter.ResizeTrigger, {
112
+ ...props,
113
+ ref: ref,
114
+ id: id,
115
+ "aria-label": ariaLabel,
116
+ "data-side": side,
117
+ "data-slot": "sidebar-resize-trigger",
118
+ className: cn('z-2', className),
119
+ children: children
120
+ });
121
+ });
122
+ const Sidebar_SidebarTrigger = /*#__PURE__*/ forwardRef(function({ className, children, onClick, type = 'button', 'aria-label': ariaLabel = 'Toggle sidebar', ...props }, ref) {
123
+ const config = useContext(SidebarConfigContext);
124
+ const sidebar = useSplitterContext();
125
+ const collapsed = sidebar.isPanelCollapsed(config.panelId);
126
+ const handleClick = (event)=>{
127
+ onClick?.(event);
128
+ if (event.defaultPrevented) return;
129
+ toggleSidebarPanel(sidebar, config.panelId);
130
+ };
131
+ return /*#__PURE__*/ jsx(ark.button, {
132
+ ref: ref,
133
+ type: type,
134
+ "aria-label": ariaLabel,
135
+ "aria-expanded": !collapsed,
136
+ "data-scope": "sidebar",
137
+ "data-part": "trigger",
138
+ "data-side": config.side,
139
+ "data-slot": "sidebar-trigger",
140
+ "data-state": collapsed ? 'collapsed' : 'expanded',
141
+ className: cn('relative z-4 -mx-3.5 inline-flex size-7 flex-none translate-y-10 cursor-pointer items-center justify-center rounded-full border border-border bg-background p-0 text-muted-foreground shadow-sm outline-0 transition-[background-color,color,box-shadow] duration-200 ease-in-out', 'focus-visible:outline-offset-0.5 focus-visible:outline-2 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 motion-reduce:transition-none', '[&>svg]:size-4 [&>svg]:transition-transform [&>svg]:duration-200 [&>svg]:ease-in-out data-[side=left]:data-[state=collapsed]:[&>svg]:rotate-180 data-[side=right]:data-[state=expanded]:[&>svg]:rotate-180', 'hover:bg-accent hover:text-accent-foreground', className),
142
+ onClick: handleClick,
143
+ ...props,
144
+ children: children ?? /*#__PURE__*/ jsx(ChevronLeftIcon, {})
145
+ });
146
+ });
147
+ const Sidebar_SidebarLabel = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
148
+ return /*#__PURE__*/ jsx(ark.span, {
149
+ ref: ref,
150
+ "data-scope": "sidebar",
151
+ "data-part": "label",
152
+ "data-slot": "sidebar-label",
153
+ className: cn('min-w-0 truncate group-data-[state=collapsed]/sidebar-panel:sr-only', className),
154
+ ...props
155
+ });
156
+ });
157
+ const Sidebar_SidebarHeader = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
158
+ return /*#__PURE__*/ jsx(ark.header, {
159
+ ref: ref,
160
+ "data-scope": "sidebar",
161
+ "data-part": "header",
162
+ "data-slot": "sidebar-header",
163
+ className: cn('flex flex-none items-center gap-2 p-3 group-data-[state=collapsed]/sidebar-panel:justify-center group-data-[state=collapsed]/sidebar-panel:px-1 [&>*:only-child]:w-full group-data-[state=collapsed]/sidebar-panel:[&>*:only-child]:w-auto', className),
164
+ ...props
165
+ });
166
+ });
167
+ const Sidebar_SidebarContent = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
168
+ return /*#__PURE__*/ jsx(ark.div, {
169
+ ref: ref,
170
+ "data-scope": "sidebar",
171
+ "data-part": "content",
172
+ "data-slot": "sidebar-content",
173
+ className: cn('flex min-h-0 flex-auto [scrollbar-gutter:stable] flex-col overflow-auto overscroll-contain group-data-[state=collapsed]/sidebar-panel:[scrollbar-width:none] group-data-[state=collapsed]/sidebar-panel:[scrollbar-gutter:auto] group-data-[state=collapsed]/sidebar-panel:overflow-x-hidden group-data-[state=collapsed]/sidebar-panel:overflow-y-auto', className),
174
+ ...props
175
+ });
176
+ });
177
+ const Sidebar_SidebarExpandedContent = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
178
+ const { collapsed } = useSidebar();
179
+ return /*#__PURE__*/ jsx(ark.div, {
180
+ ref: ref,
181
+ "data-scope": "sidebar",
182
+ "data-part": "expanded-content",
183
+ "data-slot": "sidebar-expanded-content",
184
+ className: className,
185
+ ...props,
186
+ hidden: collapsed
187
+ });
188
+ });
189
+ const Sidebar_SidebarCollapsedContent = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
190
+ const { collapsed } = useSidebar();
191
+ return /*#__PURE__*/ jsx(ark.div, {
192
+ ref: ref,
193
+ "data-scope": "sidebar",
194
+ "data-part": "collapsed-content",
195
+ "data-slot": "sidebar-collapsed-content",
196
+ className: className,
197
+ ...props,
198
+ hidden: !collapsed
199
+ });
200
+ });
201
+ const Sidebar_SidebarFooter = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
202
+ return /*#__PURE__*/ jsx(ark.footer, {
203
+ ref: ref,
204
+ "data-scope": "sidebar",
205
+ "data-part": "footer",
206
+ "data-slot": "sidebar-footer",
207
+ className: cn('flex flex-none items-center gap-2 p-3 group-data-[state=collapsed]/sidebar-panel:justify-center group-data-[state=collapsed]/sidebar-panel:px-1', className),
208
+ ...props
209
+ });
210
+ });
211
+ const Sidebar_SidebarGroup = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
212
+ return /*#__PURE__*/ jsx(ark.section, {
213
+ ref: ref,
214
+ "data-scope": "sidebar",
215
+ "data-part": "group",
216
+ "data-slot": "sidebar-group",
217
+ className: cn('flex flex-col gap-1 p-3 group-data-[state=collapsed]/sidebar-panel:px-1', className),
218
+ ...props
219
+ });
220
+ });
221
+ const Sidebar_SidebarGroupHeader = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
222
+ return /*#__PURE__*/ jsx(ark.div, {
223
+ ref: ref,
224
+ "data-scope": "sidebar",
225
+ "data-part": "group-header",
226
+ "data-slot": "sidebar-group-header",
227
+ className: cn('flex min-w-0 items-center gap-2', className),
228
+ ...props
229
+ });
230
+ });
231
+ const Sidebar_SidebarGroupLabel = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
232
+ return /*#__PURE__*/ jsx(ark.h3, {
233
+ ref: ref,
234
+ "data-scope": "sidebar",
235
+ "data-part": "group-label",
236
+ "data-slot": "sidebar-group-label",
237
+ className: cn('min-w-0 flex-1 truncate px-2 text-xs leading-4 font-medium text-muted-foreground group-data-[state=collapsed]/sidebar-panel:sr-only', className),
238
+ ...props
239
+ });
240
+ });
241
+ const Sidebar_SidebarGroupAction = /*#__PURE__*/ forwardRef(function({ className, type = 'button', ...props }, ref) {
242
+ return /*#__PURE__*/ jsx(ark.button, {
243
+ ref: ref,
244
+ type: type,
245
+ "data-scope": "sidebar",
246
+ "data-part": "group-action",
247
+ "data-slot": "sidebar-group-action",
248
+ className: cn('focus-visible:outline-offset-0.5 me-2 inline-flex size-control-xs flex-none cursor-pointer items-center justify-center rounded-md p-0 text-muted-foreground outline-0 transition-colors duration-200 ease-in-out hover:bg-accent hover:text-accent-foreground focus-visible:outline-2 focus-visible:outline-ring motion-reduce:transition-none @max-[7rem]:hidden [&>svg]:size-4', className),
249
+ ...props
250
+ });
251
+ });
252
+ const Sidebar_SidebarNavigationList = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
253
+ return /*#__PURE__*/ jsx(ark.ul, {
254
+ ref: ref,
255
+ "data-scope": "sidebar",
256
+ "data-part": "navigation-list",
257
+ "data-slot": "sidebar-navigation-list",
258
+ className: cn('flex w-full min-w-0 flex-col gap-1', className),
259
+ ...props
260
+ });
261
+ });
262
+ const Sidebar_SidebarNavigationItem = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
263
+ return /*#__PURE__*/ jsx(ark.li, {
264
+ ref: ref,
265
+ "data-scope": "sidebar",
266
+ "data-part": "navigation-item",
267
+ "data-slot": "sidebar-navigation-item",
268
+ className: cn('relative min-w-0', className),
269
+ ...props
270
+ });
271
+ });
272
+ const Sidebar_SidebarNavigationButton = /*#__PURE__*/ forwardRef(function({ active = false, className, size = 'md', type = 'button', 'aria-current': ariaCurrent, ...props }, ref) {
273
+ return /*#__PURE__*/ jsx(ark.button, {
274
+ ref: ref,
275
+ type: type,
276
+ "aria-current": ariaCurrent ?? (active ? 'page' : void 0),
277
+ "data-scope": "sidebar",
278
+ "data-part": "navigation-button",
279
+ "data-slot": "sidebar-navigation-button",
280
+ "data-active": active ? '' : void 0,
281
+ "data-size": size,
282
+ className: cn('flex w-full min-w-0 cursor-pointer items-center gap-2 overflow-hidden rounded-md px-2 py-1 text-start text-sm leading-5 text-ellipsis whitespace-nowrap text-card-foreground outline-0 transition-colors duration-200 ease-in-out has-[+_[data-slot=sidebar-navigation-badge]]:pe-10 @max-[7rem]:has-[+_[data-slot=sidebar-navigation-badge]]:pe-2', 'focus-visible:outline-offset-0.5 focus-visible:outline-2 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-active:bg-accent data-active:font-medium data-active:text-accent-foreground motion-reduce:transition-none [&:not(:disabled):not([aria-disabled=true])]:hover:bg-accent [&:not(:disabled):not([aria-disabled=true])]:hover:text-accent-foreground', 'group-data-[state=collapsed]/sidebar-panel:mx-auto group-data-[state=collapsed]/sidebar-panel:min-h-control-md group-data-[state=collapsed]/sidebar-panel:w-control-md group-data-[state=collapsed]/sidebar-panel:justify-center group-data-[state=collapsed]/sidebar-panel:bg-transparent group-data-[state=collapsed]/sidebar-panel:px-0 group-data-[state=collapsed]/sidebar-panel:hover:bg-transparent', '[&>[data-sidebar-icon]]:shrink-0 [&>span:last-child]:min-w-0 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0', '[&>[data-scope=select][data-part=indicator]]:ms-auto @max-[7rem]:[&>[data-scope=select][data-part=indicator]]:hidden', '[&>[data-slot=collapsible-indicator]]:ms-auto [&>[data-slot=collapsible-indicator]]:size-control-xs @max-[7rem]:[&>[data-slot=collapsible-indicator]]:hidden [&>[data-slot=collapsible-indicator]>svg]:size-3', '[&>[data-slot=menu-indicator]]:ms-auto [&>[data-slot=menu-indicator]]:size-control-xs [&>[data-slot=menu-indicator]]:leading-none [&>[data-slot=menu-indicator]]:text-muted-foreground @max-[7rem]:[&>[data-slot=menu-indicator]]:hidden [&>[data-slot=menu-indicator]>svg]:block [&>[data-slot=menu-indicator]>svg]:size-4', 'sm' === size && 'min-h-control-sm text-xs', 'md' === size && 'min-h-control-md', 'lg' === size && 'min-h-control-lg', className),
283
+ ...props
284
+ });
285
+ });
286
+ const Sidebar_SidebarNavigationBadge = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
287
+ return /*#__PURE__*/ jsx(ark.span, {
288
+ ref: ref,
289
+ "data-scope": "sidebar",
290
+ "data-part": "navigation-badge",
291
+ "data-slot": "sidebar-navigation-badge",
292
+ className: cn('pointer-events-none absolute end-2.5 top-1/2 z-1 box-border inline-grid size-5 -translate-y-1/2 place-items-center rounded-full bg-primary p-0 text-[0.5625rem] leading-none font-medium text-primary-foreground tabular-nums @max-[7rem]:hidden', className),
293
+ ...props
294
+ });
295
+ });
296
+ const Sidebar_SidebarNavigationSubList = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
297
+ return /*#__PURE__*/ jsx(ark.ul, {
298
+ ref: ref,
299
+ "data-scope": "sidebar",
300
+ "data-part": "navigation-sub-list",
301
+ "data-slot": "sidebar-navigation-sub-list",
302
+ className: cn('ms-4 mt-1 flex w-auto min-w-0 flex-col gap-1 border-s border-border ps-2 group-data-[state=collapsed]/sidebar-panel:hidden', className),
303
+ ...props
304
+ });
305
+ });
306
+ const Sidebar_SidebarNavigationSubItem = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
307
+ return /*#__PURE__*/ jsx(ark.li, {
308
+ ref: ref,
309
+ "data-scope": "sidebar",
310
+ "data-part": "navigation-sub-item",
311
+ "data-slot": "sidebar-navigation-sub-item",
312
+ className: cn('relative min-w-0', className),
313
+ ...props
314
+ });
315
+ });
316
+ const Sidebar_SidebarNavigationSubButton = /*#__PURE__*/ forwardRef(function({ active = false, children, className, 'aria-current': ariaCurrent, ...props }, ref) {
317
+ return /*#__PURE__*/ jsx(ark.a, {
318
+ ref: ref,
319
+ "aria-current": ariaCurrent ?? (active ? 'page' : void 0),
320
+ "data-scope": "sidebar",
321
+ "data-part": "navigation-sub-button",
322
+ "data-slot": "sidebar-navigation-sub-button",
323
+ "data-active": active ? '' : void 0,
324
+ className: cn('flex min-h-control-sm w-full min-w-0 cursor-pointer items-center gap-2 overflow-hidden rounded-md px-2 text-start text-sm leading-5 text-ellipsis whitespace-nowrap text-card-foreground outline-0 transition-[background-color,border-color,color,box-shadow] duration-200 ease-in-out has-[+_[data-slot=sidebar-navigation-badge]]:pe-10 @max-[7rem]:has-[+_[data-slot=sidebar-navigation-badge]]:pe-2', 'focus-visible:outline-offset-0.5 focus-visible:outline-2 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-active:bg-accent data-active:font-medium data-active:text-accent-foreground motion-reduce:transition-none [&:not(:disabled):not([aria-disabled=true])]:hover:bg-accent [&:not(:disabled):not([aria-disabled=true])]:hover:text-accent-foreground', '[&>[data-sidebar-icon]]:shrink-0 [&>span:last-child]:min-w-0 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0', className),
325
+ ...props,
326
+ children: 'string' == typeof children ? /*#__PURE__*/ jsx("span", {
327
+ "data-slot": "sidebar-navigation-sub-label",
328
+ children: children
329
+ }) : children
330
+ });
331
+ });
332
+ const Sidebar_SidebarTooltip = function({ children, content, openDelay = 200, closeDelay = 0, positioning, ...props }) {
333
+ const { collapsed, side } = useSidebar();
334
+ return /*#__PURE__*/ jsxs(Tooltip, {
335
+ ...props,
336
+ openDelay: openDelay,
337
+ closeDelay: closeDelay,
338
+ disabled: !collapsed,
339
+ positioning: {
340
+ placement: 'left' === side ? 'right' : 'left',
341
+ gutter: 8,
342
+ ...positioning
343
+ },
344
+ children: [
345
+ /*#__PURE__*/ jsx(Tooltip.Trigger, {
346
+ asChild: true,
347
+ children: children
348
+ }),
349
+ /*#__PURE__*/ jsx(Tooltip.Positioner, {
350
+ children: /*#__PURE__*/ jsx(Tooltip.Content, {
351
+ children: content
352
+ })
353
+ })
354
+ ]
355
+ });
356
+ };
357
+ const Sidebar_SidebarInput = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
358
+ return /*#__PURE__*/ jsx(Input.Root, {
359
+ ref: ref,
360
+ "data-slot": "sidebar-input",
361
+ className: cn('w-full group-data-[state=collapsed]/sidebar-panel:hidden', className),
362
+ ...props
363
+ });
364
+ });
365
+ const Sidebar_SidebarSeparator = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
366
+ return /*#__PURE__*/ jsx(Separator.Root, {
367
+ ref: ref,
368
+ "data-slot": "sidebar-separator",
369
+ className: cn('border-border', className),
370
+ ...props
371
+ });
372
+ });
373
+ const Sidebar = Object.assign(Sidebar_SidebarRoot, {
374
+ Root: Sidebar_SidebarRoot,
375
+ Panel: Sidebar_SidebarPanel,
376
+ Inset: Sidebar_SidebarInset,
377
+ ResizeTrigger: Sidebar_SidebarResizeTrigger,
378
+ Trigger: Sidebar_SidebarTrigger,
379
+ Label: Sidebar_SidebarLabel,
380
+ Input: Sidebar_SidebarInput,
381
+ Header: Sidebar_SidebarHeader,
382
+ Content: Sidebar_SidebarContent,
383
+ ExpandedContent: Sidebar_SidebarExpandedContent,
384
+ CollapsedContent: Sidebar_SidebarCollapsedContent,
385
+ Footer: Sidebar_SidebarFooter,
386
+ Separator: Sidebar_SidebarSeparator,
387
+ Group: Sidebar_SidebarGroup,
388
+ GroupHeader: Sidebar_SidebarGroupHeader,
389
+ GroupLabel: Sidebar_SidebarGroupLabel,
390
+ GroupAction: Sidebar_SidebarGroupAction,
391
+ NavigationList: Sidebar_SidebarNavigationList,
392
+ NavigationItem: Sidebar_SidebarNavigationItem,
393
+ Tooltip: Sidebar_SidebarTooltip,
394
+ NavigationButton: Sidebar_SidebarNavigationButton,
395
+ NavigationBadge: Sidebar_SidebarNavigationBadge,
396
+ NavigationSubList: Sidebar_SidebarNavigationSubList,
397
+ NavigationSubItem: Sidebar_SidebarNavigationSubItem,
398
+ NavigationSubButton: Sidebar_SidebarNavigationSubButton
399
+ });
400
+ export { Sidebar, useSidebar };
@@ -0,0 +1 @@
1
+ export { Sidebar, useSidebar } from './Sidebar.js';
@@ -0,0 +1 @@
1
+ export { Sidebar, useSidebar } from "./Sidebar.js";
@@ -0,0 +1,15 @@
1
+ import { SignaturePad as SignaturePadPrimitive, useSignaturePad as useSignaturePadPrimitive, useSignaturePadContext } from '@ark-ui/react/signature-pad';
2
+ declare function useSignaturePad(props?: Parameters<typeof useSignaturePadPrimitive>[0]): ReturnType<typeof useSignaturePadPrimitive>;
3
+ declare const SignaturePad: import("react").ForwardRefExoticComponent<Omit<SignaturePadPrimitive.RootProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>> & {
4
+ Root: import("react").ForwardRefExoticComponent<Omit<SignaturePadPrimitive.RootProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
5
+ RootProvider: import("react").ForwardRefExoticComponent<Omit<SignaturePadPrimitive.RootProviderProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
6
+ Context: (props: SignaturePadPrimitive.ContextProps) => import("react").ReactNode;
7
+ HiddenInput: import("react").ForwardRefExoticComponent<SignaturePadPrimitive.HiddenInputProps & import("react").RefAttributes<HTMLInputElement>>;
8
+ Label: import("react").ForwardRefExoticComponent<Omit<SignaturePadPrimitive.LabelProps & import("react").RefAttributes<HTMLLabelElement>, "ref"> & import("react").RefAttributes<HTMLLabelElement>>;
9
+ Control: import("react").ForwardRefExoticComponent<Omit<SignaturePadPrimitive.ControlProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
10
+ Canvas: import("react").ForwardRefExoticComponent<Omit<Omit<SignaturePadPrimitive.ControlProps & import("react").RefAttributes<HTMLDivElement>, "children">, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
11
+ Segment: import("react").ForwardRefExoticComponent<Omit<SignaturePadPrimitive.SegmentProps & import("react").RefAttributes<SVGSVGElement>, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
12
+ Guide: import("react").ForwardRefExoticComponent<Omit<SignaturePadPrimitive.GuideProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
13
+ ClearTrigger: import("react").ForwardRefExoticComponent<Omit<SignaturePadPrimitive.ClearTriggerProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
14
+ };
15
+ export { SignaturePad, useSignaturePad, useSignaturePadContext };
@@ -0,0 +1,133 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { useFieldContext } from "@ark-ui/react/field";
4
+ import { SignaturePad, useSignaturePad, useSignaturePadContext } from "@ark-ui/react/signature-pad";
5
+ import { createContext, forwardRef, useContext } from "react";
6
+ import { cn } from "../../internal/cn.js";
7
+ import { RotateCcwIcon } from "../../internal/icons/ui/index.js";
8
+ import { CloseButton } from "../close-button/index.js";
9
+ const SignaturePadReadOnlyContext = /*#__PURE__*/ createContext(false);
10
+ const signaturePadReadOnly = Symbol();
11
+ const SignaturePad_SignaturePadRoot = /*#__PURE__*/ forwardRef(function({ asChild, children, className, ...props }, ref) {
12
+ const field = useFieldContext();
13
+ const readOnly = props.readOnly ?? field?.readOnly ?? false;
14
+ return /*#__PURE__*/ jsx(SignaturePadReadOnlyContext.Provider, {
15
+ value: readOnly,
16
+ children: /*#__PURE__*/ jsx(SignaturePad.Root, {
17
+ ref: ref,
18
+ "data-slot": "signature-pad-root",
19
+ className: cn('box-border inline-flex w-70 max-w-full flex-col gap-2 text-foreground data-disabled:opacity-50', className),
20
+ asChild: asChild,
21
+ ...props,
22
+ children: children
23
+ })
24
+ });
25
+ });
26
+ const SignaturePad_SignaturePadRootProvider = /*#__PURE__*/ forwardRef(function({ asChild, children, className, ...props }, ref) {
27
+ const readOnly = props.value[signaturePadReadOnly] ?? false;
28
+ return /*#__PURE__*/ jsx(SignaturePadReadOnlyContext.Provider, {
29
+ value: readOnly,
30
+ children: /*#__PURE__*/ jsx(SignaturePad.RootProvider, {
31
+ ref: ref,
32
+ "data-slot": "signature-pad-root-provider",
33
+ className: cn('box-border inline-flex w-70 max-w-full flex-col gap-2 text-foreground data-disabled:opacity-50', className),
34
+ asChild: asChild,
35
+ ...props,
36
+ children: children
37
+ })
38
+ });
39
+ });
40
+ const SignaturePad_SignaturePadLabel = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
41
+ return /*#__PURE__*/ jsx(SignaturePad.Label, {
42
+ ref: ref,
43
+ "data-slot": "signature-pad-label",
44
+ className: cn('text-sm leading-5 font-medium text-foreground select-none', className),
45
+ ...props
46
+ });
47
+ });
48
+ const SignaturePad_SignaturePadControl = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
49
+ return /*#__PURE__*/ jsx(SignaturePad.Control, {
50
+ ref: ref,
51
+ "data-slot": "signature-pad-control",
52
+ className: cn('box-border h-40 min-h-40 w-full min-w-0 overflow-hidden rounded-md border border-border bg-background text-foreground shadow-sm transition-[border-color,box-shadow,opacity] duration-200 ease-in-out outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring data-disabled:cursor-not-allowed motion-reduce:transition-none', className),
53
+ ...props
54
+ });
55
+ });
56
+ const SignaturePad_SignaturePadSegment = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
57
+ return /*#__PURE__*/ jsx(SignaturePad.Segment, {
58
+ ref: ref,
59
+ "data-slot": "signature-pad-segment",
60
+ className: cn('fill-current', className),
61
+ ...props
62
+ });
63
+ });
64
+ const SignaturePad_SignaturePadGuide = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
65
+ return /*#__PURE__*/ jsx(SignaturePad.Guide, {
66
+ ref: ref,
67
+ "data-slot": "signature-pad-guide",
68
+ className: cn('pointer-events-none absolute start-6 end-6 bottom-8 border-b border-dashed border-border', className),
69
+ ...props
70
+ });
71
+ });
72
+ const SignaturePad_SignaturePadClearTrigger = /*#__PURE__*/ forwardRef(function({ asChild, className, children, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, ...props }, ref) {
73
+ const readOnly = useContext(SignaturePadReadOnlyContext);
74
+ const triggerClassName = cn('absolute end-2 top-2 border-0', className);
75
+ return /*#__PURE__*/ jsx(SignaturePad.ClearTrigger, {
76
+ ref: ref,
77
+ asChild: true,
78
+ "data-slot": "signature-pad-clear-trigger",
79
+ className: triggerClassName,
80
+ "aria-label": asChild ? ariaLabel : void 0,
81
+ "aria-labelledby": asChild ? ariaLabelledBy : void 0,
82
+ ...props,
83
+ disabled: readOnly || props.disabled,
84
+ children: asChild ? children : /*#__PURE__*/ jsx(CloseButton.Root, {
85
+ "aria-label": ariaLabel,
86
+ "aria-labelledby": ariaLabelledBy,
87
+ className: cn('size-7 rounded-sm bg-transparent text-muted-foreground focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ring motion-reduce:transition-none [&>svg]:size-4 [&>svg]:shrink-0 [@media(hover:hover)]:[&:not([data-disabled]):hover]:bg-accent [@media(hover:hover)]:[&:not([data-disabled]):hover]:text-foreground', className),
88
+ children: children ?? /*#__PURE__*/ jsx(RotateCcwIcon, {
89
+ className: "size-4",
90
+ "aria-hidden": "true"
91
+ })
92
+ })
93
+ });
94
+ });
95
+ const SignaturePad_SignaturePadCanvas = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
96
+ return /*#__PURE__*/ jsxs(SignaturePad_SignaturePadControl, {
97
+ ref: ref,
98
+ className: className,
99
+ ...props,
100
+ children: [
101
+ /*#__PURE__*/ jsx(SignaturePad_SignaturePadSegment, {}),
102
+ /*#__PURE__*/ jsx(SignaturePad_SignaturePadClearTrigger, {
103
+ children: /*#__PURE__*/ jsx(RotateCcwIcon, {
104
+ className: "size-4",
105
+ "aria-hidden": "true"
106
+ })
107
+ }),
108
+ /*#__PURE__*/ jsx(SignaturePad_SignaturePadGuide, {})
109
+ ]
110
+ });
111
+ });
112
+ function SignaturePad_useSignaturePad(props) {
113
+ const field = useFieldContext();
114
+ const signaturePad = useSignaturePad(props);
115
+ const api = {
116
+ ...signaturePad,
117
+ [signaturePadReadOnly]: props?.readOnly ?? field?.readOnly ?? false
118
+ };
119
+ return api;
120
+ }
121
+ const SignaturePad_SignaturePad = Object.assign(SignaturePad_SignaturePadRoot, {
122
+ Root: SignaturePad_SignaturePadRoot,
123
+ RootProvider: SignaturePad_SignaturePadRootProvider,
124
+ Context: SignaturePad.Context,
125
+ HiddenInput: SignaturePad.HiddenInput,
126
+ Label: SignaturePad_SignaturePadLabel,
127
+ Control: SignaturePad_SignaturePadControl,
128
+ Canvas: SignaturePad_SignaturePadCanvas,
129
+ Segment: SignaturePad_SignaturePadSegment,
130
+ Guide: SignaturePad_SignaturePadGuide,
131
+ ClearTrigger: SignaturePad_SignaturePadClearTrigger
132
+ });
133
+ export { SignaturePad_SignaturePad as SignaturePad, SignaturePad_useSignaturePad as useSignaturePad, useSignaturePadContext };
@@ -0,0 +1 @@
1
+ export { SignaturePad, useSignaturePad, useSignaturePadContext } from './SignaturePad.js';
@@ -0,0 +1 @@
1
+ export { SignaturePad, useSignaturePad, useSignaturePadContext } from "./SignaturePad.js";
@@ -0,0 +1,16 @@
1
+ declare const SimpleGrid: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & {
2
+ columns?: number;
3
+ minChildWidth?: number | string;
4
+ gap?: number | string;
5
+ rowGap?: number | string;
6
+ columnGap?: number | string;
7
+ } & import("react").RefAttributes<HTMLDivElement>> & {
8
+ Root: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & {
9
+ columns?: number;
10
+ minChildWidth?: number | string;
11
+ gap?: number | string;
12
+ rowGap?: number | string;
13
+ columnGap?: number | string;
14
+ } & import("react").RefAttributes<HTMLDivElement>>;
15
+ };
16
+ export { SimpleGrid };
@@ -0,0 +1,43 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { ark } from "@ark-ui/react/factory";
3
+ import { forwardRef } from "react";
4
+ import { cn } from "../../internal/cn.js";
5
+ const SimpleGrid_SimpleGridRoot = /*#__PURE__*/ forwardRef(function({ asChild, className, style, columns, minChildWidth, gap, rowGap, columnGap, ...props }, ref) {
6
+ if (null != columns && (!Number.isInteger(columns) || columns <= 0)) throw new Error('SimpleGrid `columns` must be a finite positive integer.');
7
+ if ('number' == typeof minChildWidth && (!Number.isFinite(minChildWidth) || minChildWidth < 0)) throw new Error('SimpleGrid `minChildWidth` must be a finite non-negative number.');
8
+ let gridTemplateColumns;
9
+ if (null != columns) gridTemplateColumns = `repeat(${columns}, minmax(0, 1fr))`;
10
+ if (null != minChildWidth) {
11
+ const width = 'number' == typeof minChildWidth ? `${minChildWidth}px` : minChildWidth;
12
+ gridTemplateColumns = `repeat(auto-fit, minmax(min(100%, ${width}), 1fr))`;
13
+ }
14
+ const rootStyle = {
15
+ ...null == gridTemplateColumns ? {} : {
16
+ gridTemplateColumns
17
+ },
18
+ ...null == gap ? {} : {
19
+ gap
20
+ },
21
+ ...null == rowGap ? {} : {
22
+ rowGap
23
+ },
24
+ ...null == columnGap ? {} : {
25
+ columnGap
26
+ },
27
+ ...style
28
+ };
29
+ return /*#__PURE__*/ jsx(ark.div, {
30
+ ...props,
31
+ ref: ref,
32
+ asChild: asChild,
33
+ "data-scope": "simple-grid",
34
+ "data-part": "root",
35
+ "data-slot": "simple-grid-root",
36
+ className: cn('grid grid-cols-1', className),
37
+ style: rootStyle
38
+ });
39
+ });
40
+ const SimpleGrid = Object.assign(SimpleGrid_SimpleGridRoot, {
41
+ Root: SimpleGrid_SimpleGridRoot
42
+ });
43
+ export { SimpleGrid };
@@ -0,0 +1 @@
1
+ export { SimpleGrid } from './SimpleGrid.js';
@@ -0,0 +1 @@
1
+ export { SimpleGrid } from "./SimpleGrid.js";
@@ -0,0 +1,18 @@
1
+ declare const Skeleton: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & {
2
+ loading?: boolean;
3
+ variant?: 'pulse' | 'none';
4
+ width?: number | string;
5
+ height?: number | string;
6
+ boxSize?: number | string;
7
+ borderRadius?: number | string;
8
+ } & import("react").RefAttributes<HTMLDivElement>> & {
9
+ Root: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & {
10
+ loading?: boolean;
11
+ variant?: 'pulse' | 'none';
12
+ width?: number | string;
13
+ height?: number | string;
14
+ boxSize?: number | string;
15
+ borderRadius?: number | string;
16
+ } & import("react").RefAttributes<HTMLDivElement>>;
17
+ };
18
+ export { Skeleton };