@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 +1 @@
1
- {"version":3,"file":"Menu.js","sources":["../../../src/components/menu/Menu.tsx"],"sourcesContent":["import { Menu as ArkMenu } from '@ark-ui/react'\nimport { ComponentProps, ComponentPropsWithoutRef, ElementRef, forwardRef } from 'react'\nimport { styled } from '@stokelp/styled-system/jsx'\nimport { createStyleContext } from '~/utils/slots'\nimport { menu } from '@stokelp/styled-system/recipes'\nimport { Portal } from '@ark-ui/react'\n\nconst { withProvider, withContext } = createStyleContext(menu)\n\nexport const Root = withProvider(ArkMenu.Root, undefined, {\n defaultProps: {\n lazyMount: true,\n loopFocus: true,\n unmountOnExit: true,\n },\n})\nconst Positioner = withContext(styled(ArkMenu.Positioner), 'positioner')\n\nconst InnerContent = forwardRef<ElementRef<typeof ArkMenu.Content>, ComponentPropsWithoutRef<typeof ArkMenu.Content>>(\n ({ children, ...props }, ref) => {\n return (\n <Portal>\n <Positioner>\n <ArkMenu.Content ref={ref} {...props}>\n {children}\n </ArkMenu.Content>\n </Positioner>\n </Portal>\n )\n },\n)\nInnerContent.displayName = ArkMenu.Content.displayName\n\nexport const Content = withContext(styled(InnerContent), 'content')\nexport const Item = withContext(styled(ArkMenu.Item), 'item')\nexport const ItemGroup = withContext(styled(ArkMenu.ItemGroup), 'itemGroup')\nexport const ItemGroupLabel = withContext(styled(ArkMenu.ItemGroupLabel), 'itemGroupLabel')\nexport const Separator = withContext(styled(ArkMenu.Separator), 'separator')\nexport const Trigger = withContext(styled(ArkMenu.Trigger), 'trigger')\nexport const TriggerItem = withContext(styled(ArkMenu.TriggerItem), 'triggerItem')\n\nexport interface MenuProps extends ComponentProps<typeof Root> {}\nexport interface MenuContentProps extends ComponentProps<typeof Content> {}\nexport interface MenuItemProps extends ComponentProps<typeof Item> {}\nexport interface MenuItemGroupProps extends ComponentProps<typeof ItemGroup> {}\nexport interface MenuItemGroupLabelProps extends ComponentProps<typeof ItemGroupLabel> {}\nexport interface MenuSeparatorProps extends ComponentProps<typeof Separator> {}\nexport interface MenuTriggerProps extends ComponentProps<typeof Trigger> {}\nexport interface MenuTriggerItemProps extends ComponentProps<typeof TriggerItem> {}\n"],"names":["withProvider","withContext","createStyleContext","menu","Root","ArkMenu","Positioner","styled","InnerContent","forwardRef","children","props","ref","jsx","Portal","Content","Item","ItemGroup","ItemGroupLabel","Separator","Trigger","TriggerItem"],"mappings":";;;;;;;AAOA,MAAM,EAAE,cAAAA,GAAc,aAAAC,MAAgBC,EAAmBC,CAAI,GAEhDC,IAAOJ,EAAaK,EAAQ,MAAM,QAAW;AAAA,EACxD,cAAc;AAAA,IACZ,WAAW;AAAA,IACX,WAAW;AAAA,IACX,eAAe;AAAA,EAAA;AAEnB,CAAC,GACKC,IAAaL,EAAYM,EAAOF,EAAQ,UAAU,GAAG,YAAY,GAEjEG,IAAeC;AAAA,EACnB,CAAC,EAAE,UAAAC,GAAU,GAAGC,EAAA,GAASC,MAErB,gBAAAC,EAACC,GAAA,EACC,UAAA,gBAAAD,EAACP,GAAA,EACC,UAAA,gBAAAO,EAACR,EAAQ,SAAR,EAAgB,KAAAO,GAAW,GAAGD,GAC5B,UAAAD,EAAA,CACH,GACF,GACF;AAGN;AACAF,EAAa,cAAcH,EAAQ,QAAQ;AAEpC,MAAMU,IAAUd,EAAYM,EAAOC,CAAY,GAAG,SAAS,GACrDQ,IAAOf,EAAYM,EAAOF,EAAQ,IAAI,GAAG,MAAM,GAC/CY,IAAYhB,EAAYM,EAAOF,EAAQ,SAAS,GAAG,WAAW,GAC9Da,IAAiBjB,EAAYM,EAAOF,EAAQ,cAAc,GAAG,gBAAgB,GAC7Ec,IAAYlB,EAAYM,EAAOF,EAAQ,SAAS,GAAG,WAAW,GAC9De,IAAUnB,EAAYM,EAAOF,EAAQ,OAAO,GAAG,SAAS,GACxDgB,IAAcpB,EAAYM,EAAOF,EAAQ,WAAW,GAAG,aAAa;"}
1
+ {"version":3,"file":"Menu.js","names":[],"sources":["../../../src/components/menu/Menu.tsx"],"sourcesContent":["import { Menu as ArkMenu } from '@ark-ui/react'\nimport { ComponentProps, ComponentPropsWithoutRef, ElementRef, forwardRef } from 'react'\nimport { styled } from '@stokelp/styled-system/jsx'\nimport { createStyleContext } from '~/utils/slots'\nimport { menu } from '@stokelp/styled-system/recipes'\nimport { Portal } from '@ark-ui/react'\n\nconst { withProvider, withContext } = createStyleContext(menu)\n\nexport const Root = withProvider(ArkMenu.Root, undefined, {\n defaultProps: {\n lazyMount: true,\n loopFocus: true,\n unmountOnExit: true,\n },\n})\nconst Positioner = withContext(styled(ArkMenu.Positioner), 'positioner')\n\nconst InnerContent = forwardRef<ElementRef<typeof ArkMenu.Content>, ComponentPropsWithoutRef<typeof ArkMenu.Content>>(\n ({ children, ...props }, ref) => {\n return (\n <Portal>\n <Positioner>\n <ArkMenu.Content ref={ref} {...props}>\n {children}\n </ArkMenu.Content>\n </Positioner>\n </Portal>\n )\n },\n)\nInnerContent.displayName = ArkMenu.Content.displayName\n\nexport const Content = withContext(styled(InnerContent), 'content')\nexport const Item = withContext(styled(ArkMenu.Item), 'item')\nexport const ItemGroup = withContext(styled(ArkMenu.ItemGroup), 'itemGroup')\nexport const ItemGroupLabel = withContext(styled(ArkMenu.ItemGroupLabel), 'itemGroupLabel')\nexport const Separator = withContext(styled(ArkMenu.Separator), 'separator')\nexport const Trigger = withContext(styled(ArkMenu.Trigger), 'trigger')\nexport const TriggerItem = withContext(styled(ArkMenu.TriggerItem), 'triggerItem')\n\nexport interface MenuProps extends ComponentProps<typeof Root> {}\nexport interface MenuContentProps extends ComponentProps<typeof Content> {}\nexport interface MenuItemProps extends ComponentProps<typeof Item> {}\nexport interface MenuItemGroupProps extends ComponentProps<typeof ItemGroup> {}\nexport interface MenuItemGroupLabelProps extends ComponentProps<typeof ItemGroupLabel> {}\nexport interface MenuSeparatorProps extends ComponentProps<typeof Separator> {}\nexport interface MenuTriggerProps extends ComponentProps<typeof Trigger> {}\nexport interface MenuTriggerItemProps extends ComponentProps<typeof TriggerItem> {}\n"],"mappings":";;;;;;;;;;;;;;;;;;IAOM,EAAE,iBAAc,mBAAgB,EAAmB,CAAI,GAEhD,IAAO,EAAa,EAAQ,MAAM,KAAA,GAAW,EACxD,cAAc;CACZ,WAAW;CACX,WAAW;CACX,eAAe;AACjB,EACF,CAAC,GACK,IAAa,EAAY,EAAO,EAAQ,UAAU,GAAG,YAAY,GAEjE,IAAe,GAClB,EAAE,aAAU,GAAG,KAAS,MAErB,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD,EAAA,UACE,kBAAC,EAAQ,SAAT;CAAsB;CAAK,GAAI;CAC5B;AACc,CAAA,EACP,CAAA,EACN,CAAA,CAGd;AACA,EAAa,cAAc,EAAQ,QAAQ;AAE3C,IAAa,IAAU,EAAY,EAAO,CAAY,GAAG,SAAS,GACrD,IAAO,EAAY,EAAO,EAAQ,IAAI,GAAG,MAAM,GAC/C,IAAY,EAAY,EAAO,EAAQ,SAAS,GAAG,WAAW,GAC9D,IAAiB,EAAY,EAAO,EAAQ,cAAc,GAAG,gBAAgB,GAC7E,IAAY,EAAY,EAAO,EAAQ,SAAS,GAAG,WAAW,GAC9D,IAAU,EAAY,EAAO,EAAQ,OAAO,GAAG,SAAS,GACxD,IAAc,EAAY,EAAO,EAAQ,WAAW,GAAG,aAAa"}
@@ -1,2 +1,2 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),R=require("react"),o=require("@stokelp/styled-system/jsx"),S=require("@stokelp/styled-system/recipes"),B=require("../../utils/slots.cjs"),l=require("./use-pagination.cjs"),a=require("../../shared/utils/events.cjs"),c=require("../icon-button/IconButton.cjs"),{withProvider:k,withContext:d}=B.createStyleContext(S.pagination),I=k(o.styled("div"),"root"),E=d(o.styled("button"),"item"),M=d(o.styled("div"),"dots"),b=({total:r,value:u,defaultValue:v,onChange:g,disabled:t,onNextPage:h,onPrevPage:x,siblings:C=2,boundaries:P=1,...w})=>{const{range:j,setPage:y,next:p,previous:f,active:i}=l.usePagination({page:u,initialPage:v,onChange:g,total:r,siblings:C,boundaries:P}),q=a.createEventHandler(h,p),L=a.createEventHandler(x,f);return e.jsxs(I,{...w,children:[e.jsx(c.IconButton,{size:"md",variant:"tertiary","aria-label":"Previous",disabled:t||i===1,onClick:L,children: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"})})}),j.map((n,s)=>{if(n===l.DOTS)return R.createElement(M,{...t?{"data-disabled":!0}:{},key:s},"...");const m=n===i;return e.jsx(E,{disabled:t,...m?{"data-selected":!0}:{},onClick:()=>y(n),children:n},s)}),e.jsx(c.IconButton,{size:"md",variant:"tertiary","aria-label":"Previous",disabled:t||i===r,onClick:q,children: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"})})})]})};exports.Pagination=b;
2
- //# sourceMappingURL=Pagination.cjs.map
1
+ "use client";const e=require("../../utils/slots.cjs"),t=require("../icon-button/IconButton.cjs"),n=require("./use-pagination.cjs"),r=require("../../shared/utils/events.cjs");let i=require("@stokelp/styled-system/jsx"),a=require("@stokelp/styled-system/recipes"),o=require("react"),s=require("react/jsx-runtime");var{withProvider:c,withContext:l}=e.createStyleContext(a.pagination),u=c((0,i.styled)(`div`),`root`),d=l((0,i.styled)(`button`),`item`),f=l((0,i.styled)(`div`),`dots`),p=({total:e,value:i,defaultValue:a,onChange:c,disabled:l,onNextPage:p,onPrevPage:m,siblings:h=2,boundaries:g=1,..._})=>{let{range:v,setPage:y,next:b,previous:x,active:S}=n.usePagination({page:i,initialPage:a,onChange:c,total:e,siblings:h,boundaries:g}),C=r.createEventHandler(p,b),w=r.createEventHandler(m,x);return(0,s.jsxs)(u,{..._,children:[(0,s.jsx)(t.IconButton,{size:`md`,variant:`tertiary`,"aria-label":`Previous`,disabled:l||S===1,onClick:w,children:(0,s.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,s.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`})})}),v.map((e,t)=>e===n.DOTS?(0,o.createElement)(f,{...l?{"data-disabled":!0}:{},key:t},`...`):(0,s.jsx)(d,{disabled:l,...e===S?{"data-selected":!0}:{},onClick:()=>y(e),children:e},t)),(0,s.jsx)(t.IconButton,{size:`md`,variant:`tertiary`,"aria-label":`Previous`,disabled:l||S===e,onClick:C,children:(0,s.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,s.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`})})})]})};exports.Pagination=p;
2
+ //# sourceMappingURL=Pagination.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Pagination.cjs","sources":["../../../src/components/pagination/Pagination.tsx"],"sourcesContent":["import type { ComponentProps, FC } from 'react'\nimport { styled } from '@stokelp/styled-system/jsx'\nimport { pagination } from '@stokelp/styled-system/recipes'\nimport { createStyleContext } from '~/utils/slots'\nimport { DOTS, usePagination } from './use-pagination'\nimport { createEventHandler } from '~/shared/utils/events'\nimport { IconButton } from '~/components/icon-button'\n\nconst { withProvider, withContext } = createStyleContext(pagination)\n\nconst StyledPagination = withProvider(styled('div'), 'root')\ntype StyledPaginationProps = ComponentProps<typeof StyledPagination>\n\nconst PaginationItem = withContext(styled('button'), 'item')\nconst PaginationDots = withContext(styled('div'), 'dots')\n\nexport interface PaginationProps extends Omit<StyledPaginationProps, 'children' | 'defaultValue' | 'onChange'> {\n total: number\n value?: number\n defaultValue?: number\n onChange?: (value: number) => void\n disabled?: boolean\n siblings?: number\n boundaries?: number\n onNextPage?: () => void\n onPrevPage?: () => void\n}\n\nexport const Pagination: FC<PaginationProps> = ({\n total,\n value,\n defaultValue,\n onChange,\n disabled,\n onNextPage,\n onPrevPage,\n siblings = 2,\n boundaries = 1,\n ...props\n}: PaginationProps) => {\n const { range, setPage, next, previous, active } = usePagination({\n page: value,\n initialPage: defaultValue,\n onChange,\n total,\n siblings,\n boundaries,\n })\n\n const handleNextPage = createEventHandler(onNextPage, next)\n const handlePreviousPage = createEventHandler(onPrevPage, previous)\n\n return (\n <StyledPagination {...props}>\n <IconButton\n size=\"md\"\n variant=\"tertiary\"\n aria-label=\"Previous\"\n disabled={disabled || active === 1}\n onClick={handlePreviousPage}\n >\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n 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\"\n fill=\"currentColor\"\n />\n </svg>\n </IconButton>\n {range.map((pageNumber, index) => {\n if (pageNumber === DOTS) {\n return (\n <PaginationDots {...(disabled ? { 'data-disabled': true } : {})} key={index}>\n ...\n </PaginationDots>\n )\n }\n\n const isSelected = pageNumber === active\n\n return (\n <PaginationItem\n key={index}\n disabled={disabled}\n {...(isSelected\n ? {\n 'data-selected': true,\n }\n : {})}\n onClick={() => setPage(pageNumber)}\n >\n {pageNumber}\n </PaginationItem>\n )\n })}\n <IconButton\n size=\"md\"\n variant=\"tertiary\"\n aria-label=\"Previous\"\n disabled={disabled || active === total}\n onClick={handleNextPage}\n >\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n 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\"\n fill=\"currentColor\"\n />\n </svg>\n </IconButton>\n </StyledPagination>\n )\n}\n"],"names":["withProvider","withContext","createStyleContext","pagination","StyledPagination","styled","PaginationItem","PaginationDots","Pagination","total","value","defaultValue","onChange","disabled","onNextPage","onPrevPage","siblings","boundaries","props","range","setPage","next","previous","active","usePagination","handleNextPage","createEventHandler","handlePreviousPage","jsxs","jsx","IconButton","pageNumber","index","DOTS","createElement","isSelected"],"mappings":"oYAQM,CAAE,aAAAA,EAAc,YAAAC,GAAgBC,EAAAA,mBAAmBC,EAAAA,UAAU,EAE7DC,EAAmBJ,EAAaK,EAAAA,OAAO,KAAK,EAAG,MAAM,EAGrDC,EAAiBL,EAAYI,EAAAA,OAAO,QAAQ,EAAG,MAAM,EACrDE,EAAiBN,EAAYI,EAAAA,OAAO,KAAK,EAAG,MAAM,EAc3CG,EAAkC,CAAC,CAC9C,MAAAC,EACA,MAAAC,EACA,aAAAC,EACA,SAAAC,EACA,SAAAC,EACA,WAAAC,EACA,WAAAC,EACA,SAAAC,EAAW,EACX,WAAAC,EAAa,EACb,GAAGC,CACL,IAAuB,CACrB,KAAM,CAAE,MAAAC,EAAO,QAAAC,EAAS,KAAAC,EAAM,SAAAC,EAAU,OAAAC,CAAA,EAAWC,gBAAc,CAC/D,KAAMd,EACN,YAAaC,EACb,SAAAC,EACA,MAAAH,EACA,SAAAO,EACA,WAAAC,CAAA,CACD,EAEKQ,EAAiBC,EAAAA,mBAAmBZ,EAAYO,CAAI,EACpDM,EAAqBD,EAAAA,mBAAmBX,EAAYO,CAAQ,EAElE,OACEM,EAAAA,KAACxB,EAAA,CAAkB,GAAGc,EACpB,SAAA,CAAAW,EAAAA,IAACC,EAAAA,WAAA,CACC,KAAK,KACL,QAAQ,WACR,aAAW,WACX,SAAUjB,GAAYU,IAAW,EACjC,QAASI,EAET,SAAAE,EAAAA,IAAC,MAAA,CAAI,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OAAO,MAAM,6BAChE,SAAAA,EAAAA,IAAC,OAAA,CACC,SAAS,UACT,SAAS,UACT,EAAE,8TACF,KAAK,cAAA,CAAA,CACP,CACF,CAAA,CAAA,EAEDV,EAAM,IAAI,CAACY,EAAYC,IAAU,CAChC,GAAID,IAAeE,EAAAA,KACjB,OACEC,gBAAC3B,EAAA,CAAgB,GAAIM,EAAW,CAAE,gBAAiB,EAAA,EAAS,CAAA,EAAK,IAAKmB,CAAA,EAAO,KAE7E,EAIJ,MAAMG,EAAaJ,IAAeR,EAElC,OACEM,EAAAA,IAACvB,EAAA,CAEC,SAAAO,EACC,GAAIsB,EACD,CACE,gBAAiB,EAAA,EAEnB,CAAA,EACJ,QAAS,IAAMf,EAAQW,CAAU,EAEhC,SAAAA,CAAA,EATIC,CAAA,CAYX,CAAC,EACDH,EAAAA,IAACC,EAAAA,WAAA,CACC,KAAK,KACL,QAAQ,WACR,aAAW,WACX,SAAUjB,GAAYU,IAAWd,EACjC,QAASgB,EAET,SAAAI,EAAAA,IAAC,MAAA,CAAI,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OAAO,MAAM,6BAChE,SAAAA,EAAAA,IAAC,OAAA,CACC,SAAS,UACT,SAAS,UACT,EAAE,8TACF,KAAK,cAAA,CAAA,CACP,CACF,CAAA,CAAA,CACF,EACF,CAEJ"}
1
+ {"version":3,"file":"Pagination.cjs","names":[],"sources":["../../../src/components/pagination/Pagination.tsx"],"sourcesContent":["import type { ComponentProps, FC } from 'react'\nimport { styled } from '@stokelp/styled-system/jsx'\nimport { pagination } from '@stokelp/styled-system/recipes'\nimport { createStyleContext } from '~/utils/slots'\nimport { DOTS, usePagination } from './use-pagination'\nimport { createEventHandler } from '~/shared/utils/events'\nimport { IconButton } from '~/components/icon-button'\n\nconst { withProvider, withContext } = createStyleContext(pagination)\n\nconst StyledPagination = withProvider(styled('div'), 'root')\ntype StyledPaginationProps = ComponentProps<typeof StyledPagination>\n\nconst PaginationItem = withContext(styled('button'), 'item')\nconst PaginationDots = withContext(styled('div'), 'dots')\n\nexport interface PaginationProps extends Omit<StyledPaginationProps, 'children' | 'defaultValue' | 'onChange'> {\n total: number\n value?: number\n defaultValue?: number\n onChange?: (value: number) => void\n disabled?: boolean\n siblings?: number\n boundaries?: number\n onNextPage?: () => void\n onPrevPage?: () => void\n}\n\nexport const Pagination: FC<PaginationProps> = ({\n total,\n value,\n defaultValue,\n onChange,\n disabled,\n onNextPage,\n onPrevPage,\n siblings = 2,\n boundaries = 1,\n ...props\n}: PaginationProps) => {\n const { range, setPage, next, previous, active } = usePagination({\n page: value,\n initialPage: defaultValue,\n onChange,\n total,\n siblings,\n boundaries,\n })\n\n const handleNextPage = createEventHandler(onNextPage, next)\n const handlePreviousPage = createEventHandler(onPrevPage, previous)\n\n return (\n <StyledPagination {...props}>\n <IconButton\n size=\"md\"\n variant=\"tertiary\"\n aria-label=\"Previous\"\n disabled={disabled || active === 1}\n onClick={handlePreviousPage}\n >\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n 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\"\n fill=\"currentColor\"\n />\n </svg>\n </IconButton>\n {range.map((pageNumber, index) => {\n if (pageNumber === DOTS) {\n return (\n <PaginationDots {...(disabled ? { 'data-disabled': true } : {})} key={index}>\n ...\n </PaginationDots>\n )\n }\n\n const isSelected = pageNumber === active\n\n return (\n <PaginationItem\n key={index}\n disabled={disabled}\n {...(isSelected\n ? {\n 'data-selected': true,\n }\n : {})}\n onClick={() => setPage(pageNumber)}\n >\n {pageNumber}\n </PaginationItem>\n )\n })}\n <IconButton\n size=\"md\"\n variant=\"tertiary\"\n aria-label=\"Previous\"\n disabled={disabled || active === total}\n onClick={handleNextPage}\n >\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n 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\"\n fill=\"currentColor\"\n />\n </svg>\n </IconButton>\n </StyledPagination>\n )\n}\n"],"mappings":"wTAQA,GAAM,CAAE,eAAc,eAAgB,EAAA,mBAAmB,EAAA,UAAU,EAE7D,EAAmB,GAAA,EAAA,EAAA,QAAoB,KAAK,EAAG,MAAM,EAGrD,EAAiB,GAAA,EAAA,EAAA,QAAmB,QAAQ,EAAG,MAAM,EACrD,EAAiB,GAAA,EAAA,EAAA,QAAmB,KAAK,EAAG,MAAM,EAc3C,GAAmC,CAC9C,QACA,QACA,eACA,WACA,WACA,aACA,aACA,WAAW,EACX,aAAa,EACb,GAAG,KACkB,CACrB,GAAM,CAAE,QAAO,UAAS,OAAM,WAAU,UAAW,EAAA,cAAc,CAC/D,KAAM,EACN,YAAa,EACb,WACA,QACA,WACA,YACF,CAAC,EAEK,EAAiB,EAAA,mBAAmB,EAAY,CAAI,EACpD,EAAqB,EAAA,mBAAmB,EAAY,CAAQ,EAElE,OACE,EAAA,EAAA,MAAC,EAAD,CAAkB,GAAI,WAAtB,EACE,EAAA,EAAA,KAAC,EAAA,WAAD,CACE,KAAK,KACL,QAAQ,WACR,aAAW,WACX,SAAU,GAAY,IAAW,EACjC,QAAS,YAET,EAAA,EAAA,KAAC,MAAD,CAAK,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OAAO,MAAM,uCAChE,EAAA,EAAA,KAAC,OAAD,CACE,SAAS,UACT,SAAS,UACT,EAAE,8TACF,KAAK,cACN,CAAA,CACE,CAAA,CACK,CAAA,EACX,EAAM,KAAK,EAAY,IAClB,IAAe,EAAA,MAEf,EAAA,EAAA,eAAC,EAAD,CAAgB,GAAK,EAAW,CAAE,gBAAiB,EAAK,EAAI,CAAC,EAAI,IAAK,CAEtD,EAF6D,KAE7D,GAOlB,EAAA,EAAA,KAAC,EAAD,CAEY,WACV,GANe,IAAe,EAO1B,CACE,gBAAiB,EACnB,EACA,CAAC,EACL,YAAe,EAAQ,CAAU,WAEhC,CACa,EAVT,CAUS,CAEnB,GACD,EAAA,EAAA,KAAC,EAAA,WAAD,CACE,KAAK,KACL,QAAQ,WACR,aAAW,WACX,SAAU,GAAY,IAAW,EACjC,QAAS,YAET,EAAA,EAAA,KAAC,MAAD,CAAK,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OAAO,MAAM,uCAChE,EAAA,EAAA,KAAC,OAAD,CACE,SAAS,UACT,SAAS,UACT,EAAE,8TACF,KAAK,cACN,CAAA,CACE,CAAA,CACK,CAAA,CACI,GAEtB"}
@@ -1,86 +1,78 @@
1
1
  "use client";
2
- import { jsxs as S, jsx as t } from "react/jsx-runtime";
3
- import { createElement as k } from "react";
4
- import { styled as n } from "@stokelp/styled-system/jsx";
5
- import { pagination as R } from "@stokelp/styled-system/recipes";
6
- import { createStyleContext as B } from "../../utils/slots.js";
7
- import { usePagination as j, DOTS as z } from "./use-pagination.js";
8
- import { createEventHandler as a } from "../../shared/utils/events.js";
9
- import { IconButton as d } from "../icon-button/IconButton.js";
10
- const { withProvider: D, withContext: s } = B(R), E = D(n("div"), "root"), I = s(n("button"), "item"), M = s(n("div"), "dots"), J = ({
11
- total: r,
12
- value: c,
13
- defaultValue: m,
14
- onChange: v,
15
- disabled: e,
16
- onNextPage: h,
17
- onPrevPage: g,
18
- siblings: C = 2,
19
- boundaries: p = 1,
20
- ...u
21
- }) => {
22
- const { range: f, setPage: w, next: P, previous: x, active: o } = j({
23
- page: c,
24
- initialPage: m,
25
- onChange: v,
26
- total: r,
27
- siblings: C,
28
- boundaries: p
29
- }), L = a(h, P), y = a(g, x);
30
- return /* @__PURE__ */ S(E, { ...u, children: [
31
- /* @__PURE__ */ t(
32
- d,
33
- {
34
- size: "md",
35
- variant: "tertiary",
36
- "aria-label": "Previous",
37
- disabled: e || o === 1,
38
- onClick: y,
39
- children: /* @__PURE__ */ t("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ t(
40
- "path",
41
- {
42
- fillRule: "evenodd",
43
- clipRule: "evenodd",
44
- 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",
45
- fill: "currentColor"
46
- }
47
- ) })
48
- }
49
- ),
50
- f.map((i, l) => i === z ? /* @__PURE__ */ k(M, { ...e ? { "data-disabled": !0 } : {}, key: l }, "...") : /* @__PURE__ */ t(
51
- I,
52
- {
53
- disabled: e,
54
- ...i === o ? {
55
- "data-selected": !0
56
- } : {},
57
- onClick: () => w(i),
58
- children: i
59
- },
60
- l
61
- )),
62
- /* @__PURE__ */ t(
63
- d,
64
- {
65
- size: "md",
66
- variant: "tertiary",
67
- "aria-label": "Previous",
68
- disabled: e || o === r,
69
- onClick: L,
70
- children: /* @__PURE__ */ t("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ t(
71
- "path",
72
- {
73
- fillRule: "evenodd",
74
- clipRule: "evenodd",
75
- 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",
76
- fill: "currentColor"
77
- }
78
- ) })
79
- }
80
- )
81
- ] });
2
+ import { createStyleContext as e } from "../../utils/slots.js";
3
+ import { IconButton as t } from "../icon-button/IconButton.js";
4
+ import { DOTS as n, usePagination as r } from "./use-pagination.js";
5
+ import { createEventHandler as i } from "../../shared/utils/events.js";
6
+ import { styled as a } from "@stokelp/styled-system/jsx";
7
+ import { pagination as o } from "@stokelp/styled-system/recipes";
8
+ import { createElement as s } from "react";
9
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
10
+ //#region src/components/pagination/Pagination.tsx
11
+ var { withProvider: u, withContext: d } = e(o), f = u(a("div"), "root"), p = d(a("button"), "item"), m = d(a("div"), "dots"), h = ({ total: e, value: a, defaultValue: o, onChange: u, disabled: d, onNextPage: h, onPrevPage: g, siblings: _ = 2, boundaries: v = 1, ...y }) => {
12
+ let { range: b, setPage: x, next: S, previous: C, active: w } = r({
13
+ page: a,
14
+ initialPage: o,
15
+ onChange: u,
16
+ total: e,
17
+ siblings: _,
18
+ boundaries: v
19
+ }), T = i(h, S), E = i(g, C);
20
+ return /* @__PURE__ */ l(f, {
21
+ ...y,
22
+ children: [
23
+ /* @__PURE__ */ c(t, {
24
+ size: "md",
25
+ variant: "tertiary",
26
+ "aria-label": "Previous",
27
+ disabled: d || w === 1,
28
+ onClick: E,
29
+ children: /* @__PURE__ */ c("svg", {
30
+ width: "16",
31
+ height: "16",
32
+ viewBox: "0 0 16 16",
33
+ fill: "none",
34
+ xmlns: "http://www.w3.org/2000/svg",
35
+ children: /* @__PURE__ */ c("path", {
36
+ fillRule: "evenodd",
37
+ clipRule: "evenodd",
38
+ 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",
39
+ fill: "currentColor"
40
+ })
41
+ })
42
+ }),
43
+ b.map((e, t) => e === n ? /* @__PURE__ */ s(m, {
44
+ ...d ? { "data-disabled": !0 } : {},
45
+ key: t
46
+ }, "...") : /* @__PURE__ */ c(p, {
47
+ disabled: d,
48
+ ...e === w ? { "data-selected": !0 } : {},
49
+ onClick: () => x(e),
50
+ children: e
51
+ }, t)),
52
+ /* @__PURE__ */ c(t, {
53
+ size: "md",
54
+ variant: "tertiary",
55
+ "aria-label": "Previous",
56
+ disabled: d || w === e,
57
+ onClick: T,
58
+ children: /* @__PURE__ */ c("svg", {
59
+ width: "16",
60
+ height: "16",
61
+ viewBox: "0 0 16 16",
62
+ fill: "none",
63
+ xmlns: "http://www.w3.org/2000/svg",
64
+ children: /* @__PURE__ */ c("path", {
65
+ fillRule: "evenodd",
66
+ clipRule: "evenodd",
67
+ 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",
68
+ fill: "currentColor"
69
+ })
70
+ })
71
+ })
72
+ ]
73
+ });
82
74
  };
83
- export {
84
- J as Pagination
85
- };
86
- //# sourceMappingURL=Pagination.js.map
75
+ //#endregion
76
+ export { h as Pagination };
77
+
78
+ //# sourceMappingURL=Pagination.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Pagination.js","sources":["../../../src/components/pagination/Pagination.tsx"],"sourcesContent":["import type { ComponentProps, FC } from 'react'\nimport { styled } from '@stokelp/styled-system/jsx'\nimport { pagination } from '@stokelp/styled-system/recipes'\nimport { createStyleContext } from '~/utils/slots'\nimport { DOTS, usePagination } from './use-pagination'\nimport { createEventHandler } from '~/shared/utils/events'\nimport { IconButton } from '~/components/icon-button'\n\nconst { withProvider, withContext } = createStyleContext(pagination)\n\nconst StyledPagination = withProvider(styled('div'), 'root')\ntype StyledPaginationProps = ComponentProps<typeof StyledPagination>\n\nconst PaginationItem = withContext(styled('button'), 'item')\nconst PaginationDots = withContext(styled('div'), 'dots')\n\nexport interface PaginationProps extends Omit<StyledPaginationProps, 'children' | 'defaultValue' | 'onChange'> {\n total: number\n value?: number\n defaultValue?: number\n onChange?: (value: number) => void\n disabled?: boolean\n siblings?: number\n boundaries?: number\n onNextPage?: () => void\n onPrevPage?: () => void\n}\n\nexport const Pagination: FC<PaginationProps> = ({\n total,\n value,\n defaultValue,\n onChange,\n disabled,\n onNextPage,\n onPrevPage,\n siblings = 2,\n boundaries = 1,\n ...props\n}: PaginationProps) => {\n const { range, setPage, next, previous, active } = usePagination({\n page: value,\n initialPage: defaultValue,\n onChange,\n total,\n siblings,\n boundaries,\n })\n\n const handleNextPage = createEventHandler(onNextPage, next)\n const handlePreviousPage = createEventHandler(onPrevPage, previous)\n\n return (\n <StyledPagination {...props}>\n <IconButton\n size=\"md\"\n variant=\"tertiary\"\n aria-label=\"Previous\"\n disabled={disabled || active === 1}\n onClick={handlePreviousPage}\n >\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n 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\"\n fill=\"currentColor\"\n />\n </svg>\n </IconButton>\n {range.map((pageNumber, index) => {\n if (pageNumber === DOTS) {\n return (\n <PaginationDots {...(disabled ? { 'data-disabled': true } : {})} key={index}>\n ...\n </PaginationDots>\n )\n }\n\n const isSelected = pageNumber === active\n\n return (\n <PaginationItem\n key={index}\n disabled={disabled}\n {...(isSelected\n ? {\n 'data-selected': true,\n }\n : {})}\n onClick={() => setPage(pageNumber)}\n >\n {pageNumber}\n </PaginationItem>\n )\n })}\n <IconButton\n size=\"md\"\n variant=\"tertiary\"\n aria-label=\"Previous\"\n disabled={disabled || active === total}\n onClick={handleNextPage}\n >\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n 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\"\n fill=\"currentColor\"\n />\n </svg>\n </IconButton>\n </StyledPagination>\n )\n}\n"],"names":["withProvider","withContext","createStyleContext","pagination","StyledPagination","styled","PaginationItem","PaginationDots","Pagination","total","value","defaultValue","onChange","disabled","onNextPage","onPrevPage","siblings","boundaries","props","range","setPage","next","previous","active","usePagination","handleNextPage","createEventHandler","handlePreviousPage","jsxs","jsx","IconButton","pageNumber","index","DOTS","createElement"],"mappings":";;;;;;;;;AAQA,MAAM,EAAE,cAAAA,GAAc,aAAAC,MAAgBC,EAAmBC,CAAU,GAE7DC,IAAmBJ,EAAaK,EAAO,KAAK,GAAG,MAAM,GAGrDC,IAAiBL,EAAYI,EAAO,QAAQ,GAAG,MAAM,GACrDE,IAAiBN,EAAYI,EAAO,KAAK,GAAG,MAAM,GAc3CG,IAAkC,CAAC;AAAA,EAC9C,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,cAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC;AAAA,EACA,YAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,YAAAC,IAAa;AAAA,EACb,GAAGC;AACL,MAAuB;AACrB,QAAM,EAAE,OAAAC,GAAO,SAAAC,GAAS,MAAAC,GAAM,UAAAC,GAAU,QAAAC,EAAA,IAAWC,EAAc;AAAA,IAC/D,MAAMd;AAAA,IACN,aAAaC;AAAA,IACb,UAAAC;AAAA,IACA,OAAAH;AAAA,IACA,UAAAO;AAAA,IACA,YAAAC;AAAA,EAAA,CACD,GAEKQ,IAAiBC,EAAmBZ,GAAYO,CAAI,GACpDM,IAAqBD,EAAmBX,GAAYO,CAAQ;AAElE,SACE,gBAAAM,EAACxB,GAAA,EAAkB,GAAGc,GACpB,UAAA;AAAA,IAAA,gBAAAW;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,SAAQ;AAAA,QACR,cAAW;AAAA,QACX,UAAUjB,KAAYU,MAAW;AAAA,QACjC,SAASI;AAAA,QAET,UAAA,gBAAAE,EAAC,OAAA,EAAI,OAAM,MAAK,QAAO,MAAK,SAAQ,aAAY,MAAK,QAAO,OAAM,8BAChE,UAAA,gBAAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,UAAS;AAAA,YACT,UAAS;AAAA,YACT,GAAE;AAAA,YACF,MAAK;AAAA,UAAA;AAAA,QAAA,EACP,CACF;AAAA,MAAA;AAAA,IAAA;AAAA,IAEDV,EAAM,IAAI,CAACY,GAAYC,MAClBD,MAAeE,IAEf,gBAAAC,EAAC3B,GAAA,EAAgB,GAAIM,IAAW,EAAE,iBAAiB,GAAA,IAAS,CAAA,GAAK,KAAKmB,EAAA,GAAO,KAE7E,IAOF,gBAAAH;AAAA,MAACvB;AAAA,MAAA;AAAA,QAEC,UAAAO;AAAA,QACC,GANckB,MAAeR,IAO1B;AAAA,UACE,iBAAiB;AAAA,QAAA,IAEnB,CAAA;AAAA,QACJ,SAAS,MAAMH,EAAQW,CAAU;AAAA,QAEhC,UAAAA;AAAA,MAAA;AAAA,MATIC;AAAA,IAAA,CAYV;AAAA,IACD,gBAAAH;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,SAAQ;AAAA,QACR,cAAW;AAAA,QACX,UAAUjB,KAAYU,MAAWd;AAAA,QACjC,SAASgB;AAAA,QAET,UAAA,gBAAAI,EAAC,OAAA,EAAI,OAAM,MAAK,QAAO,MAAK,SAAQ,aAAY,MAAK,QAAO,OAAM,8BAChE,UAAA,gBAAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,UAAS;AAAA,YACT,UAAS;AAAA,YACT,GAAE;AAAA,YACF,MAAK;AAAA,UAAA;AAAA,QAAA,EACP,CACF;AAAA,MAAA;AAAA,IAAA;AAAA,EACF,GACF;AAEJ;"}
1
+ {"version":3,"file":"Pagination.js","names":[],"sources":["../../../src/components/pagination/Pagination.tsx"],"sourcesContent":["import type { ComponentProps, FC } from 'react'\nimport { styled } from '@stokelp/styled-system/jsx'\nimport { pagination } from '@stokelp/styled-system/recipes'\nimport { createStyleContext } from '~/utils/slots'\nimport { DOTS, usePagination } from './use-pagination'\nimport { createEventHandler } from '~/shared/utils/events'\nimport { IconButton } from '~/components/icon-button'\n\nconst { withProvider, withContext } = createStyleContext(pagination)\n\nconst StyledPagination = withProvider(styled('div'), 'root')\ntype StyledPaginationProps = ComponentProps<typeof StyledPagination>\n\nconst PaginationItem = withContext(styled('button'), 'item')\nconst PaginationDots = withContext(styled('div'), 'dots')\n\nexport interface PaginationProps extends Omit<StyledPaginationProps, 'children' | 'defaultValue' | 'onChange'> {\n total: number\n value?: number\n defaultValue?: number\n onChange?: (value: number) => void\n disabled?: boolean\n siblings?: number\n boundaries?: number\n onNextPage?: () => void\n onPrevPage?: () => void\n}\n\nexport const Pagination: FC<PaginationProps> = ({\n total,\n value,\n defaultValue,\n onChange,\n disabled,\n onNextPage,\n onPrevPage,\n siblings = 2,\n boundaries = 1,\n ...props\n}: PaginationProps) => {\n const { range, setPage, next, previous, active } = usePagination({\n page: value,\n initialPage: defaultValue,\n onChange,\n total,\n siblings,\n boundaries,\n })\n\n const handleNextPage = createEventHandler(onNextPage, next)\n const handlePreviousPage = createEventHandler(onPrevPage, previous)\n\n return (\n <StyledPagination {...props}>\n <IconButton\n size=\"md\"\n variant=\"tertiary\"\n aria-label=\"Previous\"\n disabled={disabled || active === 1}\n onClick={handlePreviousPage}\n >\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n 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\"\n fill=\"currentColor\"\n />\n </svg>\n </IconButton>\n {range.map((pageNumber, index) => {\n if (pageNumber === DOTS) {\n return (\n <PaginationDots {...(disabled ? { 'data-disabled': true } : {})} key={index}>\n ...\n </PaginationDots>\n )\n }\n\n const isSelected = pageNumber === active\n\n return (\n <PaginationItem\n key={index}\n disabled={disabled}\n {...(isSelected\n ? {\n 'data-selected': true,\n }\n : {})}\n onClick={() => setPage(pageNumber)}\n >\n {pageNumber}\n </PaginationItem>\n )\n })}\n <IconButton\n size=\"md\"\n variant=\"tertiary\"\n aria-label=\"Previous\"\n disabled={disabled || active === total}\n onClick={handleNextPage}\n >\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n 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\"\n fill=\"currentColor\"\n />\n </svg>\n </IconButton>\n </StyledPagination>\n )\n}\n"],"mappings":";;;;;;;;;;AAQA,IAAM,EAAE,iBAAc,mBAAgB,EAAmB,CAAU,GAE7D,IAAmB,EAAa,EAAO,KAAK,GAAG,MAAM,GAGrD,IAAiB,EAAY,EAAO,QAAQ,GAAG,MAAM,GACrD,IAAiB,EAAY,EAAO,KAAK,GAAG,MAAM,GAc3C,KAAmC,EAC9C,UACA,UACA,iBACA,aACA,aACA,eACA,eACA,cAAW,GACX,gBAAa,GACb,GAAG,QACkB;CACrB,IAAM,EAAE,UAAO,YAAS,SAAM,aAAU,cAAW,EAAc;EAC/D,MAAM;EACN,aAAa;EACb;EACA;EACA;EACA;CACF,CAAC,GAEK,IAAiB,EAAmB,GAAY,CAAI,GACpD,IAAqB,EAAmB,GAAY,CAAQ;CAElE,OACE,kBAAC,GAAD;EAAkB,GAAI;YAAtB;GACE,kBAAC,GAAD;IACE,MAAK;IACL,SAAQ;IACR,cAAW;IACX,UAAU,KAAY,MAAW;IACjC,SAAS;cAET,kBAAC,OAAD;KAAK,OAAM;KAAK,QAAO;KAAK,SAAQ;KAAY,MAAK;KAAO,OAAM;eAChE,kBAAC,QAAD;MACE,UAAS;MACT,UAAS;MACT,GAAE;MACF,MAAK;KACN,CAAA;IACE,CAAA;GACK,CAAA;GACX,EAAM,KAAK,GAAY,MAClB,MAAe,IAEf,kBAAC,GAAD;IAAgB,GAAK,IAAW,EAAE,iBAAiB,GAAK,IAAI,CAAC;IAAI,KAAK;GAEtD,GAF6D,KAE7D,IAOlB,kBAAC,GAAD;IAEY;IACV,GANe,MAAe,IAO1B,EACE,iBAAiB,GACnB,IACA,CAAC;IACL,eAAe,EAAQ,CAAU;cAEhC;GACa,GAVT,CAUS,CAEnB;GACD,kBAAC,GAAD;IACE,MAAK;IACL,SAAQ;IACR,cAAW;IACX,UAAU,KAAY,MAAW;IACjC,SAAS;cAET,kBAAC,OAAD;KAAK,OAAM;KAAK,QAAO;KAAK,SAAQ;KAAY,MAAK;KAAO,OAAM;eAChE,kBAAC,QAAD;MACE,UAAS;MACT,UAAS;MACT,GAAE;MACF,MAAK;KACN,CAAA;IACE,CAAA;GACK,CAAA;EACI;;AAEtB"}
@@ -1,2 +1,2 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const I=require("react"),R=require("../../shared/hooks/useUncontrolled.cjs");function o(r,n){const t=n-r+1;return Array.from({length:t},(h,s)=>s+r)}const l=Symbol("dots"),O=({total:r,siblings:n=1,boundaries:t=1,page:h,initialPage:s=1,onChange:v})=>{const e=Math.max(Math.trunc(r),0),[c,f]=R.useUncontrolled({value:h,onChange:v,defaultValue:s,finalValue:s}),a=u=>{u<=0?f(1):u>e?f(e):f(u)},M=()=>a(c+1),x=()=>a(c-1),y=()=>a(1),D=()=>a(e);return{range:I.useMemo(()=>{if(n*2+3+t*2>=e)return o(1,e);const i=Math.max(c-n,t),m=Math.min(c+n,e-t),S=i>t+2,P=m<e-(t+1);if(!S&&P){const g=n*2+t+2;return[...o(1,g),l,...o(e-(t-1),e)]}if(S&&!P){const g=t+1+2*n;return[...o(1,t),l,...o(e-g,e)]}return[...o(1,t),l,...o(i,m),l,...o(e-t+1,e)]},[e,n,t,c]),active:c,setPage:a,next:M,previous:x,first:y,last:D}};exports.DOTS=l;exports.usePagination=O;
2
- //# sourceMappingURL=use-pagination.cjs.map
1
+ "use client";const e=require("../../shared/hooks/useUncontrolled.cjs");let t=require("react");function n(e,t){let n=t-e+1;return Array.from({length:n},(t,n)=>n+e)}var r=Symbol(`dots`),i=({total:i,siblings:a=1,boundaries:o=1,page:s,initialPage:c=1,onChange:l})=>{let u=Math.max(Math.trunc(i),0),[d,f]=e.useUncontrolled({value:s,onChange:l,defaultValue:c,finalValue:c}),p=e=>{f(e<=0?1:e>u?u:e)};return{range:(0,t.useMemo)(()=>{if(a*2+3+o*2>=u)return n(1,u);let e=Math.max(d-a,o),t=Math.min(d+a,u-o),i=e>o+2,s=t<u-(o+1);if(!i&&s)return[...n(1,a*2+o+2),r,...n(u-(o-1),u)];if(i&&!s){let e=o+1+2*a;return[...n(1,o),r,...n(u-e,u)]}return[...n(1,o),r,...n(e,t),r,...n(u-o+1,u)]},[u,a,o,d]),active:d,setPage:p,next:()=>p(d+1),previous:()=>p(d-1),first:()=>p(1),last:()=>p(u)}};exports.DOTS=r,exports.usePagination=i;
2
+ //# sourceMappingURL=use-pagination.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-pagination.cjs","sources":["../../../src/components/pagination/use-pagination.ts"],"sourcesContent":["// https://github.com/mantinedev/mantine/blob/95115daf60364ba2e5aba5e5d42d69103f90cb1a/packages/%40mantine/hooks/src/use-pagination/use-pagination.ts\n\nimport { useMemo } from 'react'\nimport { useUncontrolled } from '~/shared/hooks/useUncontrolled'\n\nfunction range(start: number, end: number) {\n const length = end - start + 1\n return Array.from({ length }, (_, index) => index + start)\n}\n\nexport const DOTS: unique symbol = Symbol('dots')\n\nexport interface PaginationParams {\n initialPage?: number\n page?: number\n total: number\n siblings?: number\n boundaries?: number\n onChange?: (page: number) => void\n}\n\nexport const usePagination = ({\n total,\n siblings = 1,\n boundaries = 1,\n page,\n initialPage = 1,\n onChange,\n}: PaginationParams) => {\n const _total = Math.max(Math.trunc(total), 0)\n const [activePage, setActivePage] = useUncontrolled({\n value: page,\n onChange,\n defaultValue: initialPage,\n finalValue: initialPage,\n })\n\n const setPage = (pageNumber: number) => {\n if (pageNumber <= 0) {\n setActivePage(1)\n } else if (pageNumber > _total) {\n setActivePage(_total)\n } else {\n setActivePage(pageNumber)\n }\n }\n\n const next = () => setPage(activePage + 1)\n const previous = () => setPage(activePage - 1)\n const first = () => setPage(1)\n const last = () => setPage(_total)\n\n const paginationRange = useMemo((): (number | typeof DOTS)[] => {\n const totalPageNumbers = siblings * 2 + 3 + boundaries * 2\n if (totalPageNumbers >= _total) {\n return range(1, _total)\n }\n\n const leftSiblingIndex = Math.max(activePage - siblings, boundaries)\n const rightSiblingIndex = Math.min(activePage + siblings, _total - boundaries)\n\n const shouldShowLeftDots = leftSiblingIndex > boundaries + 2\n const shouldShowRightDots = rightSiblingIndex < _total - (boundaries + 1)\n\n if (!shouldShowLeftDots && shouldShowRightDots) {\n const leftItemCount = siblings * 2 + boundaries + 2\n return [...range(1, leftItemCount), DOTS, ...range(_total - (boundaries - 1), _total)]\n }\n\n if (shouldShowLeftDots && !shouldShowRightDots) {\n const rightItemCount = boundaries + 1 + 2 * siblings\n return [...range(1, boundaries), DOTS, ...range(_total - rightItemCount, _total)]\n }\n\n return [\n ...range(1, boundaries),\n DOTS,\n ...range(leftSiblingIndex, rightSiblingIndex),\n DOTS,\n ...range(_total - boundaries + 1, _total),\n ]\n }, [_total, siblings, boundaries, activePage])\n\n return {\n range: paginationRange,\n active: activePage,\n setPage,\n next,\n previous,\n first,\n last,\n }\n}\n"],"names":["range","start","end","length","_","index","DOTS","usePagination","total","siblings","boundaries","page","initialPage","onChange","_total","activePage","setActivePage","useUncontrolled","setPage","pageNumber","next","previous","first","last","useMemo","leftSiblingIndex","rightSiblingIndex","shouldShowLeftDots","shouldShowRightDots","leftItemCount","rightItemCount"],"mappings":"0KAKA,SAASA,EAAMC,EAAeC,EAAa,CACzC,MAAMC,EAASD,EAAMD,EAAQ,EAC7B,OAAO,MAAM,KAAK,CAAE,OAAAE,CAAA,EAAU,CAACC,EAAGC,IAAUA,EAAQJ,CAAK,CAC3D,CAEO,MAAMK,SAA6B,MAAM,EAWnCC,EAAgB,CAAC,CAC5B,MAAAC,EACA,SAAAC,EAAW,EACX,WAAAC,EAAa,EACb,KAAAC,EACA,YAAAC,EAAc,EACd,SAAAC,CACF,IAAwB,CACtB,MAAMC,EAAS,KAAK,IAAI,KAAK,MAAMN,CAAK,EAAG,CAAC,EACtC,CAACO,EAAYC,CAAa,EAAIC,kBAAgB,CAClD,MAAON,EACP,SAAAE,EACA,aAAcD,EACd,WAAYA,CAAA,CACb,EAEKM,EAAWC,GAAuB,CAClCA,GAAc,EAChBH,EAAc,CAAC,EACNG,EAAaL,EACtBE,EAAcF,CAAM,EAEpBE,EAAcG,CAAU,CAE5B,EAEMC,EAAO,IAAMF,EAAQH,EAAa,CAAC,EACnCM,EAAW,IAAMH,EAAQH,EAAa,CAAC,EACvCO,EAAQ,IAAMJ,EAAQ,CAAC,EACvBK,EAAO,IAAML,EAAQJ,CAAM,EAiCjC,MAAO,CACL,MAhCsBU,EAAAA,QAAQ,IAAgC,CAE9D,GADyBf,EAAW,EAAI,EAAIC,EAAa,GACjCI,EACtB,OAAOd,EAAM,EAAGc,CAAM,EAGxB,MAAMW,EAAmB,KAAK,IAAIV,EAAaN,EAAUC,CAAU,EAC7DgB,EAAoB,KAAK,IAAIX,EAAaN,EAAUK,EAASJ,CAAU,EAEvEiB,EAAqBF,EAAmBf,EAAa,EACrDkB,EAAsBF,EAAoBZ,GAAUJ,EAAa,GAEvE,GAAI,CAACiB,GAAsBC,EAAqB,CAC9C,MAAMC,EAAgBpB,EAAW,EAAIC,EAAa,EAClD,MAAO,CAAC,GAAGV,EAAM,EAAG6B,CAAa,EAAGvB,EAAM,GAAGN,EAAMc,GAAUJ,EAAa,GAAII,CAAM,CAAC,CACvF,CAEA,GAAIa,GAAsB,CAACC,EAAqB,CAC9C,MAAME,EAAiBpB,EAAa,EAAI,EAAID,EAC5C,MAAO,CAAC,GAAGT,EAAM,EAAGU,CAAU,EAAGJ,EAAM,GAAGN,EAAMc,EAASgB,EAAgBhB,CAAM,CAAC,CAClF,CAEA,MAAO,CACL,GAAGd,EAAM,EAAGU,CAAU,EACtBJ,EACA,GAAGN,EAAMyB,EAAkBC,CAAiB,EAC5CpB,EACA,GAAGN,EAAMc,EAASJ,EAAa,EAAGI,CAAM,CAAA,CAE5C,EAAG,CAACA,EAAQL,EAAUC,EAAYK,CAAU,CAAC,EAI3C,OAAQA,EACR,QAAAG,EACA,KAAAE,EACA,SAAAC,EACA,MAAAC,EACA,KAAAC,CAAA,CAEJ"}
1
+ {"version":3,"file":"use-pagination.cjs","names":[],"sources":["../../../src/components/pagination/use-pagination.ts"],"sourcesContent":["// https://github.com/mantinedev/mantine/blob/95115daf60364ba2e5aba5e5d42d69103f90cb1a/packages/%40mantine/hooks/src/use-pagination/use-pagination.ts\n\nimport { useMemo } from 'react'\nimport { useUncontrolled } from '~/shared/hooks/useUncontrolled'\n\nfunction range(start: number, end: number) {\n const length = end - start + 1\n return Array.from({ length }, (_, index) => index + start)\n}\n\nexport const DOTS: unique symbol = Symbol('dots')\n\nexport interface PaginationParams {\n initialPage?: number\n page?: number\n total: number\n siblings?: number\n boundaries?: number\n onChange?: (page: number) => void\n}\n\nexport const usePagination = ({\n total,\n siblings = 1,\n boundaries = 1,\n page,\n initialPage = 1,\n onChange,\n}: PaginationParams) => {\n const _total = Math.max(Math.trunc(total), 0)\n const [activePage, setActivePage] = useUncontrolled({\n value: page,\n onChange,\n defaultValue: initialPage,\n finalValue: initialPage,\n })\n\n const setPage = (pageNumber: number) => {\n if (pageNumber <= 0) {\n setActivePage(1)\n } else if (pageNumber > _total) {\n setActivePage(_total)\n } else {\n setActivePage(pageNumber)\n }\n }\n\n const next = () => setPage(activePage + 1)\n const previous = () => setPage(activePage - 1)\n const first = () => setPage(1)\n const last = () => setPage(_total)\n\n const paginationRange = useMemo((): (number | typeof DOTS)[] => {\n const totalPageNumbers = siblings * 2 + 3 + boundaries * 2\n if (totalPageNumbers >= _total) {\n return range(1, _total)\n }\n\n const leftSiblingIndex = Math.max(activePage - siblings, boundaries)\n const rightSiblingIndex = Math.min(activePage + siblings, _total - boundaries)\n\n const shouldShowLeftDots = leftSiblingIndex > boundaries + 2\n const shouldShowRightDots = rightSiblingIndex < _total - (boundaries + 1)\n\n if (!shouldShowLeftDots && shouldShowRightDots) {\n const leftItemCount = siblings * 2 + boundaries + 2\n return [...range(1, leftItemCount), DOTS, ...range(_total - (boundaries - 1), _total)]\n }\n\n if (shouldShowLeftDots && !shouldShowRightDots) {\n const rightItemCount = boundaries + 1 + 2 * siblings\n return [...range(1, boundaries), DOTS, ...range(_total - rightItemCount, _total)]\n }\n\n return [\n ...range(1, boundaries),\n DOTS,\n ...range(leftSiblingIndex, rightSiblingIndex),\n DOTS,\n ...range(_total - boundaries + 1, _total),\n ]\n }, [_total, siblings, boundaries, activePage])\n\n return {\n range: paginationRange,\n active: activePage,\n setPage,\n next,\n previous,\n first,\n last,\n }\n}\n"],"mappings":"8FAKA,SAAS,EAAM,EAAe,EAAa,CACzC,IAAM,EAAS,EAAM,EAAQ,EAC7B,OAAO,MAAM,KAAK,CAAE,QAAO,GAAI,EAAG,IAAU,EAAQ,CAAK,CAC3D,CAEA,IAAa,EAAsB,OAAO,MAAM,EAWnC,GAAiB,CAC5B,QACA,WAAW,EACX,aAAa,EACb,OACA,cAAc,EACd,cACsB,CACtB,IAAM,EAAS,KAAK,IAAI,KAAK,MAAM,CAAK,EAAG,CAAC,EACtC,CAAC,EAAY,GAAiB,EAAA,gBAAgB,CAClD,MAAO,EACP,WACA,aAAc,EACd,WAAY,CACd,CAAC,EAEK,EAAW,GAAuB,CAEpC,EADE,GAAc,EACF,EACL,EAAa,EACR,EAEA,CAAU,CAE5B,EAsCA,MAAO,CACL,OAAA,EAAA,EAAA,aAhC8D,CAE9D,GADyB,EAAW,EAAI,EAAI,EAAa,GACjC,EACtB,OAAO,EAAM,EAAG,CAAM,EAGxB,IAAM,EAAmB,KAAK,IAAI,EAAa,EAAU,CAAU,EAC7D,EAAoB,KAAK,IAAI,EAAa,EAAU,EAAS,CAAU,EAEvE,EAAqB,EAAmB,EAAa,EACrD,EAAsB,EAAoB,GAAU,EAAa,GAEvE,GAAI,CAAC,GAAsB,EAEzB,MAAO,CAAC,GAAG,EAAM,EADK,EAAW,EAAI,EAAa,CACjB,EAAG,EAAM,GAAG,EAAM,GAAU,EAAa,GAAI,CAAM,CAAC,EAGvF,GAAI,GAAsB,CAAC,EAAqB,CAC9C,IAAM,EAAiB,EAAa,EAAI,EAAI,EAC5C,MAAO,CAAC,GAAG,EAAM,EAAG,CAAU,EAAG,EAAM,GAAG,EAAM,EAAS,EAAgB,CAAM,CAAC,CAClF,CAEA,MAAO,CACL,GAAG,EAAM,EAAG,CAAU,EACtB,EACA,GAAG,EAAM,EAAkB,CAAiB,EAC5C,EACA,GAAG,EAAM,EAAS,EAAa,EAAG,CAAM,CAC1C,CACF,EAAG,CAAC,EAAQ,EAAU,EAAY,CAAU,CAGnC,EACP,OAAQ,EACR,UACA,SAxCiB,EAAQ,EAAa,CAAC,EAyCvC,aAxCqB,EAAQ,EAAa,CAAC,EAyC3C,UAxCkB,EAAQ,CAAC,EAyC3B,SAxCiB,EAAQ,CAAM,CAyCjC,CACF"}
@@ -1,57 +1,59 @@
1
1
  "use client";
2
- import { useMemo as D } from "react";
3
- import { useUncontrolled as R } from "../../shared/hooks/useUncontrolled.js";
4
- function e(l, n) {
5
- const t = n - l + 1;
6
- return Array.from({ length: t }, (g, r) => r + l);
2
+ import { useUncontrolled as e } from "../../shared/hooks/useUncontrolled.js";
3
+ import { useMemo as t } from "react";
4
+ //#region src/components/pagination/use-pagination.ts
5
+ function n(e, t) {
6
+ let n = t - e + 1;
7
+ return Array.from({ length: n }, (t, n) => n + e);
7
8
  }
8
- const s = /* @__PURE__ */ Symbol("dots"), C = ({
9
- total: l,
10
- siblings: n = 1,
11
- boundaries: t = 1,
12
- page: g,
13
- initialPage: r = 1,
14
- onChange: v
15
- }) => {
16
- const o = Math.max(Math.trunc(l), 0), [c, h] = R({
17
- value: g,
18
- onChange: v,
19
- defaultValue: r,
20
- finalValue: r
21
- }), a = (f) => {
22
- f <= 0 ? h(1) : f > o ? h(o) : h(f);
23
- }, M = () => a(c + 1), P = () => a(c - 1), p = () => a(1), I = () => a(o);
24
- return {
25
- range: D(() => {
26
- if (n * 2 + 3 + t * 2 >= o)
27
- return e(1, o);
28
- const u = Math.max(c - n, t), x = Math.min(c + n, o - t), S = u > t + 2, i = x < o - (t + 1);
29
- if (!S && i) {
30
- const m = n * 2 + t + 2;
31
- return [...e(1, m), s, ...e(o - (t - 1), o)];
32
- }
33
- if (S && !i) {
34
- const m = t + 1 + 2 * n;
35
- return [...e(1, t), s, ...e(o - m, o)];
36
- }
37
- return [
38
- ...e(1, t),
39
- s,
40
- ...e(u, x),
41
- s,
42
- ...e(o - t + 1, o)
43
- ];
44
- }, [o, n, t, c]),
45
- active: c,
46
- setPage: a,
47
- next: M,
48
- previous: P,
49
- first: p,
50
- last: I
51
- };
9
+ var r = Symbol("dots"), i = ({ total: i, siblings: a = 1, boundaries: o = 1, page: s, initialPage: c = 1, onChange: l }) => {
10
+ let u = Math.max(Math.trunc(i), 0), [d, f] = e({
11
+ value: s,
12
+ onChange: l,
13
+ defaultValue: c,
14
+ finalValue: c
15
+ }), p = (e) => {
16
+ f(e <= 0 ? 1 : e > u ? u : e);
17
+ };
18
+ return {
19
+ range: t(() => {
20
+ if (a * 2 + 3 + o * 2 >= u) return n(1, u);
21
+ let e = Math.max(d - a, o), t = Math.min(d + a, u - o), i = e > o + 2, s = t < u - (o + 1);
22
+ if (!i && s) return [
23
+ ...n(1, a * 2 + o + 2),
24
+ r,
25
+ ...n(u - (o - 1), u)
26
+ ];
27
+ if (i && !s) {
28
+ let e = o + 1 + 2 * a;
29
+ return [
30
+ ...n(1, o),
31
+ r,
32
+ ...n(u - e, u)
33
+ ];
34
+ }
35
+ return [
36
+ ...n(1, o),
37
+ r,
38
+ ...n(e, t),
39
+ r,
40
+ ...n(u - o + 1, u)
41
+ ];
42
+ }, [
43
+ u,
44
+ a,
45
+ o,
46
+ d
47
+ ]),
48
+ active: d,
49
+ setPage: p,
50
+ next: () => p(d + 1),
51
+ previous: () => p(d - 1),
52
+ first: () => p(1),
53
+ last: () => p(u)
54
+ };
52
55
  };
53
- export {
54
- s as DOTS,
55
- C as usePagination
56
- };
57
- //# sourceMappingURL=use-pagination.js.map
56
+ //#endregion
57
+ export { r as DOTS, i as usePagination };
58
+
59
+ //# sourceMappingURL=use-pagination.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-pagination.js","sources":["../../../src/components/pagination/use-pagination.ts"],"sourcesContent":["// https://github.com/mantinedev/mantine/blob/95115daf60364ba2e5aba5e5d42d69103f90cb1a/packages/%40mantine/hooks/src/use-pagination/use-pagination.ts\n\nimport { useMemo } from 'react'\nimport { useUncontrolled } from '~/shared/hooks/useUncontrolled'\n\nfunction range(start: number, end: number) {\n const length = end - start + 1\n return Array.from({ length }, (_, index) => index + start)\n}\n\nexport const DOTS: unique symbol = Symbol('dots')\n\nexport interface PaginationParams {\n initialPage?: number\n page?: number\n total: number\n siblings?: number\n boundaries?: number\n onChange?: (page: number) => void\n}\n\nexport const usePagination = ({\n total,\n siblings = 1,\n boundaries = 1,\n page,\n initialPage = 1,\n onChange,\n}: PaginationParams) => {\n const _total = Math.max(Math.trunc(total), 0)\n const [activePage, setActivePage] = useUncontrolled({\n value: page,\n onChange,\n defaultValue: initialPage,\n finalValue: initialPage,\n })\n\n const setPage = (pageNumber: number) => {\n if (pageNumber <= 0) {\n setActivePage(1)\n } else if (pageNumber > _total) {\n setActivePage(_total)\n } else {\n setActivePage(pageNumber)\n }\n }\n\n const next = () => setPage(activePage + 1)\n const previous = () => setPage(activePage - 1)\n const first = () => setPage(1)\n const last = () => setPage(_total)\n\n const paginationRange = useMemo((): (number | typeof DOTS)[] => {\n const totalPageNumbers = siblings * 2 + 3 + boundaries * 2\n if (totalPageNumbers >= _total) {\n return range(1, _total)\n }\n\n const leftSiblingIndex = Math.max(activePage - siblings, boundaries)\n const rightSiblingIndex = Math.min(activePage + siblings, _total - boundaries)\n\n const shouldShowLeftDots = leftSiblingIndex > boundaries + 2\n const shouldShowRightDots = rightSiblingIndex < _total - (boundaries + 1)\n\n if (!shouldShowLeftDots && shouldShowRightDots) {\n const leftItemCount = siblings * 2 + boundaries + 2\n return [...range(1, leftItemCount), DOTS, ...range(_total - (boundaries - 1), _total)]\n }\n\n if (shouldShowLeftDots && !shouldShowRightDots) {\n const rightItemCount = boundaries + 1 + 2 * siblings\n return [...range(1, boundaries), DOTS, ...range(_total - rightItemCount, _total)]\n }\n\n return [\n ...range(1, boundaries),\n DOTS,\n ...range(leftSiblingIndex, rightSiblingIndex),\n DOTS,\n ...range(_total - boundaries + 1, _total),\n ]\n }, [_total, siblings, boundaries, activePage])\n\n return {\n range: paginationRange,\n active: activePage,\n setPage,\n next,\n previous,\n first,\n last,\n }\n}\n"],"names":["range","start","end","length","_","index","DOTS","usePagination","total","siblings","boundaries","page","initialPage","onChange","_total","activePage","setActivePage","useUncontrolled","setPage","pageNumber","next","previous","first","last","useMemo","leftSiblingIndex","rightSiblingIndex","shouldShowLeftDots","shouldShowRightDots","leftItemCount","rightItemCount"],"mappings":";;;AAKA,SAASA,EAAMC,GAAeC,GAAa;AACzC,QAAMC,IAASD,IAAMD,IAAQ;AAC7B,SAAO,MAAM,KAAK,EAAE,QAAAE,EAAA,GAAU,CAACC,GAAGC,MAAUA,IAAQJ,CAAK;AAC3D;AAEO,MAAMK,2BAA6B,MAAM,GAWnCC,IAAgB,CAAC;AAAA,EAC5B,OAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,YAAAC,IAAa;AAAA,EACb,MAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,UAAAC;AACF,MAAwB;AACtB,QAAMC,IAAS,KAAK,IAAI,KAAK,MAAMN,CAAK,GAAG,CAAC,GACtC,CAACO,GAAYC,CAAa,IAAIC,EAAgB;AAAA,IAClD,OAAON;AAAA,IACP,UAAAE;AAAA,IACA,cAAcD;AAAA,IACd,YAAYA;AAAA,EAAA,CACb,GAEKM,IAAU,CAACC,MAAuB;AACtC,IAAIA,KAAc,IAChBH,EAAc,CAAC,IACNG,IAAaL,IACtBE,EAAcF,CAAM,IAEpBE,EAAcG,CAAU;AAAA,EAE5B,GAEMC,IAAO,MAAMF,EAAQH,IAAa,CAAC,GACnCM,IAAW,MAAMH,EAAQH,IAAa,CAAC,GACvCO,IAAQ,MAAMJ,EAAQ,CAAC,GACvBK,IAAO,MAAML,EAAQJ,CAAM;AAiCjC,SAAO;AAAA,IACL,OAhCsBU,EAAQ,MAAgC;AAE9D,UADyBf,IAAW,IAAI,IAAIC,IAAa,KACjCI;AACtB,eAAOd,EAAM,GAAGc,CAAM;AAGxB,YAAMW,IAAmB,KAAK,IAAIV,IAAaN,GAAUC,CAAU,GAC7DgB,IAAoB,KAAK,IAAIX,IAAaN,GAAUK,IAASJ,CAAU,GAEvEiB,IAAqBF,IAAmBf,IAAa,GACrDkB,IAAsBF,IAAoBZ,KAAUJ,IAAa;AAEvE,UAAI,CAACiB,KAAsBC,GAAqB;AAC9C,cAAMC,IAAgBpB,IAAW,IAAIC,IAAa;AAClD,eAAO,CAAC,GAAGV,EAAM,GAAG6B,CAAa,GAAGvB,GAAM,GAAGN,EAAMc,KAAUJ,IAAa,IAAII,CAAM,CAAC;AAAA,MACvF;AAEA,UAAIa,KAAsB,CAACC,GAAqB;AAC9C,cAAME,IAAiBpB,IAAa,IAAI,IAAID;AAC5C,eAAO,CAAC,GAAGT,EAAM,GAAGU,CAAU,GAAGJ,GAAM,GAAGN,EAAMc,IAASgB,GAAgBhB,CAAM,CAAC;AAAA,MAClF;AAEA,aAAO;AAAA,QACL,GAAGd,EAAM,GAAGU,CAAU;AAAA,QACtBJ;AAAA,QACA,GAAGN,EAAMyB,GAAkBC,CAAiB;AAAA,QAC5CpB;AAAA,QACA,GAAGN,EAAMc,IAASJ,IAAa,GAAGI,CAAM;AAAA,MAAA;AAAA,IAE5C,GAAG,CAACA,GAAQL,GAAUC,GAAYK,CAAU,CAAC;AAAA,IAI3C,QAAQA;AAAA,IACR,SAAAG;AAAA,IACA,MAAAE;AAAA,IACA,UAAAC;AAAA,IACA,OAAAC;AAAA,IACA,MAAAC;AAAA,EAAA;AAEJ;"}
1
+ {"version":3,"file":"use-pagination.js","names":[],"sources":["../../../src/components/pagination/use-pagination.ts"],"sourcesContent":["// https://github.com/mantinedev/mantine/blob/95115daf60364ba2e5aba5e5d42d69103f90cb1a/packages/%40mantine/hooks/src/use-pagination/use-pagination.ts\n\nimport { useMemo } from 'react'\nimport { useUncontrolled } from '~/shared/hooks/useUncontrolled'\n\nfunction range(start: number, end: number) {\n const length = end - start + 1\n return Array.from({ length }, (_, index) => index + start)\n}\n\nexport const DOTS: unique symbol = Symbol('dots')\n\nexport interface PaginationParams {\n initialPage?: number\n page?: number\n total: number\n siblings?: number\n boundaries?: number\n onChange?: (page: number) => void\n}\n\nexport const usePagination = ({\n total,\n siblings = 1,\n boundaries = 1,\n page,\n initialPage = 1,\n onChange,\n}: PaginationParams) => {\n const _total = Math.max(Math.trunc(total), 0)\n const [activePage, setActivePage] = useUncontrolled({\n value: page,\n onChange,\n defaultValue: initialPage,\n finalValue: initialPage,\n })\n\n const setPage = (pageNumber: number) => {\n if (pageNumber <= 0) {\n setActivePage(1)\n } else if (pageNumber > _total) {\n setActivePage(_total)\n } else {\n setActivePage(pageNumber)\n }\n }\n\n const next = () => setPage(activePage + 1)\n const previous = () => setPage(activePage - 1)\n const first = () => setPage(1)\n const last = () => setPage(_total)\n\n const paginationRange = useMemo((): (number | typeof DOTS)[] => {\n const totalPageNumbers = siblings * 2 + 3 + boundaries * 2\n if (totalPageNumbers >= _total) {\n return range(1, _total)\n }\n\n const leftSiblingIndex = Math.max(activePage - siblings, boundaries)\n const rightSiblingIndex = Math.min(activePage + siblings, _total - boundaries)\n\n const shouldShowLeftDots = leftSiblingIndex > boundaries + 2\n const shouldShowRightDots = rightSiblingIndex < _total - (boundaries + 1)\n\n if (!shouldShowLeftDots && shouldShowRightDots) {\n const leftItemCount = siblings * 2 + boundaries + 2\n return [...range(1, leftItemCount), DOTS, ...range(_total - (boundaries - 1), _total)]\n }\n\n if (shouldShowLeftDots && !shouldShowRightDots) {\n const rightItemCount = boundaries + 1 + 2 * siblings\n return [...range(1, boundaries), DOTS, ...range(_total - rightItemCount, _total)]\n }\n\n return [\n ...range(1, boundaries),\n DOTS,\n ...range(leftSiblingIndex, rightSiblingIndex),\n DOTS,\n ...range(_total - boundaries + 1, _total),\n ]\n }, [_total, siblings, boundaries, activePage])\n\n return {\n range: paginationRange,\n active: activePage,\n setPage,\n next,\n previous,\n first,\n last,\n }\n}\n"],"mappings":";;;;AAKA,SAAS,EAAM,GAAe,GAAa;CACzC,IAAM,IAAS,IAAM,IAAQ;CAC7B,OAAO,MAAM,KAAK,EAAE,UAAO,IAAI,GAAG,MAAU,IAAQ,CAAK;AAC3D;AAEA,IAAa,IAAsB,OAAO,MAAM,GAWnC,KAAiB,EAC5B,UACA,cAAW,GACX,gBAAa,GACb,SACA,iBAAc,GACd,kBACsB;CACtB,IAAM,IAAS,KAAK,IAAI,KAAK,MAAM,CAAK,GAAG,CAAC,GACtC,CAAC,GAAY,KAAiB,EAAgB;EAClD,OAAO;EACP;EACA,cAAc;EACd,YAAY;CACd,CAAC,GAEK,KAAW,MAAuB;EACtC,AACE,EADE,KAAc,IACF,IACL,IAAa,IACR,IAEA,CAAU;CAE5B;CAsCA,OAAO;EACL,OAhCsB,QAAwC;GAE9D,IADyB,IAAW,IAAI,IAAI,IAAa,KACjC,GACtB,OAAO,EAAM,GAAG,CAAM;GAGxB,IAAM,IAAmB,KAAK,IAAI,IAAa,GAAU,CAAU,GAC7D,IAAoB,KAAK,IAAI,IAAa,GAAU,IAAS,CAAU,GAEvE,IAAqB,IAAmB,IAAa,GACrD,IAAsB,IAAoB,KAAU,IAAa;GAEvE,IAAI,CAAC,KAAsB,GAEzB,OAAO;IAAC,GAAG,EAAM,GADK,IAAW,IAAI,IAAa,CACjB;IAAG;IAAM,GAAG,EAAM,KAAU,IAAa,IAAI,CAAM;GAAC;GAGvF,IAAI,KAAsB,CAAC,GAAqB;IAC9C,IAAM,IAAiB,IAAa,IAAI,IAAI;IAC5C,OAAO;KAAC,GAAG,EAAM,GAAG,CAAU;KAAG;KAAM,GAAG,EAAM,IAAS,GAAgB,CAAM;IAAC;GAClF;GAEA,OAAO;IACL,GAAG,EAAM,GAAG,CAAU;IACtB;IACA,GAAG,EAAM,GAAkB,CAAiB;IAC5C;IACA,GAAG,EAAM,IAAS,IAAa,GAAG,CAAM;GAC1C;EACF,GAAG;GAAC;GAAQ;GAAU;GAAY;EAAU,CAGnC;EACP,QAAQ;EACR;EACA,YAxCiB,EAAQ,IAAa,CAAC;EAyCvC,gBAxCqB,EAAQ,IAAa,CAAC;EAyC3C,aAxCkB,EAAQ,CAAC;EAyC3B,YAxCiB,EAAQ,CAAM;CAyCjC;AACF"}
@@ -1,2 +1,2 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),o=require("@ark-ui/react"),e=require("@stokelp/styled-system/jsx"),p=require("@stokelp/styled-system/recipes"),P=require("react"),v=require("../../utils/slots.cjs"),{withProvider:l,withContext:r}=v.createStyleContext(p.popover),g=l(o.Popover.Root,void 0,{defaultProps:{unmountOnExit:!0,lazyMount:!0,portalled:!0}}),u=r(e.styled(o.Popover.CloseTrigger),"closeTrigger"),d=r(e.styled(o.Popover.Trigger),"trigger"),a=r(e.styled(o.Popover.Anchor),"anchor"),C=r(e.styled(o.Popover.Positioner),"positioner"),n=P.forwardRef(({children:s,...i},c)=>t.jsx(o.Portal,{children:t.jsx(C,{children:t.jsx(o.Popover.Content,{ref:c,...i,children:s})})}));n.displayName=o.Popover.Content.displayName;const x=r(e.styled(n),"content"),y=o.Popover.Context;exports.Popover=g;exports.PopoverAnchor=a;exports.PopoverCloseTrigger=u;exports.PopoverContent=x;exports.PopoverContext=y;exports.PopoverTrigger=d;
2
- //# sourceMappingURL=Popover.cjs.map
1
+ "use client";const e=require("../../utils/slots.cjs");let t=require("@ark-ui/react"),n=require("@stokelp/styled-system/jsx"),r=require("@stokelp/styled-system/recipes"),i=require("react"),a=require("react/jsx-runtime");var{withProvider:o,withContext:s}=e.createStyleContext(r.popover),c=o(t.Popover.Root,void 0,{defaultProps:{unmountOnExit:!0,lazyMount:!0,portalled:!0}}),l=s((0,n.styled)(t.Popover.CloseTrigger),`closeTrigger`),u=s((0,n.styled)(t.Popover.Trigger),`trigger`),d=s((0,n.styled)(t.Popover.Anchor),`anchor`),f=s((0,n.styled)(t.Popover.Positioner),`positioner`),p=(0,i.forwardRef)(({children:e,...n},r)=>(0,a.jsx)(t.Portal,{children:(0,a.jsx)(f,{children:(0,a.jsx)(t.Popover.Content,{ref:r,...n,children:e})})}));p.displayName=t.Popover.Content.displayName;var m=s((0,n.styled)(p),`content`),h=t.Popover.Context;exports.Popover=c,exports.PopoverAnchor=d,exports.PopoverCloseTrigger=l,exports.PopoverContent=m,exports.PopoverContext=h,exports.PopoverTrigger=u;
2
+ //# sourceMappingURL=Popover.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Popover.cjs","sources":["../../../src/components/popover/Popover.tsx"],"sourcesContent":["import { Portal } from '@ark-ui/react'\nimport { Popover as ArkPopover } from '@ark-ui/react'\nimport { styled } from '@stokelp/styled-system/jsx'\nimport { popover } from '@stokelp/styled-system/recipes'\nimport type { ComponentProps, ComponentPropsWithoutRef, ElementRef } from 'react'\nimport { forwardRef } from 'react'\n\nimport { createStyleContext } from '~/utils/slots'\n\nconst { withProvider, withContext } = createStyleContext(popover)\n\nexport const Popover = withProvider(ArkPopover.Root, undefined, {\n defaultProps: {\n unmountOnExit: true,\n lazyMount: true,\n portalled: true,\n },\n})\nexport const PopoverCloseTrigger = withContext(styled(ArkPopover.CloseTrigger), 'closeTrigger')\nexport const PopoverTrigger = withContext(styled(ArkPopover.Trigger), 'trigger')\nexport const PopoverAnchor = withContext(styled(ArkPopover.Anchor), 'anchor')\n\nconst PopoverPositioner = withContext(styled(ArkPopover.Positioner), 'positioner')\n\nconst Content = forwardRef<ElementRef<typeof ArkPopover.Content>, ComponentPropsWithoutRef<typeof ArkPopover.Content>>(\n ({ children, ...props }, ref) => (\n <Portal>\n <PopoverPositioner>\n <ArkPopover.Content ref={ref} {...props}>\n {children}\n </ArkPopover.Content>\n </PopoverPositioner>\n </Portal>\n ),\n)\nContent.displayName = ArkPopover.Content.displayName\n\nexport const PopoverContent = withContext(styled(Content), 'content')\nexport const PopoverContext = ArkPopover.Context\n\nexport interface PopoverProps extends ComponentProps<typeof Popover> {}\nexport interface PopoverCloseTriggerProps extends ComponentProps<typeof PopoverCloseTrigger> {}\nexport interface PopoverContentProps extends ComponentProps<typeof PopoverContent> {}\nexport interface PopoverTriggerProps extends ComponentProps<typeof PopoverTrigger> {}\nexport interface PopoverAnchorProps extends ComponentProps<typeof PopoverAnchor> {}\nexport interface PopoverContextProps extends ComponentProps<typeof PopoverContext> {}\n"],"names":["withProvider","withContext","createStyleContext","popover","Popover","ArkPopover","PopoverCloseTrigger","styled","PopoverTrigger","PopoverAnchor","PopoverPositioner","Content","forwardRef","children","props","ref","Portal","jsx","PopoverContent","PopoverContext"],"mappings":"uSASM,CAAE,aAAAA,EAAc,YAAAC,GAAgBC,EAAAA,mBAAmBC,EAAAA,OAAO,EAEnDC,EAAUJ,EAAaK,UAAW,KAAM,OAAW,CAC9D,aAAc,CACZ,cAAe,GACf,UAAW,GACX,UAAW,EAAA,CAEf,CAAC,EACYC,EAAsBL,EAAYM,EAAAA,OAAOF,EAAAA,QAAW,YAAY,EAAG,cAAc,EACjFG,EAAiBP,EAAYM,EAAAA,OAAOF,EAAAA,QAAW,OAAO,EAAG,SAAS,EAClEI,EAAgBR,EAAYM,EAAAA,OAAOF,EAAAA,QAAW,MAAM,EAAG,QAAQ,EAEtEK,EAAoBT,EAAYM,EAAAA,OAAOF,EAAAA,QAAW,UAAU,EAAG,YAAY,EAE3EM,EAAUC,EAAAA,WACd,CAAC,CAAE,SAAAC,EAAU,GAAGC,GAASC,UACtBC,EAAAA,OAAA,CACC,SAAAC,MAACP,GACC,SAAAO,EAAAA,IAACZ,EAAAA,QAAW,QAAX,CAAmB,IAAAU,EAAW,GAAGD,EAC/B,SAAAD,EACH,EACF,CAAA,CACF,CAEJ,EACAF,EAAQ,YAAcN,UAAW,QAAQ,YAElC,MAAMa,EAAiBjB,EAAYM,SAAOI,CAAO,EAAG,SAAS,EACvDQ,EAAiBd,EAAAA,QAAW"}
1
+ {"version":3,"file":"Popover.cjs","names":[],"sources":["../../../src/components/popover/Popover.tsx"],"sourcesContent":["import { Portal } from '@ark-ui/react'\nimport { Popover as ArkPopover } from '@ark-ui/react'\nimport { styled } from '@stokelp/styled-system/jsx'\nimport { popover } from '@stokelp/styled-system/recipes'\nimport type { ComponentProps, ComponentPropsWithoutRef, ElementRef } from 'react'\nimport { forwardRef } from 'react'\n\nimport { createStyleContext } from '~/utils/slots'\n\nconst { withProvider, withContext } = createStyleContext(popover)\n\nexport const Popover = withProvider(ArkPopover.Root, undefined, {\n defaultProps: {\n unmountOnExit: true,\n lazyMount: true,\n portalled: true,\n },\n})\nexport const PopoverCloseTrigger = withContext(styled(ArkPopover.CloseTrigger), 'closeTrigger')\nexport const PopoverTrigger = withContext(styled(ArkPopover.Trigger), 'trigger')\nexport const PopoverAnchor = withContext(styled(ArkPopover.Anchor), 'anchor')\n\nconst PopoverPositioner = withContext(styled(ArkPopover.Positioner), 'positioner')\n\nconst Content = forwardRef<ElementRef<typeof ArkPopover.Content>, ComponentPropsWithoutRef<typeof ArkPopover.Content>>(\n ({ children, ...props }, ref) => (\n <Portal>\n <PopoverPositioner>\n <ArkPopover.Content ref={ref} {...props}>\n {children}\n </ArkPopover.Content>\n </PopoverPositioner>\n </Portal>\n ),\n)\nContent.displayName = ArkPopover.Content.displayName\n\nexport const PopoverContent = withContext(styled(Content), 'content')\nexport const PopoverContext = ArkPopover.Context\n\nexport interface PopoverProps extends ComponentProps<typeof Popover> {}\nexport interface PopoverCloseTriggerProps extends ComponentProps<typeof PopoverCloseTrigger> {}\nexport interface PopoverContentProps extends ComponentProps<typeof PopoverContent> {}\nexport interface PopoverTriggerProps extends ComponentProps<typeof PopoverTrigger> {}\nexport interface PopoverAnchorProps extends ComponentProps<typeof PopoverAnchor> {}\nexport interface PopoverContextProps extends ComponentProps<typeof PopoverContext> {}\n"],"mappings":"2NASA,GAAM,CAAE,eAAc,eAAgB,EAAA,mBAAmB,EAAA,OAAO,EAEnD,EAAU,EAAa,EAAA,QAAW,KAAM,IAAA,GAAW,CAC9D,aAAc,CACZ,cAAe,GACf,UAAW,GACX,UAAW,EACb,CACF,CAAC,EACY,EAAsB,GAAA,EAAA,EAAA,QAAmB,EAAA,QAAW,YAAY,EAAG,cAAc,EACjF,EAAiB,GAAA,EAAA,EAAA,QAAmB,EAAA,QAAW,OAAO,EAAG,SAAS,EAClE,EAAgB,GAAA,EAAA,EAAA,QAAmB,EAAA,QAAW,MAAM,EAAG,QAAQ,EAEtE,EAAoB,GAAA,EAAA,EAAA,QAAmB,EAAA,QAAW,UAAU,EAAG,YAAY,EAE3E,GAAA,EAAA,EAAA,aACH,CAAE,WAAU,GAAG,GAAS,KACvB,EAAA,EAAA,KAAC,EAAA,OAAD,CAAA,UACE,EAAA,EAAA,KAAC,EAAD,CAAA,UACE,EAAA,EAAA,KAAC,EAAA,QAAW,QAAZ,CAAyB,MAAK,GAAI,EAC/B,UACiB,CAAA,CACH,CAAA,CACb,CAAA,CAEZ,EACA,EAAQ,YAAc,EAAA,QAAW,QAAQ,YAEzC,IAAa,EAAiB,GAAA,EAAA,EAAA,QAAmB,CAAO,EAAG,SAAS,EACvD,EAAiB,EAAA,QAAW"}
@@ -1,27 +1,23 @@
1
1
  "use client";
2
- import { jsx as e } from "react/jsx-runtime";
3
- import { Popover as o, Portal as c } from "@ark-ui/react";
2
+ import { createStyleContext as e } from "../../utils/slots.js";
3
+ import { Popover as t, Portal as n } from "@ark-ui/react";
4
4
  import { styled as r } from "@stokelp/styled-system/jsx";
5
- import { popover as l } from "@stokelp/styled-system/recipes";
6
- import { forwardRef as m } from "react";
7
- import { createStyleContext as P } from "../../utils/slots.js";
8
- const { withProvider: a, withContext: t } = P(l), x = a(o.Root, void 0, {
9
- defaultProps: {
10
- unmountOnExit: !0,
11
- lazyMount: !0,
12
- portalled: !0
13
- }
14
- }), y = t(r(o.CloseTrigger), "closeTrigger"), T = t(r(o.Trigger), "trigger"), w = t(r(o.Anchor), "anchor"), g = t(r(o.Positioner), "positioner"), n = m(
15
- ({ children: i, ...p }, s) => /* @__PURE__ */ e(c, { children: /* @__PURE__ */ e(g, { children: /* @__PURE__ */ e(o.Content, { ref: s, ...p, children: i }) }) })
16
- );
17
- n.displayName = o.Content.displayName;
18
- const A = t(r(n), "content"), N = o.Context;
19
- export {
20
- x as Popover,
21
- w as PopoverAnchor,
22
- y as PopoverCloseTrigger,
23
- A as PopoverContent,
24
- N as PopoverContext,
25
- T as PopoverTrigger
26
- };
27
- //# sourceMappingURL=Popover.js.map
5
+ import { popover as i } from "@stokelp/styled-system/recipes";
6
+ import { forwardRef as a } from "react";
7
+ import { jsx as o } from "react/jsx-runtime";
8
+ //#region src/components/popover/Popover.tsx
9
+ var { withProvider: s, withContext: c } = e(i), l = s(t.Root, void 0, { defaultProps: {
10
+ unmountOnExit: !0,
11
+ lazyMount: !0,
12
+ portalled: !0
13
+ } }), u = c(r(t.CloseTrigger), "closeTrigger"), d = c(r(t.Trigger), "trigger"), f = c(r(t.Anchor), "anchor"), p = c(r(t.Positioner), "positioner"), m = a(({ children: e, ...r }, i) => /* @__PURE__ */ o(n, { children: /* @__PURE__ */ o(p, { children: /* @__PURE__ */ o(t.Content, {
14
+ ref: i,
15
+ ...r,
16
+ children: e
17
+ }) }) }));
18
+ m.displayName = t.Content.displayName;
19
+ var h = c(r(m), "content"), g = t.Context;
20
+ //#endregion
21
+ export { l as Popover, f as PopoverAnchor, u as PopoverCloseTrigger, h as PopoverContent, g as PopoverContext, d as PopoverTrigger };
22
+
23
+ //# sourceMappingURL=Popover.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Popover.js","sources":["../../../src/components/popover/Popover.tsx"],"sourcesContent":["import { Portal } from '@ark-ui/react'\nimport { Popover as ArkPopover } from '@ark-ui/react'\nimport { styled } from '@stokelp/styled-system/jsx'\nimport { popover } from '@stokelp/styled-system/recipes'\nimport type { ComponentProps, ComponentPropsWithoutRef, ElementRef } from 'react'\nimport { forwardRef } from 'react'\n\nimport { createStyleContext } from '~/utils/slots'\n\nconst { withProvider, withContext } = createStyleContext(popover)\n\nexport const Popover = withProvider(ArkPopover.Root, undefined, {\n defaultProps: {\n unmountOnExit: true,\n lazyMount: true,\n portalled: true,\n },\n})\nexport const PopoverCloseTrigger = withContext(styled(ArkPopover.CloseTrigger), 'closeTrigger')\nexport const PopoverTrigger = withContext(styled(ArkPopover.Trigger), 'trigger')\nexport const PopoverAnchor = withContext(styled(ArkPopover.Anchor), 'anchor')\n\nconst PopoverPositioner = withContext(styled(ArkPopover.Positioner), 'positioner')\n\nconst Content = forwardRef<ElementRef<typeof ArkPopover.Content>, ComponentPropsWithoutRef<typeof ArkPopover.Content>>(\n ({ children, ...props }, ref) => (\n <Portal>\n <PopoverPositioner>\n <ArkPopover.Content ref={ref} {...props}>\n {children}\n </ArkPopover.Content>\n </PopoverPositioner>\n </Portal>\n ),\n)\nContent.displayName = ArkPopover.Content.displayName\n\nexport const PopoverContent = withContext(styled(Content), 'content')\nexport const PopoverContext = ArkPopover.Context\n\nexport interface PopoverProps extends ComponentProps<typeof Popover> {}\nexport interface PopoverCloseTriggerProps extends ComponentProps<typeof PopoverCloseTrigger> {}\nexport interface PopoverContentProps extends ComponentProps<typeof PopoverContent> {}\nexport interface PopoverTriggerProps extends ComponentProps<typeof PopoverTrigger> {}\nexport interface PopoverAnchorProps extends ComponentProps<typeof PopoverAnchor> {}\nexport interface PopoverContextProps extends ComponentProps<typeof PopoverContext> {}\n"],"names":["withProvider","withContext","createStyleContext","popover","Popover","ArkPopover","PopoverCloseTrigger","styled","PopoverTrigger","PopoverAnchor","PopoverPositioner","Content","forwardRef","children","props","ref","Portal","jsx","PopoverContent","PopoverContext"],"mappings":";;;;;;;AASA,MAAM,EAAE,cAAAA,GAAc,aAAAC,MAAgBC,EAAmBC,CAAO,GAEnDC,IAAUJ,EAAaK,EAAW,MAAM,QAAW;AAAA,EAC9D,cAAc;AAAA,IACZ,eAAe;AAAA,IACf,WAAW;AAAA,IACX,WAAW;AAAA,EAAA;AAEf,CAAC,GACYC,IAAsBL,EAAYM,EAAOF,EAAW,YAAY,GAAG,cAAc,GACjFG,IAAiBP,EAAYM,EAAOF,EAAW,OAAO,GAAG,SAAS,GAClEI,IAAgBR,EAAYM,EAAOF,EAAW,MAAM,GAAG,QAAQ,GAEtEK,IAAoBT,EAAYM,EAAOF,EAAW,UAAU,GAAG,YAAY,GAE3EM,IAAUC;AAAA,EACd,CAAC,EAAE,UAAAC,GAAU,GAAGC,KAASC,wBACtBC,GAAA,EACC,UAAA,gBAAAC,EAACP,KACC,UAAA,gBAAAO,EAACZ,EAAW,SAAX,EAAmB,KAAAU,GAAW,GAAGD,GAC/B,UAAAD,GACH,GACF,EAAA,CACF;AAEJ;AACAF,EAAQ,cAAcN,EAAW,QAAQ;AAElC,MAAMa,IAAiBjB,EAAYM,EAAOI,CAAO,GAAG,SAAS,GACvDQ,IAAiBd,EAAW;"}
1
+ {"version":3,"file":"Popover.js","names":[],"sources":["../../../src/components/popover/Popover.tsx"],"sourcesContent":["import { Portal } from '@ark-ui/react'\nimport { Popover as ArkPopover } from '@ark-ui/react'\nimport { styled } from '@stokelp/styled-system/jsx'\nimport { popover } from '@stokelp/styled-system/recipes'\nimport type { ComponentProps, ComponentPropsWithoutRef, ElementRef } from 'react'\nimport { forwardRef } from 'react'\n\nimport { createStyleContext } from '~/utils/slots'\n\nconst { withProvider, withContext } = createStyleContext(popover)\n\nexport const Popover = withProvider(ArkPopover.Root, undefined, {\n defaultProps: {\n unmountOnExit: true,\n lazyMount: true,\n portalled: true,\n },\n})\nexport const PopoverCloseTrigger = withContext(styled(ArkPopover.CloseTrigger), 'closeTrigger')\nexport const PopoverTrigger = withContext(styled(ArkPopover.Trigger), 'trigger')\nexport const PopoverAnchor = withContext(styled(ArkPopover.Anchor), 'anchor')\n\nconst PopoverPositioner = withContext(styled(ArkPopover.Positioner), 'positioner')\n\nconst Content = forwardRef<ElementRef<typeof ArkPopover.Content>, ComponentPropsWithoutRef<typeof ArkPopover.Content>>(\n ({ children, ...props }, ref) => (\n <Portal>\n <PopoverPositioner>\n <ArkPopover.Content ref={ref} {...props}>\n {children}\n </ArkPopover.Content>\n </PopoverPositioner>\n </Portal>\n ),\n)\nContent.displayName = ArkPopover.Content.displayName\n\nexport const PopoverContent = withContext(styled(Content), 'content')\nexport const PopoverContext = ArkPopover.Context\n\nexport interface PopoverProps extends ComponentProps<typeof Popover> {}\nexport interface PopoverCloseTriggerProps extends ComponentProps<typeof PopoverCloseTrigger> {}\nexport interface PopoverContentProps extends ComponentProps<typeof PopoverContent> {}\nexport interface PopoverTriggerProps extends ComponentProps<typeof PopoverTrigger> {}\nexport interface PopoverAnchorProps extends ComponentProps<typeof PopoverAnchor> {}\nexport interface PopoverContextProps extends ComponentProps<typeof PopoverContext> {}\n"],"mappings":";;;;;;;;AASA,IAAM,EAAE,iBAAc,mBAAgB,EAAmB,CAAO,GAEnD,IAAU,EAAa,EAAW,MAAM,KAAA,GAAW,EAC9D,cAAc;CACZ,eAAe;CACf,WAAW;CACX,WAAW;AACb,EACF,CAAC,GACY,IAAsB,EAAY,EAAO,EAAW,YAAY,GAAG,cAAc,GACjF,IAAiB,EAAY,EAAO,EAAW,OAAO,GAAG,SAAS,GAClE,IAAgB,EAAY,EAAO,EAAW,MAAM,GAAG,QAAQ,GAEtE,IAAoB,EAAY,EAAO,EAAW,UAAU,GAAG,YAAY,GAE3E,IAAU,GACb,EAAE,aAAU,GAAG,KAAS,MACvB,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD,EAAA,UACE,kBAAC,EAAW,SAAZ;CAAyB;CAAK,GAAI;CAC/B;AACiB,CAAA,EACH,CAAA,EACb,CAAA,CAEZ;AACA,EAAQ,cAAc,EAAW,QAAQ;AAEzC,IAAa,IAAiB,EAAY,EAAO,CAAO,GAAG,SAAS,GACvD,IAAiB,EAAW"}