@vonage/vivid 5.12.0 → 5.15.0
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/bundled/base-color-picker.js +2 -2
- package/bundled/definition19.cjs +63 -44
- package/bundled/definition19.js +322 -246
- package/bundled/definition2.cjs +1 -1
- package/bundled/definition2.js +1 -1
- package/bundled/localized.cjs +1 -1
- package/bundled/localized.js +17 -13
- package/bundled/slottable-request.cjs +4 -4
- package/bundled/slottable-request.js +71 -70
- package/bundled/vivid-element.cjs +1 -1
- package/bundled/vivid-element.js +1 -1
- package/custom-elements.json +2540 -2206
- package/data-grid/definition.cjs +37 -13
- package/data-grid/definition.js +37 -13
- package/data-grid/index.cjs +38 -32
- package/data-grid/index.js +201 -178
- package/icon/definition.cjs +1 -1
- package/icon/definition.js +1 -1
- package/index.cjs +1 -0
- package/index.js +1 -1
- package/lib/accordion/accordion.template.d.ts +2 -2
- package/lib/accordion/index.d.ts +1 -0
- package/lib/accordion-item/accordion-item.d.ts +98 -67
- package/lib/accordion-item/accordion-item.template.d.ts +3 -3
- package/lib/accordion-item/index.d.ts +1 -0
- package/lib/action-group/action-group.d.ts +95 -64
- package/lib/action-group/action-group.template.d.ts +2 -2
- package/lib/action-group/index.d.ts +1 -0
- package/lib/alert/alert.d.ts +192 -130
- package/lib/alert/alert.template.d.ts +3 -3
- package/lib/alert/index.d.ts +1 -0
- package/lib/audio-player/audio-player.d.ts +97 -67
- package/lib/audio-player/audio-player.template.d.ts +2 -2
- package/lib/audio-player/index.d.ts +1 -0
- package/lib/avatar/avatar.d.ts +105 -117
- package/lib/avatar/avatar.template.d.ts +1 -1
- package/lib/avatar/index.d.ts +1 -0
- package/lib/badge/badge.d.ts +98 -67
- package/lib/badge/badge.template.d.ts +3 -3
- package/lib/badge/index.d.ts +1 -0
- package/lib/banner/banner.d.ts +286 -193
- package/lib/banner/banner.template.d.ts +3 -3
- package/lib/banner/index.d.ts +1 -0
- package/lib/breadcrumb/breadcrumb.d.ts +93 -62
- package/lib/breadcrumb/breadcrumb.template.d.ts +2 -2
- package/lib/breadcrumb/index.d.ts +1 -0
- package/lib/breadcrumb-item/breadcrumb-item.d.ts +103 -115
- package/lib/breadcrumb-item/breadcrumb-item.template.d.ts +3 -3
- package/lib/breadcrumb-item/index.d.ts +1 -0
- package/lib/button/button.d.ts +297 -247
- package/lib/button/button.template.d.ts +3 -3
- package/lib/button/index.d.ts +1 -0
- package/lib/calendar/calendar.d.ts +2 -2
- package/lib/calendar/calendar.template.d.ts +2 -2
- package/lib/calendar/helpers/calendar.event-context.d.ts +1 -1
- package/lib/calendar/helpers/calendar.keyboard-interactions.d.ts +1 -1
- package/lib/calendar/index.d.ts +1 -0
- package/lib/calendar-event/calendar-event.d.ts +95 -64
- package/lib/calendar-event/calendar-event.template.d.ts +2 -2
- package/lib/calendar-event/index.d.ts +1 -0
- package/lib/card/card.d.ts +105 -117
- package/lib/card/card.template.d.ts +2 -2
- package/lib/card/index.d.ts +1 -0
- package/lib/checkbox/checkbox.d.ts +628 -437
- package/lib/checkbox/checkbox.template.d.ts +3 -3
- package/lib/checkbox/index.d.ts +1 -0
- package/lib/color-picker/color-picker.d.ts +726 -506
- package/lib/color-picker/color-picker.template.d.ts +2 -2
- package/lib/color-picker/definition.d.ts +1 -1
- package/lib/color-picker/index.d.ts +1 -0
- package/lib/combobox/combobox.d.ts +741 -520
- package/lib/combobox/combobox.template.d.ts +3 -3
- package/lib/combobox/index.d.ts +1 -0
- package/lib/contextual-help/contextual-help.d.ts +1 -1
- package/lib/contextual-help/contextual-help.template.d.ts +3 -3
- package/lib/contextual-help/index.d.ts +1 -0
- package/lib/country/country-code-to-flag-icon.d.ts +1 -1
- package/lib/country/country.template.d.ts +3 -3
- package/lib/country/index.d.ts +1 -0
- package/lib/data-grid/data-grid-cell.d.ts +190 -128
- package/lib/data-grid/data-grid-cell.template.d.ts +3 -3
- package/lib/data-grid/data-grid-row.d.ts +95 -64
- package/lib/data-grid/data-grid-row.template.d.ts +3 -3
- package/lib/data-grid/data-grid.d.ts +1 -1
- package/lib/data-grid/data-grid.template.d.ts +3 -3
- package/lib/data-grid/index.d.ts +1 -0
- package/lib/data-grid/locale.d.ts +1 -1
- package/lib/date-picker/date-picker.d.ts +1045 -792
- package/lib/date-picker/date-picker.template.d.ts +2 -2
- package/lib/date-picker/index.d.ts +1 -0
- package/lib/date-range-picker/date-range-picker.d.ts +538 -411
- package/lib/date-range-picker/date-range-picker.template.d.ts +2 -2
- package/lib/date-range-picker/index.d.ts +1 -0
- package/lib/date-time-picker/date-time-picker.d.ts +1026 -772
- package/lib/date-time-picker/date-time-picker.template.d.ts +2 -2
- package/lib/date-time-picker/index.d.ts +1 -0
- package/lib/dial-pad/dial-pad.d.ts +95 -64
- package/lib/dial-pad/dial-pad.template.d.ts +2 -2
- package/lib/dial-pad/index.d.ts +1 -0
- package/lib/dialog/dialog.d.ts +189 -127
- package/lib/dialog/dialog.template.d.ts +3 -3
- package/lib/dialog/index.d.ts +1 -0
- package/lib/divider/divider.d.ts +94 -63
- package/lib/divider/divider.template.d.ts +2 -2
- package/lib/divider/index.d.ts +1 -0
- package/lib/elevation/elevation.template.d.ts +2 -2
- package/lib/elevation/index.d.ts +1 -0
- package/lib/empty-state/empty-state.d.ts +2 -2
- package/lib/empty-state/empty-state.template.d.ts +3 -3
- package/lib/empty-state/index.d.ts +1 -0
- package/lib/fab/fab.d.ts +98 -67
- package/lib/fab/fab.template.d.ts +3 -3
- package/lib/fab/index.d.ts +1 -0
- package/lib/file-picker/__mocks__/data-transfer.d.ts +21 -0
- package/lib/file-picker/file-picker.d.ts +736 -515
- package/lib/file-picker/file-picker.template.d.ts +3 -3
- package/lib/file-picker/index.d.ts +1 -0
- package/lib/header/header.d.ts +93 -62
- package/lib/header/header.template.d.ts +3 -3
- package/lib/header/index.d.ts +1 -0
- package/lib/icon/icon.d.ts +2 -2
- package/lib/icon/icon.template.d.ts +3 -3
- package/lib/icon/index.d.ts +1 -0
- package/lib/layout/index.d.ts +1 -0
- package/lib/layout/layout.d.ts +2 -2
- package/lib/layout/layout.template.d.ts +2 -2
- package/lib/menu/index.d.ts +1 -0
- package/lib/menu/menu.d.ts +195 -133
- package/lib/menu/menu.template.d.ts +3 -3
- package/lib/menu-item/index.d.ts +1 -0
- package/lib/menu-item/menu-item.d.ts +191 -129
- package/lib/menu-item/menu-item.template.d.ts +2 -2
- package/lib/nav/index.d.ts +1 -0
- package/lib/nav/nav.d.ts +93 -62
- package/lib/nav/nav.template.d.ts +2 -2
- package/lib/nav-disclosure/index.d.ts +1 -0
- package/lib/nav-disclosure/nav-disclosure.d.ts +191 -129
- package/lib/nav-disclosure/nav-disclosure.template.d.ts +3 -3
- package/lib/nav-item/index.d.ts +1 -0
- package/lib/nav-item/nav-item.d.ts +200 -181
- package/lib/nav-item/nav-item.template.d.ts +3 -3
- package/lib/note/index.d.ts +1 -0
- package/lib/note/note.d.ts +97 -66
- package/lib/note/note.template.d.ts +3 -3
- package/lib/number-field/index.d.ts +1 -0
- package/lib/number-field/number-field.d.ts +929 -646
- package/lib/number-field/number-field.template.d.ts +3 -3
- package/lib/option/index.d.ts +1 -0
- package/lib/option/option.d.ts +191 -129
- package/lib/option/option.template.d.ts +3 -3
- package/lib/pagination/index.d.ts +1 -0
- package/lib/pagination/pagination.d.ts +98 -67
- package/lib/pagination/pagination.template.d.ts +3 -3
- package/lib/popover/definition.d.ts +1 -1
- package/lib/popover/index.d.ts +1 -0
- package/lib/popover/popover.d.ts +190 -128
- package/lib/popover/popover.template.d.ts +2 -2
- package/lib/popup/index.d.ts +1 -0
- package/lib/popup/popup.d.ts +1 -1
- package/lib/popup/popup.template.d.ts +3 -3
- package/lib/progress/index.d.ts +1 -0
- package/lib/progress/progress.d.ts +94 -63
- package/lib/progress/progress.template.d.ts +2 -2
- package/lib/progress-ring/index.d.ts +1 -0
- package/lib/progress-ring/progress-ring.d.ts +94 -63
- package/lib/progress-ring/progress-ring.template.d.ts +2 -2
- package/lib/radio/index.d.ts +1 -0
- package/lib/radio/radio.d.ts +340 -242
- package/lib/radio/radio.template.d.ts +2 -2
- package/lib/radio-group/index.d.ts +1 -0
- package/lib/radio-group/radio-group.d.ts +99 -68
- package/lib/radio-group/radio-group.template.d.ts +3 -3
- package/lib/range-slider/index.d.ts +1 -0
- package/lib/range-slider/range-slider.d.ts +313 -218
- package/lib/range-slider/range-slider.template.d.ts +3 -3
- package/lib/rich-text-editor/definition.d.ts +1 -1
- package/lib/rich-text-editor/index.d.ts +1 -0
- package/lib/rich-text-editor/popover.d.ts +1 -1
- package/lib/rich-text-editor/rich-text-editor.d.ts +99 -68
- package/lib/rich-text-editor/rich-text-editor.template.d.ts +2 -2
- package/lib/rich-text-editor/rte/__tests__/async-generator.d.ts +5 -0
- package/lib/rich-text-editor/rte/__tests__/doc-factories.d.ts +106 -0
- package/lib/rich-text-editor/rte/__tests__/font-sizes.d.ts +2 -0
- package/lib/rich-text-editor/rte/__tests__/promise.d.ts +5 -0
- package/lib/rich-text-editor/rte/__tests__/test-utils.d.ts +68 -0
- package/lib/rich-text-editor/rte/config.d.ts +4 -4
- package/lib/rich-text-editor/rte/exports.d.ts +1 -0
- package/lib/rich-text-editor/rte/feature.d.ts +10 -12
- package/lib/rich-text-editor/rte/features/alignment.d.ts +19 -0
- package/lib/rich-text-editor/rte/features/atom.d.ts +9 -0
- package/lib/rich-text-editor/rte/features/base.d.ts +33 -0
- package/lib/rich-text-editor/rte/features/bold.d.ts +17 -0
- package/lib/rich-text-editor/rte/features/drop-handler.d.ts +21 -0
- package/lib/rich-text-editor/rte/features/file-handler.d.ts +25 -0
- package/lib/rich-text-editor/rte/features/font-size-picker.d.ts +46 -0
- package/lib/rich-text-editor/rte/features/hard-break.d.ts +10 -0
- package/lib/rich-text-editor/rte/features/inline-image.d.ts +43 -0
- package/lib/rich-text-editor/rte/features/input-rule.d.ts +10 -0
- package/lib/rich-text-editor/rte/features/internal/basic-text-blocks.d.ts +6 -6
- package/lib/rich-text-editor/rte/features/internal/core.d.ts +37 -0
- package/lib/rich-text-editor/rte/features/internal/cursor-fix.d.ts +16 -0
- package/lib/rich-text-editor/rte/features/internal/foreign-html.d.ts +1 -1
- package/lib/rich-text-editor/rte/features/internal/history.d.ts +2 -2
- package/lib/rich-text-editor/rte/features/internal/input-rules.d.ts +4 -4
- package/lib/rich-text-editor/rte/features/italic.d.ts +17 -0
- package/lib/rich-text-editor/rte/features/keyboard-shortcuts.d.ts +16 -0
- package/lib/rich-text-editor/rte/features/link.d.ts +33 -0
- package/lib/rich-text-editor/rte/features/list.d.ts +24 -0
- package/lib/rich-text-editor/rte/features/monospace.d.ts +22 -0
- package/lib/rich-text-editor/rte/features/placeholder.d.ts +23 -0
- package/lib/rich-text-editor/rte/features/strikethrough.d.ts +17 -0
- package/lib/rich-text-editor/rte/features/suggest.d.ts +14 -0
- package/lib/rich-text-editor/rte/features/text-block-picker.d.ts +18 -0
- package/lib/rich-text-editor/rte/features/text-color-picker.d.ts +31 -0
- package/lib/rich-text-editor/rte/features/toolbar-button.d.ts +13 -0
- package/lib/rich-text-editor/rte/features/toolbar.d.ts +37 -0
- package/lib/rich-text-editor/rte/features/underline.d.ts +17 -0
- package/lib/rich-text-editor/rte/html-parser.d.ts +3 -3
- package/lib/rich-text-editor/rte/html-serializer.d.ts +3 -3
- package/lib/rich-text-editor/rte/instance.d.ts +10 -8
- package/lib/rich-text-editor/rte/public-interface.d.ts +13 -0
- package/lib/rich-text-editor/rte/utils/default-textblock.d.ts +2 -2
- package/lib/rich-text-editor/rte/utils/feature-state.d.ts +1 -1
- package/lib/rich-text-editor/rte/utils/text-before-cursor.d.ts +1 -1
- package/lib/rich-text-editor/rte/utils/ui.d.ts +8 -8
- package/lib/rich-text-editor/rte/view.d.ts +3 -6
- package/lib/rich-text-view/definition.d.ts +1 -1
- package/lib/rich-text-view/index.d.ts +2 -0
- package/lib/rich-text-view/rich-text-view.d.ts +1 -1
- package/lib/rich-text-view/rich-text-view.template.d.ts +2 -2
- package/lib/searchable-select/index.d.ts +1 -0
- package/lib/searchable-select/option-tag.d.ts +96 -65
- package/lib/searchable-select/option-tag.template.d.ts +3 -3
- package/lib/searchable-select/searchable-select.d.ts +929 -646
- package/lib/searchable-select/searchable-select.template.d.ts +3 -3
- package/lib/select/index.d.ts +1 -0
- package/lib/select/locale.d.ts +3 -0
- package/lib/select/select.d.ts +1240 -579
- package/lib/select/select.template.d.ts +3 -3
- package/lib/selectable-box/index.d.ts +1 -0
- package/lib/selectable-box/selectable-box.d.ts +94 -63
- package/lib/selectable-box/selectable-box.template.d.ts +2 -2
- package/lib/side-drawer/index.d.ts +1 -0
- package/lib/side-drawer/side-drawer.template.d.ts +2 -2
- package/lib/simple-color-picker/definition.d.ts +1 -1
- package/lib/simple-color-picker/index.d.ts +1 -0
- package/lib/simple-color-picker/simple-color-picker.d.ts +216 -153
- package/lib/simple-color-picker/simple-color-picker.template.d.ts +2 -2
- package/lib/slider/index.d.ts +1 -0
- package/lib/slider/slider.d.ts +299 -205
- package/lib/slider/slider.template.d.ts +4 -4
- package/lib/split-button/index.d.ts +1 -0
- package/lib/split-button/split-button.d.ts +288 -195
- package/lib/split-button/split-button.template.d.ts +3 -3
- package/lib/status/index.d.ts +1 -0
- package/lib/status/status.d.ts +98 -67
- package/lib/status/status.template.d.ts +3 -3
- package/lib/switch/index.d.ts +1 -0
- package/lib/switch/switch.d.ts +207 -142
- package/lib/switch/switch.template.d.ts +2 -2
- package/lib/tab/index.d.ts +1 -0
- package/lib/tab/tab.d.ts +288 -195
- package/lib/tab/tab.template.d.ts +3 -3
- package/lib/tab-panel/index.d.ts +1 -0
- package/lib/tab-panel/tab-panel.d.ts +93 -62
- package/lib/tab-panel/tab-panel.template.d.ts +2 -2
- package/lib/table/index.d.ts +1 -0
- package/lib/table/table-body.template.d.ts +3 -3
- package/lib/table/table-cell.d.ts +93 -62
- package/lib/table/table-cell.template.d.ts +3 -3
- package/lib/table/table-head.template.d.ts +3 -3
- package/lib/table/table-header-cell.d.ts +93 -62
- package/lib/table/table-header-cell.template.d.ts +3 -3
- package/lib/table/table-row.d.ts +93 -62
- package/lib/table/table-row.template.d.ts +3 -3
- package/lib/table/table.template.d.ts +3 -3
- package/lib/tabs/index.d.ts +1 -0
- package/lib/tabs/tabs.d.ts +2 -2
- package/lib/tabs/tabs.template.d.ts +2 -2
- package/lib/tag/index.d.ts +1 -0
- package/lib/tag/tag.d.ts +288 -195
- package/lib/tag/tag.template.d.ts +3 -3
- package/lib/tag-group/index.d.ts +1 -0
- package/lib/tag-group/tag-group.d.ts +93 -62
- package/lib/tag-group/tag-group.template.d.ts +2 -2
- package/lib/tag-name-map.d.ts +1 -1
- package/lib/text-area/index.d.ts +1 -0
- package/lib/text-area/text-area.d.ts +832 -581
- package/lib/text-area/text-area.template.d.ts +3 -3
- package/lib/text-field/index.d.ts +1 -0
- package/lib/text-field/text-field.d.ts +931 -649
- package/lib/text-field/text-field.template.d.ts +3 -3
- package/lib/time-picker/index.d.ts +1 -0
- package/lib/time-picker/time-picker.d.ts +486 -359
- package/lib/time-picker/time-picker.template.d.ts +3 -3
- package/lib/toggletip/index.d.ts +1 -0
- package/lib/toggletip/toggletip.d.ts +197 -135
- package/lib/toggletip/toggletip.template.d.ts +3 -3
- package/lib/tooltip/index.d.ts +1 -0
- package/lib/tooltip/tooltip.d.ts +101 -70
- package/lib/tooltip/tooltip.template.d.ts +3 -3
- package/lib/tree-item/index.d.ts +1 -0
- package/lib/tree-item/tree-item.d.ts +190 -128
- package/lib/tree-item/tree-item.template.d.ts +3 -3
- package/lib/tree-view/index.d.ts +1 -0
- package/lib/tree-view/tree-view.d.ts +93 -62
- package/lib/tree-view/tree-view.template.d.ts +2 -2
- package/lib/video-player/index.d.ts +1 -0
- package/lib/video-player/video-player.d.ts +96 -65
- package/lib/video-player/video-player.template.d.ts +1 -1
- package/lib/video-player/vivid-video-svg.d.ts +1 -1
- package/lib/visually-hidden/definition.d.ts +1 -1
- package/lib/visually-hidden/index.d.ts +1 -0
- package/lib/visually-hidden/visually-hidden.template.d.ts +1 -1
- package/locales/de-DE.cjs +3 -0
- package/locales/de-DE.d.ts +1 -1
- package/locales/de-DE.js +3 -0
- package/locales/en-GB.cjs +3 -0
- package/locales/en-GB.d.ts +1 -1
- package/locales/en-GB.js +3 -0
- package/locales/en-US.cjs +3 -0
- package/locales/en-US.d.ts +1 -1
- package/locales/en-US.js +3 -0
- package/locales/ja-JP.cjs +3 -0
- package/locales/ja-JP.d.ts +1 -1
- package/locales/ja-JP.js +3 -0
- package/locales/zh-CN.cjs +3 -0
- package/locales/zh-CN.d.ts +1 -1
- package/locales/zh-CN.js +3 -0
- package/package.json +6 -6
- package/rich-text-editor/definition.cjs +51 -24
- package/rich-text-editor/definition.js +52 -26
- package/rich-text-editor/index.cjs +7 -7
- package/rich-text-editor/index.js +1255 -1237
- package/rich-text-view/index.js +1 -1
- package/select/definition.cjs +104 -5
- package/select/definition.js +104 -5
- package/shared/aria/aria-change-subscription.d.ts +1 -1
- package/shared/aria/aria-mixin.d.ts +94 -63
- package/shared/aria/attribute-removal.d.ts +1 -1
- package/shared/aria/delegate-aria-behavior.d.ts +2 -2
- package/shared/aria/delegates-aria.d.ts +96 -65
- package/shared/aria/host-semantics-behavior.d.ts +2 -2
- package/shared/aria/host-semantics.d.ts +97 -66
- package/shared/color-picker/base-color-picker.d.ts +114 -82
- package/shared/datetime/dateRange.d.ts +1 -1
- package/shared/datetime/dateTimeStr.d.ts +4 -4
- package/shared/datetime/month.d.ts +1 -1
- package/shared/datetime/presentationDate.d.ts +2 -2
- package/shared/datetime/presentationDateRange.d.ts +2 -2
- package/shared/datetime/presentationDateTime.d.ts +2 -2
- package/shared/datetime/presentationTime.d.ts +1 -1
- package/shared/datetime/year.d.ts +1 -1
- package/shared/deprecation/replaced-props.d.ts +95 -60
- package/shared/design-system/createRegisterFunction.d.ts +1 -1
- package/shared/design-system/defineVividComponent.d.ts +1 -1
- package/shared/feedback/feedback-message.d.ts +96 -65
- package/shared/feedback/mixins.d.ts +200 -138
- package/shared/foundation/button/button.d.ts +202 -139
- package/shared/foundation/button/button.template.d.ts +2 -2
- package/shared/foundation/form-associated/form-associated.d.ts +213 -147
- package/shared/foundation/listbox/listbox.d.ts +1 -1
- package/shared/foundation/test-utilities/fixture.d.ts +18 -0
- package/shared/foundation/vivid-element/vivid-element.d.ts +194 -131
- package/shared/localization/Locale.d.ts +31 -29
- package/shared/localization/index.d.ts +1 -1
- package/shared/patterns/affix.d.ts +195 -133
- package/shared/patterns/anchored.d.ts +202 -140
- package/shared/patterns/char-count/char-count.d.ts +99 -68
- package/shared/patterns/chevron.d.ts +2 -2
- package/shared/patterns/form-elements/form-element.d.ts +114 -488
- package/shared/patterns/form-elements/with-contextual-help.d.ts +117 -903
- package/shared/patterns/form-elements/with-error-text.d.ts +120 -906
- package/shared/patterns/form-elements/with-success-text.d.ts +97 -66
- package/shared/patterns/linkable.d.ts +106 -117
- package/shared/patterns/localized.d.ts +197 -135
- package/shared/patterns/trapped-focus.d.ts +95 -64
- package/shared/picker-field/mixins/calendar-picker.d.ts +251 -188
- package/shared/picker-field/mixins/calendar-picker.template.d.ts +271 -208
- package/shared/picker-field/mixins/calendar-segments/calendarGrid.d.ts +3 -3
- package/shared/picker-field/mixins/calendar-segments/monthPickerGrid.d.ts +2 -2
- package/shared/picker-field/mixins/calendar-segments/segment.d.ts +2 -2
- package/shared/picker-field/mixins/inline-time-picker/columns.d.ts +2 -2
- package/shared/picker-field/mixins/inline-time-picker/index.d.ts +1 -0
- package/shared/picker-field/mixins/inline-time-picker/inline-time-picker.d.ts +95 -64
- package/shared/picker-field/mixins/inline-time-picker/inline-time-picker.template.d.ts +3 -3
- package/shared/picker-field/mixins/inline-time-picker/picker-option.d.ts +1 -1
- package/shared/picker-field/mixins/min-max-calendar-picker.d.ts +277 -1102
- package/shared/picker-field/mixins/single-date-picker.d.ts +274 -1953
- package/shared/picker-field/mixins/single-value-picker.d.ts +236 -173
- package/shared/picker-field/mixins/time-selection-picker.d.ts +257 -1046
- package/shared/picker-field/mixins/time-selection-picker.template.d.ts +486 -360
- package/shared/picker-field/picker-field.d.ts +735 -514
- package/shared/picker-field/picker-field.template.d.ts +2 -2
- package/shared/templating/attribute-binding-behaviour.d.ts +1 -1
- package/shared/templating/render-in-light-dom.d.ts +2 -2
- package/shared/utils/closest-of-type.d.ts +2 -0
- package/shared/utils/direct-children-of-type.d.ts +2 -0
- package/shared/utils/dom-traversal-types.d.ts +3 -0
- package/shared/utils/first-of-type.d.ts +2 -0
- package/shared/utils/last-of-type.d.ts +2 -0
- package/shared/utils/nested-children-of-type.d.ts +2 -0
- package/shared/utils/next-of-type.d.ts +2 -0
- package/shared/utils/numberConverter.d.ts +1 -1
- package/shared/utils/prev-of-type.d.ts +2 -0
- package/shared/utils/promise.d.ts +2 -2
- package/shared/utils/siblings-of-type.d.ts +2 -0
- package/styles/core/all.css +2 -2
- package/styles/core/theme.css +2 -2
- package/styles/core/typography.css +1 -1
- package/styles/tokens/theme-dark.css +4 -4
- package/styles/tokens/theme-light.css +4 -4
- package/styles/tokens/vivid-2-compat.css +1 -1
- package/unbundled/base-color-picker.cjs +2 -2
- package/unbundled/base-color-picker.js +2 -2
- package/unbundled/localized.cjs +1 -0
- package/unbundled/localized.js +1 -0
- package/unbundled/slottable-request.cjs +8 -5
- package/unbundled/slottable-request.js +8 -6
- package/unbundled/vivid-element.cjs +1 -1
- package/unbundled/vivid-element.js +1 -1
- package/vivid.api.json +759 -38
package/bundled/definition19.js
CHANGED
|
@@ -1,43 +1,46 @@
|
|
|
1
|
-
import { P as D, p as
|
|
2
|
-
import { i as
|
|
3
|
-
import { L as
|
|
4
|
-
import {
|
|
5
|
-
import { a as P,
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { W as
|
|
12
|
-
import { W as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
1
|
+
import { P as D, p as F } from "./definition9.js";
|
|
2
|
+
import { i as H } from "./definition2.js";
|
|
3
|
+
import { L as E, l as V } from "./definition12.js";
|
|
4
|
+
import { B as z, c as L, b as T } from "./definition3.js";
|
|
5
|
+
import { U as W, O as v, o as p, a as i, v as P, h as d, c as N, d as M } from "./vivid-element.js";
|
|
6
|
+
import { a as K, f as R } from "./mixins.js";
|
|
7
|
+
import { L as O } from "./listbox.js";
|
|
8
|
+
import { H as j, a as U } from "./host-semantics.js";
|
|
9
|
+
import { F as q } from "./form-associated.js";
|
|
10
|
+
import { i as f } from "./numbers.js";
|
|
11
|
+
import { W as X } from "./with-contextual-help.js";
|
|
12
|
+
import { W as G } from "./with-error-text.js";
|
|
13
|
+
import { W as J } from "./with-success-text.js";
|
|
14
|
+
import { L as Q } from "./localized.js";
|
|
15
|
+
import { F as Y } from "./form-element.js";
|
|
16
|
+
import { A as Z, a as ee, I as te } from "./affix.js";
|
|
17
|
+
import { u as oe } from "./strings.js";
|
|
18
|
+
import { l as g, d as _, m as k, k as y, c as I, b as w, a as S, f as ae } from "./key-codes.js";
|
|
19
|
+
import { h as re } from "./index.js";
|
|
19
20
|
import { r as b } from "./ref.js";
|
|
20
|
-
import { w as
|
|
21
|
+
import { w as u } from "./when.js";
|
|
21
22
|
import { s as x } from "./slotted.js";
|
|
22
|
-
import { c as
|
|
23
|
-
var
|
|
24
|
-
for (var a = o > 1 ? void 0 : o ?
|
|
25
|
-
(
|
|
26
|
-
return o && a &&
|
|
23
|
+
import { c as le } from "./class-names.js";
|
|
24
|
+
var ne = Object.defineProperty, se = Object.getOwnPropertyDescriptor, n = (r, t, e, o) => {
|
|
25
|
+
for (var a = o > 1 ? void 0 : o ? se(t, e) : t, s = r.length - 1, c; s >= 0; s--)
|
|
26
|
+
(c = r[s]) && (a = (o ? c(t, e, a) : c(a)) || a);
|
|
27
|
+
return o && a && ne(t, e, a), a;
|
|
27
28
|
};
|
|
28
|
-
class l extends
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
class l extends K(
|
|
30
|
+
X(
|
|
31
|
+
G(
|
|
32
|
+
J(
|
|
33
|
+
Q(
|
|
34
|
+
Y(
|
|
35
|
+
j(Z(q(O)))
|
|
36
|
+
)
|
|
34
37
|
)
|
|
35
38
|
)
|
|
36
39
|
)
|
|
37
40
|
)
|
|
38
41
|
) {
|
|
39
42
|
constructor() {
|
|
40
|
-
super(...arguments), this.proxy = document.createElement("select"), this.activeIndex = -1, this.rangeStartIndex = -1, this.open = !1, this.listboxId =
|
|
43
|
+
super(...arguments), this.proxy = document.createElement("select"), this.activeIndex = -1, this.rangeStartIndex = -1, this.open = !1, this.listboxId = oe("listbox-"), this.maxHeight = 0, this.fixedDropdown = !1, this._feedbackWrapper = null, this.clearable = !1, this._isClearButtonFocused = !1;
|
|
41
44
|
}
|
|
42
45
|
/**
|
|
43
46
|
* Returns the last checked option.
|
|
@@ -53,7 +56,7 @@ class l extends P(
|
|
|
53
56
|
* @internal
|
|
54
57
|
*/
|
|
55
58
|
get checkedOptions() {
|
|
56
|
-
return this.options.filter((
|
|
59
|
+
return this.options.filter((t) => t.checked);
|
|
57
60
|
}
|
|
58
61
|
/**
|
|
59
62
|
* Returns the index of the first selected option.
|
|
@@ -68,8 +71,8 @@ class l extends P(
|
|
|
68
71
|
*
|
|
69
72
|
* @internal
|
|
70
73
|
*/
|
|
71
|
-
activeIndexChanged(
|
|
72
|
-
this._activeDescendant = this.options[
|
|
74
|
+
activeIndexChanged(t, e) {
|
|
75
|
+
this._activeDescendant = this.options[e]?.id ?? "", this.focusAndScrollOptionIntoView();
|
|
73
76
|
}
|
|
74
77
|
/**
|
|
75
78
|
* Toggles the checked state for the currently active option.
|
|
@@ -80,9 +83,9 @@ class l extends P(
|
|
|
80
83
|
* @internal
|
|
81
84
|
*/
|
|
82
85
|
checkActiveIndex() {
|
|
83
|
-
const
|
|
86
|
+
const t = this.activeOption;
|
|
84
87
|
/* v8 ignore else -- @preserve */
|
|
85
|
-
|
|
88
|
+
t && (t.checked = !0);
|
|
86
89
|
}
|
|
87
90
|
/**
|
|
88
91
|
* Sets the active index to the first option and marks it as checked.
|
|
@@ -94,11 +97,11 @@ class l extends P(
|
|
|
94
97
|
*
|
|
95
98
|
* @internal
|
|
96
99
|
*/
|
|
97
|
-
checkFirstOption(
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
o.checked =
|
|
101
|
-
})) : this.uncheckAllOptions(), this.activeIndex =
|
|
100
|
+
checkFirstOption(t) {
|
|
101
|
+
const e = this.getNextSelectableIndex(0);
|
|
102
|
+
e !== -1 && (t ? (this.rangeStartIndex === -1 && (this.rangeStartIndex = this.activeIndex), this.options.forEach((o, a) => {
|
|
103
|
+
o.checked = f(a, e, this.rangeStartIndex + 1) && !o.disabled;
|
|
104
|
+
})) : this.uncheckAllOptions(), this.activeIndex = e, this.checkActiveIndex());
|
|
102
105
|
}
|
|
103
106
|
/**
|
|
104
107
|
* Decrements the active index and sets the matching option as checked.
|
|
@@ -110,13 +113,13 @@ class l extends P(
|
|
|
110
113
|
*
|
|
111
114
|
* @internal
|
|
112
115
|
*/
|
|
113
|
-
checkLastOption(
|
|
114
|
-
const
|
|
116
|
+
checkLastOption(t) {
|
|
117
|
+
const e = this.getPreviousSelectableIndex(
|
|
115
118
|
this.length - 1
|
|
116
119
|
);
|
|
117
|
-
|
|
118
|
-
o.checked =
|
|
119
|
-
})) : this.uncheckAllOptions(), this.activeIndex =
|
|
120
|
+
e !== -1 && (t ? (this.rangeStartIndex === -1 && (this.rangeStartIndex = this.activeIndex), this.options.forEach((o, a) => {
|
|
121
|
+
o.checked = f(a, this.rangeStartIndex, e + 1) && !o.disabled;
|
|
122
|
+
})) : this.uncheckAllOptions(), this.activeIndex = e, this.checkActiveIndex());
|
|
120
123
|
}
|
|
121
124
|
/**
|
|
122
125
|
* Increments the active index and marks the matching option as checked.
|
|
@@ -128,11 +131,11 @@ class l extends P(
|
|
|
128
131
|
*
|
|
129
132
|
* @internal
|
|
130
133
|
*/
|
|
131
|
-
checkNextOption(
|
|
132
|
-
const
|
|
133
|
-
|
|
134
|
-
o.checked =
|
|
135
|
-
})) : this.uncheckAllOptions(), this.activeIndex =
|
|
134
|
+
checkNextOption(t) {
|
|
135
|
+
const e = this.getNextSelectableIndex(this.activeIndex + 1);
|
|
136
|
+
e !== -1 && (t ? (this.rangeStartIndex === -1 && (this.rangeStartIndex = this.activeIndex), this.options.forEach((o, a) => {
|
|
137
|
+
o.checked = f(a, this.rangeStartIndex, e + 1) && !o.disabled;
|
|
138
|
+
})) : this.uncheckAllOptions(), this.activeIndex = e, this.checkActiveIndex());
|
|
136
139
|
}
|
|
137
140
|
/**
|
|
138
141
|
* Decrements the active index and marks the matching option as checked.
|
|
@@ -144,11 +147,11 @@ class l extends P(
|
|
|
144
147
|
*
|
|
145
148
|
* @internal
|
|
146
149
|
*/
|
|
147
|
-
checkPreviousOption(
|
|
148
|
-
const
|
|
149
|
-
|
|
150
|
-
o.checked =
|
|
151
|
-
})) : this.uncheckAllOptions(), this.activeIndex =
|
|
150
|
+
checkPreviousOption(t) {
|
|
151
|
+
const e = this.getPreviousSelectableIndex(this.activeIndex - 1);
|
|
152
|
+
e !== -1 && (t ? (this.rangeStartIndex === -1 && (this.rangeStartIndex = this.activeIndex), this.checkedOptions.length === 1 && (this.rangeStartIndex += 1), this.options.forEach((o, a) => {
|
|
153
|
+
o.checked = f(a, e, this.rangeStartIndex + 1) && !o.disabled;
|
|
154
|
+
})) : this.uncheckAllOptions(), this.activeIndex = e, this.checkActiveIndex());
|
|
152
155
|
}
|
|
153
156
|
/**
|
|
154
157
|
* @internal
|
|
@@ -164,11 +167,11 @@ class l extends P(
|
|
|
164
167
|
*
|
|
165
168
|
* @internal
|
|
166
169
|
*/
|
|
167
|
-
focusinHandler(
|
|
170
|
+
focusinHandler(t) {
|
|
168
171
|
if (!this.multiple)
|
|
169
|
-
return super.focusinHandler(
|
|
172
|
+
return super.focusinHandler(t);
|
|
170
173
|
/* v8 ignore else -- @preserve */
|
|
171
|
-
!this.shouldSkipFocus &&
|
|
174
|
+
!this.shouldSkipFocus && t.target === t.currentTarget && (this.uncheckAllOptions(), this.activeIndex === -1 && (this.activeIndex = this.firstSelectedOptionIndex !== -1 ? this.firstSelectedOptionIndex : 0), this.checkActiveIndex(), this.setSelectedOptions(), this.focusAndScrollOptionIntoView()), this.shouldSkipFocus = !1;
|
|
172
175
|
}
|
|
173
176
|
/**
|
|
174
177
|
* Sets an option as selected and gives it focus.
|
|
@@ -181,7 +184,7 @@ class l extends P(
|
|
|
181
184
|
return;
|
|
182
185
|
}
|
|
183
186
|
/* v8 ignore else -- @preserve */
|
|
184
|
-
this.$fastController.isConnected && this.options && (this.selectedOptions = this.options.filter((
|
|
187
|
+
this.$fastController.isConnected && this.options && (this.selectedOptions = this.options.filter((t) => t.selected), this.focusAndScrollOptionIntoView());
|
|
185
188
|
}
|
|
186
189
|
/**
|
|
187
190
|
* Toggles the selected state of the provided options. If any provided items
|
|
@@ -191,19 +194,19 @@ class l extends P(
|
|
|
191
194
|
* @internal
|
|
192
195
|
*/
|
|
193
196
|
toggleSelectedForAllCheckedOptions() {
|
|
194
|
-
const
|
|
197
|
+
const t = this.checkedOptions.filter(
|
|
195
198
|
(o) => !o.disabled
|
|
196
|
-
),
|
|
197
|
-
|
|
198
|
-
|
|
199
|
+
), e = !t.every((o) => o.selected);
|
|
200
|
+
t.forEach((o) => o.selected = e), this.selectedIndex = this.options.indexOf(
|
|
201
|
+
t[t.length - 1]
|
|
199
202
|
), this.setSelectedOptions(), this.updateValue(!0);
|
|
200
203
|
}
|
|
201
204
|
/**
|
|
202
205
|
* @internal
|
|
203
206
|
*/
|
|
204
|
-
typeaheadBufferChanged(
|
|
207
|
+
typeaheadBufferChanged(t, e) {
|
|
205
208
|
if (!this.multiple) {
|
|
206
|
-
super.typeaheadBufferChanged(
|
|
209
|
+
super.typeaheadBufferChanged(t, e);
|
|
207
210
|
return;
|
|
208
211
|
}
|
|
209
212
|
/* v8 ignore if -- @preserve */
|
|
@@ -222,24 +225,24 @@ class l extends P(
|
|
|
222
225
|
*
|
|
223
226
|
* @internal
|
|
224
227
|
*/
|
|
225
|
-
uncheckAllOptions(
|
|
226
|
-
this.options.forEach((
|
|
228
|
+
uncheckAllOptions(t = !1) {
|
|
229
|
+
this.options.forEach((e) => e.checked = !1);
|
|
227
230
|
/* v8 ignore else -- @preserve */
|
|
228
|
-
|
|
231
|
+
t || (this.rangeStartIndex = -1);
|
|
229
232
|
}
|
|
230
233
|
/**
|
|
231
234
|
* Sets focus when the open property changes.
|
|
232
235
|
*
|
|
233
236
|
* @internal
|
|
234
237
|
*/
|
|
235
|
-
openChanged(
|
|
238
|
+
openChanged(t, e) {
|
|
236
239
|
if (!this.collapsible)
|
|
237
240
|
return;
|
|
238
241
|
if (this.open) {
|
|
239
|
-
this.focusAndScrollOptionIntoView(), this.indexWhenOpened = this.selectedIndex,
|
|
242
|
+
this.focusAndScrollOptionIntoView(), this.indexWhenOpened = this.selectedIndex, W.enqueue(() => this.focus());
|
|
240
243
|
return;
|
|
241
244
|
}
|
|
242
|
-
const o =
|
|
245
|
+
const o = t === !0 && e === !1, a = this.indexWhenOpened !== this.selectedIndex;
|
|
243
246
|
o && a && this.updateValue(!0);
|
|
244
247
|
}
|
|
245
248
|
get collapsible() {
|
|
@@ -248,9 +251,9 @@ class l extends P(
|
|
|
248
251
|
/**
|
|
249
252
|
* @internal
|
|
250
253
|
*/
|
|
251
|
-
valueChanged(
|
|
252
|
-
const o = this.options.findIndex((
|
|
253
|
-
this.selectedIndex !== a && (this.selectedIndex = a),
|
|
254
|
+
valueChanged(t, e) {
|
|
255
|
+
const o = this.options.findIndex((c) => c.value === e), a = this._validSelectedIndex(o), s = this.options[a]?.value ?? "";
|
|
256
|
+
this.selectedIndex !== a && (this.selectedIndex = a), e === s && (super.valueChanged(t, e), this.updateDisplayValue());
|
|
254
257
|
}
|
|
255
258
|
/**
|
|
256
259
|
* Sets the value and display value to match the first selected option.
|
|
@@ -259,8 +262,8 @@ class l extends P(
|
|
|
259
262
|
*
|
|
260
263
|
* @internal
|
|
261
264
|
*/
|
|
262
|
-
updateValue(
|
|
263
|
-
this.$fastController.isConnected && (this.value = this.firstSelectedOption?.value ?? ""),
|
|
265
|
+
updateValue(t) {
|
|
266
|
+
this.$fastController.isConnected && (this.value = this.firstSelectedOption?.value ?? ""), t && (this.$emit("input"), this.$emit("change", this, {
|
|
264
267
|
bubbles: !0,
|
|
265
268
|
composed: void 0
|
|
266
269
|
}));
|
|
@@ -273,8 +276,8 @@ class l extends P(
|
|
|
273
276
|
*
|
|
274
277
|
* @internal
|
|
275
278
|
*/
|
|
276
|
-
selectedIndexChanged(
|
|
277
|
-
super.selectedIndexChanged(
|
|
279
|
+
selectedIndexChanged(t, e) {
|
|
280
|
+
super.selectedIndexChanged(t, e), this.updateValue();
|
|
278
281
|
}
|
|
279
282
|
/**
|
|
280
283
|
* Handle opening and closing the listbox when the select is clicked.
|
|
@@ -282,14 +285,14 @@ class l extends P(
|
|
|
282
285
|
* @param e - the mouse event
|
|
283
286
|
* @internal
|
|
284
287
|
*/
|
|
285
|
-
clickHandler(
|
|
286
|
-
if (this.disabled || this._isFromContextualHelp(
|
|
288
|
+
clickHandler(t) {
|
|
289
|
+
if (this.disabled || this._isFromContextualHelp(t))
|
|
287
290
|
return;
|
|
288
|
-
const
|
|
291
|
+
const e = t.target.closest(
|
|
289
292
|
"option,[role=option],[data-vvd-component=option]"
|
|
290
293
|
);
|
|
291
|
-
if (!(
|
|
292
|
-
return this.multiple ? (this.uncheckAllOptions(), this.activeIndex = this.options.indexOf(
|
|
294
|
+
if (!(e && e.disabled))
|
|
295
|
+
return this.multiple ? (this.uncheckAllOptions(), this.activeIndex = this.options.indexOf(e), this.checkActiveIndex(), this.toggleSelectedForAllCheckedOptions()) : super.clickHandler(t), this.collapsible && (this.open = !this.open), !0;
|
|
293
296
|
}
|
|
294
297
|
/**
|
|
295
298
|
* Handles focus state when the element or its children lose focus.
|
|
@@ -297,16 +300,16 @@ class l extends P(
|
|
|
297
300
|
* @param e - The focus event
|
|
298
301
|
* @internal
|
|
299
302
|
*/
|
|
300
|
-
focusoutHandler(
|
|
303
|
+
focusoutHandler(t) {
|
|
301
304
|
if (this.multiple && this.uncheckAllOptions(), !this.open)
|
|
302
305
|
return !0;
|
|
303
|
-
const
|
|
304
|
-
if (this.isSameNode(
|
|
306
|
+
const e = t.relatedTarget;
|
|
307
|
+
if (this.isSameNode(e)) {
|
|
305
308
|
this.focus();
|
|
306
309
|
return;
|
|
307
310
|
}
|
|
308
311
|
/* v8 ignore else -- @preserve */
|
|
309
|
-
this.options.includes(
|
|
312
|
+
this.options.includes(e) || (this.open = !1, this.indexWhenOpened !== this.selectedIndex && this.updateValue(!0));
|
|
310
313
|
}
|
|
311
314
|
/**
|
|
312
315
|
* Updates the value when an option's value changes.
|
|
@@ -316,8 +319,8 @@ class l extends P(
|
|
|
316
319
|
*
|
|
317
320
|
* @internal
|
|
318
321
|
*/
|
|
319
|
-
handleChange(
|
|
320
|
-
super.handleChange(
|
|
322
|
+
handleChange(t, e) {
|
|
323
|
+
super.handleChange(t, e), e === "value" && this.updateValue();
|
|
321
324
|
}
|
|
322
325
|
/**
|
|
323
326
|
* Prevents focus when a scrollbar is clicked.
|
|
@@ -326,18 +329,18 @@ class l extends P(
|
|
|
326
329
|
*
|
|
327
330
|
* @internal
|
|
328
331
|
*/
|
|
329
|
-
mousedownHandler(
|
|
330
|
-
return
|
|
332
|
+
mousedownHandler(t) {
|
|
333
|
+
return t.offsetX >= 0 && t.offsetX <= this.listbox.scrollWidth ? super.mousedownHandler(t) : this.collapsible;
|
|
331
334
|
}
|
|
332
335
|
/**
|
|
333
336
|
* @internal
|
|
334
337
|
*/
|
|
335
|
-
multipleChanged(
|
|
338
|
+
multipleChanged(t, e) {
|
|
336
339
|
this.options.forEach((o) => {
|
|
337
|
-
o.checked =
|
|
340
|
+
o.checked = e ? !1 : void 0;
|
|
338
341
|
}), this.setSelectedOptions();
|
|
339
342
|
/* v8 ignore if -- @preserve */
|
|
340
|
-
this.proxy && (this.proxy.multiple =
|
|
343
|
+
this.proxy && (this.proxy.multiple = e);
|
|
341
344
|
}
|
|
342
345
|
/**
|
|
343
346
|
* Updates the selectedness of each option when the list of selected options changes.
|
|
@@ -347,10 +350,10 @@ class l extends P(
|
|
|
347
350
|
*
|
|
348
351
|
* @internal
|
|
349
352
|
*/
|
|
350
|
-
selectedOptionsChanged(
|
|
351
|
-
super.selectedOptionsChanged(
|
|
352
|
-
const
|
|
353
|
-
|
|
353
|
+
selectedOptionsChanged(t, e) {
|
|
354
|
+
super.selectedOptionsChanged(t, e), this.options.forEach((o, a) => {
|
|
355
|
+
const s = this.proxy.options.item(a);
|
|
356
|
+
s && (s.selected = o.selected);
|
|
354
357
|
});
|
|
355
358
|
}
|
|
356
359
|
/**
|
|
@@ -360,9 +363,9 @@ class l extends P(
|
|
|
360
363
|
*/
|
|
361
364
|
setProxyOptions() {
|
|
362
365
|
/* v8 ignore else -- @preserve */
|
|
363
|
-
this.proxy instanceof HTMLSelectElement && this.options && (this.proxy.length = 0, this.options.forEach((
|
|
364
|
-
const
|
|
365
|
-
|
|
366
|
+
this.proxy instanceof HTMLSelectElement && this.options && (this.proxy.length = 0, this.options.forEach((t) => {
|
|
367
|
+
const e = t.proxy || (t instanceof HTMLOptionElement ? t.cloneNode() : null);
|
|
368
|
+
e && this.proxy.options.add(e);
|
|
366
369
|
}));
|
|
367
370
|
}
|
|
368
371
|
/**
|
|
@@ -370,16 +373,16 @@ class l extends P(
|
|
|
370
373
|
*
|
|
371
374
|
* @internal
|
|
372
375
|
*/
|
|
373
|
-
multipleKeydownHandler(
|
|
376
|
+
multipleKeydownHandler(t) {
|
|
374
377
|
if (this.disabled)
|
|
375
378
|
return;
|
|
376
|
-
const { key:
|
|
377
|
-
switch (this.shouldSkipFocus = !1,
|
|
378
|
-
case
|
|
379
|
+
const { key: e, shiftKey: o } = t;
|
|
380
|
+
switch (this.shouldSkipFocus = !1, e) {
|
|
381
|
+
case S: {
|
|
379
382
|
this.checkFirstOption(o);
|
|
380
383
|
return;
|
|
381
384
|
}
|
|
382
|
-
case
|
|
385
|
+
case w: {
|
|
383
386
|
this.checkNextOption(o);
|
|
384
387
|
return;
|
|
385
388
|
}
|
|
@@ -387,20 +390,20 @@ class l extends P(
|
|
|
387
390
|
this.checkPreviousOption(o);
|
|
388
391
|
return;
|
|
389
392
|
}
|
|
390
|
-
case
|
|
393
|
+
case y: {
|
|
391
394
|
this.checkLastOption(o);
|
|
392
395
|
return;
|
|
393
396
|
}
|
|
394
|
-
case
|
|
397
|
+
case k: {
|
|
395
398
|
this.focusAndScrollOptionIntoView();
|
|
396
399
|
return;
|
|
397
400
|
}
|
|
398
|
-
case
|
|
401
|
+
case _: {
|
|
399
402
|
this.uncheckAllOptions(), this.checkActiveIndex();
|
|
400
403
|
return;
|
|
401
404
|
}
|
|
402
405
|
case g: {
|
|
403
|
-
|
|
406
|
+
t.preventDefault();
|
|
404
407
|
/* v8 ignore else -- @preserve */
|
|
405
408
|
if (this.typeaheadExpired) {
|
|
406
409
|
this.toggleSelectedForAllCheckedOptions();
|
|
@@ -409,7 +412,7 @@ class l extends P(
|
|
|
409
412
|
}
|
|
410
413
|
default: {
|
|
411
414
|
/* v8 ignore else -- @preserve */
|
|
412
|
-
|
|
415
|
+
e.length === 1 && this.handleTypeAhead(`${e}`);
|
|
413
416
|
return;
|
|
414
417
|
}
|
|
415
418
|
}
|
|
@@ -420,30 +423,30 @@ class l extends P(
|
|
|
420
423
|
* @param e - the keyboard event
|
|
421
424
|
* @internal
|
|
422
425
|
*/
|
|
423
|
-
keydownHandler(
|
|
424
|
-
const
|
|
425
|
-
switch (this.multiple ? this.multipleKeydownHandler(
|
|
426
|
+
keydownHandler(t) {
|
|
427
|
+
const e = this.selectedIndex;
|
|
428
|
+
switch (this.multiple ? this.multipleKeydownHandler(t) : super.keydownHandler(t), t.key) {
|
|
426
429
|
case g: {
|
|
427
|
-
|
|
430
|
+
t.preventDefault(), this.collapsible && this.typeaheadExpired && (this.open = !this.open);
|
|
428
431
|
break;
|
|
429
432
|
}
|
|
430
|
-
case
|
|
431
|
-
case
|
|
432
|
-
|
|
433
|
+
case S:
|
|
434
|
+
case y: {
|
|
435
|
+
t.preventDefault();
|
|
433
436
|
break;
|
|
434
437
|
}
|
|
435
|
-
case
|
|
436
|
-
|
|
438
|
+
case ae: {
|
|
439
|
+
t.preventDefault(), this.open = !this.open;
|
|
437
440
|
break;
|
|
438
441
|
}
|
|
439
|
-
case
|
|
440
|
-
this.collapsible && this.open && (
|
|
442
|
+
case _: {
|
|
443
|
+
this.collapsible && this.open && (t.preventDefault(), this.open = !1);
|
|
441
444
|
break;
|
|
442
445
|
}
|
|
443
|
-
case
|
|
444
|
-
return this.collapsible && this.open && (
|
|
446
|
+
case k:
|
|
447
|
+
return this.collapsible && this.open && (t.preventDefault(), this.open = !1), !0;
|
|
445
448
|
}
|
|
446
|
-
return this.collapsible && !this.open && this.selectedIndex !==
|
|
449
|
+
return this.collapsible && !this.open && this.selectedIndex !== e && this.updateValue(!0), !(t.key === w || t.key === I);
|
|
447
450
|
}
|
|
448
451
|
connectedCallback() {
|
|
449
452
|
super.connectedCallback(), this.addEventListener("focusout", this.focusoutHandler), this.addEventListener("contentchange", this.updateDisplayValue);
|
|
@@ -456,112 +459,151 @@ class l extends P(
|
|
|
456
459
|
* @internal
|
|
457
460
|
*/
|
|
458
461
|
updateDisplayValue() {
|
|
459
|
-
this.collapsible &&
|
|
462
|
+
this.collapsible && v.notify(this, "displayValue");
|
|
460
463
|
}
|
|
461
464
|
get displayValue() {
|
|
462
|
-
return
|
|
465
|
+
return v.track(this, "displayValue"), this.firstSelectedOption?.getAttribute("label") ?? this.firstSelectedOption?.text ?? this.placeholder ?? "";
|
|
463
466
|
}
|
|
464
|
-
_newDefaultSelectedIndex(
|
|
467
|
+
_newDefaultSelectedIndex(t, e, o) {
|
|
465
468
|
const a = super._newDefaultSelectedIndex(
|
|
466
|
-
e,
|
|
467
469
|
t,
|
|
470
|
+
e,
|
|
468
471
|
o
|
|
469
472
|
);
|
|
470
473
|
if (a === null && o === -1 && !this.placeholder) {
|
|
471
|
-
const
|
|
472
|
-
if (
|
|
473
|
-
return
|
|
474
|
+
const s = this.getNextSelectableIndex(0);
|
|
475
|
+
if (s !== -1)
|
|
476
|
+
return s;
|
|
474
477
|
}
|
|
475
478
|
return a;
|
|
476
479
|
}
|
|
477
|
-
_isDefaultSelected(
|
|
478
|
-
return super._isDefaultSelected(
|
|
480
|
+
_isDefaultSelected(t) {
|
|
481
|
+
return super._isDefaultSelected(t) || t.value === this.initialValue;
|
|
479
482
|
}
|
|
480
483
|
/*
|
|
481
484
|
* @internal
|
|
482
485
|
*/
|
|
483
|
-
slottedOptionsChanged(
|
|
486
|
+
slottedOptionsChanged(t, e) {
|
|
484
487
|
this.options.forEach((a) => {
|
|
485
|
-
|
|
486
|
-
}), super.slottedOptionsChanged(
|
|
487
|
-
|
|
488
|
+
v.getNotifier(a).unsubscribe(this, "value");
|
|
489
|
+
}), super.slottedOptionsChanged(t, e), this.options.forEach((a) => {
|
|
490
|
+
v.getNotifier(a).subscribe(this, "value");
|
|
488
491
|
}), this.setProxyOptions(), this.updateValue();
|
|
489
492
|
const o = this.getAttribute("scale") || this.scale;
|
|
490
|
-
|
|
493
|
+
e.forEach((a) => {
|
|
491
494
|
o && (a.setAttribute("scale", o), a.scale = o);
|
|
492
495
|
}), this.proxy.value = this.value, this.validate();
|
|
493
496
|
}
|
|
494
497
|
formResetCallback() {
|
|
495
498
|
this.setProxyOptions(), this.selectedIndex = this._newDefaultSelectedIndex([], this.options, -1) ?? -1;
|
|
496
499
|
}
|
|
500
|
+
/**
|
|
501
|
+
* @internal
|
|
502
|
+
*/
|
|
503
|
+
get _shouldShowClearButton() {
|
|
504
|
+
return this.clearable ? this.multiple ? this.selectedOptions?.length > 0 : this.value !== "" : !1;
|
|
505
|
+
}
|
|
506
|
+
/**
|
|
507
|
+
* @internal
|
|
508
|
+
*/
|
|
509
|
+
_onClearButtonFocus() {
|
|
510
|
+
this._isClearButtonFocused = !0, this.activeIndex = -1, this.uncheckAllOptions();
|
|
511
|
+
}
|
|
512
|
+
/**
|
|
513
|
+
* @internal
|
|
514
|
+
*/
|
|
515
|
+
_onClearButtonBlur() {
|
|
516
|
+
this._isClearButtonFocused = !1;
|
|
517
|
+
}
|
|
518
|
+
/**
|
|
519
|
+
* @internal
|
|
520
|
+
*/
|
|
521
|
+
get _shouldShowLabelWrapper() {
|
|
522
|
+
return !!(this.label || this._hasContextualHelp || this.multiple && this._shouldShowClearButton);
|
|
523
|
+
}
|
|
524
|
+
/**
|
|
525
|
+
* @internal
|
|
526
|
+
*/
|
|
527
|
+
_onClearButtonClick() {
|
|
528
|
+
this.multiple ? this.selectedOptions?.forEach((t) => {
|
|
529
|
+
/* v8 ignore else -- @preserve */
|
|
530
|
+
t.disabled || (t.selected = !1);
|
|
531
|
+
}) : this.selectedIndex = -1, this.updateValue(!0);
|
|
532
|
+
}
|
|
497
533
|
}
|
|
498
|
-
|
|
499
|
-
|
|
534
|
+
n([
|
|
535
|
+
p
|
|
500
536
|
], l.prototype, "activeIndex", 2);
|
|
501
|
-
|
|
502
|
-
|
|
537
|
+
n([
|
|
538
|
+
i({ mode: "boolean" })
|
|
503
539
|
], l.prototype, "multiple", 2);
|
|
504
|
-
|
|
505
|
-
|
|
540
|
+
n([
|
|
541
|
+
i({ attribute: "open", mode: "boolean" })
|
|
506
542
|
], l.prototype, "open", 2);
|
|
507
|
-
|
|
508
|
-
|
|
543
|
+
n([
|
|
544
|
+
P
|
|
509
545
|
], l.prototype, "collapsible", 1);
|
|
510
|
-
|
|
511
|
-
|
|
546
|
+
n([
|
|
547
|
+
p
|
|
512
548
|
], l.prototype, "control", 2);
|
|
513
|
-
|
|
514
|
-
|
|
549
|
+
n([
|
|
550
|
+
p
|
|
515
551
|
], l.prototype, "maxHeight", 2);
|
|
516
|
-
|
|
517
|
-
|
|
552
|
+
n([
|
|
553
|
+
p
|
|
518
554
|
], l.prototype, "_anchor", 2);
|
|
519
|
-
|
|
520
|
-
|
|
555
|
+
n([
|
|
556
|
+
i()
|
|
521
557
|
], l.prototype, "scale", 2);
|
|
522
|
-
|
|
523
|
-
|
|
558
|
+
n([
|
|
559
|
+
i
|
|
524
560
|
], l.prototype, "appearance", 2);
|
|
525
|
-
|
|
526
|
-
|
|
561
|
+
n([
|
|
562
|
+
i
|
|
527
563
|
], l.prototype, "shape", 2);
|
|
528
|
-
|
|
529
|
-
|
|
564
|
+
n([
|
|
565
|
+
i({ mode: "boolean", attribute: "fixed-dropdown" })
|
|
530
566
|
], l.prototype, "fixedDropdown", 2);
|
|
531
|
-
|
|
532
|
-
|
|
567
|
+
n([
|
|
568
|
+
i
|
|
533
569
|
], l.prototype, "placeholder", 2);
|
|
534
|
-
|
|
535
|
-
|
|
570
|
+
n([
|
|
571
|
+
p
|
|
536
572
|
], l.prototype, "_feedbackWrapper", 2);
|
|
537
|
-
|
|
538
|
-
|
|
573
|
+
n([
|
|
574
|
+
p
|
|
539
575
|
], l.prototype, "metaSlottedContent", 2);
|
|
540
|
-
|
|
576
|
+
n([
|
|
577
|
+
i({ mode: "boolean" })
|
|
578
|
+
], l.prototype, "clearable", 2);
|
|
579
|
+
n([
|
|
580
|
+
p
|
|
581
|
+
], l.prototype, "_isClearButtonFocused", 2);
|
|
582
|
+
const ie = ".label-wrapper{display:flex;flex-direction:row;align-items:center;gap:var(--label-wrapper-gap, 4px)}.label-wrapper[hidden]{display:none}.label:not(slot),.label::slotted(label){flex:0 1 auto}.chevron{display:flex;flex-shrink:0;font:var(--vvd-typography-base-extended);transform:rotate(0);transition:transform .2s}:host([data-expanded=true]) .chevron,:host([open]) .chevron{transform:rotate(180deg)}:host(:focus-visible){outline:none}:host{display:inline-flex;flex-direction:column;gap:4px;--_low-ink-color: var(--vvd-color-neutral-600);--focus-stroke-gap-color: transparent}:host([disabled]){--_low-ink-color: var(--vvd-color-neutral-400);cursor:not-allowed}.label{color:var(--vvd-color-canvas-text);font:var(--vvd-typography-base)}.control{--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--vvd-color-neutral-500)}.control.appearance-ghost{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}@media (hover: hover){.control:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--vvd-color-neutral-700)}.control:hover:where(:not(.disabled,:disabled,.readonly)).appearance-ghost{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}}.control.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--vvd-color-neutral-700)}.control.hover:where(:not(.disabled,:disabled,.readonly)).appearance-ghost{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.control:disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: var(--vvd-color-neutral-100);--_appearance-color-outline: var(--vvd-color-neutral-300)}.control:disabled.appearance-ghost{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.control.disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: var(--vvd-color-neutral-100);--_appearance-color-outline: var(--vvd-color-neutral-300)}.control.disabled.appearance-ghost{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.control.readonly:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-neutral-200);--_appearance-color-outline: var(--vvd-color-neutral-400)}.control.readonly:where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text: var(--vvd-color-neutral-600);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.control.error:where(:not(.disabled,:disabled)){--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-alert-50);--_appearance-color-outline: var(--vvd-color-alert-500)}.control.error:where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-alert-50);--_appearance-color-outline: transparent}.control.success:where(:not(.disabled,:disabled)){--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-success-50);--_appearance-color-outline: var(--vvd-color-success-500)}.control.success:where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-success-50);--_appearance-color-outline: transparent}.control{--_connotation-color-primary: var(--vvd-select-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-primary-text: var(--vvd-select-accent-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-select-accent-primary-increment, var(--vvd-color-neutral-800));--_connotation-color-intermediate: var(--vvd-select-accent-intermediate, var(--vvd-color-neutral-500));--_connotation-color-faint: var(--vvd-select-accent-faint, var(--vvd-color-neutral-50));--_connotation-color-soft: var(--vvd-select-accent-soft, var(--vvd-color-neutral-100));--_connotation-color-firm: var(--vvd-select-accent-firm, var(--vvd-color-canvas-text));--_connotation-color-fierce: var(--vvd-select-accent-fierce, var(--vvd-color-neutral-700))}.control{border-radius:var(--_select-control-border-radius);block-size:var(--_select-block-size);padding-inline:var(--_select-padding-inline)}.control{--_select-icon-size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))/2) ;--_select-block-size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) ;--_select-padding-inline: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))*.4) ;display:flex;align-items:center;justify-content:space-between;background-color:var(--_appearance-color-fill);box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);color:var(--_appearance-color-text);font:var(--vvd-typography-base);gap:8px;transition:box-shadow .2s,background-color .2s}.control.size-condensed{--_select-icon-size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))*.4) ;--_select-block-size: calc(1px*(32 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) ;--_select-padding-inline: calc(1px*(24 + 4*clamp(-1, var(--vvd-size-density, 0), 2))/2) }.control.size-condensed:not(.shape-pill){--_select-control-border-radius: 4px}.control-wrapper{position:relative}.control:not(.disabled){cursor:pointer}.control.disabled{pointer-events:none}.control:not(.shape-pill){--_select-control-border-radius: 8px}.control.shape-pill{--_select-control-border-radius: 24px}.listbox{display:flex;max-height:var(--select-height, 408px);flex-direction:column;padding:4px;gap:2px;overflow-y:auto}:host([multiple]:focus-visible) .listbox{box-shadow:0 0 0 4px color-mix(in srgb,var(--focus-stroke-color, var(--vvd-color-cta-500)),transparent 85%),inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:1px solid var(--focus-stroke-color, var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset, 0px));border-radius:8px}.selected-value{display:flex;overflow:hidden;flex-grow:1;align-items:center;column-gap:12px;white-space:nowrap}.selected-value .text{overflow:hidden;max-inline-size:100%;text-overflow:ellipsis}.control.shows-placeholder .selected-value .text{color:var(--vvd-color-neutral-600)}.selected-value slot[name=icon]{flex:0 0 var(--_select-icon-size);font-size:var(--_select-icon-size);line-height:1}.control.has-meta .selected-value{padding-inline-end:8px}.feedback-wrapper{display:contents}::part(popup-base){inline-size:max-content;min-inline-size:var(--_select-fixed-width, 100%)}:host([multiple]) ::part(popup-base){position:static}@supports selector(:has(*)){:host(:focus-within) .control:not(.has-activedescendant,:has(.clear-button:focus)){--focus-stroke-gap-color: transparent;box-shadow:0 0 0 4px color-mix(in srgb,var(--focus-stroke-color, var(--vvd-color-cta-500)),transparent 85%),inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:1px solid var(--focus-stroke-color, var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset, 0px))}}@supports not selector(:has(*)){:host(:focus-within) .control:not(.has-activedescendant){--focus-stroke-gap-color: transparent;box-shadow:0 0 0 4px color-mix(in srgb,var(--focus-stroke-color, var(--vvd-color-cta-500)),transparent 85%),inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:1px solid var(--focus-stroke-color, var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset, 0px))}}:host(:not([multiple])) ::slotted([data-vvd-component=option][current-selected]){border-radius:8px;box-shadow:0 0 0 4px color-mix(in srgb,var(--focus-stroke-color, var(--vvd-color-cta-500)),transparent 85%),inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:1px solid var(--focus-stroke-color, var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset, 0px));--focus-stroke-gap-color: transparent}:host([multiple]) .clear-button{margin-inline-start:auto}:host([multiple][clearable]) .label-wrapper{min-block-size:calc(1px*(24 + 4*clamp(-1,var(--vvd-size-density, 0),2)))}", ce = ({
|
|
541
583
|
shape: r,
|
|
542
|
-
disabled:
|
|
543
|
-
appearance:
|
|
584
|
+
disabled: t,
|
|
585
|
+
appearance: e,
|
|
544
586
|
metaSlottedContent: o,
|
|
545
587
|
errorValidationMessage: a,
|
|
546
|
-
successText:
|
|
547
|
-
placeholder:
|
|
548
|
-
value:
|
|
588
|
+
successText: s,
|
|
589
|
+
placeholder: c,
|
|
590
|
+
value: C,
|
|
549
591
|
scale: m,
|
|
550
|
-
_activeDescendant:
|
|
551
|
-
open:
|
|
552
|
-
}) =>
|
|
553
|
-
["has-activedescendant", !!
|
|
554
|
-
["disabled",
|
|
555
|
-
[`appearance-${
|
|
592
|
+
_activeDescendant: A,
|
|
593
|
+
open: B
|
|
594
|
+
}) => le(
|
|
595
|
+
["has-activedescendant", !!A && B],
|
|
596
|
+
["disabled", t],
|
|
597
|
+
[`appearance-${e}`, !!e],
|
|
556
598
|
[`shape-${r}`, !!r],
|
|
557
599
|
["has-meta", !!o?.length],
|
|
558
600
|
["error", !!a],
|
|
559
|
-
["success", !!
|
|
560
|
-
["shows-placeholder", !!
|
|
601
|
+
["success", !!s],
|
|
602
|
+
["shows-placeholder", !!c && !C],
|
|
561
603
|
[`size-${m}`, !!m]
|
|
562
604
|
);
|
|
563
|
-
function
|
|
564
|
-
return
|
|
605
|
+
function pe() {
|
|
606
|
+
return d` <label
|
|
565
607
|
for="${(r) => r.multiple ? null : "control"}"
|
|
566
608
|
class="label"
|
|
567
609
|
id="label"
|
|
@@ -569,115 +611,149 @@ function le() {
|
|
|
569
611
|
${(r) => r.label}
|
|
570
612
|
</label>`;
|
|
571
613
|
}
|
|
572
|
-
function
|
|
573
|
-
const
|
|
574
|
-
return
|
|
575
|
-
<${
|
|
576
|
-
</${
|
|
614
|
+
function de(r) {
|
|
615
|
+
const t = r.tagFor(E);
|
|
616
|
+
return d`
|
|
617
|
+
<${t} text="${(e) => e.placeholder}" hidden disabled>
|
|
618
|
+
</${t}>`;
|
|
577
619
|
}
|
|
578
|
-
function
|
|
579
|
-
const
|
|
580
|
-
return
|
|
581
|
-
|
|
620
|
+
function $(r) {
|
|
621
|
+
const t = r.tagFor(z);
|
|
622
|
+
return d`
|
|
623
|
+
<${t}
|
|
624
|
+
aria-label="${(e) => e.locale.select.clearButtonLabel}"
|
|
625
|
+
aria-hidden="${(e) => e._isClearButtonFocused ? "false" : "true"}"
|
|
626
|
+
@click="${(e, o) => {
|
|
627
|
+
e._onClearButtonClick(), o.event.stopPropagation();
|
|
628
|
+
}}"
|
|
629
|
+
@mousedown="${() => !1}"
|
|
630
|
+
@keydown="${(e, o) => {
|
|
631
|
+
/* v8 ignore next -- @preserve */
|
|
632
|
+
return o.event.key === "Tab" && e._onClearButtonBlur(), o.event.stopPropagation(), !0;
|
|
633
|
+
}}"
|
|
634
|
+
@focusin="${(e, o) => {
|
|
635
|
+
o.event.stopPropagation(), e._onClearButtonFocus();
|
|
636
|
+
}}"
|
|
637
|
+
@focusout="${(e) => e._onClearButtonBlur()}"
|
|
638
|
+
?disabled="${(e) => e.disabled}"
|
|
639
|
+
:shape="${(e) => e.shape}"
|
|
640
|
+
size="super-condensed"
|
|
641
|
+
icon="close-line"
|
|
642
|
+
appearance="ghost-light"
|
|
643
|
+
class="clear-button"
|
|
644
|
+
tabindex="0"
|
|
645
|
+
></${t}>
|
|
646
|
+
`;
|
|
647
|
+
}
|
|
648
|
+
function he(r) {
|
|
649
|
+
const t = ee(r), e = L(r);
|
|
650
|
+
return d` <div
|
|
651
|
+
class="control ${ce}"
|
|
582
652
|
${b("_anchor")}
|
|
583
653
|
id="control"
|
|
584
654
|
?disabled="${(o) => o.disabled}"
|
|
585
655
|
>
|
|
586
656
|
<div class="selected-value">
|
|
587
|
-
${(o) =>
|
|
657
|
+
${(o) => t(o.icon, te.Slot)}
|
|
588
658
|
<span class="text">${(o) => o.displayValue}</span>
|
|
589
659
|
<slot name="meta" ${x("metaSlottedContent")}></slot>
|
|
590
660
|
</div>
|
|
591
|
-
${
|
|
661
|
+
${u((o) => o._shouldShowClearButton, $(r))}
|
|
662
|
+
${e}
|
|
592
663
|
</div>`;
|
|
593
664
|
}
|
|
594
|
-
function
|
|
665
|
+
function ue(r) {
|
|
595
666
|
return r.open && r.fixedDropdown ? `--_select-fixed-width: ${Math.round(r.getBoundingClientRect().width)}px` : null;
|
|
596
667
|
}
|
|
597
|
-
function
|
|
598
|
-
const
|
|
599
|
-
return
|
|
600
|
-
<div class="label-wrapper" ?hidden=${(
|
|
601
|
-
${
|
|
668
|
+
function ve(r) {
|
|
669
|
+
const t = r.tagFor(D);
|
|
670
|
+
return d`
|
|
671
|
+
<div class="label-wrapper" ?hidden=${(e) => !e._shouldShowLabelWrapper}>
|
|
672
|
+
${u((e) => e.label, pe())}
|
|
673
|
+
${u(
|
|
674
|
+
(e) => e.multiple && e._shouldShowClearButton,
|
|
675
|
+
$(r)
|
|
676
|
+
)}
|
|
602
677
|
<slot name="contextual-help" ${x("_contextualHelpSlottedContent")}></slot>
|
|
603
678
|
</div>
|
|
604
679
|
<div class="control-wrapper">
|
|
605
|
-
${
|
|
606
|
-
<${
|
|
607
|
-
style="${
|
|
608
|
-
?open="${(
|
|
609
|
-
:anchor="${(
|
|
680
|
+
${u((e) => !e.multiple, he(r))}
|
|
681
|
+
<${t} class="popup"
|
|
682
|
+
style="${ue}"
|
|
683
|
+
?open="${(e) => e.collapsible ? e.open : !0}"
|
|
684
|
+
:anchor="${(e) => e._anchor}"
|
|
610
685
|
placement="bottom-start"
|
|
611
|
-
strategy="${(
|
|
686
|
+
strategy="${(e) => e.fixedDropdown ? null : "absolute"}">
|
|
612
687
|
<div class="listbox"
|
|
613
|
-
id="${(
|
|
688
|
+
id="${(e) => e.listboxId}"
|
|
614
689
|
role="listbox"
|
|
615
|
-
aria-multiselectable="${(
|
|
616
|
-
aria-label="${(
|
|
617
|
-
aria-labelledby="${(
|
|
618
|
-
?disabled="${(
|
|
619
|
-
?hidden="${(
|
|
690
|
+
aria-multiselectable="${(e) => e.multiple}"
|
|
691
|
+
aria-label="${(e) => e.multiple && !e.label && e.ariaLabel ? e.ariaLabel : null}"
|
|
692
|
+
aria-labelledby="${(e) => e.multiple && e.label ? "label" : null}"
|
|
693
|
+
?disabled="${(e) => e.disabled}"
|
|
694
|
+
?hidden="${(e) => e.collapsible ? !e.open : !1}"
|
|
620
695
|
${b("listbox")}>
|
|
621
|
-
${
|
|
696
|
+
${u((e) => e.placeholder, de(r))}
|
|
622
697
|
<slot
|
|
623
698
|
${x({
|
|
624
|
-
filter:
|
|
699
|
+
filter: O.slottedOptionFilter,
|
|
625
700
|
flatten: !0,
|
|
626
701
|
property: "slottedOptions"
|
|
627
702
|
})}>
|
|
628
703
|
</slot>
|
|
629
704
|
</div>
|
|
630
|
-
</${
|
|
705
|
+
</${t}>
|
|
631
706
|
</div>
|
|
632
707
|
`;
|
|
633
708
|
}
|
|
634
|
-
function
|
|
635
|
-
return (
|
|
709
|
+
function h(r) {
|
|
710
|
+
return (t, e) => e.event.composedPath().includes(t._feedbackWrapper) ? !0 : r(t, e.event);
|
|
636
711
|
}
|
|
637
|
-
const
|
|
712
|
+
const fe = (r) => d`
|
|
638
713
|
<template
|
|
639
|
-
${
|
|
714
|
+
${U({
|
|
640
715
|
role: "combobox",
|
|
641
|
-
ariaLabel: (
|
|
642
|
-
ariaHasPopup: (
|
|
643
|
-
ariaExpanded: (
|
|
644
|
-
ariaDisabled: (
|
|
716
|
+
ariaLabel: (t) => t.ariaLabel ?? t.label,
|
|
717
|
+
ariaHasPopup: (t) => t.collapsible ? "listbox" : "false",
|
|
718
|
+
ariaExpanded: (t) => t.open,
|
|
719
|
+
ariaDisabled: (t) => t.disabled
|
|
645
720
|
})}
|
|
646
|
-
aria-controls="${(
|
|
647
|
-
aria-activedescendant="${(
|
|
648
|
-
aria-describedby="${(
|
|
649
|
-
tabindex="${(
|
|
650
|
-
@click="${
|
|
651
|
-
@focusin="${
|
|
652
|
-
@focusout="${
|
|
653
|
-
(
|
|
721
|
+
aria-controls="${(t) => t.listboxId}"
|
|
722
|
+
aria-activedescendant="${(t) => t.open ? t._activeDescendant : null}"
|
|
723
|
+
aria-describedby="${(t) => t._feedbackDescribedBy}"
|
|
724
|
+
tabindex="${(t) => t.disabled ? null : "0"}"
|
|
725
|
+
@click="${h((t, e) => t.clickHandler(e))}"
|
|
726
|
+
@focusin="${h((t, e) => t.focusinHandler(e))}"
|
|
727
|
+
@focusout="${h(
|
|
728
|
+
(t, e) => t.focusoutHandler(e)
|
|
654
729
|
)}"
|
|
655
|
-
@keydown="${
|
|
656
|
-
@mousedown="${
|
|
657
|
-
(
|
|
730
|
+
@keydown="${h((t, e) => (t.open && re(e), t.keydownHandler(e)))}"
|
|
731
|
+
@mousedown="${h(
|
|
732
|
+
(t, e) => t.mousedownHandler(e)
|
|
658
733
|
)}"
|
|
659
734
|
>
|
|
660
|
-
${
|
|
735
|
+
${ve(r)}
|
|
661
736
|
<div class="feedback-wrapper" ${b("_feedbackWrapper")}>
|
|
662
|
-
${(
|
|
737
|
+
${(t) => t._getFeedbackTemplate(r)}
|
|
663
738
|
</div>
|
|
664
739
|
</template>
|
|
665
|
-
`,
|
|
740
|
+
`, xe = M(
|
|
666
741
|
"select",
|
|
667
742
|
l,
|
|
668
|
-
|
|
743
|
+
fe,
|
|
669
744
|
[
|
|
670
|
-
H,
|
|
671
|
-
E,
|
|
672
745
|
F,
|
|
673
|
-
|
|
746
|
+
H,
|
|
747
|
+
V,
|
|
748
|
+
T,
|
|
749
|
+
R
|
|
674
750
|
],
|
|
675
751
|
{
|
|
676
|
-
styles:
|
|
752
|
+
styles: ie
|
|
677
753
|
}
|
|
678
|
-
),
|
|
754
|
+
), Pe = N(xe);
|
|
679
755
|
export {
|
|
680
756
|
l as S,
|
|
681
|
-
|
|
682
|
-
|
|
757
|
+
Pe as r,
|
|
758
|
+
xe as s
|
|
683
759
|
};
|