@stokelp/ui 2.127.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (698) hide show
  1. package/README.md +1 -1
  2. package/dist/_virtual/_rolldown/runtime.cjs +1 -1
  3. package/dist/_virtual/_rolldown/runtime.js +4 -5
  4. package/dist/components/accordion/Accordion.cjs +1 -1
  5. package/dist/components/accordion/Accordion.cjs.map +1 -1
  6. package/dist/components/accordion/Accordion.d.ts +1 -1
  7. package/dist/components/accordion/Accordion.js +1 -2
  8. package/dist/components/accordion/Accordion.js.map +1 -1
  9. package/dist/components/action-card/ActionCard.cjs.map +1 -1
  10. package/dist/components/action-card/ActionCard.d.ts +1 -1
  11. package/dist/components/action-card/ActionCard.js +1 -2
  12. package/dist/components/action-card/ActionCard.js.map +1 -1
  13. package/dist/components/alert/Alert.cjs.map +1 -1
  14. package/dist/components/alert/Alert.d.ts +1 -1
  15. package/dist/components/alert/Alert.js +1 -2
  16. package/dist/components/alert/Alert.js.map +1 -1
  17. package/dist/components/app/mobile-card/MobileCardEntityRow.cjs.map +1 -1
  18. package/dist/components/app/mobile-card/MobileCardEntityRow.d.ts +1 -1
  19. package/dist/components/app/mobile-card/MobileCardEntityRow.js +1 -2
  20. package/dist/components/app/mobile-card/MobileCardEntityRow.js.map +1 -1
  21. package/dist/components/app/mobile-card/MobileCardHeader.cjs.map +1 -1
  22. package/dist/components/app/mobile-card/MobileCardHeader.d.ts +1 -1
  23. package/dist/components/app/mobile-card/MobileCardHeader.js +1 -2
  24. package/dist/components/app/mobile-card/MobileCardHeader.js.map +1 -1
  25. package/dist/components/app/mobile-card/MobileCardNotificationBadge.cjs +1 -1
  26. package/dist/components/app/mobile-card/MobileCardNotificationBadge.cjs.map +1 -1
  27. package/dist/components/app/mobile-card/MobileCardNotificationBadge.d.ts +1 -1
  28. package/dist/components/app/mobile-card/MobileCardNotificationBadge.js +2 -3
  29. package/dist/components/app/mobile-card/MobileCardNotificationBadge.js.map +1 -1
  30. package/dist/components/app/mobile-card/MobileCardShell.cjs.map +1 -1
  31. package/dist/components/app/mobile-card/MobileCardShell.d.ts +1 -1
  32. package/dist/components/app/mobile-card/MobileCardShell.js +1 -2
  33. package/dist/components/app/mobile-card/MobileCardShell.js.map +1 -1
  34. package/dist/components/app/mobile-card/MobileCardSkeleton.cjs.map +1 -1
  35. package/dist/components/app/mobile-card/MobileCardSkeleton.d.ts +3 -3
  36. package/dist/components/app/mobile-card/MobileCardSkeleton.js +1 -2
  37. package/dist/components/app/mobile-card/MobileCardSkeleton.js.map +1 -1
  38. package/dist/components/app/mobile-navigation/MobileNavigation.cjs +1 -1
  39. package/dist/components/app/mobile-navigation/MobileNavigation.cjs.map +1 -1
  40. package/dist/components/app/mobile-navigation/MobileNavigation.js +2 -3
  41. package/dist/components/app/mobile-navigation/MobileNavigation.js.map +1 -1
  42. package/dist/components/app/navigation/AppNavigation.cjs +1 -1
  43. package/dist/components/app/navigation/AppNavigation.cjs.map +1 -1
  44. package/dist/components/app/navigation/AppNavigation.js +3 -4
  45. package/dist/components/app/navigation/AppNavigation.js.map +1 -1
  46. package/dist/components/app/navigation/language-select/AppNavigationLanguageSelect.cjs +1 -1
  47. package/dist/components/app/navigation/language-select/AppNavigationLanguageSelect.cjs.map +1 -1
  48. package/dist/components/app/navigation/language-select/AppNavigationLanguageSelect.js +5 -6
  49. package/dist/components/app/navigation/language-select/AppNavigationLanguageSelect.js.map +1 -1
  50. package/dist/components/app/price-tag/PriceTag.cjs.map +1 -1
  51. package/dist/components/app/price-tag/PriceTag.d.ts +3 -5
  52. package/dist/components/app/price-tag/PriceTag.js +1 -2
  53. package/dist/components/app/price-tag/PriceTag.js.map +1 -1
  54. package/dist/components/app/product-card-catalog/styled.cjs +1 -1
  55. package/dist/components/app/product-card-catalog/styled.cjs.map +1 -1
  56. package/dist/components/app/product-card-catalog/styled.d.ts +1 -1
  57. package/dist/components/app/product-card-catalog/styled.js +2 -3
  58. package/dist/components/app/product-card-catalog/styled.js.map +1 -1
  59. package/dist/components/avatar/styled.cjs +1 -1
  60. package/dist/components/avatar/styled.cjs.map +1 -1
  61. package/dist/components/avatar/styled.d.ts +4 -7
  62. package/dist/components/avatar/styled.js +2 -3
  63. package/dist/components/avatar/styled.js.map +1 -1
  64. package/dist/components/box/Box.cjs +1 -1
  65. package/dist/components/box/Box.cjs.map +1 -1
  66. package/dist/components/box/Box.d.ts +1 -1
  67. package/dist/components/box/Box.js +3 -4
  68. package/dist/components/box/Box.js.map +1 -1
  69. package/dist/components/breadcrumb/Breadcrumb.cjs.map +1 -1
  70. package/dist/components/breadcrumb/Breadcrumb.js +1 -2
  71. package/dist/components/breadcrumb/Breadcrumb.js.map +1 -1
  72. package/dist/components/button/Button.cjs.map +1 -1
  73. package/dist/components/button/Button.js +1 -2
  74. package/dist/components/button/Button.js.map +1 -1
  75. package/dist/components/button-filter/ButtonFilter.cjs.map +1 -1
  76. package/dist/components/button-filter/ButtonFilter.d.ts +4 -5
  77. package/dist/components/button-filter/ButtonFilter.js +1 -2
  78. package/dist/components/button-filter/ButtonFilter.js.map +1 -1
  79. package/dist/components/chat/Chat.cjs +1 -1
  80. package/dist/components/chat/Chat.cjs.map +1 -1
  81. package/dist/components/chat/Chat.d.ts +4 -8
  82. package/dist/components/chat/Chat.js +2 -3
  83. package/dist/components/chat/Chat.js.map +1 -1
  84. package/dist/components/chat/ChatDocumentMessage.cjs +1 -1
  85. package/dist/components/chat/ChatDocumentMessage.cjs.map +1 -1
  86. package/dist/components/chat/ChatDocumentMessage.js +3 -4
  87. package/dist/components/chat/ChatDocumentMessage.js.map +1 -1
  88. package/dist/components/chat/ChatMessage.cjs.map +1 -1
  89. package/dist/components/chat/ChatMessage.d.ts +4 -7
  90. package/dist/components/chat/ChatMessage.js +1 -2
  91. package/dist/components/chat/ChatMessage.js.map +1 -1
  92. package/dist/components/chat/ChatProfileAvatar.cjs.map +1 -1
  93. package/dist/components/chat/ChatProfileAvatar.js +1 -2
  94. package/dist/components/chat/ChatProfileAvatar.js.map +1 -1
  95. package/dist/components/chat/ChatScoreBreakdown.cjs.map +1 -1
  96. package/dist/components/chat/ChatScoreBreakdown.d.ts +1 -1
  97. package/dist/components/chat/ChatScoreBreakdown.js +1 -2
  98. package/dist/components/chat/ChatScoreBreakdown.js.map +1 -1
  99. package/dist/components/chat/ChatTextInput.cjs.map +1 -1
  100. package/dist/components/chat/ChatTextInput.js +1 -2
  101. package/dist/components/chat/ChatTextInput.js.map +1 -1
  102. package/dist/components/checkbox/Checkbox.cjs.map +1 -1
  103. package/dist/components/checkbox/Checkbox.js +1 -2
  104. package/dist/components/checkbox/Checkbox.js.map +1 -1
  105. package/dist/components/checkbox-card/CheckboxCard.cjs.map +1 -1
  106. package/dist/components/checkbox-card/CheckboxCard.js +1 -2
  107. package/dist/components/checkbox-card/CheckboxCard.js.map +1 -1
  108. package/dist/components/checkbox-card/namespace.cjs +1 -1
  109. package/dist/components/checkbox-card/namespace.cjs.map +1 -1
  110. package/dist/components/checkbox-card/namespace.js +2 -3
  111. package/dist/components/checkbox-card/namespace.js.map +1 -1
  112. package/dist/components/chip/Chip.cjs.map +1 -1
  113. package/dist/components/chip/Chip.d.ts +1 -1
  114. package/dist/components/chip/Chip.js +1 -2
  115. package/dist/components/chip/Chip.js.map +1 -1
  116. package/dist/components/collapsible/styled.cjs +1 -1
  117. package/dist/components/collapsible/styled.cjs.map +1 -1
  118. package/dist/components/collapsible/styled.d.ts +1 -1
  119. package/dist/components/collapsible/styled.js +2 -3
  120. package/dist/components/collapsible/styled.js.map +1 -1
  121. package/dist/components/combobox/Combobox.cjs +1 -1
  122. package/dist/components/combobox/Combobox.cjs.map +1 -1
  123. package/dist/components/combobox/Combobox.d.ts +1 -1
  124. package/dist/components/combobox/Combobox.js +6 -5
  125. package/dist/components/combobox/Combobox.js.map +1 -1
  126. package/dist/components/date-picker/DatePicker.cjs.map +1 -1
  127. package/dist/components/date-picker/DatePicker.js +1 -2
  128. package/dist/components/date-picker/DatePicker.js.map +1 -1
  129. package/dist/components/dialog/styled.cjs +1 -1
  130. package/dist/components/dialog/styled.cjs.map +1 -1
  131. package/dist/components/dialog/styled.d.ts +2 -2
  132. package/dist/components/dialog/styled.js +2 -3
  133. package/dist/components/dialog/styled.js.map +1 -1
  134. package/dist/components/drawer/Drawer.cjs.map +1 -1
  135. package/dist/components/drawer/Drawer.d.ts +2 -2
  136. package/dist/components/drawer/Drawer.js +1 -2
  137. package/dist/components/drawer/Drawer.js.map +1 -1
  138. package/dist/components/flag/styled.cjs.map +1 -1
  139. package/dist/components/flag/styled.d.ts +209 -211
  140. package/dist/components/flag/styled.js +1 -2
  141. package/dist/components/flag/styled.js.map +1 -1
  142. package/dist/components/form/FormControl.cjs +1 -1
  143. package/dist/components/form/FormControl.cjs.map +1 -1
  144. package/dist/components/form/FormControl.js +11 -7
  145. package/dist/components/form/FormControl.js.map +1 -1
  146. package/dist/components/form/FormHelperText.cjs.map +1 -1
  147. package/dist/components/form/FormHelperText.js +1 -2
  148. package/dist/components/form/FormHelperText.js.map +1 -1
  149. package/dist/components/form/FormLabel.cjs.map +1 -1
  150. package/dist/components/form/FormLabel.js +1 -2
  151. package/dist/components/form/FormLabel.js.map +1 -1
  152. package/dist/components/heading/Heading.cjs +1 -1
  153. package/dist/components/heading/Heading.cjs.map +1 -1
  154. package/dist/components/heading/Heading.d.ts +1 -1
  155. package/dist/components/heading/Heading.js +3 -4
  156. package/dist/components/heading/Heading.js.map +1 -1
  157. package/dist/components/icon/Icon.cjs.map +1 -1
  158. package/dist/components/icon/Icon.js +1 -2
  159. package/dist/components/icon/Icon.js.map +1 -1
  160. package/dist/components/icon-button/IconButton.cjs.map +1 -1
  161. package/dist/components/icon-button/IconButton.js +1 -2
  162. package/dist/components/icon-button/IconButton.js.map +1 -1
  163. package/dist/components/illustration/Illustration.cjs.map +1 -1
  164. package/dist/components/illustration/Illustration.js +1 -2
  165. package/dist/components/illustration/Illustration.js.map +1 -1
  166. package/dist/components/illustration/patterns.cjs.map +1 -1
  167. package/dist/components/illustration/patterns.js +1 -2
  168. package/dist/components/illustration/patterns.js.map +1 -1
  169. package/dist/components/input/HighlightedInput.cjs.map +1 -1
  170. package/dist/components/input/HighlightedInput.d.ts +1 -1
  171. package/dist/components/input/HighlightedInput.js +1 -2
  172. package/dist/components/input/HighlightedInput.js.map +1 -1
  173. package/dist/components/input/Input.cjs.map +1 -1
  174. package/dist/components/input/Input.js +1 -2
  175. package/dist/components/input/Input.js.map +1 -1
  176. package/dist/components/input/InputAddon.cjs.map +1 -1
  177. package/dist/components/input/InputAddon.d.ts +4 -5
  178. package/dist/components/input/InputAddon.js +1 -2
  179. package/dist/components/input/InputAddon.js.map +1 -1
  180. package/dist/components/input/InputGroup.cjs.map +1 -1
  181. package/dist/components/input/InputGroup.js +1 -2
  182. package/dist/components/input/InputGroup.js.map +1 -1
  183. package/dist/components/input/PhoneNumberInput.cjs.map +1 -1
  184. package/dist/components/input/PhoneNumberInput.js +1 -2
  185. package/dist/components/input/PhoneNumberInput.js.map +1 -1
  186. package/dist/components/menu/Menu.cjs +1 -1
  187. package/dist/components/menu/Menu.cjs.map +1 -1
  188. package/dist/components/menu/Menu.d.ts +2 -2
  189. package/dist/components/menu/Menu.js +2 -3
  190. package/dist/components/menu/Menu.js.map +1 -1
  191. package/dist/components/origin-select/OriginSelect.cjs.map +1 -1
  192. package/dist/components/origin-select/OriginSelect.d.ts +1 -1
  193. package/dist/components/origin-select/OriginSelect.js +1 -2
  194. package/dist/components/origin-select/OriginSelect.js.map +1 -1
  195. package/dist/components/pagination/Pagination.cjs.map +1 -1
  196. package/dist/components/pagination/Pagination.d.ts +1 -1
  197. package/dist/components/pagination/Pagination.js +1 -2
  198. package/dist/components/pagination/Pagination.js.map +1 -1
  199. package/dist/components/pagination/use-pagination.cjs.map +1 -1
  200. package/dist/components/pagination/use-pagination.js +1 -2
  201. package/dist/components/pagination/use-pagination.js.map +1 -1
  202. package/dist/components/popover/Popover.cjs.map +1 -1
  203. package/dist/components/popover/Popover.d.ts +2 -2
  204. package/dist/components/popover/Popover.js +1 -2
  205. package/dist/components/popover/Popover.js.map +1 -1
  206. package/dist/components/radio-button-group/RadioButtonGroup.cjs.map +1 -1
  207. package/dist/components/radio-button-group/RadioButtonGroup.d.ts +1 -1
  208. package/dist/components/radio-button-group/RadioButtonGroup.js +1 -2
  209. package/dist/components/radio-button-group/RadioButtonGroup.js.map +1 -1
  210. package/dist/components/radio-card-group/RadioCardGroup.cjs.map +1 -1
  211. package/dist/components/radio-card-group/RadioCardGroup.d.ts +1 -1
  212. package/dist/components/radio-card-group/RadioCardGroup.js +1 -2
  213. package/dist/components/radio-card-group/RadioCardGroup.js.map +1 -1
  214. package/dist/components/radio-card-group/namespace.cjs +1 -1
  215. package/dist/components/radio-card-group/namespace.cjs.map +1 -1
  216. package/dist/components/radio-card-group/namespace.js +2 -3
  217. package/dist/components/radio-card-group/namespace.js.map +1 -1
  218. package/dist/components/radio-group/RadioGroup.cjs.map +1 -1
  219. package/dist/components/radio-group/RadioGroup.d.ts +1 -1
  220. package/dist/components/radio-group/RadioGroup.js +1 -2
  221. package/dist/components/radio-group/RadioGroup.js.map +1 -1
  222. package/dist/components/select/Select.cjs +1 -1
  223. package/dist/components/select/Select.cjs.map +1 -1
  224. package/dist/components/select/Select.d.ts +1 -1
  225. package/dist/components/select/Select.js +2 -7
  226. package/dist/components/select/Select.js.map +1 -1
  227. package/dist/components/select-language/SelectLanguage.cjs +1 -1
  228. package/dist/components/select-language/SelectLanguage.cjs.map +1 -1
  229. package/dist/components/select-language/SelectLanguage.js +45 -43
  230. package/dist/components/select-language/SelectLanguage.js.map +1 -1
  231. package/dist/components/status-tag-select/StatusTagSelect.cjs +1 -1
  232. package/dist/components/status-tag-select/StatusTagSelect.cjs.map +1 -1
  233. package/dist/components/status-tag-select/StatusTagSelect.js +30 -31
  234. package/dist/components/status-tag-select/StatusTagSelect.js.map +1 -1
  235. package/dist/components/steps/Steps.cjs.map +1 -1
  236. package/dist/components/steps/Steps.d.ts +1 -1
  237. package/dist/components/steps/Steps.js +1 -2
  238. package/dist/components/steps/Steps.js.map +1 -1
  239. package/dist/components/supplier-rating-badge/SupplierRatingBadge.cjs.map +1 -1
  240. package/dist/components/supplier-rating-badge/SupplierRatingBadge.d.ts +1 -1
  241. package/dist/components/supplier-rating-badge/SupplierRatingBadge.js +1 -2
  242. package/dist/components/supplier-rating-badge/SupplierRatingBadge.js.map +1 -1
  243. package/dist/components/supplier-rating-badge/SupplierRatingBreakdown.cjs +1 -1
  244. package/dist/components/supplier-rating-badge/SupplierRatingBreakdown.cjs.map +1 -1
  245. package/dist/components/supplier-rating-badge/SupplierRatingBreakdown.d.ts +1 -1
  246. package/dist/components/supplier-rating-badge/SupplierRatingBreakdown.js +53 -54
  247. package/dist/components/supplier-rating-badge/SupplierRatingBreakdown.js.map +1 -1
  248. package/dist/components/supplier-rating-badge/labels.cjs.map +1 -1
  249. package/dist/components/supplier-rating-badge/labels.js +1 -2
  250. package/dist/components/supplier-rating-badge/labels.js.map +1 -1
  251. package/dist/components/switch/Switch.cjs.map +1 -1
  252. package/dist/components/switch/Switch.js +1 -2
  253. package/dist/components/switch/Switch.js.map +1 -1
  254. package/dist/components/switch-card/SwitchCard.cjs.map +1 -1
  255. package/dist/components/switch-card/SwitchCard.d.ts +2 -1
  256. package/dist/components/switch-card/SwitchCard.js +1 -2
  257. package/dist/components/switch-card/SwitchCard.js.map +1 -1
  258. package/dist/components/switch-card/namespace.cjs +1 -1
  259. package/dist/components/switch-card/namespace.cjs.map +1 -1
  260. package/dist/components/switch-card/namespace.js +2 -3
  261. package/dist/components/switch-card/namespace.js.map +1 -1
  262. package/dist/components/table/Table.cjs +1 -1
  263. package/dist/components/table/Table.cjs.map +1 -1
  264. package/dist/components/table/Table.js +3 -4
  265. package/dist/components/table/Table.js.map +1 -1
  266. package/dist/components/table/TableProvider.cjs.map +1 -1
  267. package/dist/components/table/TableProvider.js +1 -2
  268. package/dist/components/table/TableProvider.js.map +1 -1
  269. package/dist/components/tabs/Tabs.cjs.map +1 -1
  270. package/dist/components/tabs/Tabs.d.ts +4 -7
  271. package/dist/components/tabs/Tabs.js +1 -2
  272. package/dist/components/tabs/Tabs.js.map +1 -1
  273. package/dist/components/tag/Tag.cjs.map +1 -1
  274. package/dist/components/tag/Tag.js +1 -2
  275. package/dist/components/tag/Tag.js.map +1 -1
  276. package/dist/components/text/Text.cjs +1 -1
  277. package/dist/components/text/Text.cjs.map +1 -1
  278. package/dist/components/text/Text.d.ts +1 -1
  279. package/dist/components/text/Text.js +3 -4
  280. package/dist/components/text/Text.js.map +1 -1
  281. package/dist/components/textarea/Textarea.cjs.map +1 -1
  282. package/dist/components/textarea/Textarea.d.ts +4 -5
  283. package/dist/components/textarea/Textarea.js +1 -2
  284. package/dist/components/textarea/Textarea.js.map +1 -1
  285. package/dist/components/tooltip/Tooltip.cjs.map +1 -1
  286. package/dist/components/tooltip/Tooltip.d.ts +2 -2
  287. package/dist/components/tooltip/Tooltip.js +1 -2
  288. package/dist/components/tooltip/Tooltip.js.map +1 -1
  289. package/dist/components/ui-labels/UiLabelsProvider.cjs.map +1 -1
  290. package/dist/components/ui-labels/UiLabelsProvider.js +1 -2
  291. package/dist/components/ui-labels/UiLabelsProvider.js.map +1 -1
  292. package/dist/icons/index.cjs.map +1 -1
  293. package/dist/icons/index.js +1 -2
  294. package/dist/icons/index.js.map +1 -1
  295. package/dist/node_modules/.pnpm/@heroicons_react@2.2.0_react@19.3.1/node_modules/@heroicons/react/24/outline/esm/ArrowDownTrayIcon.cjs.map +1 -0
  296. package/dist/node_modules/.pnpm/{@heroicons_react@2.2.0_react@19.2.6 → @heroicons_react@2.2.0_react@19.3.1}/node_modules/@heroicons/react/24/outline/esm/ArrowDownTrayIcon.js +4 -5
  297. package/dist/node_modules/.pnpm/@heroicons_react@2.2.0_react@19.3.1/node_modules/@heroicons/react/24/outline/esm/ArrowDownTrayIcon.js.map +1 -0
  298. package/dist/node_modules/.pnpm/@heroicons_react@2.2.0_react@19.3.1/node_modules/@heroicons/react/24/outline/esm/ArrowLeftCircleIcon.cjs.map +1 -0
  299. package/dist/node_modules/.pnpm/{@heroicons_react@2.2.0_react@19.2.6 → @heroicons_react@2.2.0_react@19.3.1}/node_modules/@heroicons/react/24/outline/esm/ArrowLeftCircleIcon.js +4 -5
  300. package/dist/node_modules/.pnpm/@heroicons_react@2.2.0_react@19.3.1/node_modules/@heroicons/react/24/outline/esm/ArrowLeftCircleIcon.js.map +1 -0
  301. package/dist/node_modules/.pnpm/@heroicons_react@2.2.0_react@19.3.1/node_modules/@heroicons/react/24/outline/esm/ChatBubbleLeftRightIcon.cjs.map +1 -0
  302. package/dist/node_modules/.pnpm/{@heroicons_react@2.2.0_react@19.2.6 → @heroicons_react@2.2.0_react@19.3.1}/node_modules/@heroicons/react/24/outline/esm/ChatBubbleLeftRightIcon.js +4 -5
  303. package/dist/node_modules/.pnpm/@heroicons_react@2.2.0_react@19.3.1/node_modules/@heroicons/react/24/outline/esm/ChatBubbleLeftRightIcon.js.map +1 -0
  304. package/dist/node_modules/.pnpm/@heroicons_react@2.2.0_react@19.3.1/node_modules/@heroicons/react/24/outline/esm/CheckCircleIcon.cjs.map +1 -0
  305. package/dist/node_modules/.pnpm/{@heroicons_react@2.2.0_react@19.2.6 → @heroicons_react@2.2.0_react@19.3.1}/node_modules/@heroicons/react/24/outline/esm/CheckCircleIcon.js +4 -5
  306. package/dist/node_modules/.pnpm/@heroicons_react@2.2.0_react@19.3.1/node_modules/@heroicons/react/24/outline/esm/CheckCircleIcon.js.map +1 -0
  307. package/dist/node_modules/.pnpm/@heroicons_react@2.2.0_react@19.3.1/node_modules/@heroicons/react/24/outline/esm/DocumentTextIcon.cjs.map +1 -0
  308. package/dist/node_modules/.pnpm/{@heroicons_react@2.2.0_react@19.2.6 → @heroicons_react@2.2.0_react@19.3.1}/node_modules/@heroicons/react/24/outline/esm/DocumentTextIcon.js +4 -5
  309. package/dist/node_modules/.pnpm/@heroicons_react@2.2.0_react@19.3.1/node_modules/@heroicons/react/24/outline/esm/DocumentTextIcon.js.map +1 -0
  310. package/dist/node_modules/.pnpm/@heroicons_react@2.2.0_react@19.3.1/node_modules/@heroicons/react/24/outline/esm/XCircleIcon.cjs.map +1 -0
  311. package/dist/node_modules/.pnpm/{@heroicons_react@2.2.0_react@19.2.6 → @heroicons_react@2.2.0_react@19.3.1}/node_modules/@heroicons/react/24/outline/esm/XCircleIcon.js +4 -5
  312. package/dist/node_modules/.pnpm/@heroicons_react@2.2.0_react@19.3.1/node_modules/@heroicons/react/24/outline/esm/XCircleIcon.js.map +1 -0
  313. package/dist/node_modules/.pnpm/deepmerge@4.3.1/node_modules/deepmerge/dist/cjs.cjs +1 -1
  314. package/dist/node_modules/.pnpm/deepmerge@4.3.1/node_modules/deepmerge/dist/cjs.cjs.map +1 -1
  315. package/dist/node_modules/.pnpm/deepmerge@4.3.1/node_modules/deepmerge/dist/cjs.js +2 -3
  316. package/dist/node_modules/.pnpm/deepmerge@4.3.1/node_modules/deepmerge/dist/cjs.js.map +1 -1
  317. package/dist/preset.cjs +1 -1
  318. package/dist/preset.cjs.map +1 -1
  319. package/dist/preset.js +7 -6
  320. package/dist/preset.js.map +1 -1
  321. package/dist/shared/ConditionalWrapper.cjs.map +1 -1
  322. package/dist/shared/ConditionalWrapper.js +1 -2
  323. package/dist/shared/ConditionalWrapper.js.map +1 -1
  324. package/dist/shared/assets/icons.cjs.map +1 -1
  325. package/dist/shared/assets/icons.d.ts +2 -2
  326. package/dist/shared/assets/icons.js +1 -2
  327. package/dist/shared/assets/icons.js.map +1 -1
  328. package/dist/shared/hooks/useUncontrolled.cjs.map +1 -1
  329. package/dist/shared/hooks/useUncontrolled.js +1 -2
  330. package/dist/shared/hooks/useUncontrolled.js.map +1 -1
  331. package/dist/shared/utils/events.cjs.map +1 -1
  332. package/dist/shared/utils/events.js +1 -2
  333. package/dist/shared/utils/events.js.map +1 -1
  334. package/dist/theme/breakpoints.cjs.map +1 -1
  335. package/dist/theme/breakpoints.js +1 -2
  336. package/dist/theme/breakpoints.js.map +1 -1
  337. package/dist/theme/conditions.cjs.map +1 -1
  338. package/dist/theme/conditions.js +1 -2
  339. package/dist/theme/conditions.js.map +1 -1
  340. package/dist/theme/containers.cjs +1 -1
  341. package/dist/theme/containers.cjs.map +1 -1
  342. package/dist/theme/containers.d.ts +1 -1
  343. package/dist/theme/containers.js +2 -3
  344. package/dist/theme/containers.js.map +1 -1
  345. package/dist/theme/globalCss.cjs.map +1 -1
  346. package/dist/theme/globalCss.d.ts +1 -1
  347. package/dist/theme/globalCss.js +1 -2
  348. package/dist/theme/globalCss.js.map +1 -1
  349. package/dist/theme/keyframes.cjs.map +1 -1
  350. package/dist/theme/keyframes.d.ts +1 -1
  351. package/dist/theme/keyframes.js +1 -2
  352. package/dist/theme/keyframes.js.map +1 -1
  353. package/dist/theme/recipes/accordion.cjs.map +1 -1
  354. package/dist/theme/recipes/accordion.d.ts +32 -2
  355. package/dist/theme/recipes/accordion.js +1 -2
  356. package/dist/theme/recipes/accordion.js.map +1 -1
  357. package/dist/theme/recipes/action-card.cjs.map +1 -1
  358. package/dist/theme/recipes/action-card.d.ts +2 -2
  359. package/dist/theme/recipes/action-card.js +1 -2
  360. package/dist/theme/recipes/action-card.js.map +1 -1
  361. package/dist/theme/recipes/alert.cjs.map +1 -1
  362. package/dist/theme/recipes/alert.d.ts +30 -2
  363. package/dist/theme/recipes/alert.js +1 -2
  364. package/dist/theme/recipes/alert.js.map +1 -1
  365. package/dist/theme/recipes/app/mobile-navigation.cjs.map +1 -1
  366. package/dist/theme/recipes/app/mobile-navigation.d.ts +51 -2
  367. package/dist/theme/recipes/app/mobile-navigation.js +1 -2
  368. package/dist/theme/recipes/app/mobile-navigation.js.map +1 -1
  369. package/dist/theme/recipes/app/navigation-language-select.cjs +1 -1
  370. package/dist/theme/recipes/app/navigation-language-select.cjs.map +1 -1
  371. package/dist/theme/recipes/app/navigation-language-select.d.ts +105 -2
  372. package/dist/theme/recipes/app/navigation-language-select.js +31 -39
  373. package/dist/theme/recipes/app/navigation-language-select.js.map +1 -1
  374. package/dist/theme/recipes/app/navigation.cjs.map +1 -1
  375. package/dist/theme/recipes/app/navigation.d.ts +125 -2
  376. package/dist/theme/recipes/app/navigation.js +1 -2
  377. package/dist/theme/recipes/app/navigation.js.map +1 -1
  378. package/dist/theme/recipes/app/price-tag.cjs.map +1 -1
  379. package/dist/theme/recipes/app/price-tag.d.ts +41 -2
  380. package/dist/theme/recipes/app/price-tag.js +1 -2
  381. package/dist/theme/recipes/app/price-tag.js.map +1 -1
  382. package/dist/theme/recipes/app/product-card-catalog.cjs.map +1 -1
  383. package/dist/theme/recipes/app/product-card-catalog.d.ts +2 -2
  384. package/dist/theme/recipes/app/product-card-catalog.js +1 -2
  385. package/dist/theme/recipes/app/product-card-catalog.js.map +1 -1
  386. package/dist/theme/recipes/avatar-group.cjs.map +1 -1
  387. package/dist/theme/recipes/avatar-group.d.ts +14 -2
  388. package/dist/theme/recipes/avatar-group.js +1 -2
  389. package/dist/theme/recipes/avatar-group.js.map +1 -1
  390. package/dist/theme/recipes/avatar.cjs.map +1 -1
  391. package/dist/theme/recipes/avatar.d.ts +53 -2
  392. package/dist/theme/recipes/avatar.js +1 -2
  393. package/dist/theme/recipes/avatar.js.map +1 -1
  394. package/dist/theme/recipes/breadcrumb.cjs.map +1 -1
  395. package/dist/theme/recipes/breadcrumb.d.ts +2 -2
  396. package/dist/theme/recipes/breadcrumb.js +1 -2
  397. package/dist/theme/recipes/breadcrumb.js.map +1 -1
  398. package/dist/theme/recipes/button-filter.cjs.map +1 -1
  399. package/dist/theme/recipes/button-filter.d.ts +1 -1
  400. package/dist/theme/recipes/button-filter.js +1 -2
  401. package/dist/theme/recipes/button-filter.js.map +1 -1
  402. package/dist/theme/recipes/button.cjs.map +1 -1
  403. package/dist/theme/recipes/button.d.ts +93 -2
  404. package/dist/theme/recipes/button.js +1 -2
  405. package/dist/theme/recipes/button.js.map +1 -1
  406. package/dist/theme/recipes/chat/chat-document-message.cjs.map +1 -1
  407. package/dist/theme/recipes/chat/chat-document-message.d.ts +1 -1
  408. package/dist/theme/recipes/chat/chat-document-message.js +1 -2
  409. package/dist/theme/recipes/chat/chat-document-message.js.map +1 -1
  410. package/dist/theme/recipes/chat/chat-input-text.cjs.map +1 -1
  411. package/dist/theme/recipes/chat/chat-input-text.d.ts +1 -1
  412. package/dist/theme/recipes/chat/chat-input-text.js +1 -2
  413. package/dist/theme/recipes/chat/chat-input-text.js.map +1 -1
  414. package/dist/theme/recipes/chat/chat-message.cjs.map +1 -1
  415. package/dist/theme/recipes/chat/chat-message.d.ts +28 -2
  416. package/dist/theme/recipes/chat/chat-message.js +1 -2
  417. package/dist/theme/recipes/chat/chat-message.js.map +1 -1
  418. package/dist/theme/recipes/chat/chat-profile-avatar.cjs.map +1 -1
  419. package/dist/theme/recipes/chat/chat-profile-avatar.d.ts +9 -2
  420. package/dist/theme/recipes/chat/chat-profile-avatar.js +1 -2
  421. package/dist/theme/recipes/chat/chat-profile-avatar.js.map +1 -1
  422. package/dist/theme/recipes/chat/chat.cjs.map +1 -1
  423. package/dist/theme/recipes/chat/chat.d.ts +2 -2
  424. package/dist/theme/recipes/chat/chat.js +1 -2
  425. package/dist/theme/recipes/chat/chat.js.map +1 -1
  426. package/dist/theme/recipes/checkbox-card.cjs.map +1 -1
  427. package/dist/theme/recipes/checkbox-card.d.ts +1 -1
  428. package/dist/theme/recipes/checkbox-card.js +1 -2
  429. package/dist/theme/recipes/checkbox-card.js.map +1 -1
  430. package/dist/theme/recipes/checkbox-group.cjs.map +1 -1
  431. package/dist/theme/recipes/checkbox-group.d.ts +1 -1
  432. package/dist/theme/recipes/checkbox-group.js +1 -2
  433. package/dist/theme/recipes/checkbox-group.js.map +1 -1
  434. package/dist/theme/recipes/checkbox.cjs +1 -1
  435. package/dist/theme/recipes/checkbox.cjs.map +1 -1
  436. package/dist/theme/recipes/checkbox.d.ts +26 -2
  437. package/dist/theme/recipes/checkbox.js +7 -8
  438. package/dist/theme/recipes/checkbox.js.map +1 -1
  439. package/dist/theme/recipes/chip.cjs.map +1 -1
  440. package/dist/theme/recipes/chip.d.ts +148 -2
  441. package/dist/theme/recipes/chip.js +1 -2
  442. package/dist/theme/recipes/chip.js.map +1 -1
  443. package/dist/theme/recipes/collapsible.cjs.map +1 -1
  444. package/dist/theme/recipes/collapsible.d.ts +2 -2
  445. package/dist/theme/recipes/collapsible.js +1 -2
  446. package/dist/theme/recipes/collapsible.js.map +1 -1
  447. package/dist/theme/recipes/combobox.cjs +1 -1
  448. package/dist/theme/recipes/combobox.cjs.map +1 -1
  449. package/dist/theme/recipes/combobox.d.ts +33 -2
  450. package/dist/theme/recipes/combobox.js +6 -6
  451. package/dist/theme/recipes/combobox.js.map +1 -1
  452. package/dist/theme/recipes/common/group-card.cjs.map +1 -1
  453. package/dist/theme/recipes/common/group-card.d.ts +1 -1
  454. package/dist/theme/recipes/common/group-card.js +1 -2
  455. package/dist/theme/recipes/common/group-card.js.map +1 -1
  456. package/dist/theme/recipes/datepicker.cjs +1 -1
  457. package/dist/theme/recipes/datepicker.cjs.map +1 -1
  458. package/dist/theme/recipes/datepicker.d.ts +2 -2
  459. package/dist/theme/recipes/datepicker.js +6 -7
  460. package/dist/theme/recipes/datepicker.js.map +1 -1
  461. package/dist/theme/recipes/dialog.cjs.map +1 -1
  462. package/dist/theme/recipes/dialog.d.ts +2 -2
  463. package/dist/theme/recipes/dialog.js +1 -2
  464. package/dist/theme/recipes/dialog.js.map +1 -1
  465. package/dist/theme/recipes/drawer.cjs.map +1 -1
  466. package/dist/theme/recipes/drawer.d.ts +31 -2
  467. package/dist/theme/recipes/drawer.js +4 -4
  468. package/dist/theme/recipes/drawer.js.map +1 -1
  469. package/dist/theme/recipes/flag.cjs.map +1 -1
  470. package/dist/theme/recipes/flag.d.ts +15 -2
  471. package/dist/theme/recipes/flag.js +1 -2
  472. package/dist/theme/recipes/flag.js.map +1 -1
  473. package/dist/theme/recipes/form/control.cjs.map +1 -1
  474. package/dist/theme/recipes/form/control.d.ts +1 -1
  475. package/dist/theme/recipes/form/control.js +1 -2
  476. package/dist/theme/recipes/form/control.js.map +1 -1
  477. package/dist/theme/recipes/form/helper-text.cjs.map +1 -1
  478. package/dist/theme/recipes/form/helper-text.d.ts +1 -1
  479. package/dist/theme/recipes/form/helper-text.js +1 -2
  480. package/dist/theme/recipes/form/helper-text.js.map +1 -1
  481. package/dist/theme/recipes/form/label.cjs.map +1 -1
  482. package/dist/theme/recipes/form/label.d.ts +15 -2
  483. package/dist/theme/recipes/form/label.js +1 -2
  484. package/dist/theme/recipes/form/label.js.map +1 -1
  485. package/dist/theme/recipes/heading.cjs.map +1 -1
  486. package/dist/theme/recipes/heading.d.ts +33 -2
  487. package/dist/theme/recipes/heading.js +1 -2
  488. package/dist/theme/recipes/heading.js.map +1 -1
  489. package/dist/theme/recipes/highlightedInput.cjs.map +1 -1
  490. package/dist/theme/recipes/highlightedInput.d.ts +2 -2
  491. package/dist/theme/recipes/highlightedInput.js +1 -2
  492. package/dist/theme/recipes/highlightedInput.js.map +1 -1
  493. package/dist/theme/recipes/icon-button.cjs.map +1 -1
  494. package/dist/theme/recipes/icon-button.d.ts +1 -1
  495. package/dist/theme/recipes/icon-button.js +0 -1
  496. package/dist/theme/recipes/icon-button.js.map +1 -1
  497. package/dist/theme/recipes/icon.cjs.map +1 -1
  498. package/dist/theme/recipes/icon.d.ts +25 -2
  499. package/dist/theme/recipes/icon.js +1 -2
  500. package/dist/theme/recipes/icon.js.map +1 -1
  501. package/dist/theme/recipes/illustration.cjs.map +1 -1
  502. package/dist/theme/recipes/illustration.d.ts +29 -2
  503. package/dist/theme/recipes/illustration.js +1 -2
  504. package/dist/theme/recipes/illustration.js.map +1 -1
  505. package/dist/theme/recipes/index.cjs +1 -1
  506. package/dist/theme/recipes/index.cjs.map +1 -1
  507. package/dist/theme/recipes/index.d.ts +1464 -49
  508. package/dist/theme/recipes/index.js +3 -4
  509. package/dist/theme/recipes/index.js.map +1 -1
  510. package/dist/theme/recipes/input-addon.cjs.map +1 -1
  511. package/dist/theme/recipes/input-addon.d.ts +1 -1
  512. package/dist/theme/recipes/input-addon.js +1 -2
  513. package/dist/theme/recipes/input-addon.js.map +1 -1
  514. package/dist/theme/recipes/input-group.cjs.map +1 -1
  515. package/dist/theme/recipes/input-group.d.ts +1 -1
  516. package/dist/theme/recipes/input-group.js +1 -2
  517. package/dist/theme/recipes/input-group.js.map +1 -1
  518. package/dist/theme/recipes/input.cjs +1 -1
  519. package/dist/theme/recipes/input.cjs.map +1 -1
  520. package/dist/theme/recipes/input.d.ts +9 -2
  521. package/dist/theme/recipes/input.js +5 -6
  522. package/dist/theme/recipes/input.js.map +1 -1
  523. package/dist/theme/recipes/menu.cjs.map +1 -1
  524. package/dist/theme/recipes/menu.d.ts +20 -2
  525. package/dist/theme/recipes/menu.js +1 -2
  526. package/dist/theme/recipes/menu.js.map +1 -1
  527. package/dist/theme/recipes/pagination.cjs +1 -1
  528. package/dist/theme/recipes/pagination.cjs.map +1 -1
  529. package/dist/theme/recipes/pagination.d.ts +2 -2
  530. package/dist/theme/recipes/pagination.js +3 -4
  531. package/dist/theme/recipes/pagination.js.map +1 -1
  532. package/dist/theme/recipes/phone-number-input.cjs.map +1 -1
  533. package/dist/theme/recipes/phone-number-input.d.ts +9 -2
  534. package/dist/theme/recipes/phone-number-input.js +1 -2
  535. package/dist/theme/recipes/phone-number-input.js.map +1 -1
  536. package/dist/theme/recipes/popover.cjs.map +1 -1
  537. package/dist/theme/recipes/popover.d.ts +2 -2
  538. package/dist/theme/recipes/popover.js +1 -2
  539. package/dist/theme/recipes/popover.js.map +1 -1
  540. package/dist/theme/recipes/radio-button-group.cjs.map +1 -1
  541. package/dist/theme/recipes/radio-button-group.d.ts +25 -2
  542. package/dist/theme/recipes/radio-button-group.js +1 -2
  543. package/dist/theme/recipes/radio-button-group.js.map +1 -1
  544. package/dist/theme/recipes/radio-card-group.cjs.map +1 -1
  545. package/dist/theme/recipes/radio-card-group.d.ts +36 -2
  546. package/dist/theme/recipes/radio-card-group.js +1 -2
  547. package/dist/theme/recipes/radio-card-group.js.map +1 -1
  548. package/dist/theme/recipes/radio-group.cjs.map +1 -1
  549. package/dist/theme/recipes/radio-group.d.ts +27 -2
  550. package/dist/theme/recipes/radio-group.js +1 -2
  551. package/dist/theme/recipes/radio-group.js.map +1 -1
  552. package/dist/theme/recipes/select-language.cjs.map +1 -1
  553. package/dist/theme/recipes/select-language.d.ts +15 -2
  554. package/dist/theme/recipes/select-language.js +1 -2
  555. package/dist/theme/recipes/select-language.js.map +1 -1
  556. package/dist/theme/recipes/select.cjs +1 -1
  557. package/dist/theme/recipes/select.cjs.map +1 -1
  558. package/dist/theme/recipes/select.d.ts +30 -2
  559. package/dist/theme/recipes/select.js +3 -18
  560. package/dist/theme/recipes/select.js.map +1 -1
  561. package/dist/theme/recipes/status-tag-select.cjs.map +1 -1
  562. package/dist/theme/recipes/status-tag-select.d.ts +125 -2
  563. package/dist/theme/recipes/status-tag-select.js +1 -2
  564. package/dist/theme/recipes/status-tag-select.js.map +1 -1
  565. package/dist/theme/recipes/steps.cjs.map +1 -1
  566. package/dist/theme/recipes/steps.d.ts +2 -2
  567. package/dist/theme/recipes/steps.js +1 -2
  568. package/dist/theme/recipes/steps.js.map +1 -1
  569. package/dist/theme/recipes/switch-card.cjs.map +1 -1
  570. package/dist/theme/recipes/switch-card.d.ts +1 -1
  571. package/dist/theme/recipes/switch-card.js +1 -2
  572. package/dist/theme/recipes/switch-card.js.map +1 -1
  573. package/dist/theme/recipes/switch.cjs.map +1 -1
  574. package/dist/theme/recipes/switch.d.ts +22 -2
  575. package/dist/theme/recipes/switch.js +1 -2
  576. package/dist/theme/recipes/switch.js.map +1 -1
  577. package/dist/theme/recipes/table-container.cjs.map +1 -1
  578. package/dist/theme/recipes/table-container.d.ts +1 -1
  579. package/dist/theme/recipes/table-container.js +1 -2
  580. package/dist/theme/recipes/table-container.js.map +1 -1
  581. package/dist/theme/recipes/table-empty-row.cjs.map +1 -1
  582. package/dist/theme/recipes/table-empty-row.d.ts +1 -1
  583. package/dist/theme/recipes/table-empty-row.js +1 -2
  584. package/dist/theme/recipes/table-empty-row.js.map +1 -1
  585. package/dist/theme/recipes/table-group-title.cjs.map +1 -1
  586. package/dist/theme/recipes/table-group-title.d.ts +15 -2
  587. package/dist/theme/recipes/table-group-title.js +1 -2
  588. package/dist/theme/recipes/table-group-title.js.map +1 -1
  589. package/dist/theme/recipes/table.cjs.map +1 -1
  590. package/dist/theme/recipes/table.d.ts +2 -2
  591. package/dist/theme/recipes/table.js +1 -2
  592. package/dist/theme/recipes/table.js.map +1 -1
  593. package/dist/theme/recipes/tabs-chip.cjs.map +1 -1
  594. package/dist/theme/recipes/tabs-chip.d.ts +29 -2
  595. package/dist/theme/recipes/tabs-chip.js +1 -2
  596. package/dist/theme/recipes/tabs-chip.js.map +1 -1
  597. package/dist/theme/recipes/tabs.cjs.map +1 -1
  598. package/dist/theme/recipes/tabs.d.ts +49 -2
  599. package/dist/theme/recipes/tabs.js +1 -2
  600. package/dist/theme/recipes/tabs.js.map +1 -1
  601. package/dist/theme/recipes/tag.cjs.map +1 -1
  602. package/dist/theme/recipes/tag.d.ts +109 -2
  603. package/dist/theme/recipes/tag.js +1 -2
  604. package/dist/theme/recipes/tag.js.map +1 -1
  605. package/dist/theme/recipes/text.cjs.map +1 -1
  606. package/dist/theme/recipes/text.d.ts +29 -2
  607. package/dist/theme/recipes/text.js +1 -2
  608. package/dist/theme/recipes/text.js.map +1 -1
  609. package/dist/theme/recipes/textarea.cjs.map +1 -1
  610. package/dist/theme/recipes/textarea.d.ts +1 -1
  611. package/dist/theme/recipes/textarea.js +1 -2
  612. package/dist/theme/recipes/textarea.js.map +1 -1
  613. package/dist/theme/recipes/tooltip.cjs.map +1 -1
  614. package/dist/theme/recipes/tooltip.d.ts +2 -2
  615. package/dist/theme/recipes/tooltip.js +1 -2
  616. package/dist/theme/recipes/tooltip.js.map +1 -1
  617. package/dist/theme/semantic-tokens/colors.cjs.map +1 -1
  618. package/dist/theme/semantic-tokens/colors.js +1 -2
  619. package/dist/theme/semantic-tokens/colors.js.map +1 -1
  620. package/dist/theme/semantic-tokens/gradients.cjs.map +1 -1
  621. package/dist/theme/semantic-tokens/gradients.js +1 -2
  622. package/dist/theme/semantic-tokens/gradients.js.map +1 -1
  623. package/dist/theme/semantic-tokens/index.cjs.map +1 -1
  624. package/dist/theme/semantic-tokens/index.js +1 -2
  625. package/dist/theme/semantic-tokens/index.js.map +1 -1
  626. package/dist/theme/text-styles.cjs.map +1 -1
  627. package/dist/theme/text-styles.d.ts +1 -1
  628. package/dist/theme/text-styles.js +1 -2
  629. package/dist/theme/text-styles.js.map +1 -1
  630. package/dist/theme/tokens/animations.cjs.map +1 -1
  631. package/dist/theme/tokens/animations.js +1 -2
  632. package/dist/theme/tokens/animations.js.map +1 -1
  633. package/dist/theme/tokens/aspect-ratios.cjs.map +1 -1
  634. package/dist/theme/tokens/aspect-ratios.js +1 -2
  635. package/dist/theme/tokens/aspect-ratios.js.map +1 -1
  636. package/dist/theme/tokens/blurs.cjs.map +1 -1
  637. package/dist/theme/tokens/blurs.js +1 -2
  638. package/dist/theme/tokens/blurs.js.map +1 -1
  639. package/dist/theme/tokens/borders.cjs.map +1 -1
  640. package/dist/theme/tokens/borders.js +1 -2
  641. package/dist/theme/tokens/borders.js.map +1 -1
  642. package/dist/theme/tokens/colors.cjs.map +1 -1
  643. package/dist/theme/tokens/colors.js +1 -2
  644. package/dist/theme/tokens/colors.js.map +1 -1
  645. package/dist/theme/tokens/durations.cjs.map +1 -1
  646. package/dist/theme/tokens/durations.js +1 -2
  647. package/dist/theme/tokens/durations.js.map +1 -1
  648. package/dist/theme/tokens/easings.cjs.map +1 -1
  649. package/dist/theme/tokens/easings.js +1 -2
  650. package/dist/theme/tokens/easings.js.map +1 -1
  651. package/dist/theme/tokens/index.cjs.map +1 -1
  652. package/dist/theme/tokens/index.js +1 -2
  653. package/dist/theme/tokens/index.js.map +1 -1
  654. package/dist/theme/tokens/radii.cjs.map +1 -1
  655. package/dist/theme/tokens/radii.js +1 -2
  656. package/dist/theme/tokens/radii.js.map +1 -1
  657. package/dist/theme/tokens/shadows.cjs.map +1 -1
  658. package/dist/theme/tokens/shadows.js +1 -2
  659. package/dist/theme/tokens/shadows.js.map +1 -1
  660. package/dist/theme/tokens/sizes.cjs.map +1 -1
  661. package/dist/theme/tokens/sizes.js +1 -2
  662. package/dist/theme/tokens/sizes.js.map +1 -1
  663. package/dist/theme/tokens/spacing.cjs.map +1 -1
  664. package/dist/theme/tokens/spacing.js +1 -2
  665. package/dist/theme/tokens/spacing.js.map +1 -1
  666. package/dist/theme/tokens/typography.cjs.map +1 -1
  667. package/dist/theme/tokens/typography.js +1 -2
  668. package/dist/theme/tokens/typography.js.map +1 -1
  669. package/dist/theme/tokens/z-index.cjs.map +1 -1
  670. package/dist/theme/tokens/z-index.js +1 -2
  671. package/dist/theme/tokens/z-index.js.map +1 -1
  672. package/dist/theme/utilities.cjs.map +1 -1
  673. package/dist/theme/utilities.js +0 -1
  674. package/dist/theme/utilities.js.map +1 -1
  675. package/dist/ui.css +1 -1
  676. package/dist/utils/slots.cjs +1 -1
  677. package/dist/utils/slots.cjs.map +1 -1
  678. package/dist/utils/slots.js +3 -4
  679. package/dist/utils/slots.js.map +1 -1
  680. package/package.json +9 -9
  681. package/dist/node_modules/.pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons/react/24/outline/esm/ArrowDownTrayIcon.cjs.map +0 -1
  682. package/dist/node_modules/.pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons/react/24/outline/esm/ArrowDownTrayIcon.js.map +0 -1
  683. package/dist/node_modules/.pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons/react/24/outline/esm/ArrowLeftCircleIcon.cjs.map +0 -1
  684. package/dist/node_modules/.pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons/react/24/outline/esm/ArrowLeftCircleIcon.js.map +0 -1
  685. package/dist/node_modules/.pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons/react/24/outline/esm/ChatBubbleLeftRightIcon.cjs.map +0 -1
  686. package/dist/node_modules/.pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons/react/24/outline/esm/ChatBubbleLeftRightIcon.js.map +0 -1
  687. package/dist/node_modules/.pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons/react/24/outline/esm/CheckCircleIcon.cjs.map +0 -1
  688. package/dist/node_modules/.pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons/react/24/outline/esm/CheckCircleIcon.js.map +0 -1
  689. package/dist/node_modules/.pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons/react/24/outline/esm/DocumentTextIcon.cjs.map +0 -1
  690. package/dist/node_modules/.pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons/react/24/outline/esm/DocumentTextIcon.js.map +0 -1
  691. package/dist/node_modules/.pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons/react/24/outline/esm/XCircleIcon.cjs.map +0 -1
  692. package/dist/node_modules/.pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons/react/24/outline/esm/XCircleIcon.js.map +0 -1
  693. /package/dist/node_modules/.pnpm/{@heroicons_react@2.2.0_react@19.2.6 → @heroicons_react@2.2.0_react@19.3.1}/node_modules/@heroicons/react/24/outline/esm/ArrowDownTrayIcon.cjs +0 -0
  694. /package/dist/node_modules/.pnpm/{@heroicons_react@2.2.0_react@19.2.6 → @heroicons_react@2.2.0_react@19.3.1}/node_modules/@heroicons/react/24/outline/esm/ArrowLeftCircleIcon.cjs +0 -0
  695. /package/dist/node_modules/.pnpm/{@heroicons_react@2.2.0_react@19.2.6 → @heroicons_react@2.2.0_react@19.3.1}/node_modules/@heroicons/react/24/outline/esm/ChatBubbleLeftRightIcon.cjs +0 -0
  696. /package/dist/node_modules/.pnpm/{@heroicons_react@2.2.0_react@19.2.6 → @heroicons_react@2.2.0_react@19.3.1}/node_modules/@heroicons/react/24/outline/esm/CheckCircleIcon.cjs +0 -0
  697. /package/dist/node_modules/.pnpm/{@heroicons_react@2.2.0_react@19.2.6 → @heroicons_react@2.2.0_react@19.3.1}/node_modules/@heroicons/react/24/outline/esm/DocumentTextIcon.cjs +0 -0
  698. /package/dist/node_modules/.pnpm/{@heroicons_react@2.2.0_react@19.2.6 → @heroicons_react@2.2.0_react@19.3.1}/node_modules/@heroicons/react/24/outline/esm/XCircleIcon.cjs +0 -0
@@ -2,7 +2,7 @@
2
2
  import { Text as e } from "../text/Text.js";
3
3
  import { Box as t, HStack as n, VStack as r } from "@stokelp/styled-system/jsx";
4
4
  import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
5
- //#region src/components/chat/ChatScoreBreakdown.tsx
5
+ // src/components/chat/ChatScoreBreakdown.tsx
6
6
  var s = 1, c = [
7
7
  "origin",
8
8
  "rawMaterialOrigin",
@@ -229,7 +229,6 @@ var _ = ({ percent: h, detail: _, labels: v, typologyId: y }) => {
229
229
  ]
230
230
  });
231
231
  };
232
- //#endregion
233
232
  export { _ as ChatScoreBreakdown };
234
233
 
235
234
  //# sourceMappingURL=ChatScoreBreakdown.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChatScoreBreakdown.js","names":[],"sources":["../../../src/components/chat/ChatScoreBreakdown.tsx"],"sourcesContent":["import { Box, HStack, VStack } from '@stokelp/styled-system/jsx'\nimport { Text } from '~/components'\n\nexport type ScoreSetAttributeKey =\n | 'origin'\n | 'rawMaterialOrigin'\n | 'temperature'\n | 'cutting'\n | 'cooking'\n | 'treatment'\n | 'label'\n | 'packaging'\n\nexport type ScoreNumericAttributeKey = 'grammageGsm' | 'recycledPct' | 'thicknessMicron'\n\nexport type ScoreAttributeKey = ScoreSetAttributeKey | ScoreNumericAttributeKey\n\n/** Proximity bucket for free numeric packaging specs: egal (equal) → non_correspondant (no match). */\nexport type ScoreLevel = 'egal' | 'proche' | 'eloigne' | 'non_correspondant'\n\nexport type ScoreAttributeDetail = {\n matched: number | null\n total: number | null\n level?: ScoreLevel | null\n}\n\nexport type ChatScoreBreakdownLabels = {\n title: string\n compared: string\n notSpecified: string\n attributes: Record<ScoreSetAttributeKey, string> & Partial<Record<ScoreNumericAttributeKey, string>>\n levels?: Record<ScoreLevel, string>\n footer?: string\n}\n\nexport type ChatScoreBreakdownProps = {\n percent: number\n detail: Record<string, ScoreAttributeDetail>\n labels: ChatScoreBreakdownLabels\n /** Typology id of the AO product (1 = packaging). When provided, drives which attribute family is shown; falls back to inferring from the numeric specs when absent. */\n typologyId?: number\n}\n\nconst PACKAGING_TYPOLOGY_ID = 1\n\nconst ATTRIBUTE_ORDER: ScoreAttributeKey[] = [\n 'origin',\n 'rawMaterialOrigin',\n 'temperature',\n 'cutting',\n 'cooking',\n 'treatment',\n 'label',\n 'packaging',\n 'grammageGsm',\n 'recycledPct',\n 'thicknessMicron',\n]\n\n// Attributes that only exist for food products; hidden for packaging products.\nconst FOOD_ONLY_KEYS: ScoreAttributeKey[] = ['temperature', 'cutting', 'cooking']\n// Free numeric specs that only exist for packaging products; hidden for food products.\nconst PACKAGING_ONLY_KEYS: ScoreNumericAttributeKey[] = ['grammageGsm', 'recycledPct', 'thicknessMicron']\n\nconst LEVEL_COLORS: Record<ScoreLevel, { bg: string; color: string }> = {\n egal: { bg: '#E6F3D9', color: '#3B6D11' },\n proche: { bg: '#F0F6DC', color: '#5E8516' },\n eloigne: { bg: '#FDF0E0', color: '#C2740C' },\n non_correspondant: { bg: '#FCEBEB', color: '#A32D2D' },\n}\n\nfunction getHeadlineColor(percent: number): string {\n if (percent >= 70) return '#3B6D11'\n if (percent >= 40) return '#854F0B'\n return '#A32D2D'\n}\n\nfunction getBarColor(ratioPercent: number): string {\n if (ratioPercent >= 70) return '#639922'\n if (ratioPercent >= 40) return '#BA7517'\n return '#E24B4A'\n}\n\nfunction hasLevel(detail?: ScoreAttributeDetail): boolean {\n return detail?.level != null\n}\n\nfunction isFraction(detail?: ScoreAttributeDetail): boolean {\n return detail?.matched != null && detail?.total != null\n}\n\nfunction isComparable(detail?: ScoreAttributeDetail): boolean {\n return hasLevel(detail) || isFraction(detail)\n}\n\nexport const ChatScoreBreakdown = ({ percent, detail, labels, typologyId }: ChatScoreBreakdownProps) => {\n // A packaging product hides food attributes (temperature/cutting/cooking) and shows the\n // numeric specs, and vice versa. Two independent signals mark a packaging product, combined\n // so neither can wrongly override the other: the AO product typology (authoritative, and the\n // only signal when no numeric spec is comparable), and the presence of a comparable numeric\n // spec (covers cases where the typology is absent or not sent as the expected value).\n const isPackaging =\n Number(typologyId) === PACKAGING_TYPOLOGY_ID || PACKAGING_ONLY_KEYS.some(key => detail[key]?.level != null)\n const hiddenKeys = new Set<ScoreAttributeKey>(isPackaging ? FOOD_ONLY_KEYS : PACKAGING_ONLY_KEYS)\n const visibleKeys = ATTRIBUTE_ORDER.filter(key => !hiddenKeys.has(key))\n\n const compared = visibleKeys.filter(key => isComparable(detail[key]))\n const notSpecified = visibleKeys.filter(key => !isComparable(detail[key]) && labels.attributes[key] != null)\n\n return (\n <Box\n bg=\"white\"\n borderRadius=\"radius-8\"\n p=\"space-16\"\n minW=\"220px\"\n maxW=\"240px\"\n css={{ '& *': { fontFamily: 'inherit' } }}\n >\n <HStack justify=\"space-between\" alignItems=\"baseline\" mb=\"space-8\">\n <Text as=\"span\" fontSize=\"body.md\" fontWeight=\"bold\">\n {labels.title}\n </Text>\n <Text as=\"span\" fontSize=\"body.lg\" fontWeight=\"medium\" style={{ color: getHeadlineColor(percent) }}>\n {Math.round(percent)} %\n </Text>\n </HStack>\n\n <Box h=\"1px\" bg=\"grey.100\" mb=\"space-8\" />\n\n {compared.length > 0 && (\n <VStack alignItems=\"stretch\" gap=\"space-4\" mb=\"space-8\">\n <Text as=\"span\" fontSize=\"body.sm\" fontWeight=\"bold\" color=\"grey.400\">\n {labels.compared}\n </Text>\n {compared.map(key => {\n const entry = detail[key]\n if (hasLevel(entry)) {\n const level = entry.level as ScoreLevel\n const colors = LEVEL_COLORS[level]\n return (\n <HStack key={key} h=\"18px\" alignItems=\"center\" gap=\"space-8\" justify=\"space-between\">\n <Text as=\"span\" fontSize=\"body.sm\" color=\"grey.500\" minW=\"80px\">\n {labels.attributes[key]}\n </Text>\n <Box\n display=\"flex\"\n alignItems=\"center\"\n justifyContent=\"center\"\n h=\"100%\"\n px=\"space-6\"\n borderRadius=\"full\"\n flexShrink=\"0\"\n style={{ backgroundColor: colors.bg }}\n >\n <Text\n as=\"span\"\n fontSize=\"body.sm\"\n fontWeight=\"medium\"\n style={{ color: colors.color, whiteSpace: 'nowrap', lineHeight: 1 }}\n >\n {labels.levels?.[level] ?? level}\n </Text>\n </Box>\n </HStack>\n )\n }\n\n const matched = entry.matched as number\n const total = entry.total as number\n const ratioPercent = total > 0 ? (matched / total) * 100 : 0\n return (\n <HStack key={key} h=\"18px\" alignItems=\"center\" gap=\"space-8\">\n <Text as=\"span\" fontSize=\"body.sm\" color=\"grey.500\" minW=\"80px\">\n {labels.attributes[key]}\n </Text>\n <Box flex=\"1\" h=\"3px\" bg=\"grey.100\" borderRadius=\"full\" overflow=\"hidden\">\n <Box\n h=\"100%\"\n borderRadius=\"full\"\n style={{ width: `${ratioPercent}%`, background: getBarColor(ratioPercent) }}\n />\n </Box>\n <Text\n as=\"span\"\n fontSize=\"body.sm\"\n fontWeight=\"medium\"\n minW=\"40px\"\n textAlign=\"right\"\n style={{ color: getBarColor(ratioPercent), lineHeight: 1 }}\n >\n {matched}/{total}\n </Text>\n </HStack>\n )\n })}\n </VStack>\n )}\n\n {compared.length > 0 && notSpecified.length > 0 && <Box h=\"1px\" bg=\"grey.100\" mb=\"space-8\" />}\n\n {notSpecified.length > 0 && (\n <VStack alignItems=\"stretch\" gap=\"space-4\">\n <Text as=\"span\" fontSize=\"body.sm\" fontWeight=\"bold\" color=\"grey.400\">\n {labels.notSpecified}\n </Text>\n <HStack flexWrap=\"wrap\" gap=\"space-4\">\n {notSpecified.map(key => (\n <Text\n key={key}\n as=\"span\"\n fontSize=\"body.sm\"\n color=\"grey.400\"\n border=\"1px solid\"\n borderColor=\"grey.100\"\n px=\"space-8\"\n py=\"2px\"\n borderRadius=\"full\"\n >\n {labels.attributes[key]}\n </Text>\n ))}\n </HStack>\n </VStack>\n )}\n\n {labels.footer && (\n <>\n <Box h=\"1px\" bg=\"grey.100\" mt=\"space-8\" mb=\"space-8\" />\n <Text as=\"span\" fontSize=\"9px\" color=\"grey.300\" style={{ lineHeight: 1 }}>\n {labels.footer}\n </Text>\n </>\n )}\n </Box>\n )\n}\n"],"mappings":"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"}
1
+ {"version":3,"file":"ChatScoreBreakdown.js","names":["_Fragment","PACKAGING_TYPOLOGY_ID","ATTRIBUTE_ORDER","FOOD_ONLY_KEYS","PACKAGING_ONLY_KEYS","LEVEL_COLORS","getHeadlineColor","percent","getBarColor","ratioPercent","hasLevel","detail","isFraction","isComparable","ChatScoreBreakdown","isPackaging","typologyId","key","hiddenKeys","visibleKeys","compared","notSpecified","labels","Box","HStack","Text","VStack","entry","level","colors","matched","total","Fragment"],"sources":["../../../src/components/chat/ChatScoreBreakdown.tsx"],"sourcesContent":["import { Box, HStack, VStack } from '@stokelp/styled-system/jsx'\nimport { Text } from '~/components'\n\nexport type ScoreSetAttributeKey =\n 'origin' | 'rawMaterialOrigin' | 'temperature' | 'cutting' | 'cooking' | 'treatment' | 'label' | 'packaging'\n\nexport type ScoreNumericAttributeKey = 'grammageGsm' | 'recycledPct' | 'thicknessMicron'\n\nexport type ScoreAttributeKey = ScoreSetAttributeKey | ScoreNumericAttributeKey\n\n/** Proximity bucket for free numeric packaging specs: egal (equal) → non_correspondant (no match). */\nexport type ScoreLevel = 'egal' | 'proche' | 'eloigne' | 'non_correspondant'\n\nexport type ScoreAttributeDetail = {\n matched: number | null\n total: number | null\n level?: ScoreLevel | null\n}\n\nexport type ChatScoreBreakdownLabels = {\n title: string\n compared: string\n notSpecified: string\n attributes: Record<ScoreSetAttributeKey, string> & Partial<Record<ScoreNumericAttributeKey, string>>\n levels?: Record<ScoreLevel, string>\n footer?: string\n}\n\nexport type ChatScoreBreakdownProps = {\n percent: number\n detail: Record<string, ScoreAttributeDetail>\n labels: ChatScoreBreakdownLabels\n /** Typology id of the AO product (1 = packaging). When provided, drives which attribute family is shown; falls back to inferring from the numeric specs when absent. */\n typologyId?: number\n}\n\nconst PACKAGING_TYPOLOGY_ID = 1\n\nconst ATTRIBUTE_ORDER: ScoreAttributeKey[] = [\n 'origin',\n 'rawMaterialOrigin',\n 'temperature',\n 'cutting',\n 'cooking',\n 'treatment',\n 'label',\n 'packaging',\n 'grammageGsm',\n 'recycledPct',\n 'thicknessMicron',\n]\n\n// Attributes that only exist for food products; hidden for packaging products.\nconst FOOD_ONLY_KEYS: ScoreAttributeKey[] = ['temperature', 'cutting', 'cooking']\n// Free numeric specs that only exist for packaging products; hidden for food products.\nconst PACKAGING_ONLY_KEYS: ScoreNumericAttributeKey[] = ['grammageGsm', 'recycledPct', 'thicknessMicron']\n\nconst LEVEL_COLORS: Record<ScoreLevel, { bg: string; color: string }> = {\n egal: { bg: '#E6F3D9', color: '#3B6D11' },\n proche: { bg: '#F0F6DC', color: '#5E8516' },\n eloigne: { bg: '#FDF0E0', color: '#C2740C' },\n non_correspondant: { bg: '#FCEBEB', color: '#A32D2D' },\n}\n\nfunction getHeadlineColor(percent: number): string {\n if (percent >= 70) return '#3B6D11'\n if (percent >= 40) return '#854F0B'\n return '#A32D2D'\n}\n\nfunction getBarColor(ratioPercent: number): string {\n if (ratioPercent >= 70) return '#639922'\n if (ratioPercent >= 40) return '#BA7517'\n return '#E24B4A'\n}\n\nfunction hasLevel(detail?: ScoreAttributeDetail): boolean {\n return detail?.level != null\n}\n\nfunction isFraction(detail?: ScoreAttributeDetail): boolean {\n return detail?.matched != null && detail?.total != null\n}\n\nfunction isComparable(detail?: ScoreAttributeDetail): boolean {\n return hasLevel(detail) || isFraction(detail)\n}\n\nexport const ChatScoreBreakdown = ({ percent, detail, labels, typologyId }: ChatScoreBreakdownProps) => {\n // A packaging product hides food attributes (temperature/cutting/cooking) and shows the\n // numeric specs, and vice versa. Two independent signals mark a packaging product, combined\n // so neither can wrongly override the other: the AO product typology (authoritative, and the\n // only signal when no numeric spec is comparable), and the presence of a comparable numeric\n // spec (covers cases where the typology is absent or not sent as the expected value).\n const isPackaging =\n Number(typologyId) === PACKAGING_TYPOLOGY_ID || PACKAGING_ONLY_KEYS.some(key => detail[key]?.level != null)\n const hiddenKeys = new Set<ScoreAttributeKey>(isPackaging ? FOOD_ONLY_KEYS : PACKAGING_ONLY_KEYS)\n const visibleKeys = ATTRIBUTE_ORDER.filter(key => !hiddenKeys.has(key))\n\n const compared = visibleKeys.filter(key => isComparable(detail[key]))\n const notSpecified = visibleKeys.filter(key => !isComparable(detail[key]) && labels.attributes[key] != null)\n\n return (\n <Box\n bg=\"white\"\n borderRadius=\"radius-8\"\n p=\"space-16\"\n minW=\"220px\"\n maxW=\"240px\"\n css={{ '& *': { fontFamily: 'inherit' } }}\n >\n <HStack justify=\"space-between\" alignItems=\"baseline\" mb=\"space-8\">\n <Text as=\"span\" fontSize=\"body.md\" fontWeight=\"bold\">\n {labels.title}\n </Text>\n <Text as=\"span\" fontSize=\"body.lg\" fontWeight=\"medium\" style={{ color: getHeadlineColor(percent) }}>\n {Math.round(percent)} %\n </Text>\n </HStack>\n\n <Box h=\"1px\" bg=\"grey.100\" mb=\"space-8\" />\n\n {compared.length > 0 && (\n <VStack alignItems=\"stretch\" gap=\"space-4\" mb=\"space-8\">\n <Text as=\"span\" fontSize=\"body.sm\" fontWeight=\"bold\" color=\"grey.400\">\n {labels.compared}\n </Text>\n {compared.map(key => {\n const entry = detail[key]\n if (hasLevel(entry)) {\n const level = entry.level as ScoreLevel\n const colors = LEVEL_COLORS[level]\n return (\n <HStack key={key} h=\"18px\" alignItems=\"center\" gap=\"space-8\" justify=\"space-between\">\n <Text as=\"span\" fontSize=\"body.sm\" color=\"grey.500\" minW=\"80px\">\n {labels.attributes[key]}\n </Text>\n <Box\n display=\"flex\"\n alignItems=\"center\"\n justifyContent=\"center\"\n h=\"100%\"\n px=\"space-6\"\n borderRadius=\"full\"\n flexShrink=\"0\"\n style={{ backgroundColor: colors.bg }}\n >\n <Text\n as=\"span\"\n fontSize=\"body.sm\"\n fontWeight=\"medium\"\n style={{ color: colors.color, whiteSpace: 'nowrap', lineHeight: 1 }}\n >\n {labels.levels?.[level] ?? level}\n </Text>\n </Box>\n </HStack>\n )\n }\n\n const matched = entry.matched as number\n const total = entry.total as number\n const ratioPercent = total > 0 ? (matched / total) * 100 : 0\n return (\n <HStack key={key} h=\"18px\" alignItems=\"center\" gap=\"space-8\">\n <Text as=\"span\" fontSize=\"body.sm\" color=\"grey.500\" minW=\"80px\">\n {labels.attributes[key]}\n </Text>\n <Box flex=\"1\" h=\"3px\" bg=\"grey.100\" borderRadius=\"full\" overflow=\"hidden\">\n <Box\n h=\"100%\"\n borderRadius=\"full\"\n style={{ width: `${ratioPercent}%`, background: getBarColor(ratioPercent) }}\n />\n </Box>\n <Text\n as=\"span\"\n fontSize=\"body.sm\"\n fontWeight=\"medium\"\n minW=\"40px\"\n textAlign=\"right\"\n style={{ color: getBarColor(ratioPercent), lineHeight: 1 }}\n >\n {matched}/{total}\n </Text>\n </HStack>\n )\n })}\n </VStack>\n )}\n\n {compared.length > 0 && notSpecified.length > 0 && <Box h=\"1px\" bg=\"grey.100\" mb=\"space-8\" />}\n\n {notSpecified.length > 0 && (\n <VStack alignItems=\"stretch\" gap=\"space-4\">\n <Text as=\"span\" fontSize=\"body.sm\" fontWeight=\"bold\" color=\"grey.400\">\n {labels.notSpecified}\n </Text>\n <HStack flexWrap=\"wrap\" gap=\"space-4\">\n {notSpecified.map(key => (\n <Text\n key={key}\n as=\"span\"\n fontSize=\"body.sm\"\n color=\"grey.400\"\n border=\"1px solid\"\n borderColor=\"grey.100\"\n px=\"space-8\"\n py=\"2px\"\n borderRadius=\"full\"\n >\n {labels.attributes[key]}\n </Text>\n ))}\n </HStack>\n </VStack>\n )}\n\n {labels.footer && (\n <>\n <Box h=\"1px\" bg=\"grey.100\" mt=\"space-8\" mb=\"space-8\" />\n <Text as=\"span\" fontSize=\"9px\" color=\"grey.300\" style={{ lineHeight: 1 }}>\n {labels.footer}\n </Text>\n </>\n )}\n </Box>\n )\n}\n"],"mappings":"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"}
@@ -1 +1 @@
1
- {"version":3,"file":"ChatTextInput.cjs","names":[],"sources":["../../../src/components/chat/ChatTextInput.tsx"],"sourcesContent":["import { useRef, useEffect, useState, KeyboardEvent, ChangeEvent } from 'react'\nimport { Textarea, TextareaProps } from '~/components'\nimport { styled } from '@stokelp/styled-system/jsx'\nimport { chatTextInput } from '@stokelp/styled-system/recipes'\n\ntype ChatTextInputProps = TextareaProps & {\n minRows?: number\n maxRows?: number\n onSend?: (message: string) => void\n}\n\nconst StyledTextarea = styled(Textarea, chatTextInput)\n\nexport const ChatTextInput: React.FC<ChatTextInputProps> = ({\n minRows = 1,\n maxRows = 6,\n onSend,\n onChange,\n ...props\n}) => {\n const textareaRef = useRef<HTMLTextAreaElement | null>(null)\n const [value, setValue] = useState('')\n\n const resize = () => {\n const el = textareaRef.current\n if (!el) return\n\n el.style.height = 'auto'\n\n const computed = window.getComputedStyle(el)\n const lineHeight = parseFloat(computed.lineHeight) || 20\n const paddingTop = parseFloat(computed.paddingTop)\n const paddingBottom = parseFloat(computed.paddingBottom)\n\n const minHeight = lineHeight * minRows + paddingTop + paddingBottom\n const maxHeightPx = lineHeight * maxRows + paddingTop + paddingBottom\n\n const scrollHeight = el.scrollHeight\n\n const newHeight = Math.min(scrollHeight, maxHeightPx)\n el.style.height = Math.max(newHeight, minHeight) + 'px'\n\n el.style.overflowY = scrollHeight > maxHeightPx ? 'auto' : 'hidden'\n el.style.scrollPaddingBottom = `${paddingBottom}px`\n }\n\n useEffect(() => {\n resize()\n const onResize = () => resize()\n window.addEventListener('resize', onResize)\n return () => window.removeEventListener('resize', onResize)\n }, [value])\n\n const handleKeyDown = (e: KeyboardEvent<HTMLTextAreaElement>) => {\n if (e.key === 'Enter' && !e.shiftKey) {\n e.preventDefault()\n const text = value.trim()\n if (!text) {\n setValue('')\n resize()\n return\n }\n onSend?.(text)\n setValue('')\n requestAnimationFrame(() => {\n if (textareaRef.current) textareaRef.current.style.height = 'auto'\n resize()\n })\n }\n }\n\n const handleChange = (e: ChangeEvent<HTMLTextAreaElement>) => {\n if (!props?.maxLength || e.target.value.length < props?.maxLength) {\n setValue(e.target.value)\n onChange?.(e)\n }\n }\n\n return (\n <StyledTextarea\n ref={textareaRef}\n value={value}\n onChange={handleChange}\n onKeyDown={handleKeyDown}\n rows={minRows}\n {...props}\n />\n )\n}\n"],"mappings":"mMAWA,IAAM,GAAA,EAAA,EAAA,QAAwB,EAAA,SAAU,EAAA,aAAa,EAExC,GAA+C,CAC1D,UAAU,EACV,UAAU,EACV,SACA,WACA,GAAG,KACC,CACJ,IAAM,GAAA,EAAA,EAAA,QAAiD,IAAI,EACrD,CAAC,EAAO,IAAA,EAAA,EAAA,UAAqB,EAAE,EAE/B,MAAe,CACnB,IAAM,EAAK,EAAY,QACvB,GAAI,CAAC,EAAI,OAET,EAAG,MAAM,OAAS,OAElB,IAAM,EAAW,OAAO,iBAAiB,CAAE,EACrC,EAAa,WAAW,EAAS,UAAU,GAAK,GAChD,EAAa,WAAW,EAAS,UAAU,EAC3C,EAAgB,WAAW,EAAS,aAAa,EAEjD,EAAY,EAAa,EAAU,EAAa,EAChD,EAAc,EAAa,EAAU,EAAa,EAElD,EAAe,EAAG,aAElB,EAAY,KAAK,IAAI,EAAc,CAAW,EACpD,EAAG,MAAM,OAAS,KAAK,IAAI,EAAW,CAAS,EAAI,KAEnD,EAAG,MAAM,UAAY,EAAe,EAAc,OAAS,SAC3D,EAAG,MAAM,oBAAsB,GAAG,EAAc,GAClD,EAkCA,OAhCA,EAAA,EAAA,eAAgB,CACd,EAAO,EACP,IAAM,MAAiB,EAAO,EAE9B,OADA,OAAO,iBAAiB,SAAU,CAAQ,MAC7B,OAAO,oBAAoB,SAAU,CAAQ,CAC5D,EAAG,CAAC,CAAK,CAAC,GA4BR,EAAA,EAAA,KAAC,EAAD,CACE,IAAK,EACE,QACP,SAXkB,GAAwC,EACxD,CAAC,GAAO,WAAa,EAAE,OAAO,MAAM,OAAS,GAAO,aACtD,EAAS,EAAE,OAAO,KAAK,EACvB,IAAW,CAAC,EAEhB,EAOI,UA9BmB,GAA0C,CAC/D,GAAI,EAAE,MAAQ,SAAW,CAAC,EAAE,SAAU,CACpC,EAAE,eAAe,EACjB,IAAM,EAAO,EAAM,KAAK,EACxB,GAAI,CAAC,EAAM,CACT,EAAS,EAAE,EACX,EAAO,EACP,MACF,CACA,IAAS,CAAI,EACb,EAAS,EAAE,EACX,0BAA4B,CACtB,EAAY,UAAS,EAAY,QAAQ,MAAM,OAAS,QAC5D,EAAO,CACT,CAAC,CACH,CACF,EAeI,KAAM,EACN,GAAI,CACL,CAAA,CAEL"}
1
+ {"version":3,"file":"ChatTextInput.cjs","names":["styled","Textarea","chatTextInput","useRef","useState","require_Textarea","_stokelp_styled_system_jsx","_stokelp_styled_system_recipes","react","react_jsx_runtime","StyledTextarea","ChatTextInput","props","textareaRef","value","setValue","resize","el","computed","lineHeight","paddingTop","paddingBottom","minHeight","minRows","maxHeightPx","maxRows","scrollHeight","newHeight","onResize","onChange","text","onSend"],"sources":["../../../src/components/chat/ChatTextInput.tsx"],"sourcesContent":["import { useRef, useEffect, useState, KeyboardEvent, ChangeEvent } from 'react'\nimport { Textarea, TextareaProps } from '~/components'\nimport { styled } from '@stokelp/styled-system/jsx'\nimport { chatTextInput } from '@stokelp/styled-system/recipes'\n\ntype ChatTextInputProps = TextareaProps & {\n minRows?: number\n maxRows?: number\n onSend?: (message: string) => void\n}\n\nconst StyledTextarea = styled(Textarea, chatTextInput)\n\nexport const ChatTextInput: React.FC<ChatTextInputProps> = ({\n minRows = 1,\n maxRows = 6,\n onSend,\n onChange,\n ...props\n}) => {\n const textareaRef = useRef<HTMLTextAreaElement | null>(null)\n const [value, setValue] = useState('')\n\n const resize = () => {\n const el = textareaRef.current\n if (!el) return\n\n el.style.height = 'auto'\n\n const computed = window.getComputedStyle(el)\n const lineHeight = parseFloat(computed.lineHeight) || 20\n const paddingTop = parseFloat(computed.paddingTop)\n const paddingBottom = parseFloat(computed.paddingBottom)\n\n const minHeight = lineHeight * minRows + paddingTop + paddingBottom\n const maxHeightPx = lineHeight * maxRows + paddingTop + paddingBottom\n\n const scrollHeight = el.scrollHeight\n\n const newHeight = Math.min(scrollHeight, maxHeightPx)\n el.style.height = Math.max(newHeight, minHeight) + 'px'\n\n el.style.overflowY = scrollHeight > maxHeightPx ? 'auto' : 'hidden'\n el.style.scrollPaddingBottom = `${paddingBottom}px`\n }\n\n useEffect(() => {\n resize()\n const onResize = () => resize()\n window.addEventListener('resize', onResize)\n return () => window.removeEventListener('resize', onResize)\n }, [value])\n\n const handleKeyDown = (e: KeyboardEvent<HTMLTextAreaElement>) => {\n if (e.key === 'Enter' && !e.shiftKey) {\n e.preventDefault()\n const text = value.trim()\n if (!text) {\n setValue('')\n resize()\n return\n }\n onSend?.(text)\n setValue('')\n requestAnimationFrame(() => {\n if (textareaRef.current) textareaRef.current.style.height = 'auto'\n resize()\n })\n }\n }\n\n const handleChange = (e: ChangeEvent<HTMLTextAreaElement>) => {\n if (!props?.maxLength || e.target.value.length < props?.maxLength) {\n setValue(e.target.value)\n onChange?.(e)\n }\n }\n\n return (\n <StyledTextarea\n ref={textareaRef}\n value={value}\n onChange={handleChange}\n onKeyDown={handleKeyDown}\n rows={minRows}\n {...props}\n />\n )\n}\n"],"mappings":"A,mMAWA,IAAMU,GAAA,EAAiBV,EAAAA,OAAAA,CAAOC,EAAAA,SAAUC,EAAAA,aAAa,EAExCS,GAA+C,CAC1D,UAAU,EACV,UAAU,EACV,SACA,WACA,GAAGC,KACC,CACJ,IAAMC,GAAA,EAAcV,EAAAA,OAAAA,CAAmC,IAAI,EACrD,CAACW,EAAOC,IAAA,EAAYX,EAAAA,SAAAA,CAAS,EAAE,EAE/BY,MAAe,CACnB,IAAMC,EAAKJ,EAAY,QACvB,GAAI,CAACI,EAAI,OAET,EAAG,MAAM,OAAS,OAElB,IAAMC,EAAW,OAAO,iBAAiBD,CAAE,EACrCE,EAAa,WAAWD,EAAS,UAAU,GAAK,GAChDE,EAAa,WAAWF,EAAS,UAAU,EAC3CG,EAAgB,WAAWH,EAAS,aAAa,EAEjDI,EAAYH,EAAaI,EAAUH,EAAaC,EAChDG,EAAcL,EAAaM,EAAUL,EAAaC,EAElDK,EAAeT,EAAG,aAElBU,EAAY,KAAK,IAAID,EAAcF,CAAW,EACpD,EAAG,MAAM,OAAS,KAAK,IAAIG,EAAWL,CAAS,EAAI,KAEnD,EAAG,MAAM,UAAYI,EAAeF,EAAc,OAAS,SAC3D,EAAG,MAAM,oBAAsB,GAAGH,EAAc,GAClD,EAkCA,OAhCA,EAAAb,EAAA,UAAA,KAAgB,CACdQ,EAAO,EACP,IAAMY,MAAiBZ,EAAO,EAE9B,OADA,OAAO,iBAAiB,SAAUY,CAAQ,MAC7B,OAAO,oBAAoB,SAAUA,CAAQ,CAC5D,EAAG,CAACd,CAAK,CAAC,GA4BR,EAAAL,EAAA,IAAA,CAACC,EAAD,CACE,IAAKG,EACE,QACP,SAXkB,GAAwC,EACxD,CAACD,GAAO,WAAa,EAAE,OAAO,MAAM,OAASA,GAAO,aACtDG,EAAS,EAAE,OAAO,KAAK,EACvBc,IAAW,CAAC,EAEhB,EAOI,UA9BmB,GAA0C,CAC/D,GAAI,EAAE,MAAQ,SAAW,CAAC,EAAE,SAAU,CACpC,EAAE,eAAe,EACjB,IAAMC,EAAOhB,EAAM,KAAK,EACxB,GAAI,CAACgB,EAAM,CACTf,EAAS,EAAE,EACXC,EAAO,EACP,MACF,CACAe,IAASD,CAAI,EACbf,EAAS,EAAE,EACX,0BAA4B,CACtBF,EAAY,UAAS,EAAY,QAAQ,MAAM,OAAS,QAC5DG,EAAO,CACT,CAAC,CACH,CACF,EAeI,KAAMO,EACN,GAAIX,CACL,CAAA,CAEL,E"}
@@ -4,7 +4,7 @@ import { styled as t } from "@stokelp/styled-system/jsx";
4
4
  import { chatTextInput as n } from "@stokelp/styled-system/recipes";
5
5
  import { useEffect as r, useRef as i, useState as a } from "react";
6
6
  import { jsx as o } from "react/jsx-runtime";
7
- //#region src/components/chat/ChatTextInput.tsx
7
+ // src/components/chat/ChatTextInput.tsx
8
8
  var s = t(e, n), c = ({ minRows: e = 1, maxRows: t = 6, onSend: n, onChange: c, ...l }) => {
9
9
  let u = i(null), [d, f] = a(""), p = () => {
10
10
  let n = u.current;
@@ -40,7 +40,6 @@ var s = t(e, n), c = ({ minRows: e = 1, maxRows: t = 6, onSend: n, onChange: c,
40
40
  ...l
41
41
  });
42
42
  };
43
- //#endregion
44
43
  export { c as ChatTextInput };
45
44
 
46
45
  //# sourceMappingURL=ChatTextInput.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChatTextInput.js","names":[],"sources":["../../../src/components/chat/ChatTextInput.tsx"],"sourcesContent":["import { useRef, useEffect, useState, KeyboardEvent, ChangeEvent } from 'react'\nimport { Textarea, TextareaProps } from '~/components'\nimport { styled } from '@stokelp/styled-system/jsx'\nimport { chatTextInput } from '@stokelp/styled-system/recipes'\n\ntype ChatTextInputProps = TextareaProps & {\n minRows?: number\n maxRows?: number\n onSend?: (message: string) => void\n}\n\nconst StyledTextarea = styled(Textarea, chatTextInput)\n\nexport const ChatTextInput: React.FC<ChatTextInputProps> = ({\n minRows = 1,\n maxRows = 6,\n onSend,\n onChange,\n ...props\n}) => {\n const textareaRef = useRef<HTMLTextAreaElement | null>(null)\n const [value, setValue] = useState('')\n\n const resize = () => {\n const el = textareaRef.current\n if (!el) return\n\n el.style.height = 'auto'\n\n const computed = window.getComputedStyle(el)\n const lineHeight = parseFloat(computed.lineHeight) || 20\n const paddingTop = parseFloat(computed.paddingTop)\n const paddingBottom = parseFloat(computed.paddingBottom)\n\n const minHeight = lineHeight * minRows + paddingTop + paddingBottom\n const maxHeightPx = lineHeight * maxRows + paddingTop + paddingBottom\n\n const scrollHeight = el.scrollHeight\n\n const newHeight = Math.min(scrollHeight, maxHeightPx)\n el.style.height = Math.max(newHeight, minHeight) + 'px'\n\n el.style.overflowY = scrollHeight > maxHeightPx ? 'auto' : 'hidden'\n el.style.scrollPaddingBottom = `${paddingBottom}px`\n }\n\n useEffect(() => {\n resize()\n const onResize = () => resize()\n window.addEventListener('resize', onResize)\n return () => window.removeEventListener('resize', onResize)\n }, [value])\n\n const handleKeyDown = (e: KeyboardEvent<HTMLTextAreaElement>) => {\n if (e.key === 'Enter' && !e.shiftKey) {\n e.preventDefault()\n const text = value.trim()\n if (!text) {\n setValue('')\n resize()\n return\n }\n onSend?.(text)\n setValue('')\n requestAnimationFrame(() => {\n if (textareaRef.current) textareaRef.current.style.height = 'auto'\n resize()\n })\n }\n }\n\n const handleChange = (e: ChangeEvent<HTMLTextAreaElement>) => {\n if (!props?.maxLength || e.target.value.length < props?.maxLength) {\n setValue(e.target.value)\n onChange?.(e)\n }\n }\n\n return (\n <StyledTextarea\n ref={textareaRef}\n value={value}\n onChange={handleChange}\n onKeyDown={handleKeyDown}\n rows={minRows}\n {...props}\n />\n )\n}\n"],"mappings":";;;;;;;AAWA,IAAM,IAAiB,EAAO,GAAU,CAAa,GAExC,KAA+C,EAC1D,aAAU,GACV,aAAU,GACV,WACA,aACA,GAAG,QACC;CACJ,IAAM,IAAc,EAAmC,IAAI,GACrD,CAAC,GAAO,KAAY,EAAS,EAAE,GAE/B,UAAe;EACnB,IAAM,IAAK,EAAY;EACvB,IAAI,CAAC,GAAI;EAET,EAAG,MAAM,SAAS;EAElB,IAAM,IAAW,OAAO,iBAAiB,CAAE,GACrC,IAAa,WAAW,EAAS,UAAU,KAAK,IAChD,IAAa,WAAW,EAAS,UAAU,GAC3C,IAAgB,WAAW,EAAS,aAAa,GAEjD,IAAY,IAAa,IAAU,IAAa,GAChD,IAAc,IAAa,IAAU,IAAa,GAElD,IAAe,EAAG,cAElB,IAAY,KAAK,IAAI,GAAc,CAAW;EAIpD,AAHA,EAAG,MAAM,SAAS,KAAK,IAAI,GAAW,CAAS,IAAI,MAEnD,EAAG,MAAM,YAAY,IAAe,IAAc,SAAS,UAC3D,EAAG,MAAM,sBAAsB,GAAG,EAAc;CAClD;CAkCA,OAhCA,QAAgB;EACd,EAAO;EACP,IAAM,UAAiB,EAAO;EAE9B,OADA,OAAO,iBAAiB,UAAU,CAAQ,SAC7B,OAAO,oBAAoB,UAAU,CAAQ;CAC5D,GAAG,CAAC,CAAK,CAAC,GA4BR,kBAAC,GAAD;EACE,KAAK;EACE;EACP,WAXkB,MAAwC;GAC5D,CAAI,CAAC,GAAO,aAAa,EAAE,OAAO,MAAM,SAAS,GAAO,eACtD,EAAS,EAAE,OAAO,KAAK,GACvB,IAAW,CAAC;EAEhB;EAOI,YA9BmB,MAA0C;GAC/D,IAAI,EAAE,QAAQ,WAAW,CAAC,EAAE,UAAU;IACpC,EAAE,eAAe;IACjB,IAAM,IAAO,EAAM,KAAK;IACxB,IAAI,CAAC,GAAM;KAET,AADA,EAAS,EAAE,GACX,EAAO;KACP;IACF;IAGA,AAFA,IAAS,CAAI,GACb,EAAS,EAAE,GACX,4BAA4B;KAE1B,AADI,EAAY,YAAS,EAAY,QAAQ,MAAM,SAAS,SAC5D,EAAO;IACT,CAAC;GACH;EACF;EAeI,MAAM;EACN,GAAI;CACL,CAAA;AAEL"}
1
+ {"version":3,"file":"ChatTextInput.js","names":["StyledTextarea","styled","Textarea","chatTextInput","ChatTextInput","props","textareaRef","useRef","value","setValue","useState","resize","el","computed","lineHeight","paddingTop","paddingBottom","minHeight","minRows","maxHeightPx","maxRows","scrollHeight","newHeight","useEffect","onResize","onChange","text","onSend"],"sources":["../../../src/components/chat/ChatTextInput.tsx"],"sourcesContent":["import { useRef, useEffect, useState, KeyboardEvent, ChangeEvent } from 'react'\nimport { Textarea, TextareaProps } from '~/components'\nimport { styled } from '@stokelp/styled-system/jsx'\nimport { chatTextInput } from '@stokelp/styled-system/recipes'\n\ntype ChatTextInputProps = TextareaProps & {\n minRows?: number\n maxRows?: number\n onSend?: (message: string) => void\n}\n\nconst StyledTextarea = styled(Textarea, chatTextInput)\n\nexport const ChatTextInput: React.FC<ChatTextInputProps> = ({\n minRows = 1,\n maxRows = 6,\n onSend,\n onChange,\n ...props\n}) => {\n const textareaRef = useRef<HTMLTextAreaElement | null>(null)\n const [value, setValue] = useState('')\n\n const resize = () => {\n const el = textareaRef.current\n if (!el) return\n\n el.style.height = 'auto'\n\n const computed = window.getComputedStyle(el)\n const lineHeight = parseFloat(computed.lineHeight) || 20\n const paddingTop = parseFloat(computed.paddingTop)\n const paddingBottom = parseFloat(computed.paddingBottom)\n\n const minHeight = lineHeight * minRows + paddingTop + paddingBottom\n const maxHeightPx = lineHeight * maxRows + paddingTop + paddingBottom\n\n const scrollHeight = el.scrollHeight\n\n const newHeight = Math.min(scrollHeight, maxHeightPx)\n el.style.height = Math.max(newHeight, minHeight) + 'px'\n\n el.style.overflowY = scrollHeight > maxHeightPx ? 'auto' : 'hidden'\n el.style.scrollPaddingBottom = `${paddingBottom}px`\n }\n\n useEffect(() => {\n resize()\n const onResize = () => resize()\n window.addEventListener('resize', onResize)\n return () => window.removeEventListener('resize', onResize)\n }, [value])\n\n const handleKeyDown = (e: KeyboardEvent<HTMLTextAreaElement>) => {\n if (e.key === 'Enter' && !e.shiftKey) {\n e.preventDefault()\n const text = value.trim()\n if (!text) {\n setValue('')\n resize()\n return\n }\n onSend?.(text)\n setValue('')\n requestAnimationFrame(() => {\n if (textareaRef.current) textareaRef.current.style.height = 'auto'\n resize()\n })\n }\n }\n\n const handleChange = (e: ChangeEvent<HTMLTextAreaElement>) => {\n if (!props?.maxLength || e.target.value.length < props?.maxLength) {\n setValue(e.target.value)\n onChange?.(e)\n }\n }\n\n return (\n <StyledTextarea\n ref={textareaRef}\n value={value}\n onChange={handleChange}\n onKeyDown={handleKeyDown}\n rows={minRows}\n {...props}\n />\n )\n}\n"],"mappings":";;;;;;;AAWA,IAAMA,IAAiBC,EAAOC,GAAUC,CAAa,GAExCC,KAA+C,EAC1D,aAAU,GACV,aAAU,GACV,WACA,aACA,GAAGC,QACC;CACJ,IAAMC,IAAcC,EAAmC,IAAI,GACrD,CAACC,GAAOC,KAAYC,EAAS,EAAE,GAE/BC,UAAe;EACnB,IAAMC,IAAKN,EAAY;EACvB,IAAI,CAACM,GAAI;EAET,EAAG,MAAM,SAAS;EAElB,IAAMC,IAAW,OAAO,iBAAiBD,CAAE,GACrCE,IAAa,WAAWD,EAAS,UAAU,KAAK,IAChDE,IAAa,WAAWF,EAAS,UAAU,GAC3CG,IAAgB,WAAWH,EAAS,aAAa,GAEjDI,IAAYH,IAAaI,IAAUH,IAAaC,GAChDG,IAAcL,IAAaM,IAAUL,IAAaC,GAElDK,IAAeT,EAAG,cAElBU,IAAY,KAAK,IAAID,GAAcF,CAAW;EAIpD,AAHA,EAAG,MAAM,SAAS,KAAK,IAAIG,GAAWL,CAAS,IAAI,MAEnD,EAAG,MAAM,YAAYI,IAAeF,IAAc,SAAS,UAC3D,EAAG,MAAM,sBAAsB,GAAGH,EAAc;CAClD;CAkCA,OAhCAO,QAAgB;EACd,EAAO;EACP,IAAMC,UAAiBb,EAAO;EAE9B,OADA,OAAO,iBAAiB,UAAUa,CAAQ,SAC7B,OAAO,oBAAoB,UAAUA,CAAQ;CAC5D,GAAG,CAAChB,CAAK,CAAC,GA4BR,kBAACR,GAAD;EACE,KAAKM;EACE;EACP,WAXkB,MAAwC;GAC5D,CAAI,CAACD,GAAO,aAAa,EAAE,OAAO,MAAM,SAASA,GAAO,eACtDI,EAAS,EAAE,OAAO,KAAK,GACvBgB,IAAW,CAAC;EAEhB;EAOI,YA9BmB,MAA0C;GAC/D,IAAI,EAAE,QAAQ,WAAW,CAAC,EAAE,UAAU;IACpC,EAAE,eAAe;IACjB,IAAMC,IAAOlB,EAAM,KAAK;IACxB,IAAI,CAACkB,GAAM;KAET,AADAjB,EAAS,EAAE,GACXE,EAAO;KACP;IACF;IAGA,AAFAgB,IAASD,CAAI,GACbjB,EAAS,EAAE,GACX,4BAA4B;KAE1B,AADIH,EAAY,YAAS,EAAY,QAAQ,MAAM,SAAS,SAC5DK,EAAO;IACT,CAAC;GACH;EACF;EAeI,MAAMO;EACN,GAAIb;CACL,CAAA;AAEL"}
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.cjs","names":[],"sources":["../../../src/components/checkbox/Checkbox.tsx"],"sourcesContent":["import {\n Checkbox as ArkCheckbox,\n type CheckboxRootProps,\n type CheckboxGroupProps as ArkCheckboxGroupProps,\n} from '@ark-ui/react'\nimport { FC, forwardRef, type ReactNode } from 'react'\nimport { css, cx } from '@stokelp/styled-system/css'\nimport { splitCssProps, styled } from '@stokelp/styled-system/jsx'\nimport { checkbox, checkboxGroup, type CheckboxVariantProps } from '@stokelp/styled-system/recipes'\nimport type { Assign, JsxStyleProps } from '@stokelp/styled-system/types'\nimport { CheckIcon, MinusIcon } from '~/shared/assets/icons'\n\ntype StyledCheckboxRootProps = Assign<JsxStyleProps, CheckboxRootProps>\n\nexport interface CheckboxProps extends Omit<StyledCheckboxRootProps, 'value'>, CheckboxVariantProps {\n value?: string | number\n children?: ReactNode\n}\n\nexport const Checkbox = forwardRef<HTMLLabelElement, CheckboxProps>((props, ref) => {\n const [variantProps, checkboxProps] = checkbox.splitVariantProps(props)\n const [cssProps, localProps] = splitCssProps(checkboxProps)\n const { children, className, ...rootProps } = localProps\n const styles = checkbox(variantProps)\n\n return (\n <ArkCheckbox.Root\n ref={ref}\n className={cx(styles.root, css(cssProps), className)}\n {...rootProps}\n value={rootProps.value as string | undefined}\n >\n <ArkCheckbox.Control className={styles.control}>\n <ArkCheckbox.Indicator>\n <CheckIcon />\n </ArkCheckbox.Indicator>\n <ArkCheckbox.Indicator indeterminate>\n <MinusIcon />\n </ArkCheckbox.Indicator>\n </ArkCheckbox.Control>\n {children && <ArkCheckbox.Label className={styles.label}>{children}</ArkCheckbox.Label>}\n <ArkCheckbox.HiddenInput />\n </ArkCheckbox.Root>\n )\n})\n\nexport type CheckboxGroupProps = Omit<\n Assign<JsxStyleProps, ArkCheckboxGroupProps>,\n 'value' | 'defaultValue' | 'onValueChange'\n> & {\n onValueChange?: (value: string[] | number[]) => void\n value?: string[] | number[]\n defaultValue?: string[] | number[]\n}\n\nexport const CheckboxGroup = styled(ArkCheckbox.Group, checkboxGroup) as FC<CheckboxGroupProps>\n\nCheckbox.displayName = 'Checkbox'\nCheckboxGroup.displayName = 'CheckboxGroup'\n"],"mappings":"2QAmBA,IAAa,GAAA,EAAA,EAAA,aAAwD,EAAO,IAAQ,CAClF,GAAM,CAAC,EAAc,GAAiB,EAAA,SAAS,kBAAkB,CAAK,EAChE,CAAC,EAAU,IAAA,EAAA,EAAA,eAA4B,CAAa,EACpD,CAAE,WAAU,YAAW,GAAG,GAAc,EACxC,GAAA,EAAA,EAAA,UAAkB,CAAY,EAEpC,OACE,EAAA,EAAA,MAAC,EAAA,SAAY,KAAb,CACO,MACL,WAAA,EAAA,EAAA,IAAc,EAAO,MAAA,EAAA,EAAA,KAAU,CAAQ,EAAG,CAAS,EACnD,GAAI,EACJ,MAAO,EAAU,eAJnB,EAME,EAAA,EAAA,MAAC,EAAA,SAAY,QAAb,CAAqB,UAAW,EAAO,iBAAvC,EACE,EAAA,EAAA,KAAC,EAAA,SAAY,UAAb,CAAA,UACE,EAAA,EAAA,KAAC,EAAA,UAAD,CAAY,CAAA,CACS,CAAA,GACvB,EAAA,EAAA,KAAC,EAAA,SAAY,UAAb,CAAuB,cAAA,aACrB,EAAA,EAAA,KAAC,EAAA,UAAD,CAAY,CAAA,CACS,CAAA,CACJ,IACpB,IAAY,EAAA,EAAA,KAAC,EAAA,SAAY,MAAb,CAAmB,UAAW,EAAO,MAAQ,UAA4B,CAAA,GACtF,EAAA,EAAA,KAAC,EAAA,SAAY,YAAb,CAA0B,CAAA,CACV,GAEtB,CAAC,EAWY,GAAA,EAAA,EAAA,QAAuB,EAAA,SAAY,MAAO,EAAA,aAAa,EAEpE,EAAS,YAAc,WACvB,EAAc,YAAc"}
1
+ {"version":3,"file":"Checkbox.cjs","names":["forwardRef","checkbox","splitCssProps","ArkCheckbox","cx","css","CheckIcon","MinusIcon","styled","checkboxGroup","require_icons","_ark_ui_react","_stokelp_styled_system_jsx","_stokelp_styled_system_recipes","react","react_jsx_runtime","_stokelp_styled_system_css","Checkbox","variantProps","checkboxProps","props","cssProps","localProps","rootProps","styles","className","children","CheckboxGroup"],"sources":["../../../src/components/checkbox/Checkbox.tsx"],"sourcesContent":["import {\n Checkbox as ArkCheckbox,\n type CheckboxRootProps,\n type CheckboxGroupProps as ArkCheckboxGroupProps,\n} from '@ark-ui/react'\nimport { FC, forwardRef, type ReactNode } from 'react'\nimport { css, cx } from '@stokelp/styled-system/css'\nimport { splitCssProps, styled } from '@stokelp/styled-system/jsx'\nimport { checkbox, checkboxGroup, type CheckboxVariantProps } from '@stokelp/styled-system/recipes'\nimport type { Assign, JsxStyleProps } from '@stokelp/styled-system/types'\nimport { CheckIcon, MinusIcon } from '~/shared/assets/icons'\n\ntype StyledCheckboxRootProps = Assign<JsxStyleProps, CheckboxRootProps>\n\nexport interface CheckboxProps extends Omit<StyledCheckboxRootProps, 'value'>, CheckboxVariantProps {\n value?: string | number\n children?: ReactNode\n}\n\nexport const Checkbox = forwardRef<HTMLLabelElement, CheckboxProps>((props, ref) => {\n const [variantProps, checkboxProps] = checkbox.splitVariantProps(props)\n const [cssProps, localProps] = splitCssProps(checkboxProps)\n const { children, className, ...rootProps } = localProps\n const styles = checkbox(variantProps)\n\n return (\n <ArkCheckbox.Root\n ref={ref}\n className={cx(styles.root, css(cssProps), className)}\n {...rootProps}\n value={rootProps.value as string | undefined}\n >\n <ArkCheckbox.Control className={styles.control}>\n <ArkCheckbox.Indicator>\n <CheckIcon />\n </ArkCheckbox.Indicator>\n <ArkCheckbox.Indicator indeterminate>\n <MinusIcon />\n </ArkCheckbox.Indicator>\n </ArkCheckbox.Control>\n {children && <ArkCheckbox.Label className={styles.label}>{children}</ArkCheckbox.Label>}\n <ArkCheckbox.HiddenInput />\n </ArkCheckbox.Root>\n )\n})\n\nexport type CheckboxGroupProps = Omit<\n Assign<JsxStyleProps, ArkCheckboxGroupProps>,\n 'value' | 'defaultValue' | 'onValueChange'\n> & {\n onValueChange?: (value: string[] | number[]) => void\n value?: string[] | number[]\n defaultValue?: string[] | number[]\n}\n\nexport const CheckboxGroup = styled(ArkCheckbox.Group, checkboxGroup) as FC<CheckboxGroupProps>\n\nCheckbox.displayName = 'Checkbox'\nCheckboxGroup.displayName = 'CheckboxGroup'\n"],"mappings":"A,2QAmBA,IAAaiB,GAAA,EAAWjB,EAAAA,WAAAA,EAA6C,EAAO,IAAQ,CAClF,GAAM,CAACkB,EAAcC,GAAiBlB,EAAAA,SAAS,kBAAkBmB,CAAK,EAChE,CAACC,EAAUC,IAAA,EAAcpB,EAAAA,cAAAA,CAAciB,CAAa,EACpD,CAAE,WAAU,YAAW,GAAGI,GAAcD,EACxCE,GAAA,EAASvB,EAAAA,SAAAA,CAASiB,CAAY,EAEpC,OACE,EAAAH,EAAA,KAAA,CAACZ,EAAAA,SAAY,KAAb,CACO,MACL,WAAA,EAAWC,EAAAA,GAAAA,CAAGoB,EAAO,MAAA,EAAMnB,EAAAA,IAAAA,CAAIgB,CAAQ,EAAGI,CAAS,EACnD,GAAIF,EACJ,MAAOA,EAAU,MAJnB,SAAA,EAME,EAAAR,EAAA,KAAA,CAACZ,EAAAA,SAAY,QAAb,CAAqB,UAAWqB,EAAO,QAAvC,SAAA,EACE,EAAAT,EAAA,IAAA,CAACZ,EAAAA,SAAY,UAAb,CAAA,UACE,EAAAY,EAAA,IAAA,CAACT,EAAAA,UAAD,CAAY,CAAA,CACS,CAAA,GACvB,EAAAS,EAAA,IAAA,CAACZ,EAAAA,SAAY,UAAb,CAAuB,cAAA,GACrB,UAAA,EAAAY,EAAA,IAAA,CAACR,EAAAA,UAAD,CAAY,CAAA,CACS,CAAA,CACJ,C,GACpBmB,IAAY,EAAAX,EAAA,IAAA,CAACZ,EAAAA,SAAY,MAAb,CAAmB,UAAWqB,EAAO,MAAQ,UAA4B,CAAA,GACtF,EAAAT,EAAA,IAAA,CAACZ,EAAAA,SAAY,YAAb,CAA0B,CAAA,CACV,C,EAEtB,CAAC,EAWYwB,GAAA,EAAgBnB,EAAAA,OAAAA,CAAOL,EAAAA,SAAY,MAAOM,EAAAA,aAAa,EAEpE,EAAS,YAAc,WACvB,EAAc,YAAc,gB"}
@@ -6,7 +6,7 @@ import { checkbox as a, checkboxGroup as o } from "@stokelp/styled-system/recipe
6
6
  import { forwardRef as s } from "react";
7
7
  import { jsx as c, jsxs as l } from "react/jsx-runtime";
8
8
  import { css as u, cx as d } from "@stokelp/styled-system/css";
9
- //#region src/components/checkbox/Checkbox.tsx
9
+ // src/components/checkbox/Checkbox.tsx
10
10
  var f = s((i, o) => {
11
11
  let [s, f] = a.splitVariantProps(i), [p, m] = r(f), { children: h, className: g, ..._ } = m, v = a(s);
12
12
  return /* @__PURE__ */ l(n.Root, {
@@ -31,7 +31,6 @@ var f = s((i, o) => {
31
31
  });
32
32
  }), p = i(n.Group, o);
33
33
  f.displayName = "Checkbox", p.displayName = "CheckboxGroup";
34
- //#endregion
35
34
  export { f as Checkbox, p as CheckboxGroup };
36
35
 
37
36
  //# sourceMappingURL=Checkbox.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.js","names":[],"sources":["../../../src/components/checkbox/Checkbox.tsx"],"sourcesContent":["import {\n Checkbox as ArkCheckbox,\n type CheckboxRootProps,\n type CheckboxGroupProps as ArkCheckboxGroupProps,\n} from '@ark-ui/react'\nimport { FC, forwardRef, type ReactNode } from 'react'\nimport { css, cx } from '@stokelp/styled-system/css'\nimport { splitCssProps, styled } from '@stokelp/styled-system/jsx'\nimport { checkbox, checkboxGroup, type CheckboxVariantProps } from '@stokelp/styled-system/recipes'\nimport type { Assign, JsxStyleProps } from '@stokelp/styled-system/types'\nimport { CheckIcon, MinusIcon } from '~/shared/assets/icons'\n\ntype StyledCheckboxRootProps = Assign<JsxStyleProps, CheckboxRootProps>\n\nexport interface CheckboxProps extends Omit<StyledCheckboxRootProps, 'value'>, CheckboxVariantProps {\n value?: string | number\n children?: ReactNode\n}\n\nexport const Checkbox = forwardRef<HTMLLabelElement, CheckboxProps>((props, ref) => {\n const [variantProps, checkboxProps] = checkbox.splitVariantProps(props)\n const [cssProps, localProps] = splitCssProps(checkboxProps)\n const { children, className, ...rootProps } = localProps\n const styles = checkbox(variantProps)\n\n return (\n <ArkCheckbox.Root\n ref={ref}\n className={cx(styles.root, css(cssProps), className)}\n {...rootProps}\n value={rootProps.value as string | undefined}\n >\n <ArkCheckbox.Control className={styles.control}>\n <ArkCheckbox.Indicator>\n <CheckIcon />\n </ArkCheckbox.Indicator>\n <ArkCheckbox.Indicator indeterminate>\n <MinusIcon />\n </ArkCheckbox.Indicator>\n </ArkCheckbox.Control>\n {children && <ArkCheckbox.Label className={styles.label}>{children}</ArkCheckbox.Label>}\n <ArkCheckbox.HiddenInput />\n </ArkCheckbox.Root>\n )\n})\n\nexport type CheckboxGroupProps = Omit<\n Assign<JsxStyleProps, ArkCheckboxGroupProps>,\n 'value' | 'defaultValue' | 'onValueChange'\n> & {\n onValueChange?: (value: string[] | number[]) => void\n value?: string[] | number[]\n defaultValue?: string[] | number[]\n}\n\nexport const CheckboxGroup = styled(ArkCheckbox.Group, checkboxGroup) as FC<CheckboxGroupProps>\n\nCheckbox.displayName = 'Checkbox'\nCheckboxGroup.displayName = 'CheckboxGroup'\n"],"mappings":";;;;;;;;;AAmBA,IAAa,IAAW,GAA6C,GAAO,MAAQ;CAClF,IAAM,CAAC,GAAc,KAAiB,EAAS,kBAAkB,CAAK,GAChE,CAAC,GAAU,KAAc,EAAc,CAAa,GACpD,EAAE,aAAU,cAAW,GAAG,MAAc,GACxC,IAAS,EAAS,CAAY;CAEpC,OACE,kBAAC,EAAY,MAAb;EACO;EACL,WAAW,EAAG,EAAO,MAAM,EAAI,CAAQ,GAAG,CAAS;EACnD,GAAI;EACJ,OAAO,EAAU;YAJnB;GAME,kBAAC,EAAY,SAAb;IAAqB,WAAW,EAAO;cAAvC,CACE,kBAAC,EAAY,WAAb,EAAA,UACE,kBAAC,GAAD,CAAY,CAAA,EACS,CAAA,GACvB,kBAAC,EAAY,WAAb;KAAuB,eAAA;eACrB,kBAAC,GAAD,CAAY,CAAA;IACS,CAAA,CACJ;;GACpB,KAAY,kBAAC,EAAY,OAAb;IAAmB,WAAW,EAAO;IAAQ;GAA4B,CAAA;GACtF,kBAAC,EAAY,aAAb,CAA0B,CAAA;EACV;;AAEtB,CAAC,GAWY,IAAgB,EAAO,EAAY,OAAO,CAAa;AAEpE,EAAS,cAAc,YACvB,EAAc,cAAc"}
1
+ {"version":3,"file":"Checkbox.js","names":["Checkbox","ArkCheckbox","Checkbox$1","forwardRef","variantProps","checkboxProps","checkbox","props","cssProps","localProps","splitCssProps","rootProps","styles","Checkbox","cx","css","className","CheckIcon","MinusIcon","children","CheckboxGroup","styled","checkboxGroup"],"sources":["../../../src/components/checkbox/Checkbox.tsx"],"sourcesContent":["import {\n Checkbox as ArkCheckbox,\n type CheckboxRootProps,\n type CheckboxGroupProps as ArkCheckboxGroupProps,\n} from '@ark-ui/react'\nimport { FC, forwardRef, type ReactNode } from 'react'\nimport { css, cx } from '@stokelp/styled-system/css'\nimport { splitCssProps, styled } from '@stokelp/styled-system/jsx'\nimport { checkbox, checkboxGroup, type CheckboxVariantProps } from '@stokelp/styled-system/recipes'\nimport type { Assign, JsxStyleProps } from '@stokelp/styled-system/types'\nimport { CheckIcon, MinusIcon } from '~/shared/assets/icons'\n\ntype StyledCheckboxRootProps = Assign<JsxStyleProps, CheckboxRootProps>\n\nexport interface CheckboxProps extends Omit<StyledCheckboxRootProps, 'value'>, CheckboxVariantProps {\n value?: string | number\n children?: ReactNode\n}\n\nexport const Checkbox = forwardRef<HTMLLabelElement, CheckboxProps>((props, ref) => {\n const [variantProps, checkboxProps] = checkbox.splitVariantProps(props)\n const [cssProps, localProps] = splitCssProps(checkboxProps)\n const { children, className, ...rootProps } = localProps\n const styles = checkbox(variantProps)\n\n return (\n <ArkCheckbox.Root\n ref={ref}\n className={cx(styles.root, css(cssProps), className)}\n {...rootProps}\n value={rootProps.value as string | undefined}\n >\n <ArkCheckbox.Control className={styles.control}>\n <ArkCheckbox.Indicator>\n <CheckIcon />\n </ArkCheckbox.Indicator>\n <ArkCheckbox.Indicator indeterminate>\n <MinusIcon />\n </ArkCheckbox.Indicator>\n </ArkCheckbox.Control>\n {children && <ArkCheckbox.Label className={styles.label}>{children}</ArkCheckbox.Label>}\n <ArkCheckbox.HiddenInput />\n </ArkCheckbox.Root>\n )\n})\n\nexport type CheckboxGroupProps = Omit<\n Assign<JsxStyleProps, ArkCheckboxGroupProps>,\n 'value' | 'defaultValue' | 'onValueChange'\n> & {\n onValueChange?: (value: string[] | number[]) => void\n value?: string[] | number[]\n defaultValue?: string[] | number[]\n}\n\nexport const CheckboxGroup = styled(ArkCheckbox.Group, checkboxGroup) as FC<CheckboxGroupProps>\n\nCheckbox.displayName = 'Checkbox'\nCheckboxGroup.displayName = 'CheckboxGroup'\n"],"mappings":";;;;;;;;;AAmBA,IAAaA,IAAWG,GAA6C,GAAO,MAAQ;CAClF,IAAM,CAACC,GAAcC,KAAiBC,EAAS,kBAAkBC,CAAK,GAChE,CAACC,GAAUC,KAAcC,EAAcL,CAAa,GACpD,EAAE,aAAU,cAAW,GAAGM,MAAcF,GACxCG,IAASN,EAASF,CAAY;CAEpC,OACE,kBAACH,EAAY,MAAb;EACO;EACL,WAAWa,EAAGF,EAAO,MAAMG,EAAIP,CAAQ,GAAGQ,CAAS;EACnD,GAAIL;EACJ,OAAOA,EAAU;EAJnB,UAAA;GAME,kBAACV,EAAY,SAAb;IAAqB,WAAWW,EAAO;IAAvC,UAAA,CACE,kBAACX,EAAY,WAAb,EAAA,UACE,kBAACgB,GAAD,CAAY,CAAA,EACS,CAAA,GACvB,kBAAChB,EAAY,WAAb;KAAuB,eAAA;KACrB,UAAA,kBAACiB,GAAD,CAAY,CAAA;IACS,CAAA,CACJ;;GACpBC,KAAY,kBAAClB,EAAY,OAAb;IAAmB,WAAWW,EAAO;IAAQ;GAA4B,CAAA;GACtF,kBAACX,EAAY,aAAb,CAA0B,CAAA;EACV;;AAEtB,CAAC,GAWYmB,IAAgBC,EAAOpB,EAAY,OAAOqB,CAAa;AAEpE,EAAS,cAAc,YACvB,EAAc,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"CheckboxCard.cjs","names":[],"sources":["../../../src/components/checkbox-card/CheckboxCard.tsx"],"sourcesContent":["import { ark, Checkbox as ArkCheckbox, type CheckboxRootProps } from '@ark-ui/react'\nimport { css, cx } from '@stokelp/styled-system/css'\nimport { splitCssProps, styled } from '@stokelp/styled-system/jsx'\nimport { checkboxCard, type CheckboxCardVariantProps } from '@stokelp/styled-system/recipes'\nimport type { Assign, JsxStyleProps, StyledComponent } from '@stokelp/styled-system/types'\nimport { ComponentProps, forwardRef, type JSX } from 'react'\nimport { createStyleContext } from '~/utils/slots'\nimport { type CheckboxProps } from '~/components/checkbox'\nimport { CheckIcon, MinusIcon } from '~/shared/assets/icons'\n\ntype StyledCheckboxRootProps = Assign<JsxStyleProps, CheckboxRootProps>\n\nexport interface CheckboxCardProps extends Omit<StyledCheckboxRootProps, 'value'>, CheckboxCardVariantProps {\n value?: string | number\n}\n\nconst { withProvider, withContext } = createStyleContext(checkboxCard, {\n dataAttr: true,\n})\n\n// See Table.tsx for why we pin the literal tag.\nconst styledTag = <T extends keyof JSX.IntrinsicElements>(tag: T): StyledComponent<T, {}> =>\n styled(tag) as StyledComponent<T, {}>\n\nconst CheckboxCardRoot = withProvider(styled(ArkCheckbox.Root))\n\nexport const CheckboxCardTitle = withContext(styled(ArkCheckbox.Label), 'title')\nexport const CheckboxCardContent = withContext(styledTag('div'), 'content')\nexport const CheckboxCardDescription = withContext(styledTag('p'), 'description')\nexport const CheckboxCardImage = withContext(styled(ark.img), 'image')\n\nexport type CheckboxCardTitleProps = ComponentProps<typeof CheckboxCardTitle>\nexport type CheckboxCardContentProps = ComponentProps<typeof CheckboxCardContent>\nexport type CheckboxCardDescriptionProps = ComponentProps<typeof CheckboxCardDescription>\nexport type CheckboxCardImageProps = ComponentProps<typeof CheckboxCardImage>\n\nexport const CheckboxCard = forwardRef<HTMLLabelElement, CheckboxProps>((props, ref) => {\n const [variantProps, checkboxProps] = checkboxCard.splitVariantProps(props)\n const [cssProps, localProps] = splitCssProps(checkboxProps)\n const { children, className, ...rootProps } = localProps\n const styles = checkboxCard(variantProps)\n\n return (\n <CheckboxCardRoot\n ref={ref}\n className={cx(styles.root, css(cssProps), className)}\n {...rootProps}\n value={rootProps.value as string | undefined}\n >\n <ArkCheckbox.Control className={styles.control}>\n <ArkCheckbox.Indicator>\n <CheckIcon />\n </ArkCheckbox.Indicator>\n <ArkCheckbox.Indicator indeterminate>\n <MinusIcon />\n </ArkCheckbox.Indicator>\n </ArkCheckbox.Control>\n {children}\n <ArkCheckbox.HiddenInput />\n </CheckboxCardRoot>\n )\n})\n\nCheckboxCard.displayName = 'CheckboxCard'\n"],"mappings":"8SAgBA,GAAM,CAAE,eAAc,eAAgB,EAAA,mBAAmB,EAAA,aAAc,CACrE,SAAU,EACZ,CAAC,EAGK,EAAoD,IAAA,EAAA,EAAA,QACjD,CAAG,EAEN,EAAmB,GAAA,EAAA,EAAA,QAAoB,EAAA,SAAY,IAAI,CAAC,EAEjD,EAAoB,GAAA,EAAA,EAAA,QAAmB,EAAA,SAAY,KAAK,EAAG,OAAO,EAClE,EAAsB,EAAY,EAAU,KAAK,EAAG,SAAS,EAC7D,EAA0B,EAAY,EAAU,GAAG,EAAG,aAAa,EACnE,EAAoB,GAAA,EAAA,EAAA,QAAmB,EAAA,IAAI,GAAG,EAAG,OAAO,EAOxD,GAAA,EAAA,EAAA,aAA4D,EAAO,IAAQ,CACtF,GAAM,CAAC,EAAc,GAAiB,EAAA,aAAa,kBAAkB,CAAK,EACpE,CAAC,EAAU,IAAA,EAAA,EAAA,eAA4B,CAAa,EACpD,CAAE,WAAU,YAAW,GAAG,GAAc,EACxC,GAAA,EAAA,EAAA,cAAsB,CAAY,EAExC,OACE,EAAA,EAAA,MAAC,EAAD,CACO,MACL,WAAA,EAAA,EAAA,IAAc,EAAO,MAAA,EAAA,EAAA,KAAU,CAAQ,EAAG,CAAS,EACnD,GAAI,EACJ,MAAO,EAAU,eAJnB,EAME,EAAA,EAAA,MAAC,EAAA,SAAY,QAAb,CAAqB,UAAW,EAAO,iBAAvC,EACE,EAAA,EAAA,KAAC,EAAA,SAAY,UAAb,CAAA,UACE,EAAA,EAAA,KAAC,EAAA,UAAD,CAAY,CAAA,CACS,CAAA,GACvB,EAAA,EAAA,KAAC,EAAA,SAAY,UAAb,CAAuB,cAAA,aACrB,EAAA,EAAA,KAAC,EAAA,UAAD,CAAY,CAAA,CACS,CAAA,CACJ,IACpB,GACD,EAAA,EAAA,KAAC,EAAA,SAAY,YAAb,CAA0B,CAAA,CACV,GAEtB,CAAC,EAED,EAAa,YAAc"}
1
+ {"version":3,"file":"CheckboxCard.cjs","names":["createStyleContext","checkboxCard","styled","ArkCheckbox","ark","forwardRef","splitCssProps","cx","css","CheckIcon","MinusIcon","require_slots","require_icons","_ark_ui_react","_stokelp_styled_system_jsx","_stokelp_styled_system_recipes","react","react_jsx_runtime","_stokelp_styled_system_css","styledTag","tag","CheckboxCardRoot","withProvider","CheckboxCardTitle","withContext","CheckboxCardContent","CheckboxCardDescription","CheckboxCardImage","CheckboxCard","variantProps","checkboxProps","props","cssProps","localProps","rootProps","styles","className","children"],"sources":["../../../src/components/checkbox-card/CheckboxCard.tsx"],"sourcesContent":["import { ark, Checkbox as ArkCheckbox, type CheckboxRootProps } from '@ark-ui/react'\nimport { css, cx } from '@stokelp/styled-system/css'\nimport { splitCssProps, styled } from '@stokelp/styled-system/jsx'\nimport { checkboxCard, type CheckboxCardVariantProps } from '@stokelp/styled-system/recipes'\nimport type { Assign, JsxStyleProps, StyledComponent } from '@stokelp/styled-system/types'\nimport { ComponentProps, forwardRef, type JSX } from 'react'\nimport { createStyleContext } from '~/utils/slots'\nimport { type CheckboxProps } from '~/components/checkbox'\nimport { CheckIcon, MinusIcon } from '~/shared/assets/icons'\n\ntype StyledCheckboxRootProps = Assign<JsxStyleProps, CheckboxRootProps>\n\nexport interface CheckboxCardProps extends Omit<StyledCheckboxRootProps, 'value'>, CheckboxCardVariantProps {\n value?: string | number\n}\n\nconst { withProvider, withContext } = createStyleContext(checkboxCard, {\n dataAttr: true,\n})\n\n// See Table.tsx for why we pin the literal tag.\nconst styledTag = <T extends keyof JSX.IntrinsicElements>(tag: T): StyledComponent<T, {}> =>\n styled(tag) as StyledComponent<T, {}>\n\nconst CheckboxCardRoot = withProvider(styled(ArkCheckbox.Root))\n\nexport const CheckboxCardTitle = withContext(styled(ArkCheckbox.Label), 'title')\nexport const CheckboxCardContent = withContext(styledTag('div'), 'content')\nexport const CheckboxCardDescription = withContext(styledTag('p'), 'description')\nexport const CheckboxCardImage = withContext(styled(ark.img), 'image')\n\nexport type CheckboxCardTitleProps = ComponentProps<typeof CheckboxCardTitle>\nexport type CheckboxCardContentProps = ComponentProps<typeof CheckboxCardContent>\nexport type CheckboxCardDescriptionProps = ComponentProps<typeof CheckboxCardDescription>\nexport type CheckboxCardImageProps = ComponentProps<typeof CheckboxCardImage>\n\nexport const CheckboxCard = forwardRef<HTMLLabelElement, CheckboxProps>((props, ref) => {\n const [variantProps, checkboxProps] = checkboxCard.splitVariantProps(props)\n const [cssProps, localProps] = splitCssProps(checkboxProps)\n const { children, className, ...rootProps } = localProps\n const styles = checkboxCard(variantProps)\n\n return (\n <CheckboxCardRoot\n ref={ref}\n className={cx(styles.root, css(cssProps), className)}\n {...rootProps}\n value={rootProps.value as string | undefined}\n >\n <ArkCheckbox.Control className={styles.control}>\n <ArkCheckbox.Indicator>\n <CheckIcon />\n </ArkCheckbox.Indicator>\n <ArkCheckbox.Indicator indeterminate>\n <MinusIcon />\n </ArkCheckbox.Indicator>\n </ArkCheckbox.Control>\n {children}\n <ArkCheckbox.HiddenInput />\n </CheckboxCardRoot>\n )\n})\n\nCheckboxCard.displayName = 'CheckboxCard'\n"],"mappings":"A,8SAgBA,GAAM,CAAE,eAAc,eAAgBA,EAAAA,mBAAmBC,EAAAA,aAAc,CACrE,SAAU,EACZ,CAAC,EAGKkB,EAAoD,IAAA,EACxDjB,EAAAA,OAAAA,CAAOkB,CAAG,EAENC,EAAmBC,GAAA,EAAapB,EAAAA,OAAAA,CAAOC,EAAAA,SAAY,IAAI,CAAC,EAEjDoB,EAAoBC,GAAA,EAAYtB,EAAAA,OAAAA,CAAOC,EAAAA,SAAY,KAAK,EAAG,OAAO,EAClEsB,EAAsBD,EAAYL,EAAU,KAAK,EAAG,SAAS,EAC7DO,EAA0BF,EAAYL,EAAU,GAAG,EAAG,aAAa,EACnEQ,EAAoBH,GAAA,EAAYtB,EAAAA,OAAAA,CAAOE,EAAAA,IAAI,GAAG,EAAG,OAAO,EAOxDwB,GAAA,EAAevB,EAAAA,WAAAA,EAA6C,EAAO,IAAQ,CACtF,GAAM,CAACwB,EAAcC,GAAiB7B,EAAAA,aAAa,kBAAkB8B,CAAK,EACpE,CAACC,EAAUC,IAAA,EAAc3B,EAAAA,cAAAA,CAAcwB,CAAa,EACpD,CAAE,WAAU,YAAW,GAAGI,GAAcD,EACxCE,GAAA,EAASlC,EAAAA,aAAAA,CAAa4B,CAAY,EAExC,OACE,EAAAZ,EAAA,KAAA,CAACI,EAAD,CACO,MACL,WAAA,EAAWd,EAAAA,GAAAA,CAAG4B,EAAO,MAAA,EAAM3B,EAAAA,IAAAA,CAAIwB,CAAQ,EAAGI,CAAS,EACnD,GAAIF,EACJ,MAAOA,EAAU,MAJnB,SAAA,EAME,EAAAjB,EAAA,KAAA,CAACd,EAAAA,SAAY,QAAb,CAAqB,UAAWgC,EAAO,QAAvC,SAAA,EACE,EAAAlB,EAAA,IAAA,CAACd,EAAAA,SAAY,UAAb,CAAA,UACE,EAAAc,EAAA,IAAA,CAACR,EAAAA,UAAD,CAAY,CAAA,CACS,CAAA,GACvB,EAAAQ,EAAA,IAAA,CAACd,EAAAA,SAAY,UAAb,CAAuB,cAAA,GACrB,UAAA,EAAAc,EAAA,IAAA,CAACP,EAAAA,UAAD,CAAY,CAAA,CACS,CAAA,CACJ,C,GACpB2B,GACD,EAAApB,EAAA,IAAA,CAACd,EAAAA,SAAY,YAAb,CAA0B,CAAA,CACV,C,EAEtB,CAAC,EAED,EAAa,YAAc,e"}
@@ -7,7 +7,7 @@ import { checkboxCard as s } from "@stokelp/styled-system/recipes";
7
7
  import { forwardRef as c } from "react";
8
8
  import { jsx as l, jsxs as u } from "react/jsx-runtime";
9
9
  import { css as d, cx as f } from "@stokelp/styled-system/css";
10
- //#region src/components/checkbox-card/CheckboxCard.tsx
10
+ // src/components/checkbox-card/CheckboxCard.tsx
11
11
  var { withProvider: p, withContext: m } = e(s, { dataAttr: !0 }), h = (e) => o(e), g = p(o(r.Root)), _ = m(o(r.Label), "title"), v = m(h("div"), "content"), y = m(h("p"), "description"), b = m(o(i.img), "image"), x = c((e, i) => {
12
12
  let [o, c] = s.splitVariantProps(e), [p, m] = a(c), { children: h, className: _, ...v } = m, y = s(o);
13
13
  return /* @__PURE__ */ u(g, {
@@ -29,7 +29,6 @@ var { withProvider: p, withContext: m } = e(s, { dataAttr: !0 }), h = (e) => o(e
29
29
  });
30
30
  });
31
31
  x.displayName = "CheckboxCard";
32
- //#endregion
33
32
  export { x as CheckboxCard, v as CheckboxCardContent, y as CheckboxCardDescription, b as CheckboxCardImage, _ as CheckboxCardTitle };
34
33
 
35
34
  //# sourceMappingURL=CheckboxCard.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CheckboxCard.js","names":[],"sources":["../../../src/components/checkbox-card/CheckboxCard.tsx"],"sourcesContent":["import { ark, Checkbox as ArkCheckbox, type CheckboxRootProps } from '@ark-ui/react'\nimport { css, cx } from '@stokelp/styled-system/css'\nimport { splitCssProps, styled } from '@stokelp/styled-system/jsx'\nimport { checkboxCard, type CheckboxCardVariantProps } from '@stokelp/styled-system/recipes'\nimport type { Assign, JsxStyleProps, StyledComponent } from '@stokelp/styled-system/types'\nimport { ComponentProps, forwardRef, type JSX } from 'react'\nimport { createStyleContext } from '~/utils/slots'\nimport { type CheckboxProps } from '~/components/checkbox'\nimport { CheckIcon, MinusIcon } from '~/shared/assets/icons'\n\ntype StyledCheckboxRootProps = Assign<JsxStyleProps, CheckboxRootProps>\n\nexport interface CheckboxCardProps extends Omit<StyledCheckboxRootProps, 'value'>, CheckboxCardVariantProps {\n value?: string | number\n}\n\nconst { withProvider, withContext } = createStyleContext(checkboxCard, {\n dataAttr: true,\n})\n\n// See Table.tsx for why we pin the literal tag.\nconst styledTag = <T extends keyof JSX.IntrinsicElements>(tag: T): StyledComponent<T, {}> =>\n styled(tag) as StyledComponent<T, {}>\n\nconst CheckboxCardRoot = withProvider(styled(ArkCheckbox.Root))\n\nexport const CheckboxCardTitle = withContext(styled(ArkCheckbox.Label), 'title')\nexport const CheckboxCardContent = withContext(styledTag('div'), 'content')\nexport const CheckboxCardDescription = withContext(styledTag('p'), 'description')\nexport const CheckboxCardImage = withContext(styled(ark.img), 'image')\n\nexport type CheckboxCardTitleProps = ComponentProps<typeof CheckboxCardTitle>\nexport type CheckboxCardContentProps = ComponentProps<typeof CheckboxCardContent>\nexport type CheckboxCardDescriptionProps = ComponentProps<typeof CheckboxCardDescription>\nexport type CheckboxCardImageProps = ComponentProps<typeof CheckboxCardImage>\n\nexport const CheckboxCard = forwardRef<HTMLLabelElement, CheckboxProps>((props, ref) => {\n const [variantProps, checkboxProps] = checkboxCard.splitVariantProps(props)\n const [cssProps, localProps] = splitCssProps(checkboxProps)\n const { children, className, ...rootProps } = localProps\n const styles = checkboxCard(variantProps)\n\n return (\n <CheckboxCardRoot\n ref={ref}\n className={cx(styles.root, css(cssProps), className)}\n {...rootProps}\n value={rootProps.value as string | undefined}\n >\n <ArkCheckbox.Control className={styles.control}>\n <ArkCheckbox.Indicator>\n <CheckIcon />\n </ArkCheckbox.Indicator>\n <ArkCheckbox.Indicator indeterminate>\n <MinusIcon />\n </ArkCheckbox.Indicator>\n </ArkCheckbox.Control>\n {children}\n <ArkCheckbox.HiddenInput />\n </CheckboxCardRoot>\n )\n})\n\nCheckboxCard.displayName = 'CheckboxCard'\n"],"mappings":";;;;;;;;;;AAgBA,IAAM,EAAE,iBAAc,mBAAgB,EAAmB,GAAc,EACrE,UAAU,GACZ,CAAC,GAGK,KAAoD,MACxD,EAAO,CAAG,GAEN,IAAmB,EAAa,EAAO,EAAY,IAAI,CAAC,GAEjD,IAAoB,EAAY,EAAO,EAAY,KAAK,GAAG,OAAO,GAClE,IAAsB,EAAY,EAAU,KAAK,GAAG,SAAS,GAC7D,IAA0B,EAAY,EAAU,GAAG,GAAG,aAAa,GACnE,IAAoB,EAAY,EAAO,EAAI,GAAG,GAAG,OAAO,GAOxD,IAAe,GAA6C,GAAO,MAAQ;CACtF,IAAM,CAAC,GAAc,KAAiB,EAAa,kBAAkB,CAAK,GACpE,CAAC,GAAU,KAAc,EAAc,CAAa,GACpD,EAAE,aAAU,cAAW,GAAG,MAAc,GACxC,IAAS,EAAa,CAAY;CAExC,OACE,kBAAC,GAAD;EACO;EACL,WAAW,EAAG,EAAO,MAAM,EAAI,CAAQ,GAAG,CAAS;EACnD,GAAI;EACJ,OAAO,EAAU;YAJnB;GAME,kBAAC,EAAY,SAAb;IAAqB,WAAW,EAAO;cAAvC,CACE,kBAAC,EAAY,WAAb,EAAA,UACE,kBAAC,GAAD,CAAY,CAAA,EACS,CAAA,GACvB,kBAAC,EAAY,WAAb;KAAuB,eAAA;eACrB,kBAAC,GAAD,CAAY,CAAA;IACS,CAAA,CACJ;;GACpB;GACD,kBAAC,EAAY,aAAb,CAA0B,CAAA;EACV;;AAEtB,CAAC;AAED,EAAa,cAAc"}
1
+ {"version":3,"file":"CheckboxCard.js","names":["ArkCheckbox","createStyleContext","checkboxCard","styledTag","styled","tag","CheckboxCardRoot","withProvider","Checkbox","CheckboxCardTitle","withContext","CheckboxCardContent","CheckboxCardDescription","CheckboxCardImage","ark","CheckboxCard","forwardRef","variantProps","checkboxProps","props","cssProps","localProps","splitCssProps","rootProps","styles","cx","css","className","CheckIcon","MinusIcon","children"],"sources":["../../../src/components/checkbox-card/CheckboxCard.tsx"],"sourcesContent":["import { ark, Checkbox as ArkCheckbox, type CheckboxRootProps } from '@ark-ui/react'\nimport { css, cx } from '@stokelp/styled-system/css'\nimport { splitCssProps, styled } from '@stokelp/styled-system/jsx'\nimport { checkboxCard, type CheckboxCardVariantProps } from '@stokelp/styled-system/recipes'\nimport type { Assign, JsxStyleProps, StyledComponent } from '@stokelp/styled-system/types'\nimport { ComponentProps, forwardRef, type JSX } from 'react'\nimport { createStyleContext } from '~/utils/slots'\nimport { type CheckboxProps } from '~/components/checkbox'\nimport { CheckIcon, MinusIcon } from '~/shared/assets/icons'\n\ntype StyledCheckboxRootProps = Assign<JsxStyleProps, CheckboxRootProps>\n\nexport interface CheckboxCardProps extends Omit<StyledCheckboxRootProps, 'value'>, CheckboxCardVariantProps {\n value?: string | number\n}\n\nconst { withProvider, withContext } = createStyleContext(checkboxCard, {\n dataAttr: true,\n})\n\n// See Table.tsx for why we pin the literal tag.\nconst styledTag = <T extends keyof JSX.IntrinsicElements>(tag: T): StyledComponent<T, {}> =>\n styled(tag) as StyledComponent<T, {}>\n\nconst CheckboxCardRoot = withProvider(styled(ArkCheckbox.Root))\n\nexport const CheckboxCardTitle = withContext(styled(ArkCheckbox.Label), 'title')\nexport const CheckboxCardContent = withContext(styledTag('div'), 'content')\nexport const CheckboxCardDescription = withContext(styledTag('p'), 'description')\nexport const CheckboxCardImage = withContext(styled(ark.img), 'image')\n\nexport type CheckboxCardTitleProps = ComponentProps<typeof CheckboxCardTitle>\nexport type CheckboxCardContentProps = ComponentProps<typeof CheckboxCardContent>\nexport type CheckboxCardDescriptionProps = ComponentProps<typeof CheckboxCardDescription>\nexport type CheckboxCardImageProps = ComponentProps<typeof CheckboxCardImage>\n\nexport const CheckboxCard = forwardRef<HTMLLabelElement, CheckboxProps>((props, ref) => {\n const [variantProps, checkboxProps] = checkboxCard.splitVariantProps(props)\n const [cssProps, localProps] = splitCssProps(checkboxProps)\n const { children, className, ...rootProps } = localProps\n const styles = checkboxCard(variantProps)\n\n return (\n <CheckboxCardRoot\n ref={ref}\n className={cx(styles.root, css(cssProps), className)}\n {...rootProps}\n value={rootProps.value as string | undefined}\n >\n <ArkCheckbox.Control className={styles.control}>\n <ArkCheckbox.Indicator>\n <CheckIcon />\n </ArkCheckbox.Indicator>\n <ArkCheckbox.Indicator indeterminate>\n <MinusIcon />\n </ArkCheckbox.Indicator>\n </ArkCheckbox.Control>\n {children}\n <ArkCheckbox.HiddenInput />\n </CheckboxCardRoot>\n )\n})\n\nCheckboxCard.displayName = 'CheckboxCard'\n"],"mappings":";;;;;;;;;;AAgBA,IAAM,EAAE,iBAAc,mBAAgBC,EAAmBC,GAAc,EACrE,UAAU,GACZ,CAAC,GAGKC,KAAoD,MACxDC,EAAOC,CAAG,GAENC,IAAmBC,EAAaH,EAAOJ,EAAY,IAAI,CAAC,GAEjDS,IAAoBC,EAAYN,EAAOJ,EAAY,KAAK,GAAG,OAAO,GAClEW,IAAsBD,EAAYP,EAAU,KAAK,GAAG,SAAS,GAC7DS,IAA0BF,EAAYP,EAAU,GAAG,GAAG,aAAa,GACnEU,IAAoBH,EAAYN,EAAOU,EAAI,GAAG,GAAG,OAAO,GAOxDC,IAAeC,GAA6C,GAAO,MAAQ;CACtF,IAAM,CAACC,GAAcC,KAAiBhB,EAAa,kBAAkBiB,CAAK,GACpE,CAACC,GAAUC,KAAcC,EAAcJ,CAAa,GACpD,EAAE,aAAU,cAAW,GAAGK,MAAcF,GACxCG,IAAStB,EAAae,CAAY;CAExC,OACE,kBAACX,GAAD;EACO;EACL,WAAWmB,EAAGD,EAAO,MAAME,EAAIN,CAAQ,GAAGO,CAAS;EACnD,GAAIJ;EACJ,OAAOA,EAAU;EAJnB,UAAA;GAME,kBAACvB,EAAY,SAAb;IAAqB,WAAWwB,EAAO;IAAvC,UAAA,CACE,kBAACxB,EAAY,WAAb,EAAA,UACE,kBAAC4B,GAAD,CAAY,CAAA,EACS,CAAA,GACvB,kBAAC5B,EAAY,WAAb;KAAuB,eAAA;KACrB,UAAA,kBAAC6B,GAAD,CAAY,CAAA;IACS,CAAA,CACJ;;GACpBC;GACD,kBAAC9B,EAAY,aAAb,CAA0B,CAAA;EACV;;AAEtB,CAAC;AAED,EAAa,cAAc"}
@@ -1,2 +1,2 @@
1
- "use client";const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("./CheckboxCard.cjs");var n=e.__exportAll({Content:()=>t.CheckboxCardContent,Description:()=>t.CheckboxCardDescription,Image:()=>t.CheckboxCardImage,Root:()=>t.CheckboxCard,Title:()=>t.CheckboxCardTitle});Object.defineProperty(exports,"namespace_exports",{enumerable:!0,get:function(){return n}});
1
+ "use client";const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("./CheckboxCard.cjs");var n=e.__exportAll({Content:()=>t.CheckboxCardContent,Description:()=>t.CheckboxCardDescription,Image:()=>t.CheckboxCardImage,Root:()=>t.CheckboxCard,Title:()=>t.CheckboxCardTitle});exports.Content=t.CheckboxCardContent,exports.Description=t.CheckboxCardDescription,exports.Image=t.CheckboxCardImage,exports.Root=t.CheckboxCard,exports.Title=t.CheckboxCardTitle,Object.defineProperty(exports,"namespace_exports",{enumerable:!0,get:function(){return n}});
2
2
  //# sourceMappingURL=namespace.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"namespace.cjs","names":[],"sources":["../../../src/components/checkbox-card/namespace.ts"],"sourcesContent":["export {\n CheckboxCard as Root,\n CheckboxCardContent as Content,\n CheckboxCardTitle as Title,\n CheckboxCardDescription as Description,\n CheckboxCardImage as Image,\n} from './CheckboxCard'\n\nexport type {\n CheckboxCardProps as RootProps,\n CheckboxCardContentProps as ContentProps,\n CheckboxCardTitleProps as TitleProps,\n CheckboxCardDescriptionProps as DescriptionProps,\n CheckboxCardImageProps as ImageProps,\n} from './CheckboxCard'\n"],"mappings":""}
1
+ {"version":3,"file":"namespace.cjs","names":["require_runtime","require_CheckboxCard","namespace_exports"],"sources":["../../../src/components/checkbox-card/namespace.ts"],"sourcesContent":["export {\n CheckboxCard as Root,\n CheckboxCardContent as Content,\n CheckboxCardTitle as Title,\n CheckboxCardDescription as Description,\n CheckboxCardImage as Image,\n} from './CheckboxCard'\n\nexport type {\n CheckboxCardProps as RootProps,\n CheckboxCardContentProps as ContentProps,\n CheckboxCardTitleProps as TitleProps,\n CheckboxCardDescriptionProps as DescriptionProps,\n CheckboxCardImageProps as ImageProps,\n} from './CheckboxCard'\n"],"mappings":""}
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { __exportAll as e } from "../../_virtual/_rolldown/runtime.js";
3
3
  import { CheckboxCard as t, CheckboxCardContent as n, CheckboxCardDescription as r, CheckboxCardImage as i, CheckboxCardTitle as a } from "./CheckboxCard.js";
4
- //#region src/components/checkbox-card/namespace.ts
4
+ // src/components/checkbox-card/namespace.ts
5
5
  var o = /* @__PURE__ */ e({
6
6
  Content: () => n,
7
7
  Description: () => r,
@@ -9,7 +9,6 @@ var o = /* @__PURE__ */ e({
9
9
  Root: () => t,
10
10
  Title: () => a
11
11
  });
12
- //#endregion
13
- export { o as namespace_exports };
12
+ export { n as Content, r as Description, i as Image, t as Root, a as Title, o as namespace_exports };
14
13
 
15
14
  //# sourceMappingURL=namespace.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"namespace.js","names":[],"sources":["../../../src/components/checkbox-card/namespace.ts"],"sourcesContent":["export {\n CheckboxCard as Root,\n CheckboxCardContent as Content,\n CheckboxCardTitle as Title,\n CheckboxCardDescription as Description,\n CheckboxCardImage as Image,\n} from './CheckboxCard'\n\nexport type {\n CheckboxCardProps as RootProps,\n CheckboxCardContentProps as ContentProps,\n CheckboxCardTitleProps as TitleProps,\n CheckboxCardDescriptionProps as DescriptionProps,\n CheckboxCardImageProps as ImageProps,\n} from './CheckboxCard'\n"],"mappings":""}
1
+ {"version":3,"file":"namespace.js","names":["namespace_exports","CheckboxCardContent","CheckboxCardDescription","CheckboxCardImage","CheckboxCard","CheckboxCardTitle"],"sources":["../../../src/components/checkbox-card/namespace.ts"],"sourcesContent":["export {\n CheckboxCard as Root,\n CheckboxCardContent as Content,\n CheckboxCardTitle as Title,\n CheckboxCardDescription as Description,\n CheckboxCardImage as Image,\n} from './CheckboxCard'\n\nexport type {\n CheckboxCardProps as RootProps,\n CheckboxCardContentProps as ContentProps,\n CheckboxCardTitleProps as TitleProps,\n CheckboxCardDescriptionProps as DescriptionProps,\n CheckboxCardImageProps as ImageProps,\n} from './CheckboxCard'\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"Chip.cjs","names":[],"sources":["../../../src/components/chip/Chip.tsx"],"sourcesContent":["import { ark } from '@ark-ui/react'\nimport { styled } from '@stokelp/styled-system/jsx'\nimport { chip } from '@stokelp/styled-system/recipes'\nimport { createStyleContext } from '~/utils/slots'\nimport { type ComponentProps } from 'react'\n\nconst { withProvider, withContext } = createStyleContext(chip)\n\nexport const Chip = withProvider(styled(ark.span), 'root')\nexport const ChipAvatar = withContext(styled('img'), 'avatar')\nexport const ChipLabel = withContext(styled(ark.span), 'body')\nexport const ChipClearTrigger = withContext(styled(ark.button), 'clearTrigger', {\n defaultProps: {\n type: 'button',\n children: (\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M11.0833 3.73917L10.2608 2.91667L6.99996 6.17751L3.73913 2.91667L2.91663 3.73917L6.17746 7L2.91663 10.2608L3.73913 11.0833L6.99996 7.8225L10.2608 11.0833L11.0833 10.2608L7.82246 7L11.0833 3.73917Z\"\n fill=\"currentColor\"\n />\n </svg>\n ),\n },\n})\n\nexport interface ChipProps extends ComponentProps<typeof Chip> {}\nexport interface ChipAvatarProps extends ComponentProps<typeof ChipAvatar> {}\nexport interface ChipLabelProps extends ComponentProps<typeof ChipLabel> {}\nexport interface ChipClearTriggerProps extends ComponentProps<typeof ChipClearTrigger> {}\n"],"mappings":"wMAMA,GAAM,CAAE,eAAc,eAAgB,EAAA,mBAAmB,EAAA,IAAI,EAEhD,EAAO,GAAA,EAAA,EAAA,QAAoB,EAAA,IAAI,IAAI,EAAG,MAAM,EAC5C,EAAa,GAAA,EAAA,EAAA,QAAmB,KAAK,EAAG,QAAQ,EAChD,EAAY,GAAA,EAAA,EAAA,QAAmB,EAAA,IAAI,IAAI,EAAG,MAAM,EAChD,EAAmB,GAAA,EAAA,EAAA,QAAmB,EAAA,IAAI,MAAM,EAAG,eAAgB,CAC9E,aAAc,CACZ,KAAM,SACN,UACE,EAAA,EAAA,KAAC,MAAD,CAAK,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OAAO,MAAM,uCAChE,EAAA,EAAA,KAAC,OAAD,CACE,EAAE,uMACF,KAAK,cACN,CAAA,CACE,CAAA,CAET,CACF,CAAC"}
1
+ {"version":3,"file":"Chip.cjs","names":["createStyleContext","chip","styled","ark","require_slots","_ark_ui_react","_stokelp_styled_system_jsx","_stokelp_styled_system_recipes","react_jsx_runtime","Chip","withProvider","ChipAvatar","withContext","ChipLabel","ChipClearTrigger"],"sources":["../../../src/components/chip/Chip.tsx"],"sourcesContent":["import { ark } from '@ark-ui/react'\nimport { styled } from '@stokelp/styled-system/jsx'\nimport { chip } from '@stokelp/styled-system/recipes'\nimport { createStyleContext } from '~/utils/slots'\nimport { type ComponentProps } from 'react'\n\nconst { withProvider, withContext } = createStyleContext(chip)\n\nexport const Chip = withProvider(styled(ark.span), 'root')\nexport const ChipAvatar = withContext(styled('img'), 'avatar')\nexport const ChipLabel = withContext(styled(ark.span), 'body')\nexport const ChipClearTrigger = withContext(styled(ark.button), 'clearTrigger', {\n defaultProps: {\n type: 'button',\n children: (\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M11.0833 3.73917L10.2608 2.91667L6.99996 6.17751L3.73913 2.91667L2.91663 3.73917L6.17746 7L2.91663 10.2608L3.73913 11.0833L6.99996 7.8225L10.2608 11.0833L11.0833 10.2608L7.82246 7L11.0833 3.73917Z\"\n fill=\"currentColor\"\n />\n </svg>\n ),\n },\n})\n\nexport interface ChipProps extends ComponentProps<typeof Chip> {}\nexport interface ChipAvatarProps extends ComponentProps<typeof ChipAvatar> {}\nexport interface ChipLabelProps extends ComponentProps<typeof ChipLabel> {}\nexport interface ChipClearTriggerProps extends ComponentProps<typeof ChipClearTrigger> {}\n"],"mappings":"A,wMAMA,GAAM,CAAE,eAAc,eAAgBA,EAAAA,mBAAmBC,EAAAA,IAAI,EAEhDQ,EAAOC,GAAA,EAAaR,EAAAA,OAAAA,CAAOC,EAAAA,IAAI,IAAI,EAAG,MAAM,EAC5CQ,EAAaC,GAAA,EAAYV,EAAAA,OAAAA,CAAO,KAAK,EAAG,QAAQ,EAChDW,EAAYD,GAAA,EAAYV,EAAAA,OAAAA,CAAOC,EAAAA,IAAI,IAAI,EAAG,MAAM,EAChDW,EAAmBF,GAAA,EAAYV,EAAAA,OAAAA,CAAOC,EAAAA,IAAI,MAAM,EAAG,eAAgB,CAC9E,aAAc,CACZ,KAAM,SACN,UACE,EAAAK,EAAA,IAAA,CAAC,MAAD,CAAK,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OAAO,MAAM,6BAChE,UAAA,EAAAA,EAAA,IAAA,CAAC,OAAD,CACE,EAAE,uMACF,KAAK,cACN,CAAA,CACE,CAAA,CAET,CACF,CAAC,E"}
@@ -1,6 +1,6 @@
1
1
  import { ComponentProps, ForwardRefExoticComponent, ClassAttributes, HTMLAttributes, ButtonHTMLAttributes } from 'react';
2
2
  import { ComponentVariants } from '../../utils/slots';
3
- import { StyledComponent } from '@stokelp/styled-system/types';
3
+ import { StyledComponent } from '@stokelp/styled-system/jsx';
4
4
  import { PolymorphicProps } from '@ark-ui/react';
5
5
  import { ChipRecipe } from '@stokelp/styled-system/recipes';
6
6
  export declare const Chip: ComponentVariants<StyledComponent<ForwardRefExoticComponent< ClassAttributes<HTMLSpanElement> & HTMLAttributes<HTMLSpanElement> & PolymorphicProps>, {}>, ChipRecipe>;
@@ -4,7 +4,7 @@ import { ark as t } from "@ark-ui/react";
4
4
  import { styled as n } from "@stokelp/styled-system/jsx";
5
5
  import { chip as r } from "@stokelp/styled-system/recipes";
6
6
  import { jsx as i } from "react/jsx-runtime";
7
- //#region src/components/chip/Chip.tsx
7
+ // src/components/chip/Chip.tsx
8
8
  var { withProvider: a, withContext: o } = e(r), s = a(n(t.span), "root"), c = o(n("img"), "avatar"), l = o(n(t.span), "body"), u = o(n(t.button), "clearTrigger", { defaultProps: {
9
9
  type: "button",
10
10
  children: /* @__PURE__ */ i("svg", {
@@ -19,7 +19,6 @@ var { withProvider: a, withContext: o } = e(r), s = a(n(t.span), "root"), c = o(
19
19
  })
20
20
  })
21
21
  } });
22
- //#endregion
23
22
  export { s as Chip, c as ChipAvatar, u as ChipClearTrigger, l as ChipLabel };
24
23
 
25
24
  //# sourceMappingURL=Chip.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Chip.js","names":[],"sources":["../../../src/components/chip/Chip.tsx"],"sourcesContent":["import { ark } from '@ark-ui/react'\nimport { styled } from '@stokelp/styled-system/jsx'\nimport { chip } from '@stokelp/styled-system/recipes'\nimport { createStyleContext } from '~/utils/slots'\nimport { type ComponentProps } from 'react'\n\nconst { withProvider, withContext } = createStyleContext(chip)\n\nexport const Chip = withProvider(styled(ark.span), 'root')\nexport const ChipAvatar = withContext(styled('img'), 'avatar')\nexport const ChipLabel = withContext(styled(ark.span), 'body')\nexport const ChipClearTrigger = withContext(styled(ark.button), 'clearTrigger', {\n defaultProps: {\n type: 'button',\n children: (\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M11.0833 3.73917L10.2608 2.91667L6.99996 6.17751L3.73913 2.91667L2.91663 3.73917L6.17746 7L2.91663 10.2608L3.73913 11.0833L6.99996 7.8225L10.2608 11.0833L11.0833 10.2608L7.82246 7L11.0833 3.73917Z\"\n fill=\"currentColor\"\n />\n </svg>\n ),\n },\n})\n\nexport interface ChipProps extends ComponentProps<typeof Chip> {}\nexport interface ChipAvatarProps extends ComponentProps<typeof ChipAvatar> {}\nexport interface ChipLabelProps extends ComponentProps<typeof ChipLabel> {}\nexport interface ChipClearTriggerProps extends ComponentProps<typeof ChipClearTrigger> {}\n"],"mappings":";;;;;;;AAMA,IAAM,EAAE,iBAAc,mBAAgB,EAAmB,CAAI,GAEhD,IAAO,EAAa,EAAO,EAAI,IAAI,GAAG,MAAM,GAC5C,IAAa,EAAY,EAAO,KAAK,GAAG,QAAQ,GAChD,IAAY,EAAY,EAAO,EAAI,IAAI,GAAG,MAAM,GAChD,IAAmB,EAAY,EAAO,EAAI,MAAM,GAAG,gBAAgB,EAC9E,cAAc;CACZ,MAAM;CACN,UACE,kBAAC,OAAD;EAAK,OAAM;EAAK,QAAO;EAAK,SAAQ;EAAY,MAAK;EAAO,OAAM;YAChE,kBAAC,QAAD;GACE,GAAE;GACF,MAAK;EACN,CAAA;CACE,CAAA;AAET,EACF,CAAC"}
1
+ {"version":3,"file":"Chip.js","names":["createStyleContext","chip","Chip","withProvider","styled","ark","ChipAvatar","withContext","ChipLabel","ChipClearTrigger"],"sources":["../../../src/components/chip/Chip.tsx"],"sourcesContent":["import { ark } from '@ark-ui/react'\nimport { styled } from '@stokelp/styled-system/jsx'\nimport { chip } from '@stokelp/styled-system/recipes'\nimport { createStyleContext } from '~/utils/slots'\nimport { type ComponentProps } from 'react'\n\nconst { withProvider, withContext } = createStyleContext(chip)\n\nexport const Chip = withProvider(styled(ark.span), 'root')\nexport const ChipAvatar = withContext(styled('img'), 'avatar')\nexport const ChipLabel = withContext(styled(ark.span), 'body')\nexport const ChipClearTrigger = withContext(styled(ark.button), 'clearTrigger', {\n defaultProps: {\n type: 'button',\n children: (\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M11.0833 3.73917L10.2608 2.91667L6.99996 6.17751L3.73913 2.91667L2.91663 3.73917L6.17746 7L2.91663 10.2608L3.73913 11.0833L6.99996 7.8225L10.2608 11.0833L11.0833 10.2608L7.82246 7L11.0833 3.73917Z\"\n fill=\"currentColor\"\n />\n </svg>\n ),\n },\n})\n\nexport interface ChipProps extends ComponentProps<typeof Chip> {}\nexport interface ChipAvatarProps extends ComponentProps<typeof ChipAvatar> {}\nexport interface ChipLabelProps extends ComponentProps<typeof ChipLabel> {}\nexport interface ChipClearTriggerProps extends ComponentProps<typeof ChipClearTrigger> {}\n"],"mappings":";;;;;;;AAMA,IAAM,EAAE,iBAAc,mBAAgBA,EAAmBC,CAAI,GAEhDC,IAAOC,EAAaC,EAAOC,EAAI,IAAI,GAAG,MAAM,GAC5CC,IAAaC,EAAYH,EAAO,KAAK,GAAG,QAAQ,GAChDI,IAAYD,EAAYH,EAAOC,EAAI,IAAI,GAAG,MAAM,GAChDI,IAAmBF,EAAYH,EAAOC,EAAI,MAAM,GAAG,gBAAgB,EAC9E,cAAc;CACZ,MAAM;CACN,UACE,kBAAC,OAAD;EAAK,OAAM;EAAK,QAAO;EAAK,SAAQ;EAAY,MAAK;EAAO,OAAM;EAChE,UAAA,kBAAC,QAAD;GACE,GAAE;GACF,MAAK;EACN,CAAA;CACE,CAAA;AAET,EACF,CAAC"}
@@ -1,2 +1,2 @@
1
- "use client";const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../utils/slots.cjs");let n=require("@ark-ui/react"),r=require("@stokelp/styled-system/jsx"),i=require("@stokelp/styled-system/recipes");var a=e.__exportAll({Content:()=>l,Root:()=>c,Trigger:()=>u}),{withProvider:o,withContext:s}=t.createStyleContext(i.collapsible),c=o((0,r.styled)(n.Collapsible.Root),`root`),l=s((0,r.styled)(n.Collapsible.Content),`content`),u=s((0,r.styled)(n.Collapsible.Trigger),`trigger`);Object.defineProperty(exports,"styled_exports",{enumerable:!0,get:function(){return a}});
1
+ "use client";const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../utils/slots.cjs");let n=require("@ark-ui/react"),r=require("@stokelp/styled-system/jsx"),i=require("@stokelp/styled-system/recipes");var a=e.__exportAll({Content:()=>l,Root:()=>c,Trigger:()=>u}),{withProvider:o,withContext:s}=t.createStyleContext(i.collapsible),c=o((0,r.styled)(n.Collapsible.Root),`root`),l=s((0,r.styled)(n.Collapsible.Content),`content`),u=s((0,r.styled)(n.Collapsible.Trigger),`trigger`);exports.Content=l,exports.Root=c,exports.Trigger=u,Object.defineProperty(exports,"styled_exports",{enumerable:!0,get:function(){return a}});
2
2
  //# sourceMappingURL=styled.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"styled.cjs","names":[],"sources":["../../../src/components/collapsible/styled.ts"],"sourcesContent":["import { Collapsible as ArkCollapsible } from '@ark-ui/react'\nimport { collapsible } from '@stokelp/styled-system/recipes'\nimport { styled } from '@stokelp/styled-system/jsx'\nimport { createStyleContext } from '~/utils/slots'\nimport { ComponentProps } from 'react'\n\nconst { withProvider, withContext } = createStyleContext(collapsible)\n\nexport const Root = withProvider(styled(ArkCollapsible.Root), 'root')\nexport const Content = withContext(styled(ArkCollapsible.Content), 'content')\nexport const Trigger = withContext(styled(ArkCollapsible.Trigger), 'trigger')\n\nexport interface CollapsibleProps extends ComponentProps<typeof Root> {}\nexport interface CollapsibleContentProps extends ComponentProps<typeof Content> {}\nexport interface CollapsibleTriggerProps extends ComponentProps<typeof Trigger> {}\n"],"mappings":"yRAMM,CAAE,eAAc,eAAgB,EAAA,mBAAmB,EAAA,WAAW,EAEvD,EAAO,GAAA,EAAA,EAAA,QAAoB,EAAA,YAAe,IAAI,EAAG,MAAM,EACvD,EAAU,GAAA,EAAA,EAAA,QAAmB,EAAA,YAAe,OAAO,EAAG,SAAS,EAC/D,EAAU,GAAA,EAAA,EAAA,QAAmB,EAAA,YAAe,OAAO,EAAG,SAAS"}
1
+ {"version":3,"file":"styled.cjs","names":["createStyleContext","collapsible","styled","ArkCollapsible","require_runtime","require_slots","_ark_ui_react","_stokelp_styled_system_jsx","_stokelp_styled_system_recipes","styled_exports","Content","Root","Trigger","withProvider","withContext"],"sources":["../../../src/components/collapsible/styled.ts"],"sourcesContent":["import { Collapsible as ArkCollapsible } from '@ark-ui/react'\nimport { collapsible } from '@stokelp/styled-system/recipes'\nimport { styled } from '@stokelp/styled-system/jsx'\nimport { createStyleContext } from '~/utils/slots'\nimport { ComponentProps } from 'react'\n\nconst { withProvider, withContext } = createStyleContext(collapsible)\n\nexport const Root = withProvider(styled(ArkCollapsible.Root), 'root')\nexport const Content = withContext(styled(ArkCollapsible.Content), 'content')\nexport const Trigger = withContext(styled(ArkCollapsible.Trigger), 'trigger')\n\nexport interface CollapsibleProps extends ComponentProps<typeof Root> {}\nexport interface CollapsibleContentProps extends ComponentProps<typeof Content> {}\nexport interface CollapsibleTriggerProps extends ComponentProps<typeof Trigger> {}\n"],"mappings":"A,yRAMM,CAAE,eAAc,eAAgBA,EAAAA,mBAAmBC,EAAAA,WAAW,EAEvDU,EAAOE,GAAA,EAAaX,EAAAA,OAAAA,CAAOC,EAAAA,YAAe,IAAI,EAAG,MAAM,EACvDO,EAAUI,GAAA,EAAYZ,EAAAA,OAAAA,CAAOC,EAAAA,YAAe,OAAO,EAAG,SAAS,EAC/DS,EAAUE,GAAA,EAAYZ,EAAAA,OAAAA,CAAOC,EAAAA,YAAe,OAAO,EAAG,SAAS,E"}
@@ -1,7 +1,7 @@
1
1
  import { Collapsible as ArkCollapsible } from '@ark-ui/react';
2
2
  import { ComponentProps, ForwardRefExoticComponent, RefAttributes } from 'react';
3
3
  import { ComponentVariants } from '../../utils/slots';
4
- import { StyledComponent } from '@stokelp/styled-system/types';
4
+ import { StyledComponent } from '@stokelp/styled-system/jsx';
5
5
  import { CollapsibleRecipe } from '@stokelp/styled-system/recipes';
6
6
  export declare const Root: ComponentVariants<StyledComponent<ForwardRefExoticComponent<ArkCollapsible.RootProps & RefAttributes<HTMLDivElement>>, {}>, CollapsibleRecipe>;
7
7
  export declare const Content: StyledComponent<ForwardRefExoticComponent<ArkCollapsible.ContentProps & RefAttributes<HTMLDivElement>>, {}>;
@@ -4,13 +4,12 @@ import { createStyleContext as t } from "../../utils/slots.js";
4
4
  import { Collapsible as n } from "@ark-ui/react";
5
5
  import { styled as r } from "@stokelp/styled-system/jsx";
6
6
  import { collapsible as i } from "@stokelp/styled-system/recipes";
7
- //#region src/components/collapsible/styled.ts
7
+ // src/components/collapsible/styled.ts
8
8
  var a = /* @__PURE__ */ e({
9
9
  Content: () => l,
10
10
  Root: () => c,
11
11
  Trigger: () => u
12
12
  }), { withProvider: o, withContext: s } = t(i), c = o(r(n.Root), "root"), l = s(r(n.Content), "content"), u = s(r(n.Trigger), "trigger");
13
- //#endregion
14
- export { a as styled_exports };
13
+ export { l as Content, c as Root, u as Trigger, a as styled_exports };
15
14
 
16
15
  //# sourceMappingURL=styled.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"styled.js","names":[],"sources":["../../../src/components/collapsible/styled.ts"],"sourcesContent":["import { Collapsible as ArkCollapsible } from '@ark-ui/react'\nimport { collapsible } from '@stokelp/styled-system/recipes'\nimport { styled } from '@stokelp/styled-system/jsx'\nimport { createStyleContext } from '~/utils/slots'\nimport { ComponentProps } from 'react'\n\nconst { withProvider, withContext } = createStyleContext(collapsible)\n\nexport const Root = withProvider(styled(ArkCollapsible.Root), 'root')\nexport const Content = withContext(styled(ArkCollapsible.Content), 'content')\nexport const Trigger = withContext(styled(ArkCollapsible.Trigger), 'trigger')\n\nexport interface CollapsibleProps extends ComponentProps<typeof Root> {}\nexport interface CollapsibleContentProps extends ComponentProps<typeof Content> {}\nexport interface CollapsibleTriggerProps extends ComponentProps<typeof Trigger> {}\n"],"mappings":";;;;;;;;;;;IAMM,EAAE,iBAAc,mBAAgB,EAAmB,CAAW,GAEvD,IAAO,EAAa,EAAO,EAAe,IAAI,GAAG,MAAM,GACvD,IAAU,EAAY,EAAO,EAAe,OAAO,GAAG,SAAS,GAC/D,IAAU,EAAY,EAAO,EAAe,OAAO,GAAG,SAAS"}
1
+ {"version":3,"file":"styled.js","names":["ArkCollapsible","styled_exports","Content","Root","Trigger","createStyleContext","collapsible","withProvider","styled","Collapsible","withContext"],"sources":["../../../src/components/collapsible/styled.ts"],"sourcesContent":["import { Collapsible as ArkCollapsible } from '@ark-ui/react'\nimport { collapsible } from '@stokelp/styled-system/recipes'\nimport { styled } from '@stokelp/styled-system/jsx'\nimport { createStyleContext } from '~/utils/slots'\nimport { ComponentProps } from 'react'\n\nconst { withProvider, withContext } = createStyleContext(collapsible)\n\nexport const Root = withProvider(styled(ArkCollapsible.Root), 'root')\nexport const Content = withContext(styled(ArkCollapsible.Content), 'content')\nexport const Trigger = withContext(styled(ArkCollapsible.Trigger), 'trigger')\n\nexport interface CollapsibleProps extends ComponentProps<typeof Root> {}\nexport interface CollapsibleContentProps extends ComponentProps<typeof Content> {}\nexport interface CollapsibleTriggerProps extends ComponentProps<typeof Trigger> {}\n"],"mappings":";;;;;;;;;;;A,IAMM,EAAE,iBAAc,mBAAgBK,EAAmBC,CAAW,GAEvDH,IAAOI,EAAaC,EAAOR,EAAe,IAAI,GAAG,MAAM,GACvDE,IAAUQ,EAAYF,EAAOR,EAAe,OAAO,GAAG,SAAS,GAC/DI,IAAUM,EAAYF,EAAOR,EAAe,OAAO,GAAG,SAAS"}
@@ -1,2 +1,2 @@
1
- "use client";const e=require("../../utils/slots.cjs"),t=require("../tooltip/Tooltip.cjs"),n=require("../text/Text.cjs"),r=require("../../shared/ConditionalWrapper.cjs"),i=require("../ui-labels/UiLabelsProvider.cjs"),a=require("../input/Input.cjs"),o=require("../chip/Chip.cjs");let s=require("@ark-ui/react"),c=require("@stokelp/styled-system/jsx"),l=require("@stokelp/styled-system/recipes"),u=require("react"),d=require("react/jsx-runtime"),f=require("@stokelp/styled-system/css"),p=require("react-window"),m=require("lodash");var{withProvider:h,withContext:g}=e.createStyleContext(l.combobox),_=h((0,c.styled)(s.Combobox.Root),`root`,{defaultProps:{loopFocus:!0}}),v=g((0,c.styled)(s.Combobox.ClearTrigger),`clearTrigger`),y=g((0,c.styled)(s.Combobox.Content),`content`),b=g((0,c.styled)(s.Combobox.Input),`input`),x=g((0,c.styled)(s.Combobox.Control),`control`),S=g((0,c.styled)(s.Combobox.Item),`item`),C=g((0,c.styled)(s.Combobox.ItemText),`itemText`),ee=g((0,c.styled)(s.Combobox.Positioner),`positioner`),w=g((0,c.styled)(s.Combobox.Trigger),`trigger`),T=()=>(0,d.jsxs)(`svg`,{width:`16`,height:`17`,viewBox:`0 0 16 17`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,d.jsx)(`rect`,{x:`0.5`,y:`1`,width:`15`,height:`15`,rx:`3.5`,fill:`white`}),(0,d.jsx)(`rect`,{x:`0.5`,y:`1`,width:`15`,height:`15`,rx:`3.5`,className:(0,f.css)({stroke:`grey.100`})})]}),E=()=>(0,d.jsxs)(`svg`,{width:`16`,height:`17`,viewBox:`0 0 16 17`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,d.jsx)(`rect`,{y:`0.5`,width:`16`,height:`16`,rx:`4`,className:(0,f.css)({fill:`primary.500`})}),(0,d.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M11.958 4.81298C12.1303 4.92787 12.1769 5.16069 12.062 5.33301L7.56202 12.083C7.4997 12.1765 7.39875 12.2371 7.28695 12.2482C7.17515 12.2592 7.06428 12.2196 6.98483 12.1402L3.98483 9.14017C3.83839 8.99372 3.83839 8.75628 3.98483 8.60984C4.13128 8.46339 4.36872 8.46339 4.51517 8.60984L7.19172 11.2864L11.438 4.91699C11.5529 4.74467 11.7857 4.6981 11.958 4.81298Z`,fill:`white`})]});function D({item:e,isMultiple:t,renderItem:n}){let r=(0,s.useComboboxItemContext)();return(0,d.jsxs)(d.Fragment,{children:[t?r.selected?(0,d.jsx)(E,{}):(0,d.jsx)(T,{}):null,n?n(e):(0,d.jsx)(C,{truncate:!0,children:e.label})]})}var O=({items:e=[],initialItems:c,debounceMs:l=0,placeholder:f,emptyLabel:h,loadingLabel:g,usePortal:C=!0,withAutoFilter:T=!0,positioning:E,loadItems:O,renderItem:k,renderValue:A,onResetInitialItems:j,isLoading:M,value:N,openDropdownOnFocus:P=!0,clearValueWhenEmpty:F=!0,virtualized:te,rowHeight:I=34,returnItemsOnEmpty:L,multiple:R=!1,...z})=>{let B=i.useUiLabels(),[V,H]=(0,u.useState)(()=>e),[U,W]=(0,u.useState)(!1),[G,K]=(0,u.useState)(!1),q=typeof O==`function`,J=(0,u.useMemo)(()=>O?(0,m.debounce)(async e=>{try{K(!0),W(!0),H(await O(e))}catch(e){console.error(e),H([])}finally{W(!1)}},l):null,[O,l]),Y=[...!q&&!T?e:V,...c??[]],X=(0,u.useCallback)(async t=>{c&&c.length>0&&!c.find(e=>e.label===t.inputValue)&&j?.();let{inputValue:n}=t;if(J)J(n);else{let t=T&&n!==``?e.filter(e=>e.label.toLowerCase().includes(n.toLowerCase())):e;if(t.length===0&&L)return H(e);H(t)}},[J,e,T]);(0,u.useEffect)(()=>{J||H(e)},[e,J]);let Z=(0,u.useMemo)(()=>(0,s.createListCollection)({items:Y}),[Y]),ne=M??U,Q=g??(0,d.jsx)(n.Text,{p:`space-8`,textAlign:`center`,children:B.loading}),$=h??(0,d.jsx)(n.Text,{p:`space-8`,textAlign:`center`,children:B.noResults});return(0,d.jsxs)(_,{lazyMount:!0,unmountOnExit:!0,collection:Z,positioning:{sameWidth:!0,gutter:0,...E},"data-recipe":`combobox`,onInputValueChange:X,value:N,...z,multiple:R,children:[R?(0,d.jsx)(s.Combobox.Context,{children:t=>(0,d.jsxs)(x,{"data-multiple":`true`,"data-open":t.open||void 0,children:[t.value.map(n=>{let r=e.find(e=>String(e.value)===String(n));return r?(0,d.jsxs)(o.Chip,{size:`sm`,children:[A?A(r):(0,d.jsx)(o.ChipLabel,{children:r.label}),!z.readOnly&&!z.disabled&&(0,d.jsx)(o.ChipClearTrigger,{"aria-label":`Retirer ${r.label}`,onClick:()=>t.setValue(t.value.filter(e=>String(e)!==String(n)))})]},n):null}),(0,d.jsx)(b,{asChild:!0,"data-multiple":`true`,placeholder:t.hasSelectedItems?void 0:f,onFocus:()=>{!P||q||t.setOpen(!0)},children:(0,d.jsx)(a.Input,{})}),(0,d.jsx)(w,{asChild:!0,hidden:q&&(!c||c.length===0),children:(0,d.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,d.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M12.5303 16.2803C12.2374 16.5732 11.7626 16.5732 11.4697 16.2803L3.96967 8.78033C3.67678 8.48744 3.67678 8.01256 3.96967 7.71967C4.26256 7.42678 4.73744 7.42678 5.03033 7.71967L12 14.6893L18.9697 7.71967C19.2626 7.42678 19.7374 7.42678 20.0303 7.71967C20.3232 8.01256 20.3232 8.48744 20.0303 8.78033L12.5303 16.2803Z`,fill:`currentColor`})})})]})}):(0,d.jsxs)(x,{children:[(0,d.jsx)(s.Combobox.Context,{children:e=>(0,d.jsx)(b,{asChild:!0,placeholder:f,onInput:t=>{let n=t.currentTarget.value;F&&n===``&&e.clearValue()},onFocus:()=>{!P||q||e.setOpen(!0)},children:(0,d.jsx)(a.Input,{})})}),(0,d.jsx)(w,{asChild:!0,hidden:q&&(!c||c.length===0),children:(0,d.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,d.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M12.5303 16.2803C12.2374 16.5732 11.7626 16.5732 11.4697 16.2803L3.96967 8.78033C3.67678 8.48744 3.67678 8.01256 3.96967 7.71967C4.26256 7.42678 4.73744 7.42678 5.03033 7.71967L12 14.6893L18.9697 7.71967C19.2626 7.42678 19.7374 7.42678 20.0303 7.71967C20.3232 8.01256 20.3232 8.48744 20.0303 8.78033L12.5303 16.2803Z`,fill:`currentColor`})})}),(0,d.jsx)(v,{disabled:z.readOnly,onClick:j,asChild:!0,children:(0,d.jsx)(`button`,{children:(0,d.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 20 20`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,d.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M10 3.125C6.20304 3.125 3.125 6.20304 3.125 10C3.125 13.797 6.20304 16.875 10 16.875C13.797 16.875 16.875 13.797 16.875 10C16.875 6.20304 13.797 3.125 10 3.125ZM1.875 10C1.875 5.51269 5.51269 1.875 10 1.875C14.4873 1.875 18.125 5.51269 18.125 10C18.125 14.4873 14.4873 18.125 10 18.125C5.51269 18.125 1.875 14.4873 1.875 10ZM7.68306 7.68306C7.92714 7.43898 8.32286 7.43898 8.56694 7.68306L10 9.11612L11.4331 7.68306C11.6771 7.43898 12.0729 7.43898 12.3169 7.68306C12.561 7.92714 12.561 8.32286 12.3169 8.56694L10.8839 10L12.3169 11.4331C12.561 11.6771 12.561 12.0729 12.3169 12.3169C12.0729 12.561 11.6771 12.561 11.4331 12.3169L10 10.8839L8.56694 12.3169C8.32286 12.561 7.92714 12.561 7.68306 12.3169C7.43898 12.0729 7.43898 11.6771 7.68306 11.4331L9.11612 10L7.68306 8.56694C7.43898 8.32286 7.43898 7.92714 7.68306 7.68306Z`,fill:`currentColor`})})})})]}),(0,d.jsx)(r.ConditionalWrapper,{when:C,wrapper:e=>(0,d.jsx)(s.Portal,{children:e}),children:(0,d.jsx)(ee,{children:(0,d.jsx)(y,{children:ne?Q:Y.length===0?(0,d.jsx)(d.Fragment,{children:q?G?$:Q:$}):te?(0,d.jsx)(d.Fragment,{children:(0,d.jsx)(p.FixedSizeList,{height:Math.min(I*Y.length,180),itemCount:Y.length,itemSize:I,width:`100%`,children:({index:e,style:n})=>(0,d.jsx)(r.ConditionalWrapper,{when:!!Y[e].tooltip,wrapper:n=>(0,d.jsx)(t.Tooltip,{label:Y[e].tooltip,children:n}),children:(0,d.jsx)(S,{item:Y[e],style:n,children:(0,d.jsx)(D,{renderItem:k,item:Y[e],isMultiple:R})},Y[e].value)},Y[e].value)})}):Y.map(e=>(0,d.jsx)(r.ConditionalWrapper,{when:!!e.tooltip,wrapper:n=>(0,d.jsx)(t.Tooltip,{label:e.tooltip,children:n}),children:(0,d.jsx)(S,{item:e,children:(0,d.jsx)(D,{renderItem:k,item:e,isMultiple:R})},e.value)},e.value))})})})]})};exports.Combobox=O;
1
+ "use client";const e=require("../../utils/slots.cjs"),t=require("../tooltip/Tooltip.cjs"),n=require("../text/Text.cjs"),r=require("../../shared/ConditionalWrapper.cjs"),i=require("../ui-labels/UiLabelsProvider.cjs"),a=require("../input/Input.cjs"),o=require("../chip/Chip.cjs");let s=require("@ark-ui/react"),c=require("@stokelp/styled-system/jsx"),l=require("@stokelp/styled-system/recipes"),u=require("react"),d=require("react/jsx-runtime"),f=require("@stokelp/styled-system/css"),p=require("react-window"),m=require("lodash");var{withProvider:h,withContext:g}=e.createStyleContext(l.combobox),_=h((0,c.styled)(s.Combobox.Root),`root`,{defaultProps:{loopFocus:!0}}),v=g((0,c.styled)(s.Combobox.ClearTrigger),`clearTrigger`),y=g((0,c.styled)(s.Combobox.Content),`content`),b=g((0,c.styled)(s.Combobox.Input),`input`),x=g((0,c.styled)(s.Combobox.Control),`control`),S=g((0,c.styled)(s.Combobox.Item),`item`),C=g((0,c.styled)(s.Combobox.ItemText),`itemText`),ee=g((0,c.styled)(s.Combobox.Positioner),`positioner`),w=g((0,c.styled)(s.Combobox.Trigger),`trigger`),T=()=>(0,d.jsxs)(`svg`,{width:`16`,height:`17`,viewBox:`0 0 16 17`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,d.jsx)(`rect`,{x:`0.5`,y:`1`,width:`15`,height:`15`,rx:`3.5`,fill:`white`}),(0,d.jsx)(`rect`,{x:`0.5`,y:`1`,width:`15`,height:`15`,rx:`3.5`,className:(0,f.css)({stroke:`grey.100`})})]}),E=()=>(0,d.jsxs)(`svg`,{width:`16`,height:`17`,viewBox:`0 0 16 17`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,d.jsx)(`rect`,{y:`0.5`,width:`16`,height:`16`,rx:`4`,className:(0,f.css)({fill:`primary.500`})}),(0,d.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M11.958 4.81298C12.1303 4.92787 12.1769 5.16069 12.062 5.33301L7.56202 12.083C7.4997 12.1765 7.39875 12.2371 7.28695 12.2482C7.17515 12.2592 7.06428 12.2196 6.98483 12.1402L3.98483 9.14017C3.83839 8.99372 3.83839 8.75628 3.98483 8.60984C4.13128 8.46339 4.36872 8.46339 4.51517 8.60984L7.19172 11.2864L11.438 4.91699C11.5529 4.74467 11.7857 4.6981 11.958 4.81298Z`,fill:`white`})]});function D({item:e,isMultiple:t,renderItem:n}){let r=(0,s.useComboboxItemContext)();return(0,d.jsxs)(d.Fragment,{children:[t?r.selected?(0,d.jsx)(E,{}):(0,d.jsx)(T,{}):null,n?n(e):(0,d.jsx)(C,{truncate:!0,children:e.label})]})}var O=({items:e=[],initialItems:c,debounceMs:l=0,placeholder:f,emptyLabel:h,loadingLabel:g,usePortal:C=!0,withAutoFilter:T=!0,positioning:E,loadItems:O,renderItem:k,renderValue:A,onResetInitialItems:j,isLoading:M,value:N,openDropdownOnFocus:P=!0,clearValueWhenEmpty:F=!0,virtualized:te,rowHeight:I=34,returnItemsOnEmpty:L,multiple:R=!1,...z})=>{let B=i.useUiLabels(),[V,H]=(0,u.useState)(()=>e),[U,W]=(0,u.useState)(!1),[G,K]=(0,u.useState)(!1),q=typeof O==`function`,J=(0,u.useMemo)(()=>O?(0,m.debounce)(async e=>{try{K(!0),W(!0);let t=await O(e);H(t)}catch(e){console.error(e),H([])}finally{W(!1)}},l):null,[O,l]),Y=[...!q&&!T?e:V,...c??[]],X=(0,u.useCallback)(async t=>{c&&c.length>0&&!c.find(e=>e.label===t.inputValue)&&j?.();let{inputValue:n}=t;if(J)J(n);else{let t=T&&n!==``?e.filter(e=>e.label.toLowerCase().includes(n.toLowerCase())):e;if(t.length===0&&L)return H(e);H(t)}},[J,e,T]);(0,u.useEffect)(()=>{J||H(e)},[e,J]);let Z=(0,u.useMemo)(()=>(0,s.createListCollection)({items:Y}),[Y]),ne=M??U,Q=g??(0,d.jsx)(n.Text,{p:`space-8`,textAlign:`center`,children:B.loading}),$=h??(0,d.jsx)(n.Text,{p:`space-8`,textAlign:`center`,children:B.noResults});return(0,d.jsxs)(_,{lazyMount:!0,unmountOnExit:!0,collection:Z,positioning:{sameWidth:!0,gutter:0,...E},"data-recipe":`combobox`,onInputValueChange:X,value:N,...z,multiple:R,children:[R?(0,d.jsx)(s.Combobox.Context,{children:t=>(0,d.jsxs)(x,{"data-multiple":`true`,"data-open":t.open||void 0,children:[t.value.map(n=>{let r=e.find(e=>String(e.value)===String(n));return r?(0,d.jsxs)(o.Chip,{size:`sm`,children:[A?A(r):(0,d.jsx)(o.ChipLabel,{children:r.label}),!z.readOnly&&!z.disabled&&(0,d.jsx)(o.ChipClearTrigger,{"aria-label":`Retirer ${r.label}`,onClick:()=>t.setValue(t.value.filter(e=>String(e)!==String(n)))})]},n):null}),(0,d.jsx)(b,{asChild:!0,"data-multiple":`true`,placeholder:t.hasSelectedItems?void 0:f,onFocus:()=>{P&&!q&&t.setOpen(!0)},children:(0,d.jsx)(a.Input,{})}),(0,d.jsx)(w,{asChild:!0,hidden:q&&(!c||c.length===0),children:(0,d.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,d.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M12.5303 16.2803C12.2374 16.5732 11.7626 16.5732 11.4697 16.2803L3.96967 8.78033C3.67678 8.48744 3.67678 8.01256 3.96967 7.71967C4.26256 7.42678 4.73744 7.42678 5.03033 7.71967L12 14.6893L18.9697 7.71967C19.2626 7.42678 19.7374 7.42678 20.0303 7.71967C20.3232 8.01256 20.3232 8.48744 20.0303 8.78033L12.5303 16.2803Z`,fill:`currentColor`})})})]})}):(0,d.jsxs)(x,{children:[(0,d.jsx)(s.Combobox.Context,{children:e=>(0,d.jsx)(b,{asChild:!0,placeholder:f,onInput:t=>{let n=t.currentTarget.value;F&&n===``&&e.clearValue()},onFocus:()=>{P&&!q&&e.setOpen(!0)},children:(0,d.jsx)(a.Input,{})})}),(0,d.jsx)(w,{asChild:!0,hidden:q&&(!c||c.length===0),children:(0,d.jsx)(`svg`,{width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,d.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M12.5303 16.2803C12.2374 16.5732 11.7626 16.5732 11.4697 16.2803L3.96967 8.78033C3.67678 8.48744 3.67678 8.01256 3.96967 7.71967C4.26256 7.42678 4.73744 7.42678 5.03033 7.71967L12 14.6893L18.9697 7.71967C19.2626 7.42678 19.7374 7.42678 20.0303 7.71967C20.3232 8.01256 20.3232 8.48744 20.0303 8.78033L12.5303 16.2803Z`,fill:`currentColor`})})}),(0,d.jsx)(v,{disabled:z.readOnly,onClick:j,asChild:!0,children:(0,d.jsx)(`button`,{children:(0,d.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 20 20`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,d.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M10 3.125C6.20304 3.125 3.125 6.20304 3.125 10C3.125 13.797 6.20304 16.875 10 16.875C13.797 16.875 16.875 13.797 16.875 10C16.875 6.20304 13.797 3.125 10 3.125ZM1.875 10C1.875 5.51269 5.51269 1.875 10 1.875C14.4873 1.875 18.125 5.51269 18.125 10C18.125 14.4873 14.4873 18.125 10 18.125C5.51269 18.125 1.875 14.4873 1.875 10ZM7.68306 7.68306C7.92714 7.43898 8.32286 7.43898 8.56694 7.68306L10 9.11612L11.4331 7.68306C11.6771 7.43898 12.0729 7.43898 12.3169 7.68306C12.561 7.92714 12.561 8.32286 12.3169 8.56694L10.8839 10L12.3169 11.4331C12.561 11.6771 12.561 12.0729 12.3169 12.3169C12.0729 12.561 11.6771 12.561 11.4331 12.3169L10 10.8839L8.56694 12.3169C8.32286 12.561 7.92714 12.561 7.68306 12.3169C7.43898 12.0729 7.43898 11.6771 7.68306 11.4331L9.11612 10L7.68306 8.56694C7.43898 8.32286 7.43898 7.92714 7.68306 7.68306Z`,fill:`currentColor`})})})})]}),(0,d.jsx)(r.ConditionalWrapper,{when:C,wrapper:e=>(0,d.jsx)(s.Portal,{children:e}),children:(0,d.jsx)(ee,{children:(0,d.jsx)(y,{children:ne?Q:Y.length===0?(0,d.jsx)(d.Fragment,{children:q?G?$:Q:$}):te?(0,d.jsx)(d.Fragment,{children:(0,d.jsx)(p.FixedSizeList,{height:Math.min(I*Y.length,180),itemCount:Y.length,itemSize:I,width:`100%`,children:({index:e,style:n})=>(0,d.jsx)(r.ConditionalWrapper,{when:!!Y[e].tooltip,wrapper:n=>(0,d.jsx)(t.Tooltip,{label:Y[e].tooltip,children:n}),children:(0,d.jsx)(S,{item:Y[e],style:n,children:(0,d.jsx)(D,{renderItem:k,item:Y[e],isMultiple:R})},Y[e].value)},Y[e].value)})}):Y.map(e=>(0,d.jsx)(r.ConditionalWrapper,{when:!!e.tooltip,wrapper:n=>(0,d.jsx)(t.Tooltip,{label:e.tooltip,children:n}),children:(0,d.jsx)(S,{item:e,children:(0,d.jsx)(D,{renderItem:k,item:e,isMultiple:R})},e.value)},e.value))})})})]})};exports.Combobox=O;
2
2
  //# sourceMappingURL=Combobox.cjs.map