@vonage/vivid 3.0.0-next.91 → 3.0.0-next.93
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 +1 -1
- package/accordion-item/index.js +1 -1
- package/action-group/index.js +1 -1
- package/avatar/index.js +1 -1
- package/badge/index.js +1 -1
- package/banner/index.js +1 -1
- package/breadcrumb-item/index.js +1 -1
- package/calendar/index.js +1 -1
- package/calendar-event/index.js +1 -1
- package/card/index.js +1 -1
- package/checkbox/index.js +1 -1
- package/dialog/index.js +1 -1
- package/fab/index.js +1 -1
- package/focus/index.js +1 -1
- package/header/index.js +1 -1
- package/index.js +5 -3
- package/lib/components.d.ts +1 -0
- package/lib/listbox/index.d.ts +4 -0
- package/lib/listbox/listbox.d.ts +9 -0
- package/lib/listbox/listbox.template.d.ts +4 -0
- package/listbox/index.js +1105 -0
- package/listbox-option/index.js +12 -239
- package/menu/index.js +4 -10
- package/menu-item/index.js +1 -1
- package/nav-disclosure/index.js +1 -1
- package/nav-item/index.js +1 -1
- package/note/index.js +1 -1
- package/number-field/index.js +2 -2
- package/package.json +2 -1
- package/popup/index.js +1 -1
- package/progress/index.js +1 -1
- package/progress-ring/index.js +1 -1
- package/radio/index.js +1 -1
- package/radio-group/index.js +2 -2
- package/shared/dom.js +8 -0
- package/shared/form-elements.js +1 -1
- package/shared/index2.js +1 -1
- package/shared/index4.js +1 -1
- package/shared/index5.js +220 -1492
- package/shared/index6.js +1490 -314
- package/shared/index7.js +349 -0
- package/shared/key-codes.js +2 -1
- package/shared/patterns/form-elements/form-elements.d.ts +1 -1
- package/side-drawer/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/text-area/index.js +1 -1
- package/text-field/index.js +1 -1
- package/tooltip/index.js +2 -2
package/shared/index7.js
ADDED
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
import '../icon/index.js';
|
|
2
|
+
import { F as FoundationElement, D as DOM, _ as __decorate, a as attr, o as observable, b as __metadata, h as html, d as designSystem } from './index.js';
|
|
3
|
+
import { b as AffixIcon, a as affixIconTemplateFactory } from './affix.js';
|
|
4
|
+
import { S as StartEnd } from './start-end.js';
|
|
5
|
+
import { D as Direction, g as getDirection } from './direction.js';
|
|
6
|
+
import { a as applyMixins } from './apply-mixins.js';
|
|
7
|
+
import { h as keyArrowLeft, i as keyArrowRight, a as keySpace, k as keyEnter } from './key-codes.js';
|
|
8
|
+
import { f as focusTemplateFactory } from './focus2.js';
|
|
9
|
+
import { w as when } from './when.js';
|
|
10
|
+
import { c as classNames } from './class-names.js';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Menu items roles.
|
|
14
|
+
* @public
|
|
15
|
+
*/
|
|
16
|
+
const MenuItemRole = {
|
|
17
|
+
/**
|
|
18
|
+
* The menu item has a "menuitem" role
|
|
19
|
+
*/
|
|
20
|
+
menuitem: "menuitem",
|
|
21
|
+
/**
|
|
22
|
+
* The menu item has a "menuitemcheckbox" role
|
|
23
|
+
*/
|
|
24
|
+
menuitemcheckbox: "menuitemcheckbox",
|
|
25
|
+
/**
|
|
26
|
+
* The menu item has a "menuitemradio" role
|
|
27
|
+
*/
|
|
28
|
+
menuitemradio: "menuitemradio",
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* @internal
|
|
32
|
+
*/
|
|
33
|
+
const roleForMenuItem = {
|
|
34
|
+
[MenuItemRole.menuitem]: "menuitem",
|
|
35
|
+
[MenuItemRole.menuitemcheckbox]: "menuitemcheckbox",
|
|
36
|
+
[MenuItemRole.menuitemradio]: "menuitemradio",
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* A Switch Custom HTML Element.
|
|
41
|
+
* Implements {@link https://www.w3.org/TR/wai-aria-1.1/#menuitem | ARIA menuitem }, {@link https://www.w3.org/TR/wai-aria-1.1/#menuitemcheckbox | ARIA menuitemcheckbox}, or {@link https://www.w3.org/TR/wai-aria-1.1/#menuitemradio | ARIA menuitemradio }.
|
|
42
|
+
*
|
|
43
|
+
* @slot checked-indicator - The checked indicator
|
|
44
|
+
* @slot radio-indicator - The radio indicator
|
|
45
|
+
* @slot start - Content which can be provided before the menu item content
|
|
46
|
+
* @slot end - Content which can be provided after the menu item content
|
|
47
|
+
* @slot - The default slot for menu item content
|
|
48
|
+
* @slot expand-collapse-indicator - The expand/collapse indicator
|
|
49
|
+
* @slot submenu - Used to nest menu's within menu items
|
|
50
|
+
* @csspart input-container - The element representing the visual checked or radio indicator
|
|
51
|
+
* @csspart checkbox - The element wrapping the `menuitemcheckbox` indicator
|
|
52
|
+
* @csspart radio - The element wrapping the `menuitemradio` indicator
|
|
53
|
+
* @csspart content - The element wrapping the menu item content
|
|
54
|
+
* @csspart expand-collapse-glyph-container - The element wrapping the expand collapse element
|
|
55
|
+
* @csspart expand-collapse - The expand/collapse element
|
|
56
|
+
* @csspart submenu-region - The container for the submenu, used for positioning
|
|
57
|
+
* @fires expanded-change - Fires a custom 'expanded-change' event when the expanded state changes
|
|
58
|
+
* @fires change - Fires a custom 'change' event when a non-submenu item with a role of `menuitemcheckbox`, `menuitemradio`, or `menuitem` is invoked
|
|
59
|
+
*
|
|
60
|
+
* @public
|
|
61
|
+
*/
|
|
62
|
+
class MenuItem$1 extends FoundationElement {
|
|
63
|
+
constructor() {
|
|
64
|
+
super(...arguments);
|
|
65
|
+
/**
|
|
66
|
+
* The role of the element.
|
|
67
|
+
*
|
|
68
|
+
* @public
|
|
69
|
+
* @remarks
|
|
70
|
+
* HTML Attribute: role
|
|
71
|
+
*/
|
|
72
|
+
this.role = MenuItemRole.menuitem;
|
|
73
|
+
/**
|
|
74
|
+
* @internal
|
|
75
|
+
*/
|
|
76
|
+
this.hasSubmenu = false;
|
|
77
|
+
/**
|
|
78
|
+
* Track current direction to pass to the anchored region
|
|
79
|
+
*
|
|
80
|
+
* @internal
|
|
81
|
+
*/
|
|
82
|
+
this.currentDirection = Direction.ltr;
|
|
83
|
+
this.focusSubmenuOnLoad = false;
|
|
84
|
+
/**
|
|
85
|
+
* @internal
|
|
86
|
+
*/
|
|
87
|
+
this.handleMenuItemKeyDown = (e) => {
|
|
88
|
+
if (e.defaultPrevented) {
|
|
89
|
+
return false;
|
|
90
|
+
}
|
|
91
|
+
switch (e.key) {
|
|
92
|
+
case keyEnter:
|
|
93
|
+
case keySpace:
|
|
94
|
+
this.invoke();
|
|
95
|
+
return false;
|
|
96
|
+
case keyArrowRight:
|
|
97
|
+
//open/focus on submenu
|
|
98
|
+
this.expandAndFocus();
|
|
99
|
+
return false;
|
|
100
|
+
case keyArrowLeft:
|
|
101
|
+
//close submenu
|
|
102
|
+
if (this.expanded) {
|
|
103
|
+
this.expanded = false;
|
|
104
|
+
this.focus();
|
|
105
|
+
return false;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return true;
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* @internal
|
|
112
|
+
*/
|
|
113
|
+
this.handleMenuItemClick = (e) => {
|
|
114
|
+
if (e.defaultPrevented || this.disabled) {
|
|
115
|
+
return false;
|
|
116
|
+
}
|
|
117
|
+
this.invoke();
|
|
118
|
+
return false;
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* @internal
|
|
122
|
+
*/
|
|
123
|
+
this.submenuLoaded = () => {
|
|
124
|
+
if (!this.focusSubmenuOnLoad) {
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
this.focusSubmenuOnLoad = false;
|
|
128
|
+
if (this.hasSubmenu) {
|
|
129
|
+
this.submenu.focus();
|
|
130
|
+
this.setAttribute("tabindex", "-1");
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* @internal
|
|
135
|
+
*/
|
|
136
|
+
this.handleMouseOver = (e) => {
|
|
137
|
+
if (this.disabled || !this.hasSubmenu || this.expanded) {
|
|
138
|
+
return false;
|
|
139
|
+
}
|
|
140
|
+
this.expanded = true;
|
|
141
|
+
return false;
|
|
142
|
+
};
|
|
143
|
+
/**
|
|
144
|
+
* @internal
|
|
145
|
+
*/
|
|
146
|
+
this.handleMouseOut = (e) => {
|
|
147
|
+
if (!this.expanded || this.contains(document.activeElement)) {
|
|
148
|
+
return false;
|
|
149
|
+
}
|
|
150
|
+
this.expanded = false;
|
|
151
|
+
return false;
|
|
152
|
+
};
|
|
153
|
+
/**
|
|
154
|
+
* @internal
|
|
155
|
+
*/
|
|
156
|
+
this.expandAndFocus = () => {
|
|
157
|
+
if (!this.hasSubmenu) {
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
this.focusSubmenuOnLoad = true;
|
|
161
|
+
this.expanded = true;
|
|
162
|
+
};
|
|
163
|
+
/**
|
|
164
|
+
* @internal
|
|
165
|
+
*/
|
|
166
|
+
this.invoke = () => {
|
|
167
|
+
if (this.disabled) {
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
switch (this.role) {
|
|
171
|
+
case MenuItemRole.menuitemcheckbox:
|
|
172
|
+
this.checked = !this.checked;
|
|
173
|
+
break;
|
|
174
|
+
case MenuItemRole.menuitem:
|
|
175
|
+
// update submenu
|
|
176
|
+
this.updateSubmenu();
|
|
177
|
+
if (this.hasSubmenu) {
|
|
178
|
+
this.expandAndFocus();
|
|
179
|
+
}
|
|
180
|
+
else {
|
|
181
|
+
this.$emit("change");
|
|
182
|
+
}
|
|
183
|
+
break;
|
|
184
|
+
case MenuItemRole.menuitemradio:
|
|
185
|
+
if (!this.checked) {
|
|
186
|
+
this.checked = true;
|
|
187
|
+
}
|
|
188
|
+
break;
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
/**
|
|
192
|
+
* Gets the submenu element if any
|
|
193
|
+
*
|
|
194
|
+
* @internal
|
|
195
|
+
*/
|
|
196
|
+
this.updateSubmenu = () => {
|
|
197
|
+
this.submenu = this.domChildren().find((element) => {
|
|
198
|
+
return element.getAttribute("role") === "menu";
|
|
199
|
+
});
|
|
200
|
+
this.hasSubmenu = this.submenu === undefined ? false : true;
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
expandedChanged(oldValue) {
|
|
204
|
+
if (this.$fastController.isConnected) {
|
|
205
|
+
if (this.submenu === undefined) {
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
if (this.expanded === false) {
|
|
209
|
+
this.submenu.collapseExpandedItem();
|
|
210
|
+
}
|
|
211
|
+
else {
|
|
212
|
+
this.currentDirection = getDirection(this);
|
|
213
|
+
}
|
|
214
|
+
this.$emit("expanded-change", this, { bubbles: false });
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
checkedChanged(oldValue, newValue) {
|
|
218
|
+
if (this.$fastController.isConnected) {
|
|
219
|
+
this.$emit("change");
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* @internal
|
|
224
|
+
*/
|
|
225
|
+
connectedCallback() {
|
|
226
|
+
super.connectedCallback();
|
|
227
|
+
DOM.queueUpdate(() => {
|
|
228
|
+
this.updateSubmenu();
|
|
229
|
+
});
|
|
230
|
+
if (!this.startColumnCount) {
|
|
231
|
+
this.startColumnCount = 1;
|
|
232
|
+
}
|
|
233
|
+
this.observer = new MutationObserver(this.updateSubmenu);
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* @internal
|
|
237
|
+
*/
|
|
238
|
+
disconnectedCallback() {
|
|
239
|
+
super.disconnectedCallback();
|
|
240
|
+
this.submenu = undefined;
|
|
241
|
+
if (this.observer !== undefined) {
|
|
242
|
+
this.observer.disconnect();
|
|
243
|
+
this.observer = undefined;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* get an array of valid DOM children
|
|
248
|
+
*/
|
|
249
|
+
domChildren() {
|
|
250
|
+
return Array.from(this.children).filter(child => !child.hasAttribute("hidden"));
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
__decorate([
|
|
254
|
+
attr({ mode: "boolean" })
|
|
255
|
+
], MenuItem$1.prototype, "disabled", void 0);
|
|
256
|
+
__decorate([
|
|
257
|
+
attr({ mode: "boolean" })
|
|
258
|
+
], MenuItem$1.prototype, "expanded", void 0);
|
|
259
|
+
__decorate([
|
|
260
|
+
observable
|
|
261
|
+
], MenuItem$1.prototype, "startColumnCount", void 0);
|
|
262
|
+
__decorate([
|
|
263
|
+
attr
|
|
264
|
+
], MenuItem$1.prototype, "role", void 0);
|
|
265
|
+
__decorate([
|
|
266
|
+
attr({ mode: "boolean" })
|
|
267
|
+
], MenuItem$1.prototype, "checked", void 0);
|
|
268
|
+
__decorate([
|
|
269
|
+
observable
|
|
270
|
+
], MenuItem$1.prototype, "submenuRegion", void 0);
|
|
271
|
+
__decorate([
|
|
272
|
+
observable
|
|
273
|
+
], MenuItem$1.prototype, "hasSubmenu", void 0);
|
|
274
|
+
__decorate([
|
|
275
|
+
observable
|
|
276
|
+
], MenuItem$1.prototype, "currentDirection", void 0);
|
|
277
|
+
__decorate([
|
|
278
|
+
observable
|
|
279
|
+
], MenuItem$1.prototype, "submenu", void 0);
|
|
280
|
+
applyMixins(MenuItem$1, StartEnd);
|
|
281
|
+
|
|
282
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Mon, 07 Nov 2022 11:12:43 GMT\n */\n@supports selector(:focus-visible) {\n :host(:focus) {\n outline: none;\n }\n}\n.base {\n position: relative;\n display: flex;\n box-sizing: border-box;\n align-items: center;\n background-color: var(--_appearance-color-fill);\n block-size: calc(1px * (40 + 8 * clamp(-1, var(--vvd-size-density, 0), 1)));\n box-shadow: inset 0 0 0 1px var(--_appearance-color-outline);\n color: var(--_appearance-color-text);\n font: var(--vvd-typography-base);\n gap: 8px;\n inline-size: 100%;\n padding-inline: 8px;\n}\n.base {\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)) {\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-400);\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: transparent;\n}\n.base:where(:active, .active):where(:not(:disabled, .disabled)) {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: var(--_connotation-color-soft);\n --_appearance-color-outline: transparent;\n}\n.base:where(.selected, [aria-current]):where(:not(:disabled, .disabled, :hover, .hover)) {\n --_appearance-color-text: var(--_connotation-color-primary-text);\n --_appearance-color-fill: var(--_connotation-color-primary);\n --_appearance-color-outline: transparent;\n}\n.base:where(.selected, [aria-current]):where(:hover, .hover) {\n --_appearance-color-text: var(--_connotation-color-primary-text);\n --_appearance-color-fill: var(--_connotation-color-primary-increment);\n --_appearance-color-outline: transparent;\n}\n.base {\n --_connotation-color-primary: var(--vvd-color-canvas-text);\n --_connotation-color-primary-text: var(--vvd-color-canvas);\n --_connotation-color-primary-increment: var(--vvd-color-neutral-800);\n --_connotation-color-faint: var(--vvd-color-neutral-50);\n --_connotation-color-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 cursor: pointer;\n}\n.base.disabled {\n cursor: not-allowed;\n}\n\n.focus-indicator {\n border-radius: 6px;\n}\n:host(:not(:focus-visible)) .focus-indicator {\n display: none;\n}\n\n.icon {\n font-size: 20px;\n}\n.base:not(.item-checkbox, .item-radio) .icon {\n color: var(--vvd-color-neutral-600);\n}\n\n.text {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}";
|
|
283
|
+
|
|
284
|
+
class MenuItem extends MenuItem$1 {}
|
|
285
|
+
__decorate([attr, __metadata("design:type", String)], MenuItem.prototype, "text", void 0);
|
|
286
|
+
applyMixins(MenuItem, AffixIcon);
|
|
287
|
+
|
|
288
|
+
let _ = t => t,
|
|
289
|
+
_t,
|
|
290
|
+
_t2,
|
|
291
|
+
_t3,
|
|
292
|
+
_t4,
|
|
293
|
+
_t5;
|
|
294
|
+
const getClasses = ({
|
|
295
|
+
disabled,
|
|
296
|
+
checked,
|
|
297
|
+
expanded,
|
|
298
|
+
role
|
|
299
|
+
}) => classNames('base', ['disabled', Boolean(disabled)], ['selected', role !== MenuItemRole.menuitem && Boolean(checked)], ['expanded', Boolean(expanded)], ['item-checkbox', role === MenuItemRole.menuitemcheckbox], ['item-radio', role === MenuItemRole.menuitemradio]);
|
|
300
|
+
const MenuItemTemplate = (context, definition) => {
|
|
301
|
+
const affixIconTemplate = affixIconTemplateFactory(context);
|
|
302
|
+
const focusTemplate = focusTemplateFactory(context);
|
|
303
|
+
return html(_t || (_t = _`
|
|
304
|
+
<template
|
|
305
|
+
aria-checked="${0}"
|
|
306
|
+
aria-disabled="${0}"
|
|
307
|
+
aria-expanded="${0}"
|
|
308
|
+
@keydown="${0}"
|
|
309
|
+
@click="${0}"
|
|
310
|
+
@mouseover="${0}"
|
|
311
|
+
@mouseout="${0}"
|
|
312
|
+
>
|
|
313
|
+
<div class="${0}">
|
|
314
|
+
|
|
315
|
+
${0}
|
|
316
|
+
${0}
|
|
317
|
+
|
|
318
|
+
${0}
|
|
319
|
+
|
|
320
|
+
${0}
|
|
321
|
+
|
|
322
|
+
${0}
|
|
323
|
+
|
|
324
|
+
<span class="text">
|
|
325
|
+
${0}
|
|
326
|
+
</span>
|
|
327
|
+
</div>
|
|
328
|
+
</template>
|
|
329
|
+
`), x => x.role !== MenuItemRole.menuitem ? x.checked : void 0, x => x.disabled, x => x.expanded, (x, c) => x.handleMenuItemKeyDown(c.event), (x, c) => x.handleMenuItemClick(c.event), (x, c) => x.handleMouseOver(c.event), (x, c) => x.handleMouseOut(c.event), getClasses, when(x => x.hasSubmenu, html(_t2 || (_t2 = _`
|
|
330
|
+
<div
|
|
331
|
+
class="expand-collapse-glyph-container"
|
|
332
|
+
>
|
|
333
|
+
<span class="expand-collapse">
|
|
334
|
+
<slot name="expand-collapse-indicator">
|
|
335
|
+
${0}
|
|
336
|
+
</slot>
|
|
337
|
+
</span>
|
|
338
|
+
</div>
|
|
339
|
+
`), definition.expandCollapseGlyph || '')), () => focusTemplate, when(x => x.role === MenuItemRole.menuitemcheckbox, html(_t3 || (_t3 = _`${0}`), x => affixIconTemplate(x.checked ? 'checkbox-checked-line' : 'checkbox-unchecked-line'))), when(x => x.role === MenuItemRole.menuitemradio, html(_t4 || (_t4 = _`${0}`), x => affixIconTemplate(x.checked ? 'radio-checked-line' : 'radio-unchecked-line'))), when(x => x.role === MenuItemRole.menuitem && x.icon, html(_t5 || (_t5 = _`${0}`), x => affixIconTemplate(x.icon))), x => x.text);
|
|
340
|
+
};
|
|
341
|
+
|
|
342
|
+
const vividMenuItem = MenuItem.compose({
|
|
343
|
+
baseName: 'menu-item',
|
|
344
|
+
template: MenuItemTemplate,
|
|
345
|
+
styles: css_248z
|
|
346
|
+
});
|
|
347
|
+
designSystem.register(vividMenuItem());
|
|
348
|
+
|
|
349
|
+
export { MenuItem$1 as M, MenuItemRole as a, roleForMenuItem as r, vividMenuItem as v };
|
package/shared/key-codes.js
CHANGED
|
@@ -86,6 +86,7 @@ const keyEscape = "Escape";
|
|
|
86
86
|
const keyHome = "Home";
|
|
87
87
|
const keyEnd = "End";
|
|
88
88
|
const keySpace = " ";
|
|
89
|
+
const keyTab = "Tab";
|
|
89
90
|
const ArrowKeys = {
|
|
90
91
|
ArrowDown: keyArrowDown,
|
|
91
92
|
ArrowLeft: keyArrowLeft,
|
|
@@ -93,4 +94,4 @@ const ArrowKeys = {
|
|
|
93
94
|
ArrowUp: keyArrowUp,
|
|
94
95
|
};
|
|
95
96
|
|
|
96
|
-
export { ArrowKeys as A, keySpace as a,
|
|
97
|
+
export { ArrowKeys as A, keySpace as a, keyEscape as b, keyTab as c, keyEnd as d, keyArrowUp as e, keyArrowDown as f, keyHome as g, keyArrowLeft as h, keyArrowRight as i, keyEnter as k };
|
|
@@ -18,7 +18,7 @@ export declare function formElements<T extends {
|
|
|
18
18
|
successText?: string | undefined;
|
|
19
19
|
charCount: boolean;
|
|
20
20
|
userValid: boolean;
|
|
21
|
-
"__#
|
|
21
|
+
"__#6755@#blurred": boolean;
|
|
22
22
|
readonly errorValidationMessage: any;
|
|
23
23
|
validate: () => void;
|
|
24
24
|
};
|
package/side-drawer/index.js
CHANGED
|
@@ -44,7 +44,7 @@ __decorate([attr({
|
|
|
44
44
|
mode: 'boolean'
|
|
45
45
|
}), __metadata("design:type", Object)], SideDrawer.prototype, "trailing", void 0);
|
|
46
46
|
|
|
47
|
-
var css_248z = "/**\n * Do not edit directly\n * Generated on
|
|
47
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Mon, 07 Nov 2022 11:12:43 GMT\n */\n.control {\n position: fixed;\n z-index: 1;\n background-color: var(--vvd-color-canvas);\n color: var(--vvd-color-canvas-text);\n inline-size: 280px;\n inset-block: 0;\n overflow-y: auto;\n}\n.control[part~=vvd-theme-alternate] {\n background-color: var(--vvd-color-canvas);\n color: var(--vvd-color-canvas-text);\n color-scheme: var(--vvd-color-scheme);\n}\n.control.trailing {\n inset-inline-end: 0;\n}\n.control:not(.open).trailing {\n transform: translateX(100%);\n}\n.control:not(.open):not(.trailing) {\n transform: translateX(-100%);\n}\n.control.open:not(.modal).trailing + .side-drawer-app-content {\n margin-inline-end: var(--side-drawer-app-content-offset, 280px);\n}\n.control.open:not(.modal):not(.trailing) + .side-drawer-app-content {\n margin-inline-start: var(--side-drawer-app-content-offset, 280px);\n}\n@media (prefers-reduced-motion: no-preference) {\n .control {\n transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n }\n}\n\n.scrim {\n background-color: var(--vvd-color-canvas-text);\n opacity: 0.5;\n position: fixed;\n inset: 0;\n}\n.scrim:not(.open) {\n display: none;\n}";
|
|
48
48
|
|
|
49
49
|
let _ = t => t,
|
|
50
50
|
_t,
|
package/styles/core/all.css
CHANGED
package/styles/core/theme.css
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on
|
|
3
|
+
* Generated on Mon, 07 Nov 2022 11:12:43 GMT
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* Do not edit directly
|
|
7
|
-
* Generated on
|
|
7
|
+
* Generated on Mon, 07 Nov 2022 11:12:43 GMT
|
|
8
8
|
*/
|
|
9
9
|
/**
|
|
10
10
|
* Do not edit directly
|
|
11
|
-
* Generated on
|
|
11
|
+
* Generated on Mon, 07 Nov 2022 11:12:43 GMT
|
|
12
12
|
*/
|
|
13
13
|
/**
|
|
14
14
|
* Do not edit directly
|
|
15
|
-
* Generated on
|
|
15
|
+
* Generated on Mon, 07 Nov 2022 11:12:43 GMT
|
|
16
16
|
*/
|
|
17
17
|
@property --vvd-size-density {
|
|
18
18
|
syntax: "<integer>";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on
|
|
3
|
+
* Generated on Mon, 07 Nov 2022 11:12:43 GMT
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* Do not edit directly
|
|
7
|
-
* Generated on
|
|
7
|
+
* Generated on Mon, 07 Nov 2022 11:12:43 GMT
|
|
8
8
|
*/
|
|
9
9
|
/**
|
|
10
10
|
* Do not edit directly
|
|
11
|
-
* Generated on
|
|
11
|
+
* Generated on Mon, 07 Nov 2022 11:12:43 GMT
|
|
12
12
|
*/
|
|
13
13
|
/**
|
|
14
14
|
* Do not edit directly
|
|
15
|
-
* Generated on
|
|
15
|
+
* Generated on Mon, 07 Nov 2022 11:12:43 GMT
|
|
16
16
|
*/
|
|
17
17
|
@property --vvd-size-density {
|
|
18
18
|
syntax: "<integer>";
|
package/text-area/index.js
CHANGED
|
@@ -198,7 +198,7 @@ __decorate([
|
|
|
198
198
|
], TextArea$1.prototype, "defaultSlottedNodes", void 0);
|
|
199
199
|
applyMixins(TextArea$1, DelegatesARIATextbox);
|
|
200
200
|
|
|
201
|
-
var css_248z = "/**\n * Do not edit directly\n * Generated on
|
|
201
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Mon, 07 Nov 2022 11:12:43 GMT\n */\n:host {\n display: inline-block;\n}\n\n.base {\n display: inline-grid;\n width: 100%;\n gap: 4px;\n grid-template-columns: 1fr max-content;\n}\n.base {\n --_appearance-color-text: var(--vvd-color-canvas-text);\n --_appearance-color-fill: var(--vvd-color-canvas);\n --_appearance-color-outline: var(--vvd-color-neutral-400);\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)) {\n --_appearance-color-text: var(--vvd-color-canvas-text);\n --_appearance-color-fill: var(--vvd-color-canvas);\n --_appearance-color-outline: var(--vvd-color-canvas-text);\n}\n.base:where(:hover, .hover):where(:not(:disabled, .disabled)).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-400);\n --_appearance-color-fill: var(--vvd-color-neutral-100);\n --_appearance-color-outline: var(--vvd-color-neutral-400);\n}\n.base:where(:disabled, .disabled).appearance-ghost {\n --_appearance-color-text: var(--vvd-color-neutral-400);\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: transparent;\n}\n.base:where(:readonly, .readonly):where(:not(:disabled, .disabled, :hover, .hover, :active, .active)) {\n --_appearance-color-text: var(--vvd-color-canvas-text);\n --_appearance-color-fill: var(--vvd-color-neutral-100);\n --_appearance-color-outline: var(--vvd-color-neutral-400);\n}\n.base:where(:readonly, .readonly):where(:not(:disabled, .disabled, :hover, .hover, :active, .active)).appearance-ghost {\n --_appearance-color-text: var(--vvd-color-neutral-400);\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: transparent;\n}\n.base:where(.error):where(:not(:disabled, .disabled)) {\n --_appearance-color-text: var(--vvd-color-alert-500);\n --_appearance-color-fill: var(--vvd-color-alert-100);\n --_appearance-color-outline: var(--vvd-color-alert-500);\n}\n.base:where(.error):where(:not(:disabled, .disabled)).appearance-ghost {\n --_appearance-color-text: transparent;\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: transparent;\n}\n.base:where(.success):where(:not(:disabled, .disabled)) {\n --_appearance-color-text: var(--vvd-color-canvas-text);\n --_appearance-color-fill: var(--vvd-color-success-100);\n --_appearance-color-outline: var(--vvd-color-success-500);\n}\n.base:where(.success):where(:not(:disabled, .disabled)).appearance-ghost {\n --_appearance-color-text: transparent;\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: transparent;\n}\n.base {\n --_connotation-color-primary: var(--vvd-color-canvas-text);\n --_connotation-color-underpin: var(--vvd-color-neutral-400);\n --_connotation-color-faint: var(--vvd-color-neutral-50);\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(--vvd-color-neutral-400);\n pointer-events: none;\n}\n\n.label {\n contain: inline-size;\n font: var(--vvd-typography-base);\n grid-column: 1/3;\n grid-row: 1;\n line-height: 20px;\n}\n.base:not(.disabled) .label {\n color: var(--vvd-color-canvas-text);\n}\n.base.disabled .label {\n color: var(--vvd-color-neutral-400);\n}\n\n.fieldset {\n position: relative;\n display: flex;\n align-items: center;\n border-radius: 6px;\n grid-column: 1/3;\n}\n.success .fieldset {\n --focus-stroke-color: var(--vvd-color-success-500);\n}\n.error .fieldset {\n --focus-stroke-color: var(--vvd-color-alert-500);\n}\n\n.control {\n width: 100%;\n padding: 8px 16px;\n border: 0 none;\n background-color: var(--_appearance-color-fill);\n border-radius: inherit;\n box-shadow: inset 0 0 0 1px var(--_appearance-color-outline);\n color: var(--_appearance-color-text);\n font: var(--vvd-typography-base);\n min-block-size: calc(1px * (40 + 8 * clamp(-1, var(--vvd-size-density, 0), 1)));\n transition: box-shadow 0.2s, background-color 0.2s, color 0.2s;\n}\n@supports selector(:focus-visible) {\n .control:focus {\n outline: none;\n }\n}\n.control::placeholder {\n color: var(--_low-ink-color);\n}\n\n.focus-indicator {\n --focus-stroke-gap-color: transparent;\n pointer-events: none;\n}\n.fieldset:not(:focus-visible, :focus-within) > .focus-indicator {\n display: none;\n}";
|
|
202
202
|
|
|
203
203
|
let TextArea = class TextArea extends TextArea$1 {};
|
|
204
204
|
__decorate([attr, __metadata("design:type", String)], TextArea.prototype, "wrap", void 0);
|
package/text-field/index.js
CHANGED
|
@@ -28,7 +28,7 @@ __decorate([attr, __metadata("design:type", String)], TextField.prototype, "auto
|
|
|
28
28
|
TextField = __decorate([formElements], TextField);
|
|
29
29
|
applyMixins(TextField, AffixIcon);
|
|
30
30
|
|
|
31
|
-
var css_248z = "/**\n * Do not edit directly\n * Generated on
|
|
31
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Mon, 07 Nov 2022 11:12:43 GMT\n */\n:host {\n display: inline-block;\n}\n\n.base {\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(--vvd-color-canvas);\n --_appearance-color-outline: var(--vvd-color-neutral-400);\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)) {\n --_appearance-color-text: var(--vvd-color-canvas-text);\n --_appearance-color-fill: var(--vvd-color-canvas);\n --_appearance-color-outline: var(--vvd-color-canvas-text);\n}\n.base:where(:hover, .hover):where(:not(:disabled, .disabled)).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-400);\n --_appearance-color-fill: var(--vvd-color-neutral-100);\n --_appearance-color-outline: var(--vvd-color-neutral-400);\n}\n.base:where(:disabled, .disabled).appearance-ghost {\n --_appearance-color-text: var(--vvd-color-neutral-400);\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: transparent;\n}\n.base:where(:readonly, .readonly):where(:not(:disabled, .disabled, :hover, .hover, :active, .active)) {\n --_appearance-color-text: var(--vvd-color-canvas-text);\n --_appearance-color-fill: var(--vvd-color-neutral-100);\n --_appearance-color-outline: var(--vvd-color-neutral-400);\n}\n.base:where(:readonly, .readonly):where(:not(:disabled, .disabled, :hover, .hover, :active, .active)).appearance-ghost {\n --_appearance-color-text: var(--vvd-color-neutral-400);\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: transparent;\n}\n.base:where(.error):where(:not(:disabled, .disabled)) {\n --_appearance-color-text: var(--vvd-color-alert-500);\n --_appearance-color-fill: var(--vvd-color-alert-100);\n --_appearance-color-outline: var(--vvd-color-alert-500);\n}\n.base:where(.error):where(:not(:disabled, .disabled)).appearance-ghost {\n --_appearance-color-text: transparent;\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: transparent;\n}\n.base:where(.success):where(:not(:disabled, .disabled)) {\n --_appearance-color-text: var(--vvd-color-canvas-text);\n --_appearance-color-fill: var(--vvd-color-success-100);\n --_appearance-color-outline: var(--vvd-color-success-500);\n}\n.base:where(.success):where(:not(:disabled, .disabled)).appearance-ghost {\n --_appearance-color-text: transparent;\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: transparent;\n}\n.base {\n --_connotation-color-primary: var(--vvd-color-canvas-text);\n --_connotation-color-underpin: var(--vvd-color-neutral-400);\n --_connotation-color-faint: var(--vvd-color-neutral-50);\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(--vvd-color-neutral-400);\n}\n\n.label {\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.base:not(.disabled) .label {\n color: var(--vvd-color-canvas-text);\n}\n.base.disabled .label {\n color: var(--vvd-color-neutral-400);\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 color: var(--_appearance-color-text);\n grid-column: 1/4;\n transition: color 0.2s;\n /* Shape */\n}\n.success .fieldset {\n --focus-stroke-color: var(--vvd-color-success-500);\n}\n.error .fieldset {\n --focus-stroke-color: var(--vvd-color-alert-500);\n}\n.base > .fieldset {\n block-size: calc(1px * (40 + 8 * clamp(-1, var(--vvd-size-density, 0), 1)));\n}\n.base:not(.shape-pill) .fieldset {\n border-radius: 6px;\n}\n.base.shape-pill .fieldset {\n border-radius: 24px;\n}\n\n.control {\n width: 100%;\n border: 0 none;\n background-color: var(--_appearance-color-fill);\n block-size: 100%;\n border-radius: inherit;\n box-shadow: inset 0 0 0 1px var(--_appearance-color-outline);\n color: inherit;\n font: var(--vvd-typography-base);\n padding-inline-end: 16px;\n padding-inline-start: 16px;\n transition: box-shadow 0.2s, background-color 0.2s;\n}\n@supports selector(:focus-visible) {\n .control:focus {\n outline: none;\n }\n}\n.control::placeholder {\n color: var(--_low-ink-color);\n}\n\n.icon {\n position: absolute;\n z-index: 1;\n color: var(--_low-ink-color);\n font-size: 20px;\n inset-inline-start: 16px;\n}\n.icon + .control {\n padding-inline-start: 44px;\n}\n\n.focus-indicator {\n --focus-stroke-gap-color: transparent;\n pointer-events: none;\n}\n.fieldset:not(:focus-visible, :focus-within) > .focus-indicator {\n display: none;\n}";
|
|
32
32
|
|
|
33
33
|
let _ = t => t,
|
|
34
34
|
_t,
|
package/tooltip/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '../shared/
|
|
1
|
+
import '../shared/index6.js';
|
|
2
2
|
import { F as FoundationElement, _ as __decorate, a as attr, b as __metadata, h as html, d as designSystem } from '../shared/index.js';
|
|
3
3
|
import '../shared/web.dom-collections.iterator.js';
|
|
4
4
|
import { c as classNames } from '../shared/class-names.js';
|
|
@@ -25,7 +25,7 @@ import '../shared/focus2.js';
|
|
|
25
25
|
import '../shared/es.object.assign.js';
|
|
26
26
|
import '../shared/object-keys.js';
|
|
27
27
|
|
|
28
|
-
var css_248z = "/**\n * Do not edit directly\n * Generated on
|
|
28
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Mon, 07 Nov 2022 11:12:43 GMT\n */\n.control {\n pointer-events: none;\n}\n\n.tooltip {\n width: var(--tooltip-inline-size, 240px);\n}\n.tooltip-text {\n padding: 8px 12px;\n color: var(--vvd-color-canvas-text);\n font: var(--vvd-typography-base-bold);\n}";
|
|
29
29
|
|
|
30
30
|
class Tooltip extends FoundationElement {
|
|
31
31
|
constructor() {
|