@stokelp/ui 2.96.6 → 2.97.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 (666) hide show
  1. package/dist/_virtual/_commonjsHelpers.cjs +2 -0
  2. package/dist/_virtual/_commonjsHelpers.cjs.map +1 -0
  3. package/dist/_virtual/_commonjsHelpers.js +10 -0
  4. package/dist/_virtual/_commonjsHelpers.js.map +1 -0
  5. package/dist/_virtual/cjs.cjs +2 -0
  6. package/dist/_virtual/cjs.cjs.map +1 -0
  7. package/dist/_virtual/cjs.js +9 -0
  8. package/dist/_virtual/cjs.js.map +1 -0
  9. package/dist/_virtual/lodash.cjs +2 -0
  10. package/dist/_virtual/lodash.cjs.map +1 -0
  11. package/dist/_virtual/lodash.js +7 -0
  12. package/dist/_virtual/lodash.js.map +1 -0
  13. package/dist/_virtual/lodash2.cjs +2 -0
  14. package/dist/_virtual/lodash2.cjs.map +1 -0
  15. package/dist/_virtual/lodash2.js +6 -0
  16. package/dist/_virtual/lodash2.js.map +1 -0
  17. package/dist/components/accordion/Accordion.cjs +2 -0
  18. package/dist/components/accordion/Accordion.cjs.map +1 -0
  19. package/dist/components/accordion/Accordion.js +29 -0
  20. package/dist/components/accordion/Accordion.js.map +1 -0
  21. package/dist/components/action-card/ActionCard.cjs +2 -0
  22. package/dist/components/action-card/ActionCard.cjs.map +1 -0
  23. package/dist/components/action-card/ActionCard.js +28 -0
  24. package/dist/components/action-card/ActionCard.js.map +1 -0
  25. package/dist/components/alert/Alert.cjs +2 -0
  26. package/dist/components/alert/Alert.cjs.map +1 -0
  27. package/dist/components/alert/Alert.js +85 -0
  28. package/dist/components/alert/Alert.js.map +1 -0
  29. package/dist/components/app/navigation/AppNavigation.cjs +2 -0
  30. package/dist/components/app/navigation/AppNavigation.cjs.map +1 -0
  31. package/dist/components/app/navigation/AppNavigation.js +48 -0
  32. package/dist/components/app/navigation/AppNavigation.js.map +1 -0
  33. package/dist/components/app/navigation/language-select/AppNavigationLanguageSelect.cjs +2 -0
  34. package/dist/components/app/navigation/language-select/AppNavigationLanguageSelect.cjs.map +1 -0
  35. package/dist/components/app/navigation/language-select/AppNavigationLanguageSelect.js +120 -0
  36. package/dist/components/app/navigation/language-select/AppNavigationLanguageSelect.js.map +1 -0
  37. package/dist/components/app/price-tag/PriceTag.cjs +2 -0
  38. package/dist/components/app/price-tag/PriceTag.cjs.map +1 -0
  39. package/dist/components/app/price-tag/PriceTag.js +21 -0
  40. package/dist/components/app/price-tag/PriceTag.js.map +1 -0
  41. package/dist/components/app/product-card-catalog/styled.cjs +2 -0
  42. package/dist/components/app/product-card-catalog/styled.cjs.map +1 -0
  43. package/dist/components/app/product-card-catalog/styled.js +22 -0
  44. package/dist/components/app/product-card-catalog/styled.js.map +1 -0
  45. package/dist/components/avatar/styled.cjs +2 -0
  46. package/dist/components/avatar/styled.cjs.map +1 -0
  47. package/dist/components/avatar/styled.js +28 -0
  48. package/dist/components/avatar/styled.js.map +1 -0
  49. package/dist/components/box/Box.cjs +2 -0
  50. package/dist/components/box/Box.cjs.map +1 -0
  51. package/dist/components/box/Box.js +12 -0
  52. package/dist/components/box/Box.js.map +1 -0
  53. package/dist/components/breadcrumb/Breadcrumb.cjs +2 -0
  54. package/dist/components/breadcrumb/Breadcrumb.cjs.map +1 -0
  55. package/dist/components/breadcrumb/Breadcrumb.js +36 -0
  56. package/dist/components/breadcrumb/Breadcrumb.js.map +1 -0
  57. package/dist/components/button/Button.cjs +2 -0
  58. package/dist/components/button/Button.cjs.map +1 -0
  59. package/dist/components/button/Button.js +9 -0
  60. package/dist/components/button/Button.js.map +1 -0
  61. package/dist/components/button-filter/ButtonFilter.cjs +2 -0
  62. package/dist/components/button-filter/ButtonFilter.cjs.map +1 -0
  63. package/dist/components/button-filter/ButtonFilter.js +9 -0
  64. package/dist/components/button-filter/ButtonFilter.js.map +1 -0
  65. package/dist/components/chat/Chat.cjs +2 -0
  66. package/dist/components/chat/Chat.cjs.map +1 -0
  67. package/dist/components/chat/Chat.js +27 -0
  68. package/dist/components/chat/Chat.js.map +1 -0
  69. package/dist/components/chat/ChatDocumentMessage.cjs +2 -0
  70. package/dist/components/chat/ChatDocumentMessage.cjs.map +1 -0
  71. package/dist/components/chat/ChatDocumentMessage.js +33 -0
  72. package/dist/components/chat/ChatDocumentMessage.js.map +1 -0
  73. package/dist/components/chat/ChatMessage.cjs +2 -0
  74. package/dist/components/chat/ChatMessage.cjs.map +1 -0
  75. package/dist/components/chat/ChatMessage.js +9 -0
  76. package/dist/components/chat/ChatMessage.js.map +1 -0
  77. package/dist/components/chat/ChatProfileAvatar.cjs +2 -0
  78. package/dist/components/chat/ChatProfileAvatar.cjs.map +1 -0
  79. package/dist/components/chat/ChatProfileAvatar.js +17 -0
  80. package/dist/components/chat/ChatProfileAvatar.js.map +1 -0
  81. package/dist/components/chat/ChatTextInput.cjs +2 -0
  82. package/dist/components/chat/ChatTextInput.cjs.map +1 -0
  83. package/dist/components/chat/ChatTextInput.js +54 -0
  84. package/dist/components/chat/ChatTextInput.js.map +1 -0
  85. package/dist/components/checkbox/Checkbox.cjs +2 -0
  86. package/dist/components/checkbox/Checkbox.cjs.map +1 -0
  87. package/dist/components/checkbox/Checkbox.js +35 -0
  88. package/dist/components/checkbox/Checkbox.js.map +1 -0
  89. package/dist/components/checkbox-card/CheckboxCard.cjs +2 -0
  90. package/dist/components/checkbox-card/CheckboxCard.cjs.map +1 -0
  91. package/dist/components/checkbox-card/CheckboxCard.js +40 -0
  92. package/dist/components/checkbox-card/CheckboxCard.js.map +1 -0
  93. package/dist/components/checkbox-card/namespace.cjs +2 -0
  94. package/dist/components/checkbox-card/namespace.cjs.map +1 -0
  95. package/dist/components/checkbox-card/namespace.js +10 -0
  96. package/dist/components/checkbox-card/namespace.js.map +1 -0
  97. package/dist/components/chip/Chip.cjs +2 -0
  98. package/dist/components/chip/Chip.cjs.map +1 -0
  99. package/dist/components/chip/Chip.js +25 -0
  100. package/dist/components/chip/Chip.js.map +1 -0
  101. package/dist/components/collapsible/styled.cjs +2 -0
  102. package/dist/components/collapsible/styled.cjs.map +1 -0
  103. package/dist/components/collapsible/styled.js +12 -0
  104. package/dist/components/collapsible/styled.js.map +1 -0
  105. package/dist/components/combobox/Combobox.cjs +2 -0
  106. package/dist/components/combobox/Combobox.cjs.map +1 -0
  107. package/dist/components/combobox/Combobox.js +176 -0
  108. package/dist/components/combobox/Combobox.js.map +1 -0
  109. package/dist/components/date-picker/DatePicker.cjs +2 -0
  110. package/dist/components/date-picker/DatePicker.cjs.map +1 -0
  111. package/dist/components/date-picker/DatePicker.js +129 -0
  112. package/dist/components/date-picker/DatePicker.js.map +1 -0
  113. package/dist/components/dialog/styled.cjs +2 -0
  114. package/dist/components/dialog/styled.cjs.map +1 -0
  115. package/dist/components/dialog/styled.js +67 -0
  116. package/dist/components/dialog/styled.js.map +1 -0
  117. package/dist/components/drawer/Drawer.cjs +2 -0
  118. package/dist/components/drawer/Drawer.cjs.map +1 -0
  119. package/dist/components/drawer/Drawer.js +64 -0
  120. package/dist/components/drawer/Drawer.js.map +1 -0
  121. package/dist/components/flag/styled.cjs +2 -0
  122. package/dist/components/flag/styled.cjs.map +1 -0
  123. package/dist/components/flag/styled.js +3753 -0
  124. package/dist/components/flag/styled.js.map +1 -0
  125. package/dist/components/form/FormControl.cjs +2 -0
  126. package/dist/components/form/FormControl.cjs.map +1 -0
  127. package/dist/components/form/FormControl.js +19 -0
  128. package/dist/components/form/FormControl.js.map +1 -0
  129. package/dist/components/form/FormHelperText.cjs +2 -0
  130. package/dist/components/form/FormHelperText.cjs.map +1 -0
  131. package/dist/components/form/FormHelperText.js +10 -0
  132. package/dist/components/form/FormHelperText.js.map +1 -0
  133. package/dist/components/form/FormLabel.cjs +2 -0
  134. package/dist/components/form/FormLabel.cjs.map +1 -0
  135. package/dist/components/form/FormLabel.js +35 -0
  136. package/dist/components/form/FormLabel.js.map +1 -0
  137. package/dist/components/heading/Heading.cjs +2 -0
  138. package/dist/components/heading/Heading.cjs.map +1 -0
  139. package/dist/components/heading/Heading.js +13 -0
  140. package/dist/components/heading/Heading.js.map +1 -0
  141. package/dist/components/icon/Icon.cjs +2 -0
  142. package/dist/components/icon/Icon.cjs.map +1 -0
  143. package/dist/components/icon/Icon.js +12 -0
  144. package/dist/components/icon/Icon.js.map +1 -0
  145. package/dist/components/icon-button/IconButton.cjs +2 -0
  146. package/dist/components/icon-button/IconButton.cjs.map +1 -0
  147. package/dist/components/icon-button/IconButton.js +8 -0
  148. package/dist/components/icon-button/IconButton.js.map +1 -0
  149. package/dist/components/illustration/Illustration.cjs +2 -0
  150. package/dist/components/illustration/Illustration.cjs.map +1 -0
  151. package/dist/components/illustration/Illustration.js +41 -0
  152. package/dist/components/illustration/Illustration.js.map +1 -0
  153. package/dist/components/illustration/patterns.cjs +2 -0
  154. package/dist/components/illustration/patterns.cjs.map +1 -0
  155. package/dist/{ui.js → components/illustration/patterns.js} +38 -15804
  156. package/dist/components/illustration/patterns.js.map +1 -0
  157. package/dist/components/input/HighlightedInput.cjs +2 -0
  158. package/dist/components/input/HighlightedInput.cjs.map +1 -0
  159. package/dist/components/input/HighlightedInput.js +60 -0
  160. package/dist/components/input/HighlightedInput.js.map +1 -0
  161. package/dist/components/input/Input.cjs +2 -0
  162. package/dist/components/input/Input.cjs.map +1 -0
  163. package/dist/components/input/Input.js +15 -0
  164. package/dist/components/input/Input.js.map +1 -0
  165. package/dist/components/input/InputAddon.cjs +2 -0
  166. package/dist/components/input/InputAddon.cjs.map +1 -0
  167. package/dist/components/input/InputAddon.js +11 -0
  168. package/dist/components/input/InputAddon.js.map +1 -0
  169. package/dist/components/input/InputGroup.cjs +2 -0
  170. package/dist/components/input/InputGroup.cjs.map +1 -0
  171. package/dist/components/input/InputGroup.js +10 -0
  172. package/dist/components/input/InputGroup.js.map +1 -0
  173. package/dist/components/input/PhoneNumberInput.cjs +2 -0
  174. package/dist/components/input/PhoneNumberInput.cjs.map +1 -0
  175. package/dist/components/input/PhoneNumberInput.js +26 -0
  176. package/dist/components/input/PhoneNumberInput.js.map +1 -0
  177. package/dist/components/menu/Menu.cjs +2 -0
  178. package/dist/components/menu/Menu.cjs.map +1 -0
  179. package/dist/components/menu/Menu.js +29 -0
  180. package/dist/components/menu/Menu.js.map +1 -0
  181. package/dist/components/pagination/Pagination.cjs +2 -0
  182. package/dist/components/pagination/Pagination.cjs.map +1 -0
  183. package/dist/components/pagination/Pagination.js +86 -0
  184. package/dist/components/pagination/Pagination.js.map +1 -0
  185. package/dist/components/pagination/use-pagination.cjs +2 -0
  186. package/dist/components/pagination/use-pagination.cjs.map +1 -0
  187. package/dist/components/pagination/use-pagination.js +57 -0
  188. package/dist/components/pagination/use-pagination.js.map +1 -0
  189. package/dist/components/popover/Popover.cjs +2 -0
  190. package/dist/components/popover/Popover.cjs.map +1 -0
  191. package/dist/components/popover/Popover.js +27 -0
  192. package/dist/components/popover/Popover.js.map +1 -0
  193. package/dist/components/radio-button-group/RadioButtonGroup.cjs +2 -0
  194. package/dist/components/radio-button-group/RadioButtonGroup.cjs.map +1 -0
  195. package/dist/components/radio-button-group/RadioButtonGroup.js +22 -0
  196. package/dist/components/radio-button-group/RadioButtonGroup.js.map +1 -0
  197. package/dist/components/radio-card-group/RadioCardGroup.cjs +2 -0
  198. package/dist/components/radio-card-group/RadioCardGroup.cjs.map +1 -0
  199. package/dist/components/radio-card-group/RadioCardGroup.js +23 -0
  200. package/dist/components/radio-card-group/RadioCardGroup.js.map +1 -0
  201. package/dist/components/radio-card-group/namespace.cjs +2 -0
  202. package/dist/components/radio-card-group/namespace.cjs.map +1 -0
  203. package/dist/components/radio-card-group/namespace.js +11 -0
  204. package/dist/components/radio-card-group/namespace.js.map +1 -0
  205. package/dist/components/radio-group/RadioGroup.cjs +2 -0
  206. package/dist/components/radio-group/RadioGroup.cjs.map +1 -0
  207. package/dist/components/radio-group/RadioGroup.js +22 -0
  208. package/dist/components/radio-group/RadioGroup.js.map +1 -0
  209. package/dist/components/select/Select.cjs +2 -0
  210. package/dist/components/select/Select.cjs.map +1 -0
  211. package/dist/components/select/Select.js +146 -0
  212. package/dist/components/select/Select.js.map +1 -0
  213. package/dist/components/select-language/SelectLanguage.cjs +2 -0
  214. package/dist/components/select-language/SelectLanguage.cjs.map +1 -0
  215. package/dist/components/select-language/SelectLanguage.js +89 -0
  216. package/dist/components/select-language/SelectLanguage.js.map +1 -0
  217. package/dist/components/status-tag-select/StatusTagSelect.cjs +2 -0
  218. package/dist/components/status-tag-select/StatusTagSelect.cjs.map +1 -0
  219. package/dist/components/status-tag-select/StatusTagSelect.js +117 -0
  220. package/dist/components/status-tag-select/StatusTagSelect.js.map +1 -0
  221. package/dist/components/switch/Switch.cjs +2 -0
  222. package/dist/components/switch/Switch.cjs.map +1 -0
  223. package/dist/components/switch/Switch.js +20 -0
  224. package/dist/components/switch/Switch.js.map +1 -0
  225. package/dist/components/switch-card/SwitchCard.cjs +2 -0
  226. package/dist/components/switch-card/SwitchCard.cjs.map +1 -0
  227. package/dist/components/switch-card/SwitchCard.js +27 -0
  228. package/dist/components/switch-card/SwitchCard.js.map +1 -0
  229. package/dist/components/switch-card/namespace.cjs +2 -0
  230. package/dist/components/switch-card/namespace.cjs.map +1 -0
  231. package/dist/components/switch-card/namespace.js +10 -0
  232. package/dist/components/switch-card/namespace.js.map +1 -0
  233. package/dist/components/table/Table.cjs +2 -0
  234. package/dist/components/table/Table.cjs.map +1 -0
  235. package/dist/components/table/Table.js +113 -0
  236. package/dist/components/table/Table.js.map +1 -0
  237. package/dist/components/table/TableProvider.cjs +2 -0
  238. package/dist/components/table/TableProvider.cjs.map +1 -0
  239. package/dist/components/table/TableProvider.js +41 -0
  240. package/dist/components/table/TableProvider.js.map +1 -0
  241. package/dist/components/tabs/Tabs.cjs +2 -0
  242. package/dist/components/tabs/Tabs.cjs.map +1 -0
  243. package/dist/components/tabs/Tabs.js +27 -0
  244. package/dist/components/tabs/Tabs.js.map +1 -0
  245. package/dist/components/tag/Tag.cjs +2 -0
  246. package/dist/components/tag/Tag.cjs.map +1 -0
  247. package/dist/components/tag/Tag.js +18 -0
  248. package/dist/components/tag/Tag.js.map +1 -0
  249. package/dist/components/text/Text.cjs +2 -0
  250. package/dist/components/text/Text.cjs.map +1 -0
  251. package/dist/components/text/Text.js +13 -0
  252. package/dist/components/text/Text.js.map +1 -0
  253. package/dist/components/textarea/Textarea.cjs +2 -0
  254. package/dist/components/textarea/Textarea.cjs.map +1 -0
  255. package/dist/components/textarea/Textarea.js +9 -0
  256. package/dist/components/textarea/Textarea.js.map +1 -0
  257. package/dist/components/tooltip/Tooltip.cjs +2 -0
  258. package/dist/components/tooltip/Tooltip.cjs.map +1 -0
  259. package/dist/components/tooltip/Tooltip.js +44 -0
  260. package/dist/components/tooltip/Tooltip.js.map +1 -0
  261. package/dist/{icons.cjs → icons/index.cjs} +1 -1
  262. package/dist/icons/index.cjs.map +1 -0
  263. package/dist/{icons.js → icons/index.js} +1 -1
  264. package/dist/icons/index.js.map +1 -0
  265. package/dist/index.cjs +2 -0
  266. package/dist/index.cjs.map +1 -0
  267. package/dist/index.js +178 -0
  268. package/dist/index.js.map +1 -0
  269. package/dist/node_modules/@heroicons/react/24/outline/esm/ArrowDownTrayIcon.cjs +2 -0
  270. package/dist/node_modules/@heroicons/react/24/outline/esm/ArrowDownTrayIcon.cjs.map +1 -0
  271. package/dist/node_modules/@heroicons/react/24/outline/esm/ArrowDownTrayIcon.js +30 -0
  272. package/dist/node_modules/@heroicons/react/24/outline/esm/ArrowDownTrayIcon.js.map +1 -0
  273. package/dist/node_modules/@heroicons/react/24/outline/esm/ArrowLeftCircleIcon.cjs +2 -0
  274. package/dist/node_modules/@heroicons/react/24/outline/esm/ArrowLeftCircleIcon.cjs.map +1 -0
  275. package/dist/node_modules/@heroicons/react/24/outline/esm/ArrowLeftCircleIcon.js +30 -0
  276. package/dist/node_modules/@heroicons/react/24/outline/esm/ArrowLeftCircleIcon.js.map +1 -0
  277. package/dist/node_modules/@heroicons/react/24/outline/esm/DocumentTextIcon.cjs +2 -0
  278. package/dist/node_modules/@heroicons/react/24/outline/esm/DocumentTextIcon.cjs.map +1 -0
  279. package/dist/node_modules/@heroicons/react/24/outline/esm/DocumentTextIcon.js +30 -0
  280. package/dist/node_modules/@heroicons/react/24/outline/esm/DocumentTextIcon.js.map +1 -0
  281. package/dist/node_modules/@pandacss/shared/dist/index.cjs +2 -0
  282. package/dist/node_modules/@pandacss/shared/dist/index.cjs.map +1 -0
  283. package/dist/node_modules/@pandacss/shared/dist/index.js +469 -0
  284. package/dist/node_modules/@pandacss/shared/dist/index.js.map +1 -0
  285. package/dist/node_modules/@zag-js/utils/dist/index.cjs +2 -0
  286. package/dist/node_modules/@zag-js/utils/dist/index.cjs.map +1 -0
  287. package/dist/node_modules/@zag-js/utils/dist/index.js +8 -0
  288. package/dist/node_modules/@zag-js/utils/dist/index.js.map +1 -0
  289. package/dist/node_modules/deepmerge/dist/cjs.cjs +2 -0
  290. package/dist/node_modules/deepmerge/dist/cjs.cjs.map +1 -0
  291. package/dist/node_modules/deepmerge/dist/cjs.js +81 -0
  292. package/dist/node_modules/deepmerge/dist/cjs.js.map +1 -0
  293. package/dist/node_modules/lodash/lodash.cjs +28 -0
  294. package/dist/node_modules/lodash/lodash.cjs.map +1 -0
  295. package/dist/node_modules/lodash/lodash.js +3679 -0
  296. package/dist/node_modules/lodash/lodash.js.map +1 -0
  297. package/dist/preset.cjs +2 -0
  298. package/dist/preset.cjs.map +1 -0
  299. package/dist/preset.js +35 -0
  300. package/dist/preset.js.map +1 -0
  301. package/dist/shared/ConditionalWrapper.cjs +2 -0
  302. package/dist/shared/ConditionalWrapper.cjs.map +1 -0
  303. package/dist/shared/ConditionalWrapper.js +6 -0
  304. package/dist/shared/ConditionalWrapper.js.map +1 -0
  305. package/dist/shared/assets/icons.cjs +2 -0
  306. package/dist/shared/assets/icons.cjs.map +1 -0
  307. package/dist/shared/assets/icons.js +24 -0
  308. package/dist/shared/assets/icons.js.map +1 -0
  309. package/dist/shared/hooks/useUncontrolled.cjs +2 -0
  310. package/dist/shared/hooks/useUncontrolled.cjs.map +1 -0
  311. package/dist/shared/hooks/useUncontrolled.js +18 -0
  312. package/dist/shared/hooks/useUncontrolled.js.map +1 -0
  313. package/dist/shared/utils/events.cjs +2 -0
  314. package/dist/shared/utils/events.cjs.map +1 -0
  315. package/dist/shared/utils/events.js +8 -0
  316. package/dist/shared/utils/events.js.map +1 -0
  317. package/dist/theme/breakpoints.cjs +2 -0
  318. package/dist/theme/breakpoints.cjs.map +1 -0
  319. package/dist/theme/breakpoints.js +11 -0
  320. package/dist/theme/breakpoints.js.map +1 -0
  321. package/dist/theme/conditions.cjs +2 -0
  322. package/dist/theme/conditions.cjs.map +1 -0
  323. package/dist/theme/conditions.js +25 -0
  324. package/dist/theme/conditions.js.map +1 -0
  325. package/dist/theme/containers.cjs +2 -0
  326. package/dist/theme/containers.cjs.map +1 -0
  327. package/dist/theme/containers.js +19 -0
  328. package/dist/theme/containers.js.map +1 -0
  329. package/dist/theme/globalCss.cjs +4 -0
  330. package/dist/theme/globalCss.cjs.map +1 -0
  331. package/dist/theme/globalCss.js +101 -0
  332. package/dist/theme/globalCss.js.map +1 -0
  333. package/dist/theme/keyframes.cjs +2 -0
  334. package/dist/theme/keyframes.cjs.map +1 -0
  335. package/dist/theme/keyframes.js +173 -0
  336. package/dist/theme/keyframes.js.map +1 -0
  337. package/dist/theme/recipes/accordion.cjs +2 -0
  338. package/dist/theme/recipes/accordion.cjs.map +1 -0
  339. package/dist/theme/recipes/accordion.js +112 -0
  340. package/dist/theme/recipes/accordion.js.map +1 -0
  341. package/dist/theme/recipes/action-card.cjs +2 -0
  342. package/dist/theme/recipes/action-card.cjs.map +1 -0
  343. package/dist/theme/recipes/action-card.js +87 -0
  344. package/dist/theme/recipes/action-card.js.map +1 -0
  345. package/dist/theme/recipes/alert.cjs +2 -0
  346. package/dist/theme/recipes/alert.cjs.map +1 -0
  347. package/dist/theme/recipes/alert.js +68 -0
  348. package/dist/theme/recipes/alert.js.map +1 -0
  349. package/dist/theme/recipes/app/navigation-language-select.cjs +2 -0
  350. package/dist/theme/recipes/app/navigation-language-select.cjs.map +1 -0
  351. package/dist/theme/recipes/app/navigation-language-select.js +151 -0
  352. package/dist/theme/recipes/app/navigation-language-select.js.map +1 -0
  353. package/dist/theme/recipes/app/navigation.cjs +2 -0
  354. package/dist/theme/recipes/app/navigation.cjs.map +1 -0
  355. package/dist/theme/recipes/app/navigation.js +271 -0
  356. package/dist/theme/recipes/app/navigation.js.map +1 -0
  357. package/dist/theme/recipes/app/price-tag.cjs +2 -0
  358. package/dist/theme/recipes/app/price-tag.cjs.map +1 -0
  359. package/dist/theme/recipes/app/price-tag.js +73 -0
  360. package/dist/theme/recipes/app/price-tag.js.map +1 -0
  361. package/dist/theme/recipes/app/product-card-catalog.cjs +2 -0
  362. package/dist/theme/recipes/app/product-card-catalog.cjs.map +1 -0
  363. package/dist/theme/recipes/app/product-card-catalog.js +196 -0
  364. package/dist/theme/recipes/app/product-card-catalog.js.map +1 -0
  365. package/dist/theme/recipes/avatar-group.cjs +2 -0
  366. package/dist/theme/recipes/avatar-group.cjs.map +1 -0
  367. package/dist/theme/recipes/avatar-group.js +40 -0
  368. package/dist/theme/recipes/avatar-group.js.map +1 -0
  369. package/dist/theme/recipes/avatar.cjs +2 -0
  370. package/dist/theme/recipes/avatar.cjs.map +1 -0
  371. package/dist/theme/recipes/avatar.js +99 -0
  372. package/dist/theme/recipes/avatar.js.map +1 -0
  373. package/dist/theme/recipes/breadcrumb.cjs +2 -0
  374. package/dist/theme/recipes/breadcrumb.cjs.map +1 -0
  375. package/dist/theme/recipes/breadcrumb.js +34 -0
  376. package/dist/theme/recipes/breadcrumb.js.map +1 -0
  377. package/dist/theme/recipes/button-filter.cjs +2 -0
  378. package/dist/theme/recipes/button-filter.cjs.map +1 -0
  379. package/dist/theme/recipes/button-filter.js +63 -0
  380. package/dist/theme/recipes/button-filter.js.map +1 -0
  381. package/dist/theme/recipes/button.cjs +2 -0
  382. package/dist/theme/recipes/button.cjs.map +1 -0
  383. package/dist/theme/recipes/button.js +298 -0
  384. package/dist/theme/recipes/button.js.map +1 -0
  385. package/dist/theme/recipes/chat/chat-document-message.cjs +2 -0
  386. package/dist/theme/recipes/chat/chat-document-message.cjs.map +1 -0
  387. package/dist/theme/recipes/chat/chat-document-message.js +46 -0
  388. package/dist/theme/recipes/chat/chat-document-message.js.map +1 -0
  389. package/dist/theme/recipes/chat/chat-input-text.cjs +2 -0
  390. package/dist/theme/recipes/chat/chat-input-text.cjs.map +1 -0
  391. package/dist/theme/recipes/chat/chat-input-text.js +30 -0
  392. package/dist/theme/recipes/chat/chat-input-text.js.map +1 -0
  393. package/dist/theme/recipes/chat/chat-message.cjs +2 -0
  394. package/dist/theme/recipes/chat/chat-message.cjs.map +1 -0
  395. package/dist/theme/recipes/chat/chat-message.js +48 -0
  396. package/dist/theme/recipes/chat/chat-message.js.map +1 -0
  397. package/dist/theme/recipes/chat/chat-profile-avatar.cjs +2 -0
  398. package/dist/theme/recipes/chat/chat-profile-avatar.cjs.map +1 -0
  399. package/dist/theme/recipes/chat/chat-profile-avatar.js +28 -0
  400. package/dist/theme/recipes/chat/chat-profile-avatar.js.map +1 -0
  401. package/dist/theme/recipes/chat/chat.cjs +2 -0
  402. package/dist/theme/recipes/chat/chat.cjs.map +1 -0
  403. package/dist/theme/recipes/chat/chat.js +59 -0
  404. package/dist/theme/recipes/chat/chat.js.map +1 -0
  405. package/dist/theme/recipes/checkbox-card.cjs +2 -0
  406. package/dist/theme/recipes/checkbox-card.cjs.map +1 -0
  407. package/dist/theme/recipes/checkbox-card.js +42 -0
  408. package/dist/theme/recipes/checkbox-card.js.map +1 -0
  409. package/dist/theme/recipes/checkbox-group.cjs +2 -0
  410. package/dist/theme/recipes/checkbox-group.cjs.map +1 -0
  411. package/dist/theme/recipes/checkbox-group.js +15 -0
  412. package/dist/theme/recipes/checkbox-group.js.map +1 -0
  413. package/dist/theme/recipes/checkbox.cjs +2 -0
  414. package/dist/theme/recipes/checkbox.cjs.map +1 -0
  415. package/dist/theme/recipes/checkbox.js +131 -0
  416. package/dist/theme/recipes/checkbox.js.map +1 -0
  417. package/dist/theme/recipes/chip.cjs +2 -0
  418. package/dist/theme/recipes/chip.cjs.map +1 -0
  419. package/dist/theme/recipes/chip.js +184 -0
  420. package/dist/theme/recipes/chip.js.map +1 -0
  421. package/dist/theme/recipes/collapsible.cjs +2 -0
  422. package/dist/theme/recipes/collapsible.cjs.map +1 -0
  423. package/dist/theme/recipes/collapsible.js +30 -0
  424. package/dist/theme/recipes/collapsible.js.map +1 -0
  425. package/dist/theme/recipes/combobox.cjs +2 -0
  426. package/dist/theme/recipes/combobox.cjs.map +1 -0
  427. package/dist/theme/recipes/combobox.js +179 -0
  428. package/dist/theme/recipes/combobox.js.map +1 -0
  429. package/dist/theme/recipes/common/group-card.cjs +2 -0
  430. package/dist/theme/recipes/common/group-card.cjs.map +1 -0
  431. package/dist/theme/recipes/common/group-card.js +81 -0
  432. package/dist/theme/recipes/common/group-card.js.map +1 -0
  433. package/dist/theme/recipes/datepicker.cjs +2 -0
  434. package/dist/theme/recipes/datepicker.cjs.map +1 -0
  435. package/dist/theme/recipes/datepicker.js +178 -0
  436. package/dist/theme/recipes/datepicker.js.map +1 -0
  437. package/dist/theme/recipes/dialog.cjs +2 -0
  438. package/dist/theme/recipes/dialog.cjs.map +1 -0
  439. package/dist/theme/recipes/dialog.js +154 -0
  440. package/dist/theme/recipes/dialog.js.map +1 -0
  441. package/dist/theme/recipes/drawer.cjs +2 -0
  442. package/dist/theme/recipes/drawer.cjs.map +1 -0
  443. package/dist/theme/recipes/drawer.js +129 -0
  444. package/dist/theme/recipes/drawer.js.map +1 -0
  445. package/dist/theme/recipes/flag.cjs +2 -0
  446. package/dist/theme/recipes/flag.cjs.map +1 -0
  447. package/dist/theme/recipes/flag.js +33 -0
  448. package/dist/theme/recipes/flag.js.map +1 -0
  449. package/dist/theme/recipes/form/control.cjs +2 -0
  450. package/dist/theme/recipes/form/control.cjs.map +1 -0
  451. package/dist/theme/recipes/form/control.js +37 -0
  452. package/dist/theme/recipes/form/control.js.map +1 -0
  453. package/dist/theme/recipes/form/helper-text.cjs +2 -0
  454. package/dist/theme/recipes/form/helper-text.cjs.map +1 -0
  455. package/dist/theme/recipes/form/helper-text.js +16 -0
  456. package/dist/theme/recipes/form/helper-text.js.map +1 -0
  457. package/dist/theme/recipes/form/label.cjs +2 -0
  458. package/dist/theme/recipes/form/label.cjs.map +1 -0
  459. package/dist/theme/recipes/form/label.js +50 -0
  460. package/dist/theme/recipes/form/label.js.map +1 -0
  461. package/dist/theme/recipes/heading.cjs +2 -0
  462. package/dist/theme/recipes/heading.cjs.map +1 -0
  463. package/dist/theme/recipes/heading.js +37 -0
  464. package/dist/theme/recipes/heading.js.map +1 -0
  465. package/dist/theme/recipes/highlightedInput.cjs +2 -0
  466. package/dist/theme/recipes/highlightedInput.cjs.map +1 -0
  467. package/dist/theme/recipes/highlightedInput.js +48 -0
  468. package/dist/theme/recipes/highlightedInput.js.map +1 -0
  469. package/dist/theme/recipes/icon-button.cjs +2 -0
  470. package/dist/theme/recipes/icon-button.cjs.map +1 -0
  471. package/dist/theme/recipes/icon-button.js +91 -0
  472. package/dist/theme/recipes/icon-button.js.map +1 -0
  473. package/dist/theme/recipes/icon.cjs +2 -0
  474. package/dist/theme/recipes/icon.cjs.map +1 -0
  475. package/dist/theme/recipes/icon.js +44 -0
  476. package/dist/theme/recipes/icon.js.map +1 -0
  477. package/dist/theme/recipes/illustration.cjs +2 -0
  478. package/dist/theme/recipes/illustration.cjs.map +1 -0
  479. package/dist/theme/recipes/illustration.js +50 -0
  480. package/dist/theme/recipes/illustration.js.map +1 -0
  481. package/dist/theme/recipes/index.cjs +2 -0
  482. package/dist/theme/recipes/index.cjs.map +1 -0
  483. package/dist/theme/recipes/index.js +129 -0
  484. package/dist/theme/recipes/index.js.map +1 -0
  485. package/dist/theme/recipes/input-addon.cjs +2 -0
  486. package/dist/theme/recipes/input-addon.cjs.map +1 -0
  487. package/dist/theme/recipes/input-addon.js +27 -0
  488. package/dist/theme/recipes/input-addon.js.map +1 -0
  489. package/dist/theme/recipes/input-group.cjs +2 -0
  490. package/dist/theme/recipes/input-group.cjs.map +1 -0
  491. package/dist/theme/recipes/input-group.js +52 -0
  492. package/dist/theme/recipes/input-group.js.map +1 -0
  493. package/dist/theme/recipes/input.cjs +2 -0
  494. package/dist/theme/recipes/input.cjs.map +1 -0
  495. package/dist/theme/recipes/input.js +64 -0
  496. package/dist/theme/recipes/input.js.map +1 -0
  497. package/dist/theme/recipes/menu.cjs +2 -0
  498. package/dist/theme/recipes/menu.cjs.map +1 -0
  499. package/dist/theme/recipes/menu.js +102 -0
  500. package/dist/theme/recipes/menu.js.map +1 -0
  501. package/dist/theme/recipes/pagination.cjs +2 -0
  502. package/dist/theme/recipes/pagination.cjs.map +1 -0
  503. package/dist/theme/recipes/pagination.js +73 -0
  504. package/dist/theme/recipes/pagination.js.map +1 -0
  505. package/dist/theme/recipes/phone-number-input.cjs +2 -0
  506. package/dist/theme/recipes/phone-number-input.cjs.map +1 -0
  507. package/dist/theme/recipes/phone-number-input.js +68 -0
  508. package/dist/theme/recipes/phone-number-input.js.map +1 -0
  509. package/dist/theme/recipes/popover.cjs +2 -0
  510. package/dist/theme/recipes/popover.cjs.map +1 -0
  511. package/dist/theme/recipes/popover.js +30 -0
  512. package/dist/theme/recipes/popover.js.map +1 -0
  513. package/dist/theme/recipes/radio-button-group.cjs +2 -0
  514. package/dist/theme/recipes/radio-button-group.cjs.map +1 -0
  515. package/dist/theme/recipes/radio-button-group.js +97 -0
  516. package/dist/theme/recipes/radio-button-group.js.map +1 -0
  517. package/dist/theme/recipes/radio-card-group.cjs +2 -0
  518. package/dist/theme/recipes/radio-card-group.cjs.map +1 -0
  519. package/dist/theme/recipes/radio-card-group.js +70 -0
  520. package/dist/theme/recipes/radio-card-group.js.map +1 -0
  521. package/dist/theme/recipes/radio-group.cjs +2 -0
  522. package/dist/theme/recipes/radio-group.cjs.map +1 -0
  523. package/dist/theme/recipes/radio-group.js +121 -0
  524. package/dist/theme/recipes/radio-group.js.map +1 -0
  525. package/dist/theme/recipes/select-language.cjs +2 -0
  526. package/dist/theme/recipes/select-language.cjs.map +1 -0
  527. package/dist/theme/recipes/select-language.js +115 -0
  528. package/dist/theme/recipes/select-language.js.map +1 -0
  529. package/dist/theme/recipes/select.cjs +2 -0
  530. package/dist/theme/recipes/select.cjs.map +1 -0
  531. package/dist/theme/recipes/select.js +209 -0
  532. package/dist/theme/recipes/select.js.map +1 -0
  533. package/dist/theme/recipes/status-tag-select.cjs +2 -0
  534. package/dist/theme/recipes/status-tag-select.cjs.map +1 -0
  535. package/dist/theme/recipes/status-tag-select.js +177 -0
  536. package/dist/theme/recipes/status-tag-select.js.map +1 -0
  537. package/dist/theme/recipes/switch-card.cjs +2 -0
  538. package/dist/theme/recipes/switch-card.cjs.map +1 -0
  539. package/dist/theme/recipes/switch-card.js +44 -0
  540. package/dist/theme/recipes/switch-card.js.map +1 -0
  541. package/dist/theme/recipes/switch.cjs +2 -0
  542. package/dist/theme/recipes/switch.cjs.map +1 -0
  543. package/dist/theme/recipes/switch.js +90 -0
  544. package/dist/theme/recipes/switch.js.map +1 -0
  545. package/dist/theme/recipes/table-container.cjs +2 -0
  546. package/dist/theme/recipes/table-container.cjs.map +1 -0
  547. package/dist/theme/recipes/table-container.js +21 -0
  548. package/dist/theme/recipes/table-container.js.map +1 -0
  549. package/dist/theme/recipes/table-empty-row.cjs +2 -0
  550. package/dist/theme/recipes/table-empty-row.cjs.map +1 -0
  551. package/dist/theme/recipes/table-empty-row.js +19 -0
  552. package/dist/theme/recipes/table-empty-row.js.map +1 -0
  553. package/dist/theme/recipes/table-group-title.cjs +2 -0
  554. package/dist/theme/recipes/table-group-title.cjs.map +1 -0
  555. package/dist/theme/recipes/table-group-title.js +36 -0
  556. package/dist/theme/recipes/table-group-title.js.map +1 -0
  557. package/dist/theme/recipes/table.cjs +2 -0
  558. package/dist/theme/recipes/table.cjs.map +1 -0
  559. package/dist/theme/recipes/table.js +111 -0
  560. package/dist/theme/recipes/table.js.map +1 -0
  561. package/dist/theme/recipes/tabs-chip.cjs +2 -0
  562. package/dist/theme/recipes/tabs-chip.cjs.map +1 -0
  563. package/dist/theme/recipes/tabs-chip.js +49 -0
  564. package/dist/theme/recipes/tabs-chip.js.map +1 -0
  565. package/dist/theme/recipes/tabs.cjs +2 -0
  566. package/dist/theme/recipes/tabs.cjs.map +1 -0
  567. package/dist/theme/recipes/tabs.js +128 -0
  568. package/dist/theme/recipes/tabs.js.map +1 -0
  569. package/dist/theme/recipes/tag.cjs +2 -0
  570. package/dist/theme/recipes/tag.cjs.map +1 -0
  571. package/dist/theme/recipes/tag.js +124 -0
  572. package/dist/theme/recipes/tag.js.map +1 -0
  573. package/dist/theme/recipes/text.cjs +2 -0
  574. package/dist/theme/recipes/text.cjs.map +1 -0
  575. package/dist/theme/recipes/text.js +40 -0
  576. package/dist/theme/recipes/text.js.map +1 -0
  577. package/dist/theme/recipes/textarea.cjs +2 -0
  578. package/dist/theme/recipes/textarea.cjs.map +1 -0
  579. package/dist/theme/recipes/textarea.js +16 -0
  580. package/dist/theme/recipes/textarea.js.map +1 -0
  581. package/dist/theme/recipes/tooltip.cjs +2 -0
  582. package/dist/theme/recipes/tooltip.cjs.map +1 -0
  583. package/dist/theme/recipes/tooltip.js +64 -0
  584. package/dist/theme/recipes/tooltip.js.map +1 -0
  585. package/dist/theme/semantic-tokens/colors.cjs +2 -0
  586. package/dist/theme/semantic-tokens/colors.cjs.map +1 -0
  587. package/dist/theme/semantic-tokens/colors.js +143 -0
  588. package/dist/theme/semantic-tokens/colors.js.map +1 -0
  589. package/dist/theme/semantic-tokens/index.cjs +2 -0
  590. package/dist/theme/semantic-tokens/index.cjs.map +1 -0
  591. package/dist/theme/semantic-tokens/index.js +9 -0
  592. package/dist/theme/semantic-tokens/index.js.map +1 -0
  593. package/dist/theme/text-styles.cjs +2 -0
  594. package/dist/theme/text-styles.cjs.map +1 -0
  595. package/dist/theme/text-styles.js +90 -0
  596. package/dist/theme/text-styles.js.map +1 -0
  597. package/dist/theme/tokens/animations.cjs +2 -0
  598. package/dist/theme/tokens/animations.cjs.map +1 -0
  599. package/dist/theme/tokens/animations.js +48 -0
  600. package/dist/theme/tokens/animations.js.map +1 -0
  601. package/dist/theme/tokens/aspect-ratios.cjs +2 -0
  602. package/dist/theme/tokens/aspect-ratios.cjs.map +1 -0
  603. package/dist/theme/tokens/aspect-ratios.js +14 -0
  604. package/dist/theme/tokens/aspect-ratios.js.map +1 -0
  605. package/dist/theme/tokens/blurs.cjs +2 -0
  606. package/dist/theme/tokens/blurs.cjs.map +1 -0
  607. package/dist/theme/tokens/blurs.js +15 -0
  608. package/dist/theme/tokens/blurs.js.map +1 -0
  609. package/dist/theme/tokens/borders.cjs +2 -0
  610. package/dist/theme/tokens/borders.cjs.map +1 -0
  611. package/dist/theme/tokens/borders.js +11 -0
  612. package/dist/theme/tokens/borders.js.map +1 -0
  613. package/dist/theme/tokens/colors.cjs +2 -0
  614. package/dist/theme/tokens/colors.cjs.map +1 -0
  615. package/dist/theme/tokens/colors.js +80 -0
  616. package/dist/theme/tokens/colors.js.map +1 -0
  617. package/dist/theme/tokens/durations.cjs +2 -0
  618. package/dist/theme/tokens/durations.cjs.map +1 -0
  619. package/dist/theme/tokens/durations.js +15 -0
  620. package/dist/theme/tokens/durations.js.map +1 -0
  621. package/dist/theme/tokens/easings.cjs +51 -0
  622. package/dist/theme/tokens/easings.cjs.map +1 -0
  623. package/dist/theme/tokens/easings.js +95 -0
  624. package/dist/theme/tokens/easings.js.map +1 -0
  625. package/dist/theme/tokens/index.cjs +2 -0
  626. package/dist/theme/tokens/index.cjs.map +1 -0
  627. package/dist/theme/tokens/index.js +37 -0
  628. package/dist/theme/tokens/index.js.map +1 -0
  629. package/dist/theme/tokens/radii.cjs +2 -0
  630. package/dist/theme/tokens/radii.cjs.map +1 -0
  631. package/dist/theme/tokens/radii.js +29 -0
  632. package/dist/theme/tokens/radii.js.map +1 -0
  633. package/dist/theme/tokens/shadows.cjs +2 -0
  634. package/dist/theme/tokens/shadows.cjs.map +1 -0
  635. package/dist/theme/tokens/shadows.js +15 -0
  636. package/dist/theme/tokens/shadows.js.map +1 -0
  637. package/dist/theme/tokens/sizes.cjs +2 -0
  638. package/dist/theme/tokens/sizes.cjs.map +1 -0
  639. package/dist/theme/tokens/sizes.js +87 -0
  640. package/dist/theme/tokens/sizes.js.map +1 -0
  641. package/dist/theme/tokens/spacing.cjs +2 -0
  642. package/dist/theme/tokens/spacing.cjs.map +1 -0
  643. package/dist/theme/tokens/spacing.js +86 -0
  644. package/dist/theme/tokens/spacing.js.map +1 -0
  645. package/dist/theme/tokens/typography.cjs +2 -0
  646. package/dist/theme/tokens/typography.cjs.map +1 -0
  647. package/dist/theme/tokens/typography.js +87 -0
  648. package/dist/theme/tokens/typography.js.map +1 -0
  649. package/dist/theme/tokens/z-index.cjs +2 -0
  650. package/dist/theme/tokens/z-index.cjs.map +1 -0
  651. package/dist/theme/tokens/z-index.js +44 -0
  652. package/dist/theme/tokens/z-index.js.map +1 -0
  653. package/dist/theme/utilities.cjs +2 -0
  654. package/dist/theme/utilities.cjs.map +1 -0
  655. package/dist/theme/utilities.js +17 -0
  656. package/dist/theme/utilities.js.map +1 -0
  657. package/dist/utils/slots.cjs +2 -0
  658. package/dist/utils/slots.cjs.map +1 -0
  659. package/dist/utils/slots.js +42 -0
  660. package/dist/utils/slots.js.map +1 -0
  661. package/package.json +18 -7
  662. package/dist/icons.cjs.map +0 -1
  663. package/dist/icons.js.map +0 -1
  664. package/dist/ui.cjs +0 -79
  665. package/dist/ui.cjs.map +0 -1
  666. package/dist/ui.js.map +0 -1
@@ -0,0 +1,117 @@
1
+ "use client";
2
+ import { jsxs as a, jsx as e } from "react/jsx-runtime";
3
+ import { styled as n } from "@stokelp/styled-system/jsx";
4
+ import { statusTagSelect as O } from "@stokelp/styled-system/recipes";
5
+ import { useState as Q } from "react";
6
+ import { createListCollection as X, Portal as Y, Select as r } from "@ark-ui/react";
7
+ import { ConditionalWrapper as _ } from "../../shared/ConditionalWrapper.js";
8
+ import { createStyleContext as $ } from "../../utils/slots.js";
9
+ const { withProvider: U, withContext: i } = $(O), tt = U(n(r.Root), "root", {
10
+ defaultProps: {
11
+ loopFocus: !0
12
+ }
13
+ }), et = i(n(r.Content), "content"), rt = i(n(r.Indicator), "indicator"), ot = i(n(r.Item), "item"), nt = i(n(r.ItemText), "itemText"), it = i(n(r.Positioner), "positioner"), lt = i(n(r.Trigger), "trigger"), ct = i(n(r.ValueText), "valueText"), gt = ({
14
+ items: o,
15
+ lazyMount: d = !0,
16
+ usePortal: h = !0,
17
+ unmountOnExit: v = !0,
18
+ positioning: p,
19
+ onValueChange: s,
20
+ severity: g,
21
+ size: f,
22
+ closeOnSelect: m,
23
+ composite: C,
24
+ defaultOpen: y,
25
+ defaultValue: u,
26
+ disabled: x,
27
+ form: S,
28
+ highlightedValue: w,
29
+ id: T,
30
+ ids: I,
31
+ immediate: L,
32
+ invalid: P,
33
+ loopFocus: R,
34
+ name: V,
35
+ onExitComplete: j,
36
+ onFocusOutside: b,
37
+ onHighlightChange: H,
38
+ onInteractOutside: W,
39
+ onOpenChange: B,
40
+ onPointerDownOutside: M,
41
+ open: Z,
42
+ present: k,
43
+ readOnly: q,
44
+ required: z,
45
+ scrollToIndexFn: A,
46
+ value: D,
47
+ ...E
48
+ }) => {
49
+ const l = o.every((t) => "severity" in t && !!t.severity), c = u || (o.length > 0 ? [o[0].value.toString()] : void 0), [F, G] = Q(() => {
50
+ if (c) {
51
+ const t = o.find((N) => N.value.toString() === c[0]);
52
+ return t && l ? t.severity : "neutral";
53
+ }
54
+ return o.length > 0 && l ? o[0].severity : "neutral";
55
+ }), J = (t) => {
56
+ t.items.length > 0 && typeof t.items[0] == "object" && G(t.items[0].severity ?? "neutral"), s?.(t);
57
+ }, K = X({
58
+ items: o
59
+ });
60
+ return /* @__PURE__ */ a(
61
+ tt,
62
+ {
63
+ closeOnSelect: m,
64
+ composite: C,
65
+ defaultOpen: y,
66
+ lazyMount: d,
67
+ unmountOnExit: v,
68
+ collection: K,
69
+ defaultValue: c,
70
+ positioning: { sameWidth: !0, gutter: 0, ...p },
71
+ onValueChange: l ? J : s,
72
+ severity: l ? F : g,
73
+ size: f,
74
+ disabled: x,
75
+ form: S,
76
+ highlightedValue: w,
77
+ id: T,
78
+ ids: I,
79
+ immediate: L,
80
+ invalid: P,
81
+ loopFocus: R,
82
+ name: V,
83
+ onExitComplete: j,
84
+ onFocusOutside: b,
85
+ onHighlightChange: H,
86
+ onInteractOutside: W,
87
+ onOpenChange: B,
88
+ onPointerDownOutside: M,
89
+ open: Z,
90
+ present: k,
91
+ readOnly: q,
92
+ required: z,
93
+ scrollToIndexFn: A,
94
+ value: D,
95
+ children: [
96
+ /* @__PURE__ */ a(lt, { ...E, children: [
97
+ /* @__PURE__ */ e(ct, {}),
98
+ /* @__PURE__ */ e(rt, { asChild: !0, children: /* @__PURE__ */ e("svg", { width: "23", height: "24", viewBox: "0 0 23 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ e(
99
+ "path",
100
+ {
101
+ fillRule: "evenodd",
102
+ clipRule: "evenodd",
103
+ d: "M12.0082 16.2803C11.7275 16.5732 11.2725 16.5732 10.9918 16.2803L3.80427 8.78033C3.52358 8.48744 3.52358 8.01257 3.80427 7.71967C4.08496 7.42678 4.54004 7.42678 4.82073 7.71967L11.5 14.6893L18.1793 7.71967C18.46 7.42678 18.915 7.42678 19.1957 7.71967C19.4764 8.01256 19.4764 8.48744 19.1957 8.78033L12.0082 16.2803Z",
104
+ fill: "currentColor"
105
+ }
106
+ ) }) })
107
+ ] }),
108
+ /* @__PURE__ */ e(_, { when: h, wrapper: (t) => /* @__PURE__ */ e(Y, { children: t }), children: /* @__PURE__ */ e(it, { children: /* @__PURE__ */ e(et, { children: o.map((t) => /* @__PURE__ */ e(ot, { item: t, children: /* @__PURE__ */ e(nt, { truncate: !0, children: t.label }) }, t.value)) }) }) }),
109
+ /* @__PURE__ */ e(r.HiddenSelect, {})
110
+ ]
111
+ }
112
+ );
113
+ };
114
+ export {
115
+ gt as StatusTagSelect
116
+ };
117
+ //# sourceMappingURL=StatusTagSelect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StatusTagSelect.js","sources":["../../../src/components/status-tag-select/StatusTagSelect.tsx"],"sourcesContent":["import { styled } from '@stokelp/styled-system/jsx'\nimport { statusTagSelect, type StatusTagSelectVariantProps } from '@stokelp/styled-system/recipes'\nimport { HTMLStyledProps } from '@stokelp/styled-system/types'\nimport { type FC, useState } from 'react'\nimport { Portal, Select as ArkSelect, type SelectRootProps, createListCollection } from '@ark-ui/react'\nimport { ConditionalWrapper } from '~/shared/ConditionalWrapper.tsx'\nimport { createStyleContext } from '~/utils/slots.tsx'\n\nconst { withProvider, withContext } = createStyleContext(statusTagSelect)\n\nconst Root = withProvider(styled(ArkSelect.Root<StatusTagSelectItem>), 'root', {\n defaultProps: {\n loopFocus: true,\n },\n})\n\nconst Content = withContext(styled(ArkSelect.Content), 'content')\nconst Indicator = withContext(styled(ArkSelect.Indicator), 'indicator')\nconst Item = withContext(styled(ArkSelect.Item), 'item')\nconst ItemText = withContext(styled(ArkSelect.ItemText), 'itemText')\nconst Positioner = withContext(styled(ArkSelect.Positioner), 'positioner')\nconst Trigger = withContext(styled(ArkSelect.Trigger), 'trigger')\nconst ValueText = withContext(styled(ArkSelect.ValueText), 'valueText')\n\ntype Severity = StatusTagSelectVariantProps['severity']\n\nexport type StatusTagSelectItem = {\n value: string | number\n label: string\n disabled?: boolean\n severity?: Severity\n}\n\nexport type StatusTagSelectProps = Omit<SelectRootProps<StatusTagSelectItem>, 'collection' | 'multiple' | 'asChild'> & {\n items: StatusTagSelectItem[]\n usePortal?: boolean\n} & HTMLStyledProps<'button'> &\n StatusTagSelectVariantProps\n\nexport const StatusTagSelect: FC<StatusTagSelectProps> = ({\n items,\n lazyMount = true,\n usePortal = true,\n unmountOnExit = true,\n positioning,\n onValueChange,\n severity: severityFromUser,\n size,\n closeOnSelect,\n composite,\n defaultOpen,\n defaultValue: defaultValueFromUser,\n disabled,\n form,\n highlightedValue,\n id,\n ids,\n immediate,\n invalid,\n loopFocus,\n name,\n onExitComplete,\n onFocusOutside,\n onHighlightChange,\n onInteractOutside,\n onOpenChange,\n onPointerDownOutside,\n open,\n present,\n readOnly,\n required,\n scrollToIndexFn,\n value,\n ...props\n}) => {\n const shouldControlSeverity = items.every(item => 'severity' in item && !!item.severity)\n const defaultValue = defaultValueFromUser\n ? defaultValueFromUser\n : items.length > 0\n ? [items[0].value.toString()]\n : undefined\n\n const [severity, setSeverity] = useState<Severity>(() => {\n if (defaultValue) {\n const match = items.find(item => item.value.toString() === defaultValue[0])\n\n return match && shouldControlSeverity ? match.severity : 'neutral'\n }\n return items.length > 0 && shouldControlSeverity ? items[0].severity : 'neutral'\n })\n\n const onValueChangeHandler: StatusTagSelectProps['onValueChange'] = details => {\n if (details.items.length > 0 && typeof details.items[0] === 'object') {\n setSeverity(((details.items[0] as StatusTagSelectItem).severity ?? 'neutral') as Severity)\n }\n onValueChange?.(details)\n }\n const collection = createListCollection({\n items,\n })\n\n return (\n <Root\n closeOnSelect={closeOnSelect}\n composite={composite}\n defaultOpen={defaultOpen}\n lazyMount={lazyMount}\n unmountOnExit={unmountOnExit}\n collection={collection}\n defaultValue={defaultValue}\n positioning={{ sameWidth: true, gutter: 0, ...positioning }}\n onValueChange={shouldControlSeverity ? onValueChangeHandler : onValueChange}\n severity={shouldControlSeverity ? severity : severityFromUser}\n size={size}\n disabled={disabled}\n form={form}\n highlightedValue={highlightedValue}\n id={id}\n ids={ids}\n immediate={immediate}\n invalid={invalid}\n loopFocus={loopFocus}\n name={name}\n onExitComplete={onExitComplete}\n onFocusOutside={onFocusOutside}\n onHighlightChange={onHighlightChange}\n onInteractOutside={onInteractOutside}\n onOpenChange={onOpenChange}\n onPointerDownOutside={onPointerDownOutside}\n open={open}\n present={present}\n readOnly={readOnly}\n required={required}\n scrollToIndexFn={scrollToIndexFn}\n value={value}\n >\n <Trigger {...props}>\n <ValueText />\n <Indicator asChild>\n <svg width=\"23\" height=\"24\" viewBox=\"0 0 23 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M12.0082 16.2803C11.7275 16.5732 11.2725 16.5732 10.9918 16.2803L3.80427 8.78033C3.52358 8.48744 3.52358 8.01257 3.80427 7.71967C4.08496 7.42678 4.54004 7.42678 4.82073 7.71967L11.5 14.6893L18.1793 7.71967C18.46 7.42678 18.915 7.42678 19.1957 7.71967C19.4764 8.01256 19.4764 8.48744 19.1957 8.78033L12.0082 16.2803Z\"\n fill=\"currentColor\"\n />\n </svg>\n </Indicator>\n </Trigger>\n <ConditionalWrapper when={usePortal} wrapper={children => <Portal>{children}</Portal>}>\n <Positioner>\n <Content>\n {items.map(item => (\n <Item key={item.value} item={item}>\n <ItemText truncate>{item.label}</ItemText>\n </Item>\n ))}\n </Content>\n </Positioner>\n </ConditionalWrapper>\n <ArkSelect.HiddenSelect />\n </Root>\n )\n}\n"],"names":["withProvider","withContext","createStyleContext","statusTagSelect","Root","styled","ArkSelect","Content","Indicator","Item","ItemText","Positioner","Trigger","ValueText","StatusTagSelect","items","lazyMount","usePortal","unmountOnExit","positioning","onValueChange","severityFromUser","size","closeOnSelect","composite","defaultOpen","defaultValueFromUser","disabled","form","highlightedValue","id","ids","immediate","invalid","loopFocus","name","onExitComplete","onFocusOutside","onHighlightChange","onInteractOutside","onOpenChange","onPointerDownOutside","open","present","readOnly","required","scrollToIndexFn","value","props","shouldControlSeverity","item","defaultValue","severity","setSeverity","useState","match","onValueChangeHandler","details","collection","createListCollection","jsxs","jsx","ConditionalWrapper","children","Portal"],"mappings":";;;;;;;;AAQA,MAAM,EAAE,c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;AAAA,MACA,gBAAAC;AAAA,MACA,mBAAAC;AAAA,MACA,mBAAAC;AAAA,MACA,cAAAC;AAAA,MACA,sBAAAC;AAAA,MACA,MAAAC;AAAA,MACA,SAAAC;AAAA,MACA,UAAAC;AAAA,MACA,UAAAC;AAAA,MACA,iBAAAC;AAAA,MACA,OAAAC;AAAA,MAEA,UAAA;AAAA,QAAA,gBAAAa,EAAChD,IAAA,EAAS,GAAGoC,GACX,UAAA;AAAA,UAAA,gBAAAa,EAAChD,IAAA,EAAU;AAAA,UACX,gBAAAgD,EAACrD,IAAA,EAAU,SAAO,IAChB,4BAAC,OAAA,EAAI,OAAM,MAAK,QAAO,MAAK,SAAQ,aAAY,MAAK,QAAO,OAAM,8BAChE,UAAA,gBAAAqD;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,UAAS;AAAA,cACT,UAAS;AAAA,cACT,GAAE;AAAA,cACF,MAAK;AAAA,YAAA;AAAA,UAAA,GAET,EAAA,CACF;AAAA,QAAA,GACF;AAAA,QACA,gBAAAA,EAACC,GAAA,EAAmB,MAAM7C,GAAW,SAAS,CAAA8C,MAAY,gBAAAF,EAACG,GAAA,EAAQ,UAAAD,EAAA,CAAS,GAC1E,UAAA,gBAAAF,EAAClD,IAAA,EACC,UAAA,gBAAAkD,EAACtD,MACE,UAAAQ,EAAM,IAAI,CAAAmC,MACT,gBAAAW,EAACpD,IAAA,EAAsB,MAAAyC,GACrB,UAAA,gBAAAW,EAACnD,IAAA,EAAS,UAAQ,IAAE,UAAAwC,EAAK,MAAA,CAAM,KADtBA,EAAK,KAEhB,CACD,EAAA,CACH,GACF,GACF;AAAA,QACA,gBAAAW,EAACvD,EAAU,cAAV,CAAA,CAAuB;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAG9B;"}
@@ -0,0 +1,2 @@
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),e=require("@ark-ui/react"),r=require("@stokelp/styled-system/css"),S=require("@stokelp/styled-system/jsx"),i=require("@stokelp/styled-system/recipes"),d=require("react"),o=d.forwardRef((n,l)=>{const[a,h]=i.switchRecipe.splitVariantProps(n),[u,p]=S.splitCssProps(h),{children:c,className:w,...m}=p,t=i.switchRecipe(a);return s.jsxs(e.Switch.Root,{ref:l,className:r.cx(t.root,r.css(u),w),...m,children:[s.jsx(e.Switch.Control,{className:t.control,children:s.jsx(e.Switch.Thumb,{className:t.thumb})}),c?s.jsx(e.Switch.Label,{className:t.label,children:c}):null,s.jsx(e.Switch.HiddenInput,{})]})});o.displayName="Switch";exports.Switch=o;
2
+ //# sourceMappingURL=Switch.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Switch.cjs","sources":["../../../src/components/switch/Switch.tsx"],"sourcesContent":["import { Switch as ArkSwitch, type SwitchRootProps } from '@ark-ui/react'\nimport { css, cx } from '@stokelp/styled-system/css'\nimport { splitCssProps } from '@stokelp/styled-system/jsx'\nimport { switchRecipe, type SwitchRecipeVariantProps } from '@stokelp/styled-system/recipes'\nimport type { Assign, JsxStyleProps } from '@stokelp/styled-system/types'\nimport { forwardRef, type ReactNode } from 'react'\n\nexport interface SwitchProps extends Assign<JsxStyleProps, SwitchRootProps>, SwitchRecipeVariantProps {\n children?: ReactNode\n}\n\nexport const Switch = forwardRef<HTMLLabelElement, SwitchProps>((props, ref) => {\n const [variantProps, switchProps] = switchRecipe.splitVariantProps(props)\n const [cssProps, localProps] = splitCssProps(switchProps)\n const { children, className, ...rootProps } = localProps\n const styles = switchRecipe(variantProps)\n\n return (\n <ArkSwitch.Root ref={ref} className={cx(styles.root, css(cssProps), className)} {...rootProps}>\n <ArkSwitch.Control className={styles.control}>\n <ArkSwitch.Thumb className={styles.thumb} />\n </ArkSwitch.Control>\n {children ? <ArkSwitch.Label className={styles.label}>{children}</ArkSwitch.Label> : null}\n <ArkSwitch.HiddenInput />\n </ArkSwitch.Root>\n )\n})\n\nSwitch.displayName = 'Switch'\n"],"names":["Switch","forwardRef","props","ref","variantProps","switchProps","switchRecipe","cssProps","localProps","splitCssProps","children","className","rootProps","styles","jsxs","ArkSwitch","cx","css","jsx"],"mappings":"4SAWaA,EAASC,EAAAA,WAA0C,CAACC,EAAOC,IAAQ,CAC9E,KAAM,CAACC,EAAcC,CAAW,EAAIC,EAAAA,aAAa,kBAAkBJ,CAAK,EAClE,CAACK,EAAUC,CAAU,EAAIC,EAAAA,cAAcJ,CAAW,EAClD,CAAE,SAAAK,EAAU,UAAAC,EAAW,GAAGC,GAAcJ,EACxCK,EAASP,EAAAA,aAAaF,CAAY,EAExC,OACEU,EAAAA,KAACC,EAAAA,OAAU,KAAV,CAAe,IAAAZ,EAAU,UAAWa,KAAGH,EAAO,KAAMI,EAAAA,IAAIV,CAAQ,EAAGI,CAAS,EAAI,GAAGC,EAClF,SAAA,CAAAM,EAAAA,IAACH,EAAAA,OAAU,QAAV,CAAkB,UAAWF,EAAO,QACnC,SAAAK,EAAAA,IAACH,EAAAA,OAAU,MAAV,CAAgB,UAAWF,EAAO,MAAO,EAC5C,EACCH,QAAYK,EAAAA,OAAU,MAAV,CAAgB,UAAWF,EAAO,MAAQ,SAAAH,CAAA,CAAS,EAAqB,KACrFQ,MAACH,EAAAA,OAAU,YAAV,CAAA,CAAsB,CAAA,EACzB,CAEJ,CAAC,EAEDf,EAAO,YAAc"}
@@ -0,0 +1,20 @@
1
+ "use client";
2
+ import { jsxs as f, jsx as r } from "react/jsx-runtime";
3
+ import { Switch as s } from "@ark-ui/react";
4
+ import { cx as d, css as w } from "@stokelp/styled-system/css";
5
+ import { splitCssProps as P } from "@stokelp/styled-system/jsx";
6
+ import { switchRecipe as c } from "@stokelp/styled-system/recipes";
7
+ import { forwardRef as u } from "react";
8
+ const N = u((i, l) => {
9
+ const [a, e] = c.splitVariantProps(i), [m, p] = P(e), { children: t, className: n, ...h } = p, o = c(a);
10
+ return /* @__PURE__ */ f(s.Root, { ref: l, className: d(o.root, w(m), n), ...h, children: [
11
+ /* @__PURE__ */ r(s.Control, { className: o.control, children: /* @__PURE__ */ r(s.Thumb, { className: o.thumb }) }),
12
+ t ? /* @__PURE__ */ r(s.Label, { className: o.label, children: t }) : null,
13
+ /* @__PURE__ */ r(s.HiddenInput, {})
14
+ ] });
15
+ });
16
+ N.displayName = "Switch";
17
+ export {
18
+ N as Switch
19
+ };
20
+ //# sourceMappingURL=Switch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Switch.js","sources":["../../../src/components/switch/Switch.tsx"],"sourcesContent":["import { Switch as ArkSwitch, type SwitchRootProps } from '@ark-ui/react'\nimport { css, cx } from '@stokelp/styled-system/css'\nimport { splitCssProps } from '@stokelp/styled-system/jsx'\nimport { switchRecipe, type SwitchRecipeVariantProps } from '@stokelp/styled-system/recipes'\nimport type { Assign, JsxStyleProps } from '@stokelp/styled-system/types'\nimport { forwardRef, type ReactNode } from 'react'\n\nexport interface SwitchProps extends Assign<JsxStyleProps, SwitchRootProps>, SwitchRecipeVariantProps {\n children?: ReactNode\n}\n\nexport const Switch = forwardRef<HTMLLabelElement, SwitchProps>((props, ref) => {\n const [variantProps, switchProps] = switchRecipe.splitVariantProps(props)\n const [cssProps, localProps] = splitCssProps(switchProps)\n const { children, className, ...rootProps } = localProps\n const styles = switchRecipe(variantProps)\n\n return (\n <ArkSwitch.Root ref={ref} className={cx(styles.root, css(cssProps), className)} {...rootProps}>\n <ArkSwitch.Control className={styles.control}>\n <ArkSwitch.Thumb className={styles.thumb} />\n </ArkSwitch.Control>\n {children ? <ArkSwitch.Label className={styles.label}>{children}</ArkSwitch.Label> : null}\n <ArkSwitch.HiddenInput />\n </ArkSwitch.Root>\n )\n})\n\nSwitch.displayName = 'Switch'\n"],"names":["Switch","forwardRef","props","ref","variantProps","switchProps","switchRecipe","cssProps","localProps","splitCssProps","children","className","rootProps","styles","jsxs","ArkSwitch","cx","css","jsx"],"mappings":";;;;;;;AAWO,MAAMA,IAASC,EAA0C,CAACC,GAAOC,MAAQ;AAC9E,QAAM,CAACC,GAAcC,CAAW,IAAIC,EAAa,kBAAkBJ,CAAK,GAClE,CAACK,GAAUC,CAAU,IAAIC,EAAcJ,CAAW,GAClD,EAAE,UAAAK,GAAU,WAAAC,GAAW,GAAGC,MAAcJ,GACxCK,IAASP,EAAaF,CAAY;AAExC,SACE,gBAAAU,EAACC,EAAU,MAAV,EAAe,KAAAZ,GAAU,WAAWa,EAAGH,EAAO,MAAMI,EAAIV,CAAQ,GAAGI,CAAS,GAAI,GAAGC,GAClF,UAAA;AAAA,IAAA,gBAAAM,EAACH,EAAU,SAAV,EAAkB,WAAWF,EAAO,SACnC,UAAA,gBAAAK,EAACH,EAAU,OAAV,EAAgB,WAAWF,EAAO,OAAO,GAC5C;AAAA,IACCH,sBAAYK,EAAU,OAAV,EAAgB,WAAWF,EAAO,OAAQ,UAAAH,EAAA,CAAS,IAAqB;AAAA,IACrF,gBAAAQ,EAACH,EAAU,aAAV,CAAA,CAAsB;AAAA,EAAA,GACzB;AAEJ,CAAC;AAEDf,EAAO,cAAc;"}
@@ -0,0 +1,2 @@
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("@ark-ui/react"),o=require("@stokelp/styled-system/css"),s=require("@stokelp/styled-system/jsx"),i=require("@stokelp/styled-system/recipes"),m=require("react"),y=require("../../utils/slots.cjs"),{withProvider:x,withContext:r}=y.createStyleContext(i.switchCard,{dataAttr:!0}),P=x(s.styled(t.Switch.Root)),j=r(s.styled(t.Switch.Label),"title"),q=r(s.styled("div"),"content"),g=r(s.styled("p"),"description"),b=r(s.styled(t.ark.img),"image"),a=m.forwardRef((n,d)=>{const[l,h]=i.switchCard.splitVariantProps(n),[w,C]=s.splitCssProps(h),{children:S,className:p,...u}=C,c=i.switchCard(l);return e.jsxs(P,{ref:d,className:o.cx(c.root,o.css(w),p),...u,children:[S,e.jsx(t.Switch.Control,{className:c.control,children:e.jsx(t.Switch.Thumb,{className:c.thumb})}),e.jsx(t.Switch.HiddenInput,{})]})});a.displayName="SwitchCard";exports.SwitchCard=a;exports.SwitchCardContent=q;exports.SwitchCardDescription=g;exports.SwitchCardImage=b;exports.SwitchCardTitle=j;
2
+ //# sourceMappingURL=SwitchCard.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SwitchCard.cjs","sources":["../../../src/components/switch-card/SwitchCard.tsx"],"sourcesContent":["import { ark, Switch as ArkSwitch, type SwitchRootProps } from '@ark-ui/react'\nimport { css, cx } from '@stokelp/styled-system/css'\nimport { splitCssProps, styled } from '@stokelp/styled-system/jsx'\nimport { switchCard, type SwitchCardVariantProps } from '@stokelp/styled-system/recipes'\nimport type { Assign, JsxStyleProps } from '@stokelp/styled-system/types'\nimport { ComponentProps, forwardRef } from 'react'\nimport { createStyleContext } from '~/utils/slots'\n\nexport interface SwitchCardProps extends Assign<JsxStyleProps, SwitchRootProps>, SwitchCardVariantProps {}\n\nconst { withProvider, withContext } = createStyleContext(switchCard, {\n dataAttr: true,\n})\n\nconst SwitchCardRoot = withProvider(styled(ArkSwitch.Root))\n\nexport const SwitchCardTitle = withContext(styled(ArkSwitch.Label), 'title')\nexport const SwitchCardContent = withContext(styled('div'), 'content')\nexport const SwitchCardDescription = withContext(styled('p'), 'description')\nexport const SwitchCardImage = withContext(styled(ark.img), 'image')\n\nexport type SwitchCardTitleProps = ComponentProps<typeof SwitchCardTitle>\nexport type SwitchCardContentProps = ComponentProps<typeof SwitchCardContent>\nexport type SwitchCardDescriptionProps = ComponentProps<typeof SwitchCardDescription>\nexport type SwitchCardImageProps = ComponentProps<typeof SwitchCardImage>\n\nexport const SwitchCard = forwardRef<HTMLLabelElement, SwitchCardProps>((props, ref) => {\n const [variantProps, switchProps] = switchCard.splitVariantProps(props)\n const [cssProps, localProps] = splitCssProps(switchProps)\n const { children, className, ...rootProps } = localProps\n const styles = switchCard(variantProps)\n\n return (\n <SwitchCardRoot ref={ref} className={cx(styles.root, css(cssProps), className)} {...rootProps}>\n {children}\n <ArkSwitch.Control className={styles.control}>\n <ArkSwitch.Thumb className={styles.thumb} />\n </ArkSwitch.Control>\n <ArkSwitch.HiddenInput />\n </SwitchCardRoot>\n )\n})\n\nSwitchCard.displayName = 'SwitchCard'\n"],"names":["withProvider","withContext","createStyleContext","switchCard","SwitchCardRoot","styled","ArkSwitch","SwitchCardTitle","SwitchCardContent","SwitchCardDescription","SwitchCardImage","ark","SwitchCard","forwardRef","props","ref","variantProps","switchProps","cssProps","localProps","splitCssProps","children","className","rootProps","styles","jsxs","cx","css","jsx"],"mappings":"+UAUM,CAAE,aAAAA,EAAc,YAAAC,GAAgBC,EAAAA,mBAAmBC,EAAAA,WAAY,CACnE,SAAU,EACZ,CAAC,EAEKC,EAAiBJ,EAAaK,EAAAA,OAAOC,EAAAA,OAAU,IAAI,CAAC,EAE7CC,EAAkBN,EAAYI,EAAAA,OAAOC,EAAAA,OAAU,KAAK,EAAG,OAAO,EAC9DE,EAAoBP,EAAYI,SAAO,KAAK,EAAG,SAAS,EACxDI,EAAwBR,EAAYI,SAAO,GAAG,EAAG,aAAa,EAC9DK,EAAkBT,EAAYI,EAAAA,OAAOM,EAAAA,IAAI,GAAG,EAAG,OAAO,EAOtDC,EAAaC,EAAAA,WAA8C,CAACC,EAAOC,IAAQ,CACtF,KAAM,CAACC,EAAcC,CAAW,EAAId,EAAAA,WAAW,kBAAkBW,CAAK,EAChE,CAACI,EAAUC,CAAU,EAAIC,EAAAA,cAAcH,CAAW,EAClD,CAAE,SAAAI,EAAU,UAAAC,EAAW,GAAGC,GAAcJ,EACxCK,EAASrB,EAAAA,WAAWa,CAAY,EAEtC,OACES,EAAAA,KAACrB,EAAA,CAAe,IAAAW,EAAU,UAAWW,EAAAA,GAAGF,EAAO,KAAMG,EAAAA,IAAIT,CAAQ,EAAGI,CAAS,EAAI,GAAGC,EACjF,SAAA,CAAAF,EACDO,EAAAA,IAACtB,EAAAA,OAAU,QAAV,CAAkB,UAAWkB,EAAO,QACnC,SAAAI,EAAAA,IAACtB,EAAAA,OAAU,MAAV,CAAgB,UAAWkB,EAAO,MAAO,EAC5C,EACAI,MAACtB,EAAAA,OAAU,YAAV,CAAA,CAAsB,CAAA,EACzB,CAEJ,CAAC,EAEDM,EAAW,YAAc"}
@@ -0,0 +1,27 @@
1
+ "use client";
2
+ import { jsxs as C, jsx as i } from "react/jsx-runtime";
3
+ import { Switch as t, ark as f } from "@ark-ui/react";
4
+ import { cx as S, css as P } from "@stokelp/styled-system/css";
5
+ import { splitCssProps as u, styled as o } from "@stokelp/styled-system/jsx";
6
+ import { switchCard as c } from "@stokelp/styled-system/recipes";
7
+ import { forwardRef as x } from "react";
8
+ import { createStyleContext as N } from "../../utils/slots.js";
9
+ const { withProvider: y, withContext: r } = N(c, {
10
+ dataAttr: !0
11
+ }), b = y(o(t.Root)), D = r(o(t.Label), "title"), H = r(o("div"), "content"), L = r(o("p"), "description"), V = r(o(f.img), "image"), g = x((e, a) => {
12
+ const [n, m] = c.splitVariantProps(e), [p, l] = u(m), { children: d, className: h, ...w } = l, s = c(n);
13
+ return /* @__PURE__ */ C(b, { ref: a, className: S(s.root, P(p), h), ...w, children: [
14
+ d,
15
+ /* @__PURE__ */ i(t.Control, { className: s.control, children: /* @__PURE__ */ i(t.Thumb, { className: s.thumb }) }),
16
+ /* @__PURE__ */ i(t.HiddenInput, {})
17
+ ] });
18
+ });
19
+ g.displayName = "SwitchCard";
20
+ export {
21
+ g as SwitchCard,
22
+ H as SwitchCardContent,
23
+ L as SwitchCardDescription,
24
+ V as SwitchCardImage,
25
+ D as SwitchCardTitle
26
+ };
27
+ //# sourceMappingURL=SwitchCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SwitchCard.js","sources":["../../../src/components/switch-card/SwitchCard.tsx"],"sourcesContent":["import { ark, Switch as ArkSwitch, type SwitchRootProps } from '@ark-ui/react'\nimport { css, cx } from '@stokelp/styled-system/css'\nimport { splitCssProps, styled } from '@stokelp/styled-system/jsx'\nimport { switchCard, type SwitchCardVariantProps } from '@stokelp/styled-system/recipes'\nimport type { Assign, JsxStyleProps } from '@stokelp/styled-system/types'\nimport { ComponentProps, forwardRef } from 'react'\nimport { createStyleContext } from '~/utils/slots'\n\nexport interface SwitchCardProps extends Assign<JsxStyleProps, SwitchRootProps>, SwitchCardVariantProps {}\n\nconst { withProvider, withContext } = createStyleContext(switchCard, {\n dataAttr: true,\n})\n\nconst SwitchCardRoot = withProvider(styled(ArkSwitch.Root))\n\nexport const SwitchCardTitle = withContext(styled(ArkSwitch.Label), 'title')\nexport const SwitchCardContent = withContext(styled('div'), 'content')\nexport const SwitchCardDescription = withContext(styled('p'), 'description')\nexport const SwitchCardImage = withContext(styled(ark.img), 'image')\n\nexport type SwitchCardTitleProps = ComponentProps<typeof SwitchCardTitle>\nexport type SwitchCardContentProps = ComponentProps<typeof SwitchCardContent>\nexport type SwitchCardDescriptionProps = ComponentProps<typeof SwitchCardDescription>\nexport type SwitchCardImageProps = ComponentProps<typeof SwitchCardImage>\n\nexport const SwitchCard = forwardRef<HTMLLabelElement, SwitchCardProps>((props, ref) => {\n const [variantProps, switchProps] = switchCard.splitVariantProps(props)\n const [cssProps, localProps] = splitCssProps(switchProps)\n const { children, className, ...rootProps } = localProps\n const styles = switchCard(variantProps)\n\n return (\n <SwitchCardRoot ref={ref} className={cx(styles.root, css(cssProps), className)} {...rootProps}>\n {children}\n <ArkSwitch.Control className={styles.control}>\n <ArkSwitch.Thumb className={styles.thumb} />\n </ArkSwitch.Control>\n <ArkSwitch.HiddenInput />\n </SwitchCardRoot>\n )\n})\n\nSwitchCard.displayName = 'SwitchCard'\n"],"names":["withProvider","withContext","createStyleContext","switchCard","SwitchCardRoot","styled","ArkSwitch","SwitchCardTitle","SwitchCardContent","SwitchCardDescription","SwitchCardImage","ark","SwitchCard","forwardRef","props","ref","variantProps","switchProps","cssProps","localProps","splitCssProps","children","className","rootProps","styles","jsxs","cx","css","jsx"],"mappings":";;;;;;;;AAUA,MAAM,EAAE,cAAAA,GAAc,aAAAC,MAAgBC,EAAmBC,GAAY;AAAA,EACnE,UAAU;AACZ,CAAC,GAEKC,IAAiBJ,EAAaK,EAAOC,EAAU,IAAI,CAAC,GAE7CC,IAAkBN,EAAYI,EAAOC,EAAU,KAAK,GAAG,OAAO,GAC9DE,IAAoBP,EAAYI,EAAO,KAAK,GAAG,SAAS,GACxDI,IAAwBR,EAAYI,EAAO,GAAG,GAAG,aAAa,GAC9DK,IAAkBT,EAAYI,EAAOM,EAAI,GAAG,GAAG,OAAO,GAOtDC,IAAaC,EAA8C,CAACC,GAAOC,MAAQ;AACtF,QAAM,CAACC,GAAcC,CAAW,IAAId,EAAW,kBAAkBW,CAAK,GAChE,CAACI,GAAUC,CAAU,IAAIC,EAAcH,CAAW,GAClD,EAAE,UAAAI,GAAU,WAAAC,GAAW,GAAGC,MAAcJ,GACxCK,IAASrB,EAAWa,CAAY;AAEtC,SACE,gBAAAS,EAACrB,GAAA,EAAe,KAAAW,GAAU,WAAWW,EAAGF,EAAO,MAAMG,EAAIT,CAAQ,GAAGI,CAAS,GAAI,GAAGC,GACjF,UAAA;AAAA,IAAAF;AAAA,IACD,gBAAAO,EAACtB,EAAU,SAAV,EAAkB,WAAWkB,EAAO,SACnC,UAAA,gBAAAI,EAACtB,EAAU,OAAV,EAAgB,WAAWkB,EAAO,OAAO,GAC5C;AAAA,IACA,gBAAAI,EAACtB,EAAU,aAAV,CAAA,CAAsB;AAAA,EAAA,GACzB;AAEJ,CAAC;AAEDM,EAAW,cAAc;"}
@@ -0,0 +1,2 @@
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./SwitchCard.cjs");exports.Content=t.SwitchCardContent;exports.Description=t.SwitchCardDescription;exports.Image=t.SwitchCardImage;exports.Root=t.SwitchCard;exports.Title=t.SwitchCardTitle;
2
+ //# sourceMappingURL=namespace.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"namespace.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ "use client";
2
+ import { SwitchCardContent as i, SwitchCardDescription as e, SwitchCardImage as r, SwitchCard as c, SwitchCardTitle as o } from "./SwitchCard.js";
3
+ export {
4
+ i as Content,
5
+ e as Description,
6
+ r as Image,
7
+ c as Root,
8
+ o as Title
9
+ };
10
+ //# sourceMappingURL=namespace.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"namespace.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -0,0 +1,2 @@
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("react"),l=require("@stokelp/styled-system/jsx"),u=require("@stokelp/styled-system/recipes"),j=require("../../utils/slots.cjs"),h=require("./TableProvider.cjs"),{withProvider:m,withContext:i}=j.createStyleContext(u.table),S=l.styled("div",u.tableContainer),C=m(l.styled("table"),"root"),p=s.forwardRef(({children:a,onSortChange:o,descriptor:t,...r},T)=>e.jsx(h.TableProvider,{descriptor:t,onSortChange:o,children:e.jsx(C,{ref:T,...r,children:a})}));p.displayName="Table";const _=i(l.styled("thead"),"thead"),y=i(l.styled("div"),"sortIndicatorRoot"),d=i(l.styled("svg"),"sortIndicator"),g=i(l.styled("tbody"),"tbody"),E=i(l.styled("tr"),"tr"),L=i(l.styled("th"),"th"),b=s.forwardRef(({children:a,addon:o,sortKey:t,onClick:r,...T},x)=>{const{dispatch:c,sortDescriptor:n}=h.useTable(),R=v=>{t&&(n===null?c({type:"UPDATE_SORT_DESCRIPTOR",payload:{key:t,direction:"asc"}}):n.key===t?n.direction==="asc"?c({type:"UPDATE_SORT_DESCRIPTOR",payload:{key:t,direction:"desc"}}):c({type:"CLEAR_SORT_DESCRIPTOR"}):c({type:"UPDATE_SORT_DESCRIPTOR",payload:{key:t,direction:"asc"}})),r?.(v)};return e.jsxs(L,{ref:x,...T,...t?{"data-sortable":!0}:{},role:"group",onClick:R,children:[a,o?e.jsxs("span",{className:"th__addon",children:[" ",o]}):null,n&&n.key===t?e.jsxs(y,{"data-state":"active",children:[e.jsx(d,{"data-active":n.direction==="asc"?!0:void 0,viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M2.33334 4.83332L4.00001 3.16666L5.66668 4.83332H2.33334Z",fill:"currentColor"})}),e.jsx(d,{"data-active":n.direction==="desc"?!0:void 0,viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M2.33333 3.16666L3.99999 4.83332L5.66666 3.16666H2.33333Z",fill:"currentColor"})})]}):t?e.jsxs(y,{"data-state":"idle",children:[e.jsx(d,{"data-active":!0,viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M2.33334 4.83332L4.00001 3.16666L5.66668 4.83332H2.33334Z",fill:"currentColor"})}),e.jsx(d,{"data-active":!0,viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M2.33333 3.16666L3.99999 4.83332L5.66666 3.16666H2.33333Z",fill:"currentColor"})})]}):null]})});b.displayName="Th";const P=i(l.styled("td"),"td"),O=l.styled("td",u.tableGroupTitle),f=s.forwardRef((a,o)=>{const t=s.useRef(null);return s.useLayoutEffect(()=>{if(t.current){const r=t.current?.closest("table")?.querySelector("thead > tr");r&&t.current.setAttribute("colspan",r.children.length.toString())}},[]),e.jsx("tr",{ref:o,className:"table_tr__group__title",children:e.jsx(O,{ref:t,...a})})});f.displayName="TableGroupTitle";const q=l.styled("td",u.tableEmptyRow),w=s.forwardRef((a,o)=>{const t=s.useRef(null);return s.useLayoutEffect(()=>{if(t.current){const r=t.current?.closest("table")?.querySelector("thead > tr");r&&t.current.setAttribute("colspan",r.children.length.toString())}},[]),e.jsx("tr",{ref:o,className:"table_tr__empty",children:e.jsx(q,{ref:t,...a})})});w.displayName="TableEmptyRow";exports.Table=p;exports.TableContainer=S;exports.TableEmptyRow=w;exports.TableGroupTitle=f;exports.Tbody=g;exports.Td=P;exports.Th=b;exports.Thead=_;exports.Tr=E;
2
+ //# sourceMappingURL=Table.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Table.cjs","sources":["../../../src/components/table/Table.tsx"],"sourcesContent":["import type { ComponentProps, ElementRef, FC, ReactNode } from 'react'\nimport { forwardRef, useLayoutEffect, useRef } from 'react'\nimport { styled } from '@stokelp/styled-system/jsx'\nimport { table, tableContainer, tableEmptyRow, tableGroupTitle } from '@stokelp/styled-system/recipes'\nimport { createStyleContext } from '~/utils/slots'\nimport { TableProvider, type TableProviderProps, useTable } from './TableProvider'\n\nconst { withProvider, withContext } = createStyleContext(table)\n\nexport const TableContainer = styled('div', tableContainer)\n\nconst StyledTable = withProvider(styled('table'), 'root')\ntype StyledTableProps = ComponentProps<typeof StyledTable>\n\nexport interface TableProps extends StyledTableProps, Pick<TableProviderProps, 'onSortChange' | 'descriptor'> {}\n\nexport const Table = forwardRef<ElementRef<typeof StyledTable>, TableProps>(\n ({ children, onSortChange, descriptor, ...props }, ref) => {\n return (\n <TableProvider descriptor={descriptor} onSortChange={onSortChange}>\n <StyledTable ref={ref} {...props}>\n {children}\n </StyledTable>\n </TableProvider>\n )\n },\n) as FC<TableProps>\n\nTable.displayName = 'Table'\n\nexport const Thead = withContext(styled('thead'), 'thead')\nconst SortIndicatorRoot = withContext(styled('div'), 'sortIndicatorRoot')\nconst SortIndicator = withContext(styled('svg'), 'sortIndicator')\nexport const Tbody = withContext(styled('tbody'), 'tbody')\nexport const Tr = withContext(styled('tr'), 'tr')\nconst StyledTh = withContext(styled('th'), 'th')\n\ntype StyledThProps = ComponentProps<typeof StyledTh>\n\nexport interface ThProps extends StyledThProps {\n addon?: ReactNode\n sortKey?: string\n}\n\nexport const Th = forwardRef<ElementRef<typeof StyledTh>, ThProps>(\n ({ children, addon, sortKey, onClick, ...props }, ref) => {\n const { dispatch, sortDescriptor } = useTable()\n\n const handleOnClick: ThProps['onClick'] = e => {\n if (sortKey) {\n if (sortDescriptor === null) {\n dispatch({\n type: 'UPDATE_SORT_DESCRIPTOR',\n payload: {\n key: sortKey,\n direction: 'asc',\n },\n })\n } else if (sortDescriptor.key === sortKey) {\n if (sortDescriptor.direction === 'asc') {\n dispatch({\n type: 'UPDATE_SORT_DESCRIPTOR',\n payload: {\n key: sortKey,\n direction: 'desc',\n },\n })\n } else {\n dispatch({\n type: 'CLEAR_SORT_DESCRIPTOR',\n })\n }\n } else {\n dispatch({\n type: 'UPDATE_SORT_DESCRIPTOR',\n payload: {\n key: sortKey,\n direction: 'asc',\n },\n })\n }\n }\n onClick?.(e)\n }\n\n return (\n <StyledTh\n ref={ref}\n {...props}\n {...(sortKey ? { 'data-sortable': true } : {})}\n role=\"group\"\n onClick={handleOnClick}\n >\n {children}\n {addon ? <span className=\"th__addon\">&nbsp;{addon}</span> : null}\n {sortDescriptor && sortDescriptor.key === sortKey ? (\n <SortIndicatorRoot data-state=\"active\">\n <SortIndicator\n data-active={sortDescriptor.direction === 'asc' ? true : undefined}\n viewBox=\"0 0 8 8\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M2.33334 4.83332L4.00001 3.16666L5.66668 4.83332H2.33334Z\" fill=\"currentColor\" />\n </SortIndicator>\n <SortIndicator\n data-active={sortDescriptor.direction === 'desc' ? true : undefined}\n viewBox=\"0 0 8 8\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M2.33333 3.16666L3.99999 4.83332L5.66666 3.16666H2.33333Z\" fill=\"currentColor\" />\n </SortIndicator>\n </SortIndicatorRoot>\n ) : sortKey ? (\n <SortIndicatorRoot data-state=\"idle\">\n <SortIndicator data-active={true} viewBox=\"0 0 8 8\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M2.33334 4.83332L4.00001 3.16666L5.66668 4.83332H2.33334Z\" fill=\"currentColor\" />\n </SortIndicator>\n <SortIndicator data-active={true} viewBox=\"0 0 8 8\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M2.33333 3.16666L3.99999 4.83332L5.66666 3.16666H2.33333Z\" fill=\"currentColor\" />\n </SortIndicator>\n </SortIndicatorRoot>\n ) : null}\n </StyledTh>\n )\n },\n) as FC<ThProps>\n\nTh.displayName = 'Th'\n\nexport const Td = withContext(styled('td'), 'td')\n\nconst StyledTableGroupTitle = styled('td', tableGroupTitle)\nexport type TableGroupTitleProps = ComponentProps<typeof StyledTableGroupTitle>\nexport const TableGroupTitle = forwardRef<HTMLTableRowElement, TableGroupTitleProps>((props, ref) => {\n const $td = useRef<ElementRef<typeof StyledTableGroupTitle>>(null)\n useLayoutEffect(() => {\n if ($td.current) {\n const tableColumns = $td.current?.closest('table')?.querySelector('thead > tr')\n if (tableColumns) {\n $td.current.setAttribute('colspan', tableColumns.children.length.toString())\n }\n }\n }, [])\n\n return (\n <tr ref={ref} className=\"table_tr__group__title\">\n <StyledTableGroupTitle ref={$td} {...props} />\n </tr>\n )\n}) as FC<TableGroupTitleProps>\nTableGroupTitle.displayName = 'TableGroupTitle'\n\nconst StyledTableEmptyRow = styled('td', tableEmptyRow)\nexport type TableEmptyRowProps = ComponentProps<typeof StyledTableEmptyRow>\nexport const TableEmptyRow = forwardRef<HTMLTableRowElement, TableEmptyRowProps>((props, ref) => {\n const $td = useRef<ElementRef<typeof StyledTableEmptyRow>>(null)\n useLayoutEffect(() => {\n if ($td.current) {\n const tableColumns = $td.current?.closest('table')?.querySelector('thead > tr')\n if (tableColumns) {\n $td.current.setAttribute('colspan', tableColumns.children.length.toString())\n }\n }\n }, [])\n\n return (\n <tr ref={ref} className=\"table_tr__empty\">\n <StyledTableEmptyRow ref={$td} {...props} />\n </tr>\n )\n}) as FC<TableEmptyRowProps>\nTableEmptyRow.displayName = 'TableEmptyRow'\n\nexport interface TheadProps extends ComponentProps<typeof Thead> {}\n\nexport interface TbodyProps extends ComponentProps<typeof Tbody> {}\n\nexport interface TrProps extends ComponentProps<typeof Tr> {}\n\nexport interface TdProps extends ComponentProps<typeof Td> {}\n\nexport interface TableContainerProps extends ComponentProps<typeof TableContainer> {}\n"],"names":["withProvider","withContext","createStyleContext","table","TableContainer","styled","tableContainer","StyledTable","Table","forwardRef","children","onSortChange","descriptor","props","ref","jsx","TableProvider","Thead","SortIndicatorRoot","SortIndicator","Tbody","Tr","StyledTh","Th","addon","sortKey","onClick","dispatch","sortDescriptor","useTable","handleOnClick","e","jsxs","Td","StyledTableGroupTitle","tableGroupTitle","TableGroupTitle","$td","useRef","useLayoutEffect","tableColumns","StyledTableEmptyRow","tableEmptyRow","TableEmptyRow"],"mappings":"6SAOM,CAAE,aAAAA,EAAc,YAAAC,GAAgBC,EAAAA,mBAAmBC,EAAAA,KAAK,EAEjDC,EAAiBC,EAAAA,OAAO,MAAOC,EAAAA,cAAc,EAEpDC,EAAcP,EAAaK,EAAAA,OAAO,OAAO,EAAG,MAAM,EAK3CG,EAAQC,EAAAA,WACnB,CAAC,CAAE,SAAAC,EAAU,aAAAC,EAAc,WAAAC,EAAY,GAAGC,CAAA,EAASC,IAE/CC,EAAAA,IAACC,EAAAA,cAAA,CAAc,WAAAJ,EAAwB,aAAAD,EACrC,SAAAI,EAAAA,IAACR,GAAY,IAAAO,EAAW,GAAGD,EACxB,SAAAH,CAAA,CACH,CAAA,CACF,CAGN,EAEAF,EAAM,YAAc,QAEb,MAAMS,EAAQhB,EAAYI,SAAO,OAAO,EAAG,OAAO,EACnDa,EAAoBjB,EAAYI,EAAAA,OAAO,KAAK,EAAG,mBAAmB,EAClEc,EAAgBlB,EAAYI,EAAAA,OAAO,KAAK,EAAG,eAAe,EACnDe,EAAQnB,EAAYI,SAAO,OAAO,EAAG,OAAO,EAC5CgB,EAAKpB,EAAYI,SAAO,IAAI,EAAG,IAAI,EAC1CiB,EAAWrB,EAAYI,EAAAA,OAAO,IAAI,EAAG,IAAI,EASlCkB,EAAKd,EAAAA,WAChB,CAAC,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,YAAY,EAC1EG,GACFH,EAAI,QAAQ,aAAa,UAAWG,EAAa,SAAS,OAAO,UAAU,CAE/E,CACF,EAAG,CAAA,CAAE,EAGHzB,EAAAA,IAAC,KAAA,CAAG,IAAAD,EAAU,UAAU,kBACtB,SAAAC,EAAAA,IAAC0B,EAAA,CAAoB,IAAKJ,EAAM,GAAGxB,CAAA,CAAO,CAAA,CAC5C,CAEJ,CAAC,EACD8B,EAAc,YAAc"}
@@ -0,0 +1,113 @@
1
+ "use client";
2
+ import { jsx as e, jsxs as d } from "react/jsx-runtime";
3
+ import { forwardRef as p, useRef as T, useLayoutEffect as m } from "react";
4
+ import { styled as r } from "@stokelp/styled-system/jsx";
5
+ import { tableContainer as w, tableGroupTitle as y, tableEmptyRow as R, table as v } from "@stokelp/styled-system/recipes";
6
+ import { createStyleContext as S } from "../../utils/slots.js";
7
+ import { TableProvider as C, useTable as _ } from "./TableProvider.js";
8
+ const { withProvider: g, withContext: i } = S(v), U = r("div", w), x = g(r("table"), "root"), E = p(
9
+ ({ children: n, onSortChange: o, descriptor: t, ...l }, u) => /* @__PURE__ */ e(C, { descriptor: t, onSortChange: o, children: /* @__PURE__ */ e(x, { ref: u, ...l, children: n }) })
10
+ );
11
+ E.displayName = "Table";
12
+ const j = i(r("thead"), "thead"), h = i(r("div"), "sortIndicatorRoot"), s = i(r("svg"), "sortIndicator"), q = i(r("tbody"), "tbody"), $ = i(r("tr"), "tr"), L = i(r("th"), "th"), O = p(
13
+ ({ children: n, addon: o, sortKey: t, onClick: l, ...u }, b) => {
14
+ const { dispatch: c, sortDescriptor: a } = _();
15
+ return /* @__PURE__ */ d(
16
+ L,
17
+ {
18
+ ref: b,
19
+ ...u,
20
+ ...t ? { "data-sortable": !0 } : {},
21
+ role: "group",
22
+ onClick: (f) => {
23
+ t && (a === null ? c({
24
+ type: "UPDATE_SORT_DESCRIPTOR",
25
+ payload: {
26
+ key: t,
27
+ direction: "asc"
28
+ }
29
+ }) : a.key === t ? a.direction === "asc" ? c({
30
+ type: "UPDATE_SORT_DESCRIPTOR",
31
+ payload: {
32
+ key: t,
33
+ direction: "desc"
34
+ }
35
+ }) : c({
36
+ type: "CLEAR_SORT_DESCRIPTOR"
37
+ }) : c({
38
+ type: "UPDATE_SORT_DESCRIPTOR",
39
+ payload: {
40
+ key: t,
41
+ direction: "asc"
42
+ }
43
+ })), l?.(f);
44
+ },
45
+ children: [
46
+ n,
47
+ o ? /* @__PURE__ */ d("span", { className: "th__addon", children: [
48
+ " ",
49
+ o
50
+ ] }) : null,
51
+ a && a.key === t ? /* @__PURE__ */ d(h, { "data-state": "active", children: [
52
+ /* @__PURE__ */ e(
53
+ s,
54
+ {
55
+ "data-active": a.direction === "asc" ? !0 : void 0,
56
+ viewBox: "0 0 8 8",
57
+ fill: "none",
58
+ xmlns: "http://www.w3.org/2000/svg",
59
+ children: /* @__PURE__ */ e("path", { d: "M2.33334 4.83332L4.00001 3.16666L5.66668 4.83332H2.33334Z", fill: "currentColor" })
60
+ }
61
+ ),
62
+ /* @__PURE__ */ e(
63
+ s,
64
+ {
65
+ "data-active": a.direction === "desc" ? !0 : void 0,
66
+ viewBox: "0 0 8 8",
67
+ fill: "none",
68
+ xmlns: "http://www.w3.org/2000/svg",
69
+ children: /* @__PURE__ */ e("path", { d: "M2.33333 3.16666L3.99999 4.83332L5.66666 3.16666H2.33333Z", fill: "currentColor" })
70
+ }
71
+ )
72
+ ] }) : t ? /* @__PURE__ */ d(h, { "data-state": "idle", children: [
73
+ /* @__PURE__ */ e(s, { "data-active": !0, viewBox: "0 0 8 8", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ e("path", { d: "M2.33334 4.83332L4.00001 3.16666L5.66668 4.83332H2.33334Z", fill: "currentColor" }) }),
74
+ /* @__PURE__ */ e(s, { "data-active": !0, viewBox: "0 0 8 8", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ e("path", { d: "M2.33333 3.16666L3.99999 4.83332L5.66666 3.16666H2.33333Z", fill: "currentColor" }) })
75
+ ] }) : null
76
+ ]
77
+ }
78
+ );
79
+ }
80
+ );
81
+ O.displayName = "Th";
82
+ const z = i(r("td"), "td"), P = r("td", y), k = p((n, o) => {
83
+ const t = T(null);
84
+ return m(() => {
85
+ if (t.current) {
86
+ const l = t.current?.closest("table")?.querySelector("thead > tr");
87
+ l && t.current.setAttribute("colspan", l.children.length.toString());
88
+ }
89
+ }, []), /* @__PURE__ */ e("tr", { ref: o, className: "table_tr__group__title", children: /* @__PURE__ */ e(P, { ref: t, ...n }) });
90
+ });
91
+ k.displayName = "TableGroupTitle";
92
+ const D = r("td", R), I = p((n, o) => {
93
+ const t = T(null);
94
+ return m(() => {
95
+ if (t.current) {
96
+ const l = t.current?.closest("table")?.querySelector("thead > tr");
97
+ l && t.current.setAttribute("colspan", l.children.length.toString());
98
+ }
99
+ }, []), /* @__PURE__ */ e("tr", { ref: o, className: "table_tr__empty", children: /* @__PURE__ */ e(D, { ref: t, ...n }) });
100
+ });
101
+ I.displayName = "TableEmptyRow";
102
+ export {
103
+ E as Table,
104
+ U as TableContainer,
105
+ I as TableEmptyRow,
106
+ k as TableGroupTitle,
107
+ q as Tbody,
108
+ z as Td,
109
+ O as Th,
110
+ j as Thead,
111
+ $ as Tr
112
+ };
113
+ //# sourceMappingURL=Table.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Table.js","sources":["../../../src/components/table/Table.tsx"],"sourcesContent":["import type { ComponentProps, ElementRef, FC, ReactNode } from 'react'\nimport { forwardRef, useLayoutEffect, useRef } from 'react'\nimport { styled } from '@stokelp/styled-system/jsx'\nimport { table, tableContainer, tableEmptyRow, tableGroupTitle } from '@stokelp/styled-system/recipes'\nimport { createStyleContext } from '~/utils/slots'\nimport { TableProvider, type TableProviderProps, useTable } from './TableProvider'\n\nconst { withProvider, withContext } = createStyleContext(table)\n\nexport const TableContainer = styled('div', tableContainer)\n\nconst StyledTable = withProvider(styled('table'), 'root')\ntype StyledTableProps = ComponentProps<typeof StyledTable>\n\nexport interface TableProps extends StyledTableProps, Pick<TableProviderProps, 'onSortChange' | 'descriptor'> {}\n\nexport const Table = forwardRef<ElementRef<typeof StyledTable>, TableProps>(\n ({ children, onSortChange, descriptor, ...props }, ref) => {\n return (\n <TableProvider descriptor={descriptor} onSortChange={onSortChange}>\n <StyledTable ref={ref} {...props}>\n {children}\n </StyledTable>\n </TableProvider>\n )\n },\n) as FC<TableProps>\n\nTable.displayName = 'Table'\n\nexport const Thead = withContext(styled('thead'), 'thead')\nconst SortIndicatorRoot = withContext(styled('div'), 'sortIndicatorRoot')\nconst SortIndicator = withContext(styled('svg'), 'sortIndicator')\nexport const Tbody = withContext(styled('tbody'), 'tbody')\nexport const Tr = withContext(styled('tr'), 'tr')\nconst StyledTh = withContext(styled('th'), 'th')\n\ntype StyledThProps = ComponentProps<typeof StyledTh>\n\nexport interface ThProps extends StyledThProps {\n addon?: ReactNode\n sortKey?: string\n}\n\nexport const Th = forwardRef<ElementRef<typeof StyledTh>, ThProps>(\n ({ children, addon, sortKey, onClick, ...props }, ref) => {\n const { dispatch, sortDescriptor } = useTable()\n\n const handleOnClick: ThProps['onClick'] = e => {\n if (sortKey) {\n if (sortDescriptor === null) {\n dispatch({\n type: 'UPDATE_SORT_DESCRIPTOR',\n payload: {\n key: sortKey,\n direction: 'asc',\n },\n })\n } else if (sortDescriptor.key === sortKey) {\n if (sortDescriptor.direction === 'asc') {\n dispatch({\n type: 'UPDATE_SORT_DESCRIPTOR',\n payload: {\n key: sortKey,\n direction: 'desc',\n },\n })\n } else {\n dispatch({\n type: 'CLEAR_SORT_DESCRIPTOR',\n })\n }\n } else {\n dispatch({\n type: 'UPDATE_SORT_DESCRIPTOR',\n payload: {\n key: sortKey,\n direction: 'asc',\n },\n })\n }\n }\n onClick?.(e)\n }\n\n return (\n <StyledTh\n ref={ref}\n {...props}\n {...(sortKey ? { 'data-sortable': true } : {})}\n role=\"group\"\n onClick={handleOnClick}\n >\n {children}\n {addon ? <span className=\"th__addon\">&nbsp;{addon}</span> : null}\n {sortDescriptor && sortDescriptor.key === sortKey ? (\n <SortIndicatorRoot data-state=\"active\">\n <SortIndicator\n data-active={sortDescriptor.direction === 'asc' ? true : undefined}\n viewBox=\"0 0 8 8\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M2.33334 4.83332L4.00001 3.16666L5.66668 4.83332H2.33334Z\" fill=\"currentColor\" />\n </SortIndicator>\n <SortIndicator\n data-active={sortDescriptor.direction === 'desc' ? true : undefined}\n viewBox=\"0 0 8 8\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M2.33333 3.16666L3.99999 4.83332L5.66666 3.16666H2.33333Z\" fill=\"currentColor\" />\n </SortIndicator>\n </SortIndicatorRoot>\n ) : sortKey ? (\n <SortIndicatorRoot data-state=\"idle\">\n <SortIndicator data-active={true} viewBox=\"0 0 8 8\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M2.33334 4.83332L4.00001 3.16666L5.66668 4.83332H2.33334Z\" fill=\"currentColor\" />\n </SortIndicator>\n <SortIndicator data-active={true} viewBox=\"0 0 8 8\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M2.33333 3.16666L3.99999 4.83332L5.66666 3.16666H2.33333Z\" fill=\"currentColor\" />\n </SortIndicator>\n </SortIndicatorRoot>\n ) : null}\n </StyledTh>\n )\n },\n) as FC<ThProps>\n\nTh.displayName = 'Th'\n\nexport const Td = withContext(styled('td'), 'td')\n\nconst StyledTableGroupTitle = styled('td', tableGroupTitle)\nexport type TableGroupTitleProps = ComponentProps<typeof StyledTableGroupTitle>\nexport const TableGroupTitle = forwardRef<HTMLTableRowElement, TableGroupTitleProps>((props, ref) => {\n const $td = useRef<ElementRef<typeof StyledTableGroupTitle>>(null)\n useLayoutEffect(() => {\n if ($td.current) {\n const tableColumns = $td.current?.closest('table')?.querySelector('thead > tr')\n if (tableColumns) {\n $td.current.setAttribute('colspan', tableColumns.children.length.toString())\n }\n }\n }, [])\n\n return (\n <tr ref={ref} className=\"table_tr__group__title\">\n <StyledTableGroupTitle ref={$td} {...props} />\n </tr>\n )\n}) as FC<TableGroupTitleProps>\nTableGroupTitle.displayName = 'TableGroupTitle'\n\nconst StyledTableEmptyRow = styled('td', tableEmptyRow)\nexport type TableEmptyRowProps = ComponentProps<typeof StyledTableEmptyRow>\nexport const TableEmptyRow = forwardRef<HTMLTableRowElement, TableEmptyRowProps>((props, ref) => {\n const $td = useRef<ElementRef<typeof StyledTableEmptyRow>>(null)\n useLayoutEffect(() => {\n if ($td.current) {\n const tableColumns = $td.current?.closest('table')?.querySelector('thead > tr')\n if (tableColumns) {\n $td.current.setAttribute('colspan', tableColumns.children.length.toString())\n }\n }\n }, [])\n\n return (\n <tr ref={ref} className=\"table_tr__empty\">\n <StyledTableEmptyRow ref={$td} {...props} />\n </tr>\n )\n}) as FC<TableEmptyRowProps>\nTableEmptyRow.displayName = 'TableEmptyRow'\n\nexport interface TheadProps extends ComponentProps<typeof Thead> {}\n\nexport interface TbodyProps extends ComponentProps<typeof Tbody> {}\n\nexport interface TrProps extends ComponentProps<typeof Tr> {}\n\nexport interface TdProps extends ComponentProps<typeof Td> {}\n\nexport interface TableContainerProps extends ComponentProps<typeof TableContainer> {}\n"],"names":["withProvider","withContext","createStyleContext","table","TableContainer","styled","tableContainer","StyledTable","Table","forwardRef","children","onSortChange","descriptor","props","ref","jsx","TableProvider","Thead","SortIndicatorRoot","SortIndicator","Tbody","Tr","StyledTh","Th","addon","sortKey","onClick","dispatch","sortDescriptor","useTable","jsxs","e","Td","StyledTableGroupTitle","tableGroupTitle","TableGroupTitle","$td","useRef","useLayoutEffect","tableColumns","StyledTableEmptyRow","tableEmptyRow","TableEmptyRow"],"mappings":";;;;;;;AAOA,MAAM,EAAE,cAAAA,GAAc,aAAAC,MAAgBC,EAAmBC,CAAK,GAEjDC,IAAiBC,EAAO,OAAOC,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GAAM,GAAGvB,EAAA,CAAO,EAAA,CAC5C;AAEJ,CAAC;AACD6B,EAAc,cAAc;"}
@@ -0,0 +1,2 @@
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),r=require("react"),l=(e,t)=>{switch(t.type){case"CLEAR_SORT_DESCRIPTOR":return{...e,sortDescriptor:null};case"UPDATE_SORT_DESCRIPTOR":return{...e,sortDescriptor:t.payload};default:return e}},o=r.createContext(void 0),a=()=>{const e=r.useContext(o);if(!e)throw new Error("useTable must be used within a <TableProvider/>");return e},d=({children:e,onSortChange:t,descriptor:c})=>{const[s,n]=r.useReducer(l,{sortDescriptor:c??null});r.useEffect(()=>{t?.(s.sortDescriptor)},[JSON.stringify(s.sortDescriptor)]);const u={...s,dispatch:n};return i.jsx(o.Provider,{value:u,children:e})};exports.TableProvider=d;exports.useTable=a;
2
+ //# sourceMappingURL=TableProvider.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableProvider.cjs","sources":["../../../src/components/table/TableProvider.tsx"],"sourcesContent":["import { createContext, Dispatch, FC, ReactNode, Reducer, useContext, useEffect, useReducer } from 'react'\nimport type { TableSortDescriptor } from './common'\n\ntype State = {\n sortDescriptor: TableSortDescriptor\n}\n\ntype Action =\n | {\n type: 'UPDATE_SORT_DESCRIPTOR'\n payload: TableSortDescriptor\n }\n | {\n type: 'CLEAR_SORT_DESCRIPTOR'\n }\n\ntype Context = State & {\n dispatch: Dispatch<Action>\n}\n\nexport interface TableProviderProps {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onSortChange?: (descriptor: TableSortDescriptor<any>) => void\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n descriptor?: TableSortDescriptor<any>\n children: ReactNode\n}\n\nconst tableReducer: Reducer<State, Action> = (state, action) => {\n switch (action.type) {\n case 'CLEAR_SORT_DESCRIPTOR': {\n return {\n ...state,\n sortDescriptor: null,\n }\n }\n case 'UPDATE_SORT_DESCRIPTOR': {\n return {\n ...state,\n sortDescriptor: action.payload,\n }\n }\n default:\n return state\n }\n}\n\nconst TableContext = createContext<Context | undefined>(undefined)\n\nexport const useTable = (): Context => {\n const context = useContext(TableContext)\n\n if (!context) {\n throw new Error('useTable must be used within a <TableProvider/>')\n }\n\n return context\n}\n\nexport const TableProvider: FC<TableProviderProps> = ({ children, onSortChange, descriptor }) => {\n const [state, dispatch] = useReducer(tableReducer, {\n sortDescriptor: descriptor ?? null,\n })\n\n useEffect(() => {\n onSortChange?.(state.sortDescriptor)\n }, [JSON.stringify(state.sortDescriptor)])\n\n const context = {\n ...state,\n dispatch,\n } satisfies Context\n\n return <TableContext.Provider value={context}>{children}</TableContext.Provider>\n}\n"],"names":["tableReducer","state","action","TableContext","createContext","useTable","context","useContext","TableProvider","children","onSortChange","descriptor","dispatch","useReducer","useEffect"],"mappings":"qJA4BMA,EAAuC,CAACC,EAAOC,IAAW,CAC9D,OAAQA,EAAO,KAAA,CACb,IAAK,wBACH,MAAO,CACL,GAAGD,EACH,eAAgB,IAAA,EAGpB,IAAK,yBACH,MAAO,CACL,GAAGA,EACH,eAAgBC,EAAO,OAAA,EAG3B,QACE,OAAOD,CAAA,CAEb,EAEME,EAAeC,EAAAA,cAAmC,MAAS,EAEpDC,EAAW,IAAe,CACrC,MAAMC,EAAUC,EAAAA,WAAWJ,CAAY,EAEvC,GAAI,CAACG,EACH,MAAM,IAAI,MAAM,iDAAiD,EAGnE,OAAOA,CACT,EAEaE,EAAwC,CAAC,CAAE,SAAAC,EAAU,aAAAC,EAAc,WAAAC,KAAiB,CAC/F,KAAM,CAACV,EAAOW,CAAQ,EAAIC,EAAAA,WAAWb,EAAc,CACjD,eAAgBW,GAAc,IAAA,CAC/B,EAEDG,EAAAA,UAAU,IAAM,CACdJ,IAAeT,EAAM,cAAc,CACrC,EAAG,CAAC,KAAK,UAAUA,EAAM,cAAc,CAAC,CAAC,EAEzC,MAAMK,EAAU,CACd,GAAGL,EACH,SAAAW,CAAA,EAGF,aAAQT,EAAa,SAAb,CAAsB,MAAOG,EAAU,SAAAG,EAAS,CAC1D"}
@@ -0,0 +1,41 @@
1
+ "use client";
2
+ import { jsx as u } from "react/jsx-runtime";
3
+ import { useReducer as i, useEffect as l, createContext as a, useContext as p } from "react";
4
+ const d = (e, r) => {
5
+ switch (r.type) {
6
+ case "CLEAR_SORT_DESCRIPTOR":
7
+ return {
8
+ ...e,
9
+ sortDescriptor: null
10
+ };
11
+ case "UPDATE_SORT_DESCRIPTOR":
12
+ return {
13
+ ...e,
14
+ sortDescriptor: r.payload
15
+ };
16
+ default:
17
+ return e;
18
+ }
19
+ }, o = a(void 0), D = () => {
20
+ const e = p(o);
21
+ if (!e)
22
+ throw new Error("useTable must be used within a <TableProvider/>");
23
+ return e;
24
+ }, b = ({ children: e, onSortChange: r, descriptor: s }) => {
25
+ const [t, c] = i(d, {
26
+ sortDescriptor: s ?? null
27
+ });
28
+ l(() => {
29
+ r?.(t.sortDescriptor);
30
+ }, [JSON.stringify(t.sortDescriptor)]);
31
+ const n = {
32
+ ...t,
33
+ dispatch: c
34
+ };
35
+ return /* @__PURE__ */ u(o.Provider, { value: n, children: e });
36
+ };
37
+ export {
38
+ b as TableProvider,
39
+ D as useTable
40
+ };
41
+ //# sourceMappingURL=TableProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableProvider.js","sources":["../../../src/components/table/TableProvider.tsx"],"sourcesContent":["import { createContext, Dispatch, FC, ReactNode, Reducer, useContext, useEffect, useReducer } from 'react'\nimport type { TableSortDescriptor } from './common'\n\ntype State = {\n sortDescriptor: TableSortDescriptor\n}\n\ntype Action =\n | {\n type: 'UPDATE_SORT_DESCRIPTOR'\n payload: TableSortDescriptor\n }\n | {\n type: 'CLEAR_SORT_DESCRIPTOR'\n }\n\ntype Context = State & {\n dispatch: Dispatch<Action>\n}\n\nexport interface TableProviderProps {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onSortChange?: (descriptor: TableSortDescriptor<any>) => void\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n descriptor?: TableSortDescriptor<any>\n children: ReactNode\n}\n\nconst tableReducer: Reducer<State, Action> = (state, action) => {\n switch (action.type) {\n case 'CLEAR_SORT_DESCRIPTOR': {\n return {\n ...state,\n sortDescriptor: null,\n }\n }\n case 'UPDATE_SORT_DESCRIPTOR': {\n return {\n ...state,\n sortDescriptor: action.payload,\n }\n }\n default:\n return state\n }\n}\n\nconst TableContext = createContext<Context | undefined>(undefined)\n\nexport const useTable = (): Context => {\n const context = useContext(TableContext)\n\n if (!context) {\n throw new Error('useTable must be used within a <TableProvider/>')\n }\n\n return context\n}\n\nexport const TableProvider: FC<TableProviderProps> = ({ children, onSortChange, descriptor }) => {\n const [state, dispatch] = useReducer(tableReducer, {\n sortDescriptor: descriptor ?? null,\n })\n\n useEffect(() => {\n onSortChange?.(state.sortDescriptor)\n }, [JSON.stringify(state.sortDescriptor)])\n\n const context = {\n ...state,\n dispatch,\n } satisfies Context\n\n return <TableContext.Provider value={context}>{children}</TableContext.Provider>\n}\n"],"names":["tableReducer","state","action","TableContext","createContext","useTable","context","useContext","TableProvider","children","onSortChange","descriptor","dispatch","useReducer","useEffect"],"mappings":";;;AA4BA,MAAMA,IAAuC,CAACC,GAAOC,MAAW;AAC9D,UAAQA,EAAO,MAAA;AAAA,IACb,KAAK;AACH,aAAO;AAAA,QACL,GAAGD;AAAA,QACH,gBAAgB;AAAA,MAAA;AAAA,IAGpB,KAAK;AACH,aAAO;AAAA,QACL,GAAGA;AAAA,QACH,gBAAgBC,EAAO;AAAA,MAAA;AAAA,IAG3B;AACE,aAAOD;AAAA,EAAA;AAEb,GAEME,IAAeC,EAAmC,MAAS,GAEpDC,IAAW,MAAe;AACrC,QAAMC,IAAUC,EAAWJ,CAAY;AAEvC,MAAI,CAACG;AACH,UAAM,IAAI,MAAM,iDAAiD;AAGnE,SAAOA;AACT,GAEaE,IAAwC,CAAC,EAAE,UAAAC,GAAU,cAAAC,GAAc,YAAAC,QAAiB;AAC/F,QAAM,CAACV,GAAOW,CAAQ,IAAIC,EAAWb,GAAc;AAAA,IACjD,gBAAgBW,KAAc;AAAA,EAAA,CAC/B;AAED,EAAAG,EAAU,MAAM;AACd,IAAAJ,IAAeT,EAAM,cAAc;AAAA,EACrC,GAAG,CAAC,KAAK,UAAUA,EAAM,cAAc,CAAC,CAAC;AAEzC,QAAMK,IAAU;AAAA,IACd,GAAGL;AAAA,IACH,UAAAW;AAAA,EAAA;AAGF,2BAAQT,EAAa,UAAb,EAAsB,OAAOG,GAAU,UAAAG,GAAS;AAC1D;"}
@@ -0,0 +1,2 @@
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),t=require("@ark-ui/react"),b=require("react"),s=require("@stokelp/styled-system/jsx"),a=require("@stokelp/styled-system/recipes"),T=require("../../utils/slots.cjs"),{withProvider:l,withContext:e}=T.createStyleContext(a.tabs),d=l(s.styled(t.Tabs.Root),"root",{defaultProps:{lazyMount:!0}}),u=e(s.styled(t.Tabs.Content),"content"),y=e(s.styled(t.Tabs.Trigger),"trigger"),g=s.styled(t.ark.span,a.tabsChip),p=e(s.styled(t.Tabs.Indicator),"indicator"),o=b.forwardRef(({children:i,...n},c)=>r.jsxs(t.Tabs.List,{ref:c,...n,children:[i,r.jsx(p,{})]}));o.displayName=t.Tabs.List.displayName;const C=e(s.styled(o),"list");exports.Tabs=d;exports.TabsChip=g;exports.TabsContent=u;exports.TabsList=C;exports.TabsTrigger=y;
2
+ //# sourceMappingURL=Tabs.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tabs.cjs","sources":["../../../src/components/tabs/Tabs.tsx"],"sourcesContent":["import { ark, Tabs as ArkTab } from '@ark-ui/react'\nimport { ComponentProps, type ComponentPropsWithoutRef, type ElementRef, forwardRef } from 'react'\nimport { styled } from '@stokelp/styled-system/jsx'\nimport { tabs, tabsChip } from '@stokelp/styled-system/recipes'\nimport { createStyleContext } from '~/utils/slots.tsx'\n\nconst { withProvider, withContext } = createStyleContext(tabs)\n\nexport const Tabs = withProvider(styled(ArkTab.Root), 'root', {\n defaultProps: {\n lazyMount: true,\n },\n})\nexport const TabsContent = withContext(styled(ArkTab.Content), 'content')\nexport const TabsTrigger = withContext(styled(ArkTab.Trigger), 'trigger')\nexport const TabsChip = styled(ark.span, tabsChip)\n\nconst TabsIndicator = withContext(styled(ArkTab.Indicator), 'indicator')\n\nconst List = forwardRef<ElementRef<typeof ArkTab.List>, ComponentPropsWithoutRef<typeof ArkTab.List>>(\n ({ children, ...props }, ref) => (\n <ArkTab.List ref={ref} {...props}>\n {children}\n <TabsIndicator />\n </ArkTab.List>\n ),\n)\nList.displayName = ArkTab.List.displayName\n\nexport const TabsList = withContext(styled(List), 'list')\n\nexport interface TabsProps extends ComponentProps<typeof Tabs> {}\n\nexport interface TabsContentProps extends ComponentProps<typeof TabsContent> {}\n\nexport interface TabsIndicatorProps extends ComponentProps<typeof TabsIndicator> {}\n\nexport interface TabsListProps extends ComponentProps<typeof TabsList> {}\n\nexport interface TabsTriggerProps extends ComponentProps<typeof TabsTrigger> {}\n\nexport interface TabsChipProps extends ComponentProps<typeof TabsChip> {}\n"],"names":["withProvider","withContext","createStyleContext","tabs","Tabs","styled","ArkTab","TabsContent","TabsTrigger","TabsChip","ark","tabsChip","TabsIndicator","List","forwardRef","children","props","ref","jsxs","TabsList"],"mappings":"uSAMM,CAAE,aAAAA,EAAc,YAAAC,GAAgBC,EAAAA,mBAAmBC,EAAAA,IAAI,EAEhDC,EAAOJ,EAAaK,EAAAA,OAAOC,EAAAA,KAAO,IAAI,EAAG,OAAQ,CAC5D,aAAc,CACZ,UAAW,EAAA,CAEf,CAAC,EACYC,EAAcN,EAAYI,EAAAA,OAAOC,EAAAA,KAAO,OAAO,EAAG,SAAS,EAC3DE,EAAcP,EAAYI,EAAAA,OAAOC,EAAAA,KAAO,OAAO,EAAG,SAAS,EAC3DG,EAAWJ,EAAAA,OAAOK,MAAI,KAAMC,EAAAA,QAAQ,EAE3CC,EAAgBX,EAAYI,EAAAA,OAAOC,EAAAA,KAAO,SAAS,EAAG,WAAW,EAEjEO,EAAOC,EAAAA,WACX,CAAC,CAAE,SAAAC,EAAU,GAAGC,CAAA,EAASC,IACvBC,EAAAA,KAACZ,EAAAA,KAAO,KAAP,CAAY,IAAAW,EAAW,GAAGD,EACxB,SAAA,CAAAD,QACAH,EAAA,CAAA,CAAc,CAAA,CAAA,CACjB,CAEJ,EACAC,EAAK,YAAcP,OAAO,KAAK,YAExB,MAAMa,EAAWlB,EAAYI,SAAOQ,CAAI,EAAG,MAAM"}
@@ -0,0 +1,27 @@
1
+ "use client";
2
+ import { jsxs as e, jsx as c } from "react/jsx-runtime";
3
+ import { Tabs as t, ark as m } from "@ark-ui/react";
4
+ import { forwardRef as p } from "react";
5
+ import { styled as o } from "@stokelp/styled-system/jsx";
6
+ import { tabsChip as b, tabs as d } from "@stokelp/styled-system/recipes";
7
+ import { createStyleContext as T } from "../../utils/slots.js";
8
+ const { withProvider: f, withContext: s } = T(d), L = f(o(t.Root), "root", {
9
+ defaultProps: {
10
+ lazyMount: !0
11
+ }
12
+ }), w = s(o(t.Content), "content"), j = s(o(t.Trigger), "trigger"), I = o(m.span, b), l = s(o(t.Indicator), "indicator"), r = p(
13
+ ({ children: i, ...a }, n) => /* @__PURE__ */ e(t.List, { ref: n, ...a, children: [
14
+ i,
15
+ /* @__PURE__ */ c(l, {})
16
+ ] })
17
+ );
18
+ r.displayName = t.List.displayName;
19
+ const N = s(o(r), "list");
20
+ export {
21
+ L as Tabs,
22
+ I as TabsChip,
23
+ w as TabsContent,
24
+ N as TabsList,
25
+ j as TabsTrigger
26
+ };
27
+ //# sourceMappingURL=Tabs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tabs.js","sources":["../../../src/components/tabs/Tabs.tsx"],"sourcesContent":["import { ark, Tabs as ArkTab } from '@ark-ui/react'\nimport { ComponentProps, type ComponentPropsWithoutRef, type ElementRef, forwardRef } from 'react'\nimport { styled } from '@stokelp/styled-system/jsx'\nimport { tabs, tabsChip } from '@stokelp/styled-system/recipes'\nimport { createStyleContext } from '~/utils/slots.tsx'\n\nconst { withProvider, withContext } = createStyleContext(tabs)\n\nexport const Tabs = withProvider(styled(ArkTab.Root), 'root', {\n defaultProps: {\n lazyMount: true,\n },\n})\nexport const TabsContent = withContext(styled(ArkTab.Content), 'content')\nexport const TabsTrigger = withContext(styled(ArkTab.Trigger), 'trigger')\nexport const TabsChip = styled(ark.span, tabsChip)\n\nconst TabsIndicator = withContext(styled(ArkTab.Indicator), 'indicator')\n\nconst List = forwardRef<ElementRef<typeof ArkTab.List>, ComponentPropsWithoutRef<typeof ArkTab.List>>(\n ({ children, ...props }, ref) => (\n <ArkTab.List ref={ref} {...props}>\n {children}\n <TabsIndicator />\n </ArkTab.List>\n ),\n)\nList.displayName = ArkTab.List.displayName\n\nexport const TabsList = withContext(styled(List), 'list')\n\nexport interface TabsProps extends ComponentProps<typeof Tabs> {}\n\nexport interface TabsContentProps extends ComponentProps<typeof TabsContent> {}\n\nexport interface TabsIndicatorProps extends ComponentProps<typeof TabsIndicator> {}\n\nexport interface TabsListProps extends ComponentProps<typeof TabsList> {}\n\nexport interface TabsTriggerProps extends ComponentProps<typeof TabsTrigger> {}\n\nexport interface TabsChipProps extends ComponentProps<typeof TabsChip> {}\n"],"names":["withProvider","withContext","createStyleContext","tabs","Tabs","styled","ArkTab","TabsContent","TabsTrigger","TabsChip","ark","tabsChip","TabsIndicator","List","forwardRef","children","props","ref","jsxs","TabsList"],"mappings":";;;;;;;AAMA,MAAM,EAAE,cAAAA,GAAc,aAAAC,MAAgBC,EAAmBC,CAAI,GAEhDC,IAAOJ,EAAaK,EAAOC,EAAO,IAAI,GAAG,QAAQ;AAAA,EAC5D,cAAc;AAAA,IACZ,WAAW;AAAA,EAAA;AAEf,CAAC,GACYC,IAAcN,EAAYI,EAAOC,EAAO,OAAO,GAAG,SAAS,GAC3DE,IAAcP,EAAYI,EAAOC,EAAO,OAAO,GAAG,SAAS,GAC3DG,IAAWJ,EAAOK,EAAI,MAAMC,CAAQ,GAE3CC,IAAgBX,EAAYI,EAAOC,EAAO,SAAS,GAAG,WAAW,GAEjEO,IAAOC;AAAA,EACX,CAAC,EAAE,UAAAC,GAAU,GAAGC,EAAA,GAASC,MACvB,gBAAAC,EAACZ,EAAO,MAAP,EAAY,KAAAW,GAAW,GAAGD,GACxB,UAAA;AAAA,IAAAD;AAAA,sBACAH,GAAA,CAAA,CAAc;AAAA,EAAA,EAAA,CACjB;AAEJ;AACAC,EAAK,cAAcP,EAAO,KAAK;AAExB,MAAMa,IAAWlB,EAAYI,EAAOQ,CAAI,GAAG,MAAM;"}
@@ -0,0 +1,2 @@
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("@stokelp/styled-system/css"),P=require("@ark-ui/react"),t=require("@stokelp/styled-system/jsx"),c=require("@stokelp/styled-system/recipes"),q=require("react"),x=q.forwardRef((o,a)=>{const[i,n]=c.tag.splitVariantProps(o),[l,u]=t.splitCssProps(n),{children:p,className:d,...g}=u,r=c.tag(i);return e.jsxs(P.ark.div,{ref:a,className:s.cx(r.root,s.css(l),d),...g,children:[p,e.jsx(t.Circle,{className:s.cx(r.badge),borderRadius:"full"})]})});exports.Tag=x;
2
+ //# sourceMappingURL=Tag.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tag.cjs","sources":["../../../src/components/tag/Tag.tsx"],"sourcesContent":["import { css, cx } from '@stokelp/styled-system/css'\nimport { ark, type HTMLArkProps } from '@ark-ui/react'\nimport { Circle, splitCssProps } from '@stokelp/styled-system/jsx'\nimport { tag, type TagVariantProps } from '@stokelp/styled-system/recipes'\nimport { Assign, JsxStyleProps } from '@stokelp/styled-system/types'\nimport { forwardRef, type ReactNode } from 'react'\n\nexport interface TagProps extends Assign<JsxStyleProps, HTMLArkProps<'div'>>, TagVariantProps {\n children: ReactNode\n}\n\nexport const Tag = forwardRef<HTMLDivElement, TagProps>((props, ref) => {\n const [variantProps, tagProps] = tag.splitVariantProps(props)\n const [cssProps, localProps] = splitCssProps(tagProps)\n const { children, className, ...rootProps } = localProps\n const styles = tag(variantProps)\n\n return (\n <ark.div ref={ref} className={cx(styles.root, css(cssProps), className)} {...rootProps}>\n {children}\n <Circle className={cx(styles.badge)} borderRadius=\"full\" />\n </ark.div>\n )\n})\n"],"names":["Tag","forwardRef","props","ref","variantProps","tagProps","tag","cssProps","localProps","splitCssProps","children","className","rootProps","styles","jsxs","ark","cx","css","jsx","Circle"],"mappings":"4SAWaA,EAAMC,EAAAA,WAAqC,CAACC,EAAOC,IAAQ,CACtE,KAAM,CAACC,EAAcC,CAAQ,EAAIC,EAAAA,IAAI,kBAAkBJ,CAAK,EACtD,CAACK,EAAUC,CAAU,EAAIC,EAAAA,cAAcJ,CAAQ,EAC/C,CAAE,SAAAK,EAAU,UAAAC,EAAW,GAAGC,GAAcJ,EACxCK,EAASP,EAAAA,IAAIF,CAAY,EAE/B,OACEU,EAAAA,KAACC,EAAAA,IAAI,IAAJ,CAAQ,IAAAZ,EAAU,UAAWa,KAAGH,EAAO,KAAMI,EAAAA,IAAIV,CAAQ,EAAGI,CAAS,EAAI,GAAGC,EAC1E,SAAA,CAAAF,EACDQ,MAACC,EAAAA,QAAO,UAAWH,EAAAA,GAAGH,EAAO,KAAK,EAAG,aAAa,MAAA,CAAO,CAAA,EAC3D,CAEJ,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use client";
2
+ import { jsxs as f, jsx as d } from "react/jsx-runtime";
3
+ import { cx as s, css as P } from "@stokelp/styled-system/css";
4
+ import { ark as g } from "@ark-ui/react";
5
+ import { splitCssProps as u, Circle as x } from "@stokelp/styled-system/jsx";
6
+ import { tag as o } from "@stokelp/styled-system/recipes";
7
+ import { forwardRef as N } from "react";
8
+ const k = N((t, a) => {
9
+ const [c, i] = o.splitVariantProps(t), [p, m] = u(i), { children: e, className: l, ...n } = m, r = o(c);
10
+ return /* @__PURE__ */ f(g.div, { ref: a, className: s(r.root, P(p), l), ...n, children: [
11
+ e,
12
+ /* @__PURE__ */ d(x, { className: s(r.badge), borderRadius: "full" })
13
+ ] });
14
+ });
15
+ export {
16
+ k as Tag
17
+ };
18
+ //# sourceMappingURL=Tag.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tag.js","sources":["../../../src/components/tag/Tag.tsx"],"sourcesContent":["import { css, cx } from '@stokelp/styled-system/css'\nimport { ark, type HTMLArkProps } from '@ark-ui/react'\nimport { Circle, splitCssProps } from '@stokelp/styled-system/jsx'\nimport { tag, type TagVariantProps } from '@stokelp/styled-system/recipes'\nimport { Assign, JsxStyleProps } from '@stokelp/styled-system/types'\nimport { forwardRef, type ReactNode } from 'react'\n\nexport interface TagProps extends Assign<JsxStyleProps, HTMLArkProps<'div'>>, TagVariantProps {\n children: ReactNode\n}\n\nexport const Tag = forwardRef<HTMLDivElement, TagProps>((props, ref) => {\n const [variantProps, tagProps] = tag.splitVariantProps(props)\n const [cssProps, localProps] = splitCssProps(tagProps)\n const { children, className, ...rootProps } = localProps\n const styles = tag(variantProps)\n\n return (\n <ark.div ref={ref} className={cx(styles.root, css(cssProps), className)} {...rootProps}>\n {children}\n <Circle className={cx(styles.badge)} borderRadius=\"full\" />\n </ark.div>\n )\n})\n"],"names":["Tag","forwardRef","props","ref","variantProps","tagProps","tag","cssProps","localProps","splitCssProps","children","className","rootProps","styles","jsxs","ark","cx","css","jsx","Circle"],"mappings":";;;;;;;AAWO,MAAMA,IAAMC,EAAqC,CAACC,GAAOC,MAAQ;AACtE,QAAM,CAACC,GAAcC,CAAQ,IAAIC,EAAI,kBAAkBJ,CAAK,GACtD,CAACK,GAAUC,CAAU,IAAIC,EAAcJ,CAAQ,GAC/C,EAAE,UAAAK,GAAU,WAAAC,GAAW,GAAGC,MAAcJ,GACxCK,IAASP,EAAIF,CAAY;AAE/B,SACE,gBAAAU,EAACC,EAAI,KAAJ,EAAQ,KAAAZ,GAAU,WAAWa,EAAGH,EAAO,MAAMI,EAAIV,CAAQ,GAAGI,CAAS,GAAI,GAAGC,GAC1E,UAAA;AAAA,IAAAF;AAAA,IACD,gBAAAQ,EAACC,KAAO,WAAWH,EAAGH,EAAO,KAAK,GAAG,cAAa,OAAA,CAAO;AAAA,EAAA,GAC3D;AAEJ,CAAC;"}