themelia-react-ui 1.0.1 → 1.0.2
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.
- package/CHANGELOG.md +137 -0
- package/README.md +59 -13
- package/dist/{accordion-B-5Focs8.js → accordion-BRTcsp8J.js} +8 -8
- package/dist/accordion-BRTcsp8J.js.map +1 -0
- package/dist/{action-menu-Cx3SdfbN.js → action-menu-Drxw_vJk.js} +36 -36
- package/dist/action-menu-Drxw_vJk.js.map +1 -0
- package/dist/affordance-geometry.generated-CL84ZN9A.js +63 -0
- package/dist/affordance-geometry.generated-CL84ZN9A.js.map +1 -0
- package/dist/{ai-artifact-B5tPpXnS.js → ai-artifact-DLVdK0Py.js} +151 -155
- package/dist/ai-artifact-DLVdK0Py.js.map +1 -0
- package/dist/{app-shell-at8Kt4l_.js → app-shell-C_fKpljx.js} +11 -10
- package/dist/app-shell-C_fKpljx.js.map +1 -0
- package/dist/{attachment-BO2R47wn.js → attachment-DbjUWsP0.js} +12 -12
- package/dist/{attachment-BO2R47wn.js.map → attachment-DbjUWsP0.js.map} +1 -1
- package/dist/auth-CAQcasMV.js +723 -0
- package/dist/auth-CAQcasMV.js.map +1 -0
- package/dist/{avatar-Bpzty83c.js → avatar-Bu2HhitA.js} +6 -6
- package/dist/{avatar-Bpzty83c.js.map → avatar-Bu2HhitA.js.map} +1 -1
- package/dist/{badge-BZXZT9wd.js → badge-CzId1Wlm.js} +4 -4
- package/dist/{badge-BZXZT9wd.js.map → badge-CzId1Wlm.js.map} +1 -1
- package/dist/base/accordion.js +1 -1
- package/dist/base/action-menu.js +1 -1
- package/dist/base/attachment.js +1 -1
- package/dist/base/avatar.js +1 -1
- package/dist/base/badge.js +1 -1
- package/dist/base/buttons.js +3 -2
- package/dist/base/cards.js +3 -3
- package/dist/base/carousel.js +25 -27
- package/dist/base/carousel.js.map +1 -1
- package/dist/base/cascader.js +150 -148
- package/dist/base/cascader.js.map +1 -1
- package/dist/base/chart.js +1 -1
- package/dist/base/choice-inputs.js +2 -2
- package/dist/base/code-block.js +1 -1
- package/dist/base/combobox.js +1 -1
- package/dist/base/command.js +1 -1
- package/dist/base/copyable.js +1 -1
- package/dist/base/date-pickers.js +3 -3
- package/dist/base/display.js +7 -7
- package/dist/base/feedback.js +4 -4
- package/dist/base/forms-numeric.js +1 -1
- package/dist/base/forms.js +2 -2
- package/dist/base/inline-edit.js +40 -43
- package/dist/base/inline-edit.js.map +1 -1
- package/dist/base/item.js +1 -1
- package/dist/base/media-gallery.js +1 -1
- package/dist/base/navigation.js +6 -6
- package/dist/base/popover-menu.js +1 -1
- package/dist/base/popover.js +1 -1
- package/dist/base/qr-code.js +1 -1
- package/dist/base/repeaters.js +33 -33
- package/dist/base/repeaters.js.map +1 -1
- package/dist/base/sheet.js +1 -1
- package/dist/base/sidebar.js +1 -1
- package/dist/base/signature-pad.js +83 -81
- package/dist/base/signature-pad.js.map +1 -1
- package/dist/base/skeleton.js +1 -1
- package/dist/base/spinner.js +1 -1
- package/dist/base/structure.js +1 -1
- package/dist/base/table.js +1 -1
- package/dist/base/text-inputs.js +2 -2
- package/dist/base/toaster.js +6 -6
- package/dist/base/toaster.js.map +1 -1
- package/dist/base/tree.js +1 -1
- package/dist/base/upload-queue.js +1 -1
- package/dist/base/upload.js +3 -3
- package/dist/base/value-inputs.js +1 -1
- package/dist/blocks/admin.js +134 -134
- package/dist/blocks/admin.js.map +1 -1
- package/dist/blocks/ai.js +120 -117
- package/dist/blocks/ai.js.map +1 -1
- package/dist/blocks/analytics/usage-card.js +1 -1
- package/dist/blocks/analytics.js +510 -472
- package/dist/blocks/analytics.js.map +1 -1
- package/dist/blocks/collaboration.js +2 -2
- package/dist/blocks/commerce/receipt.js +1 -1
- package/dist/blocks/commerce.js +395 -383
- package/dist/blocks/commerce.js.map +1 -1
- package/dist/blocks/data-display.js +1 -1
- package/dist/blocks/onboarding.js +6 -6
- package/dist/blocks/onboarding.js.map +1 -1
- package/dist/blocks/planning.js +36 -36
- package/dist/blocks/planning.js.map +1 -1
- package/dist/blocks/timelines.js +1 -1
- package/dist/{breadcrumbs-DdQ_I5ra.js → breadcrumbs-BuYz5SDU.js} +9 -8
- package/dist/breadcrumbs-BuYz5SDU.js.map +1 -0
- package/dist/button-BZDasD04.js +651 -0
- package/dist/button-BZDasD04.js.map +1 -0
- package/dist/{button-BS6l5JUw.js → button-BZyfTvwm.js} +3 -3
- package/dist/button-BZyfTvwm.js.map +1 -0
- package/dist/buttons-D_6KJvEE.js +99 -0
- package/dist/buttons-D_6KJvEE.js.map +1 -0
- package/dist/{cards-Cum56XOF.js → cards-qGSErLw_.js} +12 -12
- package/dist/{cards-Cum56XOF.js.map → cards-qGSErLw_.js.map} +1 -1
- package/dist/chart-Bsc5BICK.js +150 -0
- package/dist/chart-Bsc5BICK.js.map +1 -0
- package/dist/{checkbox-BavDRjF7.js → checkbox-BQNDjUCh.js} +3 -3
- package/dist/checkbox-BQNDjUCh.js.map +1 -0
- package/dist/choice-inputs-Mk3iWbhr.js +725 -0
- package/dist/choice-inputs-Mk3iWbhr.js.map +1 -0
- package/dist/{code-block-xHKbAJDj.js → code-block-DzHKRybS.js} +23 -23
- package/dist/code-block-DzHKRybS.js.map +1 -0
- package/dist/{collapsible-DsnktFNv.js → collapsible-ClvC7Bj3.js} +3 -3
- package/dist/{collapsible-DsnktFNv.js.map → collapsible-ClvC7Bj3.js.map} +1 -1
- package/dist/{collection-content-C4fthJV_.js → collection-content-D6S8cv_n.js} +3 -3
- package/dist/{collection-content-C4fthJV_.js.map → collection-content-D6S8cv_n.js.map} +1 -1
- package/dist/{combobox-DEbdr-3u.js → combobox-BFnbJJp3.js} +18 -18
- package/dist/combobox-BFnbJJp3.js.map +1 -0
- package/dist/{combobox-xv3yJbzl.js → combobox-hozNwUcc.js} +313 -316
- package/dist/combobox-hozNwUcc.js.map +1 -0
- package/dist/{command-C0xe7u9B.js → command-BnmSchli.js} +9 -9
- package/dist/command-BnmSchli.js.map +1 -0
- package/dist/comments-u5L0OGip.js +1156 -0
- package/dist/comments-u5L0OGip.js.map +1 -0
- package/dist/components/base/buttons/button-group.recipes.d.ts +1 -1
- package/dist/components/base/buttons/button.recipes.d.ts +10 -19
- package/dist/components/base/buttons/use-pending-button-focus.d.ts +3 -0
- package/dist/components/base/cards/card.recipes.d.ts +13 -5
- package/dist/components/base/cards/partials/card-primitives.d.ts +9 -4
- package/dist/components/base/cards/smart-card.types.d.ts +1 -1
- package/dist/components/base/date-pickers/date-picker.recipes.d.ts +5 -18
- package/dist/components/base/date-pickers/datepicker.types.d.ts +3 -0
- package/dist/components/base/forms/form-field.d.ts +1 -0
- package/dist/components/base/forms/form-sizing.d.ts +3 -3
- package/dist/components/base/navigation/tabs.d.ts +3 -5
- package/dist/components/base/popover/popover.recipes.d.ts +3 -3
- package/dist/components/base/table/index.d.ts +1 -1
- package/dist/components/base/text-inputs/clear-native-field.d.ts +2 -0
- package/dist/components/base/text-inputs/input-trailing-action.d.ts +3 -0
- package/dist/components/blocks/analytics/types.d.ts +1 -1
- package/dist/components/blocks/collaboration/message/message.recipes.d.ts +12 -0
- package/dist/components/blocks/data-display/empty-state/partials/illustrations/document-stack.d.ts +1 -4
- package/dist/components/blocks/data-display/empty-state/partials/illustrations/inbox-clean.d.ts +1 -4
- package/dist/components/blocks/data-display/empty-state/partials/illustrations/index.d.ts +3 -3
- package/dist/components/blocks/data-display/empty-state/partials/illustrations/stacked-cards.d.ts +1 -6
- package/dist/components/features/combobox/components/error-message.d.ts +1 -1
- package/dist/components/features/comments/hooks/use-attachment-upload.d.ts +5 -0
- package/dist/components/features/filters/facets/search-facet.d.ts +0 -12
- package/dist/components/features/filters/facets/tags-facet.d.ts +1 -1
- package/dist/components/features/media-library/media-library.d.ts +1 -1
- package/dist/components/features/media-library/media-library.types.d.ts +9 -1
- package/dist/components/features/media-library/partials/media-library-partials.d.ts +1 -1
- package/dist/components/features/overlays/hooks/use-pending-overlay-focus.d.ts +2 -0
- package/dist/components/features/overlays/overlays.types.d.ts +5 -4
- package/dist/components/features/rich-text-editor/rich-text-editor.recipes.d.ts +2 -1
- package/dist/components/features/table/data-table.d.ts +1 -1
- package/dist/components/features/table/table.types.d.ts +1 -1
- package/dist/components/features/theme-tweaker/theme-provider-settings.d.ts +3 -1
- package/dist/components/layout/auth/auth.types.d.ts +1 -0
- package/dist/components/layout/page/page.d.ts +0 -1
- package/dist/components/layout/page/page.types.d.ts +9 -3
- package/dist/components/layout/sidebar/sidebar.context.d.ts +1 -1
- package/dist/components/layout/sidebar/sidebar.types.d.ts +4 -0
- package/dist/components/layout/workspace/workspace.types.d.ts +3 -0
- package/dist/components/typography/heading.d.ts +5 -2
- package/dist/components/typography/index.d.ts +1 -1
- package/dist/components/typography/text.styles.d.ts +10 -0
- package/dist/components/ui/popover.d.ts +1 -1
- package/dist/components/ui/sidebar.d.ts +1 -1
- package/dist/components/ui/table.d.ts +2 -1
- package/dist/container.recipes-D9t8MHR3.js +27 -0
- package/dist/container.recipes-D9t8MHR3.js.map +1 -0
- package/dist/{containers-6s-ucRQQ.js → containers-DqB-bSYE.js} +33 -56
- package/dist/containers-DqB-bSYE.js.map +1 -0
- package/dist/control-group-recipes-DBXmfh2E.js +21 -0
- package/dist/control-group-recipes-DBXmfh2E.js.map +1 -0
- package/dist/{copyable-B7SBXJMr.js → copyable-BTSByfmq.js} +6 -6
- package/dist/{copyable-B7SBXJMr.js.map → copyable-BTSByfmq.js.map} +1 -1
- package/dist/{data-display-cWIRdeaf.js → data-display-Bihs9Ven.js} +545 -332
- package/dist/data-display-Bihs9Ven.js.map +1 -0
- package/dist/{date-BFNMnrS5.js → date-DOKhJPu7.js} +4 -4
- package/dist/{date-BFNMnrS5.js.map → date-DOKhJPu7.js.map} +1 -1
- package/dist/{date-picker-CA6ogMQB.js → date-picker-DzP5HQq7.js} +492 -472
- package/dist/date-picker-DzP5HQq7.js.map +1 -0
- package/dist/date-pickers-BpgGz7S-.js +196 -0
- package/dist/date-pickers-BpgGz7S-.js.map +1 -0
- package/dist/{display-CFM5myut.js → display-CS6Hbk18.js} +8 -8
- package/dist/{display-CFM5myut.js.map → display-CS6Hbk18.js.map} +1 -1
- package/dist/{dropdown-menu-BlnyHr-9.js → dropdown-menu-D-boNgGO.js} +7 -7
- package/dist/{dropdown-menu-BlnyHr-9.js.map → dropdown-menu-D-boNgGO.js.map} +1 -1
- package/dist/features/activities.js +152 -141
- package/dist/features/activities.js.map +1 -1
- package/dist/features/ai-chat.js +182 -179
- package/dist/features/ai-chat.js.map +1 -1
- package/dist/features/async-preview.js +9 -9
- package/dist/features/async-preview.js.map +1 -1
- package/dist/features/combobox.js +1 -1
- package/dist/features/comments.js +1 -1
- package/dist/features/data-view.js +25 -23
- package/dist/features/data-view.js.map +1 -1
- package/dist/features/email-composer/engine.js +1 -1
- package/dist/features/email-composer.js +103 -104
- package/dist/features/email-composer.js.map +1 -1
- package/dist/features/event-calendar.js +375 -373
- package/dist/features/event-calendar.js.map +1 -1
- package/dist/features/filters.js +1 -1
- package/dist/features/global-search.js +222 -224
- package/dist/features/global-search.js.map +1 -1
- package/dist/features/kanban.js +29 -29
- package/dist/features/kanban.js.map +1 -1
- package/dist/features/map.js +59 -58
- package/dist/features/map.js.map +1 -1
- package/dist/features/media-library.js +856 -855
- package/dist/features/media-library.js.map +1 -1
- package/dist/features/mentions.js +1 -1
- package/dist/features/overlays.js +1 -1
- package/dist/features/products.js +1209 -1209
- package/dist/features/products.js.map +1 -1
- package/dist/features/questionnaire.js +52 -52
- package/dist/features/questionnaire.js.map +1 -1
- package/dist/features/resource-assignment.js +29 -31
- package/dist/features/resource-assignment.js.map +1 -1
- package/dist/features/resource.js +13 -13
- package/dist/features/resource.js.map +1 -1
- package/dist/features/rich-text-editor.js +2 -2
- package/dist/features/schema-form.js +82 -82
- package/dist/features/schema-form.js.map +1 -1
- package/dist/features/suggestions.js +3 -3
- package/dist/features/sync.js +4 -4
- package/dist/features/sync.js.map +1 -1
- package/dist/features/table.js +1 -1
- package/dist/features/theme-tweaker.js +456 -450
- package/dist/features/theme-tweaker.js.map +1 -1
- package/dist/{feedback-DWUkgEjR.js → feedback-CJkUAapr.js} +29 -29
- package/dist/feedback-CJkUAapr.js.map +1 -0
- package/dist/field-affordance-recipes-uKY4MsZ_.js +25 -0
- package/dist/field-affordance-recipes-uKY4MsZ_.js.map +1 -0
- package/dist/{field-state-recipes-CBTRt9Bt.js → field-state-recipes-DQQpiLWC.js} +3 -3
- package/dist/field-state-recipes-DQQpiLWC.js.map +1 -0
- package/dist/{filters-BhsUtsxW.js → filters-D6FF8L6s.js} +715 -720
- package/dist/filters-D6FF8L6s.js.map +1 -0
- package/dist/{form-field-Bn7ZH1rA.js → form-field-CZwrkP7m.js} +17 -9
- package/dist/form-field-CZwrkP7m.js.map +1 -0
- package/dist/{form-sizing-BWs70_a2.js → form-sizing-QP8aIRaW.js} +8 -5
- package/dist/form-sizing-QP8aIRaW.js.map +1 -0
- package/dist/{forms-B7pzS25o.js → forms-B5NCbkSC.js} +35 -35
- package/dist/{forms-B7pzS25o.js.map → forms-B5NCbkSC.js.map} +1 -1
- package/dist/forms-numeric-Crrm80Lm.js +867 -0
- package/dist/forms-numeric-Crrm80Lm.js.map +1 -0
- package/dist/{header-C59QZyxV.js → header-kxruN3RM.js} +53 -49
- package/dist/header-kxruN3RM.js.map +1 -0
- package/dist/{hooks-CM1Vp9Pe.js → hooks-BrlnCwQd.js} +2 -2
- package/dist/{hooks-CM1Vp9Pe.js.map → hooks-BrlnCwQd.js.map} +1 -1
- package/dist/{http-CLTVJc5I.js → http-CdEIHyQf.js} +2 -2
- package/dist/http-CdEIHyQf.js.map +1 -0
- package/dist/{icon-badge-Dv0RYQwj.js → icon-badge-Btc6pQrp.js} +4 -4
- package/dist/{icon-badge-Dv0RYQwj.js.map → icon-badge-Btc6pQrp.js.map} +1 -1
- package/dist/index.js +2 -2
- package/dist/input-SX9V0AL3.js +255 -0
- package/dist/input-SX9V0AL3.js.map +1 -0
- package/dist/input-vxcaNCYC.js +20 -0
- package/dist/input-vxcaNCYC.js.map +1 -0
- package/dist/{item-pJ0GsOiJ.js → item-DE4YnuJx.js} +18 -17
- package/dist/item-DE4YnuJx.js.map +1 -0
- package/dist/layout/app-shell.js +1 -1
- package/dist/layout/auth.js +1 -1
- package/dist/layout/containers.js +1 -1
- package/dist/layout/header.js +1 -1
- package/dist/layout/hooks.js +1 -1
- package/dist/layout/navigation.js +1 -1
- package/dist/layout/page.js +1 -1
- package/dist/layout/settings.js +1 -1
- package/dist/layout/sidebar.js +2 -2
- package/dist/layout/workspace.js +1 -1
- package/dist/layout.js +10 -10
- package/dist/lib/affordance-geometry.generated.d.ts +40 -9
- package/dist/lib/control-group-recipes.d.ts +22 -0
- package/dist/lib/field-affordance-recipes.d.ts +35 -2
- package/dist/lib/field-state-recipes.d.ts +2 -2
- package/dist/lib/navigation-row-recipes.d.ts +3 -2
- package/dist/lib/overlay-anatomy-recipes.d.ts +1 -1
- package/dist/lib/surface-recipes.d.ts +5 -2
- package/dist/lib/token-merge.generated.d.ts +144 -2
- package/dist/lib/ui-provider/types.d.ts +4 -2
- package/dist/lib/use-prefers-reduced-motion.d.ts +2 -0
- package/dist/lib/utils.js +1 -1
- package/dist/{media-gallery-DhDRgnVZ.js → media-gallery-DLp3HAz0.js} +75 -74
- package/dist/media-gallery-DLp3HAz0.js.map +1 -0
- package/dist/{mentions-B8Ko-fhS.js → mentions-Cl0Kt_Pd.js} +52 -50
- package/dist/{mentions-B8Ko-fhS.js.map → mentions-Cl0Kt_Pd.js.map} +1 -1
- package/dist/message-SZUNB1eX.js +127 -0
- package/dist/message-SZUNB1eX.js.map +1 -0
- package/dist/{navigation-DBEu4POU.js → navigation-DnQSNMT0.js} +64 -55
- package/dist/navigation-DnQSNMT0.js.map +1 -0
- package/dist/{navigation-BUIn2Qxx.js → navigation-DyytsLRB.js} +37 -37
- package/dist/navigation-DyytsLRB.js.map +1 -0
- package/dist/{navigation-row-recipes-GVh11KiT.js → navigation-row-recipes-DQEXQcqY.js} +3 -3
- package/dist/navigation-row-recipes-DQEXQcqY.js.map +1 -0
- package/dist/{number-BNT_BIzJ.js → number-DasMFWEG.js} +4 -4
- package/dist/{number-BNT_BIzJ.js.map → number-DasMFWEG.js.map} +1 -1
- package/dist/overlays-DUbs1KEi.js +1011 -0
- package/dist/overlays-DUbs1KEi.js.map +1 -0
- package/dist/{page-BV6ioQg3.js → page-hGmT4nWK.js} +75 -64
- package/dist/page-hGmT4nWK.js.map +1 -0
- package/dist/{page-header-DQRa0jug.js → page-header-D8nERkn5.js} +9 -9
- package/dist/page-header-D8nERkn5.js.map +1 -0
- package/dist/{pagination-C29vvt3I.js → pagination-NLGqRirf.js} +20 -20
- package/dist/pagination-NLGqRirf.js.map +1 -0
- package/dist/{popover-CoLDEg19.js → popover-CghIYdQf.js} +23 -22
- package/dist/popover-CghIYdQf.js.map +1 -0
- package/dist/{popover-menu-GLIQTJTx.js → popover-menu-B4PoWhRl.js} +6 -6
- package/dist/{popover-menu-GLIQTJTx.js.map → popover-menu-B4PoWhRl.js.map} +1 -1
- package/dist/{popover.recipes-zgBhMlUu.js → popover.recipes-QlD4JenO.js} +5 -5
- package/dist/popover.recipes-QlD4JenO.js.map +1 -0
- package/dist/{primitives-DKPOGVpj.js → primitives-C7ff0QaI.js} +120 -113
- package/dist/primitives-C7ff0QaI.js.map +1 -0
- package/dist/primitives.js +3 -3
- package/dist/{progress-BOe8l_FZ.js → progress-BroqrAyV.js} +10 -9
- package/dist/progress-BroqrAyV.js.map +1 -0
- package/dist/{receipt-BM8xsGFy.js → receipt-BuJynLgf.js} +8 -8
- package/dist/{receipt-BM8xsGFy.js.map → receipt-BuJynLgf.js.map} +1 -1
- package/dist/{rich-text-B7sBAdDG.js → rich-text-DlxDOtf4.js} +4 -4
- package/dist/{rich-text-B7sBAdDG.js.map → rich-text-DlxDOtf4.js.map} +1 -1
- package/dist/rich-text-editor-BKyG7rWz.js +574 -0
- package/dist/rich-text-editor-BKyG7rWz.js.map +1 -0
- package/dist/{rich-text-editor.recipes-DxvOE0Lp.js → rich-text-editor.recipes-B72Nfuze.js} +35 -26
- package/dist/rich-text-editor.recipes-B72Nfuze.js.map +1 -0
- package/dist/{scroll-area-BheMQ270.js → scroll-area-D-pIhEKl.js} +3 -3
- package/dist/scroll-area-D-pIhEKl.js.map +1 -0
- package/dist/{separator-Gk_WXH-l.js → separator-BNIgG3au.js} +3 -3
- package/dist/{separator-Gk_WXH-l.js.map → separator-BNIgG3au.js.map} +1 -1
- package/dist/{separator-DO0EbCEm.js → separator-BhtFyo4x.js} +2 -2
- package/dist/{separator-DO0EbCEm.js.map → separator-BhtFyo4x.js.map} +1 -1
- package/dist/services/actions.js +1 -1
- package/dist/{settings-BnCyyPOJ.js → settings-DOTOzeZ2.js} +10 -9
- package/dist/{settings-BnCyyPOJ.js.map → settings-DOTOzeZ2.js.map} +1 -1
- package/dist/{sheet-B-q914Ad.js → sheet-BFhrNehm.js} +11 -11
- package/dist/sheet-BFhrNehm.js.map +1 -0
- package/dist/{sidebar-DPR7fmqN.js → sidebar-CyR4XKwR.js} +219 -200
- package/dist/sidebar-CyR4XKwR.js.map +1 -0
- package/dist/{sidebar-C_2p3Tfj.js → sidebar-SvGJ0Zwi.js} +63 -58
- package/dist/sidebar-SvGJ0Zwi.js.map +1 -0
- package/dist/{skeleton-CmT1ppqb.js → skeleton-3F0uhYn3.js} +4 -4
- package/dist/{skeleton-CmT1ppqb.js.map → skeleton-3F0uhYn3.js.map} +1 -1
- package/dist/{smart-card-CYLn46e6.js → smart-card-DjGVV2xr.js} +171 -165
- package/dist/smart-card-DjGVV2xr.js.map +1 -0
- package/dist/{spinner-BY9HbUEh.js → spinner-Cpf7oRkF.js} +5 -5
- package/dist/{spinner-BY9HbUEh.js.map → spinner-Cpf7oRkF.js.map} +1 -1
- package/dist/{structure-MvKVq-oL.js → structure-CRdqVawd.js} +2 -2
- package/dist/{structure-MvKVq-oL.js.map → structure-CRdqVawd.js.map} +1 -1
- package/dist/style.css +1 -1
- package/dist/{surface-recipes-CQfRr-VL.js → surface-recipes-Dd__PD-w.js} +4 -3
- package/dist/surface-recipes-Dd__PD-w.js.map +1 -0
- package/dist/{table-DnlAJ-xR.js → table-CLtJTxoR.js} +17 -16
- package/dist/table-CLtJTxoR.js.map +1 -0
- package/dist/table-CcRDZiLP.js +1444 -0
- package/dist/table-CcRDZiLP.js.map +1 -0
- package/dist/tabs-BNgu7g0u.js +188 -0
- package/dist/tabs-BNgu7g0u.js.map +1 -0
- package/dist/text-inputs-DsR56TR-.js +330 -0
- package/dist/text-inputs-DsR56TR-.js.map +1 -0
- package/dist/{text.styles-BwB7vAF2.js → text.styles-Q4sGAIgA.js} +18 -10
- package/dist/text.styles-Q4sGAIgA.js.map +1 -0
- package/dist/theme.css +77 -115
- package/dist/{timelines-B9ICkQcV.js → timelines-D1pkt3se.js} +84 -78
- package/dist/timelines-D1pkt3se.js.map +1 -0
- package/dist/{tree-BdWSaoFT.js → tree-BtmYyMZV.js} +8 -8
- package/dist/{tree-BdWSaoFT.js.map → tree-BtmYyMZV.js.map} +1 -1
- package/dist/typography/rich-text.js +1 -1
- package/dist/typography-BxQgiZyw.js +96 -0
- package/dist/typography-BxQgiZyw.js.map +1 -0
- package/dist/typography.js +1 -1
- package/dist/{ui-provider-CftIB6TY.js → ui-provider-DRPn3qNl.js} +3 -2
- package/dist/ui-provider-DRPn3qNl.js.map +1 -0
- package/dist/ui-provider.js +1 -1
- package/dist/{upload-D8Za5x_c.js → upload-CDbYw1WN.js} +326 -323
- package/dist/upload-CDbYw1WN.js.map +1 -0
- package/dist/{upload-queue-hIIYBLS7.js → upload-queue-CNd_hH_a.js} +25 -25
- package/dist/upload-queue-CNd_hH_a.js.map +1 -0
- package/dist/{usage-card-DnmnJ58D.js → usage-card-VyJLUwRr.js} +53 -54
- package/dist/usage-card-VyJLUwRr.js.map +1 -0
- package/dist/utils-BvH9PSmq.js +4275 -0
- package/dist/utils-BvH9PSmq.js.map +1 -0
- package/dist/value-inputs-D0KCrfVC.js +840 -0
- package/dist/value-inputs-D0KCrfVC.js.map +1 -0
- package/dist/{workspace-C1PZmk8L.js → workspace-CcR8r-Nt.js} +115 -122
- package/dist/workspace-CcR8r-Nt.js.map +1 -0
- package/docs/consumer-skill/SKILL.md +110 -119
- package/docs/consumer-skill/examples/analytics.tsx +34 -0
- package/docs/consumer-skill/examples/app-layout.tsx +42 -12
- package/docs/consumer-skill/examples/detail.tsx +20 -4
- package/docs/consumer-skill/examples/manifest.json +13 -1
- package/docs/consumer-skill/examples/website.tsx +56 -0
- package/docs/consumer-skill/references/analytics.md +70 -0
- package/docs/consumer-skill/references/composition.md +116 -2
- package/docs/consumer-skill/references/design-contract.md +33 -7
- package/docs/consumer-skill/references/discovery.md +76 -5
- package/docs/consumer-skill/references/integration.md +14 -0
- package/docs/consumer-skill/references/public-api.json +2023 -218
- package/docs/consumer-skill/references/review.md +55 -3
- package/docs/consumer-skill/references/theming.md +52 -7
- package/docs/consumer-skill/references/tokens.json +177 -9
- package/docs/consumer-skill/references/workflows.md +32 -0
- package/docs/consumer-skill/scripts/check-composition.mjs +1 -1
- package/docs/consumer-skill/scripts/composition-policy.mjs +179 -17
- package/docs/consumer-skill/scripts/discovery.mjs +61 -9
- package/docs/consumer-skill/scripts/surface-policy.mjs +44 -0
- package/package.json +7 -4
- package/dist/accordion-B-5Focs8.js.map +0 -1
- package/dist/action-menu-Cx3SdfbN.js.map +0 -1
- package/dist/affordance-geometry.generated-D8Jcfb0G.js +0 -32
- package/dist/affordance-geometry.generated-D8Jcfb0G.js.map +0 -1
- package/dist/ai-artifact-B5tPpXnS.js.map +0 -1
- package/dist/app-shell-at8Kt4l_.js.map +0 -1
- package/dist/auth-OFwWSAap.js +0 -704
- package/dist/auth-OFwWSAap.js.map +0 -1
- package/dist/breadcrumbs-DdQ_I5ra.js.map +0 -1
- package/dist/button-BS6l5JUw.js.map +0 -1
- package/dist/buttons-Co6GavvM.js +0 -674
- package/dist/buttons-Co6GavvM.js.map +0 -1
- package/dist/chart-DVfcwQu6.js +0 -149
- package/dist/chart-DVfcwQu6.js.map +0 -1
- package/dist/checkbox-BavDRjF7.js.map +0 -1
- package/dist/choice-inputs-CC7XqPQO.js +0 -619
- package/dist/choice-inputs-CC7XqPQO.js.map +0 -1
- package/dist/code-block-xHKbAJDj.js.map +0 -1
- package/dist/combobox-DEbdr-3u.js.map +0 -1
- package/dist/combobox-xv3yJbzl.js.map +0 -1
- package/dist/command-C0xe7u9B.js.map +0 -1
- package/dist/comments-DviPLnwy.js +0 -1132
- package/dist/comments-DviPLnwy.js.map +0 -1
- package/dist/containers-6s-ucRQQ.js.map +0 -1
- package/dist/data-display-cWIRdeaf.js.map +0 -1
- package/dist/date-picker-CA6ogMQB.js.map +0 -1
- package/dist/date-pickers-BPIKLdsD.js +0 -224
- package/dist/date-pickers-BPIKLdsD.js.map +0 -1
- package/dist/feedback-DWUkgEjR.js.map +0 -1
- package/dist/field-affordance-recipes-IjzPrCTw.js +0 -17
- package/dist/field-affordance-recipes-IjzPrCTw.js.map +0 -1
- package/dist/field-state-recipes-CBTRt9Bt.js.map +0 -1
- package/dist/filters-BhsUtsxW.js.map +0 -1
- package/dist/form-field-Bn7ZH1rA.js.map +0 -1
- package/dist/form-sizing-BWs70_a2.js.map +0 -1
- package/dist/forms-numeric-BUBxELBv.js +0 -867
- package/dist/forms-numeric-BUBxELBv.js.map +0 -1
- package/dist/header-C59QZyxV.js.map +0 -1
- package/dist/http-CLTVJc5I.js.map +0 -1
- package/dist/input-WwYQZJzG.js +0 -202
- package/dist/input-WwYQZJzG.js.map +0 -1
- package/dist/input-ci9fIgFH.js +0 -20
- package/dist/input-ci9fIgFH.js.map +0 -1
- package/dist/item-pJ0GsOiJ.js.map +0 -1
- package/dist/media-gallery-DhDRgnVZ.js.map +0 -1
- package/dist/message-COsdEvXT.js +0 -108
- package/dist/message-COsdEvXT.js.map +0 -1
- package/dist/navigation-BUIn2Qxx.js.map +0 -1
- package/dist/navigation-DBEu4POU.js.map +0 -1
- package/dist/navigation-row-recipes-GVh11KiT.js.map +0 -1
- package/dist/overlays-B11wZka6.js +0 -982
- package/dist/overlays-B11wZka6.js.map +0 -1
- package/dist/page-BV6ioQg3.js.map +0 -1
- package/dist/page-header-DQRa0jug.js.map +0 -1
- package/dist/pagination-C29vvt3I.js.map +0 -1
- package/dist/popover-CoLDEg19.js.map +0 -1
- package/dist/popover.recipes-zgBhMlUu.js.map +0 -1
- package/dist/primitives-DKPOGVpj.js.map +0 -1
- package/dist/progress-BOe8l_FZ.js.map +0 -1
- package/dist/rich-text-editor-CoVrTiSv.js +0 -575
- package/dist/rich-text-editor-CoVrTiSv.js.map +0 -1
- package/dist/rich-text-editor.recipes-DxvOE0Lp.js.map +0 -1
- package/dist/scroll-area-BheMQ270.js.map +0 -1
- package/dist/select-B2mb-qN2.js +0 -108
- package/dist/select-B2mb-qN2.js.map +0 -1
- package/dist/sheet-B-q914Ad.js.map +0 -1
- package/dist/sidebar-C_2p3Tfj.js.map +0 -1
- package/dist/sidebar-DPR7fmqN.js.map +0 -1
- package/dist/smart-card-CYLn46e6.js.map +0 -1
- package/dist/surface-recipes-CQfRr-VL.js.map +0 -1
- package/dist/table-BS39xnlq.js +0 -1424
- package/dist/table-BS39xnlq.js.map +0 -1
- package/dist/table-DnlAJ-xR.js.map +0 -1
- package/dist/tabs-B5cNMWiP.js +0 -187
- package/dist/tabs-B5cNMWiP.js.map +0 -1
- package/dist/text-inputs-Dh9XGyiS.js +0 -331
- package/dist/text-inputs-Dh9XGyiS.js.map +0 -1
- package/dist/text.styles-BwB7vAF2.js.map +0 -1
- package/dist/timelines-B9ICkQcV.js.map +0 -1
- package/dist/typography-Cv8MT-82.js +0 -96
- package/dist/typography-Cv8MT-82.js.map +0 -1
- package/dist/ui-provider-CftIB6TY.js.map +0 -1
- package/dist/upload-D8Za5x_c.js.map +0 -1
- package/dist/upload-queue-hIIYBLS7.js.map +0 -1
- package/dist/usage-card-DnmnJ58D.js.map +0 -1
- package/dist/utils-C2EKeIw3.js +0 -72
- package/dist/utils-C2EKeIw3.js.map +0 -1
- package/dist/value-inputs-DX2dbxjj.js +0 -824
- package/dist/value-inputs-DX2dbxjj.js.map +0 -1
- package/dist/workspace-C1PZmk8L.js.map +0 -1
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { o as e, s as t } from "./ui-provider-
|
|
2
|
+
import { o as e, s as t } from "./ui-provider-DRPn3qNl.js";
|
|
3
3
|
import { useStrings as n } from "./lib/strings.js";
|
|
4
|
-
import { t as r } from "./utils-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { n as c, t as l } from "./button-
|
|
8
|
-
import { r as u, t as d } from "./structure-
|
|
9
|
-
import { o as f } from "./date-
|
|
10
|
-
import { t as ee } from "./separator-
|
|
11
|
-
import { d as p,
|
|
12
|
-
import { t as
|
|
13
|
-
import { c as
|
|
4
|
+
import { t as r } from "./utils-BvH9PSmq.js";
|
|
5
|
+
import { a as i, i as a, n as o } from "./typography-BxQgiZyw.js";
|
|
6
|
+
import { t as s } from "./button-BZDasD04.js";
|
|
7
|
+
import { n as c, t as l } from "./button-BZyfTvwm.js";
|
|
8
|
+
import { r as u, t as d } from "./structure-CRdqVawd.js";
|
|
9
|
+
import { o as f } from "./date-DOKhJPu7.js";
|
|
10
|
+
import { t as ee } from "./separator-BNIgG3au.js";
|
|
11
|
+
import { d as p, o as m, p as h, u as te } from "./form-sizing-QP8aIRaW.js";
|
|
12
|
+
import { t as ne } from "./input-SX9V0AL3.js";
|
|
13
|
+
import { c as re, o as ie, t as ae } from "./popover-CghIYdQf.js";
|
|
14
14
|
import { t as g } from "./use-mobile-vaLKwgyf.js";
|
|
15
15
|
import * as _ from "react";
|
|
16
|
-
import { Fragment as
|
|
17
|
-
import { Calendar as
|
|
16
|
+
import { Fragment as oe, jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
17
|
+
import { Calendar as se, ChevronDownIcon as b, ChevronLeftIcon as x, ChevronRightIcon as S, Clock as ce } from "lucide-react";
|
|
18
18
|
import { cva as C } from "class-variance-authority";
|
|
19
|
-
import { addDays as w, endOfMonth as T, endOfWeek as E, format as D, startOfMonth as O, startOfWeek as
|
|
20
|
-
import { DayPicker as
|
|
21
|
-
import { Toggle as
|
|
22
|
-
import { ToggleGroup as
|
|
23
|
-
import { enUS as
|
|
24
|
-
function
|
|
19
|
+
import { addDays as w, endOfMonth as T, endOfWeek as E, format as D, startOfMonth as O, startOfWeek as k } from "date-fns";
|
|
20
|
+
import { DayPicker as A, getDefaultClassNames as j } from "react-day-picker";
|
|
21
|
+
import { Toggle as M } from "@base-ui/react/toggle";
|
|
22
|
+
import { ToggleGroup as le } from "@base-ui/react/toggle-group";
|
|
23
|
+
import { enUS as N } from "date-fns/locale";
|
|
24
|
+
function P(e) {
|
|
25
25
|
return e.toString().padStart(2, "0");
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function F(e, t, n) {
|
|
28
28
|
return Math.min(Math.max(e, t), n);
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function I(e, t) {
|
|
31
31
|
if (t <= 0) return e;
|
|
32
32
|
let n = Math.floor(86399 / t) * t, r = Math.round(e / t) * t;
|
|
33
33
|
return Math.max(0, Math.min(r, n));
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function L(e) {
|
|
36
36
|
if (!e) return null;
|
|
37
37
|
let t = e.split(":");
|
|
38
38
|
if (t.length < 2 || t.length > 3) return null;
|
|
39
|
-
let [n, r, i] = t, a =
|
|
39
|
+
let [n, r, i] = t, a = F(Number.parseInt(n, 10), 0, 23), o = F(Number.parseInt(r, 10), 0, 59), s = F(Number.parseInt(i ?? "0", 10), 0, 59);
|
|
40
40
|
return Number.isNaN(a) || Number.isNaN(o) || Number.isNaN(s) ? null : {
|
|
41
41
|
hours: a,
|
|
42
42
|
minutes: o,
|
|
@@ -44,78 +44,78 @@ function I(e) {
|
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
46
|
function ue(e, t) {
|
|
47
|
-
let n = t ? `:${
|
|
48
|
-
return `${
|
|
47
|
+
let n = t ? `:${P(e.seconds)}` : "";
|
|
48
|
+
return `${P(e.hours)}:${P(e.minutes)}${n}`;
|
|
49
49
|
}
|
|
50
|
-
function
|
|
51
|
-
let r = Number.isFinite(e?.getTime?.()) ? e : /* @__PURE__ */ new Date(), i = r.getHours(), a = r.getMinutes(), o = t ? r.getSeconds() : 0, s =
|
|
50
|
+
function R(e, t, n) {
|
|
51
|
+
let r = Number.isFinite(e?.getTime?.()) ? e : /* @__PURE__ */ new Date(), i = r.getHours(), a = r.getMinutes(), o = t ? r.getSeconds() : 0, s = I(i * 3600 + a * 60 + o, n), c = Math.floor(s / 3600), l = Math.floor(s % 3600 / 60), u = s % 60;
|
|
52
52
|
return {
|
|
53
53
|
hours: c,
|
|
54
54
|
minutes: l,
|
|
55
55
|
seconds: t ? u : 0
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function de(e, t, n) {
|
|
59
59
|
if (t === "12") {
|
|
60
60
|
let t = e.hours >= 12 ? "PM" : "AM", r = e.hours % 12;
|
|
61
61
|
return r === 0 && (r = 12), {
|
|
62
|
-
hours:
|
|
63
|
-
minutes:
|
|
64
|
-
seconds: n ?
|
|
62
|
+
hours: P(r),
|
|
63
|
+
minutes: P(e.minutes),
|
|
64
|
+
seconds: n ? P(e.seconds) : void 0,
|
|
65
65
|
period: t
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
68
|
return {
|
|
69
|
-
hours:
|
|
70
|
-
minutes:
|
|
71
|
-
seconds: n ?
|
|
69
|
+
hours: P(e.hours),
|
|
70
|
+
minutes: P(e.minutes),
|
|
71
|
+
seconds: n ? P(e.seconds) : void 0
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
74
|
function z(e, t, n) {
|
|
75
75
|
let r = (e) => {
|
|
76
76
|
let t = Number.parseInt(e ?? "0", 10);
|
|
77
77
|
return Number.isNaN(t) ? 0 : t;
|
|
78
|
-
}, i = r(e.hours), a =
|
|
78
|
+
}, i = r(e.hours), a = F(r(e.minutes), 0, 59), o = n ? F(r(e.seconds), 0, 59) : 0;
|
|
79
79
|
if (t === "12") {
|
|
80
|
-
i =
|
|
80
|
+
i = F(i, 1, 12);
|
|
81
81
|
let t = (e.period ?? "AM") === "PM";
|
|
82
82
|
i %= 12, t && (i += 12);
|
|
83
|
-
} else i =
|
|
83
|
+
} else i = F(i, 0, 23);
|
|
84
84
|
return {
|
|
85
85
|
hours: i,
|
|
86
86
|
minutes: a,
|
|
87
87
|
seconds: o
|
|
88
88
|
};
|
|
89
89
|
}
|
|
90
|
-
function
|
|
91
|
-
let r =
|
|
90
|
+
function fe(e, t, n) {
|
|
91
|
+
let r = I(e.hours * 3600 + e.minutes * 60 + e.seconds, t);
|
|
92
92
|
return {
|
|
93
93
|
hours: Math.floor(r / 3600),
|
|
94
94
|
minutes: Math.floor(r % 3600 / 60),
|
|
95
95
|
seconds: n ? r % 60 : 0
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
|
-
function
|
|
99
|
-
let i =
|
|
100
|
-
if (n === "24") return `${
|
|
98
|
+
function pe(e, t, n, r) {
|
|
99
|
+
let i = P(e.minutes), a = t ? `:${P(e.seconds)}` : "";
|
|
100
|
+
if (n === "24") return `${P(e.hours)}:${i}${a}`;
|
|
101
101
|
let o = e.hours >= 12 ? "PM" : "AM", s = e.hours % 12;
|
|
102
102
|
s === 0 && (s = 12);
|
|
103
103
|
let c = o === "AM" ? r?.am ?? "AM" : r?.pm ?? "PM";
|
|
104
|
-
return `${
|
|
104
|
+
return `${P(s)}:${i}${a} ${c}`;
|
|
105
105
|
}
|
|
106
106
|
var B = /'[^']*'/g, V = /[HKhk]|\bp\b|\bt\b|\ba\b/;
|
|
107
|
-
function
|
|
107
|
+
function me(e) {
|
|
108
108
|
if (!e) return !1;
|
|
109
109
|
let t = e.replace(B, "");
|
|
110
110
|
return V.test(t);
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function he(e) {
|
|
113
113
|
return {
|
|
114
114
|
startMonth: typeof e?.fromYear == "number" ? new Date(e.fromYear, 0) : void 0,
|
|
115
115
|
endMonth: typeof e?.toYear == "number" ? new Date(e.toYear, 11) : void 0
|
|
116
116
|
};
|
|
117
117
|
}
|
|
118
|
-
function
|
|
118
|
+
function ge(e, t, n, r) {
|
|
119
119
|
let i = r ? { locale: r } : void 0;
|
|
120
120
|
return {
|
|
121
121
|
date: e,
|
|
@@ -123,7 +123,7 @@ function me(e, t, n, r) {
|
|
|
123
123
|
readable: e ? D(e, n, i) : void 0
|
|
124
124
|
};
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function _e(e, t, n, r) {
|
|
127
127
|
let i = r ? { locale: r } : void 0;
|
|
128
128
|
return {
|
|
129
129
|
dates: e,
|
|
@@ -131,7 +131,7 @@ function U(e, t, n, r) {
|
|
|
131
131
|
readable: e.map((e) => D(e, n, i))
|
|
132
132
|
};
|
|
133
133
|
}
|
|
134
|
-
function
|
|
134
|
+
function H(e, t, n, r) {
|
|
135
135
|
let i = r ? { locale: r } : void 0;
|
|
136
136
|
return {
|
|
137
137
|
range: e,
|
|
@@ -145,16 +145,16 @@ function he(e, t, n, r) {
|
|
|
145
145
|
}
|
|
146
146
|
};
|
|
147
147
|
}
|
|
148
|
-
function
|
|
149
|
-
let n = typeof t == "string" ?
|
|
148
|
+
function ve(e, t) {
|
|
149
|
+
let n = typeof t == "string" ? L(t) : t, r = new Date(e);
|
|
150
150
|
return !Number.isFinite(r.getTime()) || !n ? /* @__PURE__ */ new Date(NaN) : (r.setHours(n.hours, n.minutes, n.seconds, 0), r);
|
|
151
151
|
}
|
|
152
|
-
function
|
|
152
|
+
function U(e, t) {
|
|
153
153
|
return Math.ceil((t.getTime() - e.getTime()) / 864e5) + 1;
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function ye(e, t, n) {
|
|
156
156
|
if (!e?.from || !e?.to) return { isValid: !0 };
|
|
157
|
-
let r =
|
|
157
|
+
let r = U(e.from, e.to);
|
|
158
158
|
return t && r < t || n && r > n ? {
|
|
159
159
|
isValid: !1,
|
|
160
160
|
daysDiff: r
|
|
@@ -163,22 +163,22 @@ function _e(e, t, n) {
|
|
|
163
163
|
daysDiff: r
|
|
164
164
|
};
|
|
165
165
|
}
|
|
166
|
-
function
|
|
166
|
+
function be(e, t, n, r) {
|
|
167
167
|
if (!e?.from || !e?.to) return null;
|
|
168
|
-
let i =
|
|
168
|
+
let i = U(e.from, e.to);
|
|
169
169
|
return t && i < t ? r.minimumDays(t) : n && i > n ? r.maximumDays(n) : null;
|
|
170
170
|
}
|
|
171
|
-
function
|
|
171
|
+
function W(e, t, n, r, i) {
|
|
172
172
|
return r && e.length === 0 ? i.datesRequired : t && e.length < t ? i.minimumDates(t) : n && e.length > 0 ? i.maximumDates(n) : null;
|
|
173
173
|
}
|
|
174
|
-
function
|
|
174
|
+
function G(e, t, n, r, i, a) {
|
|
175
175
|
if (e) {
|
|
176
176
|
let n = D(e, t, a ? { locale: a } : void 0);
|
|
177
177
|
return i && (n += ` ${i}`), n;
|
|
178
178
|
}
|
|
179
179
|
return n ?? r;
|
|
180
180
|
}
|
|
181
|
-
function
|
|
181
|
+
function xe(e, t, n, r, i, a) {
|
|
182
182
|
if (e.length > 0) {
|
|
183
183
|
if (e.length === 1) {
|
|
184
184
|
let n = a ? { locale: a } : void 0;
|
|
@@ -188,7 +188,7 @@ function be(e, t, n, r, i, a) {
|
|
|
188
188
|
}
|
|
189
189
|
return n ?? r;
|
|
190
190
|
}
|
|
191
|
-
function
|
|
191
|
+
function Se(e, t, n, r, i) {
|
|
192
192
|
return e?.from ? f(e, {
|
|
193
193
|
format: t,
|
|
194
194
|
locale: i
|
|
@@ -196,22 +196,22 @@ function xe(e, t, n, r, i) {
|
|
|
196
196
|
}
|
|
197
197
|
//#endregion
|
|
198
198
|
//#region src/components/base/date-pickers/date-picker-internals.ts
|
|
199
|
-
function
|
|
199
|
+
function Ce(e, t) {
|
|
200
200
|
return {
|
|
201
201
|
tone: e ?? "secondary",
|
|
202
202
|
buttonStyle: t ?? "outline"
|
|
203
203
|
};
|
|
204
204
|
}
|
|
205
|
-
function
|
|
205
|
+
function we(e) {
|
|
206
206
|
return !e.mode || e.mode === "single";
|
|
207
207
|
}
|
|
208
|
-
function
|
|
208
|
+
function Te(e) {
|
|
209
209
|
return e.mode === "multiple";
|
|
210
210
|
}
|
|
211
|
-
function
|
|
211
|
+
function Ee(e) {
|
|
212
212
|
return e.mode === "range";
|
|
213
213
|
}
|
|
214
|
-
function
|
|
214
|
+
function De(e, t) {
|
|
215
215
|
return [
|
|
216
216
|
{
|
|
217
217
|
label: e.today,
|
|
@@ -223,7 +223,7 @@ function Te(e, t) {
|
|
|
223
223
|
{
|
|
224
224
|
label: e.thisWeek,
|
|
225
225
|
getValue: () => ({
|
|
226
|
-
from:
|
|
226
|
+
from: k(/* @__PURE__ */ new Date(), { weekStartsOn: t }),
|
|
227
227
|
to: E(/* @__PURE__ */ new Date(), { weekStartsOn: t })
|
|
228
228
|
})
|
|
229
229
|
},
|
|
@@ -245,11 +245,11 @@ function Te(e, t) {
|
|
|
245
245
|
}
|
|
246
246
|
//#endregion
|
|
247
247
|
//#region src/components/ui/calendar.tsx
|
|
248
|
-
function
|
|
249
|
-
let d =
|
|
250
|
-
return /* @__PURE__ */ v(
|
|
248
|
+
function Oe({ className: e, classNames: t, showOutsideDays: n = !0, captionLayout: i = "label", buttonVariant: a = "ghost", locale: o, formatters: s, components: l, ...u }) {
|
|
249
|
+
let d = j();
|
|
250
|
+
return /* @__PURE__ */ v(A, {
|
|
251
251
|
showOutsideDays: n,
|
|
252
|
-
className: r("p-3 [--cell-radius:var(--radius
|
|
252
|
+
className: r("p-3 [--cell-radius:var(--radius)] [--cell-size:--spacing(8)] 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),
|
|
253
253
|
captionLayout: i,
|
|
254
254
|
locale: o,
|
|
255
255
|
formatters: {
|
|
@@ -295,7 +295,7 @@ function Ee({ className: e, classNames: t, showOutsideDays: n = !0, captionLayou
|
|
|
295
295
|
className: r("size-4", e),
|
|
296
296
|
...n
|
|
297
297
|
}),
|
|
298
|
-
DayButton: ({ ...e }) => /* @__PURE__ */ v(
|
|
298
|
+
DayButton: ({ ...e }) => /* @__PURE__ */ v(K, {
|
|
299
299
|
locale: o,
|
|
300
300
|
...e
|
|
301
301
|
}),
|
|
@@ -311,11 +311,12 @@ function Ee({ className: e, classNames: t, showOutsideDays: n = !0, captionLayou
|
|
|
311
311
|
...u
|
|
312
312
|
});
|
|
313
313
|
}
|
|
314
|
-
function
|
|
315
|
-
let o =
|
|
314
|
+
function K({ className: e, day: t, modifiers: n, locale: i, ...a }) {
|
|
315
|
+
let o = j(), s = _.useRef(null);
|
|
316
316
|
return _.useEffect(() => {
|
|
317
317
|
n.focused && s.current?.focus();
|
|
318
318
|
}, [n.focused]), /* @__PURE__ */ v(l, {
|
|
319
|
+
ref: s,
|
|
319
320
|
variant: "ghost",
|
|
320
321
|
size: "icon",
|
|
321
322
|
"data-day": t.date.toLocaleDateString(i?.code),
|
|
@@ -323,38 +324,38 @@ function De({ className: e, day: t, modifiers: n, locale: i, ...a }) {
|
|
|
323
324
|
"data-range-start": n.range_start,
|
|
324
325
|
"data-range-end": n.range_end,
|
|
325
326
|
"data-range-middle": n.range_middle,
|
|
326
|
-
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:border-ring group-data-[focused=true]/day:ring-ring
|
|
327
|
+
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:border-ring 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-[3px] 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),
|
|
327
328
|
...a
|
|
328
329
|
});
|
|
329
330
|
}
|
|
330
331
|
//#endregion
|
|
331
332
|
//#region src/components/base/date-pickers/date-picker-footer.tsx
|
|
332
|
-
function
|
|
333
|
+
function ke({ config: e, output: t, hasSelection: n, autoSummary: a, className: o }) {
|
|
333
334
|
let { text: c, actions: l, showOnlyWhenSelected: u = !1, showSummary: f = !1 } = e, p = l?.filter((e) => e.visible !== !1) ?? [], m = _.useMemo(() => {
|
|
334
335
|
if (c) return typeof c == "function" ? c(t) : c;
|
|
335
|
-
}, [c, t]), h = m || (f ?
|
|
336
|
-
return u && !n || !h && p.length === 0 ? null : /* @__PURE__ */ y(
|
|
337
|
-
className: r("date-picker-footer--component p-surface",
|
|
336
|
+
}, [c, t]), h = m || (f ? a : void 0);
|
|
337
|
+
return u && !n || !h && p.length === 0 ? null : /* @__PURE__ */ y(oe, { children: [/* @__PURE__ */ v(ee, {}), /* @__PURE__ */ v("div", {
|
|
338
|
+
className: r("date-picker-footer--component p-surface", o),
|
|
338
339
|
children: /* @__PURE__ */ y(d, {
|
|
339
340
|
gap: "lg",
|
|
340
341
|
children: [!!h && /* @__PURE__ */ y(d, {
|
|
341
342
|
gap: "xs",
|
|
342
343
|
className: "date-picker-footer--summary",
|
|
343
344
|
children: [
|
|
344
|
-
!!f && !!m && !!
|
|
345
|
+
!!f && !!m && !!a && /* @__PURE__ */ y(oe, { children: [/* @__PURE__ */ v(i, {
|
|
345
346
|
type: "secondary",
|
|
346
|
-
children:
|
|
347
|
-
}), /* @__PURE__ */ v(
|
|
347
|
+
children: a
|
|
348
|
+
}), /* @__PURE__ */ v(i, {
|
|
348
349
|
weight: "medium",
|
|
349
350
|
children: m
|
|
350
351
|
})] }),
|
|
351
|
-
!f && !!m && /* @__PURE__ */ v(
|
|
352
|
+
!f && !!m && /* @__PURE__ */ v(i, {
|
|
352
353
|
weight: "medium",
|
|
353
354
|
children: m
|
|
354
355
|
}),
|
|
355
|
-
!!f && !m && !!
|
|
356
|
+
!!f && !m && !!a && /* @__PURE__ */ v(i, {
|
|
356
357
|
type: "secondary",
|
|
357
|
-
children:
|
|
358
|
+
children: a
|
|
358
359
|
})
|
|
359
360
|
]
|
|
360
361
|
}), p.length > 0 && /* @__PURE__ */ v(d, {
|
|
@@ -363,10 +364,10 @@ function Oe({ config: e, output: t, hasSelection: n, autoSummary: o, className:
|
|
|
363
364
|
align: "center",
|
|
364
365
|
className: "date-picker-footer--actions",
|
|
365
366
|
children: p.map((e) => {
|
|
366
|
-
let n = typeof e.disabled == "function" ? e.disabled(t) : e.disabled,
|
|
367
|
-
return /* @__PURE__ */ v(
|
|
367
|
+
let n = typeof e.disabled == "function" ? e.disabled(t) : e.disabled, i = e.buttonStyle === "link" ? "ghost" : e.buttonStyle ?? "solid";
|
|
368
|
+
return /* @__PURE__ */ v(s, {
|
|
368
369
|
tone: e.tone ?? "primary",
|
|
369
|
-
buttonStyle:
|
|
370
|
+
buttonStyle: i,
|
|
370
371
|
disabled: n,
|
|
371
372
|
loading: e.loading,
|
|
372
373
|
onClick: () => e.onClick(t),
|
|
@@ -378,11 +379,11 @@ function Oe({ config: e, output: t, hasSelection: n, autoSummary: o, className:
|
|
|
378
379
|
})
|
|
379
380
|
})] });
|
|
380
381
|
}
|
|
381
|
-
|
|
382
|
+
ke.displayName = "DatePickerFooter";
|
|
382
383
|
//#endregion
|
|
383
384
|
//#region src/components/base/date-pickers/date-picker-header.tsx
|
|
384
|
-
function
|
|
385
|
-
let { title: n, description:
|
|
385
|
+
function Ae({ config: e, className: t }) {
|
|
386
|
+
let { title: n, description: o, icon: s, align: c = "left" } = e;
|
|
386
387
|
return /* @__PURE__ */ v("div", {
|
|
387
388
|
className: r("date-picker-header--component", "border-b border-border p-surface", c === "center" ? "text-center" : "text-left", t),
|
|
388
389
|
children: /* @__PURE__ */ y(d, {
|
|
@@ -393,32 +394,39 @@ function ke({ config: e, className: t }) {
|
|
|
393
394
|
className: "shrink-0",
|
|
394
395
|
children: /* @__PURE__ */ v(s, { className: "h-5 w-5 text-primary-accent" })
|
|
395
396
|
}), /* @__PURE__ */ y(d, {
|
|
396
|
-
gap: "
|
|
397
|
+
gap: "dense",
|
|
397
398
|
className: r("flex-1", c === "center" && !s && "text-center"),
|
|
398
|
-
children: [/* @__PURE__ */ v(
|
|
399
|
+
children: [/* @__PURE__ */ v(a, {
|
|
399
400
|
tag: "h3",
|
|
400
401
|
align: c === "center" ? "center" : "left",
|
|
401
402
|
containerClassName: "space-y-0",
|
|
402
403
|
children: n
|
|
403
|
-
}), !!
|
|
404
|
+
}), !!o && /* @__PURE__ */ v(i, {
|
|
404
405
|
type: "secondary",
|
|
405
|
-
children:
|
|
406
|
+
children: o
|
|
406
407
|
})]
|
|
407
408
|
})]
|
|
408
409
|
})
|
|
409
410
|
});
|
|
410
411
|
}
|
|
411
|
-
|
|
412
|
+
Ae.displayName = "DatePickerHeader";
|
|
412
413
|
//#endregion
|
|
413
414
|
//#region src/components/base/date-pickers/date-picker.recipes.ts
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
415
|
+
function je(e) {
|
|
416
|
+
let { defaultScale: n } = t();
|
|
417
|
+
return h(e, n);
|
|
418
|
+
}
|
|
419
|
+
var Me = {
|
|
420
|
+
sm: "w-control-sm",
|
|
421
|
+
md: "w-control",
|
|
422
|
+
lg: "w-control-lg"
|
|
423
|
+
};
|
|
424
|
+
function Ne(e, t = !1) {
|
|
425
|
+
return r(p(e), "justify-start", t && [Me[e], "shrink-0 justify-center px-0"]);
|
|
426
|
+
}
|
|
427
|
+
//#endregion
|
|
428
|
+
//#region src/components/base/date-pickers/date-pickers.strings.ts
|
|
429
|
+
var q = {
|
|
422
430
|
selectDate: "Select a date",
|
|
423
431
|
selectDates: "Select dates",
|
|
424
432
|
selectDateRange: "Select date range",
|
|
@@ -454,16 +462,16 @@ var Ae = [
|
|
|
454
462
|
selectMonthYear: "Select month and year",
|
|
455
463
|
month: "Month",
|
|
456
464
|
year: "Year"
|
|
457
|
-
},
|
|
465
|
+
}, Pe = C("box-border border border-transparent py-0 font-sans text-foreground hover:text-foreground aria-pressed:bg-muted focus-visible:border-ring focus-visible:ring-ring aria-invalid:ring-destructive/20 aria-invalid:border-destructive gap-space-xs rounded-inner text-sm font-medium transition-[color,box-shadow] [&_svg:not([class*='size-'])]:size-4 group/toggle hover:bg-muted inline-flex items-center justify-center whitespace-nowrap outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", {
|
|
458
466
|
variants: {
|
|
459
467
|
variant: {
|
|
460
468
|
default: "bg-transparent",
|
|
461
469
|
outline: "border-input hover:bg-muted border bg-transparent shadow-xs"
|
|
462
470
|
},
|
|
463
471
|
size: {
|
|
464
|
-
default: "h-
|
|
465
|
-
sm: "h-
|
|
466
|
-
lg: "h-
|
|
472
|
+
default: "h-control min-w-9 px-control",
|
|
473
|
+
sm: "h-control-sm min-w-8 px-control-sm",
|
|
474
|
+
lg: "h-control-lg min-w-10 px-control"
|
|
467
475
|
}
|
|
468
476
|
},
|
|
469
477
|
defaultVariants: {
|
|
@@ -476,15 +484,15 @@ var Ae = [
|
|
|
476
484
|
spacing: 0,
|
|
477
485
|
orientation: "horizontal"
|
|
478
486
|
});
|
|
479
|
-
function
|
|
480
|
-
return /* @__PURE__ */ v(
|
|
487
|
+
function Fe({ className: e, variant: t, size: n, spacing: i = 0, orientation: a = "horizontal", children: o, ...s }) {
|
|
488
|
+
return /* @__PURE__ */ v(le, {
|
|
481
489
|
"data-slot": "toggle-group",
|
|
482
490
|
"data-variant": t,
|
|
483
491
|
"data-size": n,
|
|
484
492
|
"data-spacing": i,
|
|
485
493
|
"data-orientation": a,
|
|
486
494
|
style: { "--gap": i },
|
|
487
|
-
className: r("rounded-
|
|
495
|
+
className: r("rounded-inner data-[spacing=0]:data-[variant=outline]:shadow-xs 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),
|
|
488
496
|
...s,
|
|
489
497
|
children: /* @__PURE__ */ v(J.Provider, {
|
|
490
498
|
value: {
|
|
@@ -497,14 +505,14 @@ function Me({ className: e, variant: t, size: n, spacing: i = 0, orientation: a
|
|
|
497
505
|
})
|
|
498
506
|
});
|
|
499
507
|
}
|
|
500
|
-
function
|
|
508
|
+
function Ie({ className: e, children: t, variant: n = "default", size: i = "default", ...a }) {
|
|
501
509
|
let o = _.useContext(J);
|
|
502
|
-
return /* @__PURE__ */ v(
|
|
510
|
+
return /* @__PURE__ */ v(M, {
|
|
503
511
|
"data-slot": "toggle-group-item",
|
|
504
512
|
"data-variant": o.variant || n,
|
|
505
513
|
"data-size": o.size || i,
|
|
506
514
|
"data-spacing": o.spacing,
|
|
507
|
-
className: r("border-border data-[state=on]:bg-muted group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 group-data-[spacing=0]/toggle-group:shadow-none group-data-[orientation=horizontal]/toggle-group:data-[spacing=0]:first:rounded-l-
|
|
515
|
+
className: r("border-border data-[state=on]:bg-muted group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 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", Pe({
|
|
508
516
|
variant: o.variant || n,
|
|
509
517
|
size: o.size || i
|
|
510
518
|
}), e),
|
|
@@ -514,34 +522,34 @@ function Ne({ className: e, children: t, variant: n = "default", size: i = "defa
|
|
|
514
522
|
}
|
|
515
523
|
//#endregion
|
|
516
524
|
//#region src/components/base/date-pickers/time-picker.tsx
|
|
517
|
-
var
|
|
525
|
+
var Le = {
|
|
518
526
|
placeholder: "Select time",
|
|
519
527
|
hours: "Hours",
|
|
520
528
|
minutes: "Minutes",
|
|
521
529
|
seconds: "Seconds",
|
|
522
530
|
am: "AM",
|
|
523
531
|
pm: "PM"
|
|
524
|
-
},
|
|
532
|
+
}, Re = [
|
|
525
533
|
"hours",
|
|
526
534
|
"minutes",
|
|
527
535
|
"seconds"
|
|
528
|
-
],
|
|
536
|
+
], ze = "00", Y = "12", X = "--", Be = {
|
|
529
537
|
sm: "w-12",
|
|
530
538
|
md: "w-14",
|
|
531
539
|
lg: "w-16"
|
|
532
540
|
};
|
|
533
|
-
function
|
|
541
|
+
function Ve(e) {
|
|
534
542
|
return e.replace(/\D/g, "").slice(-2);
|
|
535
543
|
}
|
|
536
544
|
function Z(e) {
|
|
537
545
|
return e.length === 0 ? "00" : e.length === 1 ? `0${e}` : e;
|
|
538
546
|
}
|
|
539
|
-
function
|
|
540
|
-
let n = t ?
|
|
547
|
+
function He(e, t) {
|
|
548
|
+
let n = t ? Re : Re.slice(0, 2), r = n.indexOf(e);
|
|
541
549
|
return r > -1 && r < n.length - 1 ? n[r + 1] : null;
|
|
542
550
|
}
|
|
543
|
-
function
|
|
544
|
-
let n = t ?
|
|
551
|
+
function Ue(e, t) {
|
|
552
|
+
let n = t ? Re : Re.slice(0, 2), r = n.indexOf(e);
|
|
545
553
|
return r > 0 ? n[r - 1] : null;
|
|
546
554
|
}
|
|
547
555
|
function Q(e, t) {
|
|
@@ -550,7 +558,7 @@ function Q(e, t) {
|
|
|
550
558
|
function $(e) {
|
|
551
559
|
return e >= 12 ? "PM" : "AM";
|
|
552
560
|
}
|
|
553
|
-
function
|
|
561
|
+
function We(e, t) {
|
|
554
562
|
return t === "12" ? {
|
|
555
563
|
...e,
|
|
556
564
|
period: e.period ?? "AM"
|
|
@@ -559,73 +567,73 @@ function Ve(e, t) {
|
|
|
559
567
|
period: void 0
|
|
560
568
|
};
|
|
561
569
|
}
|
|
562
|
-
function
|
|
570
|
+
function Ge(e) {
|
|
563
571
|
return {
|
|
564
572
|
hours: X,
|
|
565
573
|
minutes: X,
|
|
566
574
|
seconds: e ? X : void 0
|
|
567
575
|
};
|
|
568
576
|
}
|
|
569
|
-
function
|
|
570
|
-
let n = t === "12" ? Y :
|
|
577
|
+
function Ke(e, t) {
|
|
578
|
+
let n = t === "12" ? Y : ze;
|
|
571
579
|
return {
|
|
572
580
|
hours: e.hours === X ? n : e.hours,
|
|
573
|
-
minutes: e.minutes === X ?
|
|
574
|
-
seconds: e.seconds === X ?
|
|
581
|
+
minutes: e.minutes === X ? ze : e.minutes,
|
|
582
|
+
seconds: e.seconds === X ? ze : e.seconds,
|
|
575
583
|
period: e.period
|
|
576
584
|
};
|
|
577
585
|
}
|
|
578
|
-
function
|
|
579
|
-
let r =
|
|
580
|
-
return r ?
|
|
586
|
+
function qe(e, t, n) {
|
|
587
|
+
let r = L(e ?? void 0);
|
|
588
|
+
return r ? We(de(r, t, n), t) : Ge(n);
|
|
581
589
|
}
|
|
582
|
-
var
|
|
583
|
-
let
|
|
584
|
-
k.current = e,
|
|
585
|
-
}, []),
|
|
590
|
+
var Je = _.forwardRef(function({ value: e, onValueChange: a, mode: o = "inline", format: s = "24", precision: c = "minutes", step: l = 60, size: u, disabled: d, invalid: f, placeholder: ee, strings: m, className: g, id: oe }, se) {
|
|
591
|
+
let b = n(Le, m), { defaultScale: x } = t(), S = h(u, x), C = c === "seconds", [w, T] = _.useState(!1), E = _.useMemo(() => C ? Re : Re.slice(0, 2), [C]), [D, O] = _.useState(() => qe(e, s, C)), k = _.useRef(D), A = _.useRef(!1), j = _.useRef(null), M = _.useCallback((e) => {
|
|
592
|
+
k.current = e, O(e);
|
|
593
|
+
}, []), le = _.useRef({
|
|
586
594
|
hours: null,
|
|
587
595
|
minutes: null,
|
|
588
596
|
seconds: null
|
|
589
597
|
});
|
|
590
598
|
_.useEffect(() => {
|
|
591
|
-
if (
|
|
592
|
-
|
|
599
|
+
if (A.current) {
|
|
600
|
+
A.current = !1;
|
|
593
601
|
return;
|
|
594
602
|
}
|
|
595
|
-
|
|
603
|
+
j.current = null, M(qe(e, s, C));
|
|
596
604
|
}, [
|
|
597
605
|
e,
|
|
598
606
|
s,
|
|
599
|
-
|
|
600
|
-
|
|
607
|
+
C,
|
|
608
|
+
M
|
|
601
609
|
]);
|
|
602
|
-
let N = _.useCallback((e) => ue(e,
|
|
603
|
-
|
|
604
|
-
let t = z(
|
|
605
|
-
|
|
610
|
+
let N = _.useCallback((e) => ue(e, C), [C]), P = _.useCallback((e) => {
|
|
611
|
+
A.current = !0;
|
|
612
|
+
let t = z(Ke(e, s), s, C);
|
|
613
|
+
a?.(N(fe(t, l, C)));
|
|
606
614
|
}, [
|
|
607
615
|
s,
|
|
608
|
-
|
|
609
|
-
|
|
616
|
+
C,
|
|
617
|
+
a,
|
|
610
618
|
l,
|
|
611
619
|
N
|
|
612
620
|
]), F = _.useCallback((e) => {
|
|
613
|
-
let t =
|
|
614
|
-
|
|
621
|
+
let t = fe(z(Ke(e, s), s, C), l, C);
|
|
622
|
+
a?.(N(t)), M(We(de(t, s, C), s));
|
|
615
623
|
}, [
|
|
616
624
|
s,
|
|
617
|
-
|
|
618
|
-
|
|
625
|
+
C,
|
|
626
|
+
a,
|
|
619
627
|
l,
|
|
620
628
|
N,
|
|
621
|
-
|
|
629
|
+
M
|
|
622
630
|
]), I = _.useCallback((e) => {
|
|
623
631
|
if (!e) return;
|
|
624
|
-
let t =
|
|
632
|
+
let t = le.current[e];
|
|
625
633
|
t && (t.focus(), t.select());
|
|
626
634
|
}, []), L = _.useCallback((e, t) => {
|
|
627
|
-
let n =
|
|
628
|
-
|
|
635
|
+
let n = Ke(k.current, s), r = j.current, i = r && r.key === e && r.typed.length === 1 ? `${r.typed}${t}` : String(t);
|
|
636
|
+
j.current = {
|
|
629
637
|
key: e,
|
|
630
638
|
typed: i
|
|
631
639
|
};
|
|
@@ -635,14 +643,14 @@ var Ge = _.forwardRef(function({ value: e, onValueChange: i, mode: o = "inline",
|
|
|
635
643
|
...o,
|
|
636
644
|
period: s === "12" ? c : void 0
|
|
637
645
|
};
|
|
638
|
-
|
|
646
|
+
M(l), P(l);
|
|
639
647
|
}, [
|
|
640
648
|
s,
|
|
641
|
-
|
|
649
|
+
M,
|
|
642
650
|
P
|
|
643
|
-
]),
|
|
644
|
-
|
|
645
|
-
let n =
|
|
651
|
+
]), R = _.useCallback((e, t) => {
|
|
652
|
+
j.current = null;
|
|
653
|
+
let n = Ve(t), r = { ...Ke(k.current, s) }, i = r.period ?? "AM";
|
|
646
654
|
if (e === "hours") {
|
|
647
655
|
if (s === "24") {
|
|
648
656
|
let e = Number.parseInt(n || "0", 10);
|
|
@@ -662,247 +670,247 @@ var Ge = _.forwardRef(function({ value: e, onValueChange: i, mode: o = "inline",
|
|
|
662
670
|
...r,
|
|
663
671
|
period: s === "12" ? i : void 0
|
|
664
672
|
};
|
|
665
|
-
|
|
673
|
+
M(a), P(a);
|
|
666
674
|
}, [
|
|
667
675
|
s,
|
|
668
|
-
|
|
676
|
+
M,
|
|
669
677
|
P
|
|
670
|
-
]),
|
|
671
|
-
s === "12" && (
|
|
672
|
-
...
|
|
678
|
+
]), B = _.useCallback((e) => {
|
|
679
|
+
s === "12" && (j.current = null, F({
|
|
680
|
+
...Ke(k.current, s),
|
|
673
681
|
period: e
|
|
674
682
|
}));
|
|
675
|
-
}, [F, s]),
|
|
676
|
-
|
|
677
|
-
}, [F]),
|
|
678
|
-
|
|
679
|
-
}, []),
|
|
683
|
+
}, [F, s]), V = _.useCallback(() => {
|
|
684
|
+
j.current = null, F(k.current);
|
|
685
|
+
}, [F]), me = _.useCallback((e) => {
|
|
686
|
+
j.current = null, e.target.select();
|
|
687
|
+
}, []), he = _.useCallback((e, t) => {
|
|
680
688
|
if (e.key.length === 1 && /\d/.test(e.key) && !e.metaKey && !e.ctrlKey && !e.altKey) {
|
|
681
689
|
e.preventDefault(), L(t, Number.parseInt(e.key, 10));
|
|
682
690
|
return;
|
|
683
691
|
}
|
|
684
692
|
if (e.key === "ArrowRight") {
|
|
685
|
-
I(
|
|
693
|
+
I(He(t, C));
|
|
686
694
|
return;
|
|
687
695
|
}
|
|
688
696
|
if (e.key === "ArrowLeft") {
|
|
689
|
-
I(
|
|
697
|
+
I(Ue(t, C));
|
|
690
698
|
return;
|
|
691
699
|
}
|
|
692
700
|
if (e.key === "Backspace") {
|
|
693
701
|
let n = e.currentTarget;
|
|
694
|
-
n.selectionStart === 0 && n.selectionEnd === 0 && I(
|
|
702
|
+
n.selectionStart === 0 && n.selectionEnd === 0 && I(Ue(t, C));
|
|
695
703
|
}
|
|
696
704
|
}, [
|
|
697
705
|
L,
|
|
698
706
|
I,
|
|
699
|
-
|
|
700
|
-
]),
|
|
701
|
-
if (s === "12") return
|
|
702
|
-
}, [s,
|
|
703
|
-
hours:
|
|
704
|
-
minutes:
|
|
705
|
-
seconds:
|
|
706
|
-
},
|
|
707
|
-
ref: o === "inline" ?
|
|
708
|
-
className: r("flex items-center gap-space-md [&>.input--component]:w-auto [&>.input--component]:shrink-0", o === "inline" && ["time-picker--component",
|
|
709
|
-
children: [
|
|
707
|
+
C
|
|
708
|
+
]), ge = _.useMemo(() => {
|
|
709
|
+
if (s === "12") return D.period ? [D.period] : void 0;
|
|
710
|
+
}, [s, D.period]), _e = {
|
|
711
|
+
hours: b.hours,
|
|
712
|
+
minutes: b.minutes,
|
|
713
|
+
seconds: b.seconds
|
|
714
|
+
}, H = /* @__PURE__ */ y("div", {
|
|
715
|
+
ref: o === "inline" ? se : void 0,
|
|
716
|
+
className: r("flex items-center gap-space-md [&>.input--component]:w-auto [&>.input--component]:shrink-0", o === "inline" && ["time-picker--component", g]),
|
|
717
|
+
children: [E.map((e, t) => /* @__PURE__ */ y(_.Fragment, { children: [/* @__PURE__ */ v(ne, {
|
|
710
718
|
ref: (t) => {
|
|
711
|
-
|
|
719
|
+
le.current[e] = t;
|
|
712
720
|
},
|
|
713
721
|
id: e === "hours" && o === "inline" ? oe : void 0,
|
|
714
|
-
value:
|
|
715
|
-
onChange: (t) =>
|
|
716
|
-
onFocus:
|
|
717
|
-
onBlur:
|
|
718
|
-
onKeyDown: (t) =>
|
|
722
|
+
value: D[e] ?? X,
|
|
723
|
+
onChange: (t) => R(e, t.target.value),
|
|
724
|
+
onFocus: me,
|
|
725
|
+
onBlur: V,
|
|
726
|
+
onKeyDown: (t) => he(t, e),
|
|
719
727
|
inputMode: "numeric",
|
|
720
728
|
pattern: "\\d*",
|
|
721
729
|
maxLength: 2,
|
|
722
730
|
showCharacterCount: !1,
|
|
723
731
|
disabled: d,
|
|
724
732
|
invalid: f,
|
|
725
|
-
"aria-label":
|
|
726
|
-
size:
|
|
727
|
-
className: r("time-picker--segment text-center",
|
|
728
|
-
}), t <
|
|
733
|
+
"aria-label": _e[e],
|
|
734
|
+
size: S,
|
|
735
|
+
className: r("time-picker--segment text-center", Be[S])
|
|
736
|
+
}), t < E.length - 1 && /* @__PURE__ */ v(i, {
|
|
729
737
|
tag: "span",
|
|
730
738
|
type: "secondary",
|
|
731
739
|
children: ":"
|
|
732
|
-
})] }, e)), s === "12" && /* @__PURE__ */ y(
|
|
733
|
-
value:
|
|
740
|
+
})] }, e)), s === "12" && /* @__PURE__ */ y(Fe, {
|
|
741
|
+
value: ge,
|
|
734
742
|
onValueChange: (e) => {
|
|
735
743
|
let t = e[0];
|
|
736
|
-
t &&
|
|
744
|
+
t && B(t);
|
|
737
745
|
},
|
|
738
746
|
disabled: d,
|
|
739
|
-
size:
|
|
747
|
+
size: S === "sm" ? "sm" : "default",
|
|
740
748
|
className: "time-picker--period ml-1",
|
|
741
|
-
children: [/* @__PURE__ */ v(
|
|
749
|
+
children: [/* @__PURE__ */ v(Ie, {
|
|
742
750
|
value: "AM",
|
|
743
|
-
"aria-label":
|
|
744
|
-
className:
|
|
745
|
-
children: /* @__PURE__ */ v(
|
|
751
|
+
"aria-label": b.am,
|
|
752
|
+
className: te[S],
|
|
753
|
+
children: /* @__PURE__ */ v(i, {
|
|
746
754
|
tag: "span",
|
|
747
755
|
size: "inherit",
|
|
748
756
|
weight: "medium",
|
|
749
757
|
lineHeight: "tight",
|
|
750
758
|
className: "text-inherit",
|
|
751
|
-
children:
|
|
759
|
+
children: b.am
|
|
752
760
|
})
|
|
753
|
-
}), /* @__PURE__ */ v(
|
|
761
|
+
}), /* @__PURE__ */ v(Ie, {
|
|
754
762
|
value: "PM",
|
|
755
|
-
"aria-label":
|
|
756
|
-
className:
|
|
757
|
-
children: /* @__PURE__ */ v(
|
|
763
|
+
"aria-label": b.pm,
|
|
764
|
+
className: te[S],
|
|
765
|
+
children: /* @__PURE__ */ v(i, {
|
|
758
766
|
tag: "span",
|
|
759
767
|
size: "inherit",
|
|
760
768
|
weight: "medium",
|
|
761
769
|
lineHeight: "tight",
|
|
762
770
|
className: "text-inherit",
|
|
763
|
-
children:
|
|
771
|
+
children: b.pm
|
|
764
772
|
})
|
|
765
773
|
})]
|
|
766
774
|
})]
|
|
767
775
|
});
|
|
768
|
-
if (o === "inline") return
|
|
769
|
-
let
|
|
770
|
-
am:
|
|
771
|
-
pm:
|
|
776
|
+
if (o === "inline") return H;
|
|
777
|
+
let ve = D.hours === X && D.minutes === X, U = ve ? ee ?? b.placeholder : pe(z(Ke(D, s), s, C), C, s, {
|
|
778
|
+
am: b.am,
|
|
779
|
+
pm: b.pm
|
|
772
780
|
});
|
|
773
|
-
return /* @__PURE__ */ y(
|
|
774
|
-
open:
|
|
775
|
-
onOpenChange:
|
|
776
|
-
children: [/* @__PURE__ */ y(
|
|
777
|
-
ref:
|
|
781
|
+
return /* @__PURE__ */ y(ie, {
|
|
782
|
+
open: w,
|
|
783
|
+
onOpenChange: T,
|
|
784
|
+
children: [/* @__PURE__ */ y(re, {
|
|
785
|
+
ref: se,
|
|
778
786
|
id: oe,
|
|
779
|
-
"aria-expanded":
|
|
787
|
+
"aria-expanded": w,
|
|
780
788
|
"aria-invalid": f,
|
|
781
789
|
disabled: d,
|
|
782
|
-
className: r("time-picker--component", p(
|
|
783
|
-
children: [/* @__PURE__ */ v(
|
|
790
|
+
className: r("time-picker--component", p(S), "justify-start", ve && "text-muted-foreground", g),
|
|
791
|
+
children: [/* @__PURE__ */ v(ce, { className: "size-icon shrink-0" }), /* @__PURE__ */ v(i, {
|
|
784
792
|
tag: "span",
|
|
785
793
|
size: "inherit",
|
|
786
794
|
lineHeight: "tight",
|
|
787
795
|
className: "min-w-0 truncate text-inherit",
|
|
788
|
-
children:
|
|
796
|
+
children: U
|
|
789
797
|
})]
|
|
790
|
-
}), /* @__PURE__ */ v(
|
|
798
|
+
}), /* @__PURE__ */ v(ae, {
|
|
791
799
|
className: "time-picker--panel w-auto",
|
|
792
800
|
align: "start",
|
|
793
|
-
children:
|
|
801
|
+
children: H
|
|
794
802
|
})]
|
|
795
803
|
});
|
|
796
804
|
});
|
|
797
|
-
|
|
805
|
+
Je.displayName = "TimePicker";
|
|
798
806
|
//#endregion
|
|
799
807
|
//#region src/components/base/date-pickers/date-picker-single.tsx
|
|
800
|
-
function
|
|
801
|
-
let T = _.useId(),
|
|
808
|
+
function Ye({ value: e, defaultValue: t, onValueChange: n, format: a = "yyyy-MM-dd", readableFormat: c = "PPP", placeholder: l, closeOnSelect: u = !0, withTime: f, disabledDates: p, calendarProps: h, open: te, setOpen: ne, t: g, dateFnsLocale: b, captionLayout: x, yearBounds: S, rootRef: C, ...w }) {
|
|
809
|
+
let T = je(w.size), E = _.useId(), O = `${E}-description`, k = w.error !== void 0 && w.error !== null && w.error !== "", A = k ? O : void 0, j = w.hint !== void 0 && w.hint !== null && w.hint !== "", M = typeof w.error == "string" ? w.error : "", le = typeof w.hint == "string" ? w.hint : "", N = f?.format ?? "24", P = f?.step ?? 60, F = f?.showSeconds ?? !1, I = me(c), de = f?.showTimeInButton ?? !I, [z, B] = _.useState(() => e ?? t), [V, he] = _.useState(() => {
|
|
802
810
|
let n = e ?? t;
|
|
803
|
-
return n ?
|
|
804
|
-
}),
|
|
805
|
-
let n = e, r = t ??
|
|
811
|
+
return n ? R(n, F, P) : null;
|
|
812
|
+
}), _e = _.useRef(e ?? t ?? void 0), H = _.useRef(!1), U = _.useRef(e !== void 0), ye = _.useCallback((e, t) => {
|
|
813
|
+
let n = e, r = t ?? V;
|
|
806
814
|
if (e && f?.enabled && r) {
|
|
807
|
-
let t =
|
|
815
|
+
let t = ve(e, r);
|
|
808
816
|
n = Number.isFinite(t.getTime()) ? t : void 0;
|
|
809
817
|
}
|
|
810
|
-
return
|
|
818
|
+
return ge(n, a, c, b);
|
|
811
819
|
}, [
|
|
812
|
-
|
|
820
|
+
a,
|
|
813
821
|
c,
|
|
814
822
|
b,
|
|
815
823
|
f,
|
|
816
|
-
|
|
824
|
+
V
|
|
817
825
|
]);
|
|
818
826
|
_.useEffect(() => {
|
|
819
|
-
let r = !!f?.enabled, i =
|
|
820
|
-
let i =
|
|
821
|
-
if (
|
|
822
|
-
let t =
|
|
823
|
-
n?.(
|
|
827
|
+
let r = !!f?.enabled, i = U.current, o = e !== void 0, s = (e, t) => {
|
|
828
|
+
let i = fe(R(e, F, P), P, F);
|
|
829
|
+
if (B((t) => t?.getTime?.() === e.getTime() ? t : e), he((e) => e && e.hours === i.hours && e.minutes === i.minutes && e.seconds === i.seconds ? e : i), _e.current = e, H.current = !0, t && r) {
|
|
830
|
+
let t = ve(e, i);
|
|
831
|
+
n?.(ge(t, a, c, b));
|
|
824
832
|
}
|
|
825
833
|
};
|
|
826
834
|
if (!r) {
|
|
827
|
-
|
|
835
|
+
H.current = !1, _e.current = e ?? t ?? void 0, B(e ?? t), U.current = o;
|
|
828
836
|
return;
|
|
829
837
|
}
|
|
830
|
-
let l =
|
|
831
|
-
if (!
|
|
832
|
-
s(e, !1),
|
|
838
|
+
let l = _e.current?.getTime?.(), u = e?.getTime?.();
|
|
839
|
+
if (!o && i && t === void 0 && (H.current = !1, _e.current = void 0), e !== void 0 && u !== l) {
|
|
840
|
+
s(e, !1), U.current = o;
|
|
833
841
|
return;
|
|
834
842
|
}
|
|
835
843
|
if (e === void 0 && t !== void 0) {
|
|
836
|
-
(l !== t.getTime() || !
|
|
844
|
+
(l !== t.getTime() || !H.current) && s(t, !1), U.current = o;
|
|
837
845
|
return;
|
|
838
846
|
}
|
|
839
|
-
if (e === void 0 && t === void 0 && !
|
|
840
|
-
|
|
847
|
+
if (e === void 0 && t === void 0 && !H.current) {
|
|
848
|
+
H.current = !0, U.current = o;
|
|
841
849
|
return;
|
|
842
850
|
}
|
|
843
|
-
|
|
851
|
+
U.current = o;
|
|
844
852
|
}, [
|
|
845
853
|
f?.enabled,
|
|
846
854
|
e,
|
|
847
855
|
t,
|
|
848
|
-
|
|
849
|
-
|
|
856
|
+
F,
|
|
857
|
+
P,
|
|
850
858
|
n,
|
|
851
|
-
|
|
859
|
+
a,
|
|
852
860
|
c,
|
|
853
861
|
b
|
|
854
862
|
]), _.useEffect(() => {
|
|
855
|
-
f?.enabled &&
|
|
863
|
+
f?.enabled && he((e) => {
|
|
856
864
|
if (!e) return e;
|
|
857
|
-
let t =
|
|
865
|
+
let t = fe(e, P, F);
|
|
858
866
|
return e.hours === t.hours && e.minutes === t.minutes && e.seconds === t.seconds ? e : t;
|
|
859
867
|
});
|
|
860
868
|
}, [
|
|
861
869
|
f?.enabled,
|
|
862
|
-
|
|
863
|
-
|
|
870
|
+
P,
|
|
871
|
+
F
|
|
864
872
|
]);
|
|
865
|
-
let
|
|
866
|
-
|
|
873
|
+
let be = _.useCallback((e) => {
|
|
874
|
+
B(e);
|
|
867
875
|
let t;
|
|
868
|
-
f?.enabled && e && (
|
|
876
|
+
f?.enabled && e && (H.current = !0, _e.current = e, V || (t = R(e, F, P), he(t))), n?.(ye(e, t)), u && e && ne(!1);
|
|
869
877
|
}, [
|
|
870
878
|
n,
|
|
871
|
-
|
|
879
|
+
ye,
|
|
872
880
|
u,
|
|
873
|
-
|
|
881
|
+
ne,
|
|
874
882
|
f,
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
]),
|
|
879
|
-
let t =
|
|
880
|
-
t && (
|
|
883
|
+
V,
|
|
884
|
+
F,
|
|
885
|
+
P
|
|
886
|
+
]), W = _.useCallback((e) => {
|
|
887
|
+
let t = L(e ?? void 0);
|
|
888
|
+
t && (he(t), z && n?.(ye(z, t)));
|
|
881
889
|
}, [
|
|
882
|
-
|
|
890
|
+
z,
|
|
883
891
|
n,
|
|
884
|
-
|
|
885
|
-
]),
|
|
886
|
-
if (f?.enabled &&
|
|
892
|
+
ye
|
|
893
|
+
]), xe = _.useMemo(() => {
|
|
894
|
+
if (f?.enabled && V) return pe(V, F, N, {
|
|
887
895
|
am: g.am,
|
|
888
896
|
pm: g.pm
|
|
889
897
|
});
|
|
890
898
|
}, [
|
|
891
899
|
f?.enabled,
|
|
892
|
-
|
|
900
|
+
V,
|
|
901
|
+
F,
|
|
893
902
|
N,
|
|
894
|
-
j,
|
|
895
903
|
g
|
|
896
|
-
]),
|
|
897
|
-
|
|
904
|
+
]), Se = _.useMemo(() => G(z, c, l, g.selectDate, de ? xe : void 0, b), [
|
|
905
|
+
z,
|
|
898
906
|
c,
|
|
899
907
|
l,
|
|
900
908
|
g,
|
|
901
|
-
|
|
902
|
-
|
|
909
|
+
xe,
|
|
910
|
+
de,
|
|
903
911
|
b
|
|
904
|
-
]),
|
|
905
|
-
|
|
912
|
+
]), we = _.useMemo(() => z ? D(z, c, { locale: b }) : void 0, [
|
|
913
|
+
z,
|
|
906
914
|
c,
|
|
907
915
|
b
|
|
908
916
|
]);
|
|
@@ -911,55 +919,59 @@ function Ke({ value: e, defaultValue: t, onValueChange: n, format: o = "yyyy-MM-
|
|
|
911
919
|
gap: "md",
|
|
912
920
|
className: w.className,
|
|
913
921
|
children: [
|
|
914
|
-
!!(w.label ||
|
|
922
|
+
!!(w.label || j) && /* @__PURE__ */ y(d, {
|
|
915
923
|
direction: "horizontal",
|
|
916
924
|
align: "center",
|
|
917
925
|
justify: "between",
|
|
918
926
|
gap: "xs",
|
|
919
|
-
children: [!!w.label && /* @__PURE__ */ v(
|
|
920
|
-
htmlFor:
|
|
921
|
-
className: r("leading-6",
|
|
927
|
+
children: [!!w.label && /* @__PURE__ */ v(o, {
|
|
928
|
+
htmlFor: E,
|
|
929
|
+
className: r("leading-6", k && "text-destructive"),
|
|
922
930
|
children: w.label
|
|
923
|
-
}), !
|
|
931
|
+
}), !k && !!j && /* @__PURE__ */ v(i, {
|
|
924
932
|
tag: "span",
|
|
925
933
|
size: "xs",
|
|
926
934
|
type: "secondary",
|
|
927
|
-
children:
|
|
935
|
+
children: le
|
|
928
936
|
})]
|
|
929
937
|
}),
|
|
930
|
-
/* @__PURE__ */ y(
|
|
931
|
-
open:
|
|
932
|
-
onOpenChange:
|
|
933
|
-
children: [/* @__PURE__ */ v(
|
|
934
|
-
let t =
|
|
935
|
-
return /* @__PURE__ */ y(
|
|
938
|
+
/* @__PURE__ */ y(ie, {
|
|
939
|
+
open: te,
|
|
940
|
+
onOpenChange: ne,
|
|
941
|
+
children: [/* @__PURE__ */ v(re, { render: (e) => {
|
|
942
|
+
let t = Ce(w.buttonTone, w.buttonStyle);
|
|
943
|
+
return /* @__PURE__ */ y(s, {
|
|
936
944
|
...e,
|
|
937
|
-
id:
|
|
945
|
+
id: E,
|
|
938
946
|
tone: t.tone,
|
|
939
947
|
buttonStyle: t.buttonStyle,
|
|
940
|
-
|
|
941
|
-
"aria-
|
|
942
|
-
|
|
948
|
+
size: T,
|
|
949
|
+
"aria-invalid": k,
|
|
950
|
+
"aria-describedby": A,
|
|
951
|
+
className: r(Ne(T), !z && "text-muted-foreground", e.className),
|
|
943
952
|
disabled: w.disabled,
|
|
944
|
-
children: [/* @__PURE__ */ v(
|
|
953
|
+
children: [/* @__PURE__ */ v(se, {
|
|
954
|
+
className: m[T],
|
|
955
|
+
"aria-hidden": "true"
|
|
956
|
+
}), /* @__PURE__ */ v(i, {
|
|
945
957
|
tag: "span",
|
|
946
958
|
size: "inherit",
|
|
947
959
|
lineHeight: "tight",
|
|
948
960
|
className: "min-w-0 truncate text-inherit",
|
|
949
|
-
children:
|
|
961
|
+
children: Se
|
|
950
962
|
})]
|
|
951
963
|
});
|
|
952
|
-
} }), /* @__PURE__ */ y(
|
|
964
|
+
} }), /* @__PURE__ */ y(ae, {
|
|
953
965
|
inset: "flush",
|
|
954
966
|
className: "w-auto gap-0",
|
|
955
967
|
align: "start",
|
|
956
968
|
children: [
|
|
957
|
-
!!w.header && /* @__PURE__ */ v(
|
|
958
|
-
/* @__PURE__ */ v(
|
|
969
|
+
!!w.header && /* @__PURE__ */ v(Ae, { config: w.header }),
|
|
970
|
+
/* @__PURE__ */ v(Oe, {
|
|
959
971
|
mode: "single",
|
|
960
|
-
selected:
|
|
961
|
-
onSelect:
|
|
962
|
-
defaultMonth:
|
|
972
|
+
selected: z,
|
|
973
|
+
onSelect: be,
|
|
974
|
+
defaultMonth: z,
|
|
963
975
|
numberOfMonths: w.numberOfMonths,
|
|
964
976
|
showOutsideDays: w.showOutsideDays,
|
|
965
977
|
disabled: p ?? w.disabled,
|
|
@@ -967,21 +979,21 @@ function Ke({ value: e, defaultValue: t, onValueChange: n, format: o = "yyyy-MM-
|
|
|
967
979
|
captionLayout: x,
|
|
968
980
|
startMonth: S.startMonth,
|
|
969
981
|
endMonth: S.endMonth,
|
|
970
|
-
...
|
|
982
|
+
...h
|
|
971
983
|
}),
|
|
972
|
-
!!f?.enabled && /* @__PURE__ */ y(
|
|
984
|
+
!!f?.enabled && /* @__PURE__ */ y(oe, { children: [/* @__PURE__ */ v(ee, {}), /* @__PURE__ */ y("div", {
|
|
973
985
|
className: "p-surface",
|
|
974
|
-
children: [/* @__PURE__ */ v(
|
|
986
|
+
children: [/* @__PURE__ */ v(o, {
|
|
975
987
|
size: "md",
|
|
976
988
|
children: g.startTime
|
|
977
989
|
}), /* @__PURE__ */ y("div", {
|
|
978
990
|
className: "mt-space-md flex items-center gap-space-md",
|
|
979
|
-
children: [/* @__PURE__ */ v(
|
|
980
|
-
value:
|
|
981
|
-
onValueChange:
|
|
982
|
-
format:
|
|
983
|
-
precision:
|
|
984
|
-
step:
|
|
991
|
+
children: [/* @__PURE__ */ v(ce, { className: "h-4 w-4 text-muted-foreground" }), /* @__PURE__ */ v(Je, {
|
|
992
|
+
value: V ? ue(V, F) : null,
|
|
993
|
+
onValueChange: W,
|
|
994
|
+
format: N,
|
|
995
|
+
precision: F ? "seconds" : "minutes",
|
|
996
|
+
step: P,
|
|
985
997
|
disabled: w.disabled,
|
|
986
998
|
size: "sm",
|
|
987
999
|
strings: {
|
|
@@ -994,164 +1006,168 @@ function Ke({ value: e, defaultValue: t, onValueChange: n, format: o = "yyyy-MM-
|
|
|
994
1006
|
})]
|
|
995
1007
|
})]
|
|
996
1008
|
})] }),
|
|
997
|
-
!!w.footer && /* @__PURE__ */ v(
|
|
1009
|
+
!!w.footer && /* @__PURE__ */ v(ke, {
|
|
998
1010
|
config: w.footer,
|
|
999
|
-
output:
|
|
1000
|
-
hasSelection: !!
|
|
1001
|
-
autoSummary:
|
|
1011
|
+
output: ye(z),
|
|
1012
|
+
hasSelection: !!z,
|
|
1013
|
+
autoSummary: we
|
|
1002
1014
|
})
|
|
1003
1015
|
]
|
|
1004
1016
|
})]
|
|
1005
1017
|
}),
|
|
1006
|
-
!!
|
|
1007
|
-
id:
|
|
1018
|
+
!!k && /* @__PURE__ */ v(i, {
|
|
1019
|
+
id: O,
|
|
1008
1020
|
size: "xs",
|
|
1009
1021
|
type: "error",
|
|
1010
|
-
content:
|
|
1022
|
+
content: M
|
|
1011
1023
|
})
|
|
1012
1024
|
]
|
|
1013
1025
|
});
|
|
1014
1026
|
}
|
|
1015
1027
|
//#endregion
|
|
1016
1028
|
//#region src/components/base/date-pickers/date-picker-multiple.tsx
|
|
1017
|
-
function
|
|
1018
|
-
let E = _.useId(),
|
|
1029
|
+
function Xe({ value: e, defaultValue: t, onValueChange: n, format: a = "yyyy-MM-dd", readableFormat: c = "PPP", placeholder: l, min: u, max: f, required: p, closeOnSelect: h = !1, disabledDates: te, calendarProps: ne, open: g, setOpen: b, t: x, dateFnsLocale: S, captionLayout: ce, yearBounds: C, rootRef: w, ...T }) {
|
|
1030
|
+
let E = je(T.size), D = _.useId(), O = `${D}-description`, k = T.error !== void 0 && T.error !== null && T.error !== "", A = k ? O : void 0, j = T.hint !== void 0 && T.hint !== null && T.hint !== "", M = typeof T.error == "string" ? T.error : "", le = typeof T.hint == "string" ? T.hint : "", [N, P] = _.useState(e ?? t ?? []);
|
|
1019
1031
|
_.useEffect(() => {
|
|
1020
|
-
e !== void 0 &&
|
|
1032
|
+
e !== void 0 && P(e);
|
|
1021
1033
|
}, [e]);
|
|
1022
|
-
let
|
|
1023
|
-
|
|
1034
|
+
let F = _.useCallback((e) => _e(e, a, c, S), [
|
|
1035
|
+
a,
|
|
1024
1036
|
c,
|
|
1025
1037
|
S
|
|
1026
|
-
]),
|
|
1038
|
+
]), I = _.useCallback((e) => {
|
|
1027
1039
|
let t = Array.isArray(e) ? e : e ? [e] : [];
|
|
1028
|
-
|
|
1040
|
+
P(t), n?.(F(t)), h && t.length > 0 && b(!1);
|
|
1029
1041
|
}, [
|
|
1030
1042
|
n,
|
|
1031
|
-
|
|
1032
|
-
|
|
1043
|
+
F,
|
|
1044
|
+
h,
|
|
1033
1045
|
b
|
|
1034
|
-
]),
|
|
1035
|
-
|
|
1046
|
+
]), L = _.useMemo(() => xe(N, c, l, x.selectDates, x, S), [
|
|
1047
|
+
N,
|
|
1036
1048
|
c,
|
|
1037
1049
|
l,
|
|
1038
1050
|
x,
|
|
1039
1051
|
S
|
|
1040
|
-
]),
|
|
1041
|
-
|
|
1052
|
+
]), ue = _.useMemo(() => W(N, u, f, p, x), [
|
|
1053
|
+
N,
|
|
1042
1054
|
u,
|
|
1043
1055
|
f,
|
|
1044
1056
|
p,
|
|
1045
1057
|
x
|
|
1046
|
-
]),
|
|
1058
|
+
]), R = _.useMemo(() => N.length > 0 ? x.datesSelected(N.length) : void 0, [N.length, x]);
|
|
1047
1059
|
return /* @__PURE__ */ y(d, {
|
|
1048
1060
|
ref: w,
|
|
1049
1061
|
gap: "md",
|
|
1050
1062
|
className: T.className,
|
|
1051
1063
|
children: [
|
|
1052
|
-
!!(T.label ||
|
|
1064
|
+
!!(T.label || j) && /* @__PURE__ */ y(d, {
|
|
1053
1065
|
direction: "horizontal",
|
|
1054
1066
|
align: "center",
|
|
1055
1067
|
justify: "between",
|
|
1056
1068
|
gap: "xs",
|
|
1057
|
-
children: [!!T.label && /* @__PURE__ */ v(
|
|
1058
|
-
htmlFor:
|
|
1059
|
-
className: r("leading-6",
|
|
1069
|
+
children: [!!T.label && /* @__PURE__ */ v(o, {
|
|
1070
|
+
htmlFor: D,
|
|
1071
|
+
className: r("leading-6", k && "text-destructive"),
|
|
1060
1072
|
children: T.label
|
|
1061
|
-
}), !
|
|
1073
|
+
}), !k && !!j && /* @__PURE__ */ v(i, {
|
|
1062
1074
|
tag: "span",
|
|
1063
1075
|
size: "xs",
|
|
1064
1076
|
type: "secondary",
|
|
1065
|
-
children:
|
|
1077
|
+
children: le
|
|
1066
1078
|
})]
|
|
1067
1079
|
}),
|
|
1068
|
-
/* @__PURE__ */ y(
|
|
1080
|
+
/* @__PURE__ */ y(ie, {
|
|
1069
1081
|
open: g,
|
|
1070
1082
|
onOpenChange: b,
|
|
1071
|
-
children: [/* @__PURE__ */ v(
|
|
1072
|
-
let t =
|
|
1073
|
-
return /* @__PURE__ */ y(
|
|
1083
|
+
children: [/* @__PURE__ */ v(re, { render: (e) => {
|
|
1084
|
+
let t = Ce(T.buttonTone, T.buttonStyle);
|
|
1085
|
+
return /* @__PURE__ */ y(s, {
|
|
1074
1086
|
...e,
|
|
1075
|
-
id:
|
|
1087
|
+
id: D,
|
|
1076
1088
|
tone: t.tone,
|
|
1077
1089
|
buttonStyle: t.buttonStyle,
|
|
1078
|
-
|
|
1079
|
-
"aria-
|
|
1080
|
-
|
|
1090
|
+
size: E,
|
|
1091
|
+
"aria-invalid": k,
|
|
1092
|
+
"aria-describedby": A,
|
|
1093
|
+
className: r(Ne(E), N.length === 0 && "text-muted-foreground", e.className),
|
|
1081
1094
|
disabled: T.disabled,
|
|
1082
|
-
children: [/* @__PURE__ */ v(
|
|
1095
|
+
children: [/* @__PURE__ */ v(se, {
|
|
1096
|
+
className: m[E],
|
|
1097
|
+
"aria-hidden": "true"
|
|
1098
|
+
}), /* @__PURE__ */ v(i, {
|
|
1083
1099
|
tag: "span",
|
|
1084
1100
|
size: "inherit",
|
|
1085
1101
|
lineHeight: "tight",
|
|
1086
1102
|
className: "min-w-0 truncate text-inherit",
|
|
1087
|
-
children:
|
|
1103
|
+
children: L
|
|
1088
1104
|
})]
|
|
1089
1105
|
});
|
|
1090
|
-
} }), /* @__PURE__ */ y(
|
|
1106
|
+
} }), /* @__PURE__ */ y(ae, {
|
|
1091
1107
|
inset: "flush",
|
|
1092
1108
|
className: "w-auto gap-0",
|
|
1093
1109
|
align: "start",
|
|
1094
1110
|
children: [
|
|
1095
|
-
!!T.header && /* @__PURE__ */ v(
|
|
1096
|
-
/* @__PURE__ */ v(
|
|
1111
|
+
!!T.header && /* @__PURE__ */ v(Ae, { config: T.header }),
|
|
1112
|
+
/* @__PURE__ */ v(Oe, {
|
|
1097
1113
|
mode: "multiple",
|
|
1098
|
-
selected:
|
|
1099
|
-
onSelect:
|
|
1100
|
-
defaultMonth:
|
|
1114
|
+
selected: N,
|
|
1115
|
+
onSelect: I,
|
|
1116
|
+
defaultMonth: N[0],
|
|
1101
1117
|
numberOfMonths: T.numberOfMonths,
|
|
1102
1118
|
showOutsideDays: T.showOutsideDays,
|
|
1103
|
-
disabled:
|
|
1119
|
+
disabled: te ?? T.disabled,
|
|
1104
1120
|
locale: S,
|
|
1105
|
-
captionLayout:
|
|
1121
|
+
captionLayout: ce,
|
|
1106
1122
|
startMonth: C.startMonth,
|
|
1107
1123
|
endMonth: C.endMonth,
|
|
1108
1124
|
required: p,
|
|
1109
1125
|
max: f,
|
|
1110
|
-
...
|
|
1126
|
+
...ne
|
|
1111
1127
|
}),
|
|
1112
|
-
!!
|
|
1128
|
+
!!ue && /* @__PURE__ */ y(oe, { children: [/* @__PURE__ */ v(ee, {}), /* @__PURE__ */ v("div", {
|
|
1113
1129
|
className: "p-surface",
|
|
1114
|
-
children: /* @__PURE__ */ v(
|
|
1130
|
+
children: /* @__PURE__ */ v(i, {
|
|
1115
1131
|
type: "secondary",
|
|
1116
|
-
children:
|
|
1132
|
+
children: ue
|
|
1117
1133
|
})
|
|
1118
1134
|
})] }),
|
|
1119
|
-
!!T.footer && /* @__PURE__ */ v(
|
|
1135
|
+
!!T.footer && /* @__PURE__ */ v(ke, {
|
|
1120
1136
|
config: T.footer,
|
|
1121
|
-
output: N
|
|
1122
|
-
hasSelection:
|
|
1123
|
-
autoSummary:
|
|
1137
|
+
output: F(N),
|
|
1138
|
+
hasSelection: N.length > 0,
|
|
1139
|
+
autoSummary: R
|
|
1124
1140
|
})
|
|
1125
1141
|
]
|
|
1126
1142
|
})]
|
|
1127
1143
|
}),
|
|
1128
|
-
!!
|
|
1129
|
-
id:
|
|
1144
|
+
!!k && /* @__PURE__ */ v(i, {
|
|
1145
|
+
id: O,
|
|
1130
1146
|
size: "xs",
|
|
1131
1147
|
type: "error",
|
|
1132
|
-
content:
|
|
1148
|
+
content: M
|
|
1133
1149
|
})
|
|
1134
1150
|
]
|
|
1135
1151
|
});
|
|
1136
1152
|
}
|
|
1137
1153
|
//#endregion
|
|
1138
1154
|
//#region src/components/base/date-pickers/date-picker-range.tsx
|
|
1139
|
-
function
|
|
1140
|
-
let
|
|
1155
|
+
function Ze({ value: t, defaultValue: n, onValueChange: a, format: c = "yyyy-MM-dd", readableFormat: l = "PPP", placeholder: f, withConfirm: p = !1, min: h, max: te, closeOnSelect: ne = !0, withTime: b, presets: x, disabledDates: S, calendarProps: C, open: w, setOpen: T, t: E, dateFnsLocale: O, captionLayout: k, yearBounds: A, rootRef: j, ...M }) {
|
|
1156
|
+
let le = g(), N = M.numberOfMonths ?? (le ? 1 : 2), { weekStartsOn: P = 1 } = e(), F = x ?? De(E, P), I = je(M.size), de = _.useId(), z = `${de}-description`, B = M.error !== void 0 && M.error !== null && M.error !== "", V = B ? z : void 0, he = M.hint !== void 0 && M.hint !== null && M.hint !== "", ge = typeof M.error == "string" ? M.error : "", _e = typeof M.hint == "string" ? M.hint : "", U = b?.format ?? "24", W = b?.step ?? 60, G = b?.showSeconds ?? !1, xe = me(l), we = b?.showTimeInButton ?? !xe, Te = b?.showTimeInSummary ?? !xe, Ee = t ?? n, [K, Me] = _.useState(Ee), [q, Pe] = _.useState(() => Ee?.from ? R(Ee.from, G, W) : null), [J, Fe] = _.useState(() => Ee?.to ? R(Ee.to, G, W) : null), Ie = _.useRef(t), Le = _.useMemo(() => be(K, h, te, E), [
|
|
1141
1157
|
K,
|
|
1142
|
-
m,
|
|
1143
1158
|
h,
|
|
1159
|
+
te,
|
|
1144
1160
|
E
|
|
1145
|
-
]),
|
|
1161
|
+
]), Re = Le != null && Le !== "", ze = typeof Le == "string" ? Le : "";
|
|
1146
1162
|
_.useEffect(() => {
|
|
1147
|
-
t !== void 0 &&
|
|
1163
|
+
t !== void 0 && Me(t);
|
|
1148
1164
|
}, [t]), _.useEffect(() => {
|
|
1149
1165
|
if (!b?.enabled) {
|
|
1150
|
-
|
|
1166
|
+
Ie.current = t;
|
|
1151
1167
|
return;
|
|
1152
1168
|
}
|
|
1153
|
-
let e =
|
|
1154
|
-
n ?
|
|
1169
|
+
let e = Ie.current, n = t?.from, r = t?.to;
|
|
1170
|
+
n ? Pe(R(n, G, W)) : e?.from && Pe(null), r ? Fe(R(r, G, W)) : e?.to && Fe(null), Ie.current = t;
|
|
1155
1171
|
}, [
|
|
1156
1172
|
t,
|
|
1157
1173
|
b?.enabled,
|
|
@@ -1161,10 +1177,10 @@ function Je({ value: t, defaultValue: n, onValueChange: o, format: c = "yyyy-MM-
|
|
|
1161
1177
|
if (!b?.enabled) return;
|
|
1162
1178
|
let e = (e) => {
|
|
1163
1179
|
if (!e) return e;
|
|
1164
|
-
let t =
|
|
1180
|
+
let t = fe(e, W, G);
|
|
1165
1181
|
return e.hours === t.hours && e.minutes === t.minutes && e.seconds === t.seconds ? e : t;
|
|
1166
1182
|
};
|
|
1167
|
-
|
|
1183
|
+
Pe(e), Fe(e);
|
|
1168
1184
|
}, [
|
|
1169
1185
|
b?.enabled,
|
|
1170
1186
|
W,
|
|
@@ -1174,9 +1190,9 @@ function Je({ value: t, defaultValue: n, onValueChange: o, format: c = "yyyy-MM-
|
|
|
1174
1190
|
let t = e;
|
|
1175
1191
|
return e && b?.enabled && (t = {
|
|
1176
1192
|
...e,
|
|
1177
|
-
from: e.from && q ?
|
|
1178
|
-
to: e.to && J ?
|
|
1179
|
-
}),
|
|
1193
|
+
from: e.from && q ? ve(e.from, q) : e.from,
|
|
1194
|
+
to: e.to && J ? ve(e.to, J) : e.to
|
|
1195
|
+
}), H(t, c, l, O);
|
|
1180
1196
|
}, [
|
|
1181
1197
|
c,
|
|
1182
1198
|
l,
|
|
@@ -1185,12 +1201,12 @@ function Je({ value: t, defaultValue: n, onValueChange: o, format: c = "yyyy-MM-
|
|
|
1185
1201
|
q,
|
|
1186
1202
|
J
|
|
1187
1203
|
]), X = _.useCallback((e) => {
|
|
1188
|
-
let t =
|
|
1189
|
-
t &&
|
|
1190
|
-
}, []),
|
|
1191
|
-
let t =
|
|
1192
|
-
t &&
|
|
1193
|
-
}, []),
|
|
1204
|
+
let t = L(e ?? void 0);
|
|
1205
|
+
t && Pe(t);
|
|
1206
|
+
}, []), Be = _.useCallback((e) => {
|
|
1207
|
+
let t = L(e ?? void 0);
|
|
1208
|
+
t && Fe(t);
|
|
1209
|
+
}, []), Ve = _.useCallback((e, t, n) => t ? !n?.from || n.to ? {
|
|
1194
1210
|
from: t,
|
|
1195
1211
|
to: void 0
|
|
1196
1212
|
} : t < n.from ? {
|
|
@@ -1200,34 +1216,34 @@ function Je({ value: t, defaultValue: n, onValueChange: o, format: c = "yyyy-MM-
|
|
|
1200
1216
|
from: n.from,
|
|
1201
1217
|
to: t
|
|
1202
1218
|
} : e, []), Z = _.useCallback((e, t) => {
|
|
1203
|
-
let n =
|
|
1204
|
-
if (
|
|
1205
|
-
|
|
1206
|
-
let r = !!(n?.from && n?.to), i =
|
|
1207
|
-
|
|
1219
|
+
let n = Ve(e, t, K);
|
|
1220
|
+
if (Me(n), p || b?.enabled) return;
|
|
1221
|
+
a?.(Y(n));
|
|
1222
|
+
let r = !!(n?.from && n?.to), i = ye(n, h, te).isValid;
|
|
1223
|
+
ne && r && i && T(!1);
|
|
1208
1224
|
}, [
|
|
1209
1225
|
K,
|
|
1210
|
-
|
|
1226
|
+
Ve,
|
|
1211
1227
|
p,
|
|
1212
1228
|
b,
|
|
1213
|
-
|
|
1229
|
+
a,
|
|
1214
1230
|
Y,
|
|
1215
|
-
m,
|
|
1216
1231
|
h,
|
|
1217
1232
|
te,
|
|
1233
|
+
ne,
|
|
1218
1234
|
T
|
|
1219
|
-
]),
|
|
1235
|
+
]), He = _.useCallback((e) => {
|
|
1220
1236
|
let t = e.getValue();
|
|
1221
1237
|
Z(t);
|
|
1222
|
-
}, [Z]),
|
|
1223
|
-
|
|
1238
|
+
}, [Z]), Ue = _.useCallback(() => {
|
|
1239
|
+
a?.(Y(K)), T(!1);
|
|
1224
1240
|
}, [
|
|
1225
1241
|
K,
|
|
1226
|
-
|
|
1242
|
+
a,
|
|
1227
1243
|
Y,
|
|
1228
1244
|
T
|
|
1229
1245
|
]), Q = _.useMemo(() => {
|
|
1230
|
-
if (b?.enabled && q) return
|
|
1246
|
+
if (b?.enabled && q) return pe(q, G, U, {
|
|
1231
1247
|
am: E.am,
|
|
1232
1248
|
pm: E.pm
|
|
1233
1249
|
});
|
|
@@ -1238,7 +1254,7 @@ function Je({ value: t, defaultValue: n, onValueChange: o, format: c = "yyyy-MM-
|
|
|
1238
1254
|
U,
|
|
1239
1255
|
E
|
|
1240
1256
|
]), $ = _.useMemo(() => {
|
|
1241
|
-
if (b?.enabled && J) return
|
|
1257
|
+
if (b?.enabled && J) return pe(J, G, U, {
|
|
1242
1258
|
am: E.am,
|
|
1243
1259
|
pm: E.pm
|
|
1244
1260
|
});
|
|
@@ -1248,118 +1264,122 @@ function Je({ value: t, defaultValue: n, onValueChange: o, format: c = "yyyy-MM-
|
|
|
1248
1264
|
G,
|
|
1249
1265
|
U,
|
|
1250
1266
|
E
|
|
1251
|
-
]),
|
|
1267
|
+
]), We = _.useMemo(() => {
|
|
1252
1268
|
if (b?.enabled && K?.from) {
|
|
1253
|
-
let e = D(K.from, l, { locale: O }), t =
|
|
1269
|
+
let e = D(K.from, l, { locale: O }), t = we && Q ? `${e} ${Q}` : e;
|
|
1254
1270
|
if (K.to) {
|
|
1255
1271
|
let e = D(K.to, l, { locale: O });
|
|
1256
|
-
return `${t} - ${
|
|
1272
|
+
return `${t} - ${we && $ ? `${e} ${$}` : e}`;
|
|
1257
1273
|
}
|
|
1258
1274
|
return t;
|
|
1259
1275
|
}
|
|
1260
|
-
return
|
|
1276
|
+
return Se(K, l, f, E.selectDateRange, O);
|
|
1261
1277
|
}, [
|
|
1262
1278
|
b?.enabled,
|
|
1263
1279
|
K,
|
|
1264
1280
|
l,
|
|
1265
|
-
|
|
1281
|
+
we,
|
|
1266
1282
|
Q,
|
|
1267
1283
|
$,
|
|
1268
1284
|
f,
|
|
1269
1285
|
E,
|
|
1270
1286
|
O
|
|
1271
|
-
]),
|
|
1287
|
+
]), Ge = _.useMemo(() => {
|
|
1272
1288
|
if (!K?.from || !K?.to) return;
|
|
1273
1289
|
let e = D(K.from, l, { locale: O }), t = D(K.to, l, { locale: O });
|
|
1274
|
-
return `${
|
|
1290
|
+
return `${Te && Q ? `${e} ${Q}` : e} - ${Te && $ ? `${t} ${$}` : t}`;
|
|
1275
1291
|
}, [
|
|
1276
1292
|
K,
|
|
1277
1293
|
l,
|
|
1278
1294
|
O,
|
|
1279
|
-
|
|
1295
|
+
Te,
|
|
1280
1296
|
Q,
|
|
1281
1297
|
$
|
|
1282
1298
|
]);
|
|
1283
1299
|
return /* @__PURE__ */ y(d, {
|
|
1284
|
-
ref:
|
|
1300
|
+
ref: j,
|
|
1285
1301
|
gap: "md",
|
|
1286
|
-
className:
|
|
1302
|
+
className: M.className,
|
|
1287
1303
|
children: [
|
|
1288
|
-
!!(
|
|
1304
|
+
!!(M.label || he) && /* @__PURE__ */ y(d, {
|
|
1289
1305
|
direction: "horizontal",
|
|
1290
1306
|
align: "center",
|
|
1291
1307
|
justify: "between",
|
|
1292
1308
|
gap: "xs",
|
|
1293
|
-
children: [!!
|
|
1294
|
-
htmlFor:
|
|
1295
|
-
className: r("leading-6",
|
|
1296
|
-
children:
|
|
1297
|
-
}), !
|
|
1309
|
+
children: [!!M.label && /* @__PURE__ */ v(o, {
|
|
1310
|
+
htmlFor: de,
|
|
1311
|
+
className: r("leading-6", B && "text-destructive"),
|
|
1312
|
+
children: M.label
|
|
1313
|
+
}), !B && !!he && /* @__PURE__ */ v(i, {
|
|
1298
1314
|
tag: "span",
|
|
1299
1315
|
size: "xs",
|
|
1300
1316
|
type: "secondary",
|
|
1301
|
-
children:
|
|
1317
|
+
children: _e
|
|
1302
1318
|
})]
|
|
1303
1319
|
}),
|
|
1304
|
-
/* @__PURE__ */ y(
|
|
1320
|
+
/* @__PURE__ */ y(ie, {
|
|
1305
1321
|
open: w,
|
|
1306
1322
|
onOpenChange: T,
|
|
1307
|
-
children: [/* @__PURE__ */ v(
|
|
1308
|
-
let t =
|
|
1309
|
-
return /* @__PURE__ */ y(
|
|
1323
|
+
children: [/* @__PURE__ */ v(re, { render: (e) => {
|
|
1324
|
+
let t = Ce(M.buttonTone, M.buttonStyle);
|
|
1325
|
+
return /* @__PURE__ */ y(s, {
|
|
1310
1326
|
...e,
|
|
1311
|
-
id:
|
|
1327
|
+
id: de,
|
|
1312
1328
|
tone: t.tone,
|
|
1313
1329
|
buttonStyle: t.buttonStyle,
|
|
1314
|
-
|
|
1315
|
-
"aria-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1330
|
+
size: I,
|
|
1331
|
+
"aria-invalid": B,
|
|
1332
|
+
"aria-describedby": V,
|
|
1333
|
+
className: r(Ne(I), !K && "text-muted-foreground", e.className),
|
|
1334
|
+
disabled: M.disabled,
|
|
1335
|
+
children: [/* @__PURE__ */ v(se, {
|
|
1336
|
+
className: r(m[I], "shrink-0"),
|
|
1337
|
+
"aria-hidden": "true"
|
|
1338
|
+
}), /* @__PURE__ */ v(i, {
|
|
1319
1339
|
tag: "span",
|
|
1320
1340
|
size: "inherit",
|
|
1321
1341
|
lineHeight: "tight",
|
|
1322
1342
|
className: "min-w-0 truncate text-inherit",
|
|
1323
|
-
children:
|
|
1343
|
+
children: We
|
|
1324
1344
|
})]
|
|
1325
1345
|
});
|
|
1326
|
-
} }), /* @__PURE__ */ y(
|
|
1346
|
+
} }), /* @__PURE__ */ y(ae, {
|
|
1327
1347
|
inset: "flush",
|
|
1328
1348
|
className: "w-auto gap-0",
|
|
1329
1349
|
align: "start",
|
|
1330
|
-
children: [!!
|
|
1350
|
+
children: [!!M.header && /* @__PURE__ */ v(Ae, { config: M.header }), /* @__PURE__ */ y("div", {
|
|
1331
1351
|
className: "flex flex-col sm:flex-row",
|
|
1332
|
-
children: [
|
|
1352
|
+
children: [F.length > 0 && /* @__PURE__ */ v("div", {
|
|
1333
1353
|
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",
|
|
1334
|
-
children:
|
|
1354
|
+
children: F.map((e) => /* @__PURE__ */ v(s, {
|
|
1335
1355
|
tone: "secondary",
|
|
1336
1356
|
buttonStyle: "ghost",
|
|
1337
|
-
onClick: () =>
|
|
1338
|
-
className: "justify-start
|
|
1357
|
+
onClick: () => He(e),
|
|
1358
|
+
className: "justify-start text-muted-foreground hover:text-foreground",
|
|
1339
1359
|
children: e.label
|
|
1340
1360
|
}, e.label))
|
|
1341
1361
|
}), /* @__PURE__ */ y("div", {
|
|
1342
1362
|
className: "flex flex-col",
|
|
1343
|
-
children: [/* @__PURE__ */ v(
|
|
1363
|
+
children: [/* @__PURE__ */ v(Oe, {
|
|
1344
1364
|
mode: "range",
|
|
1345
1365
|
selected: K,
|
|
1346
1366
|
onSelect: Z,
|
|
1347
1367
|
defaultMonth: K?.from,
|
|
1348
|
-
numberOfMonths:
|
|
1349
|
-
showOutsideDays:
|
|
1350
|
-
disabled: S ??
|
|
1368
|
+
numberOfMonths: N,
|
|
1369
|
+
showOutsideDays: M.showOutsideDays,
|
|
1370
|
+
disabled: S ?? M.disabled,
|
|
1351
1371
|
locale: O,
|
|
1352
|
-
captionLayout:
|
|
1353
|
-
startMonth:
|
|
1354
|
-
endMonth:
|
|
1372
|
+
captionLayout: k,
|
|
1373
|
+
startMonth: A.startMonth,
|
|
1374
|
+
endMonth: A.endMonth,
|
|
1355
1375
|
...C,
|
|
1356
1376
|
className: r("[--cell-size:1.875rem] sm:[--cell-size:--spacing(8)]", C?.className)
|
|
1357
|
-
}), !!(K?.from ||
|
|
1377
|
+
}), !!(K?.from || Le || p || b?.enabled || M.footer) && /* @__PURE__ */ y(oe, { children: [/* @__PURE__ */ v(ee, {}), /* @__PURE__ */ v("div", {
|
|
1358
1378
|
className: "p-surface",
|
|
1359
1379
|
children: /* @__PURE__ */ y(d, {
|
|
1360
1380
|
gap: "lg",
|
|
1361
1381
|
children: [
|
|
1362
|
-
!!K?.from && !
|
|
1382
|
+
!!K?.from && !M.footer && /* @__PURE__ */ y(d, {
|
|
1363
1383
|
direction: "horizontal",
|
|
1364
1384
|
align: "center",
|
|
1365
1385
|
justify: "between",
|
|
@@ -1368,27 +1388,27 @@ function Je({ value: t, defaultValue: n, onValueChange: o, format: c = "yyyy-MM-
|
|
|
1368
1388
|
direction: "horizontal",
|
|
1369
1389
|
align: "center",
|
|
1370
1390
|
gap: "md",
|
|
1371
|
-
children: [/* @__PURE__ */ y(
|
|
1391
|
+
children: [/* @__PURE__ */ y(i, {
|
|
1372
1392
|
tag: "span",
|
|
1373
1393
|
type: "secondary",
|
|
1374
1394
|
children: [E.from, ":"]
|
|
1375
|
-
}), /* @__PURE__ */ y(
|
|
1395
|
+
}), /* @__PURE__ */ y(i, {
|
|
1376
1396
|
tag: "span",
|
|
1377
1397
|
weight: "medium",
|
|
1378
|
-
children: [D(K.from, l, { locale: O }),
|
|
1398
|
+
children: [D(K.from, l, { locale: O }), Te && Q ? ` ${Q}` : ""]
|
|
1379
1399
|
})]
|
|
1380
1400
|
}), !!K.to && /* @__PURE__ */ y(d, {
|
|
1381
1401
|
direction: "horizontal",
|
|
1382
1402
|
align: "center",
|
|
1383
1403
|
gap: "md",
|
|
1384
|
-
children: [/* @__PURE__ */ y(
|
|
1404
|
+
children: [/* @__PURE__ */ y(i, {
|
|
1385
1405
|
tag: "span",
|
|
1386
1406
|
type: "secondary",
|
|
1387
1407
|
children: [E.to, ":"]
|
|
1388
|
-
}), /* @__PURE__ */ y(
|
|
1408
|
+
}), /* @__PURE__ */ y(i, {
|
|
1389
1409
|
tag: "span",
|
|
1390
1410
|
weight: "medium",
|
|
1391
|
-
children: [D(K.to, l, { locale: O }),
|
|
1411
|
+
children: [D(K.to, l, { locale: O }), Te && $ ? ` ${$}` : ""]
|
|
1392
1412
|
})]
|
|
1393
1413
|
})]
|
|
1394
1414
|
}),
|
|
@@ -1398,18 +1418,18 @@ function Je({ value: t, defaultValue: n, onValueChange: o, format: c = "yyyy-MM-
|
|
|
1398
1418
|
sm: 2
|
|
1399
1419
|
},
|
|
1400
1420
|
gap: "lg",
|
|
1401
|
-
children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v(
|
|
1421
|
+
children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v(o, {
|
|
1402
1422
|
size: "sm",
|
|
1403
1423
|
children: E.startTime
|
|
1404
1424
|
}), /* @__PURE__ */ y("div", {
|
|
1405
1425
|
className: "mt-1 flex items-center gap-space-md",
|
|
1406
|
-
children: [/* @__PURE__ */ v(
|
|
1426
|
+
children: [/* @__PURE__ */ v(ce, { className: "h-3 w-3 text-muted-foreground" }), /* @__PURE__ */ v(Je, {
|
|
1407
1427
|
value: q ? ue(q, G) : null,
|
|
1408
1428
|
onValueChange: X,
|
|
1409
1429
|
format: U,
|
|
1410
1430
|
precision: G ? "seconds" : "minutes",
|
|
1411
1431
|
step: W,
|
|
1412
|
-
disabled:
|
|
1432
|
+
disabled: M.disabled,
|
|
1413
1433
|
size: "sm",
|
|
1414
1434
|
strings: {
|
|
1415
1435
|
hours: E.hours,
|
|
@@ -1419,18 +1439,18 @@ function Je({ value: t, defaultValue: n, onValueChange: o, format: c = "yyyy-MM-
|
|
|
1419
1439
|
pm: E.pm
|
|
1420
1440
|
}
|
|
1421
1441
|
})]
|
|
1422
|
-
})] }), !!K.to && /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v(
|
|
1442
|
+
})] }), !!K.to && /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v(o, {
|
|
1423
1443
|
size: "sm",
|
|
1424
1444
|
children: E.endTime
|
|
1425
1445
|
}), /* @__PURE__ */ y("div", {
|
|
1426
1446
|
className: "mt-1 flex items-center gap-space-md",
|
|
1427
|
-
children: [/* @__PURE__ */ v(
|
|
1447
|
+
children: [/* @__PURE__ */ v(ce, { className: "h-3 w-3 text-muted-foreground" }), /* @__PURE__ */ v(Je, {
|
|
1428
1448
|
value: J ? ue(J, G) : null,
|
|
1429
|
-
onValueChange:
|
|
1449
|
+
onValueChange: Be,
|
|
1430
1450
|
format: U,
|
|
1431
1451
|
precision: G ? "seconds" : "minutes",
|
|
1432
1452
|
step: W,
|
|
1433
|
-
disabled:
|
|
1453
|
+
disabled: M.disabled,
|
|
1434
1454
|
size: "sm",
|
|
1435
1455
|
strings: {
|
|
1436
1456
|
hours: E.hours,
|
|
@@ -1442,24 +1462,24 @@ function Je({ value: t, defaultValue: n, onValueChange: o, format: c = "yyyy-MM-
|
|
|
1442
1462
|
})]
|
|
1443
1463
|
})] })]
|
|
1444
1464
|
}),
|
|
1445
|
-
/* @__PURE__ */ v(
|
|
1465
|
+
/* @__PURE__ */ v(i, {
|
|
1446
1466
|
type: "error",
|
|
1447
|
-
content:
|
|
1448
|
-
hidden: !
|
|
1467
|
+
content: ze,
|
|
1468
|
+
hidden: !Re
|
|
1449
1469
|
}),
|
|
1450
|
-
!!(p || b?.enabled) && !
|
|
1451
|
-
onClick:
|
|
1452
|
-
disabled: !K?.from || !K?.to || !!
|
|
1470
|
+
!!(p || b?.enabled) && !M.footer && /* @__PURE__ */ v(s, {
|
|
1471
|
+
onClick: Ue,
|
|
1472
|
+
disabled: !K?.from || !K?.to || !!Le,
|
|
1453
1473
|
className: "w-full",
|
|
1454
1474
|
children: E.confirm
|
|
1455
1475
|
}),
|
|
1456
|
-
!!
|
|
1476
|
+
!!M.footer && /* @__PURE__ */ v("div", {
|
|
1457
1477
|
className: "-mx-space-lg -mb-space-lg",
|
|
1458
|
-
children: /* @__PURE__ */ v(
|
|
1459
|
-
config:
|
|
1478
|
+
children: /* @__PURE__ */ v(ke, {
|
|
1479
|
+
config: M.footer,
|
|
1460
1480
|
output: Y(K),
|
|
1461
1481
|
hasSelection: !!(K?.from && K?.to),
|
|
1462
|
-
autoSummary:
|
|
1482
|
+
autoSummary: Ge
|
|
1463
1483
|
})
|
|
1464
1484
|
})
|
|
1465
1485
|
]
|
|
@@ -1469,20 +1489,20 @@ function Je({ value: t, defaultValue: n, onValueChange: o, format: c = "yyyy-MM-
|
|
|
1469
1489
|
})]
|
|
1470
1490
|
})]
|
|
1471
1491
|
}),
|
|
1472
|
-
!!
|
|
1473
|
-
id:
|
|
1492
|
+
!!B && /* @__PURE__ */ v(i, {
|
|
1493
|
+
id: z,
|
|
1474
1494
|
size: "xs",
|
|
1475
1495
|
type: "error",
|
|
1476
|
-
content:
|
|
1496
|
+
content: ge
|
|
1477
1497
|
})
|
|
1478
1498
|
]
|
|
1479
1499
|
});
|
|
1480
1500
|
}
|
|
1481
1501
|
//#endregion
|
|
1482
1502
|
//#region src/components/base/date-pickers/date-picker.tsx
|
|
1483
|
-
var
|
|
1484
|
-
let [a, o] = _.useState(!1), s = e(), c = t.locale ?? s.locale ??
|
|
1485
|
-
return
|
|
1503
|
+
var Qe = _.forwardRef(function(t, i) {
|
|
1504
|
+
let [a, o] = _.useState(!1), s = e(), c = t.locale ?? s.locale ?? N, l = n(q, t.strings), u = _.useMemo(() => t.enableYearDropdown || t.yearSelection?.enabled ? "dropdown" : "label", [t.enableYearDropdown, t.yearSelection]), d = _.useMemo(() => he(t.yearSelection), [t.yearSelection]), f = r("date-picker--component", t.className);
|
|
1505
|
+
return we(t) ? /* @__PURE__ */ v(Ye, {
|
|
1486
1506
|
...t,
|
|
1487
1507
|
rootRef: i,
|
|
1488
1508
|
className: f,
|
|
@@ -1492,7 +1512,7 @@ var Ye = _.forwardRef(function(t, i) {
|
|
|
1492
1512
|
dateFnsLocale: c,
|
|
1493
1513
|
captionLayout: u,
|
|
1494
1514
|
yearBounds: d
|
|
1495
|
-
}) :
|
|
1515
|
+
}) : Te(t) ? /* @__PURE__ */ v(Xe, {
|
|
1496
1516
|
...t,
|
|
1497
1517
|
rootRef: i,
|
|
1498
1518
|
className: f,
|
|
@@ -1502,7 +1522,7 @@ var Ye = _.forwardRef(function(t, i) {
|
|
|
1502
1522
|
dateFnsLocale: c,
|
|
1503
1523
|
captionLayout: u,
|
|
1504
1524
|
yearBounds: d
|
|
1505
|
-
}) :
|
|
1525
|
+
}) : Ee(t) ? /* @__PURE__ */ v(Ze, {
|
|
1506
1526
|
...t,
|
|
1507
1527
|
rootRef: i,
|
|
1508
1528
|
className: f,
|
|
@@ -1514,8 +1534,8 @@ var Ye = _.forwardRef(function(t, i) {
|
|
|
1514
1534
|
yearBounds: d
|
|
1515
1535
|
}) : null;
|
|
1516
1536
|
});
|
|
1517
|
-
|
|
1537
|
+
Qe.displayName = "DatePicker";
|
|
1518
1538
|
//#endregion
|
|
1519
|
-
export {
|
|
1539
|
+
export { Ne as a, ke as c, q as i, Ce as l, Je as n, je as o, Le as r, Ae as s, Qe as t };
|
|
1520
1540
|
|
|
1521
|
-
//# sourceMappingURL=date-picker-
|
|
1541
|
+
//# sourceMappingURL=date-picker-DzP5HQq7.js.map
|