@vonage/vivid 3.0.0-next.71 → 3.0.0-next.73
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 +5 -3
- package/banner/index.js +2 -2
- package/breadcrumb-item/index.js +1 -1
- package/button/index.js +9 -116
- package/calendar/index.js +1 -1
- package/calendar-event/index.js +1 -1
- package/card/index.js +2 -2
- package/checkbox/index.js +1 -1
- package/dialog/index.js +2 -2
- package/divider/index.js +3 -86
- package/elevation/index.js +1 -1
- package/fab/index.js +1 -1
- package/focus/index.js +1 -1
- package/header/index.js +2 -2
- package/index.js +6 -5
- package/lib/number-field/index.d.ts +4 -0
- package/lib/number-field/number-field.d.ts +16 -0
- package/lib/number-field/number-field.template.d.ts +4 -0
- package/menu/index.js +6 -5
- 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 +522 -0
- package/package.json +3 -2
- package/popup/index.js +3 -2
- package/progress/index.js +1 -1
- package/progress-ring/index.js +1 -1
- package/shared/enums.js +1 -1
- package/shared/index2.js +105 -22
- package/shared/index3.js +21 -2103
- package/shared/index4.js +41 -326
- package/shared/index5.js +2100 -0
- package/shared/index6.js +371 -0
- package/shared/patterns/form-elements.d.ts +1 -1
- package/shared/regexp-flags.js +21 -0
- 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 +3 -3
- package/styles/tokens/theme-light.css +3 -3
- package/text-area/index.js +1 -1
- package/text-field/index.js +1 -1
- package/tooltip/index.js +5 -4
package/shared/index6.js
ADDED
|
@@ -0,0 +1,371 @@
|
|
|
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 { a as applyMixins } from './apply-mixins.js';
|
|
6
|
+
import { g as keyArrowLeft, h as keyArrowRight, a as keySpace, k as keyEnter } from './key-codes.js';
|
|
7
|
+
import { f as focusTemplateFactory } from './focus2.js';
|
|
8
|
+
import { w as when } from './when.js';
|
|
9
|
+
import { c as classNames } from './class-names.js';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Expose ltr and rtl strings
|
|
13
|
+
*/
|
|
14
|
+
var Direction;
|
|
15
|
+
(function (Direction) {
|
|
16
|
+
Direction["ltr"] = "ltr";
|
|
17
|
+
Direction["rtl"] = "rtl";
|
|
18
|
+
})(Direction || (Direction = {}));
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* a method to determine the current localization direction of the view
|
|
22
|
+
* @param rootNode - the HTMLElement to begin the query from, usually "this" when used in a component controller
|
|
23
|
+
* @public
|
|
24
|
+
*/
|
|
25
|
+
const getDirection = (rootNode) => {
|
|
26
|
+
const dirNode = rootNode.closest("[dir]");
|
|
27
|
+
return dirNode !== null && dirNode.dir === "rtl" ? Direction.rtl : Direction.ltr;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Menu items roles.
|
|
32
|
+
* @public
|
|
33
|
+
*/
|
|
34
|
+
const MenuItemRole = {
|
|
35
|
+
/**
|
|
36
|
+
* The menu item has a "menuitem" role
|
|
37
|
+
*/
|
|
38
|
+
menuitem: "menuitem",
|
|
39
|
+
/**
|
|
40
|
+
* The menu item has a "menuitemcheckbox" role
|
|
41
|
+
*/
|
|
42
|
+
menuitemcheckbox: "menuitemcheckbox",
|
|
43
|
+
/**
|
|
44
|
+
* The menu item has a "menuitemradio" role
|
|
45
|
+
*/
|
|
46
|
+
menuitemradio: "menuitemradio",
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* @internal
|
|
50
|
+
*/
|
|
51
|
+
const roleForMenuItem = {
|
|
52
|
+
[MenuItemRole.menuitem]: "menuitem",
|
|
53
|
+
[MenuItemRole.menuitemcheckbox]: "menuitemcheckbox",
|
|
54
|
+
[MenuItemRole.menuitemradio]: "menuitemradio",
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* A Switch Custom HTML Element.
|
|
59
|
+
* 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 }.
|
|
60
|
+
*
|
|
61
|
+
* @slot checked-indicator - The checked indicator
|
|
62
|
+
* @slot radio-indicator - The radio indicator
|
|
63
|
+
* @slot start - Content which can be provided before the menu item content
|
|
64
|
+
* @slot end - Content which can be provided after the menu item content
|
|
65
|
+
* @slot - The default slot for menu item content
|
|
66
|
+
* @slot expand-collapse-indicator - The expand/collapse indicator
|
|
67
|
+
* @slot submenu - Used to nest menu's within menu items
|
|
68
|
+
* @csspart input-container - The element representing the visual checked or radio indicator
|
|
69
|
+
* @csspart checkbox - The element wrapping the `menuitemcheckbox` indicator
|
|
70
|
+
* @csspart radio - The element wrapping the `menuitemradio` indicator
|
|
71
|
+
* @csspart content - The element wrapping the menu item content
|
|
72
|
+
* @csspart expand-collapse-glyph-container - The element wrapping the expand collapse element
|
|
73
|
+
* @csspart expand-collapse - The expand/collapse element
|
|
74
|
+
* @csspart submenu-region - The container for the submenu, used for positioning
|
|
75
|
+
* @fires expanded-change - Fires a custom 'expanded-change' event when the expanded state changes
|
|
76
|
+
* @fires change - Fires a custom 'change' event when a non-submenu item with a role of `menuitemcheckbox`, `menuitemradio`, or `menuitem` is invoked
|
|
77
|
+
*
|
|
78
|
+
* @public
|
|
79
|
+
*/
|
|
80
|
+
class MenuItem$1 extends FoundationElement {
|
|
81
|
+
constructor() {
|
|
82
|
+
super(...arguments);
|
|
83
|
+
/**
|
|
84
|
+
* The role of the element.
|
|
85
|
+
*
|
|
86
|
+
* @public
|
|
87
|
+
* @remarks
|
|
88
|
+
* HTML Attribute: role
|
|
89
|
+
*/
|
|
90
|
+
this.role = MenuItemRole.menuitem;
|
|
91
|
+
/**
|
|
92
|
+
* @internal
|
|
93
|
+
*/
|
|
94
|
+
this.hasSubmenu = false;
|
|
95
|
+
/**
|
|
96
|
+
* Track current direction to pass to the anchored region
|
|
97
|
+
*
|
|
98
|
+
* @internal
|
|
99
|
+
*/
|
|
100
|
+
this.currentDirection = Direction.ltr;
|
|
101
|
+
this.focusSubmenuOnLoad = false;
|
|
102
|
+
/**
|
|
103
|
+
* @internal
|
|
104
|
+
*/
|
|
105
|
+
this.handleMenuItemKeyDown = (e) => {
|
|
106
|
+
if (e.defaultPrevented) {
|
|
107
|
+
return false;
|
|
108
|
+
}
|
|
109
|
+
switch (e.key) {
|
|
110
|
+
case keyEnter:
|
|
111
|
+
case keySpace:
|
|
112
|
+
this.invoke();
|
|
113
|
+
return false;
|
|
114
|
+
case keyArrowRight:
|
|
115
|
+
//open/focus on submenu
|
|
116
|
+
this.expandAndFocus();
|
|
117
|
+
return false;
|
|
118
|
+
case keyArrowLeft:
|
|
119
|
+
//close submenu
|
|
120
|
+
if (this.expanded) {
|
|
121
|
+
this.expanded = false;
|
|
122
|
+
this.focus();
|
|
123
|
+
return false;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return true;
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* @internal
|
|
130
|
+
*/
|
|
131
|
+
this.handleMenuItemClick = (e) => {
|
|
132
|
+
if (e.defaultPrevented || this.disabled) {
|
|
133
|
+
return false;
|
|
134
|
+
}
|
|
135
|
+
this.invoke();
|
|
136
|
+
return false;
|
|
137
|
+
};
|
|
138
|
+
/**
|
|
139
|
+
* @internal
|
|
140
|
+
*/
|
|
141
|
+
this.submenuLoaded = () => {
|
|
142
|
+
if (!this.focusSubmenuOnLoad) {
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
this.focusSubmenuOnLoad = false;
|
|
146
|
+
if (this.hasSubmenu) {
|
|
147
|
+
this.submenu.focus();
|
|
148
|
+
this.setAttribute("tabindex", "-1");
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
/**
|
|
152
|
+
* @internal
|
|
153
|
+
*/
|
|
154
|
+
this.handleMouseOver = (e) => {
|
|
155
|
+
if (this.disabled || !this.hasSubmenu || this.expanded) {
|
|
156
|
+
return false;
|
|
157
|
+
}
|
|
158
|
+
this.expanded = true;
|
|
159
|
+
return false;
|
|
160
|
+
};
|
|
161
|
+
/**
|
|
162
|
+
* @internal
|
|
163
|
+
*/
|
|
164
|
+
this.handleMouseOut = (e) => {
|
|
165
|
+
if (!this.expanded || this.contains(document.activeElement)) {
|
|
166
|
+
return false;
|
|
167
|
+
}
|
|
168
|
+
this.expanded = false;
|
|
169
|
+
return false;
|
|
170
|
+
};
|
|
171
|
+
/**
|
|
172
|
+
* @internal
|
|
173
|
+
*/
|
|
174
|
+
this.expandAndFocus = () => {
|
|
175
|
+
if (!this.hasSubmenu) {
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
this.focusSubmenuOnLoad = true;
|
|
179
|
+
this.expanded = true;
|
|
180
|
+
};
|
|
181
|
+
/**
|
|
182
|
+
* @internal
|
|
183
|
+
*/
|
|
184
|
+
this.invoke = () => {
|
|
185
|
+
if (this.disabled) {
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
switch (this.role) {
|
|
189
|
+
case MenuItemRole.menuitemcheckbox:
|
|
190
|
+
this.checked = !this.checked;
|
|
191
|
+
break;
|
|
192
|
+
case MenuItemRole.menuitem:
|
|
193
|
+
// update submenu
|
|
194
|
+
this.updateSubmenu();
|
|
195
|
+
if (this.hasSubmenu) {
|
|
196
|
+
this.expandAndFocus();
|
|
197
|
+
}
|
|
198
|
+
else {
|
|
199
|
+
this.$emit("change");
|
|
200
|
+
}
|
|
201
|
+
break;
|
|
202
|
+
case MenuItemRole.menuitemradio:
|
|
203
|
+
if (!this.checked) {
|
|
204
|
+
this.checked = true;
|
|
205
|
+
}
|
|
206
|
+
break;
|
|
207
|
+
}
|
|
208
|
+
};
|
|
209
|
+
/**
|
|
210
|
+
* Gets the submenu element if any
|
|
211
|
+
*
|
|
212
|
+
* @internal
|
|
213
|
+
*/
|
|
214
|
+
this.updateSubmenu = () => {
|
|
215
|
+
this.submenu = this.domChildren().find((element) => {
|
|
216
|
+
return element.getAttribute("role") === "menu";
|
|
217
|
+
});
|
|
218
|
+
this.hasSubmenu = this.submenu === undefined ? false : true;
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
expandedChanged(oldValue) {
|
|
222
|
+
if (this.$fastController.isConnected) {
|
|
223
|
+
if (this.submenu === undefined) {
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
if (this.expanded === false) {
|
|
227
|
+
this.submenu.collapseExpandedItem();
|
|
228
|
+
}
|
|
229
|
+
else {
|
|
230
|
+
this.currentDirection = getDirection(this);
|
|
231
|
+
}
|
|
232
|
+
this.$emit("expanded-change", this, { bubbles: false });
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
checkedChanged(oldValue, newValue) {
|
|
236
|
+
if (this.$fastController.isConnected) {
|
|
237
|
+
this.$emit("change");
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* @internal
|
|
242
|
+
*/
|
|
243
|
+
connectedCallback() {
|
|
244
|
+
super.connectedCallback();
|
|
245
|
+
DOM.queueUpdate(() => {
|
|
246
|
+
this.updateSubmenu();
|
|
247
|
+
});
|
|
248
|
+
if (!this.startColumnCount) {
|
|
249
|
+
this.startColumnCount = 1;
|
|
250
|
+
}
|
|
251
|
+
this.observer = new MutationObserver(this.updateSubmenu);
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* @internal
|
|
255
|
+
*/
|
|
256
|
+
disconnectedCallback() {
|
|
257
|
+
super.disconnectedCallback();
|
|
258
|
+
this.submenu = undefined;
|
|
259
|
+
if (this.observer !== undefined) {
|
|
260
|
+
this.observer.disconnect();
|
|
261
|
+
this.observer = undefined;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* get an array of valid DOM children
|
|
266
|
+
*/
|
|
267
|
+
domChildren() {
|
|
268
|
+
return Array.from(this.children).filter(child => !child.hasAttribute("hidden"));
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
__decorate([
|
|
272
|
+
attr({ mode: "boolean" })
|
|
273
|
+
], MenuItem$1.prototype, "disabled", void 0);
|
|
274
|
+
__decorate([
|
|
275
|
+
attr({ mode: "boolean" })
|
|
276
|
+
], MenuItem$1.prototype, "expanded", void 0);
|
|
277
|
+
__decorate([
|
|
278
|
+
observable
|
|
279
|
+
], MenuItem$1.prototype, "startColumnCount", void 0);
|
|
280
|
+
__decorate([
|
|
281
|
+
attr
|
|
282
|
+
], MenuItem$1.prototype, "role", void 0);
|
|
283
|
+
__decorate([
|
|
284
|
+
attr({ mode: "boolean" })
|
|
285
|
+
], MenuItem$1.prototype, "checked", void 0);
|
|
286
|
+
__decorate([
|
|
287
|
+
observable
|
|
288
|
+
], MenuItem$1.prototype, "submenuRegion", void 0);
|
|
289
|
+
__decorate([
|
|
290
|
+
observable
|
|
291
|
+
], MenuItem$1.prototype, "hasSubmenu", void 0);
|
|
292
|
+
__decorate([
|
|
293
|
+
observable
|
|
294
|
+
], MenuItem$1.prototype, "currentDirection", void 0);
|
|
295
|
+
__decorate([
|
|
296
|
+
observable
|
|
297
|
+
], MenuItem$1.prototype, "submenu", void 0);
|
|
298
|
+
applyMixins(MenuItem$1, StartEnd);
|
|
299
|
+
|
|
300
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Wed, 12 Oct 2022 06:56:20 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: 40px;\n box-shadow: inset 0 0 0 1px var(--_appearance-color-outline);\n color: var(--_appearance-color-text);\n font: var(--vvd-font-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: transaprent;\n --_appearance-color-outline: transaprent;\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: transaprent;\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: transaprent;\n}\n.base:where(.selected, [aria-current]):where(:not(:disabled, .disabled, :hover, .hover, :active, .active)) {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: var(--_connotation-color-soft);\n --_appearance-color-outline: transaprent;\n}\n.base:where(:disabled, .disabled) {\n --_appearance-color-text: var(--vvd-color-neutral-400);\n --_appearance-color-fill: transaprent;\n --_appearance-color-outline: transaprent;\n}\n.base {\n --_connotation-color-primary: var(--vvd-color-canvas-text);\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}";
|
|
301
|
+
|
|
302
|
+
class MenuItem extends MenuItem$1 {}
|
|
303
|
+
|
|
304
|
+
__decorate([attr, __metadata("design:type", String)], MenuItem.prototype, "text", void 0);
|
|
305
|
+
|
|
306
|
+
applyMixins(MenuItem, AffixIcon);
|
|
307
|
+
|
|
308
|
+
let _ = t => t,
|
|
309
|
+
_t,
|
|
310
|
+
_t2,
|
|
311
|
+
_t3,
|
|
312
|
+
_t4,
|
|
313
|
+
_t5;
|
|
314
|
+
|
|
315
|
+
const getClasses = ({
|
|
316
|
+
disabled,
|
|
317
|
+
checked,
|
|
318
|
+
expanded,
|
|
319
|
+
role
|
|
320
|
+
}) => classNames('base', ['disabled', Boolean(disabled)], ['selected', role !== MenuItemRole.menuitem && Boolean(checked)], ['expanded', Boolean(expanded)], ['item-checkbox', role === MenuItemRole.menuitemcheckbox], ['item-radio', role === MenuItemRole.menuitemradio]);
|
|
321
|
+
|
|
322
|
+
const MenuItemTemplate = (context, definition) => {
|
|
323
|
+
const affixIconTemplate = affixIconTemplateFactory(context);
|
|
324
|
+
const focusTemplate = focusTemplateFactory(context);
|
|
325
|
+
return html(_t || (_t = _`
|
|
326
|
+
<template
|
|
327
|
+
aria-checked="${0}"
|
|
328
|
+
aria-disabled="${0}"
|
|
329
|
+
aria-expanded="${0}"
|
|
330
|
+
@keydown="${0}"
|
|
331
|
+
@click="${0}"
|
|
332
|
+
@mouseover="${0}"
|
|
333
|
+
@mouseout="${0}"
|
|
334
|
+
>
|
|
335
|
+
<div class="${0}">
|
|
336
|
+
|
|
337
|
+
${0}
|
|
338
|
+
${0}
|
|
339
|
+
|
|
340
|
+
${0}
|
|
341
|
+
|
|
342
|
+
${0}
|
|
343
|
+
|
|
344
|
+
${0}
|
|
345
|
+
|
|
346
|
+
<span class="text">
|
|
347
|
+
${0}
|
|
348
|
+
</span>
|
|
349
|
+
</div>
|
|
350
|
+
</template>
|
|
351
|
+
`), 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 = _`
|
|
352
|
+
<div
|
|
353
|
+
class="expand-collapse-glyph-container"
|
|
354
|
+
>
|
|
355
|
+
<span class="expand-collapse">
|
|
356
|
+
<slot name="expand-collapse-indicator">
|
|
357
|
+
${0}
|
|
358
|
+
</slot>
|
|
359
|
+
</span>
|
|
360
|
+
</div>
|
|
361
|
+
`), 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);
|
|
362
|
+
};
|
|
363
|
+
|
|
364
|
+
const vividMenuItem = MenuItem.compose({
|
|
365
|
+
baseName: 'menu-item',
|
|
366
|
+
template: MenuItemTemplate,
|
|
367
|
+
styles: css_248z
|
|
368
|
+
});
|
|
369
|
+
designSystem.register(vividMenuItem());
|
|
370
|
+
|
|
371
|
+
export { MenuItem$1 as M, MenuItemRole as a, roleForMenuItem as r, vividMenuItem as v };
|
|
@@ -15,7 +15,7 @@ export declare function formElements<T extends {
|
|
|
15
15
|
helperText?: string | undefined;
|
|
16
16
|
charCount: boolean;
|
|
17
17
|
userValid: boolean;
|
|
18
|
-
"__#
|
|
18
|
+
"__#6341@#blurred": boolean;
|
|
19
19
|
readonly errorValidationMessage: any;
|
|
20
20
|
validate: () => void;
|
|
21
21
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { j as anObject$1 } from './export.js';
|
|
2
|
+
|
|
3
|
+
var anObject = anObject$1;
|
|
4
|
+
|
|
5
|
+
// `RegExp.prototype.flags` getter implementation
|
|
6
|
+
// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
|
|
7
|
+
var regexpFlags = function () {
|
|
8
|
+
var that = anObject(this);
|
|
9
|
+
var result = '';
|
|
10
|
+
if (that.hasIndices) result += 'd';
|
|
11
|
+
if (that.global) result += 'g';
|
|
12
|
+
if (that.ignoreCase) result += 'i';
|
|
13
|
+
if (that.multiline) result += 'm';
|
|
14
|
+
if (that.dotAll) result += 's';
|
|
15
|
+
if (that.unicode) result += 'u';
|
|
16
|
+
if (that.unicodeSets) result += 'v';
|
|
17
|
+
if (that.sticky) result += 'y';
|
|
18
|
+
return result;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { regexpFlags as r };
|
package/side-drawer/index.js
CHANGED
|
@@ -53,7 +53,7 @@ __decorate([attr({
|
|
|
53
53
|
mode: 'boolean'
|
|
54
54
|
}), __metadata("design:type", Object)], SideDrawer.prototype, "trailing", void 0);
|
|
55
55
|
|
|
56
|
-
var css_248z = "/**\n * Do not edit directly\n * Generated on
|
|
56
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Wed, 12 Oct 2022 06:56:20 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}";
|
|
57
57
|
|
|
58
58
|
let _ = t => t,
|
|
59
59
|
_t,
|
package/styles/core/all.css
CHANGED
package/styles/core/theme.css
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on
|
|
3
|
+
* Generated on Wed, 12 Oct 2022 06:56:20 GMT
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* Do not edit directly
|
|
7
|
-
* Generated on
|
|
7
|
+
* Generated on Wed, 12 Oct 2022 06:56:20 GMT
|
|
8
8
|
*/
|
|
9
9
|
/**
|
|
10
10
|
* Do not edit directly
|
|
11
|
-
* Generated on
|
|
11
|
+
* Generated on Wed, 12 Oct 2022 06:56:20 GMT
|
|
12
12
|
*/
|
|
13
13
|
.vvd-root, ::part(vvd-root) {
|
|
14
14
|
--vvd-color-scheme: dark;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on
|
|
3
|
+
* Generated on Wed, 12 Oct 2022 06:56:20 GMT
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* Do not edit directly
|
|
7
|
-
* Generated on
|
|
7
|
+
* Generated on Wed, 12 Oct 2022 06:56:20 GMT
|
|
8
8
|
*/
|
|
9
9
|
/**
|
|
10
10
|
* Do not edit directly
|
|
11
|
-
* Generated on
|
|
11
|
+
* Generated on Wed, 12 Oct 2022 06:56:20 GMT
|
|
12
12
|
*/
|
|
13
13
|
.vvd-root, ::part(vvd-root) {
|
|
14
14
|
--vvd-color-scheme: light;
|
package/text-area/index.js
CHANGED
|
@@ -197,7 +197,7 @@ __decorate([
|
|
|
197
197
|
], TextArea$1.prototype, "defaultSlottedNodes", void 0);
|
|
198
198
|
applyMixins(TextArea$1, DelegatesARIATextbox);
|
|
199
199
|
|
|
200
|
-
var css_248z = "/**\n * Do not edit directly\n * Generated on
|
|
200
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Wed, 12 Oct 2022 06:56:20 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: transaprent;\n --_appearance-color-outline: transaprent;\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: transaprent;\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: transaprent;\n --_appearance-color-outline: transaprent;\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: transaprent;\n --_appearance-color-outline: transaprent;\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@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-font-base);\n grid-column: 1/4;\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/4;\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-font-base);\n min-block-size: 40px;\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.helper-text {\n color: var(--_low-ink-color);\n font: var(--vvd-font-base-condensed);\n grid-column: 1/4;\n}\n\n.error-message {\n display: flex;\n color: var(--vvd-color-canvas-text);\n contain: inline-size;\n font: var(--vvd-font-base-condensed);\n grid-column: 2/4;\n}\n.error-message-icon {\n color: var(--vvd-color-alert-500);\n font-size: 16px;\n grid-column: 1/2;\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}";
|
|
201
201
|
|
|
202
202
|
let TextArea = class TextArea extends TextArea$1 {};
|
|
203
203
|
|
package/text-field/index.js
CHANGED
|
@@ -34,7 +34,7 @@ __decorate([attr, __metadata("design:type", String)], TextField.prototype, "auto
|
|
|
34
34
|
TextField = __decorate([formElements], TextField);
|
|
35
35
|
applyMixins(TextField, AffixIcon);
|
|
36
36
|
|
|
37
|
-
var css_248z = "/**\n * Do not edit directly\n * Generated on
|
|
37
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Wed, 12 Oct 2022 06:56:20 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: transaprent;\n --_appearance-color-outline: transaprent;\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: transaprent;\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: transaprent;\n --_appearance-color-outline: transaprent;\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: transaprent;\n --_appearance-color-outline: transaprent;\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@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-font-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-font-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 /* Size */\n /* Shape */\n}\n.base:not(.density-extended) > .fieldset {\n block-size: 40px;\n}\n.base.density-extended > .fieldset {\n block-size: 48px;\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-font-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.helper-text {\n color: var(--_low-ink-color);\n font: var(--vvd-font-base-condensed);\n grid-column: 1/4;\n margin-inline-start: 16px;\n}\n\n.error-message {\n display: flex;\n color: var(--vvd-color-canvas-text);\n contain: inline-size;\n font: var(--vvd-font-base-condensed);\n grid-column: 2/4;\n}\n.error-message-icon {\n color: var(--vvd-color-alert-500);\n font-size: 16px;\n grid-column: 1/2;\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}";
|
|
38
38
|
|
|
39
39
|
let _ = t => t,
|
|
40
40
|
_t,
|
package/tooltip/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import '../shared/
|
|
1
|
+
import '../shared/index5.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';
|
|
5
|
+
import '../shared/index3.js';
|
|
5
6
|
import '../shared/index2.js';
|
|
6
|
-
import '../button/index.js';
|
|
7
7
|
import '../icon/index.js';
|
|
8
8
|
import '../shared/icon.js';
|
|
9
9
|
import '../shared/export.js';
|
|
@@ -22,10 +22,11 @@ import '../shared/aria-global.js';
|
|
|
22
22
|
import '../shared/start-end.js';
|
|
23
23
|
import '../shared/ref.js';
|
|
24
24
|
import '../shared/focus2.js';
|
|
25
|
-
import '../shared/object-keys.js';
|
|
26
25
|
import '../shared/es.object.assign.js';
|
|
26
|
+
import '../shared/object-keys.js';
|
|
27
|
+
import '../shared/regexp-flags.js';
|
|
27
28
|
|
|
28
|
-
var css_248z = "/**\n * Do not edit directly\n * Generated on
|
|
29
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Wed, 12 Oct 2022 06:56:20 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-font-base-bold);\n}";
|
|
29
30
|
|
|
30
31
|
class Tooltip extends FoundationElement {
|
|
31
32
|
constructor() {
|