@vonage/vivid 4.14.2 → 4.14.4
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 +1361 -1017
- package/index.cjs +1 -0
- package/index.js +1 -1
- package/lib/accordion/definition.d.ts +5 -1
- package/lib/combobox/combobox.d.ts +5 -1
- package/lib/file-picker/file-picker.d.ts +1 -0
- package/lib/menu-item/definition.d.ts +1 -1
- package/lib/menu-item/menu-item-role.d.ts +7 -0
- package/lib/menu-item/menu-item.d.ts +1 -7
- package/lib/number-field/number-field.d.ts +1 -1
- package/lib/option/option.d.ts +6 -0
- package/lib/radio/radio.d.ts +2 -2
- package/lib/searchable-select/option-tag.d.ts +2 -2
- package/lib/select/select.form-associated.d.ts +1 -1
- package/lib/switch/switch.d.ts +1 -0
- package/lib/tabs/tabs.d.ts +5 -1
- package/lib/text-anchor/text-anchor.d.ts +1 -1
- package/lib/tree-item/tree-item.d.ts +1 -1
- package/lib/tree-view/tree-view.d.ts +1 -1
- package/package.json +1 -1
- package/shared/applyMixinsWithObservables.cjs +1 -1
- package/shared/applyMixinsWithObservables.js +1 -1
- package/shared/definition11.cjs +1 -1
- package/shared/definition11.js +1 -1
- package/shared/definition16.cjs +63 -30
- package/shared/definition16.js +61 -28
- package/shared/definition17.cjs +2 -2
- package/shared/definition17.js +2 -2
- package/shared/definition2.cjs +11 -6
- package/shared/definition2.js +11 -7
- package/shared/definition25.cjs +25 -18
- package/shared/definition25.js +26 -19
- package/shared/definition29.cjs +12 -33
- package/shared/definition29.js +12 -33
- package/shared/definition33.cjs +1 -1
- package/shared/definition33.js +1 -1
- package/shared/definition34.cjs +4 -294
- package/shared/definition34.js +4 -294
- package/shared/definition41.cjs +1 -1
- package/shared/definition41.js +1 -1
- package/shared/definition42.cjs +1 -2
- package/shared/definition42.js +1 -2
- package/shared/definition43.cjs +1 -2
- package/shared/definition43.js +1 -2
- package/shared/definition46.cjs +2 -2
- package/shared/definition46.js +3 -3
- package/shared/definition48.cjs +22 -15
- package/shared/definition48.js +22 -15
- package/shared/definition5.cjs +4 -3
- package/shared/definition5.js +4 -3
- package/shared/definition51.cjs +11 -402
- package/shared/definition51.js +17 -408
- package/shared/definition54.js +1 -1
- package/shared/definition56.js +1 -1
- package/shared/direction.cjs +2 -16
- package/shared/direction.js +3 -17
- package/shared/foundation/utilities/direction.d.ts +2 -0
- package/shared/listbox.cjs +1 -1
- package/shared/listbox.js +1 -1
- package/shared/text-anchor.cjs +1 -1
- package/shared/text-anchor.js +1 -1
- package/shared/text-field2.js +1 -1
- package/shared/vivid-element.cjs +0 -2
- package/shared/vivid-element.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/vivid.api.json +70 -3
- package/shared/apply-mixins2.cjs +0 -25
- package/shared/apply-mixins2.js +0 -23
- package/shared/form-associated2.cjs +0 -383
- package/shared/form-associated2.js +0 -381
- package/shared/foundation-element.cjs +0 -1417
- package/shared/foundation-element.js +0 -1414
- package/shared/key-codes2.cjs +0 -96
- package/shared/key-codes2.js +0 -88
- package/shared/start-end.cjs +0 -52
- package/shared/start-end.js +0 -50
package/shared/definition34.cjs
CHANGED
|
@@ -4,12 +4,9 @@ const definition = require('./definition11.cjs');
|
|
|
4
4
|
const definition$1 = require('./definition22.cjs');
|
|
5
5
|
const vividElement = require('./vivid-element.cjs');
|
|
6
6
|
const definition$2 = require('./definition27.cjs');
|
|
7
|
+
const textField = require('./text-field2.cjs');
|
|
7
8
|
const applyMixinsWithObservables = require('./applyMixinsWithObservables.cjs');
|
|
8
|
-
const formAssociated
|
|
9
|
-
const foundationElement = require('./foundation-element.cjs');
|
|
10
|
-
const applyMixins = require('./apply-mixins2.cjs');
|
|
11
|
-
const formAssociated = require('./form-associated2.cjs');
|
|
12
|
-
const startEnd = require('./start-end.cjs');
|
|
9
|
+
const formAssociated = require('./form-associated.cjs');
|
|
13
10
|
const keyCodes = require('./key-codes.cjs');
|
|
14
11
|
const formElements = require('./form-elements.cjs');
|
|
15
12
|
const affix = require('./affix.cjs');
|
|
@@ -19,298 +16,11 @@ const when = require('./when.cjs');
|
|
|
19
16
|
const ref = require('./ref.cjs');
|
|
20
17
|
const classNames = require('./class-names.cjs');
|
|
21
18
|
|
|
22
|
-
/**
|
|
23
|
-
* Some states and properties are applicable to all host language elements regardless of whether a role is applied.
|
|
24
|
-
* The following global states and properties are supported by all roles and by all base markup elements.
|
|
25
|
-
* {@link https://www.w3.org/TR/wai-aria-1.1/#global_states}
|
|
26
|
-
*
|
|
27
|
-
* This is intended to be used as a mixin. Be sure you extend FASTElement.
|
|
28
|
-
*
|
|
29
|
-
* @public
|
|
30
|
-
*/
|
|
31
|
-
class ARIAGlobalStatesAndProperties {
|
|
32
|
-
}
|
|
33
|
-
foundationElement.__decorate([
|
|
34
|
-
vividElement.attr({ attribute: "aria-atomic" })
|
|
35
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaAtomic", void 0);
|
|
36
|
-
foundationElement.__decorate([
|
|
37
|
-
vividElement.attr({ attribute: "aria-busy" })
|
|
38
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaBusy", void 0);
|
|
39
|
-
foundationElement.__decorate([
|
|
40
|
-
vividElement.attr({ attribute: "aria-controls" })
|
|
41
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaControls", void 0);
|
|
42
|
-
foundationElement.__decorate([
|
|
43
|
-
vividElement.attr({ attribute: "aria-current" })
|
|
44
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaCurrent", void 0);
|
|
45
|
-
foundationElement.__decorate([
|
|
46
|
-
vividElement.attr({ attribute: "aria-describedby" })
|
|
47
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaDescribedby", void 0);
|
|
48
|
-
foundationElement.__decorate([
|
|
49
|
-
vividElement.attr({ attribute: "aria-details" })
|
|
50
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaDetails", void 0);
|
|
51
|
-
foundationElement.__decorate([
|
|
52
|
-
vividElement.attr({ attribute: "aria-disabled" })
|
|
53
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaDisabled", void 0);
|
|
54
|
-
foundationElement.__decorate([
|
|
55
|
-
vividElement.attr({ attribute: "aria-errormessage" })
|
|
56
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaErrormessage", void 0);
|
|
57
|
-
foundationElement.__decorate([
|
|
58
|
-
vividElement.attr({ attribute: "aria-flowto" })
|
|
59
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaFlowto", void 0);
|
|
60
|
-
foundationElement.__decorate([
|
|
61
|
-
vividElement.attr({ attribute: "aria-haspopup" })
|
|
62
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaHaspopup", void 0);
|
|
63
|
-
foundationElement.__decorate([
|
|
64
|
-
vividElement.attr({ attribute: "aria-hidden" })
|
|
65
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaHidden", void 0);
|
|
66
|
-
foundationElement.__decorate([
|
|
67
|
-
vividElement.attr({ attribute: "aria-invalid" })
|
|
68
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaInvalid", void 0);
|
|
69
|
-
foundationElement.__decorate([
|
|
70
|
-
vividElement.attr({ attribute: "aria-keyshortcuts" })
|
|
71
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaKeyshortcuts", void 0);
|
|
72
|
-
foundationElement.__decorate([
|
|
73
|
-
vividElement.attr({ attribute: "aria-label" })
|
|
74
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaLabel", void 0);
|
|
75
|
-
foundationElement.__decorate([
|
|
76
|
-
vividElement.attr({ attribute: "aria-labelledby" })
|
|
77
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaLabelledby", void 0);
|
|
78
|
-
foundationElement.__decorate([
|
|
79
|
-
vividElement.attr({ attribute: "aria-live" })
|
|
80
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaLive", void 0);
|
|
81
|
-
foundationElement.__decorate([
|
|
82
|
-
vividElement.attr({ attribute: "aria-owns" })
|
|
83
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaOwns", void 0);
|
|
84
|
-
foundationElement.__decorate([
|
|
85
|
-
vividElement.attr({ attribute: "aria-relevant" })
|
|
86
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaRelevant", void 0);
|
|
87
|
-
foundationElement.__decorate([
|
|
88
|
-
vividElement.attr({ attribute: "aria-roledescription" })
|
|
89
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaRoledescription", void 0);
|
|
90
|
-
|
|
91
|
-
class _TextField extends foundationElement.FoundationElement {
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* A form-associated base class for the {@link @microsoft/fast-foundation#(TextField:class)} component.
|
|
95
|
-
*
|
|
96
|
-
* @internal
|
|
97
|
-
*/
|
|
98
|
-
class FormAssociatedTextField extends formAssociated.FormAssociated(_TextField) {
|
|
99
|
-
constructor() {
|
|
100
|
-
super(...arguments);
|
|
101
|
-
this.proxy = document.createElement("input");
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
* Text field sub-types
|
|
107
|
-
* @public
|
|
108
|
-
*/
|
|
109
|
-
const TextFieldType = {
|
|
110
|
-
/**
|
|
111
|
-
* An email TextField
|
|
112
|
-
*/
|
|
113
|
-
email: "email",
|
|
114
|
-
/**
|
|
115
|
-
* A password TextField
|
|
116
|
-
*/
|
|
117
|
-
password: "password",
|
|
118
|
-
/**
|
|
119
|
-
* A telephone TextField
|
|
120
|
-
*/
|
|
121
|
-
tel: "tel",
|
|
122
|
-
/**
|
|
123
|
-
* A text TextField
|
|
124
|
-
*/
|
|
125
|
-
text: "text",
|
|
126
|
-
/**
|
|
127
|
-
* A URL TextField
|
|
128
|
-
*/
|
|
129
|
-
url: "url",
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* A Text Field Custom HTML Element.
|
|
134
|
-
* Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/text | <input type="text" /> element }.
|
|
135
|
-
*
|
|
136
|
-
* @slot start - Content which can be provided before the number field input
|
|
137
|
-
* @slot end - Content which can be provided after the number field input
|
|
138
|
-
* @slot - The default slot for the label
|
|
139
|
-
* @csspart label - The label
|
|
140
|
-
* @csspart root - The element wrapping the control, including start and end slots
|
|
141
|
-
* @csspart control - The text field element
|
|
142
|
-
* @fires change - Fires a custom 'change' event when the value has changed
|
|
143
|
-
*
|
|
144
|
-
* @public
|
|
145
|
-
*/
|
|
146
|
-
class TextField extends FormAssociatedTextField {
|
|
147
|
-
constructor() {
|
|
148
|
-
super(...arguments);
|
|
149
|
-
/**
|
|
150
|
-
* Allows setting a type or mode of text.
|
|
151
|
-
* @public
|
|
152
|
-
* @remarks
|
|
153
|
-
* HTML Attribute: type
|
|
154
|
-
*/
|
|
155
|
-
this.type = TextFieldType.text;
|
|
156
|
-
}
|
|
157
|
-
readOnlyChanged() {
|
|
158
|
-
if (this.proxy instanceof HTMLInputElement) {
|
|
159
|
-
this.proxy.readOnly = this.readOnly;
|
|
160
|
-
this.validate();
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
autofocusChanged() {
|
|
164
|
-
if (this.proxy instanceof HTMLInputElement) {
|
|
165
|
-
this.proxy.autofocus = this.autofocus;
|
|
166
|
-
this.validate();
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
placeholderChanged() {
|
|
170
|
-
if (this.proxy instanceof HTMLInputElement) {
|
|
171
|
-
this.proxy.placeholder = this.placeholder;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
typeChanged() {
|
|
175
|
-
if (this.proxy instanceof HTMLInputElement) {
|
|
176
|
-
this.proxy.type = this.type;
|
|
177
|
-
this.validate();
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
listChanged() {
|
|
181
|
-
if (this.proxy instanceof HTMLInputElement) {
|
|
182
|
-
this.proxy.setAttribute("list", this.list);
|
|
183
|
-
this.validate();
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
maxlengthChanged() {
|
|
187
|
-
if (this.proxy instanceof HTMLInputElement) {
|
|
188
|
-
this.proxy.maxLength = this.maxlength;
|
|
189
|
-
this.validate();
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
minlengthChanged() {
|
|
193
|
-
if (this.proxy instanceof HTMLInputElement) {
|
|
194
|
-
this.proxy.minLength = this.minlength;
|
|
195
|
-
this.validate();
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
patternChanged() {
|
|
199
|
-
if (this.proxy instanceof HTMLInputElement) {
|
|
200
|
-
this.proxy.pattern = this.pattern;
|
|
201
|
-
this.validate();
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
sizeChanged() {
|
|
205
|
-
if (this.proxy instanceof HTMLInputElement) {
|
|
206
|
-
this.proxy.size = this.size;
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
spellcheckChanged() {
|
|
210
|
-
if (this.proxy instanceof HTMLInputElement) {
|
|
211
|
-
this.proxy.spellcheck = this.spellcheck;
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
/**
|
|
215
|
-
* @internal
|
|
216
|
-
*/
|
|
217
|
-
connectedCallback() {
|
|
218
|
-
super.connectedCallback();
|
|
219
|
-
this.proxy.setAttribute("type", this.type);
|
|
220
|
-
this.validate();
|
|
221
|
-
if (this.autofocus) {
|
|
222
|
-
vividElement.DOM.queueUpdate(() => {
|
|
223
|
-
this.focus();
|
|
224
|
-
});
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
/**
|
|
228
|
-
* Selects all the text in the text field
|
|
229
|
-
*
|
|
230
|
-
* @public
|
|
231
|
-
*/
|
|
232
|
-
select() {
|
|
233
|
-
this.control.select();
|
|
234
|
-
/**
|
|
235
|
-
* The select event does not permeate the shadow DOM boundary.
|
|
236
|
-
* This fn effectively proxies the select event,
|
|
237
|
-
* emitting a `select` event whenever the internal
|
|
238
|
-
* control emits a `select` event
|
|
239
|
-
*/
|
|
240
|
-
this.$emit("select");
|
|
241
|
-
}
|
|
242
|
-
/**
|
|
243
|
-
* Handles the internal control's `input` event
|
|
244
|
-
* @internal
|
|
245
|
-
*/
|
|
246
|
-
handleTextInput() {
|
|
247
|
-
this.value = this.control.value;
|
|
248
|
-
}
|
|
249
|
-
/**
|
|
250
|
-
* Change event handler for inner control.
|
|
251
|
-
* @remarks
|
|
252
|
-
* "Change" events are not `composable` so they will not
|
|
253
|
-
* permeate the shadow DOM boundary. This fn effectively proxies
|
|
254
|
-
* the change event, emitting a `change` event whenever the internal
|
|
255
|
-
* control emits a `change` event
|
|
256
|
-
* @internal
|
|
257
|
-
*/
|
|
258
|
-
handleChange() {
|
|
259
|
-
this.$emit("change");
|
|
260
|
-
}
|
|
261
|
-
/** {@inheritDoc (FormAssociated:interface).validate} */
|
|
262
|
-
validate() {
|
|
263
|
-
super.validate(this.control);
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
foundationElement.__decorate([
|
|
267
|
-
vividElement.attr({ attribute: "readonly", mode: "boolean" })
|
|
268
|
-
], TextField.prototype, "readOnly", void 0);
|
|
269
|
-
foundationElement.__decorate([
|
|
270
|
-
vividElement.attr({ mode: "boolean" })
|
|
271
|
-
], TextField.prototype, "autofocus", void 0);
|
|
272
|
-
foundationElement.__decorate([
|
|
273
|
-
vividElement.attr
|
|
274
|
-
], TextField.prototype, "placeholder", void 0);
|
|
275
|
-
foundationElement.__decorate([
|
|
276
|
-
vividElement.attr
|
|
277
|
-
], TextField.prototype, "type", void 0);
|
|
278
|
-
foundationElement.__decorate([
|
|
279
|
-
vividElement.attr
|
|
280
|
-
], TextField.prototype, "list", void 0);
|
|
281
|
-
foundationElement.__decorate([
|
|
282
|
-
vividElement.attr({ converter: vividElement.nullableNumberConverter })
|
|
283
|
-
], TextField.prototype, "maxlength", void 0);
|
|
284
|
-
foundationElement.__decorate([
|
|
285
|
-
vividElement.attr({ converter: vividElement.nullableNumberConverter })
|
|
286
|
-
], TextField.prototype, "minlength", void 0);
|
|
287
|
-
foundationElement.__decorate([
|
|
288
|
-
vividElement.attr
|
|
289
|
-
], TextField.prototype, "pattern", void 0);
|
|
290
|
-
foundationElement.__decorate([
|
|
291
|
-
vividElement.attr({ converter: vividElement.nullableNumberConverter })
|
|
292
|
-
], TextField.prototype, "size", void 0);
|
|
293
|
-
foundationElement.__decorate([
|
|
294
|
-
vividElement.attr({ mode: "boolean" })
|
|
295
|
-
], TextField.prototype, "spellcheck", void 0);
|
|
296
|
-
foundationElement.__decorate([
|
|
297
|
-
vividElement.observable
|
|
298
|
-
], TextField.prototype, "defaultSlottedNodes", void 0);
|
|
299
|
-
/**
|
|
300
|
-
* Includes ARIA states and properties relating to the ARIA textbox role
|
|
301
|
-
*
|
|
302
|
-
* @public
|
|
303
|
-
*/
|
|
304
|
-
class DelegatesARIATextbox {
|
|
305
|
-
}
|
|
306
|
-
applyMixins.applyMixins(DelegatesARIATextbox, ARIAGlobalStatesAndProperties);
|
|
307
|
-
applyMixins.applyMixins(TextField, startEnd.StartEnd, DelegatesARIATextbox);
|
|
308
|
-
|
|
309
19
|
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}.base{--_text-field-gutter-end: 70px}.control::-webkit-outer-spin-button,.control::-webkit-inner-spin-button{appearance:none}.control-buttons{position:absolute;z-index:1;right:3px;display:flex}.readonly .control-buttons,.disabled .control-buttons{pointer-events:none}.control-buttons .divider{margin-block:8px}.control-buttons>*{flex-shrink:0}";
|
|
310
20
|
|
|
311
21
|
class _NumberField extends vividElement.VividElement {
|
|
312
22
|
}
|
|
313
|
-
class FormAssociatedNumberField extends formAssociated
|
|
23
|
+
class FormAssociatedNumberField extends formAssociated.FormAssociated(_NumberField) {
|
|
314
24
|
constructor() {
|
|
315
25
|
super(...arguments);
|
|
316
26
|
this.proxy = document.createElement("input");
|
|
@@ -599,7 +309,7 @@ applyMixinsWithObservables.applyMixinsWithObservables(
|
|
|
599
309
|
formElements.FormElementCharCount,
|
|
600
310
|
formElements.FormElementHelperText,
|
|
601
311
|
formElements.FormElementSuccessText,
|
|
602
|
-
DelegatesARIATextbox
|
|
312
|
+
textField.DelegatesARIATextbox
|
|
603
313
|
);
|
|
604
314
|
|
|
605
315
|
const getStateClasses = ({
|
package/shared/definition34.js
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import { B as Button, b as buttonDefinition } from './definition11.js';
|
|
2
2
|
import { D as Divider, d as dividerDefinition } from './definition22.js';
|
|
3
|
-
import {
|
|
3
|
+
import { V as VividElement, D as DOM, a as attr, o as observable, n as nullableNumberConverter, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
4
4
|
import { i as iconDefinition } from './definition27.js';
|
|
5
|
+
import { D as DelegatesARIATextbox } from './text-field2.js';
|
|
5
6
|
import { a as applyMixinsWithObservables } from './applyMixinsWithObservables.js';
|
|
6
|
-
import { F as FormAssociated
|
|
7
|
-
import { _ as __decorate, F as FoundationElement } from './foundation-element.js';
|
|
8
|
-
import { a as applyMixins } from './apply-mixins2.js';
|
|
9
|
-
import { F as FormAssociated } from './form-associated2.js';
|
|
10
|
-
import { S as StartEnd } from './start-end.js';
|
|
7
|
+
import { F as FormAssociated } from './form-associated.js';
|
|
11
8
|
import { f as keyArrowDown, e as keyArrowUp } from './key-codes.js';
|
|
12
9
|
import { e as errorText, f as formElements, F as FormElementSuccessText, a as FormElementHelperText, b as FormElementCharCount, g as getFeedbackTemplate } from './form-elements.js';
|
|
13
10
|
import { b as AffixIcon } from './affix.js';
|
|
@@ -17,298 +14,11 @@ import { w as when } from './when.js';
|
|
|
17
14
|
import { r as ref } from './ref.js';
|
|
18
15
|
import { c as classNames } from './class-names.js';
|
|
19
16
|
|
|
20
|
-
/**
|
|
21
|
-
* Some states and properties are applicable to all host language elements regardless of whether a role is applied.
|
|
22
|
-
* The following global states and properties are supported by all roles and by all base markup elements.
|
|
23
|
-
* {@link https://www.w3.org/TR/wai-aria-1.1/#global_states}
|
|
24
|
-
*
|
|
25
|
-
* This is intended to be used as a mixin. Be sure you extend FASTElement.
|
|
26
|
-
*
|
|
27
|
-
* @public
|
|
28
|
-
*/
|
|
29
|
-
class ARIAGlobalStatesAndProperties {
|
|
30
|
-
}
|
|
31
|
-
__decorate([
|
|
32
|
-
attr({ attribute: "aria-atomic" })
|
|
33
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaAtomic", void 0);
|
|
34
|
-
__decorate([
|
|
35
|
-
attr({ attribute: "aria-busy" })
|
|
36
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaBusy", void 0);
|
|
37
|
-
__decorate([
|
|
38
|
-
attr({ attribute: "aria-controls" })
|
|
39
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaControls", void 0);
|
|
40
|
-
__decorate([
|
|
41
|
-
attr({ attribute: "aria-current" })
|
|
42
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaCurrent", void 0);
|
|
43
|
-
__decorate([
|
|
44
|
-
attr({ attribute: "aria-describedby" })
|
|
45
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaDescribedby", void 0);
|
|
46
|
-
__decorate([
|
|
47
|
-
attr({ attribute: "aria-details" })
|
|
48
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaDetails", void 0);
|
|
49
|
-
__decorate([
|
|
50
|
-
attr({ attribute: "aria-disabled" })
|
|
51
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaDisabled", void 0);
|
|
52
|
-
__decorate([
|
|
53
|
-
attr({ attribute: "aria-errormessage" })
|
|
54
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaErrormessage", void 0);
|
|
55
|
-
__decorate([
|
|
56
|
-
attr({ attribute: "aria-flowto" })
|
|
57
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaFlowto", void 0);
|
|
58
|
-
__decorate([
|
|
59
|
-
attr({ attribute: "aria-haspopup" })
|
|
60
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaHaspopup", void 0);
|
|
61
|
-
__decorate([
|
|
62
|
-
attr({ attribute: "aria-hidden" })
|
|
63
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaHidden", void 0);
|
|
64
|
-
__decorate([
|
|
65
|
-
attr({ attribute: "aria-invalid" })
|
|
66
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaInvalid", void 0);
|
|
67
|
-
__decorate([
|
|
68
|
-
attr({ attribute: "aria-keyshortcuts" })
|
|
69
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaKeyshortcuts", void 0);
|
|
70
|
-
__decorate([
|
|
71
|
-
attr({ attribute: "aria-label" })
|
|
72
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaLabel", void 0);
|
|
73
|
-
__decorate([
|
|
74
|
-
attr({ attribute: "aria-labelledby" })
|
|
75
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaLabelledby", void 0);
|
|
76
|
-
__decorate([
|
|
77
|
-
attr({ attribute: "aria-live" })
|
|
78
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaLive", void 0);
|
|
79
|
-
__decorate([
|
|
80
|
-
attr({ attribute: "aria-owns" })
|
|
81
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaOwns", void 0);
|
|
82
|
-
__decorate([
|
|
83
|
-
attr({ attribute: "aria-relevant" })
|
|
84
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaRelevant", void 0);
|
|
85
|
-
__decorate([
|
|
86
|
-
attr({ attribute: "aria-roledescription" })
|
|
87
|
-
], ARIAGlobalStatesAndProperties.prototype, "ariaRoledescription", void 0);
|
|
88
|
-
|
|
89
|
-
class _TextField extends FoundationElement {
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* A form-associated base class for the {@link @microsoft/fast-foundation#(TextField:class)} component.
|
|
93
|
-
*
|
|
94
|
-
* @internal
|
|
95
|
-
*/
|
|
96
|
-
class FormAssociatedTextField extends FormAssociated(_TextField) {
|
|
97
|
-
constructor() {
|
|
98
|
-
super(...arguments);
|
|
99
|
-
this.proxy = document.createElement("input");
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* Text field sub-types
|
|
105
|
-
* @public
|
|
106
|
-
*/
|
|
107
|
-
const TextFieldType = {
|
|
108
|
-
/**
|
|
109
|
-
* An email TextField
|
|
110
|
-
*/
|
|
111
|
-
email: "email",
|
|
112
|
-
/**
|
|
113
|
-
* A password TextField
|
|
114
|
-
*/
|
|
115
|
-
password: "password",
|
|
116
|
-
/**
|
|
117
|
-
* A telephone TextField
|
|
118
|
-
*/
|
|
119
|
-
tel: "tel",
|
|
120
|
-
/**
|
|
121
|
-
* A text TextField
|
|
122
|
-
*/
|
|
123
|
-
text: "text",
|
|
124
|
-
/**
|
|
125
|
-
* A URL TextField
|
|
126
|
-
*/
|
|
127
|
-
url: "url",
|
|
128
|
-
};
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* A Text Field Custom HTML Element.
|
|
132
|
-
* Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/text | <input type="text" /> element }.
|
|
133
|
-
*
|
|
134
|
-
* @slot start - Content which can be provided before the number field input
|
|
135
|
-
* @slot end - Content which can be provided after the number field input
|
|
136
|
-
* @slot - The default slot for the label
|
|
137
|
-
* @csspart label - The label
|
|
138
|
-
* @csspart root - The element wrapping the control, including start and end slots
|
|
139
|
-
* @csspart control - The text field element
|
|
140
|
-
* @fires change - Fires a custom 'change' event when the value has changed
|
|
141
|
-
*
|
|
142
|
-
* @public
|
|
143
|
-
*/
|
|
144
|
-
class TextField extends FormAssociatedTextField {
|
|
145
|
-
constructor() {
|
|
146
|
-
super(...arguments);
|
|
147
|
-
/**
|
|
148
|
-
* Allows setting a type or mode of text.
|
|
149
|
-
* @public
|
|
150
|
-
* @remarks
|
|
151
|
-
* HTML Attribute: type
|
|
152
|
-
*/
|
|
153
|
-
this.type = TextFieldType.text;
|
|
154
|
-
}
|
|
155
|
-
readOnlyChanged() {
|
|
156
|
-
if (this.proxy instanceof HTMLInputElement) {
|
|
157
|
-
this.proxy.readOnly = this.readOnly;
|
|
158
|
-
this.validate();
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
autofocusChanged() {
|
|
162
|
-
if (this.proxy instanceof HTMLInputElement) {
|
|
163
|
-
this.proxy.autofocus = this.autofocus;
|
|
164
|
-
this.validate();
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
placeholderChanged() {
|
|
168
|
-
if (this.proxy instanceof HTMLInputElement) {
|
|
169
|
-
this.proxy.placeholder = this.placeholder;
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
typeChanged() {
|
|
173
|
-
if (this.proxy instanceof HTMLInputElement) {
|
|
174
|
-
this.proxy.type = this.type;
|
|
175
|
-
this.validate();
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
listChanged() {
|
|
179
|
-
if (this.proxy instanceof HTMLInputElement) {
|
|
180
|
-
this.proxy.setAttribute("list", this.list);
|
|
181
|
-
this.validate();
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
maxlengthChanged() {
|
|
185
|
-
if (this.proxy instanceof HTMLInputElement) {
|
|
186
|
-
this.proxy.maxLength = this.maxlength;
|
|
187
|
-
this.validate();
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
minlengthChanged() {
|
|
191
|
-
if (this.proxy instanceof HTMLInputElement) {
|
|
192
|
-
this.proxy.minLength = this.minlength;
|
|
193
|
-
this.validate();
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
patternChanged() {
|
|
197
|
-
if (this.proxy instanceof HTMLInputElement) {
|
|
198
|
-
this.proxy.pattern = this.pattern;
|
|
199
|
-
this.validate();
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
sizeChanged() {
|
|
203
|
-
if (this.proxy instanceof HTMLInputElement) {
|
|
204
|
-
this.proxy.size = this.size;
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
spellcheckChanged() {
|
|
208
|
-
if (this.proxy instanceof HTMLInputElement) {
|
|
209
|
-
this.proxy.spellcheck = this.spellcheck;
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
/**
|
|
213
|
-
* @internal
|
|
214
|
-
*/
|
|
215
|
-
connectedCallback() {
|
|
216
|
-
super.connectedCallback();
|
|
217
|
-
this.proxy.setAttribute("type", this.type);
|
|
218
|
-
this.validate();
|
|
219
|
-
if (this.autofocus) {
|
|
220
|
-
DOM.queueUpdate(() => {
|
|
221
|
-
this.focus();
|
|
222
|
-
});
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
/**
|
|
226
|
-
* Selects all the text in the text field
|
|
227
|
-
*
|
|
228
|
-
* @public
|
|
229
|
-
*/
|
|
230
|
-
select() {
|
|
231
|
-
this.control.select();
|
|
232
|
-
/**
|
|
233
|
-
* The select event does not permeate the shadow DOM boundary.
|
|
234
|
-
* This fn effectively proxies the select event,
|
|
235
|
-
* emitting a `select` event whenever the internal
|
|
236
|
-
* control emits a `select` event
|
|
237
|
-
*/
|
|
238
|
-
this.$emit("select");
|
|
239
|
-
}
|
|
240
|
-
/**
|
|
241
|
-
* Handles the internal control's `input` event
|
|
242
|
-
* @internal
|
|
243
|
-
*/
|
|
244
|
-
handleTextInput() {
|
|
245
|
-
this.value = this.control.value;
|
|
246
|
-
}
|
|
247
|
-
/**
|
|
248
|
-
* Change event handler for inner control.
|
|
249
|
-
* @remarks
|
|
250
|
-
* "Change" events are not `composable` so they will not
|
|
251
|
-
* permeate the shadow DOM boundary. This fn effectively proxies
|
|
252
|
-
* the change event, emitting a `change` event whenever the internal
|
|
253
|
-
* control emits a `change` event
|
|
254
|
-
* @internal
|
|
255
|
-
*/
|
|
256
|
-
handleChange() {
|
|
257
|
-
this.$emit("change");
|
|
258
|
-
}
|
|
259
|
-
/** {@inheritDoc (FormAssociated:interface).validate} */
|
|
260
|
-
validate() {
|
|
261
|
-
super.validate(this.control);
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
__decorate([
|
|
265
|
-
attr({ attribute: "readonly", mode: "boolean" })
|
|
266
|
-
], TextField.prototype, "readOnly", void 0);
|
|
267
|
-
__decorate([
|
|
268
|
-
attr({ mode: "boolean" })
|
|
269
|
-
], TextField.prototype, "autofocus", void 0);
|
|
270
|
-
__decorate([
|
|
271
|
-
attr
|
|
272
|
-
], TextField.prototype, "placeholder", void 0);
|
|
273
|
-
__decorate([
|
|
274
|
-
attr
|
|
275
|
-
], TextField.prototype, "type", void 0);
|
|
276
|
-
__decorate([
|
|
277
|
-
attr
|
|
278
|
-
], TextField.prototype, "list", void 0);
|
|
279
|
-
__decorate([
|
|
280
|
-
attr({ converter: nullableNumberConverter })
|
|
281
|
-
], TextField.prototype, "maxlength", void 0);
|
|
282
|
-
__decorate([
|
|
283
|
-
attr({ converter: nullableNumberConverter })
|
|
284
|
-
], TextField.prototype, "minlength", void 0);
|
|
285
|
-
__decorate([
|
|
286
|
-
attr
|
|
287
|
-
], TextField.prototype, "pattern", void 0);
|
|
288
|
-
__decorate([
|
|
289
|
-
attr({ converter: nullableNumberConverter })
|
|
290
|
-
], TextField.prototype, "size", void 0);
|
|
291
|
-
__decorate([
|
|
292
|
-
attr({ mode: "boolean" })
|
|
293
|
-
], TextField.prototype, "spellcheck", void 0);
|
|
294
|
-
__decorate([
|
|
295
|
-
observable
|
|
296
|
-
], TextField.prototype, "defaultSlottedNodes", void 0);
|
|
297
|
-
/**
|
|
298
|
-
* Includes ARIA states and properties relating to the ARIA textbox role
|
|
299
|
-
*
|
|
300
|
-
* @public
|
|
301
|
-
*/
|
|
302
|
-
class DelegatesARIATextbox {
|
|
303
|
-
}
|
|
304
|
-
applyMixins(DelegatesARIATextbox, ARIAGlobalStatesAndProperties);
|
|
305
|
-
applyMixins(TextField, StartEnd, DelegatesARIATextbox);
|
|
306
|
-
|
|
307
17
|
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}.base{--_text-field-gutter-end: 70px}.control::-webkit-outer-spin-button,.control::-webkit-inner-spin-button{appearance:none}.control-buttons{position:absolute;z-index:1;right:3px;display:flex}.readonly .control-buttons,.disabled .control-buttons{pointer-events:none}.control-buttons .divider{margin-block:8px}.control-buttons>*{flex-shrink:0}";
|
|
308
18
|
|
|
309
19
|
class _NumberField extends VividElement {
|
|
310
20
|
}
|
|
311
|
-
class FormAssociatedNumberField extends FormAssociated
|
|
21
|
+
class FormAssociatedNumberField extends FormAssociated(_NumberField) {
|
|
312
22
|
constructor() {
|
|
313
23
|
super(...arguments);
|
|
314
24
|
this.proxy = document.createElement("input");
|