@editora/ui-core 0.1.9 → 0.1.10
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/README.md +35 -0
- package/dist/ElementBase-1b301e7f.js +1 -0
- package/dist/ElementBase-909688f3.mjs +79 -0
- package/dist/accordion.cjs.js +360 -0
- package/dist/accordion.esm.js +647 -0
- package/dist/alert-dialog.cjs.js +567 -0
- package/dist/alert-dialog.esm.js +1043 -0
- package/dist/alert.cjs.js +351 -0
- package/dist/alert.esm.js +450 -0
- package/dist/anchor.cjs.js +30 -0
- package/dist/anchor.esm.js +62 -0
- package/dist/animated-beam.cjs.js +720 -0
- package/dist/animated-beam.esm.js +1540 -0
- package/dist/animated-list.cjs.js +672 -0
- package/dist/animated-list.esm.js +1137 -0
- package/dist/animated-text.cjs.js +683 -0
- package/dist/animated-text.esm.js +1020 -0
- package/dist/app-header.cjs.js +345 -0
- package/dist/app-header.esm.js +398 -0
- package/dist/aspect-ratio.cjs.js +294 -0
- package/dist/aspect-ratio.esm.js +416 -0
- package/dist/avatar.cjs.js +365 -0
- package/dist/avatar.esm.js +513 -0
- package/dist/badge.cjs.js +432 -0
- package/dist/badge.esm.js +554 -0
- package/dist/block-controls.cjs.js +347 -0
- package/dist/block-controls.esm.js +556 -0
- package/dist/box.cjs.js +226 -0
- package/dist/box.esm.js +556 -0
- package/dist/breadcrumb.cjs.js +288 -0
- package/dist/breadcrumb.esm.js +523 -0
- package/dist/button.cjs.js +521 -0
- package/dist/button.esm.js +671 -0
- package/dist/calendar-2c11b824.mjs +1685 -0
- package/dist/calendar-a8735e40.js +741 -0
- package/dist/calendar.cjs.js +1 -0
- package/dist/calendar.esm.js +11 -0
- package/dist/card.cjs.js +306 -0
- package/dist/card.esm.js +378 -0
- package/dist/chart.cjs.js +783 -0
- package/dist/chart.esm.js +1369 -0
- package/dist/checkbox.cjs.js +338 -0
- package/dist/checkbox.esm.js +455 -0
- package/dist/collapsible.cjs.js +381 -0
- package/dist/collapsible.esm.js +548 -0
- package/dist/collection-a1aac0c6.mjs +56 -0
- package/dist/collection-a2969ad2.js +1 -0
- package/dist/collection.cjs.js +1 -0
- package/dist/collection.esm.js +136 -0
- package/dist/color-picker.cjs.js +803 -0
- package/dist/color-picker.esm.js +1809 -0
- package/dist/combobox.cjs.js +525 -0
- package/dist/combobox.esm.js +1023 -0
- package/dist/command-palette.cjs.js +67 -0
- package/dist/command-palette.esm.js +181 -0
- package/dist/command.cjs.js +130 -0
- package/dist/command.esm.js +307 -0
- package/dist/container.cjs.js +115 -0
- package/dist/container.esm.js +156 -0
- package/dist/context-menu.cjs.js +357 -0
- package/dist/context-menu.esm.js +1204 -0
- package/dist/control-group.cjs.js +80 -0
- package/dist/control-group.esm.js +110 -0
- package/dist/data-table.cjs.js +682 -0
- package/dist/data-table.esm.js +1660 -0
- package/dist/date-field.cjs.js +142 -0
- package/dist/date-field.esm.js +384 -0
- package/dist/date-picker.cjs.js +570 -0
- package/dist/date-picker.esm.js +1067 -0
- package/dist/date-range-picker.cjs.js +455 -0
- package/dist/date-range-picker.esm.js +973 -0
- package/dist/date-range-time-picker.cjs.js +573 -0
- package/dist/date-range-time-picker.esm.js +1137 -0
- package/dist/date-time-picker.cjs.js +495 -0
- package/dist/date-time-picker.esm.js +1062 -0
- package/dist/date-time-utils-5cf58cd0.js +1 -0
- package/dist/date-time-utils-bdceb7af.mjs +273 -0
- package/dist/description.cjs.js +85 -0
- package/dist/description.esm.js +136 -0
- package/dist/dialog.cjs.js +406 -0
- package/dist/dialog.esm.js +822 -0
- package/dist/direction-provider.cjs.js +30 -0
- package/dist/direction-provider.esm.js +74 -0
- package/dist/dismissable-layer-193e3bed.js +1 -0
- package/dist/dismissable-layer-9c7e6b58.mjs +112 -0
- package/dist/dismissable-layer.cjs.js +6 -0
- package/dist/dismissable-layer.esm.js +115 -0
- package/dist/dock.cjs.js +347 -0
- package/dist/dock.esm.js +826 -0
- package/dist/drawer.cjs.js +538 -0
- package/dist/drawer.esm.js +872 -0
- package/dist/dropdown.cjs.js +511 -0
- package/dist/dropdown.esm.js +1084 -0
- package/dist/dropzone.cjs.js +1 -0
- package/dist/dropzone.esm.js +11 -0
- package/dist/empty-state.cjs.js +169 -0
- package/dist/empty-state.esm.js +199 -0
- package/dist/field-error.cjs.js +74 -0
- package/dist/field-error.esm.js +125 -0
- package/dist/field.cjs.js +398 -0
- package/dist/field.esm.js +542 -0
- package/dist/fieldset.cjs.js +214 -0
- package/dist/fieldset.esm.js +298 -0
- package/dist/file-upload.cjs.js +353 -0
- package/dist/file-upload.esm.js +740 -0
- package/dist/flex.cjs.js +54 -0
- package/dist/flex.esm.js +168 -0
- package/dist/floating-toolbar.cjs.js +223 -0
- package/dist/floating-toolbar.esm.js +513 -0
- package/dist/focus-scope-103833ee.mjs +147 -0
- package/dist/focus-scope-2b12b4e7.js +1 -0
- package/dist/focus-scope.cjs.js +6 -0
- package/dist/focus-scope.esm.js +97 -0
- package/dist/form.cjs.js +377 -0
- package/dist/form.esm.js +862 -0
- package/dist/gantt.cjs.js +157 -0
- package/dist/gantt.esm.js +214 -0
- package/dist/grid.cjs.js +67 -0
- package/dist/grid.esm.js +211 -0
- package/dist/hover-card.cjs.js +284 -0
- package/dist/hover-card.esm.js +470 -0
- package/dist/icon-9ed13093.mjs +364 -0
- package/dist/icon-cloud.cjs.js +495 -0
- package/dist/icon-cloud.esm.js +828 -0
- package/dist/icon-eaa486b3.js +207 -0
- package/dist/icon.cjs.js +1 -0
- package/dist/icon.esm.js +6 -0
- package/dist/index.cjs.js +1 -36010
- package/dist/index.esm.js +440 -66615
- package/dist/inline-edit.cjs.js +118 -0
- package/dist/inline-edit.esm.js +206 -0
- package/dist/input.cjs.js +535 -0
- package/dist/input.esm.js +790 -0
- package/dist/label.cjs.js +195 -0
- package/dist/label.esm.js +301 -0
- package/dist/layout.cjs.js +266 -0
- package/dist/layout.esm.js +408 -0
- package/dist/listbox-308789a0.mjs +210 -0
- package/dist/listbox-ef2f708e.js +46 -0
- package/dist/listbox.cjs.js +1 -0
- package/dist/listbox.esm.js +6 -0
- package/dist/marquee.cjs.js +513 -0
- package/dist/marquee.esm.js +767 -0
- package/dist/masonry-grid.cjs.js +65 -0
- package/dist/masonry-grid.esm.js +180 -0
- package/dist/menu-item-styles-27fdbac4.mjs +181 -0
- package/dist/menu-item-styles-83ad1e22.js +152 -0
- package/dist/menu.cjs.js +275 -0
- package/dist/menu.esm.js +743 -0
- package/dist/menubar.cjs.js +455 -0
- package/dist/menubar.esm.js +1195 -0
- package/dist/meter.cjs.js +241 -0
- package/dist/meter.esm.js +334 -0
- package/dist/multi-select.cjs.js +549 -0
- package/dist/multi-select.esm.js +914 -0
- package/dist/navigation-menu.cjs.js +382 -0
- package/dist/navigation-menu.esm.js +614 -0
- package/dist/number-field.cjs.js +351 -0
- package/dist/number-field.esm.js +771 -0
- package/dist/number-ticker.cjs.js +209 -0
- package/dist/number-ticker.esm.js +749 -0
- package/dist/odometer.cjs.js +313 -0
- package/dist/odometer.esm.js +565 -0
- package/dist/orbiter.cjs.js +495 -0
- package/dist/orbiter.esm.js +831 -0
- package/dist/overlayManager-86454af7.mjs +58 -0
- package/dist/overlayManager-ece06517.js +1 -0
- package/dist/pagination.cjs.js +201 -0
- package/dist/pagination.esm.js +297 -0
- package/dist/panel-group-40254cdd.js +36 -0
- package/dist/panel-group-a376cc5e.mjs +326 -0
- package/dist/panel-group.cjs.js +1 -0
- package/dist/panel-group.esm.js +7 -0
- package/dist/panel.cjs.js +22 -0
- package/dist/panel.esm.js +46 -0
- package/dist/password-field.cjs.js +626 -0
- package/dist/password-field.esm.js +925 -0
- package/dist/pin-input.cjs.js +185 -0
- package/dist/pin-input.esm.js +412 -0
- package/dist/placement-grid.cjs.js +99 -0
- package/dist/placement-grid.esm.js +486 -0
- package/dist/plugin-panel.cjs.js +131 -0
- package/dist/plugin-panel.esm.js +173 -0
- package/dist/popover.cjs.js +286 -0
- package/dist/popover.esm.js +483 -0
- package/dist/portal-1cf392ca.mjs +114 -0
- package/dist/portal-d8d7fbca.js +1 -0
- package/dist/portal.cjs.js +39 -0
- package/dist/portal.esm.js +187 -0
- package/dist/positioner-accc6e5f.js +1 -0
- package/dist/positioner-fbd61bf1.mjs +132 -0
- package/dist/positioner.cjs.js +6 -0
- package/dist/positioner.esm.js +137 -0
- package/dist/presence.cjs.js +164 -0
- package/dist/presence.esm.js +301 -0
- package/dist/progress.cjs.js +329 -0
- package/dist/progress.esm.js +453 -0
- package/dist/quick-actions.cjs.js +202 -0
- package/dist/quick-actions.esm.js +357 -0
- package/dist/radio-group.cjs.js +257 -0
- package/dist/radio-group.esm.js +477 -0
- package/dist/rating.cjs.js +355 -0
- package/dist/rating.esm.js +637 -0
- package/dist/roving-focus-group-4350c9a7.mjs +50 -0
- package/dist/roving-focus-group-5c059bf9.js +1 -0
- package/dist/roving-focus-group.cjs.js +1 -0
- package/dist/roving-focus-group.esm.js +72 -0
- package/dist/{runtime-3cc1c386.mjs → runtime-4ac0107b.mjs} +348 -459
- package/dist/runtime-5f282bc8.js +1 -0
- package/dist/runtime.cjs.js +1 -1
- package/dist/runtime.esm.js +24 -23
- package/dist/scroll-area.cjs.js +294 -0
- package/dist/scroll-area.esm.js +478 -0
- package/dist/scroll-lock-48793569.js +1 -0
- package/dist/scroll-lock-9de6d328.mjs +53 -0
- package/dist/section.cjs.js +167 -0
- package/dist/section.esm.js +202 -0
- package/dist/select.cjs.js +799 -0
- package/dist/select.esm.js +1266 -0
- package/dist/selection-popup.cjs.js +203 -0
- package/dist/selection-popup.esm.js +392 -0
- package/dist/separator.cjs.js +221 -0
- package/dist/separator.esm.js +241 -0
- package/dist/sidebar.cjs.js +769 -0
- package/dist/sidebar.esm.js +1219 -0
- package/dist/skeleton.cjs.js +205 -0
- package/dist/skeleton.esm.js +249 -0
- package/dist/slider.cjs.js +493 -0
- package/dist/slider.esm.js +694 -0
- package/dist/slot.cjs.js +159 -0
- package/dist/slot.esm.js +227 -0
- package/dist/sortable.cjs.js +855 -1
- package/dist/sortable.esm.js +2176 -2
- package/dist/spinning-text.cjs.js +395 -0
- package/dist/spinning-text.esm.js +635 -0
- package/dist/split-button.cjs.js +410 -0
- package/dist/split-button.esm.js +619 -0
- package/dist/splitter.cjs.js +70 -0
- package/dist/splitter.esm.js +105 -0
- package/dist/standalone/accordion.d.ts +2 -0
- package/dist/standalone/accordion.d.ts.map +1 -0
- package/dist/standalone/alert-dialog.d.ts +2 -0
- package/dist/standalone/alert-dialog.d.ts.map +1 -0
- package/dist/standalone/alert.d.ts +2 -0
- package/dist/standalone/alert.d.ts.map +1 -0
- package/dist/standalone/anchor.d.ts +2 -0
- package/dist/standalone/anchor.d.ts.map +1 -0
- package/dist/standalone/animated-beam.d.ts +2 -0
- package/dist/standalone/animated-beam.d.ts.map +1 -0
- package/dist/standalone/animated-list.d.ts +2 -0
- package/dist/standalone/animated-list.d.ts.map +1 -0
- package/dist/standalone/animated-text.d.ts +2 -0
- package/dist/standalone/animated-text.d.ts.map +1 -0
- package/dist/standalone/app-header.d.ts +2 -0
- package/dist/standalone/app-header.d.ts.map +1 -0
- package/dist/standalone/aspect-ratio.d.ts +2 -0
- package/dist/standalone/aspect-ratio.d.ts.map +1 -0
- package/dist/standalone/avatar.d.ts +2 -0
- package/dist/standalone/avatar.d.ts.map +1 -0
- package/dist/standalone/badge.d.ts +2 -0
- package/dist/standalone/badge.d.ts.map +1 -0
- package/dist/standalone/block-controls.d.ts +2 -0
- package/dist/standalone/block-controls.d.ts.map +1 -0
- package/dist/standalone/box.d.ts +2 -0
- package/dist/standalone/box.d.ts.map +1 -0
- package/dist/standalone/breadcrumb.d.ts +2 -0
- package/dist/standalone/breadcrumb.d.ts.map +1 -0
- package/dist/standalone/button.d.ts +2 -0
- package/dist/standalone/button.d.ts.map +1 -0
- package/dist/standalone/calendar.d.ts +2 -0
- package/dist/standalone/calendar.d.ts.map +1 -0
- package/dist/standalone/card.d.ts +2 -0
- package/dist/standalone/card.d.ts.map +1 -0
- package/dist/standalone/chart.d.ts +2 -0
- package/dist/standalone/chart.d.ts.map +1 -0
- package/dist/standalone/checkbox.d.ts +2 -0
- package/dist/standalone/checkbox.d.ts.map +1 -0
- package/dist/standalone/collapsible.d.ts +2 -0
- package/dist/standalone/collapsible.d.ts.map +1 -0
- package/dist/standalone/collection.d.ts +2 -0
- package/dist/standalone/collection.d.ts.map +1 -0
- package/dist/standalone/color-picker.d.ts +2 -0
- package/dist/standalone/color-picker.d.ts.map +1 -0
- package/dist/standalone/combobox.d.ts +2 -0
- package/dist/standalone/combobox.d.ts.map +1 -0
- package/dist/standalone/command-palette.d.ts +2 -0
- package/dist/standalone/command-palette.d.ts.map +1 -0
- package/dist/standalone/command.d.ts +2 -0
- package/dist/standalone/command.d.ts.map +1 -0
- package/dist/standalone/container.d.ts +2 -0
- package/dist/standalone/container.d.ts.map +1 -0
- package/dist/standalone/context-menu.d.ts +2 -0
- package/dist/standalone/context-menu.d.ts.map +1 -0
- package/dist/standalone/control-group.d.ts +2 -0
- package/dist/standalone/control-group.d.ts.map +1 -0
- package/dist/standalone/data-table.d.ts +2 -0
- package/dist/standalone/data-table.d.ts.map +1 -0
- package/dist/standalone/date-field.d.ts +2 -0
- package/dist/standalone/date-field.d.ts.map +1 -0
- package/dist/standalone/date-picker.d.ts +2 -0
- package/dist/standalone/date-picker.d.ts.map +1 -0
- package/dist/standalone/date-range-picker.d.ts +2 -0
- package/dist/standalone/date-range-picker.d.ts.map +1 -0
- package/dist/standalone/date-range-time-picker.d.ts +2 -0
- package/dist/standalone/date-range-time-picker.d.ts.map +1 -0
- package/dist/standalone/date-time-picker.d.ts +2 -0
- package/dist/standalone/date-time-picker.d.ts.map +1 -0
- package/dist/standalone/description.d.ts +2 -0
- package/dist/standalone/description.d.ts.map +1 -0
- package/dist/standalone/dialog.d.ts +2 -0
- package/dist/standalone/dialog.d.ts.map +1 -0
- package/dist/standalone/direction-provider.d.ts +2 -0
- package/dist/standalone/direction-provider.d.ts.map +1 -0
- package/dist/standalone/dismissable-layer.d.ts +2 -0
- package/dist/standalone/dismissable-layer.d.ts.map +1 -0
- package/dist/standalone/dock.d.ts +2 -0
- package/dist/standalone/dock.d.ts.map +1 -0
- package/dist/standalone/drawer.d.ts +2 -0
- package/dist/standalone/drawer.d.ts.map +1 -0
- package/dist/standalone/dropdown.d.ts +2 -0
- package/dist/standalone/dropdown.d.ts.map +1 -0
- package/dist/standalone/dropzone.d.ts +2 -0
- package/dist/standalone/dropzone.d.ts.map +1 -0
- package/dist/standalone/empty-state.d.ts +2 -0
- package/dist/standalone/empty-state.d.ts.map +1 -0
- package/dist/standalone/field-error.d.ts +2 -0
- package/dist/standalone/field-error.d.ts.map +1 -0
- package/dist/standalone/field.d.ts +2 -0
- package/dist/standalone/field.d.ts.map +1 -0
- package/dist/standalone/fieldset.d.ts +2 -0
- package/dist/standalone/fieldset.d.ts.map +1 -0
- package/dist/standalone/file-upload.d.ts +2 -0
- package/dist/standalone/file-upload.d.ts.map +1 -0
- package/dist/standalone/flex.d.ts +2 -0
- package/dist/standalone/flex.d.ts.map +1 -0
- package/dist/standalone/floating-toolbar.d.ts +2 -0
- package/dist/standalone/floating-toolbar.d.ts.map +1 -0
- package/dist/standalone/focus-scope.d.ts +2 -0
- package/dist/standalone/focus-scope.d.ts.map +1 -0
- package/dist/standalone/form.d.ts +2 -0
- package/dist/standalone/form.d.ts.map +1 -0
- package/dist/standalone/gantt.d.ts +2 -0
- package/dist/standalone/gantt.d.ts.map +1 -0
- package/dist/standalone/grid.d.ts +2 -0
- package/dist/standalone/grid.d.ts.map +1 -0
- package/dist/standalone/hover-card.d.ts +2 -0
- package/dist/standalone/hover-card.d.ts.map +1 -0
- package/dist/standalone/icon-cloud.d.ts +2 -0
- package/dist/standalone/icon-cloud.d.ts.map +1 -0
- package/dist/standalone/icon.d.ts +2 -0
- package/dist/standalone/icon.d.ts.map +1 -0
- package/dist/standalone/inline-edit.d.ts +2 -0
- package/dist/standalone/inline-edit.d.ts.map +1 -0
- package/dist/standalone/input.d.ts +2 -0
- package/dist/standalone/input.d.ts.map +1 -0
- package/dist/standalone/label.d.ts +2 -0
- package/dist/standalone/label.d.ts.map +1 -0
- package/dist/standalone/layout.d.ts +2 -0
- package/dist/standalone/layout.d.ts.map +1 -0
- package/dist/standalone/listbox.d.ts +2 -0
- package/dist/standalone/listbox.d.ts.map +1 -0
- package/dist/standalone/marquee.d.ts +2 -0
- package/dist/standalone/marquee.d.ts.map +1 -0
- package/dist/standalone/masonry-grid.d.ts +2 -0
- package/dist/standalone/masonry-grid.d.ts.map +1 -0
- package/dist/standalone/menu.d.ts +2 -0
- package/dist/standalone/menu.d.ts.map +1 -0
- package/dist/standalone/menubar.d.ts +2 -0
- package/dist/standalone/menubar.d.ts.map +1 -0
- package/dist/standalone/meter.d.ts +2 -0
- package/dist/standalone/meter.d.ts.map +1 -0
- package/dist/standalone/multi-select.d.ts +2 -0
- package/dist/standalone/multi-select.d.ts.map +1 -0
- package/dist/standalone/navigation-menu.d.ts +2 -0
- package/dist/standalone/navigation-menu.d.ts.map +1 -0
- package/dist/standalone/number-field.d.ts +2 -0
- package/dist/standalone/number-field.d.ts.map +1 -0
- package/dist/standalone/number-ticker.d.ts +2 -0
- package/dist/standalone/number-ticker.d.ts.map +1 -0
- package/dist/standalone/odometer.d.ts +2 -0
- package/dist/standalone/odometer.d.ts.map +1 -0
- package/dist/standalone/orbiter.d.ts +2 -0
- package/dist/standalone/orbiter.d.ts.map +1 -0
- package/dist/standalone/pagination.d.ts +2 -0
- package/dist/standalone/pagination.d.ts.map +1 -0
- package/dist/standalone/panel-group.d.ts +2 -0
- package/dist/standalone/panel-group.d.ts.map +1 -0
- package/dist/standalone/panel.d.ts +2 -0
- package/dist/standalone/panel.d.ts.map +1 -0
- package/dist/standalone/password-field.d.ts +2 -0
- package/dist/standalone/password-field.d.ts.map +1 -0
- package/dist/standalone/pin-input.d.ts +2 -0
- package/dist/standalone/pin-input.d.ts.map +1 -0
- package/dist/standalone/placement-grid.d.ts +2 -0
- package/dist/standalone/placement-grid.d.ts.map +1 -0
- package/dist/standalone/plugin-panel.d.ts +2 -0
- package/dist/standalone/plugin-panel.d.ts.map +1 -0
- package/dist/standalone/popover.d.ts +2 -0
- package/dist/standalone/popover.d.ts.map +1 -0
- package/dist/standalone/portal.d.ts +2 -0
- package/dist/standalone/portal.d.ts.map +1 -0
- package/dist/standalone/positioner.d.ts +2 -0
- package/dist/standalone/positioner.d.ts.map +1 -0
- package/dist/standalone/presence.d.ts +2 -0
- package/dist/standalone/presence.d.ts.map +1 -0
- package/dist/standalone/progress.d.ts +2 -0
- package/dist/standalone/progress.d.ts.map +1 -0
- package/dist/standalone/quick-actions.d.ts +2 -0
- package/dist/standalone/quick-actions.d.ts.map +1 -0
- package/dist/standalone/radio-group.d.ts +2 -0
- package/dist/standalone/radio-group.d.ts.map +1 -0
- package/dist/standalone/rating.d.ts +2 -0
- package/dist/standalone/rating.d.ts.map +1 -0
- package/dist/standalone/roving-focus-group.d.ts +2 -0
- package/dist/standalone/roving-focus-group.d.ts.map +1 -0
- package/dist/standalone/scroll-area.d.ts +2 -0
- package/dist/standalone/scroll-area.d.ts.map +1 -0
- package/dist/standalone/section.d.ts +2 -0
- package/dist/standalone/section.d.ts.map +1 -0
- package/dist/standalone/select.d.ts +2 -0
- package/dist/standalone/select.d.ts.map +1 -0
- package/dist/standalone/selection-popup.d.ts +2 -0
- package/dist/standalone/selection-popup.d.ts.map +1 -0
- package/dist/standalone/separator.d.ts +2 -0
- package/dist/standalone/separator.d.ts.map +1 -0
- package/dist/standalone/sidebar.d.ts +2 -0
- package/dist/standalone/sidebar.d.ts.map +1 -0
- package/dist/standalone/skeleton.d.ts +2 -0
- package/dist/standalone/skeleton.d.ts.map +1 -0
- package/dist/standalone/slider.d.ts +2 -0
- package/dist/standalone/slider.d.ts.map +1 -0
- package/dist/standalone/slot.d.ts +2 -0
- package/dist/standalone/slot.d.ts.map +1 -0
- package/dist/standalone/spinning-text.d.ts +2 -0
- package/dist/standalone/spinning-text.d.ts.map +1 -0
- package/dist/standalone/split-button.d.ts +2 -0
- package/dist/standalone/split-button.d.ts.map +1 -0
- package/dist/standalone/splitter.d.ts +2 -0
- package/dist/standalone/splitter.d.ts.map +1 -0
- package/dist/standalone/stepper.d.ts +2 -0
- package/dist/standalone/stepper.d.ts.map +1 -0
- package/dist/standalone/switch.d.ts +2 -0
- package/dist/standalone/switch.d.ts.map +1 -0
- package/dist/standalone/table.d.ts +2 -0
- package/dist/standalone/table.d.ts.map +1 -0
- package/dist/standalone/tabs.d.ts +2 -0
- package/dist/standalone/tabs.d.ts.map +1 -0
- package/dist/standalone/tags-input.d.ts +2 -0
- package/dist/standalone/tags-input.d.ts.map +1 -0
- package/dist/standalone/textarea.d.ts +2 -0
- package/dist/standalone/textarea.d.ts.map +1 -0
- package/dist/standalone/time-field.d.ts +2 -0
- package/dist/standalone/time-field.d.ts.map +1 -0
- package/dist/standalone/time-picker.d.ts +2 -0
- package/dist/standalone/time-picker.d.ts.map +1 -0
- package/dist/standalone/timeline.d.ts +2 -0
- package/dist/standalone/timeline.d.ts.map +1 -0
- package/dist/standalone/toast.d.ts +2 -0
- package/dist/standalone/toast.d.ts.map +1 -0
- package/dist/standalone/toggle-group.d.ts +2 -0
- package/dist/standalone/toggle-group.d.ts.map +1 -0
- package/dist/standalone/toggle.d.ts +2 -0
- package/dist/standalone/toggle.d.ts.map +1 -0
- package/dist/standalone/toolbar.d.ts +2 -0
- package/dist/standalone/toolbar.d.ts.map +1 -0
- package/dist/standalone/tooltip.d.ts +2 -0
- package/dist/standalone/tooltip.d.ts.map +1 -0
- package/dist/standalone/transfer-list.d.ts +2 -0
- package/dist/standalone/transfer-list.d.ts.map +1 -0
- package/dist/standalone/tree-item.d.ts +2 -0
- package/dist/standalone/tree-item.d.ts.map +1 -0
- package/dist/standalone/tree.d.ts +2 -0
- package/dist/standalone/tree.d.ts.map +1 -0
- package/dist/standalone/visually-hidden.d.ts +2 -0
- package/dist/standalone/visually-hidden.d.ts.map +1 -0
- package/dist/standalone/wizard.d.ts +2 -0
- package/dist/standalone/wizard.d.ts.map +1 -0
- package/dist/stepper.cjs.js +337 -0
- package/dist/stepper.esm.js +578 -0
- package/dist/switch.cjs.js +397 -0
- package/dist/switch.esm.js +543 -0
- package/dist/table.cjs.js +212 -0
- package/dist/table.esm.js +432 -0
- package/dist/tabs.cjs.js +515 -0
- package/dist/tabs.esm.js +808 -0
- package/dist/tags-input.cjs.js +202 -0
- package/dist/tags-input.esm.js +436 -0
- package/dist/textarea.cjs.js +329 -0
- package/dist/textarea.esm.js +520 -0
- package/dist/time-field.cjs.js +142 -0
- package/dist/time-field.esm.js +387 -0
- package/dist/time-picker.cjs.js +284 -0
- package/dist/time-picker.esm.js +686 -0
- package/dist/timeline.cjs.js +198 -0
- package/dist/timeline.esm.js +248 -0
- package/dist/toast.cjs.js +234 -0
- package/dist/toast.esm.js +399 -0
- package/dist/toggle-group.cjs.js +131 -0
- package/dist/toggle-group.esm.js +382 -0
- package/dist/toggle.cjs.js +237 -0
- package/dist/toggle.esm.js +346 -0
- package/dist/toolbar.cjs.js +126 -0
- package/dist/toolbar.esm.js +240 -0
- package/dist/tooltip.cjs.js +159 -0
- package/dist/tooltip.esm.js +376 -0
- package/dist/transfer-list.cjs.js +734 -0
- package/dist/transfer-list.esm.js +969 -0
- package/dist/tree-0a7a8d05.js +39 -0
- package/dist/tree-dcd74a4a.mjs +294 -0
- package/dist/tree-item.cjs.js +103 -0
- package/dist/tree-item.esm.js +143 -0
- package/dist/tree.cjs.js +1 -0
- package/dist/tree.esm.js +7 -0
- package/dist/visually-hidden.cjs.js +42 -0
- package/dist/visually-hidden.esm.js +68 -0
- package/dist/wizard.cjs.js +677 -0
- package/dist/wizard.esm.js +1068 -0
- package/package.json +7 -1
- package/dist/runtime-41717c1e.js +0 -1
- package/dist/sortable-06a3bd6c.js +0 -855
- package/dist/sortable-23bf110b.mjs +0 -2254
|
@@ -0,0 +1,973 @@
|
|
|
1
|
+
import { E as tt } from "./ElementBase-909688f3.mjs";
|
|
2
|
+
import { r as et, c as N } from "./calendar-2c11b824.mjs";
|
|
3
|
+
import { r as it, i as m, s as nt, b as rt, p as K, f as j, a as Y, l as W, c as st, d as w, e as at, g as ot, n as D } from "./date-time-utils-bdceb7af.mjs";
|
|
4
|
+
import "./scroll-lock-9de6d328.mjs";
|
|
5
|
+
let lt = 0;
|
|
6
|
+
const dt = `
|
|
7
|
+
<svg viewBox="0 0 20 20" class="icon-svg" aria-hidden="true" focusable="false">
|
|
8
|
+
<path d="M6 2a1 1 0 0 1 1 1v1h6V3a1 1 0 1 1 2 0v1h.5A2.5 2.5 0 0 1 18 6.5v9A2.5 2.5 0 0 1 15.5 18h-11A2.5 2.5 0 0 1 2 15.5v-9A2.5 2.5 0 0 1 4.5 4H5V3a1 1 0 0 1 1-1Zm10 7H4v6.5c0 .276.224.5.5.5h11a.5.5 0 0 0 .5-.5V9ZM4.5 6a.5.5 0 0 0-.5.5V7h12v-.5a.5.5 0 0 0-.5-.5h-11Z" fill="currentColor"/>
|
|
9
|
+
</svg>
|
|
10
|
+
`, ut = `
|
|
11
|
+
<svg viewBox="0 0 20 20" class="icon-svg" aria-hidden="true" focusable="false">
|
|
12
|
+
<path d="M5.23 7.21a.75.75 0 0 1 1.06.02L10 11.12l3.71-3.9a.75.75 0 1 1 1.08 1.04l-4.25 4.47a.75.75 0 0 1-1.08 0L5.2 8.27a.75.75 0 0 1 .02-1.06Z" fill="currentColor"/>
|
|
13
|
+
</svg>
|
|
14
|
+
`, ct = `
|
|
15
|
+
<svg viewBox="0 0 20 20" class="icon-svg" aria-hidden="true" focusable="false">
|
|
16
|
+
<path d="M5.22 5.22a.75.75 0 0 1 1.06 0L10 8.94l3.72-3.72a.75.75 0 1 1 1.06 1.06L11.06 10l3.72 3.72a.75.75 0 1 1-1.06 1.06L10 11.06l-3.72 3.72a.75.75 0 1 1-1.06-1.06L8.94 10 5.22 6.28a.75.75 0 0 1 0-1.06Z" fill="currentColor"/>
|
|
17
|
+
</svg>
|
|
18
|
+
`, pt = `
|
|
19
|
+
:host {
|
|
20
|
+
--ui-dp-bg: color-mix(in srgb, var(--ui-color-surface, #ffffff) 96%, transparent);
|
|
21
|
+
--ui-dp-surface: linear-gradient(
|
|
22
|
+
180deg,
|
|
23
|
+
color-mix(in srgb, var(--ui-color-surface, #ffffff) 98%, transparent),
|
|
24
|
+
color-mix(in srgb, var(--ui-color-surface, #ffffff) 92%, var(--ui-color-surface-alt, #f8fafc))
|
|
25
|
+
);
|
|
26
|
+
--ui-dp-border: color-mix(in srgb, var(--ui-color-border, #cbd5e1) 76%, transparent);
|
|
27
|
+
--ui-dp-text: var(--ui-color-text, #0f172a);
|
|
28
|
+
--ui-dp-muted: var(--ui-color-muted, #64748b);
|
|
29
|
+
--ui-dp-accent: var(--ui-color-primary, #2563eb);
|
|
30
|
+
--ui-dp-success: var(--ui-color-success, #15803d);
|
|
31
|
+
--ui-dp-radius: 12px;
|
|
32
|
+
--ui-dp-panel-radius: calc(var(--ui-dp-radius) + 2px);
|
|
33
|
+
--ui-dp-field-error: var(--ui-color-danger, #dc2626);
|
|
34
|
+
--ui-dp-focus-ring: color-mix(in srgb, var(--ui-dp-accent) 26%, transparent);
|
|
35
|
+
--ui-dp-z: 1600;
|
|
36
|
+
--ui-dp-duration: 160ms;
|
|
37
|
+
--ui-dp-ease: cubic-bezier(0.2, 0.9, 0.24, 1);
|
|
38
|
+
color-scheme: light dark;
|
|
39
|
+
display: inline-grid;
|
|
40
|
+
inline-size: min(100%, var(--ui-width, 420px));
|
|
41
|
+
min-inline-size: min(240px, 100%);
|
|
42
|
+
color: var(--ui-dp-text);
|
|
43
|
+
font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
:host([shape="square"]) {
|
|
47
|
+
--ui-dp-radius: 6px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
:host([shape="soft"]) {
|
|
51
|
+
--ui-dp-radius: 16px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.root {
|
|
55
|
+
display: grid;
|
|
56
|
+
gap: 8px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.label {
|
|
60
|
+
font: 600 13px/1.35 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
61
|
+
color: var(--ui-dp-text);
|
|
62
|
+
display: inline-flex;
|
|
63
|
+
align-items: center;
|
|
64
|
+
gap: 6px;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.label[hidden] { display: none; }
|
|
68
|
+
|
|
69
|
+
.required { color: var(--ui-dp-field-error); font-size: 11px; }
|
|
70
|
+
|
|
71
|
+
.fields {
|
|
72
|
+
display: grid;
|
|
73
|
+
grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr) auto auto;
|
|
74
|
+
align-items: center;
|
|
75
|
+
gap: 8px;
|
|
76
|
+
min-block-size: 42px;
|
|
77
|
+
border: 1px solid var(--ui-dp-border);
|
|
78
|
+
border-radius: var(--ui-dp-radius);
|
|
79
|
+
padding: 0 10px 0 11px;
|
|
80
|
+
background: var(--ui-dp-surface);
|
|
81
|
+
box-shadow: 0 1px 2px rgba(2, 6, 23, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.75);
|
|
82
|
+
transition: border-color var(--ui-dp-duration) var(--ui-dp-ease), box-shadow var(--ui-dp-duration) var(--ui-dp-ease);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.fields[data-single="true"] {
|
|
86
|
+
grid-template-columns: auto 1fr auto auto;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.fields:focus-within {
|
|
90
|
+
border-color: color-mix(in srgb, var(--ui-dp-accent) 72%, transparent);
|
|
91
|
+
box-shadow: 0 0 0 3px var(--ui-dp-focus-ring), 0 4px 14px rgba(2, 6, 23, 0.09);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.fields[data-open="true"] {
|
|
95
|
+
border-color: color-mix(in srgb, var(--ui-dp-accent) 72%, transparent);
|
|
96
|
+
box-shadow: 0 0 0 3px var(--ui-dp-focus-ring), 0 10px 24px rgba(2, 6, 23, 0.12);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.fields[data-invalid="true"] {
|
|
100
|
+
border-color: color-mix(in srgb, var(--ui-dp-field-error) 68%, transparent);
|
|
101
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-dp-field-error) 20%, transparent);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.fields[data-state="success"]:not([data-invalid="true"]) {
|
|
105
|
+
border-color: color-mix(in srgb, var(--ui-dp-success) 56%, var(--ui-dp-border));
|
|
106
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-dp-success) 20%, transparent);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.fields[data-state="loading"] {
|
|
110
|
+
pointer-events: none;
|
|
111
|
+
opacity: 0.92;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.icon {
|
|
115
|
+
display: inline-grid;
|
|
116
|
+
place-items: center;
|
|
117
|
+
color: color-mix(in srgb, var(--ui-dp-text) 68%, transparent);
|
|
118
|
+
inline-size: 20px;
|
|
119
|
+
block-size: 20px;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.icon-svg {
|
|
123
|
+
inline-size: 16px;
|
|
124
|
+
block-size: 16px;
|
|
125
|
+
pointer-events: none;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.input {
|
|
129
|
+
border: 0;
|
|
130
|
+
background: transparent;
|
|
131
|
+
color: var(--ui-dp-text);
|
|
132
|
+
min-inline-size: 0;
|
|
133
|
+
inline-size: 100%;
|
|
134
|
+
padding: 8px 0;
|
|
135
|
+
font: 500 14px/1.4 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
136
|
+
letter-spacing: 0.005em;
|
|
137
|
+
outline: none;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.input::placeholder {
|
|
141
|
+
color: color-mix(in srgb, var(--ui-dp-text) 44%, transparent);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.sep {
|
|
145
|
+
color: var(--ui-dp-muted);
|
|
146
|
+
font-size: 12px;
|
|
147
|
+
user-select: none;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.btn {
|
|
151
|
+
border: 0;
|
|
152
|
+
background: transparent;
|
|
153
|
+
inline-size: 28px;
|
|
154
|
+
block-size: 28px;
|
|
155
|
+
border-radius: 8px;
|
|
156
|
+
color: color-mix(in srgb, var(--ui-dp-text) 72%, transparent);
|
|
157
|
+
cursor: pointer;
|
|
158
|
+
display: inline-grid;
|
|
159
|
+
place-items: center;
|
|
160
|
+
transition: background-color var(--ui-dp-duration) var(--ui-dp-ease), color var(--ui-dp-duration) var(--ui-dp-ease), transform var(--ui-dp-duration) var(--ui-dp-ease);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.btn:hover { background: color-mix(in srgb, var(--ui-dp-text) 10%, transparent); color: var(--ui-dp-text); }
|
|
164
|
+
.btn:active { transform: translateY(1px); }
|
|
165
|
+
.btn:focus-visible { outline: 2px solid color-mix(in srgb, var(--ui-dp-accent) 64%, transparent); outline-offset: 1px; }
|
|
166
|
+
.btn:disabled { cursor: not-allowed; opacity: 0.55; }
|
|
167
|
+
.toggle-icon { display: inline-grid; place-items: center; }
|
|
168
|
+
.spinner {
|
|
169
|
+
display: none;
|
|
170
|
+
inline-size: 14px;
|
|
171
|
+
block-size: 14px;
|
|
172
|
+
border-radius: 999px;
|
|
173
|
+
border: 2px solid color-mix(in srgb, var(--ui-dp-text) 20%, transparent);
|
|
174
|
+
border-top-color: color-mix(in srgb, var(--ui-dp-accent) 72%, transparent);
|
|
175
|
+
animation: ui-drp-spin 780ms linear infinite;
|
|
176
|
+
}
|
|
177
|
+
:host([state="loading"]) .toggle-icon { display: none; }
|
|
178
|
+
:host([state="loading"]) .spinner { display: inline-block; }
|
|
179
|
+
.btn[hidden] { display: none; }
|
|
180
|
+
|
|
181
|
+
.hint { color: var(--ui-dp-muted); font-size: 12px; line-height: 1.4; }
|
|
182
|
+
.error { color: var(--ui-dp-field-error); font-size: 12px; line-height: 1.4; }
|
|
183
|
+
.hint[hidden], .error[hidden] { display: none; }
|
|
184
|
+
|
|
185
|
+
.inline-panel {
|
|
186
|
+
border: 1px solid var(--ui-dp-border);
|
|
187
|
+
border-radius: var(--ui-dp-panel-radius);
|
|
188
|
+
background: var(--ui-dp-surface);
|
|
189
|
+
box-shadow: 0 18px 30px rgba(2, 6, 23, 0.12);
|
|
190
|
+
inline-size: fit-content;
|
|
191
|
+
max-inline-size: 100%;
|
|
192
|
+
justify-self: start;
|
|
193
|
+
padding: 10px;
|
|
194
|
+
display: grid;
|
|
195
|
+
gap: 10px;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.inline-panel[data-bare="true"] {
|
|
199
|
+
border: 0;
|
|
200
|
+
border-radius: 0;
|
|
201
|
+
background: var(--ui-dp-bare-bg, var(--ui-dp-bg));
|
|
202
|
+
box-shadow: none;
|
|
203
|
+
padding: 0;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.inline-panel[hidden] {
|
|
207
|
+
display: none !important;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.presets, .footer {
|
|
211
|
+
display: flex;
|
|
212
|
+
gap: 8px;
|
|
213
|
+
flex-wrap: wrap;
|
|
214
|
+
justify-content: flex-end;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.inline-panel .presets,
|
|
218
|
+
.inline-panel .footer {
|
|
219
|
+
gap: 6px;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.presets[hidden], .footer[hidden] {
|
|
223
|
+
display: none !important;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.action {
|
|
227
|
+
border: 1px solid color-mix(in srgb, var(--ui-dp-border) 85%, transparent);
|
|
228
|
+
background: color-mix(in srgb, var(--ui-dp-bg) 95%, transparent);
|
|
229
|
+
color: var(--ui-dp-text);
|
|
230
|
+
min-block-size: 32px;
|
|
231
|
+
border-radius: 8px;
|
|
232
|
+
padding: 0 12px;
|
|
233
|
+
font: 600 12px/1 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
234
|
+
cursor: pointer;
|
|
235
|
+
transition: border-color var(--ui-dp-duration) var(--ui-dp-ease), background-color var(--ui-dp-duration) var(--ui-dp-ease), transform var(--ui-dp-duration) var(--ui-dp-ease);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.inline-panel .action {
|
|
239
|
+
min-block-size: 30px;
|
|
240
|
+
padding: 0 10px;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.action:hover {
|
|
244
|
+
border-color: color-mix(in srgb, var(--ui-dp-accent) 38%, var(--ui-dp-border));
|
|
245
|
+
background: color-mix(in srgb, var(--ui-dp-accent) 10%, transparent);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.action:active {
|
|
249
|
+
transform: translateY(1px);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.action:focus-visible {
|
|
253
|
+
outline: 2px solid color-mix(in srgb, var(--ui-dp-accent) 64%, transparent);
|
|
254
|
+
outline-offset: 1px;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.action[data-tone="primary"] {
|
|
258
|
+
border-color: color-mix(in srgb, var(--ui-dp-accent) 60%, transparent);
|
|
259
|
+
background: color-mix(in srgb, var(--ui-dp-accent) 20%, transparent);
|
|
260
|
+
color: color-mix(in srgb, var(--ui-dp-text) 94%, transparent);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.action:disabled {
|
|
264
|
+
cursor: not-allowed;
|
|
265
|
+
opacity: 0.55;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
:host([disabled]) .fields { opacity: 0.62; pointer-events: none; }
|
|
269
|
+
:host([readonly]) .fields { background: color-mix(in srgb, var(--ui-dp-bg) 92%, var(--ui-color-surface-alt, #f8fafc)); }
|
|
270
|
+
|
|
271
|
+
:host([variant="contrast"]) {
|
|
272
|
+
--ui-dp-bg: #0f172a;
|
|
273
|
+
--ui-dp-border: #334155;
|
|
274
|
+
--ui-dp-text: #e2e8f0;
|
|
275
|
+
--ui-dp-muted: #93a4bd;
|
|
276
|
+
--ui-dp-accent: #93c5fd;
|
|
277
|
+
--ui-dp-surface: linear-gradient(180deg, color-mix(in srgb, #0f172a 86%, #1e293b), #0f172a);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
:host([state="success"]) {
|
|
281
|
+
--ui-dp-focus-ring: color-mix(in srgb, var(--ui-dp-success) 26%, transparent);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
@media (max-width: 640px) {
|
|
285
|
+
:host { inline-size: min(100%, var(--ui-width, 100%)); }
|
|
286
|
+
.fields { min-block-size: 40px; }
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
@media (prefers-reduced-motion: reduce) {
|
|
290
|
+
.fields,
|
|
291
|
+
.btn,
|
|
292
|
+
.action,
|
|
293
|
+
.spinner {
|
|
294
|
+
transition: none !important;
|
|
295
|
+
animation: none !important;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
@media (forced-colors: active) {
|
|
300
|
+
.fields,
|
|
301
|
+
.inline-panel,
|
|
302
|
+
.action {
|
|
303
|
+
forced-color-adjust: none;
|
|
304
|
+
background: Canvas;
|
|
305
|
+
color: CanvasText;
|
|
306
|
+
border-color: CanvasText;
|
|
307
|
+
}
|
|
308
|
+
.fields:focus-within,
|
|
309
|
+
.btn:focus-visible,
|
|
310
|
+
.action:focus-visible {
|
|
311
|
+
outline-color: Highlight;
|
|
312
|
+
}
|
|
313
|
+
.spinner {
|
|
314
|
+
border-color: CanvasText;
|
|
315
|
+
border-top-color: CanvasText;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
@keyframes ui-drp-spin {
|
|
320
|
+
to {
|
|
321
|
+
transform: rotate(360deg);
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
`, ht = `
|
|
325
|
+
.overlay { position: fixed; z-index: var(--ui-dp-z, 1600); pointer-events: none; }
|
|
326
|
+
.panel {
|
|
327
|
+
pointer-events: auto;
|
|
328
|
+
inline-size: min(var(--ui-drp-panel-width, 26rem), calc(100vw - 16px));
|
|
329
|
+
max-inline-size: calc(100vw - 16px);
|
|
330
|
+
border: 1px solid var(--ui-dp-border, #cbd5e1);
|
|
331
|
+
border-radius: var(--ui-dp-panel-radius, 14px);
|
|
332
|
+
background: var(--ui-dp-surface, #fff);
|
|
333
|
+
color: var(--ui-dp-text, #0f172a);
|
|
334
|
+
box-shadow: 0 20px 34px rgba(2, 6, 23, 0.16);
|
|
335
|
+
padding: 10px;
|
|
336
|
+
display: grid;
|
|
337
|
+
gap: 10px;
|
|
338
|
+
transform-origin: top;
|
|
339
|
+
animation: ui-drp-pop-in var(--ui-dp-duration, 160ms) var(--ui-dp-ease, cubic-bezier(0.2, 0.9, 0.24, 1));
|
|
340
|
+
}
|
|
341
|
+
.panel[data-bare="true"], .sheet[data-bare="true"] {
|
|
342
|
+
border: 0;
|
|
343
|
+
border-radius: 0;
|
|
344
|
+
background: var(--ui-dp-bare-bg, var(--ui-dp-bg));
|
|
345
|
+
box-shadow: none;
|
|
346
|
+
padding: 0;
|
|
347
|
+
}
|
|
348
|
+
.sheet-wrap { position: fixed; inset: 0; display: grid; align-items: end; z-index: var(--ui-dp-z, 1600); }
|
|
349
|
+
.sheet-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.52); }
|
|
350
|
+
.sheet {
|
|
351
|
+
position: relative;
|
|
352
|
+
pointer-events: auto;
|
|
353
|
+
background: var(--ui-dp-bg, #fff);
|
|
354
|
+
color: var(--ui-dp-text, #0f172a);
|
|
355
|
+
border-radius: 16px 16px 0 0;
|
|
356
|
+
border: 1px solid color-mix(in srgb, var(--ui-dp-border, #cbd5e1) 84%, transparent);
|
|
357
|
+
box-shadow: 0 -12px 30px rgba(2, 6, 23, 0.2);
|
|
358
|
+
padding: 12px;
|
|
359
|
+
display: grid;
|
|
360
|
+
gap: 10px;
|
|
361
|
+
max-block-size: min(82vh, 640px);
|
|
362
|
+
overflow: auto;
|
|
363
|
+
animation: ui-drp-sheet-up var(--ui-dp-duration, 160ms) var(--ui-dp-ease, cubic-bezier(0.2, 0.9, 0.24, 1));
|
|
364
|
+
}
|
|
365
|
+
.header {
|
|
366
|
+
display: flex;
|
|
367
|
+
align-items: center;
|
|
368
|
+
justify-content: space-between;
|
|
369
|
+
gap: 8px;
|
|
370
|
+
}
|
|
371
|
+
.title {
|
|
372
|
+
margin: 0;
|
|
373
|
+
font: 700 14px/1.3 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
374
|
+
color: var(--ui-dp-text, #0f172a);
|
|
375
|
+
}
|
|
376
|
+
.presets, .footer { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
|
|
377
|
+
.presets[hidden], .footer[hidden] { display: none !important; }
|
|
378
|
+
.action {
|
|
379
|
+
border: 1px solid color-mix(in srgb, var(--ui-dp-border, #cbd5e1) 85%, transparent);
|
|
380
|
+
background: color-mix(in srgb, var(--ui-dp-bg, #fff) 95%, transparent);
|
|
381
|
+
color: var(--ui-dp-text, #0f172a);
|
|
382
|
+
min-block-size: 32px;
|
|
383
|
+
border-radius: 8px;
|
|
384
|
+
padding: 0 12px;
|
|
385
|
+
font: 600 12px/1 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
386
|
+
cursor: pointer;
|
|
387
|
+
transition: border-color var(--ui-dp-duration, 160ms) var(--ui-dp-ease, cubic-bezier(0.2, 0.9, 0.24, 1)), background-color var(--ui-dp-duration, 160ms) var(--ui-dp-ease, cubic-bezier(0.2, 0.9, 0.24, 1));
|
|
388
|
+
}
|
|
389
|
+
.action:hover { border-color: color-mix(in srgb, var(--ui-dp-accent, #2563eb) 38%, var(--ui-dp-border, #cbd5e1)); background: color-mix(in srgb, var(--ui-dp-accent, #2563eb) 10%, transparent); }
|
|
390
|
+
.action:focus-visible { outline: 2px solid color-mix(in srgb, var(--ui-dp-accent, #2563eb) 64%, transparent); outline-offset: 1px; }
|
|
391
|
+
.action[data-tone="primary"] { border-color: color-mix(in srgb, var(--ui-dp-accent, #2563eb) 60%, transparent); background: color-mix(in srgb, var(--ui-dp-accent, #2563eb) 18%, transparent); }
|
|
392
|
+
@media (prefers-reduced-motion: reduce) {
|
|
393
|
+
.panel, .sheet, .action { animation: none !important; transition: none !important; }
|
|
394
|
+
}
|
|
395
|
+
@keyframes ui-drp-pop-in {
|
|
396
|
+
from { opacity: 0; transform: translateY(6px) scale(0.985); }
|
|
397
|
+
to { opacity: 1; transform: translateY(0) scale(1); }
|
|
398
|
+
}
|
|
399
|
+
@keyframes ui-drp-sheet-up {
|
|
400
|
+
from { opacity: 0.82; transform: translateY(12px); }
|
|
401
|
+
to { opacity: 1; transform: translateY(0); }
|
|
402
|
+
}
|
|
403
|
+
`;
|
|
404
|
+
function Z(u) {
|
|
405
|
+
if (!u)
|
|
406
|
+
return { start: null, end: null };
|
|
407
|
+
try {
|
|
408
|
+
const t = JSON.parse(u), e = D((t == null ? void 0 : t.start) || null), i = D((t == null ? void 0 : t.end) || null);
|
|
409
|
+
return { start: e, end: i };
|
|
410
|
+
} catch {
|
|
411
|
+
return { start: null, end: null };
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
function J(u) {
|
|
415
|
+
return !u.start && !u.end ? null : JSON.stringify({
|
|
416
|
+
...u.start ? { start: u.start } : {},
|
|
417
|
+
...u.end ? { end: u.end } : {}
|
|
418
|
+
});
|
|
419
|
+
}
|
|
420
|
+
function _(u) {
|
|
421
|
+
return u.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
422
|
+
}
|
|
423
|
+
function ft(u, t) {
|
|
424
|
+
const e = u.trim();
|
|
425
|
+
if (!e)
|
|
426
|
+
return { start: null, end: null };
|
|
427
|
+
const i = e.split(/\s(?:—|–|to)\s/i).map((r) => r.trim()).filter(Boolean);
|
|
428
|
+
if (i.length > 1) {
|
|
429
|
+
const r = w(i[0] || "", t), c = w(i[1] || "", t);
|
|
430
|
+
return { start: r, end: c };
|
|
431
|
+
}
|
|
432
|
+
return { start: w(e, t), end: null };
|
|
433
|
+
}
|
|
434
|
+
class _t extends tt {
|
|
435
|
+
constructor() {
|
|
436
|
+
super(...arguments), this._value = { start: null, end: null }, this._pending = { start: null, end: null }, this._draftStart = "", this._draftEnd = "", this._draftSingle = "", this._inlineError = "", this._open = !1, this._syncing = !1, this._overlay = null, this._releaseScrollLock = null, this._isInitialized = !1, this._hasView = !1, this._restoreFocusEl = null, this._overlayMode = null, this._uid = `ui-drp-${++lt}`, this._singleId = `${this._uid}-single`, this._startId = `${this._uid}-start`, this._endId = `${this._uid}-end`, this._labelId = `${this._uid}-label`, this._hintId = `${this._uid}-hint`, this._errorId = `${this._uid}-error`, this._panelId = `${this._uid}-panel`, this._panelTitleId = `${this._uid}-panel-title`, this._overlayFocusedOnOpen = !1, this._inlineCalendarFramePending = !1, this._inlineCalendarUpgradePending = !1, this._schedulePosition = it(() => this._positionOverlay()), this._onRootClickBound = (t) => this._onRootClick(t), this._onRootInputBound = (t) => this._onRootInput(t), this._onRootBlurBound = (t) => this._onRootBlur(t), this._onRootKeyDownBound = (t) => this._onRootKeyDown(t), this._onDocumentPointerDownBound = (t) => this._onDocumentPointerDown(t), this._onDocumentKeyDownBound = (t) => this._onDocumentKeyDown(t), this._onWindowResizeBound = () => this._schedulePosition.run(), this._onWindowScrollBound = () => this._schedulePosition.run(), this._onOverlayClickBound = (t) => this._onOverlayClick(t), this._onOverlayCalendarBound = (t) => this._onOverlayCalendarChange(t);
|
|
437
|
+
}
|
|
438
|
+
static get observedAttributes() {
|
|
439
|
+
return [
|
|
440
|
+
"open",
|
|
441
|
+
"default-open",
|
|
442
|
+
"value",
|
|
443
|
+
"default-value",
|
|
444
|
+
"min",
|
|
445
|
+
"max",
|
|
446
|
+
"locale",
|
|
447
|
+
"translations",
|
|
448
|
+
"week-start",
|
|
449
|
+
"size",
|
|
450
|
+
"shape",
|
|
451
|
+
"bare",
|
|
452
|
+
"variant",
|
|
453
|
+
"state",
|
|
454
|
+
"range-variant",
|
|
455
|
+
"label",
|
|
456
|
+
"hint",
|
|
457
|
+
"error",
|
|
458
|
+
"allow-same-day",
|
|
459
|
+
"allow-partial",
|
|
460
|
+
"close-on-select",
|
|
461
|
+
"clearable",
|
|
462
|
+
"disabled",
|
|
463
|
+
"readonly",
|
|
464
|
+
"required",
|
|
465
|
+
"name",
|
|
466
|
+
"name-start",
|
|
467
|
+
"name-end",
|
|
468
|
+
"mode",
|
|
469
|
+
"show-footer"
|
|
470
|
+
];
|
|
471
|
+
}
|
|
472
|
+
connectedCallback() {
|
|
473
|
+
if (super.connectedCallback(), this.root.addEventListener("click", this._onRootClickBound), this.root.addEventListener("input", this._onRootInputBound), this.root.addEventListener("focusout", this._onRootBlurBound), this.root.addEventListener("keydown", this._onRootKeyDownBound), !this._isInitialized) {
|
|
474
|
+
const t = Z(this.getAttribute("value") || this.getAttribute("default-value")), e = this._normalizePending(t);
|
|
475
|
+
this._value = e, this._pending = { ...e }, this._refreshDraftFromValue(), this._open = this.hasAttribute("open") || m(this.getAttribute("default-open")), this._isInitialized = !0;
|
|
476
|
+
}
|
|
477
|
+
this._open && !this._isInlineMode() && this._ensureOverlay(), this._isInlineMode() && this._scheduleInlineCalendarSync();
|
|
478
|
+
}
|
|
479
|
+
disconnectedCallback() {
|
|
480
|
+
this.root.removeEventListener("click", this._onRootClickBound), this.root.removeEventListener("input", this._onRootInputBound), this.root.removeEventListener("focusout", this._onRootBlurBound), this.root.removeEventListener("keydown", this._onRootKeyDownBound), this._destroyOverlay(), super.disconnectedCallback();
|
|
481
|
+
}
|
|
482
|
+
attributeChangedCallback(t, e, i) {
|
|
483
|
+
if (e !== i && (t === "value" && !this._syncing && (this._value = this._normalizePending(Z(i)), this._pending = { ...this._value }, this._refreshDraftFromValue(), this._inlineError = "", this._syncValueAttribute(this._value)), t === "open" && !this._syncing && (this._open = this.hasAttribute("open"), this._syncOverlay("attribute")), t === "mode" && this._syncOverlay("attribute"), t === "disabled" && this.hasAttribute("disabled") && this._setOpen(!1, "outside"), (t === "min" || t === "max") && !this._syncing && (this._value = this._normalizePending(this._value), this._pending = this._normalizePending(this._pending), this._syncValueAttribute(this._value), this._refreshDraftFromValue()), t === "state" && this._state() === "loading" && this._setOpen(!1, "outside"), !!this.isConnected)) {
|
|
484
|
+
if (!this._hasView) {
|
|
485
|
+
this.requestRender();
|
|
486
|
+
return;
|
|
487
|
+
}
|
|
488
|
+
this._updateHostState();
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
_isInlineMode() {
|
|
492
|
+
return (this.getAttribute("mode") || "popover") === "inline";
|
|
493
|
+
}
|
|
494
|
+
_isMobileSheet() {
|
|
495
|
+
return nt(this.getAttribute("mode"));
|
|
496
|
+
}
|
|
497
|
+
_isDisabled() {
|
|
498
|
+
return this.hasAttribute("disabled");
|
|
499
|
+
}
|
|
500
|
+
_state() {
|
|
501
|
+
const t = (this.getAttribute("state") || "").trim().toLowerCase();
|
|
502
|
+
return t === "loading" || t === "error" || t === "success" ? t : "idle";
|
|
503
|
+
}
|
|
504
|
+
_isInteractionBlocked() {
|
|
505
|
+
return this._isDisabled() || this._state() === "loading";
|
|
506
|
+
}
|
|
507
|
+
_isReadonly() {
|
|
508
|
+
return this.hasAttribute("readonly");
|
|
509
|
+
}
|
|
510
|
+
_clearable() {
|
|
511
|
+
return m(this.getAttribute("clearable"), !0);
|
|
512
|
+
}
|
|
513
|
+
_closeOnSelect() {
|
|
514
|
+
return m(this.getAttribute("close-on-select"), !1);
|
|
515
|
+
}
|
|
516
|
+
_shouldAutoCommit() {
|
|
517
|
+
return this._closeOnSelect() || !this._showFooter();
|
|
518
|
+
}
|
|
519
|
+
_showFooter() {
|
|
520
|
+
return m(this.getAttribute("show-footer"), !0);
|
|
521
|
+
}
|
|
522
|
+
_isBare() {
|
|
523
|
+
return m(this.getAttribute("bare"), !1);
|
|
524
|
+
}
|
|
525
|
+
_allowPartial() {
|
|
526
|
+
return m(this.getAttribute("allow-partial"), !0);
|
|
527
|
+
}
|
|
528
|
+
_allowSameDay() {
|
|
529
|
+
return m(this.getAttribute("allow-same-day"), !0);
|
|
530
|
+
}
|
|
531
|
+
_locale() {
|
|
532
|
+
return rt(this.getAttribute("locale"));
|
|
533
|
+
}
|
|
534
|
+
_translations() {
|
|
535
|
+
return et(
|
|
536
|
+
this.getAttribute("locale"),
|
|
537
|
+
this.getAttribute("translations")
|
|
538
|
+
);
|
|
539
|
+
}
|
|
540
|
+
_rangeVariant() {
|
|
541
|
+
return (this.getAttribute("range-variant") || "two-fields") === "single-field" ? "single-field" : "two-fields";
|
|
542
|
+
}
|
|
543
|
+
_minIso() {
|
|
544
|
+
return K(this.getAttribute("min"));
|
|
545
|
+
}
|
|
546
|
+
_maxIso() {
|
|
547
|
+
return K(this.getAttribute("max"));
|
|
548
|
+
}
|
|
549
|
+
_todayIso() {
|
|
550
|
+
const t = /* @__PURE__ */ new Date(), e = String(t.getMonth() + 1).padStart(2, "0"), i = String(t.getDate()).padStart(2, "0");
|
|
551
|
+
return `${t.getFullYear()}-${e}-${i}`;
|
|
552
|
+
}
|
|
553
|
+
_resolvedBounds() {
|
|
554
|
+
let t = this._minIso(), e = this._maxIso();
|
|
555
|
+
if (t && e && N(t, e) > 0) {
|
|
556
|
+
const i = t;
|
|
557
|
+
t = e, e = i;
|
|
558
|
+
}
|
|
559
|
+
return { min: t, max: e };
|
|
560
|
+
}
|
|
561
|
+
_refreshDraftFromValue() {
|
|
562
|
+
const t = j(this._value.start, this._locale(), "locale", null), e = j(this._value.end, this._locale(), "locale", null);
|
|
563
|
+
this._draftStart = t, this._draftEnd = e, this._draftSingle = [t, e].filter(Boolean).join(" — ");
|
|
564
|
+
}
|
|
565
|
+
_syncOpenAttribute(t) {
|
|
566
|
+
this._syncing = !0;
|
|
567
|
+
try {
|
|
568
|
+
t ? this.hasAttribute("open") || this.setAttribute("open", "") : this.hasAttribute("open") && this.removeAttribute("open");
|
|
569
|
+
} finally {
|
|
570
|
+
this._syncing = !1;
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
_syncValueAttribute(t) {
|
|
574
|
+
const e = J(t);
|
|
575
|
+
this._syncing = !0;
|
|
576
|
+
try {
|
|
577
|
+
e ? this.getAttribute("value") !== e && this.setAttribute("value", e) : this.hasAttribute("value") && this.removeAttribute("value");
|
|
578
|
+
} finally {
|
|
579
|
+
this._syncing = !1;
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
_emitInput(t) {
|
|
583
|
+
const e = {
|
|
584
|
+
mode: "range",
|
|
585
|
+
start: this._pending.start,
|
|
586
|
+
end: this._pending.end,
|
|
587
|
+
value: this._pending.start && this._pending.end ? { start: this._pending.start, end: this._pending.end } : null,
|
|
588
|
+
source: t
|
|
589
|
+
};
|
|
590
|
+
this.dispatchEvent(new CustomEvent("input", { detail: e, bubbles: !0, composed: !0 }));
|
|
591
|
+
}
|
|
592
|
+
_emitChange(t) {
|
|
593
|
+
const e = {
|
|
594
|
+
mode: "range",
|
|
595
|
+
start: this._value.start,
|
|
596
|
+
end: this._value.end,
|
|
597
|
+
value: this._value.start && this._value.end ? { start: this._value.start, end: this._value.end } : null,
|
|
598
|
+
source: t
|
|
599
|
+
};
|
|
600
|
+
this.dispatchEvent(new CustomEvent("change", { detail: e, bubbles: !0, composed: !0 }));
|
|
601
|
+
}
|
|
602
|
+
_emitInvalid(t, e) {
|
|
603
|
+
this.dispatchEvent(new CustomEvent("invalid", { detail: { raw: t, reason: e }, bubbles: !0, composed: !0 }));
|
|
604
|
+
}
|
|
605
|
+
_normalizePending(t) {
|
|
606
|
+
const { min: e, max: i } = this._resolvedBounds(), n = t.start ? Y(t.start, e, i) : null, r = t.end ? Y(t.end, e, i) : null;
|
|
607
|
+
return !n || !r ? { start: n, end: r } : N(n, r) > 0 ? { start: r, end: n } : { start: n, end: r };
|
|
608
|
+
}
|
|
609
|
+
_canCommit(t) {
|
|
610
|
+
return !t.start && !t.end ? !0 : !(!this._allowPartial() && (!t.start || !t.end) || t.start && t.end && !this._allowSameDay() && t.start === t.end);
|
|
611
|
+
}
|
|
612
|
+
_commit(t, e) {
|
|
613
|
+
if (this._isInteractionBlocked() || this._isReadonly())
|
|
614
|
+
return;
|
|
615
|
+
const i = this._normalizePending(t);
|
|
616
|
+
if (!this._canCommit(i)) {
|
|
617
|
+
this._inlineError = this.getAttribute("error") || this._translations().invalidRange, this._emitInvalid(JSON.stringify(t), "range"), this._updateHostState();
|
|
618
|
+
return;
|
|
619
|
+
}
|
|
620
|
+
this._value = i, this._pending = { ...i }, this._inlineError = "", this._refreshDraftFromValue(), this._syncValueAttribute(this._value), this._emitInput(e), this._emitChange(e), this._updateHostState();
|
|
621
|
+
}
|
|
622
|
+
_setOpen(t, e) {
|
|
623
|
+
t && this._isInteractionBlocked() || this._open !== t && (this._open = t, this._overlayFocusedOnOpen = !1, this._syncOpenAttribute(t), this._syncOverlay(e), this._updateHostState(), this.dispatchEvent(new CustomEvent(t ? "open" : "close", { bubbles: !0, composed: !0 })));
|
|
624
|
+
}
|
|
625
|
+
_syncOverlay(t) {
|
|
626
|
+
if (this._isInlineMode()) {
|
|
627
|
+
this._destroyOverlay();
|
|
628
|
+
return;
|
|
629
|
+
}
|
|
630
|
+
if (this._open) {
|
|
631
|
+
this._ensureOverlay(), this._syncOverlayState();
|
|
632
|
+
return;
|
|
633
|
+
}
|
|
634
|
+
this._destroyOverlay();
|
|
635
|
+
const e = this._restoreFocusEl || this.root.querySelector(".single, .start, .end");
|
|
636
|
+
if (this._restoreFocusEl = null, e && e.isConnected)
|
|
637
|
+
try {
|
|
638
|
+
e.focus();
|
|
639
|
+
} catch {
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
_ensureOverlay() {
|
|
643
|
+
if (this._overlay || typeof document > "u")
|
|
644
|
+
return;
|
|
645
|
+
const t = document.createElement("div");
|
|
646
|
+
t.className = "ui-date-range-picker-overlay-host", t.style.position = "fixed", t.style.left = "0", t.style.top = "0", t.style.zIndex = "1100", t.style.pointerEvents = "none", t.addEventListener("click", this._onOverlayClickBound), t.addEventListener("select", this._onOverlayCalendarBound), t.addEventListener("change", this._onOverlayCalendarBound), document.body.appendChild(t), this._overlay = t, document.addEventListener("pointerdown", this._onDocumentPointerDownBound, !0), document.addEventListener("keydown", this._onDocumentKeyDownBound), window.addEventListener("resize", this._onWindowResizeBound), window.addEventListener("scroll", this._onWindowScrollBound, !0), this._isMobileSheet() && (this._releaseScrollLock = W());
|
|
647
|
+
}
|
|
648
|
+
_destroyOverlay() {
|
|
649
|
+
this._overlay && (this._schedulePosition.cancel(), document.removeEventListener("pointerdown", this._onDocumentPointerDownBound, !0), document.removeEventListener("keydown", this._onDocumentKeyDownBound), window.removeEventListener("resize", this._onWindowResizeBound), window.removeEventListener("scroll", this._onWindowScrollBound, !0), this._overlay.removeEventListener("click", this._onOverlayClickBound), this._overlay.removeEventListener("select", this._onOverlayCalendarBound), this._overlay.removeEventListener("change", this._onOverlayCalendarBound), this._overlay.parentElement && this._overlay.parentElement.removeChild(this._overlay), this._overlay = null, this._overlayMode = null, this._releaseScrollLock && (this._releaseScrollLock(), this._releaseScrollLock = null));
|
|
650
|
+
}
|
|
651
|
+
_positionOverlay() {
|
|
652
|
+
if (!this._overlay || !this._open || this._isMobileSheet())
|
|
653
|
+
return;
|
|
654
|
+
const t = this.root.querySelector(".fields"), e = this._overlay.querySelector(".panel");
|
|
655
|
+
if (!t || !e)
|
|
656
|
+
return;
|
|
657
|
+
const i = t.getBoundingClientRect();
|
|
658
|
+
e.style.setProperty("--ui-drp-panel-width", `${Math.round(i.width)}px`);
|
|
659
|
+
const n = e.getBoundingClientRect(), r = st(i, n);
|
|
660
|
+
e.style.position = "absolute", e.style.top = `${Math.round(r.top)}px`, e.style.left = `${Math.round(r.left)}px`;
|
|
661
|
+
}
|
|
662
|
+
_renderPanelInner(t) {
|
|
663
|
+
const e = this._translations(), i = (this.getAttribute("label") || "").trim(), n = !!i || t, r = t ? "true" : "false", c = `
|
|
664
|
+
<header class="header" part="header" ${n ? "" : "hidden"}>
|
|
665
|
+
<p class="title" id="${this._panelTitleId}" ${i ? "" : "hidden"}>${_(i)}</p>
|
|
666
|
+
${t ? `<button type="button" class="action" data-action="cancel">${_(e.cancel)}</button>` : ""}
|
|
667
|
+
</header>
|
|
668
|
+
<ui-calendar class="drp-calendar" part="calendar"></ui-calendar>
|
|
669
|
+
<div class="presets" part="presets">
|
|
670
|
+
<button type="button" class="action" data-action="preset-today">${_(e.today)}</button>
|
|
671
|
+
<button type="button" class="action" data-action="preset-last7">${_(e.last7Days)}</button>
|
|
672
|
+
<button type="button" class="action" data-action="preset-month">${_(e.thisMonth)}</button>
|
|
673
|
+
</div>
|
|
674
|
+
<footer class="footer" part="footer">
|
|
675
|
+
<button type="button" class="action" data-action="clear" part="clear">${_(e.clear)}</button>
|
|
676
|
+
<button type="button" class="action" data-action="cancel" part="cancel">${_(e.cancel)}</button>
|
|
677
|
+
<button type="button" class="action" data-action="apply" data-tone="primary" part="apply">${_(e.apply)}</button>
|
|
678
|
+
</footer>
|
|
679
|
+
`;
|
|
680
|
+
return `
|
|
681
|
+
<style>${ht}</style>
|
|
682
|
+
${t ? '<div class="sheet-backdrop" data-action="backdrop"></div>' : ""}
|
|
683
|
+
<section class="${t ? "sheet" : "panel"}" id="${this._panelId}" role="dialog" aria-modal="${r}" aria-labelledby="${this._panelTitleId}" part="${t ? "sheet" : "popover"}">${c}</section>
|
|
684
|
+
`;
|
|
685
|
+
}
|
|
686
|
+
_syncCalendar(t) {
|
|
687
|
+
const e = (h, d) => {
|
|
688
|
+
if (d == null || d === "") {
|
|
689
|
+
t.hasAttribute(h) && t.removeAttribute(h);
|
|
690
|
+
return;
|
|
691
|
+
}
|
|
692
|
+
t.getAttribute(h) !== d && t.setAttribute(h, d);
|
|
693
|
+
}, i = J(this._pending), { min: n, max: r } = this._resolvedBounds();
|
|
694
|
+
e("selection", "range"), e("value", i), e("min", n), e("max", r), e("locale", this.getAttribute("locale")), e("translations", this.getAttribute("translations")), e("week-start", this.getAttribute("week-start"));
|
|
695
|
+
const l = this.getAttribute("size") || "sm";
|
|
696
|
+
e("size", l === "lg" ? "md" : "sm"), e("variant", this.getAttribute("variant")), e("outside-click", this.getAttribute("outside-click"));
|
|
697
|
+
const p = t.classList.contains("inline-calendar");
|
|
698
|
+
l === "lg" ? (t.style.setProperty("--ui-calendar-day-height", "1.95em"), t.style.setProperty("--ui-calendar-day-padding-block", "0.2em"), t.style.setProperty("--ui-calendar-day-padding-inline", "0.26em"), t.style.setProperty("--ui-calendar-gap", "0.42em"), t.style.setProperty("--ui-calendar-day-font-size", "0.78em"), t.style.setProperty("--ui-calendar-weekday-font-size", "0.7em"), t.style.setProperty("--ui-calendar-title-font-size", "0.88em")) : (t.style.setProperty("--ui-calendar-day-height", "2.4em"), t.style.setProperty("--ui-calendar-day-padding-block", "0.14em"), t.style.setProperty("--ui-calendar-day-padding-inline", "0.22em"), t.style.setProperty("--ui-calendar-gap", "0.34em"), t.style.setProperty("--ui-calendar-day-font-size", "0.72em"), t.style.setProperty("--ui-calendar-weekday-font-size", "0.64em"), t.style.setProperty("--ui-calendar-title-font-size", "0.8em")), p ? (t.style.setProperty("--ui-calendar-day-height", l === "lg" ? "2.1em" : "1.92em"), t.style.setProperty("--ui-calendar-day-padding-block", "0.08em"), t.style.setProperty("--ui-calendar-day-padding-inline", "0.14em"), t.style.setProperty("--ui-calendar-frame-padding", "0.28em"), t.style.setProperty("--ui-calendar-week-gap", "0.16em"), t.style.setProperty("--ui-calendar-control-height", "1.64em"), t.style.setProperty("--ui-calendar-gap", "0.2em"), t.style.setProperty("--ui-calendar-day-font-size", l === "lg" ? "0.76em" : "0.68em"), t.style.setProperty("--ui-calendar-weekday-font-size", l === "lg" ? "0.66em" : "0.58em"), t.style.setProperty("--ui-calendar-title-font-size", l === "lg" ? "0.84em" : "0.76em")) : (t.style.removeProperty("--ui-calendar-frame-padding"), t.style.removeProperty("--ui-calendar-week-gap"), t.style.removeProperty("--ui-calendar-control-height")), this._isReadonly() ? e("readonly", "") : e("readonly", null), this._isInteractionBlocked() ? e("disabled", "") : e("disabled", null), this._isBare() ? e("bare", "") : e("bare", null), e("tabindex", "-1"), e("aria-label", this.getAttribute("label") || this._translations().selectDateRange);
|
|
699
|
+
}
|
|
700
|
+
_ensureOverlayContent(t) {
|
|
701
|
+
if (!this._overlay)
|
|
702
|
+
return;
|
|
703
|
+
const e = t ? "sheet" : "popover";
|
|
704
|
+
this._overlayMode === e && this._overlay.querySelector(".drp-calendar") || (this._overlayMode = e, this._overlay.innerHTML = t ? `<div class="sheet-wrap">${this._renderPanelInner(!0)}</div>` : `<div class="overlay">${this._renderPanelInner(!1)}</div>`);
|
|
705
|
+
}
|
|
706
|
+
_syncOverlayState() {
|
|
707
|
+
if (!this._overlay)
|
|
708
|
+
return;
|
|
709
|
+
const t = this._isMobileSheet();
|
|
710
|
+
t && !this._releaseScrollLock ? this._releaseScrollLock = W() : !t && this._releaseScrollLock && (this._releaseScrollLock(), this._releaseScrollLock = null), this._ensureOverlayContent(t);
|
|
711
|
+
const e = this._overlay.querySelector(".title"), i = this._overlay.querySelector(".panel, .sheet"), n = this._overlay.querySelector(".header"), r = this._overlay.querySelector(".presets"), c = this._overlay.querySelector(".footer"), l = this._translations();
|
|
712
|
+
i && (i.dataset.bare = this._isBare() ? "true" : "false"), n && (n.hidden = !(this.getAttribute("label") || "").trim() && !t);
|
|
713
|
+
const p = this._showFooter();
|
|
714
|
+
if (r && (r.hidden = !p), c && (c.hidden = !p), e) {
|
|
715
|
+
const y = (this.getAttribute("label") || "").trim();
|
|
716
|
+
e.textContent = y, e.hidden = !y;
|
|
717
|
+
}
|
|
718
|
+
const h = this._overlay.querySelector('[data-action="preset-today"]');
|
|
719
|
+
h && (h.textContent = l.today);
|
|
720
|
+
const d = this._overlay.querySelector('[data-action="preset-last7"]');
|
|
721
|
+
d && (d.textContent = l.last7Days);
|
|
722
|
+
const b = this._overlay.querySelector('[data-action="preset-month"]');
|
|
723
|
+
b && (b.textContent = l.thisMonth);
|
|
724
|
+
const A = this._overlay.querySelector('[data-action="clear"]');
|
|
725
|
+
A && (A.textContent = l.clear);
|
|
726
|
+
const I = this._overlay.querySelector('[data-action="cancel"]');
|
|
727
|
+
I && (I.textContent = l.cancel);
|
|
728
|
+
const f = this._overlay.querySelector('[data-action="apply"]');
|
|
729
|
+
f && (f.textContent = l.apply);
|
|
730
|
+
const a = this._overlay.querySelectorAll(".action"), o = this._isInteractionBlocked() || this._isReadonly();
|
|
731
|
+
a.forEach((y) => {
|
|
732
|
+
y.disabled = o;
|
|
733
|
+
});
|
|
734
|
+
const s = this._overlay.querySelector(".drp-calendar");
|
|
735
|
+
s && (this._syncCalendar(s), this._open && !this._overlayFocusedOnOpen && (this._overlayFocusedOnOpen = !0, requestAnimationFrame(() => {
|
|
736
|
+
if (!(!this._open || !this._overlay))
|
|
737
|
+
try {
|
|
738
|
+
s.focus({ preventScroll: !0 });
|
|
739
|
+
} catch {
|
|
740
|
+
}
|
|
741
|
+
}))), t || this._schedulePosition.run();
|
|
742
|
+
}
|
|
743
|
+
_renderOverlay() {
|
|
744
|
+
this._syncOverlayState();
|
|
745
|
+
}
|
|
746
|
+
_renderInlineCalendar() {
|
|
747
|
+
const t = this.root.querySelector(".inline-calendar");
|
|
748
|
+
t && this._syncCalendar(t);
|
|
749
|
+
}
|
|
750
|
+
_scheduleInlineCalendarSync() {
|
|
751
|
+
const t = () => {
|
|
752
|
+
!this.isConnected || !this._hasView || !this._isInlineMode() || this._renderInlineCalendar();
|
|
753
|
+
};
|
|
754
|
+
t(), this._inlineCalendarFramePending || (this._inlineCalendarFramePending = !0, requestAnimationFrame(() => {
|
|
755
|
+
this._inlineCalendarFramePending = !1, t();
|
|
756
|
+
})), !this._inlineCalendarUpgradePending && typeof customElements < "u" && !customElements.get("ui-calendar") && (this._inlineCalendarUpgradePending = !0, customElements.whenDefined("ui-calendar").then(() => {
|
|
757
|
+
this._inlineCalendarUpgradePending = !1, requestAnimationFrame(() => {
|
|
758
|
+
t();
|
|
759
|
+
});
|
|
760
|
+
}));
|
|
761
|
+
}
|
|
762
|
+
_updateHostState() {
|
|
763
|
+
if (!this._hasView)
|
|
764
|
+
return;
|
|
765
|
+
const t = this.getAttribute("label") || "", e = this.getAttribute("hint") || "", i = this.getAttribute("error") || "", n = this._inlineError || i, r = this._translations(), c = n ? "error" : this._state(), l = this._rangeVariant(), p = this._isInlineMode(), h = !!(this._value.start || this._value.end || this._pending.start || this._pending.end), d = this._isInteractionBlocked(), b = this.root.querySelector(".label"), A = this.root.querySelector(".label-text"), I = this.root.querySelector(".required"), f = this.root.querySelector(".fields"), a = this.root.querySelector(".single"), o = this.root.querySelector(".start"), s = this.root.querySelector(".end"), y = this.root.querySelector(".sep"), k = this.root.querySelector('.btn[data-action="clear"]'), v = this.root.querySelector('.btn[data-action="toggle"]'), x = this.root.querySelector(".hint"), C = this.root.querySelector(".error"), g = this.root.querySelector(".inline-panel"), q = this.root.querySelector(".inline-panel .presets"), R = this.root.querySelector(".inline-panel .footer"), z = this.root.querySelector(".hidden-range"), O = this.root.querySelector(".hidden-start"), B = this.root.querySelector(".hidden-end"), G = this.root.querySelectorAll(".inline-panel .action");
|
|
766
|
+
b && (b.hidden = !t, b.id = this._labelId, b.setAttribute("for", l === "single-field" ? this._singleId : this._startId)), A && (A.textContent = t), I && (I.hidden = !this.hasAttribute("required")), f && (f.dataset.single = l === "single-field" ? "true" : "false", f.dataset.invalid = n ? "true" : "false", f.dataset.open = this._open && !p ? "true" : "false", f.dataset.state = c, f.setAttribute("aria-disabled", d ? "true" : "false")), a && (a.value !== this._draftSingle && (a.value = this._draftSingle), a.id = this._singleId, a.hidden = l !== "single-field", a.readOnly = this._isReadonly() || d, a.disabled = d, a.required = this.hasAttribute("required"), a.placeholder = r.startEnd, a.autocomplete = "off", a.setAttribute("role", "combobox"), a.setAttribute("aria-haspopup", "dialog"), a.setAttribute("aria-controls", this._panelId), a.setAttribute("aria-expanded", p ? "false" : String(this._open)), a.setAttribute("aria-invalid", n ? "true" : "false"), t ? a.setAttribute("aria-labelledby", this._labelId) : a.removeAttribute("aria-labelledby")), o && (o.value !== this._draftStart && (o.value = this._draftStart), o.id = this._startId, o.hidden = l === "single-field", o.readOnly = this._isReadonly() || d, o.disabled = d, o.required = this.hasAttribute("required"), o.placeholder = r.startDate, o.autocomplete = "off", o.setAttribute("role", "combobox"), o.setAttribute("aria-haspopup", "dialog"), o.setAttribute("aria-controls", this._panelId), o.setAttribute("aria-expanded", p ? "false" : String(this._open)), o.setAttribute("aria-invalid", n ? "true" : "false"), t ? o.setAttribute("aria-labelledby", this._labelId) : o.removeAttribute("aria-labelledby")), s && (s.value !== this._draftEnd && (s.value = this._draftEnd), s.id = this._endId, s.hidden = l === "single-field", s.readOnly = this._isReadonly() || d, s.disabled = d, s.required = this.hasAttribute("required"), s.placeholder = r.endDate, s.autocomplete = "off", s.setAttribute("role", "combobox"), s.setAttribute("aria-haspopup", "dialog"), s.setAttribute("aria-controls", this._panelId), s.setAttribute("aria-expanded", p ? "false" : String(this._open)), s.setAttribute("aria-invalid", n ? "true" : "false"), t ? s.setAttribute("aria-labelledby", this._labelId) : s.removeAttribute("aria-labelledby")), y && (y.hidden = l === "single-field"), k && (k.hidden = !(this._clearable() && h), k.disabled = d, k.setAttribute("aria-label", r.clearDateRange)), v && (v.hidden = p, v.disabled = d, v.setAttribute("aria-expanded", p ? "false" : String(this._open)), v.setAttribute("aria-controls", this._panelId), v.setAttribute("aria-label", r.toggleCalendar)), x && (x.id = this._hintId, x.hidden = !e, x.textContent = e), C && (C.id = this._errorId, C.hidden = !n, C.textContent = n);
|
|
767
|
+
const L = [];
|
|
768
|
+
e && x && !x.hidden && L.push(this._hintId), n && L.push(this._errorId);
|
|
769
|
+
const S = L.join(" ");
|
|
770
|
+
a && (S ? a.setAttribute("aria-describedby", S) : a.removeAttribute("aria-describedby")), o && (S ? o.setAttribute("aria-describedby", S) : o.removeAttribute("aria-describedby")), s && (S ? s.setAttribute("aria-describedby", S) : s.removeAttribute("aria-describedby")), g && (g.hidden = !p, g.id = this._panelId, g.dataset.bare = this._isBare() ? "true" : "false", g.setAttribute("role", "dialog"), g.setAttribute("aria-modal", "false"), g.setAttribute("aria-label", t || r.selectDateRange));
|
|
771
|
+
const E = this._showFooter();
|
|
772
|
+
q && (q.hidden = !E), R && (R.hidden = !E), G.forEach((X) => {
|
|
773
|
+
X.disabled = d || this._isReadonly();
|
|
774
|
+
});
|
|
775
|
+
const $ = this.root.querySelector('.inline-panel [data-action="preset-today"]');
|
|
776
|
+
$ && ($.textContent = r.today);
|
|
777
|
+
const M = this.root.querySelector('.inline-panel [data-action="preset-last7"]');
|
|
778
|
+
M && (M.textContent = r.last7Days);
|
|
779
|
+
const F = this.root.querySelector('.inline-panel [data-action="preset-month"]');
|
|
780
|
+
F && (F.textContent = r.thisMonth);
|
|
781
|
+
const V = this.root.querySelector('.inline-panel [data-action="clear"]');
|
|
782
|
+
V && (V.textContent = r.clear);
|
|
783
|
+
const H = this.root.querySelector('.inline-panel [data-action="apply"]');
|
|
784
|
+
H && (H.textContent = r.apply);
|
|
785
|
+
const P = this.getAttribute("name") || "", T = this.getAttribute("name-start") || "", U = this.getAttribute("name-end") || "", Q = this._value.start && this._value.end ? `${this._value.start}..${this._value.end}` : "";
|
|
786
|
+
if (z && (z.disabled = !P, z.name = P, z.value = Q), O && (O.disabled = !!P || !T, O.name = T, O.value = this._value.start || ""), B && (B.disabled = !!P || !U, B.name = U, B.value = this._value.end || ""), p) {
|
|
787
|
+
this._scheduleInlineCalendarSync(), this._destroyOverlay();
|
|
788
|
+
return;
|
|
789
|
+
}
|
|
790
|
+
this._open && this._syncOverlayState();
|
|
791
|
+
}
|
|
792
|
+
_onRootClick(t) {
|
|
793
|
+
const e = t.target;
|
|
794
|
+
if (!e)
|
|
795
|
+
return;
|
|
796
|
+
const i = e.closest("[data-action]"), n = i == null ? void 0 : i.getAttribute("data-action");
|
|
797
|
+
if (n && !this._isInteractionBlocked()) {
|
|
798
|
+
if (n === "toggle") {
|
|
799
|
+
this._restoreFocusEl = i, this._setOpen(!this._open, "toggle");
|
|
800
|
+
return;
|
|
801
|
+
}
|
|
802
|
+
if (n === "clear") {
|
|
803
|
+
this._commit({ start: null, end: null }, "clear");
|
|
804
|
+
return;
|
|
805
|
+
}
|
|
806
|
+
if (n === "apply") {
|
|
807
|
+
this._commit(this._pending, "apply"), this._isInlineMode() || this._setOpen(!1, "apply");
|
|
808
|
+
return;
|
|
809
|
+
}
|
|
810
|
+
n === "cancel" && (this._pending = { ...this._value }, this._isInlineMode() || this._setOpen(!1, "cancel"), this._updateHostState());
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
_onRootInput(t) {
|
|
814
|
+
const e = t.target;
|
|
815
|
+
if (!(e instanceof HTMLInputElement) || this._isInteractionBlocked() || this._isReadonly())
|
|
816
|
+
return;
|
|
817
|
+
if (this._rangeVariant() === "single-field" && e.classList.contains("single")) {
|
|
818
|
+
this._draftSingle = e.value, this._inlineError = "";
|
|
819
|
+
return;
|
|
820
|
+
}
|
|
821
|
+
e.classList.contains("start") && (this._draftStart = e.value, this._inlineError = ""), e.classList.contains("end") && (this._draftEnd = e.value, this._inlineError = "");
|
|
822
|
+
}
|
|
823
|
+
_commitFromDraft(t) {
|
|
824
|
+
if (this._rangeVariant() === "single-field") {
|
|
825
|
+
const r = this._draftSingle.trim();
|
|
826
|
+
if (!r)
|
|
827
|
+
return this._pending = { start: null, end: null }, this._commit(this._pending, t), !0;
|
|
828
|
+
const c = ft(r, this._locale());
|
|
829
|
+
return !c.start || !c.end && !this._allowPartial() ? (this._inlineError = this.getAttribute("error") || this._translations().invalidRange, this._emitInvalid(r, "parse"), this._updateHostState(), !1) : (this._pending = this._normalizePending({ start: c.start, end: c.end || null }), this._commit(this._pending, t), !0);
|
|
830
|
+
}
|
|
831
|
+
const i = this._draftStart ? w(this._draftStart, this._locale()) : null, n = this._draftEnd ? w(this._draftEnd, this._locale()) : null;
|
|
832
|
+
return this._draftStart && !i || this._draftEnd && !n ? (this._inlineError = this.getAttribute("error") || this._translations().invalidRange, this._emitInvalid(`${this._draftStart} ${this._draftEnd}`.trim(), "parse"), this._updateHostState(), !1) : (this._pending = this._normalizePending({ start: i, end: n }), this._commit(this._pending, t), !0);
|
|
833
|
+
}
|
|
834
|
+
_onRootBlur(t) {
|
|
835
|
+
var r;
|
|
836
|
+
if (this._isInteractionBlocked() || this._isReadonly())
|
|
837
|
+
return;
|
|
838
|
+
const e = t, i = e.target;
|
|
839
|
+
if (!(i instanceof HTMLInputElement))
|
|
840
|
+
return;
|
|
841
|
+
const n = e.relatedTarget;
|
|
842
|
+
n && ((r = this._overlay) != null && r.contains(n)) || this._open && !this._isInlineMode() || (i.classList.contains("single") || i.classList.contains("start") || i.classList.contains("end")) && (i.classList.contains("single") && (this._draftSingle = i.value), i.classList.contains("start") && (this._draftStart = i.value), i.classList.contains("end") && (this._draftEnd = i.value), this._commitFromDraft("blur"));
|
|
843
|
+
}
|
|
844
|
+
_onRootKeyDown(t) {
|
|
845
|
+
const e = t;
|
|
846
|
+
if (!this._isInteractionBlocked()) {
|
|
847
|
+
if (e.key === "Enter") {
|
|
848
|
+
const i = e.target;
|
|
849
|
+
if (!this._isReadonly() && i instanceof HTMLInputElement && (i.classList.contains("single") || i.classList.contains("start") || i.classList.contains("end"))) {
|
|
850
|
+
e.preventDefault(), i.classList.contains("single") && (this._draftSingle = i.value), i.classList.contains("start") && (this._draftStart = i.value), i.classList.contains("end") && (this._draftEnd = i.value), this._commitFromDraft("enter") && !this._isInlineMode() && this._setOpen(!1, "enter");
|
|
851
|
+
return;
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
if (e.key === "Escape" && this._open && !this._isInlineMode()) {
|
|
855
|
+
e.preventDefault(), this._setOpen(!1, "escape");
|
|
856
|
+
return;
|
|
857
|
+
}
|
|
858
|
+
e.key === "ArrowDown" && !this._open && !this._isInlineMode() && (e.preventDefault(), this._setOpen(!0, "keyboard"));
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
_onDocumentPointerDown(t) {
|
|
862
|
+
if (!this._open || !this._overlay)
|
|
863
|
+
return;
|
|
864
|
+
const e = t.composedPath();
|
|
865
|
+
e.includes(this) || e.includes(this._overlay) || this._setOpen(!1, "outside");
|
|
866
|
+
}
|
|
867
|
+
_onDocumentKeyDown(t) {
|
|
868
|
+
this._open && t.key === "Escape" && (t.preventDefault(), this._setOpen(!1, "escape"));
|
|
869
|
+
}
|
|
870
|
+
_onOverlayClick(t) {
|
|
871
|
+
const e = t.target;
|
|
872
|
+
if (!e)
|
|
873
|
+
return;
|
|
874
|
+
const i = e.closest("[data-action]"), n = i == null ? void 0 : i.getAttribute("data-action");
|
|
875
|
+
if (n && !(this._isInteractionBlocked() || this._isReadonly())) {
|
|
876
|
+
if (n === "backdrop") {
|
|
877
|
+
this._setOpen(!1, "outside");
|
|
878
|
+
return;
|
|
879
|
+
}
|
|
880
|
+
if (n === "clear") {
|
|
881
|
+
this._pending = { start: null, end: null }, this._emitInput("clear"), this._renderOverlay();
|
|
882
|
+
return;
|
|
883
|
+
}
|
|
884
|
+
if (n === "cancel") {
|
|
885
|
+
this._pending = { ...this._value }, this._setOpen(!1, "cancel");
|
|
886
|
+
return;
|
|
887
|
+
}
|
|
888
|
+
if (n === "apply") {
|
|
889
|
+
this._commit(this._pending, "apply"), this._setOpen(!1, "apply");
|
|
890
|
+
return;
|
|
891
|
+
}
|
|
892
|
+
if (n === "preset-today") {
|
|
893
|
+
const r = this._todayIso();
|
|
894
|
+
this._pending = this._normalizePending({ start: r, end: r }), this._emitInput("preset-today"), this._renderOverlay();
|
|
895
|
+
return;
|
|
896
|
+
}
|
|
897
|
+
if (n === "preset-last7") {
|
|
898
|
+
const r = this._todayIso();
|
|
899
|
+
this._pending = this._normalizePending(at(r, 7)), this._emitInput("preset-last7"), this._renderOverlay();
|
|
900
|
+
return;
|
|
901
|
+
}
|
|
902
|
+
if (n === "preset-month") {
|
|
903
|
+
const r = this._todayIso();
|
|
904
|
+
this._pending = this._normalizePending(ot(r)), this._emitInput("preset-month"), this._renderOverlay();
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
}
|
|
908
|
+
_onOverlayCalendarChange(t) {
|
|
909
|
+
if (this._isInteractionBlocked() || this._isReadonly())
|
|
910
|
+
return;
|
|
911
|
+
const e = t.target;
|
|
912
|
+
if (!e || e.tagName.toLowerCase() !== "ui-calendar")
|
|
913
|
+
return;
|
|
914
|
+
const i = t.detail;
|
|
915
|
+
if (!(!i || i.mode !== "range")) {
|
|
916
|
+
if (this._pending = this._normalizePending({
|
|
917
|
+
start: D(i.start || null),
|
|
918
|
+
end: D(i.end || null)
|
|
919
|
+
}), this._emitInput("calendar"), this._shouldAutoCommit() && this._pending.start && this._pending.end) {
|
|
920
|
+
this._commit(this._pending, "calendar"), this._isInlineMode() || this._setOpen(!1, "calendar");
|
|
921
|
+
return;
|
|
922
|
+
}
|
|
923
|
+
this._updateHostState();
|
|
924
|
+
}
|
|
925
|
+
}
|
|
926
|
+
render() {
|
|
927
|
+
this._hasView || (this.setContent(`
|
|
928
|
+
<style>${pt}</style>
|
|
929
|
+
<div class="root">
|
|
930
|
+
<label class="label" part="label" id="${this._labelId}">
|
|
931
|
+
<span class="label-text"></span>
|
|
932
|
+
<span class="required">*</span>
|
|
933
|
+
</label>
|
|
934
|
+
<div class="fields" part="field input" data-single="false">
|
|
935
|
+
<span class="icon" part="icon" aria-hidden="true">${dt}</span>
|
|
936
|
+
<input class="input single" id="${this._singleId}" part="input" />
|
|
937
|
+
<input class="input start" id="${this._startId}" part="input" />
|
|
938
|
+
<span class="sep">—</span>
|
|
939
|
+
<input class="input end" id="${this._endId}" part="input" />
|
|
940
|
+
<button type="button" class="btn" part="clear" data-action="clear">${ct}</button>
|
|
941
|
+
<button type="button" class="btn" part="toggle" data-action="toggle">
|
|
942
|
+
<span class="toggle-icon">${ut}</span>
|
|
943
|
+
<span class="spinner" aria-hidden="true"></span>
|
|
944
|
+
</button>
|
|
945
|
+
</div>
|
|
946
|
+
<div class="hint" id="${this._hintId}" part="hint"></div>
|
|
947
|
+
<div class="error" id="${this._errorId}" part="error" role="alert"></div>
|
|
948
|
+
<input class="hidden-range" type="hidden" disabled />
|
|
949
|
+
<input class="hidden-start" type="hidden" disabled />
|
|
950
|
+
<input class="hidden-end" type="hidden" disabled />
|
|
951
|
+
<section class="inline-panel" id="${this._panelId}" part="popover" hidden>
|
|
952
|
+
<ui-calendar class="inline-calendar" part="calendar"></ui-calendar>
|
|
953
|
+
<div class="presets" part="presets">
|
|
954
|
+
<button type="button" class="action" data-action="preset-today"></button>
|
|
955
|
+
<button type="button" class="action" data-action="preset-last7"></button>
|
|
956
|
+
<button type="button" class="action" data-action="preset-month"></button>
|
|
957
|
+
</div>
|
|
958
|
+
<footer class="footer" part="footer">
|
|
959
|
+
<button type="button" class="action" data-action="clear"></button>
|
|
960
|
+
<button type="button" class="action" data-action="apply" data-tone="primary"></button>
|
|
961
|
+
</footer>
|
|
962
|
+
</section>
|
|
963
|
+
</div>
|
|
964
|
+
`, { force: !0 }), this._hasView = !0), this._updateHostState();
|
|
965
|
+
}
|
|
966
|
+
shouldRenderOnAttributeChange(t, e, i) {
|
|
967
|
+
return !1;
|
|
968
|
+
}
|
|
969
|
+
}
|
|
970
|
+
typeof customElements < "u" && !customElements.get("ui-date-range-picker") && customElements.define("ui-date-range-picker", _t);
|
|
971
|
+
export {
|
|
972
|
+
_t as UIDateRangePicker
|
|
973
|
+
};
|