@vonage/vivid 5.1.0 → 5.3.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 +2 -1
- package/alert/index.cjs +1 -1
- package/alert/index.js +1 -1
- package/audio-player/definition.cjs +41 -6
- package/audio-player/definition.js +41 -6
- package/audio-player/index.cjs +27 -25
- package/audio-player/index.js +88 -62
- package/badge/index.cjs +2 -2
- package/badge/index.js +4 -4
- 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 +1 -1
- package/bundled/calendar-picker.template.js +21 -21
- 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 +66 -37
- 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 +17 -14
- package/bundled/definition19.js +85 -77
- 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 +6 -6
- package/bundled/definition6.js +34 -31
- 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 +1 -1
- package/bundled/definition9.js +1 -1
- 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/localized.cjs +1 -1
- package/bundled/localized.js +43 -31
- 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 +18 -13
- package/bundled/picker-field.template.js +45 -37
- 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/text-field.cjs +1 -1
- package/bundled/text-field.js +1 -1
- package/bundled/time-selection-picker.template.cjs +1 -1
- package/bundled/time-selection-picker.template.js +5 -5
- package/bundled/vivid-element.cjs +1 -1
- package/bundled/vivid-element.js +2126 -1172
- package/bundled/when.cjs +1 -1
- package/bundled/when.js +8 -7
- package/bundled/with-contextual-help.cjs +1 -1
- package/bundled/with-contextual-help.js +17 -7
- package/calendar/definition.cjs +1 -1
- package/calendar/definition.js +2 -2
- package/calendar/index.cjs +1 -1
- package/calendar/index.js +6 -6
- package/calendar-event/index.cjs +1 -1
- package/calendar-event/index.js +1 -1
- package/card/definition.cjs +10 -2
- package/card/definition.js +10 -2
- 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 +13 -6
- package/combobox/definition.js +14 -7
- package/combobox/index.cjs +15 -11
- package/combobox/index.js +82 -75
- package/contextual-help/index.cjs +1 -1
- package/contextual-help/index.js +1 -1
- package/custom-elements.json +1621 -325
- 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/index.cjs +1 -1
- package/date-picker/index.js +2 -2
- package/date-range-picker/index.cjs +1 -1
- package/date-range-picker/index.js +2 -2
- package/date-time-picker/index.cjs +1 -1
- package/date-time-picker/index.js +2 -2
- package/dial-pad/definition.cjs +55 -1
- package/dial-pad/definition.js +56 -2
- package/dial-pad/index.cjs +21 -18
- package/dial-pad/index.js +138 -104
- package/dialog/definition.cjs +4 -1
- package/dialog/definition.js +4 -1
- package/dialog/index.cjs +21 -18
- package/dialog/index.js +43 -40
- 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/index.cjs +2 -2
- package/fab/index.js +4 -4
- package/file-picker/definition.cjs +16 -7
- package/file-picker/definition.js +17 -8
- package/file-picker/index.cjs +12 -9
- package/file-picker/index.js +103 -93
- package/icon/definition.cjs +10 -6
- package/icon/definition.js +10 -6
- package/index.cjs +4 -0
- package/index.js +1 -0
- 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 +6 -2
- 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 +495 -78
- 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 +906 -894
- package/lib/date-range-picker/date-range-picker.d.ts +596 -590
- package/lib/date-time-picker/date-time-picker.d.ts +907 -895
- package/lib/dial-pad/dial-pad.d.ts +3 -2
- package/lib/dial-pad/dial-pad.template.d.ts +1 -1
- package/lib/dial-pad/locale.d.ts +1 -0
- package/lib/dialog/dialog.d.ts +4 -4
- package/lib/divider/divider.d.ts +2 -2
- package/lib/fab/fab.d.ts +2 -2
- package/lib/file-picker/file-picker.d.ts +495 -78
- package/lib/header/header.d.ts +2 -2
- package/lib/menu/menu.d.ts +5 -4
- 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 +19 -18
- package/lib/option/option.d.ts +4 -4
- package/lib/pagination/pagination.d.ts +2 -2
- 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/option-tag.d.ts +2 -2
- package/lib/searchable-select/searchable-select.d.ts +521 -104
- package/lib/select/select.d.ts +484 -67
- 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 +6 -6
- 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/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 -16
- package/lib/text-field/text-field.d.ts +19 -18
- package/lib/time-picker/time-picker.d.ts +579 -573
- 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 +15 -3
- package/locales/de-DE.js +15 -3
- package/locales/en-GB.cjs +15 -3
- package/locales/en-GB.js +15 -3
- package/locales/en-US.cjs +15 -3
- package/locales/en-US.js +15 -3
- package/locales/ja-JP.cjs +15 -3
- package/locales/ja-JP.js +15 -3
- package/locales/zh-CN.cjs +15 -3
- package/locales/zh-CN.js +15 -3
- package/menu/definition.cjs +8 -4
- package/menu/definition.js +9 -5
- package/note/index.cjs +2 -2
- package/note/index.js +4 -4
- package/number-field/definition.cjs +3 -3
- package/number-field/definition.js +4 -4
- package/number-field/index.cjs +8 -8
- package/number-field/index.js +41 -40
- package/option/index.cjs +1 -1
- package/option/index.js +1 -1
- package/package.json +5 -5
- 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/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/index.cjs +1 -1
- package/range-slider/index.js +1 -1
- package/rich-text-editor/definition.cjs +1 -1
- package/rich-text-editor/definition.js +2 -2
- package/rich-text-editor/index.cjs +2 -2
- package/rich-text-editor/index.js +3 -3
- package/searchable-select/definition.cjs +30 -21
- package/searchable-select/definition.js +31 -22
- package/searchable-select/index.cjs +28 -25
- package/searchable-select/index.js +149 -140
- package/select/definition.cjs +15 -7
- package/select/definition.js +16 -8
- 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 +2 -2
- 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/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/index.d.ts +1 -0
- package/shared/patterns/form-elements/with-contextual-help.d.ts +7 -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 +454 -451
- package/shared/picker-field/mixins/calendar-picker.template.d.ts +454 -451
- 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 +600 -594
- package/shared/picker-field/mixins/single-date-picker.d.ts +746 -737
- package/shared/picker-field/mixins/single-value-picker.d.ts +451 -448
- package/shared/picker-field/mixins/time-selection-picker.d.ts +580 -574
- package/shared/picker-field/mixins/time-selection-picker.template.d.ts +579 -573
- package/shared/picker-field/picker-field.d.ts +495 -78
- 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 +28 -215
- package/simple-color-picker/definition.js +29 -216
- package/simple-color-picker/index.cjs +9 -21
- package/simple-color-picker/index.js +71 -185
- 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/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/index.cjs +1 -1
- package/tag/index.js +1 -1
- package/text-area/definition.cjs +1 -1
- package/text-area/definition.js +1 -1
- package/text-area/index.cjs +3 -3
- package/text-area/index.js +9 -9
- package/text-field/definition.cjs +3 -3
- package/text-field/definition.js +4 -4
- 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 +2 -2
- package/toggletip/definition.cjs +1 -1
- package/toggletip/definition.js +2 -2
- package/tree-view/definition.cjs +1 -1
- package/tree-view/definition.js +2 -2
- 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 +1 -1
- 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 +3 -3
- package/unbundled/calendar-picker.template.js +4 -4
- package/unbundled/definition2.cjs +1 -1
- package/unbundled/definition2.js +2 -2
- package/unbundled/definition3.cjs +2 -1
- package/unbundled/definition3.js +2 -1
- 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/mixins.cjs +34 -27
- package/unbundled/mixins.js +35 -28
- package/unbundled/picker-field.template.cjs +13 -5
- package/unbundled/picker-field.template.js +14 -6
- package/unbundled/text-field.cjs +1 -1
- package/unbundled/text-field.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/unbundled/with-contextual-help.cjs +11 -0
- package/unbundled/with-contextual-help.js +11 -0
- package/video-player/definition.cjs +69007 -1
- package/video-player/definition.js +69007 -1
- package/video-player/index.cjs +35 -35
- package/video-player/index.js +1358 -1384
- package/visually-hidden/index.cjs +1 -1
- package/visually-hidden/index.js +1 -1
- package/vivid.api.json +347 -69
package/bundled/definition19.js
CHANGED
|
@@ -1,40 +1,45 @@
|
|
|
1
|
-
import { P as
|
|
2
|
-
import { i as
|
|
3
|
-
import { l as
|
|
4
|
-
import {
|
|
5
|
-
import { a as T, f as
|
|
1
|
+
import { P as C, p as A } from "./definition9.js";
|
|
2
|
+
import { i as H } from "./definition2.js";
|
|
3
|
+
import { l as D } from "./definition11.js";
|
|
4
|
+
import { U as E, O as u, o as c, a as p, v as V, h, c as F, d as z } from "./vivid-element.js";
|
|
5
|
+
import { a as T, f as W } from "./mixins.js";
|
|
6
6
|
import { L as m } from "./listbox.js";
|
|
7
|
-
import { H as
|
|
7
|
+
import { H as L, a as P } from "./host-semantics.js";
|
|
8
8
|
import { F as B } from "./form-associated.js";
|
|
9
9
|
import { i as v } from "./numbers.js";
|
|
10
|
-
import { W as M } from "./with-
|
|
11
|
-
import { W as N } from "./with-
|
|
10
|
+
import { W as M } from "./with-contextual-help.js";
|
|
11
|
+
import { W as N } from "./with-error-text.js";
|
|
12
|
+
import { W as j } from "./with-success-text.js";
|
|
12
13
|
import { F as K } from "./form-element.js";
|
|
13
|
-
import { A as R, a as
|
|
14
|
-
import { u as
|
|
15
|
-
import { l as
|
|
16
|
-
import { L as
|
|
17
|
-
import { c as
|
|
18
|
-
import { h as
|
|
14
|
+
import { A as R, a as U, I as q } from "./affix.js";
|
|
15
|
+
import { u as X } from "./strings.js";
|
|
16
|
+
import { l as _, d as k, m as O, k as I, c as w, b as S, a as $, f as G } from "./key-codes.js";
|
|
17
|
+
import { L as J } from "./option.js";
|
|
18
|
+
import { c as Q } from "./definition3.js";
|
|
19
|
+
import { h as Y } from "./index.js";
|
|
19
20
|
import { r as f } from "./ref.js";
|
|
20
21
|
import { w as b } from "./when.js";
|
|
21
|
-
import { s as
|
|
22
|
-
import { c as
|
|
23
|
-
const
|
|
24
|
-
var
|
|
25
|
-
for (var i = o > 1 ? void 0 : o ?
|
|
26
|
-
(
|
|
27
|
-
return o && i &&
|
|
22
|
+
import { s as g } from "./slotted.js";
|
|
23
|
+
import { c as Z } from "./class-names.js";
|
|
24
|
+
const ee = ".chevron{display:flex;flex-shrink:0;font:var(--vvd-typography-base-extended);transform:rotate(0);transition:transform .2s}:host([data-expanded=true]) .chevron,:host([open]) .chevron{transform:rotate(180deg)}:host(:focus-visible){outline:none}:host{display:inline-flex;flex-direction:column;gap:4px;--_low-ink-color: var(--vvd-color-neutral-600);--focus-stroke-gap-color: transparent}:host([disabled]){--_low-ink-color: var(--vvd-color-neutral-400);cursor:not-allowed}.label{color:var(--vvd-color-canvas-text);contain:inline-size;font:var(--vvd-typography-base)}.control{--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--vvd-color-neutral-500)}.control.appearance-ghost{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}@media (hover: hover){.control:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--vvd-color-neutral-700)}.control:hover:where(:not(.disabled,:disabled,.readonly)).appearance-ghost{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}}.control.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--vvd-color-neutral-700)}.control.hover:where(:not(.disabled,:disabled,.readonly)).appearance-ghost{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.control:disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: var(--vvd-color-neutral-100);--_appearance-color-outline: var(--vvd-color-neutral-300)}.control:disabled.appearance-ghost{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.control.disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: var(--vvd-color-neutral-100);--_appearance-color-outline: var(--vvd-color-neutral-300)}.control.disabled.appearance-ghost{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.control.readonly:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-neutral-200);--_appearance-color-outline: var(--vvd-color-neutral-400)}.control.readonly:where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text: var(--vvd-color-neutral-600);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.control.error:where(:not(.disabled,:disabled)){--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-alert-50);--_appearance-color-outline: var(--vvd-color-alert-500)}.control.error:where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-alert-50);--_appearance-color-outline: transparent}.control.success:where(:not(.disabled,:disabled)){--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-success-50);--_appearance-color-outline: var(--vvd-color-success-500)}.control.success:where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-success-50);--_appearance-color-outline: transparent}.control{--_connotation-color-primary: var(--vvd-select-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-primary-text: var(--vvd-select-accent-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-select-accent-primary-increment, var(--vvd-color-neutral-800));--_connotation-color-intermediate: var(--vvd-select-accent-intermediate, var(--vvd-color-neutral-500));--_connotation-color-faint: var(--vvd-select-accent-faint, var(--vvd-color-neutral-50));--_connotation-color-soft: var(--vvd-select-accent-soft, var(--vvd-color-neutral-100));--_connotation-color-firm: var(--vvd-select-accent-firm, var(--vvd-color-canvas-text));--_connotation-color-fierce: var(--vvd-select-accent-fierce, var(--vvd-color-neutral-700))}.control{border-radius:var(--_select-control-border-radius);block-size:var(--_select-block-size);padding-inline:var(--_select-padding-inline)}.control{--_select-icon-size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))/2) ;--_select-block-size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) ;--_select-padding-inline: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))*.4) ;display:flex;align-items:center;justify-content:space-between;background-color:var(--_appearance-color-fill);box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);color:var(--_appearance-color-text);font:var(--vvd-typography-base);gap:8px;transition:box-shadow .2s,background-color .2s}.control.size-condensed{--_select-icon-size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))*.4) ;--_select-block-size: calc(1px*(32 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) ;--_select-padding-inline: calc(1px*(24 + 4*clamp(-1, var(--vvd-size-density, 0), 2))/2) }.control.size-condensed:not(.shape-pill){--_select-control-border-radius: 4px}.control-wrapper{position:relative}.control:not(.disabled){cursor:pointer}.control.disabled{pointer-events:none}.control:not(.shape-pill){--_select-control-border-radius: 8px}.control.shape-pill{--_select-control-border-radius: 24px}:host(:focus-visible) .control{box-shadow:0 0 0 4px color-mix(in srgb,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))}.listbox{display:flex;max-height:var(--select-height, 408px);flex-direction:column;padding:4px;gap:2px;overflow-y:auto}:host([multiple]:focus-visible) .listbox{box-shadow:0 0 0 4px color-mix(in srgb,var(--vvd-color-cta-500),transparent 85%),inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:1px solid var(--focus-stroke-color, var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset, 0px));border-radius:8px}.selected-value{display:flex;overflow:hidden;flex-grow:1;align-items:center;column-gap:12px;white-space:nowrap}.selected-value .text{overflow:hidden;max-inline-size:100%;text-overflow:ellipsis}.control.shows-placeholder .selected-value .text{color:var(--vvd-color-neutral-600)}.selected-value slot[name=icon]{flex:0 0 var(--_select-icon-size);font-size:var(--_select-icon-size);line-height:1}.control.has-meta .selected-value{padding-inline-end:8px}.feedback-wrapper{display:contents}::part(popup-base){inline-size:max-content;min-inline-size:var(--_select-fixed-width, 100%)}:host([multiple]) ::part(popup-base){position:static}.label-wrapper{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:var(--label-wrapper-gap, 8px)}.label-wrapper[hidden]{display:none}.label-wrapper .label{flex:1 1 auto}.label-wrapper slot[name=contextual-help]::slotted([data-vvd-component=contextual-help]){margin-inline-start:auto}";
|
|
25
|
+
var te = Object.defineProperty, oe = Object.getOwnPropertyDescriptor, n = (a, e, t, o) => {
|
|
26
|
+
for (var i = o > 1 ? void 0 : o ? oe(e, t) : e, l = a.length - 1, s; l >= 0; l--)
|
|
27
|
+
(s = a[l]) && (i = (o ? s(e, t, i) : s(i)) || i);
|
|
28
|
+
return o && i && te(e, t, i), i;
|
|
28
29
|
};
|
|
29
30
|
class r extends T(
|
|
30
31
|
M(
|
|
31
32
|
N(
|
|
32
|
-
|
|
33
|
+
j(
|
|
34
|
+
K(
|
|
35
|
+
L(R(B(m)))
|
|
36
|
+
)
|
|
37
|
+
)
|
|
33
38
|
)
|
|
34
39
|
)
|
|
35
40
|
) {
|
|
36
41
|
constructor() {
|
|
37
|
-
super(...arguments), this.proxy = document.createElement("select"), this.activeIndex = -1, this.rangeStartIndex = -1, this.open = !1, this.listboxId =
|
|
42
|
+
super(...arguments), this.proxy = document.createElement("select"), this.activeIndex = -1, this.rangeStartIndex = -1, this.open = !1, this.listboxId = X("listbox-"), this.maxHeight = 0, this.fixedDropdown = !1, this.placeholderOption = null, this._feedbackWrapper = null;
|
|
38
43
|
}
|
|
39
44
|
/**
|
|
40
45
|
* Returns the last checked option.
|
|
@@ -221,7 +226,7 @@ class r extends T(
|
|
|
221
226
|
if (!this.collapsible)
|
|
222
227
|
return;
|
|
223
228
|
if (this.open) {
|
|
224
|
-
this.focusAndScrollOptionIntoView(), this.indexWhenOpened = this.selectedIndex,
|
|
229
|
+
this.focusAndScrollOptionIntoView(), this.indexWhenOpened = this.selectedIndex, E.enqueue(() => this.focus());
|
|
225
230
|
return;
|
|
226
231
|
}
|
|
227
232
|
const o = e === !0 && t === !1, i = this.indexWhenOpened !== this.selectedIndex;
|
|
@@ -236,8 +241,8 @@ class r extends T(
|
|
|
236
241
|
valueChanged(e, t) {
|
|
237
242
|
let o = t;
|
|
238
243
|
if (this.length) {
|
|
239
|
-
const i = this._options.findIndex((x) => x.value === t),
|
|
240
|
-
(i === -1 ||
|
|
244
|
+
const i = this._options.findIndex((x) => x.value === t), l = this._options[this.selectedIndex]?.value ?? null, s = this._options[i]?.value ?? null;
|
|
245
|
+
(i === -1 || l !== s) && (o = "", this.selectedIndex = i), o = this.firstSelectedOption?.value ?? o;
|
|
241
246
|
}
|
|
242
247
|
if (t !== o) {
|
|
243
248
|
this.value = o;
|
|
@@ -276,7 +281,7 @@ class r extends T(
|
|
|
276
281
|
* @internal
|
|
277
282
|
*/
|
|
278
283
|
clickHandler(e) {
|
|
279
|
-
if (this.disabled)
|
|
284
|
+
if (this.disabled || this._isFromContextualHelp(e))
|
|
280
285
|
return;
|
|
281
286
|
const t = e.target.closest(
|
|
282
287
|
"option,[role=option],[data-vvd-component=option]"
|
|
@@ -339,8 +344,8 @@ class r extends T(
|
|
|
339
344
|
*/
|
|
340
345
|
selectedOptionsChanged(e, t) {
|
|
341
346
|
super.selectedOptionsChanged(e, t), this.options.forEach((o, i) => {
|
|
342
|
-
const
|
|
343
|
-
|
|
347
|
+
const l = this.proxy.options.item(i);
|
|
348
|
+
l && (l.selected = o.selected);
|
|
344
349
|
});
|
|
345
350
|
}
|
|
346
351
|
/**
|
|
@@ -364,31 +369,31 @@ class r extends T(
|
|
|
364
369
|
return;
|
|
365
370
|
const { key: t, shiftKey: o } = e;
|
|
366
371
|
switch (this.shouldSkipFocus = !1, t) {
|
|
367
|
-
case
|
|
372
|
+
case $: {
|
|
368
373
|
this.checkFirstOption(o);
|
|
369
374
|
return;
|
|
370
375
|
}
|
|
371
|
-
case
|
|
376
|
+
case S: {
|
|
372
377
|
this.checkNextOption(o);
|
|
373
378
|
return;
|
|
374
379
|
}
|
|
375
|
-
case
|
|
380
|
+
case w: {
|
|
376
381
|
this.checkPreviousOption(o);
|
|
377
382
|
return;
|
|
378
383
|
}
|
|
379
|
-
case
|
|
384
|
+
case I: {
|
|
380
385
|
this.checkLastOption(o);
|
|
381
386
|
return;
|
|
382
387
|
}
|
|
383
|
-
case
|
|
388
|
+
case O: {
|
|
384
389
|
this.focusAndScrollOptionIntoView();
|
|
385
390
|
return;
|
|
386
391
|
}
|
|
387
|
-
case
|
|
392
|
+
case k: {
|
|
388
393
|
this.uncheckAllOptions(), this.checkActiveIndex();
|
|
389
394
|
return;
|
|
390
395
|
}
|
|
391
|
-
case
|
|
396
|
+
case _:
|
|
392
397
|
if (e.preventDefault(), this.typeaheadExpired) {
|
|
393
398
|
this.toggleSelectedForAllCheckedOptions();
|
|
394
399
|
return;
|
|
@@ -408,27 +413,27 @@ class r extends T(
|
|
|
408
413
|
keydownHandler(e) {
|
|
409
414
|
const t = this.selectedIndex;
|
|
410
415
|
switch (this.multiple ? this.multipleKeydownHandler(e) : super.keydownHandler(e), e.key) {
|
|
411
|
-
case
|
|
416
|
+
case _: {
|
|
412
417
|
e.preventDefault(), this.collapsible && this.typeaheadExpired && (this.open = !this.open);
|
|
413
418
|
break;
|
|
414
419
|
}
|
|
415
|
-
case
|
|
416
|
-
case
|
|
420
|
+
case $:
|
|
421
|
+
case I: {
|
|
417
422
|
e.preventDefault();
|
|
418
423
|
break;
|
|
419
424
|
}
|
|
420
|
-
case
|
|
425
|
+
case G: {
|
|
421
426
|
e.preventDefault(), this.open = !this.open;
|
|
422
427
|
break;
|
|
423
428
|
}
|
|
424
|
-
case
|
|
429
|
+
case k: {
|
|
425
430
|
this.collapsible && this.open && (e.preventDefault(), this.open = !1);
|
|
426
431
|
break;
|
|
427
432
|
}
|
|
428
|
-
case
|
|
433
|
+
case O:
|
|
429
434
|
return this.collapsible && this.open && (e.preventDefault(), this.open = !1), !0;
|
|
430
435
|
}
|
|
431
|
-
return this.collapsible && !this.open && this.selectedIndex !== t && this.updateValue(!0), !(e.key ===
|
|
436
|
+
return this.collapsible && !this.open && this.selectedIndex !== t && this.updateValue(!0), !(e.key === S || e.key === w);
|
|
432
437
|
}
|
|
433
438
|
connectedCallback() {
|
|
434
439
|
super.connectedCallback(), this.addEventListener("focusout", this.focusoutHandler), this.addEventListener("contentchange", this.updateDisplayValue);
|
|
@@ -489,7 +494,7 @@ n([
|
|
|
489
494
|
p({ attribute: "open", mode: "boolean" })
|
|
490
495
|
], r.prototype, "open", 2);
|
|
491
496
|
n([
|
|
492
|
-
|
|
497
|
+
V
|
|
493
498
|
], r.prototype, "collapsible", 1);
|
|
494
499
|
n([
|
|
495
500
|
c
|
|
@@ -524,27 +529,27 @@ n([
|
|
|
524
529
|
n([
|
|
525
530
|
c
|
|
526
531
|
], r.prototype, "metaSlottedContent", 2);
|
|
527
|
-
const
|
|
532
|
+
const ae = ({
|
|
528
533
|
shape: a,
|
|
529
534
|
disabled: e,
|
|
530
535
|
appearance: t,
|
|
531
536
|
metaSlottedContent: o,
|
|
532
537
|
errorValidationMessage: i,
|
|
533
|
-
successText:
|
|
534
|
-
placeholder:
|
|
538
|
+
successText: l,
|
|
539
|
+
placeholder: s,
|
|
535
540
|
value: x,
|
|
536
|
-
scale:
|
|
537
|
-
}) =>
|
|
541
|
+
scale: y
|
|
542
|
+
}) => Z(
|
|
538
543
|
["disabled", e],
|
|
539
544
|
[`appearance-${t}`, !!t],
|
|
540
545
|
[`shape-${a}`, !!a],
|
|
541
546
|
["has-meta", !!o?.length],
|
|
542
547
|
["error", !!i],
|
|
543
|
-
["success", !!
|
|
544
|
-
["shows-placeholder", !!
|
|
545
|
-
[`size-${
|
|
548
|
+
["success", !!l],
|
|
549
|
+
["shows-placeholder", !!s && !x],
|
|
550
|
+
[`size-${y}`, !!y]
|
|
546
551
|
);
|
|
547
|
-
function
|
|
552
|
+
function ie() {
|
|
548
553
|
return h` <label
|
|
549
554
|
for="${(a) => a.multiple ? null : "control"}"
|
|
550
555
|
class="label"
|
|
@@ -553,17 +558,17 @@ function ae() {
|
|
|
553
558
|
${(a) => a.label}
|
|
554
559
|
</label>`;
|
|
555
560
|
}
|
|
556
|
-
function
|
|
557
|
-
const e = a.tagFor(
|
|
561
|
+
function re(a) {
|
|
562
|
+
const e = a.tagFor(J);
|
|
558
563
|
return h`
|
|
559
564
|
<${e} ${f("placeholderOption")}
|
|
560
565
|
text="${(t) => t.placeholder}" hidden disabled>
|
|
561
566
|
</${e}>`;
|
|
562
567
|
}
|
|
563
|
-
function
|
|
564
|
-
const e =
|
|
568
|
+
function ne(a) {
|
|
569
|
+
const e = U(a), t = Q(a);
|
|
565
570
|
return h` <div
|
|
566
|
-
class="control ${
|
|
571
|
+
class="control ${ae}"
|
|
567
572
|
${f("_anchor")}
|
|
568
573
|
id="control"
|
|
569
574
|
?disabled="${(o) => o.disabled}"
|
|
@@ -571,22 +576,25 @@ function re(a) {
|
|
|
571
576
|
<div class="selected-value">
|
|
572
577
|
${(o) => e(o.icon, q.Slot)}
|
|
573
578
|
<span class="text">${(o) => o.displayValue}</span>
|
|
574
|
-
<slot name="meta" ${
|
|
579
|
+
<slot name="meta" ${g("metaSlottedContent")}></slot>
|
|
575
580
|
</div>
|
|
576
581
|
${t}
|
|
577
582
|
</div>`;
|
|
578
583
|
}
|
|
579
|
-
function
|
|
584
|
+
function le(a) {
|
|
580
585
|
return a.open && a.fixedDropdown ? `--_select-fixed-width: ${Math.round(a.getBoundingClientRect().width)}px` : null;
|
|
581
586
|
}
|
|
582
587
|
function se(a) {
|
|
583
|
-
const e = a.tagFor(
|
|
588
|
+
const e = a.tagFor(C);
|
|
584
589
|
return h`
|
|
585
|
-
|
|
590
|
+
<div class="label-wrapper" ?hidden=${(t) => !t.label && !t._hasContextualHelp}>
|
|
591
|
+
${b((t) => t.label, ie())}
|
|
592
|
+
<slot name="contextual-help" ${g("_contextualHelpSlottedContent")}></slot>
|
|
593
|
+
</div>
|
|
586
594
|
<div class="control-wrapper">
|
|
587
|
-
${b((t) => !t.multiple,
|
|
595
|
+
${b((t) => !t.multiple, ne(a))}
|
|
588
596
|
<${e} class="popup"
|
|
589
|
-
style="${
|
|
597
|
+
style="${le}"
|
|
590
598
|
?open="${(t) => t.collapsible ? t.open : !0}"
|
|
591
599
|
:anchor="${(t) => t._anchor}"
|
|
592
600
|
placement="bottom-start"
|
|
@@ -600,9 +608,9 @@ function se(a) {
|
|
|
600
608
|
?disabled="${(t) => t.disabled}"
|
|
601
609
|
?hidden="${(t) => t.collapsible ? !t.open : !1}"
|
|
602
610
|
${f("listbox")}>
|
|
603
|
-
${b((t) => t.placeholder,
|
|
611
|
+
${b((t) => t.placeholder, re(a))}
|
|
604
612
|
<slot
|
|
605
|
-
${
|
|
613
|
+
${g({
|
|
606
614
|
filter: m.slottedOptionFilter,
|
|
607
615
|
flatten: !0,
|
|
608
616
|
property: "slottedOptions"
|
|
@@ -616,7 +624,7 @@ function se(a) {
|
|
|
616
624
|
function d(a) {
|
|
617
625
|
return (e, t) => t.event.composedPath().includes(e._feedbackWrapper) ? !0 : a(e, t.event);
|
|
618
626
|
}
|
|
619
|
-
const
|
|
627
|
+
const ce = (a) => h`
|
|
620
628
|
<template
|
|
621
629
|
class="base"
|
|
622
630
|
${P({
|
|
@@ -635,7 +643,7 @@ const le = (a) => h`
|
|
|
635
643
|
@focusout="${d(
|
|
636
644
|
(e, t) => e.focusoutHandler(t)
|
|
637
645
|
)}"
|
|
638
|
-
@keydown="${d((e, t) => (e.open &&
|
|
646
|
+
@keydown="${d((e, t) => (e.open && Y(t), e.keydownHandler(t)))}"
|
|
639
647
|
@mousedown="${d(
|
|
640
648
|
(e, t) => e.mousedownHandler(t)
|
|
641
649
|
)}"
|
|
@@ -645,22 +653,22 @@ const le = (a) => h`
|
|
|
645
653
|
${(e) => e._getFeedbackTemplate(a)}
|
|
646
654
|
</div>
|
|
647
655
|
</template>
|
|
648
|
-
`,
|
|
656
|
+
`, pe = z(
|
|
649
657
|
"select",
|
|
650
658
|
r,
|
|
651
|
-
|
|
659
|
+
ce,
|
|
652
660
|
[
|
|
653
|
-
|
|
661
|
+
A,
|
|
662
|
+
H,
|
|
654
663
|
D,
|
|
655
|
-
|
|
656
|
-
L
|
|
664
|
+
W
|
|
657
665
|
],
|
|
658
666
|
{
|
|
659
|
-
styles:
|
|
667
|
+
styles: ee
|
|
660
668
|
}
|
|
661
|
-
),
|
|
669
|
+
), Fe = F(pe);
|
|
662
670
|
export {
|
|
663
671
|
r as S,
|
|
664
|
-
|
|
665
|
-
|
|
672
|
+
Fe as r,
|
|
673
|
+
pe as s
|
|
666
674
|
};
|
package/bundled/definition2.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const r=require("./vivid-element.cjs"),h=require("./
|
|
1
|
+
"use strict";const r=require("./vivid-element.cjs"),h=require("./definition13.cjs"),u=require("./_has.cjs"),b=require("./class-names.cjs"),d=require("./when.cjs"),w=":host{display:inline-block;vertical-align:sub}.control.connotation-accent{--_connotation-color-primary: var(--vvd-icon-accent-primary, var(--vvd-color-canvas-text))}.control.connotation-announcement{--_connotation-color-primary: var(--vvd-icon-announcement-primary, var(--vvd-color-announcement-500))}.control.connotation-cta{--_connotation-color-primary: var(--vvd-icon-cta-primary, var(--vvd-color-cta-500))}.control.connotation-success{--_connotation-color-primary: var(--vvd-icon-success-primary, var(--vvd-color-success-500))}.control.connotation-warning{--_connotation-color-primary: var(--vvd-icon-warning-primary, var(--vvd-color-warning-300))}.control.connotation-alert{--_connotation-color-primary: var(--vvd-icon-alert-primary, var(--vvd-color-alert-500))}.control.connotation-information{--_connotation-color-primary: var(--vvd-icon-information-primary, var(--vvd-color-information-500))}.control.size--6{--_icon-block-size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2)) - (1px*(24 + 4*clamp(-1, var(--vvd-size-density, 0), 2)))) }.control.size--5{--_icon-block-size: calc(1px*(20 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.control.size--4{--_icon-block-size: calc(1px*(24 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.control.size--3{--_icon-block-size: calc(1px*(28 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.control.size--2{--_icon-block-size: calc(1px*(32 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.control.size--1{--_icon-block-size: calc(1px*(36 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.control.size-0{--_icon-block-size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.control.size-1{--_icon-block-size: calc(1px*(44 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.control.size-2{--_icon-block-size: calc(1px*(48 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.control.size-3{--_icon-block-size: calc(1px*(52 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.control.size-4{--_icon-block-size: calc(1px*(56 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.control.size-5{--_icon-block-size: calc(1px*(60 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.control:not(.size--6,.size--5,.size--4,.size--3,.size--2,.size--1,.size-0,.size-1,.size-2,.size-3,.size-4,.size-5){--_icon-block-size: 1em}.control{display:flex;margin:unset;block-size:var(--_icon-block-size);color:currentColor;contain:strict;inline-size:var(--_icon-block-size)}.control[class*=connotation]{color:var(--_connotation-color-primary)}slot,svg,::slotted(:where(svg,img)){margin:auto;block-size:inherit;inline-size:inherit}";function x(n,o){switch(n){case 0:return function(){return o.apply(this,arguments)};case 1:return function(e){return o.apply(this,arguments)};case 2:return function(e,t){return o.apply(this,arguments)};case 3:return function(e,t,i){return o.apply(this,arguments)};case 4:return function(e,t,i,a){return o.apply(this,arguments)};case 5:return function(e,t,i,a,s){return o.apply(this,arguments)};case 6:return function(e,t,i,a,s,v){return o.apply(this,arguments)};case 7:return function(e,t,i,a,s,v,p){return o.apply(this,arguments)};case 8:return function(e,t,i,a,s,v,p,m){return o.apply(this,arguments)};case 9:return function(e,t,i,a,s,v,p,m,f){return o.apply(this,arguments)};case 10:return function(e,t,i,a,s,v,p,m,f,U){return o.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function k(n){return n}var C=u._curry1(k),L=u._curry2(function(o,e){var t={};return x(e.length,function(){var i=o.apply(this,arguments);return u._has(i,t)||(t[i]=e.apply(this,arguments)),t[i]})});const $="https://icon.resources.vonage.com",y="4.6.9",E={toView(n){return n===void 0?null:n.toString()},fromView(n){if(typeof n=="string"&&(n=parseFloat(n.toString())),typeof n=="number")return isNaN(n)||!isFinite(n)?void 0:n}},g=`<svg width="80%" height="80%" viewBox="0 0 64 64">
|
|
2
2
|
<g>
|
|
3
3
|
<g stroke-width="6" stroke-linecap="round" fill="none">
|
|
4
4
|
<path stroke="currentColor" d="M4,32 c0,15,12,28,28,28c8,0,16-4,21-9">
|
|
@@ -10,11 +10,15 @@
|
|
|
10
10
|
</g>
|
|
11
11
|
</g>
|
|
12
12
|
</svg>`;var O=Object.defineProperty,D=Object.getOwnPropertyDescriptor,l=(n,o,e,t)=>{for(var i=t>1?void 0:t?D(o,e):o,a=n.length-1,s;a>=0;a--)(s=n[a])&&(i=(t?s(o,e,i):s(i))||i);return t&&i&&O(o,e,i),i};const I=500,S=2e3,z=(n,o)=>[$,`v${o}`,n].join("/"),T=({ok:n,headers:o})=>{if(!n||o.get("content-type")!=="image/svg+xml")throw new Error("Something went wrong")},N=n=>(T(n),n.text()),P=(n,o)=>fetch(z([n,"svg"].join("."),y),{signal:o}).then(N),R=L(C,(n,o)=>n.trim()?P(n,o):Promise.resolve(""));class c extends r.VividElement{constructor(){super(...arguments),this.iconLoaded=!1,this.#t=null}get iconUrl(){return this.name?z(`${this.name}.svg`,y):this._svg}#t;async nameChanged(){this.#t&&this.#t.abort(),this.#t=new AbortController,this._svg=void 0,this.iconLoaded=!1;let o=setTimeout(()=>{this._svg=g,o=setTimeout(()=>{this._svg===g&&(this._svg=void 0)},S)},I);await R(this.name?this.name:"",this.#t.signal).then(e=>{this._svg=e}).catch(()=>{this._svg=void 0}).finally(()=>{clearTimeout(o),this.iconLoaded=!0})}}l([r.attr],c.prototype,"connotation",2);l([r.attr({converter:E})],c.prototype,"size",2);l([r.observable],c.prototype,"_svg",2);l([r.observable],c.prototype,"iconLoaded",2);l([r.attr],c.prototype,"label",2);l([r.attr],c.prototype,"name",2);l([r.volatile],c.prototype,"iconUrl",1);const V=({connotation:n,size:o})=>b.classNames("control",[`connotation-${n}`,!!n],[`size-${o}`,typeof o=="number"]),A=n=>{const o=n.tagFor(h.VisuallyHidden),e=t=>!t.label||t.label.trim().length===0;return r.html`
|
|
13
|
-
<figure
|
|
13
|
+
<figure
|
|
14
|
+
class="${V}"
|
|
15
|
+
?aria-hidden="${t=>e(t)}"
|
|
16
|
+
?aria-busy="${t=>!t?.iconLoaded}"
|
|
17
|
+
>
|
|
14
18
|
<slot>
|
|
15
|
-
${d.when(t=>!t
|
|
16
|
-
${d.when(t=>t
|
|
19
|
+
${d.when(t=>!t?.iconLoaded,r.html`<img alt="${t=>t?.name}" src="${t=>t?.iconUrl}" />`)}
|
|
20
|
+
${d.when(t=>t?.iconLoaded&&t?._svg,t=>r.html`${r.html.partial(t._svg)}`)}
|
|
17
21
|
</slot>
|
|
18
|
-
<${o} class="label">${t=>t
|
|
22
|
+
<${o} class="label">${t=>t?.label}</${o}>
|
|
19
23
|
</figure>
|
|
20
24
|
`},_=r.defineVividComponent("icon",c,A,[h.visuallyHiddenDefinition],{styles:w}),H=r.createRegisterFunction(_);exports.Icon=c;exports.iconDefinition=_;exports.registerIcon=H;
|
package/bundled/definition2.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { V as f, a as
|
|
2
|
-
import { V as k, v as C } from "./
|
|
1
|
+
import { V as f, a as p, o as y, v as b, h as v, c as w, d as x } from "./vivid-element.js";
|
|
2
|
+
import { V as k, v as C } from "./definition13.js";
|
|
3
3
|
import { a as L, b as $, _ as E } from "./_has.js";
|
|
4
4
|
import { c as O } from "./class-names.js";
|
|
5
5
|
import { w as d } from "./when.js";
|
|
@@ -35,19 +35,19 @@ function T(o, n) {
|
|
|
35
35
|
return n.apply(this, arguments);
|
|
36
36
|
};
|
|
37
37
|
case 7:
|
|
38
|
-
return function(a, t, r, e, i, l,
|
|
38
|
+
return function(a, t, r, e, i, l, m) {
|
|
39
39
|
return n.apply(this, arguments);
|
|
40
40
|
};
|
|
41
41
|
case 8:
|
|
42
|
-
return function(a, t, r, e, i, l,
|
|
42
|
+
return function(a, t, r, e, i, l, m, u) {
|
|
43
43
|
return n.apply(this, arguments);
|
|
44
44
|
};
|
|
45
45
|
case 9:
|
|
46
|
-
return function(a, t, r, e, i, l,
|
|
46
|
+
return function(a, t, r, e, i, l, m, u, _) {
|
|
47
47
|
return n.apply(this, arguments);
|
|
48
48
|
};
|
|
49
49
|
case 10:
|
|
50
|
-
return function(a, t, r, e, i, l,
|
|
50
|
+
return function(a, t, r, e, i, l, m, u, _, G) {
|
|
51
51
|
return n.apply(this, arguments);
|
|
52
52
|
};
|
|
53
53
|
default:
|
|
@@ -123,10 +123,10 @@ class s extends f {
|
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
c([
|
|
126
|
-
|
|
126
|
+
p
|
|
127
127
|
], s.prototype, "connotation", 2);
|
|
128
128
|
c([
|
|
129
|
-
|
|
129
|
+
p({ converter: P })
|
|
130
130
|
], s.prototype, "size", 2);
|
|
131
131
|
c([
|
|
132
132
|
y
|
|
@@ -135,10 +135,10 @@ c([
|
|
|
135
135
|
y
|
|
136
136
|
], s.prototype, "iconLoaded", 2);
|
|
137
137
|
c([
|
|
138
|
-
|
|
138
|
+
p
|
|
139
139
|
], s.prototype, "label", 2);
|
|
140
140
|
c([
|
|
141
|
-
|
|
141
|
+
p
|
|
142
142
|
], s.prototype, "name", 2);
|
|
143
143
|
c([
|
|
144
144
|
b
|
|
@@ -149,19 +149,23 @@ const W = ({ connotation: o, size: n }) => O(
|
|
|
149
149
|
[`size-${n}`, typeof n == "number"]
|
|
150
150
|
), Y = (o) => {
|
|
151
151
|
const n = o.tagFor(k), a = (t) => !t.label || t.label.trim().length === 0;
|
|
152
|
-
return
|
|
153
|
-
<figure
|
|
152
|
+
return v`
|
|
153
|
+
<figure
|
|
154
|
+
class="${W}"
|
|
155
|
+
?aria-hidden="${(t) => a(t)}"
|
|
156
|
+
?aria-busy="${(t) => !t?.iconLoaded}"
|
|
157
|
+
>
|
|
154
158
|
<slot>
|
|
155
159
|
${d(
|
|
156
|
-
(t) => !t
|
|
157
|
-
|
|
160
|
+
(t) => !t?.iconLoaded,
|
|
161
|
+
v`<img alt="${(t) => t?.name}" src="${(t) => t?.iconUrl}" />`
|
|
158
162
|
)}
|
|
159
163
|
${d(
|
|
160
|
-
(t) => t
|
|
161
|
-
(t) =>
|
|
164
|
+
(t) => t?.iconLoaded && t?._svg,
|
|
165
|
+
(t) => v`${v.partial(t._svg)}`
|
|
162
166
|
)}
|
|
163
167
|
</slot>
|
|
164
|
-
<${n} class="label">${(t) => t
|
|
168
|
+
<${n} class="label">${(t) => t?.label}</${n}>
|
|
165
169
|
</figure>
|
|
166
170
|
`;
|
|
167
171
|
}, q = x(
|
package/bundled/definition22.cjs
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
"use strict";const h=require("./definition2.cjs"),r=require("./vivid-element.cjs"),d=require("./affix.cjs"),u=require("./host-semantics.cjs"),x=require("./dom.cjs"),
|
|
1
|
+
"use strict";const h=require("./definition2.cjs"),r=require("./vivid-element.cjs"),d=require("./affix.cjs"),u=require("./host-semantics.cjs"),x=require("./dom.cjs"),b=require("./children.cjs"),v=require("./when.cjs"),m=require("./slotted.cjs"),_=require("./ref.cjs"),g=require("./class-names.cjs"),y=":host(:focus-visible){outline:none}:host([disabled]){cursor:not-allowed}.control{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.control:disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.control.disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}@media (hover: hover){.control:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}}.control.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.control:active:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.control.active:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.control.selected:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-primary-text);--_appearance-color-fill: var(--_connotation-color-primary);--_appearance-color-outline: transparent}@media (hover: hover){.control.selected:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-primary-text);--_appearance-color-fill: var(--_connotation-color-primary-increment);--_appearance-color-outline: transparent}}.control.selected.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-primary-text);--_appearance-color-fill: var(--_connotation-color-primary-increment);--_appearance-color-outline: transparent}.control{--_connotation-color-primary: var(--vvd-tree-item-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-primary-text: var(--vvd-tree-item-accent-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-tree-item-accent-primary-increment, var(--vvd-color-neutral-800));--_connotation-color-faint: var(--vvd-tree-item-accent-faint, var(--vvd-color-neutral-50));--_connotation-color-soft: var(--vvd-tree-item-accent-soft, var(--vvd-color-neutral-100));--_connotation-color-firm: var(--vvd-tree-item-accent-firm, var(--vvd-color-canvas-text))}.control{position:relative;display:inline-flex;box-sizing:border-box;align-items:center;border-radius:8px;background-color:var(--_appearance-color-fill);box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);color:var(--_appearance-color-text);font:var(--vvd-typography-base);gap:12px;hyphens:auto;inline-size:100%;min-block-size:calc(1px*(40 + 4*clamp(-1,var(--vvd-size-density, 0),2)));padding-inline:16px;text-decoration:none;vertical-align:middle;word-break:break-word}@supports (user-select: none){.control{user-select:none}}.control:not(.disabled){cursor:pointer}.control.disabled{pointer-events:none}:host(:focus-visible) .control{box-shadow:0 0 0 4px color-mix(in srgb,var(--vvd-color-cta-500),transparent 85%),inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:1px solid var(--focus-stroke-color, var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset, 0px))}:host(:focus-visible) .control:not(.selected){--focus-stroke-gap-color: transparent}.control .text{font:var(--vvd-typography-base)}.expandCollapseButton{display:flex;align-items:center;border-radius:8px;font-size:20px}.expandCollapseButton .expandCollapseIcon{margin:4px}@media (hover: hover){.expandCollapseButton:hover{background-color:var(--vvd-color-neutral-100)}.selected .expandCollapseButton:hover{background-color:var(--vvd-color-neutral-700)}}.items{display:flex;flex-direction:column;gap:4px;margin-block-start:4px;padding-inline-start:48px}slot[name=icon]{font-size:20px;line-height:1}.control:not(.disabled,.selected) slot[name=icon]{color:var(--vvd-color-neutral-600)}";var C=Object.defineProperty,i=(t,o,n,e)=>{for(var l=void 0,s=t.length-1,p;s>=0;s--)(p=t[s])&&(l=p(o,n,l)||l);return l&&C(o,n,l),l};function c(t){return x.isHTMLElement(t)&&(t.getAttribute("role")==="treeitem"||t instanceof a)}class a extends u.HostSemantics(d.AffixIcon(r.VividElement)){constructor(){super(...arguments),this.expanded=!1,this.selected=!1,this.disabled=!1,this.focusable=!1,this.isNestedItem=()=>c(this.parentElement),this.handleExpandCollapseButtonClick=o=>{!this.disabled&&!o.defaultPrevented&&(this.expanded=!this.expanded)},this.handleFocus=o=>{this.setAttribute("tabindex","0")},this.handleBlur=o=>{this.setAttribute("tabindex","-1")}}expandedChanged(){this.$fastController.isConnected&&this.$emit("expanded-change",this)}selectedChanged(){this.$fastController.isConnected&&this.$emit("selected-change",this)}itemsChanged(){this.$fastController.isConnected&&this.items.forEach(o=>{c(o)&&(o.nested=!0)})}static focusItem(o){o.focusable=!0,o.focus()}childItemLength(){return this.childItems.filter(n=>c(n)).length}}i([r.attr],a.prototype,"text");i([r.attr({mode:"boolean"})],a.prototype,"expanded");i([r.attr({mode:"boolean"})],a.prototype,"selected");i([r.attr({mode:"boolean"})],a.prototype,"disabled");i([r.observable],a.prototype,"focusable");i([r.observable],a.prototype,"childItems");i([r.observable],a.prototype,"items");i([r.observable],a.prototype,"nested");i([r.observable],a.prototype,"renderCollapsedChildren");const I=({disabled:t,selected:o})=>g.classNames("control",["disabled",t],["selected",!!o]),$=t=>{const o=t.tagFor(h.Icon);return r.html`
|
|
2
2
|
<div aria-hidden="true"
|
|
3
3
|
class="expandCollapseButton"
|
|
4
|
-
@click="${(e
|
|
5
|
-
${
|
|
4
|
+
@click="${(n,e)=>n.handleExpandCollapseButtonClick(e.event)}"
|
|
5
|
+
${_.ref("expandCollapseButton")}
|
|
6
6
|
>
|
|
7
|
-
<${o} class="expandCollapseIcon" name="${
|
|
8
|
-
</div>`},w=t=>{const o=d.affixIconTemplateFactory(t);return r.html` <template
|
|
7
|
+
<${o} class="expandCollapseIcon" name="${n=>n.expanded?"chevron-down-line":"chevron-right-line"}"></${o}>
|
|
8
|
+
</div>`},w=t=>{const o=d.affixIconTemplateFactory(t),n=t.tagFor(a,!0);return r.html` <template
|
|
9
9
|
slot="${e=>e.isNestedItem()?"item":void 0}"
|
|
10
10
|
tabindex="-1"
|
|
11
11
|
${u.applyHostSemantics({role:"treeitem",ariaExpanded:e=>e.childItems&&e.childItems.length>0?e.expanded:void 0,ariaSelected:e=>e.selected,ariaDisabled:e=>e.disabled})}
|
|
12
12
|
@focusin="${(e,l)=>e.handleFocus(l.event)}"
|
|
13
13
|
@focusout="${(e,l)=>e.handleBlur(l.event)}"
|
|
14
|
-
${b.children({property:"childItems",filter:
|
|
14
|
+
${b.children({property:"childItems",filter:m.elements(n)})}
|
|
15
15
|
>
|
|
16
16
|
<div class="${I}">
|
|
17
|
-
${
|
|
17
|
+
${v.when(e=>e.childItems&&e.childItems.length>0,$(t))}
|
|
18
18
|
${e=>o(e.icon,d.IconWrapper.Slot)}
|
|
19
19
|
${e=>e.text}
|
|
20
20
|
</div>
|
|
21
|
-
${
|
|
22
|
-
<slot name="item" ${
|
|
21
|
+
${v.when(e=>e.childItems&&e.childItems.length>0&&e.expanded,r.html` <div role="group" class="items">
|
|
22
|
+
<slot name="item" ${m.slotted("items")}></slot>
|
|
23
23
|
</div>`)}
|
|
24
24
|
</template>`},f=r.defineVividComponent("tree-item",a,w,[h.iconDefinition],{styles:y}),k=r.createRegisterFunction(f);exports.TreeItem=a;exports.isTreeItemElement=c;exports.registerTreeItem=k;exports.treeItemDefinition=f;
|