@editora/ui-core 0.1.9 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -0
- package/dist/ElementBase-1b301e7f.js +1 -0
- package/dist/ElementBase-909688f3.mjs +79 -0
- package/dist/accordion.cjs.js +360 -0
- package/dist/accordion.esm.js +647 -0
- package/dist/alert-dialog.cjs.js +567 -0
- package/dist/alert-dialog.esm.js +1043 -0
- package/dist/alert.cjs.js +351 -0
- package/dist/alert.esm.js +450 -0
- package/dist/anchor.cjs.js +30 -0
- package/dist/anchor.esm.js +62 -0
- package/dist/animated-beam.cjs.js +720 -0
- package/dist/animated-beam.esm.js +1540 -0
- package/dist/animated-list.cjs.js +672 -0
- package/dist/animated-list.esm.js +1137 -0
- package/dist/animated-text.cjs.js +683 -0
- package/dist/animated-text.esm.js +1020 -0
- package/dist/app-header.cjs.js +345 -0
- package/dist/app-header.esm.js +398 -0
- package/dist/aspect-ratio.cjs.js +294 -0
- package/dist/aspect-ratio.esm.js +416 -0
- package/dist/avatar.cjs.js +365 -0
- package/dist/avatar.esm.js +513 -0
- package/dist/badge.cjs.js +432 -0
- package/dist/badge.esm.js +554 -0
- package/dist/block-controls.cjs.js +347 -0
- package/dist/block-controls.esm.js +556 -0
- package/dist/box.cjs.js +226 -0
- package/dist/box.esm.js +556 -0
- package/dist/breadcrumb.cjs.js +288 -0
- package/dist/breadcrumb.esm.js +523 -0
- package/dist/button.cjs.js +521 -0
- package/dist/button.esm.js +671 -0
- package/dist/calendar-2c11b824.mjs +1685 -0
- package/dist/calendar-a8735e40.js +741 -0
- package/dist/calendar.cjs.js +1 -0
- package/dist/calendar.esm.js +11 -0
- package/dist/card.cjs.js +306 -0
- package/dist/card.esm.js +378 -0
- package/dist/chart.cjs.js +783 -0
- package/dist/chart.esm.js +1369 -0
- package/dist/checkbox.cjs.js +338 -0
- package/dist/checkbox.esm.js +455 -0
- package/dist/collapsible.cjs.js +381 -0
- package/dist/collapsible.esm.js +548 -0
- package/dist/collection-a1aac0c6.mjs +56 -0
- package/dist/collection-a2969ad2.js +1 -0
- package/dist/collection.cjs.js +1 -0
- package/dist/collection.esm.js +136 -0
- package/dist/color-picker.cjs.js +803 -0
- package/dist/color-picker.esm.js +1809 -0
- package/dist/combobox.cjs.js +525 -0
- package/dist/combobox.esm.js +1023 -0
- package/dist/command-palette.cjs.js +67 -0
- package/dist/command-palette.esm.js +181 -0
- package/dist/command.cjs.js +130 -0
- package/dist/command.esm.js +307 -0
- package/dist/container.cjs.js +115 -0
- package/dist/container.esm.js +156 -0
- package/dist/context-menu.cjs.js +357 -0
- package/dist/context-menu.esm.js +1204 -0
- package/dist/control-group.cjs.js +80 -0
- package/dist/control-group.esm.js +110 -0
- package/dist/data-table.cjs.js +682 -0
- package/dist/data-table.esm.js +1660 -0
- package/dist/date-field.cjs.js +142 -0
- package/dist/date-field.esm.js +384 -0
- package/dist/date-picker.cjs.js +570 -0
- package/dist/date-picker.esm.js +1067 -0
- package/dist/date-range-picker.cjs.js +455 -0
- package/dist/date-range-picker.esm.js +973 -0
- package/dist/date-range-time-picker.cjs.js +573 -0
- package/dist/date-range-time-picker.esm.js +1137 -0
- package/dist/date-time-picker.cjs.js +495 -0
- package/dist/date-time-picker.esm.js +1062 -0
- package/dist/date-time-utils-5cf58cd0.js +1 -0
- package/dist/date-time-utils-bdceb7af.mjs +273 -0
- package/dist/description.cjs.js +85 -0
- package/dist/description.esm.js +136 -0
- package/dist/dialog.cjs.js +406 -0
- package/dist/dialog.esm.js +822 -0
- package/dist/direction-provider.cjs.js +30 -0
- package/dist/direction-provider.esm.js +74 -0
- package/dist/dismissable-layer-193e3bed.js +1 -0
- package/dist/dismissable-layer-9c7e6b58.mjs +112 -0
- package/dist/dismissable-layer.cjs.js +6 -0
- package/dist/dismissable-layer.esm.js +115 -0
- package/dist/dock.cjs.js +347 -0
- package/dist/dock.esm.js +826 -0
- package/dist/drawer.cjs.js +538 -0
- package/dist/drawer.esm.js +872 -0
- package/dist/dropdown.cjs.js +511 -0
- package/dist/dropdown.esm.js +1084 -0
- package/dist/dropzone.cjs.js +1 -0
- package/dist/dropzone.esm.js +11 -0
- package/dist/empty-state.cjs.js +169 -0
- package/dist/empty-state.esm.js +199 -0
- package/dist/field-error.cjs.js +74 -0
- package/dist/field-error.esm.js +125 -0
- package/dist/field.cjs.js +398 -0
- package/dist/field.esm.js +542 -0
- package/dist/fieldset.cjs.js +214 -0
- package/dist/fieldset.esm.js +298 -0
- package/dist/file-upload.cjs.js +353 -0
- package/dist/file-upload.esm.js +740 -0
- package/dist/flex.cjs.js +54 -0
- package/dist/flex.esm.js +168 -0
- package/dist/floating-toolbar.cjs.js +223 -0
- package/dist/floating-toolbar.esm.js +513 -0
- package/dist/focus-scope-103833ee.mjs +147 -0
- package/dist/focus-scope-2b12b4e7.js +1 -0
- package/dist/focus-scope.cjs.js +6 -0
- package/dist/focus-scope.esm.js +97 -0
- package/dist/form.cjs.js +377 -0
- package/dist/form.esm.js +862 -0
- package/dist/gantt.cjs.js +157 -0
- package/dist/gantt.esm.js +214 -0
- package/dist/grid.cjs.js +67 -0
- package/dist/grid.esm.js +211 -0
- package/dist/hover-card.cjs.js +284 -0
- package/dist/hover-card.esm.js +470 -0
- package/dist/icon-9ed13093.mjs +364 -0
- package/dist/icon-cloud.cjs.js +495 -0
- package/dist/icon-cloud.esm.js +828 -0
- package/dist/icon-eaa486b3.js +207 -0
- package/dist/icon.cjs.js +1 -0
- package/dist/icon.esm.js +6 -0
- package/dist/index.cjs.js +1 -36010
- package/dist/index.esm.js +440 -66615
- package/dist/inline-edit.cjs.js +118 -0
- package/dist/inline-edit.esm.js +206 -0
- package/dist/input.cjs.js +535 -0
- package/dist/input.esm.js +790 -0
- package/dist/label.cjs.js +195 -0
- package/dist/label.esm.js +301 -0
- package/dist/layout.cjs.js +266 -0
- package/dist/layout.esm.js +408 -0
- package/dist/listbox-308789a0.mjs +210 -0
- package/dist/listbox-ef2f708e.js +46 -0
- package/dist/listbox.cjs.js +1 -0
- package/dist/listbox.esm.js +6 -0
- package/dist/marquee.cjs.js +513 -0
- package/dist/marquee.esm.js +767 -0
- package/dist/masonry-grid.cjs.js +65 -0
- package/dist/masonry-grid.esm.js +180 -0
- package/dist/menu-item-styles-27fdbac4.mjs +181 -0
- package/dist/menu-item-styles-83ad1e22.js +152 -0
- package/dist/menu.cjs.js +275 -0
- package/dist/menu.esm.js +743 -0
- package/dist/menubar.cjs.js +455 -0
- package/dist/menubar.esm.js +1195 -0
- package/dist/meter.cjs.js +241 -0
- package/dist/meter.esm.js +334 -0
- package/dist/multi-select.cjs.js +549 -0
- package/dist/multi-select.esm.js +914 -0
- package/dist/navigation-menu.cjs.js +382 -0
- package/dist/navigation-menu.esm.js +614 -0
- package/dist/number-field.cjs.js +351 -0
- package/dist/number-field.esm.js +771 -0
- package/dist/number-ticker.cjs.js +209 -0
- package/dist/number-ticker.esm.js +749 -0
- package/dist/odometer.cjs.js +313 -0
- package/dist/odometer.esm.js +565 -0
- package/dist/orbiter.cjs.js +495 -0
- package/dist/orbiter.esm.js +831 -0
- package/dist/overlayManager-86454af7.mjs +58 -0
- package/dist/overlayManager-ece06517.js +1 -0
- package/dist/pagination.cjs.js +201 -0
- package/dist/pagination.esm.js +297 -0
- package/dist/panel-group-40254cdd.js +36 -0
- package/dist/panel-group-a376cc5e.mjs +326 -0
- package/dist/panel-group.cjs.js +1 -0
- package/dist/panel-group.esm.js +7 -0
- package/dist/panel.cjs.js +22 -0
- package/dist/panel.esm.js +46 -0
- package/dist/password-field.cjs.js +626 -0
- package/dist/password-field.esm.js +925 -0
- package/dist/pin-input.cjs.js +185 -0
- package/dist/pin-input.esm.js +412 -0
- package/dist/placement-grid.cjs.js +99 -0
- package/dist/placement-grid.esm.js +486 -0
- package/dist/plugin-panel.cjs.js +131 -0
- package/dist/plugin-panel.esm.js +173 -0
- package/dist/popover.cjs.js +286 -0
- package/dist/popover.esm.js +483 -0
- package/dist/portal-1cf392ca.mjs +114 -0
- package/dist/portal-d8d7fbca.js +1 -0
- package/dist/portal.cjs.js +39 -0
- package/dist/portal.esm.js +187 -0
- package/dist/positioner-accc6e5f.js +1 -0
- package/dist/positioner-fbd61bf1.mjs +132 -0
- package/dist/positioner.cjs.js +6 -0
- package/dist/positioner.esm.js +137 -0
- package/dist/presence.cjs.js +164 -0
- package/dist/presence.esm.js +301 -0
- package/dist/progress.cjs.js +329 -0
- package/dist/progress.esm.js +453 -0
- package/dist/quick-actions.cjs.js +202 -0
- package/dist/quick-actions.esm.js +357 -0
- package/dist/radio-group.cjs.js +257 -0
- package/dist/radio-group.esm.js +477 -0
- package/dist/rating.cjs.js +355 -0
- package/dist/rating.esm.js +637 -0
- package/dist/roving-focus-group-4350c9a7.mjs +50 -0
- package/dist/roving-focus-group-5c059bf9.js +1 -0
- package/dist/roving-focus-group.cjs.js +1 -0
- package/dist/roving-focus-group.esm.js +72 -0
- package/dist/{runtime-3cc1c386.mjs → runtime-4ac0107b.mjs} +348 -459
- package/dist/runtime-5f282bc8.js +1 -0
- package/dist/runtime.cjs.js +1 -1
- package/dist/runtime.esm.js +24 -23
- package/dist/scroll-area.cjs.js +294 -0
- package/dist/scroll-area.esm.js +478 -0
- package/dist/scroll-lock-48793569.js +1 -0
- package/dist/scroll-lock-9de6d328.mjs +53 -0
- package/dist/section.cjs.js +167 -0
- package/dist/section.esm.js +202 -0
- package/dist/select.cjs.js +799 -0
- package/dist/select.esm.js +1266 -0
- package/dist/selection-popup.cjs.js +203 -0
- package/dist/selection-popup.esm.js +392 -0
- package/dist/separator.cjs.js +221 -0
- package/dist/separator.esm.js +241 -0
- package/dist/sidebar.cjs.js +769 -0
- package/dist/sidebar.esm.js +1219 -0
- package/dist/skeleton.cjs.js +205 -0
- package/dist/skeleton.esm.js +249 -0
- package/dist/slider.cjs.js +493 -0
- package/dist/slider.esm.js +694 -0
- package/dist/slot.cjs.js +159 -0
- package/dist/slot.esm.js +227 -0
- package/dist/sortable.cjs.js +855 -1
- package/dist/sortable.esm.js +2176 -2
- package/dist/spinning-text.cjs.js +395 -0
- package/dist/spinning-text.esm.js +635 -0
- package/dist/split-button.cjs.js +410 -0
- package/dist/split-button.esm.js +619 -0
- package/dist/splitter.cjs.js +70 -0
- package/dist/splitter.esm.js +105 -0
- package/dist/standalone/accordion.d.ts +2 -0
- package/dist/standalone/accordion.d.ts.map +1 -0
- package/dist/standalone/alert-dialog.d.ts +2 -0
- package/dist/standalone/alert-dialog.d.ts.map +1 -0
- package/dist/standalone/alert.d.ts +2 -0
- package/dist/standalone/alert.d.ts.map +1 -0
- package/dist/standalone/anchor.d.ts +2 -0
- package/dist/standalone/anchor.d.ts.map +1 -0
- package/dist/standalone/animated-beam.d.ts +2 -0
- package/dist/standalone/animated-beam.d.ts.map +1 -0
- package/dist/standalone/animated-list.d.ts +2 -0
- package/dist/standalone/animated-list.d.ts.map +1 -0
- package/dist/standalone/animated-text.d.ts +2 -0
- package/dist/standalone/animated-text.d.ts.map +1 -0
- package/dist/standalone/app-header.d.ts +2 -0
- package/dist/standalone/app-header.d.ts.map +1 -0
- package/dist/standalone/aspect-ratio.d.ts +2 -0
- package/dist/standalone/aspect-ratio.d.ts.map +1 -0
- package/dist/standalone/avatar.d.ts +2 -0
- package/dist/standalone/avatar.d.ts.map +1 -0
- package/dist/standalone/badge.d.ts +2 -0
- package/dist/standalone/badge.d.ts.map +1 -0
- package/dist/standalone/block-controls.d.ts +2 -0
- package/dist/standalone/block-controls.d.ts.map +1 -0
- package/dist/standalone/box.d.ts +2 -0
- package/dist/standalone/box.d.ts.map +1 -0
- package/dist/standalone/breadcrumb.d.ts +2 -0
- package/dist/standalone/breadcrumb.d.ts.map +1 -0
- package/dist/standalone/button.d.ts +2 -0
- package/dist/standalone/button.d.ts.map +1 -0
- package/dist/standalone/calendar.d.ts +2 -0
- package/dist/standalone/calendar.d.ts.map +1 -0
- package/dist/standalone/card.d.ts +2 -0
- package/dist/standalone/card.d.ts.map +1 -0
- package/dist/standalone/chart.d.ts +2 -0
- package/dist/standalone/chart.d.ts.map +1 -0
- package/dist/standalone/checkbox.d.ts +2 -0
- package/dist/standalone/checkbox.d.ts.map +1 -0
- package/dist/standalone/collapsible.d.ts +2 -0
- package/dist/standalone/collapsible.d.ts.map +1 -0
- package/dist/standalone/collection.d.ts +2 -0
- package/dist/standalone/collection.d.ts.map +1 -0
- package/dist/standalone/color-picker.d.ts +2 -0
- package/dist/standalone/color-picker.d.ts.map +1 -0
- package/dist/standalone/combobox.d.ts +2 -0
- package/dist/standalone/combobox.d.ts.map +1 -0
- package/dist/standalone/command-palette.d.ts +2 -0
- package/dist/standalone/command-palette.d.ts.map +1 -0
- package/dist/standalone/command.d.ts +2 -0
- package/dist/standalone/command.d.ts.map +1 -0
- package/dist/standalone/container.d.ts +2 -0
- package/dist/standalone/container.d.ts.map +1 -0
- package/dist/standalone/context-menu.d.ts +2 -0
- package/dist/standalone/context-menu.d.ts.map +1 -0
- package/dist/standalone/control-group.d.ts +2 -0
- package/dist/standalone/control-group.d.ts.map +1 -0
- package/dist/standalone/data-table.d.ts +2 -0
- package/dist/standalone/data-table.d.ts.map +1 -0
- package/dist/standalone/date-field.d.ts +2 -0
- package/dist/standalone/date-field.d.ts.map +1 -0
- package/dist/standalone/date-picker.d.ts +2 -0
- package/dist/standalone/date-picker.d.ts.map +1 -0
- package/dist/standalone/date-range-picker.d.ts +2 -0
- package/dist/standalone/date-range-picker.d.ts.map +1 -0
- package/dist/standalone/date-range-time-picker.d.ts +2 -0
- package/dist/standalone/date-range-time-picker.d.ts.map +1 -0
- package/dist/standalone/date-time-picker.d.ts +2 -0
- package/dist/standalone/date-time-picker.d.ts.map +1 -0
- package/dist/standalone/description.d.ts +2 -0
- package/dist/standalone/description.d.ts.map +1 -0
- package/dist/standalone/dialog.d.ts +2 -0
- package/dist/standalone/dialog.d.ts.map +1 -0
- package/dist/standalone/direction-provider.d.ts +2 -0
- package/dist/standalone/direction-provider.d.ts.map +1 -0
- package/dist/standalone/dismissable-layer.d.ts +2 -0
- package/dist/standalone/dismissable-layer.d.ts.map +1 -0
- package/dist/standalone/dock.d.ts +2 -0
- package/dist/standalone/dock.d.ts.map +1 -0
- package/dist/standalone/drawer.d.ts +2 -0
- package/dist/standalone/drawer.d.ts.map +1 -0
- package/dist/standalone/dropdown.d.ts +2 -0
- package/dist/standalone/dropdown.d.ts.map +1 -0
- package/dist/standalone/dropzone.d.ts +2 -0
- package/dist/standalone/dropzone.d.ts.map +1 -0
- package/dist/standalone/empty-state.d.ts +2 -0
- package/dist/standalone/empty-state.d.ts.map +1 -0
- package/dist/standalone/field-error.d.ts +2 -0
- package/dist/standalone/field-error.d.ts.map +1 -0
- package/dist/standalone/field.d.ts +2 -0
- package/dist/standalone/field.d.ts.map +1 -0
- package/dist/standalone/fieldset.d.ts +2 -0
- package/dist/standalone/fieldset.d.ts.map +1 -0
- package/dist/standalone/file-upload.d.ts +2 -0
- package/dist/standalone/file-upload.d.ts.map +1 -0
- package/dist/standalone/flex.d.ts +2 -0
- package/dist/standalone/flex.d.ts.map +1 -0
- package/dist/standalone/floating-toolbar.d.ts +2 -0
- package/dist/standalone/floating-toolbar.d.ts.map +1 -0
- package/dist/standalone/focus-scope.d.ts +2 -0
- package/dist/standalone/focus-scope.d.ts.map +1 -0
- package/dist/standalone/form.d.ts +2 -0
- package/dist/standalone/form.d.ts.map +1 -0
- package/dist/standalone/gantt.d.ts +2 -0
- package/dist/standalone/gantt.d.ts.map +1 -0
- package/dist/standalone/grid.d.ts +2 -0
- package/dist/standalone/grid.d.ts.map +1 -0
- package/dist/standalone/hover-card.d.ts +2 -0
- package/dist/standalone/hover-card.d.ts.map +1 -0
- package/dist/standalone/icon-cloud.d.ts +2 -0
- package/dist/standalone/icon-cloud.d.ts.map +1 -0
- package/dist/standalone/icon.d.ts +2 -0
- package/dist/standalone/icon.d.ts.map +1 -0
- package/dist/standalone/inline-edit.d.ts +2 -0
- package/dist/standalone/inline-edit.d.ts.map +1 -0
- package/dist/standalone/input.d.ts +2 -0
- package/dist/standalone/input.d.ts.map +1 -0
- package/dist/standalone/label.d.ts +2 -0
- package/dist/standalone/label.d.ts.map +1 -0
- package/dist/standalone/layout.d.ts +2 -0
- package/dist/standalone/layout.d.ts.map +1 -0
- package/dist/standalone/listbox.d.ts +2 -0
- package/dist/standalone/listbox.d.ts.map +1 -0
- package/dist/standalone/marquee.d.ts +2 -0
- package/dist/standalone/marquee.d.ts.map +1 -0
- package/dist/standalone/masonry-grid.d.ts +2 -0
- package/dist/standalone/masonry-grid.d.ts.map +1 -0
- package/dist/standalone/menu.d.ts +2 -0
- package/dist/standalone/menu.d.ts.map +1 -0
- package/dist/standalone/menubar.d.ts +2 -0
- package/dist/standalone/menubar.d.ts.map +1 -0
- package/dist/standalone/meter.d.ts +2 -0
- package/dist/standalone/meter.d.ts.map +1 -0
- package/dist/standalone/multi-select.d.ts +2 -0
- package/dist/standalone/multi-select.d.ts.map +1 -0
- package/dist/standalone/navigation-menu.d.ts +2 -0
- package/dist/standalone/navigation-menu.d.ts.map +1 -0
- package/dist/standalone/number-field.d.ts +2 -0
- package/dist/standalone/number-field.d.ts.map +1 -0
- package/dist/standalone/number-ticker.d.ts +2 -0
- package/dist/standalone/number-ticker.d.ts.map +1 -0
- package/dist/standalone/odometer.d.ts +2 -0
- package/dist/standalone/odometer.d.ts.map +1 -0
- package/dist/standalone/orbiter.d.ts +2 -0
- package/dist/standalone/orbiter.d.ts.map +1 -0
- package/dist/standalone/pagination.d.ts +2 -0
- package/dist/standalone/pagination.d.ts.map +1 -0
- package/dist/standalone/panel-group.d.ts +2 -0
- package/dist/standalone/panel-group.d.ts.map +1 -0
- package/dist/standalone/panel.d.ts +2 -0
- package/dist/standalone/panel.d.ts.map +1 -0
- package/dist/standalone/password-field.d.ts +2 -0
- package/dist/standalone/password-field.d.ts.map +1 -0
- package/dist/standalone/pin-input.d.ts +2 -0
- package/dist/standalone/pin-input.d.ts.map +1 -0
- package/dist/standalone/placement-grid.d.ts +2 -0
- package/dist/standalone/placement-grid.d.ts.map +1 -0
- package/dist/standalone/plugin-panel.d.ts +2 -0
- package/dist/standalone/plugin-panel.d.ts.map +1 -0
- package/dist/standalone/popover.d.ts +2 -0
- package/dist/standalone/popover.d.ts.map +1 -0
- package/dist/standalone/portal.d.ts +2 -0
- package/dist/standalone/portal.d.ts.map +1 -0
- package/dist/standalone/positioner.d.ts +2 -0
- package/dist/standalone/positioner.d.ts.map +1 -0
- package/dist/standalone/presence.d.ts +2 -0
- package/dist/standalone/presence.d.ts.map +1 -0
- package/dist/standalone/progress.d.ts +2 -0
- package/dist/standalone/progress.d.ts.map +1 -0
- package/dist/standalone/quick-actions.d.ts +2 -0
- package/dist/standalone/quick-actions.d.ts.map +1 -0
- package/dist/standalone/radio-group.d.ts +2 -0
- package/dist/standalone/radio-group.d.ts.map +1 -0
- package/dist/standalone/rating.d.ts +2 -0
- package/dist/standalone/rating.d.ts.map +1 -0
- package/dist/standalone/roving-focus-group.d.ts +2 -0
- package/dist/standalone/roving-focus-group.d.ts.map +1 -0
- package/dist/standalone/scroll-area.d.ts +2 -0
- package/dist/standalone/scroll-area.d.ts.map +1 -0
- package/dist/standalone/section.d.ts +2 -0
- package/dist/standalone/section.d.ts.map +1 -0
- package/dist/standalone/select.d.ts +2 -0
- package/dist/standalone/select.d.ts.map +1 -0
- package/dist/standalone/selection-popup.d.ts +2 -0
- package/dist/standalone/selection-popup.d.ts.map +1 -0
- package/dist/standalone/separator.d.ts +2 -0
- package/dist/standalone/separator.d.ts.map +1 -0
- package/dist/standalone/sidebar.d.ts +2 -0
- package/dist/standalone/sidebar.d.ts.map +1 -0
- package/dist/standalone/skeleton.d.ts +2 -0
- package/dist/standalone/skeleton.d.ts.map +1 -0
- package/dist/standalone/slider.d.ts +2 -0
- package/dist/standalone/slider.d.ts.map +1 -0
- package/dist/standalone/slot.d.ts +2 -0
- package/dist/standalone/slot.d.ts.map +1 -0
- package/dist/standalone/spinning-text.d.ts +2 -0
- package/dist/standalone/spinning-text.d.ts.map +1 -0
- package/dist/standalone/split-button.d.ts +2 -0
- package/dist/standalone/split-button.d.ts.map +1 -0
- package/dist/standalone/splitter.d.ts +2 -0
- package/dist/standalone/splitter.d.ts.map +1 -0
- package/dist/standalone/stepper.d.ts +2 -0
- package/dist/standalone/stepper.d.ts.map +1 -0
- package/dist/standalone/switch.d.ts +2 -0
- package/dist/standalone/switch.d.ts.map +1 -0
- package/dist/standalone/table.d.ts +2 -0
- package/dist/standalone/table.d.ts.map +1 -0
- package/dist/standalone/tabs.d.ts +2 -0
- package/dist/standalone/tabs.d.ts.map +1 -0
- package/dist/standalone/tags-input.d.ts +2 -0
- package/dist/standalone/tags-input.d.ts.map +1 -0
- package/dist/standalone/textarea.d.ts +2 -0
- package/dist/standalone/textarea.d.ts.map +1 -0
- package/dist/standalone/time-field.d.ts +2 -0
- package/dist/standalone/time-field.d.ts.map +1 -0
- package/dist/standalone/time-picker.d.ts +2 -0
- package/dist/standalone/time-picker.d.ts.map +1 -0
- package/dist/standalone/timeline.d.ts +2 -0
- package/dist/standalone/timeline.d.ts.map +1 -0
- package/dist/standalone/toast.d.ts +2 -0
- package/dist/standalone/toast.d.ts.map +1 -0
- package/dist/standalone/toggle-group.d.ts +2 -0
- package/dist/standalone/toggle-group.d.ts.map +1 -0
- package/dist/standalone/toggle.d.ts +2 -0
- package/dist/standalone/toggle.d.ts.map +1 -0
- package/dist/standalone/toolbar.d.ts +2 -0
- package/dist/standalone/toolbar.d.ts.map +1 -0
- package/dist/standalone/tooltip.d.ts +2 -0
- package/dist/standalone/tooltip.d.ts.map +1 -0
- package/dist/standalone/transfer-list.d.ts +2 -0
- package/dist/standalone/transfer-list.d.ts.map +1 -0
- package/dist/standalone/tree-item.d.ts +2 -0
- package/dist/standalone/tree-item.d.ts.map +1 -0
- package/dist/standalone/tree.d.ts +2 -0
- package/dist/standalone/tree.d.ts.map +1 -0
- package/dist/standalone/visually-hidden.d.ts +2 -0
- package/dist/standalone/visually-hidden.d.ts.map +1 -0
- package/dist/standalone/wizard.d.ts +2 -0
- package/dist/standalone/wizard.d.ts.map +1 -0
- package/dist/stepper.cjs.js +337 -0
- package/dist/stepper.esm.js +578 -0
- package/dist/switch.cjs.js +397 -0
- package/dist/switch.esm.js +543 -0
- package/dist/table.cjs.js +212 -0
- package/dist/table.esm.js +432 -0
- package/dist/tabs.cjs.js +515 -0
- package/dist/tabs.esm.js +808 -0
- package/dist/tags-input.cjs.js +202 -0
- package/dist/tags-input.esm.js +436 -0
- package/dist/textarea.cjs.js +329 -0
- package/dist/textarea.esm.js +520 -0
- package/dist/time-field.cjs.js +142 -0
- package/dist/time-field.esm.js +387 -0
- package/dist/time-picker.cjs.js +284 -0
- package/dist/time-picker.esm.js +686 -0
- package/dist/timeline.cjs.js +198 -0
- package/dist/timeline.esm.js +248 -0
- package/dist/toast.cjs.js +234 -0
- package/dist/toast.esm.js +399 -0
- package/dist/toggle-group.cjs.js +131 -0
- package/dist/toggle-group.esm.js +382 -0
- package/dist/toggle.cjs.js +237 -0
- package/dist/toggle.esm.js +346 -0
- package/dist/toolbar.cjs.js +126 -0
- package/dist/toolbar.esm.js +240 -0
- package/dist/tooltip.cjs.js +159 -0
- package/dist/tooltip.esm.js +376 -0
- package/dist/transfer-list.cjs.js +734 -0
- package/dist/transfer-list.esm.js +969 -0
- package/dist/tree-0a7a8d05.js +39 -0
- package/dist/tree-dcd74a4a.mjs +294 -0
- package/dist/tree-item.cjs.js +103 -0
- package/dist/tree-item.esm.js +143 -0
- package/dist/tree.cjs.js +1 -0
- package/dist/tree.esm.js +7 -0
- package/dist/visually-hidden.cjs.js +42 -0
- package/dist/visually-hidden.esm.js +68 -0
- package/dist/wizard.cjs.js +677 -0
- package/dist/wizard.esm.js +1068 -0
- package/package.json +7 -1
- package/dist/runtime-41717c1e.js +0 -1
- package/dist/sortable-06a3bd6c.js +0 -855
- package/dist/sortable-23bf110b.mjs +0 -2254
|
@@ -0,0 +1,1023 @@
|
|
|
1
|
+
import { E as k } from "./ElementBase-909688f3.mjs";
|
|
2
|
+
import { n as h } from "./collection-a1aac0c6.mjs";
|
|
3
|
+
import { c as C } from "./dismissable-layer-9c7e6b58.mjs";
|
|
4
|
+
import { r as A } from "./listbox-308789a0.mjs";
|
|
5
|
+
import "./collection.esm.js";
|
|
6
|
+
const L = `
|
|
7
|
+
<svg viewBox="0 0 20 20" aria-hidden="true" focusable="false">
|
|
8
|
+
<path d="m6 6 8 8M14 6l-8 8" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/>
|
|
9
|
+
</svg>
|
|
10
|
+
`, $ = `
|
|
11
|
+
<svg viewBox="0 0 20 20" aria-hidden="true" focusable="false">
|
|
12
|
+
<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"/>
|
|
13
|
+
</svg>
|
|
14
|
+
`, E = `
|
|
15
|
+
:host {
|
|
16
|
+
--ui-combobox-width: var(--ui-width, 100%);
|
|
17
|
+
--ui-combobox-min-width: 248px;
|
|
18
|
+
--ui-combobox-height: 42px;
|
|
19
|
+
--ui-combobox-padding-x: 12px;
|
|
20
|
+
--ui-combobox-radius: var(--ui-radius, 12px);
|
|
21
|
+
--ui-combobox-bg: color-mix(in srgb, var(--ui-color-surface, #ffffff) 96%, transparent);
|
|
22
|
+
--ui-combobox-text: var(--ui-color-text, #0f172a);
|
|
23
|
+
--ui-combobox-muted: var(--ui-color-muted, #64748b);
|
|
24
|
+
--ui-combobox-border-color: color-mix(in srgb, var(--ui-color-border, #cbd5e1) 78%, transparent);
|
|
25
|
+
--ui-combobox-border: 1px solid var(--ui-combobox-border-color);
|
|
26
|
+
--ui-combobox-shadow: none;
|
|
27
|
+
--ui-combobox-shadow-hover: none;
|
|
28
|
+
--ui-combobox-shadow-focus: none;
|
|
29
|
+
--ui-combobox-focus: var(--ui-color-primary, #2563eb);
|
|
30
|
+
--ui-combobox-panel-bg: color-mix(in srgb, var(--ui-color-surface, #ffffff) 98%, transparent);
|
|
31
|
+
--ui-combobox-panel-border: 1px solid color-mix(in srgb, var(--ui-combobox-border-color) 80%, transparent);
|
|
32
|
+
--ui-combobox-panel-shadow: none;
|
|
33
|
+
--ui-combobox-panel-z: 1600;
|
|
34
|
+
--ui-combobox-option-hover: color-mix(in srgb, var(--ui-color-primary, #2563eb) 11%, transparent);
|
|
35
|
+
--ui-combobox-option-active: color-mix(in srgb, var(--ui-color-primary, #2563eb) 18%, transparent);
|
|
36
|
+
--ui-combobox-error: var(--ui-color-danger, #dc2626);
|
|
37
|
+
--ui-combobox-success: var(--ui-color-success, #16a34a);
|
|
38
|
+
--ui-combobox-warning: var(--ui-color-warning, #d97706);
|
|
39
|
+
--ui-combobox-duration: 150ms;
|
|
40
|
+
--ui-combobox-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
|
|
41
|
+
|
|
42
|
+
display: inline-block;
|
|
43
|
+
width: auto;
|
|
44
|
+
min-inline-size: min(100%, var(--ui-combobox-min-width));
|
|
45
|
+
font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
|
|
46
|
+
color: var(--ui-combobox-text);
|
|
47
|
+
color-scheme: light dark;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.label-row {
|
|
51
|
+
display: grid;
|
|
52
|
+
gap: 6px;
|
|
53
|
+
margin-bottom: 8px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.label {
|
|
57
|
+
color: var(--ui-combobox-text);
|
|
58
|
+
font-size: 13px;
|
|
59
|
+
line-height: 1.3;
|
|
60
|
+
font-weight: 650;
|
|
61
|
+
letter-spacing: 0.01em;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.description {
|
|
65
|
+
color: var(--ui-combobox-muted);
|
|
66
|
+
font-size: 12px;
|
|
67
|
+
line-height: 1.4;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.root {
|
|
71
|
+
position: relative;
|
|
72
|
+
width: var(--ui-combobox-width);
|
|
73
|
+
min-width: var(--ui-combobox-min-width);
|
|
74
|
+
max-width: 100%;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.control {
|
|
78
|
+
position: relative;
|
|
79
|
+
display: grid;
|
|
80
|
+
grid-template-columns: minmax(0, 1fr) auto auto;
|
|
81
|
+
align-items: center;
|
|
82
|
+
width: 100%;
|
|
83
|
+
min-height: var(--ui-combobox-height);
|
|
84
|
+
border: var(--ui-combobox-border);
|
|
85
|
+
border-radius: var(--ui-combobox-radius);
|
|
86
|
+
background: linear-gradient(
|
|
87
|
+
170deg,
|
|
88
|
+
color-mix(in srgb, var(--ui-combobox-bg) 90%, #ffffff 10%),
|
|
89
|
+
var(--ui-combobox-bg)
|
|
90
|
+
);
|
|
91
|
+
box-shadow: var(--ui-combobox-shadow);
|
|
92
|
+
transition:
|
|
93
|
+
border-color var(--ui-combobox-duration) var(--ui-combobox-ease),
|
|
94
|
+
box-shadow var(--ui-combobox-duration) var(--ui-combobox-ease),
|
|
95
|
+
background-color var(--ui-combobox-duration) var(--ui-combobox-ease),
|
|
96
|
+
transform var(--ui-combobox-duration) var(--ui-combobox-ease);
|
|
97
|
+
overflow: hidden;
|
|
98
|
+
backdrop-filter: saturate(1.08) blur(8px);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.control:hover {
|
|
102
|
+
border-color: color-mix(in srgb, var(--ui-combobox-focus) 34%, var(--ui-combobox-border-color));
|
|
103
|
+
box-shadow: var(--ui-combobox-shadow-hover);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
input {
|
|
107
|
+
grid-column: 1 / 2;
|
|
108
|
+
min-width: 0;
|
|
109
|
+
width: 100%;
|
|
110
|
+
border: none;
|
|
111
|
+
outline: none;
|
|
112
|
+
background: transparent;
|
|
113
|
+
color: var(--ui-combobox-text);
|
|
114
|
+
padding: 9px var(--ui-combobox-padding-x);
|
|
115
|
+
font-size: 14px;
|
|
116
|
+
line-height: 1.4;
|
|
117
|
+
font-family: inherit;
|
|
118
|
+
min-height: var(--ui-combobox-height);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
input::placeholder {
|
|
122
|
+
color: var(--ui-combobox-muted);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.control[data-focused="true"] {
|
|
126
|
+
border-color: color-mix(in srgb, var(--ui-combobox-focus) 72%, var(--ui-combobox-border-color));
|
|
127
|
+
box-shadow:
|
|
128
|
+
0 0 0 4px color-mix(in srgb, var(--ui-combobox-focus) 16%, transparent),
|
|
129
|
+
var(--ui-combobox-shadow-focus);
|
|
130
|
+
transform: translateY(-1px);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.icon-btn {
|
|
134
|
+
align-self: center;
|
|
135
|
+
border: none;
|
|
136
|
+
background: transparent;
|
|
137
|
+
color: var(--ui-combobox-muted);
|
|
138
|
+
inline-size: 28px;
|
|
139
|
+
block-size: 28px;
|
|
140
|
+
border-radius: 8px;
|
|
141
|
+
display: inline-flex;
|
|
142
|
+
align-items: center;
|
|
143
|
+
justify-content: center;
|
|
144
|
+
cursor: pointer;
|
|
145
|
+
margin-inline-end: 2px;
|
|
146
|
+
transition:
|
|
147
|
+
background-color var(--ui-combobox-duration) var(--ui-combobox-ease),
|
|
148
|
+
color var(--ui-combobox-duration) var(--ui-combobox-ease),
|
|
149
|
+
transform var(--ui-combobox-duration) var(--ui-combobox-ease);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.icon-btn svg {
|
|
153
|
+
inline-size: 14px;
|
|
154
|
+
block-size: 14px;
|
|
155
|
+
pointer-events: none;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.icon-btn:hover {
|
|
159
|
+
background: color-mix(in srgb, var(--ui-combobox-text) 8%, transparent);
|
|
160
|
+
color: var(--ui-combobox-text);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.icon-btn:focus-visible {
|
|
164
|
+
outline: 2px solid color-mix(in srgb, var(--ui-combobox-focus) 70%, transparent);
|
|
165
|
+
outline-offset: 1px;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.icon-btn[hidden] {
|
|
169
|
+
display: none !important;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.icon-btn[disabled] {
|
|
173
|
+
opacity: 0.45;
|
|
174
|
+
cursor: not-allowed;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.toggle-btn[data-open="true"] {
|
|
178
|
+
transform: rotate(180deg);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.panel {
|
|
182
|
+
position: absolute;
|
|
183
|
+
top: calc(100% + 8px);
|
|
184
|
+
left: 0;
|
|
185
|
+
right: 0;
|
|
186
|
+
border: var(--ui-combobox-panel-border);
|
|
187
|
+
border-radius: calc(var(--ui-combobox-radius) + 2px);
|
|
188
|
+
background: var(--ui-combobox-panel-bg);
|
|
189
|
+
box-shadow: var(--ui-combobox-panel-shadow);
|
|
190
|
+
max-height: min(360px, 52vh);
|
|
191
|
+
overflow: auto;
|
|
192
|
+
padding: 6px 6px 8px;
|
|
193
|
+
z-index: var(--ui-combobox-panel-z, 1600);
|
|
194
|
+
display: none;
|
|
195
|
+
opacity: 0;
|
|
196
|
+
transform: translateY(-4px) scale(0.985);
|
|
197
|
+
transition:
|
|
198
|
+
opacity var(--ui-combobox-duration) var(--ui-combobox-ease),
|
|
199
|
+
transform var(--ui-combobox-duration) var(--ui-combobox-ease);
|
|
200
|
+
backdrop-filter: saturate(1.08) blur(8px);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.panel[data-open="true"] {
|
|
204
|
+
display: block;
|
|
205
|
+
opacity: 1;
|
|
206
|
+
transform: translateY(0) scale(1);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.status-row {
|
|
210
|
+
position: sticky;
|
|
211
|
+
top: 0;
|
|
212
|
+
z-index: 1;
|
|
213
|
+
margin: 0 0 6px;
|
|
214
|
+
padding: 6px 8px;
|
|
215
|
+
border-radius: 9px;
|
|
216
|
+
border: 1px solid color-mix(in srgb, var(--ui-combobox-border-color) 82%, transparent);
|
|
217
|
+
background: color-mix(in srgb, var(--ui-combobox-bg) 95%, transparent);
|
|
218
|
+
color: var(--ui-combobox-muted);
|
|
219
|
+
font-size: 11px;
|
|
220
|
+
line-height: 1.35;
|
|
221
|
+
font-weight: 600;
|
|
222
|
+
letter-spacing: 0.02em;
|
|
223
|
+
text-transform: uppercase;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.status-row[data-state="loading"] {
|
|
227
|
+
border-color: color-mix(in srgb, var(--ui-combobox-warning) 40%, var(--ui-combobox-border-color));
|
|
228
|
+
color: var(--ui-combobox-warning);
|
|
229
|
+
background: color-mix(in srgb, var(--ui-combobox-warning) 12%, transparent);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.status-row[data-state="error"] {
|
|
233
|
+
border-color: color-mix(in srgb, var(--ui-combobox-error) 46%, var(--ui-combobox-border-color));
|
|
234
|
+
color: var(--ui-combobox-error);
|
|
235
|
+
background: color-mix(in srgb, var(--ui-combobox-error) 11%, transparent);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.status-row[data-state="success"] {
|
|
239
|
+
border-color: color-mix(in srgb, var(--ui-combobox-success) 46%, var(--ui-combobox-border-color));
|
|
240
|
+
color: var(--ui-combobox-success);
|
|
241
|
+
background: color-mix(in srgb, var(--ui-combobox-success) 12%, transparent);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.status-row[data-state="idle"] {
|
|
245
|
+
display: none;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.option {
|
|
249
|
+
border: none;
|
|
250
|
+
background: transparent;
|
|
251
|
+
width: 100%;
|
|
252
|
+
text-align: left;
|
|
253
|
+
display: flex;
|
|
254
|
+
align-items: center;
|
|
255
|
+
gap: 10px;
|
|
256
|
+
border-radius: 10px;
|
|
257
|
+
padding: 10px 10px;
|
|
258
|
+
cursor: pointer;
|
|
259
|
+
color: var(--ui-combobox-text);
|
|
260
|
+
font-size: 13px;
|
|
261
|
+
line-height: 1.35;
|
|
262
|
+
transition:
|
|
263
|
+
background-color var(--ui-combobox-duration) var(--ui-combobox-ease),
|
|
264
|
+
color var(--ui-combobox-duration) var(--ui-combobox-ease),
|
|
265
|
+
transform var(--ui-combobox-duration) var(--ui-combobox-ease);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.option:hover {
|
|
269
|
+
background: var(--ui-combobox-option-hover);
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.option[data-highlighted="true"] {
|
|
273
|
+
background: var(--ui-combobox-option-active);
|
|
274
|
+
transform: translateX(1px);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.option-text {
|
|
278
|
+
min-inline-size: 0;
|
|
279
|
+
display: grid;
|
|
280
|
+
gap: 2px;
|
|
281
|
+
flex: 1 1 auto;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.option-label {
|
|
285
|
+
min-inline-size: 0;
|
|
286
|
+
overflow: hidden;
|
|
287
|
+
text-overflow: ellipsis;
|
|
288
|
+
white-space: nowrap;
|
|
289
|
+
font-size: 13px;
|
|
290
|
+
line-height: 1.35;
|
|
291
|
+
font-weight: 560;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.option-description {
|
|
295
|
+
color: var(--ui-combobox-muted);
|
|
296
|
+
font-size: 11px;
|
|
297
|
+
line-height: 1.35;
|
|
298
|
+
min-inline-size: 0;
|
|
299
|
+
overflow: hidden;
|
|
300
|
+
text-overflow: ellipsis;
|
|
301
|
+
white-space: nowrap;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.option-check {
|
|
305
|
+
inline-size: 14px;
|
|
306
|
+
text-align: center;
|
|
307
|
+
font-size: 12px;
|
|
308
|
+
opacity: 0;
|
|
309
|
+
color: color-mix(in srgb, var(--ui-combobox-focus) 80%, var(--ui-combobox-text));
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.option[data-selected="true"] .option-check {
|
|
313
|
+
opacity: 1;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.option[disabled] {
|
|
317
|
+
opacity: 0.46;
|
|
318
|
+
cursor: not-allowed;
|
|
319
|
+
transform: none;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.empty {
|
|
323
|
+
padding: 14px 10px;
|
|
324
|
+
color: var(--ui-combobox-muted);
|
|
325
|
+
font-size: 12px;
|
|
326
|
+
line-height: 1.45;
|
|
327
|
+
text-align: center;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.error {
|
|
331
|
+
margin-top: 8px;
|
|
332
|
+
color: var(--ui-combobox-error);
|
|
333
|
+
font-size: 12px;
|
|
334
|
+
line-height: 1.35;
|
|
335
|
+
min-block-size: 16px;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
:host([state="loading"]) .control {
|
|
339
|
+
border-color: color-mix(in srgb, var(--ui-combobox-warning) 52%, var(--ui-combobox-border-color));
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
:host([state="error"]) .control {
|
|
343
|
+
border-color: var(--ui-combobox-error);
|
|
344
|
+
box-shadow: 0 0 0 4px color-mix(in srgb, var(--ui-combobox-error) 19%, transparent), var(--ui-combobox-shadow);
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
:host([state="success"]) .control {
|
|
348
|
+
border-color: color-mix(in srgb, var(--ui-combobox-success) 72%, var(--ui-combobox-border-color));
|
|
349
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-combobox-success) 13%, transparent), var(--ui-combobox-shadow);
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
:host([disabled]) .control {
|
|
353
|
+
opacity: 0.62;
|
|
354
|
+
pointer-events: none;
|
|
355
|
+
background: color-mix(in srgb, var(--ui-combobox-muted) 20%, transparent);
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
:host([readonly]) .control {
|
|
359
|
+
background: color-mix(in srgb, var(--ui-combobox-bg) 88%, var(--ui-combobox-muted) 12%);
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
:host([readonly]) .clear-btn {
|
|
363
|
+
display: none !important;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
:host([size="sm"]),
|
|
367
|
+
:host([size="1"]) {
|
|
368
|
+
--ui-combobox-height: 36px;
|
|
369
|
+
--ui-combobox-padding-x: 10px;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
:host([size="lg"]),
|
|
373
|
+
:host([size="3"]) {
|
|
374
|
+
--ui-combobox-height: 48px;
|
|
375
|
+
--ui-combobox-padding-x: 13px;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
:host([variant="surface"]) .control {
|
|
379
|
+
background: var(--ui-color-surface-alt, #f8fafc);
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
:host([variant="soft"]) .control {
|
|
383
|
+
background: color-mix(in srgb, var(--ui-combobox-text) 4%, transparent);
|
|
384
|
+
border-color: color-mix(in srgb, var(--ui-combobox-border-color) 70%, transparent);
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
:host([variant="classic"]) .control {
|
|
388
|
+
border-radius: 10px;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
:host([radius="none"]) {
|
|
392
|
+
--ui-combobox-radius: 0;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
:host([radius="large"]) {
|
|
396
|
+
--ui-combobox-radius: 16px;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
:host([radius="full"]) {
|
|
400
|
+
--ui-combobox-radius: 9999px;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
:host([validation="error"]) .control {
|
|
404
|
+
border-color: var(--ui-combobox-error);
|
|
405
|
+
box-shadow: 0 0 0 4px color-mix(in srgb, var(--ui-combobox-error) 20%, transparent), var(--ui-combobox-shadow);
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
:host([validation="success"]) .control {
|
|
409
|
+
border-color: var(--ui-combobox-success);
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
:host([headless]) .control,
|
|
413
|
+
:host([headless]) .panel,
|
|
414
|
+
:host([headless]) .label-row,
|
|
415
|
+
:host([headless]) .error {
|
|
416
|
+
display: none;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
@media (prefers-reduced-motion: reduce) {
|
|
420
|
+
.control,
|
|
421
|
+
.panel,
|
|
422
|
+
.icon-btn,
|
|
423
|
+
.option {
|
|
424
|
+
transition: none !important;
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
@media (prefers-contrast: more) {
|
|
429
|
+
:host {
|
|
430
|
+
--ui-combobox-border: 2px solid var(--ui-combobox-border-color);
|
|
431
|
+
--ui-combobox-panel-border: 2px solid var(--ui-combobox-border-color);
|
|
432
|
+
--ui-combobox-shadow: none;
|
|
433
|
+
--ui-combobox-panel-shadow: none;
|
|
434
|
+
--ui-combobox-option-hover: color-mix(in srgb, var(--ui-color-primary, var(--ui-primary, #2563eb)) 24%, transparent);
|
|
435
|
+
--ui-combobox-option-active: color-mix(in srgb, var(--ui-color-primary, var(--ui-primary, #2563eb)) 32%, transparent);
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
@media (max-width: 640px) {
|
|
440
|
+
:host {
|
|
441
|
+
--ui-combobox-min-width: 100%;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
.panel {
|
|
445
|
+
max-height: min(50vh, 360px);
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
@media (forced-colors: active) {
|
|
450
|
+
:host {
|
|
451
|
+
--ui-combobox-bg: Canvas;
|
|
452
|
+
--ui-combobox-text: CanvasText;
|
|
453
|
+
--ui-combobox-border-color: CanvasText;
|
|
454
|
+
--ui-combobox-panel-bg: Canvas;
|
|
455
|
+
--ui-combobox-panel-border: 1px solid CanvasText;
|
|
456
|
+
--ui-combobox-shadow: none;
|
|
457
|
+
--ui-combobox-panel-shadow: none;
|
|
458
|
+
--ui-combobox-muted: GrayText;
|
|
459
|
+
--ui-combobox-focus: Highlight;
|
|
460
|
+
--ui-combobox-option-hover: Highlight;
|
|
461
|
+
--ui-combobox-option-active: Highlight;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
.status-row {
|
|
465
|
+
border-color: CanvasText;
|
|
466
|
+
color: CanvasText;
|
|
467
|
+
background: Canvas;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
.option[data-highlighted="true"],
|
|
471
|
+
.option:hover {
|
|
472
|
+
color: HighlightText;
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
`;
|
|
476
|
+
function a(d) {
|
|
477
|
+
return d.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
478
|
+
}
|
|
479
|
+
function x(d) {
|
|
480
|
+
if (d == null)
|
|
481
|
+
return !1;
|
|
482
|
+
const t = String(d).toLowerCase();
|
|
483
|
+
return t !== "false" && t !== "0";
|
|
484
|
+
}
|
|
485
|
+
class D extends k {
|
|
486
|
+
constructor() {
|
|
487
|
+
super(), this._input = null, this._control = null, this._panel = null, this._clearBtn = null, this._toggleBtn = null, this._options = [], this._filtered = [], this._highlightedIndex = -1, this._query = "", this._debounceTimer = null, this._observer = null, this._uid = Math.random().toString(36).slice(2, 8), this._formUnregister = null, this._isFocused = !1, this._suppressValueSync = !1, this._globalListenersBound = !1, this._dismissableLayer = null, this._nextOpenSource = "attribute", this._optionsRefreshScheduled = !1, this._panelPointerDown = !1, this._onInput = this._onInput.bind(this), this._onNativeChange = this._onNativeChange.bind(this), this._onFocusIn = this._onFocusIn.bind(this), this._onFocusOut = this._onFocusOut.bind(this), this._onKeyDown = this._onKeyDown.bind(this), this._onClearClick = this._onClearClick.bind(this), this._onToggleClick = this._onToggleClick.bind(this), this._onPanelPointerDown = this._onPanelPointerDown.bind(this), this._onPanelClick = this._onPanelClick.bind(this);
|
|
488
|
+
}
|
|
489
|
+
static get observedAttributes() {
|
|
490
|
+
return [
|
|
491
|
+
"value",
|
|
492
|
+
"placeholder",
|
|
493
|
+
"disabled",
|
|
494
|
+
"clearable",
|
|
495
|
+
"debounce",
|
|
496
|
+
"maxlength",
|
|
497
|
+
"readonly",
|
|
498
|
+
"autofocus",
|
|
499
|
+
"name",
|
|
500
|
+
"required",
|
|
501
|
+
"validation",
|
|
502
|
+
"state",
|
|
503
|
+
"state-text",
|
|
504
|
+
"size",
|
|
505
|
+
"variant",
|
|
506
|
+
"radius",
|
|
507
|
+
"label",
|
|
508
|
+
"description",
|
|
509
|
+
"open",
|
|
510
|
+
"headless",
|
|
511
|
+
"empty-text",
|
|
512
|
+
"no-filter",
|
|
513
|
+
"allow-custom"
|
|
514
|
+
];
|
|
515
|
+
}
|
|
516
|
+
connectedCallback() {
|
|
517
|
+
super.connectedCallback(), this._observer = new MutationObserver(() => {
|
|
518
|
+
this._scheduleOptionsRefresh();
|
|
519
|
+
}), this._observer.observe(this, {
|
|
520
|
+
childList: !0,
|
|
521
|
+
subtree: !0,
|
|
522
|
+
characterData: !0,
|
|
523
|
+
attributes: !0,
|
|
524
|
+
attributeFilter: ["value", "label", "disabled", "data-combobox-option"]
|
|
525
|
+
}), this._attachFormRegistration();
|
|
526
|
+
}
|
|
527
|
+
disconnectedCallback() {
|
|
528
|
+
var t;
|
|
529
|
+
this._unbindGlobalListeners(), this._detachDomListeners(), (t = this._dismissableLayer) == null || t.destroy(), this._dismissableLayer = null, this._observer && (this._observer.disconnect(), this._observer = null), this._debounceTimer && (clearTimeout(this._debounceTimer), this._debounceTimer = null), this._optionsRefreshScheduled = !1, this._formUnregister && (this._formUnregister(), this._formUnregister = null), super.disconnectedCallback();
|
|
530
|
+
}
|
|
531
|
+
attributeChangedCallback(t, e, i) {
|
|
532
|
+
if (e !== i) {
|
|
533
|
+
if (t === "value") {
|
|
534
|
+
this._suppressValueSync || this._syncInputFromValue(), this._updateClearButton(), this._renderList();
|
|
535
|
+
return;
|
|
536
|
+
}
|
|
537
|
+
if (t === "open") {
|
|
538
|
+
this._applyOpenState(), e !== i && this._emitOpenState(i != null, e != null, this._nextOpenSource), this._nextOpenSource = "attribute";
|
|
539
|
+
return;
|
|
540
|
+
}
|
|
541
|
+
if (t === "disabled") {
|
|
542
|
+
this._isDisabled() && this.open && this._setOpen(!1, "attribute"), this.isConnected && this.requestRender();
|
|
543
|
+
return;
|
|
544
|
+
}
|
|
545
|
+
if (t === "state") {
|
|
546
|
+
this.isConnected && this.requestRender();
|
|
547
|
+
return;
|
|
548
|
+
}
|
|
549
|
+
if (t === "state-text") {
|
|
550
|
+
this._renderList();
|
|
551
|
+
return;
|
|
552
|
+
}
|
|
553
|
+
this.isConnected && this.requestRender();
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
get value() {
|
|
557
|
+
return this.getAttribute("value") || "";
|
|
558
|
+
}
|
|
559
|
+
set value(t) {
|
|
560
|
+
const e = t || "";
|
|
561
|
+
e !== this.value && this.setAttribute("value", e);
|
|
562
|
+
}
|
|
563
|
+
get open() {
|
|
564
|
+
return this.hasAttribute("open");
|
|
565
|
+
}
|
|
566
|
+
set open(t) {
|
|
567
|
+
this._setOpen(t, "api");
|
|
568
|
+
}
|
|
569
|
+
_isDisabled() {
|
|
570
|
+
return x(this.getAttribute("disabled"));
|
|
571
|
+
}
|
|
572
|
+
_isReadonly() {
|
|
573
|
+
return this.hasAttribute("readonly");
|
|
574
|
+
}
|
|
575
|
+
_state() {
|
|
576
|
+
const t = (this.getAttribute("state") || "idle").trim().toLowerCase();
|
|
577
|
+
return t === "loading" || t === "error" || t === "success" ? t : "idle";
|
|
578
|
+
}
|
|
579
|
+
_isLoading() {
|
|
580
|
+
return this._state() === "loading";
|
|
581
|
+
}
|
|
582
|
+
_stateText() {
|
|
583
|
+
const t = this.getAttribute("state-text");
|
|
584
|
+
if (t)
|
|
585
|
+
return t;
|
|
586
|
+
const e = this._state();
|
|
587
|
+
return e === "loading" ? "Syncing results" : e === "error" ? "Unable to load results" : e === "success" ? "Results up to date" : "";
|
|
588
|
+
}
|
|
589
|
+
_emitOpenState(t, e, i) {
|
|
590
|
+
const s = { open: t, previousOpen: e, source: i };
|
|
591
|
+
this.dispatchEvent(
|
|
592
|
+
new CustomEvent(t ? "open" : "close", {
|
|
593
|
+
detail: s,
|
|
594
|
+
bubbles: !0,
|
|
595
|
+
composed: !0
|
|
596
|
+
})
|
|
597
|
+
), this.dispatchEvent(
|
|
598
|
+
new CustomEvent(t ? "ui-open" : "ui-close", {
|
|
599
|
+
detail: s,
|
|
600
|
+
bubbles: !0,
|
|
601
|
+
composed: !0
|
|
602
|
+
})
|
|
603
|
+
);
|
|
604
|
+
}
|
|
605
|
+
_attachFormRegistration() {
|
|
606
|
+
var t;
|
|
607
|
+
try {
|
|
608
|
+
const i = this.getRootNode().host, r = ((t = i == null ? void 0 : i.closest) == null ? void 0 : t.call(i, "ui-form")) || null || this.closest("ui-form"), o = this.getAttribute("name");
|
|
609
|
+
r && typeof r.registerField == "function" && o && (this._formUnregister = r.registerField(o, {
|
|
610
|
+
name: o,
|
|
611
|
+
getValue: () => this.value,
|
|
612
|
+
setValue: (n) => {
|
|
613
|
+
this.value = n;
|
|
614
|
+
},
|
|
615
|
+
validate: async () => {
|
|
616
|
+
const n = this._isCurrentValueValid();
|
|
617
|
+
return {
|
|
618
|
+
valid: n,
|
|
619
|
+
message: n ? void 0 : "Please select a value from the list."
|
|
620
|
+
};
|
|
621
|
+
},
|
|
622
|
+
setError: (n) => {
|
|
623
|
+
n ? (this.setAttribute("validation", "error"), this.setAttribute("data-error", n)) : (this.removeAttribute("validation"), this.removeAttribute("data-error"));
|
|
624
|
+
}
|
|
625
|
+
}));
|
|
626
|
+
} catch {
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
_isCurrentValueValid() {
|
|
630
|
+
const t = this.hasAttribute("required"), e = this.value;
|
|
631
|
+
return !t && !e ? !0 : t && !e ? !1 : this.hasAttribute("allow-custom") ? !0 : this._options.some((i) => i.value === e);
|
|
632
|
+
}
|
|
633
|
+
_readOptions() {
|
|
634
|
+
const t = Array.from(
|
|
635
|
+
this.querySelectorAll("option,[data-combobox-option]")
|
|
636
|
+
), e = /* @__PURE__ */ new Set();
|
|
637
|
+
return t.map((i, s) => {
|
|
638
|
+
const r = i.tagName.toLowerCase() === "option", o = i, n = r ? o.value || o.textContent || "" : i.getAttribute("value") || i.getAttribute("data-value") || i.textContent || "", l = r ? (o.label || o.textContent || o.value || "").trim() : (i.getAttribute("label") || i.textContent || n).trim(), u = (i.getAttribute("description") || i.getAttribute("data-description") || "").trim(), b = r ? o.disabled : x(i.getAttribute("disabled")), c = n.trim();
|
|
639
|
+
if (!c && !l)
|
|
640
|
+
return null;
|
|
641
|
+
const m = `${c}::${l}`;
|
|
642
|
+
return e.has(m) ? null : (e.add(m), {
|
|
643
|
+
value: c,
|
|
644
|
+
label: l,
|
|
645
|
+
description: u,
|
|
646
|
+
disabled: b,
|
|
647
|
+
sourceIndex: s
|
|
648
|
+
});
|
|
649
|
+
}).filter((i) => !!i);
|
|
650
|
+
}
|
|
651
|
+
_findOptionByValue(t) {
|
|
652
|
+
return this._options.find((e) => e.value === t) || null;
|
|
653
|
+
}
|
|
654
|
+
_findExactOptionByQuery(t) {
|
|
655
|
+
const e = h(t);
|
|
656
|
+
return e && this._options.find(
|
|
657
|
+
(i) => !i.disabled && (h(i.label) === e || h(i.value) === e)
|
|
658
|
+
) || null;
|
|
659
|
+
}
|
|
660
|
+
_rebuildFiltered(t) {
|
|
661
|
+
const e = h(this._query), i = this.hasAttribute("no-filter"), s = this._filtered[this._highlightedIndex];
|
|
662
|
+
if (this._filtered = this._options.filter((o) => i || !e ? !0 : h(o.label).includes(e) || h(o.value).includes(e)), t != null && t.preserveHighlight && s) {
|
|
663
|
+
const o = this._filtered.findIndex((n) => n.sourceIndex === s.sourceIndex);
|
|
664
|
+
if (o >= 0 && !this._filtered[o].disabled) {
|
|
665
|
+
this._highlightedIndex = o;
|
|
666
|
+
return;
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
const r = this._findOptionByValue(this.value);
|
|
670
|
+
if (r) {
|
|
671
|
+
const o = this._filtered.findIndex((n) => n.sourceIndex === r.sourceIndex);
|
|
672
|
+
if (o >= 0 && !this._filtered[o].disabled) {
|
|
673
|
+
this._highlightedIndex = o;
|
|
674
|
+
return;
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
this._highlightedIndex = A(this._filtered, {
|
|
678
|
+
getDisabled: (o) => o.disabled
|
|
679
|
+
});
|
|
680
|
+
}
|
|
681
|
+
_renderList() {
|
|
682
|
+
if (!this._panel)
|
|
683
|
+
return;
|
|
684
|
+
const t = this._renderStateRow(), e = this.getAttribute("empty-text") || "No matches found";
|
|
685
|
+
if (this._filtered.length === 0) {
|
|
686
|
+
this._panel.innerHTML = `${t}<div class="empty" part="empty">${a(e)}</div>`, this._panel.refresh(), this._panel.clearActive(), this._syncActiveDescendant();
|
|
687
|
+
return;
|
|
688
|
+
}
|
|
689
|
+
const i = this.value, s = this._filtered.map((r, o) => {
|
|
690
|
+
const n = r.value === i, l = o === this._highlightedIndex, u = r.disabled;
|
|
691
|
+
return `
|
|
692
|
+
<button
|
|
693
|
+
type="button"
|
|
694
|
+
id="${`${this._uid}-option-${r.sourceIndex}`}"
|
|
695
|
+
class="option"
|
|
696
|
+
role="option"
|
|
697
|
+
aria-selected="${n ? "true" : "false"}"
|
|
698
|
+
aria-disabled="${u ? "true" : "false"}"
|
|
699
|
+
data-option-index="${o}"
|
|
700
|
+
data-highlighted="${l ? "true" : "false"}"
|
|
701
|
+
data-selected="${n ? "true" : "false"}"
|
|
702
|
+
${u ? "disabled" : ""}>
|
|
703
|
+
<span class="option-text">
|
|
704
|
+
<span class="option-label">${a(r.label)}</span>
|
|
705
|
+
${r.description ? `<span class="option-description">${a(r.description)}</span>` : ""}
|
|
706
|
+
</span>
|
|
707
|
+
<span class="option-check" aria-hidden="true">✓</span>
|
|
708
|
+
</button>
|
|
709
|
+
`;
|
|
710
|
+
}).join("");
|
|
711
|
+
this._panel.innerHTML = `${t}${s}`, this._panel.refresh(), this._syncActiveDescendant(), this._scrollHighlightedIntoView();
|
|
712
|
+
}
|
|
713
|
+
_renderStateRow() {
|
|
714
|
+
const t = this._state(), e = this._stateText();
|
|
715
|
+
return e ? `<div class="status-row" part="status" data-state="${a(t)}" aria-live="polite">${a(e)}</div>` : "";
|
|
716
|
+
}
|
|
717
|
+
_syncInputFromValue() {
|
|
718
|
+
if (!this._input || this._isFocused && this.open)
|
|
719
|
+
return;
|
|
720
|
+
const t = this._findOptionByValue(this.value);
|
|
721
|
+
t ? (this._query = t.label, this._input.value = t.label) : (this._query = this.value, this._input.value = this.value), this._rebuildFiltered({ preserveHighlight: !1 }), this._renderList();
|
|
722
|
+
}
|
|
723
|
+
_syncActiveDescendant() {
|
|
724
|
+
var e, i;
|
|
725
|
+
if (!this._input)
|
|
726
|
+
return;
|
|
727
|
+
const t = (e = this._panel) == null ? void 0 : e.querySelector(`[data-option-index="${this._highlightedIndex}"]`);
|
|
728
|
+
if (t && this._panel) {
|
|
729
|
+
this._panel.setActiveItem(t, {
|
|
730
|
+
focus: !1,
|
|
731
|
+
owner: this._input,
|
|
732
|
+
scroll: !1
|
|
733
|
+
});
|
|
734
|
+
return;
|
|
735
|
+
}
|
|
736
|
+
(i = this._panel) == null || i.clearActive(), this._input.removeAttribute("aria-activedescendant");
|
|
737
|
+
}
|
|
738
|
+
_scrollHighlightedIntoView() {
|
|
739
|
+
if (!this._panel || this._highlightedIndex < 0)
|
|
740
|
+
return;
|
|
741
|
+
const t = this._panel.querySelector(`[data-option-index="${this._highlightedIndex}"]`);
|
|
742
|
+
this._panel.setActiveItem(t, {
|
|
743
|
+
focus: !1,
|
|
744
|
+
owner: this._input,
|
|
745
|
+
scroll: !0
|
|
746
|
+
});
|
|
747
|
+
}
|
|
748
|
+
_updateClearButton() {
|
|
749
|
+
if (!this._clearBtn)
|
|
750
|
+
return;
|
|
751
|
+
this.hasAttribute("clearable") && !this._isDisabled() && !this._isReadonly() && !this._isLoading() && (this._query.length > 0 || this.value.length > 0) ? this._clearBtn.removeAttribute("hidden") : this._clearBtn.setAttribute("hidden", "");
|
|
752
|
+
}
|
|
753
|
+
_applyOpenState() {
|
|
754
|
+
var i;
|
|
755
|
+
if (!this._panel || !this._input || !this._toggleBtn)
|
|
756
|
+
return;
|
|
757
|
+
const t = this.open, e = this._isLoading();
|
|
758
|
+
t ? (this._bindGlobalListeners(), this._panel.setAttribute("data-open", "true"), this._panel.removeAttribute("hidden"), this._panel.setAttribute("aria-hidden", "false"), this._input.setAttribute("aria-expanded", "true"), this._toggleBtn.setAttribute("data-open", "true"), this._rebuildFiltered({ preserveHighlight: !0 }), this._renderList(), this._syncDismissableLayer()) : (this._unbindGlobalListeners(), (i = this._dismissableLayer) == null || i.destroy(), this._dismissableLayer = null, this._panel.setAttribute("hidden", ""), this._panel.removeAttribute("data-open"), this._panel.setAttribute("aria-hidden", "true"), this._input.setAttribute("aria-expanded", "false"), this._toggleBtn.setAttribute("data-open", "false")), this._toggleBtn.disabled = this._isDisabled(), this._clearBtn && (this._clearBtn.disabled = this._isDisabled() || this._isReadonly()), this._input.setAttribute("aria-busy", e ? "true" : "false"), this._panel.setAttribute("aria-busy", e ? "true" : "false");
|
|
759
|
+
}
|
|
760
|
+
_bindGlobalListeners() {
|
|
761
|
+
this._globalListenersBound || (this._globalListenersBound = !0);
|
|
762
|
+
}
|
|
763
|
+
_unbindGlobalListeners() {
|
|
764
|
+
this._globalListenersBound && (this._globalListenersBound = !1);
|
|
765
|
+
}
|
|
766
|
+
_syncDismissableLayer() {
|
|
767
|
+
var t;
|
|
768
|
+
!this.open || !this._panel || ((t = this._dismissableLayer) == null || t.destroy(), this._dismissableLayer = C({
|
|
769
|
+
node: this._panel,
|
|
770
|
+
trigger: this._control,
|
|
771
|
+
closeOnEscape: !1,
|
|
772
|
+
closeOnPointerOutside: !0,
|
|
773
|
+
onDismiss: (e) => {
|
|
774
|
+
e === "outside-pointer" && (this.hasAttribute("allow-custom") ? this._commitCustomValue() : this._syncInputFromValue(), this._closePanel("outside"));
|
|
775
|
+
}
|
|
776
|
+
}));
|
|
777
|
+
}
|
|
778
|
+
_setOpen(t, e = "api") {
|
|
779
|
+
t !== this.open && (t && this._isDisabled() || (this._nextOpenSource = e, t ? this.setAttribute("open", "") : this.removeAttribute("open")));
|
|
780
|
+
}
|
|
781
|
+
_openPanel(t = "api") {
|
|
782
|
+
this._setOpen(!0, t);
|
|
783
|
+
}
|
|
784
|
+
_closePanel(t = "api") {
|
|
785
|
+
this._setOpen(!1, t);
|
|
786
|
+
}
|
|
787
|
+
_commitSelection(t) {
|
|
788
|
+
if (this._isDisabled() || this._isReadonly() || t.disabled)
|
|
789
|
+
return;
|
|
790
|
+
const e = this.value;
|
|
791
|
+
this._suppressValueSync = !0, this.value = t.value, this._suppressValueSync = !1, this._input && (this._input.value = t.label), this._query = t.label, this._rebuildFiltered({ preserveHighlight: !1 }), this._renderList(), this._updateClearButton(), this._closePanel("selection"), e !== t.value && this.dispatchEvent(
|
|
792
|
+
new CustomEvent("change", {
|
|
793
|
+
detail: { value: t.value, label: t.label },
|
|
794
|
+
bubbles: !0,
|
|
795
|
+
composed: !0
|
|
796
|
+
})
|
|
797
|
+
), this.dispatchEvent(
|
|
798
|
+
new CustomEvent("select", {
|
|
799
|
+
detail: { value: t.value, label: t.label },
|
|
800
|
+
bubbles: !0,
|
|
801
|
+
composed: !0
|
|
802
|
+
})
|
|
803
|
+
);
|
|
804
|
+
}
|
|
805
|
+
_commitCustomValue() {
|
|
806
|
+
if (this._isDisabled() || this._isReadonly() || !this.hasAttribute("allow-custom"))
|
|
807
|
+
return;
|
|
808
|
+
const t = this._query.trim(), e = this.value;
|
|
809
|
+
this._suppressValueSync = !0, this.value = t, this._suppressValueSync = !1, this._updateClearButton(), e !== t && this.dispatchEvent(
|
|
810
|
+
new CustomEvent("change", {
|
|
811
|
+
detail: { value: t, label: t, custom: !0 },
|
|
812
|
+
bubbles: !0,
|
|
813
|
+
composed: !0
|
|
814
|
+
})
|
|
815
|
+
);
|
|
816
|
+
}
|
|
817
|
+
_moveHighlight(t) {
|
|
818
|
+
var r, o;
|
|
819
|
+
if (this._filtered.length === 0)
|
|
820
|
+
return;
|
|
821
|
+
const e = (r = this._panel) == null ? void 0 : r.querySelector(`[data-option-index="${this._highlightedIndex}"]`), i = ((o = this._panel) == null ? void 0 : o.move(t > 0 ? 1 : -1, {
|
|
822
|
+
current: e,
|
|
823
|
+
focus: !1,
|
|
824
|
+
owner: this._input,
|
|
825
|
+
scroll: !0
|
|
826
|
+
})) || null;
|
|
827
|
+
if (!i)
|
|
828
|
+
return;
|
|
829
|
+
const s = Number(i.getAttribute("data-option-index") || "-1");
|
|
830
|
+
s < 0 || (this._highlightedIndex = s, this._renderList());
|
|
831
|
+
}
|
|
832
|
+
render() {
|
|
833
|
+
const t = this.hasAttribute("headless"), e = this.getAttribute("disabled"), i = x(e), s = this._isReadonly(), r = this._state(), o = r === "loading", n = this.getAttribute("placeholder") || "Search...", l = this.getAttribute("maxlength"), u = this.hasAttribute("required"), b = this.getAttribute("label") || "", c = this.getAttribute("description") || "", v = this.getAttribute("data-error") || "" || (r === "error" ? this._stateText() || "Unable to load options." : ""), _ = this.getAttribute("validation") === "error" || r === "error" || !!v, f = !!(b || this.querySelector('[slot="label"]')), g = !!(c || this.querySelector('[slot="description"]')), y = `${this._uid}-error`, w = [g ? `${this._uid}-description` : "", _ ? y : ""].filter(Boolean).join(" ");
|
|
834
|
+
if (this._options = this._readOptions(), !this._query) {
|
|
835
|
+
const p = this._findOptionByValue(this.value);
|
|
836
|
+
this._query = p ? p.label : this.value;
|
|
837
|
+
}
|
|
838
|
+
this._rebuildFiltered({ preserveHighlight: !1 }), this.setContent(`
|
|
839
|
+
${t ? "" : `<style>${E}</style>`}
|
|
840
|
+
${f || g ? `
|
|
841
|
+
<div class="label-row">
|
|
842
|
+
<label class="label" part="label" id="${this._uid}-label"><slot name="label">${a(b)}</slot></label>
|
|
843
|
+
<div class="description" part="description" id="${this._uid}-description"><slot name="description">${a(c)}</slot></div>
|
|
844
|
+
</div>
|
|
845
|
+
` : ""}
|
|
846
|
+
|
|
847
|
+
<div class="root" part="root">
|
|
848
|
+
<div class="control" part="control" data-focused="${this._isFocused ? "true" : "false"}" data-state="${a(r)}">
|
|
849
|
+
<input
|
|
850
|
+
id="${this._uid}-input"
|
|
851
|
+
part="input"
|
|
852
|
+
role="combobox"
|
|
853
|
+
aria-haspopup="listbox"
|
|
854
|
+
aria-autocomplete="list"
|
|
855
|
+
aria-expanded="${this.open ? "true" : "false"}"
|
|
856
|
+
aria-controls="${this._uid}-listbox"
|
|
857
|
+
${f ? `aria-labelledby="${this._uid}-label"` : ""}
|
|
858
|
+
${w ? `aria-describedby="${w}"` : ""}
|
|
859
|
+
${_ ? 'aria-invalid="true"' : ""}
|
|
860
|
+
aria-busy="${o ? "true" : "false"}"
|
|
861
|
+
value="${a(this._query)}"
|
|
862
|
+
placeholder="${a(n)}"
|
|
863
|
+
${i ? "disabled" : ""}
|
|
864
|
+
${s ? "readonly" : ""}
|
|
865
|
+
${u ? "required" : ""}
|
|
866
|
+
${l ? `maxlength="${a(l)}"` : ""}
|
|
867
|
+
/>
|
|
868
|
+
<button type="button" part="clear" class="icon-btn clear-btn" aria-label="Clear value" hidden ${s ? "disabled" : ""}>${L}</button>
|
|
869
|
+
<button type="button" part="toggle" class="icon-btn toggle-btn" data-open="${this.open ? "true" : "false"}" aria-label="Toggle options">${$}</button>
|
|
870
|
+
</div>
|
|
871
|
+
<ui-listbox class="panel" id="${this._uid}-listbox" part="panel" role="listbox" item-selector=".option[data-option-index]" item-role="option" active-attribute="data-highlighted" aria-busy="${o ? "true" : "false"}" data-state="${a(r)}" ${this.open ? 'data-open="true" aria-hidden="false"' : 'hidden aria-hidden="true"'}></ui-listbox>
|
|
872
|
+
</div>
|
|
873
|
+
<slot hidden></slot>
|
|
874
|
+
<div class="error" part="error" id="${y}" ${_ ? "" : "hidden"}>${a(v)}</div>
|
|
875
|
+
`), this._detachDomListeners(), this._input = this.root.querySelector("input"), this._control = this.root.querySelector(".control"), this._panel = this.root.querySelector("ui-listbox.panel"), this._clearBtn = this.root.querySelector(".clear-btn"), this._toggleBtn = this.root.querySelector(".toggle-btn"), this._renderList(), this._updateClearButton(), this._applyOpenState(), this._input && (this._input.addEventListener("input", this._onInput), this._input.addEventListener("change", this._onNativeChange), this._input.addEventListener("focus", this._onFocusIn), this._input.addEventListener("blur", this._onFocusOut), this._input.addEventListener("keydown", this._onKeyDown), this.hasAttribute("autofocus") && setTimeout(() => {
|
|
876
|
+
var p;
|
|
877
|
+
try {
|
|
878
|
+
(p = this._input) == null || p.focus();
|
|
879
|
+
} catch {
|
|
880
|
+
}
|
|
881
|
+
}, 0)), this._clearBtn && this._clearBtn.addEventListener("click", this._onClearClick), this._toggleBtn && this._toggleBtn.addEventListener("click", this._onToggleClick), this._panel && (this._panel.addEventListener("pointerdown", this._onPanelPointerDown), this._panel.addEventListener("click", this._onPanelClick));
|
|
882
|
+
}
|
|
883
|
+
_detachDomListeners() {
|
|
884
|
+
this._input && (this._input.removeEventListener("input", this._onInput), this._input.removeEventListener("change", this._onNativeChange), this._input.removeEventListener("focus", this._onFocusIn), this._input.removeEventListener("blur", this._onFocusOut), this._input.removeEventListener("keydown", this._onKeyDown)), this._clearBtn && this._clearBtn.removeEventListener("click", this._onClearClick), this._toggleBtn && this._toggleBtn.removeEventListener("click", this._onToggleClick), this._panel && (this._panel.removeEventListener("pointerdown", this._onPanelPointerDown), this._panel.removeEventListener("click", this._onPanelClick));
|
|
885
|
+
}
|
|
886
|
+
_onInput(t) {
|
|
887
|
+
if (!this._input || this._isDisabled() || this._isReadonly())
|
|
888
|
+
return;
|
|
889
|
+
const e = t.target.value;
|
|
890
|
+
this._query = e, this._openPanel("keyboard"), this._rebuildFiltered({ preserveHighlight: !1 }), this._renderList(), this._updateClearButton(), this.dispatchEvent(
|
|
891
|
+
new CustomEvent("input", {
|
|
892
|
+
detail: { query: e, value: this.value },
|
|
893
|
+
bubbles: !0,
|
|
894
|
+
composed: !0
|
|
895
|
+
})
|
|
896
|
+
);
|
|
897
|
+
const i = Number(this.getAttribute("debounce") || 0);
|
|
898
|
+
this._debounceTimer && (clearTimeout(this._debounceTimer), this._debounceTimer = null), i > 0 ? this._debounceTimer = setTimeout(() => {
|
|
899
|
+
this.dispatchEvent(
|
|
900
|
+
new CustomEvent("debounced-input", {
|
|
901
|
+
detail: { query: e, value: this.value },
|
|
902
|
+
bubbles: !0,
|
|
903
|
+
composed: !0
|
|
904
|
+
})
|
|
905
|
+
);
|
|
906
|
+
}, i) : this.dispatchEvent(
|
|
907
|
+
new CustomEvent("debounced-input", {
|
|
908
|
+
detail: { query: e, value: this.value },
|
|
909
|
+
bubbles: !0,
|
|
910
|
+
composed: !0
|
|
911
|
+
})
|
|
912
|
+
);
|
|
913
|
+
}
|
|
914
|
+
_onNativeChange() {
|
|
915
|
+
this._isDisabled() || this._isReadonly() || this.hasAttribute("allow-custom") && this._commitCustomValue();
|
|
916
|
+
}
|
|
917
|
+
_onFocusIn() {
|
|
918
|
+
this._isFocused = !0, this._control && this._control.setAttribute("data-focused", "true"), this._isReadonly() || this._openPanel("keyboard");
|
|
919
|
+
}
|
|
920
|
+
_onFocusOut() {
|
|
921
|
+
this._isFocused = !1, this._control && this._control.setAttribute("data-focused", "false"), queueMicrotask(() => {
|
|
922
|
+
if (this._panelPointerDown) {
|
|
923
|
+
this._panelPointerDown = !1;
|
|
924
|
+
return;
|
|
925
|
+
}
|
|
926
|
+
this.root.activeElement || this.open && (this.hasAttribute("allow-custom") ? this._commitCustomValue() : this._syncInputFromValue(), this._closePanel("outside"));
|
|
927
|
+
});
|
|
928
|
+
}
|
|
929
|
+
_refreshOptionsFromDom() {
|
|
930
|
+
this._options = this._readOptions(), this._rebuildFiltered({ preserveHighlight: !1 }), this._renderList(), this._syncInputFromValue();
|
|
931
|
+
}
|
|
932
|
+
_scheduleOptionsRefresh() {
|
|
933
|
+
this._optionsRefreshScheduled || (this._optionsRefreshScheduled = !0, queueMicrotask(() => {
|
|
934
|
+
this._optionsRefreshScheduled = !1, this.isConnected && this._refreshOptionsFromDom();
|
|
935
|
+
}));
|
|
936
|
+
}
|
|
937
|
+
_onKeyDown(t) {
|
|
938
|
+
var e, i;
|
|
939
|
+
if (!this._isDisabled() && this._input) {
|
|
940
|
+
if (t.key === "Home" && this.open) {
|
|
941
|
+
t.preventDefault();
|
|
942
|
+
const s = ((e = this._panel) == null ? void 0 : e.focusBoundary("first", { focus: !1, owner: this._input, scroll: !0 })) || null;
|
|
943
|
+
this._highlightedIndex = Number((s == null ? void 0 : s.getAttribute("data-option-index")) || "-1"), this._renderList();
|
|
944
|
+
return;
|
|
945
|
+
}
|
|
946
|
+
if (t.key === "End" && this.open) {
|
|
947
|
+
t.preventDefault();
|
|
948
|
+
const s = ((i = this._panel) == null ? void 0 : i.focusBoundary("last", { focus: !1, owner: this._input, scroll: !0 })) || null;
|
|
949
|
+
this._highlightedIndex = Number((s == null ? void 0 : s.getAttribute("data-option-index")) || "-1"), this._renderList();
|
|
950
|
+
return;
|
|
951
|
+
}
|
|
952
|
+
if (t.key === "ArrowDown") {
|
|
953
|
+
t.preventDefault(), this._openPanel("keyboard"), this._moveHighlight(1);
|
|
954
|
+
return;
|
|
955
|
+
}
|
|
956
|
+
if (t.key === "ArrowUp") {
|
|
957
|
+
t.preventDefault(), this._openPanel("keyboard"), this._moveHighlight(-1);
|
|
958
|
+
return;
|
|
959
|
+
}
|
|
960
|
+
if (t.key === "Enter") {
|
|
961
|
+
if (this.open && this._highlightedIndex >= 0) {
|
|
962
|
+
t.preventDefault();
|
|
963
|
+
const s = this._filtered[this._highlightedIndex];
|
|
964
|
+
s && this._commitSelection(s);
|
|
965
|
+
} else if (this.hasAttribute("allow-custom"))
|
|
966
|
+
t.preventDefault(), this._commitCustomValue(), this._closePanel("keyboard");
|
|
967
|
+
else if (this.open)
|
|
968
|
+
t.preventDefault(), this._syncInputFromValue(), this._closePanel("keyboard");
|
|
969
|
+
else {
|
|
970
|
+
const s = this._findExactOptionByQuery(this._query);
|
|
971
|
+
s && (t.preventDefault(), this._commitSelection(s));
|
|
972
|
+
}
|
|
973
|
+
return;
|
|
974
|
+
}
|
|
975
|
+
if (t.key === "Escape") {
|
|
976
|
+
this.open && (t.preventDefault(), this.hasAttribute("allow-custom") || this._syncInputFromValue(), this._closePanel("keyboard"));
|
|
977
|
+
return;
|
|
978
|
+
}
|
|
979
|
+
t.key === "Tab" && (this.hasAttribute("allow-custom") ? this._commitCustomValue() : this._syncInputFromValue(), this._closePanel("keyboard"));
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
_onClearClick(t) {
|
|
983
|
+
t.preventDefault(), this._input && (this._isDisabled() || this._isReadonly() || (this._query = "", this._input.value = "", this._suppressValueSync = !0, this.value = "", this._suppressValueSync = !1, this._rebuildFiltered({ preserveHighlight: !1 }), this._renderList(), this._updateClearButton(), this._openPanel("clear"), this.dispatchEvent(new CustomEvent("clear", { bubbles: !0, composed: !0 })), this.dispatchEvent(
|
|
984
|
+
new CustomEvent("input", {
|
|
985
|
+
detail: { query: "", value: "" },
|
|
986
|
+
bubbles: !0,
|
|
987
|
+
composed: !0
|
|
988
|
+
})
|
|
989
|
+
), this.dispatchEvent(
|
|
990
|
+
new CustomEvent("change", {
|
|
991
|
+
detail: { value: "", label: "" },
|
|
992
|
+
bubbles: !0,
|
|
993
|
+
composed: !0
|
|
994
|
+
})
|
|
995
|
+
)));
|
|
996
|
+
}
|
|
997
|
+
_onToggleClick(t) {
|
|
998
|
+
var e;
|
|
999
|
+
t.preventDefault(), !this._isDisabled() && (this.open ? this._closePanel("toggle") : this._openPanel("toggle"), (e = this._input) == null || e.focus());
|
|
1000
|
+
}
|
|
1001
|
+
_onPanelPointerDown(t) {
|
|
1002
|
+
if (this._isReadonly())
|
|
1003
|
+
return;
|
|
1004
|
+
const e = t.target;
|
|
1005
|
+
e != null && e.closest("[data-option-index]") && (this._panelPointerDown = !0, t.preventDefault());
|
|
1006
|
+
}
|
|
1007
|
+
_onPanelClick(t) {
|
|
1008
|
+
if (this._isReadonly())
|
|
1009
|
+
return;
|
|
1010
|
+
const i = t.target.closest("[data-option-index]");
|
|
1011
|
+
if (!i)
|
|
1012
|
+
return;
|
|
1013
|
+
const s = i.getAttribute("data-option-index"), r = s == null ? -1 : Number(s);
|
|
1014
|
+
if (!Number.isFinite(r) || r < 0)
|
|
1015
|
+
return;
|
|
1016
|
+
const o = this._filtered[r];
|
|
1017
|
+
!o || o.disabled || this._commitSelection(o);
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
typeof customElements < "u" && !customElements.get("ui-combobox") && customElements.define("ui-combobox", D);
|
|
1021
|
+
export {
|
|
1022
|
+
D as UICombobox
|
|
1023
|
+
};
|