@vonage/vivid 3.31.0 → 3.34.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/accordion/index.js +5 -5
- package/accordion-item/index.js +4 -4
- package/action-group/index.js +1 -1
- package/alert/index.js +8 -7
- package/avatar/index.js +2 -2
- package/badge/index.js +2 -2
- package/banner/index.js +5 -5
- package/breadcrumb/index.js +1 -1
- package/breadcrumb-item/index.js +3 -3
- package/button/index.js +4 -4
- package/calendar/index.js +1 -1
- package/calendar-event/index.js +1 -1
- package/card/index.js +3 -3
- package/checkbox/index.js +7 -4
- package/combobox/index.js +10 -9
- package/custom-elements.json +996 -29
- package/data-grid/index.js +2 -2
- package/date-picker/index.js +35 -0
- package/dialog/index.js +6 -6
- package/divider/index.js +1 -1
- package/elevation/index.js +1 -1
- package/empty-state/index.js +2 -2
- package/fab/index.js +4 -4
- package/file-picker/index.js +7 -6
- package/focus/index.js +1 -1
- package/header/index.js +2 -2
- package/icon/index.js +1 -1
- package/index.d.ts +1 -0
- package/index.js +68 -66
- package/layout/index.js +1 -1
- package/lib/button/button.d.ts +2 -0
- package/lib/calendar/calendar.d.ts +1 -1
- package/lib/components.d.ts +20 -19
- package/lib/date-picker/calendar/calendarGrid.d.ts +17 -0
- package/lib/date-picker/calendar/dateStr.d.ts +7 -0
- package/lib/date-picker/calendar/month.d.ts +12 -0
- package/lib/date-picker/calendar/monthPickerGrid.d.ts +10 -0
- package/lib/date-picker/calendar/presentationDate.d.ts +4 -0
- package/lib/date-picker/calendar/year.d.ts +2 -0
- package/lib/date-picker/date-picker.d.ts +18 -0
- package/lib/date-picker/date-picker.template.d.ts +4 -0
- package/lib/date-picker/definition.d.ts +3 -0
- package/lib/date-picker/locale.d.ts +21 -0
- package/lib/icon/icon.d.ts +0 -1
- package/lib/listbox/listbox.d.ts +9 -1
- package/lib/select/select.d.ts +4 -2
- package/lib/text-field/text-field.d.ts +1 -0
- package/listbox/index.js +22 -17
- package/locales/en-GB.d.ts +3 -0
- package/locales/en-GB.js +59 -0
- package/locales/en-US.d.ts +3 -0
- package/locales/en-US.js +59 -0
- package/locales/ja-JP.d.ts +3 -0
- package/locales/ja-JP.js +59 -0
- package/locales/zh-CN.d.ts +3 -0
- package/locales/zh-CN.js +59 -0
- package/menu/index.js +8 -8
- package/menu-item/index.js +4 -4
- package/nav/index.js +1 -1
- package/nav-disclosure/index.js +3 -3
- package/nav-item/index.js +3 -3
- package/note/index.js +4 -4
- package/number-field/index.js +8 -7
- package/option/index.js +5 -4
- package/package.json +2 -15
- package/pagination/index.js +5 -5
- package/popup/index.js +6 -6
- package/progress/index.js +1 -1
- package/progress-ring/index.js +1 -1
- package/radio/index.js +2 -2
- package/radio-group/index.js +1 -1
- package/select/index.js +10 -9
- package/shared/affix.js +25 -9
- package/shared/apply-mixins.js +1 -1
- package/shared/breadcrumb-item.js +5 -5
- package/shared/button.js +13 -13
- package/shared/calendar-event.js +36 -16
- package/shared/definition.js +133 -194
- package/shared/definition10.js +225 -40
- package/shared/definition11.js +36 -32
- package/shared/definition12.js +763 -98
- package/shared/definition13.js +125 -89
- package/shared/definition14.js +207 -27
- package/shared/definition15.js +710 -731
- package/shared/definition16.js +1289 -47
- package/shared/definition17.js +6113 -93
- package/shared/definition18.js +242 -164
- package/shared/definition19.js +47 -692
- package/shared/definition2.js +199 -117
- package/shared/definition20.js +59 -1671
- package/shared/definition21.js +95 -255
- package/shared/definition22.js +2218 -1167
- package/shared/definition23.js +57 -219
- package/shared/definition24.js +27 -68
- package/shared/definition25.js +54 -38
- package/shared/definition26.js +395 -70
- package/shared/definition27.js +381 -2223
- package/shared/definition28.js +85 -44
- package/shared/definition29.js +27 -40
- package/shared/definition3.js +61 -24
- package/shared/definition30.js +13 -427
- package/shared/definition31.js +49 -360
- package/shared/definition32.js +466 -13
- package/shared/definition33.js +273 -63
- package/shared/definition34.js +195 -25
- package/shared/definition35.js +86 -35
- package/shared/definition36.js +66 -427
- package/shared/definition37.js +430 -190
- package/shared/definition38.js +34 -52
- package/shared/definition39.js +683 -31
- package/shared/definition4.js +157 -12
- package/shared/definition40.js +97 -422
- package/shared/definition41.js +473 -543
- package/shared/definition42.js +122 -73
- package/shared/definition43.js +103 -502
- package/shared/definition44.js +23 -101
- package/shared/definition45.js +76 -126
- package/shared/definition46.js +494 -48
- package/shared/definition47.js +23 -23
- package/shared/definition48.js +126 -476
- package/shared/definition49.js +275 -98
- package/shared/definition5.js +71 -36
- package/shared/definition50.js +157 -16
- package/shared/definition51.js +133 -263
- package/shared/definition52.js +131 -115
- package/shared/definition53.js +85 -120
- package/shared/definition54.js +295 -111
- package/shared/definition55.js +12 -71
- package/shared/definition56.js +39 -295
- package/shared/definition57.js +181 -0
- package/shared/definition6.js +56 -111
- package/shared/definition7.js +119 -187
- package/shared/definition8.js +58 -23
- package/shared/definition9.js +92 -66
- package/shared/focus.js +2 -1
- package/shared/focus2.js +1 -1
- package/shared/form-associated.js +2 -2
- package/shared/icon.js +48 -27
- package/shared/index.js +7 -27
- package/shared/index2.js +202 -0
- package/shared/key-codes.js +1 -1
- package/shared/listbox.js +88 -11
- package/shared/localization/Locale.d.ts +4 -0
- package/shared/localization/index.d.ts +7 -0
- package/shared/patterns/form-elements/form-elements.d.ts +4 -4
- package/shared/patterns/index.d.ts +1 -0
- package/shared/patterns/localized.d.ts +4 -0
- package/shared/radio.js +23 -7
- package/shared/repeat.js +1 -1
- package/shared/text-anchor.js +21 -4
- package/shared/text-anchor.template.js +37 -40
- package/shared/text-field.js +2 -2
- package/shared/text-field2.js +15 -15
- package/shared/tree-item.js +12 -12
- package/side-drawer/index.js +1 -1
- package/slider/index.js +2 -2
- package/split-button/index.js +3 -3
- package/style.css +6097 -0
- package/styles/core/all.css +25 -3
- package/styles/core/theme.css +1 -1
- package/styles/core/typography.css +25 -3
- package/styles/tokens/theme-dark.css +4 -4
- package/styles/tokens/theme-light.css +4 -4
- package/styles/tokens/vivid-2-compat.css +2 -2
- package/switch/index.js +5 -4
- package/tab/index.js +3 -3
- package/tab-panel/index.js +1 -1
- package/tabs/index.js +5 -5
- package/tag/index.js +3 -3
- package/tag-group/index.js +1 -1
- package/text-anchor/index.js +1 -1
- package/text-area/index.js +5 -4
- package/text-field/index.js +5 -4
- package/toggletip/index.js +7 -7
- package/tooltip/index.js +7 -7
- package/tree-item/index.js +3 -3
- package/tree-view/index.js +1 -1
- package/vivid.api.json +137 -0
- package/lib/accordion/index.d.ts +0 -1
- package/lib/accordion-item/index.d.ts +0 -1
- package/lib/action-group/index.d.ts +0 -1
- package/lib/alert/index.d.ts +0 -1
- package/lib/avatar/index.d.ts +0 -1
- package/lib/badge/index.d.ts +0 -1
- package/lib/banner/index.d.ts +0 -1
- package/lib/breadcrumb/index.d.ts +0 -1
- package/lib/breadcrumb-item/index.d.ts +0 -1
- package/lib/button/index.d.ts +0 -1
- package/lib/calendar/index.d.ts +0 -1
- package/lib/calendar-event/index.d.ts +0 -1
- package/lib/card/index.d.ts +0 -1
- package/lib/checkbox/index.d.ts +0 -1
- package/lib/combobox/index.d.ts +0 -1
- package/lib/data-grid/index.d.ts +0 -1
- package/lib/dialog/index.d.ts +0 -1
- package/lib/divider/index.d.ts +0 -1
- package/lib/elevation/index.d.ts +0 -1
- package/lib/empty-state/index.d.ts +0 -1
- package/lib/fab/index.d.ts +0 -1
- package/lib/file-picker/index.d.ts +0 -1
- package/lib/focus/index.d.ts +0 -1
- package/lib/header/index.d.ts +0 -1
- package/lib/icon/index.d.ts +0 -1
- package/lib/layout/index.d.ts +0 -1
- package/lib/listbox/index.d.ts +0 -1
- package/lib/menu/index.d.ts +0 -1
- package/lib/menu-item/index.d.ts +0 -1
- package/lib/nav/index.d.ts +0 -1
- package/lib/nav-disclosure/index.d.ts +0 -1
- package/lib/nav-item/index.d.ts +0 -1
- package/lib/note/index.d.ts +0 -1
- package/lib/number-field/index.d.ts +0 -1
- package/lib/option/index.d.ts +0 -1
- package/lib/pagination/index.d.ts +0 -1
- package/lib/popup/index.d.ts +0 -1
- package/lib/progress/index.d.ts +0 -1
- package/lib/progress-ring/index.d.ts +0 -1
- package/lib/radio/index.d.ts +0 -1
- package/lib/radio-group/index.d.ts +0 -1
- package/lib/select/index.d.ts +0 -1
- package/lib/side-drawer/index.d.ts +0 -1
- package/lib/slider/index.d.ts +0 -1
- package/lib/split-button/index.d.ts +0 -1
- package/lib/switch/index.d.ts +0 -1
- package/lib/tab/index.d.ts +0 -1
- package/lib/tab-panel/index.d.ts +0 -1
- package/lib/tabs/index.d.ts +0 -1
- package/lib/tag/index.d.ts +0 -1
- package/lib/tag-group/index.d.ts +0 -1
- package/lib/text-anchor/index.d.ts +0 -1
- package/lib/text-area/index.d.ts +0 -1
- package/lib/text-field/index.d.ts +0 -1
- package/lib/toggletip/index.d.ts +0 -1
- package/lib/tooltip/index.d.ts +0 -1
- package/lib/tree-item/index.d.ts +0 -1
- package/lib/tree-view/index.d.ts +0 -1
- package/shared/form-elements.js +0 -162
package/shared/index2.js
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { I as Icon } from './icon.js';
|
|
2
|
+
import { a as attr, o as observable, v as volatile, h as html } from './index.js';
|
|
3
|
+
import { w as when } from './when.js';
|
|
4
|
+
import enUS from '../locales/en-US.js';
|
|
5
|
+
|
|
6
|
+
const messageStyles = "/**\n * Do not edit directly\n * Generated on Mon, 04 Sep 2023 12:44:18 GMT\n */\n.message {\n display: flex;\n contain: inline-size;\n font: var(--vvd-typography-base-condensed);\n gap: 4px;\n grid-column: 1/-1;\n}\n.message-text {\n color: var(--vvd-color-canvas-text);\n}\n.helper-message .message-text {\n color: var(--_low-ink-color);\n}\n.message-icon {\n font-size: 16px;\n}\n.success-message .message-icon {\n color: var(--vvd-color-success-500);\n}\n.error-message .message-icon {\n color: var(--vvd-color-alert-500);\n}";
|
|
7
|
+
|
|
8
|
+
var __defProp$1 = Object.defineProperty;
|
|
9
|
+
var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
|
|
10
|
+
var __decorateClass$1 = (decorators, target, key, kind) => {
|
|
11
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$1(target, key) : target;
|
|
12
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
13
|
+
if (decorator = decorators[i])
|
|
14
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
15
|
+
if (kind && result)
|
|
16
|
+
__defProp$1(target, key, result);
|
|
17
|
+
return result;
|
|
18
|
+
};
|
|
19
|
+
const ElementInternalsKey = "ElementInternals";
|
|
20
|
+
const supportsElementInternals = () => ElementInternalsKey in window && "setFormValue" in window[ElementInternalsKey].prototype;
|
|
21
|
+
class FormElementHelperText {
|
|
22
|
+
}
|
|
23
|
+
__decorateClass$1([
|
|
24
|
+
attr({ attribute: "helper-text" })
|
|
25
|
+
], FormElementHelperText.prototype, "helperText", 2);
|
|
26
|
+
class FormElementSuccessText {
|
|
27
|
+
}
|
|
28
|
+
__decorateClass$1([
|
|
29
|
+
attr({ attribute: "success-text" })
|
|
30
|
+
], FormElementSuccessText.prototype, "successText", 2);
|
|
31
|
+
class FormElementCharCount {
|
|
32
|
+
constructor() {
|
|
33
|
+
this.charCount = false;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
__decorateClass$1([
|
|
37
|
+
attr({
|
|
38
|
+
attribute: "char-count",
|
|
39
|
+
mode: "boolean"
|
|
40
|
+
})
|
|
41
|
+
], FormElementCharCount.prototype, "charCount", 2);
|
|
42
|
+
function formElements(constructor) {
|
|
43
|
+
class Decorated extends constructor {
|
|
44
|
+
constructor(...args) {
|
|
45
|
+
super(...args);
|
|
46
|
+
this.userValid = true;
|
|
47
|
+
this.#blurred = false;
|
|
48
|
+
this.#handleInvalidEvent = () => {
|
|
49
|
+
if (this.#blurred && this.dirtyValue)
|
|
50
|
+
return;
|
|
51
|
+
this.#blurred = true;
|
|
52
|
+
this.dirtyValue = true;
|
|
53
|
+
this.validate();
|
|
54
|
+
};
|
|
55
|
+
this.validate = () => {
|
|
56
|
+
if (supportsElementInternals() && this.proxy instanceof HTMLElement) {
|
|
57
|
+
this.setValidity(this.proxy.validity, this.proxy.validationMessage, this.control);
|
|
58
|
+
} else {
|
|
59
|
+
super.validate();
|
|
60
|
+
}
|
|
61
|
+
this.userValid = !this.userValid;
|
|
62
|
+
if (this.proxy instanceof HTMLElement) {
|
|
63
|
+
this.userValid = this.#blurred && this.dirtyValue ? !this.validationMessage : true;
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
this.addEventListener("blur", () => {
|
|
67
|
+
this.#blurred = true;
|
|
68
|
+
this.validate();
|
|
69
|
+
});
|
|
70
|
+
this.addEventListener("focus", () => {
|
|
71
|
+
this.#blurred = false;
|
|
72
|
+
});
|
|
73
|
+
this.addEventListener("invalid", () => {
|
|
74
|
+
this.proxy.dispatchEvent(new Event("invalid"));
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
#blurred;
|
|
78
|
+
get errorValidationMessage() {
|
|
79
|
+
return this.userValid ? "" : this.validationMessage;
|
|
80
|
+
}
|
|
81
|
+
connectedCallback() {
|
|
82
|
+
super.connectedCallback?.();
|
|
83
|
+
this.proxy.addEventListener("invalid", this.#handleInvalidEvent);
|
|
84
|
+
}
|
|
85
|
+
#handleInvalidEvent;
|
|
86
|
+
disconnectedCallback() {
|
|
87
|
+
super.disconnectedCallback?.();
|
|
88
|
+
this.proxy.removeEventListener("invalid", this.#handleInvalidEvent);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
__decorateClass$1([
|
|
92
|
+
attr
|
|
93
|
+
], Decorated.prototype, "label", 2);
|
|
94
|
+
__decorateClass$1([
|
|
95
|
+
observable
|
|
96
|
+
], Decorated.prototype, "userValid", 2);
|
|
97
|
+
__decorateClass$1([
|
|
98
|
+
volatile
|
|
99
|
+
], Decorated.prototype, "errorValidationMessage", 1);
|
|
100
|
+
return Decorated;
|
|
101
|
+
}
|
|
102
|
+
function getFeedbackTemplate(messageType, context) {
|
|
103
|
+
const MessageTypeMap = {
|
|
104
|
+
"helper": {
|
|
105
|
+
"messageProperty": "helperText",
|
|
106
|
+
"className": "helper",
|
|
107
|
+
"iconType": ""
|
|
108
|
+
},
|
|
109
|
+
"error": {
|
|
110
|
+
"messageProperty": "errorValidationMessage",
|
|
111
|
+
"className": "error",
|
|
112
|
+
"iconType": "info-line"
|
|
113
|
+
},
|
|
114
|
+
"success": {
|
|
115
|
+
"messageProperty": "successText",
|
|
116
|
+
"className": "success",
|
|
117
|
+
"iconType": "check-circle-line"
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
const iconTag = context.tagFor(Icon);
|
|
121
|
+
const messageTypeConfig = MessageTypeMap[messageType];
|
|
122
|
+
const iconType = messageTypeConfig.iconType;
|
|
123
|
+
return html`
|
|
124
|
+
<style>
|
|
125
|
+
${messageStyles}
|
|
126
|
+
|
|
127
|
+
</style>
|
|
128
|
+
<div class="message ${MessageTypeMap[messageType].className}-message">
|
|
129
|
+
${when(() => iconType, html`
|
|
130
|
+
<${iconTag} class="message-icon" name="${iconType}"></${iconTag}>`)}
|
|
131
|
+
${feedbackMessage({
|
|
132
|
+
messageProperty: MessageTypeMap[messageType].messageProperty
|
|
133
|
+
})}
|
|
134
|
+
</div>`;
|
|
135
|
+
}
|
|
136
|
+
function feedbackMessage({ messageProperty }) {
|
|
137
|
+
return html`
|
|
138
|
+
<span class="message-text">${(x) => x[messageProperty]}</span>
|
|
139
|
+
`;
|
|
140
|
+
}
|
|
141
|
+
function errorText(constructor) {
|
|
142
|
+
class Decorated extends constructor {
|
|
143
|
+
constructor(...args) {
|
|
144
|
+
super(...args);
|
|
145
|
+
this.#shouldValidate = true;
|
|
146
|
+
this.#prevSuccessText = "";
|
|
147
|
+
this._validate = this.validate;
|
|
148
|
+
this.validate = () => {
|
|
149
|
+
if (this.#shouldValidate)
|
|
150
|
+
this._validate();
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
#shouldValidate;
|
|
154
|
+
#prevSuccessText;
|
|
155
|
+
errorTextChanged(_, newmsg) {
|
|
156
|
+
if (newmsg) {
|
|
157
|
+
this.setValidity({ customError: true }, newmsg, this.control);
|
|
158
|
+
this.#prevSuccessText = this.successText;
|
|
159
|
+
this.successText = "";
|
|
160
|
+
this.userValid = !this.userValid;
|
|
161
|
+
this.userValid = false;
|
|
162
|
+
this.#shouldValidate = false;
|
|
163
|
+
} else {
|
|
164
|
+
this.setValidity({ customError: false }, "", this.control);
|
|
165
|
+
this.successText = this.#prevSuccessText;
|
|
166
|
+
this.userValid = true;
|
|
167
|
+
this.#shouldValidate = true;
|
|
168
|
+
this._validate();
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
__decorateClass$1([
|
|
173
|
+
attr({ attribute: "error-text" })
|
|
174
|
+
], Decorated.prototype, "errorText", 2);
|
|
175
|
+
return Decorated;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
var __defProp = Object.defineProperty;
|
|
179
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
180
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
181
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
182
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
183
|
+
if (decorator = decorators[i])
|
|
184
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
185
|
+
if (kind && result)
|
|
186
|
+
__defProp(target, key, result);
|
|
187
|
+
return result;
|
|
188
|
+
};
|
|
189
|
+
class CurrentLocale {
|
|
190
|
+
constructor() {
|
|
191
|
+
this.locale = enUS;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
__decorateClass([
|
|
195
|
+
observable
|
|
196
|
+
], CurrentLocale.prototype, "locale", 2);
|
|
197
|
+
const currentLocale = new CurrentLocale();
|
|
198
|
+
const setLocale = (locale) => {
|
|
199
|
+
currentLocale.locale = locale;
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
export { FormElementSuccessText as F, FormElementHelperText as a, FormElementCharCount as b, currentLocale as c, errorText as e, formElements as f, getFeedbackTemplate as g, setLocale as s };
|
package/shared/key-codes.js
CHANGED
|
@@ -97,4 +97,4 @@ const ArrowKeys = {
|
|
|
97
97
|
ArrowUp: keyArrowUp,
|
|
98
98
|
};
|
|
99
99
|
|
|
100
|
-
export { ArrowKeys as A,
|
|
100
|
+
export { ArrowKeys as A, keySpace as a, keyEnd as b, keyHome as c, keyArrowDown as d, keyArrowUp as e, keyEscape as f, keyTab as g, keyArrowRight as h, keyArrowLeft as i, keyPageDown as j, keyEnter as k, keyPageUp as l, keyFunction2 as m };
|
package/shared/listbox.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { F as FoundationElement, O as Observable, _ as __decorate, a as attr, o as observable, D as DOM, n as nullableNumberConverter
|
|
2
|
-
import { i as isListboxOption } from './
|
|
1
|
+
import { F as FoundationElement, O as Observable, _ as __decorate, a as attr, o as observable, D as DOM, n as nullableNumberConverter } from './index.js';
|
|
2
|
+
import { i as isListboxOption } from './definition33.js';
|
|
3
3
|
import { A as ARIAGlobalStatesAndProperties } from './aria-global.js';
|
|
4
4
|
import { a as applyMixins } from './apply-mixins.js';
|
|
5
|
-
import {
|
|
5
|
+
import { a as keySpace, f as keyEscape, k as keyEnter, g as keyTab, b as keyEnd, e as keyArrowUp, d as keyArrowDown, c as keyHome } from './key-codes.js';
|
|
6
6
|
import { u as uniqueId } from './strings.js';
|
|
7
7
|
import { i as inRange } from './numbers.js';
|
|
8
8
|
|
|
@@ -30,7 +30,7 @@ function findLastIndex(array, predicate) {
|
|
|
30
30
|
*
|
|
31
31
|
* @public
|
|
32
32
|
*/
|
|
33
|
-
|
|
33
|
+
let Listbox$1 = class Listbox extends FoundationElement {
|
|
34
34
|
constructor() {
|
|
35
35
|
super(...arguments);
|
|
36
36
|
/**
|
|
@@ -226,7 +226,7 @@ class Listbox$1 extends FoundationElement {
|
|
|
226
226
|
handleChange(source, propertyName) {
|
|
227
227
|
switch (propertyName) {
|
|
228
228
|
case "selected": {
|
|
229
|
-
if (Listbox
|
|
229
|
+
if (Listbox.slottedOptionFilter(source)) {
|
|
230
230
|
this.selectedIndex = this.options.indexOf(source);
|
|
231
231
|
}
|
|
232
232
|
this.setSelectedOptions();
|
|
@@ -248,7 +248,7 @@ class Listbox$1 extends FoundationElement {
|
|
|
248
248
|
if (this.typeaheadTimeout) {
|
|
249
249
|
window.clearTimeout(this.typeaheadTimeout);
|
|
250
250
|
}
|
|
251
|
-
this.typeaheadTimeout = window.setTimeout(() => (this.typeaheadExpired = true), Listbox
|
|
251
|
+
this.typeaheadTimeout = window.setTimeout(() => (this.typeaheadExpired = true), Listbox.TYPE_AHEAD_TIMEOUT_MS);
|
|
252
252
|
if (key.length > 1) {
|
|
253
253
|
return;
|
|
254
254
|
}
|
|
@@ -374,7 +374,7 @@ class Listbox$1 extends FoundationElement {
|
|
|
374
374
|
*/
|
|
375
375
|
selectedOptionsChanged(prev, next) {
|
|
376
376
|
var _a;
|
|
377
|
-
const filteredNext = next.filter(Listbox
|
|
377
|
+
const filteredNext = next.filter(Listbox.slottedOptionFilter);
|
|
378
378
|
(_a = this.options) === null || _a === void 0 ? void 0 : _a.forEach(o => {
|
|
379
379
|
const notifier = Observable.getNotifier(o);
|
|
380
380
|
notifier.unsubscribe(this, "selected");
|
|
@@ -493,7 +493,7 @@ class Listbox$1 extends FoundationElement {
|
|
|
493
493
|
this.typeaheadExpired = false;
|
|
494
494
|
}
|
|
495
495
|
}
|
|
496
|
-
}
|
|
496
|
+
};
|
|
497
497
|
/**
|
|
498
498
|
* A static filter to include only selectable options.
|
|
499
499
|
*
|
|
@@ -989,7 +989,84 @@ __decorate([
|
|
|
989
989
|
attr({ converter: nullableNumberConverter })
|
|
990
990
|
], ListboxElement.prototype, "size", void 0);
|
|
991
991
|
|
|
992
|
-
|
|
993
|
-
|
|
992
|
+
/**
|
|
993
|
+
* String values for use with KeyboardEvent.key
|
|
994
|
+
*/
|
|
995
|
+
const keyArrowLeft = "ArrowLeft";
|
|
996
|
+
const keyArrowRight = "ArrowRight";
|
|
997
|
+
|
|
998
|
+
var __defProp = Object.defineProperty;
|
|
999
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
1000
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
1001
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
1002
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
1003
|
+
if (decorator = decorators[i])
|
|
1004
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
1005
|
+
if (kind && result)
|
|
1006
|
+
__defProp(target, key, result);
|
|
1007
|
+
return result;
|
|
1008
|
+
};
|
|
1009
|
+
class Listbox extends ListboxElement {
|
|
1010
|
+
orientationChanged() {
|
|
1011
|
+
if (this.orientation === "horizontal") {
|
|
1012
|
+
this.addEventListener("keydown", this.#horizontalKeydownHandler);
|
|
1013
|
+
} else {
|
|
1014
|
+
this.removeEventListener("keydown", this.#horizontalKeydownHandler);
|
|
1015
|
+
}
|
|
1016
|
+
}
|
|
1017
|
+
/**
|
|
1018
|
+
* Handles `keydown` actions for horizontal listbox navigation and typeahead.
|
|
1019
|
+
*
|
|
1020
|
+
* @internal
|
|
1021
|
+
*/
|
|
1022
|
+
#horizontalKeydownHandler(e) {
|
|
1023
|
+
if (this.disabled) {
|
|
1024
|
+
return true;
|
|
1025
|
+
}
|
|
1026
|
+
const key = e.key;
|
|
1027
|
+
switch (key) {
|
|
1028
|
+
case keyArrowRight: {
|
|
1029
|
+
if (!e.shiftKey) {
|
|
1030
|
+
e.preventDefault();
|
|
1031
|
+
this.selectNextOption();
|
|
1032
|
+
}
|
|
1033
|
+
break;
|
|
1034
|
+
}
|
|
1035
|
+
case keyArrowLeft: {
|
|
1036
|
+
if (!e.shiftKey) {
|
|
1037
|
+
e.preventDefault();
|
|
1038
|
+
this.selectPreviousOption();
|
|
1039
|
+
}
|
|
1040
|
+
break;
|
|
1041
|
+
}
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
slottedOptionsChanged(prev, next) {
|
|
1045
|
+
super.slottedOptionsChanged(prev, next);
|
|
1046
|
+
this.#disableSlottedChildren();
|
|
1047
|
+
}
|
|
1048
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
|
1049
|
+
super.attributeChangedCallback(name, oldValue, newValue);
|
|
1050
|
+
if (name === "disabled") {
|
|
1051
|
+
this.#disableSlottedChildren();
|
|
1052
|
+
}
|
|
1053
|
+
}
|
|
1054
|
+
#disableSlottedChildren() {
|
|
1055
|
+
this.options.forEach((optionElement) => {
|
|
1056
|
+
if (!optionElement.disabled) {
|
|
1057
|
+
optionElement.disabled = this.disabled;
|
|
1058
|
+
}
|
|
1059
|
+
});
|
|
1060
|
+
}
|
|
1061
|
+
}
|
|
1062
|
+
__decorateClass([
|
|
1063
|
+
attr
|
|
1064
|
+
], Listbox.prototype, "appearance", 2);
|
|
1065
|
+
__decorateClass([
|
|
1066
|
+
attr
|
|
1067
|
+
], Listbox.prototype, "orientation", 2);
|
|
1068
|
+
__decorateClass([
|
|
1069
|
+
attr
|
|
1070
|
+
], Listbox.prototype, "shape", 2);
|
|
994
1071
|
|
|
995
|
-
export { DelegatesARIAListbox as D,
|
|
1072
|
+
export { DelegatesARIAListbox as D, ListboxElement as L, Listbox as a, Listbox$1 as b };
|
|
@@ -33,10 +33,10 @@ export declare function formElements<T extends {
|
|
|
33
33
|
[x: string]: any;
|
|
34
34
|
label?: string | undefined;
|
|
35
35
|
userValid: boolean;
|
|
36
|
-
"__#
|
|
36
|
+
"__#2@#blurred": boolean;
|
|
37
37
|
readonly errorValidationMessage: any;
|
|
38
38
|
connectedCallback(): void;
|
|
39
|
-
"__#
|
|
39
|
+
"__#2@#handleInvalidEvent": () => void;
|
|
40
40
|
disconnectedCallback(): void;
|
|
41
41
|
validate: () => void;
|
|
42
42
|
};
|
|
@@ -49,8 +49,8 @@ export declare function errorText<T extends {
|
|
|
49
49
|
new (...args: any[]): {
|
|
50
50
|
[x: string]: any;
|
|
51
51
|
errorText?: string | undefined;
|
|
52
|
-
"__#
|
|
53
|
-
"__#
|
|
52
|
+
"__#3@#shouldValidate": boolean;
|
|
53
|
+
"__#3@#prevSuccessText": string;
|
|
54
54
|
errorTextChanged(_: string, newmsg: string | undefined): void;
|
|
55
55
|
};
|
|
56
56
|
} & T;
|
package/shared/radio.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { F as FoundationElement, _ as __decorate, a as attr, o as observable
|
|
1
|
+
import { F as FoundationElement, _ as __decorate, a as attr, o as observable } from './index.js';
|
|
2
2
|
import { C as CheckableFormAssociated } from './form-associated.js';
|
|
3
|
-
import {
|
|
3
|
+
import { a as keySpace } from './key-codes.js';
|
|
4
4
|
|
|
5
5
|
class _Radio extends FoundationElement {
|
|
6
6
|
}
|
|
@@ -28,7 +28,7 @@ class FormAssociatedRadio extends CheckableFormAssociated(_Radio) {
|
|
|
28
28
|
*
|
|
29
29
|
* @public
|
|
30
30
|
*/
|
|
31
|
-
|
|
31
|
+
let Radio$1 = class Radio extends FormAssociatedRadio {
|
|
32
32
|
constructor() {
|
|
33
33
|
super();
|
|
34
34
|
/**
|
|
@@ -110,7 +110,7 @@ class Radio$1 extends FormAssociatedRadio {
|
|
|
110
110
|
this.checked = true;
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
}
|
|
113
|
+
};
|
|
114
114
|
__decorate([
|
|
115
115
|
attr({ attribute: "readonly", mode: "boolean" })
|
|
116
116
|
], Radio$1.prototype, "readOnly", void 0);
|
|
@@ -121,8 +121,24 @@ __decorate([
|
|
|
121
121
|
observable
|
|
122
122
|
], Radio$1.prototype, "defaultSlottedNodes", void 0);
|
|
123
123
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
124
|
+
var __defProp = Object.defineProperty;
|
|
125
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
126
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
127
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
128
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
129
|
+
if (decorator = decorators[i])
|
|
130
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
131
|
+
if (kind && result)
|
|
132
|
+
__defProp(target, key, result);
|
|
133
|
+
return result;
|
|
134
|
+
};
|
|
135
|
+
class Radio extends Radio$1 {
|
|
136
|
+
}
|
|
137
|
+
__decorateClass([
|
|
138
|
+
attr
|
|
139
|
+
], Radio.prototype, "label", 2);
|
|
140
|
+
__decorateClass([
|
|
141
|
+
attr
|
|
142
|
+
], Radio.prototype, "connotation", 2);
|
|
127
143
|
|
|
128
144
|
export { Radio as R };
|
package/shared/repeat.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { e as emptyArray, O as Observable, S as SubscriberSet, D as DOM, H as HTMLDirective,
|
|
1
|
+
import { e as emptyArray, O as Observable, S as SubscriberSet, D as DOM, H as HTMLDirective, f as HTMLView } from './index.js';
|
|
2
2
|
|
|
3
3
|
/** @internal */
|
|
4
4
|
function newSplice(index, removed, addedCount) {
|
package/shared/text-anchor.js
CHANGED
|
@@ -1,14 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { b as AffixIcon } from './affix.js';
|
|
1
|
+
import { A as AffixIcon } from './affix.js';
|
|
3
2
|
import { A as Anchor } from './anchor.js';
|
|
4
3
|
import { a as applyMixins } from './apply-mixins.js';
|
|
4
|
+
import { a as attr } from './index.js';
|
|
5
5
|
|
|
6
|
+
var __defProp = Object.defineProperty;
|
|
7
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
8
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
9
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
10
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
11
|
+
if (decorator = decorators[i])
|
|
12
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
13
|
+
if (kind && result)
|
|
14
|
+
__defProp(target, key, result);
|
|
15
|
+
return result;
|
|
16
|
+
};
|
|
6
17
|
class TextAnchor extends Anchor {
|
|
18
|
+
/**
|
|
19
|
+
* Allows subclasses to provide a body template that will be rendered inside the anchor.
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
7
22
|
getBodyTemplate() {
|
|
8
|
-
return
|
|
23
|
+
return void 0;
|
|
9
24
|
}
|
|
10
25
|
}
|
|
11
|
-
|
|
26
|
+
__decorateClass([
|
|
27
|
+
attr
|
|
28
|
+
], TextAnchor.prototype, "text", 2);
|
|
12
29
|
applyMixins(TextAnchor, AffixIcon);
|
|
13
30
|
|
|
14
31
|
export { TextAnchor as T };
|
|
@@ -4,52 +4,49 @@ import { h as html } from './index.js';
|
|
|
4
4
|
import { r as ref } from './ref.js';
|
|
5
5
|
import { c as classNames } from './class-names.js';
|
|
6
6
|
|
|
7
|
-
const getClasses = ({
|
|
8
|
-
|
|
9
|
-
icon
|
|
10
|
-
|
|
11
|
-
const textAnchorTemplate = context => {
|
|
7
|
+
const getClasses = ({ text, icon }) => classNames(
|
|
8
|
+
"control",
|
|
9
|
+
["icon-only", !text && !!icon]
|
|
10
|
+
);
|
|
11
|
+
const textAnchorTemplate = (context) => {
|
|
12
12
|
const affixIconTemplate = affixIconTemplateFactory(context);
|
|
13
13
|
const focusTemplate = focusTemplateFactory(context);
|
|
14
14
|
return html`<a
|
|
15
15
|
class="${getClasses}"
|
|
16
|
-
download="${x => x.download}"
|
|
17
|
-
href="${x => x.href}"
|
|
18
|
-
hreflang="${x => x.hreflang}"
|
|
19
|
-
ping="${x => x.ping}"
|
|
20
|
-
referrerpolicy="${x => x.referrerpolicy}"
|
|
21
|
-
rel="${x => x.rel}"
|
|
22
|
-
target="${x => x.target}"
|
|
23
|
-
type="${x => x.type}"
|
|
24
|
-
aria-atomic="${x => x.ariaAtomic}"
|
|
25
|
-
aria-busy="${x => x.ariaBusy}"
|
|
26
|
-
aria-controls="${x => x.ariaControls}"
|
|
27
|
-
aria-current="${x => x.ariaCurrent}"
|
|
28
|
-
aria-describedby="${x => x.ariaDescribedby}"
|
|
29
|
-
aria-details="${x => x.ariaDetails}"
|
|
30
|
-
aria-disabled="${x => x.ariaDisabled}"
|
|
31
|
-
aria-errormessage="${x => x.ariaErrormessage}"
|
|
32
|
-
aria-expanded="${x => x.ariaExpanded}"
|
|
33
|
-
aria-flowto="${x => x.ariaFlowto}"
|
|
34
|
-
aria-haspopup="${x => x.ariaHaspopup}"
|
|
35
|
-
aria-hidden="${x => x.ariaHidden}"
|
|
36
|
-
aria-invalid="${x => x.ariaInvalid}"
|
|
37
|
-
aria-keyshortcuts="${x => x.ariaKeyshortcuts}"
|
|
38
|
-
aria-label="${x => x.ariaLabel}"
|
|
39
|
-
aria-labelledby="${x => x.ariaLabelledby}"
|
|
40
|
-
aria-live="${x => x.ariaLive}"
|
|
41
|
-
aria-owns="${x => x.ariaOwns}"
|
|
42
|
-
aria-relevant="${x => x.ariaRelevant}"
|
|
43
|
-
aria-roledescription="${x => x.ariaRoledescription}"
|
|
44
|
-
${ref(
|
|
16
|
+
download="${(x) => x.download}"
|
|
17
|
+
href="${(x) => x.href}"
|
|
18
|
+
hreflang="${(x) => x.hreflang}"
|
|
19
|
+
ping="${(x) => x.ping}"
|
|
20
|
+
referrerpolicy="${(x) => x.referrerpolicy}"
|
|
21
|
+
rel="${(x) => x.rel}"
|
|
22
|
+
target="${(x) => x.target}"
|
|
23
|
+
type="${(x) => x.type}"
|
|
24
|
+
aria-atomic="${(x) => x.ariaAtomic}"
|
|
25
|
+
aria-busy="${(x) => x.ariaBusy}"
|
|
26
|
+
aria-controls="${(x) => x.ariaControls}"
|
|
27
|
+
aria-current="${(x) => x.ariaCurrent}"
|
|
28
|
+
aria-describedby="${(x) => x.ariaDescribedby}"
|
|
29
|
+
aria-details="${(x) => x.ariaDetails}"
|
|
30
|
+
aria-disabled="${(x) => x.ariaDisabled}"
|
|
31
|
+
aria-errormessage="${(x) => x.ariaErrormessage}"
|
|
32
|
+
aria-expanded="${(x) => x.ariaExpanded}"
|
|
33
|
+
aria-flowto="${(x) => x.ariaFlowto}"
|
|
34
|
+
aria-haspopup="${(x) => x.ariaHaspopup}"
|
|
35
|
+
aria-hidden="${(x) => x.ariaHidden}"
|
|
36
|
+
aria-invalid="${(x) => x.ariaInvalid}"
|
|
37
|
+
aria-keyshortcuts="${(x) => x.ariaKeyshortcuts}"
|
|
38
|
+
aria-label="${(x) => x.ariaLabel}"
|
|
39
|
+
aria-labelledby="${(x) => x.ariaLabelledby}"
|
|
40
|
+
aria-live="${(x) => x.ariaLive}"
|
|
41
|
+
aria-owns="${(x) => x.ariaOwns}"
|
|
42
|
+
aria-relevant="${(x) => x.ariaRelevant}"
|
|
43
|
+
aria-roledescription="${(x) => x.ariaRoledescription}"
|
|
44
|
+
${ref("control")}
|
|
45
45
|
>
|
|
46
46
|
${() => focusTemplate}
|
|
47
|
-
${x => affixIconTemplate(x.icon)}
|
|
48
|
-
${x => x.text}
|
|
49
|
-
${x =>
|
|
50
|
-
var _a, _b;
|
|
51
|
-
return (_b = (_a = x.getBodyTemplate) === null || _a === void 0 ? void 0 : _a.call(x)) !== null && _b !== void 0 ? _b : '';
|
|
52
|
-
}}
|
|
47
|
+
${(x) => affixIconTemplate(x.icon)}
|
|
48
|
+
${(x) => x.text}
|
|
49
|
+
${(x) => x.getBodyTemplate?.() ?? ""}
|
|
53
50
|
</a>
|
|
54
51
|
`;
|
|
55
52
|
};
|
package/shared/text-field.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
const styles = "/**\n * Do not edit directly\n * Generated on Mon, 04 Sep 2023 12:44:18 GMT\n */\n:host {\n display: inline-block;\n}\n\n.base {\n --_text-field-gutter: calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2))) / 2.5);\n --_text-field-icon-size: calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2))) / 2);\n display: inline-grid;\n width: 100%;\n gap: 4px;\n grid-template-columns: min-content 1fr max-content;\n}\n.base {\n --_appearance-color-text: var(--vvd-color-canvas-text);\n --_appearance-color-fill: var(--_connotation-color-backdrop);\n --_appearance-color-outline: var(--_connotation-color-intermediate);\n}\n.base.appearance-ghost {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: transparent;\n}\n.base:where(:hover, .hover):where(:not(:disabled, .disabled, .readonly)) {\n --_appearance-color-text: var(--vvd-color-canvas-text);\n --_appearance-color-fill: var(--_connotation-color-backdrop);\n --_appearance-color-outline: var(--_connotation-color-firm);\n}\n.base:where(:hover, .hover):where(:not(:disabled, .disabled, .readonly)).appearance-ghost {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: var(--_connotation-color-faint);\n --_appearance-color-outline: transparent;\n}\n.base:where(:disabled, .disabled) {\n --_appearance-color-text: var(--vvd-color-neutral-300);\n --_appearance-color-fill: var(--vvd-color-neutral-100);\n --_appearance-color-outline: var(--vvd-color-neutral-300);\n}\n.base:where(:disabled, .disabled).appearance-ghost {\n --_appearance-color-text: var(--vvd-color-neutral-300);\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: transparent;\n}\n.base:where(.readonly):where(:not(:disabled, .disabled)) {\n --_appearance-color-text: var(--vvd-color-canvas-text);\n --_appearance-color-fill: var(--vvd-color-neutral-200);\n --_appearance-color-outline: var(--vvd-color-neutral-400);\n}\n.base:where(.readonly):where(:not(:disabled, .disabled)).appearance-ghost {\n --_appearance-color-text: var(--vvd-color-neutral-600);\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: transparent;\n}\n.base.connotation-success {\n /* @cssprop [--vvd-text-field-success-primary=var(--vvd-color-success-500)] */\n --_connotation-color-primary: var(--vvd-text-field-success-primary, var(--vvd-color-success-500));\n /* @cssprop [--vvd-text-field-success-backdrop=var(--vvd-color-success-50)] */\n --_connotation-color-backdrop: var(--vvd-text-field-success-backdrop, var(--vvd-color-success-50));\n /* @cssprop [--vvd-text-field-success-intermediate=var(--vvd-color-success-500)] */\n --_connotation-color-intermediate: var(--vvd-text-field-success-intermediate, var(--vvd-color-success-500));\n /* @cssprop [--vvd-text-field-success-firm=var(--vvd-color-success-600)] */\n --_connotation-color-firm: var(--vvd-text-field-success-firm, var(--vvd-color-success-600));\n /* @cssprop [--vvd-text-field-success-faint=var(--vvd-color-success-50)] */\n --_connotation-color-faint: var(--vvd-text-field-success-faint, var(--vvd-color-success-50));\n /* @cssprop [--vvd-text-field-success-soft=var(--vvd-color-success-100)] */\n --_connotation-color-soft: var(--vvd-text-field-success-soft, var(--vvd-color-success-100));\n}\n.base.connotation-alert {\n /* @cssprop [--vvd-text-field-alert-primary=var(--vvd-color-alert-500)] */\n --_connotation-color-primary: var(--vvd-text-field-alert-primary, var(--vvd-color-alert-500));\n /* @cssprop [--vvd-text-field-alert-backdrop=var(--vvd-color-alert-50)] */\n --_connotation-color-backdrop: var(--vvd-text-field-alert-backdrop, var(--vvd-color-alert-50));\n /* @cssprop [--vvd-text-field-alert-intermediate=var(--vvd-color-alert-500)] */\n --_connotation-color-intermediate: var(--vvd-text-field-alert-intermediate, var(--vvd-color-alert-500));\n /* @cssprop [--vvd-text-field-alert-firm=var(--vvd-color-alert-600)] */\n --_connotation-color-firm: var(--vvd-text-field-alert-firm, var(--vvd-color-alert-600));\n /* @cssprop [--vvd-text-field-alert-faint=var(--vvd-color-alert-50)] */\n --_connotation-color-faint: var(--vvd-text-field-alert-faint, var(--vvd-color-alert-50));\n /* @cssprop [--vvd-text-field-alert-soft=var(--vvd-color-alert-100)] */\n --_connotation-color-soft: var(--vvd-text-field-alert-soft, var(--vvd-color-alert-100));\n}\n.base:not(.connotation-success, .connotation-alert) {\n /* @cssprop [--vvd-text-field-accent-primary=var(--vvd-color-canvas-text)] */\n --_connotation-color-primary: var(--vvd-text-field-accent-primary, var(--vvd-color-canvas-text));\n /* @cssprop [--vvd-text-field-accent-backdrop=var(--vvd-color-canvas)] */\n --_connotation-color-backdrop: var(--vvd-text-field-accent-backdrop, var(--vvd-color-canvas));\n /* @cssprop [--vvd-text-field-accent-intermediate=var(--vvd-color-neutral-500)] */\n --_connotation-color-intermediate: var(--vvd-text-field-accent-intermediate, var(--vvd-color-neutral-500));\n /* @cssprop [--vvd-text-field-accent-firm=var(--vvd-color-canvas-text)] */\n --_connotation-color-firm: var(--vvd-text-field-accent-firm, var(--vvd-color-canvas-text));\n /* @cssprop [--vvd-text-field-accent-faint=var(--vvd-color-neutral-50)] */\n --_connotation-color-faint: var(--vvd-text-field-accent-faint, var(--vvd-color-neutral-50));\n /* @cssprop [--vvd-text-field-accent-soft=var(--vvd-color-neutral-100)] */\n --_connotation-color-soft: var(--vvd-text-field-accent-soft, var(--vvd-color-neutral-100));\n}\n@supports (user-select: none) {\n .base {\n user-select: none;\n }\n}\n.base:not(.disabled) {\n --_low-ink-color: var(--vvd-color-neutral-600);\n}\n.base.disabled {\n --_low-ink-color: var(--_appearance-color-text);\n}\n\n.label {\n color: var(--vvd-color-canvas-text);\n contain: inline-size;\n font: var(--vvd-typography-base);\n grid-column: 1/4;\n grid-row: 1;\n}\n.char-count + .label {\n grid-column: 1/3;\n}\n\n.char-count {\n color: var(--_low-ink-color);\n font: var(--vvd-typography-base);\n grid-column: 3/4;\n}\n\n.fieldset {\n position: relative;\n display: flex;\n align-items: center;\n background-color: var(--_appearance-color-fill);\n font: var(--vvd-typography-base);\n grid-column: 1/4;\n padding-block: 0;\n transition: color 0.2s, background-color 0.2s;\n /* Shape */\n}\n.fieldset::after {\n position: absolute;\n display: block;\n block-size: 100%;\n border-radius: inherit;\n box-shadow: inset 0 0 0 1px var(--_appearance-color-outline);\n content: \"\";\n inline-size: 100%;\n pointer-events: none;\n transition: box-shadow 0.2s;\n}\n.fieldset:focus-visible {\n outline: none;\n}\n.base > .fieldset {\n block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2)));\n}\n.base:not(.shape-pill) .fieldset {\n border-radius: 6px;\n}\n.base.shape-pill .fieldset {\n border-radius: 24px;\n}\n\n.wrapper {\n block-size: 100%;\n border-radius: inherit;\n inline-size: 100%;\n}\n.wrapper:focus-visible {\n outline: none;\n}\n\n.control {\n width: 100%;\n box-sizing: border-box;\n border: 0 none;\n appearance: none; /* for box-shadow visibility on IOS */\n background-color: transparent;\n block-size: 100%;\n border-radius: inherit;\n color: inherit;\n font: inherit;\n padding-block: 0;\n padding-inline-end: var(--_text-field-gutter);\n padding-inline-start: var(--_text-field-gutter);\n}\n.control:disabled {\n cursor: not-allowed;\n opacity: 1; /* 2. correct opacity on iOS */\n -webkit-text-fill-color: var(--_appearance-color-text); /* 1. sets text fill to current `color` for safari */\n}\n.control::placeholder, .control:disabled::placeholder {\n opacity: 1; /* 2. correct opacity on iOS */\n -webkit-text-fill-color: var(--_low-ink-color); /* 1. sets text fill to current `color` for safari */\n}\n.control:focus-visible {\n outline: none;\n}\n.has-icon .control {\n padding-inline-start: calc(var(--_text-field-icon-size) + var(--_text-field-gutter) * 2);\n}\n\n.icon {\n position: absolute;\n z-index: 1;\n color: var(--_low-ink-color);\n font-size: var(--_text-field-icon-size);\n inset-block-start: 50%;\n inset-inline-start: calc(100% + var(--_text-field-gutter));\n line-height: 1;\n transform: translateY(-50%);\n}\n\n.leading-items-wrapper {\n position: relative;\n}\n.base.no-leading .leading-items-wrapper {\n display: none;\n}\n\n.action-items-wrapper {\n margin-inline-end: 4px;\n}\n.base:not(.action-items) .action-items-wrapper {\n display: none;\n}\n\n.focus-indicator {\n --focus-stroke-gap-color: transparent;\n pointer-events: none;\n}\n.wrapper:not(:focus-visible, :focus-within) > .focus-indicator, .fieldset:not(:focus-visible, :focus-within) > .focus-indicator {\n display: none;\n}";
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { styles as s };
|