@vonage/vivid 4.5.0 → 4.7.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/custom-elements.json +947 -79
- package/elevation/index.cjs +1 -1
- package/elevation/index.js +1 -1
- package/index.cjs +62 -56
- package/index.js +20 -19
- package/lib/components.d.ts +1 -0
- package/lib/dialog/dialog.d.ts +0 -1
- package/lib/menu/menu.d.ts +2 -1
- package/lib/number-field/number-field.d.ts +3 -1
- package/lib/searchable-select/definition.d.ts +4 -0
- package/lib/searchable-select/locale.d.ts +9 -0
- package/lib/searchable-select/option-tag.d.ts +14 -0
- package/lib/searchable-select/option-tag.template.d.ts +4 -0
- package/lib/searchable-select/searchable-select.d.ts +29 -0
- package/lib/searchable-select/searchable-select.form-associated.d.ts +10 -0
- package/lib/searchable-select/searchable-select.template.d.ts +4 -0
- package/lib/select/select.d.ts +3 -1
- package/lib/tab/locale.d.ts +3 -0
- package/lib/tab/tab.d.ts +5 -1
- package/lib/tag/definition.d.ts +1 -0
- package/lib/text-field/text-field.d.ts +3 -1
- package/locales/de-DE.cjs +24 -0
- package/locales/de-DE.js +24 -0
- package/locales/en-GB.cjs +24 -0
- package/locales/en-GB.js +24 -0
- package/locales/en-US.cjs +24 -0
- package/locales/en-US.js +24 -0
- package/locales/ja-JP.cjs +24 -0
- package/locales/ja-JP.js +24 -0
- package/locales/zh-CN.cjs +24 -0
- package/locales/zh-CN.js +24 -0
- package/package.json +1 -1
- package/popup/index.cjs +1 -1
- package/popup/index.js +1 -1
- package/searchable-select/index.cjs +5 -0
- package/searchable-select/index.js +3 -0
- package/select/index.cjs +1 -1
- package/select/index.js +1 -1
- package/selectable-box/index.cjs +1 -1
- package/selectable-box/index.js +1 -1
- package/shared/definition11.cjs +1 -1
- package/shared/definition11.js +1 -1
- package/shared/definition14.cjs +1 -1
- package/shared/definition14.js +1 -1
- package/shared/definition16.cjs +1 -1
- package/shared/definition16.js +1 -1
- package/shared/definition18.cjs +2 -2
- package/shared/definition18.js +2 -2
- package/shared/definition19.cjs +2 -2
- package/shared/definition19.js +2 -2
- package/shared/definition20.cjs +14 -34
- package/shared/definition20.js +14 -34
- package/shared/definition21.cjs +2 -19
- package/shared/definition21.js +2 -19
- package/shared/definition26.cjs +1 -1
- package/shared/definition26.js +1 -1
- package/shared/definition29.cjs +4 -0
- package/shared/definition29.js +4 -0
- package/shared/definition30.cjs +2 -1
- package/shared/definition30.js +2 -1
- package/shared/definition35.cjs +12 -7
- package/shared/definition35.js +12 -7
- package/shared/definition36.cjs +50 -207
- package/shared/definition36.js +51 -207
- package/shared/definition4.cjs +1 -1
- package/shared/definition4.js +1 -1
- package/shared/definition42.cjs +1 -1
- package/shared/definition42.js +1 -1
- package/shared/definition43.cjs +1018 -647
- package/shared/definition43.js +1014 -644
- package/shared/definition44.cjs +723 -112
- package/shared/definition44.js +722 -111
- package/shared/definition45.cjs +121 -80
- package/shared/definition45.js +119 -78
- package/shared/definition46.cjs +81 -614
- package/shared/definition46.js +80 -612
- package/shared/definition47.cjs +608 -114
- package/shared/definition47.js +606 -113
- package/shared/definition48.cjs +116 -134
- package/shared/definition48.js +115 -133
- package/shared/definition49.cjs +149 -19
- package/shared/definition49.js +148 -18
- package/shared/definition5.cjs +1 -1
- package/shared/definition5.js +1 -1
- package/shared/definition50.cjs +21 -82
- package/shared/definition50.js +20 -81
- package/shared/definition51.cjs +77 -539
- package/shared/definition51.js +76 -538
- package/shared/definition52.cjs +568 -28
- package/shared/definition52.js +567 -27
- package/shared/definition53.cjs +28 -123
- package/shared/definition53.js +26 -122
- package/shared/definition54.cjs +115 -295
- package/shared/definition54.js +114 -294
- package/shared/definition55.cjs +251 -311
- package/shared/definition55.js +251 -311
- package/shared/definition56.cjs +299 -780
- package/shared/definition56.js +298 -779
- package/shared/definition57.cjs +800 -102
- package/shared/definition57.js +799 -101
- package/shared/definition58.cjs +92 -63
- package/shared/definition58.js +91 -62
- package/shared/definition59.cjs +117 -75
- package/shared/definition59.js +116 -74
- package/shared/definition60.cjs +70 -285
- package/shared/definition60.js +71 -286
- package/shared/definition61.cjs +274 -66146
- package/shared/definition61.js +273 -66145
- package/shared/definition62.cjs +66160 -27
- package/shared/definition62.js +66158 -25
- package/shared/definition63.cjs +24 -1952
- package/shared/definition63.js +23 -1950
- package/shared/definition64.cjs +1976 -0
- package/shared/definition64.js +1971 -0
- package/shared/listbox-option.cjs +204 -0
- package/shared/listbox-option.js +201 -0
- package/shared/listbox.cjs +3 -3
- package/shared/listbox.js +1 -1
- package/shared/localization/Locale.d.ts +4 -0
- package/shared/presentationDate.cjs +2 -2
- package/shared/presentationDate.js +2 -2
- package/shared/scrollIntoView.cjs +51 -0
- package/shared/scrollIntoView.js +49 -0
- package/shared/slider.template.cjs +1 -1
- package/shared/slider.template.js +1 -1
- package/shared/text-field.cjs +1 -1
- package/shared/text-field.js +1 -1
- package/shared/utils/scrollIntoView.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 +1 -1
- package/split-button/index.js +1 -1
- package/styles/core/all.css +1 -1
- package/styles/core/theme.css +1 -1
- package/styles/core/typography.css +1 -1
- package/styles/tokens/theme-dark.css +4 -4
- package/styles/tokens/theme-light.css +4 -4
- package/styles/tokens/vivid-2-compat.css +1 -1
- package/switch/index.cjs +1 -1
- package/switch/index.js +1 -1
- package/tab/index.cjs +1 -1
- package/tab/index.js +1 -1
- package/tab-panel/index.cjs +1 -1
- package/tab-panel/index.js +1 -1
- package/tabs/index.cjs +1 -1
- package/tabs/index.js +1 -1
- package/tag/index.cjs +1 -1
- package/tag/index.js +1 -1
- package/tag-group/index.cjs +1 -1
- package/tag-group/index.js +1 -1
- package/text-area/index.cjs +1 -1
- package/text-area/index.js +1 -1
- package/text-field/index.cjs +1 -1
- package/text-field/index.js +1 -1
- package/time-picker/index.cjs +1 -1
- package/time-picker/index.js +1 -1
- package/toggletip/index.cjs +1 -1
- package/toggletip/index.js +1 -1
- package/tooltip/index.cjs +1 -1
- package/tooltip/index.js +1 -1
- package/tree-item/index.cjs +1 -1
- package/tree-item/index.js +1 -1
- package/tree-view/index.cjs +1 -1
- package/tree-view/index.js +1 -1
- package/video-player/index.cjs +1 -1
- package/video-player/index.js +1 -1
- package/vivid.api.json +295 -0
- package/api-extractor.json +0 -25
- package/shared/dialog-polyfill.esm.cjs +0 -862
- package/shared/dialog-polyfill.esm.js +0 -858
- package/tsdoc-metadata.json +0 -11
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const index = require('./index.cjs');
|
|
4
|
+
const ariaGlobal = require('./aria-global.cjs');
|
|
5
|
+
const startEnd = require('./start-end.cjs');
|
|
6
|
+
const applyMixins = require('./apply-mixins.cjs');
|
|
7
|
+
const dom = require('./dom.cjs');
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Determines if the element is a {@link (ListboxOption:class)}
|
|
11
|
+
*
|
|
12
|
+
* @param element - the element to test.
|
|
13
|
+
* @public
|
|
14
|
+
*/
|
|
15
|
+
function isListboxOption(el) {
|
|
16
|
+
return (dom.isHTMLElement(el) &&
|
|
17
|
+
(el.getAttribute("role") === "option" ||
|
|
18
|
+
el instanceof HTMLOptionElement));
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* An Option Custom HTML Element.
|
|
22
|
+
* Implements {@link https://www.w3.org/TR/wai-aria-1.1/#option | ARIA option }.
|
|
23
|
+
*
|
|
24
|
+
* @slot start - Content which can be provided before the listbox option content
|
|
25
|
+
* @slot end - Content which can be provided after the listbox option content
|
|
26
|
+
* @slot - The default slot for listbox option content
|
|
27
|
+
* @csspart content - Wraps the listbox option content
|
|
28
|
+
*
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
let ListboxOption$1 = class ListboxOption extends index.FoundationElement {
|
|
32
|
+
constructor(text, value, defaultSelected, selected) {
|
|
33
|
+
super();
|
|
34
|
+
/**
|
|
35
|
+
* The defaultSelected state of the option.
|
|
36
|
+
* @public
|
|
37
|
+
*/
|
|
38
|
+
this.defaultSelected = false;
|
|
39
|
+
/**
|
|
40
|
+
* Tracks whether the "selected" property has been changed.
|
|
41
|
+
* @internal
|
|
42
|
+
*/
|
|
43
|
+
this.dirtySelected = false;
|
|
44
|
+
/**
|
|
45
|
+
* The checked state of the control.
|
|
46
|
+
*
|
|
47
|
+
* @public
|
|
48
|
+
*/
|
|
49
|
+
this.selected = this.defaultSelected;
|
|
50
|
+
/**
|
|
51
|
+
* Track whether the value has been changed from the initial value
|
|
52
|
+
*/
|
|
53
|
+
this.dirtyValue = false;
|
|
54
|
+
if (text) {
|
|
55
|
+
this.textContent = text;
|
|
56
|
+
}
|
|
57
|
+
if (value) {
|
|
58
|
+
this.initialValue = value;
|
|
59
|
+
}
|
|
60
|
+
if (defaultSelected) {
|
|
61
|
+
this.defaultSelected = defaultSelected;
|
|
62
|
+
}
|
|
63
|
+
if (selected) {
|
|
64
|
+
this.selected = selected;
|
|
65
|
+
}
|
|
66
|
+
this.proxy = new Option(`${this.textContent}`, this.initialValue, this.defaultSelected, this.selected);
|
|
67
|
+
this.proxy.disabled = this.disabled;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Updates the ariaChecked property when the checked property changes.
|
|
71
|
+
*
|
|
72
|
+
* @param prev - the previous checked value
|
|
73
|
+
* @param next - the current checked value
|
|
74
|
+
*
|
|
75
|
+
* @public
|
|
76
|
+
*/
|
|
77
|
+
checkedChanged(prev, next) {
|
|
78
|
+
if (typeof next === "boolean") {
|
|
79
|
+
this.ariaChecked = next ? "true" : "false";
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
this.ariaChecked = null;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Updates the proxy's text content when the default slot changes.
|
|
86
|
+
* @param prev - the previous content value
|
|
87
|
+
* @param next - the current content value
|
|
88
|
+
*
|
|
89
|
+
* @internal
|
|
90
|
+
*/
|
|
91
|
+
contentChanged(prev, next) {
|
|
92
|
+
if (this.proxy instanceof HTMLOptionElement) {
|
|
93
|
+
this.proxy.textContent = this.textContent;
|
|
94
|
+
}
|
|
95
|
+
this.$emit("contentchange", null, { bubbles: true });
|
|
96
|
+
}
|
|
97
|
+
defaultSelectedChanged() {
|
|
98
|
+
if (!this.dirtySelected) {
|
|
99
|
+
this.selected = this.defaultSelected;
|
|
100
|
+
if (this.proxy instanceof HTMLOptionElement) {
|
|
101
|
+
this.proxy.selected = this.defaultSelected;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
disabledChanged(prev, next) {
|
|
106
|
+
this.ariaDisabled = this.disabled ? "true" : "false";
|
|
107
|
+
if (this.proxy instanceof HTMLOptionElement) {
|
|
108
|
+
this.proxy.disabled = this.disabled;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
selectedAttributeChanged() {
|
|
112
|
+
this.defaultSelected = this.selectedAttribute;
|
|
113
|
+
if (this.proxy instanceof HTMLOptionElement) {
|
|
114
|
+
this.proxy.defaultSelected = this.defaultSelected;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
selectedChanged() {
|
|
118
|
+
this.ariaSelected = this.selected ? "true" : "false";
|
|
119
|
+
if (!this.dirtySelected) {
|
|
120
|
+
this.dirtySelected = true;
|
|
121
|
+
}
|
|
122
|
+
if (this.proxy instanceof HTMLOptionElement) {
|
|
123
|
+
this.proxy.selected = this.selected;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
initialValueChanged(previous, next) {
|
|
127
|
+
// If the value is clean and the component is connected to the DOM
|
|
128
|
+
// then set value equal to the attribute value.
|
|
129
|
+
if (!this.dirtyValue) {
|
|
130
|
+
this.value = this.initialValue;
|
|
131
|
+
this.dirtyValue = false;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
get label() {
|
|
135
|
+
var _a;
|
|
136
|
+
return (_a = this.value) !== null && _a !== void 0 ? _a : this.text;
|
|
137
|
+
}
|
|
138
|
+
get text() {
|
|
139
|
+
var _a, _b;
|
|
140
|
+
return (_b = (_a = this.textContent) === null || _a === void 0 ? void 0 : _a.replace(/\s+/g, " ").trim()) !== null && _b !== void 0 ? _b : "";
|
|
141
|
+
}
|
|
142
|
+
set value(next) {
|
|
143
|
+
const newValue = `${next !== null && next !== void 0 ? next : ""}`;
|
|
144
|
+
this._value = newValue;
|
|
145
|
+
this.dirtyValue = true;
|
|
146
|
+
if (this.proxy instanceof HTMLOptionElement) {
|
|
147
|
+
this.proxy.value = newValue;
|
|
148
|
+
}
|
|
149
|
+
index.Observable.notify(this, "value");
|
|
150
|
+
}
|
|
151
|
+
get value() {
|
|
152
|
+
var _a;
|
|
153
|
+
index.Observable.track(this, "value");
|
|
154
|
+
return (_a = this._value) !== null && _a !== void 0 ? _a : this.text;
|
|
155
|
+
}
|
|
156
|
+
get form() {
|
|
157
|
+
return this.proxy ? this.proxy.form : null;
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
index.__decorate([
|
|
161
|
+
index.observable
|
|
162
|
+
], ListboxOption$1.prototype, "checked", void 0);
|
|
163
|
+
index.__decorate([
|
|
164
|
+
index.observable
|
|
165
|
+
], ListboxOption$1.prototype, "content", void 0);
|
|
166
|
+
index.__decorate([
|
|
167
|
+
index.observable
|
|
168
|
+
], ListboxOption$1.prototype, "defaultSelected", void 0);
|
|
169
|
+
index.__decorate([
|
|
170
|
+
index.attr({ mode: "boolean" })
|
|
171
|
+
], ListboxOption$1.prototype, "disabled", void 0);
|
|
172
|
+
index.__decorate([
|
|
173
|
+
index.attr({ attribute: "selected", mode: "boolean" })
|
|
174
|
+
], ListboxOption$1.prototype, "selectedAttribute", void 0);
|
|
175
|
+
index.__decorate([
|
|
176
|
+
index.observable
|
|
177
|
+
], ListboxOption$1.prototype, "selected", void 0);
|
|
178
|
+
index.__decorate([
|
|
179
|
+
index.attr({ attribute: "value", mode: "fromView" })
|
|
180
|
+
], ListboxOption$1.prototype, "initialValue", void 0);
|
|
181
|
+
/**
|
|
182
|
+
* States and properties relating to the ARIA `option` role.
|
|
183
|
+
*
|
|
184
|
+
* @public
|
|
185
|
+
*/
|
|
186
|
+
class DelegatesARIAListboxOption {
|
|
187
|
+
}
|
|
188
|
+
index.__decorate([
|
|
189
|
+
index.observable
|
|
190
|
+
], DelegatesARIAListboxOption.prototype, "ariaChecked", void 0);
|
|
191
|
+
index.__decorate([
|
|
192
|
+
index.observable
|
|
193
|
+
], DelegatesARIAListboxOption.prototype, "ariaPosInSet", void 0);
|
|
194
|
+
index.__decorate([
|
|
195
|
+
index.observable
|
|
196
|
+
], DelegatesARIAListboxOption.prototype, "ariaSelected", void 0);
|
|
197
|
+
index.__decorate([
|
|
198
|
+
index.observable
|
|
199
|
+
], DelegatesARIAListboxOption.prototype, "ariaSetSize", void 0);
|
|
200
|
+
applyMixins.applyMixins(DelegatesARIAListboxOption, ariaGlobal.ARIAGlobalStatesAndProperties);
|
|
201
|
+
applyMixins.applyMixins(ListboxOption$1, startEnd.StartEnd, DelegatesARIAListboxOption);
|
|
202
|
+
|
|
203
|
+
exports.ListboxOption = ListboxOption$1;
|
|
204
|
+
exports.isListboxOption = isListboxOption;
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import { F as FoundationElement, O as Observable, _ as __decorate, o as observable, a as attr } from './index.js';
|
|
2
|
+
import { A as ARIAGlobalStatesAndProperties } from './aria-global.js';
|
|
3
|
+
import { S as StartEnd } from './start-end.js';
|
|
4
|
+
import { a as applyMixins } from './apply-mixins.js';
|
|
5
|
+
import { i as isHTMLElement } from './dom.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Determines if the element is a {@link (ListboxOption:class)}
|
|
9
|
+
*
|
|
10
|
+
* @param element - the element to test.
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
function isListboxOption(el) {
|
|
14
|
+
return (isHTMLElement(el) &&
|
|
15
|
+
(el.getAttribute("role") === "option" ||
|
|
16
|
+
el instanceof HTMLOptionElement));
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* An Option Custom HTML Element.
|
|
20
|
+
* Implements {@link https://www.w3.org/TR/wai-aria-1.1/#option | ARIA option }.
|
|
21
|
+
*
|
|
22
|
+
* @slot start - Content which can be provided before the listbox option content
|
|
23
|
+
* @slot end - Content which can be provided after the listbox option content
|
|
24
|
+
* @slot - The default slot for listbox option content
|
|
25
|
+
* @csspart content - Wraps the listbox option content
|
|
26
|
+
*
|
|
27
|
+
* @public
|
|
28
|
+
*/
|
|
29
|
+
let ListboxOption$1 = class ListboxOption extends FoundationElement {
|
|
30
|
+
constructor(text, value, defaultSelected, selected) {
|
|
31
|
+
super();
|
|
32
|
+
/**
|
|
33
|
+
* The defaultSelected state of the option.
|
|
34
|
+
* @public
|
|
35
|
+
*/
|
|
36
|
+
this.defaultSelected = false;
|
|
37
|
+
/**
|
|
38
|
+
* Tracks whether the "selected" property has been changed.
|
|
39
|
+
* @internal
|
|
40
|
+
*/
|
|
41
|
+
this.dirtySelected = false;
|
|
42
|
+
/**
|
|
43
|
+
* The checked state of the control.
|
|
44
|
+
*
|
|
45
|
+
* @public
|
|
46
|
+
*/
|
|
47
|
+
this.selected = this.defaultSelected;
|
|
48
|
+
/**
|
|
49
|
+
* Track whether the value has been changed from the initial value
|
|
50
|
+
*/
|
|
51
|
+
this.dirtyValue = false;
|
|
52
|
+
if (text) {
|
|
53
|
+
this.textContent = text;
|
|
54
|
+
}
|
|
55
|
+
if (value) {
|
|
56
|
+
this.initialValue = value;
|
|
57
|
+
}
|
|
58
|
+
if (defaultSelected) {
|
|
59
|
+
this.defaultSelected = defaultSelected;
|
|
60
|
+
}
|
|
61
|
+
if (selected) {
|
|
62
|
+
this.selected = selected;
|
|
63
|
+
}
|
|
64
|
+
this.proxy = new Option(`${this.textContent}`, this.initialValue, this.defaultSelected, this.selected);
|
|
65
|
+
this.proxy.disabled = this.disabled;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Updates the ariaChecked property when the checked property changes.
|
|
69
|
+
*
|
|
70
|
+
* @param prev - the previous checked value
|
|
71
|
+
* @param next - the current checked value
|
|
72
|
+
*
|
|
73
|
+
* @public
|
|
74
|
+
*/
|
|
75
|
+
checkedChanged(prev, next) {
|
|
76
|
+
if (typeof next === "boolean") {
|
|
77
|
+
this.ariaChecked = next ? "true" : "false";
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
this.ariaChecked = null;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Updates the proxy's text content when the default slot changes.
|
|
84
|
+
* @param prev - the previous content value
|
|
85
|
+
* @param next - the current content value
|
|
86
|
+
*
|
|
87
|
+
* @internal
|
|
88
|
+
*/
|
|
89
|
+
contentChanged(prev, next) {
|
|
90
|
+
if (this.proxy instanceof HTMLOptionElement) {
|
|
91
|
+
this.proxy.textContent = this.textContent;
|
|
92
|
+
}
|
|
93
|
+
this.$emit("contentchange", null, { bubbles: true });
|
|
94
|
+
}
|
|
95
|
+
defaultSelectedChanged() {
|
|
96
|
+
if (!this.dirtySelected) {
|
|
97
|
+
this.selected = this.defaultSelected;
|
|
98
|
+
if (this.proxy instanceof HTMLOptionElement) {
|
|
99
|
+
this.proxy.selected = this.defaultSelected;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
disabledChanged(prev, next) {
|
|
104
|
+
this.ariaDisabled = this.disabled ? "true" : "false";
|
|
105
|
+
if (this.proxy instanceof HTMLOptionElement) {
|
|
106
|
+
this.proxy.disabled = this.disabled;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
selectedAttributeChanged() {
|
|
110
|
+
this.defaultSelected = this.selectedAttribute;
|
|
111
|
+
if (this.proxy instanceof HTMLOptionElement) {
|
|
112
|
+
this.proxy.defaultSelected = this.defaultSelected;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
selectedChanged() {
|
|
116
|
+
this.ariaSelected = this.selected ? "true" : "false";
|
|
117
|
+
if (!this.dirtySelected) {
|
|
118
|
+
this.dirtySelected = true;
|
|
119
|
+
}
|
|
120
|
+
if (this.proxy instanceof HTMLOptionElement) {
|
|
121
|
+
this.proxy.selected = this.selected;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
initialValueChanged(previous, next) {
|
|
125
|
+
// If the value is clean and the component is connected to the DOM
|
|
126
|
+
// then set value equal to the attribute value.
|
|
127
|
+
if (!this.dirtyValue) {
|
|
128
|
+
this.value = this.initialValue;
|
|
129
|
+
this.dirtyValue = false;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
get label() {
|
|
133
|
+
var _a;
|
|
134
|
+
return (_a = this.value) !== null && _a !== void 0 ? _a : this.text;
|
|
135
|
+
}
|
|
136
|
+
get text() {
|
|
137
|
+
var _a, _b;
|
|
138
|
+
return (_b = (_a = this.textContent) === null || _a === void 0 ? void 0 : _a.replace(/\s+/g, " ").trim()) !== null && _b !== void 0 ? _b : "";
|
|
139
|
+
}
|
|
140
|
+
set value(next) {
|
|
141
|
+
const newValue = `${next !== null && next !== void 0 ? next : ""}`;
|
|
142
|
+
this._value = newValue;
|
|
143
|
+
this.dirtyValue = true;
|
|
144
|
+
if (this.proxy instanceof HTMLOptionElement) {
|
|
145
|
+
this.proxy.value = newValue;
|
|
146
|
+
}
|
|
147
|
+
Observable.notify(this, "value");
|
|
148
|
+
}
|
|
149
|
+
get value() {
|
|
150
|
+
var _a;
|
|
151
|
+
Observable.track(this, "value");
|
|
152
|
+
return (_a = this._value) !== null && _a !== void 0 ? _a : this.text;
|
|
153
|
+
}
|
|
154
|
+
get form() {
|
|
155
|
+
return this.proxy ? this.proxy.form : null;
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
__decorate([
|
|
159
|
+
observable
|
|
160
|
+
], ListboxOption$1.prototype, "checked", void 0);
|
|
161
|
+
__decorate([
|
|
162
|
+
observable
|
|
163
|
+
], ListboxOption$1.prototype, "content", void 0);
|
|
164
|
+
__decorate([
|
|
165
|
+
observable
|
|
166
|
+
], ListboxOption$1.prototype, "defaultSelected", void 0);
|
|
167
|
+
__decorate([
|
|
168
|
+
attr({ mode: "boolean" })
|
|
169
|
+
], ListboxOption$1.prototype, "disabled", void 0);
|
|
170
|
+
__decorate([
|
|
171
|
+
attr({ attribute: "selected", mode: "boolean" })
|
|
172
|
+
], ListboxOption$1.prototype, "selectedAttribute", void 0);
|
|
173
|
+
__decorate([
|
|
174
|
+
observable
|
|
175
|
+
], ListboxOption$1.prototype, "selected", void 0);
|
|
176
|
+
__decorate([
|
|
177
|
+
attr({ attribute: "value", mode: "fromView" })
|
|
178
|
+
], ListboxOption$1.prototype, "initialValue", void 0);
|
|
179
|
+
/**
|
|
180
|
+
* States and properties relating to the ARIA `option` role.
|
|
181
|
+
*
|
|
182
|
+
* @public
|
|
183
|
+
*/
|
|
184
|
+
class DelegatesARIAListboxOption {
|
|
185
|
+
}
|
|
186
|
+
__decorate([
|
|
187
|
+
observable
|
|
188
|
+
], DelegatesARIAListboxOption.prototype, "ariaChecked", void 0);
|
|
189
|
+
__decorate([
|
|
190
|
+
observable
|
|
191
|
+
], DelegatesARIAListboxOption.prototype, "ariaPosInSet", void 0);
|
|
192
|
+
__decorate([
|
|
193
|
+
observable
|
|
194
|
+
], DelegatesARIAListboxOption.prototype, "ariaSelected", void 0);
|
|
195
|
+
__decorate([
|
|
196
|
+
observable
|
|
197
|
+
], DelegatesARIAListboxOption.prototype, "ariaSetSize", void 0);
|
|
198
|
+
applyMixins(DelegatesARIAListboxOption, ARIAGlobalStatesAndProperties);
|
|
199
|
+
applyMixins(ListboxOption$1, StartEnd, DelegatesARIAListboxOption);
|
|
200
|
+
|
|
201
|
+
export { ListboxOption$1 as L, isListboxOption as i };
|
package/shared/listbox.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const keyCodes$1 = require('./key-codes2.cjs');
|
|
4
4
|
const index = require('./index.cjs');
|
|
5
|
-
const
|
|
5
|
+
const listboxOption = require('./listbox-option.cjs');
|
|
6
6
|
const ariaGlobal = require('./aria-global.cjs');
|
|
7
7
|
const applyMixins = require('./apply-mixins.cjs');
|
|
8
8
|
const keyCodes = require('./key-codes.cjs');
|
|
@@ -458,7 +458,7 @@ let Listbox$1 = class Listbox extends index.FoundationElement {
|
|
|
458
458
|
*/
|
|
459
459
|
slottedOptionsChanged(prev, next) {
|
|
460
460
|
this.options = next.reduce((options, item) => {
|
|
461
|
-
if (
|
|
461
|
+
if (listboxOption.isListboxOption(item)) {
|
|
462
462
|
options.push(item);
|
|
463
463
|
}
|
|
464
464
|
return options;
|
|
@@ -503,7 +503,7 @@ let Listbox$1 = class Listbox extends index.FoundationElement {
|
|
|
503
503
|
* @param n - element to filter
|
|
504
504
|
* @public
|
|
505
505
|
*/
|
|
506
|
-
Listbox$1.slottedOptionFilter = (n) =>
|
|
506
|
+
Listbox$1.slottedOptionFilter = (n) => listboxOption.isListboxOption(n) && !n.hidden;
|
|
507
507
|
/**
|
|
508
508
|
* Typeahead timeout in milliseconds.
|
|
509
509
|
*
|
package/shared/listbox.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { k as keyArrowLeft, a as keyArrowRight } from './key-codes2.js';
|
|
2
2
|
import { F as FoundationElement, O as Observable, _ as __decorate, a as attr, o as observable, D as DOM, n as nullableNumberConverter } from './index.js';
|
|
3
|
-
import { i as isListboxOption } from './
|
|
3
|
+
import { i as isListboxOption } from './listbox-option.js';
|
|
4
4
|
import { A as ARIAGlobalStatesAndProperties } from './aria-global.js';
|
|
5
5
|
import { a as applyMixins } from './apply-mixins.js';
|
|
6
6
|
import { a as keySpace, b as keyEscape, k as keyEnter, c as keyTab, d as keyEnd, e as keyArrowUp, f as keyArrowDown, g as keyHome } from './key-codes.js';
|
|
@@ -10,6 +10,8 @@ import type { VideoPlayerLocale } from '../../lib/video-player/locale';
|
|
|
10
10
|
import type { TimePickerLocale } from '../../lib/time-picker/locale';
|
|
11
11
|
import type { RangeSliderLocale } from '../../lib/range-slider/locale';
|
|
12
12
|
import type { DialPadLocale } from '../../lib/dial-pad/locale';
|
|
13
|
+
import type { TabLocale } from '../../lib/tab/locale';
|
|
14
|
+
import type { SearchableSelectLocale } from '../../lib/searchable-select/locale';
|
|
13
15
|
export interface Locale {
|
|
14
16
|
lang: string;
|
|
15
17
|
common: {
|
|
@@ -27,4 +29,6 @@ export interface Locale {
|
|
|
27
29
|
videoPlayer: VideoPlayerLocale;
|
|
28
30
|
rangeSlider: RangeSliderLocale;
|
|
29
31
|
dialPad: DialPadLocale;
|
|
32
|
+
tab: TabLocale;
|
|
33
|
+
searchableSelect: SearchableSelectLocale;
|
|
30
34
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const definition$2 = require('./definition11.cjs');
|
|
4
|
-
const definition = require('./
|
|
5
|
-
const definition$1 = require('./
|
|
4
|
+
const definition = require('./definition64.cjs');
|
|
5
|
+
const definition$1 = require('./definition56.cjs');
|
|
6
6
|
const definition$3 = require('./definition22.cjs');
|
|
7
7
|
const index = require('./index.cjs');
|
|
8
8
|
const ref = require('./ref.cjs');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { B as Button } from './definition11.js';
|
|
2
|
-
import { P as Popup } from './
|
|
3
|
-
import { T as TextField } from './
|
|
2
|
+
import { P as Popup } from './definition64.js';
|
|
3
|
+
import { T as TextField } from './definition56.js';
|
|
4
4
|
import { D as Divider } from './definition22.js';
|
|
5
5
|
import { h as html, F as FoundationElement, D as DOM, a as attr, o as observable, v as volatile } from './index.js';
|
|
6
6
|
import { r as ref } from './ref.js';
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
function scrollIntoView(element, parent, position) {
|
|
4
|
+
const offsetTop = element.getRootNode() !== parent.getRootNode() ? flatTreeOffsetTop(element) : element.offsetTop;
|
|
5
|
+
switch (position) {
|
|
6
|
+
case "start":
|
|
7
|
+
parent.scrollTop = offsetTop;
|
|
8
|
+
break;
|
|
9
|
+
case "nearest":
|
|
10
|
+
if (offsetTop < parent.scrollTop) {
|
|
11
|
+
parent.scrollTop = offsetTop;
|
|
12
|
+
}
|
|
13
|
+
if (offsetTop + element.offsetHeight > parent.scrollTop + parent.offsetHeight) {
|
|
14
|
+
parent.scrollTop = offsetTop + element.offsetHeight - parent.offsetHeight;
|
|
15
|
+
}
|
|
16
|
+
break;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
function flatTreeOffsetTop(element) {
|
|
20
|
+
const offsetParent = element.offsetParent;
|
|
21
|
+
let value = element.offsetTop;
|
|
22
|
+
let nextOffsetParent = flatTreeOffsetParent(element);
|
|
23
|
+
while (nextOffsetParent !== offsetParent) {
|
|
24
|
+
value -= nextOffsetParent.offsetTop;
|
|
25
|
+
nextOffsetParent = flatTreeOffsetParent(nextOffsetParent);
|
|
26
|
+
}
|
|
27
|
+
return value;
|
|
28
|
+
}
|
|
29
|
+
function flatTreeParent(element) {
|
|
30
|
+
if (element.assignedSlot) {
|
|
31
|
+
return element.assignedSlot;
|
|
32
|
+
}
|
|
33
|
+
if (element.parentNode instanceof ShadowRoot) {
|
|
34
|
+
return element.parentNode.host;
|
|
35
|
+
}
|
|
36
|
+
return element.parentNode;
|
|
37
|
+
}
|
|
38
|
+
function flatTreeOffsetParent(element) {
|
|
39
|
+
for (let ancestor = flatTreeParent(element); ancestor; ancestor = flatTreeParent(ancestor)) {
|
|
40
|
+
if (!(ancestor instanceof Element)) continue;
|
|
41
|
+
const style = getComputedStyle(ancestor);
|
|
42
|
+
if (style.display === "contents") continue;
|
|
43
|
+
if (style.position !== "static" || style.filter !== "none") {
|
|
44
|
+
return ancestor;
|
|
45
|
+
}
|
|
46
|
+
if (ancestor.tagName === "BODY") return ancestor;
|
|
47
|
+
}
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
exports.scrollIntoView = scrollIntoView;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
function scrollIntoView(element, parent, position) {
|
|
2
|
+
const offsetTop = element.getRootNode() !== parent.getRootNode() ? flatTreeOffsetTop(element) : element.offsetTop;
|
|
3
|
+
switch (position) {
|
|
4
|
+
case "start":
|
|
5
|
+
parent.scrollTop = offsetTop;
|
|
6
|
+
break;
|
|
7
|
+
case "nearest":
|
|
8
|
+
if (offsetTop < parent.scrollTop) {
|
|
9
|
+
parent.scrollTop = offsetTop;
|
|
10
|
+
}
|
|
11
|
+
if (offsetTop + element.offsetHeight > parent.scrollTop + parent.offsetHeight) {
|
|
12
|
+
parent.scrollTop = offsetTop + element.offsetHeight - parent.offsetHeight;
|
|
13
|
+
}
|
|
14
|
+
break;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
function flatTreeOffsetTop(element) {
|
|
18
|
+
const offsetParent = element.offsetParent;
|
|
19
|
+
let value = element.offsetTop;
|
|
20
|
+
let nextOffsetParent = flatTreeOffsetParent(element);
|
|
21
|
+
while (nextOffsetParent !== offsetParent) {
|
|
22
|
+
value -= nextOffsetParent.offsetTop;
|
|
23
|
+
nextOffsetParent = flatTreeOffsetParent(nextOffsetParent);
|
|
24
|
+
}
|
|
25
|
+
return value;
|
|
26
|
+
}
|
|
27
|
+
function flatTreeParent(element) {
|
|
28
|
+
if (element.assignedSlot) {
|
|
29
|
+
return element.assignedSlot;
|
|
30
|
+
}
|
|
31
|
+
if (element.parentNode instanceof ShadowRoot) {
|
|
32
|
+
return element.parentNode.host;
|
|
33
|
+
}
|
|
34
|
+
return element.parentNode;
|
|
35
|
+
}
|
|
36
|
+
function flatTreeOffsetParent(element) {
|
|
37
|
+
for (let ancestor = flatTreeParent(element); ancestor; ancestor = flatTreeParent(ancestor)) {
|
|
38
|
+
if (!(ancestor instanceof Element)) continue;
|
|
39
|
+
const style = getComputedStyle(ancestor);
|
|
40
|
+
if (style.display === "contents") continue;
|
|
41
|
+
if (style.position !== "static" || style.filter !== "none") {
|
|
42
|
+
return ancestor;
|
|
43
|
+
}
|
|
44
|
+
if (ancestor.tagName === "BODY") return ancestor;
|
|
45
|
+
}
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export { scrollIntoView as s };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as Popup, a as PlacementStrategy } from './
|
|
1
|
+
import { P as Popup, a as PlacementStrategy } from './definition64.js';
|
|
2
2
|
import { O as Orientation } from './aria.js';
|
|
3
3
|
import { h as html } from './index.js';
|
|
4
4
|
import { r as ref } from './ref.js';
|
package/shared/text-field.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const styles = ":host{display:inline-block}.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-firm);--_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-firm);--_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-color-primary: var(--vvd-text-field-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-primary-text: var(--vvd-text-field-accent-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-text-field-accent-primary-increment, var(--vvd-color-neutral-800));--_connotation-color-intermediate: var(--vvd-text-field-accent-intermediate, var(--vvd-color-neutral-500));--_connotation-color-firm: var(--vvd-text-field-accent-firm, var(--vvd-color-canvas-text));--_connotation-color-fierce: var(--vvd-text-field-accent-fierce, var(--vvd-color-neutral-700));--_connotation-color-faint: var(--vvd-text-field-accent-faint, var(--vvd-color-neutral-50));--_connotation-color-soft: var(--vvd-text-field-accent-soft, var(--vvd-color-neutral-100))}.base{--_text-field-gutter-start: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))*.4) ;--_text-field-gutter-end: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))*.4) ;--_text-field-icon-size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))/2) ;display:inline-grid;width:100%;gap:4px;grid-template-columns:min-content 1fr max-content}@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)}.label:not(slot),.label::slotted(label){box-sizing:initial!important;padding:initial!important;margin:initial!important;color:var(--vvd-color-canvas-text)!important;contain:inline-size!important;font:var(--vvd-typography-base);grid-column:1/4;grid-row:1}.char-count+.label:not(slot),.char-count+.label::slotted(label){grid-column:1/3}.char-count{color:var(--_low-ink-color);font:var(--vvd-typography-base);grid-column:3/4}.fieldset{position:relative;display:flex;align-items:center;background-color:var(--_appearance-color-fill);font:var(--vvd-typography-base);grid-column:1/4;padding-block:0;transition:color .2s,background-color .2s}.fieldset:after{position:absolute;display:block;border-radius:inherit;block-size:100%;box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);content:\"\";inline-size:100%;pointer-events:none;transition:box-shadow .2s}.fieldset:focus-visible{outline:none}.base>.fieldset{block-size:
|
|
3
|
+
const styles = ":host{display:inline-block}.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-firm);--_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-firm);--_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-color-primary: var(--vvd-text-field-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-primary-text: var(--vvd-text-field-accent-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-text-field-accent-primary-increment, var(--vvd-color-neutral-800));--_connotation-color-intermediate: var(--vvd-text-field-accent-intermediate, var(--vvd-color-neutral-500));--_connotation-color-firm: var(--vvd-text-field-accent-firm, var(--vvd-color-canvas-text));--_connotation-color-fierce: var(--vvd-text-field-accent-fierce, var(--vvd-color-neutral-700));--_connotation-color-faint: var(--vvd-text-field-accent-faint, var(--vvd-color-neutral-50));--_connotation-color-soft: var(--vvd-text-field-accent-soft, var(--vvd-color-neutral-100))}.base{--_text-field-gutter-start: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))*.4) ;--_text-field-gutter-end: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))*.4) ;--_text-field-icon-size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))/2) ;--_text-field-block-size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) ;--_text-field-border-radius: 8px;--_text-field-pill-border-radius: 24px;display:inline-grid;width:100%;gap:4px;grid-template-columns:min-content 1fr max-content}.base.size-condensed{--_text-field-gutter-start: calc(1px*(24 + 4*clamp(-1, var(--vvd-size-density, 0), 2))/2) ;--_text-field-gutter-end: calc(1px*(24 + 4*clamp(-1, var(--vvd-size-density, 0), 2))/2) ;--_text-field-icon-size: calc(1px*(32 + 4*clamp(-1, var(--vvd-size-density, 0), 2))/2) ;--_text-field-block-size: calc(1px*(32 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) ;--_text-field-border-radius: 4px}@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)}.label:not(slot),.label::slotted(label){box-sizing:initial!important;padding:initial!important;margin:initial!important;color:var(--vvd-color-canvas-text)!important;contain:inline-size!important;font:var(--vvd-typography-base);grid-column:1/4;grid-row:1}.char-count+.label:not(slot),.char-count+.label::slotted(label){grid-column:1/3}.char-count{color:var(--_low-ink-color);font:var(--vvd-typography-base);grid-column:3/4}.fieldset{position:relative;display:flex;align-items:center;background-color:var(--_appearance-color-fill);font:var(--vvd-typography-base);grid-column:1/4;padding-block:0;transition:color .2s,background-color .2s}.fieldset:after{position:absolute;display:block;border-radius:inherit;block-size:100%;box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);content:\"\";inline-size:100%;pointer-events:none;transition:box-shadow .2s}.fieldset:focus-visible{outline:none}.base>.fieldset{block-size:var(--_text-field-block-size)}.base:not(.shape-pill) .fieldset{border-radius:var(--_text-field-border-radius)}.base.shape-pill .fieldset{border-radius:var(--_text-field-pill-border-radius)}.wrapper{border-radius:inherit;block-size:100%;inline-size:100%}.control{border-radius:inherit;text-align:start}.control:not(slot),.control::slotted(input){width:100%!important;box-sizing:border-box!important;border:0 none!important;border-radius:inherit!important;margin:initial!important;appearance:none!important;background-color:transparent!important;block-size:100%!important;color:inherit!important;font:inherit;outline:transparent;padding-block:0!important;padding-inline:var(--_text-field-gutter-start) var(--_text-field-gutter-end)!important;text-align:inherit}.control:not(slot):disabled,.control::slotted(input:disabled){cursor:not-allowed!important;opacity:1!important;-webkit-text-fill-color:var(--_appearance-color-text)!important}.control:not(slot)::placeholder{opacity:1!important;-webkit-text-fill-color:var(--_low-ink-color)!important}.control::slotted(input:-webkit-autofill),.control:not(slot):-webkit-autofill{-webkit-box-shadow:0 0 0 1000px var(--_appearance-color-fill) inset;-webkit-text-fill-color:var(--_appearance-color-text)!important}.has-icon .control:not(slot),.has-icon .control::slotted(input){padding-inline-start:calc(var(--_text-field-icon-size) + var(--_text-field-gutter-start) * 2)!important}.icon{position:absolute;z-index:1;color:var(--_low-ink-color);font-size:var(--_text-field-icon-size);inset-block-start:50%;inset-inline-start:calc(100% + var(--_text-field-gutter-start));line-height:1;transform:translateY(-50%)}.leading-items-wrapper{position:relative}.base.no-leading .leading-items-wrapper{display:none}.action-items-wrapper{margin-inline-end:4px}.base:not(.action-items) .action-items-wrapper{display:none}@supports selector(:has(*)){.fieldset:has(.wrapper .control:focus-within):after{--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 not selector(:has(*)){.wrapper:focus-within:after{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));--focus-stroke-gap-color: transparent;position:absolute;z-index:1;display:block;border-radius:inherit;content:\"\";inset:0;pointer-events:none}}:host([internal-part]) .fieldset{background-color:transparent;font:var(--vvd-typography-heading-4);line-height:1.1}:host([internal-part]) .fieldset:not(:focus-within):after{block-size:1px;inset-block-end:0}@supports selector(:has(*)){:host([internal-part]) .fieldset:has(.action-items-wrapper:focus-within):after{block-size:1px;inset-block-end:0}}:host([internal-part]) .control{text-align:center}slot[name=_mirrored-helper-text]{display:none}";
|
|
4
4
|
|
|
5
5
|
exports.styles = styles;
|