themelia-react-ui 2.0.4 → 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 +135 -0
- package/README.md +113 -18
- package/dist/{accordion-96o0pN62.js → accordion-B9MHG0cT.js} +11 -11
- package/dist/accordion-B9MHG0cT.js.map +1 -0
- package/dist/{action-menu-CHgs8vmj.js → action-menu-Dr8K-ghE.js} +48 -45
- package/dist/action-menu-Dr8K-ghE.js.map +1 -0
- package/dist/{affordance-geometry.generated-B8yGOr8-.js → affordance-geometry.generated-P-aVJisu.js} +36 -36
- package/dist/affordance-geometry.generated-P-aVJisu.js.map +1 -0
- package/dist/{ai-artifact-BZUGwBq6.js → ai-artifact-C58tQcBy.js} +210 -174
- 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-DkoqHPPl.js → attachment-Dg_69lPS.js} +9 -9
- package/dist/{attachment-DkoqHPPl.js.map → attachment-Dg_69lPS.js.map} +1 -1
- package/dist/{auth-D2FVZ1MH.js → auth-DTkkshS8.js} +43 -46
- package/dist/auth-DTkkshS8.js.map +1 -0
- package/dist/{avatar-DWO_HHhB.js → avatar-CeZaFmNH.js} +8 -8
- package/dist/avatar-CeZaFmNH.js.map +1 -0
- package/dist/{badge-DErMA7ul.js → badge-xIiV_E7f.js} +5 -5
- package/dist/{badge-DErMA7ul.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 +2 -2
- 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-CdfIkCsV.js → batch-action-bar-Cb8cuvyy.js} +6 -6
- package/dist/batch-action-bar-Cb8cuvyy.js.map +1 -0
- package/dist/blocks/admin.js +21 -21
- 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 +325 -306
- 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 +1259 -1184
- 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-B-WFKecD.js → breadcrumbs-J-K2kl4c.js} +6 -6
- package/dist/{breadcrumbs-B-WFKecD.js.map → breadcrumbs-J-K2kl4c.js.map} +1 -1
- package/dist/{button-DkmK-z8E.js → button-S2Cubiiz.js} +3 -3
- package/dist/button-S2Cubiiz.js.map +1 -0
- package/dist/{buttons-BbfzgczK.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-CzYUTPeJ.js → checkbox-fflqmODR.js} +2 -2
- package/dist/{checkbox-CzYUTPeJ.js.map → checkbox-fflqmODR.js.map} +1 -1
- package/dist/{choice-inputs-JLtij2y4.js → choice-inputs-zUgBZfE4.js} +258 -257
- package/dist/choice-inputs-zUgBZfE4.js.map +1 -0
- package/dist/{code-block-CGNaUtAE.js → code-block-BzmM9Eig.js} +8 -8
- package/dist/code-block-BzmM9Eig.js.map +1 -0
- package/dist/{collapsible-Do4G0zcC.js → collapsible-BkAI_XD4.js} +5 -5
- package/dist/{collapsible-Do4G0zcC.js.map → collapsible-BkAI_XD4.js.map} +1 -1
- package/dist/{collection-content-C0e8SsTm.js → collection-content-gDh1v6O4.js} +3 -3
- package/dist/{collection-content-C0e8SsTm.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-CBJDs6w_.js → combobox-BwzoXFSG.js} +254 -247
- package/dist/combobox-BwzoXFSG.js.map +1 -0
- package/dist/{command-D8NrBj-b.js → command-CrlPIL6m.js} +11 -11
- package/dist/command-CrlPIL6m.js.map +1 -0
- package/dist/{comments-Di4w0H_S.js → comments-Dmpp0YIc.js} +29 -29
- package/dist/{comments-Di4w0H_S.js.map → comments-Dmpp0YIc.js.map} +1 -1
- package/dist/components/base/action-menu/action-menu.d.ts +7 -1
- package/dist/components/base/buttons/button-group.recipes.d.ts +2 -2
- package/dist/components/base/cards/card.recipes.d.ts +6 -4
- 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 +3 -4
- 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/choice-types.d.ts +1 -1
- package/dist/components/base/combobox/index.d.ts +4 -2
- package/dist/components/base/feedback/alert.d.ts +1 -1
- package/dist/components/base/forms/form-sizing.d.ts +7 -7
- package/dist/components/base/forms/workflow.d.ts +7 -1
- package/dist/components/base/forms-numeric/coordinates-input.d.ts +4 -0
- package/dist/components/base/metadata-list/metadata-list.d.ts +1 -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 +10 -3
- 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/toaster/index.d.ts +1 -0
- 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/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/{containers-CRmHf7GP.js → containers-CIxwbZt5.js} +26 -18
- 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-CnGCZdX4.js → copyable-DIznBqiT.js} +7 -7
- package/dist/{copyable-CnGCZdX4.js.map → copyable-DIznBqiT.js.map} +1 -1
- package/dist/{data-display-D4oujtx0.js → data-display-BdgCAw8T.js} +268 -277
- package/dist/data-display-BdgCAw8T.js.map +1 -0
- package/dist/{date-Q7jnXxpk.js → date-Cq8ioE4o.js} +5 -5
- package/dist/{date-Q7jnXxpk.js.map → date-Cq8ioE4o.js.map} +1 -1
- package/dist/{date-picker-zOt1oNss.js → date-picker-RlIzKom_.js} +446 -437
- package/dist/date-picker-RlIzKom_.js.map +1 -0
- package/dist/{date-pickers-cj8IXbDC.js → date-pickers-DY-CpXS1.js} +12 -12
- package/dist/{date-pickers-cj8IXbDC.js.map → date-pickers-DY-CpXS1.js.map} +1 -1
- package/dist/{display-BB4BL_-K.js → display-KsZLw9Ov.js} +9 -9
- package/dist/{display-BB4BL_-K.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 +22 -22
- 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 +237 -238
- package/dist/features/email-composer.js.map +1 -1
- package/dist/features/event-calendar.js +140 -146
- 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 +375 -326
- 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 +1266 -1193
- 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 +69 -66
- package/dist/features/resource.js.map +1 -1
- package/dist/features/rich-text-editor.js +2 -2
- package/dist/features/schema-form.js +13 -13
- 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 +94 -95
- package/dist/features/theme-tweaker.js.map +1 -1
- package/dist/{feedback-DZNL5Lg1.js → feedback-Dm4izqFn.js} +80 -79
- package/dist/feedback-Dm4izqFn.js.map +1 -0
- package/dist/{field-affordance-recipes-DjwGx8eM.js → field-affordance-recipes-DWcNcOjh.js} +4 -4
- package/dist/field-affordance-recipes-DWcNcOjh.js.map +1 -0
- package/dist/{filters-BcT-uoFy.js → filters-DzgSJpMK.js} +693 -645
- package/dist/filters-DzgSJpMK.js.map +1 -0
- package/dist/{form-field-CsgRmdit.js → form-field-BriWAXyg.js} +6 -6
- package/dist/{form-field-CsgRmdit.js.map → form-field-BriWAXyg.js.map} +1 -1
- package/dist/{form-sizing-NXgjkmBG.js → form-sizing-Bs2qFUeE.js} +4 -4
- package/dist/form-sizing-Bs2qFUeE.js.map +1 -0
- package/dist/{forms-BV5m5aQF.js → forms-C0RGnJTe.js} +17 -13
- package/dist/forms-C0RGnJTe.js.map +1 -0
- package/dist/{forms-numeric-Cd33AKbD.js → forms-numeric-DIhghX1Q.js} +86 -82
- package/dist/forms-numeric-DIhghX1Q.js.map +1 -0
- package/dist/{header-BA697l4a.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-BQ-L7Uu2.js → hooks-DB6CJ4MR.js} +26 -14
- package/dist/hooks-DB6CJ4MR.js.map +1 -0
- package/dist/{icon-badge-COWbCCWu.js → icon-badge-DZF-YjQp.js} +4 -4
- package/dist/{icon-badge-COWbCCWu.js.map → icon-badge-DZF-YjQp.js.map} +1 -1
- package/dist/index.js +4 -5
- package/dist/{input-Cdw4k0fb.js → input-CvyDQlY7.js} +8 -8
- package/dist/{input-Cdw4k0fb.js.map → input-CvyDQlY7.js.map} +1 -1
- package/dist/input-DMBwAZmr.js +21 -0
- package/dist/input-DMBwAZmr.js.map +1 -0
- package/dist/{item-BvZ2DR_x.js → item-DjCcM18E.js} +16 -16
- 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 +35 -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/utils.js +1 -1
- package/dist/map-demo-tile.svg +1 -1
- package/dist/{media-gallery-CSl5W1Fy.js → media-gallery-C-vChPmE.js} +6 -6
- package/dist/{media-gallery-CSl5W1Fy.js.map → media-gallery-C-vChPmE.js.map} +1 -1
- package/dist/{mentions-RKOQaaIB.js → mentions-0_4nWuI-.js} +10 -10
- package/dist/{mentions-RKOQaaIB.js.map → mentions-0_4nWuI-.js.map} +1 -1
- package/dist/{message-INU2xsxu.js → message-g8p7eVtN.js} +7 -7
- package/dist/message-g8p7eVtN.js.map +1 -0
- package/dist/{metadata-list-qVV7AVxa.js → metadata-list-C3MkU-Om.js} +64 -64
- 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-BQNcg1jT.js → navigation-DaRjthVk.js} +101 -82
- package/dist/navigation-DaRjthVk.js.map +1 -0
- package/dist/{navigation-row-recipes-WZEs-hYo.js → navigation-row-recipes-BGVLvU_O.js} +9 -9
- package/dist/navigation-row-recipes-BGVLvU_O.js.map +1 -0
- package/dist/{number-E_OiIfJz.js → number-CRU3kGuk.js} +5 -5
- package/dist/{number-E_OiIfJz.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-Ch8X_47u.js → pagination-CgCjElfu.js} +7 -7
- package/dist/{pagination-Ch8X_47u.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-BYaCdFhf.js → popover-menu-DlnQ2zlR.js} +7 -7
- package/dist/{popover-menu-BYaCdFhf.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-Du64iDbb.js → primitives-ByWgGUgt.js} +5 -5
- package/dist/{primitives-Du64iDbb.js.map → primitives-ByWgGUgt.js.map} +1 -1
- package/dist/primitives.js +4 -4
- package/dist/{progress-BvF2oCdV.js → progress-BJhQP9WX.js} +9 -9
- package/dist/{progress-BvF2oCdV.js.map → progress-BJhQP9WX.js.map} +1 -1
- package/dist/{receipt-D789Jwyy.js → receipt-tOc7B3hw.js} +7 -7
- package/dist/receipt-tOc7B3hw.js.map +1 -0
- package/dist/{rich-text-CLJEf76s.js → rich-text-Dth5E882.js} +3 -3
- package/dist/{rich-text-CLJEf76s.js.map → rich-text-Dth5E882.js.map} +1 -1
- package/dist/{rich-text-editor-Cm1dpUpQ.js → rich-text-editor-C1fOjBTd.js} +429 -430
- package/dist/rich-text-editor-C1fOjBTd.js.map +1 -0
- package/dist/{rich-text-editor-toolbar-L__e4x47.js → rich-text-editor-toolbar-laT3tpBT.js} +32 -28
- package/dist/rich-text-editor-toolbar-laT3tpBT.js.map +1 -0
- package/dist/{scroll-area-La5RXsEk.js → scroll-area-B0dB2cBi.js} +2 -2
- package/dist/{scroll-area-La5RXsEk.js.map → scroll-area-B0dB2cBi.js.map} +1 -1
- package/dist/{separator-DAEV0w65.js → separator-Bb17I4pu.js} +2 -2
- package/dist/{separator-DAEV0w65.js.map → separator-Bb17I4pu.js.map} +1 -1
- package/dist/{separator-GNfPG-90.js → separator-Ct_WSWTJ.js} +3 -3
- package/dist/{separator-GNfPG-90.js.map → separator-Ct_WSWTJ.js.map} +1 -1
- package/dist/services/actions.js +1 -1
- package/dist/{settings-BA2iboic.js → settings-Bar5wiSo.js} +31 -38
- 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-C0V0_Fyf.js → structure-DuxKl954.js} +2 -2
- package/dist/{structure-C0V0_Fyf.js.map → structure-DuxKl954.js.map} +1 -1
- package/dist/style.css +1 -1
- package/dist/{table-CpvnzJn9.js → table-B4TE7iOV.js} +3 -3
- package/dist/{table-CpvnzJn9.js.map → table-B4TE7iOV.js.map} +1 -1
- package/dist/{table-DH7rozUv.js → table-CFOWY9pQ.js} +394 -388
- package/dist/table-CFOWY9pQ.js.map +1 -0
- package/dist/{tabs-eqVsJZWO.js → tabs-e7ko9S2o.js} +11 -11
- package/dist/tabs-e7ko9S2o.js.map +1 -0
- package/dist/{text-inputs-DXItiR0O.js → text-inputs-B1culiSK.js} +17 -17
- package/dist/text-inputs-B1culiSK.js.map +1 -0
- package/dist/theme.css +40 -37
- package/dist/{timelines-DmtztAY_.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-CV11PURP.js → tree-CzUJHnFs.js} +8 -8
- package/dist/{tree-CV11PURP.js.map → tree-CzUJHnFs.js.map} +1 -1
- package/dist/typography/rich-text.js +1 -1
- package/dist/{typography-CSyJrh28.js → typography-BQnine1k.js} +12 -12
- package/dist/{typography-CSyJrh28.js.map → typography-BQnine1k.js.map} +1 -1
- 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-C9SA0X-8.js → upload-BOW6U2tI.js} +25 -24
- package/dist/upload-BOW6U2tI.js.map +1 -0
- package/dist/{upload-queue-DhQJiSRc.js → upload-queue-qUXn1ykN.js} +16 -14
- package/dist/upload-queue-qUXn1ykN.js.map +1 -0
- package/dist/{usage-card-DVTRDmGz.js → usage-card-BeSLY0i0.js} +24 -17
- package/dist/usage-card-BeSLY0i0.js.map +1 -0
- package/dist/{utils-CF3c95Io.js → utils-B6kKb8jB.js} +237 -141
- 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-ClupF0Gz.js → value-typography-uAmWUAL1.js} +2 -2
- package/dist/{value-typography-ClupF0Gz.js.map → value-typography-uAmWUAL1.js.map} +1 -1
- package/dist/{workspace-9EFVXUyk.js → workspace-DHeHv0qw.js} +50 -49
- package/dist/workspace-DHeHv0qw.js.map +1 -0
- package/docs/consumer-skill/SKILL.md +4 -3
- package/docs/consumer-skill/agents/themelia-ui-designer.md +96 -0
- package/docs/consumer-skill/examples/app-layout.tsx +52 -1
- 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/editable-sections.tsx +38 -0
- package/docs/consumer-skill/examples/index-table.tsx +4 -4
- package/docs/consumer-skill/examples/manifest.json +38 -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-edit-page.tsx +1 -1
- package/docs/consumer-skill/examples/rhf-overlay-form.tsx +24 -11
- package/docs/consumer-skill/examples/token-domain-structure.tsx +68 -0
- package/docs/consumer-skill/references/agents-md.md +19 -17
- package/docs/consumer-skill/references/analytics.md +18 -1
- package/docs/consumer-skill/references/commerce-composition.md +97 -0
- package/docs/consumer-skill/references/component-contracts.json +7131 -1754
- package/docs/consumer-skill/references/composition-mapping.md +17 -3
- package/docs/consumer-skill/references/composition.md +159 -31
- 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 +11 -9
- package/docs/consumer-skill/references/discovery.md +27 -3
- package/docs/consumer-skill/references/domain-structures.md +124 -0
- package/docs/consumer-skill/references/installation.md +15 -4
- package/docs/consumer-skill/references/integration.md +35 -0
- package/docs/consumer-skill/references/product-composition.md +94 -0
- package/docs/consumer-skill/references/public-api.json +2881 -420
- package/docs/consumer-skill/references/review.md +39 -2
- package/docs/consumer-skill/references/rhf-workflows.md +7 -0
- package/docs/consumer-skill/references/screen-archetypes.md +19 -7
- package/docs/consumer-skill/references/screen-decisions.md +126 -0
- package/docs/consumer-skill/references/theming.md +17 -18
- package/docs/consumer-skill/references/tokens.json +9 -9
- 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 +7 -1
- package/docs/consumer-skill/scripts/composition-policy.mjs +39 -3
- package/docs/consumer-skill/scripts/composition-schema.mjs +1 -1
- package/docs/consumer-skill/scripts/composition.mjs +61 -5
- package/docs/consumer-skill/scripts/discovery.mjs +54 -0
- package/docs/consumer-skill/scripts/inspect-component.mjs +1 -1
- package/docs/consumer-skill/scripts/inspection.mjs +73 -18
- package/docs/consumer-skill/scripts/setup-skills.mjs +41 -6
- package/docs/consumer-skill/scripts/surface-policy.mjs +5 -5
- package/docs/consumer-skills/themelia-components/SKILL.md +14 -13
- package/docs/consumer-skills/themelia-composition/SKILL.md +16 -17
- package/docs/consumer-skills/themelia-design/SKILL.md +55 -0
- package/docs/consumer-skills/themelia-foundation/SKILL.md +2 -1
- package/docs/consumer-skills/themelia-tokenization/SKILL.md +24 -17
- package/package.json +1 -1
- package/dist/accordion-96o0pN62.js.map +0 -1
- package/dist/action-menu-CHgs8vmj.js.map +0 -1
- package/dist/affordance-geometry.generated-B8yGOr8-.js.map +0 -1
- package/dist/ai-artifact-BZUGwBq6.js.map +0 -1
- package/dist/app-shell-D63ATkIK.js +0 -237
- package/dist/app-shell-D63ATkIK.js.map +0 -1
- package/dist/auth-D2FVZ1MH.js.map +0 -1
- package/dist/avatar-DWO_HHhB.js.map +0 -1
- package/dist/base/cascader.js.map +0 -1
- package/dist/batch-action-bar-CdfIkCsV.js.map +0 -1
- package/dist/button-DkmK-z8E.js.map +0 -1
- package/dist/buttons-BbfzgczK.js.map +0 -1
- package/dist/cards-4JTWqvVe.js +0 -68
- package/dist/cards-4JTWqvVe.js.map +0 -1
- package/dist/chart-C19flDQb.js +0 -155
- package/dist/chart-C19flDQb.js.map +0 -1
- package/dist/choice-inputs-JLtij2y4.js.map +0 -1
- package/dist/code-block-CGNaUtAE.js.map +0 -1
- package/dist/combobox-CBJDs6w_.js.map +0 -1
- package/dist/combobox-hbhSS18O.js +0 -355
- package/dist/combobox-hbhSS18O.js.map +0 -1
- package/dist/command-D8NrBj-b.js.map +0 -1
- package/dist/containers-CRmHf7GP.js.map +0 -1
- package/dist/control-group-recipes-DBXmfh2E.js.map +0 -1
- package/dist/data-display-D4oujtx0.js.map +0 -1
- package/dist/date-picker-zOt1oNss.js.map +0 -1
- package/dist/dropdown-menu-CjY8Vt7W.js +0 -193
- package/dist/dropdown-menu-CjY8Vt7W.js.map +0 -1
- package/dist/feedback-DZNL5Lg1.js.map +0 -1
- package/dist/field-affordance-recipes-DjwGx8eM.js.map +0 -1
- package/dist/filters-BcT-uoFy.js.map +0 -1
- package/dist/form-sizing-NXgjkmBG.js.map +0 -1
- package/dist/forms-BV5m5aQF.js.map +0 -1
- package/dist/forms-numeric-Cd33AKbD.js.map +0 -1
- package/dist/header-BA697l4a.js.map +0 -1
- package/dist/hooks-BQ-L7Uu2.js.map +0 -1
- package/dist/input-DOPL5_QE.js +0 -21
- package/dist/input-DOPL5_QE.js.map +0 -1
- package/dist/item-BvZ2DR_x.js.map +0 -1
- package/dist/message-INU2xsxu.js.map +0 -1
- package/dist/metadata-list-qVV7AVxa.js.map +0 -1
- package/dist/motion-recipes-ChBg4HBq.js.map +0 -1
- package/dist/navigation-BQNcg1jT.js.map +0 -1
- package/dist/navigation-DLF3E1IC.js +0 -145
- package/dist/navigation-DLF3E1IC.js.map +0 -1
- package/dist/navigation-row-recipes-WZEs-hYo.js.map +0 -1
- package/dist/overflow-tab-bar-CrbqMteP.js +0 -284
- package/dist/overflow-tab-bar-CrbqMteP.js.map +0 -1
- package/dist/overlays-BlKynmde.js +0 -1004
- package/dist/overlays-BlKynmde.js.map +0 -1
- package/dist/page-CIwNUtGr.js +0 -227
- package/dist/page-CIwNUtGr.js.map +0 -1
- package/dist/page-header-commands-DFMlNYzN.js +0 -128
- package/dist/page-header-commands-DFMlNYzN.js.map +0 -1
- package/dist/popover-uwzX2vo7.js +0 -198
- package/dist/popover-uwzX2vo7.js.map +0 -1
- package/dist/popover.recipes-D3j8R8Yp.js.map +0 -1
- package/dist/receipt-D789Jwyy.js.map +0 -1
- package/dist/rich-text-editor-Cm1dpUpQ.js.map +0 -1
- package/dist/rich-text-editor-toolbar-L__e4x47.js.map +0 -1
- package/dist/settings-BA2iboic.js.map +0 -1
- package/dist/sheet-DoAxTb2J.js +0 -213
- package/dist/sheet-DoAxTb2J.js.map +0 -1
- package/dist/sidebar-ByqKR_W5.js +0 -512
- package/dist/sidebar-ByqKR_W5.js.map +0 -1
- package/dist/sidebar-D2iSnGJ7.js +0 -619
- package/dist/sidebar-D2iSnGJ7.js.map +0 -1
- package/dist/skeleton-CUj8O5Bd.js +0 -264
- package/dist/skeleton-CUj8O5Bd.js.map +0 -1
- package/dist/smart-card-CqkzQsK-.js +0 -614
- package/dist/smart-card-CqkzQsK-.js.map +0 -1
- package/dist/table-DH7rozUv.js.map +0 -1
- package/dist/tabs-eqVsJZWO.js.map +0 -1
- package/dist/text-inputs-DXItiR0O.js.map +0 -1
- package/dist/theme-scope-BJ6eE2xt.js +0 -50
- package/dist/theme-scope-BJ6eE2xt.js.map +0 -1
- package/dist/timelines-DmtztAY_.js.map +0 -1
- package/dist/tooltip-B4hjKtoV.js +0 -111
- package/dist/tooltip-B4hjKtoV.js.map +0 -1
- package/dist/ui-provider-CQCuCBcy.js +0 -136
- package/dist/ui-provider-CQCuCBcy.js.map +0 -1
- package/dist/upload-C9SA0X-8.js.map +0 -1
- package/dist/upload-queue-DhQJiSRc.js.map +0 -1
- package/dist/usage-card-DVTRDmGz.js.map +0 -1
- package/dist/use-mobile-vaLKwgyf.js +0 -15
- package/dist/use-mobile-vaLKwgyf.js.map +0 -1
- package/dist/utils-CF3c95Io.js.map +0 -1
- package/dist/value-inputs-C0o70p-U.js +0 -980
- package/dist/value-inputs-C0o70p-U.js.map +0 -1
- package/dist/workspace-9EFVXUyk.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,
|
|
@@ -989,13 +989,13 @@ function nt({ value: e, defaultValue: t, onValueChange: n, format: i = "yyyy-MM-
|
|
|
989
989
|
id: E,
|
|
990
990
|
tone: t.tone,
|
|
991
991
|
buttonStyle: t.buttonStyle,
|
|
992
|
-
size:
|
|
993
|
-
"aria-invalid":
|
|
994
|
-
"aria-describedby":
|
|
995
|
-
className: r(
|
|
992
|
+
size: S,
|
|
993
|
+
"aria-invalid": le,
|
|
994
|
+
"aria-describedby": O,
|
|
995
|
+
className: r(Le(S), !F && "text-muted-foreground", e.className),
|
|
996
996
|
disabled: b.disabled,
|
|
997
|
-
children: [/* @__PURE__ */ w(
|
|
998
|
-
className: y[
|
|
997
|
+
children: [/* @__PURE__ */ w(se, {
|
|
998
|
+
className: y[S],
|
|
999
999
|
"aria-hidden": "true"
|
|
1000
1000
|
}), /* @__PURE__ */ w(s, {
|
|
1001
1001
|
tag: "span",
|
|
@@ -1011,12 +1011,12 @@ function nt({ value: e, defaultValue: t, onValueChange: n, format: i = "yyyy-MM-
|
|
|
1011
1011
|
className: "w-auto gap-0",
|
|
1012
1012
|
align: "start",
|
|
1013
1013
|
children: [
|
|
1014
|
-
!!b.header && /* @__PURE__ */ w(
|
|
1015
|
-
/* @__PURE__ */ w(
|
|
1014
|
+
!!b.header && /* @__PURE__ */ w(Pe, { config: b.header }),
|
|
1015
|
+
/* @__PURE__ */ w(Ae, {
|
|
1016
1016
|
mode: "single",
|
|
1017
|
-
selected:
|
|
1017
|
+
selected: F,
|
|
1018
1018
|
onSelect: W,
|
|
1019
|
-
defaultMonth:
|
|
1019
|
+
defaultMonth: F,
|
|
1020
1020
|
numberOfMonths: b.numberOfMonths,
|
|
1021
1021
|
showOutsideDays: b.showOutsideDays,
|
|
1022
1022
|
disabled: d ?? b.disabled,
|
|
@@ -1026,16 +1026,16 @@ function nt({ value: e, defaultValue: t, onValueChange: n, format: i = "yyyy-MM-
|
|
|
1026
1026
|
endMonth: v.endMonth,
|
|
1027
1027
|
...f
|
|
1028
1028
|
}),
|
|
1029
|
-
!!u?.enabled && /* @__PURE__ */ T(
|
|
1029
|
+
!!u?.enabled && /* @__PURE__ */ T(oe, { children: [/* @__PURE__ */ w(ee, {}), /* @__PURE__ */ w("div", {
|
|
1030
1030
|
className: "date-picker--time p-surface",
|
|
1031
1031
|
children: /* @__PURE__ */ w(ae, {
|
|
1032
1032
|
label: h.startTime,
|
|
1033
|
-
children: /* @__PURE__ */ w(
|
|
1034
|
-
value:
|
|
1033
|
+
children: /* @__PURE__ */ w(nt, {
|
|
1034
|
+
value: L ? de(L, j) : null,
|
|
1035
1035
|
onValueChange: G,
|
|
1036
|
-
format:
|
|
1037
|
-
precision:
|
|
1038
|
-
step:
|
|
1036
|
+
format: k,
|
|
1037
|
+
precision: j ? "seconds" : "minutes",
|
|
1038
|
+
step: A,
|
|
1039
1039
|
disabled: b.disabled,
|
|
1040
1040
|
size: "sm",
|
|
1041
1041
|
strings: {
|
|
@@ -1048,11 +1048,11 @@ function nt({ value: e, defaultValue: t, onValueChange: n, format: i = "yyyy-MM-
|
|
|
1048
1048
|
})
|
|
1049
1049
|
})
|
|
1050
1050
|
})] }),
|
|
1051
|
-
!!b.footer && /* @__PURE__ */ w(
|
|
1051
|
+
!!b.footer && /* @__PURE__ */ w(Ne, {
|
|
1052
1052
|
config: b.footer,
|
|
1053
|
-
output:
|
|
1054
|
-
hasSelection: !!
|
|
1055
|
-
autoSummary:
|
|
1053
|
+
output: H(F),
|
|
1054
|
+
hasSelection: !!F,
|
|
1055
|
+
autoSummary: K
|
|
1056
1056
|
})
|
|
1057
1057
|
]
|
|
1058
1058
|
})]
|
|
@@ -1061,71 +1061,71 @@ function nt({ value: e, defaultValue: t, onValueChange: n, format: i = "yyyy-MM-
|
|
|
1061
1061
|
}
|
|
1062
1062
|
//#endregion
|
|
1063
1063
|
//#region src/components/base/date-pickers/date-picker-multiple.tsx
|
|
1064
|
-
function
|
|
1065
|
-
let
|
|
1066
|
-
|
|
1067
|
-
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);
|
|
1068
1068
|
}, [e]);
|
|
1069
|
-
let
|
|
1069
|
+
let M = x.useCallback((e) => q(e, i, o, v), [
|
|
1070
1070
|
i,
|
|
1071
1071
|
o,
|
|
1072
1072
|
v
|
|
1073
|
-
]),
|
|
1073
|
+
]), N = x.useCallback((e) => {
|
|
1074
1074
|
let t = Array.isArray(e) ? e : e ? [e] : [];
|
|
1075
|
-
|
|
1075
|
+
j(t), n?.(M(t)), f && t.length > 0 && g(!1);
|
|
1076
1076
|
}, [
|
|
1077
1077
|
n,
|
|
1078
|
-
|
|
1078
|
+
M,
|
|
1079
1079
|
f,
|
|
1080
1080
|
g
|
|
1081
|
-
]),
|
|
1082
|
-
|
|
1081
|
+
]), P = x.useMemo(() => Y(A, o, c, _.selectDates, _, v), [
|
|
1082
|
+
A,
|
|
1083
1083
|
o,
|
|
1084
1084
|
c,
|
|
1085
1085
|
_,
|
|
1086
1086
|
v
|
|
1087
|
-
]),
|
|
1088
|
-
|
|
1087
|
+
]), F = x.useMemo(() => J(A, l, u, d, _), [
|
|
1088
|
+
A,
|
|
1089
1089
|
l,
|
|
1090
1090
|
u,
|
|
1091
1091
|
d,
|
|
1092
1092
|
_
|
|
1093
|
-
]),
|
|
1094
|
-
return /* @__PURE__ */ w(
|
|
1093
|
+
]), I = x.useMemo(() => A.length > 0 ? _.datesSelected(A.length) : void 0, [A.length, _]);
|
|
1094
|
+
return /* @__PURE__ */ w(Me, {
|
|
1095
1095
|
rootRef: ae,
|
|
1096
|
-
className:
|
|
1097
|
-
label:
|
|
1098
|
-
hint:
|
|
1099
|
-
error:
|
|
1096
|
+
className: S.className,
|
|
1097
|
+
label: S.label,
|
|
1098
|
+
hint: S.hint,
|
|
1099
|
+
error: S.error,
|
|
1100
1100
|
triggerId: D,
|
|
1101
|
-
describedById:
|
|
1101
|
+
describedById: ce,
|
|
1102
1102
|
children: /* @__PURE__ */ T(re, {
|
|
1103
1103
|
open: h,
|
|
1104
1104
|
onOpenChange: g,
|
|
1105
1105
|
children: [/* @__PURE__ */ w(ne, {
|
|
1106
|
-
ref:
|
|
1107
|
-
onBlur:
|
|
1106
|
+
ref: S.triggerRef,
|
|
1107
|
+
onBlur: S.onBlur,
|
|
1108
1108
|
render: (e) => {
|
|
1109
|
-
let t = Te(
|
|
1109
|
+
let t = Te(S.buttonTone, S.buttonStyle);
|
|
1110
1110
|
return /* @__PURE__ */ T(a, {
|
|
1111
1111
|
...e,
|
|
1112
1112
|
id: D,
|
|
1113
1113
|
tone: t.tone,
|
|
1114
1114
|
buttonStyle: t.buttonStyle,
|
|
1115
|
-
size:
|
|
1116
|
-
"aria-invalid":
|
|
1117
|
-
"aria-describedby":
|
|
1118
|
-
className: r(
|
|
1119
|
-
disabled:
|
|
1120
|
-
children: [/* @__PURE__ */ w(
|
|
1121
|
-
className: y[
|
|
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
1122
|
"aria-hidden": "true"
|
|
1123
1123
|
}), /* @__PURE__ */ w(s, {
|
|
1124
1124
|
tag: "span",
|
|
1125
1125
|
size: "inherit",
|
|
1126
1126
|
lineHeight: "tight",
|
|
1127
1127
|
className: "min-w-0 truncate text-inherit",
|
|
1128
|
-
children:
|
|
1128
|
+
children: P
|
|
1129
1129
|
})]
|
|
1130
1130
|
});
|
|
1131
1131
|
}
|
|
@@ -1134,15 +1134,15 @@ function rt({ value: e, defaultValue: t, onValueChange: n, format: i = "yyyy-MM-
|
|
|
1134
1134
|
className: "w-auto gap-0",
|
|
1135
1135
|
align: "start",
|
|
1136
1136
|
children: [
|
|
1137
|
-
!!
|
|
1138
|
-
/* @__PURE__ */ w(
|
|
1137
|
+
!!S.header && /* @__PURE__ */ w(Pe, { config: S.header }),
|
|
1138
|
+
/* @__PURE__ */ w(Ae, {
|
|
1139
1139
|
mode: "multiple",
|
|
1140
|
-
selected:
|
|
1141
|
-
onSelect:
|
|
1142
|
-
defaultMonth:
|
|
1143
|
-
numberOfMonths:
|
|
1144
|
-
showOutsideDays:
|
|
1145
|
-
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,
|
|
1146
1146
|
locale: v,
|
|
1147
1147
|
captionLayout: te,
|
|
1148
1148
|
startMonth: b.startMonth,
|
|
@@ -1151,81 +1151,90 @@ function rt({ value: e, defaultValue: t, onValueChange: n, format: i = "yyyy-MM-
|
|
|
1151
1151
|
max: u,
|
|
1152
1152
|
...m
|
|
1153
1153
|
}),
|
|
1154
|
-
!!
|
|
1154
|
+
!!F && /* @__PURE__ */ T(oe, { children: [/* @__PURE__ */ w(ee, {}), /* @__PURE__ */ w("div", {
|
|
1155
1155
|
className: "p-surface",
|
|
1156
1156
|
children: /* @__PURE__ */ w(s, {
|
|
1157
1157
|
type: "secondary",
|
|
1158
|
-
children:
|
|
1158
|
+
children: F
|
|
1159
1159
|
})
|
|
1160
1160
|
})] }),
|
|
1161
|
-
!!
|
|
1162
|
-
config:
|
|
1163
|
-
output:
|
|
1164
|
-
hasSelection:
|
|
1165
|
-
autoSummary:
|
|
1161
|
+
!!S.footer && /* @__PURE__ */ w(Ne, {
|
|
1162
|
+
config: S.footer,
|
|
1163
|
+
output: M(A),
|
|
1164
|
+
hasSelection: A.length > 0,
|
|
1165
|
+
autoSummary: I
|
|
1166
1166
|
})
|
|
1167
1167
|
]
|
|
1168
1168
|
})]
|
|
1169
1169
|
})
|
|
1170
1170
|
});
|
|
1171
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
|
+
}
|
|
1172
1181
|
//#endregion
|
|
1173
1182
|
//#region src/components/base/date-pickers/date-picker-range.tsx
|
|
1174
|
-
function
|
|
1175
|
-
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), [
|
|
1176
1185
|
q,
|
|
1177
1186
|
m,
|
|
1178
1187
|
h,
|
|
1179
|
-
|
|
1180
|
-
]),
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
}, [
|
|
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(() => {
|
|
1184
1193
|
if (!_?.enabled) {
|
|
1185
|
-
|
|
1194
|
+
De.current = e;
|
|
1186
1195
|
return;
|
|
1187
1196
|
}
|
|
1188
|
-
let
|
|
1189
|
-
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;
|
|
1190
1199
|
}, [
|
|
1191
|
-
|
|
1200
|
+
e,
|
|
1192
1201
|
_?.enabled,
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
]),
|
|
1202
|
+
G,
|
|
1203
|
+
W
|
|
1204
|
+
]), x.useEffect(() => {
|
|
1196
1205
|
if (!_?.enabled) return;
|
|
1197
1206
|
let e = (e) => {
|
|
1198
1207
|
if (!e) return e;
|
|
1199
|
-
let t = fe(e,
|
|
1208
|
+
let t = fe(e, W, G);
|
|
1200
1209
|
return e.hours === t.hours && e.minutes === t.minutes && e.seconds === t.seconds ? e : t;
|
|
1201
1210
|
};
|
|
1202
|
-
|
|
1211
|
+
Ce(e), Ee(e);
|
|
1203
1212
|
}, [
|
|
1204
1213
|
_?.enabled,
|
|
1205
|
-
|
|
1206
|
-
|
|
1214
|
+
W,
|
|
1215
|
+
G
|
|
1207
1216
|
]);
|
|
1208
|
-
let
|
|
1217
|
+
let Re = x.useCallback((e) => {
|
|
1209
1218
|
let t = e;
|
|
1210
1219
|
return e && _?.enabled && (t = {
|
|
1211
1220
|
...e,
|
|
1212
1221
|
from: e.from && J ? ye(e.from, J) : e.from,
|
|
1213
1222
|
to: e.to && Y ? ye(e.to, Y) : e.to
|
|
1214
|
-
}), ve(t, c, l,
|
|
1223
|
+
}), ve(t, c, l, D);
|
|
1215
1224
|
}, [
|
|
1216
1225
|
c,
|
|
1217
1226
|
l,
|
|
1218
|
-
|
|
1227
|
+
D,
|
|
1219
1228
|
_,
|
|
1220
1229
|
J,
|
|
1221
1230
|
Y
|
|
1222
|
-
]),
|
|
1223
|
-
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);
|
|
1224
1236
|
t && Ee(t);
|
|
1225
|
-
}, []), Ve =
|
|
1226
|
-
let t = le(e ?? void 0);
|
|
1227
|
-
t && De(t);
|
|
1228
|
-
}, []), He = S.useCallback((e, t, n) => t ? !n?.from || n.to ? {
|
|
1237
|
+
}, []), Ve = x.useCallback((e, t, n) => t ? !n?.from || n.to ? {
|
|
1229
1238
|
from: t,
|
|
1230
1239
|
to: void 0
|
|
1231
1240
|
} : t < n.from ? {
|
|
@@ -1234,122 +1243,122 @@ function it({ value: t, defaultValue: n, onValueChange: o, format: c = "yyyy-MM-
|
|
|
1234
1243
|
} : {
|
|
1235
1244
|
from: n.from,
|
|
1236
1245
|
to: t
|
|
1237
|
-
} : e, []),
|
|
1238
|
-
let n =
|
|
1239
|
-
if (
|
|
1240
|
-
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));
|
|
1241
1250
|
let r = !!(n?.from && n?.to), i = xe(n, m, h).isValid;
|
|
1242
|
-
g && r && i &&
|
|
1251
|
+
g && r && i && C(!1);
|
|
1243
1252
|
}, [
|
|
1244
1253
|
q,
|
|
1245
|
-
|
|
1254
|
+
Ve,
|
|
1246
1255
|
d,
|
|
1247
1256
|
_,
|
|
1248
1257
|
o,
|
|
1249
|
-
|
|
1258
|
+
Re,
|
|
1250
1259
|
m,
|
|
1251
1260
|
h,
|
|
1252
1261
|
g,
|
|
1253
|
-
|
|
1254
|
-
]), Ue =
|
|
1262
|
+
C
|
|
1263
|
+
]), Ue = x.useCallback((e) => {
|
|
1255
1264
|
let t = e.getValue();
|
|
1256
|
-
|
|
1257
|
-
}, [
|
|
1258
|
-
o?.(
|
|
1265
|
+
He(t);
|
|
1266
|
+
}, [He]), We = x.useCallback(() => {
|
|
1267
|
+
o?.(Re(q)), C(!1);
|
|
1259
1268
|
}, [
|
|
1260
1269
|
q,
|
|
1261
1270
|
o,
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
]),
|
|
1265
|
-
if (_?.enabled && J) return pe(J,
|
|
1266
|
-
am:
|
|
1267
|
-
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
|
|
1268
1277
|
});
|
|
1269
1278
|
}, [
|
|
1270
1279
|
_?.enabled,
|
|
1271
1280
|
J,
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
]),
|
|
1276
|
-
if (_?.enabled && Y) return pe(Y,
|
|
1277
|
-
am:
|
|
1278
|
-
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
|
|
1279
1288
|
});
|
|
1280
1289
|
}, [
|
|
1281
1290
|
_?.enabled,
|
|
1282
1291
|
Y,
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
]),
|
|
1292
|
+
G,
|
|
1293
|
+
H,
|
|
1294
|
+
E
|
|
1295
|
+
]), Q = x.useMemo(() => {
|
|
1287
1296
|
if (_?.enabled && q?.from) {
|
|
1288
|
-
let e = M(q.from, l, { locale:
|
|
1297
|
+
let e = M(q.from, l, { locale: D }), t = he && X ? `${e} ${X}` : e;
|
|
1289
1298
|
if (q.to) {
|
|
1290
|
-
let e = M(q.to, l, { locale:
|
|
1291
|
-
return `${t} - ${
|
|
1299
|
+
let e = M(q.to, l, { locale: D });
|
|
1300
|
+
return `${t} - ${he && Z ? `${e} ${Z}` : e}`;
|
|
1292
1301
|
}
|
|
1293
1302
|
return t;
|
|
1294
1303
|
}
|
|
1295
|
-
return we(q, l, u,
|
|
1304
|
+
return we(q, l, u, E.selectDateRange, D);
|
|
1296
1305
|
}, [
|
|
1297
1306
|
_?.enabled,
|
|
1298
1307
|
q,
|
|
1299
1308
|
l,
|
|
1300
|
-
|
|
1309
|
+
he,
|
|
1310
|
+
X,
|
|
1301
1311
|
Z,
|
|
1302
|
-
Q,
|
|
1303
1312
|
u,
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
]),
|
|
1313
|
+
E,
|
|
1314
|
+
D
|
|
1315
|
+
]), Ge = x.useMemo(() => {
|
|
1307
1316
|
if (!q?.from || !q?.to) return;
|
|
1308
|
-
let e = M(q.from, l, { locale:
|
|
1309
|
-
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}`;
|
|
1310
1319
|
}, [
|
|
1311
1320
|
q,
|
|
1312
1321
|
l,
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1322
|
+
D,
|
|
1323
|
+
K,
|
|
1324
|
+
X,
|
|
1325
|
+
Z
|
|
1317
1326
|
]);
|
|
1318
|
-
return /* @__PURE__ */ w(
|
|
1319
|
-
rootRef:
|
|
1320
|
-
className:
|
|
1321
|
-
label:
|
|
1322
|
-
hint:
|
|
1323
|
-
error:
|
|
1324
|
-
triggerId:
|
|
1325
|
-
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,
|
|
1326
1335
|
children: /* @__PURE__ */ T(re, {
|
|
1327
|
-
open:
|
|
1328
|
-
onOpenChange:
|
|
1336
|
+
open: S,
|
|
1337
|
+
onOpenChange: C,
|
|
1329
1338
|
children: [/* @__PURE__ */ w(ne, {
|
|
1330
|
-
ref:
|
|
1331
|
-
onBlur:
|
|
1339
|
+
ref: k.triggerRef,
|
|
1340
|
+
onBlur: k.onBlur,
|
|
1332
1341
|
render: (e) => {
|
|
1333
|
-
let t = Te(
|
|
1342
|
+
let t = Te(k.buttonTone, k.buttonStyle);
|
|
1334
1343
|
return /* @__PURE__ */ T(a, {
|
|
1335
1344
|
...e,
|
|
1336
|
-
id:
|
|
1345
|
+
id: L,
|
|
1337
1346
|
tone: t.tone,
|
|
1338
1347
|
buttonStyle: t.buttonStyle,
|
|
1339
|
-
size:
|
|
1340
|
-
"aria-invalid":
|
|
1341
|
-
"aria-describedby":
|
|
1342
|
-
className: r(
|
|
1343
|
-
disabled:
|
|
1344
|
-
children: [/* @__PURE__ */ w(
|
|
1345
|
-
className: r(y[
|
|
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"),
|
|
1346
1355
|
"aria-hidden": "true"
|
|
1347
1356
|
}), /* @__PURE__ */ w(s, {
|
|
1348
1357
|
tag: "span",
|
|
1349
1358
|
size: "inherit",
|
|
1350
1359
|
lineHeight: "tight",
|
|
1351
1360
|
className: "min-w-0 truncate text-inherit",
|
|
1352
|
-
children:
|
|
1361
|
+
children: Q
|
|
1353
1362
|
})]
|
|
1354
1363
|
});
|
|
1355
1364
|
}
|
|
@@ -1357,11 +1366,11 @@ function it({ value: t, defaultValue: n, onValueChange: o, format: c = "yyyy-MM-
|
|
|
1357
1366
|
inset: "flush",
|
|
1358
1367
|
className: "w-auto gap-0",
|
|
1359
1368
|
align: "start",
|
|
1360
|
-
children: [!!
|
|
1369
|
+
children: [!!k.header && /* @__PURE__ */ w(Pe, { config: k.header }), /* @__PURE__ */ T("div", {
|
|
1361
1370
|
className: "flex flex-col sm:flex-row",
|
|
1362
|
-
children: [
|
|
1371
|
+
children: [P.length > 0 && /* @__PURE__ */ w("div", {
|
|
1363
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",
|
|
1364
|
-
children:
|
|
1373
|
+
children: P.map((e) => /* @__PURE__ */ w(a, {
|
|
1365
1374
|
tone: "secondary",
|
|
1366
1375
|
buttonStyle: "ghost",
|
|
1367
1376
|
onClick: () => Ue(e),
|
|
@@ -1371,24 +1380,24 @@ function it({ value: t, defaultValue: n, onValueChange: o, format: c = "yyyy-MM-
|
|
|
1371
1380
|
}), /* @__PURE__ */ T("div", {
|
|
1372
1381
|
className: "flex flex-col",
|
|
1373
1382
|
children: [
|
|
1374
|
-
/* @__PURE__ */ w(
|
|
1383
|
+
/* @__PURE__ */ w(Ae, {
|
|
1375
1384
|
mode: "range",
|
|
1376
1385
|
selected: q,
|
|
1377
|
-
onSelect:
|
|
1386
|
+
onSelect: He,
|
|
1378
1387
|
defaultMonth: q?.from,
|
|
1379
|
-
numberOfMonths:
|
|
1380
|
-
showOutsideDays:
|
|
1381
|
-
disabled: te ??
|
|
1382
|
-
locale:
|
|
1388
|
+
numberOfMonths: j,
|
|
1389
|
+
showOutsideDays: k.showOutsideDays,
|
|
1390
|
+
disabled: te ?? k.disabled,
|
|
1391
|
+
locale: D,
|
|
1383
1392
|
captionLayout: ce,
|
|
1384
|
-
startMonth:
|
|
1385
|
-
endMonth:
|
|
1393
|
+
startMonth: le.startMonth,
|
|
1394
|
+
endMonth: le.endMonth,
|
|
1386
1395
|
...b,
|
|
1387
1396
|
className: r(i.calendarCompactCell, b?.className)
|
|
1388
1397
|
}),
|
|
1389
1398
|
(() => {
|
|
1390
|
-
let e = !!q?.from && !
|
|
1391
|
-
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", {
|
|
1392
1401
|
className: "date-picker--range-footer p-surface",
|
|
1393
1402
|
children: /* @__PURE__ */ T(p, {
|
|
1394
1403
|
gap: "lg",
|
|
@@ -1405,11 +1414,11 @@ function it({ value: t, defaultValue: n, onValueChange: o, format: c = "yyyy-MM-
|
|
|
1405
1414
|
children: [/* @__PURE__ */ T(s, {
|
|
1406
1415
|
tag: "span",
|
|
1407
1416
|
type: "secondary",
|
|
1408
|
-
children: [
|
|
1417
|
+
children: [E.from, ":"]
|
|
1409
1418
|
}), /* @__PURE__ */ T(s, {
|
|
1410
1419
|
tag: "span",
|
|
1411
1420
|
weight: "medium",
|
|
1412
|
-
children: [M(q.from, l, { locale:
|
|
1421
|
+
children: [M(q.from, l, { locale: D }), K && X ? ` ${X}` : ""]
|
|
1413
1422
|
})]
|
|
1414
1423
|
}), !!q.to && /* @__PURE__ */ T(p, {
|
|
1415
1424
|
direction: "horizontal",
|
|
@@ -1418,11 +1427,11 @@ function it({ value: t, defaultValue: n, onValueChange: o, format: c = "yyyy-MM-
|
|
|
1418
1427
|
children: [/* @__PURE__ */ T(s, {
|
|
1419
1428
|
tag: "span",
|
|
1420
1429
|
type: "secondary",
|
|
1421
|
-
children: [
|
|
1430
|
+
children: [E.to, ":"]
|
|
1422
1431
|
}), /* @__PURE__ */ T(s, {
|
|
1423
1432
|
tag: "span",
|
|
1424
1433
|
weight: "medium",
|
|
1425
|
-
children: [M(q.to, l, { locale:
|
|
1434
|
+
children: [M(q.to, l, { locale: D }), K && Z ? ` ${Z}` : ""]
|
|
1426
1435
|
})]
|
|
1427
1436
|
})]
|
|
1428
1437
|
}),
|
|
@@ -1433,64 +1442,64 @@ function it({ value: t, defaultValue: n, onValueChange: o, format: c = "yyyy-MM-
|
|
|
1433
1442
|
},
|
|
1434
1443
|
gap: "lg",
|
|
1435
1444
|
children: [/* @__PURE__ */ w(ae, {
|
|
1436
|
-
label:
|
|
1437
|
-
children: /* @__PURE__ */ w(
|
|
1438
|
-
value: J ?
|
|
1439
|
-
onValueChange:
|
|
1440
|
-
format:
|
|
1441
|
-
precision:
|
|
1442
|
-
step:
|
|
1443
|
-
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,
|
|
1444
1453
|
size: "sm",
|
|
1445
1454
|
strings: {
|
|
1446
|
-
hours:
|
|
1447
|
-
minutes:
|
|
1448
|
-
seconds:
|
|
1449
|
-
am:
|
|
1450
|
-
pm:
|
|
1455
|
+
hours: E.hours,
|
|
1456
|
+
minutes: E.minutes,
|
|
1457
|
+
seconds: E.seconds,
|
|
1458
|
+
am: E.am,
|
|
1459
|
+
pm: E.pm
|
|
1451
1460
|
}
|
|
1452
1461
|
})
|
|
1453
1462
|
}), !!q.to && /* @__PURE__ */ w(ae, {
|
|
1454
|
-
label:
|
|
1455
|
-
children: /* @__PURE__ */ w(
|
|
1456
|
-
value: Y ?
|
|
1457
|
-
onValueChange:
|
|
1458
|
-
format:
|
|
1459
|
-
precision:
|
|
1460
|
-
step:
|
|
1461
|
-
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,
|
|
1462
1471
|
size: "sm",
|
|
1463
1472
|
strings: {
|
|
1464
|
-
hours:
|
|
1465
|
-
minutes:
|
|
1466
|
-
seconds:
|
|
1467
|
-
am:
|
|
1468
|
-
pm:
|
|
1473
|
+
hours: E.hours,
|
|
1474
|
+
minutes: E.minutes,
|
|
1475
|
+
seconds: E.seconds,
|
|
1476
|
+
am: E.am,
|
|
1477
|
+
pm: E.pm
|
|
1469
1478
|
}
|
|
1470
1479
|
})
|
|
1471
1480
|
})]
|
|
1472
1481
|
}),
|
|
1473
1482
|
/* @__PURE__ */ w(s, {
|
|
1474
1483
|
type: "error",
|
|
1475
|
-
content:
|
|
1476
|
-
hidden: !
|
|
1484
|
+
content: Ie,
|
|
1485
|
+
hidden: !je
|
|
1477
1486
|
}),
|
|
1478
1487
|
n && /* @__PURE__ */ w(a, {
|
|
1479
1488
|
tone: "primary",
|
|
1480
1489
|
onClick: We,
|
|
1481
|
-
disabled: !q?.from || !q?.to || !!
|
|
1490
|
+
disabled: !q?.from || !q?.to || !!Oe,
|
|
1482
1491
|
className: "w-full",
|
|
1483
|
-
children:
|
|
1492
|
+
children: E.confirm
|
|
1484
1493
|
})
|
|
1485
1494
|
]
|
|
1486
1495
|
})
|
|
1487
1496
|
})] });
|
|
1488
1497
|
})(),
|
|
1489
|
-
!!
|
|
1490
|
-
config:
|
|
1491
|
-
output:
|
|
1498
|
+
!!k.footer && /* @__PURE__ */ w(Ne, {
|
|
1499
|
+
config: k.footer,
|
|
1500
|
+
output: Re(q),
|
|
1492
1501
|
hasSelection: !!(q?.from && q?.to),
|
|
1493
|
-
autoSummary:
|
|
1502
|
+
autoSummary: Ge
|
|
1494
1503
|
})
|
|
1495
1504
|
]
|
|
1496
1505
|
})]
|
|
@@ -1501,10 +1510,10 @@ function it({ value: t, defaultValue: n, onValueChange: o, format: c = "yyyy-MM-
|
|
|
1501
1510
|
}
|
|
1502
1511
|
//#endregion
|
|
1503
1512
|
//#region src/components/base/date-pickers/date-picker.tsx
|
|
1504
|
-
var
|
|
1505
|
-
let [a, o] =
|
|
1506
|
-
return Ee(
|
|
1507
|
-
...
|
|
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,
|
|
1508
1517
|
rootRef: i,
|
|
1509
1518
|
className: f,
|
|
1510
1519
|
open: a,
|
|
@@ -1513,8 +1522,8 @@ var at = S.forwardRef(function(t, i) {
|
|
|
1513
1522
|
dateFnsLocale: c,
|
|
1514
1523
|
captionLayout: u,
|
|
1515
1524
|
yearBounds: d
|
|
1516
|
-
}) :
|
|
1517
|
-
...
|
|
1525
|
+
}) : De(e) ? /* @__PURE__ */ w(it, {
|
|
1526
|
+
...e,
|
|
1518
1527
|
rootRef: i,
|
|
1519
1528
|
className: f,
|
|
1520
1529
|
open: a,
|
|
@@ -1523,8 +1532,8 @@ var at = S.forwardRef(function(t, i) {
|
|
|
1523
1532
|
dateFnsLocale: c,
|
|
1524
1533
|
captionLayout: u,
|
|
1525
1534
|
yearBounds: d
|
|
1526
|
-
}) :
|
|
1527
|
-
...
|
|
1535
|
+
}) : Oe(e) ? /* @__PURE__ */ w(ot, {
|
|
1536
|
+
...e,
|
|
1528
1537
|
rootRef: i,
|
|
1529
1538
|
className: f,
|
|
1530
1539
|
open: a,
|
|
@@ -1535,8 +1544,8 @@ var at = S.forwardRef(function(t, i) {
|
|
|
1535
1544
|
yearBounds: d
|
|
1536
1545
|
}) : null;
|
|
1537
1546
|
});
|
|
1538
|
-
|
|
1547
|
+
st.displayName = "DatePicker";
|
|
1539
1548
|
//#endregion
|
|
1540
|
-
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 };
|
|
1541
1550
|
|
|
1542
|
-
//# sourceMappingURL=date-picker-
|
|
1551
|
+
//# sourceMappingURL=date-picker-RlIzKom_.js.map
|