@editora/ui-core 0.1.9 → 0.1.12
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/components/ui-icon.d.ts.map +1 -1
- package/dist/components/ui-split-button.d.ts +2 -0
- package/dist/components/ui-split-button.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-9e9da03b.js +207 -0
- package/dist/icon-cloud.cjs.js +495 -0
- package/dist/icon-cloud.esm.js +828 -0
- package/dist/icon-e2a85cc1.mjs +368 -0
- package/dist/icon.cjs.js +1 -0
- package/dist/icon.esm.js +6 -0
- package/dist/icons.d.ts +1 -1
- package/dist/icons.d.ts.map +1 -1
- 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 +485 -0
- package/dist/split-button.esm.js +709 -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,686 @@
|
|
|
1
|
+
import { E as x } from "./ElementBase-909688f3.mjs";
|
|
2
|
+
import { r as E } from "./calendar-2c11b824.mjs";
|
|
3
|
+
import { r as k, i as m, s as w, o as b, t as S, v as f, l as C, c as B } from "./date-time-utils-bdceb7af.mjs";
|
|
4
|
+
import "./scroll-lock-9de6d328.mjs";
|
|
5
|
+
const O = `
|
|
6
|
+
<svg viewBox="0 0 20 20" class="icon-svg" aria-hidden="true" focusable="false">
|
|
7
|
+
<path d="M10 2.4a7.6 7.6 0 1 1 0 15.2A7.6 7.6 0 0 1 10 2.4Zm0 1.4a6.2 6.2 0 1 0 0 12.4 6.2 6.2 0 0 0 0-12.4Zm.7 2.4a.7.7 0 0 0-1.4 0v4.1c0 .2.1.4.2.5l2.6 2.5a.7.7 0 1 0 1-1l-2.4-2.3v-3.8Z" fill="currentColor"/>
|
|
8
|
+
</svg>
|
|
9
|
+
`, I = `
|
|
10
|
+
<svg viewBox="0 0 20 20" class="icon-svg" aria-hidden="true" focusable="false">
|
|
11
|
+
<path d="m6 6 8 8M14 6l-8 8" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/>
|
|
12
|
+
</svg>
|
|
13
|
+
`, A = `
|
|
14
|
+
<svg viewBox="0 0 20 20" class="icon-svg" aria-hidden="true" focusable="false">
|
|
15
|
+
<path d="m5.6 7.6 4.4 4.6 4.4-4.6" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>
|
|
16
|
+
</svg>
|
|
17
|
+
`, D = `
|
|
18
|
+
:host {
|
|
19
|
+
--ui-dp-bg: color-mix(in srgb, var(--ui-color-surface, #ffffff) 96%, transparent);
|
|
20
|
+
--ui-dp-border: color-mix(in srgb, var(--ui-color-border, #cbd5e1) 72%, transparent);
|
|
21
|
+
--ui-dp-text: var(--ui-color-text, #0f172a);
|
|
22
|
+
--ui-dp-muted: var(--ui-color-muted, #64748b);
|
|
23
|
+
--ui-dp-accent: var(--ui-color-primary, #2563eb);
|
|
24
|
+
--ui-dp-radius: 12px;
|
|
25
|
+
--ui-dp-field-error: var(--ui-color-danger, #dc2626);
|
|
26
|
+
--ui-dp-z: 1600;
|
|
27
|
+
color-scheme: light dark;
|
|
28
|
+
display: inline-grid;
|
|
29
|
+
inline-size: min(100%, var(--ui-width, 240px));
|
|
30
|
+
min-inline-size: min(200px, 100%);
|
|
31
|
+
font-family: "Inter", "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
32
|
+
color: var(--ui-dp-text);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.root { display: grid; gap: 6px; }
|
|
36
|
+
.label { font: 600 13px/1.35 "Inter", "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ui-dp-text); }
|
|
37
|
+
.label[hidden] { display: none; }
|
|
38
|
+
.required { color: var(--ui-dp-field-error); font-size: 11px; }
|
|
39
|
+
|
|
40
|
+
.field {
|
|
41
|
+
display: grid;
|
|
42
|
+
grid-template-columns: auto minmax(0, 1fr) auto auto;
|
|
43
|
+
align-items: center;
|
|
44
|
+
gap: 8px;
|
|
45
|
+
min-block-size: 38px;
|
|
46
|
+
border: 1px solid var(--ui-dp-border);
|
|
47
|
+
border-radius: var(--ui-dp-radius);
|
|
48
|
+
background: var(--ui-dp-bg);
|
|
49
|
+
padding: 0 10px;
|
|
50
|
+
transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.field:focus-within {
|
|
54
|
+
border-color: color-mix(in srgb, var(--ui-dp-accent) 70%, var(--ui-dp-border));
|
|
55
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-dp-accent) 22%, transparent);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.input {
|
|
59
|
+
border: 0;
|
|
60
|
+
outline: none;
|
|
61
|
+
background: transparent;
|
|
62
|
+
color: var(--ui-dp-text);
|
|
63
|
+
inline-size: 100%;
|
|
64
|
+
min-inline-size: 0;
|
|
65
|
+
padding: 8px 0;
|
|
66
|
+
font: 500 14px/1.35 "Inter", "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.icon {
|
|
70
|
+
color: color-mix(in srgb, var(--ui-dp-text) 70%, transparent);
|
|
71
|
+
inline-size: 16px;
|
|
72
|
+
block-size: 16px;
|
|
73
|
+
display: inline-grid;
|
|
74
|
+
place-items: center;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.icon-svg {
|
|
78
|
+
inline-size: 16px;
|
|
79
|
+
block-size: 16px;
|
|
80
|
+
pointer-events: none;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.btn {
|
|
84
|
+
border: 0;
|
|
85
|
+
background: transparent;
|
|
86
|
+
inline-size: 28px;
|
|
87
|
+
block-size: 28px;
|
|
88
|
+
border-radius: 8px;
|
|
89
|
+
color: color-mix(in srgb, var(--ui-dp-text) 72%, transparent);
|
|
90
|
+
cursor: pointer;
|
|
91
|
+
display: inline-grid;
|
|
92
|
+
place-items: center;
|
|
93
|
+
transition: background-color 140ms ease, color 140ms ease, transform 140ms ease;
|
|
94
|
+
}
|
|
95
|
+
.btn:hover { background: color-mix(in srgb, var(--ui-dp-text) 10%, transparent); color: var(--ui-dp-text); }
|
|
96
|
+
.btn:active { transform: translateY(1px); }
|
|
97
|
+
.btn:focus-visible {
|
|
98
|
+
outline: 2px solid color-mix(in srgb, var(--ui-dp-accent) 68%, transparent);
|
|
99
|
+
outline-offset: 1px;
|
|
100
|
+
}
|
|
101
|
+
.btn:disabled {
|
|
102
|
+
opacity: 0.5;
|
|
103
|
+
cursor: not-allowed;
|
|
104
|
+
}
|
|
105
|
+
.btn[hidden] { display: none; }
|
|
106
|
+
|
|
107
|
+
.hint { color: var(--ui-dp-muted); font-size: 12px; line-height: 1.4; }
|
|
108
|
+
.error { color: var(--ui-dp-field-error); font-size: 12px; line-height: 1.4; }
|
|
109
|
+
.hint[hidden], .error[hidden] { display: none; }
|
|
110
|
+
|
|
111
|
+
:host([disabled]) .field {
|
|
112
|
+
opacity: 0.64;
|
|
113
|
+
pointer-events: none;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
@media (prefers-reduced-motion: reduce) {
|
|
117
|
+
.field,
|
|
118
|
+
.btn {
|
|
119
|
+
transition: none !important;
|
|
120
|
+
animation: none !important;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@media (forced-colors: active) {
|
|
125
|
+
.field {
|
|
126
|
+
border-color: CanvasText;
|
|
127
|
+
background: Canvas;
|
|
128
|
+
box-shadow: none;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.icon,
|
|
132
|
+
.input {
|
|
133
|
+
color: CanvasText;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.btn {
|
|
137
|
+
border: 1px solid CanvasText;
|
|
138
|
+
background: Canvas;
|
|
139
|
+
color: CanvasText;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.btn:focus-visible {
|
|
143
|
+
outline-color: Highlight;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
`, $ = `
|
|
147
|
+
.overlay { position: fixed; z-index: var(--ui-dp-z, 1600); pointer-events: none; }
|
|
148
|
+
.panel {
|
|
149
|
+
pointer-events: auto;
|
|
150
|
+
min-inline-size: min(300px, calc(100vw - 16px));
|
|
151
|
+
max-inline-size: min(320px, calc(100vw - 16px));
|
|
152
|
+
border: 1px solid var(--ui-dp-border, #cbd5e1);
|
|
153
|
+
border-radius: var(--ui-dp-radius, 12px);
|
|
154
|
+
background: var(--ui-dp-bg, #fff);
|
|
155
|
+
color: var(--ui-dp-text, #0f172a);
|
|
156
|
+
box-shadow: 0 20px 34px rgba(2, 6, 23, 0.16);
|
|
157
|
+
padding: 10px;
|
|
158
|
+
display: grid;
|
|
159
|
+
gap: 10px;
|
|
160
|
+
}
|
|
161
|
+
.sheet-wrap { position: fixed; inset: 0; display: grid; align-items: end; z-index: var(--ui-dp-z, 1600); }
|
|
162
|
+
.sheet-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.52); }
|
|
163
|
+
.sheet {
|
|
164
|
+
position: relative;
|
|
165
|
+
pointer-events: auto;
|
|
166
|
+
background: var(--ui-dp-bg, #fff);
|
|
167
|
+
color: var(--ui-dp-text, #0f172a);
|
|
168
|
+
border-radius: 16px 16px 0 0;
|
|
169
|
+
border: 1px solid color-mix(in srgb, var(--ui-dp-border, #cbd5e1) 84%, transparent);
|
|
170
|
+
box-shadow: 0 -12px 30px rgba(2, 6, 23, 0.2);
|
|
171
|
+
padding: 12px;
|
|
172
|
+
display: grid;
|
|
173
|
+
gap: 10px;
|
|
174
|
+
max-block-size: min(82vh, 560px);
|
|
175
|
+
overflow: auto;
|
|
176
|
+
}
|
|
177
|
+
.pickers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; align-items: end; }
|
|
178
|
+
.pickers[data-seconds="false"][data-ampm="false"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
179
|
+
.pickers[data-seconds="false"][data-ampm="true"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
|
180
|
+
.picker { display: grid; gap: 4px; }
|
|
181
|
+
.picker label { font-size: 11px; color: var(--ui-dp-muted, #64748b); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
|
|
182
|
+
.picker select {
|
|
183
|
+
min-block-size: 34px;
|
|
184
|
+
border: 1px solid color-mix(in srgb, var(--ui-dp-border, #cbd5e1) 84%, transparent);
|
|
185
|
+
border-radius: 8px;
|
|
186
|
+
padding: 0 8px;
|
|
187
|
+
background: color-mix(in srgb, var(--ui-dp-bg, #fff) 95%, transparent);
|
|
188
|
+
color: var(--ui-dp-text, #0f172a);
|
|
189
|
+
font: 600 13px/1 "Inter", "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
190
|
+
}
|
|
191
|
+
.footer { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
|
|
192
|
+
.action {
|
|
193
|
+
border: 1px solid color-mix(in srgb, var(--ui-dp-border, #cbd5e1) 85%, transparent);
|
|
194
|
+
background: color-mix(in srgb, var(--ui-dp-bg, #fff) 95%, transparent);
|
|
195
|
+
color: var(--ui-dp-text, #0f172a);
|
|
196
|
+
min-block-size: 30px;
|
|
197
|
+
border-radius: 8px;
|
|
198
|
+
padding: 0 10px;
|
|
199
|
+
font: 600 12px/1 "Inter", "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
200
|
+
cursor: pointer;
|
|
201
|
+
}
|
|
202
|
+
.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); }
|
|
203
|
+
|
|
204
|
+
.action:hover {
|
|
205
|
+
border-color: color-mix(in srgb, var(--ui-dp-accent, #2563eb) 40%, var(--ui-dp-border, #cbd5e1));
|
|
206
|
+
background: color-mix(in srgb, var(--ui-dp-accent, #2563eb) 10%, transparent);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.action:focus-visible {
|
|
210
|
+
outline: 2px solid color-mix(in srgb, var(--ui-dp-accent, #2563eb) 66%, transparent);
|
|
211
|
+
outline-offset: 1px;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
@media (prefers-reduced-motion: reduce) {
|
|
215
|
+
.panel,
|
|
216
|
+
.sheet,
|
|
217
|
+
.action {
|
|
218
|
+
transition: none !important;
|
|
219
|
+
animation: none !important;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
@media (forced-colors: active) {
|
|
224
|
+
.panel,
|
|
225
|
+
.sheet {
|
|
226
|
+
border-color: CanvasText;
|
|
227
|
+
background: Canvas;
|
|
228
|
+
color: CanvasText;
|
|
229
|
+
box-shadow: none;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.sheet-backdrop {
|
|
233
|
+
background: color-mix(in srgb, CanvasText 36%, transparent);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.picker label {
|
|
237
|
+
color: CanvasText;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.picker select,
|
|
241
|
+
.action {
|
|
242
|
+
border-color: CanvasText;
|
|
243
|
+
background: Canvas;
|
|
244
|
+
color: CanvasText;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.picker select:focus-visible,
|
|
248
|
+
.action:focus-visible {
|
|
249
|
+
outline-color: Highlight;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
`;
|
|
253
|
+
function h(p) {
|
|
254
|
+
return String(p).padStart(2, "0");
|
|
255
|
+
}
|
|
256
|
+
function _(p, t, e, i) {
|
|
257
|
+
const n = h(p), s = h(t);
|
|
258
|
+
return i ? `${n}:${s}:${h(e)}` : `${n}:${s}`;
|
|
259
|
+
}
|
|
260
|
+
class M extends x {
|
|
261
|
+
constructor() {
|
|
262
|
+
super(...arguments), this._value = null, this._pending = null, this._draft = "", this._inlineError = "", this._open = !1, this._syncing = !1, this._overlay = null, this._releaseScrollLock = null, this._isInitialized = !1, this._hasView = !1, this._restoreFocusEl = null, this._overlayKey = null, this._fieldEl = null, this._labelEl = null, this._labelTextEl = null, this._requiredEl = null, this._inputEl = null, this._clearBtn = null, this._toggleBtn = null, this._hintEl = null, this._errorEl = null, this._hiddenInputEl = null, this._schedulePosition = k(() => 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._onOverlayClickBound = (t) => this._onOverlayClick(t), this._onOverlayChangeBound = (t) => this._onOverlayChange(t), this._onDocumentPointerDownBound = (t) => this._onDocumentPointerDown(t), this._onDocumentKeyDownBound = (t) => this._onDocumentKeyDown(t), this._onWindowResizeBound = () => this._schedulePosition.run(), this._onWindowScrollBound = () => this._schedulePosition.run();
|
|
263
|
+
}
|
|
264
|
+
static get observedAttributes() {
|
|
265
|
+
return [
|
|
266
|
+
"open",
|
|
267
|
+
"default-open",
|
|
268
|
+
"value",
|
|
269
|
+
"default-value",
|
|
270
|
+
"format",
|
|
271
|
+
"step",
|
|
272
|
+
"seconds",
|
|
273
|
+
"step-seconds",
|
|
274
|
+
"min",
|
|
275
|
+
"max",
|
|
276
|
+
"disabled",
|
|
277
|
+
"readonly",
|
|
278
|
+
"required",
|
|
279
|
+
"name",
|
|
280
|
+
"clearable",
|
|
281
|
+
"allow-input",
|
|
282
|
+
"mode",
|
|
283
|
+
"label",
|
|
284
|
+
"hint",
|
|
285
|
+
"error",
|
|
286
|
+
"translations",
|
|
287
|
+
"locale",
|
|
288
|
+
"variant"
|
|
289
|
+
];
|
|
290
|
+
}
|
|
291
|
+
connectedCallback() {
|
|
292
|
+
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._hasView && !this._inputEl && this._cacheDomRefs(), !this._isInitialized) {
|
|
293
|
+
const t = this._normalizeCanonical(this.getAttribute("value") || this.getAttribute("default-value"));
|
|
294
|
+
this._value = t, this._pending = t, this._draft = this._formatDisplay(t), this._open = this.hasAttribute("open") || m(this.getAttribute("default-open")), this._isInitialized = !0;
|
|
295
|
+
}
|
|
296
|
+
this._open && !this._isInlineMode() && this._ensureOverlay();
|
|
297
|
+
}
|
|
298
|
+
disconnectedCallback() {
|
|
299
|
+
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(), this._fieldEl = null, this._labelEl = null, this._labelTextEl = null, this._requiredEl = null, this._inputEl = null, this._clearBtn = null, this._toggleBtn = null, this._hintEl = null, this._errorEl = null, this._hiddenInputEl = null, super.disconnectedCallback();
|
|
300
|
+
}
|
|
301
|
+
attributeChangedCallback(t, e, i) {
|
|
302
|
+
if (e !== i && (t === "value" && !this._syncing && (this._value = this._normalizeCanonical(i), this._pending = this._value, this._draft = this._formatDisplay(this._value), this._inlineError = ""), 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"), !!this.isConnected)) {
|
|
303
|
+
if (!this._hasView) {
|
|
304
|
+
this.requestRender();
|
|
305
|
+
return;
|
|
306
|
+
}
|
|
307
|
+
this._updateHostState();
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
_isInlineMode() {
|
|
311
|
+
return (this.getAttribute("mode") || "popover") === "inline";
|
|
312
|
+
}
|
|
313
|
+
_isMobileSheet() {
|
|
314
|
+
return w(this.getAttribute("mode"));
|
|
315
|
+
}
|
|
316
|
+
_isDisabled() {
|
|
317
|
+
return this.hasAttribute("disabled");
|
|
318
|
+
}
|
|
319
|
+
_isReadonly() {
|
|
320
|
+
return this.hasAttribute("readonly");
|
|
321
|
+
}
|
|
322
|
+
_allowInput() {
|
|
323
|
+
return m(this.getAttribute("allow-input"), !0);
|
|
324
|
+
}
|
|
325
|
+
_clearable() {
|
|
326
|
+
return m(this.getAttribute("clearable"), !0);
|
|
327
|
+
}
|
|
328
|
+
_withSeconds() {
|
|
329
|
+
return this.hasAttribute("seconds");
|
|
330
|
+
}
|
|
331
|
+
_is12h() {
|
|
332
|
+
return (this.getAttribute("format") || "24h") === "12h";
|
|
333
|
+
}
|
|
334
|
+
_minuteStep() {
|
|
335
|
+
const t = Number(this.getAttribute("step") || 5), e = 5;
|
|
336
|
+
return !Number.isFinite(t) || t < 1 ? e : Math.min(60, Math.trunc(t));
|
|
337
|
+
}
|
|
338
|
+
_secondStep() {
|
|
339
|
+
const t = Number(this.getAttribute("step-seconds") || 1);
|
|
340
|
+
return !Number.isFinite(t) || t < 1 ? 1 : Math.min(60, Math.trunc(t));
|
|
341
|
+
}
|
|
342
|
+
_translations() {
|
|
343
|
+
return E(
|
|
344
|
+
this.getAttribute("locale"),
|
|
345
|
+
this.getAttribute("translations")
|
|
346
|
+
);
|
|
347
|
+
}
|
|
348
|
+
_normalizeCanonical(t) {
|
|
349
|
+
if (!t)
|
|
350
|
+
return null;
|
|
351
|
+
const e = b(t, !0);
|
|
352
|
+
return e ? _(e.hours, e.minutes, e.seconds, this._withSeconds()) : null;
|
|
353
|
+
}
|
|
354
|
+
_minTime() {
|
|
355
|
+
return this._normalizeCanonical(this.getAttribute("min"));
|
|
356
|
+
}
|
|
357
|
+
_maxTime() {
|
|
358
|
+
return this._normalizeCanonical(this.getAttribute("max"));
|
|
359
|
+
}
|
|
360
|
+
_formatDisplay(t) {
|
|
361
|
+
return t ? this._is12h() ? S(t, this.getAttribute("locale") || "en-US") : t : "";
|
|
362
|
+
}
|
|
363
|
+
_syncOpenAttribute(t) {
|
|
364
|
+
this._syncing = !0;
|
|
365
|
+
try {
|
|
366
|
+
t ? this.hasAttribute("open") || this.setAttribute("open", "") : this.hasAttribute("open") && this.removeAttribute("open");
|
|
367
|
+
} finally {
|
|
368
|
+
this._syncing = !1;
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
_syncValueAttribute(t) {
|
|
372
|
+
this._syncing = !0;
|
|
373
|
+
try {
|
|
374
|
+
t ? this.getAttribute("value") !== t && this.setAttribute("value", t) : this.hasAttribute("value") && this.removeAttribute("value");
|
|
375
|
+
} finally {
|
|
376
|
+
this._syncing = !1;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
_emitInput(t) {
|
|
380
|
+
const e = { mode: "time", value: this._pending, source: t };
|
|
381
|
+
this.dispatchEvent(new CustomEvent("input", { detail: e, bubbles: !0, composed: !0 }));
|
|
382
|
+
}
|
|
383
|
+
_emitChange(t) {
|
|
384
|
+
const e = { mode: "time", value: this._value, source: t };
|
|
385
|
+
this.dispatchEvent(new CustomEvent("change", { detail: e, bubbles: !0, composed: !0 }));
|
|
386
|
+
}
|
|
387
|
+
_emitInvalid(t, e) {
|
|
388
|
+
this.dispatchEvent(new CustomEvent("invalid", { detail: { raw: t, reason: e }, bubbles: !0, composed: !0 }));
|
|
389
|
+
}
|
|
390
|
+
_clampToBounds(t) {
|
|
391
|
+
if (!t)
|
|
392
|
+
return null;
|
|
393
|
+
const e = this._minTime(), i = this._maxTime();
|
|
394
|
+
let n = t;
|
|
395
|
+
return e && f(n, e) < 0 && (n = e), i && f(n, i) > 0 && (n = i), n;
|
|
396
|
+
}
|
|
397
|
+
_commit(t, e) {
|
|
398
|
+
if (this._isDisabled() || this._isReadonly())
|
|
399
|
+
return;
|
|
400
|
+
const i = this._clampToBounds(this._normalizeCanonical(t));
|
|
401
|
+
this._value = i, this._pending = i, this._draft = this._formatDisplay(i), this._inlineError = "", this._syncValueAttribute(i), this._emitInput(e), this._emitChange(e), this._updateHostState();
|
|
402
|
+
}
|
|
403
|
+
_setOpen(t, e) {
|
|
404
|
+
this._isDisabled() || this._open !== t && (this._open = t, this._syncOpenAttribute(t), this._syncOverlay(e), this._updateHostState(), this.dispatchEvent(new CustomEvent(t ? "open" : "close", { bubbles: !0, composed: !0 })));
|
|
405
|
+
}
|
|
406
|
+
_syncOverlay(t) {
|
|
407
|
+
if (this._isInlineMode()) {
|
|
408
|
+
this._destroyOverlay();
|
|
409
|
+
return;
|
|
410
|
+
}
|
|
411
|
+
if (this._open) {
|
|
412
|
+
this._ensureOverlay(), this._syncOverlayState();
|
|
413
|
+
return;
|
|
414
|
+
}
|
|
415
|
+
this._destroyOverlay();
|
|
416
|
+
const e = this._restoreFocusEl;
|
|
417
|
+
if (this._restoreFocusEl = null, e && e.isConnected)
|
|
418
|
+
try {
|
|
419
|
+
e.focus();
|
|
420
|
+
} catch {
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
_ensureOverlay() {
|
|
424
|
+
if (this._overlay || typeof document > "u")
|
|
425
|
+
return;
|
|
426
|
+
const t = document.createElement("div");
|
|
427
|
+
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("change", this._onOverlayChangeBound), 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 = C());
|
|
428
|
+
}
|
|
429
|
+
_destroyOverlay() {
|
|
430
|
+
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("change", this._onOverlayChangeBound), this._overlay.parentElement && this._overlay.parentElement.removeChild(this._overlay), this._overlay = null, this._overlayKey = null, this._releaseScrollLock && (this._releaseScrollLock(), this._releaseScrollLock = null));
|
|
431
|
+
}
|
|
432
|
+
_positionOverlay() {
|
|
433
|
+
if (!this._overlay || !this._open || this._isMobileSheet())
|
|
434
|
+
return;
|
|
435
|
+
const t = this._fieldEl, e = this._overlay.querySelector(".panel");
|
|
436
|
+
if (!t || !e)
|
|
437
|
+
return;
|
|
438
|
+
const i = B(t.getBoundingClientRect(), e.getBoundingClientRect());
|
|
439
|
+
e.style.position = "absolute", e.style.top = `${Math.round(i.top)}px`, e.style.left = `${Math.round(i.left)}px`;
|
|
440
|
+
}
|
|
441
|
+
_timeParts(t) {
|
|
442
|
+
const e = b(t || "00:00", !0) || { hours: 0, minutes: 0, seconds: 0 }, i = e.hours >= 12 ? "pm" : "am";
|
|
443
|
+
return {
|
|
444
|
+
hours: e.hours,
|
|
445
|
+
minutes: e.minutes,
|
|
446
|
+
seconds: e.seconds,
|
|
447
|
+
meridiem: i
|
|
448
|
+
};
|
|
449
|
+
}
|
|
450
|
+
_buildOverlayContent(t) {
|
|
451
|
+
const e = this._translations(), i = this._timeParts(this._pending), n = this._is12h(), s = this._withSeconds(), o = n ? i.hours % 12 || 12 : i.hours, r = this._minuteStep(), l = this._secondStep(), a = Array.from({ length: n ? 12 : 24 }, (v, c) => {
|
|
452
|
+
const u = n ? c + 1 : c;
|
|
453
|
+
return `<option value="${u}" ${u === o ? "selected" : ""}>${h(u)}</option>`;
|
|
454
|
+
}).join(""), d = Array.from({ length: Math.ceil(60 / r) }, (v, c) => {
|
|
455
|
+
const u = Math.min(59, c * r);
|
|
456
|
+
return `<option value="${u}" ${u === i.minutes ? "selected" : ""}>${h(u)}</option>`;
|
|
457
|
+
}).join(""), y = Array.from({ length: Math.ceil(60 / l) }, (v, c) => {
|
|
458
|
+
const u = Math.min(59, c * l);
|
|
459
|
+
return `<option value="${u}" ${u === i.seconds ? "selected" : ""}>${h(u)}</option>`;
|
|
460
|
+
}).join(""), g = `
|
|
461
|
+
<div class="pickers" data-seconds="${s ? "true" : "false"}" data-ampm="${n ? "true" : "false"}">
|
|
462
|
+
<div class="picker"><label>${e.hour}</label><select data-segment="hours">${a}</select></div>
|
|
463
|
+
<div class="picker"><label>${e.minute}</label><select data-segment="minutes">${d}</select></div>
|
|
464
|
+
${s ? `<div class="picker"><label>${e.second}</label><select data-segment="seconds">${y}</select></div>` : ""}
|
|
465
|
+
${n ? `<div class="picker"><label>${e.meridiem}</label><select data-segment="meridiem"><option value="am" ${i.meridiem === "am" ? "selected" : ""}>${e.am}</option><option value="pm" ${i.meridiem === "pm" ? "selected" : ""}>${e.pm}</option></select></div>` : ""}
|
|
466
|
+
</div>
|
|
467
|
+
`;
|
|
468
|
+
return `
|
|
469
|
+
<style>${$}</style>
|
|
470
|
+
${t ? '<div class="sheet-backdrop" data-action="backdrop"></div>' : ""}
|
|
471
|
+
<section class="${t ? "sheet" : "panel"}" part="${t ? "sheet" : "popover"}">
|
|
472
|
+
${g}
|
|
473
|
+
<footer class="footer" part="footer">
|
|
474
|
+
<button type="button" class="action" data-action="now">${e.now}</button>
|
|
475
|
+
<button type="button" class="action" data-action="clear" part="clear">${e.clear}</button>
|
|
476
|
+
<button type="button" class="action" data-action="cancel" part="cancel">${e.cancel}</button>
|
|
477
|
+
<button type="button" class="action" data-action="apply" data-tone="primary" part="apply">${e.apply}</button>
|
|
478
|
+
</footer>
|
|
479
|
+
</section>
|
|
480
|
+
`;
|
|
481
|
+
}
|
|
482
|
+
_overlaySignature(t) {
|
|
483
|
+
return [
|
|
484
|
+
t ? "sheet" : "popover",
|
|
485
|
+
this._is12h() ? "12h" : "24h",
|
|
486
|
+
this._withSeconds() ? "sec" : "nosec",
|
|
487
|
+
this._minuteStep(),
|
|
488
|
+
this._secondStep(),
|
|
489
|
+
this.getAttribute("translations") || ""
|
|
490
|
+
].join(":");
|
|
491
|
+
}
|
|
492
|
+
_ensureOverlayContent(t) {
|
|
493
|
+
if (!this._overlay)
|
|
494
|
+
return;
|
|
495
|
+
const e = this._overlaySignature(t);
|
|
496
|
+
this._overlayKey !== e && (this._overlayKey = e, this._overlay.innerHTML = t ? `<div class="sheet-wrap">${this._buildOverlayContent(!0)}</div>` : `<div class="overlay">${this._buildOverlayContent(!1)}</div>`);
|
|
497
|
+
}
|
|
498
|
+
_setClosestOptionValue(t, e) {
|
|
499
|
+
const i = Array.from(t.options).map((o) => Number(o.value)).filter((o) => Number.isFinite(o));
|
|
500
|
+
if (!i.length)
|
|
501
|
+
return;
|
|
502
|
+
let n = i[0], s = Math.abs(n - e);
|
|
503
|
+
for (let o = 1; o < i.length; o += 1) {
|
|
504
|
+
const r = i[o], l = Math.abs(r - e);
|
|
505
|
+
l < s && (n = r, s = l);
|
|
506
|
+
}
|
|
507
|
+
t.value = String(n);
|
|
508
|
+
}
|
|
509
|
+
_syncOverlayState() {
|
|
510
|
+
if (!this._overlay)
|
|
511
|
+
return;
|
|
512
|
+
const t = this._isMobileSheet();
|
|
513
|
+
this._ensureOverlayContent(t);
|
|
514
|
+
const e = this._timeParts(this._pending), i = this._overlay.querySelector('select[data-segment="hours"]'), n = this._overlay.querySelector('select[data-segment="minutes"]'), s = this._overlay.querySelector('select[data-segment="seconds"]'), o = this._overlay.querySelector('select[data-segment="meridiem"]'), r = this._isDisabled() || this._isReadonly();
|
|
515
|
+
if (this._overlay.querySelectorAll(".action").forEach((a) => {
|
|
516
|
+
a.disabled = r;
|
|
517
|
+
}), i) {
|
|
518
|
+
const a = this._is12h() ? e.hours % 12 || 12 : e.hours;
|
|
519
|
+
this._setClosestOptionValue(i, a), i.disabled = r;
|
|
520
|
+
}
|
|
521
|
+
n && (this._setClosestOptionValue(n, e.minutes), n.disabled = r), s && (this._setClosestOptionValue(s, e.seconds), s.disabled = r), o && (o.value = e.meridiem, o.disabled = r), t || this._schedulePosition.run();
|
|
522
|
+
}
|
|
523
|
+
_renderOverlay() {
|
|
524
|
+
this._syncOverlayState();
|
|
525
|
+
}
|
|
526
|
+
_applySegmentsFromOverlay() {
|
|
527
|
+
if (!this._overlay)
|
|
528
|
+
return;
|
|
529
|
+
const t = this._overlay.querySelector('select[data-segment="hours"]'), e = this._overlay.querySelector('select[data-segment="minutes"]'), i = this._overlay.querySelector('select[data-segment="seconds"]'), n = this._overlay.querySelector('select[data-segment="meridiem"]');
|
|
530
|
+
if (!t || !e)
|
|
531
|
+
return;
|
|
532
|
+
let s = Number(t.value);
|
|
533
|
+
const o = Number(e.value), r = i ? Number(i.value) : 0;
|
|
534
|
+
if (this._is12h() && n) {
|
|
535
|
+
const a = n.value === "pm" ? "pm" : "am";
|
|
536
|
+
a === "pm" && s < 12 && (s += 12), a === "am" && s === 12 && (s = 0);
|
|
537
|
+
}
|
|
538
|
+
const l = _(s, o, r, this._withSeconds());
|
|
539
|
+
this._pending = this._clampToBounds(l), this._emitInput("picker");
|
|
540
|
+
}
|
|
541
|
+
_onRootClick(t) {
|
|
542
|
+
var n;
|
|
543
|
+
const e = t.target;
|
|
544
|
+
if (!e)
|
|
545
|
+
return;
|
|
546
|
+
const i = (n = e.closest("[data-action]")) == null ? void 0 : n.getAttribute("data-action");
|
|
547
|
+
if (i) {
|
|
548
|
+
if (i === "toggle") {
|
|
549
|
+
this._restoreFocusEl = e, this._setOpen(!this._open, "toggle");
|
|
550
|
+
return;
|
|
551
|
+
}
|
|
552
|
+
i === "clear" && this._commit(null, "clear");
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
_onRootInput(t) {
|
|
556
|
+
const e = t.target;
|
|
557
|
+
if (!(e instanceof HTMLInputElement) || !e.classList.contains("input") || !this._allowInput())
|
|
558
|
+
return;
|
|
559
|
+
this._draft = e.value, this._inlineError = "";
|
|
560
|
+
const i = this._normalizeCanonical(e.value);
|
|
561
|
+
this._pending = i, this._emitInput("typing");
|
|
562
|
+
}
|
|
563
|
+
_onRootBlur(t) {
|
|
564
|
+
const e = t.target;
|
|
565
|
+
if (!(e instanceof HTMLInputElement) || !e.classList.contains("input") || !this._allowInput())
|
|
566
|
+
return;
|
|
567
|
+
if (!this._draft.trim()) {
|
|
568
|
+
this._commit(null, "blur");
|
|
569
|
+
return;
|
|
570
|
+
}
|
|
571
|
+
const i = this._normalizeCanonical(this._draft);
|
|
572
|
+
if (!i) {
|
|
573
|
+
this._inlineError = this.getAttribute("error") || this._translations().invalidTime, this._emitInvalid(this._draft, "parse"), this._updateHostState();
|
|
574
|
+
return;
|
|
575
|
+
}
|
|
576
|
+
this._commit(i, "blur");
|
|
577
|
+
}
|
|
578
|
+
_stepBy(t) {
|
|
579
|
+
const e = b(this._pending || this._value || "00:00", !0) || { hours: 0, minutes: 0, seconds: 0 }, i = this._minuteStep() * t, n = ((e.hours * 60 + e.minutes + i) % (24 * 60) + 24 * 60) % (24 * 60), s = Math.floor(n / 60), o = n % 60, r = _(s, o, e.seconds, this._withSeconds());
|
|
580
|
+
this._pending = this._clampToBounds(r), this._emitInput("keyboard-step"), this._updateHostState();
|
|
581
|
+
}
|
|
582
|
+
_onRootKeyDown(t) {
|
|
583
|
+
const e = t, i = e.target;
|
|
584
|
+
if (!(!(i instanceof HTMLInputElement) || !i.classList.contains("input"))) {
|
|
585
|
+
if (e.key === "ArrowUp") {
|
|
586
|
+
e.preventDefault(), this._stepBy(e.shiftKey ? 5 : 1);
|
|
587
|
+
return;
|
|
588
|
+
}
|
|
589
|
+
if (e.key === "ArrowDown") {
|
|
590
|
+
e.preventDefault(), this._stepBy(e.shiftKey ? -5 : -1);
|
|
591
|
+
return;
|
|
592
|
+
}
|
|
593
|
+
if (e.key === "Enter") {
|
|
594
|
+
e.preventDefault();
|
|
595
|
+
const n = this._normalizeCanonical(this._draft);
|
|
596
|
+
if (!n && this._draft.trim()) {
|
|
597
|
+
this._inlineError = this.getAttribute("error") || this._translations().invalidTime, this._emitInvalid(this._draft, "parse"), this._updateHostState();
|
|
598
|
+
return;
|
|
599
|
+
}
|
|
600
|
+
this._commit(n, "enter"), this._isInlineMode() || this._setOpen(!1, "enter");
|
|
601
|
+
return;
|
|
602
|
+
}
|
|
603
|
+
if (e.key === "Escape" && this._open && !this._isInlineMode()) {
|
|
604
|
+
e.preventDefault(), this._setOpen(!1, "escape");
|
|
605
|
+
return;
|
|
606
|
+
}
|
|
607
|
+
e.key === "ArrowDown" && !this._open && !this._isInlineMode() && (e.preventDefault(), this._setOpen(!0, "keyboard"));
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
_onOverlayClick(t) {
|
|
611
|
+
var n;
|
|
612
|
+
const e = t.target;
|
|
613
|
+
if (!e)
|
|
614
|
+
return;
|
|
615
|
+
const i = (n = e.closest("[data-action]")) == null ? void 0 : n.getAttribute("data-action");
|
|
616
|
+
if (i) {
|
|
617
|
+
if (i === "backdrop") {
|
|
618
|
+
this._setOpen(!1, "outside");
|
|
619
|
+
return;
|
|
620
|
+
}
|
|
621
|
+
if (i === "cancel") {
|
|
622
|
+
this._pending = this._value, this._setOpen(!1, "cancel");
|
|
623
|
+
return;
|
|
624
|
+
}
|
|
625
|
+
if (i === "clear") {
|
|
626
|
+
this._pending = null, this._emitInput("clear"), this._renderOverlay();
|
|
627
|
+
return;
|
|
628
|
+
}
|
|
629
|
+
if (i === "now") {
|
|
630
|
+
const s = /* @__PURE__ */ new Date(), o = _(s.getHours(), s.getMinutes(), s.getSeconds(), this._withSeconds());
|
|
631
|
+
this._pending = this._clampToBounds(o), this._emitInput("now"), this._renderOverlay();
|
|
632
|
+
return;
|
|
633
|
+
}
|
|
634
|
+
i === "apply" && (this._commit(this._pending, "apply"), this._setOpen(!1, "apply"));
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
_onOverlayChange(t) {
|
|
638
|
+
const e = t.target;
|
|
639
|
+
e instanceof HTMLSelectElement && e.matches("select[data-segment]") && this._applySegmentsFromOverlay();
|
|
640
|
+
}
|
|
641
|
+
_onDocumentPointerDown(t) {
|
|
642
|
+
if (!this._open || !this._overlay)
|
|
643
|
+
return;
|
|
644
|
+
const e = t.composedPath();
|
|
645
|
+
e.includes(this) || e.includes(this._overlay) || this._setOpen(!1, "outside");
|
|
646
|
+
}
|
|
647
|
+
_onDocumentKeyDown(t) {
|
|
648
|
+
this._open && t.key === "Escape" && (t.preventDefault(), this._setOpen(!1, "escape"));
|
|
649
|
+
}
|
|
650
|
+
_cacheDomRefs() {
|
|
651
|
+
this._labelEl = this.root.querySelector(".label"), this._labelTextEl = this.root.querySelector(".label-text"), this._requiredEl = this.root.querySelector(".required"), this._fieldEl = this.root.querySelector(".field"), this._inputEl = this.root.querySelector(".input"), this._clearBtn = this.root.querySelector('.btn[data-action="clear"]'), this._toggleBtn = this.root.querySelector('.btn[data-action="toggle"]'), this._hintEl = this.root.querySelector(".hint"), this._errorEl = this.root.querySelector(".error"), this._hiddenInputEl = this.root.querySelector(".hidden-input");
|
|
652
|
+
}
|
|
653
|
+
_updateHostState() {
|
|
654
|
+
if (!this._hasView)
|
|
655
|
+
return;
|
|
656
|
+
const t = this.getAttribute("label") || "", e = this.getAttribute("hint") || "", i = this.getAttribute("error") || "", n = this._inlineError || i, s = !!this._value, o = this.getAttribute("name") || "", r = this._allowInput() ? this._draft : this._formatDisplay(this._value), l = this._isInlineMode(), a = this._isDisabled(), d = this._translations();
|
|
657
|
+
this._labelEl && (this._labelEl.hidden = !t), this._labelTextEl && (this._labelTextEl.textContent = t), this._requiredEl && (this._requiredEl.hidden = !this.hasAttribute("required")), this._inputEl && (this._inputEl.value !== r && (this._inputEl.value = r), this._inputEl.placeholder = this._withSeconds() ? d.timePlaceholderSeconds : d.timePlaceholder, this._inputEl.readOnly = !this._allowInput() || this._isReadonly(), this._inputEl.disabled = a, this._inputEl.required = this.hasAttribute("required")), this._clearBtn && (this._clearBtn.hidden = !(this._clearable() && s), this._clearBtn.disabled = a || this._isReadonly(), this._clearBtn.setAttribute("aria-label", d.clear)), this._toggleBtn && (this._toggleBtn.hidden = l, this._toggleBtn.disabled = a || this._isReadonly(), this._toggleBtn.setAttribute("aria-label", d.toggleCalendar)), this._hintEl && (this._hintEl.hidden = !e, this._hintEl.textContent = e), this._errorEl && (this._errorEl.hidden = !n, this._errorEl.textContent = n), this._hiddenInputEl && (this._hiddenInputEl.disabled = !o, this._hiddenInputEl.name = o, this._hiddenInputEl.value = this._value || ""), !l && this._open && this._syncOverlayState();
|
|
658
|
+
}
|
|
659
|
+
render() {
|
|
660
|
+
this._hasView || (this.setContent(`
|
|
661
|
+
<style>${D}</style>
|
|
662
|
+
<div class="root">
|
|
663
|
+
<label class="label" part="label">
|
|
664
|
+
<span class="label-text"></span>
|
|
665
|
+
<span class="required">*</span>
|
|
666
|
+
</label>
|
|
667
|
+
<div class="field" part="field input">
|
|
668
|
+
<span class="icon" part="icon">${O}</span>
|
|
669
|
+
<input class="input" part="input" />
|
|
670
|
+
<button type="button" class="btn" part="clear" data-action="clear">${I}</button>
|
|
671
|
+
<button type="button" class="btn" part="toggle" data-action="toggle">${A}</button>
|
|
672
|
+
</div>
|
|
673
|
+
<div class="hint" part="hint"></div>
|
|
674
|
+
<div class="error" part="error" role="alert"></div>
|
|
675
|
+
<input class="hidden-input" type="hidden" disabled />
|
|
676
|
+
</div>
|
|
677
|
+
`, { force: !0 }), this._cacheDomRefs(), this._hasView = !0), this._updateHostState();
|
|
678
|
+
}
|
|
679
|
+
shouldRenderOnAttributeChange(t, e, i) {
|
|
680
|
+
return !1;
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
typeof customElements < "u" && !customElements.get("ui-time-picker") && customElements.define("ui-time-picker", M);
|
|
684
|
+
export {
|
|
685
|
+
M as UITimePicker
|
|
686
|
+
};
|