@vonage/vivid 5.5.0 → 5.6.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/LICENSE.md +201 -0
- package/accordion/definition.cjs +5 -0
- package/accordion/definition.js +5 -0
- package/accordion/index.cjs +1 -1
- package/accordion/index.js +14 -3
- package/alert/definition.cjs +4 -12
- package/alert/definition.js +5 -13
- package/alert/index.cjs +11 -11
- package/alert/index.js +33 -37
- package/audio-player/definition.cjs +4 -0
- package/audio-player/definition.js +4 -0
- package/audio-player/index.cjs +1 -1
- package/audio-player/index.js +8 -2
- package/banner/definition.cjs +2 -4
- package/banner/definition.js +2 -4
- package/banner/index.cjs +2 -2
- package/banner/index.js +1 -1
- package/breadcrumb/definition.cjs +1 -0
- package/breadcrumb/definition.js +1 -0
- package/breadcrumb/index.cjs +1 -1
- package/breadcrumb/index.js +1 -0
- package/bundled/affix.js +1 -1
- 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 +3 -1
- package/bundled/base-color-picker.cjs +1 -1
- package/bundled/base-color-picker.js +9 -3
- package/bundled/base-progress.cjs +1 -1
- package/bundled/base-progress.js +3 -0
- package/bundled/button.cjs +1 -1
- package/bundled/button.js +14 -10
- package/bundled/calendar-picker.template.cjs +1 -1
- package/bundled/calendar-picker.template.js +2 -0
- package/bundled/definition10.cjs +7 -7
- package/bundled/definition10.js +27 -17
- package/bundled/definition11.cjs +2 -2
- package/bundled/definition11.js +5 -5
- package/bundled/definition12.cjs +1 -1
- package/bundled/definition12.js +1 -0
- package/bundled/definition17.cjs +1 -1
- package/bundled/definition17.js +4 -1
- package/bundled/definition18.cjs +1 -1
- package/bundled/definition18.js +13 -2
- package/bundled/definition19.cjs +6 -6
- package/bundled/definition19.js +68 -33
- package/bundled/definition2.cjs +8 -9
- package/bundled/definition2.js +67 -75
- package/bundled/definition22.cjs +1 -1
- package/bundled/definition22.js +1 -0
- package/bundled/definition3.cjs +1 -1
- package/bundled/definition3.js +1 -0
- package/bundled/definition5.cjs +1 -1
- package/bundled/definition5.js +9 -3
- package/bundled/definition6.cjs +1 -1
- package/bundled/definition6.js +1 -0
- package/bundled/definition7.cjs +1 -1
- package/bundled/definition7.js +7 -4
- package/bundled/definition8.cjs +1 -1
- package/bundled/definition8.js +1 -0
- package/bundled/definition9.cjs +6 -6
- package/bundled/definition9.js +545 -488
- package/bundled/delegates-aria.cjs +1 -1
- package/bundled/delegates-aria.js +3 -1
- package/bundled/form-associated.cjs +1 -1
- package/bundled/form-associated.js +11 -3
- package/bundled/host-semantics.js +4 -4
- package/bundled/listbox.cjs +1 -1
- package/bundled/listbox.js +21 -3
- package/bundled/localized.cjs +1 -1
- package/bundled/localized.js +137 -67
- package/bundled/mixins.cjs +4 -4
- package/bundled/mixins.js +10 -7
- package/bundled/picker-field.template.cjs +1 -1
- package/bundled/picker-field.template.js +1 -0
- package/bundled/scrollIntoView.cjs +1 -1
- package/bundled/scrollIntoView.js +4 -1
- package/bundled/text-field.cjs +1 -1
- package/bundled/text-field.js +1 -1
- package/bundled/time-selection-picker.template.cjs +2 -2
- package/bundled/time-selection-picker.template.js +3 -0
- package/bundled/vivid-element.cjs +4 -4
- package/bundled/vivid-element.js +529 -492
- package/calendar/definition.cjs +2 -0
- package/calendar/definition.js +2 -0
- package/calendar/index.cjs +1 -1
- package/calendar/index.js +2 -0
- package/checkbox/definition.cjs +1 -0
- package/checkbox/definition.js +1 -0
- package/color-picker/definition.cjs +5 -0
- package/color-picker/definition.js +5 -0
- package/color-picker/index.cjs +1 -1
- package/color-picker/index.js +5 -0
- package/combobox/definition.cjs +17 -6
- package/combobox/definition.js +17 -6
- package/combobox/index.cjs +14 -9
- package/combobox/index.js +53 -41
- package/custom-elements.json +6985 -542
- package/data-grid/definition.cjs +105 -7
- package/data-grid/definition.js +105 -7
- package/data-grid/index.cjs +52 -38
- package/data-grid/index.js +313 -242
- package/date-range-picker/definition.cjs +2 -0
- package/date-range-picker/definition.js +2 -0
- package/date-range-picker/index.cjs +1 -1
- package/date-range-picker/index.js +5 -1
- package/dial-pad/definition.cjs +9 -0
- package/dial-pad/definition.js +9 -0
- package/dial-pad/index.cjs +2 -2
- package/dial-pad/index.js +36 -12
- package/dialog/definition.cjs +1 -0
- package/dialog/definition.js +1 -0
- package/dialog/index.cjs +1 -1
- package/dialog/index.js +1 -0
- package/fab/definition.cjs +1 -0
- package/fab/definition.js +1 -0
- package/fab/index.cjs +1 -1
- package/fab/index.js +1 -0
- package/file-picker/definition.cjs +7 -2
- package/file-picker/definition.js +7 -2
- package/file-picker/index.cjs +6 -6
- package/file-picker/index.js +82 -73
- package/icon/definition.cjs +12 -21
- package/icon/definition.js +13 -22
- package/index.cjs +21 -0
- package/index.js +1 -1
- package/lib/data-grid/locale.d.ts +5 -0
- package/lib/date-picker/date-picker.d.ts +38 -38
- package/lib/date-range-picker/date-range-picker.d.ts +20 -20
- package/lib/date-time-picker/date-time-picker.d.ts +40 -40
- package/lib/icon/icon.d.ts +0 -1
- package/lib/menu/menu.d.ts +4 -4
- package/lib/rich-text-editor/definition.d.ts +3 -2
- package/lib/rich-text-editor/locale.d.ts +29 -3
- package/lib/rich-text-editor/popover.d.ts +19 -0
- package/lib/rich-text-editor/rich-text-editor.d.ts +16 -45
- package/lib/rich-text-editor/rich-text-editor.template.d.ts +2 -2
- package/lib/rich-text-editor/rte/config.d.ts +18 -0
- package/lib/rich-text-editor/rte/document.d.ts +28 -0
- package/lib/rich-text-editor/rte/exports.d.ts +23 -0
- package/lib/rich-text-editor/rte/feature.d.ts +46 -0
- package/lib/rich-text-editor/rte/features/internal/basic-text-blocks.d.ts +33 -0
- package/lib/rich-text-editor/rte/features/internal/foreign-html.d.ts +11 -0
- package/lib/rich-text-editor/rte/features/internal/history.d.ts +10 -0
- package/lib/rich-text-editor/rte/features/internal/text-style.d.ts +18 -0
- package/lib/rich-text-editor/rte/html-parser.d.ts +24 -0
- package/lib/rich-text-editor/rte/html-serializer.d.ts +30 -0
- package/lib/rich-text-editor/rte/instance.d.ts +57 -0
- package/lib/rich-text-editor/rte/utils/default-textblock.d.ts +2 -0
- package/lib/rich-text-editor/rte/utils/impl.d.ts +1 -0
- package/lib/rich-text-editor/rte/utils/textblock-attrs.d.ts +29 -0
- package/lib/rich-text-editor/rte/utils/textblock-marks.d.ts +10 -0
- package/lib/rich-text-editor/rte/utils/ui.d.ts +109 -0
- package/lib/simple-color-picker/simple-color-picker.d.ts +4 -4
- package/lib/text-area/text-area.d.ts +1 -1
- package/lib/text-field/text-field.d.ts +1 -1
- package/lib/time-picker/time-picker.d.ts +20 -20
- package/lib/toggletip/toggletip.d.ts +4 -4
- package/lib/tooltip/tooltip.d.ts +4 -4
- package/locales/de-DE.cjs +42 -4
- package/locales/de-DE.js +42 -4
- package/locales/en-GB.cjs +43 -5
- package/locales/en-GB.js +43 -5
- package/locales/en-US.cjs +43 -5
- package/locales/en-US.js +43 -5
- package/locales/ja-JP.cjs +43 -5
- package/locales/ja-JP.js +43 -5
- package/locales/zh-CN.cjs +43 -5
- package/locales/zh-CN.js +43 -5
- package/menu/definition.cjs +1 -0
- package/menu/definition.js +1 -0
- package/number-field/definition.cjs +5 -3
- package/number-field/definition.js +5 -3
- package/number-field/index.cjs +5 -3
- package/number-field/index.js +31 -29
- package/package.json +76 -62
- package/pagination/definition.cjs +2 -0
- package/pagination/definition.js +2 -0
- package/pagination/index.cjs +1 -1
- package/pagination/index.js +2 -0
- package/radio/definition.cjs +4 -0
- package/radio/definition.js +4 -0
- package/range-slider/definition.cjs +2 -1
- package/range-slider/definition.js +2 -1
- package/range-slider/index.cjs +1 -1
- package/range-slider/index.js +3 -1
- package/rich-text-editor/definition.cjs +17942 -1074
- package/rich-text-editor/definition.js +17926 -1079
- package/rich-text-editor/index.cjs +29 -130
- package/rich-text-editor/index.js +5565 -2474
- package/searchable-select/definition.cjs +6 -2
- package/searchable-select/definition.js +6 -2
- package/searchable-select/index.cjs +1 -1
- package/searchable-select/index.js +11 -7
- package/select/definition.cjs +17 -2
- package/select/definition.js +17 -2
- package/shared/patterns/anchored.d.ts +8 -8
- package/shared/patterns/char-count/char-count.d.ts +1 -1
- package/shared/patterns/localized.d.ts +386 -0
- package/shared/picker-field/mixins/calendar-picker.d.ts +10 -10
- package/shared/picker-field/mixins/calendar-picker.template.d.ts +10 -10
- package/shared/picker-field/mixins/min-max-calendar-picker.d.ts +20 -20
- package/shared/picker-field/mixins/single-date-picker.d.ts +28 -28
- package/shared/picker-field/mixins/single-value-picker.d.ts +8 -8
- package/shared/picker-field/mixins/time-selection-picker.d.ts +20 -20
- package/shared/picker-field/mixins/time-selection-picker.template.d.ts +20 -20
- package/shared/utils/promise.d.ts +7 -0
- package/simple-color-picker/definition.cjs +3 -0
- package/simple-color-picker/definition.js +3 -0
- package/simple-color-picker/index.cjs +1 -1
- package/simple-color-picker/index.js +3 -0
- package/slider/definition.cjs +7 -1
- package/slider/definition.js +7 -1
- package/styles/core/all.css +5 -1
- package/styles/core/theme.css +5 -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/definition.cjs +1 -0
- package/switch/definition.js +1 -0
- package/switch/index.cjs +1 -1
- package/switch/index.js +1 -0
- package/tabs/definition.cjs +2 -0
- package/tabs/definition.js +2 -0
- package/tabs/index.cjs +1 -1
- package/tabs/index.js +2 -0
- package/text-area/definition.cjs +13 -7
- package/text-area/definition.js +13 -7
- package/text-area/index.cjs +6 -6
- package/text-area/index.js +20 -14
- package/text-field/definition.cjs +16 -6
- package/text-field/definition.js +16 -6
- package/toggletip/definition.cjs +5 -1
- package/toggletip/definition.js +5 -1
- package/tooltip/definition.cjs +4 -1
- package/tooltip/definition.js +4 -1
- package/tree-view/definition.cjs +28 -6
- package/tree-view/definition.js +28 -6
- package/tree-view/index.cjs +1 -1
- package/tree-view/index.js +28 -6
- package/unbundled/_commonjsHelpers.cjs +0 -26
- package/unbundled/_commonjsHelpers.js +1 -26
- package/unbundled/attribute-binding-behaviour.cjs +1 -0
- package/unbundled/attribute-binding-behaviour.js +1 -0
- package/unbundled/base-color-picker.cjs +9 -3
- package/unbundled/base-color-picker.js +9 -3
- package/unbundled/base-progress.cjs +3 -0
- package/unbundled/base-progress.js +3 -0
- package/unbundled/button.cjs +14 -10
- package/unbundled/button.js +14 -10
- package/unbundled/calendar-picker.template.cjs +2 -0
- package/unbundled/calendar-picker.template.js +2 -0
- package/unbundled/definition.cjs +1 -0
- package/unbundled/definition.js +1 -0
- package/unbundled/definition2.cjs +4 -1
- package/unbundled/definition2.js +4 -1
- package/unbundled/definition3.cjs +1 -0
- package/unbundled/definition3.js +1 -0
- package/unbundled/definition4.cjs +1 -0
- package/unbundled/definition4.js +1 -0
- package/unbundled/definition5.cjs +3 -2
- package/unbundled/definition5.js +4 -3
- package/unbundled/delegates-aria.cjs +1 -0
- package/unbundled/delegates-aria.js +1 -0
- package/unbundled/form-associated.cjs +4 -0
- package/unbundled/form-associated.js +4 -0
- package/unbundled/listbox.cjs +16 -1
- package/unbundled/listbox.js +16 -1
- package/unbundled/localized.cjs +36 -0
- package/unbundled/localized.js +37 -2
- package/unbundled/mixins.cjs +2 -0
- package/unbundled/mixins.js +2 -0
- package/unbundled/picker-field.template.cjs +1 -0
- package/unbundled/picker-field.template.js +1 -0
- package/unbundled/scrollIntoView.cjs +1 -0
- package/unbundled/scrollIntoView.js +1 -0
- package/unbundled/text-field.cjs +1 -1
- package/unbundled/text-field.js +1 -1
- package/unbundled/time-selection-picker.template.cjs +3 -0
- package/unbundled/time-selection-picker.template.js +3 -0
- package/unbundled/vivid-element.cjs +1 -1
- package/unbundled/vivid-element.js +1 -1
- package/video-player/definition.cjs +54 -44
- package/video-player/definition.js +50 -40
- package/video-player/index.cjs +28 -28
- package/video-player/index.js +1448 -1442
- package/vivid.api.json +6463 -6099
- package/lib/rich-text-editor/facades/prose-mirror-vivid.schema.d.ts +0 -4
- package/lib/rich-text-editor/facades/vivid-prose-mirror.facade.d.ts +0 -18
- package/lib/rich-text-editor/image-placeholder/definition.d.ts +0 -2
- package/lib/rich-text-editor/image-placeholder/image-placeholder.d.ts +0 -7
- package/lib/rich-text-editor/image-placeholder/image-placeholder.template.d.ts +0 -4
- package/lib/rich-text-editor/menubar/consts.d.ts +0 -18
- package/lib/rich-text-editor/menubar/definition.d.ts +0 -2
- package/lib/rich-text-editor/menubar/menubar.d.ts +0 -386
- package/lib/rich-text-editor/menubar/menubar.template.d.ts +0 -4
package/bundled/definition19.js
CHANGED
|
@@ -5,33 +5,32 @@ import { U as z, O as u, o as p, a as c, v as T, h, c as W, d as L } from "./viv
|
|
|
5
5
|
import { a as P, f as B } from "./mixins.js";
|
|
6
6
|
import { L as S } from "./listbox.js";
|
|
7
7
|
import { H as N, a as M } from "./host-semantics.js";
|
|
8
|
-
import { F as
|
|
8
|
+
import { F as K } from "./form-associated.js";
|
|
9
9
|
import { i as v } from "./numbers.js";
|
|
10
|
-
import { W as
|
|
11
|
-
import { W as
|
|
10
|
+
import { W as R } from "./with-contextual-help.js";
|
|
11
|
+
import { W as j } from "./with-error-text.js";
|
|
12
12
|
import { W as U } from "./with-success-text.js";
|
|
13
13
|
import { F as q } from "./form-element.js";
|
|
14
14
|
import { A as X, a as G, I as J } from "./affix.js";
|
|
15
15
|
import { u as Q } from "./strings.js";
|
|
16
|
-
import { l as g, d as y, m as _, k, c as I, b as
|
|
16
|
+
import { l as g, d as y, m as _, k, c as I, b as O, a as w, f as Y } from "./key-codes.js";
|
|
17
17
|
import { c as Z } from "./definition3.js";
|
|
18
18
|
import { h as ee } from "./index.js";
|
|
19
19
|
import { r as b } from "./ref.js";
|
|
20
20
|
import { w as f } from "./when.js";
|
|
21
21
|
import { s as x } from "./slotted.js";
|
|
22
22
|
import { c as te } from "./class-names.js";
|
|
23
|
-
|
|
24
|
-
var
|
|
25
|
-
for (var a = o > 1 ? void 0 : o ? re(e, t) : e, n = r.length - 1, s; n >= 0; n--)
|
|
23
|
+
var oe = Object.defineProperty, ae = Object.getOwnPropertyDescriptor, l = (r, e, t, o) => {
|
|
24
|
+
for (var a = o > 1 ? void 0 : o ? ae(e, t) : e, n = r.length - 1, s; n >= 0; n--)
|
|
26
25
|
(s = r[n]) && (a = (o ? s(e, t, a) : s(a)) || a);
|
|
27
|
-
return o && a &&
|
|
26
|
+
return o && a && oe(e, t, a), a;
|
|
28
27
|
};
|
|
29
28
|
class i extends P(
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
R(
|
|
30
|
+
j(
|
|
32
31
|
U(
|
|
33
32
|
q(
|
|
34
|
-
N(X(
|
|
33
|
+
N(X(K(S)))
|
|
35
34
|
)
|
|
36
35
|
)
|
|
37
36
|
)
|
|
@@ -82,6 +81,7 @@ class i extends P(
|
|
|
82
81
|
*/
|
|
83
82
|
checkActiveIndex() {
|
|
84
83
|
const e = this.activeOption;
|
|
84
|
+
/* v8 ignore else -- @preserve */
|
|
85
85
|
e && (e.checked = !0);
|
|
86
86
|
}
|
|
87
87
|
/**
|
|
@@ -95,9 +95,14 @@ class i extends P(
|
|
|
95
95
|
* @internal
|
|
96
96
|
*/
|
|
97
97
|
checkFirstOption(e) {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
98
|
+
if (e) {
|
|
99
|
+
/* v8 ignore else -- @preserve */
|
|
100
|
+
this.rangeStartIndex === -1 && (this.rangeStartIndex = this.activeIndex + 1), this.options.forEach((t, o) => {
|
|
101
|
+
t.checked = v(o, this.rangeStartIndex);
|
|
102
|
+
});
|
|
103
|
+
} else
|
|
104
|
+
this.uncheckAllOptions();
|
|
105
|
+
this.activeIndex = 0, this.checkActiveIndex();
|
|
101
106
|
}
|
|
102
107
|
/**
|
|
103
108
|
* Decrements the active index and sets the matching option as checked.
|
|
@@ -110,9 +115,14 @@ class i extends P(
|
|
|
110
115
|
* @internal
|
|
111
116
|
*/
|
|
112
117
|
checkLastOption(e) {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
118
|
+
if (e) {
|
|
119
|
+
/* v8 ignore else -- @preserve */
|
|
120
|
+
this.rangeStartIndex === -1 && (this.rangeStartIndex = this.activeIndex), this.options.forEach((t, o) => {
|
|
121
|
+
t.checked = v(o, this.rangeStartIndex, this.length);
|
|
122
|
+
});
|
|
123
|
+
} else
|
|
124
|
+
this.uncheckAllOptions();
|
|
125
|
+
this.activeIndex = this.length - 1, this.checkActiveIndex();
|
|
116
126
|
}
|
|
117
127
|
/**
|
|
118
128
|
* Increments the active index and marks the matching option as checked.
|
|
@@ -125,9 +135,14 @@ class i extends P(
|
|
|
125
135
|
* @internal
|
|
126
136
|
*/
|
|
127
137
|
checkNextOption(e) {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
138
|
+
if (e) {
|
|
139
|
+
/* v8 ignore else -- @preserve */
|
|
140
|
+
this.rangeStartIndex === -1 && (this.rangeStartIndex = this.activeIndex), this.options.forEach((t, o) => {
|
|
141
|
+
t.checked = v(o, this.rangeStartIndex, this.activeIndex + 1);
|
|
142
|
+
});
|
|
143
|
+
} else
|
|
144
|
+
this.uncheckAllOptions();
|
|
145
|
+
this.activeIndex += this.activeIndex < this.length - 1 ? 1 : 0, this.checkActiveIndex();
|
|
131
146
|
}
|
|
132
147
|
/**
|
|
133
148
|
* Decrements the active index and marks the matching option as checked.
|
|
@@ -140,9 +155,16 @@ class i extends P(
|
|
|
140
155
|
* @internal
|
|
141
156
|
*/
|
|
142
157
|
checkPreviousOption(e) {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
158
|
+
if (e) {
|
|
159
|
+
/* v8 ignore else -- @preserve */
|
|
160
|
+
this.rangeStartIndex === -1 && (this.rangeStartIndex = this.activeIndex);
|
|
161
|
+
/* v8 ignore else -- @preserve */
|
|
162
|
+
this.checkedOptions.length === 1 && (this.rangeStartIndex += 1), this.options.forEach((t, o) => {
|
|
163
|
+
t.checked = v(o, this.activeIndex, this.rangeStartIndex);
|
|
164
|
+
});
|
|
165
|
+
} else
|
|
166
|
+
this.uncheckAllOptions();
|
|
167
|
+
this.activeIndex -= this.activeIndex > 0 ? 1 : 0, this.checkActiveIndex();
|
|
146
168
|
}
|
|
147
169
|
/**
|
|
148
170
|
* @internal
|
|
@@ -161,6 +183,7 @@ class i extends P(
|
|
|
161
183
|
focusinHandler(e) {
|
|
162
184
|
if (!this.multiple)
|
|
163
185
|
return super.focusinHandler(e);
|
|
186
|
+
/* v8 ignore else -- @preserve */
|
|
164
187
|
!this.shouldSkipFocus && e.target === e.currentTarget && (this.uncheckAllOptions(), this.activeIndex === -1 && (this.activeIndex = this.firstSelectedOptionIndex !== -1 ? this.firstSelectedOptionIndex : 0), this.checkActiveIndex(), this.setSelectedOptions(), this.focusAndScrollOptionIntoView()), this.shouldSkipFocus = !1;
|
|
165
188
|
}
|
|
166
189
|
/**
|
|
@@ -173,6 +196,7 @@ class i extends P(
|
|
|
173
196
|
super.setSelectedOptions();
|
|
174
197
|
return;
|
|
175
198
|
}
|
|
199
|
+
/* v8 ignore else -- @preserve */
|
|
176
200
|
this.$fastController.isConnected && this.options && (this.selectedOptions = this.options.filter((e) => e.selected), this.focusAndScrollOptionIntoView());
|
|
177
201
|
}
|
|
178
202
|
/**
|
|
@@ -198,6 +222,7 @@ class i extends P(
|
|
|
198
222
|
super.typeaheadBufferChanged(e, t);
|
|
199
223
|
return;
|
|
200
224
|
}
|
|
225
|
+
/* v8 ignore if -- @preserve */
|
|
201
226
|
if (this.$fastController.isConnected) {
|
|
202
227
|
const o = this.getTypeaheadMatches(), a = this.options.indexOf(o[0]);
|
|
203
228
|
a > -1 && (this.activeIndex = a, this.uncheckAllOptions(), this.checkActiveIndex()), this.typeaheadExpired = !1;
|
|
@@ -214,7 +239,9 @@ class i extends P(
|
|
|
214
239
|
* @internal
|
|
215
240
|
*/
|
|
216
241
|
uncheckAllOptions(e = !1) {
|
|
217
|
-
this.options.forEach((t) => t.checked = !1)
|
|
242
|
+
this.options.forEach((t) => t.checked = !1);
|
|
243
|
+
/* v8 ignore else -- @preserve */
|
|
244
|
+
e || (this.rangeStartIndex = -1);
|
|
218
245
|
}
|
|
219
246
|
/**
|
|
220
247
|
* Sets focus when the open property changes.
|
|
@@ -294,6 +321,7 @@ class i extends P(
|
|
|
294
321
|
this.focus();
|
|
295
322
|
return;
|
|
296
323
|
}
|
|
324
|
+
/* v8 ignore else -- @preserve */
|
|
297
325
|
this.options.includes(t) || (this.open = !1, this.indexWhenOpened !== this.selectedIndex && this.updateValue(!0));
|
|
298
326
|
}
|
|
299
327
|
/**
|
|
@@ -323,7 +351,9 @@ class i extends P(
|
|
|
323
351
|
multipleChanged(e, t) {
|
|
324
352
|
this.options.forEach((o) => {
|
|
325
353
|
o.checked = t ? !1 : void 0;
|
|
326
|
-
}), this.setSelectedOptions()
|
|
354
|
+
}), this.setSelectedOptions();
|
|
355
|
+
/* v8 ignore if -- @preserve */
|
|
356
|
+
this.proxy && (this.proxy.multiple = t);
|
|
327
357
|
}
|
|
328
358
|
/**
|
|
329
359
|
* Updates the selectedness of each option when the list of selected options changes.
|
|
@@ -345,6 +375,7 @@ class i extends P(
|
|
|
345
375
|
* @internal
|
|
346
376
|
*/
|
|
347
377
|
setProxyOptions() {
|
|
378
|
+
/* v8 ignore else -- @preserve */
|
|
348
379
|
this.proxy instanceof HTMLSelectElement && this.options && (this.proxy.length = 0, this.options.forEach((e) => {
|
|
349
380
|
const t = e.proxy || (e instanceof HTMLOptionElement ? e.cloneNode() : null);
|
|
350
381
|
t && this.proxy.options.add(t);
|
|
@@ -360,11 +391,11 @@ class i extends P(
|
|
|
360
391
|
return;
|
|
361
392
|
const { key: t, shiftKey: o } = e;
|
|
362
393
|
switch (this.shouldSkipFocus = !1, t) {
|
|
363
|
-
case
|
|
394
|
+
case w: {
|
|
364
395
|
this.checkFirstOption(o);
|
|
365
396
|
return;
|
|
366
397
|
}
|
|
367
|
-
case
|
|
398
|
+
case O: {
|
|
368
399
|
this.checkNextOption(o);
|
|
369
400
|
return;
|
|
370
401
|
}
|
|
@@ -384,12 +415,16 @@ class i extends P(
|
|
|
384
415
|
this.uncheckAllOptions(), this.checkActiveIndex();
|
|
385
416
|
return;
|
|
386
417
|
}
|
|
387
|
-
case g:
|
|
388
|
-
|
|
418
|
+
case g: {
|
|
419
|
+
e.preventDefault();
|
|
420
|
+
/* v8 ignore else -- @preserve */
|
|
421
|
+
if (this.typeaheadExpired) {
|
|
389
422
|
this.toggleSelectedForAllCheckedOptions();
|
|
390
423
|
return;
|
|
391
424
|
}
|
|
425
|
+
}
|
|
392
426
|
default: {
|
|
427
|
+
/* v8 ignore else -- @preserve */
|
|
393
428
|
t.length === 1 && this.handleTypeAhead(`${t}`);
|
|
394
429
|
return;
|
|
395
430
|
}
|
|
@@ -408,7 +443,7 @@ class i extends P(
|
|
|
408
443
|
e.preventDefault(), this.collapsible && this.typeaheadExpired && (this.open = !this.open);
|
|
409
444
|
break;
|
|
410
445
|
}
|
|
411
|
-
case
|
|
446
|
+
case w:
|
|
412
447
|
case k: {
|
|
413
448
|
e.preventDefault();
|
|
414
449
|
break;
|
|
@@ -424,7 +459,7 @@ class i extends P(
|
|
|
424
459
|
case _:
|
|
425
460
|
return this.collapsible && this.open && (e.preventDefault(), this.open = !1), !0;
|
|
426
461
|
}
|
|
427
|
-
return this.collapsible && !this.open && this.selectedIndex !== t && this.updateValue(!0), !(e.key ===
|
|
462
|
+
return this.collapsible && !this.open && this.selectedIndex !== t && this.updateValue(!0), !(e.key === O || e.key === I);
|
|
428
463
|
}
|
|
429
464
|
connectedCallback() {
|
|
430
465
|
super.connectedCallback(), this.addEventListener("focusout", this.focusoutHandler), this.addEventListener("contentchange", this.updateDisplayValue);
|
|
@@ -518,7 +553,7 @@ l([
|
|
|
518
553
|
l([
|
|
519
554
|
p
|
|
520
555
|
], i.prototype, "metaSlottedContent", 2);
|
|
521
|
-
const ne = ({
|
|
556
|
+
const re = ".label-wrapper{display:flex;flex-direction:row;align-items:center;gap:var(--label-wrapper-gap, 4px)}.label-wrapper[hidden]{display:none}.label:not(slot),.label::slotted(label){flex:0 1 auto}.chevron{display:flex;flex-shrink:0;font:var(--vvd-typography-base-extended);transform:rotate(0);transition:transform .2s}:host([data-expanded=true]) .chevron,:host([open]) .chevron{transform:rotate(180deg)}:host(:focus-visible){outline:none}:host{display:inline-flex;flex-direction:column;gap:4px;--_low-ink-color: var(--vvd-color-neutral-600);--focus-stroke-gap-color: transparent}:host([disabled]){--_low-ink-color: var(--vvd-color-neutral-400);cursor:not-allowed}.label{color:var(--vvd-color-canvas-text);font:var(--vvd-typography-base)}.control{--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--vvd-color-neutral-500)}.control.appearance-ghost{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}@media (hover: hover){.control:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--vvd-color-neutral-700)}.control:hover:where(:not(.disabled,:disabled,.readonly)).appearance-ghost{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}}.control.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--vvd-color-neutral-700)}.control.hover:where(:not(.disabled,:disabled,.readonly)).appearance-ghost{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.control:disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: var(--vvd-color-neutral-100);--_appearance-color-outline: var(--vvd-color-neutral-300)}.control:disabled.appearance-ghost{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.control.disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: var(--vvd-color-neutral-100);--_appearance-color-outline: var(--vvd-color-neutral-300)}.control.disabled.appearance-ghost{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.control.readonly:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-neutral-200);--_appearance-color-outline: var(--vvd-color-neutral-400)}.control.readonly:where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text: var(--vvd-color-neutral-600);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.control.error:where(:not(.disabled,:disabled)){--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-alert-50);--_appearance-color-outline: var(--vvd-color-alert-500)}.control.error:where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-alert-50);--_appearance-color-outline: transparent}.control.success:where(:not(.disabled,:disabled)){--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-success-50);--_appearance-color-outline: var(--vvd-color-success-500)}.control.success:where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-success-50);--_appearance-color-outline: transparent}.control{--_connotation-color-primary: var(--vvd-select-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-primary-text: var(--vvd-select-accent-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-select-accent-primary-increment, var(--vvd-color-neutral-800));--_connotation-color-intermediate: var(--vvd-select-accent-intermediate, var(--vvd-color-neutral-500));--_connotation-color-faint: var(--vvd-select-accent-faint, var(--vvd-color-neutral-50));--_connotation-color-soft: var(--vvd-select-accent-soft, var(--vvd-color-neutral-100));--_connotation-color-firm: var(--vvd-select-accent-firm, var(--vvd-color-canvas-text));--_connotation-color-fierce: var(--vvd-select-accent-fierce, var(--vvd-color-neutral-700))}.control{border-radius:var(--_select-control-border-radius);block-size:var(--_select-block-size);padding-inline:var(--_select-padding-inline)}.control{--_select-icon-size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))/2) ;--_select-block-size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) ;--_select-padding-inline: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))*.4) ;display:flex;align-items:center;justify-content:space-between;background-color:var(--_appearance-color-fill);box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);color:var(--_appearance-color-text);font:var(--vvd-typography-base);gap:8px;transition:box-shadow .2s,background-color .2s}.control.size-condensed{--_select-icon-size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))*.4) ;--_select-block-size: calc(1px*(32 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) ;--_select-padding-inline: calc(1px*(24 + 4*clamp(-1, var(--vvd-size-density, 0), 2))/2) }.control.size-condensed:not(.shape-pill){--_select-control-border-radius: 4px}.control-wrapper{position:relative}.control:not(.disabled){cursor:pointer}.control.disabled{pointer-events:none}.control:not(.shape-pill){--_select-control-border-radius: 8px}.control.shape-pill{--_select-control-border-radius: 24px}.listbox{display:flex;max-height:var(--select-height, 408px);flex-direction:column;padding:4px;gap:2px;overflow-y:auto}:host([multiple]:focus-visible) .listbox{box-shadow:0 0 0 4px color-mix(in srgb,var(--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}:host(:focus-within) .control:not(.has-activedescendant){--focus-stroke-gap-color: transparent;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(:not([multiple])) ::slotted([data-vvd-component=option][current-selected]){border-radius:8px;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));--focus-stroke-gap-color: transparent}", ne = ({
|
|
522
557
|
shape: r,
|
|
523
558
|
disabled: e,
|
|
524
559
|
appearance: t,
|
|
@@ -655,7 +690,7 @@ const de = (r) => h`
|
|
|
655
690
|
B
|
|
656
691
|
],
|
|
657
692
|
{
|
|
658
|
-
styles:
|
|
693
|
+
styles: re
|
|
659
694
|
}
|
|
660
695
|
), ze = W(he);
|
|
661
696
|
export {
|
package/bundled/definition2.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const e=require("./vivid-element.cjs"),p=require("./definition14.cjs"),z=require("./class-names.cjs"),h=require("./when.cjs"),y=":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}",g="https://icon.resources.vonage.com",u="4.6.9",f={toView(o){return o===void 0?null:o.toString()},fromView(o){if(typeof o=="string"&&(o=parseFloat(o.toString())),typeof o=="number")return isNaN(o)||!isFinite(o)?void 0:o}},d=`<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">
|
|
@@ -9,16 +9,15 @@
|
|
|
9
9
|
</animateTransform>
|
|
10
10
|
</g>
|
|
11
11
|
</g>
|
|
12
|
-
</svg>`;var
|
|
12
|
+
</svg>`;var b=Object.defineProperty,v=(o,t,n,i)=>{for(var r=void 0,a=o.length-1,c;a>=0;a--)(c=o[a])&&(r=c(t,n,r)||r);return r&&b(t,n,r),r};const _=500,k=2e3,w=(o,t)=>[g,`v${t}`,o].join("/"),x=({ok:o,headers:t})=>{if(!o||t.get("content-type")!=="image/svg+xml")throw new Error("Something went wrong")},C=o=>(x(o),o.text()),E=(o,t)=>fetch(w(`${o}.svg`,u),{signal:t}).then(C),L=o=>(o??"").trim(),l=new Map,I=(o,t)=>{const n=L(o);if(!n)return Promise.resolve("");const i=l.get(n);if(i&&!i.signal?.aborted)return i.promise;const r=E(n,t).then(a=>{const c=l.get(n);if(c&&c.promise===r&&t.aborted)throw l.delete(n),t.reason??new DOMException("Aborted","AbortError");return a}).catch(a=>{const c=l.get(n);throw c&&c.promise===r&&l.delete(n),a});return l.set(n,{promise:r,signal:t}),r};class s extends e.VividElement{constructor(){super(...arguments),this.iconLoaded=!1,this.#o=0,this.#t=null}#o;#t;async nameChanged(){const t=++this.#o;this.#t&&this.#t.abort(),this.#t=new AbortController,this._svg=void 0,this.iconLoaded=!1;let n=setTimeout(()=>{/* v8 ignore else -- @preserve */this.#o===t&&(this._svg=d,n=setTimeout(()=>{/* v8 ignore else -- @preserve */this.#o===t&&this._svg===d&&(this._svg=void 0)},k))},_);try{const i=await I(this.name,this.#t.signal);/* v8 ignore else -- @preserve */this.#o===t&&(this._svg=i)}catch{this.#o===t&&(this._svg=void 0)}finally{this.#o===t&&(clearTimeout(n),this.iconLoaded=!0)}}}v([e.attr],s.prototype,"connotation");v([e.attr({converter:f})],s.prototype,"size");v([e.observable],s.prototype,"_svg");v([e.observable],s.prototype,"iconLoaded");v([e.attr],s.prototype,"label");v([e.attr],s.prototype,"name");const $=({connotation:o,size:t})=>z.classNames("control",[`connotation-${o}`,!!o],[`size-${t}`,typeof t=="number"]),O=o=>{const t=o.tagFor(p.VisuallyHidden),n=i=>!i.label||i.label.trim().length===0;return e.html`
|
|
13
13
|
<figure
|
|
14
|
-
class="${
|
|
15
|
-
?aria-hidden="${
|
|
16
|
-
?aria-busy="${
|
|
14
|
+
class="${$}"
|
|
15
|
+
?aria-hidden="${i=>n(i)}"
|
|
16
|
+
?aria-busy="${i=>!i?.iconLoaded}"
|
|
17
17
|
>
|
|
18
18
|
<slot>
|
|
19
|
-
${
|
|
20
|
-
${d.when(e=>e?.iconLoaded&&e?._svg,e=>i.html`${i.html.partial(e._svg)}`)}
|
|
19
|
+
${h.when(i=>i?.iconLoaded&&i?._svg,i=>e.html`${e.html.partial(i._svg)}`)}
|
|
21
20
|
</slot>
|
|
22
|
-
<${t} class="label">${
|
|
21
|
+
<${t} class="label">${i=>i?.label}</${t}>
|
|
23
22
|
</figure>
|
|
24
|
-
`},
|
|
23
|
+
`},m=e.defineVividComponent("icon",s,O,[p.visuallyHiddenDefinition],{styles:y}),S=e.createRegisterFunction(m);exports.Icon=s;exports.iconDefinition=m;exports.registerIcon=S;
|
package/bundled/definition2.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { V as
|
|
2
|
-
import { V as
|
|
3
|
-
import { c as
|
|
4
|
-
import { w as
|
|
5
|
-
const
|
|
1
|
+
import { V as z, a as v, o as m, h as d, c as h, d as y } from "./vivid-element.js";
|
|
2
|
+
import { V as g, v as f } from "./definition14.js";
|
|
3
|
+
import { c as u } from "./class-names.js";
|
|
4
|
+
import { w as _ } from "./when.js";
|
|
5
|
+
const b = ":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}", k = "https://icon.resources.vonage.com", w = "4.6.9", x = {
|
|
6
6
|
toView(o) {
|
|
7
7
|
return o === void 0 ? null : o.toString();
|
|
8
8
|
},
|
|
@@ -10,7 +10,7 @@ const C = ":host{display:inline-block;vertical-align:sub}.control.connotation-ac
|
|
|
10
10
|
if (typeof o == "string" && (o = parseFloat(o.toString())), typeof o == "number")
|
|
11
11
|
return isNaN(o) || !isFinite(o) ? void 0 : o;
|
|
12
12
|
}
|
|
13
|
-
},
|
|
13
|
+
}, p = `<svg width="80%" height="80%" viewBox="0 0 64 64">
|
|
14
14
|
<g>
|
|
15
15
|
<g stroke-width="6" stroke-linecap="round" fill="none">
|
|
16
16
|
<path stroke="currentColor" d="M4,32 c0,15,12,28,28,28c8,0,16-4,21-9">
|
|
@@ -22,53 +22,52 @@ const C = ":host{display:inline-block;vertical-align:sub}.control.connotation-ac
|
|
|
22
22
|
</g>
|
|
23
23
|
</g>
|
|
24
24
|
</svg>`;
|
|
25
|
-
var
|
|
26
|
-
for (var e =
|
|
27
|
-
(r = o[
|
|
28
|
-
return
|
|
25
|
+
var C = Object.defineProperty, l = (o, t, n, i) => {
|
|
26
|
+
for (var e = void 0, s = o.length - 1, r; s >= 0; s--)
|
|
27
|
+
(r = o[s]) && (e = r(t, n, e) || e);
|
|
28
|
+
return e && C(t, n, e), e;
|
|
29
29
|
};
|
|
30
|
-
const
|
|
30
|
+
const E = 500, L = 2e3, I = (o, t) => [k, `v${t}`, o].join("/"), $ = ({ ok: o, headers: t }) => {
|
|
31
31
|
if (!o || t.get("content-type") !== "image/svg+xml")
|
|
32
32
|
throw new Error("Something went wrong");
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
),
|
|
36
|
-
const n =
|
|
33
|
+
}, O = (o) => ($(o), o.text()), S = (o, t) => fetch(I(`${o}.svg`, w), { signal: t }).then(
|
|
34
|
+
O
|
|
35
|
+
), T = (o) => (o ?? "").trim(), a = /* @__PURE__ */ new Map(), V = (o, t) => {
|
|
36
|
+
const n = T(o);
|
|
37
37
|
if (!n) return Promise.resolve("");
|
|
38
|
-
const i =
|
|
38
|
+
const i = a.get(n);
|
|
39
39
|
if (i && !i.signal?.aborted)
|
|
40
40
|
return i.promise;
|
|
41
|
-
const e =
|
|
42
|
-
const r =
|
|
41
|
+
const e = S(n, t).then((s) => {
|
|
42
|
+
const r = a.get(n);
|
|
43
43
|
if (r && r.promise === e && t.aborted)
|
|
44
|
-
throw
|
|
45
|
-
return
|
|
46
|
-
}).catch((
|
|
47
|
-
const r =
|
|
48
|
-
throw r && r.promise === e &&
|
|
44
|
+
throw a.delete(n), t.reason ?? new DOMException("Aborted", "AbortError");
|
|
45
|
+
return s;
|
|
46
|
+
}).catch((s) => {
|
|
47
|
+
const r = a.get(n);
|
|
48
|
+
throw r && r.promise === e && a.delete(n), s;
|
|
49
49
|
});
|
|
50
|
-
return
|
|
50
|
+
return a.set(n, { promise: e, signal: t }), e;
|
|
51
51
|
};
|
|
52
|
-
class
|
|
52
|
+
class c extends z {
|
|
53
53
|
constructor() {
|
|
54
54
|
super(...arguments), this.iconLoaded = !1, this.#o = 0, this.#t = null;
|
|
55
55
|
}
|
|
56
56
|
#o;
|
|
57
|
-
get iconUrl() {
|
|
58
|
-
const t = g(this.name);
|
|
59
|
-
return t ? y(`${t}.svg`, h) : this._svg;
|
|
60
|
-
}
|
|
61
57
|
#t;
|
|
62
58
|
async nameChanged() {
|
|
63
59
|
const t = ++this.#o;
|
|
64
60
|
this.#t && this.#t.abort(), this.#t = new AbortController(), this._svg = void 0, this.iconLoaded = !1;
|
|
65
61
|
let n = setTimeout(() => {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
62
|
+
/* v8 ignore else -- @preserve */
|
|
63
|
+
this.#o === t && (this._svg = p, n = setTimeout(() => {
|
|
64
|
+
/* v8 ignore else -- @preserve */
|
|
65
|
+
this.#o === t && this._svg === p && (this._svg = void 0);
|
|
66
|
+
}, L));
|
|
67
|
+
}, E);
|
|
70
68
|
try {
|
|
71
|
-
const i = await
|
|
69
|
+
const i = await V(this.name, this.#t.signal);
|
|
70
|
+
/* v8 ignore else -- @preserve */
|
|
72
71
|
this.#o === t && (this._svg = i);
|
|
73
72
|
} catch {
|
|
74
73
|
this.#o === t && (this._svg = void 0);
|
|
@@ -77,63 +76,56 @@ class s extends u {
|
|
|
77
76
|
}
|
|
78
77
|
}
|
|
79
78
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
],
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
],
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
],
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
],
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
],
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
],
|
|
98
|
-
|
|
99
|
-
f
|
|
100
|
-
], s.prototype, "iconUrl", 1);
|
|
101
|
-
const N = ({ connotation: o, size: t }) => k(
|
|
79
|
+
l([
|
|
80
|
+
v
|
|
81
|
+
], c.prototype, "connotation");
|
|
82
|
+
l([
|
|
83
|
+
v({ converter: x })
|
|
84
|
+
], c.prototype, "size");
|
|
85
|
+
l([
|
|
86
|
+
m
|
|
87
|
+
], c.prototype, "_svg");
|
|
88
|
+
l([
|
|
89
|
+
m
|
|
90
|
+
], c.prototype, "iconLoaded");
|
|
91
|
+
l([
|
|
92
|
+
v
|
|
93
|
+
], c.prototype, "label");
|
|
94
|
+
l([
|
|
95
|
+
v
|
|
96
|
+
], c.prototype, "name");
|
|
97
|
+
const A = ({ connotation: o, size: t }) => u(
|
|
102
98
|
"control",
|
|
103
99
|
[`connotation-${o}`, !!o],
|
|
104
100
|
[`size-${t}`, typeof t == "number"]
|
|
105
|
-
),
|
|
106
|
-
const t = o.tagFor(
|
|
107
|
-
return
|
|
101
|
+
), D = (o) => {
|
|
102
|
+
const t = o.tagFor(g), n = (i) => !i.label || i.label.trim().length === 0;
|
|
103
|
+
return d`
|
|
108
104
|
<figure
|
|
109
|
-
class="${
|
|
105
|
+
class="${A}"
|
|
110
106
|
?aria-hidden="${(i) => n(i)}"
|
|
111
107
|
?aria-busy="${(i) => !i?.iconLoaded}"
|
|
112
108
|
>
|
|
113
109
|
<slot>
|
|
114
|
-
${
|
|
115
|
-
(i) => !i?.iconLoaded,
|
|
116
|
-
v`<img alt="${(i) => i?.name}" src="${(i) => i?.iconUrl}" />`
|
|
117
|
-
)}
|
|
118
|
-
${p(
|
|
110
|
+
${_(
|
|
119
111
|
(i) => i?.iconLoaded && i?._svg,
|
|
120
|
-
(i) =>
|
|
112
|
+
(i) => d`${d.partial(i._svg)}`
|
|
121
113
|
)}
|
|
122
114
|
</slot>
|
|
123
115
|
<${t} class="label">${(i) => i?.label}</${t}>
|
|
124
116
|
</figure>
|
|
125
117
|
`;
|
|
126
|
-
},
|
|
118
|
+
}, N = y(
|
|
127
119
|
"icon",
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
[
|
|
120
|
+
c,
|
|
121
|
+
D,
|
|
122
|
+
[f],
|
|
131
123
|
{
|
|
132
|
-
styles:
|
|
124
|
+
styles: b
|
|
133
125
|
}
|
|
134
|
-
),
|
|
126
|
+
), F = h(N);
|
|
135
127
|
export {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
128
|
+
c as I,
|
|
129
|
+
N as i,
|
|
130
|
+
F as r
|
|
139
131
|
};
|
package/bundled/definition22.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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`
|
|
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=>{/* v8 ignore else -- @preserve */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
4
|
@click="${(n,e)=>n.handleExpandCollapseButtonClick(e.event)}"
|