@editora/ui-core 0.1.8 → 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/ElementBase.d.ts.map +1 -1
- package/dist/__tests__/setup.d.ts +2 -0
- package/dist/__tests__/setup.d.ts.map +1 -1
- 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/components/date-time-utils.d.ts.map +1 -1
- package/dist/components/ui-anchor.d.ts +7 -0
- package/dist/components/ui-anchor.d.ts.map +1 -1
- package/dist/components/ui-data-table.d.ts.map +1 -1
- package/dist/components/ui-date-picker.d.ts.map +1 -1
- package/dist/components/ui-date-range-picker.d.ts.map +1 -1
- package/dist/components/ui-date-time-picker.d.ts.map +1 -1
- package/dist/components/ui-drawer.d.ts.map +1 -1
- package/dist/components/ui-form.d.ts +0 -1
- package/dist/components/ui-form.d.ts.map +1 -1
- package/dist/components/ui-listbox.d.ts +3 -0
- package/dist/components/ui-listbox.d.ts.map +1 -1
- package/dist/components/ui-number-ticker.d.ts.map +1 -1
- package/dist/components/ui-portal.d.ts +1 -0
- package/dist/components/ui-portal.d.ts.map +1 -1
- package/dist/components/ui-sidebar.d.ts.map +1 -1
- package/dist/components/ui-sortable.d.ts +192 -0
- package/dist/components/ui-sortable.d.ts.map +1 -0
- package/dist/components/ui-tooltip.d.ts.map +1 -1
- package/dist/components/ui-transfer-list.d.ts +5 -0
- package/dist/components/ui-transfer-list.d.ts.map +1 -1
- 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 -35924
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +440 -68558
- 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.d.ts.map +1 -1
- 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-4ac0107b.mjs +1954 -0
- package/dist/runtime-5f282bc8.js +1 -0
- package/dist/runtime.cjs.js +1 -0
- package/dist/runtime.d.ts +9 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.esm.js +26 -0
- 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 -0
- package/dist/sortable.d.ts +4 -0
- package/dist/sortable.d.ts.map +1 -0
- package/dist/sortable.esm.js +2178 -0
- 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/theme.d.ts +1 -1
- package/dist/theme.d.ts.map +1 -1
- 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 +20 -1
|
@@ -0,0 +1,1067 @@
|
|
|
1
|
+
import { E as V } from "./ElementBase-909688f3.mjs";
|
|
2
|
+
import { r as q, c as S } from "./calendar-2c11b824.mjs";
|
|
3
|
+
import { r as E, n as g, i as y, s as $, b as R, p as L, a as B, f as F, l as M, c as T, d as H } from "./date-time-utils-bdceb7af.mjs";
|
|
4
|
+
import "./scroll-lock-9de6d328.mjs";
|
|
5
|
+
let U = 0;
|
|
6
|
+
const Y = `
|
|
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
|
+
`, K = `
|
|
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
|
+
`, W = `
|
|
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
|
+
`, N = `
|
|
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-shadow: none;
|
|
34
|
+
--ui-dp-z: 1600;
|
|
35
|
+
--ui-dp-gap: 12px;
|
|
36
|
+
--ui-dp-hit: 42px;
|
|
37
|
+
--ui-dp-field-bg: var(--ui-dp-bg);
|
|
38
|
+
--ui-dp-field-border: var(--ui-dp-border);
|
|
39
|
+
--ui-dp-field-focus: color-mix(in srgb, var(--ui-dp-accent) 72%, transparent);
|
|
40
|
+
--ui-dp-field-error: var(--ui-color-danger, #dc2626);
|
|
41
|
+
--ui-dp-focus-ring: color-mix(in srgb, var(--ui-dp-accent) 26%, transparent);
|
|
42
|
+
--ui-dp-sheet-backdrop: rgba(15, 23, 42, 0.52);
|
|
43
|
+
--ui-dp-sheet-bg: var(--ui-dp-bg);
|
|
44
|
+
--ui-dp-duration: 160ms;
|
|
45
|
+
--ui-dp-ease: cubic-bezier(0.2, 0.9, 0.24, 1);
|
|
46
|
+
color-scheme: light dark;
|
|
47
|
+
display: inline-grid;
|
|
48
|
+
inline-size: min(100%, var(--ui-width, 320px));
|
|
49
|
+
min-inline-size: min(220px, 100%);
|
|
50
|
+
color: var(--ui-dp-text);
|
|
51
|
+
font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
:host([shape="square"]) {
|
|
55
|
+
--ui-dp-radius: 6px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
:host([shape="soft"]) {
|
|
59
|
+
--ui-dp-radius: 16px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
:host([size="sm"]) {
|
|
63
|
+
--ui-dp-hit: 38px;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
:host([size="lg"]) {
|
|
67
|
+
--ui-dp-hit: 48px;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.root {
|
|
71
|
+
min-inline-size: 0;
|
|
72
|
+
display: grid;
|
|
73
|
+
gap: 8px;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.label {
|
|
77
|
+
font: 600 13px/1.35 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
78
|
+
color: var(--ui-dp-text);
|
|
79
|
+
display: inline-flex;
|
|
80
|
+
align-items: center;
|
|
81
|
+
gap: 6px;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.required {
|
|
85
|
+
color: var(--ui-dp-field-error);
|
|
86
|
+
font-size: 11px;
|
|
87
|
+
line-height: 1;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.field {
|
|
91
|
+
display: grid;
|
|
92
|
+
grid-template-columns: auto minmax(0, 1fr) auto auto;
|
|
93
|
+
align-items: center;
|
|
94
|
+
gap: 8px;
|
|
95
|
+
min-block-size: var(--ui-dp-hit);
|
|
96
|
+
padding: 0 10px 0 11px;
|
|
97
|
+
border: 1px solid var(--ui-dp-field-border);
|
|
98
|
+
border-radius: var(--ui-dp-radius);
|
|
99
|
+
background: var(--ui-dp-surface);
|
|
100
|
+
box-shadow: 0 1px 2px rgba(2, 6, 23, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.75);
|
|
101
|
+
transition: border-color var(--ui-dp-duration) var(--ui-dp-ease), box-shadow var(--ui-dp-duration) var(--ui-dp-ease), transform var(--ui-dp-duration) var(--ui-dp-ease);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.field[data-open="true"] {
|
|
105
|
+
border-color: var(--ui-dp-field-focus);
|
|
106
|
+
box-shadow: 0 0 0 3px var(--ui-dp-focus-ring), 0 10px 24px rgba(2, 6, 23, 0.12);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.field:focus-within {
|
|
110
|
+
border-color: var(--ui-dp-field-focus);
|
|
111
|
+
box-shadow: 0 0 0 3px var(--ui-dp-focus-ring), 0 4px 14px rgba(2, 6, 23, 0.09);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.field[data-invalid="true"] {
|
|
115
|
+
border-color: color-mix(in srgb, var(--ui-dp-field-error) 68%, transparent);
|
|
116
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-dp-field-error) 20%, transparent);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.field[data-state="success"]:not([data-invalid="true"]) {
|
|
120
|
+
border-color: color-mix(in srgb, var(--ui-dp-success) 56%, var(--ui-dp-border));
|
|
121
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-dp-success) 20%, transparent);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.field[data-state="loading"] {
|
|
125
|
+
pointer-events: none;
|
|
126
|
+
opacity: 0.92;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.icon {
|
|
130
|
+
display: inline-grid;
|
|
131
|
+
place-items: center;
|
|
132
|
+
color: color-mix(in srgb, var(--ui-dp-text) 68%, transparent);
|
|
133
|
+
inline-size: 20px;
|
|
134
|
+
block-size: 20px;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.icon-svg {
|
|
138
|
+
inline-size: 16px;
|
|
139
|
+
block-size: 16px;
|
|
140
|
+
pointer-events: none;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.input {
|
|
144
|
+
inline-size: 100%;
|
|
145
|
+
min-inline-size: 0;
|
|
146
|
+
border: 0;
|
|
147
|
+
background: transparent;
|
|
148
|
+
color: var(--ui-dp-text);
|
|
149
|
+
padding: 8px 0;
|
|
150
|
+
outline: none;
|
|
151
|
+
font: 500 14px/1.4 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
152
|
+
letter-spacing: 0.005em;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.input::placeholder {
|
|
156
|
+
color: color-mix(in srgb, var(--ui-dp-text) 44%, transparent);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.btn {
|
|
160
|
+
border: 0;
|
|
161
|
+
background: transparent;
|
|
162
|
+
color: color-mix(in srgb, var(--ui-dp-text) 74%, transparent);
|
|
163
|
+
inline-size: 28px;
|
|
164
|
+
block-size: 28px;
|
|
165
|
+
border-radius: 8px;
|
|
166
|
+
display: inline-grid;
|
|
167
|
+
place-items: center;
|
|
168
|
+
cursor: pointer;
|
|
169
|
+
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);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.btn:hover {
|
|
173
|
+
background: color-mix(in srgb, var(--ui-dp-text) 10%, transparent);
|
|
174
|
+
color: var(--ui-dp-text);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.btn:active {
|
|
178
|
+
transform: translateY(1px);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.btn:focus-visible {
|
|
182
|
+
outline: 2px solid color-mix(in srgb, var(--ui-dp-accent) 64%, transparent);
|
|
183
|
+
outline-offset: 1px;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.btn:disabled {
|
|
187
|
+
cursor: not-allowed;
|
|
188
|
+
opacity: 0.55;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.toggle-icon {
|
|
192
|
+
display: inline-grid;
|
|
193
|
+
place-items: center;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.spinner {
|
|
197
|
+
display: none;
|
|
198
|
+
inline-size: 14px;
|
|
199
|
+
block-size: 14px;
|
|
200
|
+
border-radius: 999px;
|
|
201
|
+
border: 2px solid color-mix(in srgb, var(--ui-dp-text) 20%, transparent);
|
|
202
|
+
border-top-color: color-mix(in srgb, var(--ui-dp-accent) 72%, transparent);
|
|
203
|
+
animation: ui-dp-spin 780ms linear infinite;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
:host([state="loading"]) .toggle-icon {
|
|
207
|
+
display: none;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
:host([state="loading"]) .spinner {
|
|
211
|
+
display: inline-block;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.btn[hidden] {
|
|
215
|
+
display: none;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.hint {
|
|
219
|
+
color: var(--ui-dp-muted);
|
|
220
|
+
font-size: 12px;
|
|
221
|
+
line-height: 1.4;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.error {
|
|
225
|
+
color: var(--ui-dp-field-error);
|
|
226
|
+
font-size: 12px;
|
|
227
|
+
line-height: 1.4;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.hint[hidden],
|
|
231
|
+
.error[hidden],
|
|
232
|
+
.label[hidden] {
|
|
233
|
+
display: none;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
:host([disabled]) .field {
|
|
237
|
+
opacity: 0.62;
|
|
238
|
+
pointer-events: none;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
:host([readonly]) .field {
|
|
242
|
+
background: color-mix(in srgb, var(--ui-dp-field-bg) 92%, var(--ui-color-surface-alt, #f8fafc));
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
:host([variant="contrast"]) {
|
|
246
|
+
--ui-dp-bg: #0f172a;
|
|
247
|
+
--ui-dp-border: #334155;
|
|
248
|
+
--ui-dp-text: #e2e8f0;
|
|
249
|
+
--ui-dp-muted: #93a4bd;
|
|
250
|
+
--ui-dp-accent: #93c5fd;
|
|
251
|
+
--ui-dp-field-bg: #0f172a;
|
|
252
|
+
--ui-dp-sheet-bg: #0f172a;
|
|
253
|
+
--ui-dp-sheet-backdrop: rgba(2, 6, 23, 0.74);
|
|
254
|
+
--ui-dp-surface: linear-gradient(180deg, color-mix(in srgb, #0f172a 86%, #1e293b), #0f172a);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
:host([state="success"]) {
|
|
258
|
+
--ui-dp-field-focus: color-mix(in srgb, var(--ui-dp-success) 72%, transparent);
|
|
259
|
+
--ui-dp-focus-ring: color-mix(in srgb, var(--ui-dp-success) 26%, transparent);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.inline-panel {
|
|
263
|
+
border: 1px solid var(--ui-dp-border);
|
|
264
|
+
border-radius: var(--ui-dp-panel-radius);
|
|
265
|
+
background: var(--ui-dp-surface);
|
|
266
|
+
box-shadow: var(--ui-dp-shadow);
|
|
267
|
+
inline-size: fit-content;
|
|
268
|
+
max-inline-size: 100%;
|
|
269
|
+
justify-self: start;
|
|
270
|
+
padding: 10px;
|
|
271
|
+
display: grid;
|
|
272
|
+
gap: var(--ui-dp-gap);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.inline-panel .footer {
|
|
276
|
+
gap: 6px;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.inline-panel .action {
|
|
280
|
+
min-block-size: 30px;
|
|
281
|
+
padding: 0 10px;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.inline-panel[data-bare="true"] {
|
|
285
|
+
border: 0;
|
|
286
|
+
border-radius: 0;
|
|
287
|
+
background: var(--ui-dp-bare-bg, var(--ui-dp-bg));
|
|
288
|
+
box-shadow: none;
|
|
289
|
+
padding: 0;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.inline-panel[hidden] {
|
|
293
|
+
display: none !important;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.footer {
|
|
297
|
+
display: flex;
|
|
298
|
+
justify-content: flex-end;
|
|
299
|
+
align-items: center;
|
|
300
|
+
gap: 8px;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.footer[hidden] {
|
|
304
|
+
display: none !important;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.action {
|
|
308
|
+
border: 1px solid color-mix(in srgb, var(--ui-dp-border) 85%, transparent);
|
|
309
|
+
background: color-mix(in srgb, var(--ui-dp-bg) 95%, transparent);
|
|
310
|
+
color: var(--ui-dp-text);
|
|
311
|
+
min-block-size: 32px;
|
|
312
|
+
border-radius: 8px;
|
|
313
|
+
padding: 0 12px;
|
|
314
|
+
font: 600 12px/1 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
315
|
+
cursor: pointer;
|
|
316
|
+
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);
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.action:hover {
|
|
320
|
+
border-color: color-mix(in srgb, var(--ui-dp-accent) 38%, var(--ui-dp-border));
|
|
321
|
+
background: color-mix(in srgb, var(--ui-dp-accent) 10%, transparent);
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.action:active {
|
|
325
|
+
transform: translateY(1px);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
.action:focus-visible {
|
|
329
|
+
outline: 2px solid color-mix(in srgb, var(--ui-dp-accent) 64%, transparent);
|
|
330
|
+
outline-offset: 1px;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.action[data-tone="primary"] {
|
|
334
|
+
border-color: color-mix(in srgb, var(--ui-dp-accent) 60%, transparent);
|
|
335
|
+
background: color-mix(in srgb, var(--ui-dp-accent) 20%, transparent);
|
|
336
|
+
color: color-mix(in srgb, var(--ui-dp-text) 94%, transparent);
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
.action:disabled {
|
|
340
|
+
cursor: not-allowed;
|
|
341
|
+
opacity: 0.55;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
@media (max-width: 640px) {
|
|
345
|
+
:host {
|
|
346
|
+
inline-size: min(100%, var(--ui-width, 100%));
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
.field {
|
|
350
|
+
min-block-size: max(var(--ui-dp-hit), 40px);
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
@media (prefers-reduced-motion: reduce) {
|
|
355
|
+
.field,
|
|
356
|
+
.btn,
|
|
357
|
+
.action,
|
|
358
|
+
.spinner {
|
|
359
|
+
transition: none !important;
|
|
360
|
+
animation: none !important;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
@media (forced-colors: active) {
|
|
365
|
+
.field,
|
|
366
|
+
.inline-panel,
|
|
367
|
+
.action {
|
|
368
|
+
forced-color-adjust: none;
|
|
369
|
+
background: Canvas;
|
|
370
|
+
color: CanvasText;
|
|
371
|
+
border-color: CanvasText;
|
|
372
|
+
}
|
|
373
|
+
.field:focus-within,
|
|
374
|
+
.action:focus-visible,
|
|
375
|
+
.btn:focus-visible {
|
|
376
|
+
outline-color: Highlight;
|
|
377
|
+
}
|
|
378
|
+
.spinner {
|
|
379
|
+
border-color: CanvasText;
|
|
380
|
+
border-top-color: CanvasText;
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
@keyframes ui-dp-spin {
|
|
385
|
+
to {
|
|
386
|
+
transform: rotate(360deg);
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
`, j = `
|
|
390
|
+
.overlay {
|
|
391
|
+
position: fixed;
|
|
392
|
+
z-index: var(--ui-dp-z, 1600);
|
|
393
|
+
pointer-events: none;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
.panel {
|
|
397
|
+
pointer-events: auto;
|
|
398
|
+
border: 1px solid var(--ui-dp-border, #cbd5e1);
|
|
399
|
+
border-radius: var(--ui-dp-panel-radius, 14px);
|
|
400
|
+
background: var(--ui-dp-surface, #fff);
|
|
401
|
+
color: var(--ui-dp-text, #0f172a);
|
|
402
|
+
box-shadow: var(--ui-dp-shadow);
|
|
403
|
+
padding: 10px;
|
|
404
|
+
display: grid;
|
|
405
|
+
gap: var(--ui-dp-gap, 12px);
|
|
406
|
+
inline-size: min(var(--ui-dp-panel-width, 20rem), calc(100vw - 16px));
|
|
407
|
+
max-inline-size: calc(100vw - 16px);
|
|
408
|
+
transform-origin: top;
|
|
409
|
+
animation: ui-dp-pop-in var(--ui-dp-duration, 160ms) var(--ui-dp-ease, cubic-bezier(0.2, 0.9, 0.24, 1));
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
.panel[data-bare="true"],
|
|
413
|
+
.sheet[data-bare="true"] {
|
|
414
|
+
border: 0;
|
|
415
|
+
border-radius: 0;
|
|
416
|
+
background: var(--ui-dp-bare-bg, var(--ui-dp-bg));
|
|
417
|
+
box-shadow: none;
|
|
418
|
+
padding: 0;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
.sheet-wrap {
|
|
422
|
+
position: fixed;
|
|
423
|
+
inset: 0;
|
|
424
|
+
display: grid;
|
|
425
|
+
align-items: end;
|
|
426
|
+
z-index: var(--ui-dp-z, 1600);
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
.sheet-backdrop {
|
|
430
|
+
position: absolute;
|
|
431
|
+
inset: 0;
|
|
432
|
+
background: var(--ui-dp-sheet-backdrop, rgba(15, 23, 42, 0.52));
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
.sheet {
|
|
436
|
+
position: relative;
|
|
437
|
+
pointer-events: auto;
|
|
438
|
+
background: var(--ui-dp-sheet-bg, #fff);
|
|
439
|
+
color: var(--ui-dp-text, #0f172a);
|
|
440
|
+
border-radius: 16px 16px 0 0;
|
|
441
|
+
border: 1px solid color-mix(in srgb, var(--ui-dp-border, #cbd5e1) 84%, transparent);
|
|
442
|
+
box-shadow: 0 -12px 30px rgba(2, 6, 23, 0.2);
|
|
443
|
+
padding: 12px;
|
|
444
|
+
display: grid;
|
|
445
|
+
gap: 10px;
|
|
446
|
+
max-block-size: min(82vh, 620px);
|
|
447
|
+
overflow: auto;
|
|
448
|
+
animation: ui-dp-sheet-up var(--ui-dp-duration, 160ms) var(--ui-dp-ease, cubic-bezier(0.2, 0.9, 0.24, 1));
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
.header {
|
|
452
|
+
display: flex;
|
|
453
|
+
justify-content: space-between;
|
|
454
|
+
align-items: center;
|
|
455
|
+
gap: 8px;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
.title {
|
|
459
|
+
margin: 0;
|
|
460
|
+
font: 700 14px/1.3 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
461
|
+
color: var(--ui-dp-text, #0f172a);
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
.footer {
|
|
465
|
+
display: flex;
|
|
466
|
+
justify-content: flex-end;
|
|
467
|
+
align-items: center;
|
|
468
|
+
gap: 8px;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
.footer[hidden] {
|
|
472
|
+
display: none !important;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
.action {
|
|
476
|
+
border: 1px solid color-mix(in srgb, var(--ui-dp-border, #cbd5e1) 85%, transparent);
|
|
477
|
+
background: color-mix(in srgb, var(--ui-dp-bg, #fff) 94%, transparent);
|
|
478
|
+
color: var(--ui-dp-text, #0f172a);
|
|
479
|
+
min-block-size: 32px;
|
|
480
|
+
border-radius: 8px;
|
|
481
|
+
padding: 0 12px;
|
|
482
|
+
font: 600 12px/1 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
483
|
+
cursor: pointer;
|
|
484
|
+
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));
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
.action:hover {
|
|
488
|
+
border-color: color-mix(in srgb, var(--ui-dp-accent, #2563eb) 38%, var(--ui-dp-border, #cbd5e1));
|
|
489
|
+
background: color-mix(in srgb, var(--ui-dp-accent, #2563eb) 10%, transparent);
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
.action:focus-visible {
|
|
493
|
+
outline: 2px solid color-mix(in srgb, var(--ui-dp-accent, #2563eb) 64%, transparent);
|
|
494
|
+
outline-offset: 1px;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
.action[data-tone="primary"] {
|
|
498
|
+
border-color: color-mix(in srgb, var(--ui-dp-accent, #2563eb) 60%, transparent);
|
|
499
|
+
background: color-mix(in srgb, var(--ui-dp-accent, #2563eb) 18%, transparent);
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
@media (prefers-reduced-motion: reduce) {
|
|
503
|
+
.panel,
|
|
504
|
+
.sheet,
|
|
505
|
+
.action {
|
|
506
|
+
animation: none !important;
|
|
507
|
+
transition: none !important;
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
@keyframes ui-dp-pop-in {
|
|
512
|
+
from {
|
|
513
|
+
opacity: 0;
|
|
514
|
+
transform: translateY(6px) scale(0.985);
|
|
515
|
+
}
|
|
516
|
+
to {
|
|
517
|
+
opacity: 1;
|
|
518
|
+
transform: translateY(0) scale(1);
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
@keyframes ui-dp-sheet-up {
|
|
523
|
+
from {
|
|
524
|
+
opacity: 0.82;
|
|
525
|
+
transform: translateY(12px);
|
|
526
|
+
}
|
|
527
|
+
to {
|
|
528
|
+
opacity: 1;
|
|
529
|
+
transform: translateY(0);
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
`;
|
|
533
|
+
function v(C) {
|
|
534
|
+
return C.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
535
|
+
}
|
|
536
|
+
class Z extends V {
|
|
537
|
+
constructor() {
|
|
538
|
+
super(...arguments), this._value = null, this._pendingValue = null, this._draftInput = "", this._inlineError = "", this._open = !1, this._syncing = !1, this._overlay = null, this._releaseScrollLock = null, this._lastOpenSource = "api", this._restoreFocusEl = null, this._isInitialized = !1, this._hasView = !1, this._overlayMode = null, this._uid = `ui-dp-${++U}`, this._inputId = `${this._uid}-input`, 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 = E(() => this._positionOverlay()), this._onRootClickBound = (e) => this._onRootClick(e), this._onRootInputBound = (e) => this._onRootInput(e), this._onRootBlurBound = (e) => this._onRootBlur(e), this._onRootKeyDownBound = (e) => this._onRootKeyDown(e), this._onDocumentPointerDownBound = (e) => this._onDocumentPointerDown(e), this._onDocumentKeyDownBound = (e) => this._onDocumentKeyDown(e), this._onWindowResizeBound = () => this._schedulePosition.run(), this._onWindowScrollBound = () => this._schedulePosition.run(), this._onOverlayClickBound = (e) => this._onOverlayClick(e), this._onOverlaySelectBound = (e) => this._onCalendarSelect(e);
|
|
539
|
+
}
|
|
540
|
+
static get observedAttributes() {
|
|
541
|
+
return [
|
|
542
|
+
"open",
|
|
543
|
+
"default-open",
|
|
544
|
+
"value",
|
|
545
|
+
"default-value",
|
|
546
|
+
"min",
|
|
547
|
+
"max",
|
|
548
|
+
"locale",
|
|
549
|
+
"translations",
|
|
550
|
+
"week-start",
|
|
551
|
+
"size",
|
|
552
|
+
"shape",
|
|
553
|
+
"bare",
|
|
554
|
+
"variant",
|
|
555
|
+
"state",
|
|
556
|
+
"placeholder",
|
|
557
|
+
"label",
|
|
558
|
+
"hint",
|
|
559
|
+
"error",
|
|
560
|
+
"clearable",
|
|
561
|
+
"allow-input",
|
|
562
|
+
"close-on-select",
|
|
563
|
+
"outside-click",
|
|
564
|
+
"disabled",
|
|
565
|
+
"readonly",
|
|
566
|
+
"required",
|
|
567
|
+
"name",
|
|
568
|
+
"mode",
|
|
569
|
+
"events",
|
|
570
|
+
"events-max",
|
|
571
|
+
"events-display",
|
|
572
|
+
"format",
|
|
573
|
+
"display-format",
|
|
574
|
+
"show-footer"
|
|
575
|
+
];
|
|
576
|
+
}
|
|
577
|
+
connectedCallback() {
|
|
578
|
+
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) {
|
|
579
|
+
const e = this._clampToBounds(
|
|
580
|
+
g(this.getAttribute("value")) || g(this.getAttribute("default-value"))
|
|
581
|
+
);
|
|
582
|
+
this._value = e, this._pendingValue = e, this._draftInput = this._formatDisplay(e), this._open = this.hasAttribute("open") || y(this.getAttribute("default-open")), this._isInitialized = !0;
|
|
583
|
+
}
|
|
584
|
+
this._open && !this._isInlineMode() && this._ensureOverlay(), this._isInlineMode() && this._scheduleInlineCalendarSync();
|
|
585
|
+
}
|
|
586
|
+
disconnectedCallback() {
|
|
587
|
+
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();
|
|
588
|
+
}
|
|
589
|
+
attributeChangedCallback(e, t, i) {
|
|
590
|
+
if (t !== i) {
|
|
591
|
+
if (e === "value" && !this._syncing && (this._value = this._clampToBounds(g(i)), this._pendingValue = this._value, this._draftInput = this._formatDisplay(this._value), this._inlineError = "", this._syncValueAttribute(this._value)), e === "open" && !this._syncing && (this._open = this.hasAttribute("open"), this._syncOverlay(this._open ? "api" : "outside")), e === "mode" && this._syncOverlay("attribute"), e === "disabled" && this.hasAttribute("disabled") && this._setOpen(!1, "outside"), (e === "min" || e === "max") && !this._syncing) {
|
|
592
|
+
const r = this._clampToBounds(this._value), n = this._clampToBounds(this._pendingValue);
|
|
593
|
+
this._value = r, this._pendingValue = n, this._draftInput = this._formatDisplay(this._allowInput() ? n : r), this._syncValueAttribute(r);
|
|
594
|
+
}
|
|
595
|
+
if (e === "state" && this._state() === "loading" && this._setOpen(!1, "outside"), !!this.isConnected) {
|
|
596
|
+
if (!this._hasView) {
|
|
597
|
+
this.requestRender();
|
|
598
|
+
return;
|
|
599
|
+
}
|
|
600
|
+
this._updateHostState();
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
_isInlineMode() {
|
|
605
|
+
return (this.getAttribute("mode") || "popover") === "inline";
|
|
606
|
+
}
|
|
607
|
+
_isMobileSheet() {
|
|
608
|
+
return $(this.getAttribute("mode"));
|
|
609
|
+
}
|
|
610
|
+
_isDisabled() {
|
|
611
|
+
return this.hasAttribute("disabled");
|
|
612
|
+
}
|
|
613
|
+
_isReadonly() {
|
|
614
|
+
return this.hasAttribute("readonly");
|
|
615
|
+
}
|
|
616
|
+
_allowInput() {
|
|
617
|
+
return y(this.getAttribute("allow-input"), !0);
|
|
618
|
+
}
|
|
619
|
+
_clearable() {
|
|
620
|
+
return y(this.getAttribute("clearable"), !0);
|
|
621
|
+
}
|
|
622
|
+
_closeOnSelect() {
|
|
623
|
+
return y(this.getAttribute("close-on-select"), !0);
|
|
624
|
+
}
|
|
625
|
+
_showFooter() {
|
|
626
|
+
return y(this.getAttribute("show-footer"), !0);
|
|
627
|
+
}
|
|
628
|
+
_isBare() {
|
|
629
|
+
return y(this.getAttribute("bare"), !1);
|
|
630
|
+
}
|
|
631
|
+
_locale() {
|
|
632
|
+
return R(this.getAttribute("locale"));
|
|
633
|
+
}
|
|
634
|
+
_translations() {
|
|
635
|
+
return q(
|
|
636
|
+
this.getAttribute("locale"),
|
|
637
|
+
this.getAttribute("translations")
|
|
638
|
+
);
|
|
639
|
+
}
|
|
640
|
+
_formatMode() {
|
|
641
|
+
const e = (this.getAttribute("format") || "locale").trim();
|
|
642
|
+
return e === "iso" || e === "custom" ? e : "locale";
|
|
643
|
+
}
|
|
644
|
+
_displayFormat() {
|
|
645
|
+
return (this.getAttribute("display-format") || "").trim() || null;
|
|
646
|
+
}
|
|
647
|
+
_placeholder() {
|
|
648
|
+
const e = this._translations(), t = this.getAttribute("placeholder");
|
|
649
|
+
return t || (this._formatMode() === "iso" ? "YYYY-MM-DD" : e.selectDate);
|
|
650
|
+
}
|
|
651
|
+
_todayIso() {
|
|
652
|
+
const e = /* @__PURE__ */ new Date(), t = String(e.getMonth() + 1).padStart(2, "0"), i = String(e.getDate()).padStart(2, "0");
|
|
653
|
+
return `${e.getFullYear()}-${t}-${i}`;
|
|
654
|
+
}
|
|
655
|
+
_state() {
|
|
656
|
+
const e = (this.getAttribute("state") || "").trim().toLowerCase();
|
|
657
|
+
return e === "loading" || e === "success" || e === "error" ? e : "idle";
|
|
658
|
+
}
|
|
659
|
+
_isInteractionBlocked() {
|
|
660
|
+
return this._isDisabled() || this._state() === "loading";
|
|
661
|
+
}
|
|
662
|
+
_minIso() {
|
|
663
|
+
return L(this.getAttribute("min"));
|
|
664
|
+
}
|
|
665
|
+
_maxIso() {
|
|
666
|
+
return L(this.getAttribute("max"));
|
|
667
|
+
}
|
|
668
|
+
_resolvedBounds() {
|
|
669
|
+
let e = this._minIso(), t = this._maxIso();
|
|
670
|
+
if (e && t && S(e, t) > 0) {
|
|
671
|
+
const i = e;
|
|
672
|
+
e = t, t = i;
|
|
673
|
+
}
|
|
674
|
+
return { min: e, max: t };
|
|
675
|
+
}
|
|
676
|
+
_clampToBounds(e) {
|
|
677
|
+
if (!e)
|
|
678
|
+
return null;
|
|
679
|
+
const { min: t, max: i } = this._resolvedBounds();
|
|
680
|
+
return B(e, t, i);
|
|
681
|
+
}
|
|
682
|
+
_isWithinBounds(e) {
|
|
683
|
+
const { min: t, max: i } = this._resolvedBounds();
|
|
684
|
+
return !(t && S(e, t) < 0 || i && S(e, i) > 0);
|
|
685
|
+
}
|
|
686
|
+
_formatDisplay(e) {
|
|
687
|
+
return F(e, this._locale(), this._formatMode(), this._displayFormat());
|
|
688
|
+
}
|
|
689
|
+
_syncValueAttribute(e) {
|
|
690
|
+
this._syncing = !0;
|
|
691
|
+
try {
|
|
692
|
+
e ? this.getAttribute("value") !== e && this.setAttribute("value", e) : this.hasAttribute("value") && this.removeAttribute("value");
|
|
693
|
+
} finally {
|
|
694
|
+
this._syncing = !1;
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
_syncOpenAttribute(e) {
|
|
698
|
+
this._syncing = !0;
|
|
699
|
+
try {
|
|
700
|
+
e ? this.hasAttribute("open") || this.setAttribute("open", "") : this.hasAttribute("open") && this.removeAttribute("open");
|
|
701
|
+
} finally {
|
|
702
|
+
this._syncing = !1;
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
_emitInput(e) {
|
|
706
|
+
const t = {
|
|
707
|
+
mode: "single",
|
|
708
|
+
value: this._pendingValue,
|
|
709
|
+
displayValue: this._formatDisplay(this._pendingValue),
|
|
710
|
+
source: e
|
|
711
|
+
};
|
|
712
|
+
this.dispatchEvent(new CustomEvent("input", { detail: t, bubbles: !0, composed: !0 }));
|
|
713
|
+
}
|
|
714
|
+
_emitChange(e) {
|
|
715
|
+
const t = {
|
|
716
|
+
mode: "single",
|
|
717
|
+
value: this._value,
|
|
718
|
+
displayValue: this._formatDisplay(this._value),
|
|
719
|
+
source: e
|
|
720
|
+
};
|
|
721
|
+
this.dispatchEvent(new CustomEvent("change", { detail: t, bubbles: !0, composed: !0 }));
|
|
722
|
+
}
|
|
723
|
+
_emitInvalid(e, t) {
|
|
724
|
+
this.dispatchEvent(
|
|
725
|
+
new CustomEvent("invalid", {
|
|
726
|
+
detail: { raw: e, reason: t },
|
|
727
|
+
bubbles: !0,
|
|
728
|
+
composed: !0
|
|
729
|
+
})
|
|
730
|
+
);
|
|
731
|
+
}
|
|
732
|
+
_setOpen(e, t) {
|
|
733
|
+
e && this._isInteractionBlocked() || this._open !== e && (this._open = e, this._overlayFocusedOnOpen = !1, this._lastOpenSource = t, this._syncOpenAttribute(e), this._syncOverlay(t), this._updateHostState(), this.dispatchEvent(new CustomEvent(e ? "open" : "close", { bubbles: !0, composed: !0 })));
|
|
734
|
+
}
|
|
735
|
+
_syncOverlay(e) {
|
|
736
|
+
if (this._isInlineMode()) {
|
|
737
|
+
this._destroyOverlay();
|
|
738
|
+
return;
|
|
739
|
+
}
|
|
740
|
+
if (this._open)
|
|
741
|
+
this._ensureOverlay(), this._syncOverlayState();
|
|
742
|
+
else if (this._destroyOverlay(), e !== "outside") {
|
|
743
|
+
const t = this._restoreFocusEl || this.root.querySelector(".input");
|
|
744
|
+
if (this._restoreFocusEl = null, t && t.isConnected)
|
|
745
|
+
try {
|
|
746
|
+
t.focus();
|
|
747
|
+
} catch {
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
_ensureOverlay() {
|
|
752
|
+
if (this._overlay || typeof document > "u")
|
|
753
|
+
return;
|
|
754
|
+
const e = document.createElement("div");
|
|
755
|
+
e.className = "ui-date-picker-overlay-host", e.style.position = "fixed", e.style.left = "0", e.style.top = "0", e.style.zIndex = "1100", e.style.pointerEvents = "none", e.addEventListener("click", this._onOverlayClickBound), e.addEventListener("select", this._onOverlaySelectBound), e.addEventListener("change", this._onOverlaySelectBound), document.body.appendChild(e), this._overlay = e, 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 = M());
|
|
756
|
+
}
|
|
757
|
+
_destroyOverlay() {
|
|
758
|
+
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._onOverlaySelectBound), this._overlay.removeEventListener("change", this._onOverlaySelectBound), this._overlay.parentElement && this._overlay.parentElement.removeChild(this._overlay), this._overlay = null, this._overlayMode = null, this._releaseScrollLock && (this._releaseScrollLock(), this._releaseScrollLock = null));
|
|
759
|
+
}
|
|
760
|
+
_positionOverlay() {
|
|
761
|
+
if (!this._overlay || !this._open || this._isMobileSheet())
|
|
762
|
+
return;
|
|
763
|
+
const e = this.root.querySelector(".field"), t = this._overlay.querySelector(".panel");
|
|
764
|
+
if (!e || !t)
|
|
765
|
+
return;
|
|
766
|
+
const i = e.getBoundingClientRect();
|
|
767
|
+
t.style.setProperty("--ui-dp-panel-width", `${Math.round(i.width)}px`);
|
|
768
|
+
const r = t.getBoundingClientRect(), n = T(i, r);
|
|
769
|
+
t.style.position = "absolute", t.style.top = `${Math.round(n.top)}px`, t.style.left = `${Math.round(n.left)}px`, t.setAttribute("data-placement", n.placement);
|
|
770
|
+
}
|
|
771
|
+
_parseAndValidate(e) {
|
|
772
|
+
return H(e, this._locale());
|
|
773
|
+
}
|
|
774
|
+
_commit(e, t) {
|
|
775
|
+
if (this._isReadonly() || this._isInteractionBlocked())
|
|
776
|
+
return;
|
|
777
|
+
const i = this._clampToBounds(e);
|
|
778
|
+
this._value = i, this._pendingValue = i, this._draftInput = this._formatDisplay(i), this._inlineError = "", this._syncValueAttribute(i), this._emitInput(t), this._emitChange(t), this._updateHostState();
|
|
779
|
+
}
|
|
780
|
+
_renderPanelInner(e) {
|
|
781
|
+
const t = this._translations(), i = (this.getAttribute("label") || "").trim(), r = !!i || e, n = !this._closeOnSelect() || e, a = e ? "sheet" : "panel", o = e ? "true" : "false";
|
|
782
|
+
return `
|
|
783
|
+
<style>${j}</style>
|
|
784
|
+
${e ? '<div class="sheet-backdrop" data-action="backdrop"></div>' : ""}
|
|
785
|
+
<section class="${a}" id="${this._panelId}" part="${e ? "sheet" : "popover"}" role="dialog" aria-modal="${o}" aria-labelledby="${this._panelTitleId}" aria-label="${v(t.datePickerPanel)}">
|
|
786
|
+
<header class="header" part="header" ${r ? "" : "hidden"}>
|
|
787
|
+
<p class="title" id="${this._panelTitleId}" ${i ? "" : "hidden"}>${v(i)}</p>
|
|
788
|
+
${e ? `<button type="button" class="action" data-action="cancel">${v(t.cancel)}</button>` : ""}
|
|
789
|
+
</header>
|
|
790
|
+
<ui-calendar class="dp-calendar" part="calendar"></ui-calendar>
|
|
791
|
+
<footer class="footer" part="footer">
|
|
792
|
+
<button type="button" class="action" data-action="today" part="presets">${v(t.today)}</button>
|
|
793
|
+
<button type="button" class="action" data-action="clear" part="clear">${v(t.clear)}</button>
|
|
794
|
+
${n ? `<button type="button" class="action" data-tone="primary" data-action="apply" part="apply">${v(t.apply)}</button>` : ""}
|
|
795
|
+
</footer>
|
|
796
|
+
</section>
|
|
797
|
+
`;
|
|
798
|
+
}
|
|
799
|
+
_syncCalendarElement(e) {
|
|
800
|
+
const t = (s, u) => {
|
|
801
|
+
if (u == null || u === "") {
|
|
802
|
+
e.hasAttribute(s) && e.removeAttribute(s);
|
|
803
|
+
return;
|
|
804
|
+
}
|
|
805
|
+
e.getAttribute(s) !== u && e.setAttribute(s, u);
|
|
806
|
+
}, i = (s, u) => {
|
|
807
|
+
u ? e.hasAttribute(s) || e.setAttribute(s, "") : e.hasAttribute(s) && e.removeAttribute(s);
|
|
808
|
+
}, { min: r, max: n } = this._resolvedBounds();
|
|
809
|
+
t("selection", "single"), t("value", this._pendingValue), t("min", r), t("max", n), t("locale", this.getAttribute("locale")), t("translations", this.getAttribute("translations")), t("week-start", this.getAttribute("week-start"));
|
|
810
|
+
const o = this.getAttribute("size") || "sm";
|
|
811
|
+
t("size", o === "lg" ? "md" : "sm"), t("variant", this.getAttribute("variant")), t("outside-click", this.getAttribute("outside-click")), t("events", this.getAttribute("events")), t("events-max", this.getAttribute("events-max")), t("events-display", this.getAttribute("events-display"));
|
|
812
|
+
const d = e.classList.contains("inline-calendar");
|
|
813
|
+
o === "lg" ? (e.style.setProperty("--ui-calendar-day-height", "1.95em"), e.style.setProperty("--ui-calendar-day-padding-block", "0.2em"), e.style.setProperty("--ui-calendar-day-padding-inline", "0.26em"), e.style.setProperty("--ui-calendar-gap", "0.42em"), e.style.setProperty("--ui-calendar-day-font-size", "0.78em"), e.style.setProperty("--ui-calendar-weekday-font-size", "0.7em"), e.style.setProperty("--ui-calendar-title-font-size", "0.88em")) : (e.style.setProperty("--ui-calendar-day-height", "2.4em"), e.style.setProperty("--ui-calendar-day-padding-block", "0.14em"), e.style.setProperty("--ui-calendar-day-padding-inline", "0.22em"), e.style.setProperty("--ui-calendar-gap", "0.34em"), e.style.setProperty("--ui-calendar-day-font-size", "0.72em"), e.style.setProperty("--ui-calendar-weekday-font-size", "0.64em"), e.style.setProperty("--ui-calendar-title-font-size", "0.8em")), d ? (e.style.setProperty("--ui-calendar-day-height", o === "lg" ? "2.1em" : "1.92em"), e.style.setProperty("--ui-calendar-day-padding-block", "0.08em"), e.style.setProperty("--ui-calendar-day-padding-inline", "0.14em"), e.style.setProperty("--ui-calendar-frame-padding", "0.28em"), e.style.setProperty("--ui-calendar-week-gap", "0.16em"), e.style.setProperty("--ui-calendar-control-height", "1.64em"), e.style.setProperty("--ui-calendar-gap", "0.2em"), e.style.setProperty("--ui-calendar-day-font-size", o === "lg" ? "0.76em" : "0.68em"), e.style.setProperty("--ui-calendar-weekday-font-size", o === "lg" ? "0.66em" : "0.58em"), e.style.setProperty("--ui-calendar-title-font-size", o === "lg" ? "0.84em" : "0.76em")) : (e.style.removeProperty("--ui-calendar-frame-padding"), e.style.removeProperty("--ui-calendar-week-gap"), e.style.removeProperty("--ui-calendar-control-height")), i("readonly", this._isReadonly()), i("disabled", this._isInteractionBlocked()), i("bare", this._isBare()), t("tabindex", "-1"), t("aria-label", this.getAttribute("label") || this._translations().selectDate);
|
|
814
|
+
}
|
|
815
|
+
_ensureOverlayContent(e) {
|
|
816
|
+
if (!this._overlay)
|
|
817
|
+
return;
|
|
818
|
+
const t = e ? "sheet" : "popover";
|
|
819
|
+
this._overlayMode === t && this._overlay.querySelector(".dp-calendar") || (this._overlayMode = t, this._overlay.innerHTML = e ? `<div class="sheet-wrap">${this._renderPanelInner(!0)}</div>` : `<div class="overlay">${this._renderPanelInner(!1)}</div>`);
|
|
820
|
+
}
|
|
821
|
+
_syncOverlayState() {
|
|
822
|
+
if (!this._overlay)
|
|
823
|
+
return;
|
|
824
|
+
const e = this._isMobileSheet();
|
|
825
|
+
e && !this._releaseScrollLock ? this._releaseScrollLock = M() : !e && this._releaseScrollLock && (this._releaseScrollLock(), this._releaseScrollLock = null), this._ensureOverlayContent(e);
|
|
826
|
+
const t = this._overlay.querySelector(".title"), i = this._overlay.querySelector(".panel, .sheet"), r = this._overlay.querySelector(".header"), n = this._overlay.querySelector(".footer"), a = this._translations();
|
|
827
|
+
if (i && (i.dataset.bare = this._isBare() ? "true" : "false"), n && (n.hidden = !this._showFooter()), r && (r.hidden = !(this.getAttribute("label") || "").trim() && !e), t) {
|
|
828
|
+
const c = (this.getAttribute("label") || "").trim();
|
|
829
|
+
t.textContent = c, t.hidden = !c;
|
|
830
|
+
}
|
|
831
|
+
const o = this._overlay.querySelector('[data-action="today"]');
|
|
832
|
+
o && (o.textContent = a.today);
|
|
833
|
+
const d = this._overlay.querySelector('[data-action="clear"]');
|
|
834
|
+
d && (d.textContent = a.clear);
|
|
835
|
+
const s = this._overlay.querySelector('[data-action="cancel"]');
|
|
836
|
+
s && (s.textContent = a.cancel);
|
|
837
|
+
const u = this._overlay.querySelector('[data-action="apply"]');
|
|
838
|
+
u && (u.textContent = a.apply);
|
|
839
|
+
const m = this._overlay.querySelector('[data-action="apply"]');
|
|
840
|
+
m && (m.hidden = this._closeOnSelect() && !e);
|
|
841
|
+
const h = this._overlay.querySelectorAll(".action"), x = this._isInteractionBlocked();
|
|
842
|
+
h.forEach((c) => {
|
|
843
|
+
c.disabled = x;
|
|
844
|
+
});
|
|
845
|
+
const f = this._overlay.querySelector(".dp-calendar");
|
|
846
|
+
f && (this._syncCalendarElement(f), this._open && !this._overlayFocusedOnOpen && this._lastOpenSource !== "attribute" && (this._overlayFocusedOnOpen = !0, requestAnimationFrame(() => {
|
|
847
|
+
if (!(!this._open || !this._overlay))
|
|
848
|
+
try {
|
|
849
|
+
f.focus({ preventScroll: !0 });
|
|
850
|
+
} catch {
|
|
851
|
+
}
|
|
852
|
+
}))), e || this._schedulePosition.run();
|
|
853
|
+
}
|
|
854
|
+
_renderOverlay() {
|
|
855
|
+
this._syncOverlayState();
|
|
856
|
+
}
|
|
857
|
+
_renderInlineCalendar() {
|
|
858
|
+
const e = this.root.querySelector(".inline-calendar");
|
|
859
|
+
e && this._syncCalendarElement(e);
|
|
860
|
+
}
|
|
861
|
+
_scheduleInlineCalendarSync() {
|
|
862
|
+
const e = () => {
|
|
863
|
+
!this.isConnected || !this._hasView || !this._isInlineMode() || this._renderInlineCalendar();
|
|
864
|
+
};
|
|
865
|
+
e(), this._inlineCalendarFramePending || (this._inlineCalendarFramePending = !0, requestAnimationFrame(() => {
|
|
866
|
+
this._inlineCalendarFramePending = !1, e();
|
|
867
|
+
})), !this._inlineCalendarUpgradePending && typeof customElements < "u" && !customElements.get("ui-calendar") && (this._inlineCalendarUpgradePending = !0, customElements.whenDefined("ui-calendar").then(() => {
|
|
868
|
+
this._inlineCalendarUpgradePending = !1, requestAnimationFrame(() => {
|
|
869
|
+
e();
|
|
870
|
+
});
|
|
871
|
+
}));
|
|
872
|
+
}
|
|
873
|
+
_handleDraftCommit(e) {
|
|
874
|
+
const t = this._draftInput.trim();
|
|
875
|
+
if (!t) {
|
|
876
|
+
this._commit(null, e);
|
|
877
|
+
return;
|
|
878
|
+
}
|
|
879
|
+
const i = this._parseAndValidate(t);
|
|
880
|
+
if (!i) {
|
|
881
|
+
this._inlineError = this.getAttribute("error") || this._translations().invalidDate, this._emitInvalid(t, "parse"), this._updateHostState();
|
|
882
|
+
return;
|
|
883
|
+
}
|
|
884
|
+
if (!this._isWithinBounds(i)) {
|
|
885
|
+
this._inlineError = this.getAttribute("error") || this._translations().dateOutOfRange, this._emitInvalid(t, "range"), this._updateHostState();
|
|
886
|
+
return;
|
|
887
|
+
}
|
|
888
|
+
this._pendingValue = i, this._commit(i, e);
|
|
889
|
+
}
|
|
890
|
+
_onRootClick(e) {
|
|
891
|
+
const t = e.target;
|
|
892
|
+
if (!t)
|
|
893
|
+
return;
|
|
894
|
+
const i = t.closest("[data-action]"), r = i == null ? void 0 : i.getAttribute("data-action");
|
|
895
|
+
if (!(!r || this._isInteractionBlocked())) {
|
|
896
|
+
if (r === "toggle") {
|
|
897
|
+
this._restoreFocusEl = i, this._setOpen(!this._open, "api");
|
|
898
|
+
return;
|
|
899
|
+
}
|
|
900
|
+
if (r === "clear") {
|
|
901
|
+
e.preventDefault(), this._commit(null, "clear");
|
|
902
|
+
return;
|
|
903
|
+
}
|
|
904
|
+
if (r === "today") {
|
|
905
|
+
e.preventDefault();
|
|
906
|
+
const n = this._todayIso(), a = this._parseAndValidate(n);
|
|
907
|
+
if (!a)
|
|
908
|
+
return;
|
|
909
|
+
const { min: o, max: d } = this._resolvedBounds(), s = B(a, o, d);
|
|
910
|
+
if (!s)
|
|
911
|
+
return;
|
|
912
|
+
this._pendingValue = s, this._emitInput("today"), this._closeOnSelect() && !this._isInlineMode() ? (this._commit(s, "today"), this._setOpen(!1, "today")) : this._updateHostState();
|
|
913
|
+
return;
|
|
914
|
+
}
|
|
915
|
+
if (r === "apply") {
|
|
916
|
+
e.preventDefault(), this._commit(this._pendingValue, "apply"), this._isInlineMode() || this._setOpen(!1, "apply");
|
|
917
|
+
return;
|
|
918
|
+
}
|
|
919
|
+
if (r === "cancel") {
|
|
920
|
+
e.preventDefault(), this._pendingValue = this._value, this._draftInput = this._formatDisplay(this._value), this._inlineError = "", this._isInlineMode() || this._setOpen(!1, "outside"), this._updateHostState();
|
|
921
|
+
return;
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
}
|
|
925
|
+
_onRootInput(e) {
|
|
926
|
+
const t = e.target;
|
|
927
|
+
if (!(t instanceof HTMLInputElement) || !t.classList.contains("input") || this._isInteractionBlocked() || !this._allowInput())
|
|
928
|
+
return;
|
|
929
|
+
this._draftInput = t.value, this._inlineError = "";
|
|
930
|
+
const i = this._parseAndValidate(t.value);
|
|
931
|
+
this._pendingValue = i, this._emitInput("typing");
|
|
932
|
+
}
|
|
933
|
+
_onRootBlur(e) {
|
|
934
|
+
var n;
|
|
935
|
+
const t = e, i = t.target;
|
|
936
|
+
if (!(i instanceof HTMLInputElement) || !i.classList.contains("input") || !this._allowInput())
|
|
937
|
+
return;
|
|
938
|
+
this._draftInput = i.value;
|
|
939
|
+
const r = t.relatedTarget;
|
|
940
|
+
r && ((n = this._overlay) != null && n.contains(r)) || this._open && !this._isInlineMode() || this._handleDraftCommit("blur");
|
|
941
|
+
}
|
|
942
|
+
_onRootKeyDown(e) {
|
|
943
|
+
const t = e, i = t.target;
|
|
944
|
+
if (i instanceof HTMLInputElement && i.classList.contains("input") && !this._isInteractionBlocked()) {
|
|
945
|
+
if (t.key === "Enter") {
|
|
946
|
+
t.preventDefault(), this._draftInput = i.value, this._handleDraftCommit("enter"), this._isInlineMode() || this._setOpen(!1, "enter");
|
|
947
|
+
return;
|
|
948
|
+
}
|
|
949
|
+
if (t.key === "ArrowDown" && !this._open && !this._isInlineMode()) {
|
|
950
|
+
t.preventDefault(), this._setOpen(!0, "api");
|
|
951
|
+
return;
|
|
952
|
+
}
|
|
953
|
+
t.key === "Escape" && this._open && !this._isInlineMode() && (t.preventDefault(), this._setOpen(!1, "escape"));
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
_onDocumentPointerDown(e) {
|
|
957
|
+
if (!this._open || !this._overlay)
|
|
958
|
+
return;
|
|
959
|
+
const t = e.composedPath();
|
|
960
|
+
t.includes(this) || t.includes(this._overlay) || this._setOpen(!1, "outside");
|
|
961
|
+
}
|
|
962
|
+
_onDocumentKeyDown(e) {
|
|
963
|
+
this._open && e.key === "Escape" && (e.preventDefault(), this._setOpen(!1, "escape"));
|
|
964
|
+
}
|
|
965
|
+
_onOverlayClick(e) {
|
|
966
|
+
const t = e.target;
|
|
967
|
+
if (!t)
|
|
968
|
+
return;
|
|
969
|
+
const i = t.closest("[data-action]"), r = i == null ? void 0 : i.getAttribute("data-action");
|
|
970
|
+
if (r && !this._isInteractionBlocked()) {
|
|
971
|
+
if (r === "backdrop") {
|
|
972
|
+
this._setOpen(!1, "outside");
|
|
973
|
+
return;
|
|
974
|
+
}
|
|
975
|
+
if (r === "today") {
|
|
976
|
+
const n = this._parseAndValidate(this._todayIso());
|
|
977
|
+
if (!n)
|
|
978
|
+
return;
|
|
979
|
+
const { min: a, max: o } = this._resolvedBounds(), d = B(n, a, o);
|
|
980
|
+
if (!d)
|
|
981
|
+
return;
|
|
982
|
+
this._pendingValue = d, this._emitInput("today"), this._closeOnSelect() ? (this._commit(d, "today"), this._setOpen(!1, "today")) : this._renderOverlay();
|
|
983
|
+
return;
|
|
984
|
+
}
|
|
985
|
+
if (r === "clear") {
|
|
986
|
+
this._pendingValue = null, this._emitInput("clear"), this._closeOnSelect() ? (this._commit(null, "clear"), this._setOpen(!1, "clear")) : this._renderOverlay();
|
|
987
|
+
return;
|
|
988
|
+
}
|
|
989
|
+
if (r === "apply") {
|
|
990
|
+
this._commit(this._pendingValue, "apply"), this._setOpen(!1, "apply");
|
|
991
|
+
return;
|
|
992
|
+
}
|
|
993
|
+
r === "cancel" && (this._pendingValue = this._value, this._setOpen(!1, "outside"));
|
|
994
|
+
}
|
|
995
|
+
}
|
|
996
|
+
_onCalendarSelect(e) {
|
|
997
|
+
var a, o;
|
|
998
|
+
if (this._isInteractionBlocked())
|
|
999
|
+
return;
|
|
1000
|
+
const t = e, i = e.target;
|
|
1001
|
+
if (!i || i.tagName.toLowerCase() !== "ui-calendar")
|
|
1002
|
+
return;
|
|
1003
|
+
let r = null;
|
|
1004
|
+
if (t.type === "select")
|
|
1005
|
+
r = g(((a = t.detail) == null ? void 0 : a.value) || null);
|
|
1006
|
+
else if (t.type === "change") {
|
|
1007
|
+
const d = (o = t.detail) == null ? void 0 : o.value;
|
|
1008
|
+
typeof d == "string" && (r = g(d));
|
|
1009
|
+
}
|
|
1010
|
+
if (!r)
|
|
1011
|
+
return;
|
|
1012
|
+
const n = this._clampToBounds(r);
|
|
1013
|
+
n && (this._pendingValue = n, this._emitInput("calendar"), this._closeOnSelect() ? (this._commit(n, "calendar"), this._isInlineMode() || this._setOpen(!1, "calendar")) : this._updateHostState());
|
|
1014
|
+
}
|
|
1015
|
+
_updateHostState() {
|
|
1016
|
+
if (!this._hasView)
|
|
1017
|
+
return;
|
|
1018
|
+
const e = this.getAttribute("label") || "", t = this.getAttribute("hint") || "", i = this.getAttribute("error") || "", r = this._inlineError || i, n = this._placeholder(), a = this._translations(), o = !!(this._value || this._pendingValue), d = this.getAttribute("name") || "", s = this._isInlineMode(), u = r ? "error" : this._state(), m = this._allowInput() ? this._draftInput : this._formatDisplay(this._pendingValue || this._value), h = this.root.querySelector(".label"), x = this.root.querySelector(".label-text"), f = this.root.querySelector(".required"), c = this.root.querySelector(".field"), l = this.root.querySelector(".input"), I = this.root.querySelector('.btn[data-action="clear"]'), _ = this.root.querySelector('.btn[data-action="toggle"]'), b = this.root.querySelector(".hint"), k = this.root.querySelector(".error"), A = this.root.querySelector(".hidden-input"), p = this.root.querySelector(".inline-panel"), O = this.root.querySelector('.inline-panel [data-action="today"]'), D = this.root.querySelector('.inline-panel [data-action="clear"]'), z = this.root.querySelector('.inline-panel [data-action="apply"]'), P = this.root.querySelector(".inline-panel .footer");
|
|
1019
|
+
if (h && (h.hidden = !e, h.id = this._labelId, h.setAttribute("for", this._inputId)), x && (x.textContent = e), f && (f.hidden = !this.hasAttribute("required")), c && (c.dataset.invalid = r ? "true" : "false", c.dataset.open = this._open && !s ? "true" : "false", c.dataset.state = u, c.setAttribute("aria-disabled", this._isInteractionBlocked() ? "true" : "false")), l && (l.value !== m && (l.value = m), l.id = this._inputId, l.placeholder = n, l.readOnly = !this._allowInput() || this._isReadonly(), l.disabled = this._isInteractionBlocked(), l.required = this.hasAttribute("required"), l.autocomplete = "off", l.setAttribute("role", "combobox"), l.setAttribute("aria-haspopup", "dialog"), l.setAttribute("aria-expanded", s ? "false" : String(this._open)), l.setAttribute("aria-controls", this._panelId), l.setAttribute("aria-invalid", r ? "true" : "false"), e ? l.setAttribute("aria-labelledby", this._labelId) : l.removeAttribute("aria-labelledby")), I && (I.hidden = !(this._clearable() && o), I.disabled = this._isInteractionBlocked(), I.setAttribute("aria-label", a.clearDate)), _ && (_.hidden = s, _.disabled = this._isInteractionBlocked(), _.setAttribute("aria-expanded", s ? "false" : String(this._open)), _.setAttribute("aria-controls", this._panelId), _.setAttribute("aria-label", a.toggleCalendar)), b && (b.id = this._hintId, b.hidden = !t, b.textContent = t), k && (k.id = this._errorId, k.hidden = !r, k.textContent = r), l) {
|
|
1020
|
+
const w = [];
|
|
1021
|
+
t && b && !b.hidden && w.push(this._hintId), r && w.push(this._errorId), w.length ? l.setAttribute("aria-describedby", w.join(" ")) : l.removeAttribute("aria-describedby");
|
|
1022
|
+
}
|
|
1023
|
+
if (A && (A.disabled = !d, A.name = d, A.value = this._value || ""), p && (p.hidden = !s, p.id = this._panelId, p.dataset.bare = this._isBare() ? "true" : "false", p.setAttribute("role", "dialog"), p.setAttribute("aria-modal", "false"), p.setAttribute("aria-label", e || a.selectDate)), P && (P.hidden = !this._showFooter()), O && (O.textContent = a.today), D && (D.textContent = a.clear), z && (z.textContent = a.apply), s) {
|
|
1024
|
+
this._scheduleInlineCalendarSync(), this._destroyOverlay();
|
|
1025
|
+
return;
|
|
1026
|
+
}
|
|
1027
|
+
this._open && this._syncOverlayState();
|
|
1028
|
+
}
|
|
1029
|
+
render() {
|
|
1030
|
+
this._hasView || (this.setContent(`
|
|
1031
|
+
<style>${N}</style>
|
|
1032
|
+
<div class="root">
|
|
1033
|
+
<label class="label" part="label" id="${this._labelId}">
|
|
1034
|
+
<span class="label-text"></span>
|
|
1035
|
+
<span class="required">*</span>
|
|
1036
|
+
</label>
|
|
1037
|
+
<div class="field" part="field input">
|
|
1038
|
+
<span class="icon" part="icon" aria-hidden="true">${Y}</span>
|
|
1039
|
+
<input class="input" id="${this._inputId}" part="input" />
|
|
1040
|
+
<button type="button" class="btn" part="clear" data-action="clear">${W}</button>
|
|
1041
|
+
<button type="button" class="btn" part="toggle" data-action="toggle">
|
|
1042
|
+
<span class="toggle-icon">${K}</span>
|
|
1043
|
+
<span class="spinner" aria-hidden="true"></span>
|
|
1044
|
+
</button>
|
|
1045
|
+
</div>
|
|
1046
|
+
<div class="hint" id="${this._hintId}" part="hint"></div>
|
|
1047
|
+
<div class="error" id="${this._errorId}" part="error" role="alert"></div>
|
|
1048
|
+
<input class="hidden-input" type="hidden" disabled />
|
|
1049
|
+
<section class="inline-panel" id="${this._panelId}" part="popover" hidden>
|
|
1050
|
+
<ui-calendar class="inline-calendar" part="calendar"></ui-calendar>
|
|
1051
|
+
<footer class="footer" part="footer">
|
|
1052
|
+
<button type="button" class="action" data-action="today" part="presets"></button>
|
|
1053
|
+
<button type="button" class="action" data-action="clear" part="clear"></button>
|
|
1054
|
+
<button type="button" class="action" data-tone="primary" data-action="apply" part="apply"></button>
|
|
1055
|
+
</footer>
|
|
1056
|
+
</section>
|
|
1057
|
+
</div>
|
|
1058
|
+
`, { force: !0 }), this._hasView = !0), this._updateHostState();
|
|
1059
|
+
}
|
|
1060
|
+
shouldRenderOnAttributeChange(e, t, i) {
|
|
1061
|
+
return !1;
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1064
|
+
typeof customElements < "u" && !customElements.get("ui-date-picker") && customElements.define("ui-date-picker", Z);
|
|
1065
|
+
export {
|
|
1066
|
+
Z as UIDatePicker
|
|
1067
|
+
};
|