@vonage/vivid 5.15.0 → 5.15.1
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 +1 -1
- package/accordion/definition.cjs +0 -5
- package/accordion/definition.js +0 -5
- package/accordion/index.cjs +1 -1
- package/accordion/index.js +3 -14
- package/accordion-item/definition.cjs +1 -1
- package/accordion-item/definition.js +1 -1
- package/alert/definition.cjs +2 -2
- package/alert/definition.js +2 -2
- package/alert/index.cjs +1 -1
- package/alert/index.js +1 -1
- package/audio-player/definition.cjs +2 -6
- package/audio-player/definition.js +2 -6
- package/audio-player/index.cjs +1 -1
- package/audio-player/index.js +2 -8
- package/banner/definition.cjs +1 -1
- package/banner/definition.js +1 -1
- package/breadcrumb/definition.cjs +0 -1
- package/breadcrumb/definition.js +0 -1
- package/breadcrumb/index.cjs +1 -1
- package/breadcrumb/index.js +0 -1
- package/breadcrumb-item/definition.cjs +1 -1
- package/breadcrumb-item/definition.js +1 -1
- package/breadcrumb-item/index.cjs +1 -1
- package/breadcrumb-item/index.js +1 -1
- package/bundled/attribute-binding-behaviour.cjs +1 -1
- package/bundled/attribute-binding-behaviour.js +1 -3
- package/bundled/base-color-picker.cjs +1 -1
- package/bundled/base-color-picker.js +2 -7
- package/bundled/base-progress.cjs +1 -1
- package/bundled/base-progress.js +0 -3
- package/bundled/button.cjs +1 -1
- package/bundled/button.js +1 -10
- package/bundled/calendar-picker.template.cjs +1 -1
- package/bundled/calendar-picker.template.js +90 -42
- package/bundled/children.js +1 -1
- package/bundled/definition.cjs +1 -1
- package/bundled/definition.js +1 -1
- package/bundled/definition10.cjs +1 -1
- package/bundled/definition10.js +0 -10
- package/bundled/definition11.cjs +1 -1
- package/bundled/definition11.js +0 -1
- package/bundled/definition12.cjs +2 -2
- package/bundled/definition12.js +1 -2
- package/bundled/definition13.cjs +1 -1
- package/bundled/definition13.js +1 -1
- package/bundled/definition17.cjs +1 -1
- package/bundled/definition17.js +1 -4
- package/bundled/definition18.cjs +1 -1
- package/bundled/definition18.js +6 -18
- package/bundled/definition19.cjs +2 -2
- package/bundled/definition19.js +8 -24
- package/bundled/definition2.cjs +5 -5
- package/bundled/definition2.js +26 -27
- package/bundled/definition20.cjs +1 -1
- package/bundled/definition20.js +1 -1
- package/bundled/definition22.cjs +5 -5
- package/bundled/definition22.js +2 -3
- package/bundled/definition3.cjs +1 -1
- package/bundled/definition3.js +1 -2
- package/bundled/definition5.cjs +1 -1
- package/bundled/definition5.js +1 -6
- package/bundled/definition6.cjs +1 -1
- package/bundled/definition6.js +1 -2
- package/bundled/definition7.cjs +1 -1
- package/bundled/definition7.js +2 -5
- package/bundled/definition8.cjs +1 -1
- package/bundled/definition8.js +2 -13
- package/bundled/definition9.js +9 -9
- package/bundled/delegates-aria.cjs +1 -1
- package/bundled/delegates-aria.js +1 -3
- package/bundled/floating-ui.dom.cjs +1 -1
- package/bundled/floating-ui.dom.js +491 -487
- package/bundled/form-associated.cjs +1 -1
- package/bundled/form-associated.js +9 -18
- package/bundled/key-codes.cjs +1 -1
- package/bundled/listbox.cjs +1 -1
- package/bundled/listbox.js +10 -27
- package/bundled/localized.cjs +1 -1
- package/bundled/localized.js +48 -48
- package/bundled/mixins.cjs +2 -2
- package/bundled/mixins.js +1 -4
- package/bundled/normalize.js +2 -2
- package/bundled/picker-field.template.cjs +1 -1
- package/bundled/picker-field.template.js +0 -1
- package/bundled/scrollIntoView.cjs +1 -1
- package/bundled/scrollIntoView.js +1 -4
- package/bundled/slider.template.cjs +1 -1
- package/bundled/slider.template.js +1 -1
- package/bundled/slottable-request.js +1 -1
- package/bundled/text-field.cjs +1 -1
- package/bundled/text-field.js +1 -1
- package/bundled/time-selection-picker.template.cjs +2 -2
- package/bundled/time-selection-picker.template.js +3 -6
- package/bundled/vivid-element.cjs +3 -3
- package/bundled/vivid-element.js +302 -293
- package/button/definition.cjs +1 -1
- package/button/definition.js +1 -1
- package/calendar/definition.cjs +0 -2
- package/calendar/definition.js +1 -3
- package/calendar/index.cjs +1 -1
- package/calendar/index.js +6 -8
- package/card/definition.cjs +1 -1
- package/card/definition.js +1 -1
- package/card/index.cjs +1 -1
- package/card/index.js +1 -1
- package/checkbox/definition.cjs +1 -2
- package/checkbox/definition.js +1 -2
- package/color-picker/definition.cjs +1 -6
- package/color-picker/definition.js +1 -6
- package/color-picker/index.cjs +1 -1
- package/color-picker/index.js +2 -7
- package/combobox/definition.cjs +2 -8
- package/combobox/definition.js +2 -8
- package/combobox/index.cjs +1 -1
- package/combobox/index.js +2 -9
- package/contextual-help/definition.cjs +1 -1
- package/contextual-help/definition.js +1 -1
- package/custom-elements.json +37 -720
- package/data-grid/definition.cjs +72 -85
- package/data-grid/definition.js +75 -88
- package/data-grid/index.cjs +2 -2
- package/data-grid/index.js +7 -39
- package/date-picker/definition.cjs +1 -1
- package/date-picker/definition.js +1 -1
- package/date-range-picker/definition.cjs +1 -3
- package/date-range-picker/definition.js +1 -3
- package/date-range-picker/index.cjs +1 -1
- package/date-range-picker/index.js +1 -5
- package/date-time-picker/definition.cjs +1 -1
- package/date-time-picker/definition.js +1 -1
- package/dial-pad/definition.cjs +2 -11
- package/dial-pad/definition.js +3 -12
- package/dial-pad/index.cjs +1 -1
- package/dial-pad/index.js +14 -38
- package/dialog/definition.cjs +2 -3
- package/dialog/definition.js +2 -3
- package/dialog/index.cjs +1 -1
- package/dialog/index.js +1 -2
- package/empty-state/definition.js +1 -1
- package/fab/definition.cjs +1 -2
- package/fab/definition.js +1 -2
- package/fab/index.cjs +1 -1
- package/fab/index.js +1 -2
- package/file-picker/definition.cjs +2 -5
- package/file-picker/definition.js +3 -6
- package/file-picker/index.cjs +1 -1
- package/file-picker/index.js +1 -4
- package/icon/definition.cjs +7 -5
- package/icon/definition.js +7 -5
- package/index.cjs +95 -95
- package/index.js +18 -18
- package/layout/definition.cjs +1 -1
- package/layout/definition.js +1 -1
- package/layout/index.cjs +1 -1
- package/layout/index.js +1 -1
- package/lib/card/card.d.ts +0 -2
- package/lib/combobox/combobox.d.ts +1 -1
- package/lib/icon/icon.d.ts +0 -1
- package/lib/menu/menu.d.ts +0 -1
- package/lib/menu-item/menu-item.d.ts +0 -1
- package/lib/pagination/pagination.d.ts +0 -3
- package/lib/select/select.d.ts +2 -2
- package/lib/table/table-head.d.ts +1 -0
- package/lib/tabs/tabs.d.ts +0 -1
- package/lib/text-field/text-field.d.ts +0 -1
- package/locales/de-DE.cjs +95 -95
- package/locales/de-DE.js +95 -95
- package/locales/en-GB.cjs +1 -1
- package/locales/en-GB.js +1 -1
- package/locales/en-US.cjs +95 -95
- package/locales/en-US.js +95 -95
- package/locales/ja-JP.cjs +94 -94
- package/locales/ja-JP.js +94 -94
- package/locales/zh-CN.cjs +94 -94
- package/locales/zh-CN.js +94 -94
- package/menu/definition.cjs +2 -3
- package/menu/definition.js +2 -3
- package/menu-item/definition.cjs +1 -1
- package/menu-item/definition.js +1 -1
- package/nav-disclosure/definition.cjs +1 -1
- package/nav-disclosure/definition.js +1 -1
- package/nav-disclosure/index.cjs +1 -1
- package/nav-disclosure/index.js +1 -1
- package/nav-item/definition.cjs +1 -1
- package/nav-item/definition.js +1 -1
- package/nav-item/index.cjs +1 -1
- package/nav-item/index.js +1 -1
- package/number-field/definition.cjs +2 -2
- package/number-field/definition.js +2 -2
- package/number-field/index.cjs +1 -1
- package/number-field/index.js +1 -1
- package/package.json +20 -18
- package/pagination/definition.cjs +1 -3
- package/pagination/definition.js +3 -5
- package/pagination/index.cjs +3 -3
- package/pagination/index.js +4 -6
- package/popover/definition.cjs +1 -8
- package/popover/definition.js +1 -8
- package/popover/index.cjs +1 -1
- package/popover/index.js +6 -17
- package/popup/definition.cjs +1 -1
- package/popup/definition.js +1 -1
- package/radio/definition.cjs +1 -5
- package/radio/definition.js +1 -5
- package/radio-group/definition.js +2 -2
- package/range-slider/definition.cjs +1 -1
- package/range-slider/definition.js +2 -2
- package/range-slider/index.cjs +1 -1
- package/range-slider/index.js +1 -1
- package/rich-text-editor/definition.cjs +128 -43
- package/rich-text-editor/definition.js +128 -43
- package/rich-text-editor/index.cjs +12 -12
- package/rich-text-editor/index.js +1577 -1532
- package/rich-text-view/definition.js +1 -1
- package/searchable-select/definition.cjs +2 -5
- package/searchable-select/definition.js +2 -5
- package/searchable-select/index.cjs +1 -1
- package/searchable-select/index.js +2 -6
- package/select/definition.cjs +4 -14
- package/select/definition.js +5 -15
- package/selectable-box/definition.cjs +1 -1
- package/selectable-box/definition.js +2 -2
- package/selectable-box/index.cjs +1 -1
- package/selectable-box/index.js +1 -1
- package/side-drawer/definition.cjs +1 -1
- package/side-drawer/definition.js +2 -2
- package/side-drawer/index.cjs +1 -1
- package/side-drawer/index.js +2 -5
- package/simple-color-picker/definition.cjs +18 -9
- package/simple-color-picker/definition.js +19 -10
- package/simple-color-picker/index.cjs +5 -5
- package/simple-color-picker/index.js +23 -23
- package/slider/definition.cjs +1 -6
- package/slider/definition.js +3 -8
- package/split-button/definition.cjs +1 -1
- package/split-button/definition.js +2 -2
- package/split-button/index.cjs +1 -1
- package/split-button/index.js +1 -1
- package/status/definition.cjs +9 -3
- package/status/definition.js +11 -5
- package/status/index.cjs +10 -7
- package/status/index.js +46 -39
- package/styles/core/all.css +6 -5
- package/styles/core/theme.css +6 -5
- package/styles/core/typography.css +1 -2
- package/styles/tokens/theme-dark.css +17 -21
- package/styles/tokens/theme-light.css +17 -21
- package/styles/tokens/vivid-2-compat.css +1 -2
- package/switch/definition.cjs +1 -2
- package/switch/definition.js +2 -3
- package/switch/index.cjs +1 -1
- package/switch/index.js +1 -2
- package/tab/definition.cjs +1 -1
- package/tab/definition.js +2 -2
- package/tab-panel/definition.js +1 -1
- package/table/definition.cjs +17 -11
- package/table/definition.js +19 -13
- package/table/index.cjs +18 -14
- package/table/index.js +55 -48
- package/tabs/definition.cjs +0 -2
- package/tabs/definition.js +2 -4
- package/tabs/index.cjs +1 -1
- package/tabs/index.js +0 -2
- package/tag/definition.cjs +1 -1
- package/tag/definition.js +2 -2
- package/tag/index.cjs +1 -1
- package/tag/index.js +1 -1
- package/tag-group/definition.js +1 -1
- package/text-area/definition.cjs +1 -7
- package/text-area/definition.js +2 -8
- package/text-area/index.cjs +1 -1
- package/text-area/index.js +1 -7
- package/text-field/definition.cjs +0 -10
- package/text-field/definition.js +1 -11
- package/time-picker/definition.cjs +1 -1
- package/time-picker/definition.js +2 -2
- package/toggletip/definition.cjs +0 -2
- package/toggletip/definition.js +1 -3
- package/tooltip/definition.cjs +0 -1
- package/tooltip/definition.js +1 -2
- package/tree-view/definition.cjs +0 -16
- package/tree-view/definition.js +1 -17
- package/tree-view/index.cjs +1 -1
- package/tree-view/index.js +0 -16
- package/unbundled/_commonjsHelpers.cjs +6 -2
- package/unbundled/_commonjsHelpers.js +6 -2
- package/unbundled/anchored.js +1 -1
- package/unbundled/attribute-binding-behaviour.cjs +0 -1
- package/unbundled/attribute-binding-behaviour.js +0 -1
- package/unbundled/base-color-picker.cjs +0 -3
- package/unbundled/base-color-picker.js +0 -3
- package/unbundled/base-progress.cjs +0 -3
- package/unbundled/base-progress.js +0 -3
- package/unbundled/button.cjs +1 -10
- package/unbundled/button.js +1 -10
- package/unbundled/calendar-picker.template.cjs +2 -4
- package/unbundled/calendar-picker.template.js +2 -4
- package/unbundled/data-grid.options.js +1 -1
- package/unbundled/definition.cjs +349 -170
- package/unbundled/definition.js +348 -170
- package/unbundled/definition2.cjs +169 -351
- package/unbundled/definition2.js +169 -350
- package/unbundled/definition3.cjs +1 -2
- package/unbundled/definition3.js +1 -2
- package/unbundled/definition4.cjs +1 -2
- package/unbundled/definition4.js +3 -4
- package/unbundled/definition5.cjs +1 -1
- package/unbundled/definition5.js +2 -2
- package/unbundled/delegates-aria.cjs +1 -1
- package/unbundled/delegates-aria.js +1 -1
- package/unbundled/enums.js +1 -1
- package/unbundled/form-associated.cjs +4 -5
- package/unbundled/form-associated.js +4 -5
- package/unbundled/host-semantics.cjs +1 -0
- package/unbundled/host-semantics.js +2 -1
- package/unbundled/key-codes.js +1 -1
- package/unbundled/listbox.cjs +6 -14
- package/unbundled/listbox.js +6 -14
- package/unbundled/mixins.cjs +0 -2
- package/unbundled/mixins.js +2 -4
- package/unbundled/picker-field.template.cjs +1 -2
- package/unbundled/picker-field.template.js +1 -2
- package/unbundled/scrollIntoView.cjs +0 -1
- package/unbundled/scrollIntoView.js +0 -1
- package/unbundled/slider.template.js +1 -1
- package/unbundled/slottable-request.cjs +2 -2
- package/unbundled/slottable-request.js +2 -2
- package/unbundled/text-field.cjs +1 -1
- package/unbundled/text-field.js +1 -1
- package/unbundled/time-selection-picker.template.cjs +1 -4
- package/unbundled/time-selection-picker.template.js +1 -4
- package/unbundled/vivid-element.cjs +2 -1
- package/unbundled/vivid-element.js +2 -1
- package/video-player/definition.cjs +7953 -7720
- package/video-player/definition.js +7955 -7722
- package/video-player/index.cjs +38 -54
- package/video-player/index.js +12785 -12735
- package/visually-hidden/definition.js +1 -1
- package/vivid.api.json +16 -341
package/unbundled/definition3.js
CHANGED
|
@@ -67,7 +67,6 @@ class ListboxOption extends HostSemantics(
|
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
disabledChanged() {
|
|
70
|
-
/* v8 ignore if -- @preserve */
|
|
71
70
|
if (this.proxy instanceof HTMLOptionElement) {
|
|
72
71
|
this.proxy.disabled = this.disabled;
|
|
73
72
|
}
|
|
@@ -269,7 +268,7 @@ const ListboxOptionTemplate = (context) => {
|
|
|
269
268
|
`;
|
|
270
269
|
};
|
|
271
270
|
|
|
272
|
-
const styles = ":host([disabled]){cursor:not-allowed}.base{--_connotation-color-primary: var(--vvd-option-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-primary-text: var(--vvd-option-accent-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-option-accent-primary-increment, var(--vvd-color-neutral-800));--_connotation-color-firm: var(--vvd-option-accent-firm, var(--vvd-color-canvas-text));--_connotation-color-faint: var(--vvd-option-accent-faint, var(--vvd-color-neutral-50));--_connotation-color-soft: var(--vvd-option-accent-soft, var(--vvd-color-neutral-100));--_connotation-color-pale: var(--vvd-option-accent-pale, var(--vvd-color-neutral-300));--_connotation-color-dim: var(--vvd-option-accent-dim, var(--vvd-color-neutral-200))}.base{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}@media
|
|
271
|
+
const styles = ":host([disabled]){cursor:not-allowed}.base{--_connotation-color-primary: var(--vvd-option-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-primary-text: var(--vvd-option-accent-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-option-accent-primary-increment, var(--vvd-color-neutral-800));--_connotation-color-firm: var(--vvd-option-accent-firm, var(--vvd-color-canvas-text));--_connotation-color-faint: var(--vvd-option-accent-faint, var(--vvd-color-neutral-50));--_connotation-color-soft: var(--vvd-option-accent-soft, var(--vvd-color-neutral-100));--_connotation-color-pale: var(--vvd-option-accent-pale, var(--vvd-color-neutral-300));--_connotation-color-dim: var(--vvd-option-accent-dim, var(--vvd-color-neutral-200))}.base{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}@media(hover:hover){.base:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}}.base.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.base:disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base.disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base:active:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.base.active:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.base.selected:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}@media(hover:hover){.base.selected:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-dim);--_appearance-color-outline: transparent}}.base.selected.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-dim);--_appearance-color-outline: transparent}.base{display:flex;box-sizing:border-box;align-items:center;border-radius:8px;background-color:var(--_appearance-color-fill);box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);color:var(--_option-appearance-color-text, var(--_appearance-color-text));font:var(--vvd-typography-base);gap:var(--_option-gap);hyphens:auto;inline-size:100%;min-block-size:var(--_option-min-block-size);padding-inline:var(--_option-padding-inline);vertical-align:middle;word-break:break-word}.base{--_option-min-block-size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) ;--_option-padding-inline: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))*.4) ;--_option-icon-size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))/2) }.base:not(.two-lines){--_option-gap: calc( calc(1px*(36 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) / 3);padding-block:calc(1px*(40 + 4*clamp(-1,var(--vvd-size-density, 0),2))/4)}.base.two-lines{gap:calc(1px*(40 + 4*clamp(-1,var(--vvd-size-density, 0),2))*.4);padding-block:calc(1px*(24 + 4*clamp(-1,var(--vvd-size-density, 0),2))/2)}@supports (user-select: none){.base{user-select:none}}.base:not(.disabled){cursor:pointer}.base.disabled{pointer-events:none}:host([scale=condensed]) .base{--_option-min-block-size: calc(1px*(32 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) ;--_option-padding-inline: calc(1px*(24 + 4*clamp(-1, var(--vvd-size-density, 0), 2))/2) ;--_option-icon-size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))*.4) }:host([scale=condensed]) .base:not(.two-lines){--_option-gap: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))/5) ;padding-block:calc(calc(1px*(36 + 4*clamp(-1,var(--vvd-size-density, 0),2))) / 6)}:host([scale=condensed]) .base.two-lines{gap:calc(calc(1px*(36 + 4*clamp(-1,var(--vvd-size-density, 0),2))) / 3);padding-block:calc(1px*(32 + 4*clamp(-1,var(--vvd-size-density, 0),2))/4)}.base.active{--focus-stroke-color: var(--vvd-color-cta-500);--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))}.base.hidden{display:none}.text{display:flex;flex-direction:column;font:var(--vvd-typography-base);gap:4px;margin-inline-end:auto}.text-primary,.text-secondary{display:block;font:var(--vvd-typography-base)}.text-primary{font:var(--vvd-typography-base)}.base:not(.disabled) .text-primary{color:var(--vvd-color-canvas-text)}.base.disabled .text-primary{color:var(--_appearance-color-text)}.base.two-lines .text-primary{font:var(--vvd-typography-base-bold)}.text-secondary{color:var(--vvd-color-neutral-800);font:var(--vvd-typography-base-condensed)}.base.two-lines .text-secondary{color:var(--vvd-color-neutral-600)}.base.disabled .text-secondary{color:var(--_appearance-color-text)}.base.selected:not(.disabled) .text-secondary{color:var(--vvd-color-neutral-800)}.match{color:var(--vvd-color-cta-600);font:var(--vvd-typography-base-bold)}slot[name=icon]{font-size:var(--_option-icon-size);line-height:1}.base:not(.disabled,.selected) slot[name=icon]{color:var(--vvd-color-neutral-600)}.checkmark{font-size:var(--_option-icon-size)}";
|
|
273
272
|
|
|
274
273
|
const listboxOptionDefinition = defineVividComponent(
|
|
275
274
|
"option",
|
|
@@ -7,7 +7,7 @@ const fastElement = require('@microsoft/fast-element');
|
|
|
7
7
|
const affix = require('./affix.cjs');
|
|
8
8
|
const hostSemantics = require('./host-semantics.cjs');
|
|
9
9
|
|
|
10
|
-
const styles = ":host(:focus-visible){outline:none}:host([disabled]){cursor:not-allowed}.control{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.control:disabled{--_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: transparent;--_appearance-color-outline: transparent}@media
|
|
10
|
+
const styles = ":host(:focus-visible){outline:none}:host([disabled]){cursor:not-allowed}.control{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.control:disabled{--_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: transparent;--_appearance-color-outline: transparent}@media(hover:hover){.control:hover:where(:not(.disabled,:disabled,.readonly)){--_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(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.control:active:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.control.active:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.control.selected:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-primary-text);--_appearance-color-fill: var(--_connotation-color-primary);--_appearance-color-outline: transparent}@media(hover:hover){.control.selected:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-primary-text);--_appearance-color-fill: var(--_connotation-color-primary-increment);--_appearance-color-outline: transparent}}.control.selected.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-primary-text);--_appearance-color-fill: var(--_connotation-color-primary-increment);--_appearance-color-outline: transparent}.control{--_connotation-color-primary: var(--vvd-tree-item-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-primary-text: var(--vvd-tree-item-accent-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-tree-item-accent-primary-increment, var(--vvd-color-neutral-800));--_connotation-color-faint: var(--vvd-tree-item-accent-faint, var(--vvd-color-neutral-50));--_connotation-color-soft: var(--vvd-tree-item-accent-soft, var(--vvd-color-neutral-100));--_connotation-color-firm: var(--vvd-tree-item-accent-firm, var(--vvd-color-canvas-text))}.control{position:relative;display:inline-flex;box-sizing:border-box;align-items:center;border-radius:8px;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:12px;hyphens:auto;inline-size:100%;min-block-size:calc(1px*(40 + 4*clamp(-1,var(--vvd-size-density, 0),2)));padding-inline:16px;text-decoration:none;vertical-align:middle;word-break:break-word}@supports (user-select: none){.control{user-select:none}}.control:not(.disabled){cursor:pointer}.control.disabled{pointer-events:none}:host(:focus-visible) .control{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(:focus-visible) .control:not(.selected){--focus-stroke-gap-color: transparent}.control .text{font:var(--vvd-typography-base)}.expandCollapseButton{display:flex;align-items:center;border-radius:8px;font-size:20px}.expandCollapseButton .expandCollapseIcon{margin:4px}@media(hover:hover){.expandCollapseButton:hover{background-color:var(--vvd-color-neutral-100)}.selected .expandCollapseButton:hover{background-color:var(--vvd-color-neutral-700)}}.items{display:flex;flex-direction:column;gap:4px;margin-block-start:4px;padding-inline-start:48px}slot[name=icon]{font-size:20px;line-height:1}.control:not(.disabled,.selected) slot[name=icon]{color:var(--vvd-color-neutral-600)}";
|
|
11
11
|
|
|
12
12
|
var __defProp = Object.defineProperty;
|
|
13
13
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
@@ -76,7 +76,6 @@ class TreeItem extends hostSemantics.HostSemantics(affix.AffixIcon(vividElement.
|
|
|
76
76
|
itemsChanged() {
|
|
77
77
|
if (this.$fastController.isConnected) {
|
|
78
78
|
this.items.forEach((node) => {
|
|
79
|
-
/* v8 ignore else -- @preserve */
|
|
80
79
|
if (isTreeItemElement(node)) {
|
|
81
80
|
node.nested = true;
|
|
82
81
|
}
|
package/unbundled/definition4.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { VwcIconElement as Icon, iconDefinition } from '../icon/definition.js';
|
|
2
|
-
import { V as VividElement,
|
|
2
|
+
import { V as VividElement, c as createRegisterFunction, d as defineVividComponent } from './vivid-element.js';
|
|
3
3
|
import { isHTMLElement, classNames } from '@microsoft/fast-web-utilities';
|
|
4
|
-
import { attr, observable, children,
|
|
4
|
+
import { attr, observable, children, elements, when, slotted, html, ref } from '@microsoft/fast-element';
|
|
5
5
|
import { A as AffixIcon, a as affixIconTemplateFactory, I as IconWrapper } from './affix.js';
|
|
6
6
|
import { H as HostSemantics, a as applyHostSemantics } from './host-semantics.js';
|
|
7
7
|
|
|
8
|
-
const styles = ":host(:focus-visible){outline:none}:host([disabled]){cursor:not-allowed}.control{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.control:disabled{--_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: transparent;--_appearance-color-outline: transparent}@media
|
|
8
|
+
const styles = ":host(:focus-visible){outline:none}:host([disabled]){cursor:not-allowed}.control{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.control:disabled{--_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: transparent;--_appearance-color-outline: transparent}@media(hover:hover){.control:hover:where(:not(.disabled,:disabled,.readonly)){--_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(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.control:active:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.control.active:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.control.selected:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-primary-text);--_appearance-color-fill: var(--_connotation-color-primary);--_appearance-color-outline: transparent}@media(hover:hover){.control.selected:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-primary-text);--_appearance-color-fill: var(--_connotation-color-primary-increment);--_appearance-color-outline: transparent}}.control.selected.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-primary-text);--_appearance-color-fill: var(--_connotation-color-primary-increment);--_appearance-color-outline: transparent}.control{--_connotation-color-primary: var(--vvd-tree-item-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-primary-text: var(--vvd-tree-item-accent-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-tree-item-accent-primary-increment, var(--vvd-color-neutral-800));--_connotation-color-faint: var(--vvd-tree-item-accent-faint, var(--vvd-color-neutral-50));--_connotation-color-soft: var(--vvd-tree-item-accent-soft, var(--vvd-color-neutral-100));--_connotation-color-firm: var(--vvd-tree-item-accent-firm, var(--vvd-color-canvas-text))}.control{position:relative;display:inline-flex;box-sizing:border-box;align-items:center;border-radius:8px;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:12px;hyphens:auto;inline-size:100%;min-block-size:calc(1px*(40 + 4*clamp(-1,var(--vvd-size-density, 0),2)));padding-inline:16px;text-decoration:none;vertical-align:middle;word-break:break-word}@supports (user-select: none){.control{user-select:none}}.control:not(.disabled){cursor:pointer}.control.disabled{pointer-events:none}:host(:focus-visible) .control{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(:focus-visible) .control:not(.selected){--focus-stroke-gap-color: transparent}.control .text{font:var(--vvd-typography-base)}.expandCollapseButton{display:flex;align-items:center;border-radius:8px;font-size:20px}.expandCollapseButton .expandCollapseIcon{margin:4px}@media(hover:hover){.expandCollapseButton:hover{background-color:var(--vvd-color-neutral-100)}.selected .expandCollapseButton:hover{background-color:var(--vvd-color-neutral-700)}}.items{display:flex;flex-direction:column;gap:4px;margin-block-start:4px;padding-inline-start:48px}slot[name=icon]{font-size:20px;line-height:1}.control:not(.disabled,.selected) slot[name=icon]{color:var(--vvd-color-neutral-600)}";
|
|
9
9
|
|
|
10
10
|
var __defProp = Object.defineProperty;
|
|
11
11
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
@@ -74,7 +74,6 @@ class TreeItem extends HostSemantics(AffixIcon(VividElement)) {
|
|
|
74
74
|
itemsChanged() {
|
|
75
75
|
if (this.$fastController.isConnected) {
|
|
76
76
|
this.items.forEach((node) => {
|
|
77
|
-
/* v8 ignore else -- @preserve */
|
|
78
77
|
if (isTreeItemElement(node)) {
|
|
79
78
|
node.nested = true;
|
|
80
79
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const button_definition = require('./
|
|
3
|
+
const button_definition = require('./definition2.cjs');
|
|
4
4
|
const elevation_definition = require('./definition6.cjs');
|
|
5
5
|
const vividElement = require('./vivid-element.cjs');
|
|
6
6
|
const fastElement = require('@microsoft/fast-element');
|
package/unbundled/definition5.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { B as Button, b as buttonDefinition } from './
|
|
1
|
+
import { B as Button, b as buttonDefinition } from './definition2.js';
|
|
2
2
|
import { E as Elevation, e as elevationDefinition } from './definition6.js';
|
|
3
3
|
import { V as VividElement, d as defineVividComponent, c as createRegisterFunction } from './vivid-element.js';
|
|
4
4
|
import { attr, nullableNumberConverter, observable, ref, when, html } from '@microsoft/fast-element';
|
|
5
|
-
import {
|
|
5
|
+
import { autoPlacement, flip, inline, hide, size, shift, arrow, offset, autoUpdate, computePosition } from '@floating-ui/dom';
|
|
6
6
|
import { classNames } from '@microsoft/fast-web-utilities';
|
|
7
7
|
|
|
8
8
|
var __defProp = Object.defineProperty;
|
|
@@ -69,7 +69,6 @@ class DelegateAriaBehavior {
|
|
|
69
69
|
// }
|
|
70
70
|
startForwardingPropertiesToTarget(source, delegatedProperties, target) {
|
|
71
71
|
for (const key of delegatedProperties) {
|
|
72
|
-
/* v8 ignore else -- @preserve */
|
|
73
72
|
if (!(key in this.boundProperties)) {
|
|
74
73
|
this.forwardPropertyToTarget(target, key, source[key]);
|
|
75
74
|
}
|
|
@@ -124,6 +123,7 @@ const DelegatesAria = (Base) => {
|
|
|
124
123
|
class DelegatesAriaElement extends Base {
|
|
125
124
|
constructor() {
|
|
126
125
|
super(...arguments);
|
|
126
|
+
/** @internal */
|
|
127
127
|
this._vividAriaBehaviour = "delegate";
|
|
128
128
|
}
|
|
129
129
|
}
|
|
@@ -67,7 +67,6 @@ class DelegateAriaBehavior {
|
|
|
67
67
|
// }
|
|
68
68
|
startForwardingPropertiesToTarget(source, delegatedProperties, target) {
|
|
69
69
|
for (const key of delegatedProperties) {
|
|
70
|
-
/* v8 ignore else -- @preserve */
|
|
71
70
|
if (!(key in this.boundProperties)) {
|
|
72
71
|
this.forwardPropertyToTarget(target, key, source[key]);
|
|
73
72
|
}
|
|
@@ -122,6 +121,7 @@ const DelegatesAria = (Base) => {
|
|
|
122
121
|
class DelegatesAriaElement extends Base {
|
|
123
122
|
constructor() {
|
|
124
123
|
super(...arguments);
|
|
124
|
+
/** @internal */
|
|
125
125
|
this._vividAriaBehaviour = "delegate";
|
|
126
126
|
}
|
|
127
127
|
}
|
package/unbundled/enums.js
CHANGED
|
@@ -91,4 +91,4 @@ var Sticky = /* @__PURE__ */ ((Sticky2) => {
|
|
|
91
91
|
return Sticky2;
|
|
92
92
|
})(Sticky || {});
|
|
93
93
|
|
|
94
|
-
export { Appearance as A, Connotation as C, IconDecoration as I, LayoutSize as L, MediaSkipBy as M, Position as P, Role as R, Shape as S,
|
|
94
|
+
export { Appearance as A, Connotation as C, IconDecoration as I, LayoutSize as L, MediaSkipBy as M, Position as P, Role as R, Shape as S, AriaLive as a, ConnotationDecorative as b, Size as c, Sticky as d };
|
|
@@ -109,6 +109,7 @@ const FormAssociated = (Base) => {
|
|
|
109
109
|
this.validate();
|
|
110
110
|
}
|
|
111
111
|
/**
|
|
112
|
+
* @internal
|
|
112
113
|
* @deprecated Use `value` instead.
|
|
113
114
|
*/
|
|
114
115
|
get currentValue() {
|
|
@@ -139,7 +140,6 @@ const FormAssociated = (Base) => {
|
|
|
139
140
|
* @internal
|
|
140
141
|
*/
|
|
141
142
|
nameChanged(_previous, _next) {
|
|
142
|
-
/* v8 ignore if -- @preserve */
|
|
143
143
|
if (this.proxy instanceof HTMLElement) {
|
|
144
144
|
this.proxy.name = this.name;
|
|
145
145
|
}
|
|
@@ -224,10 +224,9 @@ const FormAssociated = (Base) => {
|
|
|
224
224
|
*/
|
|
225
225
|
setValidity(flags, message, anchor) {
|
|
226
226
|
if ("valid" in flags && this.disabled) {
|
|
227
|
-
const { valid, ...cleanFlags } = flags;
|
|
227
|
+
const { valid: _valid, ...cleanFlags } = flags;
|
|
228
228
|
flags = cleanFlags;
|
|
229
229
|
}
|
|
230
|
-
/* v8 ignore else -- @preserve */
|
|
231
230
|
if (this.elementInternals) {
|
|
232
231
|
this.elementInternals.setValidity(flags, message, anchor);
|
|
233
232
|
} else if (typeof message === "string") {
|
|
@@ -266,7 +265,6 @@ const FormAssociated = (Base) => {
|
|
|
266
265
|
if (typeof this.name === "string") {
|
|
267
266
|
this.proxy.name = this.name;
|
|
268
267
|
}
|
|
269
|
-
/* v8 ignore else -- @preserve */
|
|
270
268
|
if (typeof this.value === "string") {
|
|
271
269
|
this.proxy.value = this.value;
|
|
272
270
|
}
|
|
@@ -388,7 +386,6 @@ const CheckableFormAssociated = (Base) => {
|
|
|
388
386
|
* @internal
|
|
389
387
|
*/
|
|
390
388
|
defaultCheckedChanged() {
|
|
391
|
-
/* v8 ignore else -- @preserve */
|
|
392
389
|
if (!this.dirtyChecked) {
|
|
393
390
|
this.checked = this.defaultChecked;
|
|
394
391
|
this.dirtyChecked = false;
|
|
@@ -411,6 +408,7 @@ const CheckableFormAssociated = (Base) => {
|
|
|
411
408
|
this.validate();
|
|
412
409
|
}
|
|
413
410
|
/**
|
|
411
|
+
* @internal
|
|
414
412
|
* @deprecated Use `defaultChecked` instead.
|
|
415
413
|
*/
|
|
416
414
|
get checkedAttribute() {
|
|
@@ -420,6 +418,7 @@ const CheckableFormAssociated = (Base) => {
|
|
|
420
418
|
this.defaultChecked = value;
|
|
421
419
|
}
|
|
422
420
|
/**
|
|
421
|
+
* @internal
|
|
423
422
|
* @deprecated Use `checked` instead.
|
|
424
423
|
*/
|
|
425
424
|
get currentChecked() {
|
|
@@ -107,6 +107,7 @@ const FormAssociated = (Base) => {
|
|
|
107
107
|
this.validate();
|
|
108
108
|
}
|
|
109
109
|
/**
|
|
110
|
+
* @internal
|
|
110
111
|
* @deprecated Use `value` instead.
|
|
111
112
|
*/
|
|
112
113
|
get currentValue() {
|
|
@@ -137,7 +138,6 @@ const FormAssociated = (Base) => {
|
|
|
137
138
|
* @internal
|
|
138
139
|
*/
|
|
139
140
|
nameChanged(_previous, _next) {
|
|
140
|
-
/* v8 ignore if -- @preserve */
|
|
141
141
|
if (this.proxy instanceof HTMLElement) {
|
|
142
142
|
this.proxy.name = this.name;
|
|
143
143
|
}
|
|
@@ -222,10 +222,9 @@ const FormAssociated = (Base) => {
|
|
|
222
222
|
*/
|
|
223
223
|
setValidity(flags, message, anchor) {
|
|
224
224
|
if ("valid" in flags && this.disabled) {
|
|
225
|
-
const { valid, ...cleanFlags } = flags;
|
|
225
|
+
const { valid: _valid, ...cleanFlags } = flags;
|
|
226
226
|
flags = cleanFlags;
|
|
227
227
|
}
|
|
228
|
-
/* v8 ignore else -- @preserve */
|
|
229
228
|
if (this.elementInternals) {
|
|
230
229
|
this.elementInternals.setValidity(flags, message, anchor);
|
|
231
230
|
} else if (typeof message === "string") {
|
|
@@ -264,7 +263,6 @@ const FormAssociated = (Base) => {
|
|
|
264
263
|
if (typeof this.name === "string") {
|
|
265
264
|
this.proxy.name = this.name;
|
|
266
265
|
}
|
|
267
|
-
/* v8 ignore else -- @preserve */
|
|
268
266
|
if (typeof this.value === "string") {
|
|
269
267
|
this.proxy.value = this.value;
|
|
270
268
|
}
|
|
@@ -386,7 +384,6 @@ const CheckableFormAssociated = (Base) => {
|
|
|
386
384
|
* @internal
|
|
387
385
|
*/
|
|
388
386
|
defaultCheckedChanged() {
|
|
389
|
-
/* v8 ignore else -- @preserve */
|
|
390
387
|
if (!this.dirtyChecked) {
|
|
391
388
|
this.checked = this.defaultChecked;
|
|
392
389
|
this.dirtyChecked = false;
|
|
@@ -409,6 +406,7 @@ const CheckableFormAssociated = (Base) => {
|
|
|
409
406
|
this.validate();
|
|
410
407
|
}
|
|
411
408
|
/**
|
|
409
|
+
* @internal
|
|
412
410
|
* @deprecated Use `defaultChecked` instead.
|
|
413
411
|
*/
|
|
414
412
|
get checkedAttribute() {
|
|
@@ -418,6 +416,7 @@ const CheckableFormAssociated = (Base) => {
|
|
|
418
416
|
this.defaultChecked = value;
|
|
419
417
|
}
|
|
420
418
|
/**
|
|
419
|
+
* @internal
|
|
421
420
|
* @deprecated Use `checked` instead.
|
|
422
421
|
*/
|
|
423
422
|
get currentChecked() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { oneWay,
|
|
1
|
+
import { oneWay, HTMLDirective, StatelessAttachedAttributeDirective } from '@microsoft/fast-element';
|
|
2
2
|
import { a as ariaAttributeName, b as ariaMixinProperties } from './vivid-element.js';
|
|
3
3
|
import { A as AttributeBindingBehavior } from './attribute-binding-behaviour.js';
|
|
4
4
|
|
|
@@ -79,6 +79,7 @@ const HostSemantics = (Base) => {
|
|
|
79
79
|
class HostSemanticsElement extends Base {
|
|
80
80
|
constructor() {
|
|
81
81
|
super(...arguments);
|
|
82
|
+
/** @internal */
|
|
82
83
|
this._vividAriaBehaviour = "host";
|
|
83
84
|
}
|
|
84
85
|
}
|
package/unbundled/key-codes.js
CHANGED
package/unbundled/listbox.cjs
CHANGED
|
@@ -198,7 +198,6 @@ const _Listbox = class _Listbox extends vividElement.VividElement {
|
|
|
198
198
|
handleChange(source, propertyName) {
|
|
199
199
|
switch (propertyName) {
|
|
200
200
|
case "selected": {
|
|
201
|
-
/* v8 ignore else -- @preserve */
|
|
202
201
|
if (_Listbox.slottedOptionFilter(source)) {
|
|
203
202
|
this.selectedIndex = this.options.indexOf(source);
|
|
204
203
|
}
|
|
@@ -218,7 +217,6 @@ const _Listbox = class _Listbox extends vividElement.VividElement {
|
|
|
218
217
|
* @internal
|
|
219
218
|
*/
|
|
220
219
|
handleTypeAhead(key) {
|
|
221
|
-
/* v8 ignore else -- @preserve */
|
|
222
220
|
if (this.typeaheadTimeout) {
|
|
223
221
|
window.clearTimeout(this.typeaheadTimeout);
|
|
224
222
|
}
|
|
@@ -240,30 +238,31 @@ const _Listbox = class _Listbox extends vividElement.VividElement {
|
|
|
240
238
|
this.shouldSkipFocus = false;
|
|
241
239
|
const key = e.key;
|
|
242
240
|
switch (key) {
|
|
241
|
+
// Select the first available option
|
|
243
242
|
case fastWebUtilities.keyHome: {
|
|
244
|
-
/* v8 ignore else -- @preserve */
|
|
245
243
|
if (!e.shiftKey) {
|
|
246
244
|
e.preventDefault();
|
|
247
245
|
this.selectFirstOption();
|
|
248
246
|
}
|
|
249
247
|
break;
|
|
250
248
|
}
|
|
249
|
+
// Select the next selectable option
|
|
251
250
|
case fastWebUtilities.keyArrowDown: {
|
|
252
|
-
/* v8 ignore else -- @preserve */
|
|
253
251
|
if (!e.shiftKey) {
|
|
254
252
|
e.preventDefault();
|
|
255
253
|
this.selectNextOption();
|
|
256
254
|
}
|
|
257
255
|
break;
|
|
258
256
|
}
|
|
257
|
+
// Select the previous selectable option
|
|
259
258
|
case fastWebUtilities.keyArrowUp: {
|
|
260
|
-
/* v8 ignore else -- @preserve */
|
|
261
259
|
if (!e.shiftKey) {
|
|
262
260
|
e.preventDefault();
|
|
263
261
|
this.selectPreviousOption();
|
|
264
262
|
}
|
|
265
263
|
break;
|
|
266
264
|
}
|
|
265
|
+
// Select the last available option
|
|
267
266
|
case fastWebUtilities.keyEnd: {
|
|
268
267
|
e.preventDefault();
|
|
269
268
|
this.selectLastOption();
|
|
@@ -276,14 +275,14 @@ const _Listbox = class _Listbox extends vividElement.VividElement {
|
|
|
276
275
|
case fastWebUtilities.keyEnter:
|
|
277
276
|
case fastWebUtilities.keyEscape:
|
|
278
277
|
return true;
|
|
278
|
+
// @ts-expect-error - fallthrough case
|
|
279
279
|
case fastWebUtilities.keySpace: {
|
|
280
|
-
/* v8 ignore else -- @preserve */
|
|
281
280
|
if (this.typeaheadExpired) {
|
|
282
281
|
return true;
|
|
283
282
|
}
|
|
284
283
|
}
|
|
284
|
+
// fallthrough:
|
|
285
285
|
default: {
|
|
286
|
-
/* v8 ignore else -- @preserve */
|
|
287
286
|
if (key.length === 1) {
|
|
288
287
|
this.handleTypeAhead(`${key}`);
|
|
289
288
|
}
|
|
@@ -341,7 +340,6 @@ const _Listbox = class _Listbox extends vividElement.VividElement {
|
|
|
341
340
|
* @public
|
|
342
341
|
*/
|
|
343
342
|
selectFirstOption() {
|
|
344
|
-
/* v8 ignore else -- @preserve */
|
|
345
343
|
if (!this.disabled) {
|
|
346
344
|
this.selectedIndex = this.options.findIndex((o) => !o.disabled);
|
|
347
345
|
}
|
|
@@ -352,7 +350,6 @@ const _Listbox = class _Listbox extends vividElement.VividElement {
|
|
|
352
350
|
* @internal
|
|
353
351
|
*/
|
|
354
352
|
selectLastOption() {
|
|
355
|
-
/* v8 ignore else -- @preserve */
|
|
356
353
|
if (!this.disabled) {
|
|
357
354
|
this.selectedIndex = fastWebUtilities.findLastIndex(this.options, (o) => !o.disabled);
|
|
358
355
|
}
|
|
@@ -363,7 +360,6 @@ const _Listbox = class _Listbox extends vividElement.VividElement {
|
|
|
363
360
|
* @internal
|
|
364
361
|
*/
|
|
365
362
|
selectNextOption() {
|
|
366
|
-
/* v8 ignore else -- @preserve */
|
|
367
363
|
if (!this.disabled && this.selectedIndex < this.options.length - 1) {
|
|
368
364
|
const nextIndex = this.getNextSelectableIndex(this.selectedIndex + 1);
|
|
369
365
|
if (nextIndex !== -1) {
|
|
@@ -377,7 +373,6 @@ const _Listbox = class _Listbox extends vividElement.VividElement {
|
|
|
377
373
|
* @internal
|
|
378
374
|
*/
|
|
379
375
|
selectPreviousOption() {
|
|
380
|
-
/* v8 ignore else -- @preserve */
|
|
381
376
|
if (!this.disabled && this.selectedIndex > 0) {
|
|
382
377
|
const prevIndex = this.getPreviousSelectableIndex(this.selectedIndex - 1);
|
|
383
378
|
if (prevIndex !== -1) {
|
|
@@ -415,7 +410,6 @@ const _Listbox = class _Listbox extends vividElement.VividElement {
|
|
|
415
410
|
*/
|
|
416
411
|
slottedOptionsChanged(_, next) {
|
|
417
412
|
this.options = next.reduce((options, item) => {
|
|
418
|
-
/* v8 ignore else -- @preserve */
|
|
419
413
|
if (option_definition.isListboxOption(item)) {
|
|
420
414
|
options.push(item);
|
|
421
415
|
}
|
|
@@ -438,10 +432,8 @@ const _Listbox = class _Listbox extends vividElement.VividElement {
|
|
|
438
432
|
typeaheadBufferChanged(_prev, _next) {
|
|
439
433
|
if (this.$fastController.isConnected) {
|
|
440
434
|
const typeaheadMatches = this.getTypeaheadMatches();
|
|
441
|
-
/* v8 ignore else -- @preserve */
|
|
442
435
|
if (typeaheadMatches.length) {
|
|
443
436
|
const selectedIndex = this.options.indexOf(typeaheadMatches[0]);
|
|
444
|
-
/* v8 ignore else -- @preserve */
|
|
445
437
|
if (selectedIndex > -1) {
|
|
446
438
|
this.selectedIndex = selectedIndex;
|
|
447
439
|
}
|
package/unbundled/listbox.js
CHANGED
|
@@ -196,7 +196,6 @@ const _Listbox = class _Listbox extends VividElement {
|
|
|
196
196
|
handleChange(source, propertyName) {
|
|
197
197
|
switch (propertyName) {
|
|
198
198
|
case "selected": {
|
|
199
|
-
/* v8 ignore else -- @preserve */
|
|
200
199
|
if (_Listbox.slottedOptionFilter(source)) {
|
|
201
200
|
this.selectedIndex = this.options.indexOf(source);
|
|
202
201
|
}
|
|
@@ -216,7 +215,6 @@ const _Listbox = class _Listbox extends VividElement {
|
|
|
216
215
|
* @internal
|
|
217
216
|
*/
|
|
218
217
|
handleTypeAhead(key) {
|
|
219
|
-
/* v8 ignore else -- @preserve */
|
|
220
218
|
if (this.typeaheadTimeout) {
|
|
221
219
|
window.clearTimeout(this.typeaheadTimeout);
|
|
222
220
|
}
|
|
@@ -238,30 +236,31 @@ const _Listbox = class _Listbox extends VividElement {
|
|
|
238
236
|
this.shouldSkipFocus = false;
|
|
239
237
|
const key = e.key;
|
|
240
238
|
switch (key) {
|
|
239
|
+
// Select the first available option
|
|
241
240
|
case keyHome: {
|
|
242
|
-
/* v8 ignore else -- @preserve */
|
|
243
241
|
if (!e.shiftKey) {
|
|
244
242
|
e.preventDefault();
|
|
245
243
|
this.selectFirstOption();
|
|
246
244
|
}
|
|
247
245
|
break;
|
|
248
246
|
}
|
|
247
|
+
// Select the next selectable option
|
|
249
248
|
case keyArrowDown: {
|
|
250
|
-
/* v8 ignore else -- @preserve */
|
|
251
249
|
if (!e.shiftKey) {
|
|
252
250
|
e.preventDefault();
|
|
253
251
|
this.selectNextOption();
|
|
254
252
|
}
|
|
255
253
|
break;
|
|
256
254
|
}
|
|
255
|
+
// Select the previous selectable option
|
|
257
256
|
case keyArrowUp: {
|
|
258
|
-
/* v8 ignore else -- @preserve */
|
|
259
257
|
if (!e.shiftKey) {
|
|
260
258
|
e.preventDefault();
|
|
261
259
|
this.selectPreviousOption();
|
|
262
260
|
}
|
|
263
261
|
break;
|
|
264
262
|
}
|
|
263
|
+
// Select the last available option
|
|
265
264
|
case keyEnd: {
|
|
266
265
|
e.preventDefault();
|
|
267
266
|
this.selectLastOption();
|
|
@@ -274,14 +273,14 @@ const _Listbox = class _Listbox extends VividElement {
|
|
|
274
273
|
case keyEnter:
|
|
275
274
|
case keyEscape:
|
|
276
275
|
return true;
|
|
276
|
+
// @ts-expect-error - fallthrough case
|
|
277
277
|
case keySpace: {
|
|
278
|
-
/* v8 ignore else -- @preserve */
|
|
279
278
|
if (this.typeaheadExpired) {
|
|
280
279
|
return true;
|
|
281
280
|
}
|
|
282
281
|
}
|
|
282
|
+
// fallthrough:
|
|
283
283
|
default: {
|
|
284
|
-
/* v8 ignore else -- @preserve */
|
|
285
284
|
if (key.length === 1) {
|
|
286
285
|
this.handleTypeAhead(`${key}`);
|
|
287
286
|
}
|
|
@@ -339,7 +338,6 @@ const _Listbox = class _Listbox extends VividElement {
|
|
|
339
338
|
* @public
|
|
340
339
|
*/
|
|
341
340
|
selectFirstOption() {
|
|
342
|
-
/* v8 ignore else -- @preserve */
|
|
343
341
|
if (!this.disabled) {
|
|
344
342
|
this.selectedIndex = this.options.findIndex((o) => !o.disabled);
|
|
345
343
|
}
|
|
@@ -350,7 +348,6 @@ const _Listbox = class _Listbox extends VividElement {
|
|
|
350
348
|
* @internal
|
|
351
349
|
*/
|
|
352
350
|
selectLastOption() {
|
|
353
|
-
/* v8 ignore else -- @preserve */
|
|
354
351
|
if (!this.disabled) {
|
|
355
352
|
this.selectedIndex = findLastIndex(this.options, (o) => !o.disabled);
|
|
356
353
|
}
|
|
@@ -361,7 +358,6 @@ const _Listbox = class _Listbox extends VividElement {
|
|
|
361
358
|
* @internal
|
|
362
359
|
*/
|
|
363
360
|
selectNextOption() {
|
|
364
|
-
/* v8 ignore else -- @preserve */
|
|
365
361
|
if (!this.disabled && this.selectedIndex < this.options.length - 1) {
|
|
366
362
|
const nextIndex = this.getNextSelectableIndex(this.selectedIndex + 1);
|
|
367
363
|
if (nextIndex !== -1) {
|
|
@@ -375,7 +371,6 @@ const _Listbox = class _Listbox extends VividElement {
|
|
|
375
371
|
* @internal
|
|
376
372
|
*/
|
|
377
373
|
selectPreviousOption() {
|
|
378
|
-
/* v8 ignore else -- @preserve */
|
|
379
374
|
if (!this.disabled && this.selectedIndex > 0) {
|
|
380
375
|
const prevIndex = this.getPreviousSelectableIndex(this.selectedIndex - 1);
|
|
381
376
|
if (prevIndex !== -1) {
|
|
@@ -413,7 +408,6 @@ const _Listbox = class _Listbox extends VividElement {
|
|
|
413
408
|
*/
|
|
414
409
|
slottedOptionsChanged(_, next) {
|
|
415
410
|
this.options = next.reduce((options, item) => {
|
|
416
|
-
/* v8 ignore else -- @preserve */
|
|
417
411
|
if (isListboxOption(item)) {
|
|
418
412
|
options.push(item);
|
|
419
413
|
}
|
|
@@ -436,10 +430,8 @@ const _Listbox = class _Listbox extends VividElement {
|
|
|
436
430
|
typeaheadBufferChanged(_prev, _next) {
|
|
437
431
|
if (this.$fastController.isConnected) {
|
|
438
432
|
const typeaheadMatches = this.getTypeaheadMatches();
|
|
439
|
-
/* v8 ignore else -- @preserve */
|
|
440
433
|
if (typeaheadMatches.length) {
|
|
441
434
|
const selectedIndex = this.options.indexOf(typeaheadMatches[0]);
|
|
442
|
-
/* v8 ignore else -- @preserve */
|
|
443
435
|
if (selectedIndex > -1) {
|
|
444
436
|
this.selectedIndex = selectedIndex;
|
|
445
437
|
}
|
package/unbundled/mixins.cjs
CHANGED
|
@@ -93,7 +93,6 @@ class RenderInLightDomBehaviour {
|
|
|
93
93
|
* Handles change of the template itself.
|
|
94
94
|
*/
|
|
95
95
|
handleChange(source, args) {
|
|
96
|
-
/* v8 ignore else -- @preserve */
|
|
97
96
|
if (args === this.templateBindingObserver) {
|
|
98
97
|
const template = this.templateBindingObserver.bind(this.controller);
|
|
99
98
|
this.instantiateTemplate(template);
|
|
@@ -213,7 +212,6 @@ const WithLightDOMFeedback = (Base) => {
|
|
|
213
212
|
*/
|
|
214
213
|
_helperTextSlottedContentChanged(_, newContent) {
|
|
215
214
|
for (const el of newContent) {
|
|
216
|
-
/* v8 ignore else -- @preserve */
|
|
217
215
|
if (!el.id) {
|
|
218
216
|
el.id = randomSlottedContentId();
|
|
219
217
|
}
|
package/unbundled/mixins.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { html, when,
|
|
1
|
+
import { attr, html, when, normalizeBinding, Markup, HTMLDirective, observable, slotted } from '@microsoft/fast-element';
|
|
2
2
|
import { v4 } from 'uuid';
|
|
3
3
|
import { classNames } from '@microsoft/fast-web-utilities';
|
|
4
4
|
import { iconDefinition, VwcIconElement as Icon } from '../icon/definition.js';
|
|
5
|
-
import {
|
|
5
|
+
import { V as VividElement, d as defineVividComponent } from './vivid-element.js';
|
|
6
6
|
import { visuallyHiddenDefinition } from '../visually-hidden/definition.js';
|
|
7
7
|
import { L as Localized } from './localized.js';
|
|
8
8
|
|
|
@@ -91,7 +91,6 @@ class RenderInLightDomBehaviour {
|
|
|
91
91
|
* Handles change of the template itself.
|
|
92
92
|
*/
|
|
93
93
|
handleChange(source, args) {
|
|
94
|
-
/* v8 ignore else -- @preserve */
|
|
95
94
|
if (args === this.templateBindingObserver) {
|
|
96
95
|
const template = this.templateBindingObserver.bind(this.controller);
|
|
97
96
|
this.instantiateTemplate(template);
|
|
@@ -211,7 +210,6 @@ const WithLightDOMFeedback = (Base) => {
|
|
|
211
210
|
*/
|
|
212
211
|
_helperTextSlottedContentChanged(_, newContent) {
|
|
213
212
|
for (const el of newContent) {
|
|
214
|
-
/* v8 ignore else -- @preserve */
|
|
215
213
|
if (!el.id) {
|
|
216
214
|
el.id = randomSlottedContentId();
|
|
217
215
|
}
|
|
@@ -13,7 +13,7 @@ const localized = require('./localized.cjs');
|
|
|
13
13
|
const fastWebUtilities = require('@microsoft/fast-web-utilities');
|
|
14
14
|
const popup_definition = require('./definition5.cjs');
|
|
15
15
|
const textField_definition = require('../text-field/definition.cjs');
|
|
16
|
-
const button_definition = require('./
|
|
16
|
+
const button_definition = require('./definition2.cjs');
|
|
17
17
|
|
|
18
18
|
const pickerFieldStyles = ":host{display:inline-block}.base{display:inline-block;inline-size:100%}.control{inline-size:100%}.dialog{display:inline-flex;flex-direction:column}.dialog--padded{padding:12px;gap:12px}.dialog .footer{display:flex;align-items:center;justify-content:flex-end;padding:8px;gap:8px}.dialog .footer--with-separator{border-top:1px solid var(--vvd-color-neutral-200)}";
|
|
19
19
|
|
|
@@ -121,7 +121,6 @@ class PickerField extends withContextualHelp.WithContextualHelp(
|
|
|
121
121
|
}
|
|
122
122
|
#dismissOnClickOutside;
|
|
123
123
|
#openPopupIfPossible() {
|
|
124
|
-
/* v8 ignore else -- @preserve */
|
|
125
124
|
if (!this.readOnly) {
|
|
126
125
|
this._popupOpen = true;
|
|
127
126
|
}
|
|
@@ -11,7 +11,7 @@ import { L as Localized } from './localized.js';
|
|
|
11
11
|
import { classNames } from '@microsoft/fast-web-utilities';
|
|
12
12
|
import { P as Popup } from './definition5.js';
|
|
13
13
|
import { VwcTextFieldElement as TextField } from '../text-field/definition.js';
|
|
14
|
-
import { B as Button } from './
|
|
14
|
+
import { B as Button } from './definition2.js';
|
|
15
15
|
|
|
16
16
|
const pickerFieldStyles = ":host{display:inline-block}.base{display:inline-block;inline-size:100%}.control{inline-size:100%}.dialog{display:inline-flex;flex-direction:column}.dialog--padded{padding:12px;gap:12px}.dialog .footer{display:flex;align-items:center;justify-content:flex-end;padding:8px;gap:8px}.dialog .footer--with-separator{border-top:1px solid var(--vvd-color-neutral-200)}";
|
|
17
17
|
|
|
@@ -119,7 +119,6 @@ class PickerField extends WithContextualHelp(
|
|
|
119
119
|
}
|
|
120
120
|
#dismissOnClickOutside;
|
|
121
121
|
#openPopupIfPossible() {
|
|
122
|
-
/* v8 ignore else -- @preserve */
|
|
123
122
|
if (!this.readOnly) {
|
|
124
123
|
this._popupOpen = true;
|
|
125
124
|
}
|