@vonage/vivid 5.16.0 → 5.17.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/accordion/index.cjs +1 -1
- package/accordion/index.js +1 -1
- package/accordion-item/index.cjs +1 -1
- package/accordion-item/index.js +1 -1
- package/action-group/index.cjs +3 -3
- package/action-group/index.js +5 -5
- package/alert/index.cjs +3 -3
- package/alert/index.js +17 -17
- package/audio-player/index.cjs +16 -16
- package/audio-player/index.js +27 -27
- package/avatar/index.cjs +2 -2
- package/avatar/index.js +6 -6
- package/badge/index.cjs +2 -2
- package/badge/index.js +6 -6
- package/banner/index.cjs +3 -3
- package/banner/index.js +15 -15
- package/bundled/base-color-picker.cjs +2 -2
- package/bundled/base-color-picker.js +5 -5
- package/bundled/button.cjs +1 -1
- package/bundled/button.js +2 -2
- package/bundled/calendar-picker.template.cjs +2 -2
- package/bundled/calendar-picker.template.js +498 -498
- package/bundled/definition10.cjs +18 -30
- package/bundled/definition10.js +53 -155
- package/bundled/definition11.cjs +10 -19
- package/bundled/definition11.js +25 -74
- package/bundled/definition12.cjs +72 -18
- package/bundled/definition12.js +171 -107
- package/bundled/definition13.cjs +18 -17
- package/bundled/definition13.js +45 -65
- package/bundled/definition14.cjs +5 -10
- package/bundled/definition14.js +9 -27
- package/bundled/definition15.cjs +17 -71
- package/bundled/definition15.js +64 -181
- package/bundled/definition16.cjs +12 -4
- package/bundled/definition16.js +79 -14
- package/bundled/definition17.cjs +19 -13
- package/bundled/definition17.js +119 -70
- package/bundled/definition18.cjs +87 -12
- package/bundled/definition18.js +409 -52
- package/bundled/definition19.cjs +5 -87
- package/bundled/definition19.js +14 -422
- package/bundled/definition2.cjs +3 -3
- package/bundled/definition2.js +27 -27
- package/bundled/definition20.cjs +30 -5
- package/bundled/definition20.js +159 -9
- package/bundled/definition21.cjs +28 -19
- package/bundled/definition21.js +164 -47
- package/bundled/definition22.cjs +38 -23
- package/bundled/definition22.js +64 -82
- package/bundled/definition3.cjs +1 -1
- package/bundled/definition3.js +15 -15
- package/bundled/definition4.cjs +23 -38
- package/bundled/definition4.js +82 -64
- package/bundled/definition5.cjs +2 -2
- package/bundled/definition5.js +5 -5
- package/bundled/definition6.cjs +2 -2
- package/bundled/definition6.js +24 -24
- package/bundled/definition9.cjs +12 -30
- package/bundled/definition9.js +55 -148
- package/bundled/divider.cjs +1 -1
- package/bundled/divider.js +5 -5
- package/bundled/listbox.cjs +1 -1
- package/bundled/listbox.js +1 -1
- package/bundled/mixins.cjs +4 -4
- package/bundled/mixins.js +43 -43
- package/bundled/picker-field.template.cjs +7 -7
- package/bundled/picker-field.template.js +14 -14
- package/bundled/slider.template.cjs +7 -7
- package/bundled/slider.template.js +12 -12
- package/bundled/slottable-request.cjs +1 -1
- package/bundled/slottable-request.js +8 -38
- package/bundled/time-selection-picker.template.cjs +4 -4
- package/bundled/time-selection-picker.template.js +35 -35
- package/bundled/vivid-element.cjs +1 -1
- package/bundled/vivid-element.js +1 -1
- package/calendar/index.cjs +11 -11
- package/calendar/index.js +30 -237
- package/calendar-event/index.cjs +3 -3
- package/calendar-event/index.js +4 -4
- package/card/index.cjs +14 -11
- package/card/index.js +16 -13
- package/checkbox/index.cjs +1 -1
- package/checkbox/index.js +1 -1
- package/color-picker/definition.cjs +1 -1
- package/color-picker/definition.js +1 -1
- package/color-picker/index.cjs +6 -6
- package/color-picker/index.js +24 -24
- package/combobox/definition.cjs +1 -1
- package/combobox/definition.js +1 -1
- package/combobox/index.cjs +9 -8
- package/combobox/index.js +32 -28
- package/contextual-help/definition.cjs +1 -1
- package/contextual-help/definition.js +1 -1
- package/contextual-help/index.cjs +1 -1
- package/contextual-help/index.js +1 -1
- package/custom-elements.json +1027 -615
- package/data-grid/definition.js +1 -1
- package/data-grid/index.cjs +17 -17
- package/data-grid/index.js +261 -264
- package/date-picker/index.cjs +1 -1
- package/date-picker/index.js +12 -12
- package/date-range-picker/index.cjs +1 -1
- package/date-range-picker/index.js +7 -7
- package/date-time-picker/index.cjs +4 -4
- package/date-time-picker/index.js +24 -24
- package/dial-pad/index.cjs +3 -2
- package/dial-pad/index.js +6 -5
- package/dialog/index.cjs +4 -4
- package/dialog/index.js +5 -5
- package/divider/index.cjs +1 -1
- package/divider/index.js +1 -1
- package/fab/index.cjs +3 -3
- package/fab/index.js +8 -8
- package/file-picker/index.cjs +16 -13
- package/file-picker/index.js +31 -28
- package/header/index.cjs +4 -4
- package/header/index.js +5 -5
- package/index.cjs +24 -21
- package/index.js +11 -11
- package/lib/combobox/combobox.d.ts +0 -3
- package/lib/date-time-picker/date-time-picker.d.ts +0 -4
- package/lib/dial-pad/dial-pad.d.ts +6 -2
- package/lib/dialog/dialog.d.ts +0 -1
- package/lib/menu/menu.d.ts +0 -1
- package/lib/option/option.d.ts +0 -1
- package/lib/rich-text-editor/rte/exports.d.ts +1 -0
- package/lib/rich-text-editor/rte/features/alignment.d.ts +1 -1
- package/lib/rich-text-editor/rte/features/character-count.d.ts +21 -0
- package/lib/rich-text-editor/rte/features/font-size-picker.d.ts +1 -1
- package/lib/rich-text-editor/rte/features/internal/basic-text-blocks.d.ts +1 -1
- package/lib/rich-text-editor/rte/features/keyboard-shortcuts.d.ts +1 -1
- package/lib/rich-text-editor/rte/features/text-color-picker.d.ts +1 -1
- package/lib/rich-text-editor/rte/public-interface.d.ts +6 -0
- package/lib/searchable-select/option-tag.d.ts +0 -1
- package/lib/table/definition.d.ts +2 -1
- package/lib/table/table-header-cell.d.ts +3 -0
- package/lib/table/table-sorting-button.d.ts +415 -0
- package/lib/table/table-sorting-button.template.d.ts +3 -0
- package/locales/de-DE.cjs +4 -178
- package/locales/de-DE.js +2 -179
- package/locales/en-GB.cjs +4 -9
- package/locales/en-GB.js +2 -10
- package/locales/en-US.cjs +268 -2
- package/locales/en-US.js +265 -1
- package/locales/ja-JP.cjs +4 -171
- package/locales/ja-JP.js +2 -172
- package/locales/zh-CN.cjs +4 -172
- package/locales/zh-CN.js +2 -173
- package/menu/index.cjs +1 -1
- package/menu/index.js +1 -1
- package/menu-item/index.cjs +1 -1
- package/menu-item/index.js +1 -1
- package/nav-disclosure/index.cjs +3 -3
- package/nav-disclosure/index.js +8 -8
- package/nav-item/index.cjs +1 -1
- package/nav-item/index.js +7 -7
- package/note/index.cjs +2 -2
- package/note/index.js +6 -6
- package/number-field/index.cjs +4 -4
- package/number-field/index.js +31 -31
- package/option/definition.cjs +1 -1
- package/option/definition.js +1 -1
- package/option/index.cjs +1 -1
- package/option/index.js +1 -1
- package/package.json +7 -8
- package/pagination/index.cjs +3 -3
- package/pagination/index.js +15 -15
- package/popover/index.cjs +4 -4
- package/popover/index.js +5 -5
- package/progress/index.cjs +2 -2
- package/progress/index.js +5 -5
- package/radio/index.cjs +1 -1
- package/radio/index.js +1 -1
- package/radio-group/index.cjs +4 -4
- package/radio-group/index.js +10 -10
- package/range-slider/index.cjs +4 -4
- package/range-slider/index.js +17 -17
- package/rich-text-editor/definition.cjs +1 -0
- package/rich-text-editor/definition.js +2 -2
- package/rich-text-editor/index.cjs +13 -13
- package/rich-text-editor/index.js +1886 -1829
- package/rich-text-view/index.cjs +1 -1
- package/rich-text-view/index.js +8 -8
- package/searchable-select/index.cjs +12 -12
- package/searchable-select/index.js +25 -25
- package/select/index.cjs +1 -1
- package/select/index.js +1 -1
- package/selectable-box/index.cjs +7 -7
- package/selectable-box/index.js +11 -11
- package/shared/foundation/test-utilities/fixture.d.ts +1 -1
- package/shared/patterns/linkable.d.ts +1 -1
- package/simple-color-picker/index.cjs +3 -3
- package/simple-color-picker/index.js +10 -10
- package/split-button/index.cjs +5 -5
- package/split-button/index.js +10 -10
- package/status/index.cjs +2 -2
- package/status/index.js +12 -12
- package/switch/index.cjs +3 -3
- package/switch/index.js +5 -5
- package/tab/index.cjs +1 -1
- package/tab/index.js +1 -1
- package/tab-panel/index.cjs +1 -1
- package/tab-panel/index.js +1 -1
- package/table/definition.cjs +17 -14
- package/table/definition.js +3 -2
- package/table/index.cjs +19 -10
- package/table/index.js +69 -21
- package/tabs/index.cjs +2 -2
- package/tabs/index.js +4 -4
- package/tag/index.cjs +7 -7
- package/tag/index.js +9 -9
- package/tag-group/index.cjs +3 -3
- package/tag-group/index.js +5 -5
- package/text-area/index.cjs +2 -2
- package/text-area/index.js +12 -12
- package/text-field/definition.cjs +1 -1
- package/text-field/definition.js +1 -1
- package/text-field/index.cjs +1 -1
- package/text-field/index.js +1 -1
- package/time-picker/index.cjs +1 -1
- package/time-picker/index.js +1 -1
- package/toggletip/definition.cjs +1 -1
- package/toggletip/definition.js +1 -1
- package/toggletip/index.cjs +1 -1
- package/toggletip/index.js +1 -1
- package/tooltip/definition.cjs +1 -1
- package/tooltip/definition.js +1 -1
- package/tooltip/index.cjs +1 -1
- package/tooltip/index.js +1 -1
- package/tree-item/index.cjs +1 -1
- package/tree-item/index.js +1 -1
- package/tree-view/index.cjs +3 -3
- package/tree-view/index.js +17 -17
- package/unbundled/button.cjs +2 -2
- package/unbundled/button.js +2 -2
- package/unbundled/calendar-picker.template.cjs +4347 -9
- package/unbundled/calendar-picker.template.js +4345 -7
- package/unbundled/chunk.cjs +0 -22
- package/unbundled/definition13.cjs +1 -8
- package/unbundled/definition13.js +1 -8
- package/unbundled/definition14.cjs +2 -2
- package/unbundled/definition14.js +2 -2
- package/unbundled/definition2.cjs +1 -1
- package/unbundled/definition2.js +1 -1
- package/unbundled/definition21.cjs +1 -2
- package/unbundled/definition21.js +1 -2
- package/unbundled/definition22.cjs +7 -2
- package/unbundled/definition22.js +7 -2
- package/unbundled/definition24.cjs +98 -979
- package/unbundled/definition24.js +93 -974
- package/unbundled/definition25.cjs +37 -322
- package/unbundled/definition25.js +33 -318
- package/unbundled/definition26.cjs +317 -91
- package/unbundled/definition26.js +313 -87
- package/unbundled/definition27.cjs +94 -192
- package/unbundled/definition27.js +91 -183
- package/unbundled/definition28.cjs +387 -395
- package/unbundled/definition28.js +387 -395
- package/unbundled/definition29.cjs +189 -110
- package/unbundled/definition29.js +180 -107
- package/unbundled/definition30.cjs +520 -36
- package/unbundled/definition30.js +519 -35
- package/unbundled/definition32.cjs +477 -477
- package/unbundled/definition32.js +475 -475
- package/unbundled/definition33.cjs +87 -2
- package/unbundled/definition33.js +77 -4
- package/unbundled/definition35.cjs +2 -2
- package/unbundled/definition35.js +2 -2
- package/unbundled/definition36.cjs +1 -1
- package/unbundled/definition36.js +1 -1
- package/unbundled/definition37.cjs +6 -2
- package/unbundled/definition37.js +6 -2
- package/unbundled/definition38.cjs +7 -5
- package/unbundled/definition38.js +7 -5
- package/unbundled/definition39.cjs +1 -0
- package/unbundled/definition39.js +1 -0
- package/unbundled/definition42.cjs +22 -11
- package/unbundled/definition42.js +22 -11
- package/unbundled/definition49.cjs +3 -3
- package/unbundled/definition49.js +3 -3
- package/unbundled/definition56.cjs +437 -9506
- package/unbundled/definition56.js +340 -9415
- package/unbundled/definition57.cjs +5 -5
- package/unbundled/definition57.js +5 -5
- package/unbundled/definition58.cjs +4 -3
- package/unbundled/definition58.js +2 -1
- package/unbundled/definition59.cjs +4 -3
- package/unbundled/definition59.js +4 -3
- package/unbundled/definition62.cjs +2 -2
- package/unbundled/definition62.js +2 -2
- package/unbundled/definition64.cjs +1 -1
- package/unbundled/definition64.js +1 -1
- package/unbundled/definition71.cjs +2 -2
- package/unbundled/definition71.js +2 -2
- package/unbundled/definition72.cjs +1 -2
- package/unbundled/definition72.js +1 -2
- package/unbundled/definition75.cjs +3 -51711
- package/unbundled/definition75.js +1 -51711
- package/unbundled/listbox.cjs +1 -1
- package/unbundled/listbox.js +1 -1
- package/unbundled/localized.cjs +2 -2
- package/unbundled/localized.js +1 -1
- package/unbundled/picker-field.template.cjs +1 -1
- package/unbundled/picker-field.template.js +1 -1
- package/unbundled/slottable-request.cjs +2 -3168
- package/unbundled/slottable-request.js +3 -3097
- package/unbundled/time-selection-picker.template.cjs +1 -1
- package/unbundled/time-selection-picker.template.js +1 -1
- package/unbundled/vivid-element.cjs +1 -1
- package/unbundled/vivid-element.js +1 -1
- package/video-player/index.cjs +3 -3
- package/video-player/index.js +9 -9
- package/vivid.api.json +220 -282
- package/unbundled/chunk.js +0 -33
- package/unbundled/en-US.cjs +0 -447
- package/unbundled/en-US.js +0 -443
package/bundled/definition9.js
CHANGED
|
@@ -1,161 +1,68 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
var S = ":host(:focus-visible){outline:none}:host([disabled]){pointer-events:none}.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,.base.disabled{--_appearance-color-text:var(--vvd-color-neutral-300);--_appearance-color-fill:transparent;--_appearance-color-outline:transparent}.base:active:where(:not(.disabled,:disabled)),.base.active:where(:not(.disabled,:disabled)),.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.connotation-cta{--_connotation-color-primary:var(--vvd-menu-item-cta-primary,var(--vvd-color-cta-500));--_connotation-color-primary-text:var(--vvd-menu-item-cta-primary-text,var(--vvd-color-canvas));--_connotation-color-primary-increment:var(--vvd-menu-item-cta-primary-increment,var(--vvd-color-cta-600));--_connotation-color-firm:var(--vvd-menu-item-cta-firm,var(--vvd-color-cta-600));--_connotation-color-faint:var(--vvd-menu-item-cta-faint,var(--vvd-color-cta-50));--_connotation-color-soft:var(--vvd-menu-item-cta-soft,var(--vvd-color-cta-100));--_connotation-color-pale:var(--vvd-menu-item-cta-pale,var(--vvd-color-cta-300));--_connotation-color-dim:var(--vvd-menu-item-cta-dim,var(--vvd-color-cta-200))}.base:not(.connotation-cta){--_connotation-color-primary:var(--vvd-menu-item-accent-primary,var(--vvd-color-canvas-text));--_connotation-color-primary-text:var(--vvd-menu-item-accent-primary-text,var(--vvd-color-canvas));--_connotation-color-primary-increment:var(--vvd-menu-item-accent-primary-increment,var(--vvd-color-neutral-800));--_connotation-color-firm:var(--vvd-menu-item-accent-firm,var(--vvd-color-canvas-text));--_connotation-color-faint:var(--vvd-menu-item-accent-faint,var(--vvd-color-neutral-50));--_connotation-color-soft:var(--vvd-menu-item-accent-soft,var(--vvd-color-neutral-100));--_connotation-color-pale:var(--vvd-menu-item-accent-pale,var(--vvd-color-neutral-300));--_connotation-color-dim:var(--vvd-menu-item-accent-dim,var(--vvd-color-neutral-200))}.base{--_menu-item-padding-inline:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2))) / 2.5);box-sizing:border-box;background-color:var(--_appearance-color-fill);box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);border-radius:8px;align-items:center;inline-size:100%;display:flex}.base:not(.two-lines){min-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2)));padding-block:8px;padding-inline:var(--_menu-item-padding-inline);gap:12px}.base.two-lines{min-block-size:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2))) + calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 16)));padding-block:12px;padding-inline:var(--_menu-item-padding-inline);gap:16px}@supports (user-select:none){.base{user-select:none}}.base:not(.disabled){cursor:pointer}:host(:not([role=presentation]):focus-visible) .base{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}.icon{font-size:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2))) / 2);flex-shrink:0;line-height:1}.action,.decorative{place-content:center;display:flex}.action{color:var(--_appearance-color-text)}.base.trailing .action,.base.has-meta .action{order:2}:host(:not([check-appearance],[checked],[disabled])) .action{color:var(--vvd-color-neutral-500)}.base:not(.disabled) .decorative{color:var(--vvd-color-neutral-600)}.base.disabled .decorative{color:var(--vvd-color-neutral-200)}.base.has-meta .decorative{order:1}.chevron{order:3}.text{flex-direction:column;gap:4px;margin-inline-end:auto;display:flex;overflow:hidden}.text-primary,.text-secondary{font:var(--vvd-typography-base);-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.text-primary{font:var(--vvd-typography-base);-webkit-line-clamp:var(--text-primary-line-clamp,1)}.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);-webkit-line-clamp:var(--text-secondary-line-clamp,1)}.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)}:host([internal-part]) .text-primary{font:var(--_text-primary-custom-size,var--vvd-typography-base)}", C = {
|
|
12
|
-
menuitem: "menuitem",
|
|
13
|
-
menuitemcheckbox: "menuitemcheckbox",
|
|
14
|
-
menuitemradio: "menuitemradio",
|
|
15
|
-
presentation: "presentation"
|
|
16
|
-
}, w = class extends x(y(s)) {
|
|
17
|
-
expandedChanged() {
|
|
18
|
-
/* v8 ignore if -- @preserve */
|
|
19
|
-
this.$fastController.isConnected && (this.submenu && !this.expanded && this.submenu.collapseExpandedItem(), this.$emit("expanded-change", this, { bubbles: !1 }));
|
|
20
|
-
}
|
|
21
|
-
#e() {
|
|
22
|
-
this._isPresentational ? this.role === "menuitem" && (this.role = "presentation") : this.role === "presentation" && (this.role = C.menuitem);
|
|
23
|
-
}
|
|
24
|
-
_isPresentationalChanged() {
|
|
25
|
-
this.$fastController.isConnected && this.#e();
|
|
26
|
-
}
|
|
27
|
-
checkedChanged() {
|
|
28
|
-
this.$fastController.isConnected && this.$emit("change");
|
|
1
|
+
import { d as e, l as t, o as n, s as r, t as i } from "./vivid-element.js";
|
|
2
|
+
import { t as a } from "./decorate.js";
|
|
3
|
+
import { t as o } from "./class-names.js";
|
|
4
|
+
import { i as s, t as c } from "./definition8.js";
|
|
5
|
+
import { n as l, t as u } from "./anchored.js";
|
|
6
|
+
import { t as d } from "./dialog.js";
|
|
7
|
+
//#region src/lib/tooltip/tooltip.scss?inline
|
|
8
|
+
var f = ":host :host{display:var(--_popup-display,inline)}:host :host([slotted-anchor]){--_popup-display:contents}.control{pointer-events:none}.tooltip{width:var(--tooltip-inline-size,auto);box-sizing:border-box;color:var(--vvd-color-canvas-text);font:var(--vvd-typography-base-bold);max-inline-size:var(--tooltip-max-inline-size,30ch);padding:8px 12px}", p = class extends u(i) {
|
|
9
|
+
constructor(...e) {
|
|
10
|
+
super(...e), this.open = !1;
|
|
29
11
|
}
|
|
30
12
|
connectedCallback() {
|
|
31
|
-
super.connectedCallback(),
|
|
32
|
-
this._isPresentational = this._isPresentational ?? !0, this.#e();
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
slottedSubmenuChanged() {
|
|
36
|
-
this.submenu && (this.submenu.anchor = this, this.submenu.placement = "right-start", this.submenu.collapseExpandedItem = () => this.#t(), this.submenu._popupOffset = 5);
|
|
13
|
+
super.connectedCallback(), this.#a();
|
|
37
14
|
}
|
|
38
|
-
|
|
39
|
-
|
|
15
|
+
disconnectedCallback() {
|
|
16
|
+
super.disconnectedCallback(), this.#a();
|
|
40
17
|
}
|
|
41
|
-
|
|
42
|
-
|
|
18
|
+
_anchorElChanged(e, t) {
|
|
19
|
+
e && this.#t(e), t && this.#e(t);
|
|
43
20
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
if (!(this.disabled || this._isPresentational)) switch (this.controlType) {
|
|
47
|
-
case "checkbox":
|
|
48
|
-
this.checked = !this.checked;
|
|
49
|
-
break;
|
|
50
|
-
case "radio":
|
|
51
|
-
this.checked ||= !0;
|
|
52
|
-
break;
|
|
53
|
-
default:
|
|
54
|
-
this.submenu ? this.expanded = !0 : this.$emit("change");
|
|
55
|
-
break;
|
|
56
|
-
}
|
|
57
|
-
}, this.checkTrailing = !1, this.handleMenuItemKeyDown = (e) => {
|
|
58
|
-
if (e.defaultPrevented) return !1;
|
|
59
|
-
switch (e.key) {
|
|
60
|
-
case h:
|
|
61
|
-
case " ": return this.invoke(), this.disabled || this.#i(), !1;
|
|
62
|
-
case _: return this.submenu && (this.expanded = !0, this.#i()), !1;
|
|
63
|
-
case g: if (this.expanded) return this.#i(), this.expanded = !1, this.focus(), !1;
|
|
64
|
-
}
|
|
65
|
-
return !0;
|
|
66
|
-
}, this.addEventListener("expanded-change", this.#n);
|
|
21
|
+
#e(e) {
|
|
22
|
+
e.addEventListener("mouseover", this.#n), e.addEventListener("mouseout", this.#r), e.addEventListener("focusin", this.#n), e.addEventListener("focusout", this.#r), e.setAttribute("aria-haspopup", "true"), e.setAttribute("aria-expanded", String(this.open));
|
|
67
23
|
}
|
|
68
|
-
#t() {
|
|
69
|
-
this.
|
|
24
|
+
#t(e) {
|
|
25
|
+
e.removeEventListener("mouseover", this.#n), e.removeEventListener("mouseout", this.#r), e.removeEventListener("focusin", this.#n), e.removeEventListener("focusout", this.#r), e.removeAttribute("aria-haspopup"), e.removeAttribute("aria-expanded");
|
|
70
26
|
}
|
|
71
|
-
#n() {
|
|
72
|
-
this.
|
|
27
|
+
#n = () => {
|
|
28
|
+
this.open = !0, this.#i();
|
|
29
|
+
};
|
|
30
|
+
#r = () => {
|
|
31
|
+
this.open = !1, this.#i();
|
|
32
|
+
};
|
|
33
|
+
#i() {
|
|
34
|
+
this._anchorEl && this._anchorEl.setAttribute("aria-expanded", String(this.open));
|
|
73
35
|
}
|
|
74
|
-
#
|
|
75
|
-
|
|
76
|
-
return this.#r.has(e);
|
|
36
|
+
#a() {
|
|
37
|
+
document.removeEventListener("keydown", this.#o), this.open && this.isConnected && document.addEventListener("keydown", this.#o);
|
|
77
38
|
}
|
|
78
|
-
#
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
39
|
+
#o = (e) => {
|
|
40
|
+
/* v8 ignore else -- @preserve */
|
|
41
|
+
e.key === "Escape" && this.#r();
|
|
42
|
+
};
|
|
43
|
+
openChanged(e) {
|
|
44
|
+
e !== void 0 && this.#a();
|
|
84
45
|
}
|
|
85
46
|
};
|
|
86
|
-
|
|
87
|
-
deprecatedPropertyName: "role",
|
|
88
|
-
fromDeprecated: (e) => {
|
|
89
|
-
switch (e) {
|
|
90
|
-
case "menuitemcheckbox": return "checkbox";
|
|
91
|
-
case "menuitemradio": return "radio";
|
|
92
|
-
default: return;
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
toDeprecated: (e) => {
|
|
96
|
-
switch (e) {
|
|
97
|
-
case "checkbox": return "menuitemcheckbox";
|
|
98
|
-
case "radio": return "menuitemradio";
|
|
99
|
-
default: return "menuitem";
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}), r({ attribute: "control-type" })], w.prototype, "controlType", void 0), p([r({ mode: "boolean" })], w.prototype, "checked", void 0), p([r], w.prototype, "text", void 0), p([r({ attribute: "text-secondary" })], w.prototype, "textSecondary", void 0), p([r], w.prototype, "connotation", void 0), p([r({
|
|
103
|
-
mode: "boolean",
|
|
104
|
-
attribute: "check-trailing"
|
|
105
|
-
})], w.prototype, "checkTrailing", void 0), p([r({ attribute: "check-appearance" })], w.prototype, "checkedAppearance", void 0), p([t], w.prototype, "metaSlottedContent", void 0), p([t], w.prototype, "trailingMetaSlottedContent", void 0), p([t], w.prototype, "slottedSubmenu", void 0);
|
|
106
|
-
//#endregion
|
|
107
|
-
//#region src/lib/menu/name.ts
|
|
108
|
-
var T = "menu", E = (e) => e.checkedAppearance === "tick-only" ? e.checked ? "check-line" : "" : `${e.controlType === "checkbox" ? "checkbox" : "radio"}-${e.checked ? "checked" : "unchecked"}-2-line`, D = ({ connotation: e, disabled: t, checked: n, controlType: r, text: i, textSecondary: a, icon: o, metaSlottedContent: s, checkTrailing: c }) => m("base", [`connotation-${e}`, !!e], ["disabled", !!t], ["selected", !!(r && n)], ["trailing", !!(r && (c || o))], ["item-checkbox", r === "checkbox"], ["item-radio", r === "radio"], ["two-lines", !!i?.length && !!a?.length], ["has-meta", !!s?.length]);
|
|
109
|
-
function O(e) {
|
|
110
|
-
let t = e.tagFor(d);
|
|
111
|
-
return n`${c((e) => !!e.controlType, n`<span class="action"><${t} class="icon" name="${(e) => E(e)}"></${t}></span>`)}`;
|
|
112
|
-
}
|
|
113
|
-
function k() {
|
|
114
|
-
return n`${c((e) => e.text || e.textSecondary, n`<span class="text">
|
|
115
|
-
${c((e) => e.text, n`<span class="text-primary">${(e) => e.text}</span>`)}
|
|
116
|
-
${c((e) => e.textSecondary, n`<span class="text-secondary">${(e) => e.textSecondary}</span>`)}
|
|
117
|
-
</span>`)}`;
|
|
118
|
-
}
|
|
47
|
+
a([t], p.prototype, "text", void 0), a([t({ mode: "fromView" })], p.prototype, "placement", void 0), a([t({ mode: "boolean" })], p.prototype, "open", void 0);
|
|
119
48
|
//#endregion
|
|
120
|
-
//#region src/lib/
|
|
121
|
-
var
|
|
122
|
-
let
|
|
123
|
-
return
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
<slot name="meta" ${u("metaSlottedContent")}></slot>
|
|
139
|
-
${O(e)}
|
|
140
|
-
${c((e) => e.icon, n`<span class="decorative"
|
|
141
|
-
>${(e) => t(e.icon)}</span
|
|
142
|
-
>`)}
|
|
143
|
-
${k()}
|
|
144
|
-
<slot
|
|
145
|
-
name="trailing-meta"
|
|
146
|
-
${u("trailingMetaSlottedContent")}
|
|
147
|
-
></slot>
|
|
148
|
-
${c((e) => e.hasSubmenu, n`<${r} class="chevron" name="chevron-right-line"></${r}>`)}
|
|
149
|
-
</div>
|
|
150
|
-
<slot
|
|
151
|
-
name="submenu"
|
|
152
|
-
${u({
|
|
153
|
-
property: "slottedSubmenu",
|
|
154
|
-
filter: l(e.tagForNonDependency(T))
|
|
155
|
-
})}
|
|
156
|
-
></slot>
|
|
157
|
-
</template>
|
|
158
|
-
`;
|
|
159
|
-
}, [f], { styles: S }), j = o(A);
|
|
49
|
+
//#region src/lib/tooltip/tooltip.template.ts
|
|
50
|
+
var m = ({ open: e }) => o("control", ["open", !!e]), h = n("tooltip", p, (t) => {
|
|
51
|
+
let n = t.tagFor(s);
|
|
52
|
+
return e`
|
|
53
|
+
${l()}
|
|
54
|
+
<${n} class="${m}" arrow alternate
|
|
55
|
+
:placement=${(e) => e.placement}
|
|
56
|
+
:anchor="${(e) => e._anchorEl}"
|
|
57
|
+
:open="${(e) => e.open}"
|
|
58
|
+
@keydown="${(e, t) => {
|
|
59
|
+
e.open && d(t.event) && (e.open = !1);
|
|
60
|
+
}}"
|
|
61
|
+
exportparts="vvd-theme-alternate">
|
|
62
|
+
<div part="vvd-theme-alternate" class="tooltip" role="tooltip">
|
|
63
|
+
${(e) => e.text}
|
|
64
|
+
</div>
|
|
65
|
+
</${n}>`;
|
|
66
|
+
}, [c], { styles: f }), g = r(h);
|
|
160
67
|
//#endregion
|
|
161
|
-
export {
|
|
68
|
+
export { h as n, p as r, g as t };
|
package/bundled/divider.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`./vivid-element.cjs`),t=require(`./
|
|
1
|
+
const e=require(`./vivid-element.cjs`),t=require(`./enums.cjs`),n=require(`./decorate.cjs`),r=require(`./aria.cjs`),i=require(`./host-semantics.cjs`);var a={separator:`separator`,presentation:`presentation`},o=class extends i.t(e.t){constructor(...e){super(...e),this.role=a.separator,this.orientation=r.t.horizontal,this.appearance=t.t.Ghost}};n.t([e.l],o.prototype,`orientation`,void 0),n.t([e.l],o.prototype,`appearance`,void 0),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return o}});
|
package/bundled/divider.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { l as e, t } from "./vivid-element.js";
|
|
2
|
-
import { t as n } from "./
|
|
3
|
-
import { t as r } from "./
|
|
4
|
-
import { t as i } from "./
|
|
2
|
+
import { t as n } from "./enums.js";
|
|
3
|
+
import { t as r } from "./decorate.js";
|
|
4
|
+
import { t as i } from "./aria.js";
|
|
5
5
|
import { t as a } from "./host-semantics.js";
|
|
6
6
|
//#region src/lib/divider/divider.ts
|
|
7
7
|
var o = {
|
|
@@ -9,9 +9,9 @@ var o = {
|
|
|
9
9
|
presentation: "presentation"
|
|
10
10
|
}, s = class extends a(t) {
|
|
11
11
|
constructor(...e) {
|
|
12
|
-
super(...e), this.role = o.separator, this.orientation =
|
|
12
|
+
super(...e), this.role = o.separator, this.orientation = i.horizontal, this.appearance = n.Ghost;
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
|
-
|
|
15
|
+
r([e], s.prototype, "orientation", void 0), r([e], s.prototype, "appearance", void 0);
|
|
16
16
|
//#endregion
|
|
17
17
|
export { o as n, s as t };
|
package/bundled/listbox.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`./vivid-element.cjs`),t=require(`./decorate.cjs`),n=require(`./key-codes.cjs`),r=require(`./strings.cjs`),i=require(`./
|
|
1
|
+
const e=require(`./vivid-element.cjs`),t=require(`./decorate.cjs`),n=require(`./key-codes.cjs`),r=require(`./strings.cjs`),i=require(`./definition17.cjs`);function a(e,t){let n=e.length;for(;n--;)if(t(e[n],n,e))return n;return-1}var o=class t extends e.t{constructor(...e){super(...e),this._options=[],this.selectedIndex=-1,this.selectedOptions=[],this.shouldSkipFocus=!1,this.typeaheadBuffer=``,this.typeaheadExpired=!0,this.typeaheadTimeout=-1,this._activeDescendant=null}get firstSelectedOption(){return this.selectedOptions[0]??null}get length(){return this.options.length}get options(){return e.w.track(this,`options`),this._options}set options(t){let n=this._options;if(this._options=t,e.w.notify(this,`options`),this.$fastController.isConnected){let e=this._newDefaultSelectedIndex(n,t,this.selectedIndex);e!==null&&(this.selectedIndex=e)}}static{this.slottedOptionFilter=e=>i.i(e)&&!e.hidden}static{this.TYPE_AHEAD_TIMEOUT_MS=1e3}clickHandler(e){let t=e.target.closest(`option,[role=option],[data-vvd-component=option]`);if(t&&!t.disabled)return this.selectedIndex=this.options.indexOf(t),!0}focusAndScrollOptionIntoView(e=this.firstSelectedOption){this.contains(document.activeElement)&&e!==null&&(e.focus(),requestAnimationFrame(()=>{e.scrollIntoView({block:`nearest`})}))}focusinHandler(e){!this.shouldSkipFocus&&e.target===e.currentTarget&&(this.setSelectedOptions(),this.focusAndScrollOptionIntoView()),this.shouldSkipFocus=!1}getTypeaheadMatches(){let e=this.typeaheadBuffer.replace(/[.*+\-?^${}()|[\]\\]/g,`\\$&`),t=RegExp(`^${e}`,`gi`);return this.options.filter(e=>e.text.trim().match(t))}getNextSelectableIndex(e){let t=this.options.reduce((t,n,r)=>!t&&!n.disabled&&r>=e?n:t,null);return this.options.indexOf(t)}getPreviousSelectableIndex(e){let t=this.options.reduceRight((t,n,r)=>!t&&!n.disabled&&r<=e?n:t,null);return this.options.indexOf(t)}handleChange(e,n){switch(n){case`selected`:t.slottedOptionFilter(e)&&(this.selectedIndex=this.options.indexOf(e)),this.setSelectedOptions();break}}handleTypeAhead(e){this.typeaheadTimeout&&window.clearTimeout(this.typeaheadTimeout),this.typeaheadTimeout=window.setTimeout(()=>this.typeaheadExpired=!0,t.TYPE_AHEAD_TIMEOUT_MS),this.typeaheadBuffer=`${this.typeaheadExpired?``:this.typeaheadBuffer}${e}`}keydownHandler(e){if(this.disabled)return!0;this.shouldSkipFocus=!1;let t=e.key;switch(t){case n.s:e.shiftKey||(e.preventDefault(),this.selectFirstOption());break;case n.t:e.shiftKey||(e.preventDefault(),this.selectNextOption());break;case n.i:e.shiftKey||(e.preventDefault(),this.selectPreviousOption());break;case`End`:e.preventDefault(),this.selectLastOption();break;case`Tab`:return this.focusAndScrollOptionIntoView(),!0;case n.a:case n.o:return!0;case` `:if(this.typeaheadExpired)return!0;default:return t.length===1&&this.handleTypeAhead(`${t}`),!0}}mousedownHandler(e){return this.shouldSkipFocus=!this.contains(document.activeElement),!0}selectedIndexChanged(e,t){let n=this._validSelectedIndex(t);if(t!==n){this.selectedIndex=n;return}this.setSelectedOptions()}_validSelectedIndex(e){return e>this.options.length-1||e<-1?-1:e}selectedOptionsChanged(n,r){let i=r.filter(t.slottedOptionFilter);this.options.forEach(t=>{let n=e.w.getNotifier(t);n.unsubscribe(this,`selected`),t.selected=i.includes(t),n.subscribe(this,`selected`)})}selectFirstOption(){this.disabled||(this.selectedIndex=this.options.findIndex(e=>!e.disabled))}selectLastOption(){this.disabled||(this.selectedIndex=a(this.options,e=>!e.disabled))}selectNextOption(){if(!this.disabled&&this.selectedIndex<this.options.length-1){let e=this.getNextSelectableIndex(this.selectedIndex+1);e!==-1&&(this.selectedIndex=e)}}selectPreviousOption(){if(!this.disabled&&this.selectedIndex>0){let e=this.getPreviousSelectableIndex(this.selectedIndex-1);e!==-1&&(this.selectedIndex=e)}}_newDefaultSelectedIndex(e,t,n){for(let[n,r]of t.entries())if(this._isDefaultSelected(r)&&!e.includes(r))return n;return null}_isDefaultSelected(e){return e.defaultSelected}setSelectedOptions(){this.selectedOptions=this.selectedIndex===-1?[]:[this.options[this.selectedIndex]],this._activeDescendant=this.firstSelectedOption?.id??``,this.focusAndScrollOptionIntoView()}slottedOptionsChanged(e,t){this.options=t.reduce((e,t)=>(i.i(t)&&e.push(t),e),[]);let n=`${this.options.length}`;this.options.forEach((e,t)=>{e.id||=r.t(`option-`),e.ariaPosInSet=`${t+1}`,e.ariaSetSize=n})}typeaheadBufferChanged(e,t){if(this.$fastController.isConnected){let e=this.getTypeaheadMatches();if(e.length){let t=this.options.indexOf(e[0]);t>-1&&(this.selectedIndex=t)}this.typeaheadExpired=!1}}};t.t([e.l({mode:`boolean`})],o.prototype,`disabled`,void 0),t.t([e.T],o.prototype,`selectedIndex`,void 0),t.t([e.T],o.prototype,`selectedOptions`,void 0),t.t([e.T],o.prototype,`slottedOptions`,void 0),t.t([e.T],o.prototype,`typeaheadBuffer`,void 0),t.t([e.T],o.prototype,`_activeDescendant`,void 0),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return o}});
|
package/bundled/listbox.js
CHANGED
|
@@ -2,7 +2,7 @@ import { T as e, l as t, t as n, w as r } from "./vivid-element.js";
|
|
|
2
2
|
import { t as i } from "./decorate.js";
|
|
3
3
|
import { a, i as o, o as s, s as c, t as l } from "./key-codes.js";
|
|
4
4
|
import { t as u } from "./strings.js";
|
|
5
|
-
import { i as d } from "./
|
|
5
|
+
import { i as d } from "./definition17.js";
|
|
6
6
|
//#region ../../node_modules/.pnpm/@microsoft+fast-web-utilities@6.0.0/node_modules/@microsoft/fast-web-utilities/dist/array.js
|
|
7
7
|
function f(e, t) {
|
|
8
8
|
let n = e.length;
|
package/bundled/mixins.cjs
CHANGED
|
@@ -5,7 +5,7 @@ const e=require(`./localized.cjs`),t=require(`./vivid-element.cjs`),n=require(`.
|
|
|
5
5
|
</div>`;return t.d`${r.t(e=>!p(e.type),n)}
|
|
6
6
|
<span class="announcement" role="status" aria-live="polite">
|
|
7
7
|
${r.t(e=>p(e.type),n)}
|
|
8
|
-
</span>`},[o.t,a.n],{styles:l}),h=
|
|
8
|
+
</span>`},[o.t,a.n],{styles:l}),h=[];for(let e=0;e<256;++e)h.push((e+256).toString(16).slice(1));function g(e,t=0){return(h[e[t+0]]+h[e[t+1]]+h[e[t+2]]+h[e[t+3]]+`-`+h[e[t+4]]+h[e[t+5]]+`-`+h[e[t+6]]+h[e[t+7]]+`-`+h[e[t+8]]+h[e[t+9]]+`-`+h[e[t+10]]+h[e[t+11]]+h[e[t+12]]+h[e[t+13]]+h[e[t+14]]+h[e[t+15]]).toLowerCase()}var _,v=new Uint8Array(16);function y(){if(!_){if(typeof crypto>`u`||!crypto.getRandomValues)throw Error(`crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported`);_=crypto.getRandomValues.bind(crypto)}return _(v)}var b={randomUUID:typeof crypto<`u`&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function x(e,t,n){if(b.randomUUID&&!t&&!e)return b.randomUUID();e||={};let r=e.random??e.rng?.()??y();if(r.length<16)throw Error(`Random bytes length must be >= 16`);if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n||=0,n<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return g(r)}var S=()=>x(),C=class{constructor(e){this.source=null,this.templateBindingObserver=e.templateBinding.createObserver(this,e)}bind(e){this.source=e.source,this.context=e.context,this.controller=e,this.insertionPoint||(this.insertionPoint=document.createComment(``),this.source.appendChild(this.insertionPoint)),this.templateBindingObserver.bind(e),this.handleChange(this.source,this.templateBindingObserver)}handleChange(e,t){if(t===this.templateBindingObserver){let e=this.templateBindingObserver.bind(this.controller);this.instantiateTemplate(e)}}instantiateTemplate(e){this.view&&this.view.dispose(),this.view=e.create(),this.view.bind(this.source,this.context),this.view.insertBefore(this.insertionPoint)}},w=class{constructor(e){this.targetNodeId=``,this.templateBinding=e,this.dataBinding=e}createHTML(e){return t.g.comment(e(this))}createBehavior(){return new C(this)}};t.m.define(w);function T(e){return new w(n.t(e))}var E=e=>{class n extends e{get _feedbackDescribedBy(){return`feedback slotted-helper-text-feedback`}_internalFeedback(){let e=this._helperTextSlottedContent?.length?``:this.helperText,t=this.errorValidationMessage,n=this.successText;return n?{type:`success`,message:n}:t?{type:`error`,message:t}:e?{type:`helper`,message:e}:{type:`none`,message:``}}_slottedHelperTextFeedbackType(){return this._internalFeedback().type===`none`&&this._helperTextSlottedContent?.length?`helper`:`none`}_getFeedbackTemplate(e){let n=e.tagFor(u);return t.d`
|
|
9
9
|
<${n} id="feedback" :type="${e=>e._internalFeedback().type}">
|
|
10
10
|
${e=>e._internalFeedback().message}
|
|
11
11
|
</${n}>
|
|
@@ -15,9 +15,9 @@ const e=require(`./localized.cjs`),t=require(`./vivid-element.cjs`),n=require(`.
|
|
|
15
15
|
>
|
|
16
16
|
<slot name="helper-text" ${i.t(`_helperTextSlottedContent`)}></slot>
|
|
17
17
|
</${n}>
|
|
18
|
-
`}}return s.t([t.l({attribute:`helper-text`})],n.prototype,`helperText`,void 0),s.t([t.T],n.prototype,`_helperTextSlottedContent`,void 0),n},D=e=>{let n=()=>`vvd-feedback-${
|
|
18
|
+
`}}return s.t([t.l({attribute:`helper-text`})],n.prototype,`helperText`,void 0),s.t([t.T],n.prototype,`_helperTextSlottedContent`,void 0),n},D=e=>{let n=()=>`vvd-feedback-${S()}`,r=()=>`vvd-slotted-feedback-${S()}`;class a extends E(e){constructor(...e){super(...e),this._slottedHelperTextIds=[],this._feedbackId=n()}_helperTextSlottedContentChanged(e,t){for(let e of t)e.id||=r();this._slottedHelperTextIds=t.map(e=>e.id)}get _feedbackDescribedBy(){return[this._feedbackId,...this._slottedHelperTextIds].join(` `)}_getFeedbackTemplate(e){let n=e.tagFor(u);return t.d`
|
|
19
19
|
<slot name="_feedback"></slot>
|
|
20
|
-
${
|
|
20
|
+
${T(t.d`<${n}
|
|
21
21
|
slot="_feedback"
|
|
22
22
|
id="${e=>e._feedbackId}"
|
|
23
23
|
:type="${e=>e._internalFeedback().type}"
|
|
@@ -30,4 +30,4 @@ const e=require(`./localized.cjs`),t=require(`./vivid-element.cjs`),n=require(`.
|
|
|
30
30
|
${i.t(`_helperTextSlottedContent`)}
|
|
31
31
|
></slot>
|
|
32
32
|
</${n}>
|
|
33
|
-
`}}return s.t([t.T],a.prototype,`_slottedHelperTextIds`,void 0),a};Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return
|
|
33
|
+
`}}return s.t([t.T],a.prototype,`_slottedHelperTextIds`,void 0),a};Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return E}});
|
package/bundled/mixins.js
CHANGED
|
@@ -37,7 +37,39 @@ var b = (e) => e === "error", x = o("feedback-message", _, (e) => {
|
|
|
37
37
|
<span class="announcement" role="status" aria-live="polite">
|
|
38
38
|
${l((e) => b(e.type), t)}
|
|
39
39
|
</span>`;
|
|
40
|
-
}, [p, d], { styles: g }), S =
|
|
40
|
+
}, [p, d], { styles: g }), S = [];
|
|
41
|
+
for (let e = 0; e < 256; ++e) S.push((e + 256).toString(16).slice(1));
|
|
42
|
+
function C(e, t = 0) {
|
|
43
|
+
return (S[e[t + 0]] + S[e[t + 1]] + S[e[t + 2]] + S[e[t + 3]] + "-" + S[e[t + 4]] + S[e[t + 5]] + "-" + S[e[t + 6]] + S[e[t + 7]] + "-" + S[e[t + 8]] + S[e[t + 9]] + "-" + S[e[t + 10]] + S[e[t + 11]] + S[e[t + 12]] + S[e[t + 13]] + S[e[t + 14]] + S[e[t + 15]]).toLowerCase();
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
46
|
+
//#region ../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/rng.js
|
|
47
|
+
var w, T = new Uint8Array(16);
|
|
48
|
+
function E() {
|
|
49
|
+
if (!w) {
|
|
50
|
+
if (typeof crypto > "u" || !crypto.getRandomValues) throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
51
|
+
w = crypto.getRandomValues.bind(crypto);
|
|
52
|
+
}
|
|
53
|
+
return w(T);
|
|
54
|
+
}
|
|
55
|
+
var D = { randomUUID: typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto) };
|
|
56
|
+
//#endregion
|
|
57
|
+
//#region ../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.js
|
|
58
|
+
function O(e, t, n) {
|
|
59
|
+
if (D.randomUUID && !t && !e) return D.randomUUID();
|
|
60
|
+
e ||= {};
|
|
61
|
+
let r = e.random ?? e.rng?.() ?? E();
|
|
62
|
+
if (r.length < 16) throw Error("Random bytes length must be >= 16");
|
|
63
|
+
if (r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, t) {
|
|
64
|
+
if (n ||= 0, n < 0 || n + 16 > t.length) throw RangeError(`UUID byte range ${n}:${n + 15} is out of buffer bounds`);
|
|
65
|
+
for (let e = 0; e < 16; ++e) t[n + e] = r[e];
|
|
66
|
+
return t;
|
|
67
|
+
}
|
|
68
|
+
return C(r);
|
|
69
|
+
}
|
|
70
|
+
//#endregion
|
|
71
|
+
//#region src/shared/utils/randomId.ts
|
|
72
|
+
var k = () => O(), A = class {
|
|
41
73
|
constructor(e) {
|
|
42
74
|
this.source = null, this.templateBindingObserver = e.templateBinding.createObserver(this, e);
|
|
43
75
|
}
|
|
@@ -54,7 +86,7 @@ var b = (e) => e === "error", x = o("feedback-message", _, (e) => {
|
|
|
54
86
|
instantiateTemplate(e) {
|
|
55
87
|
this.view && this.view.dispose(), this.view = e.create(), this.view.bind(this.source, this.context), this.view.insertBefore(this.insertionPoint);
|
|
56
88
|
}
|
|
57
|
-
},
|
|
89
|
+
}, j = class {
|
|
58
90
|
constructor(e) {
|
|
59
91
|
this.targetNodeId = "", this.templateBinding = e, this.dataBinding = e;
|
|
60
92
|
}
|
|
@@ -62,48 +94,16 @@ var b = (e) => e === "error", x = o("feedback-message", _, (e) => {
|
|
|
62
94
|
return r.comment(e(this));
|
|
63
95
|
}
|
|
64
96
|
createBehavior() {
|
|
65
|
-
return new
|
|
97
|
+
return new A(this);
|
|
66
98
|
}
|
|
67
99
|
};
|
|
68
|
-
a.define(
|
|
69
|
-
function
|
|
70
|
-
return new
|
|
100
|
+
a.define(j);
|
|
101
|
+
function M(e) {
|
|
102
|
+
return new j(c(e));
|
|
71
103
|
}
|
|
72
104
|
//#endregion
|
|
73
|
-
//#region
|
|
74
|
-
var
|
|
75
|
-
for (let e = 0; e < 256; ++e) T.push((e + 256).toString(16).slice(1));
|
|
76
|
-
function E(e, t = 0) {
|
|
77
|
-
return (T[e[t + 0]] + T[e[t + 1]] + T[e[t + 2]] + T[e[t + 3]] + "-" + T[e[t + 4]] + T[e[t + 5]] + "-" + T[e[t + 6]] + T[e[t + 7]] + "-" + T[e[t + 8]] + T[e[t + 9]] + "-" + T[e[t + 10]] + T[e[t + 11]] + T[e[t + 12]] + T[e[t + 13]] + T[e[t + 14]] + T[e[t + 15]]).toLowerCase();
|
|
78
|
-
}
|
|
79
|
-
//#endregion
|
|
80
|
-
//#region ../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/rng.js
|
|
81
|
-
var D, O = new Uint8Array(16);
|
|
82
|
-
function k() {
|
|
83
|
-
if (!D) {
|
|
84
|
-
if (typeof crypto > "u" || !crypto.getRandomValues) throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
85
|
-
D = crypto.getRandomValues.bind(crypto);
|
|
86
|
-
}
|
|
87
|
-
return D(O);
|
|
88
|
-
}
|
|
89
|
-
var A = { randomUUID: typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto) };
|
|
90
|
-
//#endregion
|
|
91
|
-
//#region ../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.js
|
|
92
|
-
function j(e, t, n) {
|
|
93
|
-
if (A.randomUUID && !t && !e) return A.randomUUID();
|
|
94
|
-
e ||= {};
|
|
95
|
-
let r = e.random ?? e.rng?.() ?? k();
|
|
96
|
-
if (r.length < 16) throw Error("Random bytes length must be >= 16");
|
|
97
|
-
if (r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, t) {
|
|
98
|
-
if (n ||= 0, n < 0 || n + 16 > t.length) throw RangeError(`UUID byte range ${n}:${n + 15} is out of buffer bounds`);
|
|
99
|
-
for (let e = 0; e < 16; ++e) t[n + e] = r[e];
|
|
100
|
-
return t;
|
|
101
|
-
}
|
|
102
|
-
return E(r);
|
|
103
|
-
}
|
|
104
|
-
//#endregion
|
|
105
|
-
//#region src/shared/utils/randomId.ts
|
|
106
|
-
var M = () => j(), N = (e) => {
|
|
105
|
+
//#region src/shared/feedback/mixins.ts
|
|
106
|
+
var N = (e) => {
|
|
107
107
|
class r extends e {
|
|
108
108
|
get _feedbackDescribedBy() {
|
|
109
109
|
return "feedback slotted-helper-text-feedback";
|
|
@@ -144,7 +144,7 @@ var M = () => j(), N = (e) => {
|
|
|
144
144
|
}
|
|
145
145
|
return m([i({ attribute: "helper-text" })], r.prototype, "helperText", void 0), m([t], r.prototype, "_helperTextSlottedContent", void 0), r;
|
|
146
146
|
}, P = (e) => {
|
|
147
|
-
let r = () => `vvd-feedback-${
|
|
147
|
+
let r = () => `vvd-feedback-${k()}`, i = () => `vvd-slotted-feedback-${k()}`;
|
|
148
148
|
class a extends N(e) {
|
|
149
149
|
constructor(...e) {
|
|
150
150
|
super(...e), this._slottedHelperTextIds = [], this._feedbackId = r();
|
|
@@ -162,7 +162,7 @@ var M = () => j(), N = (e) => {
|
|
|
162
162
|
let t = e.tagFor(_);
|
|
163
163
|
return n`
|
|
164
164
|
<slot name="_feedback"></slot>
|
|
165
|
-
${
|
|
165
|
+
${M(n`<${t}
|
|
166
166
|
slot="_feedback"
|
|
167
167
|
id="${(e) => e._feedbackId}"
|
|
168
168
|
:type="${(e) => e._internalFeedback().type}"
|
|
@@ -181,4 +181,4 @@ var M = () => j(), N = (e) => {
|
|
|
181
181
|
return m([t], a.prototype, "_slottedHelperTextIds", void 0), a;
|
|
182
182
|
};
|
|
183
183
|
//#endregion
|
|
184
|
-
export { x as a,
|
|
184
|
+
export { x as a, k as i, P as n, M as r, N as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const e=require(`./localized.cjs`),t=require(`./vivid-element.cjs`),n=require(`./ref.cjs`),r=require(`./slotted.cjs`),i=require(`./decorate.cjs`),a=require(`./
|
|
1
|
+
const e=require(`./localized.cjs`),t=require(`./vivid-element.cjs`),n=require(`./ref.cjs`),r=require(`./slotted.cjs`),i=require(`./decorate.cjs`),a=require(`./form-element.cjs`),o=require(`./with-error-text.cjs`),s=require(`./with-contextual-help.cjs`),c=require(`./trapped-focus.cjs`),l=require(`./class-names.cjs`),u=require(`./form-associated.cjs`),d=require(`./definition6.cjs`),f=require(`./definition8.cjs`),p=require(`./dialog.cjs`),m=require(`./mixins.cjs`),h=require(`./definition12.cjs`);var g=`:host{display:inline-block}.base{inline-size:100%;display:inline-block}.control{inline-size:100%}.dialog{flex-direction:column;display:inline-flex}.dialog--padded{gap:12px;padding:12px}.dialog .footer{justify-content:flex-end;align-items:center;gap:8px;padding:8px;display:flex}.dialog .footer--with-separator{border-top:1px solid var(--vvd-color-neutral-200)}`,_=class extends s.t(m.t(o.t(a.t(c.t(e.t(u.n(t.t))))))){readOnlyChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.readOnly=this.readOnly,this.validate())}constructor(){super(),this.readOnly=!1,this.proxy=document.createElement(`input`),this._popupOpen=!1,this._presentationValue=``,this.value=``}connectedCallback(){super.connectedCallback(),document.addEventListener(`click`,this.#o),this.addEventListener(`focusin`,this.#e),this.addEventListener(`focusout`,this.#t),this.#i()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(`click`,this.#o),this.removeEventListener(`focusin`,this.#e),this.removeEventListener(`focusout`,this.#t),this.#a()}#e=()=>{this.$emit(`focus`,void 0,{bubbles:!1})};#t=()=>{this.$emit(`blur`,void 0,{bubbles:!1})};validate(){this.proxy&&this.proxy.setCustomValidity(this._getCustomValidationError()??``),super.validate(this._textFieldEl?.querySelector(`input`)??void 0)}#n={handleChange:()=>{this._updatePresentationValue()}};#r;#i(){this.#r=t.w.binding(()=>this.locale,this.#n),this.#r.observe(this,t.C.default)}#a(){this.#r.dispose()}#o=e=>{if(!this._popupOpen)return;let t=e.composedPath();[this._dialogEl,this._pickerButtonEl].some(e=>t.includes(e))||this._closePopup(!1)};#s(){this.readOnly||(this._popupOpen=!0)}_closePopup(e=!0){this._popupOpen=!1,e&&this._textFieldEl.focus()}_onBaseKeyDown(e){return this._popupOpen&&p.t(e)?(this._closePopup(),!1):!this._trappedFocus(e,()=>this._focusableElsWithinDialog())}_presentationValueChanged(){this.dirtyValue=!0,this.validate()}_onTextFieldInput(e){this._presentationValue=e.currentTarget.value}_onPickerButtonClick(){this._popupOpen?this._closePopup():this.#s()}_onOkClick(){this._closePopup()}_onClearClick(){this.$emit(`clear-click`)}};i.t([t.l({attribute:`readonly`,mode:`boolean`})],_.prototype,`readOnly`,void 0),i.t([t.T],_.prototype,`_popupOpen`,void 0),i.t([t.T],_.prototype,`_presentationValue`,void 0);var v=(e,i,{withSeparator:a,padded:o})=>{let s=e.tagFor(f.i),c=e.tagFor(h.r),u=e.tagFor(d.i);return t.d`
|
|
2
2
|
<div class='base' @keydown='${(e,{event:t})=>e._onBaseKeyDown(t)}'>
|
|
3
|
-
<${
|
|
3
|
+
<${c} id='text-field'
|
|
4
4
|
${n.t(`_textFieldEl`)}
|
|
5
5
|
class='control'
|
|
6
6
|
label='${e=>e.label}'
|
|
@@ -35,16 +35,16 @@ const e=require(`./localized.cjs`),t=require(`./vivid-element.cjs`),n=require(`.
|
|
|
35
35
|
aria-label='${e=>e._pickerButtonLabel}'
|
|
36
36
|
@click='${e=>e._onPickerButtonClick()}'
|
|
37
37
|
></${u}>
|
|
38
|
-
</${
|
|
39
|
-
<${
|
|
38
|
+
</${c}>
|
|
39
|
+
<${s}
|
|
40
40
|
?open='${e=>e._popupOpen}'
|
|
41
41
|
:anchor='${e=>e._textFieldEl}'
|
|
42
42
|
offset='${e=>e._helperTextSlottedContent?.length||e.helperText||e.errorValidationMessage?8:null}'
|
|
43
43
|
placement='bottom-start'
|
|
44
44
|
class='popup'>
|
|
45
|
-
<div class="${()=>
|
|
45
|
+
<div class="${()=>l.t(`dialog`,[`dialog--padded`,o])}" role='dialog' ${n.t(`_dialogEl`)} aria-modal='true' aria-label='${e=>e._dialogLabel}'>
|
|
46
46
|
${()=>i}
|
|
47
|
-
<div class="${()=>
|
|
47
|
+
<div class="${()=>l.t(`footer`,[`footer--with-separator`,a])}">
|
|
48
48
|
<${u}
|
|
49
49
|
id='clear-button'
|
|
50
50
|
tabindex='3'
|
|
@@ -63,5 +63,5 @@ const e=require(`./localized.cjs`),t=require(`./vivid-element.cjs`),n=require(`.
|
|
|
63
63
|
></${u}>
|
|
64
64
|
</div>
|
|
65
65
|
</div>
|
|
66
|
-
</${
|
|
66
|
+
</${s}>
|
|
67
67
|
</div>`};Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return v}});
|
|
@@ -3,19 +3,19 @@ import { C as t, T as n, d as r, l as i, t as a, w as o } from "./vivid-element.
|
|
|
3
3
|
import { t as s } from "./ref.js";
|
|
4
4
|
import { t as c } from "./slotted.js";
|
|
5
5
|
import { t as l } from "./decorate.js";
|
|
6
|
-
import { t as u } from "./
|
|
7
|
-
import {
|
|
8
|
-
import { t as f } from "./
|
|
9
|
-
import { t as p } from "./
|
|
10
|
-
import { t as m } from "./
|
|
11
|
-
import {
|
|
6
|
+
import { t as u } from "./form-element.js";
|
|
7
|
+
import { t as d } from "./with-error-text.js";
|
|
8
|
+
import { t as f } from "./with-contextual-help.js";
|
|
9
|
+
import { t as p } from "./trapped-focus.js";
|
|
10
|
+
import { t as m } from "./class-names.js";
|
|
11
|
+
import { n as h } from "./form-associated.js";
|
|
12
12
|
import { i as g } from "./definition6.js";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
13
|
+
import { i as _ } from "./definition8.js";
|
|
14
|
+
import { t as v } from "./dialog.js";
|
|
15
15
|
import { t as y } from "./mixins.js";
|
|
16
|
-
import { r as b } from "./
|
|
16
|
+
import { r as b } from "./definition12.js";
|
|
17
17
|
//#region src/shared/picker-field/picker-field.scss?inline
|
|
18
|
-
var x = ":host{display:inline-block}.base{inline-size:100%;display:inline-block}.control{inline-size:100%}.dialog{flex-direction:column;display:inline-flex}.dialog--padded{gap:12px;padding:12px}.dialog .footer{justify-content:flex-end;align-items:center;gap:8px;padding:8px;display:flex}.dialog .footer--with-separator{border-top:1px solid var(--vvd-color-neutral-200)}", S = class extends
|
|
18
|
+
var x = ":host{display:inline-block}.base{inline-size:100%;display:inline-block}.control{inline-size:100%}.dialog{flex-direction:column;display:inline-flex}.dialog--padded{gap:12px;padding:12px}.dialog .footer{justify-content:flex-end;align-items:center;gap:8px;padding:8px;display:flex}.dialog .footer--with-separator{border-top:1px solid var(--vvd-color-neutral-200)}", S = class extends f(y(d(u(p(e(h(a))))))) {
|
|
19
19
|
readOnlyChanged() {
|
|
20
20
|
this.proxy instanceof HTMLInputElement && (this.proxy.readOnly = this.readOnly, this.validate());
|
|
21
21
|
}
|
|
@@ -60,7 +60,7 @@ var x = ":host{display:inline-block}.base{inline-size:100%;display:inline-block}
|
|
|
60
60
|
this._popupOpen = !1, e && this._textFieldEl.focus();
|
|
61
61
|
}
|
|
62
62
|
_onBaseKeyDown(e) {
|
|
63
|
-
return this._popupOpen &&
|
|
63
|
+
return this._popupOpen && v(e) ? (this._closePopup(), !1) : !this._trappedFocus(e, () => this._focusableElsWithinDialog());
|
|
64
64
|
}
|
|
65
65
|
_presentationValueChanged() {
|
|
66
66
|
this.dirtyValue = !0, this.validate();
|
|
@@ -85,7 +85,7 @@ l([i({
|
|
|
85
85
|
//#endregion
|
|
86
86
|
//#region src/shared/picker-field/picker-field.template.ts
|
|
87
87
|
var C = (e, t, { withSeparator: n, padded: i }) => {
|
|
88
|
-
let a = e.tagFor(
|
|
88
|
+
let a = e.tagFor(_), o = e.tagFor(b), l = e.tagFor(g);
|
|
89
89
|
return r`
|
|
90
90
|
<div class='base' @keydown='${(e, { event: t }) => e._onBaseKeyDown(t)}'>
|
|
91
91
|
<${o} id='text-field'
|
|
@@ -130,9 +130,9 @@ var C = (e, t, { withSeparator: n, padded: i }) => {
|
|
|
130
130
|
offset='${(e) => e._helperTextSlottedContent?.length || e.helperText || e.errorValidationMessage ? 8 : null}'
|
|
131
131
|
placement='bottom-start'
|
|
132
132
|
class='popup'>
|
|
133
|
-
<div class="${() =>
|
|
133
|
+
<div class="${() => m("dialog", ["dialog--padded", i])}" role='dialog' ${s("_dialogEl")} aria-modal='true' aria-label='${(e) => e._dialogLabel}'>
|
|
134
134
|
${() => t}
|
|
135
|
-
<div class="${() =>
|
|
135
|
+
<div class="${() => m("footer", ["footer--with-separator", n])}">
|
|
136
136
|
<${l}
|
|
137
137
|
id='clear-button'
|
|
138
138
|
tabindex='3'
|