@vonage/vivid 3.52.0 → 3.53.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/README.md +1 -1
- package/accordion/index.cjs +1 -1
- package/accordion/index.js +1 -1
- package/accordion-item/index.cjs +1 -1
- package/accordion-item/index.js +1 -1
- package/alert/index.cjs +3 -3
- package/alert/index.js +3 -3
- package/audio-player/index.cjs +3 -3
- package/audio-player/index.js +3 -3
- package/avatar/index.cjs +1 -1
- package/avatar/index.js +1 -1
- package/badge/index.cjs +1 -1
- package/badge/index.js +1 -1
- package/banner/index.cjs +2 -2
- package/banner/index.js +2 -2
- package/breadcrumb-item/index.cjs +1 -1
- package/breadcrumb-item/index.js +1 -1
- package/button/index.cjs +2 -2
- package/button/index.js +2 -2
- package/card/index.cjs +2 -2
- package/card/index.js +2 -2
- package/checkbox/index.cjs +3 -2
- package/checkbox/index.js +3 -2
- package/combobox/index.cjs +5 -5
- package/combobox/index.js +5 -5
- package/custom-elements.json +717 -4
- package/data-grid/index.cjs +1 -1
- package/data-grid/index.js +1 -1
- package/date-picker/index.cjs +7 -6
- package/date-picker/index.js +7 -6
- package/date-range-picker/index.cjs +7 -6
- package/date-range-picker/index.js +7 -6
- package/dial-pad/index.cjs +33 -0
- package/dial-pad/index.js +31 -0
- package/dialog/index.cjs +4 -4
- package/dialog/index.js +4 -4
- package/divider/index.cjs +1 -1
- package/divider/index.js +1 -1
- package/elevation/index.cjs +1 -1
- package/elevation/index.js +1 -1
- package/empty-state/index.cjs +2 -2
- package/empty-state/index.js +2 -2
- package/fab/index.cjs +2 -2
- package/fab/index.js +2 -2
- package/file-picker/index.cjs +4 -3
- package/file-picker/index.js +4 -3
- package/header/index.cjs +2 -2
- package/header/index.js +2 -2
- package/icon/index.cjs +1 -1
- package/icon/index.js +1 -1
- package/index.cjs +132 -122
- package/index.js +46 -43
- package/layout/index.cjs +1 -1
- package/layout/index.js +1 -1
- package/lib/components.d.ts +2 -0
- package/lib/dial-pad/definition.d.ts +3 -0
- package/lib/dial-pad/dial-pad.d.ts +14 -0
- package/lib/dial-pad/dial-pad.template.d.ts +4 -0
- package/lib/dial-pad/locale.d.ts +18 -0
- package/lib/enums.d.ts +6 -0
- package/lib/text-anchor/definition.d.ts +1 -0
- package/lib/text-anchor/text-anchor.d.ts +5 -0
- package/lib/video-player/definition.d.ts +3 -0
- package/lib/video-player/locale.d.ts +1 -0
- package/lib/video-player/video-player.d.ts +17 -0
- package/lib/video-player/video-player.template.d.ts +4 -0
- package/listbox/index.cjs +2 -2
- package/listbox/index.js +2 -2
- package/locales/en-GB.cjs +30 -0
- package/locales/en-GB.js +30 -0
- package/locales/en-US.cjs +198 -0
- package/locales/en-US.js +198 -0
- package/locales/ja-JP.cjs +197 -0
- package/locales/ja-JP.js +197 -0
- package/locales/zh-CN.cjs +199 -0
- package/locales/zh-CN.js +199 -0
- package/menu/index.cjs +6 -6
- package/menu/index.js +6 -6
- package/menu-item/index.cjs +2 -2
- package/menu-item/index.js +2 -2
- package/nav/index.cjs +1 -1
- package/nav/index.js +1 -1
- package/nav-disclosure/index.cjs +2 -2
- package/nav-disclosure/index.js +2 -2
- package/nav-item/index.cjs +2 -2
- package/nav-item/index.js +2 -2
- package/note/index.cjs +2 -2
- package/note/index.js +2 -2
- package/number-field/index.cjs +5 -4
- package/number-field/index.js +5 -4
- package/option/index.cjs +2 -2
- package/option/index.js +2 -2
- package/package.json +1 -1
- package/pagination/index.cjs +3 -3
- package/pagination/index.js +3 -3
- package/popup/index.cjs +4 -4
- package/popup/index.js +4 -4
- package/progress/index.cjs +1 -1
- package/progress/index.js +1 -1
- package/progress-ring/index.cjs +1 -1
- package/progress-ring/index.js +1 -1
- 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/index.cjs +2 -2
- package/range-slider/index.js +2 -2
- package/select/index.cjs +7 -6
- package/select/index.js +7 -6
- package/selectable-box/index.cjs +5 -4
- package/selectable-box/index.js +5 -4
- package/shared/applyMixinsWithObservables.cjs +15 -0
- package/shared/applyMixinsWithObservables.js +13 -0
- package/shared/definition.cjs +1 -1
- package/shared/definition.js +1 -1
- package/shared/definition11.cjs +3 -3
- package/shared/definition11.js +3 -3
- package/shared/definition14.cjs +2 -2
- package/shared/definition14.js +2 -2
- package/shared/definition15.cjs +8 -9
- package/shared/definition15.js +8 -9
- package/shared/definition16.cjs +3 -3
- package/shared/definition16.js +3 -3
- package/shared/definition17.cjs +2 -2
- package/shared/definition17.js +3 -3
- package/shared/definition18.cjs +3 -3
- package/shared/definition18.js +3 -3
- package/shared/definition19.cjs +3 -3
- package/shared/definition19.js +3 -3
- package/shared/definition20.cjs +186 -227
- package/shared/definition20.js +181 -222
- package/shared/definition21.cjs +264 -67
- package/shared/definition21.js +263 -65
- package/shared/definition22.cjs +66 -57
- package/shared/definition22.js +64 -56
- package/shared/definition23.cjs +42 -76
- package/shared/definition23.js +41 -75
- package/shared/definition24.cjs +70 -2402
- package/shared/definition24.js +69 -2401
- package/shared/definition25.cjs +2402 -46
- package/shared/definition25.js +2401 -45
- package/shared/definition26.cjs +63 -30
- package/shared/definition26.js +62 -29
- package/shared/definition27.cjs +28 -56
- package/shared/definition27.js +27 -55
- package/shared/definition28.cjs +35 -881
- package/shared/definition28.js +34 -879
- package/shared/definition29.cjs +893 -60
- package/shared/definition29.js +893 -61
- package/shared/definition30.cjs +68 -86
- package/shared/definition30.js +67 -85
- package/shared/definition31.cjs +86 -21
- package/shared/definition31.js +86 -21
- package/shared/definition32.cjs +24 -12
- package/shared/definition32.js +23 -11
- package/shared/definition33.cjs +11 -50
- package/shared/definition33.js +10 -49
- package/shared/definition34.cjs +26 -515
- package/shared/definition34.js +26 -515
- package/shared/definition35.cjs +448 -194
- package/shared/definition35.js +448 -192
- package/shared/definition36.cjs +256 -202
- package/shared/definition36.js +253 -201
- package/shared/definition37.cjs +204 -65
- package/shared/definition37.js +203 -63
- package/shared/definition38.cjs +63 -57
- package/shared/definition38.js +60 -55
- package/shared/definition39.cjs +65 -432
- package/shared/definition39.js +64 -431
- package/shared/definition4.cjs +2 -2
- package/shared/definition4.js +2 -2
- package/shared/definition40.cjs +441 -34
- package/shared/definition40.js +438 -31
- package/shared/definition41.cjs +34 -576
- package/shared/definition41.js +33 -575
- package/shared/definition42.cjs +531 -654
- package/shared/definition42.js +531 -654
- package/shared/definition43.cjs +690 -114
- package/shared/definition43.js +689 -113
- package/shared/definition44.cjs +124 -79
- package/shared/definition44.js +122 -77
- package/shared/definition45.cjs +78 -520
- package/shared/definition45.js +77 -518
- package/shared/definition46.cjs +520 -119
- package/shared/definition46.js +518 -118
- package/shared/definition47.cjs +118 -135
- package/shared/definition47.js +117 -134
- package/shared/definition48.cjs +151 -19
- package/shared/definition48.js +150 -18
- package/shared/definition49.cjs +21 -84
- package/shared/definition49.js +20 -83
- package/shared/definition5.cjs +1 -1
- package/shared/definition5.js +1 -1
- package/shared/definition50.cjs +52 -505
- package/shared/definition50.js +51 -504
- package/shared/definition51.cjs +526 -28
- package/shared/definition51.js +525 -27
- package/shared/definition52.cjs +28 -123
- package/shared/definition52.js +26 -122
- package/shared/definition53.cjs +110 -309
- package/shared/definition53.js +110 -308
- package/shared/definition54.cjs +255 -271
- package/shared/definition54.js +255 -271
- package/shared/definition55.cjs +262 -791
- package/shared/definition55.js +261 -790
- package/shared/definition56.cjs +818 -107
- package/shared/definition56.js +817 -106
- package/shared/definition57.cjs +85 -55
- package/shared/definition57.js +84 -54
- package/shared/definition58.cjs +125 -72
- package/shared/definition58.js +124 -71
- package/shared/definition59.cjs +72 -285
- package/shared/definition59.js +73 -286
- package/shared/definition6.cjs +1 -1
- package/shared/definition6.js +1 -1
- package/shared/definition60.cjs +298 -39
- package/shared/definition60.js +297 -38
- package/shared/definition61.cjs +65739 -1688
- package/shared/definition61.js +65738 -1687
- package/shared/definition62.cjs +50 -0
- package/shared/definition62.js +46 -0
- package/shared/definition63.cjs +1828 -0
- package/shared/definition63.js +1824 -0
- package/shared/definition7.cjs +2 -2
- package/shared/definition7.js +2 -2
- package/shared/definition8.cjs +2 -2
- package/shared/definition8.js +2 -2
- package/shared/definition9.cjs +1 -1
- package/shared/definition9.js +1 -1
- package/shared/enums.cjs +8 -0
- package/shared/enums.js +8 -1
- package/shared/index2.cjs +66 -37
- package/shared/index2.js +66 -37
- package/shared/key-codes2.js +1 -1
- package/shared/listbox.cjs +1 -1
- package/shared/listbox.js +1 -1
- package/shared/localization/Locale.d.ts +4 -0
- package/shared/patterns/form-elements/form-elements.d.ts +2 -3
- package/shared/presentationDate.cjs +16 -5
- package/shared/presentationDate.js +16 -5
- package/shared/text-anchor.cjs +6 -0
- package/shared/text-anchor.js +6 -0
- package/shared/text-anchor.template.cjs +6 -1
- package/shared/text-anchor.template.js +6 -1
- package/shared/text-field.cjs +1 -1
- package/shared/text-field.js +1 -1
- package/shared/utils/applyMixinsWithObservables.d.ts +1 -0
- package/side-drawer/index.cjs +1 -1
- package/side-drawer/index.js +1 -1
- package/slider/index.cjs +1 -1
- package/slider/index.js +1 -1
- package/split-button/index.cjs +2 -2
- package/split-button/index.js +2 -2
- package/style.css +1 -0
- package/styles/core/all.css +1 -1
- package/styles/core/theme.css +1 -1
- package/styles/core/typography.css +1 -1
- package/styles/tokens/theme-dark.css +4 -4
- package/styles/tokens/theme-light.css +4 -4
- package/styles/tokens/vivid-2-compat.css +1 -1
- package/switch/index.cjs +2 -2
- package/switch/index.js +2 -2
- package/tab/index.cjs +2 -2
- package/tab/index.js +2 -2
- package/tab-panel/index.cjs +1 -1
- package/tab-panel/index.js +1 -1
- package/tabs/index.cjs +4 -4
- package/tabs/index.js +4 -4
- package/tag/index.cjs +2 -2
- package/tag/index.js +2 -2
- package/tag-group/index.cjs +1 -1
- package/tag-group/index.js +1 -1
- package/text-area/index.cjs +4 -3
- package/text-area/index.js +4 -3
- package/text-field/index.cjs +4 -3
- package/text-field/index.js +4 -3
- package/time-picker/index.cjs +8 -7
- package/time-picker/index.js +8 -7
- package/toggletip/index.cjs +5 -5
- package/toggletip/index.js +5 -5
- package/tooltip/index.cjs +5 -5
- package/tooltip/index.js +5 -5
- package/tree-item/index.cjs +2 -2
- package/tree-item/index.js +2 -2
- package/tree-view/index.cjs +1 -1
- package/tree-view/index.js +1 -1
- package/video-player/index.cjs +17 -0
- package/video-player/index.js +15 -0
- package/vivid.api.json +311 -0
package/shared/definition53.cjs
CHANGED
|
@@ -1,196 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const index = require('./index.cjs');
|
|
4
|
-
const definition = require('./
|
|
5
|
-
require('./affix.cjs');
|
|
6
|
-
const index$1 = require('./index2.cjs');
|
|
7
|
-
const Reflector = require('./Reflector.cjs');
|
|
8
|
-
const textField = require('./text-field2.cjs');
|
|
4
|
+
const definition = require('./definition27.cjs');
|
|
5
|
+
const affix = require('./affix.cjs');
|
|
9
6
|
const applyMixins = require('./apply-mixins.cjs');
|
|
10
|
-
const
|
|
7
|
+
const icon = require('./icon.cjs');
|
|
11
8
|
const when = require('./when.cjs');
|
|
12
|
-
const ref = require('./ref.cjs');
|
|
13
9
|
const classNames = require('./class-names.cjs');
|
|
14
10
|
|
|
15
|
-
class _TextArea extends index.FoundationElement {
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* A form-associated base class for the {@link @microsoft/fast-foundation#(TextArea:class)} component.
|
|
19
|
-
*
|
|
20
|
-
* @internal
|
|
21
|
-
*/
|
|
22
|
-
class FormAssociatedTextArea extends formAssociated.FormAssociated(_TextArea) {
|
|
23
|
-
constructor() {
|
|
24
|
-
super(...arguments);
|
|
25
|
-
this.proxy = document.createElement("textarea");
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Resize mode for a TextArea
|
|
31
|
-
* @public
|
|
32
|
-
*/
|
|
33
|
-
const TextAreaResize = {
|
|
34
|
-
/**
|
|
35
|
-
* No resize.
|
|
36
|
-
*/
|
|
37
|
-
none: "none",
|
|
38
|
-
/**
|
|
39
|
-
* Resize vertically and horizontally.
|
|
40
|
-
*/
|
|
41
|
-
both: "both",
|
|
42
|
-
/**
|
|
43
|
-
* Resize horizontally.
|
|
44
|
-
*/
|
|
45
|
-
horizontal: "horizontal",
|
|
46
|
-
/**
|
|
47
|
-
* Resize vertically.
|
|
48
|
-
*/
|
|
49
|
-
vertical: "vertical",
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* A Text Area Custom HTML Element.
|
|
54
|
-
* Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea | <textarea> element }.
|
|
55
|
-
*
|
|
56
|
-
* @slot - The default slot for the label
|
|
57
|
-
* @csspart label - The label
|
|
58
|
-
* @csspart root - The element wrapping the control
|
|
59
|
-
* @csspart control - The textarea element
|
|
60
|
-
* @fires change - Emits a custom 'change' event when the textarea emits a change event
|
|
61
|
-
*
|
|
62
|
-
* @public
|
|
63
|
-
*/
|
|
64
|
-
let TextArea$1 = class TextArea extends FormAssociatedTextArea {
|
|
65
|
-
constructor() {
|
|
66
|
-
super(...arguments);
|
|
67
|
-
/**
|
|
68
|
-
* The resize mode of the element.
|
|
69
|
-
* @public
|
|
70
|
-
* @remarks
|
|
71
|
-
* HTML Attribute: resize
|
|
72
|
-
*/
|
|
73
|
-
this.resize = TextAreaResize.none;
|
|
74
|
-
/**
|
|
75
|
-
* Sizes the element horizontally by a number of character columns.
|
|
76
|
-
*
|
|
77
|
-
* @public
|
|
78
|
-
* @remarks
|
|
79
|
-
* HTML Attribute: cols
|
|
80
|
-
*/
|
|
81
|
-
this.cols = 20;
|
|
82
|
-
/**
|
|
83
|
-
* @internal
|
|
84
|
-
*/
|
|
85
|
-
this.handleTextInput = () => {
|
|
86
|
-
this.value = this.control.value;
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
readOnlyChanged() {
|
|
90
|
-
if (this.proxy instanceof HTMLTextAreaElement) {
|
|
91
|
-
this.proxy.readOnly = this.readOnly;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
autofocusChanged() {
|
|
95
|
-
if (this.proxy instanceof HTMLTextAreaElement) {
|
|
96
|
-
this.proxy.autofocus = this.autofocus;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
listChanged() {
|
|
100
|
-
if (this.proxy instanceof HTMLTextAreaElement) {
|
|
101
|
-
this.proxy.setAttribute("list", this.list);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
maxlengthChanged() {
|
|
105
|
-
if (this.proxy instanceof HTMLTextAreaElement) {
|
|
106
|
-
this.proxy.maxLength = this.maxlength;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
minlengthChanged() {
|
|
110
|
-
if (this.proxy instanceof HTMLTextAreaElement) {
|
|
111
|
-
this.proxy.minLength = this.minlength;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
spellcheckChanged() {
|
|
115
|
-
if (this.proxy instanceof HTMLTextAreaElement) {
|
|
116
|
-
this.proxy.spellcheck = this.spellcheck;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* Selects all the text in the text area
|
|
121
|
-
*
|
|
122
|
-
* @public
|
|
123
|
-
*/
|
|
124
|
-
select() {
|
|
125
|
-
this.control.select();
|
|
126
|
-
/**
|
|
127
|
-
* The select event does not permeate the shadow DOM boundary.
|
|
128
|
-
* This fn effectively proxies the select event,
|
|
129
|
-
* emitting a `select` event whenever the internal
|
|
130
|
-
* control emits a `select` event
|
|
131
|
-
*/
|
|
132
|
-
this.$emit("select");
|
|
133
|
-
}
|
|
134
|
-
/**
|
|
135
|
-
* Change event handler for inner control.
|
|
136
|
-
* @remarks
|
|
137
|
-
* "Change" events are not `composable` so they will not
|
|
138
|
-
* permeate the shadow DOM boundary. This fn effectively proxies
|
|
139
|
-
* the change event, emitting a `change` event whenever the internal
|
|
140
|
-
* control emits a `change` event
|
|
141
|
-
* @internal
|
|
142
|
-
*/
|
|
143
|
-
handleChange() {
|
|
144
|
-
this.$emit("change");
|
|
145
|
-
}
|
|
146
|
-
/** {@inheritDoc (FormAssociated:interface).validate} */
|
|
147
|
-
validate() {
|
|
148
|
-
super.validate(this.control);
|
|
149
|
-
}
|
|
150
|
-
};
|
|
151
|
-
index.__decorate([
|
|
152
|
-
index.attr({ mode: "boolean" })
|
|
153
|
-
], TextArea$1.prototype, "readOnly", void 0);
|
|
154
|
-
index.__decorate([
|
|
155
|
-
index.attr
|
|
156
|
-
], TextArea$1.prototype, "resize", void 0);
|
|
157
|
-
index.__decorate([
|
|
158
|
-
index.attr({ mode: "boolean" })
|
|
159
|
-
], TextArea$1.prototype, "autofocus", void 0);
|
|
160
|
-
index.__decorate([
|
|
161
|
-
index.attr({ attribute: "form" })
|
|
162
|
-
], TextArea$1.prototype, "formId", void 0);
|
|
163
|
-
index.__decorate([
|
|
164
|
-
index.attr
|
|
165
|
-
], TextArea$1.prototype, "list", void 0);
|
|
166
|
-
index.__decorate([
|
|
167
|
-
index.attr({ converter: index.nullableNumberConverter })
|
|
168
|
-
], TextArea$1.prototype, "maxlength", void 0);
|
|
169
|
-
index.__decorate([
|
|
170
|
-
index.attr({ converter: index.nullableNumberConverter })
|
|
171
|
-
], TextArea$1.prototype, "minlength", void 0);
|
|
172
|
-
index.__decorate([
|
|
173
|
-
index.attr
|
|
174
|
-
], TextArea$1.prototype, "name", void 0);
|
|
175
|
-
index.__decorate([
|
|
176
|
-
index.attr
|
|
177
|
-
], TextArea$1.prototype, "placeholder", void 0);
|
|
178
|
-
index.__decorate([
|
|
179
|
-
index.attr({ converter: index.nullableNumberConverter, mode: "fromView" })
|
|
180
|
-
], TextArea$1.prototype, "cols", void 0);
|
|
181
|
-
index.__decorate([
|
|
182
|
-
index.attr({ converter: index.nullableNumberConverter, mode: "fromView" })
|
|
183
|
-
], TextArea$1.prototype, "rows", void 0);
|
|
184
|
-
index.__decorate([
|
|
185
|
-
index.attr({ mode: "boolean" })
|
|
186
|
-
], TextArea$1.prototype, "spellcheck", void 0);
|
|
187
|
-
index.__decorate([
|
|
188
|
-
index.observable
|
|
189
|
-
], TextArea$1.prototype, "defaultSlottedNodes", void 0);
|
|
190
|
-
applyMixins.applyMixins(TextArea$1, textField.DelegatesARIATextbox);
|
|
191
|
-
|
|
192
|
-
const styles = ":host{display:inline-block}.base{display:inline-grid;grid-template-columns:1fr max-content;inline-size:100%;row-gap:4px}.base{--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--_connotation-color-intermediate)}.base.appearance-ghost{--_appearance-color-text: var(--_connotation-color-primary);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base:where(.hover,: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(--_connotation-color-fierce)}.base:where(.hover,:hover):where(:not(.disabled,:disabled,.readonly)).appearance-ghost{--_appearance-color-text: var(--_connotation-color-primary);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.base:where(.disabled,: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)}.base:where(.disabled,:disabled).appearance-ghost{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base:where(.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)}.base:where(.readonly):where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text: var(--vvd-color-neutral-600);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base:where(.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)}.base:where(.error):where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-alert-50);--_appearance-color-outline: transparent}.base:where(.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)}.base:where(.success):where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-success-50);--_appearance-color-outline: transparent}.base.connotation-success{--_connotation-color-primary: var(--vvd-text-area-success-primary, var(--vvd-color-success-500));--_connotation-color-primary-text: var(--vvd-text-area-success-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-text-area-success-primary-increment, var(--vvd-color-success-600));--_connotation-color-intermediate: var(--vvd-text-area-success-intermediate, var(--vvd-color-success-500));--_connotation-color-firm: var(--vvd-text-area-success-firm, var(--vvd-color-success-600));--_connotation-color-fierce: var(--vvd-text-area-success-fierce, var(--vvd-color-success-700));--_connotation-color-faint: var(--vvd-text-area-success-faint, var(--vvd-color-success-50));--_connotation-color-soft: var(--vvd-text-area-success-soft, var(--vvd-color-success-100))}.base.connotation-alert{--_connotation-color-primary: var(--vvd-text-area-alert-primary, var(--vvd-color-alert-500));--_connotation-color-primary-text: var(--vvd-text-area-alert-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-text-area-alert-primary-increment, var(--vvd-color-alert-600));--_connotation-color-intermediate: var(--vvd-text-area-alert-intermediate, var(--vvd-color-alert-500));--_connotation-color-firm: var(--vvd-text-area-alert-firm, var(--vvd-color-alert-600));--_connotation-color-fierce: var(--vvd-text-area-alert-fierce, var(--vvd-color-alert-700));--_connotation-color-faint: var(--vvd-text-area-alert-faint, var(--vvd-color-alert-50));--_connotation-color-soft: var(--vvd-text-area-alert-soft, var(--vvd-color-alert-100))}.base:not(.connotation-success,.connotation-alert){--_connotation-color-primary: var(--vvd-text-area-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-primary-text: var(--vvd-text-area-accent-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-text-area-accent-primary-increment, var(--vvd-color-neutral-800));--_connotation-color-intermediate: var(--vvd-text-area-accent-intermediate, var(--vvd-color-neutral-500));--_connotation-color-firm: var(--vvd-text-area-accent-firm, var(--vvd-color-canvas-text));--_connotation-color-fierce: var(--vvd-text-area-accent-fierce, var(--vvd-color-neutral-700));--_connotation-color-faint: var(--vvd-text-area-accent-faint, var(--vvd-color-neutral-50));--_connotation-color-soft: var(--vvd-text-area-accent-soft, var(--vvd-color-neutral-100))}@supports (user-select: none){.base{user-select:none}}.base:not(.disabled){--_low-ink-color: var(--vvd-color-neutral-600)}.base.disabled{--_low-ink-color: var(--_appearance-color-text);cursor:not-allowed}.label{color:var(--vvd-color-canvas-text);contain:inline-size;font:var(--vvd-typography-base);grid-column:1/2;grid-row:1;line-height:20px}.char-count{color:var(--_low-ink-color);font:var(--vvd-typography-base);grid-column:2/-1}.control{padding:8px 16px;border:0 none;border-radius:8px;appearance:none;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);grid-column:1/-1;min-block-size:calc(1px*(40 + 4*clamp(-1,var(--vvd-size-density, 0),2)));resize:none;transition:box-shadow .2s,background-color .2s,color .2s}@supports selector(::-webkit-resizer){.control::-webkit-resizer{background-image:linear-gradient(315deg,transparent 0,transparent 2px,var(--vvd-color-canvas-text) 2px,var(--vvd-color-canvas-text) 3px,transparent 3px,transparent 5px,var(--vvd-color-canvas-text) 5px,var(--vvd-color-canvas-text) 6px,transparent 6px,transparent 8px,transparent 100%);background-repeat:no-repeat;background-size:10px 10px;block-size:10px;inline-size:10px}}.control:disabled{opacity:1;pointer-events:none;-webkit-text-fill-color:var(--_appearance-color-text)}.control::placeholder,.control:disabled::placeholder{opacity:1;pointer-events:none;-webkit-text-fill-color:var(--_low-ink-color)}.control:focus-visible{--focus-stroke-gap-color: transparent;box-shadow:inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:2px solid var(--focus-stroke-color, var(--vvd-color-canvas-text));outline-offset:calc(-2px - var(--focus-inset, 0px))}:host([resize=both]) .control{resize:both}:host([resize=horizontal]) .control{resize:horizontal}:host([resize=vertical]) .control{resize:vertical}\n";
|
|
193
|
-
|
|
194
11
|
var __defProp = Object.defineProperty;
|
|
195
12
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
196
13
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
@@ -202,148 +19,132 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
202
19
|
__defProp(target, key, result);
|
|
203
20
|
return result;
|
|
204
21
|
};
|
|
205
|
-
|
|
206
|
-
if (!member.has(obj))
|
|
207
|
-
throw TypeError("Cannot " + msg);
|
|
208
|
-
};
|
|
209
|
-
var __privateGet = (obj, member, getter) => {
|
|
210
|
-
__accessCheck(obj, member, "read from private field");
|
|
211
|
-
return getter ? getter.call(obj) : member.get(obj);
|
|
212
|
-
};
|
|
213
|
-
var __privateAdd = (obj, member, value) => {
|
|
214
|
-
if (member.has(obj))
|
|
215
|
-
throw TypeError("Cannot add the same private member more than once");
|
|
216
|
-
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
217
|
-
};
|
|
218
|
-
var __privateSet = (obj, member, value, setter) => {
|
|
219
|
-
__accessCheck(obj, member, "write to private field");
|
|
220
|
-
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
221
|
-
return value;
|
|
222
|
-
};
|
|
223
|
-
var _reflectToTextArea;
|
|
224
|
-
let TextArea = class extends TextArea$1 {
|
|
22
|
+
class Tag extends index.FoundationElement {
|
|
225
23
|
constructor() {
|
|
226
24
|
super(...arguments);
|
|
227
|
-
|
|
25
|
+
this.removable = false;
|
|
26
|
+
this.disabled = false;
|
|
27
|
+
this.selectable = false;
|
|
28
|
+
this.selected = false;
|
|
29
|
+
this.#select = () => {
|
|
30
|
+
if (!this.selectable || this.disabled) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
this.selected = !this.selected;
|
|
34
|
+
this.$emit("selected-change");
|
|
35
|
+
};
|
|
228
36
|
}
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
37
|
+
remove() {
|
|
38
|
+
if (!this.removable || this.selectable) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
this.$emit("removed");
|
|
42
|
+
this.parentElement && this.parentElement.removeChild(this);
|
|
43
|
+
}
|
|
44
|
+
#select;
|
|
45
|
+
handleKeydown(e) {
|
|
46
|
+
if (e.key === "Enter") {
|
|
47
|
+
this.#select();
|
|
48
|
+
}
|
|
49
|
+
if (e.key === "Delete" || e.key === "Backspace") {
|
|
50
|
+
this.remove();
|
|
51
|
+
}
|
|
52
|
+
return true;
|
|
233
53
|
}
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
__privateGet(this, _reflectToTextArea).destroy();
|
|
54
|
+
handleClick() {
|
|
55
|
+
this.#select();
|
|
237
56
|
}
|
|
238
|
-
}
|
|
239
|
-
_reflectToTextArea = new WeakMap();
|
|
57
|
+
}
|
|
240
58
|
__decorateClass([
|
|
241
59
|
index.attr
|
|
242
|
-
],
|
|
243
|
-
|
|
244
|
-
index
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
index
|
|
251
|
-
|
|
252
|
-
|
|
60
|
+
], Tag.prototype, "connotation", 2);
|
|
61
|
+
__decorateClass([
|
|
62
|
+
index.attr
|
|
63
|
+
], Tag.prototype, "shape", 2);
|
|
64
|
+
__decorateClass([
|
|
65
|
+
index.attr
|
|
66
|
+
], Tag.prototype, "appearance", 2);
|
|
67
|
+
__decorateClass([
|
|
68
|
+
index.attr
|
|
69
|
+
], Tag.prototype, "label", 2);
|
|
70
|
+
__decorateClass([
|
|
71
|
+
index.attr({ mode: "boolean" })
|
|
72
|
+
], Tag.prototype, "removable", 2);
|
|
73
|
+
__decorateClass([
|
|
74
|
+
index.attr({ mode: "boolean" })
|
|
75
|
+
], Tag.prototype, "disabled", 2);
|
|
76
|
+
__decorateClass([
|
|
77
|
+
index.attr({ mode: "boolean" })
|
|
78
|
+
], Tag.prototype, "selectable", 2);
|
|
79
|
+
__decorateClass([
|
|
80
|
+
index.attr({ mode: "boolean" })
|
|
81
|
+
], Tag.prototype, "selected", 2);
|
|
82
|
+
applyMixins.applyMixins(Tag, affix.AffixIcon);
|
|
83
|
+
|
|
84
|
+
const styles = ".base{--tag-block-size:calc(1px*(24 + 4*clamp(-1, var(--vvd-size-density, 0), 2)));position:relative;display:inline-flex;box-sizing:border-box;align-items:center;background-color:var(--_appearance-color-fill);block-size:var(--tag-block-size);box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);color:var(--_appearance-color-text);column-gap:8px;font:var(--vvd-typography-base-bold);max-inline-size:100%;padding-inline:8px;vertical-align:middle}.base.connotation-cta{--_connotation-color-contrast: var(--vvd-tag-cta-contrast, var(--vvd-color-cta-800));--_connotation-color-soft: var(--vvd-tag-cta-soft, var(--vvd-color-cta-100));--_connotation-color-pale: var(--vvd-tag-cta-pale, var(--vvd-color-cta-300));--_connotation-color-fierce: var(--vvd-tag-cta-fierce, var(--vvd-color-cta-700));--_connotation-color-firm-all: var(--vvd-tag-cta-firm-all, var(--vvd-color-cta-600));--_connotation-color-faint: var(--vvd-tag-cta-faint, var(--vvd-color-cta-50));--_connotation-color-dim: var(--vvd-tag-cta-dim, var(--vvd-color-cta-200))}.base:not(.connotation-cta){--_connotation-color-contrast: var(--vvd-tag-accent-contrast, var(--vvd-color-neutral-800));--_connotation-color-soft: var(--vvd-tag-accent-soft, var(--vvd-color-neutral-100));--_connotation-color-pale: var(--vvd-tag-accent-pale, var(--vvd-color-neutral-300));--_connotation-color-fierce: var(--vvd-tag-accent-fierce, var(--vvd-color-neutral-700));--_connotation-color-firm-all: var(--vvd-tag-accent-firm-all, var(--vvd-color-neutral-600));--_connotation-color-faint: var(--vvd-tag-accent-faint, var(--vvd-color-neutral-50));--_connotation-color-dim: var(--vvd-tag-accent-dim, var(--vvd-color-neutral-200))}.base{--_appearance-color-text: var(--_connotation-color-contrast);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.base.appearance-duotone{--_appearance-color-text: var(--_connotation-color-firm-all);--_appearance-color-fill: transparent;--_appearance-color-outline: var(--_connotation-color-pale)}.base:where(.hover,:hover):where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-contrast);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.base:where(.hover,:hover):where(:not(.disabled,:disabled,.readonly)).appearance-duotone{--_appearance-color-text: var(--_connotation-color-firm-all);--_appearance-color-fill: transparent;--_appearance-color-outline: var(--_connotation-color-firm-all)}.base:where(.active,:active):where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-contrast);--_appearance-color-fill: var(--_connotation-color-dim);--_appearance-color-outline: transparent}.base:where(.active,:active):where(:not(.disabled,:disabled)).appearance-duotone{--_appearance-color-text: var(--_connotation-color-firm-all);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: var(--_connotation-color-pale)}.base:where(.disabled,:disabled){--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: var(--vvd-color-neutral-100);--_appearance-color-outline: transparent}.base:where(.disabled,:disabled).appearance-duotone{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: var(--vvd-color-neutral-100)}.base:where(.selected):where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-contrast);--_appearance-color-fill: var(--_connotation-color-pale);--_appearance-color-outline: transparent}.base:where(.selected):where(:not(.disabled,:disabled)).appearance-duotone{--_appearance-color-text: var(--_connotation-color-firm-all);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: var(--_connotation-color-pale)}.base:not(.shape-pill){border-radius:4px}.base.shape-pill{border-radius:16px}.base:focus-visible{--focus-stroke-gap-color: transparent;box-shadow:inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:2px solid var(--focus-stroke-color, var(--vvd-color-canvas-text));outline-offset:calc(-2px - var(--focus-inset, 0px))}@supports (user-select: none){.base{user-select:none}}.base:not(.disabled){cursor:pointer}.base.disabled{cursor:not-allowed;pointer-events:none}.base.removable{cursor:auto}.label{overflow:hidden;max-inline-size:100%;text-overflow:ellipsis;white-space:nowrap}slot[name=icon]{font-size:calc(var(--tag-block-size) / 1.5);line-height:1}.dismiss-button{display:flex;align-items:center;border-radius:inherit;background-color:var(--_appearance-color-fill);cursor:pointer}\n";
|
|
253
85
|
|
|
254
86
|
const getClasses = ({
|
|
255
|
-
|
|
256
|
-
|
|
87
|
+
connotation,
|
|
88
|
+
appearance,
|
|
89
|
+
shape,
|
|
257
90
|
disabled,
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
91
|
+
selectable,
|
|
92
|
+
removable,
|
|
93
|
+
selected
|
|
261
94
|
}) => classNames.classNames(
|
|
262
95
|
"base",
|
|
263
|
-
["readonly", readOnly],
|
|
264
|
-
["placeholder", Boolean(placeholder)],
|
|
265
96
|
["disabled", disabled],
|
|
266
|
-
["
|
|
267
|
-
["
|
|
268
|
-
["
|
|
97
|
+
["selectable", selectable],
|
|
98
|
+
["selected", selectable && selected],
|
|
99
|
+
["removable", removable && !selectable],
|
|
100
|
+
[`connotation-${connotation}`, Boolean(connotation)],
|
|
101
|
+
[`appearance-${appearance}`, Boolean(appearance)],
|
|
102
|
+
[`shape-${shape}`, Boolean(shape)]
|
|
269
103
|
);
|
|
270
|
-
function
|
|
271
|
-
return index.html` <label for="control" class="label">
|
|
272
|
-
${(x) => x.label}
|
|
273
|
-
</label>`;
|
|
274
|
-
}
|
|
275
|
-
function renderCharCount() {
|
|
104
|
+
function renderDismissButton(iconTag) {
|
|
276
105
|
return index.html`
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
106
|
+
<span
|
|
107
|
+
aria-hidden="true"
|
|
108
|
+
class="dismiss-button"
|
|
109
|
+
@click="${(x) => x.remove()}">
|
|
110
|
+
<${iconTag} name="close-line"></${iconTag}>
|
|
111
|
+
</span>`;
|
|
281
112
|
}
|
|
282
|
-
const
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
?readonly="${(x) => x.readOnly}"
|
|
299
|
-
?disabled="${(x) => x.disabled}"
|
|
300
|
-
?required="${(x) => x.required}"
|
|
301
|
-
?spellcheck="${(x) => x.spellcheck}"
|
|
302
|
-
aria-atomic="${(x) => x.ariaAtomic}"
|
|
303
|
-
aria-busy="${(x) => x.ariaBusy}"
|
|
304
|
-
aria-current="${(x) => x.ariaCurrent}"
|
|
305
|
-
aria-details="${(x) => x.ariaDetails}"
|
|
306
|
-
aria-disabled="${(x) => x.ariaDisabled}"
|
|
307
|
-
aria-errormessage="${(x) => x.ariaErrormessage}"
|
|
308
|
-
aria-haspopup="${(x) => x.ariaHaspopup}"
|
|
309
|
-
aria-hidden="${(x) => x.ariaHidden}"
|
|
310
|
-
aria-invalid="${(x) => x.ariaInvalid}"
|
|
311
|
-
aria-keyshortcuts="${(x) => x.ariaKeyshortcuts}"
|
|
312
|
-
aria-label="${(x) => x.ariaLabel}"
|
|
313
|
-
aria-live="${(x) => x.ariaLive}"
|
|
314
|
-
aria-relevant="${(x) => x.ariaRelevant}"
|
|
315
|
-
aria-roledescription="${(x) => x.ariaRoledescription}"
|
|
316
|
-
@input="${(x) => x.handleTextInput()}"
|
|
317
|
-
@change="${(x) => x.handleChange()}"
|
|
318
|
-
${ref.ref("control")}
|
|
319
|
-
>
|
|
320
|
-
</textarea>
|
|
321
|
-
${when.when(
|
|
322
|
-
(x) => !x.successText && !x.errorValidationMessage && x.helperText?.length,
|
|
323
|
-
index$1.getFeedbackTemplate("helper", context)
|
|
113
|
+
const tagTemplate = (context) => {
|
|
114
|
+
const affixIconTemplate = affix.affixIconTemplateFactory(context);
|
|
115
|
+
const iconTag = context.tagFor(icon.Icon);
|
|
116
|
+
return index.html` <span
|
|
117
|
+
class="${getClasses}"
|
|
118
|
+
role="option"
|
|
119
|
+
aria-disabled="${(x) => x.disabled}"
|
|
120
|
+
aria-selected="${(x) => x.selectable}"
|
|
121
|
+
tabindex="${(x) => x.disabled ? null : 0}"
|
|
122
|
+
@keydown="${(x, c) => x.handleKeydown(c.event)}"
|
|
123
|
+
@click="${(x) => x.handleClick()}"
|
|
124
|
+
>
|
|
125
|
+
${(x) => affixIconTemplate(x.icon, affix.IconWrapper.Slot)}
|
|
126
|
+
${when.when(
|
|
127
|
+
(x) => x.label,
|
|
128
|
+
(x) => index.html`<span class="label">${x.label}</span>`
|
|
324
129
|
)}
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
130
|
+
${when.when((x) => x.removable && !x.selectable, renderDismissButton(iconTag))}
|
|
131
|
+
${when.when(
|
|
132
|
+
(x) => x.selectable && x.selected,
|
|
133
|
+
index.html`<${iconTag} class="selectable-icon" name="check-circle-solid"></${iconTag}>`
|
|
328
134
|
)}
|
|
329
|
-
|
|
330
|
-
</div>
|
|
331
|
-
`;
|
|
135
|
+
</span>`;
|
|
332
136
|
};
|
|
333
137
|
|
|
334
|
-
const
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
delegatesFocus: true
|
|
341
|
-
}
|
|
138
|
+
const tagDefinition = Tag.compose({
|
|
139
|
+
baseName: "tag",
|
|
140
|
+
template: tagTemplate,
|
|
141
|
+
styles,
|
|
142
|
+
shadowOptions: {
|
|
143
|
+
delegatesFocus: true
|
|
342
144
|
}
|
|
343
|
-
);
|
|
344
|
-
const
|
|
345
|
-
const
|
|
145
|
+
});
|
|
146
|
+
const tagRegistries = [tagDefinition(), ...definition.iconRegistries];
|
|
147
|
+
const registerTag = index.registerFactory(tagRegistries);
|
|
346
148
|
|
|
347
|
-
exports.
|
|
348
|
-
exports.
|
|
349
|
-
exports.textAreaRegistries = textAreaRegistries;
|
|
149
|
+
exports.registerTag = registerTag;
|
|
150
|
+
exports.tagDefinition = tagDefinition;
|