themelia-react-ui 2.0.3 → 2.0.5
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 +185 -0
- package/README.md +168 -36
- package/dist/{accordion-Cjb6sx0G.js → accordion-B9MHG0cT.js} +11 -11
- package/dist/accordion-B9MHG0cT.js.map +1 -0
- package/dist/action-menu-Dr8K-ghE.js +284 -0
- package/dist/action-menu-Dr8K-ghE.js.map +1 -0
- package/dist/{affordance-geometry.generated-tF36bREk.js → affordance-geometry.generated-P-aVJisu.js} +42 -36
- package/dist/affordance-geometry.generated-P-aVJisu.js.map +1 -0
- package/dist/{ai-artifact-DvTwDVyL.js → ai-artifact-C58tQcBy.js} +387 -350
- package/dist/ai-artifact-C58tQcBy.js.map +1 -0
- package/dist/app-shell-B_IuNWOo.js +321 -0
- package/dist/app-shell-B_IuNWOo.js.map +1 -0
- package/dist/{attachment-BxDfL2mw.js → attachment-Dg_69lPS.js} +9 -9
- package/dist/{attachment-BxDfL2mw.js.map → attachment-Dg_69lPS.js.map} +1 -1
- package/dist/{auth-BGua8ouh.js → auth-DTkkshS8.js} +44 -47
- package/dist/auth-DTkkshS8.js.map +1 -0
- package/dist/{avatar-DAPlDvhJ.js → avatar-CeZaFmNH.js} +8 -8
- package/dist/avatar-CeZaFmNH.js.map +1 -0
- package/dist/{badge-HpFqoqSY.js → badge-xIiV_E7f.js} +5 -5
- package/dist/{badge-HpFqoqSY.js.map → badge-xIiV_E7f.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/batch-action-bar.js +1 -1
- package/dist/base/buttons.js +1 -1
- package/dist/base/cards.js +2 -2
- package/dist/base/carousel.js +3 -3
- package/dist/base/cascader.js +2 -372
- 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 +2 -2
- package/dist/base/command.js +1 -1
- package/dist/base/copyable.js +1 -1
- package/dist/base/date-pickers.js +2 -2
- package/dist/base/display.js +6 -6
- package/dist/base/feedback.js +3 -3
- package/dist/base/forms-numeric.js +1 -1
- package/dist/base/forms.js +3 -3
- package/dist/base/inline-edit.js +10 -10
- package/dist/base/item.js +1 -1
- package/dist/base/media-gallery.js +1 -1
- package/dist/base/metadata-list.js +1 -1
- package/dist/base/navigation.js +7 -7
- 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 +12 -12
- package/dist/base/repeaters.js.map +1 -1
- package/dist/base/sheet.js +1 -1
- package/dist/base/sidebar.js +2 -2
- package/dist/base/signature-pad.js +7 -7
- package/dist/base/signature-pad.js.map +1 -1
- package/dist/base/skeleton.js +1 -1
- package/dist/base/spinner.js +4 -4
- 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 +36 -36
- 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/{batch-action-bar-DnUJ21NQ.js → batch-action-bar-Cb8cuvyy.js} +6 -6
- package/dist/batch-action-bar-Cb8cuvyy.js.map +1 -0
- package/dist/blocks/admin.js +23 -23
- package/dist/blocks/admin.js.map +1 -1
- package/dist/blocks/ai.js +230 -216
- package/dist/blocks/ai.js.map +1 -1
- package/dist/blocks/analytics/usage-card.js +1 -1
- package/dist/blocks/analytics.js +326 -307
- package/dist/blocks/analytics.js.map +1 -1
- package/dist/blocks/collaboration.js +1 -1
- package/dist/blocks/commerce/receipt.js +1 -1
- package/dist/blocks/commerce.js +1247 -1169
- package/dist/blocks/commerce.js.map +1 -1
- package/dist/blocks/data-display.js +2 -2
- package/dist/blocks/onboarding.js +6 -6
- package/dist/blocks/onboarding.js.map +1 -1
- package/dist/blocks/planning.js +11 -11
- package/dist/blocks/timelines.js +1 -1
- package/dist/{breadcrumbs-C-oqs1sQ.js → breadcrumbs-J-K2kl4c.js} +6 -6
- package/dist/{breadcrumbs-C-oqs1sQ.js.map → breadcrumbs-J-K2kl4c.js.map} +1 -1
- package/dist/{button-DVzspB_G.js → button-S2Cubiiz.js} +3 -3
- package/dist/button-S2Cubiiz.js.map +1 -0
- package/dist/{buttons-DPZekJFu.js → buttons-BedGfygC.js} +16 -16
- package/dist/buttons-BedGfygC.js.map +1 -0
- package/dist/cards-rNX1M4Xn.js +69 -0
- package/dist/cards-rNX1M4Xn.js.map +1 -0
- package/dist/cascader-B1MiqkBq.js +439 -0
- package/dist/cascader-B1MiqkBq.js.map +1 -0
- package/dist/chart-Darg_0Kv.js +162 -0
- package/dist/chart-Darg_0Kv.js.map +1 -0
- package/dist/{checkbox-AWIhNhmo.js → checkbox-fflqmODR.js} +9 -5
- package/dist/checkbox-fflqmODR.js.map +1 -0
- package/dist/choice-inputs-zUgBZfE4.js +777 -0
- package/dist/choice-inputs-zUgBZfE4.js.map +1 -0
- package/dist/{code-block-DeneBJR_.js → code-block-BzmM9Eig.js} +9 -9
- package/dist/code-block-BzmM9Eig.js.map +1 -0
- package/dist/{collapsible-C-_l4hpy.js → collapsible-BkAI_XD4.js} +5 -5
- package/dist/{collapsible-C-_l4hpy.js.map → collapsible-BkAI_XD4.js.map} +1 -1
- package/dist/{collection-content-By56pLog.js → collection-content-gDh1v6O4.js} +3 -3
- package/dist/{collection-content-By56pLog.js.map → collection-content-gDh1v6O4.js.map} +1 -1
- package/dist/combobox-BEx0vJgF.js +362 -0
- package/dist/combobox-BEx0vJgF.js.map +1 -0
- package/dist/{combobox-Dxo2fAYQ.js → combobox-BwzoXFSG.js} +254 -247
- package/dist/combobox-BwzoXFSG.js.map +1 -0
- package/dist/{command-C25VMRII.js → command-CrlPIL6m.js} +12 -12
- package/dist/command-CrlPIL6m.js.map +1 -0
- package/dist/{comments-DD0DUPwJ.js → comments-Dmpp0YIc.js} +380 -379
- package/dist/comments-Dmpp0YIc.js.map +1 -0
- package/dist/components/base/action-menu/action-menu.d.ts +9 -1
- package/dist/components/base/buttons/button-group.recipes.d.ts +2 -2
- package/dist/components/base/cards/card.recipes.d.ts +16 -7
- package/dist/components/base/cards/partials/card-primitives.d.ts +9 -2
- package/dist/components/base/cards/partials/smart-card-header-row.d.ts +3 -1
- package/dist/components/base/cards/smart-card.types.d.ts +11 -7
- package/dist/components/base/cascader/cascader-panel.d.ts +76 -0
- package/dist/components/base/chart/chart.d.ts +6 -1
- package/dist/components/base/choice-inputs/checkbox.d.ts +7 -2
- package/dist/components/base/choice-inputs/choice-types.d.ts +1 -1
- package/dist/components/base/choice-inputs/switch-card.d.ts +7 -0
- package/dist/components/base/choice-inputs/toggle-field.d.ts +7 -0
- package/dist/components/base/combobox/index.d.ts +4 -2
- package/dist/components/base/date-pickers/datepicker.types.d.ts +7 -0
- package/dist/components/base/feedback/alert.d.ts +1 -1
- package/dist/components/base/forms/controlled-form-field.d.ts +6 -6
- package/dist/components/base/forms/form-field.d.ts +5 -3
- package/dist/components/base/forms/form-sizing.d.ts +7 -7
- package/dist/components/base/forms/index.d.ts +1 -0
- package/dist/components/base/forms/server-errors.d.ts +16 -0
- package/dist/components/base/forms/workflow.d.ts +11 -2
- package/dist/components/base/forms-numeric/coordinates-input.d.ts +4 -0
- package/dist/components/base/metadata-list/metadata-list.d.ts +3 -1
- package/dist/components/base/navigation/dropdown-menu.d.ts +1 -1
- package/dist/components/base/navigation/page-header/page-header-commands.d.ts +14 -7
- package/dist/components/base/navigation/page-header/page-header.d.ts +13 -4
- package/dist/components/base/popover/popover.d.ts +3 -3
- package/dist/components/base/popover/popover.recipes.d.ts +10 -6
- package/dist/components/base/sheet/sheet.d.ts +2 -0
- package/dist/components/base/sidebar/index.d.ts +1 -1
- package/dist/components/base/sidebar/sidebar.d.ts +27 -5
- package/dist/components/base/structure/composition.recipes.d.ts +17 -0
- package/dist/components/base/text-inputs/hooks/use-form-field-state.d.ts +7 -2
- package/dist/components/base/text-inputs/input.d.ts +4 -2
- package/dist/components/base/text-inputs/textarea.d.ts +4 -2
- package/dist/components/base/toaster/index.d.ts +1 -0
- package/dist/components/base/value-inputs/date-time-input.d.ts +2 -1
- package/dist/components/base/value-inputs/slider.d.ts +5 -1
- package/dist/components/base/value-inputs/tags-input.d.ts +5 -1
- package/dist/components/blocks/ai/ai-file-tree/types.d.ts +1 -1
- package/dist/components/blocks/ai/ai-tool-call/types.d.ts +3 -1
- package/dist/components/blocks/ai/ai.strings.d.ts +2 -0
- package/dist/components/blocks/analytics/metric-comparison/metric-comparison.d.ts +2 -0
- package/dist/components/blocks/analytics/usage-card/usage-card.strings.d.ts +2 -0
- package/dist/components/blocks/commerce/cart-summary/cart-summary.d.ts +1 -1
- package/dist/components/blocks/commerce/cart-summary/types.d.ts +3 -1
- package/dist/components/blocks/commerce/discount-stack/discount-stack.d.ts +1 -1
- package/dist/components/blocks/commerce/discount-stack/types.d.ts +3 -1
- package/dist/components/blocks/commerce/fulfillment-group/fulfillment-group.d.ts +1 -1
- package/dist/components/blocks/commerce/fulfillment-group/types.d.ts +11 -2
- package/dist/components/blocks/commerce/index.d.ts +7 -6
- package/dist/components/blocks/commerce/inventory-section/inventory-section.d.ts +1 -1
- package/dist/components/blocks/commerce/inventory-section/types.d.ts +7 -2
- package/dist/components/blocks/commerce/invoice-header/index.d.ts +2 -1
- package/dist/components/blocks/commerce/invoice-header/invoice-header.d.ts +1 -1
- package/dist/components/blocks/commerce/invoice-header/types.d.ts +20 -6
- package/dist/components/blocks/commerce/invoice-line-items/invoice-line-items.d.ts +1 -1
- package/dist/components/blocks/commerce/invoice-line-items/types.d.ts +24 -7
- package/dist/components/blocks/commerce/invoice-mini/index.d.ts +2 -1
- package/dist/components/blocks/commerce/invoice-mini/types.d.ts +7 -1
- package/dist/components/blocks/commerce/order-customer/order-customer.d.ts +1 -1
- package/dist/components/blocks/commerce/order-customer/types.d.ts +9 -1
- package/dist/components/blocks/commerce/refund-status/refund-status.d.ts +1 -1
- package/dist/components/blocks/commerce/refund-status/types.d.ts +3 -1
- package/dist/components/blocks/commerce/shipment-tracking/shipment-tracking.d.ts +1 -1
- package/dist/components/blocks/commerce/shipment-tracking/types.d.ts +3 -1
- package/dist/components/blocks/commerce/tax-breakdown/tax-breakdown.d.ts +1 -1
- package/dist/components/blocks/commerce/tax-breakdown/types.d.ts +3 -1
- package/dist/components/features/activities/activities.types.d.ts +8 -2
- package/dist/components/features/activities/partials/activity-marker.d.ts +7 -3
- package/dist/components/features/activities/partials/activity-row.d.ts +24 -0
- package/dist/components/features/event-calendar/colors.d.ts +2 -2
- package/dist/components/features/event-calendar/event-calendar.types.d.ts +4 -0
- package/dist/components/features/filters/facets/select-facet.d.ts +2 -1
- package/dist/components/features/filters/filters.strings.d.ts +4 -0
- package/dist/components/features/filters/filters.types.d.ts +3 -0
- package/dist/components/features/filters/partials/filter-editor-header.d.ts +16 -0
- package/dist/components/features/filters/partials/filter-popover-content.d.ts +1 -1
- package/dist/components/features/filters/partials/nested-filter-options.d.ts +21 -0
- package/dist/components/features/filters/partials/regular-filter-content.d.ts +2 -1
- package/dist/components/features/filters/utils/filter-utils.d.ts +21 -3
- package/dist/components/features/global-search/global-search.types.d.ts +2 -0
- package/dist/components/features/global-search/partials/global-search-input.d.ts +10 -0
- package/dist/components/features/global-search/partials/global-search-result-row.d.ts +7 -1
- package/dist/components/features/media-library/media-library.strings.d.ts +2 -0
- package/dist/components/features/media-library/media-library.types.d.ts +14 -4
- package/dist/components/features/media-library/partials/media-library-partials.d.ts +1 -1
- package/dist/components/features/products/components/product-options-matrix.d.ts +1 -1
- package/dist/components/features/products/components/product-variant-editor.d.ts +1 -1
- package/dist/components/features/products/components/product-variants-manager.d.ts +1 -1
- package/dist/components/features/products/products.strings.d.ts +9 -1
- package/dist/components/features/products/products.types.d.ts +43 -6
- package/dist/components/features/resource/resource.d.ts +5 -1
- package/dist/components/features/resource/resource.types.d.ts +12 -1
- package/dist/components/features/rich-text-editor/partials/image-uploads.d.ts +1 -1
- package/dist/components/features/rich-text-editor/rich-text-editor.recipes.d.ts +12 -2
- package/dist/components/features/table/partials/resource-cell.d.ts +22 -5
- package/dist/components/features/table/table.types.d.ts +1 -1
- package/dist/components/layout/app-shell/app-shell.types.d.ts +35 -6
- package/dist/components/layout/app-shell/index.d.ts +1 -1
- package/dist/components/layout/app-shell/shell-regions.d.ts +27 -0
- package/dist/components/layout/app-shell/sidebar-inset-layout.d.ts +1 -1
- package/dist/components/layout/app-shell/stacked-layout.d.ts +1 -1
- package/dist/components/layout/app-shell/topbar-sidebar-layout.d.ts +1 -1
- package/dist/components/layout/containers/two-column-layout.d.ts +2 -0
- package/dist/components/layout/header/header.recipes.d.ts +6 -0
- package/dist/components/layout/header/header.types.d.ts +6 -6
- package/dist/components/layout/navigation/section-nav/section-nav.d.ts +5 -0
- package/dist/components/layout/page/index.d.ts +2 -1
- package/dist/components/layout/page/page.d.ts +1 -0
- package/dist/components/layout/page/page.strings.d.ts +11 -0
- package/dist/components/layout/page/page.types.d.ts +69 -17
- package/dist/components/layout/page/partials/page-header.d.ts +1 -1
- package/dist/components/layout/settings/settings.d.ts +9 -2
- package/dist/components/layout/sidebar/app-sidebar.d.ts +1 -1
- package/dist/components/layout/sidebar/components/sidebar-grouped-navigation.d.ts +1 -1
- package/dist/components/layout/sidebar/components/sidebar-navigation.d.ts +1 -1
- package/dist/components/layout/sidebar/index.d.ts +2 -1
- package/dist/components/layout/sidebar/sidebar-navigation-rail.d.ts +36 -0
- package/dist/components/layout/sidebar/sidebar.context.d.ts +5 -7
- package/dist/components/layout/sidebar/sidebar.types.d.ts +48 -10
- package/dist/components/layout/sidebar/sidebar.utils.d.ts +9 -1
- package/dist/components/layout/workspace/workspace.types.d.ts +8 -1
- package/dist/components/typography/text.styles.d.ts +26 -1
- package/dist/components/ui/alert-dialog.d.ts +2 -2
- package/dist/components/ui/combobox.d.ts +1 -1
- package/dist/components/ui/dialog.d.ts +2 -2
- package/dist/components/ui/overlay-layer.d.ts +18 -0
- package/dist/components/ui/sheet.d.ts +5 -1
- package/dist/components/ui/sidebar-state.d.ts +82 -0
- package/dist/components/ui/sidebar.d.ts +5 -17
- package/dist/composition.recipes-COdiFhxB.js +19 -0
- package/dist/composition.recipes-COdiFhxB.js.map +1 -0
- package/dist/containers-CIxwbZt5.js +112 -0
- package/dist/containers-CIxwbZt5.js.map +1 -0
- package/dist/{control-group-recipes-DBXmfh2E.js → control-group-recipes-fMuFo0H7.js} +6 -6
- package/dist/control-group-recipes-fMuFo0H7.js.map +1 -0
- package/dist/{copyable-ClBuk_UK.js → copyable-DIznBqiT.js} +7 -7
- package/dist/{copyable-ClBuk_UK.js.map → copyable-DIznBqiT.js.map} +1 -1
- package/dist/{data-display-DT_khPl_.js → data-display-BdgCAw8T.js} +277 -285
- package/dist/data-display-BdgCAw8T.js.map +1 -0
- package/dist/{date-DCrsDTZc.js → date-Cq8ioE4o.js} +5 -5
- package/dist/{date-DCrsDTZc.js.map → date-Cq8ioE4o.js.map} +1 -1
- package/dist/{date-picker-B2K3ucWn.js → date-picker-RlIzKom_.js} +501 -480
- package/dist/date-picker-RlIzKom_.js.map +1 -0
- package/dist/date-pickers-DY-CpXS1.js +179 -0
- package/dist/date-pickers-DY-CpXS1.js.map +1 -0
- package/dist/{display-hAc1HjpI.js → display-KsZLw9Ov.js} +9 -9
- package/dist/{display-hAc1HjpI.js.map → display-KsZLw9Ov.js.map} +1 -1
- package/dist/dropdown-menu-CLs8Lihj.js +194 -0
- package/dist/dropdown-menu-CLs8Lihj.js.map +1 -0
- package/dist/features/activities.js +302 -253
- package/dist/features/activities.js.map +1 -1
- package/dist/features/ai-chat.js +15 -14
- package/dist/features/ai-chat.js.map +1 -1
- package/dist/features/appointment-calendar.js +222 -220
- package/dist/features/appointment-calendar.js.map +1 -1
- package/dist/features/async-preview.js +11 -10
- 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 +13 -13
- package/dist/features/data-view.js.map +1 -1
- package/dist/features/email-composer.js +249 -249
- package/dist/features/email-composer.js.map +1 -1
- package/dist/features/event-calendar.js +264 -269
- package/dist/features/event-calendar.js.map +1 -1
- package/dist/features/filters.js +1 -1
- package/dist/features/global-search.js +167 -138
- package/dist/features/global-search.js.map +1 -1
- package/dist/features/kanban.js +6 -7
- package/dist/features/kanban.js.map +1 -1
- package/dist/features/map.js +269 -260
- package/dist/features/map.js.map +1 -1
- package/dist/features/media-library.js +827 -777
- 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 +1246 -1169
- package/dist/features/products.js.map +1 -1
- package/dist/features/questionnaire.js +13 -13
- package/dist/features/questionnaire.js.map +1 -1
- package/dist/features/resource-assignment.js +8 -8
- package/dist/features/resource.js +127 -123
- package/dist/features/resource.js.map +1 -1
- package/dist/features/rich-text-editor.js +2 -2
- package/dist/features/schema-form.js +254 -253
- package/dist/features/schema-form.js.map +1 -1
- package/dist/features/suggestions.js +3 -3
- package/dist/features/sync.js +3 -3
- package/dist/features/table.js +1 -1
- package/dist/features/theme-tweaker.js +95 -96
- package/dist/features/theme-tweaker.js.map +1 -1
- package/dist/{feedback-BYIhtitP.js → feedback-Dm4izqFn.js} +81 -80
- package/dist/feedback-Dm4izqFn.js.map +1 -0
- package/dist/{field-affordance-recipes-DZhnIL_Y.js → field-affordance-recipes-DWcNcOjh.js} +4 -4
- package/dist/field-affordance-recipes-DWcNcOjh.js.map +1 -0
- package/dist/{filters-DJVAveHA.js → filters-DzgSJpMK.js} +693 -645
- package/dist/filters-DzgSJpMK.js.map +1 -0
- package/dist/{form-field-CwH9y77i.js → form-field-BriWAXyg.js} +14 -8
- package/dist/form-field-BriWAXyg.js.map +1 -0
- package/dist/{form-sizing-BdP_Mf5p.js → form-sizing-Bs2qFUeE.js} +4 -4
- package/dist/form-sizing-Bs2qFUeE.js.map +1 -0
- package/dist/forms-C0RGnJTe.js +216 -0
- package/dist/forms-C0RGnJTe.js.map +1 -0
- package/dist/{forms-numeric-B_jraJaQ.js → forms-numeric-DIhghX1Q.js} +295 -291
- package/dist/forms-numeric-DIhghX1Q.js.map +1 -0
- package/dist/{header-BSfIEWbI.js → header-DMMxG__r.js} +67 -63
- package/dist/header-DMMxG__r.js.map +1 -0
- package/dist/header.recipes-BigdJjw1.js +6 -0
- package/dist/header.recipes-BigdJjw1.js.map +1 -0
- package/dist/hooks/useFormErrors.d.ts +1 -1
- package/dist/{hooks-ClH9thn4.js → hooks-DB6CJ4MR.js} +26 -14
- package/dist/hooks-DB6CJ4MR.js.map +1 -0
- package/dist/{icon-badge-DYKIwvOV.js → icon-badge-DZF-YjQp.js} +4 -4
- package/dist/{icon-badge-DYKIwvOV.js.map → icon-badge-DZF-YjQp.js.map} +1 -1
- package/dist/index.js +4 -5
- package/dist/input-CvyDQlY7.js +289 -0
- package/dist/input-CvyDQlY7.js.map +1 -0
- package/dist/input-DMBwAZmr.js +21 -0
- package/dist/input-DMBwAZmr.js.map +1 -0
- package/dist/item-DjCcM18E.js +277 -0
- package/dist/item-DjCcM18E.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 +2 -2
- package/dist/layout/settings.js +1 -1
- package/dist/layout/sidebar.js +3 -3
- package/dist/layout/workspace.js +1 -1
- package/dist/layout.js +11 -11
- package/dist/lib/affordance-geometry.generated.d.ts +41 -35
- package/dist/lib/control-group-recipes.d.ts +5 -5
- package/dist/lib/field-affordance-recipes.d.ts +2 -2
- package/dist/lib/motion-recipes.d.ts +3 -0
- package/dist/lib/navigation-row-recipes.d.ts +7 -7
- package/dist/lib/overlay-anatomy-recipes.d.ts +3 -3
- package/dist/lib/portal-recipes.d.ts +3 -0
- package/dist/lib/token-merge.generated.d.ts +13 -10
- package/dist/lib/ui-provider/types.d.ts +1 -1
- package/dist/lib/utils.js +1 -1
- package/dist/map-demo-tile.svg +1 -1
- package/dist/{media-gallery-3zIVLMWH.js → media-gallery-C-vChPmE.js} +6 -6
- package/dist/{media-gallery-3zIVLMWH.js.map → media-gallery-C-vChPmE.js.map} +1 -1
- package/dist/{mentions-CGlEJ15c.js → mentions-0_4nWuI-.js} +10 -10
- package/dist/{mentions-CGlEJ15c.js.map → mentions-0_4nWuI-.js.map} +1 -1
- package/dist/{message-DZ_ruyUV.js → message-g8p7eVtN.js} +7 -7
- package/dist/message-g8p7eVtN.js.map +1 -0
- package/dist/metadata-list-C3MkU-Om.js +443 -0
- package/dist/metadata-list-C3MkU-Om.js.map +1 -0
- package/dist/{motion-recipes-ChBg4HBq.js → motion-recipes-DitYv6P2.js} +10 -2
- package/dist/motion-recipes-DitYv6P2.js.map +1 -0
- package/dist/navigation-C90-oQFq.js +255 -0
- package/dist/navigation-C90-oQFq.js.map +1 -0
- package/dist/{navigation-BzhHI3lo.js → navigation-DaRjthVk.js} +101 -82
- package/dist/navigation-DaRjthVk.js.map +1 -0
- package/dist/{navigation-row-recipes-BFLCk_Aq.js → navigation-row-recipes-BGVLvU_O.js} +9 -9
- package/dist/navigation-row-recipes-BGVLvU_O.js.map +1 -0
- package/dist/{number-DbV1Dija.js → number-CRU3kGuk.js} +5 -5
- package/dist/{number-DbV1Dija.js.map → number-CRU3kGuk.js.map} +1 -1
- package/dist/overflow-tab-bar-IVFVQFV6.js +172 -0
- package/dist/overflow-tab-bar-IVFVQFV6.js.map +1 -0
- package/dist/overlays-BSgCtM2v.js +1013 -0
- package/dist/overlays-BSgCtM2v.js.map +1 -0
- package/dist/page-DUUKDAjo.js +331 -0
- package/dist/page-DUUKDAjo.js.map +1 -0
- package/dist/page-header-commands-7P3sfE9u.js +193 -0
- package/dist/page-header-commands-7P3sfE9u.js.map +1 -0
- package/dist/{pagination-BL25hu2s.js → pagination-CgCjElfu.js} +7 -7
- package/dist/{pagination-BL25hu2s.js.map → pagination-CgCjElfu.js.map} +1 -1
- package/dist/popover-B85RenIl.js +201 -0
- package/dist/popover-B85RenIl.js.map +1 -0
- package/dist/{popover-menu-Cn9rUkdc.js → popover-menu-DlnQ2zlR.js} +7 -7
- package/dist/{popover-menu-Cn9rUkdc.js.map → popover-menu-DlnQ2zlR.js.map} +1 -1
- package/dist/{popover.recipes-D3j8R8Yp.js → popover.recipes-DdiEp0rd.js} +18 -11
- package/dist/popover.recipes-DdiEp0rd.js.map +1 -0
- package/dist/portal-recipes-BpsV_iRw.js +9 -0
- package/dist/portal-recipes-BpsV_iRw.js.map +1 -0
- package/dist/{primitives-BFK08r9M.js → primitives-ByWgGUgt.js} +6 -6
- package/dist/{primitives-BFK08r9M.js.map → primitives-ByWgGUgt.js.map} +1 -1
- package/dist/primitives.js +4 -4
- package/dist/{progress-B1VnCT0K.js → progress-BJhQP9WX.js} +9 -9
- package/dist/{progress-B1VnCT0K.js.map → progress-BJhQP9WX.js.map} +1 -1
- package/dist/{receipt-BVSOH3Xo.js → receipt-tOc7B3hw.js} +7 -7
- package/dist/receipt-tOc7B3hw.js.map +1 -0
- package/dist/{rich-text-GOUyKQ-s.js → rich-text-Dth5E882.js} +4 -4
- package/dist/{rich-text-GOUyKQ-s.js.map → rich-text-Dth5E882.js.map} +1 -1
- package/dist/{rich-text-editor-cRLC-eBK.js → rich-text-editor-C1fOjBTd.js} +429 -430
- package/dist/rich-text-editor-C1fOjBTd.js.map +1 -0
- package/dist/{rich-text-editor-toolbar-DfXg0-VC.js → rich-text-editor-toolbar-laT3tpBT.js} +33 -29
- package/dist/rich-text-editor-toolbar-laT3tpBT.js.map +1 -0
- package/dist/{scroll-area-DcI-M1UT.js → scroll-area-B0dB2cBi.js} +2 -2
- package/dist/{scroll-area-DcI-M1UT.js.map → scroll-area-B0dB2cBi.js.map} +1 -1
- package/dist/{separator-Bom7NsGO.js → separator-Bb17I4pu.js} +2 -2
- package/dist/{separator-Bom7NsGO.js.map → separator-Bb17I4pu.js.map} +1 -1
- package/dist/{separator-BDV-Y648.js → separator-Ct_WSWTJ.js} +3 -3
- package/dist/{separator-BDV-Y648.js.map → separator-Ct_WSWTJ.js.map} +1 -1
- package/dist/services/actions.js +1 -1
- package/dist/settings-Bar5wiSo.js +167 -0
- package/dist/settings-Bar5wiSo.js.map +1 -0
- package/dist/sheet-BGPERY55.js +250 -0
- package/dist/sheet-BGPERY55.js.map +1 -0
- package/dist/sidebar-D-JYMMbY.js +686 -0
- package/dist/sidebar-D-JYMMbY.js.map +1 -0
- package/dist/sidebar-f9gRWXIR.js +1001 -0
- package/dist/sidebar-f9gRWXIR.js.map +1 -0
- package/dist/skeleton-BapcJd9C.js +265 -0
- package/dist/skeleton-BapcJd9C.js.map +1 -0
- package/dist/smart-card-CW0hjetE.js +617 -0
- package/dist/smart-card-CW0hjetE.js.map +1 -0
- package/dist/{structure-BmisBK-3.js → structure-DuxKl954.js} +3 -3
- package/dist/{structure-BmisBK-3.js.map → structure-DuxKl954.js.map} +1 -1
- package/dist/{structure.recipes-EPz60cU8.js → structure.recipes-BB4-n58V.js} +2 -2
- package/dist/{structure.recipes-EPz60cU8.js.map → structure.recipes-BB4-n58V.js.map} +1 -1
- package/dist/style.css +1 -1
- package/dist/{table-DsfzoUia.js → table-B4TE7iOV.js} +3 -3
- package/dist/{table-DsfzoUia.js.map → table-B4TE7iOV.js.map} +1 -1
- package/dist/{table-BweFy_P9.js → table-CFOWY9pQ.js} +394 -388
- package/dist/table-CFOWY9pQ.js.map +1 -0
- package/dist/{tabs-CDocW5D1.js → tabs-e7ko9S2o.js} +11 -11
- package/dist/tabs-e7ko9S2o.js.map +1 -0
- package/dist/{text-inputs-f9Ia-aCi.js → text-inputs-B1culiSK.js} +107 -104
- package/dist/text-inputs-B1culiSK.js.map +1 -0
- package/dist/{text.styles-g4He6UIW.js → text.styles-B64My8RZ.js} +25 -10
- package/dist/text.styles-B64My8RZ.js.map +1 -0
- package/dist/theme.css +192 -149
- package/dist/{timelines-CwM_9IhD.js → timelines-D3Sl9ueq.js} +13 -12
- package/dist/timelines-D3Sl9ueq.js.map +1 -0
- package/dist/tooltip-8wz5S_Zr.js +113 -0
- package/dist/tooltip-8wz5S_Zr.js.map +1 -0
- package/dist/{tree-WnKQzwbq.js → tree-CzUJHnFs.js} +9 -9
- package/dist/{tree-WnKQzwbq.js.map → tree-CzUJHnFs.js.map} +1 -1
- package/dist/typography/rich-text.js +1 -1
- package/dist/typography-BQnine1k.js +117 -0
- package/dist/typography-BQnine1k.js.map +1 -0
- package/dist/typography.js +1 -1
- package/dist/ui-provider-C-74NVLc.js +178 -0
- package/dist/ui-provider-C-74NVLc.js.map +1 -0
- package/dist/ui-provider.js +2 -3
- package/dist/{upload-CXyxmQBP.js → upload-BOW6U2tI.js} +25 -24
- package/dist/upload-BOW6U2tI.js.map +1 -0
- package/dist/{upload-queue-Boscubn9.js → upload-queue-qUXn1ykN.js} +16 -14
- package/dist/upload-queue-qUXn1ykN.js.map +1 -0
- package/dist/{usage-card-BhO5eqkX.js → usage-card-BeSLY0i0.js} +145 -137
- package/dist/usage-card-BeSLY0i0.js.map +1 -0
- package/dist/{utils-BRhFDwuU.js → utils-B6kKb8jB.js} +303 -144
- package/dist/utils-B6kKb8jB.js.map +1 -0
- package/dist/value-inputs-skdVB2zh.js +980 -0
- package/dist/value-inputs-skdVB2zh.js.map +1 -0
- package/dist/{value-typography-BP8OG6h5.js → value-typography-uAmWUAL1.js} +2 -2
- package/dist/{value-typography-BP8OG6h5.js.map → value-typography-uAmWUAL1.js.map} +1 -1
- package/dist/workspace-DHeHv0qw.js +411 -0
- package/dist/workspace-DHeHv0qw.js.map +1 -0
- package/docs/consumer-skill/SKILL.md +15 -129
- package/docs/consumer-skill/agents/themelia-ui-designer.md +96 -0
- package/docs/consumer-skill/examples/app-layout.tsx +74 -13
- package/docs/consumer-skill/examples/authentication.tsx +77 -0
- package/docs/consumer-skill/examples/commerce-lines.tsx +271 -0
- package/docs/consumer-skill/examples/custom-composition.tsx +21 -0
- package/docs/consumer-skill/examples/detail.tsx +5 -4
- package/docs/consumer-skill/examples/edit.tsx +30 -38
- package/docs/consumer-skill/examples/editable-sections.tsx +38 -0
- package/docs/consumer-skill/examples/index-table.tsx +4 -4
- package/docs/consumer-skill/examples/manifest.json +88 -1
- package/docs/consumer-skill/examples/product-media.tsx +41 -0
- package/docs/consumer-skill/examples/product-parts.tsx +81 -0
- package/docs/consumer-skill/examples/rhf-bindings.tsx +86 -0
- package/docs/consumer-skill/examples/rhf-edit-page.tsx +141 -0
- package/docs/consumer-skill/examples/rhf-overlay-form.tsx +105 -0
- package/docs/consumer-skill/examples/rhf-transport.tsx +28 -0
- package/docs/consumer-skill/examples/token-domain-structure.tsx +68 -0
- package/docs/consumer-skill/references/agents-md.md +23 -11
- package/docs/consumer-skill/references/analytics.md +18 -1
- package/docs/consumer-skill/references/authentication.md +42 -0
- package/docs/consumer-skill/references/commerce-composition.md +97 -0
- package/docs/consumer-skill/references/component-contracts.json +325201 -0
- package/docs/consumer-skill/references/composition-mapping.md +106 -0
- package/docs/consumer-skill/references/composition.md +198 -46
- package/docs/consumer-skill/references/critique-rubric.md +98 -0
- package/docs/consumer-skill/references/custom-composition.md +261 -0
- package/docs/consumer-skill/references/data-reading.md +79 -0
- package/docs/consumer-skill/references/design-contract.md +43 -9
- package/docs/consumer-skill/references/discovery.md +109 -8
- package/docs/consumer-skill/references/domain-structures.md +124 -0
- package/docs/consumer-skill/references/installation.md +51 -36
- package/docs/consumer-skill/references/integration.md +41 -2
- package/docs/consumer-skill/references/product-composition.md +94 -0
- package/docs/consumer-skill/references/public-api.json +4390 -475
- package/docs/consumer-skill/references/review.md +47 -5
- package/docs/consumer-skill/references/rhf-workflows.md +93 -0
- package/docs/consumer-skill/references/screen-archetypes.md +34 -0
- package/docs/consumer-skill/references/screen-decisions.md +126 -0
- package/docs/consumer-skill/references/theming.md +25 -27
- package/docs/consumer-skill/references/tokens.json +20 -11
- package/docs/consumer-skill/references/view-craft.md +153 -0
- package/docs/consumer-skill/references/view-spec.md +73 -0
- package/docs/consumer-skill/references/workflows.md +9 -2
- package/docs/consumer-skill/scripts/composition-policy.mjs +39 -3
- package/docs/consumer-skill/scripts/composition-schema.d.mts +2 -0
- package/docs/consumer-skill/scripts/composition-schema.mjs +32 -0
- package/docs/consumer-skill/scripts/composition.mjs +254 -0
- package/docs/consumer-skill/scripts/discovery.mjs +96 -10
- package/docs/consumer-skill/scripts/inspect-component.mjs +11 -0
- package/docs/consumer-skill/scripts/inspect-tokens.mjs +11 -0
- package/docs/consumer-skill/scripts/inspection.mjs +193 -0
- package/docs/consumer-skill/scripts/map-composition.mjs +12 -0
- package/docs/consumer-skill/scripts/setup-skills.mjs +111 -0
- package/docs/consumer-skill/scripts/surface-policy.mjs +5 -5
- package/docs/consumer-skills/themelia-components/SKILL.md +31 -0
- package/docs/consumer-skills/themelia-composition/SKILL.md +34 -0
- package/docs/consumer-skills/themelia-design/SKILL.md +55 -0
- package/docs/consumer-skills/themelia-forms/SKILL.md +12 -0
- package/docs/consumer-skills/themelia-foundation/SKILL.md +15 -0
- package/docs/consumer-skills/themelia-tokenization/SKILL.md +42 -0
- package/package.json +4 -2
- package/templates/README.md +39 -0
- package/templates/admin-shell-template.tsx +382 -0
- package/templates/analytics-operations-template.tsx +376 -0
- package/templates/customers-template.tsx +509 -0
- package/templates/index.ts +29 -0
- package/templates/orders-template.tsx +1102 -0
- package/templates/products-template.tsx +834 -0
- package/templates/user-permissions-template.tsx +450 -0
- package/dist/accordion-Cjb6sx0G.js.map +0 -1
- package/dist/action-menu-CllU52Mm.js +0 -280
- package/dist/action-menu-CllU52Mm.js.map +0 -1
- package/dist/affordance-geometry.generated-tF36bREk.js.map +0 -1
- package/dist/ai-artifact-DvTwDVyL.js.map +0 -1
- package/dist/app-shell-C4FhvCqF.js +0 -236
- package/dist/app-shell-C4FhvCqF.js.map +0 -1
- package/dist/auth-BGua8ouh.js.map +0 -1
- package/dist/avatar-DAPlDvhJ.js.map +0 -1
- package/dist/base/cascader.js.map +0 -1
- package/dist/batch-action-bar-DnUJ21NQ.js.map +0 -1
- package/dist/button-DVzspB_G.js.map +0 -1
- package/dist/buttons-DPZekJFu.js.map +0 -1
- package/dist/cards-BaBZR-AU.js +0 -68
- package/dist/cards-BaBZR-AU.js.map +0 -1
- package/dist/chart-ZOYyK2xG.js +0 -155
- package/dist/chart-ZOYyK2xG.js.map +0 -1
- package/dist/checkbox-AWIhNhmo.js.map +0 -1
- package/dist/choice-inputs-CNHvARCJ.js +0 -770
- package/dist/choice-inputs-CNHvARCJ.js.map +0 -1
- package/dist/code-block-DeneBJR_.js.map +0 -1
- package/dist/combobox-DaHESuiL.js +0 -355
- package/dist/combobox-DaHESuiL.js.map +0 -1
- package/dist/combobox-Dxo2fAYQ.js.map +0 -1
- package/dist/command-C25VMRII.js.map +0 -1
- package/dist/comments-DD0DUPwJ.js.map +0 -1
- package/dist/containers-Mu1LMGV1.js +0 -103
- package/dist/containers-Mu1LMGV1.js.map +0 -1
- package/dist/control-group-recipes-DBXmfh2E.js.map +0 -1
- package/dist/data-display-DT_khPl_.js.map +0 -1
- package/dist/date-picker-B2K3ucWn.js.map +0 -1
- package/dist/date-pickers-Ds8gLaoP.js +0 -175
- package/dist/date-pickers-Ds8gLaoP.js.map +0 -1
- package/dist/dropdown-menu-Cl4X7L5S.js +0 -193
- package/dist/dropdown-menu-Cl4X7L5S.js.map +0 -1
- package/dist/feedback-BYIhtitP.js.map +0 -1
- package/dist/field-affordance-recipes-DZhnIL_Y.js.map +0 -1
- package/dist/filters-DJVAveHA.js.map +0 -1
- package/dist/form-field-CwH9y77i.js.map +0 -1
- package/dist/form-sizing-BdP_Mf5p.js.map +0 -1
- package/dist/forms-B9G_xwzi.js +0 -194
- package/dist/forms-B9G_xwzi.js.map +0 -1
- package/dist/forms-numeric-B_jraJaQ.js.map +0 -1
- package/dist/header-BSfIEWbI.js.map +0 -1
- package/dist/hooks-ClH9thn4.js.map +0 -1
- package/dist/input-CZw8iU99.js +0 -21
- package/dist/input-CZw8iU99.js.map +0 -1
- package/dist/input-DQdEd0YD.js +0 -263
- package/dist/input-DQdEd0YD.js.map +0 -1
- package/dist/item-K5_ghvze.js +0 -275
- package/dist/item-K5_ghvze.js.map +0 -1
- package/dist/message-DZ_ruyUV.js.map +0 -1
- package/dist/metadata-list-8N16ZMW_.js +0 -405
- package/dist/metadata-list-8N16ZMW_.js.map +0 -1
- package/dist/motion-recipes-ChBg4HBq.js.map +0 -1
- package/dist/navigation-Bnotn4AQ.js +0 -145
- package/dist/navigation-Bnotn4AQ.js.map +0 -1
- package/dist/navigation-BzhHI3lo.js.map +0 -1
- package/dist/navigation-row-recipes-BFLCk_Aq.js.map +0 -1
- package/dist/overflow-tab-bar-CWY7Nogn.js +0 -282
- package/dist/overflow-tab-bar-CWY7Nogn.js.map +0 -1
- package/dist/overlays-tMkF-VAN.js +0 -1003
- package/dist/overlays-tMkF-VAN.js.map +0 -1
- package/dist/page-CL9YeH_V.js +0 -224
- package/dist/page-CL9YeH_V.js.map +0 -1
- package/dist/page-header-commands-DOb6WsfD.js +0 -126
- package/dist/page-header-commands-DOb6WsfD.js.map +0 -1
- package/dist/popover-gnTOhbFM.js +0 -198
- package/dist/popover-gnTOhbFM.js.map +0 -1
- package/dist/popover.recipes-D3j8R8Yp.js.map +0 -1
- package/dist/receipt-BVSOH3Xo.js.map +0 -1
- package/dist/rich-text-editor-cRLC-eBK.js.map +0 -1
- package/dist/rich-text-editor-toolbar-DfXg0-VC.js.map +0 -1
- package/dist/settings-ybnjVwbd.js +0 -171
- package/dist/settings-ybnjVwbd.js.map +0 -1
- package/dist/sheet-ijlsjq-n.js +0 -213
- package/dist/sheet-ijlsjq-n.js.map +0 -1
- package/dist/sidebar-Db6gkh3U.js +0 -619
- package/dist/sidebar-Db6gkh3U.js.map +0 -1
- package/dist/sidebar-DkTO4VTO.js +0 -512
- package/dist/sidebar-DkTO4VTO.js.map +0 -1
- package/dist/skeleton-Byjnt7qr.js +0 -264
- package/dist/skeleton-Byjnt7qr.js.map +0 -1
- package/dist/smart-card-DiC5aac3.js +0 -604
- package/dist/smart-card-DiC5aac3.js.map +0 -1
- package/dist/table-BweFy_P9.js.map +0 -1
- package/dist/tabs-CDocW5D1.js.map +0 -1
- package/dist/text-inputs-f9Ia-aCi.js.map +0 -1
- package/dist/text.styles-g4He6UIW.js.map +0 -1
- package/dist/theme-scope-BJ6eE2xt.js +0 -50
- package/dist/theme-scope-BJ6eE2xt.js.map +0 -1
- package/dist/timelines-CwM_9IhD.js.map +0 -1
- package/dist/tooltip-yiRJUFjp.js +0 -111
- package/dist/tooltip-yiRJUFjp.js.map +0 -1
- package/dist/typography-UTnveOEy.js +0 -117
- package/dist/typography-UTnveOEy.js.map +0 -1
- package/dist/ui-provider-C_U0Xma4.js +0 -136
- package/dist/ui-provider-C_U0Xma4.js.map +0 -1
- package/dist/upload-CXyxmQBP.js.map +0 -1
- package/dist/upload-queue-Boscubn9.js.map +0 -1
- package/dist/usage-card-BhO5eqkX.js.map +0 -1
- package/dist/use-mobile-vaLKwgyf.js +0 -15
- package/dist/use-mobile-vaLKwgyf.js.map +0 -1
- package/dist/utils-BRhFDwuU.js.map +0 -1
- package/dist/value-inputs-TaX4OjNk.js +0 -963
- package/dist/value-inputs-TaX4OjNk.js.map +0 -1
- package/dist/workspace-B-OEm3Kf.js +0 -408
- package/dist/workspace-B-OEm3Kf.js.map +0 -1
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { d as e, u as t } from "./ui-provider-C-74NVLc.js";
|
|
3
3
|
import { useStrings as n } from "./lib/strings.js";
|
|
4
|
-
import { t as r } from "./utils-
|
|
5
|
-
import { t as i } from "./affordance-geometry.generated-
|
|
6
|
-
import { n as a } from "./buttons-
|
|
7
|
-
import { a as o, c as s, s as c } from "./typography-
|
|
4
|
+
import { t as r } from "./utils-B6kKb8jB.js";
|
|
5
|
+
import { t as i } from "./affordance-geometry.generated-P-aVJisu.js";
|
|
6
|
+
import { n as a } from "./buttons-BedGfygC.js";
|
|
7
|
+
import { a as o, c as s, s as c } from "./typography-BQnine1k.js";
|
|
8
8
|
import { t as l } from "./focus-recipes-B653VaLq.js";
|
|
9
|
-
import { n as u, t as d } from "./button-
|
|
10
|
-
import { r as f, t as p } from "./structure-
|
|
11
|
-
import { o as m } from "./date-
|
|
12
|
-
import { t as ee } from "./separator-
|
|
9
|
+
import { n as u, t as d } from "./button-S2Cubiiz.js";
|
|
10
|
+
import { r as f, t as p } from "./structure-DuxKl954.js";
|
|
11
|
+
import { o as m } from "./date-Cq8ioE4o.js";
|
|
12
|
+
import { t as ee } from "./separator-Ct_WSWTJ.js";
|
|
13
13
|
import { t as h } from "./field-state-recipes-BVA2CWHo.js";
|
|
14
|
-
import { r as g } from "./field-affordance-recipes-
|
|
15
|
-
import { d as _, p as v, s as y, y as te } from "./form-sizing-
|
|
16
|
-
import { t as b } from "./input-
|
|
17
|
-
import { c as ne, o as re, t as ie } from "./popover-
|
|
18
|
-
import { t as ae } from "./form-field-
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import { Fragment as
|
|
22
|
-
import { Calendar as
|
|
23
|
-
import { cva as
|
|
14
|
+
import { r as g } from "./field-affordance-recipes-DWcNcOjh.js";
|
|
15
|
+
import { d as _, p as v, s as y, y as te } from "./form-sizing-Bs2qFUeE.js";
|
|
16
|
+
import { t as b } from "./input-CvyDQlY7.js";
|
|
17
|
+
import { c as ne, o as re, t as ie } from "./popover-B85RenIl.js";
|
|
18
|
+
import { t as ae } from "./form-field-BriWAXyg.js";
|
|
19
|
+
import * as x from "react";
|
|
20
|
+
import { useEffect as S, useState as C } from "react";
|
|
21
|
+
import { Fragment as oe, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
22
|
+
import { Calendar as se, ChevronDownIcon as E, ChevronLeftIcon as D, ChevronRightIcon as ce, Clock as le } from "lucide-react";
|
|
23
|
+
import { cva as O } from "class-variance-authority";
|
|
24
24
|
import { addDays as k, endOfMonth as A, endOfWeek as j, format as M, startOfMonth as N, startOfWeek as P } from "date-fns";
|
|
25
25
|
import { DayPicker as F, getDefaultClassNames as I } from "react-day-picker";
|
|
26
26
|
import { Toggle as L } from "@base-ui/react/toggle";
|
|
@@ -37,7 +37,7 @@ function H(e, t) {
|
|
|
37
37
|
let n = Math.floor(86399 / t) * t, r = Math.round(e / t) * t;
|
|
38
38
|
return Math.max(0, Math.min(r, n));
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function ue(e) {
|
|
41
41
|
if (!e) return null;
|
|
42
42
|
let t = e.split(":");
|
|
43
43
|
if (t.length < 2 || t.length > 3) return null;
|
|
@@ -48,7 +48,7 @@ function le(e) {
|
|
|
48
48
|
seconds: s
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function de(e, t) {
|
|
52
52
|
let n = t ? `:${B(e.seconds)}` : "";
|
|
53
53
|
return `${B(e.hours)}:${B(e.minutes)}${n}`;
|
|
54
54
|
}
|
|
@@ -60,7 +60,7 @@ function U(e, t, n) {
|
|
|
60
60
|
seconds: t ? u : 0
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function W(e, t, n) {
|
|
64
64
|
if (t === "12") {
|
|
65
65
|
let t = e.hours >= 12 ? "PM" : "AM", r = e.hours % 12;
|
|
66
66
|
return r === 0 && (r = 12), {
|
|
@@ -76,7 +76,7 @@ function de(e, t, n) {
|
|
|
76
76
|
seconds: n ? B(e.seconds) : void 0
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function G(e, t, n) {
|
|
80
80
|
let r = (e) => {
|
|
81
81
|
let t = Number.parseInt(e ?? "0", 10);
|
|
82
82
|
return Number.isNaN(t) ? 0 : t;
|
|
@@ -108,19 +108,19 @@ function pe(e, t, n, r) {
|
|
|
108
108
|
let c = o === "AM" ? r?.am ?? "AM" : r?.pm ?? "PM";
|
|
109
109
|
return `${B(s)}:${i}${a} ${c}`;
|
|
110
110
|
}
|
|
111
|
-
var
|
|
112
|
-
function
|
|
111
|
+
var me = /'[^']*'/g, he = /[HKhk]|\bp\b|\bt\b|\ba\b/;
|
|
112
|
+
function ge(e) {
|
|
113
113
|
if (!e) return !1;
|
|
114
|
-
let t = e.replace(
|
|
115
|
-
return
|
|
114
|
+
let t = e.replace(me, "");
|
|
115
|
+
return he.test(t);
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function K(e) {
|
|
118
118
|
return {
|
|
119
119
|
startMonth: typeof e?.fromYear == "number" ? new Date(e.fromYear, 0) : void 0,
|
|
120
120
|
endMonth: typeof e?.toYear == "number" ? new Date(e.toYear, 11) : void 0
|
|
121
121
|
};
|
|
122
122
|
}
|
|
123
|
-
function
|
|
123
|
+
function _e(e, t, n, r) {
|
|
124
124
|
let i = r ? { locale: r } : void 0;
|
|
125
125
|
return {
|
|
126
126
|
date: e,
|
|
@@ -128,7 +128,7 @@ function ge(e, t, n, r) {
|
|
|
128
128
|
readable: e ? M(e, n, i) : void 0
|
|
129
129
|
};
|
|
130
130
|
}
|
|
131
|
-
function
|
|
131
|
+
function q(e, t, n, r) {
|
|
132
132
|
let i = r ? { locale: r } : void 0;
|
|
133
133
|
return {
|
|
134
134
|
dates: e,
|
|
@@ -151,7 +151,7 @@ function ve(e, t, n, r) {
|
|
|
151
151
|
};
|
|
152
152
|
}
|
|
153
153
|
function ye(e, t) {
|
|
154
|
-
let n = typeof t == "string" ?
|
|
154
|
+
let n = typeof t == "string" ? ue(t) : t, r = new Date(e);
|
|
155
155
|
return !Number.isFinite(r.getTime()) || !n ? /* @__PURE__ */ new Date(NaN) : (r.setHours(n.hours, n.minutes, n.seconds, 0), r);
|
|
156
156
|
}
|
|
157
157
|
function be(e, t) {
|
|
@@ -173,7 +173,7 @@ function Se(e, t, n, r) {
|
|
|
173
173
|
let i = be(e.from, e.to);
|
|
174
174
|
return t && i < t ? r.minimumDays(t) : n && i > n ? r.maximumDays(n) : null;
|
|
175
175
|
}
|
|
176
|
-
function
|
|
176
|
+
function J(e, t, n, r, i) {
|
|
177
177
|
return r && e.length === 0 ? i.datesRequired : t && e.length < t ? i.minimumDates(t) : n && e.length > 0 ? i.maximumDates(n) : null;
|
|
178
178
|
}
|
|
179
179
|
function Ce(e, t, n, r, i, a) {
|
|
@@ -183,7 +183,7 @@ function Ce(e, t, n, r, i, a) {
|
|
|
183
183
|
}
|
|
184
184
|
return n ?? r;
|
|
185
185
|
}
|
|
186
|
-
function
|
|
186
|
+
function Y(e, t, n, r, i, a) {
|
|
187
187
|
if (e.length > 0) {
|
|
188
188
|
if (e.length === 1) {
|
|
189
189
|
let n = a ? { locale: a } : void 0;
|
|
@@ -210,13 +210,13 @@ function Te(e, t) {
|
|
|
210
210
|
function Ee(e) {
|
|
211
211
|
return !e.mode || e.mode === "single";
|
|
212
212
|
}
|
|
213
|
-
function
|
|
213
|
+
function De(e) {
|
|
214
214
|
return e.mode === "multiple";
|
|
215
215
|
}
|
|
216
|
-
function
|
|
216
|
+
function Oe(e) {
|
|
217
217
|
return e.mode === "range";
|
|
218
218
|
}
|
|
219
|
-
function
|
|
219
|
+
function ke(e, t) {
|
|
220
220
|
return [
|
|
221
221
|
{
|
|
222
222
|
label: e.today,
|
|
@@ -250,7 +250,7 @@ function Oe(e, t) {
|
|
|
250
250
|
}
|
|
251
251
|
//#endregion
|
|
252
252
|
//#region src/components/ui/calendar.tsx
|
|
253
|
-
function
|
|
253
|
+
function Ae({ className: e, classNames: t, showOutsideDays: n = !0, captionLayout: a = "label", buttonVariant: o = "ghost", locale: s, formatters: c, components: l, ...d }) {
|
|
254
254
|
let f = I();
|
|
255
255
|
return /* @__PURE__ */ w(F, {
|
|
256
256
|
showOutsideDays: n,
|
|
@@ -296,17 +296,17 @@ function ke({ className: e, classNames: t, showOutsideDays: n = !0, captionLayou
|
|
|
296
296
|
className: r(e),
|
|
297
297
|
...n
|
|
298
298
|
}),
|
|
299
|
-
Chevron: ({ className: e, orientation: t, ...n }) => t === "left" ? /* @__PURE__ */ w(
|
|
299
|
+
Chevron: ({ className: e, orientation: t, ...n }) => t === "left" ? /* @__PURE__ */ w(D, {
|
|
300
300
|
className: r("size-icon", e),
|
|
301
301
|
...n
|
|
302
|
-
}) : t === "right" ? /* @__PURE__ */ w(
|
|
302
|
+
}) : t === "right" ? /* @__PURE__ */ w(ce, {
|
|
303
303
|
className: r("size-icon", e),
|
|
304
304
|
...n
|
|
305
|
-
}) : /* @__PURE__ */ w(
|
|
305
|
+
}) : /* @__PURE__ */ w(E, {
|
|
306
306
|
className: r(g.icon.md, e),
|
|
307
307
|
...n
|
|
308
308
|
}),
|
|
309
|
-
DayButton: ({ ...e }) => /* @__PURE__ */ w(
|
|
309
|
+
DayButton: ({ ...e }) => /* @__PURE__ */ w(je, {
|
|
310
310
|
locale: s,
|
|
311
311
|
...e
|
|
312
312
|
}),
|
|
@@ -322,9 +322,9 @@ function ke({ className: e, classNames: t, showOutsideDays: n = !0, captionLayou
|
|
|
322
322
|
...d
|
|
323
323
|
});
|
|
324
324
|
}
|
|
325
|
-
function
|
|
326
|
-
let o = I(), s =
|
|
327
|
-
return
|
|
325
|
+
function je({ className: e, day: t, modifiers: n, locale: i, ...a }) {
|
|
326
|
+
let o = I(), s = x.useRef(null);
|
|
327
|
+
return x.useEffect(() => {
|
|
328
328
|
n.focused && s.current?.focus();
|
|
329
329
|
}, [n.focused]), /* @__PURE__ */ w(d, {
|
|
330
330
|
ref: s,
|
|
@@ -341,7 +341,7 @@ function Ae({ className: e, day: t, modifiers: n, locale: i, ...a }) {
|
|
|
341
341
|
}
|
|
342
342
|
//#endregion
|
|
343
343
|
//#region src/components/base/date-pickers/date-picker-field.tsx
|
|
344
|
-
function
|
|
344
|
+
function Me({ rootRef: e, className: t, label: n, hint: i, error: a, triggerId: c, describedById: l, children: u }) {
|
|
345
345
|
let d = typeof a == "string" && a !== "", f = !d && typeof i == "string" && i !== "";
|
|
346
346
|
return /* @__PURE__ */ T(p, {
|
|
347
347
|
ref: e,
|
|
@@ -380,11 +380,11 @@ function je({ rootRef: e, className: t, label: n, hint: i, error: a, triggerId:
|
|
|
380
380
|
}
|
|
381
381
|
//#endregion
|
|
382
382
|
//#region src/components/base/date-pickers/date-picker-footer.tsx
|
|
383
|
-
function
|
|
384
|
-
let { text: c, actions: l, showOnlyWhenSelected: u = !1, showSummary: d = !1 } = e, f = l?.filter((e) => e.visible !== !1) ?? [], m =
|
|
383
|
+
function Ne({ config: e, output: t, hasSelection: n, autoSummary: i, className: o }) {
|
|
384
|
+
let { text: c, actions: l, showOnlyWhenSelected: u = !1, showSummary: d = !1 } = e, f = l?.filter((e) => e.visible !== !1) ?? [], m = x.useMemo(() => {
|
|
385
385
|
if (c) return typeof c == "function" ? c(t) : c;
|
|
386
386
|
}, [c, t]), h = m || (d ? i : void 0);
|
|
387
|
-
return u && !n || !h && f.length === 0 ? null : /* @__PURE__ */ T(
|
|
387
|
+
return u && !n || !h && f.length === 0 ? null : /* @__PURE__ */ T(oe, { children: [/* @__PURE__ */ w(ee, {}), /* @__PURE__ */ w("div", {
|
|
388
388
|
className: r("date-picker-footer--component p-surface", o),
|
|
389
389
|
children: /* @__PURE__ */ T(p, {
|
|
390
390
|
gap: "lg",
|
|
@@ -392,7 +392,7 @@ function Me({ config: e, output: t, hasSelection: n, autoSummary: i, className:
|
|
|
392
392
|
gap: "xs",
|
|
393
393
|
className: "date-picker-footer--summary",
|
|
394
394
|
children: [
|
|
395
|
-
!!d && !!m && !!i && /* @__PURE__ */ T(
|
|
395
|
+
!!d && !!m && !!i && /* @__PURE__ */ T(oe, { children: [/* @__PURE__ */ w(s, {
|
|
396
396
|
type: "secondary",
|
|
397
397
|
children: i
|
|
398
398
|
}), /* @__PURE__ */ w(s, {
|
|
@@ -429,10 +429,10 @@ function Me({ config: e, output: t, hasSelection: n, autoSummary: i, className:
|
|
|
429
429
|
})
|
|
430
430
|
})] });
|
|
431
431
|
}
|
|
432
|
-
|
|
432
|
+
Ne.displayName = "DatePickerFooter";
|
|
433
433
|
//#endregion
|
|
434
434
|
//#region src/components/base/date-pickers/date-picker-header.tsx
|
|
435
|
-
function
|
|
435
|
+
function Pe({ config: e, className: t }) {
|
|
436
436
|
let { title: n, description: i, icon: a, align: o = "left" } = e;
|
|
437
437
|
return /* @__PURE__ */ w("div", {
|
|
438
438
|
className: r("date-picker-header--component", "border-b border-border p-surface", o === "center" ? "text-center" : "text-left", t),
|
|
@@ -462,24 +462,24 @@ function Ne({ config: e, className: t }) {
|
|
|
462
462
|
})
|
|
463
463
|
});
|
|
464
464
|
}
|
|
465
|
-
|
|
465
|
+
Pe.displayName = "DatePickerHeader";
|
|
466
466
|
//#endregion
|
|
467
467
|
//#region src/components/base/date-pickers/date-picker.recipes.ts
|
|
468
|
-
function
|
|
469
|
-
let { defaultScale: n } =
|
|
470
|
-
return te(
|
|
468
|
+
function Fe(t) {
|
|
469
|
+
let { defaultScale: n } = e();
|
|
470
|
+
return te(t, n);
|
|
471
471
|
}
|
|
472
|
-
var
|
|
472
|
+
var Ie = {
|
|
473
473
|
sm: "w-control-sm",
|
|
474
474
|
md: "w-control",
|
|
475
475
|
lg: "w-control-lg"
|
|
476
476
|
};
|
|
477
|
-
function
|
|
478
|
-
return r(v(e), "justify-start", t && [
|
|
477
|
+
function Le(e, t = !1) {
|
|
478
|
+
return r(v(e), "justify-start", t && [Ie[e], "shrink-0 justify-center px-0"]);
|
|
479
479
|
}
|
|
480
480
|
//#endregion
|
|
481
481
|
//#region src/components/base/date-pickers/date-pickers.strings.ts
|
|
482
|
-
var
|
|
482
|
+
var Re = {
|
|
483
483
|
selectDate: "Select a date",
|
|
484
484
|
selectDates: "Select dates",
|
|
485
485
|
selectDateRange: "Select date range",
|
|
@@ -515,7 +515,7 @@ var Le = {
|
|
|
515
515
|
selectMonthYear: "Select month and year",
|
|
516
516
|
month: "Month",
|
|
517
517
|
year: "Year"
|
|
518
|
-
},
|
|
518
|
+
}, ze = O(`box-border border border-transparent py-0 font-sans text-foreground hover:text-foreground aria-pressed:bg-accent aria-pressed:text-accent-foreground ${l.frame} ${h.invalid} gap-space-xs rounded-radius text-sm font-medium transition-[color,background-color,box-shadow] [&_svg:not([class*='size-'])]:size-icon group/toggle hover:bg-muted inline-flex items-center justify-center whitespace-nowrap outline-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0`, {
|
|
519
519
|
variants: {
|
|
520
520
|
variant: {
|
|
521
521
|
default: "bg-transparent",
|
|
@@ -531,13 +531,13 @@ var Le = {
|
|
|
531
531
|
variant: "default",
|
|
532
532
|
size: "default"
|
|
533
533
|
}
|
|
534
|
-
}),
|
|
534
|
+
}), Be = x.createContext({
|
|
535
535
|
size: "default",
|
|
536
536
|
variant: "default",
|
|
537
537
|
spacing: 0,
|
|
538
538
|
orientation: "horizontal"
|
|
539
539
|
});
|
|
540
|
-
function
|
|
540
|
+
function Ve({ className: e, variant: t, size: n, spacing: i = 0, orientation: a = "horizontal", children: o, ...s }) {
|
|
541
541
|
return /* @__PURE__ */ w(R, {
|
|
542
542
|
"data-slot": "toggle-group",
|
|
543
543
|
"data-variant": t,
|
|
@@ -545,9 +545,9 @@ function Be({ className: e, variant: t, size: n, spacing: i = 0, orientation: a
|
|
|
545
545
|
"data-spacing": i,
|
|
546
546
|
"data-orientation": a,
|
|
547
547
|
style: { "--gap": i },
|
|
548
|
-
className: r("rounded-
|
|
548
|
+
className: r("rounded-radius 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),
|
|
549
549
|
...s,
|
|
550
|
-
children: /* @__PURE__ */ w(
|
|
550
|
+
children: /* @__PURE__ */ w(Be.Provider, {
|
|
551
551
|
value: {
|
|
552
552
|
variant: t,
|
|
553
553
|
size: n,
|
|
@@ -558,14 +558,14 @@ function Be({ className: e, variant: t, size: n, spacing: i = 0, orientation: a
|
|
|
558
558
|
})
|
|
559
559
|
});
|
|
560
560
|
}
|
|
561
|
-
function
|
|
562
|
-
let o =
|
|
561
|
+
function He({ className: e, children: t, variant: n = "default", size: i = "default", ...a }) {
|
|
562
|
+
let o = x.useContext(Be);
|
|
563
563
|
return /* @__PURE__ */ w(L, {
|
|
564
564
|
"data-slot": "toggle-group-item",
|
|
565
565
|
"data-variant": o.variant || n,
|
|
566
566
|
"data-size": o.size || i,
|
|
567
567
|
"data-spacing": o.spacing,
|
|
568
|
-
className: r("border-border group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-control-sm group-data-[spacing=0]/toggle-group:shadow-none group-data-[orientation=horizontal]/toggle-group:data-[spacing=0]:first:rounded-l-
|
|
568
|
+
className: r("border-border group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-control-sm group-data-[spacing=0]/toggle-group:shadow-none group-data-[orientation=horizontal]/toggle-group:data-[spacing=0]:first:rounded-l-radius group-data-[orientation=vertical]/toggle-group:data-[spacing=0]:first:rounded-t-radius group-data-[orientation=horizontal]/toggle-group:data-[spacing=0]:last:rounded-r-radius group-data-[orientation=vertical]/toggle-group:data-[spacing=0]:last:rounded-b-radius 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", ze({
|
|
569
569
|
variant: o.variant || n,
|
|
570
570
|
size: o.size || i
|
|
571
571
|
}), e),
|
|
@@ -575,43 +575,43 @@ function Ve({ className: e, children: t, variant: n = "default", size: i = "defa
|
|
|
575
575
|
}
|
|
576
576
|
//#endregion
|
|
577
577
|
//#region src/components/base/date-pickers/time-picker.tsx
|
|
578
|
-
var
|
|
578
|
+
var Ue = {
|
|
579
579
|
placeholder: "Select time",
|
|
580
580
|
hours: "Hours",
|
|
581
581
|
minutes: "Minutes",
|
|
582
582
|
seconds: "Seconds",
|
|
583
583
|
am: "AM",
|
|
584
584
|
pm: "PM"
|
|
585
|
-
},
|
|
585
|
+
}, We = [
|
|
586
586
|
"hours",
|
|
587
587
|
"minutes",
|
|
588
588
|
"seconds"
|
|
589
|
-
],
|
|
589
|
+
], X = "00", Z = "12", Q = "--", Ge = "aria-pressed:bg-primary aria-pressed:text-primary-foreground", Ke = {
|
|
590
590
|
sm: "w-12",
|
|
591
591
|
md: "w-14",
|
|
592
592
|
lg: "w-16"
|
|
593
593
|
};
|
|
594
|
-
function
|
|
594
|
+
function qe(e) {
|
|
595
595
|
return e.replace(/\D/g, "").slice(-2);
|
|
596
596
|
}
|
|
597
597
|
function $(e) {
|
|
598
598
|
return e.length === 0 ? "00" : e.length === 1 ? `0${e}` : e;
|
|
599
599
|
}
|
|
600
|
-
function
|
|
601
|
-
let n = t ?
|
|
600
|
+
function Je(e, t) {
|
|
601
|
+
let n = t ? We : We.slice(0, 2), r = n.indexOf(e);
|
|
602
602
|
return r > -1 && r < n.length - 1 ? n[r + 1] : null;
|
|
603
603
|
}
|
|
604
|
-
function
|
|
605
|
-
let n = t ?
|
|
604
|
+
function Ye(e, t) {
|
|
605
|
+
let n = t ? We : We.slice(0, 2), r = n.indexOf(e);
|
|
606
606
|
return r > 0 ? n[r - 1] : null;
|
|
607
607
|
}
|
|
608
|
-
function
|
|
608
|
+
function Xe(e, t) {
|
|
609
609
|
return t === "24" ? e : e % 12 || 12;
|
|
610
610
|
}
|
|
611
|
-
function
|
|
611
|
+
function Ze(e) {
|
|
612
612
|
return e >= 12 ? "PM" : "AM";
|
|
613
613
|
}
|
|
614
|
-
function
|
|
614
|
+
function Qe(e, t) {
|
|
615
615
|
return t === "12" ? {
|
|
616
616
|
...e,
|
|
617
617
|
period: e.period ?? "AM"
|
|
@@ -620,97 +620,97 @@ function Ze(e, t) {
|
|
|
620
620
|
period: void 0
|
|
621
621
|
};
|
|
622
622
|
}
|
|
623
|
-
function
|
|
623
|
+
function $e(e) {
|
|
624
624
|
return {
|
|
625
|
-
hours:
|
|
626
|
-
minutes:
|
|
627
|
-
seconds: e ?
|
|
625
|
+
hours: Q,
|
|
626
|
+
minutes: Q,
|
|
627
|
+
seconds: e ? Q : void 0
|
|
628
628
|
};
|
|
629
629
|
}
|
|
630
|
-
function
|
|
631
|
-
let n = t === "12" ?
|
|
630
|
+
function et(e, t) {
|
|
631
|
+
let n = t === "12" ? Z : X;
|
|
632
632
|
return {
|
|
633
|
-
hours: e.hours ===
|
|
634
|
-
minutes: e.minutes ===
|
|
635
|
-
seconds: e.seconds ===
|
|
633
|
+
hours: e.hours === Q ? n : e.hours,
|
|
634
|
+
minutes: e.minutes === Q ? X : e.minutes,
|
|
635
|
+
seconds: e.seconds === Q ? X : e.seconds,
|
|
636
636
|
period: e.period
|
|
637
637
|
};
|
|
638
638
|
}
|
|
639
|
-
function
|
|
640
|
-
let r =
|
|
641
|
-
return r ?
|
|
639
|
+
function tt(e, t, n) {
|
|
640
|
+
let r = ue(e ?? void 0);
|
|
641
|
+
return r ? Qe(W(r, t, n), t) : $e(n);
|
|
642
642
|
}
|
|
643
|
-
var
|
|
644
|
-
let y = n(
|
|
645
|
-
|
|
646
|
-
}, []),
|
|
643
|
+
var nt = x.forwardRef(function({ value: t, onValueChange: i, mode: a = "inline", format: o = "24", precision: c = "minutes", step: l = 60, size: u, disabled: d, invalid: f, placeholder: p, strings: m, className: ee, id: h }, g) {
|
|
644
|
+
let y = n(Ue, m), { defaultScale: ae } = e(), S = te(u, ae), C = c === "seconds", [oe, se] = x.useState(!1), E = x.useMemo(() => C ? We : We.slice(0, 2), [C]), [D, ce] = x.useState(() => tt(t, o, C)), O = x.useRef(D), k = x.useRef(!1), A = x.useRef(null), j = x.useCallback((e) => {
|
|
645
|
+
O.current = e, ce(e);
|
|
646
|
+
}, []), M = x.useRef({
|
|
647
647
|
hours: null,
|
|
648
648
|
minutes: null,
|
|
649
649
|
seconds: null
|
|
650
650
|
});
|
|
651
|
-
|
|
652
|
-
if (
|
|
653
|
-
|
|
651
|
+
x.useEffect(() => {
|
|
652
|
+
if (k.current) {
|
|
653
|
+
k.current = !1;
|
|
654
654
|
return;
|
|
655
655
|
}
|
|
656
|
-
|
|
656
|
+
A.current = null, j(tt(t, o, C));
|
|
657
657
|
}, [
|
|
658
|
-
|
|
658
|
+
t,
|
|
659
659
|
o,
|
|
660
660
|
C,
|
|
661
|
-
|
|
661
|
+
j
|
|
662
662
|
]);
|
|
663
|
-
let
|
|
664
|
-
|
|
665
|
-
let t =
|
|
666
|
-
i?.(
|
|
663
|
+
let N = x.useCallback((e) => de(e, C), [C]), P = x.useCallback((e) => {
|
|
664
|
+
k.current = !0;
|
|
665
|
+
let t = G(et(e, o), o, C);
|
|
666
|
+
i?.(N(fe(t, l, C)));
|
|
667
667
|
}, [
|
|
668
668
|
o,
|
|
669
669
|
C,
|
|
670
670
|
i,
|
|
671
671
|
l,
|
|
672
|
-
|
|
673
|
-
]),
|
|
674
|
-
let t = fe(
|
|
675
|
-
i?.(
|
|
672
|
+
N
|
|
673
|
+
]), F = x.useCallback((e) => {
|
|
674
|
+
let t = fe(G(et(e, o), o, C), l, C);
|
|
675
|
+
i?.(N(t)), j(Qe(W(t, o, C), o));
|
|
676
676
|
}, [
|
|
677
677
|
o,
|
|
678
678
|
C,
|
|
679
679
|
i,
|
|
680
680
|
l,
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
]),
|
|
681
|
+
N,
|
|
682
|
+
j
|
|
683
|
+
]), I = x.useCallback((e) => {
|
|
684
684
|
if (!e) return;
|
|
685
|
-
let t =
|
|
685
|
+
let t = M.current[e];
|
|
686
686
|
t && (t.focus(), t.select());
|
|
687
|
-
}, []),
|
|
688
|
-
let n =
|
|
689
|
-
|
|
687
|
+
}, []), L = x.useCallback((e, t) => {
|
|
688
|
+
let n = et(O.current, o), r = A.current, i = r && r.key === e && r.typed.length === 1 ? `${r.typed}${t}` : String(t);
|
|
689
|
+
A.current = {
|
|
690
690
|
key: e,
|
|
691
691
|
typed: i
|
|
692
692
|
};
|
|
693
693
|
let a = Number.parseInt(i, 10), s = { ...n }, c = s.period ?? "AM";
|
|
694
|
-
e === "hours" ? o === "24" ? s.hours = $(Math.min(Math.max(a, 0), 23).toString()) : a === 0 ? (c = "AM", s.hours =
|
|
694
|
+
e === "hours" ? o === "24" ? s.hours = $(Math.min(Math.max(a, 0), 23).toString()) : a === 0 ? (c = "AM", s.hours = Z) : a > 12 ? (c = Ze(a), s.hours = $(Xe(a, "12").toString())) : (s.hours = $(Math.min(Math.max(a, 1), 12).toString()), c = n.period ?? Ze(a)) : e === "minutes" ? s.minutes = $(Math.min(Math.max(a, 0), 59).toString()) : e === "seconds" && (s.seconds = $(Math.min(Math.max(a, 0), 59).toString()));
|
|
695
695
|
let l = {
|
|
696
696
|
...s,
|
|
697
697
|
period: o === "12" ? c : void 0
|
|
698
698
|
};
|
|
699
|
-
|
|
699
|
+
j(l), P(l);
|
|
700
700
|
}, [
|
|
701
701
|
o,
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
]),
|
|
705
|
-
|
|
706
|
-
let n =
|
|
702
|
+
j,
|
|
703
|
+
P
|
|
704
|
+
]), R = x.useCallback((e, t) => {
|
|
705
|
+
A.current = null;
|
|
706
|
+
let n = qe(t), r = { ...et(O.current, o) }, i = r.period ?? "AM";
|
|
707
707
|
if (e === "hours") {
|
|
708
708
|
if (o === "24") {
|
|
709
709
|
let e = Number.parseInt(n || "0", 10);
|
|
710
710
|
r.hours = $((Number.isNaN(e) ? 0 : Math.min(Math.max(e, 0), 23)).toString());
|
|
711
711
|
} else {
|
|
712
712
|
let e = Number.parseInt(n || "0", 10);
|
|
713
|
-
Number.isNaN(e) ? (r.hours =
|
|
713
|
+
Number.isNaN(e) ? (r.hours = Z, i = r.period ?? "AM") : n.length === 2 && e > 12 ? (i = Ze(e), r.hours = $(Xe(e, "12").toString())) : e === 0 ? (i = "AM", r.hours = Z) : (r.hours = $(Math.min(Math.max(e, 1), 12).toString()), n.length === 2 && (i = r.period ?? Ze(e)));
|
|
714
714
|
}
|
|
715
715
|
} else if (e === "minutes") {
|
|
716
716
|
let e = Number.parseInt(n || "0", 10);
|
|
@@ -723,87 +723,87 @@ var tt = S.forwardRef(function({ value: e, onValueChange: i, mode: a = "inline",
|
|
|
723
723
|
...r,
|
|
724
724
|
period: o === "12" ? i : void 0
|
|
725
725
|
};
|
|
726
|
-
|
|
726
|
+
j(a), P(a);
|
|
727
727
|
}, [
|
|
728
728
|
o,
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
]),
|
|
732
|
-
o === "12" && (
|
|
733
|
-
|
|
729
|
+
j,
|
|
730
|
+
P
|
|
731
|
+
]), z = x.useCallback((e) => {
|
|
732
|
+
o === "12" && (A.current = null, F({
|
|
733
|
+
...et(O.current, o),
|
|
734
734
|
period: e
|
|
735
735
|
}));
|
|
736
|
-
}, [
|
|
737
|
-
|
|
738
|
-
}, [
|
|
739
|
-
|
|
740
|
-
}, []),
|
|
736
|
+
}, [F, o]), B = x.useCallback(() => {
|
|
737
|
+
A.current = null, F(O.current);
|
|
738
|
+
}, [F]), V = x.useCallback((e) => {
|
|
739
|
+
A.current = null, e.target.select();
|
|
740
|
+
}, []), H = x.useCallback((e, t) => {
|
|
741
741
|
if (e.key.length === 1 && /\d/.test(e.key) && !e.metaKey && !e.ctrlKey && !e.altKey) {
|
|
742
|
-
e.preventDefault(),
|
|
742
|
+
e.preventDefault(), L(t, Number.parseInt(e.key, 10));
|
|
743
743
|
return;
|
|
744
744
|
}
|
|
745
745
|
if (e.key === "ArrowRight") {
|
|
746
|
-
|
|
746
|
+
I(Je(t, C));
|
|
747
747
|
return;
|
|
748
748
|
}
|
|
749
749
|
if (e.key === "ArrowLeft") {
|
|
750
|
-
|
|
750
|
+
I(Ye(t, C));
|
|
751
751
|
return;
|
|
752
752
|
}
|
|
753
753
|
if (e.key === "Backspace") {
|
|
754
754
|
let n = e.currentTarget;
|
|
755
|
-
n.selectionStart === 0 && n.selectionEnd === 0 &&
|
|
755
|
+
n.selectionStart === 0 && n.selectionEnd === 0 && I(Ye(t, C));
|
|
756
756
|
}
|
|
757
757
|
}, [
|
|
758
|
-
R,
|
|
759
758
|
L,
|
|
759
|
+
I,
|
|
760
760
|
C
|
|
761
|
-
]),
|
|
761
|
+
]), ue = x.useMemo(() => {
|
|
762
762
|
if (o === "12") return D.period ? [D.period] : void 0;
|
|
763
|
-
}, [o, D.period]),
|
|
763
|
+
}, [o, D.period]), U = {
|
|
764
764
|
hours: y.hours,
|
|
765
765
|
minutes: y.minutes,
|
|
766
766
|
seconds: y.seconds
|
|
767
|
-
},
|
|
767
|
+
}, me = /* @__PURE__ */ T("div", {
|
|
768
768
|
ref: a === "inline" ? g : void 0,
|
|
769
769
|
className: r("flex items-center gap-space-md [&>.input--component]:w-auto [&>.input--component]:shrink-0", a === "inline" && ["time-picker--component", ee]),
|
|
770
|
-
children: [E.map((e, t) => /* @__PURE__ */ T(
|
|
770
|
+
children: [E.map((e, t) => /* @__PURE__ */ T(x.Fragment, { children: [/* @__PURE__ */ w(b, {
|
|
771
771
|
ref: (t) => {
|
|
772
|
-
|
|
772
|
+
M.current[e] = t;
|
|
773
773
|
},
|
|
774
774
|
id: e === "hours" && a === "inline" ? h : void 0,
|
|
775
|
-
value: D[e] ??
|
|
776
|
-
onChange: (t) =>
|
|
777
|
-
onFocus:
|
|
778
|
-
onBlur:
|
|
779
|
-
onKeyDown: (t) =>
|
|
775
|
+
value: D[e] ?? Q,
|
|
776
|
+
onChange: (t) => R(e, t.target.value),
|
|
777
|
+
onFocus: V,
|
|
778
|
+
onBlur: B,
|
|
779
|
+
onKeyDown: (t) => H(t, e),
|
|
780
780
|
inputMode: "numeric",
|
|
781
781
|
pattern: "\\d*",
|
|
782
782
|
maxLength: 2,
|
|
783
783
|
showCharacterCount: !1,
|
|
784
784
|
disabled: d,
|
|
785
785
|
invalid: f,
|
|
786
|
-
"aria-label":
|
|
787
|
-
size:
|
|
788
|
-
className: r("time-picker--segment text-center",
|
|
786
|
+
"aria-label": U[e],
|
|
787
|
+
size: S,
|
|
788
|
+
className: r("time-picker--segment text-center", Ke[S])
|
|
789
789
|
}), t < E.length - 1 && /* @__PURE__ */ w(s, {
|
|
790
790
|
tag: "span",
|
|
791
791
|
type: "secondary",
|
|
792
792
|
children: ":"
|
|
793
|
-
})] }, e)), o === "12" && /* @__PURE__ */ T(
|
|
794
|
-
value:
|
|
793
|
+
})] }, e)), o === "12" && /* @__PURE__ */ T(Ve, {
|
|
794
|
+
value: ue,
|
|
795
795
|
onValueChange: (e) => {
|
|
796
796
|
let t = e[0];
|
|
797
|
-
t &&
|
|
797
|
+
t && z(t);
|
|
798
798
|
},
|
|
799
799
|
disabled: d,
|
|
800
800
|
variant: "outline",
|
|
801
|
-
size:
|
|
801
|
+
size: S === "sm" ? "sm" : "default",
|
|
802
802
|
className: "time-picker--period",
|
|
803
|
-
children: [/* @__PURE__ */ w(
|
|
803
|
+
children: [/* @__PURE__ */ w(He, {
|
|
804
804
|
value: "AM",
|
|
805
805
|
"aria-label": y.am,
|
|
806
|
-
className: r(_[
|
|
806
|
+
className: r(_[S], Ge),
|
|
807
807
|
children: /* @__PURE__ */ w(s, {
|
|
808
808
|
tag: "span",
|
|
809
809
|
size: "inherit",
|
|
@@ -812,10 +812,10 @@ var tt = S.forwardRef(function({ value: e, onValueChange: i, mode: a = "inline",
|
|
|
812
812
|
className: "text-inherit",
|
|
813
813
|
children: y.am
|
|
814
814
|
})
|
|
815
|
-
}), /* @__PURE__ */ w(
|
|
815
|
+
}), /* @__PURE__ */ w(He, {
|
|
816
816
|
value: "PM",
|
|
817
817
|
"aria-label": y.pm,
|
|
818
|
-
className: r(_[
|
|
818
|
+
className: r(_[S], Ge),
|
|
819
819
|
children: /* @__PURE__ */ w(s, {
|
|
820
820
|
tag: "span",
|
|
821
821
|
size: "inherit",
|
|
@@ -827,8 +827,8 @@ var tt = S.forwardRef(function({ value: e, onValueChange: i, mode: a = "inline",
|
|
|
827
827
|
})]
|
|
828
828
|
})]
|
|
829
829
|
});
|
|
830
|
-
if (a === "inline") return
|
|
831
|
-
let
|
|
830
|
+
if (a === "inline") return me;
|
|
831
|
+
let he = D.hours === Q && D.minutes === Q, ge = he ? p ?? y.placeholder : pe(G(et(D, o), o, C), C, o, {
|
|
832
832
|
am: y.am,
|
|
833
833
|
pm: y.pm
|
|
834
834
|
});
|
|
@@ -841,134 +841,134 @@ var tt = S.forwardRef(function({ value: e, onValueChange: i, mode: a = "inline",
|
|
|
841
841
|
"aria-expanded": oe,
|
|
842
842
|
"aria-invalid": f,
|
|
843
843
|
disabled: d,
|
|
844
|
-
className: r("time-picker--component", v(
|
|
845
|
-
children: [/* @__PURE__ */ w(
|
|
844
|
+
className: r("time-picker--component", v(S), "justify-start", he && "text-muted-foreground", ee),
|
|
845
|
+
children: [/* @__PURE__ */ w(le, { className: "size-icon shrink-0" }), /* @__PURE__ */ w(s, {
|
|
846
846
|
tag: "span",
|
|
847
847
|
size: "inherit",
|
|
848
848
|
lineHeight: "tight",
|
|
849
849
|
className: "min-w-0 truncate text-inherit",
|
|
850
|
-
children:
|
|
850
|
+
children: ge
|
|
851
851
|
})]
|
|
852
852
|
}), /* @__PURE__ */ w(ie, {
|
|
853
853
|
className: "time-picker--panel w-auto",
|
|
854
854
|
align: "start",
|
|
855
|
-
children:
|
|
855
|
+
children: me
|
|
856
856
|
})]
|
|
857
857
|
});
|
|
858
858
|
});
|
|
859
|
-
|
|
859
|
+
nt.displayName = "TimePicker";
|
|
860
860
|
//#endregion
|
|
861
861
|
//#region src/components/base/date-pickers/date-picker-single.tsx
|
|
862
|
-
function
|
|
863
|
-
let
|
|
862
|
+
function rt({ value: e, defaultValue: t, onValueChange: n, format: i = "yyyy-MM-dd", readableFormat: o = "PPP", placeholder: c, closeOnSelect: l = !0, withTime: u, disabledDates: d, calendarProps: f, open: p, setOpen: m, t: h, dateFnsLocale: g, captionLayout: _, yearBounds: v, rootRef: te, ...b }) {
|
|
863
|
+
let S = Fe(b.size), C = x.useId(), E = b.id ?? C, D = `${E}-description`, ce = b.error !== void 0 && b.error !== null && b.error !== "", le = ce || !!(b.invalid || b["aria-invalid"] && b["aria-invalid"] !== "false"), O = [b["aria-describedby"], ce ? D : void 0].filter(Boolean).join(" ") || void 0, k = u?.format ?? "24", A = u?.step ?? 60, j = u?.showSeconds ?? !1, N = ge(o), P = u?.showTimeInButton ?? !N, [F, I] = x.useState(() => e ?? t), [L, R] = x.useState(() => {
|
|
864
864
|
let n = e ?? t;
|
|
865
|
-
return n ? U(n,
|
|
866
|
-
}),
|
|
867
|
-
let n = e, r = t ??
|
|
865
|
+
return n ? U(n, j, A) : null;
|
|
866
|
+
}), z = x.useRef(e ?? t ?? void 0), B = x.useRef(!1), V = x.useRef(e !== void 0), H = x.useCallback((e, t) => {
|
|
867
|
+
let n = e, r = t ?? L;
|
|
868
868
|
if (e && u?.enabled && r) {
|
|
869
869
|
let t = ye(e, r);
|
|
870
870
|
n = Number.isFinite(t.getTime()) ? t : void 0;
|
|
871
871
|
}
|
|
872
|
-
return
|
|
872
|
+
return _e(n, i, o, g);
|
|
873
873
|
}, [
|
|
874
874
|
i,
|
|
875
875
|
o,
|
|
876
876
|
g,
|
|
877
877
|
u,
|
|
878
|
-
|
|
878
|
+
L
|
|
879
879
|
]);
|
|
880
|
-
|
|
881
|
-
let r = !!u?.enabled, a =
|
|
882
|
-
let a = fe(U(e,
|
|
883
|
-
if (
|
|
880
|
+
x.useEffect(() => {
|
|
881
|
+
let r = !!u?.enabled, a = V.current, s = e !== void 0, c = (e, t) => {
|
|
882
|
+
let a = fe(U(e, j, A), A, j);
|
|
883
|
+
if (I((t) => t?.getTime?.() === e.getTime() ? t : e), R((e) => e && e.hours === a.hours && e.minutes === a.minutes && e.seconds === a.seconds ? e : a), z.current = e, B.current = !0, t && r) {
|
|
884
884
|
let t = ye(e, a);
|
|
885
|
-
n?.(
|
|
885
|
+
n?.(_e(t, i, o, g));
|
|
886
886
|
}
|
|
887
887
|
};
|
|
888
888
|
if (!r) {
|
|
889
|
-
|
|
889
|
+
B.current = !1, z.current = e ?? t ?? void 0, I(e ?? t), V.current = s;
|
|
890
890
|
return;
|
|
891
891
|
}
|
|
892
|
-
let l =
|
|
893
|
-
if (!s && a && t === void 0 && (
|
|
894
|
-
c(e, !1),
|
|
892
|
+
let l = z.current?.getTime?.(), d = e?.getTime?.();
|
|
893
|
+
if (!s && a && t === void 0 && (B.current = !1, z.current = void 0), e !== void 0 && d !== l) {
|
|
894
|
+
c(e, !1), V.current = s;
|
|
895
895
|
return;
|
|
896
896
|
}
|
|
897
897
|
if (e === void 0 && t !== void 0) {
|
|
898
|
-
(l !== t.getTime() || !
|
|
898
|
+
(l !== t.getTime() || !B.current) && c(t, !1), V.current = s;
|
|
899
899
|
return;
|
|
900
900
|
}
|
|
901
|
-
if (e === void 0 && t === void 0 && !
|
|
902
|
-
|
|
901
|
+
if (e === void 0 && t === void 0 && !B.current) {
|
|
902
|
+
B.current = !0, V.current = s;
|
|
903
903
|
return;
|
|
904
904
|
}
|
|
905
|
-
|
|
905
|
+
V.current = s;
|
|
906
906
|
}, [
|
|
907
907
|
u?.enabled,
|
|
908
908
|
e,
|
|
909
909
|
t,
|
|
910
|
-
N,
|
|
911
910
|
j,
|
|
911
|
+
A,
|
|
912
912
|
n,
|
|
913
913
|
i,
|
|
914
914
|
o,
|
|
915
915
|
g
|
|
916
|
-
]),
|
|
917
|
-
u?.enabled &&
|
|
916
|
+
]), x.useEffect(() => {
|
|
917
|
+
u?.enabled && R((e) => {
|
|
918
918
|
if (!e) return e;
|
|
919
|
-
let t = fe(e,
|
|
919
|
+
let t = fe(e, A, j);
|
|
920
920
|
return e.hours === t.hours && e.minutes === t.minutes && e.seconds === t.seconds ? e : t;
|
|
921
921
|
});
|
|
922
922
|
}, [
|
|
923
923
|
u?.enabled,
|
|
924
|
-
|
|
925
|
-
|
|
924
|
+
A,
|
|
925
|
+
j
|
|
926
926
|
]);
|
|
927
|
-
let W =
|
|
928
|
-
|
|
927
|
+
let W = x.useCallback((e) => {
|
|
928
|
+
I(e);
|
|
929
929
|
let t;
|
|
930
|
-
u?.enabled && e && (
|
|
930
|
+
u?.enabled && e && (B.current = !0, z.current = e, L || (t = U(e, j, A), R(t))), n?.(H(e, t)), l && e && m(!1);
|
|
931
931
|
}, [
|
|
932
932
|
n,
|
|
933
|
-
|
|
933
|
+
H,
|
|
934
934
|
l,
|
|
935
935
|
m,
|
|
936
936
|
u,
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
]), G =
|
|
941
|
-
let t =
|
|
942
|
-
t && (
|
|
937
|
+
L,
|
|
938
|
+
j,
|
|
939
|
+
A
|
|
940
|
+
]), G = x.useCallback((e) => {
|
|
941
|
+
let t = ue(e ?? void 0);
|
|
942
|
+
t && (R(t), F && n?.(H(F, t)));
|
|
943
943
|
}, [
|
|
944
|
-
|
|
944
|
+
F,
|
|
945
945
|
n,
|
|
946
|
-
|
|
947
|
-
]),
|
|
948
|
-
if (u?.enabled &&
|
|
946
|
+
H
|
|
947
|
+
]), me = x.useMemo(() => {
|
|
948
|
+
if (u?.enabled && L) return pe(L, j, k, {
|
|
949
949
|
am: h.am,
|
|
950
950
|
pm: h.pm
|
|
951
951
|
});
|
|
952
952
|
}, [
|
|
953
953
|
u?.enabled,
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
954
|
+
L,
|
|
955
|
+
j,
|
|
956
|
+
k,
|
|
957
957
|
h
|
|
958
|
-
]), he =
|
|
959
|
-
|
|
958
|
+
]), he = x.useMemo(() => Ce(F, o, c, h.selectDate, P ? me : void 0, g), [
|
|
959
|
+
F,
|
|
960
960
|
o,
|
|
961
961
|
c,
|
|
962
962
|
h,
|
|
963
|
-
|
|
964
|
-
|
|
963
|
+
me,
|
|
964
|
+
P,
|
|
965
965
|
g
|
|
966
|
-
]),
|
|
967
|
-
|
|
966
|
+
]), K = x.useMemo(() => F ? M(F, o, { locale: g }) : void 0, [
|
|
967
|
+
F,
|
|
968
968
|
o,
|
|
969
969
|
g
|
|
970
970
|
]);
|
|
971
|
-
return /* @__PURE__ */ w(
|
|
971
|
+
return /* @__PURE__ */ w(Me, {
|
|
972
972
|
rootRef: te,
|
|
973
973
|
className: b.className,
|
|
974
974
|
label: b.label,
|
|
@@ -979,40 +979,44 @@ function nt({ value: e, defaultValue: t, onValueChange: n, format: i = "yyyy-MM-
|
|
|
979
979
|
children: /* @__PURE__ */ T(re, {
|
|
980
980
|
open: p,
|
|
981
981
|
onOpenChange: m,
|
|
982
|
-
children: [/* @__PURE__ */ w(ne, {
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
className:
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
982
|
+
children: [/* @__PURE__ */ w(ne, {
|
|
983
|
+
ref: b.triggerRef,
|
|
984
|
+
onBlur: b.onBlur,
|
|
985
|
+
render: (e) => {
|
|
986
|
+
let t = Te(b.buttonTone, b.buttonStyle);
|
|
987
|
+
return /* @__PURE__ */ T(a, {
|
|
988
|
+
...e,
|
|
989
|
+
id: E,
|
|
990
|
+
tone: t.tone,
|
|
991
|
+
buttonStyle: t.buttonStyle,
|
|
992
|
+
size: S,
|
|
993
|
+
"aria-invalid": le,
|
|
994
|
+
"aria-describedby": O,
|
|
995
|
+
className: r(Le(S), !F && "text-muted-foreground", e.className),
|
|
996
|
+
disabled: b.disabled,
|
|
997
|
+
children: [/* @__PURE__ */ w(se, {
|
|
998
|
+
className: y[S],
|
|
999
|
+
"aria-hidden": "true"
|
|
1000
|
+
}), /* @__PURE__ */ w(s, {
|
|
1001
|
+
tag: "span",
|
|
1002
|
+
size: "inherit",
|
|
1003
|
+
lineHeight: "tight",
|
|
1004
|
+
className: "min-w-0 truncate text-inherit",
|
|
1005
|
+
children: he
|
|
1006
|
+
})]
|
|
1007
|
+
});
|
|
1008
|
+
}
|
|
1009
|
+
}), /* @__PURE__ */ T(ie, {
|
|
1006
1010
|
inset: "flush",
|
|
1007
1011
|
className: "w-auto gap-0",
|
|
1008
1012
|
align: "start",
|
|
1009
1013
|
children: [
|
|
1010
|
-
!!b.header && /* @__PURE__ */ w(
|
|
1011
|
-
/* @__PURE__ */ w(
|
|
1014
|
+
!!b.header && /* @__PURE__ */ w(Pe, { config: b.header }),
|
|
1015
|
+
/* @__PURE__ */ w(Ae, {
|
|
1012
1016
|
mode: "single",
|
|
1013
|
-
selected:
|
|
1017
|
+
selected: F,
|
|
1014
1018
|
onSelect: W,
|
|
1015
|
-
defaultMonth:
|
|
1019
|
+
defaultMonth: F,
|
|
1016
1020
|
numberOfMonths: b.numberOfMonths,
|
|
1017
1021
|
showOutsideDays: b.showOutsideDays,
|
|
1018
1022
|
disabled: d ?? b.disabled,
|
|
@@ -1022,16 +1026,16 @@ function nt({ value: e, defaultValue: t, onValueChange: n, format: i = "yyyy-MM-
|
|
|
1022
1026
|
endMonth: v.endMonth,
|
|
1023
1027
|
...f
|
|
1024
1028
|
}),
|
|
1025
|
-
!!u?.enabled && /* @__PURE__ */ T(
|
|
1029
|
+
!!u?.enabled && /* @__PURE__ */ T(oe, { children: [/* @__PURE__ */ w(ee, {}), /* @__PURE__ */ w("div", {
|
|
1026
1030
|
className: "date-picker--time p-surface",
|
|
1027
1031
|
children: /* @__PURE__ */ w(ae, {
|
|
1028
1032
|
label: h.startTime,
|
|
1029
|
-
children: /* @__PURE__ */ w(
|
|
1030
|
-
value:
|
|
1033
|
+
children: /* @__PURE__ */ w(nt, {
|
|
1034
|
+
value: L ? de(L, j) : null,
|
|
1031
1035
|
onValueChange: G,
|
|
1032
|
-
format:
|
|
1033
|
-
precision:
|
|
1034
|
-
step:
|
|
1036
|
+
format: k,
|
|
1037
|
+
precision: j ? "seconds" : "minutes",
|
|
1038
|
+
step: A,
|
|
1035
1039
|
disabled: b.disabled,
|
|
1036
1040
|
size: "sm",
|
|
1037
1041
|
strings: {
|
|
@@ -1044,11 +1048,11 @@ function nt({ value: e, defaultValue: t, onValueChange: n, format: i = "yyyy-MM-
|
|
|
1044
1048
|
})
|
|
1045
1049
|
})
|
|
1046
1050
|
})] }),
|
|
1047
|
-
!!b.footer && /* @__PURE__ */ w(
|
|
1051
|
+
!!b.footer && /* @__PURE__ */ w(Ne, {
|
|
1048
1052
|
config: b.footer,
|
|
1049
|
-
output:
|
|
1050
|
-
hasSelection: !!
|
|
1051
|
-
autoSummary:
|
|
1053
|
+
output: H(F),
|
|
1054
|
+
hasSelection: !!F,
|
|
1055
|
+
autoSummary: K
|
|
1052
1056
|
})
|
|
1053
1057
|
]
|
|
1054
1058
|
})]
|
|
@@ -1057,84 +1061,88 @@ function nt({ value: e, defaultValue: t, onValueChange: n, format: i = "yyyy-MM-
|
|
|
1057
1061
|
}
|
|
1058
1062
|
//#endregion
|
|
1059
1063
|
//#region src/components/base/date-pickers/date-picker-multiple.tsx
|
|
1060
|
-
function
|
|
1061
|
-
let
|
|
1062
|
-
|
|
1063
|
-
e !== void 0 &&
|
|
1064
|
+
function it({ value: e, defaultValue: t, onValueChange: n, format: i = "yyyy-MM-dd", readableFormat: o = "PPP", placeholder: c, min: l, max: u, required: d, closeOnSelect: f = !1, disabledDates: p, calendarProps: m, open: h, setOpen: g, t: _, dateFnsLocale: v, captionLayout: te, yearBounds: b, rootRef: ae, ...S }) {
|
|
1065
|
+
let C = Fe(S.size), E = x.useId(), D = S.id ?? E, ce = `${D}-description`, le = S.error !== void 0 && S.error !== null && S.error !== "", O = le || !!(S.invalid || S["aria-invalid"] && S["aria-invalid"] !== "false"), k = [S["aria-describedby"], le ? ce : void 0].filter(Boolean).join(" ") || void 0, [A, j] = x.useState(e ?? t ?? []);
|
|
1066
|
+
x.useEffect(() => {
|
|
1067
|
+
e !== void 0 && j(e);
|
|
1064
1068
|
}, [e]);
|
|
1065
|
-
let
|
|
1069
|
+
let M = x.useCallback((e) => q(e, i, o, v), [
|
|
1066
1070
|
i,
|
|
1067
1071
|
o,
|
|
1068
1072
|
v
|
|
1069
|
-
]),
|
|
1073
|
+
]), N = x.useCallback((e) => {
|
|
1070
1074
|
let t = Array.isArray(e) ? e : e ? [e] : [];
|
|
1071
|
-
|
|
1075
|
+
j(t), n?.(M(t)), f && t.length > 0 && g(!1);
|
|
1072
1076
|
}, [
|
|
1073
1077
|
n,
|
|
1074
|
-
|
|
1078
|
+
M,
|
|
1075
1079
|
f,
|
|
1076
1080
|
g
|
|
1077
|
-
]),
|
|
1078
|
-
|
|
1081
|
+
]), P = x.useMemo(() => Y(A, o, c, _.selectDates, _, v), [
|
|
1082
|
+
A,
|
|
1079
1083
|
o,
|
|
1080
1084
|
c,
|
|
1081
1085
|
_,
|
|
1082
1086
|
v
|
|
1083
|
-
]),
|
|
1084
|
-
|
|
1087
|
+
]), F = x.useMemo(() => J(A, l, u, d, _), [
|
|
1088
|
+
A,
|
|
1085
1089
|
l,
|
|
1086
1090
|
u,
|
|
1087
1091
|
d,
|
|
1088
1092
|
_
|
|
1089
|
-
]),
|
|
1090
|
-
return /* @__PURE__ */ w(
|
|
1093
|
+
]), I = x.useMemo(() => A.length > 0 ? _.datesSelected(A.length) : void 0, [A.length, _]);
|
|
1094
|
+
return /* @__PURE__ */ w(Me, {
|
|
1091
1095
|
rootRef: ae,
|
|
1092
|
-
className:
|
|
1093
|
-
label:
|
|
1094
|
-
hint:
|
|
1095
|
-
error:
|
|
1096
|
+
className: S.className,
|
|
1097
|
+
label: S.label,
|
|
1098
|
+
hint: S.hint,
|
|
1099
|
+
error: S.error,
|
|
1096
1100
|
triggerId: D,
|
|
1097
|
-
describedById:
|
|
1101
|
+
describedById: ce,
|
|
1098
1102
|
children: /* @__PURE__ */ T(re, {
|
|
1099
1103
|
open: h,
|
|
1100
1104
|
onOpenChange: g,
|
|
1101
|
-
children: [/* @__PURE__ */ w(ne, {
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
className:
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1105
|
+
children: [/* @__PURE__ */ w(ne, {
|
|
1106
|
+
ref: S.triggerRef,
|
|
1107
|
+
onBlur: S.onBlur,
|
|
1108
|
+
render: (e) => {
|
|
1109
|
+
let t = Te(S.buttonTone, S.buttonStyle);
|
|
1110
|
+
return /* @__PURE__ */ T(a, {
|
|
1111
|
+
...e,
|
|
1112
|
+
id: D,
|
|
1113
|
+
tone: t.tone,
|
|
1114
|
+
buttonStyle: t.buttonStyle,
|
|
1115
|
+
size: C,
|
|
1116
|
+
"aria-invalid": O,
|
|
1117
|
+
"aria-describedby": k,
|
|
1118
|
+
className: r(Le(C), A.length === 0 && "text-muted-foreground", e.className),
|
|
1119
|
+
disabled: S.disabled,
|
|
1120
|
+
children: [/* @__PURE__ */ w(se, {
|
|
1121
|
+
className: y[C],
|
|
1122
|
+
"aria-hidden": "true"
|
|
1123
|
+
}), /* @__PURE__ */ w(s, {
|
|
1124
|
+
tag: "span",
|
|
1125
|
+
size: "inherit",
|
|
1126
|
+
lineHeight: "tight",
|
|
1127
|
+
className: "min-w-0 truncate text-inherit",
|
|
1128
|
+
children: P
|
|
1129
|
+
})]
|
|
1130
|
+
});
|
|
1131
|
+
}
|
|
1132
|
+
}), /* @__PURE__ */ T(ie, {
|
|
1125
1133
|
inset: "flush",
|
|
1126
1134
|
className: "w-auto gap-0",
|
|
1127
1135
|
align: "start",
|
|
1128
1136
|
children: [
|
|
1129
|
-
!!
|
|
1130
|
-
/* @__PURE__ */ w(
|
|
1137
|
+
!!S.header && /* @__PURE__ */ w(Pe, { config: S.header }),
|
|
1138
|
+
/* @__PURE__ */ w(Ae, {
|
|
1131
1139
|
mode: "multiple",
|
|
1132
|
-
selected:
|
|
1133
|
-
onSelect:
|
|
1134
|
-
defaultMonth:
|
|
1135
|
-
numberOfMonths:
|
|
1136
|
-
showOutsideDays:
|
|
1137
|
-
disabled: p ??
|
|
1140
|
+
selected: A,
|
|
1141
|
+
onSelect: N,
|
|
1142
|
+
defaultMonth: A[0],
|
|
1143
|
+
numberOfMonths: S.numberOfMonths,
|
|
1144
|
+
showOutsideDays: S.showOutsideDays,
|
|
1145
|
+
disabled: p ?? S.disabled,
|
|
1138
1146
|
locale: v,
|
|
1139
1147
|
captionLayout: te,
|
|
1140
1148
|
startMonth: b.startMonth,
|
|
@@ -1143,81 +1151,90 @@ function rt({ value: e, defaultValue: t, onValueChange: n, format: i = "yyyy-MM-
|
|
|
1143
1151
|
max: u,
|
|
1144
1152
|
...m
|
|
1145
1153
|
}),
|
|
1146
|
-
!!
|
|
1154
|
+
!!F && /* @__PURE__ */ T(oe, { children: [/* @__PURE__ */ w(ee, {}), /* @__PURE__ */ w("div", {
|
|
1147
1155
|
className: "p-surface",
|
|
1148
1156
|
children: /* @__PURE__ */ w(s, {
|
|
1149
1157
|
type: "secondary",
|
|
1150
|
-
children:
|
|
1158
|
+
children: F
|
|
1151
1159
|
})
|
|
1152
1160
|
})] }),
|
|
1153
|
-
!!
|
|
1154
|
-
config:
|
|
1155
|
-
output:
|
|
1156
|
-
hasSelection:
|
|
1157
|
-
autoSummary:
|
|
1161
|
+
!!S.footer && /* @__PURE__ */ w(Ne, {
|
|
1162
|
+
config: S.footer,
|
|
1163
|
+
output: M(A),
|
|
1164
|
+
hasSelection: A.length > 0,
|
|
1165
|
+
autoSummary: I
|
|
1158
1166
|
})
|
|
1159
1167
|
]
|
|
1160
1168
|
})]
|
|
1161
1169
|
})
|
|
1162
1170
|
});
|
|
1163
1171
|
}
|
|
1172
|
+
function at() {
|
|
1173
|
+
let [e, t] = C();
|
|
1174
|
+
return S(() => {
|
|
1175
|
+
let e = window.matchMedia("(max-width: 767px)"), n = () => {
|
|
1176
|
+
t(window.innerWidth < 768);
|
|
1177
|
+
};
|
|
1178
|
+
return e.addEventListener("change", n), t(window.innerWidth < 768), () => e.removeEventListener("change", n);
|
|
1179
|
+
}, []), !!e;
|
|
1180
|
+
}
|
|
1164
1181
|
//#endregion
|
|
1165
1182
|
//#region src/components/base/date-pickers/date-picker-range.tsx
|
|
1166
|
-
function
|
|
1167
|
-
let
|
|
1183
|
+
function ot({ value: e, defaultValue: n, onValueChange: o, format: c = "yyyy-MM-dd", readableFormat: l = "PPP", placeholder: u, withConfirm: d = !1, min: m, max: h, closeOnSelect: g = !0, withTime: _, presets: v, disabledDates: te, calendarProps: b, open: S, setOpen: C, t: E, dateFnsLocale: D, captionLayout: ce, yearBounds: le, rootRef: O, ...k }) {
|
|
1184
|
+
let A = at(), j = k.numberOfMonths ?? (A ? 1 : 2), { weekStartsOn: N = 1 } = t(), P = v ?? ke(E, N), F = Fe(k.size), I = x.useId(), L = k.id ?? I, R = `${L}-description`, z = k.error !== void 0 && k.error !== null && k.error !== "", B = z || !!(k.invalid || k["aria-invalid"] && k["aria-invalid"] !== "false"), V = [k["aria-describedby"], z ? R : void 0].filter(Boolean).join(" ") || void 0, H = _?.format ?? "24", W = _?.step ?? 60, G = _?.showSeconds ?? !1, me = ge(l), he = _?.showTimeInButton ?? !me, K = _?.showTimeInSummary ?? !me, _e = e ?? n, [q, be] = x.useState(_e), [J, Ce] = x.useState(() => _e?.from ? U(_e.from, G, W) : null), [Y, Ee] = x.useState(() => _e?.to ? U(_e.to, G, W) : null), De = x.useRef(e), Oe = x.useMemo(() => Se(q, m, h, E), [
|
|
1168
1185
|
q,
|
|
1169
1186
|
m,
|
|
1170
1187
|
h,
|
|
1171
|
-
|
|
1172
|
-
]),
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
}, [
|
|
1188
|
+
E
|
|
1189
|
+
]), je = Oe != null && Oe !== "", Ie = typeof Oe == "string" ? Oe : "";
|
|
1190
|
+
x.useEffect(() => {
|
|
1191
|
+
e !== void 0 && be(e);
|
|
1192
|
+
}, [e]), x.useEffect(() => {
|
|
1176
1193
|
if (!_?.enabled) {
|
|
1177
|
-
|
|
1194
|
+
De.current = e;
|
|
1178
1195
|
return;
|
|
1179
1196
|
}
|
|
1180
|
-
let
|
|
1181
|
-
n ?
|
|
1197
|
+
let t = De.current, n = e?.from, r = e?.to;
|
|
1198
|
+
n ? Ce(U(n, G, W)) : t?.from && Ce(null), r ? Ee(U(r, G, W)) : t?.to && Ee(null), De.current = e;
|
|
1182
1199
|
}, [
|
|
1183
|
-
|
|
1200
|
+
e,
|
|
1184
1201
|
_?.enabled,
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
]),
|
|
1202
|
+
G,
|
|
1203
|
+
W
|
|
1204
|
+
]), x.useEffect(() => {
|
|
1188
1205
|
if (!_?.enabled) return;
|
|
1189
1206
|
let e = (e) => {
|
|
1190
1207
|
if (!e) return e;
|
|
1191
|
-
let t = fe(e,
|
|
1208
|
+
let t = fe(e, W, G);
|
|
1192
1209
|
return e.hours === t.hours && e.minutes === t.minutes && e.seconds === t.seconds ? e : t;
|
|
1193
1210
|
};
|
|
1194
|
-
|
|
1211
|
+
Ce(e), Ee(e);
|
|
1195
1212
|
}, [
|
|
1196
1213
|
_?.enabled,
|
|
1197
|
-
|
|
1198
|
-
|
|
1214
|
+
W,
|
|
1215
|
+
G
|
|
1199
1216
|
]);
|
|
1200
|
-
let
|
|
1217
|
+
let Re = x.useCallback((e) => {
|
|
1201
1218
|
let t = e;
|
|
1202
1219
|
return e && _?.enabled && (t = {
|
|
1203
1220
|
...e,
|
|
1204
1221
|
from: e.from && J ? ye(e.from, J) : e.from,
|
|
1205
1222
|
to: e.to && Y ? ye(e.to, Y) : e.to
|
|
1206
|
-
}), ve(t, c, l,
|
|
1223
|
+
}), ve(t, c, l, D);
|
|
1207
1224
|
}, [
|
|
1208
1225
|
c,
|
|
1209
1226
|
l,
|
|
1210
|
-
|
|
1227
|
+
D,
|
|
1211
1228
|
_,
|
|
1212
1229
|
J,
|
|
1213
1230
|
Y
|
|
1214
|
-
]),
|
|
1215
|
-
let t =
|
|
1231
|
+
]), ze = x.useCallback((e) => {
|
|
1232
|
+
let t = ue(e ?? void 0);
|
|
1233
|
+
t && Ce(t);
|
|
1234
|
+
}, []), Be = x.useCallback((e) => {
|
|
1235
|
+
let t = ue(e ?? void 0);
|
|
1216
1236
|
t && Ee(t);
|
|
1217
|
-
}, []), Ve =
|
|
1218
|
-
let t = le(e ?? void 0);
|
|
1219
|
-
t && De(t);
|
|
1220
|
-
}, []), He = S.useCallback((e, t, n) => t ? !n?.from || n.to ? {
|
|
1237
|
+
}, []), Ve = x.useCallback((e, t, n) => t ? !n?.from || n.to ? {
|
|
1221
1238
|
from: t,
|
|
1222
1239
|
to: void 0
|
|
1223
1240
|
} : t < n.from ? {
|
|
@@ -1226,130 +1243,134 @@ function it({ value: t, defaultValue: n, onValueChange: o, format: c = "yyyy-MM-
|
|
|
1226
1243
|
} : {
|
|
1227
1244
|
from: n.from,
|
|
1228
1245
|
to: t
|
|
1229
|
-
} : e, []),
|
|
1230
|
-
let n =
|
|
1231
|
-
if (
|
|
1232
|
-
o?.(
|
|
1246
|
+
} : e, []), He = x.useCallback((e, t) => {
|
|
1247
|
+
let n = Ve(e, t, q);
|
|
1248
|
+
if (be(n), d || _?.enabled) return;
|
|
1249
|
+
o?.(Re(n));
|
|
1233
1250
|
let r = !!(n?.from && n?.to), i = xe(n, m, h).isValid;
|
|
1234
|
-
g && r && i &&
|
|
1251
|
+
g && r && i && C(!1);
|
|
1235
1252
|
}, [
|
|
1236
1253
|
q,
|
|
1237
|
-
|
|
1254
|
+
Ve,
|
|
1238
1255
|
d,
|
|
1239
1256
|
_,
|
|
1240
1257
|
o,
|
|
1241
|
-
|
|
1258
|
+
Re,
|
|
1242
1259
|
m,
|
|
1243
1260
|
h,
|
|
1244
1261
|
g,
|
|
1245
|
-
|
|
1246
|
-
]), Ue =
|
|
1262
|
+
C
|
|
1263
|
+
]), Ue = x.useCallback((e) => {
|
|
1247
1264
|
let t = e.getValue();
|
|
1248
|
-
|
|
1249
|
-
}, [
|
|
1250
|
-
o?.(
|
|
1265
|
+
He(t);
|
|
1266
|
+
}, [He]), We = x.useCallback(() => {
|
|
1267
|
+
o?.(Re(q)), C(!1);
|
|
1251
1268
|
}, [
|
|
1252
1269
|
q,
|
|
1253
1270
|
o,
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
]),
|
|
1257
|
-
if (_?.enabled && J) return pe(J,
|
|
1258
|
-
am:
|
|
1259
|
-
pm:
|
|
1271
|
+
Re,
|
|
1272
|
+
C
|
|
1273
|
+
]), X = x.useMemo(() => {
|
|
1274
|
+
if (_?.enabled && J) return pe(J, G, H, {
|
|
1275
|
+
am: E.am,
|
|
1276
|
+
pm: E.pm
|
|
1260
1277
|
});
|
|
1261
1278
|
}, [
|
|
1262
1279
|
_?.enabled,
|
|
1263
1280
|
J,
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
]),
|
|
1268
|
-
if (_?.enabled && Y) return pe(Y,
|
|
1269
|
-
am:
|
|
1270
|
-
pm:
|
|
1281
|
+
G,
|
|
1282
|
+
H,
|
|
1283
|
+
E
|
|
1284
|
+
]), Z = x.useMemo(() => {
|
|
1285
|
+
if (_?.enabled && Y) return pe(Y, G, H, {
|
|
1286
|
+
am: E.am,
|
|
1287
|
+
pm: E.pm
|
|
1271
1288
|
});
|
|
1272
1289
|
}, [
|
|
1273
1290
|
_?.enabled,
|
|
1274
1291
|
Y,
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
]),
|
|
1292
|
+
G,
|
|
1293
|
+
H,
|
|
1294
|
+
E
|
|
1295
|
+
]), Q = x.useMemo(() => {
|
|
1279
1296
|
if (_?.enabled && q?.from) {
|
|
1280
|
-
let e = M(q.from, l, { locale:
|
|
1297
|
+
let e = M(q.from, l, { locale: D }), t = he && X ? `${e} ${X}` : e;
|
|
1281
1298
|
if (q.to) {
|
|
1282
|
-
let e = M(q.to, l, { locale:
|
|
1283
|
-
return `${t} - ${
|
|
1299
|
+
let e = M(q.to, l, { locale: D });
|
|
1300
|
+
return `${t} - ${he && Z ? `${e} ${Z}` : e}`;
|
|
1284
1301
|
}
|
|
1285
1302
|
return t;
|
|
1286
1303
|
}
|
|
1287
|
-
return we(q, l, u,
|
|
1304
|
+
return we(q, l, u, E.selectDateRange, D);
|
|
1288
1305
|
}, [
|
|
1289
1306
|
_?.enabled,
|
|
1290
1307
|
q,
|
|
1291
1308
|
l,
|
|
1292
|
-
|
|
1309
|
+
he,
|
|
1310
|
+
X,
|
|
1293
1311
|
Z,
|
|
1294
|
-
Q,
|
|
1295
1312
|
u,
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
]),
|
|
1313
|
+
E,
|
|
1314
|
+
D
|
|
1315
|
+
]), Ge = x.useMemo(() => {
|
|
1299
1316
|
if (!q?.from || !q?.to) return;
|
|
1300
|
-
let e = M(q.from, l, { locale:
|
|
1301
|
-
return `${
|
|
1317
|
+
let e = M(q.from, l, { locale: D }), t = M(q.to, l, { locale: D });
|
|
1318
|
+
return `${K && X ? `${e} ${X}` : e} - ${K && Z ? `${t} ${Z}` : t}`;
|
|
1302
1319
|
}, [
|
|
1303
1320
|
q,
|
|
1304
1321
|
l,
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1322
|
+
D,
|
|
1323
|
+
K,
|
|
1324
|
+
X,
|
|
1325
|
+
Z
|
|
1309
1326
|
]);
|
|
1310
|
-
return /* @__PURE__ */ w(
|
|
1311
|
-
rootRef:
|
|
1312
|
-
className:
|
|
1313
|
-
label:
|
|
1314
|
-
hint:
|
|
1315
|
-
error:
|
|
1316
|
-
triggerId:
|
|
1317
|
-
describedById:
|
|
1327
|
+
return /* @__PURE__ */ w(Me, {
|
|
1328
|
+
rootRef: O,
|
|
1329
|
+
className: k.className,
|
|
1330
|
+
label: k.label,
|
|
1331
|
+
hint: k.hint,
|
|
1332
|
+
error: k.error,
|
|
1333
|
+
triggerId: L,
|
|
1334
|
+
describedById: R,
|
|
1318
1335
|
children: /* @__PURE__ */ T(re, {
|
|
1319
|
-
open:
|
|
1320
|
-
onOpenChange:
|
|
1321
|
-
children: [/* @__PURE__ */ w(ne, {
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
className: r(
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1336
|
+
open: S,
|
|
1337
|
+
onOpenChange: C,
|
|
1338
|
+
children: [/* @__PURE__ */ w(ne, {
|
|
1339
|
+
ref: k.triggerRef,
|
|
1340
|
+
onBlur: k.onBlur,
|
|
1341
|
+
render: (e) => {
|
|
1342
|
+
let t = Te(k.buttonTone, k.buttonStyle);
|
|
1343
|
+
return /* @__PURE__ */ T(a, {
|
|
1344
|
+
...e,
|
|
1345
|
+
id: L,
|
|
1346
|
+
tone: t.tone,
|
|
1347
|
+
buttonStyle: t.buttonStyle,
|
|
1348
|
+
size: F,
|
|
1349
|
+
"aria-invalid": B,
|
|
1350
|
+
"aria-describedby": V,
|
|
1351
|
+
className: r(Le(F), !q && "text-muted-foreground", e.className),
|
|
1352
|
+
disabled: k.disabled,
|
|
1353
|
+
children: [/* @__PURE__ */ w(se, {
|
|
1354
|
+
className: r(y[F], "shrink-0"),
|
|
1355
|
+
"aria-hidden": "true"
|
|
1356
|
+
}), /* @__PURE__ */ w(s, {
|
|
1357
|
+
tag: "span",
|
|
1358
|
+
size: "inherit",
|
|
1359
|
+
lineHeight: "tight",
|
|
1360
|
+
className: "min-w-0 truncate text-inherit",
|
|
1361
|
+
children: Q
|
|
1362
|
+
})]
|
|
1363
|
+
});
|
|
1364
|
+
}
|
|
1365
|
+
}), /* @__PURE__ */ T(ie, {
|
|
1345
1366
|
inset: "flush",
|
|
1346
1367
|
className: "w-auto gap-0",
|
|
1347
1368
|
align: "start",
|
|
1348
|
-
children: [!!
|
|
1369
|
+
children: [!!k.header && /* @__PURE__ */ w(Pe, { config: k.header }), /* @__PURE__ */ T("div", {
|
|
1349
1370
|
className: "flex flex-col sm:flex-row",
|
|
1350
|
-
children: [
|
|
1371
|
+
children: [P.length > 0 && /* @__PURE__ */ w("div", {
|
|
1351
1372
|
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",
|
|
1352
|
-
children:
|
|
1373
|
+
children: P.map((e) => /* @__PURE__ */ w(a, {
|
|
1353
1374
|
tone: "secondary",
|
|
1354
1375
|
buttonStyle: "ghost",
|
|
1355
1376
|
onClick: () => Ue(e),
|
|
@@ -1359,24 +1380,24 @@ function it({ value: t, defaultValue: n, onValueChange: o, format: c = "yyyy-MM-
|
|
|
1359
1380
|
}), /* @__PURE__ */ T("div", {
|
|
1360
1381
|
className: "flex flex-col",
|
|
1361
1382
|
children: [
|
|
1362
|
-
/* @__PURE__ */ w(
|
|
1383
|
+
/* @__PURE__ */ w(Ae, {
|
|
1363
1384
|
mode: "range",
|
|
1364
1385
|
selected: q,
|
|
1365
|
-
onSelect:
|
|
1386
|
+
onSelect: He,
|
|
1366
1387
|
defaultMonth: q?.from,
|
|
1367
|
-
numberOfMonths:
|
|
1368
|
-
showOutsideDays:
|
|
1369
|
-
disabled: te ??
|
|
1370
|
-
locale:
|
|
1388
|
+
numberOfMonths: j,
|
|
1389
|
+
showOutsideDays: k.showOutsideDays,
|
|
1390
|
+
disabled: te ?? k.disabled,
|
|
1391
|
+
locale: D,
|
|
1371
1392
|
captionLayout: ce,
|
|
1372
|
-
startMonth:
|
|
1373
|
-
endMonth:
|
|
1393
|
+
startMonth: le.startMonth,
|
|
1394
|
+
endMonth: le.endMonth,
|
|
1374
1395
|
...b,
|
|
1375
1396
|
className: r(i.calendarCompactCell, b?.className)
|
|
1376
1397
|
}),
|
|
1377
1398
|
(() => {
|
|
1378
|
-
let e = !!q?.from && !
|
|
1379
|
-
return !e && !t && !
|
|
1399
|
+
let e = !!q?.from && !k.footer, t = !!_?.enabled && !!q?.from, n = !!(d || _?.enabled) && !k.footer;
|
|
1400
|
+
return !e && !t && !je && !n ? null : /* @__PURE__ */ T(oe, { children: [/* @__PURE__ */ w(ee, {}), /* @__PURE__ */ w("div", {
|
|
1380
1401
|
className: "date-picker--range-footer p-surface",
|
|
1381
1402
|
children: /* @__PURE__ */ T(p, {
|
|
1382
1403
|
gap: "lg",
|
|
@@ -1393,11 +1414,11 @@ function it({ value: t, defaultValue: n, onValueChange: o, format: c = "yyyy-MM-
|
|
|
1393
1414
|
children: [/* @__PURE__ */ T(s, {
|
|
1394
1415
|
tag: "span",
|
|
1395
1416
|
type: "secondary",
|
|
1396
|
-
children: [
|
|
1417
|
+
children: [E.from, ":"]
|
|
1397
1418
|
}), /* @__PURE__ */ T(s, {
|
|
1398
1419
|
tag: "span",
|
|
1399
1420
|
weight: "medium",
|
|
1400
|
-
children: [M(q.from, l, { locale:
|
|
1421
|
+
children: [M(q.from, l, { locale: D }), K && X ? ` ${X}` : ""]
|
|
1401
1422
|
})]
|
|
1402
1423
|
}), !!q.to && /* @__PURE__ */ T(p, {
|
|
1403
1424
|
direction: "horizontal",
|
|
@@ -1406,11 +1427,11 @@ function it({ value: t, defaultValue: n, onValueChange: o, format: c = "yyyy-MM-
|
|
|
1406
1427
|
children: [/* @__PURE__ */ T(s, {
|
|
1407
1428
|
tag: "span",
|
|
1408
1429
|
type: "secondary",
|
|
1409
|
-
children: [
|
|
1430
|
+
children: [E.to, ":"]
|
|
1410
1431
|
}), /* @__PURE__ */ T(s, {
|
|
1411
1432
|
tag: "span",
|
|
1412
1433
|
weight: "medium",
|
|
1413
|
-
children: [M(q.to, l, { locale:
|
|
1434
|
+
children: [M(q.to, l, { locale: D }), K && Z ? ` ${Z}` : ""]
|
|
1414
1435
|
})]
|
|
1415
1436
|
})]
|
|
1416
1437
|
}),
|
|
@@ -1421,64 +1442,64 @@ function it({ value: t, defaultValue: n, onValueChange: o, format: c = "yyyy-MM-
|
|
|
1421
1442
|
},
|
|
1422
1443
|
gap: "lg",
|
|
1423
1444
|
children: [/* @__PURE__ */ w(ae, {
|
|
1424
|
-
label:
|
|
1425
|
-
children: /* @__PURE__ */ w(
|
|
1426
|
-
value: J ?
|
|
1427
|
-
onValueChange:
|
|
1428
|
-
format:
|
|
1429
|
-
precision:
|
|
1430
|
-
step:
|
|
1431
|
-
disabled:
|
|
1445
|
+
label: E.startTime,
|
|
1446
|
+
children: /* @__PURE__ */ w(nt, {
|
|
1447
|
+
value: J ? de(J, G) : null,
|
|
1448
|
+
onValueChange: ze,
|
|
1449
|
+
format: H,
|
|
1450
|
+
precision: G ? "seconds" : "minutes",
|
|
1451
|
+
step: W,
|
|
1452
|
+
disabled: k.disabled,
|
|
1432
1453
|
size: "sm",
|
|
1433
1454
|
strings: {
|
|
1434
|
-
hours:
|
|
1435
|
-
minutes:
|
|
1436
|
-
seconds:
|
|
1437
|
-
am:
|
|
1438
|
-
pm:
|
|
1455
|
+
hours: E.hours,
|
|
1456
|
+
minutes: E.minutes,
|
|
1457
|
+
seconds: E.seconds,
|
|
1458
|
+
am: E.am,
|
|
1459
|
+
pm: E.pm
|
|
1439
1460
|
}
|
|
1440
1461
|
})
|
|
1441
1462
|
}), !!q.to && /* @__PURE__ */ w(ae, {
|
|
1442
|
-
label:
|
|
1443
|
-
children: /* @__PURE__ */ w(
|
|
1444
|
-
value: Y ?
|
|
1445
|
-
onValueChange:
|
|
1446
|
-
format:
|
|
1447
|
-
precision:
|
|
1448
|
-
step:
|
|
1449
|
-
disabled:
|
|
1463
|
+
label: E.endTime,
|
|
1464
|
+
children: /* @__PURE__ */ w(nt, {
|
|
1465
|
+
value: Y ? de(Y, G) : null,
|
|
1466
|
+
onValueChange: Be,
|
|
1467
|
+
format: H,
|
|
1468
|
+
precision: G ? "seconds" : "minutes",
|
|
1469
|
+
step: W,
|
|
1470
|
+
disabled: k.disabled,
|
|
1450
1471
|
size: "sm",
|
|
1451
1472
|
strings: {
|
|
1452
|
-
hours:
|
|
1453
|
-
minutes:
|
|
1454
|
-
seconds:
|
|
1455
|
-
am:
|
|
1456
|
-
pm:
|
|
1473
|
+
hours: E.hours,
|
|
1474
|
+
minutes: E.minutes,
|
|
1475
|
+
seconds: E.seconds,
|
|
1476
|
+
am: E.am,
|
|
1477
|
+
pm: E.pm
|
|
1457
1478
|
}
|
|
1458
1479
|
})
|
|
1459
1480
|
})]
|
|
1460
1481
|
}),
|
|
1461
1482
|
/* @__PURE__ */ w(s, {
|
|
1462
1483
|
type: "error",
|
|
1463
|
-
content:
|
|
1464
|
-
hidden: !
|
|
1484
|
+
content: Ie,
|
|
1485
|
+
hidden: !je
|
|
1465
1486
|
}),
|
|
1466
1487
|
n && /* @__PURE__ */ w(a, {
|
|
1467
1488
|
tone: "primary",
|
|
1468
1489
|
onClick: We,
|
|
1469
|
-
disabled: !q?.from || !q?.to || !!
|
|
1490
|
+
disabled: !q?.from || !q?.to || !!Oe,
|
|
1470
1491
|
className: "w-full",
|
|
1471
|
-
children:
|
|
1492
|
+
children: E.confirm
|
|
1472
1493
|
})
|
|
1473
1494
|
]
|
|
1474
1495
|
})
|
|
1475
1496
|
})] });
|
|
1476
1497
|
})(),
|
|
1477
|
-
!!
|
|
1478
|
-
config:
|
|
1479
|
-
output:
|
|
1498
|
+
!!k.footer && /* @__PURE__ */ w(Ne, {
|
|
1499
|
+
config: k.footer,
|
|
1500
|
+
output: Re(q),
|
|
1480
1501
|
hasSelection: !!(q?.from && q?.to),
|
|
1481
|
-
autoSummary:
|
|
1502
|
+
autoSummary: Ge
|
|
1482
1503
|
})
|
|
1483
1504
|
]
|
|
1484
1505
|
})]
|
|
@@ -1489,10 +1510,10 @@ function it({ value: t, defaultValue: n, onValueChange: o, format: c = "yyyy-MM-
|
|
|
1489
1510
|
}
|
|
1490
1511
|
//#endregion
|
|
1491
1512
|
//#region src/components/base/date-pickers/date-picker.tsx
|
|
1492
|
-
var
|
|
1493
|
-
let [a, o] =
|
|
1494
|
-
return Ee(
|
|
1495
|
-
...
|
|
1513
|
+
var st = x.forwardRef(function(e, i) {
|
|
1514
|
+
let [a, o] = x.useState(!1), s = t(), c = e.locale ?? s.locale ?? z, l = n(Re, e.strings), u = x.useMemo(() => e.enableYearDropdown || e.yearSelection?.enabled ? "dropdown" : "label", [e.enableYearDropdown, e.yearSelection]), d = x.useMemo(() => K(e.yearSelection), [e.yearSelection]), f = r("date-picker--component", e.className);
|
|
1515
|
+
return Ee(e) ? /* @__PURE__ */ w(rt, {
|
|
1516
|
+
...e,
|
|
1496
1517
|
rootRef: i,
|
|
1497
1518
|
className: f,
|
|
1498
1519
|
open: a,
|
|
@@ -1501,8 +1522,8 @@ var at = S.forwardRef(function(t, i) {
|
|
|
1501
1522
|
dateFnsLocale: c,
|
|
1502
1523
|
captionLayout: u,
|
|
1503
1524
|
yearBounds: d
|
|
1504
|
-
}) :
|
|
1505
|
-
...
|
|
1525
|
+
}) : De(e) ? /* @__PURE__ */ w(it, {
|
|
1526
|
+
...e,
|
|
1506
1527
|
rootRef: i,
|
|
1507
1528
|
className: f,
|
|
1508
1529
|
open: a,
|
|
@@ -1511,8 +1532,8 @@ var at = S.forwardRef(function(t, i) {
|
|
|
1511
1532
|
dateFnsLocale: c,
|
|
1512
1533
|
captionLayout: u,
|
|
1513
1534
|
yearBounds: d
|
|
1514
|
-
}) :
|
|
1515
|
-
...
|
|
1535
|
+
}) : Oe(e) ? /* @__PURE__ */ w(ot, {
|
|
1536
|
+
...e,
|
|
1516
1537
|
rootRef: i,
|
|
1517
1538
|
className: f,
|
|
1518
1539
|
open: a,
|
|
@@ -1523,8 +1544,8 @@ var at = S.forwardRef(function(t, i) {
|
|
|
1523
1544
|
yearBounds: d
|
|
1524
1545
|
}) : null;
|
|
1525
1546
|
});
|
|
1526
|
-
|
|
1547
|
+
st.displayName = "DatePicker";
|
|
1527
1548
|
//#endregion
|
|
1528
|
-
export {
|
|
1549
|
+
export { Le as a, Ne as c, Re as i, Me as l, nt as n, Fe as o, Ue as r, Pe as s, st as t, Te as u };
|
|
1529
1550
|
|
|
1530
|
-
//# sourceMappingURL=date-picker-
|
|
1551
|
+
//# sourceMappingURL=date-picker-RlIzKom_.js.map
|