@stokelp/ui 2.102.0 → 2.104.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 (710) hide show
  1. package/dist/_virtual/_rolldown/runtime.cjs +1 -0
  2. package/dist/_virtual/_rolldown/runtime.js +21 -0
  3. package/dist/components/accordion/Accordion.cjs +2 -2
  4. package/dist/components/accordion/Accordion.cjs.map +1 -1
  5. package/dist/components/accordion/Accordion.js +22 -27
  6. package/dist/components/accordion/Accordion.js.map +1 -1
  7. package/dist/components/action-card/ActionCard.cjs +2 -2
  8. package/dist/components/action-card/ActionCard.cjs.map +1 -1
  9. package/dist/components/action-card/ActionCard.js +23 -26
  10. package/dist/components/action-card/ActionCard.js.map +1 -1
  11. package/dist/components/alert/Alert.cjs +2 -2
  12. package/dist/components/alert/Alert.cjs.map +1 -1
  13. package/dist/components/alert/Alert.js +117 -84
  14. package/dist/components/alert/Alert.js.map +1 -1
  15. package/dist/components/app/mobile-card/MobileCardEntityRow.cjs +2 -2
  16. package/dist/components/app/mobile-card/MobileCardEntityRow.cjs.map +1 -1
  17. package/dist/components/app/mobile-card/MobileCardEntityRow.js +44 -25
  18. package/dist/components/app/mobile-card/MobileCardEntityRow.js.map +1 -1
  19. package/dist/components/app/mobile-card/MobileCardHeader.cjs +2 -2
  20. package/dist/components/app/mobile-card/MobileCardHeader.cjs.map +1 -1
  21. package/dist/components/app/mobile-card/MobileCardHeader.js +18 -20
  22. package/dist/components/app/mobile-card/MobileCardHeader.js.map +1 -1
  23. package/dist/components/app/mobile-card/MobileCardNotificationBadge.cjs +2 -2
  24. package/dist/components/app/mobile-card/MobileCardNotificationBadge.cjs.map +1 -1
  25. package/dist/components/app/mobile-card/MobileCardNotificationBadge.js +31 -13
  26. package/dist/components/app/mobile-card/MobileCardNotificationBadge.js.map +1 -1
  27. package/dist/components/app/mobile-card/MobileCardShell.cjs +2 -2
  28. package/dist/components/app/mobile-card/MobileCardShell.cjs.map +1 -1
  29. package/dist/components/app/mobile-card/MobileCardShell.js +17 -19
  30. package/dist/components/app/mobile-card/MobileCardShell.js.map +1 -1
  31. package/dist/components/app/mobile-card/MobileCardSkeleton.cjs +2 -2
  32. package/dist/components/app/mobile-card/MobileCardSkeleton.cjs.map +1 -1
  33. package/dist/components/app/mobile-card/MobileCardSkeleton.js +45 -22
  34. package/dist/components/app/mobile-card/MobileCardSkeleton.js.map +1 -1
  35. package/dist/components/app/mobile-navigation/MobileNavigation.cjs +2 -2
  36. package/dist/components/app/mobile-navigation/MobileNavigation.cjs.map +1 -1
  37. package/dist/components/app/mobile-navigation/MobileNavigation.js +16 -18
  38. package/dist/components/app/mobile-navigation/MobileNavigation.js.map +1 -1
  39. package/dist/components/app/navigation/AppNavigation.cjs +2 -2
  40. package/dist/components/app/navigation/AppNavigation.cjs.map +1 -1
  41. package/dist/components/app/navigation/AppNavigation.js +35 -47
  42. package/dist/components/app/navigation/AppNavigation.js.map +1 -1
  43. package/dist/components/app/navigation/language-select/AppNavigationLanguageSelect.cjs +2 -2
  44. package/dist/components/app/navigation/language-select/AppNavigationLanguageSelect.cjs.map +1 -1
  45. package/dist/components/app/navigation/language-select/AppNavigationLanguageSelect.js +188 -119
  46. package/dist/components/app/navigation/language-select/AppNavigationLanguageSelect.js.map +1 -1
  47. package/dist/components/app/price-tag/PriceTag.cjs +2 -2
  48. package/dist/components/app/price-tag/PriceTag.cjs.map +1 -1
  49. package/dist/components/app/price-tag/PriceTag.js +25 -19
  50. package/dist/components/app/price-tag/PriceTag.js.map +1 -1
  51. package/dist/components/app/product-card-catalog/styled.cjs +2 -2
  52. package/dist/components/app/product-card-catalog/styled.cjs.map +1 -1
  53. package/dist/components/app/product-card-catalog/styled.js +23 -21
  54. package/dist/components/app/product-card-catalog/styled.js.map +1 -1
  55. package/dist/components/avatar/styled.cjs +2 -2
  56. package/dist/components/avatar/styled.cjs.map +1 -1
  57. package/dist/components/avatar/styled.d.ts +2 -2
  58. package/dist/components/avatar/styled.js +28 -27
  59. package/dist/components/avatar/styled.js.map +1 -1
  60. package/dist/components/box/Box.cjs +2 -2
  61. package/dist/components/box/Box.cjs.map +1 -1
  62. package/dist/components/box/Box.js +11 -10
  63. package/dist/components/box/Box.js.map +1 -1
  64. package/dist/components/breadcrumb/Breadcrumb.cjs +2 -2
  65. package/dist/components/breadcrumb/Breadcrumb.cjs.map +1 -1
  66. package/dist/components/breadcrumb/Breadcrumb.d.ts +4 -6
  67. package/dist/components/breadcrumb/Breadcrumb.js +39 -35
  68. package/dist/components/breadcrumb/Breadcrumb.js.map +1 -1
  69. package/dist/components/button/Button.cjs +2 -2
  70. package/dist/components/button/Button.cjs.map +1 -1
  71. package/dist/components/button/Button.js +9 -8
  72. package/dist/components/button/Button.js.map +1 -1
  73. package/dist/components/button-filter/ButtonFilter.cjs +2 -2
  74. package/dist/components/button-filter/ButtonFilter.cjs.map +1 -1
  75. package/dist/components/button-filter/ButtonFilter.js +9 -8
  76. package/dist/components/button-filter/ButtonFilter.js.map +1 -1
  77. package/dist/components/chat/Chat.cjs +2 -2
  78. package/dist/components/chat/Chat.cjs.map +1 -1
  79. package/dist/components/chat/Chat.d.ts +6 -4
  80. package/dist/components/chat/Chat.js +27 -26
  81. package/dist/components/chat/Chat.js.map +1 -1
  82. package/dist/components/chat/ChatDocumentMessage.cjs +2 -2
  83. package/dist/components/chat/ChatDocumentMessage.cjs.map +1 -1
  84. package/dist/components/chat/ChatDocumentMessage.js +32 -31
  85. package/dist/components/chat/ChatDocumentMessage.js.map +1 -1
  86. package/dist/components/chat/ChatMessage.cjs +2 -2
  87. package/dist/components/chat/ChatMessage.cjs.map +1 -1
  88. package/dist/components/chat/ChatMessage.js +8 -7
  89. package/dist/components/chat/ChatMessage.js.map +1 -1
  90. package/dist/components/chat/ChatProfileAvatar.cjs +2 -2
  91. package/dist/components/chat/ChatProfileAvatar.cjs.map +1 -1
  92. package/dist/components/chat/ChatProfileAvatar.js +24 -16
  93. package/dist/components/chat/ChatProfileAvatar.js.map +1 -1
  94. package/dist/components/chat/ChatTextInput.cjs +2 -2
  95. package/dist/components/chat/ChatTextInput.cjs.map +1 -1
  96. package/dist/components/chat/ChatTextInput.d.ts +2 -2
  97. package/dist/components/chat/ChatTextInput.js +44 -52
  98. package/dist/components/chat/ChatTextInput.js.map +1 -1
  99. package/dist/components/checkbox/Checkbox.cjs +2 -2
  100. package/dist/components/checkbox/Checkbox.cjs.map +1 -1
  101. package/dist/components/checkbox/Checkbox.js +36 -34
  102. package/dist/components/checkbox/Checkbox.js.map +1 -1
  103. package/dist/components/checkbox-card/CheckboxCard.cjs +2 -2
  104. package/dist/components/checkbox-card/CheckboxCard.cjs.map +1 -1
  105. package/dist/components/checkbox-card/CheckboxCard.js +33 -38
  106. package/dist/components/checkbox-card/CheckboxCard.js.map +1 -1
  107. package/dist/components/checkbox-card/namespace.cjs +2 -2
  108. package/dist/components/checkbox-card/namespace.cjs.map +1 -1
  109. package/dist/components/checkbox-card/namespace.js +14 -9
  110. package/dist/components/checkbox-card/namespace.js.map +1 -1
  111. package/dist/components/chip/Chip.cjs +2 -2
  112. package/dist/components/chip/Chip.cjs.map +1 -1
  113. package/dist/components/chip/Chip.js +23 -23
  114. package/dist/components/chip/Chip.js.map +1 -1
  115. package/dist/components/collapsible/styled.cjs +2 -2
  116. package/dist/components/collapsible/styled.cjs.map +1 -1
  117. package/dist/components/collapsible/styled.js +15 -11
  118. package/dist/components/collapsible/styled.js.map +1 -1
  119. package/dist/components/combobox/Combobox.cjs +2 -2
  120. package/dist/components/combobox/Combobox.cjs.map +1 -1
  121. package/dist/components/combobox/Combobox.js +206 -173
  122. package/dist/components/combobox/Combobox.js.map +1 -1
  123. package/dist/components/date-picker/DatePicker.cjs +2 -2
  124. package/dist/components/date-picker/DatePicker.cjs.map +1 -1
  125. package/dist/components/date-picker/DatePicker.d.ts +2 -2
  126. package/dist/components/date-picker/DatePicker.js +151 -127
  127. package/dist/components/date-picker/DatePicker.js.map +1 -1
  128. package/dist/components/dialog/styled.cjs +2 -2
  129. package/dist/components/dialog/styled.cjs.map +1 -1
  130. package/dist/components/dialog/styled.js +75 -65
  131. package/dist/components/dialog/styled.js.map +1 -1
  132. package/dist/components/drawer/Drawer.cjs +2 -2
  133. package/dist/components/drawer/Drawer.cjs.map +1 -1
  134. package/dist/components/drawer/Drawer.js +62 -68
  135. package/dist/components/drawer/Drawer.js.map +1 -1
  136. package/dist/components/flag/styled.cjs +2 -2
  137. package/dist/components/flag/styled.cjs.map +1 -1
  138. package/dist/components/flag/styled.d.ts +2 -2
  139. package/dist/components/flag/styled.js +8437 -3751
  140. package/dist/components/flag/styled.js.map +1 -1
  141. package/dist/components/form/FormControl.cjs +2 -2
  142. package/dist/components/form/FormControl.cjs.map +1 -1
  143. package/dist/components/form/FormControl.d.ts +2 -2
  144. package/dist/components/form/FormControl.js +13 -18
  145. package/dist/components/form/FormControl.js.map +1 -1
  146. package/dist/components/form/FormHelperText.cjs +2 -2
  147. package/dist/components/form/FormHelperText.cjs.map +1 -1
  148. package/dist/components/form/FormHelperText.js +8 -9
  149. package/dist/components/form/FormHelperText.js.map +1 -1
  150. package/dist/components/form/FormLabel.cjs +2 -2
  151. package/dist/components/form/FormLabel.cjs.map +1 -1
  152. package/dist/components/form/FormLabel.d.ts +2 -2
  153. package/dist/components/form/FormLabel.js +38 -33
  154. package/dist/components/form/FormLabel.js.map +1 -1
  155. package/dist/components/heading/Heading.cjs +2 -2
  156. package/dist/components/heading/Heading.cjs.map +1 -1
  157. package/dist/components/heading/Heading.js +14 -10
  158. package/dist/components/heading/Heading.js.map +1 -1
  159. package/dist/components/icon/Icon.cjs +2 -2
  160. package/dist/components/icon/Icon.cjs.map +1 -1
  161. package/dist/components/icon/Icon.d.ts +2 -2
  162. package/dist/components/icon/Icon.js +15 -10
  163. package/dist/components/icon/Icon.js.map +1 -1
  164. package/dist/components/icon-button/IconButton.cjs +2 -2
  165. package/dist/components/icon-button/IconButton.cjs.map +1 -1
  166. package/dist/components/icon-button/IconButton.d.ts +2 -3
  167. package/dist/components/icon-button/IconButton.js +8 -7
  168. package/dist/components/icon-button/IconButton.js.map +1 -1
  169. package/dist/components/illustration/Illustration.cjs +2 -2
  170. package/dist/components/illustration/Illustration.cjs.map +1 -1
  171. package/dist/components/illustration/Illustration.js +35 -39
  172. package/dist/components/illustration/Illustration.js.map +1 -1
  173. package/dist/components/illustration/patterns.cjs +2 -2
  174. package/dist/components/illustration/patterns.cjs.map +1 -1
  175. package/dist/components/illustration/patterns.js +5563 -8897
  176. package/dist/components/illustration/patterns.js.map +1 -1
  177. package/dist/components/input/HighlightedInput.cjs +2 -2
  178. package/dist/components/input/HighlightedInput.cjs.map +1 -1
  179. package/dist/components/input/HighlightedInput.d.ts +9 -12
  180. package/dist/components/input/HighlightedInput.js +43 -58
  181. package/dist/components/input/HighlightedInput.js.map +1 -1
  182. package/dist/components/input/Input.cjs +2 -2
  183. package/dist/components/input/Input.cjs.map +1 -1
  184. package/dist/components/input/Input.d.ts +1 -2
  185. package/dist/components/input/Input.js +12 -13
  186. package/dist/components/input/Input.js.map +1 -1
  187. package/dist/components/input/InputAddon.cjs +2 -2
  188. package/dist/components/input/InputAddon.cjs.map +1 -1
  189. package/dist/components/input/InputAddon.js +8 -9
  190. package/dist/components/input/InputAddon.js.map +1 -1
  191. package/dist/components/input/InputGroup.cjs +2 -2
  192. package/dist/components/input/InputGroup.cjs.map +1 -1
  193. package/dist/components/input/InputGroup.js +8 -9
  194. package/dist/components/input/InputGroup.js.map +1 -1
  195. package/dist/components/input/PhoneNumberInput.cjs +2 -2
  196. package/dist/components/input/PhoneNumberInput.cjs.map +1 -1
  197. package/dist/components/input/PhoneNumberInput.js +21 -23
  198. package/dist/components/input/PhoneNumberInput.js.map +1 -1
  199. package/dist/components/menu/Menu.cjs +2 -2
  200. package/dist/components/menu/Menu.cjs.map +1 -1
  201. package/dist/components/menu/Menu.js +32 -28
  202. package/dist/components/menu/Menu.js.map +1 -1
  203. package/dist/components/pagination/Pagination.cjs +2 -2
  204. package/dist/components/pagination/Pagination.cjs.map +1 -1
  205. package/dist/components/pagination/Pagination.js +76 -84
  206. package/dist/components/pagination/Pagination.js.map +1 -1
  207. package/dist/components/pagination/use-pagination.cjs +2 -2
  208. package/dist/components/pagination/use-pagination.cjs.map +1 -1
  209. package/dist/components/pagination/use-pagination.js +56 -54
  210. package/dist/components/pagination/use-pagination.js.map +1 -1
  211. package/dist/components/popover/Popover.cjs +2 -2
  212. package/dist/components/popover/Popover.cjs.map +1 -1
  213. package/dist/components/popover/Popover.js +21 -25
  214. package/dist/components/popover/Popover.js.map +1 -1
  215. package/dist/components/radio-button-group/RadioButtonGroup.cjs +2 -2
  216. package/dist/components/radio-button-group/RadioButtonGroup.cjs.map +1 -1
  217. package/dist/components/radio-button-group/RadioButtonGroup.js +20 -20
  218. package/dist/components/radio-button-group/RadioButtonGroup.js.map +1 -1
  219. package/dist/components/radio-card-group/RadioCardGroup.cjs +2 -2
  220. package/dist/components/radio-card-group/RadioCardGroup.cjs.map +1 -1
  221. package/dist/components/radio-card-group/RadioCardGroup.js +21 -22
  222. package/dist/components/radio-card-group/RadioCardGroup.js.map +1 -1
  223. package/dist/components/radio-card-group/namespace.cjs +2 -2
  224. package/dist/components/radio-card-group/namespace.cjs.map +1 -1
  225. package/dist/components/radio-card-group/namespace.js +15 -10
  226. package/dist/components/radio-card-group/namespace.js.map +1 -1
  227. package/dist/components/radio-group/RadioGroup.cjs +2 -2
  228. package/dist/components/radio-group/RadioGroup.cjs.map +1 -1
  229. package/dist/components/radio-group/RadioGroup.js +21 -21
  230. package/dist/components/radio-group/RadioGroup.js.map +1 -1
  231. package/dist/components/select/Select.cjs +2 -2
  232. package/dist/components/select/Select.cjs.map +1 -1
  233. package/dist/components/select/Select.js +194 -141
  234. package/dist/components/select/Select.js.map +1 -1
  235. package/dist/components/select-language/SelectLanguage.cjs +2 -2
  236. package/dist/components/select-language/SelectLanguage.cjs.map +1 -1
  237. package/dist/components/select-language/SelectLanguage.js +114 -88
  238. package/dist/components/select-language/SelectLanguage.js.map +1 -1
  239. package/dist/components/status-tag-select/StatusTagSelect.cjs +2 -2
  240. package/dist/components/status-tag-select/StatusTagSelect.cjs.map +1 -1
  241. package/dist/components/status-tag-select/StatusTagSelect.js +93 -115
  242. package/dist/components/status-tag-select/StatusTagSelect.js.map +1 -1
  243. package/dist/components/switch/Switch.cjs +2 -2
  244. package/dist/components/switch/Switch.cjs.map +1 -1
  245. package/dist/components/switch/Switch.js +30 -18
  246. package/dist/components/switch/Switch.js.map +1 -1
  247. package/dist/components/switch-card/SwitchCard.cjs +2 -2
  248. package/dist/components/switch-card/SwitchCard.cjs.map +1 -1
  249. package/dist/components/switch-card/SwitchCard.js +28 -25
  250. package/dist/components/switch-card/SwitchCard.js.map +1 -1
  251. package/dist/components/switch-card/namespace.cjs +2 -2
  252. package/dist/components/switch-card/namespace.cjs.map +1 -1
  253. package/dist/components/switch-card/namespace.js +14 -9
  254. package/dist/components/switch-card/namespace.js.map +1 -1
  255. package/dist/components/table/Table.cjs +2 -2
  256. package/dist/components/table/Table.cjs.map +1 -1
  257. package/dist/components/table/Table.d.ts +3 -4
  258. package/dist/components/table/Table.js +133 -109
  259. package/dist/components/table/Table.js.map +1 -1
  260. package/dist/components/table/TableProvider.cjs +2 -2
  261. package/dist/components/table/TableProvider.cjs.map +1 -1
  262. package/dist/components/table/TableProvider.js +36 -39
  263. package/dist/components/table/TableProvider.js.map +1 -1
  264. package/dist/components/tabs/Tabs.cjs +2 -2
  265. package/dist/components/tabs/Tabs.cjs.map +1 -1
  266. package/dist/components/tabs/Tabs.js +18 -26
  267. package/dist/components/tabs/Tabs.js.map +1 -1
  268. package/dist/components/tag/Tag.cjs +2 -2
  269. package/dist/components/tag/Tag.cjs.map +1 -1
  270. package/dist/components/tag/Tag.js +22 -16
  271. package/dist/components/tag/Tag.js.map +1 -1
  272. package/dist/components/text/Text.cjs +2 -2
  273. package/dist/components/text/Text.cjs.map +1 -1
  274. package/dist/components/text/Text.js +12 -11
  275. package/dist/components/text/Text.js.map +1 -1
  276. package/dist/components/textarea/Textarea.cjs +2 -2
  277. package/dist/components/textarea/Textarea.cjs.map +1 -1
  278. package/dist/components/textarea/Textarea.d.ts +1 -2
  279. package/dist/components/textarea/Textarea.js +9 -8
  280. package/dist/components/textarea/Textarea.js.map +1 -1
  281. package/dist/components/tooltip/Tooltip.cjs +2 -2
  282. package/dist/components/tooltip/Tooltip.cjs.map +1 -1
  283. package/dist/components/tooltip/Tooltip.js +38 -42
  284. package/dist/components/tooltip/Tooltip.js.map +1 -1
  285. package/dist/icons/index.cjs +2 -2
  286. package/dist/icons/index.cjs.map +1 -1
  287. package/dist/icons/index.js +65 -58
  288. package/dist/icons/index.js.map +1 -1
  289. package/dist/index.cjs +1 -2
  290. package/dist/index.js +66 -191
  291. package/dist/node_modules/@heroicons/react/24/outline/esm/ArrowDownTrayIcon.cjs +2 -2
  292. package/dist/node_modules/@heroicons/react/24/outline/esm/ArrowDownTrayIcon.cjs.map +1 -1
  293. package/dist/node_modules/@heroicons/react/24/outline/esm/ArrowDownTrayIcon.js +22 -27
  294. package/dist/node_modules/@heroicons/react/24/outline/esm/ArrowDownTrayIcon.js.map +1 -1
  295. package/dist/node_modules/@heroicons/react/24/outline/esm/ArrowLeftCircleIcon.cjs +2 -2
  296. package/dist/node_modules/@heroicons/react/24/outline/esm/ArrowLeftCircleIcon.cjs.map +1 -1
  297. package/dist/node_modules/@heroicons/react/24/outline/esm/ArrowLeftCircleIcon.js +22 -27
  298. package/dist/node_modules/@heroicons/react/24/outline/esm/ArrowLeftCircleIcon.js.map +1 -1
  299. package/dist/node_modules/@heroicons/react/24/outline/esm/ChatBubbleLeftRightIcon.cjs +2 -2
  300. package/dist/node_modules/@heroicons/react/24/outline/esm/ChatBubbleLeftRightIcon.cjs.map +1 -1
  301. package/dist/node_modules/@heroicons/react/24/outline/esm/ChatBubbleLeftRightIcon.js +22 -27
  302. package/dist/node_modules/@heroicons/react/24/outline/esm/ChatBubbleLeftRightIcon.js.map +1 -1
  303. package/dist/node_modules/@heroicons/react/24/outline/esm/DocumentTextIcon.cjs +2 -2
  304. package/dist/node_modules/@heroicons/react/24/outline/esm/DocumentTextIcon.cjs.map +1 -1
  305. package/dist/node_modules/@heroicons/react/24/outline/esm/DocumentTextIcon.js +22 -27
  306. package/dist/node_modules/@heroicons/react/24/outline/esm/DocumentTextIcon.js.map +1 -1
  307. package/dist/node_modules/deepmerge/dist/cjs.cjs +2 -2
  308. package/dist/node_modules/deepmerge/dist/cjs.cjs.map +1 -1
  309. package/dist/node_modules/deepmerge/dist/cjs.js +76 -80
  310. package/dist/node_modules/deepmerge/dist/cjs.js.map +1 -1
  311. package/dist/preset.cjs +2 -2
  312. package/dist/preset.cjs.map +1 -1
  313. package/dist/preset.js +30 -31
  314. package/dist/preset.js.map +1 -1
  315. package/dist/shared/ConditionalWrapper.cjs +2 -2
  316. package/dist/shared/ConditionalWrapper.cjs.map +1 -1
  317. package/dist/shared/ConditionalWrapper.js +6 -5
  318. package/dist/shared/ConditionalWrapper.js.map +1 -1
  319. package/dist/shared/assets/icons.cjs +2 -2
  320. package/dist/shared/assets/icons.cjs.map +1 -1
  321. package/dist/shared/assets/icons.js +30 -22
  322. package/dist/shared/assets/icons.js.map +1 -1
  323. package/dist/shared/hooks/useUncontrolled.cjs +2 -2
  324. package/dist/shared/hooks/useUncontrolled.cjs.map +1 -1
  325. package/dist/shared/hooks/useUncontrolled.js +19 -16
  326. package/dist/shared/hooks/useUncontrolled.js.map +1 -1
  327. package/dist/shared/utils/events.cjs +2 -2
  328. package/dist/shared/utils/events.cjs.map +1 -1
  329. package/dist/shared/utils/events.js +7 -6
  330. package/dist/shared/utils/events.js.map +1 -1
  331. package/dist/theme/breakpoints.cjs +2 -2
  332. package/dist/theme/breakpoints.cjs.map +1 -1
  333. package/dist/theme/breakpoints.js +10 -9
  334. package/dist/theme/breakpoints.js.map +1 -1
  335. package/dist/theme/conditions.cjs +2 -2
  336. package/dist/theme/conditions.cjs.map +1 -1
  337. package/dist/theme/conditions.js +23 -24
  338. package/dist/theme/conditions.js.map +1 -1
  339. package/dist/theme/containers.cjs +2 -2
  340. package/dist/theme/containers.cjs.map +1 -1
  341. package/dist/theme/containers.js +18 -17
  342. package/dist/theme/containers.js.map +1 -1
  343. package/dist/theme/globalCss.cjs +4 -4
  344. package/dist/theme/globalCss.cjs.map +1 -1
  345. package/dist/theme/globalCss.js +94 -99
  346. package/dist/theme/globalCss.js.map +1 -1
  347. package/dist/theme/keyframes.cjs +2 -2
  348. package/dist/theme/keyframes.cjs.map +1 -1
  349. package/dist/theme/keyframes.js +256 -171
  350. package/dist/theme/keyframes.js.map +1 -1
  351. package/dist/theme/recipes/accordion.cjs +2 -2
  352. package/dist/theme/recipes/accordion.cjs.map +1 -1
  353. package/dist/theme/recipes/accordion.js +93 -110
  354. package/dist/theme/recipes/accordion.js.map +1 -1
  355. package/dist/theme/recipes/action-card.cjs +2 -2
  356. package/dist/theme/recipes/action-card.cjs.map +1 -1
  357. package/dist/theme/recipes/action-card.js +88 -84
  358. package/dist/theme/recipes/action-card.js.map +1 -1
  359. package/dist/theme/recipes/alert.cjs +2 -2
  360. package/dist/theme/recipes/alert.cjs.map +1 -1
  361. package/dist/theme/recipes/alert.js +52 -65
  362. package/dist/theme/recipes/alert.js.map +1 -1
  363. package/dist/theme/recipes/app/mobile-navigation.cjs +2 -2
  364. package/dist/theme/recipes/app/mobile-navigation.cjs.map +1 -1
  365. package/dist/theme/recipes/app/mobile-navigation.js +94 -108
  366. package/dist/theme/recipes/app/mobile-navigation.js.map +1 -1
  367. package/dist/theme/recipes/app/navigation-language-select.cjs +2 -2
  368. package/dist/theme/recipes/app/navigation-language-select.cjs.map +1 -1
  369. package/dist/theme/recipes/app/navigation-language-select.js +135 -148
  370. package/dist/theme/recipes/app/navigation-language-select.js.map +1 -1
  371. package/dist/theme/recipes/app/navigation.cjs +2 -2
  372. package/dist/theme/recipes/app/navigation.cjs.map +1 -1
  373. package/dist/theme/recipes/app/navigation.js +214 -269
  374. package/dist/theme/recipes/app/navigation.js.map +1 -1
  375. package/dist/theme/recipes/app/price-tag.cjs +2 -2
  376. package/dist/theme/recipes/app/price-tag.cjs.map +1 -1
  377. package/dist/theme/recipes/app/price-tag.js +59 -70
  378. package/dist/theme/recipes/app/price-tag.js.map +1 -1
  379. package/dist/theme/recipes/app/product-card-catalog.cjs +2 -2
  380. package/dist/theme/recipes/app/product-card-catalog.cjs.map +1 -1
  381. package/dist/theme/recipes/app/product-card-catalog.js +189 -194
  382. package/dist/theme/recipes/app/product-card-catalog.js.map +1 -1
  383. package/dist/theme/recipes/avatar-group.cjs +2 -2
  384. package/dist/theme/recipes/avatar-group.cjs.map +1 -1
  385. package/dist/theme/recipes/avatar-group.js +27 -38
  386. package/dist/theme/recipes/avatar-group.js.map +1 -1
  387. package/dist/theme/recipes/avatar.cjs +2 -2
  388. package/dist/theme/recipes/avatar.cjs.map +1 -1
  389. package/dist/theme/recipes/avatar.js +97 -95
  390. package/dist/theme/recipes/avatar.js.map +1 -1
  391. package/dist/theme/recipes/breadcrumb.cjs +2 -2
  392. package/dist/theme/recipes/breadcrumb.cjs.map +1 -1
  393. package/dist/theme/recipes/breadcrumb.js +35 -31
  394. package/dist/theme/recipes/breadcrumb.js.map +1 -1
  395. package/dist/theme/recipes/button-filter.cjs +2 -2
  396. package/dist/theme/recipes/button-filter.cjs.map +1 -1
  397. package/dist/theme/recipes/button-filter.js +57 -60
  398. package/dist/theme/recipes/button-filter.js.map +1 -1
  399. package/dist/theme/recipes/button.cjs +2 -2
  400. package/dist/theme/recipes/button.cjs.map +1 -1
  401. package/dist/theme/recipes/button.js +287 -295
  402. package/dist/theme/recipes/button.js.map +1 -1
  403. package/dist/theme/recipes/chat/chat-document-message.cjs +2 -2
  404. package/dist/theme/recipes/chat/chat-document-message.cjs.map +1 -1
  405. package/dist/theme/recipes/chat/chat-document-message.js +38 -43
  406. package/dist/theme/recipes/chat/chat-document-message.js.map +1 -1
  407. package/dist/theme/recipes/chat/chat-input-text.cjs +2 -2
  408. package/dist/theme/recipes/chat/chat-input-text.cjs.map +1 -1
  409. package/dist/theme/recipes/chat/chat-input-text.js +26 -27
  410. package/dist/theme/recipes/chat/chat-input-text.js.map +1 -1
  411. package/dist/theme/recipes/chat/chat-message.cjs +2 -2
  412. package/dist/theme/recipes/chat/chat-message.cjs.map +1 -1
  413. package/dist/theme/recipes/chat/chat-message.js +49 -45
  414. package/dist/theme/recipes/chat/chat-message.js.map +1 -1
  415. package/dist/theme/recipes/chat/chat-profile-avatar.cjs +2 -2
  416. package/dist/theme/recipes/chat/chat-profile-avatar.cjs.map +1 -1
  417. package/dist/theme/recipes/chat/chat-profile-avatar.js +20 -25
  418. package/dist/theme/recipes/chat/chat-profile-avatar.js.map +1 -1
  419. package/dist/theme/recipes/chat/chat.cjs +2 -2
  420. package/dist/theme/recipes/chat/chat.cjs.map +1 -1
  421. package/dist/theme/recipes/chat/chat.js +51 -56
  422. package/dist/theme/recipes/chat/chat.js.map +1 -1
  423. package/dist/theme/recipes/checkbox-card.cjs +2 -2
  424. package/dist/theme/recipes/checkbox-card.cjs.map +1 -1
  425. package/dist/theme/recipes/checkbox-card.js +44 -40
  426. package/dist/theme/recipes/checkbox-card.js.map +1 -1
  427. package/dist/theme/recipes/checkbox-group.cjs +2 -2
  428. package/dist/theme/recipes/checkbox-group.cjs.map +1 -1
  429. package/dist/theme/recipes/checkbox-group.js +13 -12
  430. package/dist/theme/recipes/checkbox-group.js.map +1 -1
  431. package/dist/theme/recipes/checkbox.cjs +2 -2
  432. package/dist/theme/recipes/checkbox.cjs.map +1 -1
  433. package/dist/theme/recipes/checkbox.js +110 -129
  434. package/dist/theme/recipes/checkbox.js.map +1 -1
  435. package/dist/theme/recipes/chip.cjs +2 -2
  436. package/dist/theme/recipes/chip.cjs.map +1 -1
  437. package/dist/theme/recipes/chip.js +144 -182
  438. package/dist/theme/recipes/chip.js.map +1 -1
  439. package/dist/theme/recipes/collapsible.cjs +2 -2
  440. package/dist/theme/recipes/collapsible.cjs.map +1 -1
  441. package/dist/theme/recipes/collapsible.js +30 -28
  442. package/dist/theme/recipes/collapsible.js.map +1 -1
  443. package/dist/theme/recipes/combobox.cjs +2 -2
  444. package/dist/theme/recipes/combobox.cjs.map +1 -1
  445. package/dist/theme/recipes/combobox.js +149 -176
  446. package/dist/theme/recipes/combobox.js.map +1 -1
  447. package/dist/theme/recipes/common/group-card.cjs +2 -2
  448. package/dist/theme/recipes/common/group-card.cjs.map +1 -1
  449. package/dist/theme/recipes/common/group-card.js +60 -80
  450. package/dist/theme/recipes/common/group-card.js.map +1 -1
  451. package/dist/theme/recipes/datepicker.cjs +2 -2
  452. package/dist/theme/recipes/datepicker.cjs.map +1 -1
  453. package/dist/theme/recipes/datepicker.js +149 -176
  454. package/dist/theme/recipes/datepicker.js.map +1 -1
  455. package/dist/theme/recipes/dialog.cjs +2 -2
  456. package/dist/theme/recipes/dialog.cjs.map +1 -1
  457. package/dist/theme/recipes/dialog.js +137 -151
  458. package/dist/theme/recipes/dialog.js.map +1 -1
  459. package/dist/theme/recipes/drawer.cjs +2 -2
  460. package/dist/theme/recipes/drawer.cjs.map +1 -1
  461. package/dist/theme/recipes/drawer.js +105 -125
  462. package/dist/theme/recipes/drawer.js.map +1 -1
  463. package/dist/theme/recipes/flag.cjs +2 -2
  464. package/dist/theme/recipes/flag.cjs.map +1 -1
  465. package/dist/theme/recipes/flag.js +21 -30
  466. package/dist/theme/recipes/flag.js.map +1 -1
  467. package/dist/theme/recipes/form/control.cjs +2 -2
  468. package/dist/theme/recipes/form/control.cjs.map +1 -1
  469. package/dist/theme/recipes/form/control.js +27 -34
  470. package/dist/theme/recipes/form/control.js.map +1 -1
  471. package/dist/theme/recipes/form/helper-text.cjs +2 -2
  472. package/dist/theme/recipes/form/helper-text.cjs.map +1 -1
  473. package/dist/theme/recipes/form/helper-text.js +14 -13
  474. package/dist/theme/recipes/form/helper-text.js.map +1 -1
  475. package/dist/theme/recipes/form/label.cjs +2 -2
  476. package/dist/theme/recipes/form/label.cjs.map +1 -1
  477. package/dist/theme/recipes/form/label.js +47 -48
  478. package/dist/theme/recipes/form/label.js.map +1 -1
  479. package/dist/theme/recipes/heading.cjs +2 -2
  480. package/dist/theme/recipes/heading.cjs.map +1 -1
  481. package/dist/theme/recipes/heading.js +25 -34
  482. package/dist/theme/recipes/heading.js.map +1 -1
  483. package/dist/theme/recipes/highlightedInput.cjs +2 -2
  484. package/dist/theme/recipes/highlightedInput.cjs.map +1 -1
  485. package/dist/theme/recipes/highlightedInput.js +54 -45
  486. package/dist/theme/recipes/highlightedInput.js.map +1 -1
  487. package/dist/theme/recipes/icon-button.cjs +2 -2
  488. package/dist/theme/recipes/icon-button.cjs.map +1 -1
  489. package/dist/theme/recipes/icon-button.js +81 -89
  490. package/dist/theme/recipes/icon-button.js.map +1 -1
  491. package/dist/theme/recipes/icon.cjs +2 -2
  492. package/dist/theme/recipes/icon.cjs.map +1 -1
  493. package/dist/theme/recipes/icon.js +39 -42
  494. package/dist/theme/recipes/icon.js.map +1 -1
  495. package/dist/theme/recipes/illustration.cjs +2 -2
  496. package/dist/theme/recipes/illustration.cjs.map +1 -1
  497. package/dist/theme/recipes/illustration.js +29 -48
  498. package/dist/theme/recipes/illustration.js.map +1 -1
  499. package/dist/theme/recipes/index.cjs +2 -2
  500. package/dist/theme/recipes/index.cjs.map +1 -1
  501. package/dist/theme/recipes/index.js +127 -127
  502. package/dist/theme/recipes/index.js.map +1 -1
  503. package/dist/theme/recipes/input-addon.cjs +2 -2
  504. package/dist/theme/recipes/input-addon.cjs.map +1 -1
  505. package/dist/theme/recipes/input-addon.js +24 -24
  506. package/dist/theme/recipes/input-addon.js.map +1 -1
  507. package/dist/theme/recipes/input-group.cjs +2 -2
  508. package/dist/theme/recipes/input-group.cjs.map +1 -1
  509. package/dist/theme/recipes/input-group.js +40 -49
  510. package/dist/theme/recipes/input-group.js.map +1 -1
  511. package/dist/theme/recipes/input.cjs +2 -2
  512. package/dist/theme/recipes/input.cjs.map +1 -1
  513. package/dist/theme/recipes/input.js +48 -61
  514. package/dist/theme/recipes/input.js.map +1 -1
  515. package/dist/theme/recipes/menu.cjs +2 -2
  516. package/dist/theme/recipes/menu.cjs.map +1 -1
  517. package/dist/theme/recipes/menu.js +96 -100
  518. package/dist/theme/recipes/menu.js.map +1 -1
  519. package/dist/theme/recipes/pagination.cjs +2 -2
  520. package/dist/theme/recipes/pagination.cjs.map +1 -1
  521. package/dist/theme/recipes/pagination.js +76 -71
  522. package/dist/theme/recipes/pagination.js.map +1 -1
  523. package/dist/theme/recipes/phone-number-input.cjs +2 -2
  524. package/dist/theme/recipes/phone-number-input.cjs.map +1 -1
  525. package/dist/theme/recipes/phone-number-input.js +55 -66
  526. package/dist/theme/recipes/phone-number-input.js.map +1 -1
  527. package/dist/theme/recipes/popover.cjs +2 -2
  528. package/dist/theme/recipes/popover.cjs.map +1 -1
  529. package/dist/theme/recipes/popover.js +30 -28
  530. package/dist/theme/recipes/popover.js.map +1 -1
  531. package/dist/theme/recipes/radio-button-group.cjs +2 -2
  532. package/dist/theme/recipes/radio-button-group.cjs.map +1 -1
  533. package/dist/theme/recipes/radio-button-group.js +83 -94
  534. package/dist/theme/recipes/radio-button-group.js.map +1 -1
  535. package/dist/theme/recipes/radio-card-group.cjs +2 -2
  536. package/dist/theme/recipes/radio-card-group.cjs.map +1 -1
  537. package/dist/theme/recipes/radio-card-group.js +64 -67
  538. package/dist/theme/recipes/radio-card-group.js.map +1 -1
  539. package/dist/theme/recipes/radio-group.cjs +2 -2
  540. package/dist/theme/recipes/radio-group.cjs.map +1 -1
  541. package/dist/theme/recipes/radio-group.js +101 -118
  542. package/dist/theme/recipes/radio-group.js.map +1 -1
  543. package/dist/theme/recipes/select-language.cjs +2 -2
  544. package/dist/theme/recipes/select-language.cjs.map +1 -1
  545. package/dist/theme/recipes/select-language.js +93 -112
  546. package/dist/theme/recipes/select-language.js.map +1 -1
  547. package/dist/theme/recipes/select.cjs +2 -2
  548. package/dist/theme/recipes/select.cjs.map +1 -1
  549. package/dist/theme/recipes/select.js +194 -206
  550. package/dist/theme/recipes/select.js.map +1 -1
  551. package/dist/theme/recipes/status-tag-select.cjs +2 -2
  552. package/dist/theme/recipes/status-tag-select.cjs.map +1 -1
  553. package/dist/theme/recipes/status-tag-select.js +162 -175
  554. package/dist/theme/recipes/status-tag-select.js.map +1 -1
  555. package/dist/theme/recipes/switch-card.cjs +2 -2
  556. package/dist/theme/recipes/switch-card.cjs.map +1 -1
  557. package/dist/theme/recipes/switch-card.js +43 -42
  558. package/dist/theme/recipes/switch-card.js.map +1 -1
  559. package/dist/theme/recipes/switch.cjs +2 -2
  560. package/dist/theme/recipes/switch.cjs.map +1 -1
  561. package/dist/theme/recipes/switch.js +71 -86
  562. package/dist/theme/recipes/switch.js.map +1 -1
  563. package/dist/theme/recipes/table-container.cjs +2 -2
  564. package/dist/theme/recipes/table-container.cjs.map +1 -1
  565. package/dist/theme/recipes/table-container.js +19 -18
  566. package/dist/theme/recipes/table-container.js.map +1 -1
  567. package/dist/theme/recipes/table-empty-row.cjs +2 -2
  568. package/dist/theme/recipes/table-empty-row.cjs.map +1 -1
  569. package/dist/theme/recipes/table-empty-row.js +17 -16
  570. package/dist/theme/recipes/table-empty-row.js.map +1 -1
  571. package/dist/theme/recipes/table-group-title.cjs +2 -2
  572. package/dist/theme/recipes/table-group-title.cjs.map +1 -1
  573. package/dist/theme/recipes/table-group-title.js +26 -33
  574. package/dist/theme/recipes/table-group-title.js.map +1 -1
  575. package/dist/theme/recipes/table.cjs +2 -2
  576. package/dist/theme/recipes/table.cjs.map +1 -1
  577. package/dist/theme/recipes/table.js +111 -109
  578. package/dist/theme/recipes/table.js.map +1 -1
  579. package/dist/theme/recipes/tabs-chip.cjs +2 -2
  580. package/dist/theme/recipes/tabs-chip.cjs.map +1 -1
  581. package/dist/theme/recipes/tabs-chip.js +43 -46
  582. package/dist/theme/recipes/tabs-chip.js.map +1 -1
  583. package/dist/theme/recipes/tabs.cjs +2 -2
  584. package/dist/theme/recipes/tabs.cjs.map +1 -1
  585. package/dist/theme/recipes/tabs.js +92 -125
  586. package/dist/theme/recipes/tabs.js.map +1 -1
  587. package/dist/theme/recipes/tag.cjs +2 -2
  588. package/dist/theme/recipes/tag.cjs.map +1 -1
  589. package/dist/theme/recipes/tag.js +110 -121
  590. package/dist/theme/recipes/tag.js.map +1 -1
  591. package/dist/theme/recipes/text.cjs +2 -2
  592. package/dist/theme/recipes/text.cjs.map +1 -1
  593. package/dist/theme/recipes/text.js +25 -38
  594. package/dist/theme/recipes/text.js.map +1 -1
  595. package/dist/theme/recipes/textarea.cjs +2 -2
  596. package/dist/theme/recipes/textarea.cjs.map +1 -1
  597. package/dist/theme/recipes/textarea.js +15 -14
  598. package/dist/theme/recipes/textarea.js.map +1 -1
  599. package/dist/theme/recipes/tooltip.cjs +2 -2
  600. package/dist/theme/recipes/tooltip.cjs.map +1 -1
  601. package/dist/theme/recipes/tooltip.js +47 -62
  602. package/dist/theme/recipes/tooltip.js.map +1 -1
  603. package/dist/theme/semantic-tokens/colors.cjs +2 -2
  604. package/dist/theme/semantic-tokens/colors.cjs.map +1 -1
  605. package/dist/theme/semantic-tokens/colors.js +189 -140
  606. package/dist/theme/semantic-tokens/colors.js.map +1 -1
  607. package/dist/theme/semantic-tokens/index.cjs +2 -2
  608. package/dist/theme/semantic-tokens/index.cjs.map +1 -1
  609. package/dist/theme/semantic-tokens/index.js +7 -8
  610. package/dist/theme/semantic-tokens/index.js.map +1 -1
  611. package/dist/theme/text-styles.cjs +2 -2
  612. package/dist/theme/text-styles.cjs.map +1 -1
  613. package/dist/theme/text-styles.js +70 -87
  614. package/dist/theme/text-styles.js.map +1 -1
  615. package/dist/theme/tokens/animations.cjs +2 -2
  616. package/dist/theme/tokens/animations.cjs.map +1 -1
  617. package/dist/theme/tokens/animations.js +22 -45
  618. package/dist/theme/tokens/animations.js.map +1 -1
  619. package/dist/theme/tokens/aspect-ratios.cjs +2 -2
  620. package/dist/theme/tokens/aspect-ratios.cjs.map +1 -1
  621. package/dist/theme/tokens/aspect-ratios.js +12 -11
  622. package/dist/theme/tokens/aspect-ratios.js.map +1 -1
  623. package/dist/theme/tokens/blurs.cjs +2 -2
  624. package/dist/theme/tokens/blurs.cjs.map +1 -1
  625. package/dist/theme/tokens/blurs.js +13 -12
  626. package/dist/theme/tokens/blurs.js.map +1 -1
  627. package/dist/theme/tokens/borders.cjs +2 -2
  628. package/dist/theme/tokens/borders.cjs.map +1 -1
  629. package/dist/theme/tokens/borders.js +6 -9
  630. package/dist/theme/tokens/borders.js.map +1 -1
  631. package/dist/theme/tokens/colors.cjs +2 -2
  632. package/dist/theme/tokens/colors.cjs.map +1 -1
  633. package/dist/theme/tokens/colors.js +78 -77
  634. package/dist/theme/tokens/colors.js.map +1 -1
  635. package/dist/theme/tokens/durations.cjs +2 -2
  636. package/dist/theme/tokens/durations.cjs.map +1 -1
  637. package/dist/theme/tokens/durations.js +14 -13
  638. package/dist/theme/tokens/durations.js.map +1 -1
  639. package/dist/theme/tokens/easings.cjs +3 -3
  640. package/dist/theme/tokens/easings.cjs.map +1 -1
  641. package/dist/theme/tokens/easings.js +24 -92
  642. package/dist/theme/tokens/easings.js.map +1 -1
  643. package/dist/theme/tokens/index.cjs +2 -2
  644. package/dist/theme/tokens/index.cjs.map +1 -1
  645. package/dist/theme/tokens/index.js +36 -35
  646. package/dist/theme/tokens/index.js.map +1 -1
  647. package/dist/theme/tokens/radii.cjs +2 -2
  648. package/dist/theme/tokens/radii.cjs.map +1 -1
  649. package/dist/theme/tokens/radii.js +28 -27
  650. package/dist/theme/tokens/radii.js.map +1 -1
  651. package/dist/theme/tokens/shadows.cjs +2 -2
  652. package/dist/theme/tokens/shadows.cjs.map +1 -1
  653. package/dist/theme/tokens/shadows.js +14 -13
  654. package/dist/theme/tokens/shadows.js.map +1 -1
  655. package/dist/theme/tokens/sizes.cjs +2 -2
  656. package/dist/theme/tokens/sizes.cjs.map +1 -1
  657. package/dist/theme/tokens/sizes.js +35 -84
  658. package/dist/theme/tokens/sizes.js.map +1 -1
  659. package/dist/theme/tokens/spacing.cjs +2 -2
  660. package/dist/theme/tokens/spacing.cjs.map +1 -1
  661. package/dist/theme/tokens/spacing.js +32 -83
  662. package/dist/theme/tokens/spacing.js.map +1 -1
  663. package/dist/theme/tokens/typography.cjs +2 -2
  664. package/dist/theme/tokens/typography.cjs.map +1 -1
  665. package/dist/theme/tokens/typography.js +82 -85
  666. package/dist/theme/tokens/typography.js.map +1 -1
  667. package/dist/theme/tokens/z-index.cjs +2 -2
  668. package/dist/theme/tokens/z-index.cjs.map +1 -1
  669. package/dist/theme/tokens/z-index.js +18 -41
  670. package/dist/theme/tokens/z-index.js.map +1 -1
  671. package/dist/theme/utilities.cjs +2 -2
  672. package/dist/theme/utilities.cjs.map +1 -1
  673. package/dist/theme/utilities.js +15 -16
  674. package/dist/theme/utilities.js.map +1 -1
  675. package/dist/ui.css +2 -1
  676. package/dist/utils/slots.cjs +2 -2
  677. package/dist/utils/slots.cjs.map +1 -1
  678. package/dist/utils/slots.js +42 -40
  679. package/dist/utils/slots.js.map +1 -1
  680. package/package.json +11 -7
  681. package/dist/_virtual/_commonjsHelpers.cjs +0 -2
  682. package/dist/_virtual/_commonjsHelpers.cjs.map +0 -1
  683. package/dist/_virtual/_commonjsHelpers.js +0 -10
  684. package/dist/_virtual/_commonjsHelpers.js.map +0 -1
  685. package/dist/_virtual/cjs.cjs +0 -2
  686. package/dist/_virtual/cjs.cjs.map +0 -1
  687. package/dist/_virtual/cjs.js +0 -9
  688. package/dist/_virtual/cjs.js.map +0 -1
  689. package/dist/_virtual/lodash.cjs +0 -2
  690. package/dist/_virtual/lodash.cjs.map +0 -1
  691. package/dist/_virtual/lodash.js +0 -7
  692. package/dist/_virtual/lodash.js.map +0 -1
  693. package/dist/_virtual/lodash2.cjs +0 -2
  694. package/dist/_virtual/lodash2.cjs.map +0 -1
  695. package/dist/_virtual/lodash2.js +0 -6
  696. package/dist/_virtual/lodash2.js.map +0 -1
  697. package/dist/index.cjs.map +0 -1
  698. package/dist/index.js.map +0 -1
  699. package/dist/node_modules/@pandacss/shared/dist/index.cjs +0 -2
  700. package/dist/node_modules/@pandacss/shared/dist/index.cjs.map +0 -1
  701. package/dist/node_modules/@pandacss/shared/dist/index.js +0 -469
  702. package/dist/node_modules/@pandacss/shared/dist/index.js.map +0 -1
  703. package/dist/node_modules/@zag-js/utils/dist/functions.cjs +0 -2
  704. package/dist/node_modules/@zag-js/utils/dist/functions.cjs.map +0 -1
  705. package/dist/node_modules/@zag-js/utils/dist/functions.js +0 -6
  706. package/dist/node_modules/@zag-js/utils/dist/functions.js.map +0 -1
  707. package/dist/node_modules/lodash/lodash.cjs +0 -21
  708. package/dist/node_modules/lodash/lodash.cjs.map +0 -1
  709. package/dist/node_modules/lodash/lodash.js +0 -3686
  710. package/dist/node_modules/lodash/lodash.js.map +0 -1
@@ -1,176 +1,209 @@
1
1
  "use client";
2
- import { jsxs as p, jsx as e, Fragment as L } from "react/jsx-runtime";
3
- import { createListCollection as U, Combobox as r, Portal as e1, useComboboxItemContext as t1 } from "@ark-ui/react";
4
- import { useState as x, useMemo as P, useCallback as o1, useEffect as n1 } from "react";
5
- import { styled as i } from "@stokelp/styled-system/jsx";
6
- import { l as l1 } from "../../_virtual/lodash.js";
7
- import { combobox as r1 } from "@stokelp/styled-system/recipes";
8
- import { createStyleContext as i1 } from "../../utils/slots.js";
9
- import { ConditionalWrapper as v } from "../../shared/ConditionalWrapper.js";
10
- import { Text as Z } from "../text/Text.js";
11
- import { Tooltip as B } from "../tooltip/Tooltip.js";
12
- import { FixedSizeList as c1 } from "react-window";
13
- import { css as z } from "@stokelp/styled-system/css";
14
- import { Input as s1 } from "../input/Input.js";
15
- const { withProvider: h1, withContext: h } = i1(r1), u1 = h1(i(r.Root), "root", {
16
- defaultProps: {
17
- loopFocus: !0
18
- }
19
- }), a1 = h(i(r.ClearTrigger), "clearTrigger"), d1 = h(i(r.Content), "content"), p1 = h(i(r.Input), "input"), C1 = h(i(r.Control), "control"), S = h(i(r.Item), "item"), g1 = h(i(r.ItemText), "itemText"), f1 = h(i(r.Positioner), "positioner"), m1 = h(i(r.Trigger), "trigger"), w1 = () => /* @__PURE__ */ p("svg", { width: "16", height: "17", viewBox: "0 0 16 17", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
20
- /* @__PURE__ */ e("rect", { x: "0.5", y: "1", width: "15", height: "15", rx: "3.5", fill: "white" }),
21
- /* @__PURE__ */ e("rect", { x: "0.5", y: "1", width: "15", height: "15", rx: "3.5", className: z({ stroke: "grey.100" }) })
22
- ] }), x1 = () => /* @__PURE__ */ p("svg", { width: "16", height: "17", viewBox: "0 0 16 17", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
23
- /* @__PURE__ */ e("rect", { y: "0.5", width: "16", height: "16", rx: "4", className: z({ fill: "primary.500" }) }),
24
- /* @__PURE__ */ e(
25
- "path",
26
- {
27
- fillRule: "evenodd",
28
- clipRule: "evenodd",
29
- 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",
30
- fill: "white"
31
- }
32
- )
33
- ] });
34
- function V({ item: l, isMultiple: c, renderItem: u }) {
35
- const f = t1();
36
- return /* @__PURE__ */ p(L, { children: [
37
- c ? f.selected ? /* @__PURE__ */ e(x1, {}) : /* @__PURE__ */ e(w1, {}) : null,
38
- u ? u(l) : /* @__PURE__ */ e(g1, { truncate: !0, children: l.label })
39
- ] });
2
+ import { createStyleContext as e } from "../../utils/slots.js";
3
+ import { Tooltip as t } from "../tooltip/Tooltip.js";
4
+ import { Text as n } from "../text/Text.js";
5
+ import { ConditionalWrapper as r } from "../../shared/ConditionalWrapper.js";
6
+ import { Input as ee } from "../input/Input.js";
7
+ import { Combobox as i, Portal as a, createListCollection as o, useComboboxItemContext as s } from "@ark-ui/react";
8
+ import { styled as c } from "@stokelp/styled-system/jsx";
9
+ import { combobox as l } from "@stokelp/styled-system/recipes";
10
+ import { useCallback as u, useEffect as d, useMemo as f, useState as p } from "react";
11
+ import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
12
+ import { css as _ } from "@stokelp/styled-system/css";
13
+ import { FixedSizeList as v } from "react-window";
14
+ import { debounce as y } from "lodash";
15
+ //#region src/components/combobox/Combobox.tsx
16
+ var { withProvider: b, withContext: x } = e(l), S = b(c(i.Root), "root", { defaultProps: { loopFocus: !0 } }), te = x(c(i.ClearTrigger), "clearTrigger"), C = x(c(i.Content), "content"), w = x(c(i.Input), "input"), T = x(c(i.Control), "control"), E = x(c(i.Item), "item"), D = x(c(i.ItemText), "itemText"), O = x(c(i.Positioner), "positioner"), k = x(c(i.Trigger), "trigger"), A = () => /* @__PURE__ */ g("svg", {
17
+ width: "16",
18
+ height: "17",
19
+ viewBox: "0 0 16 17",
20
+ fill: "none",
21
+ xmlns: "http://www.w3.org/2000/svg",
22
+ children: [/* @__PURE__ */ h("rect", {
23
+ x: "0.5",
24
+ y: "1",
25
+ width: "15",
26
+ height: "15",
27
+ rx: "3.5",
28
+ fill: "white"
29
+ }), /* @__PURE__ */ h("rect", {
30
+ x: "0.5",
31
+ y: "1",
32
+ width: "15",
33
+ height: "15",
34
+ rx: "3.5",
35
+ className: _({ stroke: "grey.100" })
36
+ })]
37
+ }), j = () => /* @__PURE__ */ g("svg", {
38
+ width: "16",
39
+ height: "17",
40
+ viewBox: "0 0 16 17",
41
+ fill: "none",
42
+ xmlns: "http://www.w3.org/2000/svg",
43
+ children: [/* @__PURE__ */ h("rect", {
44
+ y: "0.5",
45
+ width: "16",
46
+ height: "16",
47
+ rx: "4",
48
+ className: _({ fill: "primary.500" })
49
+ }), /* @__PURE__ */ h("path", {
50
+ fillRule: "evenodd",
51
+ clipRule: "evenodd",
52
+ 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",
53
+ fill: "white"
54
+ })]
55
+ });
56
+ function M({ item: e, isMultiple: t, renderItem: n }) {
57
+ let r = s();
58
+ return /* @__PURE__ */ g(m, { children: [t ? r.selected ? /* @__PURE__ */ h(j, {}) : /* @__PURE__ */ h(A, {}) : null, n ? n(e) : /* @__PURE__ */ h(D, {
59
+ truncate: !0,
60
+ children: e.label
61
+ })] });
40
62
  }
41
- const V1 = ({
42
- items: l = [],
43
- initialItems: c,
44
- debounceMs: u = 0,
45
- placeholder: f,
46
- emptyLabel: E,
47
- loadingLabel: O,
48
- usePortal: j = !0,
49
- withAutoFilter: C = !0,
50
- positioning: N,
51
- loadItems: g,
52
- renderItem: b,
53
- onResetInitialItems: y,
54
- isLoading: Q,
55
- value: W,
56
- openDropdownOnFocus: $ = !0,
57
- clearValueWhenEmpty: q = !0,
58
- virtualized: A,
59
- rowHeight: T = 34,
60
- returnItemsOnEmpty: D,
61
- ...M
62
- }) => {
63
- const [G, a] = x(() => l), [J, I] = x(!1), [K, X] = x(!1), m = typeof g == "function", d = P(
64
- () => g ? l1.debounce(async (t) => {
65
- try {
66
- X(!0), I(!0);
67
- const o = await g(t);
68
- a(o);
69
- } catch (o) {
70
- console.error(o), a([]);
71
- } finally {
72
- I(!1);
73
- }
74
- }, u) : null,
75
- [g, u]
76
- ), n = [...G, ...c ?? []], Y = o1(
77
- async (t) => {
78
- c && c.length > 0 && !c.find((s) => s.label === t.inputValue) && y?.();
79
- const { inputValue: o } = t;
80
- if (d)
81
- d(o);
82
- else {
83
- const s = C && o !== "" ? l.filter((F) => F.label.toLowerCase().includes(o.toLowerCase())) : l;
84
- if (s.length === 0 && D)
85
- return a(l);
86
- a(s);
87
- }
88
- },
89
- [d, l, C]
90
- );
91
- n1(() => {
92
- !C && !d && a(l);
93
- }, [l, C, d]);
94
- const _ = P(() => U({ items: n }), [n]), H = Q ?? J, R = O ?? /* @__PURE__ */ e(Z, { p: "space-8", textAlign: "center", children: "Chargement..." }), k = E ?? /* @__PURE__ */ e(Z, { p: "space-8", textAlign: "center", children: "Aucun résultat" }), w = !1;
95
- return /* @__PURE__ */ p(
96
- u1,
97
- {
98
- lazyMount: !0,
99
- unmountOnExit: !0,
100
- collection: _,
101
- positioning: { sameWidth: !0, gutter: 0, ...N },
102
- "data-recipe": "combobox",
103
- onInputValueChange: Y,
104
- value: W,
105
- ...M,
106
- multiple: w,
107
- children: [
108
- /* @__PURE__ */ p(C1, { children: [
109
- /* @__PURE__ */ e(r.Context, { children: (t) => /* @__PURE__ */ e(
110
- p1,
111
- {
112
- asChild: !0,
113
- placeholder: f,
114
- onInput: (o) => {
115
- const s = o.currentTarget.value;
116
- q && s === "" && t.clearValue();
117
- },
118
- onFocus: () => {
119
- !$ || m || t.setOpen(!0);
120
- },
121
- children: /* @__PURE__ */ e(s1, {})
122
- }
123
- ) }),
124
- /* @__PURE__ */ e(m1, { asChild: !0, hidden: m && (!c || c.length === 0), children: /* @__PURE__ */ e("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ e(
125
- "path",
126
- {
127
- fillRule: "evenodd",
128
- clipRule: "evenodd",
129
- 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",
130
- fill: "currentColor"
131
- }
132
- ) }) }),
133
- /* @__PURE__ */ e(a1, { disabled: M.readOnly, onClick: y, asChild: !0, children: /* @__PURE__ */ e("button", { children: /* @__PURE__ */ e("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ e(
134
- "path",
135
- {
136
- fillRule: "evenodd",
137
- clipRule: "evenodd",
138
- 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",
139
- fill: "currentColor"
140
- }
141
- ) }) }) })
142
- ] }),
143
- /* @__PURE__ */ e(v, { when: j, wrapper: (t) => /* @__PURE__ */ e(e1, { children: t }), children: /* @__PURE__ */ e(f1, { children: /* @__PURE__ */ e(d1, { children: H ? R : n.length === 0 ? /* @__PURE__ */ e(L, { children: m ? K ? k : R : k }) : A ? /* @__PURE__ */ e(L, { children: /* @__PURE__ */ e(
144
- c1,
145
- {
146
- height: Math.min(T * n.length, 180),
147
- itemCount: n.length,
148
- itemSize: T,
149
- width: "100%",
150
- children: ({ index: t, style: o }) => /* @__PURE__ */ e(
151
- v,
152
- {
153
- when: !!n[t].tooltip,
154
- wrapper: (s) => /* @__PURE__ */ e(B, { label: n[t].tooltip, children: s }),
155
- children: /* @__PURE__ */ e(S, { item: n[t], style: o, children: /* @__PURE__ */ e(V, { renderItem: b, item: n[t], isMultiple: w }) }, n[t].value)
156
- },
157
- n[t].value
158
- )
159
- }
160
- ) }) : n.map((t) => /* @__PURE__ */ e(
161
- v,
162
- {
163
- when: !!t.tooltip,
164
- wrapper: (o) => /* @__PURE__ */ e(B, { label: t.tooltip, children: o }),
165
- children: /* @__PURE__ */ e(S, { item: t, children: /* @__PURE__ */ e(V, { renderItem: b, item: t, isMultiple: w }) }, t.value)
166
- },
167
- t.value
168
- )) }) }) })
169
- ]
170
- }
171
- );
63
+ var N = ({ items: e = [], initialItems: s, debounceMs: c = 0, placeholder: l, emptyLabel: _, loadingLabel: b, usePortal: x = !0, withAutoFilter: D = !0, positioning: A, loadItems: j, renderItem: N, onResetInitialItems: P, isLoading: F, value: I, openDropdownOnFocus: L = !0, clearValueWhenEmpty: R = !0, virtualized: z, rowHeight: B = 34, returnItemsOnEmpty: V, ...H }) => {
64
+ let [U, W] = p(() => e), [G, K] = p(!1), [q, J] = p(!1), Y = typeof j == "function", X = f(() => j ? y(async (e) => {
65
+ try {
66
+ J(!0), K(!0), W(await j(e));
67
+ } catch (e) {
68
+ console.error(e), W([]);
69
+ } finally {
70
+ K(!1);
71
+ }
72
+ }, c) : null, [j, c]), Z = [...U, ...s ?? []], ne = u(async (t) => {
73
+ s && s.length > 0 && !s.find((e) => e.label === t.inputValue) && P?.();
74
+ let { inputValue: n } = t;
75
+ if (X) X(n);
76
+ else {
77
+ let t = D && n !== "" ? e.filter((e) => e.label.toLowerCase().includes(n.toLowerCase())) : e;
78
+ if (t.length === 0 && V) return W(e);
79
+ W(t);
80
+ }
81
+ }, [
82
+ X,
83
+ e,
84
+ D
85
+ ]);
86
+ d(() => {
87
+ !D && !X && W(e);
88
+ }, [
89
+ e,
90
+ D,
91
+ X
92
+ ]);
93
+ let re = f(() => o({ items: Z }), [Z]), ie = F ?? G, Q = b ?? /* @__PURE__ */ h(n, {
94
+ p: "space-8",
95
+ textAlign: "center",
96
+ children: "Chargement..."
97
+ }), $ = _ ?? /* @__PURE__ */ h(n, {
98
+ p: "space-8",
99
+ textAlign: "center",
100
+ children: "Aucun résultat"
101
+ });
102
+ return /* @__PURE__ */ g(S, {
103
+ lazyMount: !0,
104
+ unmountOnExit: !0,
105
+ collection: re,
106
+ positioning: {
107
+ sameWidth: !0,
108
+ gutter: 0,
109
+ ...A
110
+ },
111
+ "data-recipe": "combobox",
112
+ onInputValueChange: ne,
113
+ value: I,
114
+ ...H,
115
+ multiple: !1,
116
+ children: [/* @__PURE__ */ g(T, { children: [
117
+ /* @__PURE__ */ h(i.Context, { children: (e) => /* @__PURE__ */ h(w, {
118
+ asChild: !0,
119
+ placeholder: l,
120
+ onInput: (t) => {
121
+ let n = t.currentTarget.value;
122
+ R && n === "" && e.clearValue();
123
+ },
124
+ onFocus: () => {
125
+ !L || Y || e.setOpen(!0);
126
+ },
127
+ children: /* @__PURE__ */ h(ee, {})
128
+ }) }),
129
+ /* @__PURE__ */ h(k, {
130
+ asChild: !0,
131
+ hidden: Y && (!s || s.length === 0),
132
+ children: /* @__PURE__ */ h("svg", {
133
+ width: "24",
134
+ height: "24",
135
+ viewBox: "0 0 24 24",
136
+ fill: "none",
137
+ xmlns: "http://www.w3.org/2000/svg",
138
+ children: /* @__PURE__ */ h("path", {
139
+ fillRule: "evenodd",
140
+ clipRule: "evenodd",
141
+ 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",
142
+ fill: "currentColor"
143
+ })
144
+ })
145
+ }),
146
+ /* @__PURE__ */ h(te, {
147
+ disabled: H.readOnly,
148
+ onClick: P,
149
+ asChild: !0,
150
+ children: /* @__PURE__ */ h("button", { children: /* @__PURE__ */ h("svg", {
151
+ width: "20",
152
+ height: "20",
153
+ viewBox: "0 0 20 20",
154
+ fill: "none",
155
+ xmlns: "http://www.w3.org/2000/svg",
156
+ children: /* @__PURE__ */ h("path", {
157
+ fillRule: "evenodd",
158
+ clipRule: "evenodd",
159
+ 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",
160
+ fill: "currentColor"
161
+ })
162
+ }) })
163
+ })
164
+ ] }), /* @__PURE__ */ h(r, {
165
+ when: x,
166
+ wrapper: (e) => /* @__PURE__ */ h(a, { children: e }),
167
+ children: /* @__PURE__ */ h(O, { children: /* @__PURE__ */ h(C, { children: ie ? Q : Z.length === 0 ? /* @__PURE__ */ h(m, { children: Y ? q ? $ : Q : $ }) : z ? /* @__PURE__ */ h(m, { children: /* @__PURE__ */ h(v, {
168
+ height: Math.min(B * Z.length, 180),
169
+ itemCount: Z.length,
170
+ itemSize: B,
171
+ width: "100%",
172
+ children: ({ index: e, style: n }) => /* @__PURE__ */ h(r, {
173
+ when: !!Z[e].tooltip,
174
+ wrapper: (n) => /* @__PURE__ */ h(t, {
175
+ label: Z[e].tooltip,
176
+ children: n
177
+ }),
178
+ children: /* @__PURE__ */ h(E, {
179
+ item: Z[e],
180
+ style: n,
181
+ children: /* @__PURE__ */ h(M, {
182
+ renderItem: N,
183
+ item: Z[e],
184
+ isMultiple: !1
185
+ })
186
+ }, Z[e].value)
187
+ }, Z[e].value)
188
+ }) }) : Z.map((e) => /* @__PURE__ */ h(r, {
189
+ when: !!e.tooltip,
190
+ wrapper: (n) => /* @__PURE__ */ h(t, {
191
+ label: e.tooltip,
192
+ children: n
193
+ }),
194
+ children: /* @__PURE__ */ h(E, {
195
+ item: e,
196
+ children: /* @__PURE__ */ h(M, {
197
+ renderItem: N,
198
+ item: e,
199
+ isMultiple: !1
200
+ })
201
+ }, e.value)
202
+ }, e.value)) }) })
203
+ })]
204
+ });
172
205
  };
173
- export {
174
- V1 as Combobox
175
- };
176
- //# sourceMappingURL=Combobox.js.map
206
+ //#endregion
207
+ export { N as Combobox };
208
+
209
+ //# sourceMappingURL=Combobox.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Combobox.js","sources":["../../../src/components/combobox/Combobox.tsx"],"sourcesContent":["import {\n Combobox as ArkCombobox,\n type ComboboxRootProps,\n createListCollection,\n Portal,\n useComboboxItemContext,\n} from '@ark-ui/react'\nimport { FC, ReactNode, useCallback, useEffect, useMemo, useState } from 'react'\nimport { styled } from '@stokelp/styled-system/jsx'\nimport { debounce } from 'lodash'\n\nimport { combobox } from '@stokelp/styled-system/recipes'\nimport { createStyleContext } from '~/utils/slots'\nimport { Input as UIInput } from '~/components/input'\n\nimport { ConditionalWrapper } from '~/shared/ConditionalWrapper'\nimport { Text } from '~/components/text/Text'\nimport { Tooltip } from '~/components/tooltip/Tooltip'\nimport { HTMLStyledProps, RecipeVariantProps } from '@stokelp/styled-system/types'\nimport { FixedSizeList } from 'react-window'\nimport { css } from '@stokelp/styled-system/css'\n\nconst { withProvider, withContext } = createStyleContext(combobox)\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst Root = withProvider(styled(ArkCombobox.Root<any>), 'root', {\n defaultProps: {\n loopFocus: true,\n },\n})\n\nconst ClearTrigger = withContext(styled(ArkCombobox.ClearTrigger), 'clearTrigger')\nconst Content = withContext(styled(ArkCombobox.Content), 'content')\nconst Input = withContext(styled(ArkCombobox.Input), 'input')\nconst Control = withContext(styled(ArkCombobox.Control), 'control')\nconst Item = withContext(styled(ArkCombobox.Item), 'item')\nconst ItemText = withContext(styled(ArkCombobox.ItemText), 'itemText')\nconst Positioner = withContext(styled(ArkCombobox.Positioner), 'positioner')\nconst Trigger = withContext(styled(ArkCombobox.Trigger), 'trigger')\n\nexport type ComboboxItem = {\n value: string | number\n label: string\n disabled?: boolean\n tooltip?: ReactNode\n}\n\nexport type ComboboxProps<T extends ComboboxItem> = Omit<ComboboxRootProps<T>, 'collection' | 'value'> & {\n value?: Array<string | number>\n items?: T[]\n initialItems?: T[]\n renderItem?: (item: T) => ReactNode\n loadItems?: (inputValue: string) => Promise<T[]>\n debounceMs?: number\n emptyLabel?: ReactNode\n loadingLabel?: ReactNode\n placeholder?: string\n usePortal?: boolean\n isLoading?: boolean\n withAutoFilter?: boolean\n onResetInitialItems?: () => void\n openDropdownOnFocus?: boolean\n clearValueWhenEmpty?: boolean\n virtualized?: boolean\n rowHeight?: number\n returnItemsOnEmpty?: boolean\n} & HTMLStyledProps<'div'> &\n RecipeVariantProps<typeof combobox>\n\nconst MultipleUncheckedIndicator: FC = () => (\n <svg width=\"16\" height=\"17\" viewBox=\"0 0 16 17\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <rect x=\"0.5\" y=\"1\" width=\"15\" height=\"15\" rx=\"3.5\" fill=\"white\" />\n <rect x=\"0.5\" y=\"1\" width=\"15\" height=\"15\" rx=\"3.5\" className={css({ stroke: 'grey.100' })} />\n </svg>\n)\n\nconst MultipleCheckedIndicator: FC = () => (\n <svg width=\"16\" height=\"17\" viewBox=\"0 0 16 17\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <rect y=\"0.5\" width=\"16\" height=\"16\" rx=\"4\" className={css({ fill: 'primary.500' })} />\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n 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\"\n fill=\"white\"\n />\n </svg>\n)\n\ninterface InnerItemProps<Item extends ComboboxItem> {\n item: Item\n isMultiple?: boolean\n renderItem?: (item: Item) => ReactNode\n}\n\nfunction CustomInnerItem<Item extends ComboboxItem>({ item, isMultiple, renderItem }: InnerItemProps<Item>) {\n const context = useComboboxItemContext()\n\n return (\n <>\n {isMultiple ? context.selected ? <MultipleCheckedIndicator /> : <MultipleUncheckedIndicator /> : null}\n {renderItem ? renderItem(item) : <ItemText truncate>{item.label}</ItemText>}\n </>\n )\n}\n\nexport const Combobox = <T extends ComboboxItem>({\n items: itemsFromUsers = [],\n initialItems,\n debounceMs = 0,\n placeholder,\n emptyLabel,\n loadingLabel,\n usePortal = true,\n withAutoFilter = true,\n positioning,\n loadItems,\n renderItem,\n onResetInitialItems,\n isLoading: controlledIsLoading,\n value,\n openDropdownOnFocus = true,\n clearValueWhenEmpty = true,\n virtualized,\n rowHeight = 34,\n returnItemsOnEmpty,\n ...props\n}: ComboboxProps<T>) => {\n const [items, setItems] = useState(() => itemsFromUsers)\n const [isLoading, setIsLoading] = useState(false)\n const [firstQueryTriggered, setFirstQueryTriggered] = useState(false)\n const asyncMode = typeof loadItems === 'function'\n\n const debouncedLoadItems = useMemo(\n () =>\n loadItems\n ? debounce(async (value: string) => {\n try {\n setFirstQueryTriggered(true)\n setIsLoading(true)\n const newItems = await loadItems(value)\n setItems(newItems)\n } catch (error) {\n console.error(error)\n setItems([])\n } finally {\n setIsLoading(false)\n }\n }, debounceMs)\n : null,\n [loadItems, debounceMs],\n )\n\n const allItems = [...items, ...(initialItems ?? [])]\n\n const handleInputChange = useCallback(\n async (details: ArkCombobox.InputValueChangeDetails) => {\n if (initialItems && initialItems.length > 0 && !initialItems.find(item => item.label === details.inputValue)) {\n onResetInitialItems?.()\n }\n const { inputValue } = details\n\n if (debouncedLoadItems) {\n debouncedLoadItems(inputValue)\n } else {\n const items =\n withAutoFilter && inputValue !== ''\n ? itemsFromUsers.filter(item => item.label.toLowerCase().includes(inputValue.toLowerCase()))\n : itemsFromUsers\n\n if (items.length === 0 && returnItemsOnEmpty) {\n return setItems(itemsFromUsers)\n }\n setItems(items)\n }\n },\n [debouncedLoadItems, itemsFromUsers, withAutoFilter],\n )\n\n useEffect(() => {\n if (!withAutoFilter && !debouncedLoadItems) {\n setItems(itemsFromUsers)\n }\n }, [itemsFromUsers, withAutoFilter, debouncedLoadItems])\n\n const collection = useMemo(() => createListCollection({ items: allItems }), [allItems])\n\n const effectiveIsLoading = controlledIsLoading ?? isLoading\n\n const loadingContent = loadingLabel ?? (\n <Text p=\"space-8\" textAlign=\"center\">\n Chargement...\n </Text>\n )\n const emptyContent = emptyLabel ?? (\n <Text p=\"space-8\" textAlign=\"center\">\n Aucun résultat\n </Text>\n )\n // TODO: const multiple = props.multiple\n // TODO: multiple design, using input chips https://ark-ui.com/reat/examples/combobox-with-tags-input\n const multiple = false\n\n return (\n <Root\n lazyMount\n unmountOnExit\n collection={collection}\n positioning={{ sameWidth: true, gutter: 0, ...positioning }}\n data-recipe=\"combobox\"\n onInputValueChange={handleInputChange}\n value={value as string[] | undefined}\n {...props}\n // TODO: multiple design\n multiple={multiple}\n >\n <Control>\n <ArkCombobox.Context>\n {api => (\n <Input\n asChild\n placeholder={placeholder}\n onInput={e => {\n const value = e.currentTarget.value\n\n if (clearValueWhenEmpty && value === '') {\n api.clearValue()\n }\n }}\n onFocus={() => {\n if (!openDropdownOnFocus || asyncMode) return\n api.setOpen(true)\n }}\n >\n <UIInput />\n </Input>\n )}\n </ArkCombobox.Context>\n <Trigger asChild hidden={asyncMode && (!initialItems || initialItems.length === 0)}>\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n 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\"\n fill=\"currentColor\"\n />\n </svg>\n </Trigger>\n <ClearTrigger disabled={props.readOnly} onClick={onResetInitialItems} asChild>\n <button>\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n 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\"\n fill=\"currentColor\"\n />\n </svg>\n </button>\n </ClearTrigger>\n </Control>\n <ConditionalWrapper when={usePortal} wrapper={children => <Portal>{children}</Portal>}>\n <Positioner>\n <Content>\n {effectiveIsLoading ? (\n loadingContent\n ) : allItems.length === 0 ? (\n <>{asyncMode ? (firstQueryTriggered ? emptyContent : loadingContent) : emptyContent}</>\n ) : virtualized ? (\n <>\n <FixedSizeList\n height={Math.min(rowHeight * allItems.length, 180)}\n itemCount={allItems.length}\n itemSize={rowHeight}\n width=\"100%\"\n >\n {({ index, style }) => (\n <ConditionalWrapper\n key={allItems[index].value}\n when={!!allItems[index].tooltip}\n wrapper={children => <Tooltip label={allItems[index].tooltip}>{children}</Tooltip>}\n >\n <Item key={allItems[index].value} item={allItems[index]} style={style}>\n <CustomInnerItem renderItem={renderItem} item={allItems[index]} isMultiple={multiple} />\n </Item>\n </ConditionalWrapper>\n )}\n </FixedSizeList>\n </>\n ) : (\n allItems.map(item => (\n <ConditionalWrapper\n key={item.value}\n when={!!item.tooltip}\n wrapper={children => <Tooltip label={item.tooltip}>{children}</Tooltip>}\n >\n <Item key={item.value} item={item}>\n <CustomInnerItem renderItem={renderItem} item={item} isMultiple={multiple} />\n </Item>\n </ConditionalWrapper>\n ))\n )}\n </Content>\n </Positioner>\n </ConditionalWrapper>\n </Root>\n )\n}\n"],"names":["withProvider","withContext","createStyleContext","combobox","Root","styled","ArkCombobox","ClearTrigger","Content","Input","Control","Item","ItemText","Positioner","Trigger","MultipleUncheckedIndicator","jsxs","jsx","css","MultipleCheckedIndicator","CustomInnerItem","item","isMultiple","renderItem","context","useComboboxItemContext","Fragment","Combobox","itemsFromUsers","initialItems","debounceMs","placeholder","emptyLabel","loadingLabel","usePortal","withAutoFilter","positioning","loadItems","onResetInitialItems","controlledIsLoading","value","openDropdownOnFocus","clearValueWhenEmpty","virtualized","rowHeight","returnItemsOnEmpty","props","items","setItems","useState","isLoading","setIsLoading","firstQueryTriggered","setFirstQueryTriggered","asyncMode","debouncedLoadItems","useMemo","debounce","newItems","error","allItems","handleInputChange","useCallback","details","inputValue","useEffect","collection","createListCollection","effectiveIsLoading","loadingContent","Text","emptyContent","multiple","api","e","UIInput","ConditionalWrapper","children","Portal","FixedSizeList","index","style","Tooltip"],"mappings":";;;;;;;;;;;;;;AAsBA,MAAM,EAAE,cAAAA,IAAc,aAAAC,MAAgBC,GAAmBC,EAAQ,GAG3DC,KAAOJ,GAAaK,EAAOC,EAAY,IAAS,GAAG,QAAQ;AAAA,EAC/D,cAAc;AAAA,IACZ,WAAW;AAAA,EAAA;AAEf,CAAC,GAEKC,KAAeN,EAAYI,EAAOC,EAAY,YAAY,GAAG,cAAc,GAC3EE,KAAUP,EAAYI,EAAOC,EAAY,OAAO,GAAG,SAAS,GAC5DG,KAAQR,EAAYI,EAAOC,EAAY,KAAK,GAAG,OAAO,GACtDI,KAAUT,EAAYI,EAAOC,EAAY,OAAO,GAAG,SAAS,GAC5DK,IAAOV,EAAYI,EAAOC,EAAY,IAAI,GAAG,MAAM,GACnDM,KAAWX,EAAYI,EAAOC,EAAY,QAAQ,GAAG,UAAU,GAC/DO,KAAaZ,EAAYI,EAAOC,EAAY,UAAU,GAAG,YAAY,GACrEQ,KAAUb,EAAYI,EAAOC,EA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,QAAA,CAQb,EAAA,CAEL,EAAA,CACF,EAAA,CACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"Combobox.js","names":[],"sources":["../../../src/components/combobox/Combobox.tsx"],"sourcesContent":["import {\n Combobox as ArkCombobox,\n type ComboboxRootProps,\n createListCollection,\n Portal,\n useComboboxItemContext,\n} from '@ark-ui/react'\nimport { FC, ReactNode, useCallback, useEffect, useMemo, useState } from 'react'\nimport { styled } from '@stokelp/styled-system/jsx'\nimport { debounce } from 'lodash'\n\nimport { combobox } from '@stokelp/styled-system/recipes'\nimport { createStyleContext } from '~/utils/slots'\nimport { Input as UIInput } from '~/components/input'\n\nimport { ConditionalWrapper } from '~/shared/ConditionalWrapper'\nimport { Text } from '~/components/text/Text'\nimport { Tooltip } from '~/components/tooltip/Tooltip'\nimport { HTMLStyledProps, RecipeVariantProps } from '@stokelp/styled-system/types'\nimport { FixedSizeList } from 'react-window'\nimport { css } from '@stokelp/styled-system/css'\n\nconst { withProvider, withContext } = createStyleContext(combobox)\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst Root = withProvider(styled(ArkCombobox.Root<any>), 'root', {\n defaultProps: {\n loopFocus: true,\n },\n})\n\nconst ClearTrigger = withContext(styled(ArkCombobox.ClearTrigger), 'clearTrigger')\nconst Content = withContext(styled(ArkCombobox.Content), 'content')\nconst Input = withContext(styled(ArkCombobox.Input), 'input')\nconst Control = withContext(styled(ArkCombobox.Control), 'control')\nconst Item = withContext(styled(ArkCombobox.Item), 'item')\nconst ItemText = withContext(styled(ArkCombobox.ItemText), 'itemText')\nconst Positioner = withContext(styled(ArkCombobox.Positioner), 'positioner')\nconst Trigger = withContext(styled(ArkCombobox.Trigger), 'trigger')\n\nexport type ComboboxItem = {\n value: string | number\n label: string\n disabled?: boolean\n tooltip?: ReactNode\n}\n\nexport type ComboboxProps<T extends ComboboxItem> = Omit<ComboboxRootProps<T>, 'collection' | 'value'> & {\n value?: Array<string | number>\n items?: T[]\n initialItems?: T[]\n renderItem?: (item: T) => ReactNode\n loadItems?: (inputValue: string) => Promise<T[]>\n debounceMs?: number\n emptyLabel?: ReactNode\n loadingLabel?: ReactNode\n placeholder?: string\n usePortal?: boolean\n isLoading?: boolean\n withAutoFilter?: boolean\n onResetInitialItems?: () => void\n openDropdownOnFocus?: boolean\n clearValueWhenEmpty?: boolean\n virtualized?: boolean\n rowHeight?: number\n returnItemsOnEmpty?: boolean\n} & HTMLStyledProps<'div'> &\n RecipeVariantProps<typeof combobox>\n\nconst MultipleUncheckedIndicator: FC = () => (\n <svg width=\"16\" height=\"17\" viewBox=\"0 0 16 17\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <rect x=\"0.5\" y=\"1\" width=\"15\" height=\"15\" rx=\"3.5\" fill=\"white\" />\n <rect x=\"0.5\" y=\"1\" width=\"15\" height=\"15\" rx=\"3.5\" className={css({ stroke: 'grey.100' })} />\n </svg>\n)\n\nconst MultipleCheckedIndicator: FC = () => (\n <svg width=\"16\" height=\"17\" viewBox=\"0 0 16 17\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <rect y=\"0.5\" width=\"16\" height=\"16\" rx=\"4\" className={css({ fill: 'primary.500' })} />\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n 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\"\n fill=\"white\"\n />\n </svg>\n)\n\ninterface InnerItemProps<Item extends ComboboxItem> {\n item: Item\n isMultiple?: boolean\n renderItem?: (item: Item) => ReactNode\n}\n\nfunction CustomInnerItem<Item extends ComboboxItem>({ item, isMultiple, renderItem }: InnerItemProps<Item>) {\n const context = useComboboxItemContext()\n\n return (\n <>\n {isMultiple ? context.selected ? <MultipleCheckedIndicator /> : <MultipleUncheckedIndicator /> : null}\n {renderItem ? renderItem(item) : <ItemText truncate>{item.label}</ItemText>}\n </>\n )\n}\n\nexport const Combobox = <T extends ComboboxItem>({\n items: itemsFromUsers = [],\n initialItems,\n debounceMs = 0,\n placeholder,\n emptyLabel,\n loadingLabel,\n usePortal = true,\n withAutoFilter = true,\n positioning,\n loadItems,\n renderItem,\n onResetInitialItems,\n isLoading: controlledIsLoading,\n value,\n openDropdownOnFocus = true,\n clearValueWhenEmpty = true,\n virtualized,\n rowHeight = 34,\n returnItemsOnEmpty,\n ...props\n}: ComboboxProps<T>) => {\n const [items, setItems] = useState(() => itemsFromUsers)\n const [isLoading, setIsLoading] = useState(false)\n const [firstQueryTriggered, setFirstQueryTriggered] = useState(false)\n const asyncMode = typeof loadItems === 'function'\n\n const debouncedLoadItems = useMemo(\n () =>\n loadItems\n ? debounce(async (value: string) => {\n try {\n setFirstQueryTriggered(true)\n setIsLoading(true)\n const newItems = await loadItems(value)\n setItems(newItems)\n } catch (error) {\n console.error(error)\n setItems([])\n } finally {\n setIsLoading(false)\n }\n }, debounceMs)\n : null,\n [loadItems, debounceMs],\n )\n\n const allItems = [...items, ...(initialItems ?? [])]\n\n const handleInputChange = useCallback(\n async (details: ArkCombobox.InputValueChangeDetails) => {\n if (\n initialItems &&\n initialItems.length > 0 &&\n !initialItems.find((item: ComboboxItem) => item.label === details.inputValue)\n ) {\n onResetInitialItems?.()\n }\n const { inputValue } = details\n\n if (debouncedLoadItems) {\n debouncedLoadItems(inputValue)\n } else {\n const items =\n withAutoFilter && inputValue !== ''\n ? itemsFromUsers.filter((item: ComboboxItem) => item.label.toLowerCase().includes(inputValue.toLowerCase()))\n : itemsFromUsers\n\n if (items.length === 0 && returnItemsOnEmpty) {\n return setItems(itemsFromUsers)\n }\n setItems(items)\n }\n },\n [debouncedLoadItems, itemsFromUsers, withAutoFilter],\n )\n\n useEffect(() => {\n if (!withAutoFilter && !debouncedLoadItems) {\n setItems(itemsFromUsers)\n }\n }, [itemsFromUsers, withAutoFilter, debouncedLoadItems])\n\n const collection = useMemo(() => createListCollection({ items: allItems }), [allItems])\n\n const effectiveIsLoading = controlledIsLoading ?? isLoading\n\n const loadingContent = loadingLabel ?? (\n <Text p=\"space-8\" textAlign=\"center\">\n Chargement...\n </Text>\n )\n const emptyContent = emptyLabel ?? (\n <Text p=\"space-8\" textAlign=\"center\">\n Aucun résultat\n </Text>\n )\n // TODO: const multiple = props.multiple\n // TODO: multiple design, using input chips https://ark-ui.com/reat/examples/combobox-with-tags-input\n const multiple = false\n\n return (\n <Root\n lazyMount\n unmountOnExit\n collection={collection}\n positioning={{ sameWidth: true, gutter: 0, ...positioning }}\n data-recipe=\"combobox\"\n onInputValueChange={handleInputChange}\n value={value as string[] | undefined}\n {...props}\n // TODO: multiple design\n multiple={multiple}\n >\n <Control>\n <ArkCombobox.Context>\n {api => (\n <Input\n asChild\n placeholder={placeholder}\n onInput={(e: React.FormEvent<HTMLInputElement>) => {\n const value = e.currentTarget.value\n\n if (clearValueWhenEmpty && value === '') {\n api.clearValue()\n }\n }}\n onFocus={() => {\n if (!openDropdownOnFocus || asyncMode) return\n api.setOpen(true)\n }}\n >\n <UIInput />\n </Input>\n )}\n </ArkCombobox.Context>\n <Trigger asChild hidden={asyncMode && (!initialItems || initialItems.length === 0)}>\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n 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\"\n fill=\"currentColor\"\n />\n </svg>\n </Trigger>\n <ClearTrigger disabled={props.readOnly} onClick={onResetInitialItems} asChild>\n <button>\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n 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\"\n fill=\"currentColor\"\n />\n </svg>\n </button>\n </ClearTrigger>\n </Control>\n <ConditionalWrapper when={usePortal} wrapper={children => <Portal>{children}</Portal>}>\n <Positioner>\n <Content>\n {effectiveIsLoading ? (\n loadingContent\n ) : allItems.length === 0 ? (\n <>{asyncMode ? (firstQueryTriggered ? emptyContent : loadingContent) : emptyContent}</>\n ) : virtualized ? (\n <>\n <FixedSizeList\n height={Math.min(rowHeight * allItems.length, 180)}\n itemCount={allItems.length}\n itemSize={rowHeight}\n width=\"100%\"\n >\n {({ index, style }) => (\n <ConditionalWrapper\n key={allItems[index].value}\n when={!!allItems[index].tooltip}\n wrapper={children => <Tooltip label={allItems[index].tooltip}>{children}</Tooltip>}\n >\n <Item key={allItems[index].value} item={allItems[index]} style={style}>\n <CustomInnerItem renderItem={renderItem} item={allItems[index]} isMultiple={multiple} />\n </Item>\n </ConditionalWrapper>\n )}\n </FixedSizeList>\n </>\n ) : (\n allItems.map(item => (\n <ConditionalWrapper\n key={item.value}\n when={!!item.tooltip}\n wrapper={children => <Tooltip label={item.tooltip}>{children}</Tooltip>}\n >\n <Item key={item.value} item={item}>\n <CustomInnerItem renderItem={renderItem} item={item} isMultiple={multiple} />\n </Item>\n </ConditionalWrapper>\n ))\n )}\n </Content>\n </Positioner>\n </ConditionalWrapper>\n </Root>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;AAsBA,IAAM,EAAE,iBAAc,mBAAgB,EAAmB,CAAQ,GAG3D,IAAO,EAAa,EAAO,EAAY,IAAS,GAAG,QAAQ,EAC/D,cAAc,EACZ,WAAW,GACb,EACF,CAAC,GAEK,KAAe,EAAY,EAAO,EAAY,YAAY,GAAG,cAAc,GAC3E,IAAU,EAAY,EAAO,EAAY,OAAO,GAAG,SAAS,GAC5D,IAAQ,EAAY,EAAO,EAAY,KAAK,GAAG,OAAO,GACtD,IAAU,EAAY,EAAO,EAAY,OAAO,GAAG,SAAS,GAC5D,IAAO,EAAY,EAAO,EAAY,IAAI,GAAG,MAAM,GACnD,IAAW,EAAY,EAAO,EAAY,QAAQ,GAAG,UAAU,GAC/D,IAAa,EAAY,EAAO,EAAY,UAAU,GAAG,YAAY,GACrE,IAAU,EAAY,EAAO,EAAY,OAAO,GAAG,SAAS,GA+B5D,UACJ,kBAAC,OAAD;CAAK,OAAM;CAAK,QAAO;CAAK,SAAQ;CAAY,MAAK;CAAO,OAAM;WAAlE,CACE,kBAAC,QAAD;EAAM,GAAE;EAAM,GAAE;EAAI,OAAM;EAAK,QAAO;EAAK,IAAG;EAAM,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AAM,CAAC,CAAC,EAAS,GAAO;KACxB,UAAS,MAAY,kBAAC,GAAD;MAAS,OAAO,EAAS,GAAO;MAAU;KAAkB,CAAA;eAEjF,kBAAC,GAAD;MAAkC,MAAM,EAAS;MAAe;gBAC9D,kBAAC,GAAD;OAA6B;OAAY,MAAM,EAAS;OAAQ,YAAY;MAAW,CAAA;KACnF,GAFK,EAAS,GAAO,KAErB;IACY,GAPb,EAAS,GAAO,KAOH;GAET,CAAA,EACf,CAAA,IAEF,EAAS,KAAI,MACX,kBAAC,GAAD;IAEE,MAAM,CAAC,CAAC,EAAK;IACb,UAAS,MAAY,kBAAC,GAAD;KAAS,OAAO,EAAK;KAAU;IAAkB,CAAA;cAEtE,kBAAC,GAAD;KAA6B;eAC3B,kBAAC,GAAD;MAA6B;MAAkB;MAAM,YAAY;KAAW,CAAA;IACxE,GAFK,EAAK,KAEV;GACY,GAPb,EAAK,KAOQ,CACrB,EAEI,CAAA,EACC,CAAA;EACM,CAAA,CAChB;;AAEV"}
@@ -1,2 +1,2 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),p=require("@stokelp/styled-system/recipes"),t=require("@ark-ui/react"),H=require("../../utils/slots.cjs"),T=require("@stokelp/styled-system/jsx"),d=require("../input/InputGroup.cjs"),h=require("../input/InputAddon.cjs"),u=require("../icon-button/IconButton.cjs"),x=require("../input/Input.cjs"),{withProvider:b,withContext:r}=H.createStyleContext(p.datepicker),M=b(t.DatePicker.Root,"root",{defaultProps:{positioning:{placement:"bottom-start"},view:"day",locale:"fr",unmountOnExit:!0,lazyMount:!0,startOfWeek:6}}),L=r(t.DatePicker.Content,"content"),f=r(t.DatePicker.Control,"control"),g=r(t.DatePicker.Input,"input"),Z=r(t.DatePicker.MonthSelect,"monthSelect"),I=r(t.DatePicker.NextTrigger,"nextTrigger"),R=r(t.DatePicker.Positioner,"positioner"),m=r(t.DatePicker.PrevTrigger,"prevTrigger"),y=r(t.DatePicker.TableBody,"tableBody"),B=r(t.DatePicker.TableCell,"tableCell"),S=r(t.DatePicker.TableCellTrigger,"tableCellTrigger"),q=r(t.DatePicker.TableHead,"tableHead"),A=r(t.DatePicker.TableHeader,"tableHeader"),O=r(t.DatePicker.Table,"table"),j=r(t.DatePicker.TableRow,"tableRow"),P=r(t.DatePicker.Trigger,"trigger"),z=r(t.DatePicker.ViewControl,"viewControl"),G=r(t.DatePicker.View,"view"),N=r(t.DatePicker.YearSelect,"yearSelect"),k=r(T.styled(t.DatePicker.ClearTrigger),"clearTrigger"),v=()=>e.jsx("svg",{width:"23",height:"24",viewBox:"0 0 23 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.46875 2.25C6.8657 2.25 7.1875 2.58579 7.1875 3V4.5H15.8125V3C15.8125 2.58579 16.1343 2.25 16.5312 2.25C16.9282 2.25 17.25 2.58579 17.25 3V4.5H17.9688C19.5566 4.5 20.8438 5.84315 20.8438 7.5V18.75C20.8438 20.4069 19.5566 21.75 17.9688 21.75H5.03125C3.44343 21.75 2.15625 20.4069 2.15625 18.75V7.5C2.15625 5.84315 3.44343 4.5 5.03125 4.5H5.75V3C5.75 2.58579 6.0718 2.25 6.46875 2.25ZM5.03125 6C4.23734 6 3.59375 6.67157 3.59375 7.5V8.65135C4.01662 8.39609 4.50759 8.25 5.03125 8.25H17.9688C18.4924 8.25 18.9834 8.39609 19.4062 8.65135V7.5C19.4062 6.67157 18.7627 6 17.9688 6H5.03125ZM19.4062 11.25C19.4062 10.4216 18.7627 9.75 17.9688 9.75H5.03125C4.23734 9.75 3.59375 10.4216 3.59375 11.25V18.75C3.59375 19.5784 4.23734 20.25 5.03125 20.25H17.9688C18.7627 20.25 19.4062 19.5784 19.4062 18.75V11.25ZM10.7812 12.75C10.7812 12.3358 11.103 12 11.5 12H11.5072C11.9041 12 12.2259 12.3358 12.2259 12.75V12.7575C12.2259 13.1717 11.9041 13.5075 11.5072 13.5075H11.5C11.103 13.5075 10.7812 13.1717 10.7812 12.7575V12.75ZM12.9375 12.75C12.9375 12.3358 13.2593 12 13.6562 12H13.6634C14.0604 12 14.3822 12.3358 14.3822 12.75V12.7575C14.3822 13.1717 14.0604 13.5075 13.6634 13.5075H13.6562C13.2593 13.5075 12.9375 13.1717 12.9375 12.7575V12.75ZM15.0938 12.75C15.0938 12.3358 15.4155 12 15.8125 12H15.8197C16.2166 12 16.5384 12.3358 16.5384 12.75V12.7575C16.5384 13.1717 16.2166 13.5075 15.8197 13.5075H15.8125C15.4155 13.5075 15.0938 13.1717 15.0938 12.7575V12.75ZM6.46875 15C6.46875 14.5858 6.79054 14.25 7.1875 14.25H7.19469C7.59164 14.25 7.91344 14.5858 7.91344 15V15.0075C7.91344 15.4217 7.59164 15.7575 7.19469 15.7575H7.1875C6.79054 15.7575 6.46875 15.4217 6.46875 15.0075V15ZM8.625 15C8.625 14.5858 8.94679 14.25 9.34375 14.25H9.35094C9.74789 14.25 10.0697 14.5858 10.0697 15V15.0075C10.0697 15.4217 9.74789 15.7575 9.35094 15.7575H9.34375C8.94679 15.7575 8.625 15.4217 8.625 15.0075V15ZM10.7812 15C10.7812 14.5858 11.103 14.25 11.5 14.25H11.5072C11.9041 14.25 12.2259 14.5858 12.2259 15V15.0075C12.2259 15.4217 11.9041 15.7575 11.5072 15.7575H11.5C11.103 15.7575 10.7812 15.4217 10.7812 15.0075V15ZM12.9375 15C12.9375 14.5858 13.2593 14.25 13.6562 14.25H13.6634C14.0604 14.25 14.3822 14.5858 14.3822 15V15.0075C14.3822 15.4217 14.0604 15.7575 13.6634 15.7575H13.6562C13.2593 15.7575 12.9375 15.4217 12.9375 15.0075V15ZM15.0938 15C15.0938 14.5858 15.4155 14.25 15.8125 14.25H15.8197C16.2166 14.25 16.5384 14.5858 16.5384 15V15.0075C16.5384 15.4217 16.2166 15.7575 15.8197 15.7575H15.8125C15.4155 15.7575 15.0938 15.4217 15.0938 15.0075V15ZM6.46875 17.25C6.46875 16.8358 6.79054 16.5 7.1875 16.5H7.19469C7.59164 16.5 7.91344 16.8358 7.91344 17.25V17.2575C7.91344 17.6717 7.59164 18.0075 7.19469 18.0075H7.1875C6.79054 18.0075 6.46875 17.6717 6.46875 17.2575V17.25ZM8.625 17.25C8.625 16.8358 8.94679 16.5 9.34375 16.5H9.35094C9.74789 16.5 10.0697 16.8358 10.0697 17.25V17.2575C10.0697 17.6717 9.74789 18.0075 9.35094 18.0075H9.34375C8.94679 18.0075 8.625 17.6717 8.625 17.2575V17.25ZM10.7812 17.25C10.7812 16.8358 11.103 16.5 11.5 16.5H11.5072C11.9041 16.5 12.2259 16.8358 12.2259 17.25V17.2575C12.2259 17.6717 11.9041 18.0075 11.5072 18.0075H11.5C11.103 18.0075 10.7812 17.6717 10.7812 17.2575V17.25ZM12.9375 17.25C12.9375 16.8358 13.2593 16.5 13.6562 16.5H13.6634C14.0604 16.5 14.3822 16.8358 14.3822 17.25V17.2575C14.3822 17.6717 14.0604 18.0075 13.6634 18.0075H13.6562C13.2593 18.0075 12.9375 17.6717 12.9375 17.2575V17.25Z",fill:"currentColor"})}),Y=()=>e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.14645 8.35355C4.95118 8.15829 4.95118 7.84171 5.14645 7.64645L10.1464 2.64645C10.3417 2.45119 10.6583 2.45119 10.8536 2.64645C11.0488 2.84171 11.0488 3.15829 10.8536 3.35355L6.20711 8L10.8536 12.6464C11.0488 12.8417 11.0488 13.1583 10.8536 13.3536C10.6583 13.5488 10.3417 13.5488 10.1464 13.3536L5.14645 8.35355Z",fill:"currentColor"})}),F=()=>e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.8536 7.64645C11.0488 7.84171 11.0488 8.15829 10.8536 8.35355L5.85355 13.3536C5.65829 13.5488 5.34171 13.5488 5.14645 13.3536C4.95118 13.1583 4.95118 12.8417 5.14645 12.6464L9.79289 8L5.14645 3.35355C4.95118 3.15829 4.95118 2.84171 5.14645 2.64645C5.34171 2.45118 5.65829 2.45118 5.85355 2.64645L10.8536 7.64645Z",fill:"currentColor"})}),W=({placeholder:c,preflightClassName:w,selectionMode:o,clearValueWhenEmpty:s=!0,...C})=>{const D=o==="range";return e.jsxs(M,{startOfWeek:1,...C,selectionMode:o,onValueChange:n=>C.onValueChange?.({...n,valueAsString:n.value.length?[n.value.toString()]:[]}),children:[e.jsx(t.DatePicker.Context,{children:n=>e.jsxs(f,{children:[e.jsxs(d.InputGroup,{children:[e.jsx(g,{asChild:!0,index:0,placeholder:c,children:e.jsx(x.Input,{onInput:i=>{const l=i.currentTarget.value;s&&l===""&&n.clearValue()}})}),e.jsxs(h.InputAddon,{children:[e.jsx(k,{asChild:!0,children:e.jsx("button",{children:e.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.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"})})})}),e.jsx(P,{style:{cursor:"pointer"},children:e.jsx(v,{})})]})]}),D?e.jsxs(d.InputGroup,{children:[e.jsx(g,{asChild:!0,index:1,placeholder:c,children:e.jsx(x.Input,{onInput:i=>{const l=i.currentTarget.value;s&&l===""&&n.clearValue()}})}),e.jsxs(h.InputAddon,{children:[n.value.length===2?e.jsx(k,{asChild:!0,children:e.jsx("button",{children:e.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.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"})})})}):null,e.jsx(P,{children:e.jsx(v,{})})]})]}):null]})}),e.jsx(t.Portal,{children:e.jsx(R,{className:w,children:e.jsx(L,{children:e.jsx(G,{view:"day",children:e.jsx(t.DatePicker.Context,{children:n=>e.jsxs(e.Fragment,{children:[e.jsxs(z,{children:[e.jsx(m,{asChild:!0,children:e.jsx(u.IconButton,{"aria-label":"prev",variant:"secondary",size:"md",children:e.jsx(Y,{})})}),e.jsx(Z,{}),e.jsx(N,{}),e.jsx(I,{asChild:!0,children:e.jsx(u.IconButton,{"aria-label":"next",variant:"secondary",size:"md",children:e.jsx(F,{})})})]}),e.jsxs(O,{children:[e.jsx(q,{children:e.jsx(j,{children:n.weekDays.map((i,l)=>e.jsx(A,{children:i.short},l))})}),e.jsx(y,{children:n.weeks.map((i,l)=>e.jsx(j,{children:i.map((a,V)=>e.jsx(B,{value:a,children:e.jsx(S,{asChild:!0,children:e.jsx("button",{children:a.day})})},V))},l))})]})]})})})})})})]})};exports.DatePicker=W;
2
- //# sourceMappingURL=DatePicker.cjs.map
1
+ "use client";const e=require("../../utils/slots.cjs"),t=require("../icon-button/IconButton.cjs"),n=require("../input/Input.cjs"),r=require("../input/InputAddon.cjs"),i=require("../input/InputGroup.cjs");let a=require("@ark-ui/react"),o=require("@stokelp/styled-system/jsx"),s=require("@stokelp/styled-system/recipes"),c=require("react/jsx-runtime");var{withProvider:l,withContext:u}=e.createStyleContext(s.datepicker),d=l(a.DatePicker.Root,`root`,{defaultProps:{positioning:{placement:`bottom-start`},view:`day`,locale:`fr`,unmountOnExit:!0,lazyMount:!0,startOfWeek:6}}),f=u(a.DatePicker.Content,`content`),p=u(a.DatePicker.Control,`control`),m=u(a.DatePicker.Input,`input`),h=u(a.DatePicker.MonthSelect,`monthSelect`),g=u(a.DatePicker.NextTrigger,`nextTrigger`),_=u(a.DatePicker.Positioner,`positioner`),v=u(a.DatePicker.PrevTrigger,`prevTrigger`),y=u(a.DatePicker.TableBody,`tableBody`),b=u(a.DatePicker.TableCell,`tableCell`),x=u(a.DatePicker.TableCellTrigger,`tableCellTrigger`),S=u(a.DatePicker.TableHead,`tableHead`),C=u(a.DatePicker.TableHeader,`tableHeader`),w=u(a.DatePicker.Table,`table`),T=u(a.DatePicker.TableRow,`tableRow`),E=u(a.DatePicker.Trigger,`trigger`),D=u(a.DatePicker.ViewControl,`viewControl`),O=u(a.DatePicker.View,`view`),k=u(a.DatePicker.YearSelect,`yearSelect`),A=u((0,o.styled)(a.DatePicker.ClearTrigger),`clearTrigger`),j=()=>(0,c.jsx)(`svg`,{width:`23`,height:`24`,viewBox:`0 0 23 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,c.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M6.46875 2.25C6.8657 2.25 7.1875 2.58579 7.1875 3V4.5H15.8125V3C15.8125 2.58579 16.1343 2.25 16.5312 2.25C16.9282 2.25 17.25 2.58579 17.25 3V4.5H17.9688C19.5566 4.5 20.8438 5.84315 20.8438 7.5V18.75C20.8438 20.4069 19.5566 21.75 17.9688 21.75H5.03125C3.44343 21.75 2.15625 20.4069 2.15625 18.75V7.5C2.15625 5.84315 3.44343 4.5 5.03125 4.5H5.75V3C5.75 2.58579 6.0718 2.25 6.46875 2.25ZM5.03125 6C4.23734 6 3.59375 6.67157 3.59375 7.5V8.65135C4.01662 8.39609 4.50759 8.25 5.03125 8.25H17.9688C18.4924 8.25 18.9834 8.39609 19.4062 8.65135V7.5C19.4062 6.67157 18.7627 6 17.9688 6H5.03125ZM19.4062 11.25C19.4062 10.4216 18.7627 9.75 17.9688 9.75H5.03125C4.23734 9.75 3.59375 10.4216 3.59375 11.25V18.75C3.59375 19.5784 4.23734 20.25 5.03125 20.25H17.9688C18.7627 20.25 19.4062 19.5784 19.4062 18.75V11.25ZM10.7812 12.75C10.7812 12.3358 11.103 12 11.5 12H11.5072C11.9041 12 12.2259 12.3358 12.2259 12.75V12.7575C12.2259 13.1717 11.9041 13.5075 11.5072 13.5075H11.5C11.103 13.5075 10.7812 13.1717 10.7812 12.7575V12.75ZM12.9375 12.75C12.9375 12.3358 13.2593 12 13.6562 12H13.6634C14.0604 12 14.3822 12.3358 14.3822 12.75V12.7575C14.3822 13.1717 14.0604 13.5075 13.6634 13.5075H13.6562C13.2593 13.5075 12.9375 13.1717 12.9375 12.7575V12.75ZM15.0938 12.75C15.0938 12.3358 15.4155 12 15.8125 12H15.8197C16.2166 12 16.5384 12.3358 16.5384 12.75V12.7575C16.5384 13.1717 16.2166 13.5075 15.8197 13.5075H15.8125C15.4155 13.5075 15.0938 13.1717 15.0938 12.7575V12.75ZM6.46875 15C6.46875 14.5858 6.79054 14.25 7.1875 14.25H7.19469C7.59164 14.25 7.91344 14.5858 7.91344 15V15.0075C7.91344 15.4217 7.59164 15.7575 7.19469 15.7575H7.1875C6.79054 15.7575 6.46875 15.4217 6.46875 15.0075V15ZM8.625 15C8.625 14.5858 8.94679 14.25 9.34375 14.25H9.35094C9.74789 14.25 10.0697 14.5858 10.0697 15V15.0075C10.0697 15.4217 9.74789 15.7575 9.35094 15.7575H9.34375C8.94679 15.7575 8.625 15.4217 8.625 15.0075V15ZM10.7812 15C10.7812 14.5858 11.103 14.25 11.5 14.25H11.5072C11.9041 14.25 12.2259 14.5858 12.2259 15V15.0075C12.2259 15.4217 11.9041 15.7575 11.5072 15.7575H11.5C11.103 15.7575 10.7812 15.4217 10.7812 15.0075V15ZM12.9375 15C12.9375 14.5858 13.2593 14.25 13.6562 14.25H13.6634C14.0604 14.25 14.3822 14.5858 14.3822 15V15.0075C14.3822 15.4217 14.0604 15.7575 13.6634 15.7575H13.6562C13.2593 15.7575 12.9375 15.4217 12.9375 15.0075V15ZM15.0938 15C15.0938 14.5858 15.4155 14.25 15.8125 14.25H15.8197C16.2166 14.25 16.5384 14.5858 16.5384 15V15.0075C16.5384 15.4217 16.2166 15.7575 15.8197 15.7575H15.8125C15.4155 15.7575 15.0938 15.4217 15.0938 15.0075V15ZM6.46875 17.25C6.46875 16.8358 6.79054 16.5 7.1875 16.5H7.19469C7.59164 16.5 7.91344 16.8358 7.91344 17.25V17.2575C7.91344 17.6717 7.59164 18.0075 7.19469 18.0075H7.1875C6.79054 18.0075 6.46875 17.6717 6.46875 17.2575V17.25ZM8.625 17.25C8.625 16.8358 8.94679 16.5 9.34375 16.5H9.35094C9.74789 16.5 10.0697 16.8358 10.0697 17.25V17.2575C10.0697 17.6717 9.74789 18.0075 9.35094 18.0075H9.34375C8.94679 18.0075 8.625 17.6717 8.625 17.2575V17.25ZM10.7812 17.25C10.7812 16.8358 11.103 16.5 11.5 16.5H11.5072C11.9041 16.5 12.2259 16.8358 12.2259 17.25V17.2575C12.2259 17.6717 11.9041 18.0075 11.5072 18.0075H11.5C11.103 18.0075 10.7812 17.6717 10.7812 17.2575V17.25ZM12.9375 17.25C12.9375 16.8358 13.2593 16.5 13.6562 16.5H13.6634C14.0604 16.5 14.3822 16.8358 14.3822 17.25V17.2575C14.3822 17.6717 14.0604 18.0075 13.6634 18.0075H13.6562C13.2593 18.0075 12.9375 17.6717 12.9375 17.2575V17.25Z`,fill:`currentColor`})}),M=()=>(0,c.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,c.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M5.14645 8.35355C4.95118 8.15829 4.95118 7.84171 5.14645 7.64645L10.1464 2.64645C10.3417 2.45119 10.6583 2.45119 10.8536 2.64645C11.0488 2.84171 11.0488 3.15829 10.8536 3.35355L6.20711 8L10.8536 12.6464C11.0488 12.8417 11.0488 13.1583 10.8536 13.3536C10.6583 13.5488 10.3417 13.5488 10.1464 13.3536L5.14645 8.35355Z`,fill:`currentColor`})}),N=()=>(0,c.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,c.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M10.8536 7.64645C11.0488 7.84171 11.0488 8.15829 10.8536 8.35355L5.85355 13.3536C5.65829 13.5488 5.34171 13.5488 5.14645 13.3536C4.95118 13.1583 4.95118 12.8417 5.14645 12.6464L9.79289 8L5.14645 3.35355C4.95118 3.15829 4.95118 2.84171 5.14645 2.64645C5.34171 2.45118 5.65829 2.45118 5.85355 2.64645L10.8536 7.64645Z`,fill:`currentColor`})}),P=({placeholder:e,preflightClassName:o,selectionMode:s,clearValueWhenEmpty:l=!0,...u})=>{let P=s===`range`;return(0,c.jsxs)(d,{startOfWeek:1,...u,selectionMode:s,onValueChange:e=>u.onValueChange?.({...e,valueAsString:e.value.length?[e.value.toString()]:[]}),children:[(0,c.jsx)(a.DatePicker.Context,{children:t=>(0,c.jsxs)(p,{children:[(0,c.jsxs)(i.InputGroup,{children:[(0,c.jsx)(m,{asChild:!0,index:0,placeholder:e,children:(0,c.jsx)(n.Input,{onInput:e=>{let n=e.currentTarget.value;l&&n===``&&t.clearValue()}})}),(0,c.jsxs)(r.InputAddon,{children:[(0,c.jsx)(A,{asChild:!0,children:(0,c.jsx)(`button`,{children:(0,c.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 20 20`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,c.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,c.jsx)(E,{style:{cursor:`pointer`},children:(0,c.jsx)(j,{})})]})]}),P?(0,c.jsxs)(i.InputGroup,{children:[(0,c.jsx)(m,{asChild:!0,index:1,placeholder:e,children:(0,c.jsx)(n.Input,{onInput:e=>{let n=e.currentTarget.value;l&&n===``&&t.clearValue()}})}),(0,c.jsxs)(r.InputAddon,{children:[t.value.length===2?(0,c.jsx)(A,{asChild:!0,children:(0,c.jsx)(`button`,{children:(0,c.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 20 20`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,c.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`})})})}):null,(0,c.jsx)(E,{children:(0,c.jsx)(j,{})})]})]}):null]})}),(0,c.jsx)(a.Portal,{children:(0,c.jsx)(_,{className:o,children:(0,c.jsx)(f,{children:(0,c.jsx)(O,{view:`day`,children:(0,c.jsx)(a.DatePicker.Context,{children:e=>(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)(D,{children:[(0,c.jsx)(v,{asChild:!0,children:(0,c.jsx)(t.IconButton,{"aria-label":`prev`,variant:`secondary`,size:`md`,children:(0,c.jsx)(M,{})})}),(0,c.jsx)(h,{}),(0,c.jsx)(k,{}),(0,c.jsx)(g,{asChild:!0,children:(0,c.jsx)(t.IconButton,{"aria-label":`next`,variant:`secondary`,size:`md`,children:(0,c.jsx)(N,{})})})]}),(0,c.jsxs)(w,{children:[(0,c.jsx)(S,{children:(0,c.jsx)(T,{children:e.weekDays.map((e,t)=>(0,c.jsx)(C,{children:e.short},t))})}),(0,c.jsx)(y,{children:e.weeks.map((e,t)=>(0,c.jsx)(T,{children:e.map((e,t)=>(0,c.jsx)(b,{value:e,children:(0,c.jsx)(x,{asChild:!0,children:(0,c.jsx)(`button`,{children:e.day})})},t))},t))})]})]})})})})})})]})};exports.DatePicker=P;
2
+ //# sourceMappingURL=DatePicker.cjs.map