themelia-react-ui 1.0.2 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (542) hide show
  1. package/CHANGELOG.md +281 -1
  2. package/README.md +10 -5
  3. package/dist/{accordion-BRTcsp8J.js → accordion-CQXVcd7Q.js} +13 -13
  4. package/dist/accordion-CQXVcd7Q.js.map +1 -0
  5. package/dist/action-menu-BTpyPWJ2.js +264 -0
  6. package/dist/action-menu-BTpyPWJ2.js.map +1 -0
  7. package/dist/{affordance-geometry.generated-CL84ZN9A.js → affordance-geometry.generated-CCIXb2A1.js} +7 -2
  8. package/dist/affordance-geometry.generated-CCIXb2A1.js.map +1 -0
  9. package/dist/{ai-artifact-DLVdK0Py.js → ai-artifact-2PQ2fItc.js} +171 -176
  10. package/dist/ai-artifact-2PQ2fItc.js.map +1 -0
  11. package/dist/{app-shell-C_fKpljx.js → app-shell-BE_j8-AT.js} +4 -4
  12. package/dist/{app-shell-C_fKpljx.js.map → app-shell-BE_j8-AT.js.map} +1 -1
  13. package/dist/{attachment-DbjUWsP0.js → attachment-q69dlt5Y.js} +9 -9
  14. package/dist/{attachment-DbjUWsP0.js.map → attachment-q69dlt5Y.js.map} +1 -1
  15. package/dist/{auth-CAQcasMV.js → auth-M3vGMgDR.js} +42 -42
  16. package/dist/{auth-CAQcasMV.js.map → auth-M3vGMgDR.js.map} +1 -1
  17. package/dist/{avatar-Bu2HhitA.js → avatar-djdaaQ_s.js} +14 -12
  18. package/dist/avatar-djdaaQ_s.js.map +1 -0
  19. package/dist/{badge-CzId1Wlm.js → badge-0tATj-tW.js} +9 -9
  20. package/dist/badge-0tATj-tW.js.map +1 -0
  21. package/dist/base/accordion.js +1 -1
  22. package/dist/base/action-menu.js +1 -1
  23. package/dist/base/attachment.js +1 -1
  24. package/dist/base/avatar.js +1 -1
  25. package/dist/base/badge.js +1 -1
  26. package/dist/base/buttons.js +2 -2
  27. package/dist/base/cards.js +2 -2
  28. package/dist/base/carousel.js +11 -11
  29. package/dist/base/carousel.js.map +1 -1
  30. package/dist/base/cascader.js +244 -222
  31. package/dist/base/cascader.js.map +1 -1
  32. package/dist/base/chart.js +1 -1
  33. package/dist/base/choice-inputs.js +2 -2
  34. package/dist/base/code-block.js +1 -1
  35. package/dist/base/combobox.js +1 -1
  36. package/dist/base/command.js +1 -1
  37. package/dist/base/copyable.js +1 -1
  38. package/dist/base/date-pickers.js +2 -2
  39. package/dist/base/display.js +6 -6
  40. package/dist/base/feedback.js +3 -3
  41. package/dist/base/forms-numeric.js +1 -1
  42. package/dist/base/forms.js +2 -2
  43. package/dist/base/inline-edit.js +81 -76
  44. package/dist/base/inline-edit.js.map +1 -1
  45. package/dist/base/item.js +1 -1
  46. package/dist/base/media-gallery.js +1 -1
  47. package/dist/base/navigation.js +6 -6
  48. package/dist/base/popover-menu.js +1 -1
  49. package/dist/base/popover.js +1 -1
  50. package/dist/base/qr-code.js +7 -4
  51. package/dist/base/qr-code.js.map +1 -1
  52. package/dist/base/repeaters.js +42 -42
  53. package/dist/base/repeaters.js.map +1 -1
  54. package/dist/base/sheet.js +1 -1
  55. package/dist/base/sidebar.js +1 -1
  56. package/dist/base/signature-pad.js +9 -9
  57. package/dist/base/signature-pad.js.map +1 -1
  58. package/dist/base/skeleton.js +1 -1
  59. package/dist/base/spinner.js +1 -1
  60. package/dist/base/structure.js +1 -1
  61. package/dist/base/table.js +1 -1
  62. package/dist/base/text-inputs.js +2 -2
  63. package/dist/base/toaster.js +4 -4
  64. package/dist/base/toaster.js.map +1 -1
  65. package/dist/base/tree.js +1 -1
  66. package/dist/base/upload-queue.js +1 -1
  67. package/dist/base/upload.js +3 -3
  68. package/dist/base/value-inputs.js +1 -1
  69. package/dist/blocks/admin.js +229 -220
  70. package/dist/blocks/admin.js.map +1 -1
  71. package/dist/blocks/ai.js +147 -180
  72. package/dist/blocks/ai.js.map +1 -1
  73. package/dist/blocks/analytics/usage-card.js +1 -1
  74. package/dist/blocks/analytics.js +530 -523
  75. package/dist/blocks/analytics.js.map +1 -1
  76. package/dist/blocks/collaboration.js +1 -1
  77. package/dist/blocks/commerce/receipt.js +1 -1
  78. package/dist/blocks/commerce.js +1390 -1516
  79. package/dist/blocks/commerce.js.map +1 -1
  80. package/dist/blocks/data-display.js +1 -1
  81. package/dist/blocks/onboarding.js +5 -5
  82. package/dist/blocks/planning.js +82 -91
  83. package/dist/blocks/planning.js.map +1 -1
  84. package/dist/blocks/timelines.js +1 -1
  85. package/dist/{breadcrumbs-BuYz5SDU.js → breadcrumbs-BG_FfMK4.js} +5 -5
  86. package/dist/{breadcrumbs-BuYz5SDU.js.map → breadcrumbs-BG_FfMK4.js.map} +1 -1
  87. package/dist/{button-BZDasD04.js → button-BS3KDg00.js} +185 -162
  88. package/dist/button-BS3KDg00.js.map +1 -0
  89. package/dist/{button-BZyfTvwm.js → button-R9CCoH7A.js} +2 -2
  90. package/dist/{button-BZyfTvwm.js.map → button-R9CCoH7A.js.map} +1 -1
  91. package/dist/{buttons-D_6KJvEE.js → buttons-DS0ZIwJ_.js} +11 -11
  92. package/dist/buttons-DS0ZIwJ_.js.map +1 -0
  93. package/dist/{cards-qGSErLw_.js → cards-QoJ4syG9.js} +7 -7
  94. package/dist/{cards-qGSErLw_.js.map → cards-QoJ4syG9.js.map} +1 -1
  95. package/dist/{chart-Bsc5BICK.js → chart-DwYRKKc-.js} +17 -15
  96. package/dist/chart-DwYRKKc-.js.map +1 -0
  97. package/dist/checkbox-B7ygNTYp.js +35 -0
  98. package/dist/checkbox-B7ygNTYp.js.map +1 -0
  99. package/dist/choice-inputs-DrJ17tpL.js +752 -0
  100. package/dist/choice-inputs-DrJ17tpL.js.map +1 -0
  101. package/dist/{code-block-DzHKRybS.js → code-block-CD0B7M93.js} +19 -19
  102. package/dist/{code-block-DzHKRybS.js.map → code-block-CD0B7M93.js.map} +1 -1
  103. package/dist/{collapsible-ClvC7Bj3.js → collapsible-oMUGM4tr.js} +3 -3
  104. package/dist/{collapsible-ClvC7Bj3.js.map → collapsible-oMUGM4tr.js.map} +1 -1
  105. package/dist/{collection-content-D6S8cv_n.js → collection-content-Ys-OZOkY.js} +3 -3
  106. package/dist/{collection-content-D6S8cv_n.js.map → collection-content-Ys-OZOkY.js.map} +1 -1
  107. package/dist/{combobox-BFnbJJp3.js → combobox-6dvVny2q.js} +96 -97
  108. package/dist/combobox-6dvVny2q.js.map +1 -0
  109. package/dist/{combobox-hozNwUcc.js → combobox-CB7039j7.js} +326 -308
  110. package/dist/combobox-CB7039j7.js.map +1 -0
  111. package/dist/{command-BnmSchli.js → command-kPMPjIxJ.js} +34 -30
  112. package/dist/command-kPMPjIxJ.js.map +1 -0
  113. package/dist/{comments-u5L0OGip.js → comments-You0Bzbr.js} +349 -348
  114. package/dist/comments-You0Bzbr.js.map +1 -0
  115. package/dist/components/base/accordion/accordion-variants.d.ts +3 -3
  116. package/dist/components/base/action-menu/action-menu.d.ts +7 -2
  117. package/dist/components/base/avatar/stacked-avatars.d.ts +5 -4
  118. package/dist/components/base/badge/badge.d.ts +1 -1
  119. package/dist/components/base/badge/badge.recipes.d.ts +4 -4
  120. package/dist/components/base/buttons/base-button.d.ts +7 -0
  121. package/dist/components/base/buttons/button-group.recipes.d.ts +2 -2
  122. package/dist/components/base/buttons/button.variants.d.ts +1 -0
  123. package/dist/components/base/buttons/loader-button.d.ts +3 -1
  124. package/dist/components/base/buttons/text-button.d.ts +2 -2
  125. package/dist/components/base/carousel/carousel.d.ts +3 -1
  126. package/dist/components/base/chart/chart.d.ts +7 -7
  127. package/dist/components/base/choice-inputs/checkbox.d.ts +6 -7
  128. package/dist/components/base/choice-inputs/choice-types.d.ts +10 -1
  129. package/dist/components/base/choice-inputs/pill-radio-group.d.ts +9 -0
  130. package/dist/components/base/choice-inputs/select-popup.d.ts +9 -1
  131. package/dist/components/base/choice-inputs/switch-card.d.ts +1 -1
  132. package/dist/components/base/date-pickers/date-picker-field.d.ts +23 -0
  133. package/dist/components/base/date-pickers/datepicker.types.d.ts +13 -3
  134. package/dist/components/base/display/alert-dialog.d.ts +8 -2
  135. package/dist/components/base/display/content-block.d.ts +4 -2
  136. package/dist/components/base/display/date-block.d.ts +1 -1
  137. package/dist/components/base/display/dialog.d.ts +12 -5
  138. package/dist/components/base/display/surface-title.d.ts +6 -1
  139. package/dist/components/base/feedback/alert.d.ts +1 -1
  140. package/dist/components/base/feedback/state-display.d.ts +5 -4
  141. package/dist/components/base/forms/form-sizing.d.ts +32 -0
  142. package/dist/components/base/forms/workflow.d.ts +2 -0
  143. package/dist/components/base/forms-numeric/coordinates-input.d.ts +3 -0
  144. package/dist/components/base/forms-numeric/rounding-mode-select.d.ts +4 -1
  145. package/dist/components/base/navigation/dropdown-menu.d.ts +2 -2
  146. package/dist/components/base/navigation/language-switcher.d.ts +4 -1
  147. package/dist/components/base/navigation/overflow-tab-bar.d.ts +7 -0
  148. package/dist/components/base/navigation/page-header/page-header.d.ts +4 -1
  149. package/dist/components/base/qr-code/qr-code.d.ts +2 -0
  150. package/dist/components/base/sheet/index.d.ts +29 -1
  151. package/dist/components/base/sheet/sheet.d.ts +14 -5
  152. package/dist/components/base/spinner/spinner.d.ts +3 -2
  153. package/dist/components/base/structure/structure.types.d.ts +1 -1
  154. package/dist/components/base/text-inputs/input-group.d.ts +2 -2
  155. package/dist/components/base/upload/upload.recipes.d.ts +11 -0
  156. package/dist/components/base/value-inputs/date-time-input.d.ts +4 -2
  157. package/dist/components/base/value-inputs/tags-input.d.ts +2 -0
  158. package/dist/components/blocks/admin/api-key-list/api-key-list.types.d.ts +1 -1
  159. package/dist/components/blocks/analytics/format-metric-value.d.ts +11 -1
  160. package/dist/components/blocks/analytics/index.d.ts +1 -1
  161. package/dist/components/blocks/analytics/use-metric-format-options.d.ts +3 -0
  162. package/dist/components/blocks/commerce/address-card/address-card.d.ts +1 -1
  163. package/dist/components/blocks/commerce/address-card/types.d.ts +3 -1
  164. package/dist/components/blocks/commerce/booking-calendar-event-card/booking-calendar-event-card.d.ts +4 -0
  165. package/dist/components/blocks/commerce/booking-calendar-event-card/booking-calendar-event-card.types.d.ts +2 -2
  166. package/dist/components/blocks/commerce/discount-stack/types.d.ts +1 -1
  167. package/dist/components/blocks/commerce/inventory-section/types.d.ts +4 -1
  168. package/dist/components/blocks/commerce/loyalty-points/types.d.ts +1 -1
  169. package/dist/components/blocks/commerce/order-status/types.d.ts +4 -0
  170. package/dist/components/blocks/commerce/payment-method/payment-method.d.ts +1 -1
  171. package/dist/components/blocks/commerce/payment-method/types.d.ts +3 -1
  172. package/dist/components/blocks/commerce/seo-listing/seo-listing-card.d.ts +1 -1
  173. package/dist/components/blocks/commerce/seo-listing/types.d.ts +3 -1
  174. package/dist/components/blocks/commerce/vendor-profile/types.d.ts +4 -1
  175. package/dist/components/blocks/data-display/dense-info-card/dense-info.strings.d.ts +4 -1
  176. package/dist/components/blocks/data-display/inline-stat/inline-stat.d.ts +4 -1
  177. package/dist/components/features/global-search/partials/global-search-idle-state.d.ts +1 -1
  178. package/dist/components/features/overlays/alert-dialog.d.ts +1 -1
  179. package/dist/components/features/overlays/drawer.d.ts +1 -1
  180. package/dist/components/features/overlays/hooks/use-overlay-actions.d.ts +2 -2
  181. package/dist/components/features/overlays/hooks/use-overlay-visibility.d.ts +11 -4
  182. package/dist/components/features/overlays/overlay-tone-icon.d.ts +37 -0
  183. package/dist/components/features/overlays/overlays.types.d.ts +42 -19
  184. package/dist/components/features/products/components/product-variants-manager.d.ts +1 -1
  185. package/dist/components/features/products/partials/index.d.ts +1 -1
  186. package/dist/components/features/products/partials/product-metric-tile.d.ts +6 -0
  187. package/dist/components/features/products/partials/product-tone.d.ts +11 -1
  188. package/dist/components/features/products/products.types.d.ts +2 -1
  189. package/dist/components/features/table/partials/cell-renderers.d.ts +1 -1
  190. package/dist/components/layout/page/index.d.ts +1 -1
  191. package/dist/components/layout/page/page.types.d.ts +53 -3
  192. package/dist/components/layout/page/partials/page-header-commands.d.ts +13 -0
  193. package/dist/components/layout/page/partials/page-header.d.ts +1 -1
  194. package/dist/components/primitives/date.d.ts +16 -3
  195. package/dist/components/primitives/dimensions.d.ts +6 -0
  196. package/dist/components/primitives/duration.d.ts +6 -0
  197. package/dist/components/primitives/file-size.d.ts +6 -0
  198. package/dist/components/primitives/index.d.ts +1 -1
  199. package/dist/components/primitives/initials.d.ts +11 -2
  200. package/dist/components/primitives/link.d.ts +7 -0
  201. package/dist/components/primitives/money.d.ts +29 -7
  202. package/dist/components/primitives/number.d.ts +17 -0
  203. package/dist/components/primitives/value-typography.d.ts +54 -0
  204. package/dist/components/primitives/value.d.ts +31 -6
  205. package/dist/components/typography/heading.d.ts +9 -1
  206. package/dist/components/typography/label.d.ts +3 -0
  207. package/dist/components/typography/running-text.d.ts +12 -0
  208. package/dist/components/typography/text-link.d.ts +23 -1
  209. package/dist/components/typography/text.d.ts +12 -0
  210. package/dist/components/typography/text.styles.d.ts +35 -13
  211. package/dist/components/ui/button.d.ts +1 -1
  212. package/dist/components/ui/checkbox.d.ts +5 -0
  213. package/dist/components/ui/overlay.recipes.d.ts +15 -2
  214. package/dist/components/ui/select.d.ts +3 -1
  215. package/dist/components/ui/switch.d.ts +5 -0
  216. package/dist/{containers-DqB-bSYE.js → containers-D_L4mTVb.js} +3 -3
  217. package/dist/{containers-DqB-bSYE.js.map → containers-D_L4mTVb.js.map} +1 -1
  218. package/dist/{copyable-BTSByfmq.js → copyable-DDjTeW_j.js} +4 -4
  219. package/dist/{copyable-BTSByfmq.js.map → copyable-DDjTeW_j.js.map} +1 -1
  220. package/dist/{data-display-Bihs9Ven.js → data-display-3xWQUnMA.js} +471 -478
  221. package/dist/data-display-3xWQUnMA.js.map +1 -0
  222. package/dist/date-picker-DrDFj8Lo.js +1527 -0
  223. package/dist/date-picker-DrDFj8Lo.js.map +1 -0
  224. package/dist/date-pickers-CnFCb0n2.js +174 -0
  225. package/dist/date-pickers-CnFCb0n2.js.map +1 -0
  226. package/dist/date-uf3z37Nm.js +144 -0
  227. package/dist/date-uf3z37Nm.js.map +1 -0
  228. package/dist/{display-CS6Hbk18.js → display-DrdvPwF0.js} +25 -25
  229. package/dist/display-DrdvPwF0.js.map +1 -0
  230. package/dist/{dropdown-menu-D-boNgGO.js → dropdown-menu-CURh59jb.js} +22 -15
  231. package/dist/dropdown-menu-CURh59jb.js.map +1 -0
  232. package/dist/features/activities.js +38 -35
  233. package/dist/features/activities.js.map +1 -1
  234. package/dist/features/ai-chat.js +36 -35
  235. package/dist/features/ai-chat.js.map +1 -1
  236. package/dist/features/async-preview.js +8 -8
  237. package/dist/features/combobox.js +1 -1
  238. package/dist/features/comments.js +1 -1
  239. package/dist/features/data-view.js +10 -10
  240. package/dist/features/email-composer.js +325 -326
  241. package/dist/features/email-composer.js.map +1 -1
  242. package/dist/features/event-calendar.js +190 -200
  243. package/dist/features/event-calendar.js.map +1 -1
  244. package/dist/features/filters.js +1 -1
  245. package/dist/features/global-search.js +77 -77
  246. package/dist/features/global-search.js.map +1 -1
  247. package/dist/features/kanban.js +4 -4
  248. package/dist/features/map.js +8 -8
  249. package/dist/features/media-library.js +499 -502
  250. package/dist/features/media-library.js.map +1 -1
  251. package/dist/features/mentions.js +1 -1
  252. package/dist/features/overlays.js +1 -1
  253. package/dist/features/products.js +1216 -1248
  254. package/dist/features/products.js.map +1 -1
  255. package/dist/features/questionnaire.js +46 -44
  256. package/dist/features/questionnaire.js.map +1 -1
  257. package/dist/features/resource-assignment.js +96 -88
  258. package/dist/features/resource-assignment.js.map +1 -1
  259. package/dist/features/resource.js +11 -11
  260. package/dist/features/rich-text-editor.js +2 -2
  261. package/dist/features/schema-form.js +188 -184
  262. package/dist/features/schema-form.js.map +1 -1
  263. package/dist/features/suggestions.js +3 -3
  264. package/dist/features/sync.js +7 -7
  265. package/dist/features/sync.js.map +1 -1
  266. package/dist/features/table.js +1 -1
  267. package/dist/features/theme-tweaker.js +469 -470
  268. package/dist/features/theme-tweaker.js.map +1 -1
  269. package/dist/{feedback-CJkUAapr.js → feedback-C7nR0UtT.js} +9 -10
  270. package/dist/feedback-C7nR0UtT.js.map +1 -0
  271. package/dist/field-affordance-recipes-CkOCdE2y.js +46 -0
  272. package/dist/field-affordance-recipes-CkOCdE2y.js.map +1 -0
  273. package/dist/{field-state-recipes-DQQpiLWC.js → field-state-recipes-C-MFBX_8.js} +3 -3
  274. package/dist/field-state-recipes-C-MFBX_8.js.map +1 -0
  275. package/dist/{filters-D6FF8L6s.js → filters-Da-gNPsE.js} +467 -467
  276. package/dist/filters-Da-gNPsE.js.map +1 -0
  277. package/dist/{form-field-CZwrkP7m.js → form-field-VZRULhUK.js} +7 -7
  278. package/dist/{form-field-CZwrkP7m.js.map → form-field-VZRULhUK.js.map} +1 -1
  279. package/dist/form-sizing-uWP4lzVh.js +126 -0
  280. package/dist/form-sizing-uWP4lzVh.js.map +1 -0
  281. package/dist/{forms-B5NCbkSC.js → forms-DDeEnXSY.js} +11 -11
  282. package/dist/forms-DDeEnXSY.js.map +1 -0
  283. package/dist/forms-numeric-D3CO60IF.js +905 -0
  284. package/dist/forms-numeric-D3CO60IF.js.map +1 -0
  285. package/dist/{header-kxruN3RM.js → header-2ycNqGOR.js} +43 -42
  286. package/dist/header-2ycNqGOR.js.map +1 -0
  287. package/dist/{hooks-BrlnCwQd.js → hooks-DQ5SPwZw.js} +2 -2
  288. package/dist/{hooks-BrlnCwQd.js.map → hooks-DQ5SPwZw.js.map} +1 -1
  289. package/dist/{icon-badge-Btc6pQrp.js → icon-badge-DKlaKXoo.js} +3 -3
  290. package/dist/{icon-badge-Btc6pQrp.js.map → icon-badge-DKlaKXoo.js.map} +1 -1
  291. package/dist/index.js +2 -2
  292. package/dist/{input-vxcaNCYC.js → input-BoLm9Hks.js} +3 -3
  293. package/dist/{input-vxcaNCYC.js.map → input-BoLm9Hks.js.map} +1 -1
  294. package/dist/input-DhQdBnV3.js +255 -0
  295. package/dist/{input-SX9V0AL3.js.map → input-DhQdBnV3.js.map} +1 -1
  296. package/dist/item-xzh8Df65.js +264 -0
  297. package/dist/item-xzh8Df65.js.map +1 -0
  298. package/dist/layout/app-shell.js +1 -1
  299. package/dist/layout/auth.js +1 -1
  300. package/dist/layout/containers.js +1 -1
  301. package/dist/layout/header.js +1 -1
  302. package/dist/layout/hooks.js +1 -1
  303. package/dist/layout/navigation.js +1 -1
  304. package/dist/layout/page.js +1 -1
  305. package/dist/layout/settings.js +1 -1
  306. package/dist/layout/sidebar.js +2 -2
  307. package/dist/layout/workspace.js +1 -1
  308. package/dist/layout.js +10 -10
  309. package/dist/lib/affordance-geometry.generated.d.ts +6 -1
  310. package/dist/lib/field-affordance-recipes.d.ts +35 -0
  311. package/dist/lib/field-state-recipes.d.ts +4 -2
  312. package/dist/lib/format.d.ts +9 -0
  313. package/dist/lib/money-format.d.ts +30 -0
  314. package/dist/lib/overlay-anatomy-recipes.d.ts +1 -1
  315. package/dist/lib/surface-recipes.d.ts +8 -6
  316. package/dist/lib/token-merge.generated.d.ts +11 -11
  317. package/dist/lib/track-recipes.d.ts +1 -1
  318. package/dist/lib/ui-provider/provider.d.ts +7 -2
  319. package/dist/lib/ui-provider/store.d.ts +6 -2
  320. package/dist/lib/ui-provider/types.d.ts +5 -2
  321. package/dist/lib/utils.js +1 -1
  322. package/dist/{media-gallery-DLp3HAz0.js → media-gallery-DQUQ0m3O.js} +8 -8
  323. package/dist/media-gallery-DQUQ0m3O.js.map +1 -0
  324. package/dist/{mentions-Cl0Kt_Pd.js → mentions-DwnO1hh4.js} +34 -35
  325. package/dist/{mentions-Cl0Kt_Pd.js.map → mentions-DwnO1hh4.js.map} +1 -1
  326. package/dist/{message-SZUNB1eX.js → message-YfFmbXNP.js} +5 -5
  327. package/dist/{message-SZUNB1eX.js.map → message-YfFmbXNP.js.map} +1 -1
  328. package/dist/{navigation-DyytsLRB.js → navigation-Cbp5V8gG.js} +33 -34
  329. package/dist/navigation-Cbp5V8gG.js.map +1 -0
  330. package/dist/{navigation-DnQSNMT0.js → navigation-Cs1npsPm.js} +111 -87
  331. package/dist/navigation-Cs1npsPm.js.map +1 -0
  332. package/dist/{navigation-row-recipes-DQEXQcqY.js → navigation-row-recipes-DlU-4QYO.js} +2 -2
  333. package/dist/{navigation-row-recipes-DQEXQcqY.js.map → navigation-row-recipes-DlU-4QYO.js.map} +1 -1
  334. package/dist/number-CKRBYmZK.js +352 -0
  335. package/dist/number-CKRBYmZK.js.map +1 -0
  336. package/dist/overlay.recipes-CNO2S9V6.js +34 -0
  337. package/dist/overlay.recipes-CNO2S9V6.js.map +1 -0
  338. package/dist/overlays-DhZO7N-I.js +994 -0
  339. package/dist/overlays-DhZO7N-I.js.map +1 -0
  340. package/dist/page-C6R_8jFt.js +325 -0
  341. package/dist/page-C6R_8jFt.js.map +1 -0
  342. package/dist/{page-header-D8nERkn5.js → page-header-hUTzcRZX.js} +9 -9
  343. package/dist/page-header-hUTzcRZX.js.map +1 -0
  344. package/dist/{pagination-NLGqRirf.js → pagination-Cm0jqa3I.js} +8 -8
  345. package/dist/{pagination-NLGqRirf.js.map → pagination-Cm0jqa3I.js.map} +1 -1
  346. package/dist/{popover-CghIYdQf.js → popover-Dcv_9jxr.js} +6 -6
  347. package/dist/{popover-CghIYdQf.js.map → popover-Dcv_9jxr.js.map} +1 -1
  348. package/dist/{popover-menu-B4PoWhRl.js → popover-menu-DnRFKnHP.js} +6 -6
  349. package/dist/{popover-menu-B4PoWhRl.js.map → popover-menu-DnRFKnHP.js.map} +1 -1
  350. package/dist/{popover.recipes-QlD4JenO.js → popover.recipes-wmbvL8Ah.js} +2 -2
  351. package/dist/{popover.recipes-QlD4JenO.js.map → popover.recipes-wmbvL8Ah.js.map} +1 -1
  352. package/dist/primitives-BHrwQXFC.js +379 -0
  353. package/dist/primitives-BHrwQXFC.js.map +1 -0
  354. package/dist/primitives.js +5 -5
  355. package/dist/{progress-BroqrAyV.js → progress-Br9WTFya.js} +7 -7
  356. package/dist/progress-Br9WTFya.js.map +1 -0
  357. package/dist/{receipt-BuJynLgf.js → receipt-CV89q1fs.js} +6 -6
  358. package/dist/{receipt-BuJynLgf.js.map → receipt-CV89q1fs.js.map} +1 -1
  359. package/dist/{rich-text-editor-BKyG7rWz.js → rich-text-editor-CF8QYt5p.js} +6 -6
  360. package/dist/{rich-text-editor-BKyG7rWz.js.map → rich-text-editor-CF8QYt5p.js.map} +1 -1
  361. package/dist/{rich-text-editor.recipes-B72Nfuze.js → rich-text-editor.recipes-CnrbmTS1.js} +4 -4
  362. package/dist/{rich-text-editor.recipes-B72Nfuze.js.map → rich-text-editor.recipes-CnrbmTS1.js.map} +1 -1
  363. package/dist/{rich-text-DlxDOtf4.js → rich-text-j-FGAeZW.js} +4 -4
  364. package/dist/{rich-text-DlxDOtf4.js.map → rich-text-j-FGAeZW.js.map} +1 -1
  365. package/dist/{scroll-area-D-pIhEKl.js → scroll-area-DRdr16Pt.js} +3 -3
  366. package/dist/scroll-area-DRdr16Pt.js.map +1 -0
  367. package/dist/{separator-BhtFyo4x.js → separator-BMEvwnSX.js} +2 -2
  368. package/dist/{separator-BhtFyo4x.js.map → separator-BMEvwnSX.js.map} +1 -1
  369. package/dist/{separator-BNIgG3au.js → separator-Do5GWDYi.js} +4 -4
  370. package/dist/separator-Do5GWDYi.js.map +1 -0
  371. package/dist/services/actions/action-adapters.d.ts +4 -0
  372. package/dist/services/actions.js +8 -3
  373. package/dist/services/actions.js.map +1 -1
  374. package/dist/{settings-DOTOzeZ2.js → settings-DHk0L2MF.js} +17 -17
  375. package/dist/settings-DHk0L2MF.js.map +1 -0
  376. package/dist/sheet-DRFNY1_D.js +207 -0
  377. package/dist/sheet-DRFNY1_D.js.map +1 -0
  378. package/dist/sidebar-Cb8WzOvE.js +511 -0
  379. package/dist/sidebar-Cb8WzOvE.js.map +1 -0
  380. package/dist/{sidebar-CyR4XKwR.js → sidebar-Crc9M9JV.js} +18 -18
  381. package/dist/sidebar-Crc9M9JV.js.map +1 -0
  382. package/dist/{skeleton-3F0uhYn3.js → skeleton-DVMXr15h.js} +4 -4
  383. package/dist/{skeleton-3F0uhYn3.js.map → skeleton-DVMXr15h.js.map} +1 -1
  384. package/dist/{smart-card-DjGVV2xr.js → smart-card-Bek-TwUp.js} +222 -207
  385. package/dist/smart-card-Bek-TwUp.js.map +1 -0
  386. package/dist/{spinner-Cpf7oRkF.js → spinner-CmTAbEp0.js} +8 -6
  387. package/dist/spinner-CmTAbEp0.js.map +1 -0
  388. package/dist/{structure-CRdqVawd.js → structure-hzCW-XsV.js} +3 -3
  389. package/dist/{structure-CRdqVawd.js.map → structure-hzCW-XsV.js.map} +1 -1
  390. package/dist/{structure.recipes-Bqhf9oIh.js → structure.recipes-EPz60cU8.js} +37 -19
  391. package/dist/structure.recipes-EPz60cU8.js.map +1 -0
  392. package/dist/style.css +1 -1
  393. package/dist/surface-recipes-DOdoBXGm.js +28 -0
  394. package/dist/surface-recipes-DOdoBXGm.js.map +1 -0
  395. package/dist/table-D6zKeYQX.js +162 -0
  396. package/dist/table-D6zKeYQX.js.map +1 -0
  397. package/dist/{table-CcRDZiLP.js → table-Dn4XSrSB.js} +348 -348
  398. package/dist/table-Dn4XSrSB.js.map +1 -0
  399. package/dist/{tabs-BNgu7g0u.js → tabs-Dk8E_knt.js} +14 -13
  400. package/dist/tabs-Dk8E_knt.js.map +1 -0
  401. package/dist/{text-inputs-DsR56TR-.js → text-inputs-BFpku0Qd.js} +150 -149
  402. package/dist/text-inputs-BFpku0Qd.js.map +1 -0
  403. package/dist/{text.styles-Q4sGAIgA.js → text.styles-g4He6UIW.js} +17 -14
  404. package/dist/text.styles-g4He6UIW.js.map +1 -0
  405. package/dist/theme.css +16 -12
  406. package/dist/themes/green.css +24 -0
  407. package/dist/{timelines-D1pkt3se.js → timelines-CxuAFIc2.js} +25 -38
  408. package/dist/timelines-CxuAFIc2.js.map +1 -0
  409. package/dist/track-recipes-CDcKmndW.js +10 -0
  410. package/dist/track-recipes-CDcKmndW.js.map +1 -0
  411. package/dist/{tree-BtmYyMZV.js → tree-BotPlyiD.js} +13 -13
  412. package/dist/{tree-BtmYyMZV.js.map → tree-BotPlyiD.js.map} +1 -1
  413. package/dist/typography/rich-text.js +1 -1
  414. package/dist/typography-CAr3dQhX.js +116 -0
  415. package/dist/typography-CAr3dQhX.js.map +1 -0
  416. package/dist/typography.js +2 -2
  417. package/dist/{ui-provider-DRPn3qNl.js → ui-provider-D2_TeLqw.js} +20 -21
  418. package/dist/ui-provider-D2_TeLqw.js.map +1 -0
  419. package/dist/ui-provider.js +1 -1
  420. package/dist/{upload-CDbYw1WN.js → upload-B0WHW7ak.js} +221 -220
  421. package/dist/upload-B0WHW7ak.js.map +1 -0
  422. package/dist/{upload-queue-CNd_hH_a.js → upload-queue-BHZ_wBfd.js} +59 -62
  423. package/dist/upload-queue-BHZ_wBfd.js.map +1 -0
  424. package/dist/{usage-card-VyJLUwRr.js → usage-card-U0YBLTNT.js} +42 -43
  425. package/dist/{usage-card-VyJLUwRr.js.map → usage-card-U0YBLTNT.js.map} +1 -1
  426. package/dist/{utils-BvH9PSmq.js → utils-Cospvlj1.js} +221 -51
  427. package/dist/utils-Cospvlj1.js.map +1 -0
  428. package/dist/value-inputs-CjfzGMsN.js +854 -0
  429. package/dist/value-inputs-CjfzGMsN.js.map +1 -0
  430. package/dist/value-typography-Deb3yQZg.js +116 -0
  431. package/dist/value-typography-Deb3yQZg.js.map +1 -0
  432. package/dist/{workspace-CcR8r-Nt.js → workspace-YoFjXi6i.js} +44 -45
  433. package/dist/workspace-YoFjXi6i.js.map +1 -0
  434. package/docs/consumer-skill/SKILL.md +51 -38
  435. package/docs/consumer-skill/examples/app-layout.tsx +2 -4
  436. package/docs/consumer-skill/examples/detail.tsx +3 -4
  437. package/docs/consumer-skill/examples/edit.tsx +1 -1
  438. package/docs/consumer-skill/examples/layout-blocks.tsx +20 -0
  439. package/docs/consumer-skill/examples/manifest.json +28 -6
  440. package/docs/consumer-skill/examples/scoped-directory.tsx +2 -2
  441. package/docs/consumer-skill/references/composition.md +89 -17
  442. package/docs/consumer-skill/references/discovery.md +4 -0
  443. package/docs/consumer-skill/references/installation.md +22 -0
  444. package/docs/consumer-skill/references/integration.md +32 -1
  445. package/docs/consumer-skill/references/public-api.json +111 -70
  446. package/docs/consumer-skill/references/review.md +20 -4
  447. package/docs/consumer-skill/references/theming.md +7 -1
  448. package/docs/consumer-skill/references/tokens.json +5 -2
  449. package/docs/consumer-skill/references/workflows.md +4 -2
  450. package/docs/consumer-skill/scripts/composition-policy.mjs +93 -2
  451. package/docs/consumer-skill/scripts/discovery.mjs +11 -3
  452. package/docs/consumer-skill/scripts/pin-button-defaults.mjs +95 -0
  453. package/package.json +5 -3
  454. package/dist/accordion-BRTcsp8J.js.map +0 -1
  455. package/dist/action-menu-Drxw_vJk.js +0 -265
  456. package/dist/action-menu-Drxw_vJk.js.map +0 -1
  457. package/dist/affordance-geometry.generated-CL84ZN9A.js.map +0 -1
  458. package/dist/ai-artifact-DLVdK0Py.js.map +0 -1
  459. package/dist/avatar-Bu2HhitA.js.map +0 -1
  460. package/dist/badge-CzId1Wlm.js.map +0 -1
  461. package/dist/button-BZDasD04.js.map +0 -1
  462. package/dist/buttons-D_6KJvEE.js.map +0 -1
  463. package/dist/chart-Bsc5BICK.js.map +0 -1
  464. package/dist/checkbox-BQNDjUCh.js +0 -34
  465. package/dist/checkbox-BQNDjUCh.js.map +0 -1
  466. package/dist/choice-inputs-Mk3iWbhr.js +0 -725
  467. package/dist/choice-inputs-Mk3iWbhr.js.map +0 -1
  468. package/dist/combobox-BFnbJJp3.js.map +0 -1
  469. package/dist/combobox-hozNwUcc.js.map +0 -1
  470. package/dist/command-BnmSchli.js.map +0 -1
  471. package/dist/comments-u5L0OGip.js.map +0 -1
  472. package/dist/data-display-Bihs9Ven.js.map +0 -1
  473. package/dist/date-DOKhJPu7.js +0 -140
  474. package/dist/date-DOKhJPu7.js.map +0 -1
  475. package/dist/date-picker-DzP5HQq7.js +0 -1541
  476. package/dist/date-picker-DzP5HQq7.js.map +0 -1
  477. package/dist/date-pickers-BpgGz7S-.js +0 -196
  478. package/dist/date-pickers-BpgGz7S-.js.map +0 -1
  479. package/dist/display-CS6Hbk18.js.map +0 -1
  480. package/dist/dropdown-menu-D-boNgGO.js.map +0 -1
  481. package/dist/feedback-CJkUAapr.js.map +0 -1
  482. package/dist/field-affordance-recipes-uKY4MsZ_.js +0 -25
  483. package/dist/field-affordance-recipes-uKY4MsZ_.js.map +0 -1
  484. package/dist/field-state-recipes-DQQpiLWC.js.map +0 -1
  485. package/dist/filters-D6FF8L6s.js.map +0 -1
  486. package/dist/form-sizing-QP8aIRaW.js +0 -103
  487. package/dist/form-sizing-QP8aIRaW.js.map +0 -1
  488. package/dist/format-iamDSqs2.js +0 -110
  489. package/dist/format-iamDSqs2.js.map +0 -1
  490. package/dist/forms-B5NCbkSC.js.map +0 -1
  491. package/dist/forms-numeric-Crrm80Lm.js +0 -867
  492. package/dist/forms-numeric-Crrm80Lm.js.map +0 -1
  493. package/dist/header-kxruN3RM.js.map +0 -1
  494. package/dist/input-SX9V0AL3.js +0 -255
  495. package/dist/item-DE4YnuJx.js +0 -258
  496. package/dist/item-DE4YnuJx.js.map +0 -1
  497. package/dist/media-gallery-DLp3HAz0.js.map +0 -1
  498. package/dist/navigation-DnQSNMT0.js.map +0 -1
  499. package/dist/navigation-DyytsLRB.js.map +0 -1
  500. package/dist/number-DasMFWEG.js +0 -269
  501. package/dist/number-DasMFWEG.js.map +0 -1
  502. package/dist/overlay.recipes-BxW5FIfK.js +0 -6
  503. package/dist/overlay.recipes-BxW5FIfK.js.map +0 -1
  504. package/dist/overlays-DUbs1KEi.js +0 -1011
  505. package/dist/overlays-DUbs1KEi.js.map +0 -1
  506. package/dist/page-hGmT4nWK.js +0 -213
  507. package/dist/page-hGmT4nWK.js.map +0 -1
  508. package/dist/page-header-D8nERkn5.js.map +0 -1
  509. package/dist/primitives-C7ff0QaI.js +0 -337
  510. package/dist/primitives-C7ff0QaI.js.map +0 -1
  511. package/dist/progress-BroqrAyV.js.map +0 -1
  512. package/dist/scroll-area-D-pIhEKl.js.map +0 -1
  513. package/dist/separator-BNIgG3au.js.map +0 -1
  514. package/dist/settings-DOTOzeZ2.js.map +0 -1
  515. package/dist/sheet-BFhrNehm.js +0 -205
  516. package/dist/sheet-BFhrNehm.js.map +0 -1
  517. package/dist/sidebar-CyR4XKwR.js.map +0 -1
  518. package/dist/sidebar-SvGJ0Zwi.js +0 -506
  519. package/dist/sidebar-SvGJ0Zwi.js.map +0 -1
  520. package/dist/smart-card-DjGVV2xr.js.map +0 -1
  521. package/dist/spinner-Cpf7oRkF.js.map +0 -1
  522. package/dist/structure.recipes-Bqhf9oIh.js.map +0 -1
  523. package/dist/surface-recipes-Dd__PD-w.js +0 -28
  524. package/dist/surface-recipes-Dd__PD-w.js.map +0 -1
  525. package/dist/table-CLtJTxoR.js +0 -147
  526. package/dist/table-CLtJTxoR.js.map +0 -1
  527. package/dist/table-CcRDZiLP.js.map +0 -1
  528. package/dist/tabs-BNgu7g0u.js.map +0 -1
  529. package/dist/text-inputs-DsR56TR-.js.map +0 -1
  530. package/dist/text.styles-Q4sGAIgA.js.map +0 -1
  531. package/dist/timelines-D1pkt3se.js.map +0 -1
  532. package/dist/track-recipes-LLPNVwFg.js +0 -10
  533. package/dist/track-recipes-LLPNVwFg.js.map +0 -1
  534. package/dist/typography-BxQgiZyw.js +0 -96
  535. package/dist/typography-BxQgiZyw.js.map +0 -1
  536. package/dist/ui-provider-DRPn3qNl.js.map +0 -1
  537. package/dist/upload-CDbYw1WN.js.map +0 -1
  538. package/dist/upload-queue-CNd_hH_a.js.map +0 -1
  539. package/dist/utils-BvH9PSmq.js.map +0 -1
  540. package/dist/value-inputs-D0KCrfVC.js +0 -840
  541. package/dist/value-inputs-D0KCrfVC.js.map +0 -1
  542. package/dist/workspace-CcR8r-Nt.js.map +0 -1
@@ -0,0 +1,1527 @@
1
+ "use client";
2
+ import { o as e, s as t } from "./ui-provider-D2_TeLqw.js";
3
+ import { useStrings as n } from "./lib/strings.js";
4
+ import { t as r } from "./utils-Cospvlj1.js";
5
+ import { i, o as a, s as o } from "./typography-CAr3dQhX.js";
6
+ import { t as s } from "./button-BS3KDg00.js";
7
+ import { n as c, t as l } from "./button-R9CCoH7A.js";
8
+ import { r as u, t as d } from "./structure-hzCW-XsV.js";
9
+ import { o as f } from "./date-uf3z37Nm.js";
10
+ import { t as ee } from "./separator-Do5GWDYi.js";
11
+ import { n as p } from "./field-affordance-recipes-CkOCdE2y.js";
12
+ import { d as m, g as h, o as te, u as g } from "./form-sizing-uWP4lzVh.js";
13
+ import { t as _ } from "./input-DhQdBnV3.js";
14
+ import { c as ne, o as re, t as ie } from "./popover-Dcv_9jxr.js";
15
+ import { t as v } from "./form-field-VZRULhUK.js";
16
+ import { t as ae } from "./use-mobile-vaLKwgyf.js";
17
+ import * as y from "react";
18
+ import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
19
+ import { Calendar as oe, ChevronDownIcon as C, ChevronLeftIcon as w, ChevronRightIcon as T, Clock as E } from "lucide-react";
20
+ import { cva as D } from "class-variance-authority";
21
+ import { addDays as O, endOfMonth as k, endOfWeek as se, format as A, startOfMonth as ce, startOfWeek as j } from "date-fns";
22
+ import { DayPicker as M, getDefaultClassNames as N } from "react-day-picker";
23
+ import { Toggle as P } from "@base-ui/react/toggle";
24
+ import { ToggleGroup as F } from "@base-ui/react/toggle-group";
25
+ import { enUS as I } from "date-fns/locale";
26
+ function L(e) {
27
+ return e.toString().padStart(2, "0");
28
+ }
29
+ function R(e, t, n) {
30
+ return Math.min(Math.max(e, t), n);
31
+ }
32
+ function z(e, t) {
33
+ if (t <= 0) return e;
34
+ let n = Math.floor(86399 / t) * t, r = Math.round(e / t) * t;
35
+ return Math.max(0, Math.min(r, n));
36
+ }
37
+ function le(e) {
38
+ if (!e) return null;
39
+ let t = e.split(":");
40
+ if (t.length < 2 || t.length > 3) return null;
41
+ let [n, r, i] = t, a = R(Number.parseInt(n, 10), 0, 23), o = R(Number.parseInt(r, 10), 0, 59), s = R(Number.parseInt(i ?? "0", 10), 0, 59);
42
+ return Number.isNaN(a) || Number.isNaN(o) || Number.isNaN(s) ? null : {
43
+ hours: a,
44
+ minutes: o,
45
+ seconds: s
46
+ };
47
+ }
48
+ function ue(e, t) {
49
+ let n = t ? `:${L(e.seconds)}` : "";
50
+ return `${L(e.hours)}:${L(e.minutes)}${n}`;
51
+ }
52
+ function B(e, t, n) {
53
+ let r = Number.isFinite(e?.getTime?.()) ? e : /* @__PURE__ */ new Date(), i = r.getHours(), a = r.getMinutes(), o = t ? r.getSeconds() : 0, s = z(i * 3600 + a * 60 + o, n), c = Math.floor(s / 3600), l = Math.floor(s % 3600 / 60), u = s % 60;
54
+ return {
55
+ hours: c,
56
+ minutes: l,
57
+ seconds: t ? u : 0
58
+ };
59
+ }
60
+ function V(e, t, n) {
61
+ if (t === "12") {
62
+ let t = e.hours >= 12 ? "PM" : "AM", r = e.hours % 12;
63
+ return r === 0 && (r = 12), {
64
+ hours: L(r),
65
+ minutes: L(e.minutes),
66
+ seconds: n ? L(e.seconds) : void 0,
67
+ period: t
68
+ };
69
+ }
70
+ return {
71
+ hours: L(e.hours),
72
+ minutes: L(e.minutes),
73
+ seconds: n ? L(e.seconds) : void 0
74
+ };
75
+ }
76
+ function H(e, t, n) {
77
+ let r = (e) => {
78
+ let t = Number.parseInt(e ?? "0", 10);
79
+ return Number.isNaN(t) ? 0 : t;
80
+ }, i = r(e.hours), a = R(r(e.minutes), 0, 59), o = n ? R(r(e.seconds), 0, 59) : 0;
81
+ if (t === "12") {
82
+ i = R(i, 1, 12);
83
+ let t = (e.period ?? "AM") === "PM";
84
+ i %= 12, t && (i += 12);
85
+ } else i = R(i, 0, 23);
86
+ return {
87
+ hours: i,
88
+ minutes: a,
89
+ seconds: o
90
+ };
91
+ }
92
+ function de(e, t, n) {
93
+ let r = z(e.hours * 3600 + e.minutes * 60 + e.seconds, t);
94
+ return {
95
+ hours: Math.floor(r / 3600),
96
+ minutes: Math.floor(r % 3600 / 60),
97
+ seconds: n ? r % 60 : 0
98
+ };
99
+ }
100
+ function fe(e, t, n, r) {
101
+ let i = L(e.minutes), a = t ? `:${L(e.seconds)}` : "";
102
+ if (n === "24") return `${L(e.hours)}:${i}${a}`;
103
+ let o = e.hours >= 12 ? "PM" : "AM", s = e.hours % 12;
104
+ s === 0 && (s = 12);
105
+ let c = o === "AM" ? r?.am ?? "AM" : r?.pm ?? "PM";
106
+ return `${L(s)}:${i}${a} ${c}`;
107
+ }
108
+ var U = /'[^']*'/g, W = /[HKhk]|\bp\b|\bt\b|\ba\b/;
109
+ function pe(e) {
110
+ if (!e) return !1;
111
+ let t = e.replace(U, "");
112
+ return W.test(t);
113
+ }
114
+ function G(e) {
115
+ return {
116
+ startMonth: typeof e?.fromYear == "number" ? new Date(e.fromYear, 0) : void 0,
117
+ endMonth: typeof e?.toYear == "number" ? new Date(e.toYear, 11) : void 0
118
+ };
119
+ }
120
+ function K(e, t, n, r) {
121
+ let i = r ? { locale: r } : void 0;
122
+ return {
123
+ date: e,
124
+ formatted: e ? A(e, t, i) : void 0,
125
+ readable: e ? A(e, n, i) : void 0
126
+ };
127
+ }
128
+ function me(e, t, n, r) {
129
+ let i = r ? { locale: r } : void 0;
130
+ return {
131
+ dates: e,
132
+ formatted: e.map((e) => A(e, t, i)),
133
+ readable: e.map((e) => A(e, n, i))
134
+ };
135
+ }
136
+ function he(e, t, n, r) {
137
+ let i = r ? { locale: r } : void 0;
138
+ return {
139
+ range: e,
140
+ formatted: {
141
+ from: e?.from ? A(e.from, t, i) : void 0,
142
+ to: e?.to ? A(e.to, t, i) : void 0
143
+ },
144
+ readable: {
145
+ from: e?.from ? A(e.from, n, i) : void 0,
146
+ to: e?.to ? A(e.to, n, i) : void 0
147
+ }
148
+ };
149
+ }
150
+ function ge(e, t) {
151
+ let n = typeof t == "string" ? le(t) : t, r = new Date(e);
152
+ return !Number.isFinite(r.getTime()) || !n ? /* @__PURE__ */ new Date(NaN) : (r.setHours(n.hours, n.minutes, n.seconds, 0), r);
153
+ }
154
+ function _e(e, t) {
155
+ return Math.ceil((t.getTime() - e.getTime()) / 864e5) + 1;
156
+ }
157
+ function ve(e, t, n) {
158
+ if (!e?.from || !e?.to) return { isValid: !0 };
159
+ let r = _e(e.from, e.to);
160
+ return t && r < t || n && r > n ? {
161
+ isValid: !1,
162
+ daysDiff: r
163
+ } : {
164
+ isValid: !0,
165
+ daysDiff: r
166
+ };
167
+ }
168
+ function ye(e, t, n, r) {
169
+ if (!e?.from || !e?.to) return null;
170
+ let i = _e(e.from, e.to);
171
+ return t && i < t ? r.minimumDays(t) : n && i > n ? r.maximumDays(n) : null;
172
+ }
173
+ function be(e, t, n, r, i) {
174
+ return r && e.length === 0 ? i.datesRequired : t && e.length < t ? i.minimumDates(t) : n && e.length > 0 ? i.maximumDates(n) : null;
175
+ }
176
+ function xe(e, t, n, r, i, a) {
177
+ if (e) {
178
+ let n = A(e, t, a ? { locale: a } : void 0);
179
+ return i && (n += ` ${i}`), n;
180
+ }
181
+ return n ?? r;
182
+ }
183
+ function q(e, t, n, r, i, a) {
184
+ if (e.length > 0) {
185
+ if (e.length === 1) {
186
+ let n = a ? { locale: a } : void 0;
187
+ return A(e[0], t, n);
188
+ }
189
+ return i.datesSelected(e.length);
190
+ }
191
+ return n ?? r;
192
+ }
193
+ function Se(e, t, n, r, i) {
194
+ return e?.from ? f(e, {
195
+ format: t,
196
+ locale: i
197
+ }) ?? n ?? r : n ?? r;
198
+ }
199
+ //#endregion
200
+ //#region src/components/base/date-pickers/date-picker-internals.ts
201
+ function Ce(e, t) {
202
+ return {
203
+ tone: e ?? "secondary",
204
+ buttonStyle: t ?? "outline"
205
+ };
206
+ }
207
+ function we(e) {
208
+ return !e.mode || e.mode === "single";
209
+ }
210
+ function J(e) {
211
+ return e.mode === "multiple";
212
+ }
213
+ function Te(e) {
214
+ return e.mode === "range";
215
+ }
216
+ function Ee(e, t) {
217
+ return [
218
+ {
219
+ label: e.today,
220
+ getValue: () => ({
221
+ from: /* @__PURE__ */ new Date(),
222
+ to: /* @__PURE__ */ new Date()
223
+ })
224
+ },
225
+ {
226
+ label: e.thisWeek,
227
+ getValue: () => ({
228
+ from: j(/* @__PURE__ */ new Date(), { weekStartsOn: t }),
229
+ to: se(/* @__PURE__ */ new Date(), { weekStartsOn: t })
230
+ })
231
+ },
232
+ {
233
+ label: e.thisMonth,
234
+ getValue: () => ({
235
+ from: ce(/* @__PURE__ */ new Date()),
236
+ to: k(/* @__PURE__ */ new Date())
237
+ })
238
+ },
239
+ {
240
+ label: e.last30Days,
241
+ getValue: () => ({
242
+ from: O(/* @__PURE__ */ new Date(), -30),
243
+ to: /* @__PURE__ */ new Date()
244
+ })
245
+ }
246
+ ];
247
+ }
248
+ //#endregion
249
+ //#region src/components/ui/calendar.tsx
250
+ function De({ className: e, classNames: t, showOutsideDays: n = !0, captionLayout: i = "label", buttonVariant: a = "ghost", locale: o, formatters: s, components: l, ...u }) {
251
+ let d = N();
252
+ return /* @__PURE__ */ x(M, {
253
+ showOutsideDays: n,
254
+ className: r("p-space-lg [--cell-radius:min(calc(var(--radius)*0.75),calc(min(var(--height-action),var(--height-control))*var(--density-scale)/4))] [--cell-size:calc(var(--height-action)*8/9*var(--density-scale))] bg-background group/calendar [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent", String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`, String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`, e),
255
+ captionLayout: i,
256
+ locale: o,
257
+ formatters: {
258
+ formatMonthDropdown: (e) => e.toLocaleString(o?.code, { month: "short" }),
259
+ ...s
260
+ },
261
+ classNames: {
262
+ root: r("w-fit", d.root),
263
+ months: r("flex gap-space-xl flex-col md:flex-row relative", d.months),
264
+ month: r("flex flex-col w-full gap-space-xl", d.month),
265
+ nav: r("flex items-center gap-space-xs w-full absolute top-0 inset-x-0 justify-between", d.nav),
266
+ button_previous: r(c({ variant: a }), "size-(--cell-size) aria-disabled:opacity-50 p-0 select-none", d.button_previous),
267
+ button_next: r(c({ variant: a }), "size-(--cell-size) aria-disabled:opacity-50 p-0 select-none", d.button_next),
268
+ month_caption: r("flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)", d.month_caption),
269
+ dropdowns: r("w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-space-sm", d.dropdowns),
270
+ dropdown_root: r("relative rounded-(--cell-radius)", d.dropdown_root),
271
+ dropdown: r("absolute bg-popover inset-0 opacity-0", d.dropdown),
272
+ caption_label: r("select-none font-medium", i === "label" ? "text-sm" : "rounded-(--cell-radius) flex items-center gap-space-xs text-sm [&>svg]:text-muted-foreground [&>svg]:size-icon-md", d.caption_label),
273
+ month_grid: "w-full border-collapse",
274
+ weekdays: r("flex", d.weekdays),
275
+ weekday: r("text-muted-foreground rounded-(--cell-radius) flex-1 font-normal text-xs select-none", d.weekday),
276
+ week: r("flex w-full mt-space-md", d.week),
277
+ week_number_header: r("select-none w-(--cell-size)", d.week_number_header),
278
+ week_number: r("text-xs select-none text-muted-foreground", d.week_number),
279
+ day: r("relative w-full rounded-(--cell-radius) h-full p-0 text-center [&:last-child[data-selected=true]_button]:rounded-r-(--cell-radius) group/day aspect-square select-none", u.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)" : "[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)", d.day),
280
+ range_start: r("rounded-l-(--cell-radius) bg-muted relative after:bg-muted after:absolute after:inset-y-0 after:w-4 after:right-0 -z-0 isolate", d.range_start),
281
+ range_middle: r("rounded-none", d.range_middle),
282
+ range_end: r("rounded-r-(--cell-radius) bg-muted relative after:bg-muted after:absolute after:inset-y-0 after:w-4 after:left-0 -z-0 isolate", d.range_end),
283
+ today: r("bg-muted text-foreground rounded-(--cell-radius) data-[selected=true]:rounded-none", d.today),
284
+ outside: r("text-muted-foreground aria-selected:text-muted-foreground", d.outside),
285
+ disabled: r("text-muted-foreground opacity-50", d.disabled),
286
+ hidden: r("invisible", d.hidden),
287
+ ...t
288
+ },
289
+ components: {
290
+ Root: ({ className: e, rootRef: t, ...n }) => /* @__PURE__ */ x("div", {
291
+ "data-slot": "calendar",
292
+ ref: t,
293
+ className: r(e),
294
+ ...n
295
+ }),
296
+ Chevron: ({ className: e, orientation: t, ...n }) => t === "left" ? /* @__PURE__ */ x(w, {
297
+ className: r("size-icon", e),
298
+ ...n
299
+ }) : t === "right" ? /* @__PURE__ */ x(T, {
300
+ className: r("size-icon", e),
301
+ ...n
302
+ }) : /* @__PURE__ */ x(C, {
303
+ className: r(p.icon.md, e),
304
+ ...n
305
+ }),
306
+ DayButton: ({ ...e }) => /* @__PURE__ */ x(Y, {
307
+ locale: o,
308
+ ...e
309
+ }),
310
+ WeekNumber: ({ children: e, ...t }) => /* @__PURE__ */ x("td", {
311
+ ...t,
312
+ children: /* @__PURE__ */ x("div", {
313
+ className: "flex size-(--cell-size) items-center justify-center text-center",
314
+ children: e
315
+ })
316
+ }),
317
+ ...l
318
+ },
319
+ ...u
320
+ });
321
+ }
322
+ function Y({ className: e, day: t, modifiers: n, locale: i, ...a }) {
323
+ let o = N(), s = y.useRef(null);
324
+ return y.useEffect(() => {
325
+ n.focused && s.current?.focus();
326
+ }, [n.focused]), /* @__PURE__ */ x(l, {
327
+ ref: s,
328
+ variant: "ghost",
329
+ size: "icon",
330
+ "data-day": t.date.toLocaleDateString(i?.code),
331
+ "data-selected-single": !!n.selected && !n.range_start && !n.range_end && !n.range_middle,
332
+ "data-range-start": n.range_start,
333
+ "data-range-end": n.range_end,
334
+ "data-range-middle": n.range_middle,
335
+ className: r("data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:ring-ring relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-space-xs border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-2 data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-r-(--cell-radius) data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-l-(--cell-radius) [&>span]:text-xs [&>span]:opacity-70", o.day, e),
336
+ ...a
337
+ });
338
+ }
339
+ //#endregion
340
+ //#region src/components/base/date-pickers/date-picker-field.tsx
341
+ function Oe({ rootRef: e, className: t, label: n, hint: r, error: a, triggerId: s, describedById: c, children: l }) {
342
+ let u = typeof a == "string" && a !== "", f = !u && typeof r == "string" && r !== "";
343
+ return /* @__PURE__ */ S(d, {
344
+ ref: e,
345
+ gap: "xs",
346
+ className: t,
347
+ children: [
348
+ !!(n || f) && /* @__PURE__ */ S(d, {
349
+ direction: "horizontal",
350
+ align: "center",
351
+ justify: "between",
352
+ gap: "xs",
353
+ children: [!!n && /* @__PURE__ */ x(i, {
354
+ htmlFor: s,
355
+ className: "date-picker--label leading-6",
356
+ children: n
357
+ }), f && /* @__PURE__ */ x(o, {
358
+ tag: "span",
359
+ size: "xs",
360
+ type: "secondary",
361
+ className: "date-picker--hint",
362
+ children: r
363
+ })]
364
+ }),
365
+ l,
366
+ u && /* @__PURE__ */ x(o, {
367
+ id: c,
368
+ size: "xs",
369
+ type: "error",
370
+ role: "alert",
371
+ "aria-live": "polite",
372
+ className: "date-picker--error",
373
+ content: a
374
+ })
375
+ ]
376
+ });
377
+ }
378
+ //#endregion
379
+ //#region src/components/base/date-pickers/date-picker-footer.tsx
380
+ function ke({ config: e, output: t, hasSelection: n, autoSummary: i, className: a }) {
381
+ let { text: c, actions: l, showOnlyWhenSelected: u = !1, showSummary: f = !1 } = e, p = l?.filter((e) => e.visible !== !1) ?? [], m = y.useMemo(() => {
382
+ if (c) return typeof c == "function" ? c(t) : c;
383
+ }, [c, t]), h = m || (f ? i : void 0);
384
+ return u && !n || !h && p.length === 0 ? null : /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x(ee, {}), /* @__PURE__ */ x("div", {
385
+ className: r("date-picker-footer--component p-surface", a),
386
+ children: /* @__PURE__ */ S(d, {
387
+ gap: "lg",
388
+ children: [!!h && /* @__PURE__ */ S(d, {
389
+ gap: "xs",
390
+ className: "date-picker-footer--summary",
391
+ children: [
392
+ !!f && !!m && !!i && /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x(o, {
393
+ type: "secondary",
394
+ children: i
395
+ }), /* @__PURE__ */ x(o, {
396
+ weight: "medium",
397
+ children: m
398
+ })] }),
399
+ !f && !!m && /* @__PURE__ */ x(o, {
400
+ weight: "medium",
401
+ children: m
402
+ }),
403
+ !!f && !m && !!i && /* @__PURE__ */ x(o, {
404
+ type: "secondary",
405
+ children: i
406
+ })
407
+ ]
408
+ }), p.length > 0 && /* @__PURE__ */ x(d, {
409
+ direction: "horizontal",
410
+ gap: "md",
411
+ align: "center",
412
+ className: "date-picker-footer--actions",
413
+ children: p.map((e) => {
414
+ let n = typeof e.disabled == "function" ? e.disabled(t) : e.disabled, i = e.buttonStyle === "link" ? "ghost" : e.buttonStyle ?? "solid";
415
+ return /* @__PURE__ */ x(s, {
416
+ tone: e.tone ?? "primary",
417
+ buttonStyle: i,
418
+ disabled: n,
419
+ loading: e.loading,
420
+ onClick: () => e.onClick(t),
421
+ className: r("flex-1", e.buttonStyle === "link" && "underline underline-offset-4"),
422
+ children: e.label
423
+ }, e.label);
424
+ })
425
+ })]
426
+ })
427
+ })] });
428
+ }
429
+ ke.displayName = "DatePickerFooter";
430
+ //#endregion
431
+ //#region src/components/base/date-pickers/date-picker-header.tsx
432
+ function Ae({ config: e, className: t }) {
433
+ let { title: n, description: i, icon: s, align: c = "left" } = e;
434
+ return /* @__PURE__ */ x("div", {
435
+ className: r("date-picker-header--component", "border-b border-border p-surface", c === "center" ? "text-center" : "text-left", t),
436
+ children: /* @__PURE__ */ S(d, {
437
+ direction: "horizontal",
438
+ gap: "md",
439
+ wrap: !1,
440
+ children: [!!s && /* @__PURE__ */ x("div", {
441
+ className: "shrink-0",
442
+ children: /* @__PURE__ */ x(s, {
443
+ "aria-hidden": "true",
444
+ className: "size-icon text-muted-foreground"
445
+ })
446
+ }), /* @__PURE__ */ S(d, {
447
+ gap: "dense",
448
+ className: r("flex-1", c === "center" && !s && "text-center"),
449
+ children: [/* @__PURE__ */ x(a, {
450
+ tag: "h3",
451
+ align: c === "center" ? "center" : "left",
452
+ containerClassName: "space-y-0",
453
+ children: n
454
+ }), !!i && /* @__PURE__ */ x(o, {
455
+ type: "secondary",
456
+ children: i
457
+ })]
458
+ })]
459
+ })
460
+ });
461
+ }
462
+ Ae.displayName = "DatePickerHeader";
463
+ //#endregion
464
+ //#region src/components/base/date-pickers/date-picker.recipes.ts
465
+ function je(e) {
466
+ let { defaultScale: n } = t();
467
+ return h(e, n);
468
+ }
469
+ var Me = {
470
+ sm: "w-control-sm",
471
+ md: "w-control",
472
+ lg: "w-control-lg"
473
+ };
474
+ function Ne(e, t = !1) {
475
+ return r(m(e), "justify-start", t && [Me[e], "shrink-0 justify-center px-0"]);
476
+ }
477
+ //#endregion
478
+ //#region src/components/base/date-pickers/date-pickers.strings.ts
479
+ var Pe = {
480
+ selectDate: "Select a date",
481
+ selectDates: "Select dates",
482
+ selectDateRange: "Select date range",
483
+ from: "From",
484
+ to: "To",
485
+ confirm: "Confirm",
486
+ clear: "Clear",
487
+ today: "Today",
488
+ startDate: "Start date",
489
+ endDate: "End date",
490
+ startTime: "Start time",
491
+ endTime: "End time",
492
+ hours: "Hours",
493
+ minutes: "Minutes",
494
+ seconds: "Seconds",
495
+ am: "AM",
496
+ pm: "PM",
497
+ minimumDays: (e) => `A minimum of ${e} days is required`,
498
+ maximumDays: (e) => `A maximum of ${e} days is allowed`,
499
+ minimumDates: (e) => `Select at least ${e} dates`,
500
+ maximumDates: (e) => `Select up to ${e} dates`,
501
+ datesRequired: "At least one date must be selected",
502
+ datesSelected: (e) => `${e} dates selected`,
503
+ lastWeek: "Last week",
504
+ lastMonth: "Last month",
505
+ lastYear: "Last year",
506
+ nextWeek: "Next week",
507
+ nextMonth: "Next month",
508
+ nextYear: "Next year",
509
+ thisWeek: "This Week",
510
+ thisMonth: "This Month",
511
+ last30Days: "Last 30 Days",
512
+ selectMonthYear: "Select month and year",
513
+ month: "Month",
514
+ year: "Year"
515
+ }, Fe = D("box-border border border-transparent py-0 font-sans text-foreground hover:text-foreground aria-pressed:bg-muted focus-visible:ring-2 focus-visible:ring-ring aria-invalid:ring-2 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive aria-invalid:focus-visible:ring-destructive gap-space-xs rounded-inner text-sm font-medium transition-[color,background-color,box-shadow] [&_svg:not([class*='size-'])]:size-icon group/toggle hover:bg-muted inline-flex items-center justify-center whitespace-nowrap outline-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", {
516
+ variants: {
517
+ variant: {
518
+ default: "bg-transparent",
519
+ outline: "border-input hover:bg-muted border bg-transparent shadow-none"
520
+ },
521
+ size: {
522
+ default: "h-control min-w-9 px-control",
523
+ sm: "h-control-sm min-w-8 px-control-sm",
524
+ lg: "h-control-lg min-w-10 px-control"
525
+ }
526
+ },
527
+ defaultVariants: {
528
+ variant: "default",
529
+ size: "default"
530
+ }
531
+ }), Ie = y.createContext({
532
+ size: "default",
533
+ variant: "default",
534
+ spacing: 0,
535
+ orientation: "horizontal"
536
+ });
537
+ function Le({ className: e, variant: t, size: n, spacing: i = 0, orientation: a = "horizontal", children: o, ...s }) {
538
+ return /* @__PURE__ */ x(F, {
539
+ "data-slot": "toggle-group",
540
+ "data-variant": t,
541
+ "data-size": n,
542
+ "data-spacing": i,
543
+ "data-orientation": a,
544
+ style: { "--gap": i },
545
+ className: r("rounded-inner group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch", e),
546
+ ...s,
547
+ children: /* @__PURE__ */ x(Ie.Provider, {
548
+ value: {
549
+ variant: t,
550
+ size: n,
551
+ spacing: i,
552
+ orientation: a
553
+ },
554
+ children: o
555
+ })
556
+ });
557
+ }
558
+ function Re({ className: e, children: t, variant: n = "default", size: i = "default", ...a }) {
559
+ let o = y.useContext(Ie);
560
+ return /* @__PURE__ */ x(P, {
561
+ "data-slot": "toggle-group-item",
562
+ "data-variant": o.variant || n,
563
+ "data-size": o.size || i,
564
+ "data-spacing": o.spacing,
565
+ className: r("border-border group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-control-sm group-data-[spacing=0]/toggle-group:shadow-none group-data-[orientation=horizontal]/toggle-group:data-[spacing=0]:first:rounded-l-inner group-data-[orientation=vertical]/toggle-group:data-[spacing=0]:first:rounded-t-inner group-data-[orientation=horizontal]/toggle-group:data-[spacing=0]:last:rounded-r-inner group-data-[orientation=vertical]/toggle-group:data-[spacing=0]:last:rounded-b-inner shrink-0 focus:z-10 focus-visible:z-10 group-data-[orientation=horizontal]/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-[orientation=vertical]/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-[orientation=horizontal]/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-[orientation=vertical]/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t", Fe({
566
+ variant: o.variant || n,
567
+ size: o.size || i
568
+ }), e),
569
+ ...a,
570
+ children: t
571
+ });
572
+ }
573
+ //#endregion
574
+ //#region src/components/base/date-pickers/time-picker.tsx
575
+ var ze = {
576
+ placeholder: "Select time",
577
+ hours: "Hours",
578
+ minutes: "Minutes",
579
+ seconds: "Seconds",
580
+ am: "AM",
581
+ pm: "PM"
582
+ }, Be = [
583
+ "hours",
584
+ "minutes",
585
+ "seconds"
586
+ ], Ve = "00", He = "12", X = "--", Ue = "aria-pressed:bg-primary aria-pressed:text-primary-foreground", Z = {
587
+ sm: "w-12",
588
+ md: "w-14",
589
+ lg: "w-16"
590
+ };
591
+ function Q(e) {
592
+ return e.replace(/\D/g, "").slice(-2);
593
+ }
594
+ function $(e) {
595
+ return e.length === 0 ? "00" : e.length === 1 ? `0${e}` : e;
596
+ }
597
+ function We(e, t) {
598
+ let n = t ? Be : Be.slice(0, 2), r = n.indexOf(e);
599
+ return r > -1 && r < n.length - 1 ? n[r + 1] : null;
600
+ }
601
+ function Ge(e, t) {
602
+ let n = t ? Be : Be.slice(0, 2), r = n.indexOf(e);
603
+ return r > 0 ? n[r - 1] : null;
604
+ }
605
+ function Ke(e, t) {
606
+ return t === "24" ? e : e % 12 || 12;
607
+ }
608
+ function qe(e) {
609
+ return e >= 12 ? "PM" : "AM";
610
+ }
611
+ function Je(e, t) {
612
+ return t === "12" ? {
613
+ ...e,
614
+ period: e.period ?? "AM"
615
+ } : {
616
+ ...e,
617
+ period: void 0
618
+ };
619
+ }
620
+ function Ye(e) {
621
+ return {
622
+ hours: X,
623
+ minutes: X,
624
+ seconds: e ? X : void 0
625
+ };
626
+ }
627
+ function Xe(e, t) {
628
+ let n = t === "12" ? He : Ve;
629
+ return {
630
+ hours: e.hours === X ? n : e.hours,
631
+ minutes: e.minutes === X ? Ve : e.minutes,
632
+ seconds: e.seconds === X ? Ve : e.seconds,
633
+ period: e.period
634
+ };
635
+ }
636
+ function Ze(e, t, n) {
637
+ let r = le(e ?? void 0);
638
+ return r ? Je(V(r, t, n), t) : Ye(n);
639
+ }
640
+ var Qe = y.forwardRef(function({ value: e, onValueChange: i, mode: a = "inline", format: s = "24", precision: c = "minutes", step: l = 60, size: u, disabled: d, invalid: f, placeholder: ee, strings: p, className: te, id: v }, ae) {
641
+ let b = n(ze, p), { defaultScale: oe } = t(), C = h(u, oe), w = c === "seconds", [T, D] = y.useState(!1), O = y.useMemo(() => w ? Be : Be.slice(0, 2), [w]), [k, se] = y.useState(() => Ze(e, s, w)), A = y.useRef(k), ce = y.useRef(!1), j = y.useRef(null), M = y.useCallback((e) => {
642
+ A.current = e, se(e);
643
+ }, []), N = y.useRef({
644
+ hours: null,
645
+ minutes: null,
646
+ seconds: null
647
+ });
648
+ y.useEffect(() => {
649
+ if (ce.current) {
650
+ ce.current = !1;
651
+ return;
652
+ }
653
+ j.current = null, M(Ze(e, s, w));
654
+ }, [
655
+ e,
656
+ s,
657
+ w,
658
+ M
659
+ ]);
660
+ let P = y.useCallback((e) => ue(e, w), [w]), F = y.useCallback((e) => {
661
+ ce.current = !0;
662
+ let t = H(Xe(e, s), s, w);
663
+ i?.(P(de(t, l, w)));
664
+ }, [
665
+ s,
666
+ w,
667
+ i,
668
+ l,
669
+ P
670
+ ]), I = y.useCallback((e) => {
671
+ let t = de(H(Xe(e, s), s, w), l, w);
672
+ i?.(P(t)), M(Je(V(t, s, w), s));
673
+ }, [
674
+ s,
675
+ w,
676
+ i,
677
+ l,
678
+ P,
679
+ M
680
+ ]), L = y.useCallback((e) => {
681
+ if (!e) return;
682
+ let t = N.current[e];
683
+ t && (t.focus(), t.select());
684
+ }, []), R = y.useCallback((e, t) => {
685
+ let n = Xe(A.current, s), r = j.current, i = r && r.key === e && r.typed.length === 1 ? `${r.typed}${t}` : String(t);
686
+ j.current = {
687
+ key: e,
688
+ typed: i
689
+ };
690
+ let a = Number.parseInt(i, 10), o = { ...n }, c = o.period ?? "AM";
691
+ e === "hours" ? s === "24" ? o.hours = $(Math.min(Math.max(a, 0), 23).toString()) : a === 0 ? (c = "AM", o.hours = He) : a > 12 ? (c = qe(a), o.hours = $(Ke(a, "12").toString())) : (o.hours = $(Math.min(Math.max(a, 1), 12).toString()), c = n.period ?? qe(a)) : e === "minutes" ? o.minutes = $(Math.min(Math.max(a, 0), 59).toString()) : e === "seconds" && (o.seconds = $(Math.min(Math.max(a, 0), 59).toString()));
692
+ let l = {
693
+ ...o,
694
+ period: s === "12" ? c : void 0
695
+ };
696
+ M(l), F(l);
697
+ }, [
698
+ s,
699
+ M,
700
+ F
701
+ ]), z = y.useCallback((e, t) => {
702
+ j.current = null;
703
+ let n = Q(t), r = { ...Xe(A.current, s) }, i = r.period ?? "AM";
704
+ if (e === "hours") {
705
+ if (s === "24") {
706
+ let e = Number.parseInt(n || "0", 10);
707
+ r.hours = $((Number.isNaN(e) ? 0 : Math.min(Math.max(e, 0), 23)).toString());
708
+ } else {
709
+ let e = Number.parseInt(n || "0", 10);
710
+ Number.isNaN(e) ? (r.hours = He, i = r.period ?? "AM") : n.length === 2 && e > 12 ? (i = qe(e), r.hours = $(Ke(e, "12").toString())) : e === 0 ? (i = "AM", r.hours = He) : (r.hours = $(Math.min(Math.max(e, 1), 12).toString()), n.length === 2 && (i = r.period ?? qe(e)));
711
+ }
712
+ } else if (e === "minutes") {
713
+ let e = Number.parseInt(n || "0", 10);
714
+ r.minutes = $((Number.isNaN(e) ? 0 : Math.min(Math.max(e, 0), 59)).toString());
715
+ } else if (e === "seconds") {
716
+ let e = Number.parseInt(n || "0", 10);
717
+ r.seconds = $((Number.isNaN(e) ? 0 : Math.min(Math.max(e, 0), 59)).toString());
718
+ }
719
+ let a = {
720
+ ...r,
721
+ period: s === "12" ? i : void 0
722
+ };
723
+ M(a), F(a);
724
+ }, [
725
+ s,
726
+ M,
727
+ F
728
+ ]), le = y.useCallback((e) => {
729
+ s === "12" && (j.current = null, I({
730
+ ...Xe(A.current, s),
731
+ period: e
732
+ }));
733
+ }, [I, s]), B = y.useCallback(() => {
734
+ j.current = null, I(A.current);
735
+ }, [I]), U = y.useCallback((e) => {
736
+ j.current = null, e.target.select();
737
+ }, []), W = y.useCallback((e, t) => {
738
+ if (e.key.length === 1 && /\d/.test(e.key) && !e.metaKey && !e.ctrlKey && !e.altKey) {
739
+ e.preventDefault(), R(t, Number.parseInt(e.key, 10));
740
+ return;
741
+ }
742
+ if (e.key === "ArrowRight") {
743
+ L(We(t, w));
744
+ return;
745
+ }
746
+ if (e.key === "ArrowLeft") {
747
+ L(Ge(t, w));
748
+ return;
749
+ }
750
+ if (e.key === "Backspace") {
751
+ let n = e.currentTarget;
752
+ n.selectionStart === 0 && n.selectionEnd === 0 && L(Ge(t, w));
753
+ }
754
+ }, [
755
+ R,
756
+ L,
757
+ w
758
+ ]), pe = y.useMemo(() => {
759
+ if (s === "12") return k.period ? [k.period] : void 0;
760
+ }, [s, k.period]), G = {
761
+ hours: b.hours,
762
+ minutes: b.minutes,
763
+ seconds: b.seconds
764
+ }, K = /* @__PURE__ */ S("div", {
765
+ ref: a === "inline" ? ae : void 0,
766
+ className: r("flex items-center gap-space-md [&>.input--component]:w-auto [&>.input--component]:shrink-0", a === "inline" && ["time-picker--component", te]),
767
+ children: [O.map((e, t) => /* @__PURE__ */ S(y.Fragment, { children: [/* @__PURE__ */ x(_, {
768
+ ref: (t) => {
769
+ N.current[e] = t;
770
+ },
771
+ id: e === "hours" && a === "inline" ? v : void 0,
772
+ value: k[e] ?? X,
773
+ onChange: (t) => z(e, t.target.value),
774
+ onFocus: U,
775
+ onBlur: B,
776
+ onKeyDown: (t) => W(t, e),
777
+ inputMode: "numeric",
778
+ pattern: "\\d*",
779
+ maxLength: 2,
780
+ showCharacterCount: !1,
781
+ disabled: d,
782
+ invalid: f,
783
+ "aria-label": G[e],
784
+ size: C,
785
+ className: r("time-picker--segment text-center", Z[C])
786
+ }), t < O.length - 1 && /* @__PURE__ */ x(o, {
787
+ tag: "span",
788
+ type: "secondary",
789
+ children: ":"
790
+ })] }, e)), s === "12" && /* @__PURE__ */ S(Le, {
791
+ value: pe,
792
+ onValueChange: (e) => {
793
+ let t = e[0];
794
+ t && le(t);
795
+ },
796
+ disabled: d,
797
+ variant: "outline",
798
+ size: C === "sm" ? "sm" : "default",
799
+ className: "time-picker--period",
800
+ children: [/* @__PURE__ */ x(Re, {
801
+ value: "AM",
802
+ "aria-label": b.am,
803
+ className: r(g[C], Ue),
804
+ children: /* @__PURE__ */ x(o, {
805
+ tag: "span",
806
+ size: "inherit",
807
+ weight: "medium",
808
+ lineHeight: "tight",
809
+ className: "text-inherit",
810
+ children: b.am
811
+ })
812
+ }), /* @__PURE__ */ x(Re, {
813
+ value: "PM",
814
+ "aria-label": b.pm,
815
+ className: r(g[C], Ue),
816
+ children: /* @__PURE__ */ x(o, {
817
+ tag: "span",
818
+ size: "inherit",
819
+ weight: "medium",
820
+ lineHeight: "tight",
821
+ className: "text-inherit",
822
+ children: b.pm
823
+ })
824
+ })]
825
+ })]
826
+ });
827
+ if (a === "inline") return K;
828
+ let me = k.hours === X && k.minutes === X, he = me ? ee ?? b.placeholder : fe(H(Xe(k, s), s, w), w, s, {
829
+ am: b.am,
830
+ pm: b.pm
831
+ });
832
+ return /* @__PURE__ */ S(re, {
833
+ open: T,
834
+ onOpenChange: D,
835
+ children: [/* @__PURE__ */ S(ne, {
836
+ ref: ae,
837
+ id: v,
838
+ "aria-expanded": T,
839
+ "aria-invalid": f,
840
+ disabled: d,
841
+ className: r("time-picker--component", m(C), "justify-start", me && "text-muted-foreground", te),
842
+ children: [/* @__PURE__ */ x(E, { className: "size-icon shrink-0" }), /* @__PURE__ */ x(o, {
843
+ tag: "span",
844
+ size: "inherit",
845
+ lineHeight: "tight",
846
+ className: "min-w-0 truncate text-inherit",
847
+ children: he
848
+ })]
849
+ }), /* @__PURE__ */ x(ie, {
850
+ className: "time-picker--panel w-auto",
851
+ align: "start",
852
+ children: K
853
+ })]
854
+ });
855
+ });
856
+ Qe.displayName = "TimePicker";
857
+ //#endregion
858
+ //#region src/components/base/date-pickers/date-picker-single.tsx
859
+ function $e({ value: e, defaultValue: t, onValueChange: n, format: i = "yyyy-MM-dd", readableFormat: a = "PPP", placeholder: c, closeOnSelect: l = !0, withTime: u, disabledDates: d, calendarProps: f, open: p, setOpen: m, t: h, dateFnsLocale: g, captionLayout: _, yearBounds: ae, rootRef: C, ...w }) {
860
+ let T = je(w.size), E = y.useId(), D = w.id ?? E, O = `${D}-description`, k = w.error !== void 0 && w.error !== null && w.error !== "", se = k || !!w.invalid, ce = k ? O : void 0, j = u?.format ?? "24", M = u?.step ?? 60, N = u?.showSeconds ?? !1, P = pe(a), F = u?.showTimeInButton ?? !P, [I, L] = y.useState(() => e ?? t), [R, z] = y.useState(() => {
861
+ let n = e ?? t;
862
+ return n ? B(n, N, M) : null;
863
+ }), V = y.useRef(e ?? t ?? void 0), H = y.useRef(!1), U = y.useRef(e !== void 0), W = y.useCallback((e, t) => {
864
+ let n = e, r = t ?? R;
865
+ if (e && u?.enabled && r) {
866
+ let t = ge(e, r);
867
+ n = Number.isFinite(t.getTime()) ? t : void 0;
868
+ }
869
+ return K(n, i, a, g);
870
+ }, [
871
+ i,
872
+ a,
873
+ g,
874
+ u,
875
+ R
876
+ ]);
877
+ y.useEffect(() => {
878
+ let r = !!u?.enabled, o = U.current, s = e !== void 0, c = (e, t) => {
879
+ let o = de(B(e, N, M), M, N);
880
+ if (L((t) => t?.getTime?.() === e.getTime() ? t : e), z((e) => e && e.hours === o.hours && e.minutes === o.minutes && e.seconds === o.seconds ? e : o), V.current = e, H.current = !0, t && r) {
881
+ let t = ge(e, o);
882
+ n?.(K(t, i, a, g));
883
+ }
884
+ };
885
+ if (!r) {
886
+ H.current = !1, V.current = e ?? t ?? void 0, L(e ?? t), U.current = s;
887
+ return;
888
+ }
889
+ let l = V.current?.getTime?.(), d = e?.getTime?.();
890
+ if (!s && o && t === void 0 && (H.current = !1, V.current = void 0), e !== void 0 && d !== l) {
891
+ c(e, !1), U.current = s;
892
+ return;
893
+ }
894
+ if (e === void 0 && t !== void 0) {
895
+ (l !== t.getTime() || !H.current) && c(t, !1), U.current = s;
896
+ return;
897
+ }
898
+ if (e === void 0 && t === void 0 && !H.current) {
899
+ H.current = !0, U.current = s;
900
+ return;
901
+ }
902
+ U.current = s;
903
+ }, [
904
+ u?.enabled,
905
+ e,
906
+ t,
907
+ N,
908
+ M,
909
+ n,
910
+ i,
911
+ a,
912
+ g
913
+ ]), y.useEffect(() => {
914
+ u?.enabled && z((e) => {
915
+ if (!e) return e;
916
+ let t = de(e, M, N);
917
+ return e.hours === t.hours && e.minutes === t.minutes && e.seconds === t.seconds ? e : t;
918
+ });
919
+ }, [
920
+ u?.enabled,
921
+ M,
922
+ N
923
+ ]);
924
+ let G = y.useCallback((e) => {
925
+ L(e);
926
+ let t;
927
+ u?.enabled && e && (H.current = !0, V.current = e, R || (t = B(e, N, M), z(t))), n?.(W(e, t)), l && e && m(!1);
928
+ }, [
929
+ n,
930
+ W,
931
+ l,
932
+ m,
933
+ u,
934
+ R,
935
+ N,
936
+ M
937
+ ]), me = y.useCallback((e) => {
938
+ let t = le(e ?? void 0);
939
+ t && (z(t), I && n?.(W(I, t)));
940
+ }, [
941
+ I,
942
+ n,
943
+ W
944
+ ]), he = y.useMemo(() => {
945
+ if (u?.enabled && R) return fe(R, N, j, {
946
+ am: h.am,
947
+ pm: h.pm
948
+ });
949
+ }, [
950
+ u?.enabled,
951
+ R,
952
+ N,
953
+ j,
954
+ h
955
+ ]), _e = y.useMemo(() => xe(I, a, c, h.selectDate, F ? he : void 0, g), [
956
+ I,
957
+ a,
958
+ c,
959
+ h,
960
+ he,
961
+ F,
962
+ g
963
+ ]), ve = y.useMemo(() => I ? A(I, a, { locale: g }) : void 0, [
964
+ I,
965
+ a,
966
+ g
967
+ ]);
968
+ return /* @__PURE__ */ x(Oe, {
969
+ rootRef: C,
970
+ className: w.className,
971
+ label: w.label,
972
+ hint: w.hint,
973
+ error: w.error,
974
+ triggerId: D,
975
+ describedById: O,
976
+ children: /* @__PURE__ */ S(re, {
977
+ open: p,
978
+ onOpenChange: m,
979
+ children: [/* @__PURE__ */ x(ne, { render: (e) => {
980
+ let t = Ce(w.buttonTone, w.buttonStyle);
981
+ return /* @__PURE__ */ S(s, {
982
+ ...e,
983
+ id: D,
984
+ tone: t.tone,
985
+ buttonStyle: t.buttonStyle,
986
+ size: T,
987
+ "aria-invalid": se,
988
+ "aria-describedby": ce,
989
+ className: r(Ne(T), !I && "text-muted-foreground", e.className),
990
+ disabled: w.disabled,
991
+ children: [/* @__PURE__ */ x(oe, {
992
+ className: te[T],
993
+ "aria-hidden": "true"
994
+ }), /* @__PURE__ */ x(o, {
995
+ tag: "span",
996
+ size: "inherit",
997
+ lineHeight: "tight",
998
+ className: "min-w-0 truncate text-inherit",
999
+ children: _e
1000
+ })]
1001
+ });
1002
+ } }), /* @__PURE__ */ S(ie, {
1003
+ inset: "flush",
1004
+ className: "w-auto gap-0",
1005
+ align: "start",
1006
+ children: [
1007
+ !!w.header && /* @__PURE__ */ x(Ae, { config: w.header }),
1008
+ /* @__PURE__ */ x(De, {
1009
+ mode: "single",
1010
+ selected: I,
1011
+ onSelect: G,
1012
+ defaultMonth: I,
1013
+ numberOfMonths: w.numberOfMonths,
1014
+ showOutsideDays: w.showOutsideDays,
1015
+ disabled: d ?? w.disabled,
1016
+ locale: g,
1017
+ captionLayout: _,
1018
+ startMonth: ae.startMonth,
1019
+ endMonth: ae.endMonth,
1020
+ ...f
1021
+ }),
1022
+ !!u?.enabled && /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x(ee, {}), /* @__PURE__ */ x("div", {
1023
+ className: "date-picker--time p-surface",
1024
+ children: /* @__PURE__ */ x(v, {
1025
+ label: h.startTime,
1026
+ children: /* @__PURE__ */ x(Qe, {
1027
+ value: R ? ue(R, N) : null,
1028
+ onValueChange: me,
1029
+ format: j,
1030
+ precision: N ? "seconds" : "minutes",
1031
+ step: M,
1032
+ disabled: w.disabled,
1033
+ size: "sm",
1034
+ strings: {
1035
+ hours: h.hours,
1036
+ minutes: h.minutes,
1037
+ seconds: h.seconds,
1038
+ am: h.am,
1039
+ pm: h.pm
1040
+ }
1041
+ })
1042
+ })
1043
+ })] }),
1044
+ !!w.footer && /* @__PURE__ */ x(ke, {
1045
+ config: w.footer,
1046
+ output: W(I),
1047
+ hasSelection: !!I,
1048
+ autoSummary: ve
1049
+ })
1050
+ ]
1051
+ })]
1052
+ })
1053
+ });
1054
+ }
1055
+ //#endregion
1056
+ //#region src/components/base/date-pickers/date-picker-multiple.tsx
1057
+ function et({ value: e, defaultValue: t, onValueChange: n, format: i = "yyyy-MM-dd", readableFormat: a = "PPP", placeholder: c, min: l, max: u, required: d, closeOnSelect: f = !1, disabledDates: p, calendarProps: m, open: h, setOpen: g, t: _, dateFnsLocale: v, captionLayout: ae, yearBounds: C, rootRef: w, ...T }) {
1058
+ let E = je(T.size), D = y.useId(), O = T.id ?? D, k = `${O}-description`, se = T.error !== void 0 && T.error !== null && T.error !== "", A = se || !!T.invalid, ce = se ? k : void 0, [j, M] = y.useState(e ?? t ?? []);
1059
+ y.useEffect(() => {
1060
+ e !== void 0 && M(e);
1061
+ }, [e]);
1062
+ let N = y.useCallback((e) => me(e, i, a, v), [
1063
+ i,
1064
+ a,
1065
+ v
1066
+ ]), P = y.useCallback((e) => {
1067
+ let t = Array.isArray(e) ? e : e ? [e] : [];
1068
+ M(t), n?.(N(t)), f && t.length > 0 && g(!1);
1069
+ }, [
1070
+ n,
1071
+ N,
1072
+ f,
1073
+ g
1074
+ ]), F = y.useMemo(() => q(j, a, c, _.selectDates, _, v), [
1075
+ j,
1076
+ a,
1077
+ c,
1078
+ _,
1079
+ v
1080
+ ]), I = y.useMemo(() => be(j, l, u, d, _), [
1081
+ j,
1082
+ l,
1083
+ u,
1084
+ d,
1085
+ _
1086
+ ]), L = y.useMemo(() => j.length > 0 ? _.datesSelected(j.length) : void 0, [j.length, _]);
1087
+ return /* @__PURE__ */ x(Oe, {
1088
+ rootRef: w,
1089
+ className: T.className,
1090
+ label: T.label,
1091
+ hint: T.hint,
1092
+ error: T.error,
1093
+ triggerId: O,
1094
+ describedById: k,
1095
+ children: /* @__PURE__ */ S(re, {
1096
+ open: h,
1097
+ onOpenChange: g,
1098
+ children: [/* @__PURE__ */ x(ne, { render: (e) => {
1099
+ let t = Ce(T.buttonTone, T.buttonStyle);
1100
+ return /* @__PURE__ */ S(s, {
1101
+ ...e,
1102
+ id: O,
1103
+ tone: t.tone,
1104
+ buttonStyle: t.buttonStyle,
1105
+ size: E,
1106
+ "aria-invalid": A,
1107
+ "aria-describedby": ce,
1108
+ className: r(Ne(E), j.length === 0 && "text-muted-foreground", e.className),
1109
+ disabled: T.disabled,
1110
+ children: [/* @__PURE__ */ x(oe, {
1111
+ className: te[E],
1112
+ "aria-hidden": "true"
1113
+ }), /* @__PURE__ */ x(o, {
1114
+ tag: "span",
1115
+ size: "inherit",
1116
+ lineHeight: "tight",
1117
+ className: "min-w-0 truncate text-inherit",
1118
+ children: F
1119
+ })]
1120
+ });
1121
+ } }), /* @__PURE__ */ S(ie, {
1122
+ inset: "flush",
1123
+ className: "w-auto gap-0",
1124
+ align: "start",
1125
+ children: [
1126
+ !!T.header && /* @__PURE__ */ x(Ae, { config: T.header }),
1127
+ /* @__PURE__ */ x(De, {
1128
+ mode: "multiple",
1129
+ selected: j,
1130
+ onSelect: P,
1131
+ defaultMonth: j[0],
1132
+ numberOfMonths: T.numberOfMonths,
1133
+ showOutsideDays: T.showOutsideDays,
1134
+ disabled: p ?? T.disabled,
1135
+ locale: v,
1136
+ captionLayout: ae,
1137
+ startMonth: C.startMonth,
1138
+ endMonth: C.endMonth,
1139
+ required: d,
1140
+ max: u,
1141
+ ...m
1142
+ }),
1143
+ !!I && /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x(ee, {}), /* @__PURE__ */ x("div", {
1144
+ className: "p-surface",
1145
+ children: /* @__PURE__ */ x(o, {
1146
+ type: "secondary",
1147
+ children: I
1148
+ })
1149
+ })] }),
1150
+ !!T.footer && /* @__PURE__ */ x(ke, {
1151
+ config: T.footer,
1152
+ output: N(j),
1153
+ hasSelection: j.length > 0,
1154
+ autoSummary: L
1155
+ })
1156
+ ]
1157
+ })]
1158
+ })
1159
+ });
1160
+ }
1161
+ //#endregion
1162
+ //#region src/components/base/date-pickers/date-picker-range.tsx
1163
+ function tt({ value: t, defaultValue: n, onValueChange: i, format: a = "yyyy-MM-dd", readableFormat: c = "PPP", placeholder: l, withConfirm: f = !1, min: p, max: m, closeOnSelect: h = !0, withTime: g, presets: _, disabledDates: C, calendarProps: w, open: T, setOpen: E, t: D, dateFnsLocale: O, captionLayout: k, yearBounds: se, rootRef: ce, ...j }) {
1164
+ let M = ae(), N = j.numberOfMonths ?? (M ? 1 : 2), { weekStartsOn: P = 1 } = e(), F = _ ?? Ee(D, P), I = je(j.size), L = y.useId(), R = j.id ?? L, z = `${R}-description`, V = j.error !== void 0 && j.error !== null && j.error !== "", H = V || !!j.invalid, U = V ? z : void 0, W = g?.format ?? "24", G = g?.step ?? 60, K = g?.showSeconds ?? !1, me = pe(c), _e = g?.showTimeInButton ?? !me, be = g?.showTimeInSummary ?? !me, xe = t ?? n, [q, we] = y.useState(xe), [J, Te] = y.useState(() => xe?.from ? B(xe.from, K, G) : null), [Y, Me] = y.useState(() => xe?.to ? B(xe.to, K, G) : null), Pe = y.useRef(t), Fe = y.useMemo(() => ye(q, p, m, D), [
1165
+ q,
1166
+ p,
1167
+ m,
1168
+ D
1169
+ ]), Ie = Fe != null && Fe !== "", Le = typeof Fe == "string" ? Fe : "";
1170
+ y.useEffect(() => {
1171
+ t !== void 0 && we(t);
1172
+ }, [t]), y.useEffect(() => {
1173
+ if (!g?.enabled) {
1174
+ Pe.current = t;
1175
+ return;
1176
+ }
1177
+ let e = Pe.current, n = t?.from, r = t?.to;
1178
+ n ? Te(B(n, K, G)) : e?.from && Te(null), r ? Me(B(r, K, G)) : e?.to && Me(null), Pe.current = t;
1179
+ }, [
1180
+ t,
1181
+ g?.enabled,
1182
+ K,
1183
+ G
1184
+ ]), y.useEffect(() => {
1185
+ if (!g?.enabled) return;
1186
+ let e = (e) => {
1187
+ if (!e) return e;
1188
+ let t = de(e, G, K);
1189
+ return e.hours === t.hours && e.minutes === t.minutes && e.seconds === t.seconds ? e : t;
1190
+ };
1191
+ Te(e), Me(e);
1192
+ }, [
1193
+ g?.enabled,
1194
+ G,
1195
+ K
1196
+ ]);
1197
+ let Re = y.useCallback((e) => {
1198
+ let t = e;
1199
+ return e && g?.enabled && (t = {
1200
+ ...e,
1201
+ from: e.from && J ? ge(e.from, J) : e.from,
1202
+ to: e.to && Y ? ge(e.to, Y) : e.to
1203
+ }), he(t, a, c, O);
1204
+ }, [
1205
+ a,
1206
+ c,
1207
+ O,
1208
+ g,
1209
+ J,
1210
+ Y
1211
+ ]), ze = y.useCallback((e) => {
1212
+ let t = le(e ?? void 0);
1213
+ t && Te(t);
1214
+ }, []), Be = y.useCallback((e) => {
1215
+ let t = le(e ?? void 0);
1216
+ t && Me(t);
1217
+ }, []), Ve = y.useCallback((e, t, n) => t ? !n?.from || n.to ? {
1218
+ from: t,
1219
+ to: void 0
1220
+ } : t < n.from ? {
1221
+ from: t,
1222
+ to: n.from
1223
+ } : {
1224
+ from: n.from,
1225
+ to: t
1226
+ } : e, []), He = y.useCallback((e, t) => {
1227
+ let n = Ve(e, t, q);
1228
+ if (we(n), f || g?.enabled) return;
1229
+ i?.(Re(n));
1230
+ let r = !!(n?.from && n?.to), a = ve(n, p, m).isValid;
1231
+ h && r && a && E(!1);
1232
+ }, [
1233
+ q,
1234
+ Ve,
1235
+ f,
1236
+ g,
1237
+ i,
1238
+ Re,
1239
+ p,
1240
+ m,
1241
+ h,
1242
+ E
1243
+ ]), X = y.useCallback((e) => {
1244
+ let t = e.getValue();
1245
+ He(t);
1246
+ }, [He]), Ue = y.useCallback(() => {
1247
+ i?.(Re(q)), E(!1);
1248
+ }, [
1249
+ q,
1250
+ i,
1251
+ Re,
1252
+ E
1253
+ ]), Z = y.useMemo(() => {
1254
+ if (g?.enabled && J) return fe(J, K, W, {
1255
+ am: D.am,
1256
+ pm: D.pm
1257
+ });
1258
+ }, [
1259
+ g?.enabled,
1260
+ J,
1261
+ K,
1262
+ W,
1263
+ D
1264
+ ]), Q = y.useMemo(() => {
1265
+ if (g?.enabled && Y) return fe(Y, K, W, {
1266
+ am: D.am,
1267
+ pm: D.pm
1268
+ });
1269
+ }, [
1270
+ g?.enabled,
1271
+ Y,
1272
+ K,
1273
+ W,
1274
+ D
1275
+ ]), $ = y.useMemo(() => {
1276
+ if (g?.enabled && q?.from) {
1277
+ let e = A(q.from, c, { locale: O }), t = _e && Z ? `${e} ${Z}` : e;
1278
+ if (q.to) {
1279
+ let e = A(q.to, c, { locale: O });
1280
+ return `${t} - ${_e && Q ? `${e} ${Q}` : e}`;
1281
+ }
1282
+ return t;
1283
+ }
1284
+ return Se(q, c, l, D.selectDateRange, O);
1285
+ }, [
1286
+ g?.enabled,
1287
+ q,
1288
+ c,
1289
+ _e,
1290
+ Z,
1291
+ Q,
1292
+ l,
1293
+ D,
1294
+ O
1295
+ ]), We = y.useMemo(() => {
1296
+ if (!q?.from || !q?.to) return;
1297
+ let e = A(q.from, c, { locale: O }), t = A(q.to, c, { locale: O });
1298
+ return `${be && Z ? `${e} ${Z}` : e} - ${be && Q ? `${t} ${Q}` : t}`;
1299
+ }, [
1300
+ q,
1301
+ c,
1302
+ O,
1303
+ be,
1304
+ Z,
1305
+ Q
1306
+ ]);
1307
+ return /* @__PURE__ */ x(Oe, {
1308
+ rootRef: ce,
1309
+ className: j.className,
1310
+ label: j.label,
1311
+ hint: j.hint,
1312
+ error: j.error,
1313
+ triggerId: R,
1314
+ describedById: z,
1315
+ children: /* @__PURE__ */ S(re, {
1316
+ open: T,
1317
+ onOpenChange: E,
1318
+ children: [/* @__PURE__ */ x(ne, { render: (e) => {
1319
+ let t = Ce(j.buttonTone, j.buttonStyle);
1320
+ return /* @__PURE__ */ S(s, {
1321
+ ...e,
1322
+ id: R,
1323
+ tone: t.tone,
1324
+ buttonStyle: t.buttonStyle,
1325
+ size: I,
1326
+ "aria-invalid": H,
1327
+ "aria-describedby": U,
1328
+ className: r(Ne(I), !q && "text-muted-foreground", e.className),
1329
+ disabled: j.disabled,
1330
+ children: [/* @__PURE__ */ x(oe, {
1331
+ className: r(te[I], "shrink-0"),
1332
+ "aria-hidden": "true"
1333
+ }), /* @__PURE__ */ x(o, {
1334
+ tag: "span",
1335
+ size: "inherit",
1336
+ lineHeight: "tight",
1337
+ className: "min-w-0 truncate text-inherit",
1338
+ children: $
1339
+ })]
1340
+ });
1341
+ } }), /* @__PURE__ */ S(ie, {
1342
+ inset: "flush",
1343
+ className: "w-auto gap-0",
1344
+ align: "start",
1345
+ children: [!!j.header && /* @__PURE__ */ x(Ae, { config: j.header }), /* @__PURE__ */ S("div", {
1346
+ className: "flex flex-col sm:flex-row",
1347
+ children: [F.length > 0 && /* @__PURE__ */ x("div", {
1348
+ className: "grid grid-cols-2 gap-space-2xs border-b border-border p-surface-xs sm:flex sm:min-w-30 sm:flex-col sm:border-r sm:border-b-0",
1349
+ children: F.map((e) => /* @__PURE__ */ x(s, {
1350
+ tone: "secondary",
1351
+ buttonStyle: "ghost",
1352
+ onClick: () => X(e),
1353
+ className: "justify-start text-muted-foreground hover:text-foreground",
1354
+ children: e.label
1355
+ }, e.label))
1356
+ }), /* @__PURE__ */ S("div", {
1357
+ className: "flex flex-col",
1358
+ children: [
1359
+ /* @__PURE__ */ x(De, {
1360
+ mode: "range",
1361
+ selected: q,
1362
+ onSelect: He,
1363
+ defaultMonth: q?.from,
1364
+ numberOfMonths: N,
1365
+ showOutsideDays: j.showOutsideDays,
1366
+ disabled: C ?? j.disabled,
1367
+ locale: O,
1368
+ captionLayout: k,
1369
+ startMonth: se.startMonth,
1370
+ endMonth: se.endMonth,
1371
+ ...w,
1372
+ className: r("[--cell-size:1.875rem] sm:[--cell-size:calc(var(--height-action)*8/9*var(--density-scale))]", w?.className)
1373
+ }),
1374
+ (() => {
1375
+ let e = !!q?.from && !j.footer, t = !!g?.enabled && !!q?.from, n = !!(f || g?.enabled) && !j.footer;
1376
+ return !e && !t && !Ie && !n ? null : /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x(ee, {}), /* @__PURE__ */ x("div", {
1377
+ className: "date-picker--range-footer p-surface",
1378
+ children: /* @__PURE__ */ S(d, {
1379
+ gap: "lg",
1380
+ children: [
1381
+ e && !!q?.from && /* @__PURE__ */ S(d, {
1382
+ direction: "horizontal",
1383
+ align: "center",
1384
+ justify: "between",
1385
+ gap: "xl",
1386
+ children: [/* @__PURE__ */ S(d, {
1387
+ direction: "horizontal",
1388
+ align: "center",
1389
+ gap: "md",
1390
+ children: [/* @__PURE__ */ S(o, {
1391
+ tag: "span",
1392
+ type: "secondary",
1393
+ children: [D.from, ":"]
1394
+ }), /* @__PURE__ */ S(o, {
1395
+ tag: "span",
1396
+ weight: "medium",
1397
+ children: [A(q.from, c, { locale: O }), be && Z ? ` ${Z}` : ""]
1398
+ })]
1399
+ }), !!q.to && /* @__PURE__ */ S(d, {
1400
+ direction: "horizontal",
1401
+ align: "center",
1402
+ gap: "md",
1403
+ children: [/* @__PURE__ */ S(o, {
1404
+ tag: "span",
1405
+ type: "secondary",
1406
+ children: [D.to, ":"]
1407
+ }), /* @__PURE__ */ S(o, {
1408
+ tag: "span",
1409
+ weight: "medium",
1410
+ children: [A(q.to, c, { locale: O }), be && Q ? ` ${Q}` : ""]
1411
+ })]
1412
+ })]
1413
+ }),
1414
+ t && !!q?.from && /* @__PURE__ */ S(u, {
1415
+ columns: {
1416
+ base: 1,
1417
+ sm: 2
1418
+ },
1419
+ gap: "lg",
1420
+ children: [/* @__PURE__ */ x(v, {
1421
+ label: D.startTime,
1422
+ children: /* @__PURE__ */ x(Qe, {
1423
+ value: J ? ue(J, K) : null,
1424
+ onValueChange: ze,
1425
+ format: W,
1426
+ precision: K ? "seconds" : "minutes",
1427
+ step: G,
1428
+ disabled: j.disabled,
1429
+ size: "sm",
1430
+ strings: {
1431
+ hours: D.hours,
1432
+ minutes: D.minutes,
1433
+ seconds: D.seconds,
1434
+ am: D.am,
1435
+ pm: D.pm
1436
+ }
1437
+ })
1438
+ }), !!q.to && /* @__PURE__ */ x(v, {
1439
+ label: D.endTime,
1440
+ children: /* @__PURE__ */ x(Qe, {
1441
+ value: Y ? ue(Y, K) : null,
1442
+ onValueChange: Be,
1443
+ format: W,
1444
+ precision: K ? "seconds" : "minutes",
1445
+ step: G,
1446
+ disabled: j.disabled,
1447
+ size: "sm",
1448
+ strings: {
1449
+ hours: D.hours,
1450
+ minutes: D.minutes,
1451
+ seconds: D.seconds,
1452
+ am: D.am,
1453
+ pm: D.pm
1454
+ }
1455
+ })
1456
+ })]
1457
+ }),
1458
+ /* @__PURE__ */ x(o, {
1459
+ type: "error",
1460
+ content: Le,
1461
+ hidden: !Ie
1462
+ }),
1463
+ n && /* @__PURE__ */ x(s, {
1464
+ tone: "primary",
1465
+ onClick: Ue,
1466
+ disabled: !q?.from || !q?.to || !!Fe,
1467
+ className: "w-full",
1468
+ children: D.confirm
1469
+ })
1470
+ ]
1471
+ })
1472
+ })] });
1473
+ })(),
1474
+ !!j.footer && /* @__PURE__ */ x(ke, {
1475
+ config: j.footer,
1476
+ output: Re(q),
1477
+ hasSelection: !!(q?.from && q?.to),
1478
+ autoSummary: We
1479
+ })
1480
+ ]
1481
+ })]
1482
+ })]
1483
+ })]
1484
+ })
1485
+ });
1486
+ }
1487
+ //#endregion
1488
+ //#region src/components/base/date-pickers/date-picker.tsx
1489
+ var nt = y.forwardRef(function(t, i) {
1490
+ let [a, o] = y.useState(!1), s = e(), c = t.locale ?? s.locale ?? I, l = n(Pe, t.strings), u = y.useMemo(() => t.enableYearDropdown || t.yearSelection?.enabled ? "dropdown" : "label", [t.enableYearDropdown, t.yearSelection]), d = y.useMemo(() => G(t.yearSelection), [t.yearSelection]), f = r("date-picker--component", t.className);
1491
+ return we(t) ? /* @__PURE__ */ x($e, {
1492
+ ...t,
1493
+ rootRef: i,
1494
+ className: f,
1495
+ open: a,
1496
+ setOpen: o,
1497
+ t: l,
1498
+ dateFnsLocale: c,
1499
+ captionLayout: u,
1500
+ yearBounds: d
1501
+ }) : J(t) ? /* @__PURE__ */ x(et, {
1502
+ ...t,
1503
+ rootRef: i,
1504
+ className: f,
1505
+ open: a,
1506
+ setOpen: o,
1507
+ t: l,
1508
+ dateFnsLocale: c,
1509
+ captionLayout: u,
1510
+ yearBounds: d
1511
+ }) : Te(t) ? /* @__PURE__ */ x(tt, {
1512
+ ...t,
1513
+ rootRef: i,
1514
+ className: f,
1515
+ open: a,
1516
+ setOpen: o,
1517
+ t: l,
1518
+ dateFnsLocale: c,
1519
+ captionLayout: u,
1520
+ yearBounds: d
1521
+ }) : null;
1522
+ });
1523
+ nt.displayName = "DatePicker";
1524
+ //#endregion
1525
+ export { Ne as a, ke as c, Pe as i, Oe as l, Qe as n, je as o, ze as r, Ae as s, nt as t, Ce as u };
1526
+
1527
+ //# sourceMappingURL=date-picker-DrDFj8Lo.js.map