@vonage/vivid 5.4.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 +18 -13
- package/bundled/base-color-picker.js +107 -84
- 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 +4 -2
- package/bundled/char-count.cjs +1 -1
- package/bundled/char-count.js +1 -1
- package/bundled/definition10.cjs +7 -7
- package/bundled/definition10.js +29 -19
- package/bundled/definition11.cjs +12 -19
- package/bundled/definition11.js +73 -204
- package/bundled/definition12.cjs +19 -10
- package/bundled/definition12.js +218 -36
- package/bundled/definition13.cjs +10 -1
- package/bundled/definition13.js +38 -14
- package/bundled/definition14.cjs +1 -5
- package/bundled/definition14.js +15 -24
- package/bundled/definition15.cjs +5 -30
- package/bundled/definition15.js +22 -73
- package/bundled/definition16.cjs +30 -19
- package/bundled/definition16.js +74 -97
- package/bundled/definition17.cjs +19 -13
- package/bundled/definition17.js +86 -117
- package/bundled/definition18.cjs +13 -12
- package/bundled/definition18.js +125 -71
- package/bundled/definition19.cjs +16 -16
- package/bundled/definition19.js +132 -94
- package/bundled/definition2.cjs +8 -9
- package/bundled/definition2.js +89 -142
- package/bundled/definition22.cjs +1 -1
- package/bundled/definition22.js +1 -0
- package/bundled/definition3.cjs +1 -1
- package/bundled/definition3.js +2 -1
- 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 +22 -4
- package/bundled/localized.cjs +1 -1
- package/bundled/localized.js +149 -66
- package/bundled/mixins.cjs +4 -4
- package/bundled/mixins.js +11 -8
- package/bundled/picker-field.template.cjs +14 -14
- package/bundled/picker-field.template.js +36 -56
- 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 +12 -12
- package/bundled/time-selection-picker.template.js +16 -12
- package/bundled/trapped-focus.cjs +1 -0
- package/bundled/trapped-focus.js +26 -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 +13 -13
- package/calendar/index.js +174 -144
- package/checkbox/definition.cjs +1 -0
- package/checkbox/definition.js +1 -0
- package/color-picker/definition.cjs +213 -112
- package/color-picker/definition.js +213 -112
- package/color-picker/index.cjs +104 -75
- package/color-picker/index.js +417 -326
- package/combobox/definition.cjs +17 -6
- package/combobox/definition.js +17 -6
- package/combobox/index.cjs +14 -9
- package/combobox/index.js +54 -42
- package/contextual-help/index.cjs +1 -1
- package/contextual-help/index.js +1 -1
- package/custom-elements.json +6976 -484
- 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-picker/index.cjs +1 -1
- package/date-picker/index.js +2 -2
- 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 +7 -3
- package/date-time-picker/index.cjs +1 -1
- package/date-time-picker/index.js +2 -2
- package/dial-pad/definition.cjs +148 -0
- package/dial-pad/definition.js +148 -0
- package/dial-pad/index.cjs +27 -20
- package/dial-pad/index.js +202 -101
- 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/divider/index.cjs +1 -1
- package/divider/index.js +1 -1
- 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 +66 -41
- package/icon/definition.js +67 -42
- package/index.cjs +21 -0
- package/index.js +1 -1
- package/lib/color-picker/color-picker.d.ts +390 -12
- package/lib/color-picker/locale.d.ts +4 -0
- 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/dial-pad/dial-pad.d.ts +1 -0
- package/lib/icon/icon.d.ts +1 -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 +6 -5
- 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 +58 -7
- package/locales/de-DE.js +58 -7
- package/locales/en-GB.cjs +60 -9
- package/locales/en-GB.js +60 -9
- package/locales/en-US.cjs +60 -9
- package/locales/en-US.js +60 -9
- package/locales/ja-JP.cjs +59 -8
- package/locales/ja-JP.js +59 -8
- package/locales/zh-CN.cjs +58 -7
- package/locales/zh-CN.js +58 -7
- 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 +34 -32
- package/option/index.cjs +1 -1
- package/option/index.js +1 -1
- 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/progress-ring/index.cjs +1 -1
- package/progress-ring/index.js +1 -1
- package/radio/definition.cjs +4 -0
- package/radio/definition.js +4 -0
- package/radio/index.cjs +1 -1
- package/radio/index.js +1 -1
- package/radio-group/index.cjs +1 -1
- package/radio-group/index.js +1 -1
- 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 +14 -10
- package/select/definition.cjs +22 -4
- package/select/definition.js +22 -4
- package/selectable-box/index.cjs +1 -1
- package/selectable-box/index.js +1 -1
- package/shared/color-picker/base-color-picker.d.ts +2 -1
- 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 +11 -6
- package/simple-color-picker/definition.js +11 -6
- package/simple-color-picker/index.cjs +6 -6
- package/simple-color-picker/index.js +44 -39
- 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/tag/definition.cjs +34 -14
- package/tag/definition.js +34 -14
- package/tag/index.cjs +25 -12
- package/tag/index.js +64 -47
- package/tag-group/definition.cjs +1 -2
- package/tag-group/definition.js +1 -2
- package/tag-group/index.cjs +1 -1
- package/tag-group/index.js +11 -12
- 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/time-picker/index.cjs +1 -1
- package/time-picker/index.js +1 -1
- package/toggletip/definition.cjs +5 -1
- package/toggletip/definition.js +5 -1
- package/toggletip/index.cjs +1 -1
- package/toggletip/index.js +1 -1
- package/tooltip/definition.cjs +6 -3
- package/tooltip/definition.js +6 -3
- package/tooltip/index.cjs +1 -1
- package/tooltip/index.js +1 -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 +45 -21
- package/unbundled/base-color-picker.js +45 -21
- 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 +3 -1
- package/unbundled/calendar-picker.template.js +3 -1
- 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 +3 -35
- package/unbundled/picker-field.template.js +3 -34
- 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 +5 -1
- package/unbundled/time-selection-picker.template.js +5 -1
- package/unbundled/trapped-focus.cjs +37 -0
- package/unbundled/trapped-focus.js +34 -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/visually-hidden/index.cjs +1 -1
- package/visually-hidden/index.js +1 -1
- package/vivid.api.json +6463 -6099
- package/bundled/_has.cjs +0 -1
- package/bundled/_has.js +0 -34
- 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/definition10.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { i as T } from "./definition2.js";
|
|
2
|
-
import {
|
|
3
|
-
import { a as L, g as
|
|
4
|
-
import { v as W } from "./
|
|
5
|
-
import { c as D } from "./
|
|
2
|
+
import { U as _, w as k, V as E, a, n as h, o as b, h as p, c as H, d as M } from "./vivid-element.js";
|
|
3
|
+
import { a as L, g as w, r as y, f as F } from "./mixins.js";
|
|
4
|
+
import { v as W } from "./definition14.js";
|
|
5
|
+
import { c as D } from "./definition13.js";
|
|
6
6
|
import { D as S, d as B } from "./delegates-aria.js";
|
|
7
7
|
import { F as O } from "./form-associated.js";
|
|
8
8
|
import { W as A } from "./char-count.js";
|
|
@@ -26,7 +26,7 @@ const K = {
|
|
|
26
26
|
* A text TextField
|
|
27
27
|
*/
|
|
28
28
|
text: "text"
|
|
29
|
-
}, Q = "_vvd-3-text-field-safari-workaround", v = new
|
|
29
|
+
}, Q = "_vvd-3-text-field-safari-workaround", v = new k([
|
|
30
30
|
`
|
|
31
31
|
.${Q}::placeholder {
|
|
32
32
|
opacity: 1 !important;
|
|
@@ -42,73 +42,83 @@ class t extends N(
|
|
|
42
42
|
A(
|
|
43
43
|
z(
|
|
44
44
|
V(
|
|
45
|
-
q(R(S(O(
|
|
45
|
+
q(R(S(O(E))))
|
|
46
46
|
)
|
|
47
47
|
)
|
|
48
48
|
)
|
|
49
49
|
)
|
|
50
50
|
) {
|
|
51
51
|
constructor() {
|
|
52
|
-
super(...arguments), this.proxy = document.createElement("input"), this.type = K.text, this.#e =
|
|
52
|
+
super(...arguments), this.proxy = document.createElement("input"), this.type = K.text, this.#e = w();
|
|
53
53
|
}
|
|
54
54
|
/**
|
|
55
55
|
* @internal
|
|
56
56
|
*/
|
|
57
57
|
readOnlyChanged() {
|
|
58
|
+
/* v8 ignore if -- @preserve */
|
|
58
59
|
this.proxy instanceof HTMLInputElement && (this.proxy.readOnly = this.readOnly, this.validate());
|
|
59
60
|
}
|
|
60
61
|
/**
|
|
61
62
|
* @internal
|
|
62
63
|
*/
|
|
63
64
|
autofocusChanged() {
|
|
65
|
+
/* v8 ignore if -- @preserve */
|
|
64
66
|
this.proxy instanceof HTMLInputElement && (this.proxy.autofocus = this.autofocus, this.validate());
|
|
65
67
|
}
|
|
66
68
|
/**
|
|
67
69
|
* @internal
|
|
68
70
|
*/
|
|
69
71
|
placeholderChanged() {
|
|
72
|
+
/* v8 ignore if -- @preserve */
|
|
70
73
|
this.proxy instanceof HTMLInputElement && (this.proxy.placeholder = this.placeholder);
|
|
71
74
|
}
|
|
72
75
|
/**
|
|
73
76
|
* @internal
|
|
74
77
|
*/
|
|
75
78
|
typeChanged() {
|
|
79
|
+
/* v8 ignore if -- @preserve */
|
|
76
80
|
this.proxy instanceof HTMLInputElement && (this.proxy.type = this.type, this.validate());
|
|
77
81
|
}
|
|
78
82
|
/**
|
|
79
83
|
* @internal
|
|
80
84
|
*/
|
|
81
85
|
listChanged() {
|
|
86
|
+
/* v8 ignore if -- @preserve */
|
|
82
87
|
this.proxy instanceof HTMLInputElement && (this.proxy.setAttribute("list", this.list), this.validate());
|
|
83
88
|
}
|
|
84
89
|
/**
|
|
85
90
|
* @internal
|
|
86
91
|
*/
|
|
87
92
|
maxlengthChanged() {
|
|
93
|
+
/* v8 ignore if -- @preserve */
|
|
88
94
|
this.proxy instanceof HTMLInputElement && (this.proxy.maxLength = this.maxlength, this.validate());
|
|
89
95
|
}
|
|
90
96
|
/**
|
|
91
97
|
* @internal
|
|
92
98
|
*/
|
|
93
99
|
minlengthChanged() {
|
|
100
|
+
/* v8 ignore if -- @preserve */
|
|
94
101
|
this.proxy instanceof HTMLInputElement && (this.proxy.minLength = this.minlength, this.validate());
|
|
95
102
|
}
|
|
96
103
|
/**
|
|
97
104
|
* @internal
|
|
98
105
|
*/
|
|
99
106
|
patternChanged() {
|
|
107
|
+
/* v8 ignore if -- @preserve */
|
|
100
108
|
this.proxy instanceof HTMLInputElement && (this.proxy.pattern = this.pattern, this.validate());
|
|
101
109
|
}
|
|
102
110
|
/**
|
|
103
111
|
* @internal
|
|
104
112
|
*/
|
|
105
113
|
sizeChanged() {
|
|
114
|
+
/* v8 ignore if -- @preserve */
|
|
106
115
|
this.proxy instanceof HTMLInputElement && (this.proxy.size = this.size);
|
|
107
116
|
}
|
|
108
117
|
/**
|
|
109
118
|
* @internal
|
|
110
119
|
*/
|
|
111
120
|
spellcheckChanged() {
|
|
121
|
+
/* v8 ignore if -- @preserve */
|
|
112
122
|
this.proxy instanceof HTMLInputElement && (this.proxy.spellcheck = this.spellcheck);
|
|
113
123
|
}
|
|
114
124
|
/**
|
|
@@ -158,7 +168,7 @@ class t extends N(
|
|
|
158
168
|
super.validate(this.control);
|
|
159
169
|
}
|
|
160
170
|
connectedCallback() {
|
|
161
|
-
super.connectedCallback(), this.proxy.setAttribute("type", this.type), this.validate(), this.autofocus &&
|
|
171
|
+
super.connectedCallback(), this.proxy.setAttribute("type", this.type), this.validate(), this.autofocus && _.enqueue(() => {
|
|
162
172
|
this.focus();
|
|
163
173
|
}), this._updateControlValueIfNeeded(), X(this), this._renderCharCountRemaining();
|
|
164
174
|
}
|
|
@@ -219,10 +229,10 @@ o([
|
|
|
219
229
|
a({ attribute: "inputmode" })
|
|
220
230
|
], t.prototype, "inputMode");
|
|
221
231
|
o([
|
|
222
|
-
|
|
232
|
+
b
|
|
223
233
|
], t.prototype, "actionItemsSlottedContent");
|
|
224
234
|
o([
|
|
225
|
-
|
|
235
|
+
b
|
|
226
236
|
], t.prototype, "leadingActionItemsSlottedContent");
|
|
227
237
|
const x = (i) => `vvd-text-field-control-${i}`, Y = ({
|
|
228
238
|
errorValidationMessage: i,
|
|
@@ -232,7 +242,7 @@ const x = (i) => `vvd-text-field-control-${i}`, Y = ({
|
|
|
232
242
|
placeholder: n,
|
|
233
243
|
appearance: l,
|
|
234
244
|
shape: r,
|
|
235
|
-
label:
|
|
245
|
+
label: C,
|
|
236
246
|
successText: $,
|
|
237
247
|
actionItemsSlottedContent: I,
|
|
238
248
|
leadingActionItemsSlottedContent: u,
|
|
@@ -246,7 +256,7 @@ const x = (i) => `vvd-text-field-control-${i}`, Y = ({
|
|
|
246
256
|
["placeholder", !!n],
|
|
247
257
|
[`appearance-${l}`, !!l],
|
|
248
258
|
[`shape-${r}`, !!r],
|
|
249
|
-
["no-label", !
|
|
259
|
+
["no-label", !C],
|
|
250
260
|
["has-icon", !!m],
|
|
251
261
|
["success", !!$],
|
|
252
262
|
["action-items", !!I?.length],
|
|
@@ -257,20 +267,20 @@ const x = (i) => `vvd-text-field-control-${i}`, Y = ({
|
|
|
257
267
|
const s = P(i);
|
|
258
268
|
return p`
|
|
259
269
|
<div class="base ${Y}">
|
|
260
|
-
|
|
261
|
-
class="label-suffix"
|
|
262
|
-
?hidden=${(e) => !(e.charCount && e.maxlength) && !e._hasContextualHelp}
|
|
263
|
-
>
|
|
264
|
-
${g(
|
|
270
|
+
${g(
|
|
265
271
|
(e) => e.charCount && e.maxlength,
|
|
266
272
|
(e) => e._getCharCountTemplate(i)
|
|
267
273
|
)}
|
|
274
|
+
<div
|
|
275
|
+
class="label-wrapper"
|
|
276
|
+
?hidden=${(e) => !e.label && !e._hasContextualHelp}
|
|
277
|
+
>
|
|
278
|
+
<slot class="label" name="_label"></slot>
|
|
268
279
|
<slot
|
|
269
280
|
name="contextual-help"
|
|
270
281
|
${d("_contextualHelpSlottedContent")}
|
|
271
282
|
></slot>
|
|
272
283
|
</div>
|
|
273
|
-
<slot class="label" name="_label"></slot>
|
|
274
284
|
${y(p`
|
|
275
285
|
${g(
|
|
276
286
|
(e) => e.label,
|
|
@@ -341,7 +351,7 @@ const x = (i) => `vvd-text-field-control-${i}`, Y = ({
|
|
|
341
351
|
Z,
|
|
342
352
|
[
|
|
343
353
|
T,
|
|
344
|
-
|
|
354
|
+
F,
|
|
345
355
|
W,
|
|
346
356
|
D
|
|
347
357
|
],
|
package/bundled/definition11.cjs
CHANGED
|
@@ -1,19 +1,12 @@
|
|
|
1
|
-
"use strict";const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
<div class="${u}">
|
|
14
|
-
${a=>o(a.icon,p.IconWrapper.Slot)} ${g()}
|
|
15
|
-
<slot name="trailing-meta"></slot>
|
|
16
|
-
${l.when(a=>a._displayCheckmark&&a.selected,t.html`<${i} class="checkmark" name="check-line"></${i}>`)}
|
|
17
|
-
</div>
|
|
18
|
-
</template>
|
|
19
|
-
`},w=":host([disabled]){cursor:not-allowed}.base{--_connotation-color-primary: var(--vvd-option-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-primary-text: var(--vvd-option-accent-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-option-accent-primary-increment, var(--vvd-color-neutral-800));--_connotation-color-firm: var(--vvd-option-accent-firm, var(--vvd-color-canvas-text));--_connotation-color-faint: var(--vvd-option-accent-faint, var(--vvd-color-neutral-50));--_connotation-color-soft: var(--vvd-option-accent-soft, var(--vvd-color-neutral-100));--_connotation-color-pale: var(--vvd-option-accent-pale, var(--vvd-color-neutral-300));--_connotation-color-dim: var(--vvd-option-accent-dim, var(--vvd-color-neutral-200))}.base{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}@media (hover: hover){.base:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}}.base.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.base:disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base.disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base:active:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.base.active:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.base.selected:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}@media (hover: hover){.base.selected:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-dim);--_appearance-color-outline: transparent}}.base.selected.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-dim);--_appearance-color-outline: transparent}.base{display:flex;box-sizing:border-box;align-items:center;border-radius:8px;background-color:var(--_appearance-color-fill);box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);color:var(--_option-appearance-color-text, var(--_appearance-color-text));font:var(--vvd-typography-base);gap:var(--_option-gap);hyphens:auto;inline-size:100%;min-block-size:var(--_option-min-block-size);padding-inline:var(--_option-padding-inline);vertical-align:middle;word-break:break-word}.base{--_option-min-block-size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) ;--_option-padding-inline: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))*.4) ;--_option-icon-size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))/2) }.base:not(.two-lines){--_option-gap: calc( calc(1px*(36 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) / 3);padding-block:calc(1px*(40 + 4*clamp(-1,var(--vvd-size-density, 0),2))/4)}.base.two-lines{gap:calc(1px*(40 + 4*clamp(-1,var(--vvd-size-density, 0),2))*.4);padding-block:calc(1px*(24 + 4*clamp(-1,var(--vvd-size-density, 0),2))/2)}@supports (user-select: none){.base{user-select:none}}.base:not(.disabled){cursor:pointer}.base.disabled{pointer-events:none}:host([scale=condensed]) .base{--_option-min-block-size: calc(1px*(32 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) ;--_option-padding-inline: calc(1px*(24 + 4*clamp(-1, var(--vvd-size-density, 0), 2))/2) ;--_option-icon-size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))*.4) }:host([scale=condensed]) .base:not(.two-lines){--_option-gap: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))/5) ;padding-block:calc(calc(1px*(36 + 4*clamp(-1,var(--vvd-size-density, 0),2))) / 6)}:host([scale=condensed]) .base.two-lines{gap:calc(calc(1px*(36 + 4*clamp(-1,var(--vvd-size-density, 0),2))) / 3);padding-block:calc(1px*(32 + 4*clamp(-1,var(--vvd-size-density, 0),2))/4)}.base.active{--focus-stroke-color: var(--vvd-color-cta-500);--focus-stroke-gap-color: transparent;box-shadow:0 0 0 4px color-mix(in srgb,var(--vvd-color-cta-500),transparent 85%),inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:1px solid var(--focus-stroke-color, var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset, 0px))}.base.hidden{display:none}.text{display:flex;flex-direction:column;font:var(--vvd-typography-base);gap:4px;margin-inline-end:auto}.text-primary,.text-secondary{display:block;font:var(--vvd-typography-base)}.text-primary{font:var(--vvd-typography-base)}.base:not(.disabled) .text-primary{color:var(--vvd-color-canvas-text)}.base.disabled .text-primary{color:var(--_appearance-color-text)}.base.two-lines .text-primary{font:var(--vvd-typography-base-bold)}.text-secondary{color:var(--vvd-color-neutral-800);font:var(--vvd-typography-base-condensed)}.base.two-lines .text-secondary{color:var(--vvd-color-neutral-600)}.base.disabled .text-secondary{color:var(--_appearance-color-text)}.base.selected:not(.disabled) .text-secondary{color:var(--vvd-color-neutral-800)}.match{color:var(--vvd-color-cta-600);font:var(--vvd-typography-base-bold)}slot[name=icon]{font-size:var(--_option-icon-size);line-height:1}.base:not(.disabled,.selected) slot[name=icon]{color:var(--vvd-color-neutral-600)}.checkmark{font-size:var(--_option-icon-size)}",b=t.defineVividComponent("option",r,S,[v.iconDefinition],{styles:w}),k=t.createRegisterFunction(b);exports.ListboxOption=r;exports.isListboxOption=y;exports.listboxOptionDefinition=b;exports.registerOption=k;
|
|
1
|
+
"use strict";const l=require("./definition9.cjs"),s=require("./vivid-element.cjs"),d=require("./anchored.cjs"),u=require("./index.cjs"),v=require("./class-names.cjs");var m=Object.defineProperty,p=(n,e,i,t)=>{for(var o=void 0,a=n.length-1,c;a>=0;a--)(c=n[a])&&(o=c(e,i,o)||o);return o&&m(e,i,o),o};class r extends d.Anchored(s.VividElement){constructor(){super(...arguments),this.open=!1,this.#t=()=>{this.open=!0,this.#i()},this.#e=()=>{this.open=!1,this.#i()},this.#n=e=>{/* v8 ignore else -- @preserve */e.key==="Escape"&&this.#e()}}connectedCallback(){super.connectedCallback(),this.#o()}disconnectedCallback(){super.disconnectedCallback(),this.#o()}_anchorElChanged(e,i){e&&this.#r(e),i&&this.#s(i)}#s(e){e.addEventListener("mouseover",this.#t),e.addEventListener("mouseout",this.#e),e.addEventListener("focusin",this.#t),e.addEventListener("focusout",this.#e),e.setAttribute("aria-haspopup","true"),e.setAttribute("aria-expanded",String(this.open))}#r(e){e.removeEventListener("mouseover",this.#t),e.removeEventListener("mouseout",this.#e),e.removeEventListener("focusin",this.#t),e.removeEventListener("focusout",this.#e),e.removeAttribute("aria-haspopup"),e.removeAttribute("aria-expanded")}#t;#e;#i(){this._anchorEl&&this._anchorEl.setAttribute("aria-expanded",String(this.open))}#o(){document.removeEventListener("keydown",this.#n),this.open&&this.isConnected&&document.addEventListener("keydown",this.#n)}#n;openChanged(e){e!==void 0&&this.#o()}}p([s.attr],r.prototype,"text");p([s.attr({mode:"fromView"})],r.prototype,"placement");p([s.attr({mode:"boolean"})],r.prototype,"open");const f=":host :host{display:var(--_popup-display, inline)}:host :host([slotted-anchor]){--_popup-display: contents}.control{pointer-events:none}.tooltip{width:var(--tooltip-inline-size, auto);box-sizing:border-box;padding:8px 12px;color:var(--vvd-color-canvas-text);font:var(--vvd-typography-base-bold);max-inline-size:var(--tooltip-max-inline-size, 30ch)}",E=({open:n})=>v.classNames("control",["open",!!n]),b=n=>{const e=n.tagFor(l.Popup),i=d.anchorSlotTemplateFactory();return s.html`
|
|
2
|
+
${i}
|
|
3
|
+
<${e} class="${E}" arrow alternate
|
|
4
|
+
:placement=${t=>t.placement}
|
|
5
|
+
:anchor="${t=>t._anchorEl}"
|
|
6
|
+
:open="${t=>t.open}"
|
|
7
|
+
@keydown="${(t,o)=>{t.open&&u.handleEscapeKeyAndStopPropogation(o.event)&&(t.open=!1)}}"
|
|
8
|
+
exportparts="vvd-theme-alternate">
|
|
9
|
+
<div part="vvd-theme-alternate" class="tooltip" role="tooltip">
|
|
10
|
+
${t=>t.text}
|
|
11
|
+
</div>
|
|
12
|
+
</${e}>`},h=s.defineVividComponent("tooltip",r,b,[l.popupDefinition],{styles:f}),g=s.createRegisterFunction(h);exports.Tooltip=r;exports.registerTooltip=g;exports.tooltipDefinition=h;
|
package/bundled/definition11.js
CHANGED
|
@@ -1,225 +1,94 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { V as
|
|
3
|
-
import { A as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
(v = e[p]) && (i = (t ? v(a, n, i) : v(i)) || i);
|
|
11
|
-
return t && i && T(a, n, i), i;
|
|
1
|
+
import { P as d, p as l } from "./definition9.js";
|
|
2
|
+
import { V as h, a, h as v, c as m, d as u } from "./vivid-element.js";
|
|
3
|
+
import { A as f, a as E } from "./anchored.js";
|
|
4
|
+
import { h as b } from "./index.js";
|
|
5
|
+
import { c as x } from "./class-names.js";
|
|
6
|
+
var y = Object.defineProperty, p = (n, e, s, t) => {
|
|
7
|
+
for (var o = void 0, r = n.length - 1, c; r >= 0; r--)
|
|
8
|
+
(c = n[r]) && (o = c(e, s, o) || o);
|
|
9
|
+
return o && y(e, s, o), o;
|
|
12
10
|
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
)
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
this
|
|
22
|
-
|
|
23
|
-
this.defaultSelected,
|
|
24
|
-
this.selected
|
|
25
|
-
), this.proxy.disabled = this.disabled;
|
|
26
|
-
}
|
|
27
|
-
defaultSelectedChanged() {
|
|
28
|
-
this.dirtySelected || (this.selected = this.defaultSelected, this.proxy instanceof HTMLOptionElement && (this.proxy.selected = this.defaultSelected)), this.proxy instanceof HTMLOptionElement && (this.proxy.defaultSelected = this.defaultSelected);
|
|
29
|
-
}
|
|
30
|
-
disabledChanged() {
|
|
31
|
-
this.proxy instanceof HTMLOptionElement && (this.proxy.disabled = this.disabled);
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* @deprecated Use `defaultSelected` instead.
|
|
35
|
-
*/
|
|
36
|
-
get selectedAttribute() {
|
|
37
|
-
return this.defaultSelected;
|
|
38
|
-
}
|
|
39
|
-
set selectedAttribute(a) {
|
|
40
|
-
this.defaultSelected = a;
|
|
41
|
-
}
|
|
42
|
-
selectedChanged() {
|
|
43
|
-
this.dirtySelected || (this.dirtySelected = !0), this.proxy instanceof HTMLOptionElement && (this.proxy.selected = this.selected);
|
|
11
|
+
class i extends f(h) {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments), this.open = !1, this.#t = () => {
|
|
14
|
+
this.open = !0, this.#s();
|
|
15
|
+
}, this.#e = () => {
|
|
16
|
+
this.open = !1, this.#s();
|
|
17
|
+
}, this.#n = (e) => {
|
|
18
|
+
/* v8 ignore else -- @preserve */
|
|
19
|
+
e.key === "Escape" && this.#e();
|
|
20
|
+
};
|
|
44
21
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
this.value = "";
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
this.proxy instanceof HTMLOptionElement && (this.proxy.value = this.value);
|
|
51
|
-
}
|
|
52
|
-
get label() {
|
|
53
|
-
return this._label ?? this.text;
|
|
54
|
-
}
|
|
55
|
-
set label(a) {
|
|
56
|
-
this._label = a;
|
|
57
|
-
}
|
|
58
|
-
set text(a) {
|
|
59
|
-
this._text = a;
|
|
22
|
+
connectedCallback() {
|
|
23
|
+
super.connectedCallback(), this.#o();
|
|
60
24
|
}
|
|
61
|
-
|
|
62
|
-
|
|
25
|
+
disconnectedCallback() {
|
|
26
|
+
super.disconnectedCallback(), this.#o();
|
|
63
27
|
}
|
|
64
28
|
/**
|
|
65
|
-
* Provides an accessible name for use by parent components.
|
|
66
|
-
* Note: Does not implement full accessible name computation, e.g. slotted content is missed.
|
|
67
29
|
* @internal
|
|
68
30
|
*/
|
|
69
|
-
|
|
70
|
-
|
|
31
|
+
_anchorElChanged(e, s) {
|
|
32
|
+
e && this.#r(e), s && this.#i(s);
|
|
71
33
|
}
|
|
72
|
-
|
|
73
|
-
|
|
34
|
+
#i(e) {
|
|
35
|
+
e.addEventListener("mouseover", this.#t), e.addEventListener("mouseout", this.#e), e.addEventListener("focusin", this.#t), e.addEventListener("focusout", this.#e), e.setAttribute("aria-haspopup", "true"), e.setAttribute("aria-expanded", String(this.open));
|
|
74
36
|
}
|
|
75
|
-
|
|
76
|
-
|
|
37
|
+
#r(e) {
|
|
38
|
+
e.removeEventListener("mouseover", this.#t), e.removeEventListener("mouseout", this.#e), e.removeEventListener("focusin", this.#t), e.removeEventListener("focusout", this.#e), e.removeAttribute("aria-haspopup"), e.removeAttribute("aria-expanded");
|
|
77
39
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
return n === -1 ? { from: 0, to: 0 } : {
|
|
83
|
-
from: n,
|
|
84
|
-
to: n + a.length
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
return { from: 0, to: 0 };
|
|
40
|
+
#t;
|
|
41
|
+
#e;
|
|
42
|
+
#s() {
|
|
43
|
+
this._anchorEl && this._anchorEl.setAttribute("aria-expanded", String(this.open));
|
|
88
44
|
}
|
|
45
|
+
#o() {
|
|
46
|
+
document.removeEventListener("keydown", this.#n), this.open && this.isConnected && document.addEventListener("keydown", this.#n);
|
|
47
|
+
}
|
|
48
|
+
#n;
|
|
89
49
|
/**
|
|
90
50
|
* @internal
|
|
91
51
|
*/
|
|
92
|
-
|
|
93
|
-
|
|
52
|
+
openChanged(e) {
|
|
53
|
+
e !== void 0 && this.#o();
|
|
94
54
|
}
|
|
95
55
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
})
|
|
125
|
-
], o.prototype, "_label", 2);
|
|
126
|
-
r([
|
|
127
|
-
c({
|
|
128
|
-
attribute: "text"
|
|
129
|
-
})
|
|
130
|
-
], o.prototype, "_text", 2);
|
|
131
|
-
r([
|
|
132
|
-
c({ attribute: "text-secondary" })
|
|
133
|
-
], o.prototype, "textSecondary", 2);
|
|
134
|
-
r([
|
|
135
|
-
d
|
|
136
|
-
], o.prototype, "_highlighted", 2);
|
|
137
|
-
r([
|
|
138
|
-
d
|
|
139
|
-
], o.prototype, "_displayCheckmark", 2);
|
|
140
|
-
r([
|
|
141
|
-
c({ attribute: "matched-text" })
|
|
142
|
-
], o.prototype, "matchedText", 2);
|
|
143
|
-
r([
|
|
144
|
-
d
|
|
145
|
-
], o.prototype, "_vvdSearchText", 2);
|
|
146
|
-
r([
|
|
147
|
-
h
|
|
148
|
-
], o.prototype, "_hasMatchedText", 1);
|
|
149
|
-
r([
|
|
150
|
-
d
|
|
151
|
-
], o.prototype, "_isNotMatching", 2);
|
|
152
|
-
r([
|
|
153
|
-
h
|
|
154
|
-
], o.prototype, "_matchedRange", 1);
|
|
155
|
-
r([
|
|
156
|
-
c({ attribute: "tag-connotation" })
|
|
157
|
-
], o.prototype, "tagConnotation", 2);
|
|
158
|
-
const C = (e) => z(
|
|
159
|
-
"base",
|
|
160
|
-
["disabled", e.disabled],
|
|
161
|
-
["selected", !!e.selected],
|
|
162
|
-
["hover", !!e._highlighted],
|
|
163
|
-
["active", !!e.checked],
|
|
164
|
-
["icon", !!e.icon],
|
|
165
|
-
["two-lines", !!e.text?.length && !!e.textSecondary?.length]
|
|
166
|
-
);
|
|
167
|
-
function O() {
|
|
168
|
-
return l`${s(
|
|
169
|
-
(e) => e.text || e.textSecondary,
|
|
170
|
-
l`<span class="text">
|
|
171
|
-
${s(
|
|
172
|
-
(e) => e.text,
|
|
173
|
-
l`<span class="text-primary">
|
|
174
|
-
${s(
|
|
175
|
-
(e) => e._hasMatchedText,
|
|
176
|
-
l`${(e) => e.text.slice(0, e._matchedRange.from)}<span class="match"
|
|
177
|
-
>${(e) => e.text.slice(e._matchedRange.from, e._matchedRange.to)}</span
|
|
178
|
-
>`
|
|
179
|
-
)}${(e) => e.text.slice(e._matchedRange.to)}
|
|
180
|
-
</span>`
|
|
181
|
-
)}
|
|
182
|
-
${s(
|
|
183
|
-
(e) => e.textSecondary,
|
|
184
|
-
l`<span class="text-secondary">${(e) => e.textSecondary}</span>`
|
|
185
|
-
)}
|
|
186
|
-
</span>`
|
|
187
|
-
)}`;
|
|
188
|
-
}
|
|
189
|
-
const L = (e) => {
|
|
190
|
-
const a = u(e), n = e.tagFor(b);
|
|
191
|
-
return l`
|
|
192
|
-
<template
|
|
193
|
-
${k({
|
|
194
|
-
role: "option",
|
|
195
|
-
ariaChecked: (t) => t.checked,
|
|
196
|
-
ariaSelected: (t) => t.selected,
|
|
197
|
-
ariaDisabled: (t) => t.disabled
|
|
198
|
-
})}
|
|
199
|
-
style="${(t) => t._isNotMatching ? "display: none" : ""}"
|
|
200
|
-
>
|
|
201
|
-
<div class="${C}">
|
|
202
|
-
${(t) => a(t.icon, g.Slot)} ${O()}
|
|
203
|
-
<slot name="trailing-meta"></slot>
|
|
204
|
-
${s(
|
|
205
|
-
(t) => t._displayCheckmark && t.selected,
|
|
206
|
-
l`<${n} class="checkmark" name="check-line"></${n}>`
|
|
207
|
-
)}
|
|
208
|
-
</div>
|
|
209
|
-
</template>
|
|
210
|
-
`;
|
|
211
|
-
}, M = ":host([disabled]){cursor:not-allowed}.base{--_connotation-color-primary: var(--vvd-option-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-primary-text: var(--vvd-option-accent-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-option-accent-primary-increment, var(--vvd-color-neutral-800));--_connotation-color-firm: var(--vvd-option-accent-firm, var(--vvd-color-canvas-text));--_connotation-color-faint: var(--vvd-option-accent-faint, var(--vvd-color-neutral-50));--_connotation-color-soft: var(--vvd-option-accent-soft, var(--vvd-color-neutral-100));--_connotation-color-pale: var(--vvd-option-accent-pale, var(--vvd-color-neutral-300));--_connotation-color-dim: var(--vvd-option-accent-dim, var(--vvd-color-neutral-200))}.base{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}@media (hover: hover){.base:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}}.base.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.base:disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base.disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base:active:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.base.active:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.base.selected:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}@media (hover: hover){.base.selected:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-dim);--_appearance-color-outline: transparent}}.base.selected.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-dim);--_appearance-color-outline: transparent}.base{display:flex;box-sizing:border-box;align-items:center;border-radius:8px;background-color:var(--_appearance-color-fill);box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);color:var(--_option-appearance-color-text, var(--_appearance-color-text));font:var(--vvd-typography-base);gap:var(--_option-gap);hyphens:auto;inline-size:100%;min-block-size:var(--_option-min-block-size);padding-inline:var(--_option-padding-inline);vertical-align:middle;word-break:break-word}.base{--_option-min-block-size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) ;--_option-padding-inline: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))*.4) ;--_option-icon-size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))/2) }.base:not(.two-lines){--_option-gap: calc( calc(1px*(36 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) / 3);padding-block:calc(1px*(40 + 4*clamp(-1,var(--vvd-size-density, 0),2))/4)}.base.two-lines{gap:calc(1px*(40 + 4*clamp(-1,var(--vvd-size-density, 0),2))*.4);padding-block:calc(1px*(24 + 4*clamp(-1,var(--vvd-size-density, 0),2))/2)}@supports (user-select: none){.base{user-select:none}}.base:not(.disabled){cursor:pointer}.base.disabled{pointer-events:none}:host([scale=condensed]) .base{--_option-min-block-size: calc(1px*(32 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) ;--_option-padding-inline: calc(1px*(24 + 4*clamp(-1, var(--vvd-size-density, 0), 2))/2) ;--_option-icon-size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))*.4) }:host([scale=condensed]) .base:not(.two-lines){--_option-gap: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))/5) ;padding-block:calc(calc(1px*(36 + 4*clamp(-1,var(--vvd-size-density, 0),2))) / 6)}:host([scale=condensed]) .base.two-lines{gap:calc(calc(1px*(36 + 4*clamp(-1,var(--vvd-size-density, 0),2))) / 3);padding-block:calc(1px*(32 + 4*clamp(-1,var(--vvd-size-density, 0),2))/4)}.base.active{--focus-stroke-color: var(--vvd-color-cta-500);--focus-stroke-gap-color: transparent;box-shadow:0 0 0 4px color-mix(in srgb,var(--vvd-color-cta-500),transparent 85%),inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:1px solid var(--focus-stroke-color, var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset, 0px))}.base.hidden{display:none}.text{display:flex;flex-direction:column;font:var(--vvd-typography-base);gap:4px;margin-inline-end:auto}.text-primary,.text-secondary{display:block;font:var(--vvd-typography-base)}.text-primary{font:var(--vvd-typography-base)}.base:not(.disabled) .text-primary{color:var(--vvd-color-canvas-text)}.base.disabled .text-primary{color:var(--_appearance-color-text)}.base.two-lines .text-primary{font:var(--vvd-typography-base-bold)}.text-secondary{color:var(--vvd-color-neutral-800);font:var(--vvd-typography-base-condensed)}.base.two-lines .text-secondary{color:var(--vvd-color-neutral-600)}.base.disabled .text-secondary{color:var(--_appearance-color-text)}.base.selected:not(.disabled) .text-secondary{color:var(--vvd-color-neutral-800)}.match{color:var(--vvd-color-cta-600);font:var(--vvd-typography-base-bold)}slot[name=icon]{font-size:var(--_option-icon-size);line-height:1}.base:not(.disabled,.selected) slot[name=icon]{color:var(--vvd-color-neutral-600)}.checkmark{font-size:var(--_option-icon-size)}", H = _(
|
|
212
|
-
"option",
|
|
213
|
-
o,
|
|
56
|
+
p([
|
|
57
|
+
a
|
|
58
|
+
], i.prototype, "text");
|
|
59
|
+
p([
|
|
60
|
+
a({ mode: "fromView" })
|
|
61
|
+
], i.prototype, "placement");
|
|
62
|
+
p([
|
|
63
|
+
a({ mode: "boolean" })
|
|
64
|
+
], i.prototype, "open");
|
|
65
|
+
const g = ":host :host{display:var(--_popup-display, inline)}:host :host([slotted-anchor]){--_popup-display: contents}.control{pointer-events:none}.tooltip{width:var(--tooltip-inline-size, auto);box-sizing:border-box;padding:8px 12px;color:var(--vvd-color-canvas-text);font:var(--vvd-typography-base-bold);max-inline-size:var(--tooltip-max-inline-size, 30ch)}", A = ({ open: n }) => x("control", ["open", !!n]), L = (n) => {
|
|
66
|
+
const e = n.tagFor(d), s = E();
|
|
67
|
+
return v`
|
|
68
|
+
${s}
|
|
69
|
+
<${e} class="${A}" arrow alternate
|
|
70
|
+
:placement=${(t) => t.placement}
|
|
71
|
+
:anchor="${(t) => t._anchorEl}"
|
|
72
|
+
:open="${(t) => t.open}"
|
|
73
|
+
@keydown="${(t, o) => {
|
|
74
|
+
t.open && b(o.event) && (t.open = !1);
|
|
75
|
+
}}"
|
|
76
|
+
exportparts="vvd-theme-alternate">
|
|
77
|
+
<div part="vvd-theme-alternate" class="tooltip" role="tooltip">
|
|
78
|
+
${(t) => t.text}
|
|
79
|
+
</div>
|
|
80
|
+
</${e}>`;
|
|
81
|
+
}, C = u(
|
|
82
|
+
"tooltip",
|
|
83
|
+
i,
|
|
214
84
|
L,
|
|
215
|
-
[
|
|
85
|
+
[l],
|
|
216
86
|
{
|
|
217
|
-
styles:
|
|
87
|
+
styles: g
|
|
218
88
|
}
|
|
219
|
-
), P =
|
|
89
|
+
), P = m(C);
|
|
220
90
|
export {
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
P as r
|
|
91
|
+
i as T,
|
|
92
|
+
P as r,
|
|
93
|
+
C as t
|
|
225
94
|
};
|
package/bundled/definition12.cjs
CHANGED
|
@@ -1,10 +1,19 @@
|
|
|
1
|
-
"use strict";const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
</
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
"use strict";const v=require("./definition2.cjs"),t=require("./vivid-element.cjs"),p=require("./affix.cjs"),h=require("./host-semantics.cjs"),f=require("./dom.cjs"),l=require("./when.cjs"),m=require("./class-names.cjs");var x=Object.defineProperty,_=Object.getOwnPropertyDescriptor,n=(e,o,i,a)=>{for(var c=a>1?void 0:a?_(o,i):o,s=e.length-1,d;s>=0;s--)(d=e[s])&&(c=(a?d(o,i,c):d(c))||c);return a&&c&&x(o,i,c),c};function y(e){return f.isHTMLElement(e)&&(e.getAttribute("role")==="option"||e instanceof HTMLOptionElement||e instanceof r)}class r extends h.HostSemantics(p.AffixIconWithTrailing(t.VividElement)){constructor(o,i,a,c){super(),this.defaultSelected=!1,this.dirtySelected=!1,this.value="",this._highlighted=!1,this._displayCheckmark=!1,this._vvdSearchText="",this._isNotMatching=!1,o&&(this.text=o),i&&(this.value=i),a&&(this.defaultSelected=a),c&&(this.selected=c),this.proxy=new Option(this.text,this.value,this.defaultSelected,this.selected),this.proxy.disabled=this.disabled}defaultSelectedChanged(){this.dirtySelected||(this.selected=this.defaultSelected,this.proxy instanceof HTMLOptionElement&&(this.proxy.selected=this.defaultSelected)),this.proxy instanceof HTMLOptionElement&&(this.proxy.defaultSelected=this.defaultSelected)}disabledChanged(){/* v8 ignore if -- @preserve */this.proxy instanceof HTMLOptionElement&&(this.proxy.disabled=this.disabled)}get selectedAttribute(){return this.defaultSelected}set selectedAttribute(o){this.defaultSelected=o}selectedChanged(){this.dirtySelected||(this.dirtySelected=!0),this.proxy instanceof HTMLOptionElement&&(this.proxy.selected=this.selected)}valueChanged(){if(typeof this.value!="string"){this.value="";return}this.proxy instanceof HTMLOptionElement&&(this.proxy.value=this.value)}get label(){return this._label??this.text}set label(o){this._label=o}set text(o){this._text=o}get text(){return this._text??""}_getAccessibleName(){return this.ariaLabel||`${this.text}${this.textSecondary?` ${this.textSecondary}`:""}`}get form(){return null}get _hasMatchedText(){return!!(this.matchedText??this._vvdSearchText)}get _matchedRange(){const o=this.matchedText??this._vvdSearchText;if(o){const i=this.text.toLowerCase().indexOf(o.toLowerCase());return i===-1?{from:0,to:0}:{from:i,to:i+o.length}}return{from:0,to:0}}connectedCallback(){super.connectedCallback(),this.dirtySelected||(this.selected=this.defaultSelected,this.dirtySelected=!1)}}n([t.attr({converter:{fromView:e=>{if(e===!0||e==="true")return!0;if(e===!1||e==="false")return!1},toView:e=>e}})],r.prototype,"checked",2);n([t.attr({attribute:"selected",mode:"boolean"})],r.prototype,"defaultSelected",2);n([t.attr({mode:"boolean"})],r.prototype,"disabled",2);n([t.attr({attribute:"current-selected",mode:"boolean"})],r.prototype,"selected",2);n([t.attr({attribute:"value"})],r.prototype,"value",2);n([t.attr({attribute:"label"})],r.prototype,"_label",2);n([t.attr({attribute:"text"})],r.prototype,"_text",2);n([t.attr({attribute:"text-secondary"})],r.prototype,"textSecondary",2);n([t.observable],r.prototype,"_highlighted",2);n([t.observable],r.prototype,"_displayCheckmark",2);n([t.attr({attribute:"matched-text"})],r.prototype,"matchedText",2);n([t.observable],r.prototype,"_vvdSearchText",2);n([t.volatile],r.prototype,"_hasMatchedText",1);n([t.observable],r.prototype,"_isNotMatching",2);n([t.volatile],r.prototype,"_matchedRange",1);n([t.attr({attribute:"tag-connotation"})],r.prototype,"tagConnotation",2);const u=e=>m.classNames("base",["disabled",e.disabled],["selected",!!e.selected],["hover",!!e._highlighted],["active",!!e.checked],["icon",!!e.icon],["two-lines",!!e.text?.length&&!!e.textSecondary?.length]);function g(){return t.html`${l.when(e=>e.text||e.textSecondary,t.html`<span class="text">
|
|
2
|
+
${l.when(e=>e.text,t.html`<span class="text-primary">
|
|
3
|
+
${l.when(e=>e._hasMatchedText,t.html`${e=>e.text.slice(0,e._matchedRange.from)}<span class="match"
|
|
4
|
+
>${e=>e.text.slice(e._matchedRange.from,e._matchedRange.to)}</span
|
|
5
|
+
>`)}${e=>e.text.slice(e._matchedRange.to)}
|
|
6
|
+
</span>`)}
|
|
7
|
+
${l.when(e=>e.textSecondary,t.html`<span class="text-secondary">${e=>e.textSecondary}</span>`)}
|
|
8
|
+
</span>`)}`}const S=e=>{const o=p.affixIconTemplateFactory(e),i=e.tagFor(v.Icon);return t.html`
|
|
9
|
+
<template
|
|
10
|
+
${h.applyHostSemantics({role:"option",ariaChecked:a=>a.checked,ariaSelected:a=>a.selected,ariaDisabled:a=>a.disabled})}
|
|
11
|
+
style="${a=>a._isNotMatching?"display: none":""}"
|
|
12
|
+
>
|
|
13
|
+
<div class="${u}">
|
|
14
|
+
${a=>o(a.icon,p.IconWrapper.Slot)} ${g()}
|
|
15
|
+
<slot name="trailing-meta"></slot>
|
|
16
|
+
${l.when(a=>a._displayCheckmark&&a.selected,t.html`<${i} class="checkmark" name="check-line"></${i}>`)}
|
|
17
|
+
</div>
|
|
18
|
+
</template>
|
|
19
|
+
`},w=":host([disabled]){cursor:not-allowed}.base{--_connotation-color-primary: var(--vvd-option-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-primary-text: var(--vvd-option-accent-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-option-accent-primary-increment, var(--vvd-color-neutral-800));--_connotation-color-firm: var(--vvd-option-accent-firm, var(--vvd-color-canvas-text));--_connotation-color-faint: var(--vvd-option-accent-faint, var(--vvd-color-neutral-50));--_connotation-color-soft: var(--vvd-option-accent-soft, var(--vvd-color-neutral-100));--_connotation-color-pale: var(--vvd-option-accent-pale, var(--vvd-color-neutral-300));--_connotation-color-dim: var(--vvd-option-accent-dim, var(--vvd-color-neutral-200))}.base{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}@media (hover: hover){.base:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}}.base.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.base:disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base.disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base:active:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.base.active:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.base.selected:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}@media (hover: hover){.base.selected:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-dim);--_appearance-color-outline: transparent}}.base.selected.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-dim);--_appearance-color-outline: transparent}.base{display:flex;box-sizing:border-box;align-items:center;border-radius:8px;background-color:var(--_appearance-color-fill);box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);color:var(--_option-appearance-color-text, var(--_appearance-color-text));font:var(--vvd-typography-base);gap:var(--_option-gap);hyphens:auto;inline-size:100%;min-block-size:var(--_option-min-block-size);padding-inline:var(--_option-padding-inline);vertical-align:middle;word-break:break-word}.base{--_option-min-block-size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) ;--_option-padding-inline: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))*.4) ;--_option-icon-size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))/2) }.base:not(.two-lines){--_option-gap: calc( calc(1px*(36 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) / 3);padding-block:calc(1px*(40 + 4*clamp(-1,var(--vvd-size-density, 0),2))/4)}.base.two-lines{gap:calc(1px*(40 + 4*clamp(-1,var(--vvd-size-density, 0),2))*.4);padding-block:calc(1px*(24 + 4*clamp(-1,var(--vvd-size-density, 0),2))/2)}@supports (user-select: none){.base{user-select:none}}.base:not(.disabled){cursor:pointer}.base.disabled{pointer-events:none}:host([scale=condensed]) .base{--_option-min-block-size: calc(1px*(32 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) ;--_option-padding-inline: calc(1px*(24 + 4*clamp(-1, var(--vvd-size-density, 0), 2))/2) ;--_option-icon-size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))*.4) }:host([scale=condensed]) .base:not(.two-lines){--_option-gap: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))/5) ;padding-block:calc(calc(1px*(36 + 4*clamp(-1,var(--vvd-size-density, 0),2))) / 6)}:host([scale=condensed]) .base.two-lines{gap:calc(calc(1px*(36 + 4*clamp(-1,var(--vvd-size-density, 0),2))) / 3);padding-block:calc(1px*(32 + 4*clamp(-1,var(--vvd-size-density, 0),2))/4)}.base.active{--focus-stroke-color: var(--vvd-color-cta-500);--focus-stroke-gap-color: transparent;box-shadow:0 0 0 4px color-mix(in srgb,var(--vvd-color-cta-500),transparent 85%),inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:1px solid var(--focus-stroke-color, var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset, 0px))}.base.hidden{display:none}.text{display:flex;flex-direction:column;font:var(--vvd-typography-base);gap:4px;margin-inline-end:auto}.text-primary,.text-secondary{display:block;font:var(--vvd-typography-base)}.text-primary{font:var(--vvd-typography-base)}.base:not(.disabled) .text-primary{color:var(--vvd-color-canvas-text)}.base.disabled .text-primary{color:var(--_appearance-color-text)}.base.two-lines .text-primary{font:var(--vvd-typography-base-bold)}.text-secondary{color:var(--vvd-color-neutral-800);font:var(--vvd-typography-base-condensed)}.base.two-lines .text-secondary{color:var(--vvd-color-neutral-600)}.base.disabled .text-secondary{color:var(--_appearance-color-text)}.base.selected:not(.disabled) .text-secondary{color:var(--vvd-color-neutral-800)}.match{color:var(--vvd-color-cta-600);font:var(--vvd-typography-base-bold)}slot[name=icon]{font-size:var(--_option-icon-size);line-height:1}.base:not(.disabled,.selected) slot[name=icon]{color:var(--vvd-color-neutral-600)}.checkmark{font-size:var(--_option-icon-size)}",b=t.defineVividComponent("option",r,S,[v.iconDefinition],{styles:w}),k=t.createRegisterFunction(b);exports.ListboxOption=r;exports.isListboxOption=y;exports.listboxOptionDefinition=b;exports.registerOption=k;
|