@vonage/vivid 5.2.0 → 5.4.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-item/definition.cjs +2 -1
- package/accordion-item/definition.js +3 -2
- package/alert/definition.cjs +1 -1
- package/alert/definition.js +2 -2
- package/alert/index.cjs +1 -1
- package/alert/index.js +1 -1
- package/audio-player/definition.cjs +4 -2
- package/audio-player/definition.js +4 -2
- package/audio-player/index.cjs +5 -3
- package/audio-player/index.js +5 -3
- package/badge/definition.js +1 -1
- package/badge/index.cjs +2 -2
- package/badge/index.js +4 -4
- package/banner/definition.js +1 -1
- package/banner/index.cjs +3 -3
- package/banner/index.js +6 -6
- package/breadcrumb-item/index.cjs +1 -1
- package/breadcrumb-item/index.js +1 -1
- package/bundled/affix.cjs +7 -7
- package/bundled/affix.js +5 -5
- package/bundled/anchored.cjs +1 -1
- package/bundled/anchored.js +6 -6
- package/bundled/attribute-binding-behaviour.cjs +1 -1
- package/bundled/attribute-binding-behaviour.js +15 -13
- package/bundled/base-color-picker.cjs +13 -0
- package/bundled/base-color-picker.js +194 -0
- package/bundled/button.cjs +1 -1
- package/bundled/button.js +2 -2
- package/bundled/calendar-picker.template.cjs +7 -7
- package/bundled/calendar-picker.template.js +118 -118
- package/bundled/char-count.cjs +1 -1
- package/bundled/char-count.js +1 -1
- package/bundled/children.cjs +1 -1
- package/bundled/children.js +28 -20
- package/bundled/definition.cjs +3 -3
- package/bundled/definition.js +38 -38
- package/bundled/definition10.cjs +72 -18
- package/bundled/definition10.js +351 -65
- package/bundled/definition11.cjs +19 -10
- package/bundled/definition11.js +217 -36
- package/bundled/definition12.cjs +10 -1
- package/bundled/definition12.js +38 -14
- package/bundled/definition13.cjs +1 -73
- package/bundled/definition13.js +15 -354
- package/bundled/definition15.cjs +1 -1
- package/bundled/definition15.js +1 -1
- package/bundled/definition16.cjs +2 -2
- package/bundled/definition16.js +8 -8
- package/bundled/definition17.cjs +7 -7
- package/bundled/definition17.js +17 -17
- package/bundled/definition19.cjs +23 -24
- package/bundled/definition19.js +151 -163
- package/bundled/definition2.cjs +9 -5
- package/bundled/definition2.js +21 -17
- package/bundled/definition22.cjs +9 -9
- package/bundled/definition22.js +31 -31
- package/bundled/definition3.cjs +1 -1
- package/bundled/definition3.js +1 -1
- package/bundled/definition6.cjs +3 -3
- package/bundled/definition6.js +28 -28
- package/bundled/definition7.cjs +1 -1
- package/bundled/definition7.js +6 -6
- package/bundled/definition8.cjs +2 -2
- package/bundled/definition8.js +4 -4
- package/bundled/definition9.cjs +5 -5
- package/bundled/definition9.js +394 -392
- package/bundled/delegates-aria.cjs +1 -1
- package/bundled/delegates-aria.js +59 -46
- package/bundled/form-associated.cjs +1 -1
- package/bundled/form-associated.js +3 -3
- package/bundled/host-semantics.cjs +1 -1
- package/bundled/host-semantics.js +48 -34
- package/bundled/listbox.cjs +1 -1
- package/bundled/listbox.js +82 -102
- package/bundled/localized.cjs +1 -1
- package/bundled/localized.js +51 -36
- package/bundled/mixins.cjs +18 -18
- package/bundled/mixins.js +99 -93
- package/bundled/normalize.cjs +1 -0
- package/bundled/normalize.js +7 -0
- package/bundled/picker-field.template.cjs +1 -1
- package/bundled/picker-field.template.js +4 -4
- package/bundled/ref.cjs +1 -1
- package/bundled/ref.js +8 -25
- package/bundled/repeat.cjs +1 -1
- package/bundled/repeat.js +459 -233
- package/bundled/slider.template.cjs +1 -1
- package/bundled/slider.template.js +2 -2
- package/bundled/slotted.cjs +1 -1
- package/bundled/slotted.js +62 -45
- package/bundled/time-selection-picker.template.cjs +1 -1
- package/bundled/time-selection-picker.template.js +5 -5
- package/bundled/vivid-element.cjs +5 -1
- package/bundled/vivid-element.js +2159 -1162
- package/bundled/when.cjs +1 -1
- package/bundled/when.js +8 -7
- package/calendar/definition.cjs +1 -1
- package/calendar/definition.js +2 -2
- package/calendar/index.cjs +1 -1
- package/calendar/index.js +15 -15
- package/calendar-event/index.cjs +1 -1
- package/calendar-event/index.js +1 -1
- package/card/definition.cjs +11 -3
- package/card/definition.js +11 -3
- package/card/index.cjs +19 -11
- package/card/index.js +35 -27
- package/color-picker/definition.cjs +1079 -0
- package/color-picker/definition.js +1073 -0
- package/color-picker/index.cjs +127 -0
- package/color-picker/index.js +726 -0
- package/combobox/definition.cjs +8 -28
- package/combobox/definition.js +10 -30
- package/combobox/index.cjs +7 -7
- package/combobox/index.js +60 -74
- package/contextual-help/index.cjs +1 -1
- package/contextual-help/index.js +1 -1
- package/custom-elements.json +1670 -163
- package/data-grid/definition.cjs +862 -27
- package/data-grid/definition.js +863 -28
- package/data-grid/index.cjs +25 -25
- package/data-grid/index.js +175 -168
- package/date-picker/definition.cjs +1 -1
- package/date-picker/definition.js +1 -1
- package/date-picker/index.cjs +1 -1
- package/date-picker/index.js +2 -2
- package/date-range-picker/definition.cjs +1 -1
- package/date-range-picker/definition.js +1 -1
- package/date-range-picker/index.cjs +1 -1
- package/date-range-picker/index.js +2 -2
- package/date-time-picker/definition.cjs +1 -1
- package/date-time-picker/definition.js +1 -1
- package/date-time-picker/index.cjs +1 -1
- package/date-time-picker/index.js +2 -2
- package/dial-pad/definition.cjs +4 -0
- package/dial-pad/definition.js +4 -0
- package/dial-pad/index.cjs +3 -3
- package/dial-pad/index.js +42 -39
- package/dialog/definition.cjs +6 -3
- package/dialog/definition.js +6 -3
- package/dialog/index.cjs +22 -19
- package/dialog/index.js +48 -45
- package/elevation/definition.cjs +1 -1
- package/elevation/definition.js +1 -1
- package/empty-state/definition.cjs +7 -2
- package/empty-state/definition.js +7 -2
- package/empty-state/index.cjs +10 -5
- package/empty-state/index.js +18 -13
- package/fab/definition.js +1 -1
- package/fab/index.cjs +2 -2
- package/fab/index.js +4 -4
- package/file-picker/definition.cjs +2 -2
- package/file-picker/definition.js +3 -3
- package/file-picker/index.cjs +1 -1
- package/file-picker/index.js +4 -4
- package/header/definition.cjs +1 -1
- package/header/definition.js +1 -1
- package/icon/definition.cjs +10 -6
- package/icon/definition.js +10 -6
- package/index.cjs +7 -4
- package/index.js +3 -3
- package/lib/accordion/accordion.d.ts +1 -1
- package/lib/accordion/definition.d.ts +1 -1
- package/lib/accordion-item/accordion-item.d.ts +2 -2
- package/lib/action-group/action-group.d.ts +2 -2
- package/lib/alert/alert.d.ts +4 -4
- package/lib/audio-player/audio-player.d.ts +3 -3
- package/lib/avatar/avatar.d.ts +2 -2
- package/lib/badge/badge.d.ts +2 -2
- package/lib/banner/banner.d.ts +6 -6
- package/lib/breadcrumb/breadcrumb.d.ts +2 -2
- package/lib/breadcrumb-item/breadcrumb-item.d.ts +2 -2
- package/lib/button/button.d.ts +6 -6
- package/lib/button/button.template.d.ts +2 -1
- package/lib/calendar/calendar.d.ts +1 -1
- package/lib/calendar-event/calendar-event.d.ts +2 -2
- package/lib/card/card.d.ts +2 -2
- package/lib/checkbox/checkbox.d.ts +12 -12
- package/lib/color-picker/color-picker.d.ts +2420 -0
- package/lib/color-picker/color-picker.template.d.ts +3 -0
- package/lib/color-picker/definition.d.ts +4 -0
- package/lib/color-picker/locale.d.ts +9 -0
- package/lib/combobox/combobox.d.ts +15 -14
- package/lib/combobox/combobox.options.d.ts +1 -1
- package/lib/components.d.ts +1 -0
- package/lib/data-grid/data-grid-cell.d.ts +4 -4
- package/lib/data-grid/data-grid-row.d.ts +3 -4
- package/lib/data-grid/data-grid.d.ts +1 -2
- package/lib/date-picker/date-picker.d.ts +54 -54
- package/lib/date-range-picker/date-range-picker.d.ts +28 -28
- package/lib/date-time-picker/date-time-picker.d.ts +56 -56
- package/lib/dial-pad/dial-pad.d.ts +3 -2
- package/lib/dialog/dialog.d.ts +4 -4
- package/lib/divider/divider.d.ts +3 -3
- package/lib/fab/fab.d.ts +2 -2
- package/lib/file-picker/file-picker.d.ts +14 -14
- package/lib/header/header.d.ts +2 -2
- package/lib/menu/menu.d.ts +4 -4
- package/lib/menu-item/menu-item-role.d.ts +1 -1
- package/lib/menu-item/menu-item.d.ts +4 -4
- package/lib/nav/nav.d.ts +2 -2
- package/lib/nav-disclosure/nav-disclosure.d.ts +4 -4
- package/lib/nav-item/nav-item.d.ts +4 -4
- package/lib/note/note.d.ts +2 -2
- package/lib/number-field/number-field.d.ts +18 -18
- package/lib/option/option.d.ts +4 -4
- package/lib/pagination/pagination.d.ts +2 -2
- package/lib/popup/popup.d.ts +1 -1
- package/lib/progress/progress.d.ts +2 -2
- package/lib/progress-ring/progress-ring.d.ts +2 -2
- package/lib/radio/radio.d.ts +6 -6
- package/lib/radio-group/radio-group.d.ts +2 -2
- package/lib/range-slider/range-slider.d.ts +6 -6
- package/lib/rich-text-editor/menubar/menubar.d.ts +2 -2
- package/lib/rich-text-editor/rich-text-editor.d.ts +2 -2
- package/lib/searchable-select/locale.d.ts +4 -0
- package/lib/searchable-select/option-tag.d.ts +2 -2
- package/lib/searchable-select/searchable-select.d.ts +21 -18
- package/lib/select/select.d.ts +19 -17
- package/lib/selectable-box/selectable-box.d.ts +2 -2
- package/lib/simple-color-picker/locale.d.ts +0 -1
- package/lib/simple-color-picker/simple-color-picker.d.ts +47 -821
- package/lib/slider/slider.d.ts +7 -7
- package/lib/split-button/split-button.d.ts +6 -6
- package/lib/switch/switch.d.ts +4 -4
- package/lib/tab/tab.d.ts +6 -6
- package/lib/tab-panel/tab-panel.d.ts +2 -2
- package/lib/tabs/tabs.d.ts +2 -2
- package/lib/tag/tag.d.ts +6 -6
- package/lib/tag-group/tag-group.d.ts +2 -2
- package/lib/tag-name-map.d.ts +2 -1
- package/lib/text-area/text-area.d.ts +17 -17
- package/lib/text-field/text-field.d.ts +19 -19
- package/lib/time-picker/time-picker.d.ts +28 -28
- package/lib/toggletip/toggletip.d.ts +4 -4
- package/lib/tooltip/tooltip.d.ts +2 -2
- package/lib/tree-item/tree-item.d.ts +4 -4
- package/lib/tree-view/tree-view.d.ts +2 -2
- package/lib/video-player/video-player.d.ts +2 -2
- package/locales/de-DE.cjs +17 -2
- package/locales/de-DE.js +17 -2
- package/locales/en-GB.cjs +17 -2
- package/locales/en-GB.js +17 -2
- package/locales/en-US.cjs +17 -2
- package/locales/en-US.js +17 -2
- package/locales/ja-JP.cjs +17 -2
- package/locales/ja-JP.js +17 -2
- package/locales/zh-CN.cjs +17 -2
- package/locales/zh-CN.js +17 -2
- package/menu/definition.cjs +6 -6
- package/menu/definition.js +7 -7
- package/nav-disclosure/definition.js +1 -1
- package/nav-item/definition.js +1 -1
- package/note/definition.js +1 -1
- package/note/index.cjs +2 -2
- package/note/index.js +4 -4
- package/number-field/definition.cjs +1 -1
- package/number-field/definition.js +3 -3
- package/number-field/index.cjs +5 -5
- package/number-field/index.js +21 -21
- package/option/definition.cjs +6 -77
- package/option/definition.js +3 -78
- package/option/index.cjs +1 -1
- package/option/index.js +1 -1
- package/package.json +34 -8
- package/pagination/definition.cjs +2 -1
- package/pagination/definition.js +2 -1
- package/pagination/index.cjs +12 -12
- package/pagination/index.js +59 -59
- package/popup/definition.cjs +2 -2
- package/popup/definition.js +2 -2
- package/progress/index.cjs +1 -1
- package/progress/index.js +1 -1
- package/radio/definition.cjs +9 -9
- package/radio/definition.js +10 -10
- package/radio-group/definition.cjs +2 -1
- package/radio-group/definition.js +2 -1
- package/radio-group/index.cjs +5 -5
- package/radio-group/index.js +80 -77
- package/range-slider/definition.cjs +1 -1
- package/range-slider/definition.js +1 -1
- package/range-slider/index.cjs +1 -1
- package/range-slider/index.js +1 -1
- package/rich-text-editor/definition.cjs +3 -4
- package/rich-text-editor/definition.js +3 -4
- package/rich-text-editor/index.cjs +27 -27
- package/rich-text-editor/index.js +1208 -1198
- package/searchable-select/definition.cjs +106 -14
- package/searchable-select/definition.js +107 -15
- package/searchable-select/index.cjs +81 -69
- package/searchable-select/index.js +362 -276
- package/select/definition.cjs +25 -42
- package/select/definition.js +26 -43
- package/selectable-box/definition.cjs +1 -1
- package/selectable-box/definition.js +1 -1
- package/selectable-box/index.cjs +3 -3
- package/selectable-box/index.js +20 -20
- package/shared/aria/aria-change-subscription.d.ts +0 -1
- package/shared/aria/aria-mixin.d.ts +3 -3
- package/shared/aria/delegate-aria-behavior.d.ts +5 -10
- package/shared/aria/delegates-aria.d.ts +3 -3
- package/shared/aria/host-semantics-behavior.d.ts +5 -8
- package/shared/aria/host-semantics.d.ts +3 -3
- package/shared/color-picker/base-color-picker.d.ts +436 -0
- package/shared/color-picker/index.d.ts +1 -0
- package/shared/color-picker/locale.d.ts +3 -0
- package/shared/color-picker/utils.d.ts +1 -0
- package/shared/deprecation/replaced-props.d.ts +317 -2
- package/shared/design-system/defineVividComponent.d.ts +2 -2
- package/shared/feedback/feedback-message.d.ts +2 -2
- package/shared/feedback/mixins.d.ts +4 -4
- package/shared/foundation/button/button.d.ts +4 -4
- package/shared/foundation/form-associated/form-associated.d.ts +4 -4
- package/shared/foundation/listbox/listbox.d.ts +4 -0
- package/shared/foundation/vivid-element/vivid-element.d.ts +335 -8
- package/shared/localization/Locale.d.ts +4 -0
- package/shared/patterns/affix.d.ts +4 -4
- package/shared/patterns/anchored.d.ts +4 -4
- package/shared/patterns/char-count/char-count.d.ts +2 -2
- package/shared/patterns/form-elements/form-element.d.ts +4 -4
- package/shared/patterns/form-elements/with-contextual-help.d.ts +6 -6
- package/shared/patterns/form-elements/with-error-text.d.ts +6 -6
- package/shared/patterns/form-elements/with-success-text.d.ts +2 -2
- package/shared/patterns/linkable.d.ts +2 -2
- package/shared/patterns/localized.d.ts +2 -2
- package/shared/patterns/trapped-focus.d.ts +2 -2
- package/shared/picker-field/mixins/calendar-picker.d.ts +14 -14
- package/shared/picker-field/mixins/calendar-picker.template.d.ts +14 -14
- package/shared/picker-field/mixins/inline-time-picker/inline-time-picker.d.ts +2 -2
- package/shared/picker-field/mixins/min-max-calendar-picker.d.ts +28 -28
- package/shared/picker-field/mixins/single-date-picker.d.ts +40 -40
- package/shared/picker-field/mixins/single-value-picker.d.ts +12 -12
- package/shared/picker-field/mixins/time-selection-picker.d.ts +29 -29
- package/shared/picker-field/mixins/time-selection-picker.template.d.ts +28 -28
- package/shared/picker-field/picker-field.d.ts +14 -14
- package/shared/templating/attribute-binding-behaviour.d.ts +3 -4
- package/shared/templating/render-in-light-dom.d.ts +13 -12
- package/side-drawer/index.cjs +1 -1
- package/side-drawer/index.js +1 -1
- package/simple-color-picker/definition.cjs +29 -216
- package/simple-color-picker/definition.js +30 -217
- package/simple-color-picker/index.cjs +9 -21
- package/simple-color-picker/index.js +71 -185
- package/slider/definition.cjs +1 -1
- package/slider/definition.js +1 -1
- package/split-button/definition.js +1 -1
- package/styles/core/all.css +1 -1
- package/styles/core/theme.css +1 -1
- package/styles/core/typography.css +1 -1
- package/styles/tokens/theme-dark.css +4 -4
- package/styles/tokens/theme-light.css +4 -4
- package/styles/tokens/vivid-2-compat.css +1 -1
- package/switch/index.cjs +2 -2
- package/switch/index.js +4 -4
- package/tab/definition.js +1 -1
- package/tabs/definition.cjs +1 -1
- package/tabs/definition.js +2 -2
- package/tabs/index.cjs +2 -2
- package/tabs/index.js +16 -16
- package/tag/definition.js +1 -1
- package/tag/index.cjs +1 -1
- package/tag/index.js +1 -1
- package/text-area/index.cjs +3 -3
- package/text-area/index.js +8 -8
- package/text-field/definition.cjs +2 -2
- package/text-field/definition.js +4 -4
- package/text-field/index.cjs +1 -1
- package/text-field/index.js +1 -1
- package/time-picker/definition.cjs +1 -1
- package/time-picker/definition.js +1 -1
- package/time-picker/index.cjs +1 -1
- package/time-picker/index.js +2 -2
- package/toggletip/definition.cjs +2 -2
- package/toggletip/definition.js +3 -3
- package/tooltip/definition.cjs +1 -1
- package/tooltip/definition.js +1 -1
- package/tree-item/definition.cjs +1 -1
- package/tree-item/definition.js +1 -1
- package/tree-view/definition.cjs +2 -2
- package/tree-view/definition.js +3 -3
- package/tree-view/index.cjs +2 -2
- package/tree-view/index.js +6 -6
- package/unbundled/_commonjsHelpers.cjs +36 -0
- package/unbundled/_commonjsHelpers.js +32 -0
- package/unbundled/affix.cjs +1 -1
- package/unbundled/affix.js +2 -2
- package/unbundled/attribute-binding-behaviour.cjs +11 -10
- package/unbundled/attribute-binding-behaviour.js +11 -10
- package/unbundled/base-color-picker.cjs +278 -0
- package/unbundled/base-color-picker.js +275 -0
- package/unbundled/button.cjs +1 -1
- package/unbundled/button.js +2 -2
- package/unbundled/calendar-picker.template.cjs +4 -4
- package/unbundled/calendar-picker.template.js +5 -5
- package/unbundled/definition.js +1 -1
- package/unbundled/definition2.cjs +1 -1
- package/unbundled/definition2.js +3 -3
- package/unbundled/definition3.cjs +222 -140
- package/unbundled/definition3.js +220 -138
- package/unbundled/definition4.cjs +145 -235
- package/unbundled/definition4.js +143 -233
- package/unbundled/definition5.cjs +269 -27
- package/unbundled/definition5.js +267 -26
- package/unbundled/definition6.cjs +56 -0
- package/unbundled/definition6.js +52 -0
- package/unbundled/delegates-aria.cjs +67 -33
- package/unbundled/delegates-aria.js +69 -35
- package/unbundled/form-associated.cjs +2 -2
- package/unbundled/form-associated.js +3 -3
- package/unbundled/host-semantics.cjs +47 -22
- package/unbundled/host-semantics.js +48 -23
- package/unbundled/listbox.cjs +41 -63
- package/unbundled/listbox.js +39 -61
- package/unbundled/mixins.cjs +34 -27
- package/unbundled/mixins.js +35 -28
- package/unbundled/picker-field.template.cjs +3 -3
- package/unbundled/picker-field.template.js +4 -4
- package/unbundled/slider.template.cjs +1 -1
- package/unbundled/slider.template.js +1 -1
- package/unbundled/time-selection-picker.template.cjs +4 -4
- package/unbundled/time-selection-picker.template.js +5 -5
- package/unbundled/vivid-element.cjs +22 -15
- package/unbundled/vivid-element.js +23 -15
- package/video-player/definition.cjs +69047 -1
- package/video-player/definition.js +69047 -1
- package/video-player/index.cjs +36 -36
- package/video-player/index.js +1895 -1905
- package/visually-hidden/index.cjs +1 -1
- package/visually-hidden/index.js +1 -1
- package/vivid.api.json +719 -224
- package/bundled/option.cjs +0 -1
- package/bundled/option.js +0 -158
- package/unbundled/option.cjs +0 -217
- package/unbundled/option.js +0 -214
package/bundled/listbox.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { i as
|
|
2
|
-
import { V as
|
|
3
|
-
import { l as
|
|
4
|
-
import { u as
|
|
5
|
-
function
|
|
6
|
-
let t =
|
|
1
|
+
import { i as p } from "./definition11.js";
|
|
2
|
+
import { V as u, O as h, a as f, o as a } from "./vivid-element.js";
|
|
3
|
+
import { l as x, d as O, f as y, m as I, k as b, c as S, b as g, a as m } from "./key-codes.js";
|
|
4
|
+
import { u as _ } from "./strings.js";
|
|
5
|
+
function k(d, e) {
|
|
6
|
+
let t = d.length;
|
|
7
7
|
for (; t--; )
|
|
8
|
-
if (e(
|
|
8
|
+
if (e(d[t], t, d))
|
|
9
9
|
return t;
|
|
10
10
|
return -1;
|
|
11
11
|
}
|
|
12
|
-
var
|
|
13
|
-
for (var s = void 0,
|
|
14
|
-
(
|
|
15
|
-
return s &&
|
|
12
|
+
var v = Object.defineProperty, l = (d, e, t, i) => {
|
|
13
|
+
for (var s = void 0, n = d.length - 1, c; n >= 0; n--)
|
|
14
|
+
(c = d[n]) && (s = c(e, t, s) || s);
|
|
15
|
+
return s && v(e, t, s), s;
|
|
16
16
|
};
|
|
17
|
-
const
|
|
17
|
+
const o = class r extends u {
|
|
18
18
|
constructor() {
|
|
19
19
|
super(...arguments), this._options = [], this.selectedIndex = -1, this.selectedOptions = [], this.shouldSkipFocus = !1, this.typeaheadBuffer = "", this.typeaheadExpired = !0, this.typeaheadTimeout = -1, this._activeDescendant = null;
|
|
20
20
|
}
|
|
@@ -26,14 +26,6 @@ const d = class c extends x {
|
|
|
26
26
|
get firstSelectedOption() {
|
|
27
27
|
return this.selectedOptions[0] ?? null;
|
|
28
28
|
}
|
|
29
|
-
/**
|
|
30
|
-
* Returns true if there is one or more selectable option.
|
|
31
|
-
*
|
|
32
|
-
* @internal
|
|
33
|
-
*/
|
|
34
|
-
get hasSelectableOptions() {
|
|
35
|
-
return this.options.length > 0 && !this.options.every((e) => e.disabled);
|
|
36
|
-
}
|
|
37
29
|
/**
|
|
38
30
|
* The number of options.
|
|
39
31
|
*
|
|
@@ -48,13 +40,21 @@ const d = class c extends x {
|
|
|
48
40
|
* @public
|
|
49
41
|
*/
|
|
50
42
|
get options() {
|
|
51
|
-
return
|
|
43
|
+
return h.track(this, "options"), this._options;
|
|
52
44
|
}
|
|
53
45
|
set options(e) {
|
|
54
|
-
|
|
46
|
+
const t = this._options;
|
|
47
|
+
if (this._options = e, h.notify(this, "options"), this.$fastController.isConnected) {
|
|
48
|
+
const i = this._newDefaultSelectedIndex(
|
|
49
|
+
t,
|
|
50
|
+
e,
|
|
51
|
+
this.selectedIndex
|
|
52
|
+
);
|
|
53
|
+
i !== null && (this.selectedIndex = i);
|
|
54
|
+
}
|
|
55
55
|
}
|
|
56
56
|
static {
|
|
57
|
-
this.slottedOptionFilter = (e) =>
|
|
57
|
+
this.slottedOptionFilter = (e) => p(e) && !e.hidden;
|
|
58
58
|
}
|
|
59
59
|
static {
|
|
60
60
|
this.TYPE_AHEAD_TIMEOUT_MS = 1e3;
|
|
@@ -102,36 +102,14 @@ const d = class c extends x {
|
|
|
102
102
|
/[.*+\-?^${}()|[\]\\]/g,
|
|
103
103
|
"\\$&"
|
|
104
104
|
), t = new RegExp(`^${e}`, "gi");
|
|
105
|
-
return this.options.filter((
|
|
105
|
+
return this.options.filter((i) => i.text.trim().match(t));
|
|
106
106
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
* @internal
|
|
114
|
-
*/
|
|
115
|
-
getSelectableIndex(e, t) {
|
|
116
|
-
const n = e > t ? -1 : 1, s = e + n;
|
|
117
|
-
let i = null;
|
|
118
|
-
switch (n) {
|
|
119
|
-
case -1: {
|
|
120
|
-
i = this.options.reduceRight(
|
|
121
|
-
(o, h, p) => !o && !h.disabled && p < s ? h : o,
|
|
122
|
-
i
|
|
123
|
-
);
|
|
124
|
-
break;
|
|
125
|
-
}
|
|
126
|
-
case 1: {
|
|
127
|
-
i = this.options.reduce(
|
|
128
|
-
(o, h, p) => !o && !h.disabled && p > s ? h : o,
|
|
129
|
-
i
|
|
130
|
-
);
|
|
131
|
-
break;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
return this.options.indexOf(i);
|
|
107
|
+
getNextSelectableIndex(e) {
|
|
108
|
+
const t = this.options.reduce(
|
|
109
|
+
(i, s, n) => !i && !s.disabled && n >= e ? s : i,
|
|
110
|
+
null
|
|
111
|
+
);
|
|
112
|
+
return this.options.indexOf(t);
|
|
135
113
|
}
|
|
136
114
|
/**
|
|
137
115
|
* Handles external changes to child options.
|
|
@@ -144,7 +122,7 @@ const d = class c extends x {
|
|
|
144
122
|
handleChange(e, t) {
|
|
145
123
|
switch (t) {
|
|
146
124
|
case "selected": {
|
|
147
|
-
|
|
125
|
+
r.slottedOptionFilter(e) && (this.selectedIndex = this.options.indexOf(e)), this.setSelectedOptions();
|
|
148
126
|
break;
|
|
149
127
|
}
|
|
150
128
|
}
|
|
@@ -162,7 +140,7 @@ const d = class c extends x {
|
|
|
162
140
|
handleTypeAhead(e) {
|
|
163
141
|
this.typeaheadTimeout && window.clearTimeout(this.typeaheadTimeout), this.typeaheadTimeout = window.setTimeout(
|
|
164
142
|
() => this.typeaheadExpired = !0,
|
|
165
|
-
|
|
143
|
+
r.TYPE_AHEAD_TIMEOUT_MS
|
|
166
144
|
), this.typeaheadBuffer = `${this.typeaheadExpired ? "" : this.typeaheadBuffer}${e}`;
|
|
167
145
|
}
|
|
168
146
|
/**
|
|
@@ -176,28 +154,28 @@ const d = class c extends x {
|
|
|
176
154
|
this.shouldSkipFocus = !1;
|
|
177
155
|
const t = e.key;
|
|
178
156
|
switch (t) {
|
|
179
|
-
case
|
|
157
|
+
case m: {
|
|
180
158
|
e.shiftKey || (e.preventDefault(), this.selectFirstOption());
|
|
181
159
|
break;
|
|
182
160
|
}
|
|
183
|
-
case
|
|
161
|
+
case g: {
|
|
184
162
|
e.shiftKey || (e.preventDefault(), this.selectNextOption());
|
|
185
163
|
break;
|
|
186
164
|
}
|
|
187
|
-
case
|
|
165
|
+
case S: {
|
|
188
166
|
e.shiftKey || (e.preventDefault(), this.selectPreviousOption());
|
|
189
167
|
break;
|
|
190
168
|
}
|
|
191
|
-
case
|
|
169
|
+
case b: {
|
|
192
170
|
e.preventDefault(), this.selectLastOption();
|
|
193
171
|
break;
|
|
194
172
|
}
|
|
195
|
-
case g:
|
|
196
|
-
return this.focusAndScrollOptionIntoView(), !0;
|
|
197
173
|
case I:
|
|
174
|
+
return this.focusAndScrollOptionIntoView(), !0;
|
|
175
|
+
case y:
|
|
198
176
|
case O:
|
|
199
177
|
return !0;
|
|
200
|
-
case
|
|
178
|
+
case x:
|
|
201
179
|
if (this.typeaheadExpired)
|
|
202
180
|
return !0;
|
|
203
181
|
default:
|
|
@@ -222,27 +200,26 @@ const d = class c extends x {
|
|
|
222
200
|
* @internal
|
|
223
201
|
*/
|
|
224
202
|
selectedIndexChanged(e, t) {
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
}
|
|
229
|
-
if (this.options[this.selectedIndex]?.disabled && typeof e == "number") {
|
|
230
|
-
const n = this.getSelectableIndex(e, t), s = n > -1 ? n : e;
|
|
231
|
-
this.selectedIndex = s;
|
|
203
|
+
const i = this._validSelectedIndex(t);
|
|
204
|
+
if (t !== i) {
|
|
205
|
+
this.selectedIndex = i;
|
|
232
206
|
return;
|
|
233
207
|
}
|
|
234
208
|
this.setSelectedOptions();
|
|
235
209
|
}
|
|
210
|
+
_validSelectedIndex(e) {
|
|
211
|
+
return e > this.options.length - 1 || e < -1 ? -1 : e;
|
|
212
|
+
}
|
|
236
213
|
/**
|
|
237
214
|
* Updates the selectedness of each option when the list of selected options changes.
|
|
238
215
|
*
|
|
239
216
|
* @internal
|
|
240
217
|
*/
|
|
241
218
|
selectedOptionsChanged(e, t) {
|
|
242
|
-
const
|
|
219
|
+
const i = t.filter(r.slottedOptionFilter);
|
|
243
220
|
this.options.forEach((s) => {
|
|
244
|
-
const
|
|
245
|
-
|
|
221
|
+
const n = h.getNotifier(s);
|
|
222
|
+
n.unsubscribe(this, "selected"), s.selected = i.includes(s), n.subscribe(this, "selected");
|
|
246
223
|
});
|
|
247
224
|
}
|
|
248
225
|
/**
|
|
@@ -259,7 +236,7 @@ const d = class c extends x {
|
|
|
259
236
|
* @internal
|
|
260
237
|
*/
|
|
261
238
|
selectLastOption() {
|
|
262
|
-
this.disabled || (this.selectedIndex =
|
|
239
|
+
this.disabled || (this.selectedIndex = k(this.options, (e) => !e.disabled));
|
|
263
240
|
}
|
|
264
241
|
/**
|
|
265
242
|
* Moves focus to the next selectable option.
|
|
@@ -277,13 +254,16 @@ const d = class c extends x {
|
|
|
277
254
|
selectPreviousOption() {
|
|
278
255
|
!this.disabled && this.selectedIndex > 0 && (this.selectedIndex = this.selectedIndex - 1);
|
|
279
256
|
}
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
257
|
+
/// For this options change, determine if selectedIndex should change based on defaultSelected. Otherwise, returns null.
|
|
258
|
+
_newDefaultSelectedIndex(e, t, i) {
|
|
259
|
+
for (const [s, n] of t.entries())
|
|
260
|
+
if (this._isDefaultSelected(n) && !e.includes(n))
|
|
261
|
+
return s;
|
|
262
|
+
return null;
|
|
263
|
+
}
|
|
264
|
+
/// Whether an option should be considered defaultSelected
|
|
265
|
+
_isDefaultSelected(e) {
|
|
266
|
+
return e.defaultSelected;
|
|
287
267
|
}
|
|
288
268
|
/**
|
|
289
269
|
* Sets an option as selected and gives it focus.
|
|
@@ -291,7 +271,7 @@ const d = class c extends x {
|
|
|
291
271
|
* @public
|
|
292
272
|
*/
|
|
293
273
|
setSelectedOptions() {
|
|
294
|
-
this.
|
|
274
|
+
this.selectedOptions = this.selectedIndex !== -1 ? [this.options[this.selectedIndex]] : [], this._activeDescendant = this.firstSelectedOption?.id ?? "", this.focusAndScrollOptionIntoView();
|
|
295
275
|
}
|
|
296
276
|
/**
|
|
297
277
|
* Updates the list of options and resets the selected option when the slotted option content changes.
|
|
@@ -299,11 +279,11 @@ const d = class c extends x {
|
|
|
299
279
|
* @internal
|
|
300
280
|
*/
|
|
301
281
|
slottedOptionsChanged(e, t) {
|
|
302
|
-
this.options = t.reduce((s,
|
|
303
|
-
const
|
|
304
|
-
this.options.forEach((s,
|
|
305
|
-
s.id || (s.id =
|
|
306
|
-
})
|
|
282
|
+
this.options = t.reduce((s, n) => (p(n) && s.push(n), s), []);
|
|
283
|
+
const i = `${this.options.length}`;
|
|
284
|
+
this.options.forEach((s, n) => {
|
|
285
|
+
s.id || (s.id = _("option-")), s.ariaPosInSet = `${n + 1}`, s.ariaSetSize = i;
|
|
286
|
+
});
|
|
307
287
|
}
|
|
308
288
|
/**
|
|
309
289
|
* Updates the filtered list of options when the typeahead buffer changes.
|
|
@@ -312,9 +292,9 @@ const d = class c extends x {
|
|
|
312
292
|
*/
|
|
313
293
|
typeaheadBufferChanged(e, t) {
|
|
314
294
|
if (this.$fastController.isConnected) {
|
|
315
|
-
const
|
|
316
|
-
if (
|
|
317
|
-
const s = this.options.indexOf(
|
|
295
|
+
const i = this.getTypeaheadMatches();
|
|
296
|
+
if (i.length) {
|
|
297
|
+
const s = this.options.indexOf(i[0]);
|
|
318
298
|
s > -1 && (this.selectedIndex = s);
|
|
319
299
|
}
|
|
320
300
|
this.typeaheadExpired = !1;
|
|
@@ -322,24 +302,24 @@ const d = class c extends x {
|
|
|
322
302
|
}
|
|
323
303
|
};
|
|
324
304
|
l([
|
|
325
|
-
|
|
326
|
-
],
|
|
305
|
+
f({ mode: "boolean" })
|
|
306
|
+
], o.prototype, "disabled");
|
|
327
307
|
l([
|
|
328
|
-
|
|
329
|
-
],
|
|
308
|
+
a
|
|
309
|
+
], o.prototype, "selectedIndex");
|
|
330
310
|
l([
|
|
331
|
-
|
|
332
|
-
],
|
|
311
|
+
a
|
|
312
|
+
], o.prototype, "selectedOptions");
|
|
333
313
|
l([
|
|
334
|
-
|
|
335
|
-
],
|
|
314
|
+
a
|
|
315
|
+
], o.prototype, "slottedOptions");
|
|
336
316
|
l([
|
|
337
|
-
|
|
338
|
-
],
|
|
317
|
+
a
|
|
318
|
+
], o.prototype, "typeaheadBuffer");
|
|
339
319
|
l([
|
|
340
|
-
|
|
341
|
-
],
|
|
342
|
-
let
|
|
320
|
+
a
|
|
321
|
+
], o.prototype, "_activeDescendant");
|
|
322
|
+
let A = o;
|
|
343
323
|
export {
|
|
344
|
-
|
|
324
|
+
A as L
|
|
345
325
|
};
|
package/bundled/localized.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const J=require("./vivid-element.cjs"),s="Play",l="Pause",c="Replay",d="Duration",u="LIVE",p="Loaded",b="Progress",g="Fullscreen",m="Mute",h="Unmute",y="Subtitles",f="Captions",L="Chapters",S="Descriptions",P="Close",T="Text",w="White",v="Black",k="Red",C="Green",M="Blue",D="Yellow",B="Magenta",E="Cyan",x="Background",F="Window",$="Transparent",A="Opaque",R="None",O="Raised",I="Depressed",Y="Uniform",N="Casual",W="Script",z="Reset",U="Done",V="Color",G="Opacity",q={"Audio Player":"Audio Player","Video Player":"Video Player",Play:s,Pause:l,Replay:c,"Current Time":"Current Time",Duration:d,"Remaining Time":"Remaining Time","Stream Type":"Stream Type",LIVE:u,"Seek to live, currently behind live":"Seek to live, currently behind live","Seek to live, currently playing live":"Seek to live, currently playing live",Loaded:p,Progress:b,"Progress Bar":"Progress Bar","progress bar timing: currentTime={1} duration={2}":"{1} of {2}",Fullscreen:g,"Exit Fullscreen":"Exit Fullscreen",Mute:m,Unmute:h,"Playback Rate":"Playback Rate",Subtitles:y,"subtitles off":"subtitles off",Captions:f,"captions off":"captions off",Chapters:L,Descriptions:S,"descriptions off":"descriptions off","Audio Track":"Audio Track","Volume Level":"Volume Level","You aborted the media playback":"You aborted the media playback","A network error caused the media download to fail part-way.":"A network error caused the media download to fail part-way.","The media could not be loaded, either because the server or network failed or because the format is not supported.":"The media could not be loaded, either because the server or network failed or because the format is not supported.","The media playback was aborted due to a corruption problem or because the media used features your browser did not support.":"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.","No compatible source was found for this media.":"No compatible source was found for this media.","The media is encrypted and we do not have the keys to decrypt it.":"The media is encrypted and we do not have the keys to decrypt it.","Play Video":"Play Video",Close:P,"Close Modal Dialog":"Close Modal Dialog","Modal Window":"Modal Window","This is a modal window":"This is a modal window","This modal can be closed by pressing the Escape key or activating the close button.":"This modal can be closed by pressing the Escape key or activating the close button.",", opens captions settings dialog":", opens captions settings dialog",", opens subtitles settings dialog":", opens subtitles settings dialog",", opens descriptions settings dialog":", opens descriptions settings dialog",", selected":", selected","captions settings":"captions settings","subtitles settings":"subtitles settings","descriptions settings":"descriptions settings",Text:T,White:w,Black:v,Red:k,Green:C,Blue:M,Yellow:D,Magenta:B,Cyan:E,Background:x,Window:F,Transparent:$,"Semi-Transparent":"Semi-Transparent",Opaque:A,"Font Size":"Font Size","Text Edge Style":"Text Edge Style",None:R,Raised:O,Depressed:I,Uniform:Y,"Drop shadow":"Drop shadow","Font Family":"Font Family","Proportional Sans-Serif":"Proportional Sans-Serif","Monospace Sans-Serif":"Monospace Sans-Serif","Proportional Serif":"Proportional Serif","Monospace Serif":"Monospace Serif",Casual:N,Script:W,"Small Caps":"Small Caps",Reset:z,"restore all settings to the default values":"restore all settings to the default values",Done:U,"Caption Settings Dialog":"Caption Settings Dialog","Beginning of dialog window. Escape will cancel and close the window.":"Beginning of dialog window. Escape will cancel and close the window.","End of dialog window.":"End of dialog window.","{1} is loading.":"{1} is loading.","Exit Picture-in-Picture":"Exit Picture-in-Picture","Picture-in-Picture":"Picture-in-Picture","No content":"No content",Color:V,Opacity:G,"Text Background":"Text Background","Caption Area Background":"Caption Area Background","Playing in Picture-in-Picture":"Playing in Picture-in-Picture","Skip backward {1} seconds":"Skip backward {1} seconds","Skip forward {1} seconds":"Skip forward {1} seconds"},H=Object.freeze(Object.defineProperty({__proto__:null,Background:x,Black:v,Blue:M,Captions:f,Casual:N,Chapters:L,Close:P,Color:V,Cyan:E,Depressed:I,Descriptions:S,Done:U,Duration:d,Fullscreen:g,Green:C,LIVE:u,Loaded:p,Magenta:B,Mute:m,None:R,Opacity:G,Opaque:A,Pause:l,Play:s,Progress:b,Raised:O,Red:k,Replay:c,Reset:z,Script:W,Subtitles:y,Text:T,Transparent:$,Uniform:Y,Unmute:h,White:w,Window:F,Yellow:D,default:q},Symbol.toStringTag,{value:"Module"})),j={lang:"en-US",common:{useCommaAsDecimalSeparator:!1},pickerField:{clearLabel:"Clear",okLabel:"OK"},calendarPicker:{months:{name:["January","February","March","April","May","June","July","August","September","October","November","December"],shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},weekdays:{name:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},firstDayOfWeek:0,dateFormat:"MM/dd/yyyy",dateFormatPlaceholder:"MM/DD/YYYY",chooseDateLabel:"Choose date",changeDateLabel:e=>`Change date, ${e}`,chooseDatesLabel:"Choose dates",changeDatesLabel:e=>`Change dates, ${e}`,prevYearLabel:"Previous year",prevMonthLabel:"Previous month",nextMonthLabel:"Next month",nextYearLabel:"Next year",todayLabel:"today",selectedLabel:"selected",currentLabel:"current",changeMonthLabel:e=>`Change month, ${e} selected`,showCalendarForMonthLabel:e=>`Show calendar for ${e}`,invalidDateError:"Please enter a valid date.",invalidDateRangeError:"Please enter a valid date range.",startDateAfterMinDateError:e=>`The start date must be ${e} or later.`,endDateBeforeMaxDateError:e=>`The end date must be ${e} or earlier.`},timePicker:{defaultTo12HourClock:!0,chooseTimeLabel:"Choose time",changeTimeLabel:e=>`Change time, ${e}`,hoursLabel:"hours",minutesLabel:"minutes",secondsLabel:"seconds",meridiesLabel:"AM/PM",invalidTimeError:"Please enter a valid time."},dateTimePicker:{chooseDateTimeLabel:"Choose date and time",changeDateTimeLabel:e=>`Change date and time, ${e}`,invalidDateTimeError:"Please enter a valid date and time.",dateBeforeMinDateError:e=>`Date must be ${e} or later.`,dateAfterMaxDateError:e=>`Date must be ${e} or earlier.`,timeBeforeMinTimeError:e=>`Time must be ${e} or later.`,timeAfterMaxTimeError:e=>`Time must be ${e} or earlier.`},filePicker:{invalidFileTypeError:"You can't select files of this type.",maxFilesExceededError:"You can't select any more files.",fileTooBigError:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",removeFileLabel:"Remove file",invalidFilesError:"One or more selected files are invalid. Please, upload only valid file types under the size limit.",uploadFilesLabel:"Upload files"},audioPlayer:{playButtonLabel:"Play",pauseButtonLabel:"Pause",sliderLabel:"Audio progress bar",skipForwardButton:"Skip Forward",skipBackwardButton:"Skip Backward"},alert:{dismissButtonLabel:"Close"},dialog:{dismissButtonLabel:"Close"},banner:{dismissButtonLabel:"Close"},numberField:{incrementButtonLabel:e=>e===1?"Increase value":`Increase value by ${e}`,decrementButtonLabel:e=>e===1?"Decrease value":`Decrease value by ${e}`,updatedValueAnnouncement:e=>`Updated value: ${e}`},splitButton:{showMoreActionsLabel:"Show more actions"},videoPlayer:H,rangeSlider:{startThumbLabel:"min",endThumbLabel:"max"},dialPad:{inputLabel:"Phone number",deleteButtonLabel:"Delete last digit",callButtonLabel:"Call",endCallButtonLabel:"End call",digitOneLabel:"1",digitTwoLabel:"2 ABC",digitThreeLabel:"3 DEF",digitFourLabel:"4 GHI",digitFiveLabel:"5 JKL",digitSixLabel:"6 MNO",digitSevenLabel:"7 PQRS",digitEightLabel:"8 TUV",digitNineLabel:"9 WXYZ",digitAsteriskLabel:"*",digitZeroLabel:"0",digitHashtagLabel:"#",errorLabel:"Error:"},tab:{dismissButtonLabel:"Press the DELETE key to close this tab"},searchableSelect:{clearButtonLabel:"Clear selection",noOptionsMessage:"No options",noMatchesMessage:"No options found",loadingOptionsMessage:"Loading...",removeTagButtonLabel:e=>`Remove ${e}`,optionSelectedMessage:e=>`Option ${e} selected.`,optionDeselectedMessage:e=>`Option ${e} deselected.`,optionFocusedMessage:(e,t,a,n)=>`Option ${e} focused, ${n?"selected, ":""}${t} of ${a}.`,maxSelectedMessage:(e,t)=>`${e} of ${t} selected.`},richTextEditor:{textBlockType:"Text Block Type",textSize:"Text Size",bold:"Bold",italics:"Italics",underline:"Underline",strikethrough:"Strikethrough",monospace:"Monospace",dragAndDropFilesHere:"Drag&Drop files here"},button:{pendingLabel:"Loading..."},feedbackMessage:{errorIconText:"Error:",successIconText:"Success:"},connotationAnnoncement:{accentIcon:"Accent:",alertIcon:"Alert:",informationIcon:"Information:",successIcon:"Success:",warningIcon:"Warning:",announcementIcon:"Announcement:",ctaIcon:"Call to action:"},charCount:{charactersLimitMessage:e=>`You can enter up to ${e} characters`,charactersRemainingMessage:e=>`You have ${e} characters remaining`},dataGrid:{cell:{selected:"Selected",button:"(button)"}},pagination:{previousPageLabel:"Go to previous page",nextPageLabel:"Go to next page",goToPageLabel:e=>`Go to page ${e}`},tag:{remove:e=>`Remove ${e}`},toggletip:{anchorLabel:e=>e?`Show more information about ${e}`:"Show more information"},simpleColorPicker:{colorPaletteLabel:"Color palette",colorSwatchLabel:(e,t,a)=>{let n=t?`Select ${t}, hex: ${e}`:`Select ${e}`;return a&&(n+=", selected."),n}}};var K=Object.defineProperty,Z=(e,t,a,n)=>{for(var o=void 0,i=e.length-1,r;i>=0;i--)(r=e[i])&&(o=r(t,a,o)||o);return o&&K(t,a,o),o};class _{constructor(){this.locale=j}}Z([J.observable],_.prototype,"locale");const Q=new _,X=e=>{class t extends e{get locale(){return Q.locale}}return t};exports.Localized=X;
|
|
1
|
+
"use strict";const J=require("./vivid-element.cjs"),s="Play",l="Pause",c="Replay",d="Duration",u="LIVE",p="Loaded",b="Progress",g="Fullscreen",m="Mute",h="Unmute",y="Subtitles",L="Captions",f="Chapters",S="Descriptions",P="Close",T="Text",k="White",w="Black",v="Red",C="Green",M="Blue",D="Yellow",B="Magenta",E="Cyan",x="Background",A="Window",F="Transparent",$="Opaque",O="None",R="Raised",I="Depressed",Y="Uniform",N="Casual",W="Script",z="Reset",U="Done",V="Color",G="Opacity",q={"Audio Player":"Audio Player","Video Player":"Video Player",Play:s,Pause:l,Replay:c,"Current Time":"Current Time",Duration:d,"Remaining Time":"Remaining Time","Stream Type":"Stream Type",LIVE:u,"Seek to live, currently behind live":"Seek to live, currently behind live","Seek to live, currently playing live":"Seek to live, currently playing live",Loaded:p,Progress:b,"Progress Bar":"Progress Bar","progress bar timing: currentTime={1} duration={2}":"{1} of {2}",Fullscreen:g,"Exit Fullscreen":"Exit Fullscreen",Mute:m,Unmute:h,"Playback Rate":"Playback Rate",Subtitles:y,"subtitles off":"subtitles off",Captions:L,"captions off":"captions off",Chapters:f,Descriptions:S,"descriptions off":"descriptions off","Audio Track":"Audio Track","Volume Level":"Volume Level","You aborted the media playback":"You aborted the media playback","A network error caused the media download to fail part-way.":"A network error caused the media download to fail part-way.","The media could not be loaded, either because the server or network failed or because the format is not supported.":"The media could not be loaded, either because the server or network failed or because the format is not supported.","The media playback was aborted due to a corruption problem or because the media used features your browser did not support.":"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.","No compatible source was found for this media.":"No compatible source was found for this media.","The media is encrypted and we do not have the keys to decrypt it.":"The media is encrypted and we do not have the keys to decrypt it.","Play Video":"Play Video",Close:P,"Close Modal Dialog":"Close Modal Dialog","Modal Window":"Modal Window","This is a modal window":"This is a modal window","This modal can be closed by pressing the Escape key or activating the close button.":"This modal can be closed by pressing the Escape key or activating the close button.",", opens captions settings dialog":", opens captions settings dialog",", opens subtitles settings dialog":", opens subtitles settings dialog",", opens descriptions settings dialog":", opens descriptions settings dialog",", selected":", selected","captions settings":"captions settings","subtitles settings":"subtitles settings","descriptions settings":"descriptions settings",Text:T,White:k,Black:w,Red:v,Green:C,Blue:M,Yellow:D,Magenta:B,Cyan:E,Background:x,Window:A,Transparent:F,"Semi-Transparent":"Semi-Transparent",Opaque:$,"Font Size":"Font Size","Text Edge Style":"Text Edge Style",None:O,Raised:R,Depressed:I,Uniform:Y,"Drop shadow":"Drop shadow","Font Family":"Font Family","Proportional Sans-Serif":"Proportional Sans-Serif","Monospace Sans-Serif":"Monospace Sans-Serif","Proportional Serif":"Proportional Serif","Monospace Serif":"Monospace Serif",Casual:N,Script:W,"Small Caps":"Small Caps",Reset:z,"restore all settings to the default values":"restore all settings to the default values",Done:U,"Caption Settings Dialog":"Caption Settings Dialog","Beginning of dialog window. Escape will cancel and close the window.":"Beginning of dialog window. Escape will cancel and close the window.","End of dialog window.":"End of dialog window.","{1} is loading.":"{1} is loading.","Exit Picture-in-Picture":"Exit Picture-in-Picture","Picture-in-Picture":"Picture-in-Picture","No content":"No content",Color:V,Opacity:G,"Text Background":"Text Background","Caption Area Background":"Caption Area Background","Playing in Picture-in-Picture":"Playing in Picture-in-Picture","Skip backward {1} seconds":"Skip backward {1} seconds","Skip forward {1} seconds":"Skip forward {1} seconds"},H=Object.freeze(Object.defineProperty({__proto__:null,Background:x,Black:w,Blue:M,Captions:L,Casual:N,Chapters:f,Close:P,Color:V,Cyan:E,Depressed:I,Descriptions:S,Done:U,Duration:d,Fullscreen:g,Green:C,LIVE:u,Loaded:p,Magenta:B,Mute:m,None:O,Opacity:G,Opaque:$,Pause:l,Play:s,Progress:b,Raised:R,Red:v,Replay:c,Reset:z,Script:W,Subtitles:y,Text:T,Transparent:F,Uniform:Y,Unmute:h,White:k,Window:A,Yellow:D,default:q},Symbol.toStringTag,{value:"Module"})),j={lang:"en-US",common:{useCommaAsDecimalSeparator:!1},pickerField:{clearLabel:"Clear",okLabel:"OK"},calendarPicker:{months:{name:["January","February","March","April","May","June","July","August","September","October","November","December"],shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},weekdays:{name:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},firstDayOfWeek:0,dateFormat:"MM/dd/yyyy",dateFormatPlaceholder:"MM/DD/YYYY",chooseDateLabel:"Choose date",changeDateLabel:e=>`Change date, ${e}`,chooseDatesLabel:"Choose dates",changeDatesLabel:e=>`Change dates, ${e}`,prevYearLabel:"Previous year",prevMonthLabel:"Previous month",nextMonthLabel:"Next month",nextYearLabel:"Next year",todayLabel:"today",selectedLabel:"selected",currentLabel:"current",changeMonthLabel:e=>`Change month, ${e} selected`,showCalendarForMonthLabel:e=>`Show calendar for ${e}`,invalidDateError:"Please enter a valid date.",invalidDateRangeError:"Please enter a valid date range.",startDateAfterMinDateError:e=>`The start date must be ${e} or later.`,endDateBeforeMaxDateError:e=>`The end date must be ${e} or earlier.`},timePicker:{defaultTo12HourClock:!0,chooseTimeLabel:"Choose time",changeTimeLabel:e=>`Change time, ${e}`,hoursLabel:"hours",minutesLabel:"minutes",secondsLabel:"seconds",meridiesLabel:"AM/PM",invalidTimeError:"Please enter a valid time."},dateTimePicker:{chooseDateTimeLabel:"Choose date and time",changeDateTimeLabel:e=>`Change date and time, ${e}`,invalidDateTimeError:"Please enter a valid date and time.",dateBeforeMinDateError:e=>`Date must be ${e} or later.`,dateAfterMaxDateError:e=>`Date must be ${e} or earlier.`,timeBeforeMinTimeError:e=>`Time must be ${e} or later.`,timeAfterMaxTimeError:e=>`Time must be ${e} or earlier.`},filePicker:{invalidFileTypeError:"You can't select files of this type.",maxFilesExceededError:"You can't select any more files.",fileTooBigError:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",removeFileLabel:"Remove file",invalidFilesError:"One or more selected files are invalid. Please, upload only valid file types under the size limit.",uploadFilesLabel:"Upload files"},audioPlayer:{playButtonLabel:"Play",pauseButtonLabel:"Pause",sliderLabel:"Audio progress bar",skipForwardButton:"Skip Forward",skipBackwardButton:"Skip Backward"},alert:{dismissButtonLabel:"Close"},dialog:{dismissButtonLabel:"Close"},banner:{dismissButtonLabel:"Close"},numberField:{incrementButtonLabel:e=>e===1?"Increase value":`Increase value by ${e}`,decrementButtonLabel:e=>e===1?"Decrease value":`Decrease value by ${e}`,updatedValueAnnouncement:e=>`Updated value: ${e}`},splitButton:{showMoreActionsLabel:"Show more actions"},videoPlayer:H,rangeSlider:{startThumbLabel:"min",endThumbLabel:"max"},dialPad:{inputLabel:"Phone number",deleteButtonLabel:"Delete last digit",callButtonLabel:"Call",endCallButtonLabel:"End call",digitOneLabel:"1",digitTwoLabel:"2 ABC",digitThreeLabel:"3 DEF",digitFourLabel:"4 GHI",digitFiveLabel:"5 JKL",digitSixLabel:"6 MNO",digitSevenLabel:"7 PQRS",digitEightLabel:"8 TUV",digitNineLabel:"9 WXYZ",digitAsteriskLabel:"*",digitZeroLabel:"0",digitHashtagLabel:"#",errorLabel:"Error:"},tab:{dismissButtonLabel:"Press the DELETE key to close this tab"},searchableSelect:{clearButtonLabel:"Clear selection",noOptionsMessage:"No options",noMatchesMessage:"No options found",selectAllLabel:"Select All",deselectAllLabel:"Deselect All",selectedAllMessage:"All options selected",deselectedAllMessage:"All options deselected",loadingOptionsMessage:"Loading...",removeTagButtonLabel:e=>`Remove ${e}`,optionSelectedMessage:e=>`Option ${e} selected.`,optionDeselectedMessage:e=>`Option ${e} deselected.`,optionFocusedMessage:(e,o,t,i)=>`Option ${e} focused, ${i?"selected, ":""}${o} of ${t}.`,maxSelectedMessage:(e,o)=>`${e} of ${o} selected.`},richTextEditor:{textBlockType:"Text Block Type",textSize:"Text Size",bold:"Bold",italics:"Italics",underline:"Underline",strikethrough:"Strikethrough",monospace:"Monospace",dragAndDropFilesHere:"Drag&Drop files here"},button:{pendingLabel:"Loading..."},feedbackMessage:{errorIconText:"Error:",successIconText:"Success:"},connotationAnnoncement:{accentIcon:"Accent:",alertIcon:"Alert:",informationIcon:"Information:",successIcon:"Success:",warningIcon:"Warning:",announcementIcon:"Announcement:",ctaIcon:"Call to action:"},charCount:{charactersLimitMessage:e=>`You can enter up to ${e} characters`,charactersRemainingMessage:e=>`You have ${e} characters remaining`},dataGrid:{cell:{selected:"Selected",button:"(button)"}},pagination:{previousPageLabel:"Go to previous page",nextPageLabel:"Go to next page",goToPageLabel:e=>`Go to page ${e}`},tag:{remove:e=>`Remove ${e}`},toggletip:{anchorLabel:e=>e?`Show more information about ${e}`:"Show more information"},baseColorPicker:{colorSwatchLabel:(e,o,t)=>{let i=o?`Select ${o}, hex: ${e}`:`Select ${e}`;return t&&(i+=", selected."),i}},simpleColorPicker:{colorPaletteLabel:"Color palette"},colorPicker:{popupLabel:"Color Picker",swatchesLabel:"Saved colors:",pickerButtonLabel:"Open Color Picker",saveButtonLabel:"Save current color",closeButtonLabel:"Close Color Picker",copyButtonLabel:"Copy Color to Clipboard",copyErrorText:"Copy failed. Clipboard access was blocked. Try again."}};var K=Object.defineProperty,Z=(e,o,t,i)=>{for(var a=void 0,r=e.length-1,n;r>=0;r--)(n=e[r])&&(a=n(o,t,a)||a);return a&&K(o,t,a),a};class _{constructor(){this.locale=j}}Z([J.observable],_.prototype,"locale");const Q=new _,X=e=>{class o extends e{get locale(){return Q.locale}}return o};exports.Localized=X;
|
package/bundled/localized.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { o as J } from "./vivid-element.js";
|
|
2
|
-
const s = "Play", l = "Pause", c = "Replay", d = "Duration", u = "LIVE", p = "Loaded", b = "Progress", g = "Fullscreen", m = "Mute", h = "Unmute", y = "Subtitles",
|
|
2
|
+
const s = "Play", l = "Pause", c = "Replay", d = "Duration", u = "LIVE", p = "Loaded", b = "Progress", g = "Fullscreen", m = "Mute", h = "Unmute", y = "Subtitles", L = "Captions", f = "Chapters", S = "Descriptions", P = "Close", T = "Text", k = "White", w = "Black", C = "Red", v = "Green", M = "Blue", D = "Yellow", B = "Magenta", E = "Cyan", x = "Background", A = "Window", F = "Transparent", $ = "Opaque", O = "None", R = "Raised", I = "Depressed", Y = "Uniform", N = "Casual", W = "Script", U = "Reset", z = "Done", V = "Color", G = "Opacity", H = {
|
|
3
3
|
"Audio Player": "Audio Player",
|
|
4
4
|
"Video Player": "Video Player",
|
|
5
5
|
Play: s,
|
|
@@ -23,9 +23,9 @@ const s = "Play", l = "Pause", c = "Replay", d = "Duration", u = "LIVE", p = "Lo
|
|
|
23
23
|
"Playback Rate": "Playback Rate",
|
|
24
24
|
Subtitles: y,
|
|
25
25
|
"subtitles off": "subtitles off",
|
|
26
|
-
Captions:
|
|
26
|
+
Captions: L,
|
|
27
27
|
"captions off": "captions off",
|
|
28
|
-
Chapters:
|
|
28
|
+
Chapters: f,
|
|
29
29
|
Descriptions: S,
|
|
30
30
|
"descriptions off": "descriptions off",
|
|
31
31
|
"Audio Track": "Audio Track",
|
|
@@ -50,23 +50,23 @@ const s = "Play", l = "Pause", c = "Replay", d = "Duration", u = "LIVE", p = "Lo
|
|
|
50
50
|
"subtitles settings": "subtitles settings",
|
|
51
51
|
"descriptions settings": "descriptions settings",
|
|
52
52
|
Text: T,
|
|
53
|
-
White:
|
|
54
|
-
Black:
|
|
55
|
-
Red:
|
|
56
|
-
Green:
|
|
53
|
+
White: k,
|
|
54
|
+
Black: w,
|
|
55
|
+
Red: C,
|
|
56
|
+
Green: v,
|
|
57
57
|
Blue: M,
|
|
58
58
|
Yellow: D,
|
|
59
59
|
Magenta: B,
|
|
60
60
|
Cyan: E,
|
|
61
61
|
Background: x,
|
|
62
|
-
Window:
|
|
63
|
-
Transparent:
|
|
62
|
+
Window: A,
|
|
63
|
+
Transparent: F,
|
|
64
64
|
"Semi-Transparent": "Semi-Transparent",
|
|
65
|
-
Opaque:
|
|
65
|
+
Opaque: $,
|
|
66
66
|
"Font Size": "Font Size",
|
|
67
67
|
"Text Edge Style": "Text Edge Style",
|
|
68
|
-
None:
|
|
69
|
-
Raised:
|
|
68
|
+
None: O,
|
|
69
|
+
Raised: R,
|
|
70
70
|
Depressed: I,
|
|
71
71
|
Uniform: Y,
|
|
72
72
|
"Drop shadow": "Drop shadow",
|
|
@@ -98,11 +98,11 @@ const s = "Play", l = "Pause", c = "Replay", d = "Duration", u = "LIVE", p = "Lo
|
|
|
98
98
|
}, j = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
99
99
|
__proto__: null,
|
|
100
100
|
Background: x,
|
|
101
|
-
Black:
|
|
101
|
+
Black: w,
|
|
102
102
|
Blue: M,
|
|
103
|
-
Captions:
|
|
103
|
+
Captions: L,
|
|
104
104
|
Casual: N,
|
|
105
|
-
Chapters:
|
|
105
|
+
Chapters: f,
|
|
106
106
|
Close: P,
|
|
107
107
|
Color: V,
|
|
108
108
|
Cyan: E,
|
|
@@ -111,29 +111,29 @@ const s = "Play", l = "Pause", c = "Replay", d = "Duration", u = "LIVE", p = "Lo
|
|
|
111
111
|
Done: z,
|
|
112
112
|
Duration: d,
|
|
113
113
|
Fullscreen: g,
|
|
114
|
-
Green:
|
|
114
|
+
Green: v,
|
|
115
115
|
LIVE: u,
|
|
116
116
|
Loaded: p,
|
|
117
117
|
Magenta: B,
|
|
118
118
|
Mute: m,
|
|
119
|
-
None:
|
|
119
|
+
None: O,
|
|
120
120
|
Opacity: G,
|
|
121
|
-
Opaque:
|
|
121
|
+
Opaque: $,
|
|
122
122
|
Pause: l,
|
|
123
123
|
Play: s,
|
|
124
124
|
Progress: b,
|
|
125
|
-
Raised:
|
|
126
|
-
Red:
|
|
125
|
+
Raised: R,
|
|
126
|
+
Red: C,
|
|
127
127
|
Replay: c,
|
|
128
128
|
Reset: U,
|
|
129
129
|
Script: W,
|
|
130
130
|
Subtitles: y,
|
|
131
131
|
Text: T,
|
|
132
|
-
Transparent:
|
|
132
|
+
Transparent: F,
|
|
133
133
|
Uniform: Y,
|
|
134
134
|
Unmute: h,
|
|
135
|
-
White:
|
|
136
|
-
Window:
|
|
135
|
+
White: k,
|
|
136
|
+
Window: A,
|
|
137
137
|
Yellow: D,
|
|
138
138
|
default: H
|
|
139
139
|
}, Symbol.toStringTag, { value: "Module" })), q = {
|
|
@@ -336,6 +336,10 @@ const s = "Play", l = "Pause", c = "Replay", d = "Duration", u = "LIVE", p = "Lo
|
|
|
336
336
|
clearButtonLabel: "Clear selection",
|
|
337
337
|
noOptionsMessage: "No options",
|
|
338
338
|
noMatchesMessage: "No options found",
|
|
339
|
+
selectAllLabel: "Select All",
|
|
340
|
+
deselectAllLabel: "Deselect All",
|
|
341
|
+
selectedAllMessage: "All options selected",
|
|
342
|
+
deselectedAllMessage: "All options deselected",
|
|
339
343
|
loadingOptionsMessage: "Loading...",
|
|
340
344
|
removeTagButtonLabel: (
|
|
341
345
|
/* istanbul ignore next */
|
|
@@ -351,11 +355,11 @@ const s = "Play", l = "Pause", c = "Replay", d = "Duration", u = "LIVE", p = "Lo
|
|
|
351
355
|
),
|
|
352
356
|
optionFocusedMessage: (
|
|
353
357
|
/* istanbul ignore next */
|
|
354
|
-
(e,
|
|
358
|
+
(e, o, t, r) => `Option ${e} focused, ${r ? "selected, " : ""}${o} of ${t}.`
|
|
355
359
|
),
|
|
356
360
|
maxSelectedMessage: (
|
|
357
361
|
/* istanbul ignore next */
|
|
358
|
-
(e,
|
|
362
|
+
(e, o) => `${e} of ${o} selected.`
|
|
359
363
|
)
|
|
360
364
|
},
|
|
361
365
|
richTextEditor: {
|
|
@@ -420,21 +424,32 @@ const s = "Play", l = "Pause", c = "Replay", d = "Duration", u = "LIVE", p = "Lo
|
|
|
420
424
|
(e) => e ? `Show more information about ${e}` : "Show more information"
|
|
421
425
|
)
|
|
422
426
|
},
|
|
423
|
-
|
|
424
|
-
colorPaletteLabel: "Color palette",
|
|
427
|
+
baseColorPicker: {
|
|
425
428
|
colorSwatchLabel: (
|
|
426
429
|
/* istanbul ignore next */
|
|
427
|
-
(e,
|
|
428
|
-
let
|
|
429
|
-
return
|
|
430
|
+
(e, o, t) => {
|
|
431
|
+
let r = o ? `Select ${o}, hex: ${e}` : `Select ${e}`;
|
|
432
|
+
return t && (r += ", selected."), r;
|
|
430
433
|
}
|
|
431
434
|
)
|
|
435
|
+
},
|
|
436
|
+
simpleColorPicker: {
|
|
437
|
+
colorPaletteLabel: "Color palette"
|
|
438
|
+
},
|
|
439
|
+
colorPicker: {
|
|
440
|
+
popupLabel: "Color Picker",
|
|
441
|
+
swatchesLabel: "Saved colors:",
|
|
442
|
+
pickerButtonLabel: "Open Color Picker",
|
|
443
|
+
saveButtonLabel: "Save current color",
|
|
444
|
+
closeButtonLabel: "Close Color Picker",
|
|
445
|
+
copyButtonLabel: "Copy Color to Clipboard",
|
|
446
|
+
copyErrorText: "Copy failed. Clipboard access was blocked. Try again."
|
|
432
447
|
}
|
|
433
448
|
};
|
|
434
|
-
var K = Object.defineProperty, Z = (e,
|
|
435
|
-
for (var
|
|
436
|
-
(
|
|
437
|
-
return
|
|
449
|
+
var K = Object.defineProperty, Z = (e, o, t, r) => {
|
|
450
|
+
for (var a = void 0, i = e.length - 1, n; i >= 0; i--)
|
|
451
|
+
(n = e[i]) && (a = n(o, t, a) || a);
|
|
452
|
+
return a && K(o, t, a), a;
|
|
438
453
|
};
|
|
439
454
|
class _ {
|
|
440
455
|
constructor() {
|
|
@@ -445,7 +460,7 @@ Z([
|
|
|
445
460
|
J
|
|
446
461
|
], _.prototype, "locale");
|
|
447
462
|
const Q = new _(), ee = (e) => {
|
|
448
|
-
class
|
|
463
|
+
class o extends e {
|
|
449
464
|
/**
|
|
450
465
|
* @internal
|
|
451
466
|
*/
|
|
@@ -453,7 +468,7 @@ const Q = new _(), ee = (e) => {
|
|
|
453
468
|
return Q.locale;
|
|
454
469
|
}
|
|
455
470
|
}
|
|
456
|
-
return
|
|
471
|
+
return o;
|
|
457
472
|
};
|
|
458
473
|
export {
|
|
459
474
|
ee as L
|
package/bundled/mixins.cjs
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
"use strict";const a=require("./vivid-element.cjs"),y=require("./definition2.cjs")
|
|
2
|
-
class="${
|
|
1
|
+
"use strict";const _=require("./normalize.cjs"),a=require("./vivid-element.cjs"),y=require("./definition2.cjs"),$=require("./definition13.cjs"),m=require("./when.cjs"),F=require("./class-names.cjs"),I=require("./localized.cjs"),f=require("./slotted.cjs"),D=":host{display:contents}.message{display:flex;contain:inline-size;font:var(--vvd-typography-base-condensed);gap:4px;grid-column:1/-1}.message.none-message{display:none}.message.helper-message{color:var(--_low-ink-color)}.message.error-message,.message.success-message{color:var(--vvd-color-canvas-text)}slot{display:inline}.icon{font-size:16px}.error-message .icon{color:var(--vvd-color-alert-500)}.success-message .icon{color:var(--vvd-color-success-500)}.announcement{display:contents}";var w=Object.defineProperty,C=(t,e,i,s)=>{for(var n=void 0,r=t.length-1,c;r>=0;r--)(c=t[r])&&(n=c(e,i,n)||n);return n&&w(e,i,n),n};class l extends I.Localized(a.VividElement){constructor(){super(...arguments),this.type="none"}}C([a.attr],l.prototype,"type");function g(t,e,i){const s=t.tagFor(y.Icon);return a.html`<${s} class="icon" name="${e}" label="${n=>n.locale.feedbackMessage[i]}"></${s}>`}function B(t){const e={none:"",helper:"",error:g(t,"info-line","errorIconText"),success:g(t,"check-circle-line","successIconText")};return a.html`${i=>e[i.type]}`}const b=t=>t==="error",M=t=>{const e=a.html`<div
|
|
2
|
+
class="${i=>F.classNames("message",`${i.type}-message`)}"
|
|
3
3
|
>
|
|
4
|
-
${
|
|
5
|
-
</div>`;return a.html`${m.when(
|
|
4
|
+
${B(t)}<slot></slot>
|
|
5
|
+
</div>`;return a.html`${m.when(i=>!b(i.type),e)}
|
|
6
6
|
<span class="announcement" role="status" aria-live="polite">
|
|
7
|
-
${m.when(
|
|
8
|
-
</span>`},S=a.defineVividComponent("feedback-message",
|
|
9
|
-
<${n} id="feedback" :type="${
|
|
10
|
-
${
|
|
7
|
+
${m.when(i=>b(i.type),e)}
|
|
8
|
+
</span>`},S=a.defineVividComponent("feedback-message",l,M,[y.iconDefinition,$.visuallyHiddenDefinition],{styles:D});class H{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,i){if(i===this.templateBindingObserver){const s=this.templateBindingObserver.bind(this.controller);this.instantiateTemplate(s)}}instantiateTemplate(e){this.view&&this.view.dispose(),this.view=e.create(),this.view.bind(this.source,this.context),this.view.insertBefore(this.insertionPoint)}}class x{constructor(e){this.targetNodeId="",this.templateBinding=e,this.dataBinding=e}createHTML(e){return a.Markup.comment(e(this))}createBehavior(){return new H(this)}}a.HTMLDirective.define(x);function k(t){const e=_.normalizeBinding(t);return new x(e)}const o=[];for(let t=0;t<256;++t)o.push((t+256).toString(16).slice(1));function O(t,e=0){return(o[t[e+0]]+o[t[e+1]]+o[t[e+2]]+o[t[e+3]]+"-"+o[t[e+4]]+o[t[e+5]]+"-"+o[t[e+6]]+o[t[e+7]]+"-"+o[t[e+8]]+o[t[e+9]]+"-"+o[t[e+10]]+o[t[e+11]]+o[t[e+12]]+o[t[e+13]]+o[t[e+14]]+o[t[e+15]]).toLowerCase()}let h;const L=new Uint8Array(16);function U(){if(!h){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");h=crypto.getRandomValues.bind(crypto)}return h(L)}const R=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),v={randomUUID:R};function q(t,e,i){if(v.randomUUID&&!t)return v.randomUUID();t=t||{};const s=t.random??t.rng?.()??U();if(s.length<16)throw new Error("Random bytes length must be >= 16");return s[6]=s[6]&15|64,s[8]=s[8]&63|128,O(s)}const p=()=>q();var P=Object.defineProperty,u=(t,e,i,s)=>{for(var n=void 0,r=t.length-1,c;r>=0;r--)(c=t[r])&&(n=c(e,i,n)||n);return n&&P(e,i,n),n};const T=t=>{class e extends t{get _feedbackDescribedBy(){return"feedback slotted-helper-text-feedback"}_internalFeedback(){const s=this._helperTextSlottedContent?.length?"":this.helperText,n=this.errorValidationMessage,r=this.successText;return r?{type:"success",message:r}:n?{type:"error",message:n}:s?{type:"helper",message:s}:{type:"none",message:""}}_slottedHelperTextFeedbackType(){return this._internalFeedback().type==="none"&&this._helperTextSlottedContent?.length?"helper":"none"}_getFeedbackTemplate(s){const n=s.tagFor(l);return a.html`
|
|
9
|
+
<${n} id="feedback" :type="${r=>r._internalFeedback().type}">
|
|
10
|
+
${r=>r._internalFeedback().message}
|
|
11
11
|
</${n}>
|
|
12
12
|
<${n}
|
|
13
13
|
id="slotted-helper-text-feedback"
|
|
14
|
-
:type="${
|
|
14
|
+
:type="${r=>r._slottedHelperTextFeedbackType()}"
|
|
15
15
|
>
|
|
16
|
-
<slot name="helper-text" ${
|
|
16
|
+
<slot name="helper-text" ${f.slotted("_helperTextSlottedContent")}></slot>
|
|
17
17
|
</${n}>
|
|
18
|
-
`}}return u([a.attr({attribute:"helper-text"})],
|
|
18
|
+
`}}return u([a.attr({attribute:"helper-text"})],e.prototype,"helperText"),u([a.observable],e.prototype,"_helperTextSlottedContent"),e},V=t=>{const e=()=>`vvd-feedback-${p()}`,i=()=>`vvd-slotted-feedback-${p()}`;class s extends T(t){constructor(){super(...arguments),this._slottedHelperTextIds=[],this._feedbackId=e()}_helperTextSlottedContentChanged(r,c){for(const d of c)d.id||(d.id=i());this._slottedHelperTextIds=c.map(d=>d.id)}get _feedbackDescribedBy(){return[this._feedbackId,...this._slottedHelperTextIds].join(" ")}_getFeedbackTemplate(r){const c=r.tagFor(l);return a.html`
|
|
19
19
|
<slot name="_feedback"></slot>
|
|
20
|
-
${
|
|
20
|
+
${k(a.html`<${c}
|
|
21
21
|
slot="_feedback"
|
|
22
|
-
id="${
|
|
23
|
-
:type="${
|
|
22
|
+
id="${d=>d._feedbackId}"
|
|
23
|
+
:type="${d=>d._internalFeedback().type}"
|
|
24
24
|
>
|
|
25
|
-
${
|
|
25
|
+
${d=>d._internalFeedback().message}
|
|
26
26
|
</${c}>`)}
|
|
27
|
-
<${c} :type="${
|
|
27
|
+
<${c} :type="${d=>d._slottedHelperTextFeedbackType()}">
|
|
28
28
|
<slot
|
|
29
29
|
name="helper-text"
|
|
30
|
-
${
|
|
30
|
+
${f.slotted("_helperTextSlottedContent")}
|
|
31
31
|
></slot>
|
|
32
32
|
</${c}>
|
|
33
|
-
`}}return u([a.observable],
|
|
33
|
+
`}}return u([a.observable],s.prototype,"_slottedHelperTextIds"),s};exports.WithFeedback=T;exports.WithLightDOMFeedback=V;exports.feedbackMessageDefinition=S;exports.generateRandomId=p;exports.renderInLightDOM=k;
|