@vonage/vivid 3.0.0-next.64 → 3.0.0-next.66
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 +3 -1
- package/breadcrumb/index.js +1 -0
- package/breadcrumb-item/index.js +6 -2
- package/button/index.js +3 -1
- package/calendar/index.js +1 -1
- package/calendar-event/index.js +1 -1
- package/card/index.js +1 -1
- package/checkbox/index.js +7 -3
- package/dialog/index.js +3 -1
- package/divider/index.js +1 -1
- package/fab/index.js +7 -2
- package/focus/index.js +1 -1
- package/header/index.js +1 -1
- package/index.js +12 -6
- package/lib/components.d.ts +9 -5
- package/lib/menu/index.d.ts +1 -0
- package/lib/menu/menu.d.ts +4 -1
- package/lib/menu-item/index.d.ts +3 -0
- package/lib/menu-item/menu-item.d.ts +7 -0
- package/lib/menu-item/menu-item.template.d.ts +5 -0
- package/menu/index.js +20 -299
- package/menu-item/index.js +19 -0
- package/nav-disclosure/index.js +1 -1
- package/nav-item/index.js +6 -2
- package/note/index.js +1 -1
- package/package.json +12 -11
- package/popup/index.js +2 -0
- package/progress/index.js +1 -1
- package/progress-ring/index.js +1 -1
- package/shared/anchor.js +2 -1
- package/shared/aria-global.js +2 -49
- package/shared/breadcrumb-item.js +1 -1
- package/shared/button.js +2 -1
- package/shared/form-associated.js +2 -90
- package/shared/form-elements.js +2 -1
- package/shared/index3.js +1 -1
- package/shared/index4.js +371 -0
- package/shared/key-codes.js +90 -0
- package/shared/patterns/form-elements.d.ts +1 -1
- package/shared/start-end.js +50 -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-anchor/index.js +1 -0
- package/text-area/index.js +3 -1
- package/text-field/index.js +3 -1
- package/tooltip/index.js +3 -1
package/menu/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { P as Popup } from '../shared/index3.js';
|
|
2
|
-
import {
|
|
2
|
+
import { M as MenuItem, a as MenuItemRole, r as roleForMenuItem } from '../shared/index4.js';
|
|
3
|
+
import { F as FoundationElement, D as DOM, _ as __decorate, o as observable, a as attr, b as __metadata, h as html, d as designSystem } from '../shared/index.js';
|
|
3
4
|
import '../shared/web.dom-collections.iterator.js';
|
|
4
|
-
import {
|
|
5
|
-
import { a as applyMixins } from '../shared/apply-mixins.js';
|
|
6
|
-
import { a as keyArrowLeft, b as keyArrowRight, k as keySpace, c as keyEnter, d as keyHome, e as keyEnd, f as keyArrowUp, g as keyArrowDown } from '../shared/form-associated.js';
|
|
5
|
+
import { b as keyHome, c as keyEnd, d as keyArrowUp, e as keyArrowDown } from '../shared/key-codes.js';
|
|
7
6
|
import { s as slotted } from '../shared/slotted.js';
|
|
7
|
+
import { r as ref } from '../shared/ref.js';
|
|
8
8
|
import '../shared/index2.js';
|
|
9
9
|
import '../shared/class-names.js';
|
|
10
10
|
import '../button/index.js';
|
|
@@ -19,8 +19,11 @@ import '../focus/index.js';
|
|
|
19
19
|
import '../shared/focus.js';
|
|
20
20
|
import '../shared/affix.js';
|
|
21
21
|
import '../shared/button.js';
|
|
22
|
+
import '../shared/apply-mixins.js';
|
|
23
|
+
import '../shared/form-associated.js';
|
|
24
|
+
import '../shared/aria-global.js';
|
|
25
|
+
import '../shared/start-end.js';
|
|
22
26
|
import '../shared/focus2.js';
|
|
23
|
-
import '../shared/ref.js';
|
|
24
27
|
import '../shared/object-keys.js';
|
|
25
28
|
import '../shared/es.object.assign.js';
|
|
26
29
|
|
|
@@ -31,295 +34,6 @@ function isHTMLElement(...args) {
|
|
|
31
34
|
return args.every((arg) => arg instanceof HTMLElement);
|
|
32
35
|
}
|
|
33
36
|
|
|
34
|
-
/**
|
|
35
|
-
* Expose ltr and rtl strings
|
|
36
|
-
*/
|
|
37
|
-
var Direction;
|
|
38
|
-
(function (Direction) {
|
|
39
|
-
Direction["ltr"] = "ltr";
|
|
40
|
-
Direction["rtl"] = "rtl";
|
|
41
|
-
})(Direction || (Direction = {}));
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* a method to determine the current localization direction of the view
|
|
45
|
-
* @param rootNode - the HTMLElement to begin the query from, usually "this" when used in a component controller
|
|
46
|
-
* @public
|
|
47
|
-
*/
|
|
48
|
-
const getDirection = (rootNode) => {
|
|
49
|
-
const dirNode = rootNode.closest("[dir]");
|
|
50
|
-
return dirNode !== null && dirNode.dir === "rtl" ? Direction.rtl : Direction.ltr;
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Menu items roles.
|
|
55
|
-
* @public
|
|
56
|
-
*/
|
|
57
|
-
const MenuItemRole = {
|
|
58
|
-
/**
|
|
59
|
-
* The menu item has a "menuitem" role
|
|
60
|
-
*/
|
|
61
|
-
menuitem: "menuitem",
|
|
62
|
-
/**
|
|
63
|
-
* The menu item has a "menuitemcheckbox" role
|
|
64
|
-
*/
|
|
65
|
-
menuitemcheckbox: "menuitemcheckbox",
|
|
66
|
-
/**
|
|
67
|
-
* The menu item has a "menuitemradio" role
|
|
68
|
-
*/
|
|
69
|
-
menuitemradio: "menuitemradio",
|
|
70
|
-
};
|
|
71
|
-
/**
|
|
72
|
-
* @internal
|
|
73
|
-
*/
|
|
74
|
-
const roleForMenuItem = {
|
|
75
|
-
[MenuItemRole.menuitem]: "menuitem",
|
|
76
|
-
[MenuItemRole.menuitemcheckbox]: "menuitemcheckbox",
|
|
77
|
-
[MenuItemRole.menuitemradio]: "menuitemradio",
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* A Switch Custom HTML Element.
|
|
82
|
-
* 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 }.
|
|
83
|
-
*
|
|
84
|
-
* @slot checked-indicator - The checked indicator
|
|
85
|
-
* @slot radio-indicator - The radio indicator
|
|
86
|
-
* @slot start - Content which can be provided before the menu item content
|
|
87
|
-
* @slot end - Content which can be provided after the menu item content
|
|
88
|
-
* @slot - The default slot for menu item content
|
|
89
|
-
* @slot expand-collapse-indicator - The expand/collapse indicator
|
|
90
|
-
* @slot submenu - Used to nest menu's within menu items
|
|
91
|
-
* @csspart input-container - The element representing the visual checked or radio indicator
|
|
92
|
-
* @csspart checkbox - The element wrapping the `menuitemcheckbox` indicator
|
|
93
|
-
* @csspart radio - The element wrapping the `menuitemradio` indicator
|
|
94
|
-
* @csspart content - The element wrapping the menu item content
|
|
95
|
-
* @csspart expand-collapse-glyph-container - The element wrapping the expand collapse element
|
|
96
|
-
* @csspart expand-collapse - The expand/collapse element
|
|
97
|
-
* @csspart submenu-region - The container for the submenu, used for positioning
|
|
98
|
-
* @fires expanded-change - Fires a custom 'expanded-change' event when the expanded state changes
|
|
99
|
-
* @fires change - Fires a custom 'change' event when a non-submenu item with a role of `menuitemcheckbox`, `menuitemradio`, or `menuitem` is invoked
|
|
100
|
-
*
|
|
101
|
-
* @public
|
|
102
|
-
*/
|
|
103
|
-
class MenuItem extends FoundationElement {
|
|
104
|
-
constructor() {
|
|
105
|
-
super(...arguments);
|
|
106
|
-
/**
|
|
107
|
-
* The role of the element.
|
|
108
|
-
*
|
|
109
|
-
* @public
|
|
110
|
-
* @remarks
|
|
111
|
-
* HTML Attribute: role
|
|
112
|
-
*/
|
|
113
|
-
this.role = MenuItemRole.menuitem;
|
|
114
|
-
/**
|
|
115
|
-
* @internal
|
|
116
|
-
*/
|
|
117
|
-
this.hasSubmenu = false;
|
|
118
|
-
/**
|
|
119
|
-
* Track current direction to pass to the anchored region
|
|
120
|
-
*
|
|
121
|
-
* @internal
|
|
122
|
-
*/
|
|
123
|
-
this.currentDirection = Direction.ltr;
|
|
124
|
-
this.focusSubmenuOnLoad = false;
|
|
125
|
-
/**
|
|
126
|
-
* @internal
|
|
127
|
-
*/
|
|
128
|
-
this.handleMenuItemKeyDown = (e) => {
|
|
129
|
-
if (e.defaultPrevented) {
|
|
130
|
-
return false;
|
|
131
|
-
}
|
|
132
|
-
switch (e.key) {
|
|
133
|
-
case keyEnter:
|
|
134
|
-
case keySpace:
|
|
135
|
-
this.invoke();
|
|
136
|
-
return false;
|
|
137
|
-
case keyArrowRight:
|
|
138
|
-
//open/focus on submenu
|
|
139
|
-
this.expandAndFocus();
|
|
140
|
-
return false;
|
|
141
|
-
case keyArrowLeft:
|
|
142
|
-
//close submenu
|
|
143
|
-
if (this.expanded) {
|
|
144
|
-
this.expanded = false;
|
|
145
|
-
this.focus();
|
|
146
|
-
return false;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
return true;
|
|
150
|
-
};
|
|
151
|
-
/**
|
|
152
|
-
* @internal
|
|
153
|
-
*/
|
|
154
|
-
this.handleMenuItemClick = (e) => {
|
|
155
|
-
if (e.defaultPrevented || this.disabled) {
|
|
156
|
-
return false;
|
|
157
|
-
}
|
|
158
|
-
this.invoke();
|
|
159
|
-
return false;
|
|
160
|
-
};
|
|
161
|
-
/**
|
|
162
|
-
* @internal
|
|
163
|
-
*/
|
|
164
|
-
this.submenuLoaded = () => {
|
|
165
|
-
if (!this.focusSubmenuOnLoad) {
|
|
166
|
-
return;
|
|
167
|
-
}
|
|
168
|
-
this.focusSubmenuOnLoad = false;
|
|
169
|
-
if (this.hasSubmenu) {
|
|
170
|
-
this.submenu.focus();
|
|
171
|
-
this.setAttribute("tabindex", "-1");
|
|
172
|
-
}
|
|
173
|
-
};
|
|
174
|
-
/**
|
|
175
|
-
* @internal
|
|
176
|
-
*/
|
|
177
|
-
this.handleMouseOver = (e) => {
|
|
178
|
-
if (this.disabled || !this.hasSubmenu || this.expanded) {
|
|
179
|
-
return false;
|
|
180
|
-
}
|
|
181
|
-
this.expanded = true;
|
|
182
|
-
return false;
|
|
183
|
-
};
|
|
184
|
-
/**
|
|
185
|
-
* @internal
|
|
186
|
-
*/
|
|
187
|
-
this.handleMouseOut = (e) => {
|
|
188
|
-
if (!this.expanded || this.contains(document.activeElement)) {
|
|
189
|
-
return false;
|
|
190
|
-
}
|
|
191
|
-
this.expanded = false;
|
|
192
|
-
return false;
|
|
193
|
-
};
|
|
194
|
-
/**
|
|
195
|
-
* @internal
|
|
196
|
-
*/
|
|
197
|
-
this.expandAndFocus = () => {
|
|
198
|
-
if (!this.hasSubmenu) {
|
|
199
|
-
return;
|
|
200
|
-
}
|
|
201
|
-
this.focusSubmenuOnLoad = true;
|
|
202
|
-
this.expanded = true;
|
|
203
|
-
};
|
|
204
|
-
/**
|
|
205
|
-
* @internal
|
|
206
|
-
*/
|
|
207
|
-
this.invoke = () => {
|
|
208
|
-
if (this.disabled) {
|
|
209
|
-
return;
|
|
210
|
-
}
|
|
211
|
-
switch (this.role) {
|
|
212
|
-
case MenuItemRole.menuitemcheckbox:
|
|
213
|
-
this.checked = !this.checked;
|
|
214
|
-
break;
|
|
215
|
-
case MenuItemRole.menuitem:
|
|
216
|
-
// update submenu
|
|
217
|
-
this.updateSubmenu();
|
|
218
|
-
if (this.hasSubmenu) {
|
|
219
|
-
this.expandAndFocus();
|
|
220
|
-
}
|
|
221
|
-
else {
|
|
222
|
-
this.$emit("change");
|
|
223
|
-
}
|
|
224
|
-
break;
|
|
225
|
-
case MenuItemRole.menuitemradio:
|
|
226
|
-
if (!this.checked) {
|
|
227
|
-
this.checked = true;
|
|
228
|
-
}
|
|
229
|
-
break;
|
|
230
|
-
}
|
|
231
|
-
};
|
|
232
|
-
/**
|
|
233
|
-
* Gets the submenu element if any
|
|
234
|
-
*
|
|
235
|
-
* @internal
|
|
236
|
-
*/
|
|
237
|
-
this.updateSubmenu = () => {
|
|
238
|
-
this.submenu = this.domChildren().find((element) => {
|
|
239
|
-
return element.getAttribute("role") === "menu";
|
|
240
|
-
});
|
|
241
|
-
this.hasSubmenu = this.submenu === undefined ? false : true;
|
|
242
|
-
};
|
|
243
|
-
}
|
|
244
|
-
expandedChanged(oldValue) {
|
|
245
|
-
if (this.$fastController.isConnected) {
|
|
246
|
-
if (this.submenu === undefined) {
|
|
247
|
-
return;
|
|
248
|
-
}
|
|
249
|
-
if (this.expanded === false) {
|
|
250
|
-
this.submenu.collapseExpandedItem();
|
|
251
|
-
}
|
|
252
|
-
else {
|
|
253
|
-
this.currentDirection = getDirection(this);
|
|
254
|
-
}
|
|
255
|
-
this.$emit("expanded-change", this, { bubbles: false });
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
checkedChanged(oldValue, newValue) {
|
|
259
|
-
if (this.$fastController.isConnected) {
|
|
260
|
-
this.$emit("change");
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
/**
|
|
264
|
-
* @internal
|
|
265
|
-
*/
|
|
266
|
-
connectedCallback() {
|
|
267
|
-
super.connectedCallback();
|
|
268
|
-
DOM.queueUpdate(() => {
|
|
269
|
-
this.updateSubmenu();
|
|
270
|
-
});
|
|
271
|
-
if (!this.startColumnCount) {
|
|
272
|
-
this.startColumnCount = 1;
|
|
273
|
-
}
|
|
274
|
-
this.observer = new MutationObserver(this.updateSubmenu);
|
|
275
|
-
}
|
|
276
|
-
/**
|
|
277
|
-
* @internal
|
|
278
|
-
*/
|
|
279
|
-
disconnectedCallback() {
|
|
280
|
-
super.disconnectedCallback();
|
|
281
|
-
this.submenu = undefined;
|
|
282
|
-
if (this.observer !== undefined) {
|
|
283
|
-
this.observer.disconnect();
|
|
284
|
-
this.observer = undefined;
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
/**
|
|
288
|
-
* get an array of valid DOM children
|
|
289
|
-
*/
|
|
290
|
-
domChildren() {
|
|
291
|
-
return Array.from(this.children).filter(child => !child.hasAttribute("hidden"));
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
__decorate([
|
|
295
|
-
attr({ mode: "boolean" })
|
|
296
|
-
], MenuItem.prototype, "disabled", void 0);
|
|
297
|
-
__decorate([
|
|
298
|
-
attr({ mode: "boolean" })
|
|
299
|
-
], MenuItem.prototype, "expanded", void 0);
|
|
300
|
-
__decorate([
|
|
301
|
-
observable
|
|
302
|
-
], MenuItem.prototype, "startColumnCount", void 0);
|
|
303
|
-
__decorate([
|
|
304
|
-
attr
|
|
305
|
-
], MenuItem.prototype, "role", void 0);
|
|
306
|
-
__decorate([
|
|
307
|
-
attr({ mode: "boolean" })
|
|
308
|
-
], MenuItem.prototype, "checked", void 0);
|
|
309
|
-
__decorate([
|
|
310
|
-
observable
|
|
311
|
-
], MenuItem.prototype, "submenuRegion", void 0);
|
|
312
|
-
__decorate([
|
|
313
|
-
observable
|
|
314
|
-
], MenuItem.prototype, "hasSubmenu", void 0);
|
|
315
|
-
__decorate([
|
|
316
|
-
observable
|
|
317
|
-
], MenuItem.prototype, "currentDirection", void 0);
|
|
318
|
-
__decorate([
|
|
319
|
-
observable
|
|
320
|
-
], MenuItem.prototype, "submenu", void 0);
|
|
321
|
-
applyMixins(MenuItem, StartEnd);
|
|
322
|
-
|
|
323
37
|
/**
|
|
324
38
|
* A Menu Custom HTML Element.
|
|
325
39
|
* Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#menu | ARIA menu }.
|
|
@@ -606,12 +320,16 @@ __decorate([
|
|
|
606
320
|
observable
|
|
607
321
|
], Menu$1.prototype, "items", void 0);
|
|
608
322
|
|
|
609
|
-
var css_248z = ".base {\n padding-block: 8px;\n}";
|
|
323
|
+
var css_248z = ".base {\n max-inline-size: var(--menu-max-inline-size, 100%);\n min-inline-size: var(--menu-max-inline-size);\n padding-block: 8px;\n}";
|
|
610
324
|
|
|
611
325
|
class Menu extends Menu$1 {
|
|
612
326
|
constructor() {
|
|
613
327
|
super(...arguments);
|
|
614
328
|
this.open = false;
|
|
329
|
+
|
|
330
|
+
this.popupOpenChanged = () => {
|
|
331
|
+
this.open = this._popup.open;
|
|
332
|
+
};
|
|
615
333
|
}
|
|
616
334
|
|
|
617
335
|
}
|
|
@@ -633,9 +351,12 @@ const MenuTemplate = context => {
|
|
|
633
351
|
slot="${0}"
|
|
634
352
|
>
|
|
635
353
|
<${0}
|
|
636
|
-
placement=${0}
|
|
637
|
-
open=${0}
|
|
638
|
-
anchor=${0}
|
|
354
|
+
:placement=${0}
|
|
355
|
+
:open=${0}
|
|
356
|
+
:anchor=${0}
|
|
357
|
+
@open="${0}"
|
|
358
|
+
@close="${0}"
|
|
359
|
+
${0}
|
|
639
360
|
>
|
|
640
361
|
<div
|
|
641
362
|
class="base"
|
|
@@ -646,7 +367,7 @@ const MenuTemplate = context => {
|
|
|
646
367
|
<slot ${0}></slot>
|
|
647
368
|
</div>
|
|
648
369
|
</${0}>
|
|
649
|
-
</template>`), x => x.slot || x.isNestedMenu() ? 'submenu' : void 0, popupTag, x => x.placement, x => x.open, x => x.anchor, (x, c) => x.handleMenuKeyDown(c.event), (x, c) => x.handleFocusOut(c.event), slotted('items'), popupTag);
|
|
370
|
+
</template>`), x => x.slot || x.isNestedMenu() ? 'submenu' : void 0, popupTag, x => x.placement, x => x.open, x => x.anchor, x => x.popupOpenChanged(), x => x.popupOpenChanged(), ref('_popup'), (x, c) => x.handleMenuKeyDown(c.event), (x, c) => x.handleFocusOut(c.event), slotted('items'), popupTag);
|
|
650
371
|
};
|
|
651
372
|
|
|
652
373
|
const vividMenu = Menu.compose({
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import '../icon/index.js';
|
|
2
|
+
import '../shared/index.js';
|
|
3
|
+
export { v as vividMenuItem } from '../shared/index4.js';
|
|
4
|
+
import '../shared/icon.js';
|
|
5
|
+
import '../shared/export.js';
|
|
6
|
+
import '../shared/iterators.js';
|
|
7
|
+
import '../shared/to-string.js';
|
|
8
|
+
import '../shared/_has.js';
|
|
9
|
+
import '../shared/when.js';
|
|
10
|
+
import '../shared/class-names.js';
|
|
11
|
+
import '../shared/affix.js';
|
|
12
|
+
import '../shared/web.dom-collections.iterator.js';
|
|
13
|
+
import '../shared/object-keys.js';
|
|
14
|
+
import '../shared/start-end.js';
|
|
15
|
+
import '../shared/ref.js';
|
|
16
|
+
import '../shared/apply-mixins.js';
|
|
17
|
+
import '../shared/key-codes.js';
|
|
18
|
+
import '../shared/focus2.js';
|
|
19
|
+
import '../shared/focus.js';
|
package/nav-disclosure/index.js
CHANGED
|
@@ -16,7 +16,7 @@ import '../shared/class-names.js';
|
|
|
16
16
|
import '../shared/focus.js';
|
|
17
17
|
import '../shared/object-keys.js';
|
|
18
18
|
|
|
19
|
-
var css_248z = "/**\n * Do not edit directly\n * Generated on
|
|
19
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Sun, 25 Sep 2022 05:00:43 GMT\n */\n.control {\n position: relative;\n display: flex;\n box-sizing: border-box;\n align-items: center;\n background-color: var(--_appearance-color-fill);\n border-radius: 6px;\n box-shadow: inset 0 0 0 1px var(--_appearance-color-outline);\n color: var(--_appearance-color-text);\n cursor: pointer;\n font: var(--vvd-font-base);\n gap: 8px;\n hyphens: auto;\n inline-size: 100%;\n min-block-size: 40px;\n padding-inline: 8px;\n text-decoration: none;\n vertical-align: middle;\n word-break: break-word;\n}\n.control {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: transaprent;\n --_appearance-color-outline: transaprent;\n}\n.control: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.control: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.control:where(.selected, [aria-current]):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.control {\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 selector(:focus-visible) {\n .control:focus {\n outline: none;\n }\n}\n@supports (user-select: none) {\n .control {\n user-select: none;\n }\n}\n.control .toggleIcon {\n margin-inline-start: auto;\n}\n\n.control:not(:focus-visible) .focus-indicator {\n display: none;\n}\n\n.icon {\n font-size: 20px;\n}\n\n.content {\n border-inline-start: 1px solid var(--vvd-color-neutral-200);\n margin-inline-start: 20px;\n padding-inline-start: 12px;\n}\n\ndetails > summary {\n list-style: none;\n}\n\ndetails > summary::-webkit-details-marker {\n display: none;\n}";
|
|
20
20
|
|
|
21
21
|
var _NavDisclosure_onToggle;
|
|
22
22
|
class NavDisclosure extends FoundationElement {
|
package/nav-item/index.js
CHANGED
|
@@ -17,10 +17,11 @@ import '../shared/web.dom-collections.iterator.js';
|
|
|
17
17
|
import '../shared/object-keys.js';
|
|
18
18
|
import '../shared/anchor.js';
|
|
19
19
|
import '../shared/aria-global.js';
|
|
20
|
+
import '../shared/start-end.js';
|
|
20
21
|
import '../shared/ref.js';
|
|
21
22
|
import '../shared/focus2.js';
|
|
22
23
|
|
|
23
|
-
var css_248z = "/**\n * Do not edit directly\n * Generated on
|
|
24
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Sun, 25 Sep 2022 05:00:43 GMT\n */\n.control {\n position: relative;\n display: inline-flex;\n box-sizing: border-box;\n align-items: center;\n background-color: var(--_appearance-color-fill);\n border-radius: 6px;\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 hyphens: auto;\n inline-size: 100%;\n min-block-size: 40px;\n padding-block: 10px;\n padding-inline: 8px;\n text-decoration: none;\n vertical-align: middle;\n word-break: break-word;\n}\n.control {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: transaprent;\n --_appearance-color-outline: transaprent;\n}\n.control: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.control: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.control:where(.selected, [aria-current]):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.control {\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 selector(:focus-visible) {\n .control:focus {\n outline: none;\n }\n}\n.control.icon-only {\n display: flex;\n block-size: 40px;\n inline-size: 40px;\n place-content: center;\n}\n\n.control:not(:focus-visible) .focus-indicator {\n display: none;\n}\n\n.icon {\n font-size: 20px;\n}";
|
|
24
25
|
|
|
25
26
|
class NavItem extends TextAnchor {}
|
|
26
27
|
applyMixins(NavItem, AffixIcon);
|
|
@@ -34,7 +35,10 @@ const NavItemTemplate = (context, definition) => html(_t || (_t = _`
|
|
|
34
35
|
const vividNavItem = NavItem.compose({
|
|
35
36
|
baseName: 'nav-item',
|
|
36
37
|
template: NavItemTemplate,
|
|
37
|
-
styles: css_248z
|
|
38
|
+
styles: css_248z,
|
|
39
|
+
shadowOptions: {
|
|
40
|
+
delegatesFocus: true
|
|
41
|
+
}
|
|
38
42
|
});
|
|
39
43
|
designSystem.register(vividNavItem());
|
|
40
44
|
|
package/note/index.js
CHANGED
|
@@ -14,7 +14,7 @@ import '../shared/to-string.js';
|
|
|
14
14
|
import '../shared/_has.js';
|
|
15
15
|
import '../shared/object-keys.js';
|
|
16
16
|
|
|
17
|
-
var css_248z = "/**\n * Do not edit directly\n * Generated on
|
|
17
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Sun, 25 Sep 2022 05:00:43 GMT\n */\n.base {\n display: flex;\n align-items: stretch;\n padding: 20px;\n border-left: 8px solid var(--_connotation-color-primary);\n background-color: var(--vvd-color-canvas);\n border-radius: 6px;\n box-shadow: inset 0 1px 0 0 var(--vvd-color-neutral-300), inset -1px 0 0 0 var(--vvd-color-neutral-300), inset 0 -1px 0 0 var(--vvd-color-neutral-300);\n color: var(--vvd-color-canvas-text);\n}\n.base.connotation-success {\n --_connotation-color-primary: var(--vvd-color-success-500);\n}\n.base.connotation-information {\n --_connotation-color-primary: var(--vvd-color-information-500);\n}\n.base.connotation-alert {\n --_connotation-color-primary: var(--vvd-color-alert-500);\n}\n.base.connotation-warning {\n --_connotation-color-primary: var(--vvd-color-warning-500);\n}\n.base:not(.connotation-success, .connotation-information, .connotation-alert, .connotation-warning) {\n --_connotation-color-primary: var(--vvd-color-announcement-500);\n}\n@supports (contain: content) {\n .base {\n contain: content;\n }\n}\n@supports not (contain: content) {\n .base {\n overflow: hidden;\n }\n}\n\n.icon {\n align-self: flex-start;\n font-size: 24px;\n margin-inline-end: 16px;\n}\n\n.text {\n display: flex;\n min-height: 24px;\n flex: 1;\n flex-direction: column;\n justify-content: center;\n gap: 4px;\n text-align: start;\n}\n.text .headline {\n font: var(--vvd-font-base-bold);\n}\n.text .message {\n font: var(--vvd-font-base);\n}";
|
|
18
18
|
|
|
19
19
|
class Note extends FoundationElement {}
|
|
20
20
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vonage/vivid",
|
|
3
|
-
"version": "3.0.0-next.
|
|
3
|
+
"version": "3.0.0-next.66",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"module": "./index.esm.js",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"./accordion": "./accordion",
|
|
19
19
|
"./accordion-item": "./accordion-item",
|
|
20
20
|
"./action-group": "./action-group",
|
|
21
|
+
"./avatar": "./avatar",
|
|
21
22
|
"./badge": "./badge",
|
|
22
23
|
"./banner": "./banner",
|
|
23
24
|
"./breadcrumb": "./breadcrumb",
|
|
@@ -26,26 +27,26 @@
|
|
|
26
27
|
"./calendar": "./calendar",
|
|
27
28
|
"./calendar-event": "./calendar-event",
|
|
28
29
|
"./card": "./card",
|
|
30
|
+
"./checkbox": "./checkbox",
|
|
29
31
|
"./elevation": "./elevation",
|
|
32
|
+
"./dialog": "./dialog",
|
|
33
|
+
"./divider": "./divider",
|
|
30
34
|
"./fab": "./fab",
|
|
31
35
|
"./icon": "./icon",
|
|
32
36
|
"./layout": "./layout",
|
|
37
|
+
"./menu": "./menu",
|
|
38
|
+
"./menu-item": "./menu-item",
|
|
39
|
+
"./nav": "./nav",
|
|
40
|
+
"./nav-disclosure": "./nav-disclosure",
|
|
41
|
+
"./nav-item": "./nav-item",
|
|
33
42
|
"./note": "./note",
|
|
34
43
|
"./popup": "./popup",
|
|
35
44
|
"./progress": "./progress",
|
|
36
45
|
"./progress-ring": "./progress-ring",
|
|
37
46
|
"./side-drawer": "./side-drawer",
|
|
38
|
-
"./nav": "./nav",
|
|
39
|
-
"./nav-item": "./nav-item",
|
|
40
|
-
"./nav-disclosure": "./nav-disclosure",
|
|
41
47
|
"./text-field": "./text-field",
|
|
42
|
-
"./
|
|
43
|
-
"./
|
|
44
|
-
"./dialog": "./dialog",
|
|
45
|
-
"./divider": "./divider",
|
|
46
|
-
"./menu": "./menu",
|
|
47
|
-
"./avatar": "./avatar",
|
|
48
|
-
"./text-area": "./text-area"
|
|
48
|
+
"./text-area": "./text-area",
|
|
49
|
+
"./tooltip": "./tooltip"
|
|
49
50
|
},
|
|
50
51
|
"typings": "./index.d.ts",
|
|
51
52
|
"dependencies": {
|
package/popup/index.js
CHANGED
|
@@ -18,7 +18,9 @@ import '../shared/affix.js';
|
|
|
18
18
|
import '../shared/button.js';
|
|
19
19
|
import '../shared/apply-mixins.js';
|
|
20
20
|
import '../shared/form-associated.js';
|
|
21
|
+
import '../shared/key-codes.js';
|
|
21
22
|
import '../shared/aria-global.js';
|
|
23
|
+
import '../shared/start-end.js';
|
|
22
24
|
import '../shared/ref.js';
|
|
23
25
|
import '../shared/focus2.js';
|
|
24
26
|
import '../shared/es.object.assign.js';
|
package/progress/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { c as classNames } from '../shared/class-names.js';
|
|
|
7
7
|
import '../shared/object-keys.js';
|
|
8
8
|
import '../shared/iterators.js';
|
|
9
9
|
|
|
10
|
-
var css_248z = "/**\n * Do not edit directly\n * Generated on
|
|
10
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Sun, 25 Sep 2022 05:00:43 GMT\n */\n.base {\n height: 6px;\n align-items: center;\n margin: 0;\n outline: none;\n}\n.base:not(.connotation-pacific).connotation-cta {\n --_connotation-color-primary: var(--vvd-color-cta-500);\n}\n.base:not(.connotation-pacific).connotation-alert {\n --_connotation-color-primary: var(--vvd-color-alert-500);\n}\n.base:not(.connotation-pacific).connotation-success {\n --_connotation-color-primary: var(--vvd-color-success-500);\n}\n.base:not(.connotation-pacific):not(.connotation-cta, .connotation-alert, .connotation-success) {\n --_connotation-color-primary: var(--vvd-color-canvas-text);\n}\n.base.connotation-pacific {\n --_connotation-color-primary: linear-gradient(to right, var(--vvd-color-information-200), var(--vvd-color-cta-600));\n}\n\n.progress {\n position: relative;\n display: flex;\n overflow: hidden;\n align-items: center;\n background-color: var(--vvd-color-neutral-100);\n block-size: 100%;\n inline-size: 100%;\n /* Shape */\n}\n.base:not(.shape-sharp) .progress {\n border-radius: 3px;\n}\n\n.indeterminate {\n display: flex;\n background-color: var(--_connotation-color-primary);\n block-size: 100%;\n border-radius: inherit;\n inline-size: 100%;\n}\n\n.determinate {\n background-color: var(--_connotation-color-primary);\n block-size: 100%;\n border-radius: inherit;\n transition: all 0.2s ease-in-out;\n}\n.connotation-pacific .determinate {\n background-image: var(--_connotation-color-primary);\n}\n.reverse .determinate {\n position: absolute;\n right: 0;\n}\n.paused .determinate {\n background-color: var(--vvd-color-neutral-300);\n}\n\n.indicator-1 {\n animation: indeterminate-1 2s infinite;\n inline-size: 30%;\n}\n\n.indicator-2 {\n animation: indeterminate-2 2s infinite;\n inline-size: 60%;\n}\n\n.indicator-1,\n.indicator-2 {\n position: absolute;\n animation-timing-function: cubic-bezier(0.4, 0, 0.6, 1);\n background-color: var(--vvd-color-neutral-100);\n block-size: 100%;\n opacity: 0;\n}\n.connotation-pacific .indicator-1,\n.connotation-pacific .indicator-2 {\n background-image: var(--_connotation-color-primary);\n}\n.paused .indicator-1,\n.paused .indicator-2 {\n animation-play-state: paused;\n background-color: var(--_connotation-color-primary);\n}\n.reverse .indicator-1,\n.reverse .indicator-2 {\n animation-direction: reverse;\n}\n\n@keyframes indeterminate-1 {\n 0% {\n opacity: 1;\n transform: translateX(-100%);\n }\n 70% {\n opacity: 1;\n transform: translateX(300%);\n }\n 70.01% {\n opacity: 0;\n }\n 100% {\n opacity: 0;\n transform: translateX(300%);\n }\n}\n@keyframes indeterminate-2 {\n 0% {\n opacity: 0;\n transform: translateX(-150%);\n }\n 29.99% {\n opacity: 0;\n }\n 30% {\n opacity: 1;\n transform: translateX(-150%);\n }\n 100% {\n opacity: 1;\n transform: translateX(166.66%);\n }\n}";
|
|
11
11
|
|
|
12
12
|
var classof = classofRaw;
|
|
13
13
|
|
package/progress-ring/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { B as BaseProgress } from '../shared/base-progress.js';
|
|
|
3
3
|
import { w as when } from '../shared/when.js';
|
|
4
4
|
import { c as classNames } from '../shared/class-names.js';
|
|
5
5
|
|
|
6
|
-
var css_248z = "/**\n * Do not edit directly\n * Generated on
|
|
6
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Sun, 25 Sep 2022 05:00:43 GMT\n */\n.base {\n align-items: center;\n block-size: var(--_density);\n color: var(--_appearance-color-text);\n inline-size: var(--_density);\n outline: none;\n}\n.base.connotation-cta {\n --_connotation-color-primary: var(--vvd-color-cta-500);\n}\n.base.connotation-alert {\n --_connotation-color-primary: var(--vvd-color-alert-500);\n}\n.base.connotation-success {\n --_connotation-color-primary: var(--vvd-color-success-500);\n}\n.base:not(.connotation-cta, .connotation-alert, .connotation-success) {\n --_connotation-color-primary: var(--vvd-color-canvas-text);\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(:disabled, .disabled) {\n --_appearance-color-text: var(--vvd-color-neutral-400);\n --_appearance-color-fill: transaprent;\n --_appearance-color-outline: transaprent;\n}\n.base.density-5 {\n --_density: calc(5 * 4px);\n}\n.base.density-6 {\n --_density: calc(6 * 4px);\n}\n.base.density-7 {\n --_density: calc(7 * 4px);\n}\n.base.density-8 {\n --_density: calc(8 * 4px);\n}\n.base.density-9 {\n --_density: calc(9 * 4px);\n}\n.base.density-11 {\n --_density: calc(11 * 4px);\n}\n.base.density-12 {\n --_density: calc(12 * 4px);\n}\n.base.density-13 {\n --_density: calc(13 * 4px);\n}\n.base:not(.density-5, .density-6, .density-7, .density-8, .density-9, .density-11, .density-12, .density-13) {\n --_density: calc(10 * 4px);\n}\n\n.progress {\n width: 100%;\n height: 100%;\n}\n\n.background {\n fill: none;\n stroke: transparent;\n stroke-width: 2px;\n}\n\n.determinate {\n fill: none;\n stroke: currentColor;\n stroke-linecap: round;\n stroke-width: 2px;\n transform: rotate(-90deg);\n transform-origin: 50% 50%;\n transition: all 0.2s ease-in-out;\n}\n\n.indeterminate-indicator-1 {\n animation: spin-infinite 2s linear infinite;\n fill: none;\n stroke: currentColor;\n stroke-linecap: round;\n stroke-width: 2px;\n transform: rotate(-90deg);\n transform-origin: 50% 50%;\n transition: all 0.2s ease-in-out;\n}\n\n.base.paused .indeterminate-indicator-1 {\n animation-play-state: paused;\n}\n\n@keyframes spin-infinite {\n 0% {\n stroke-dasharray: 0.01px 43.97px;\n transform: rotate(0deg);\n }\n 50% {\n stroke-dasharray: 21.99px 21.99px;\n transform: rotate(450deg);\n }\n 100% {\n stroke-dasharray: 0.01px 43.97px;\n transform: rotate(1080deg);\n }\n}";
|
|
7
7
|
|
|
8
8
|
class ProgressRing extends BaseProgress {}
|
|
9
9
|
|
package/shared/anchor.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { F as FoundationElement, _ as __decorate, a as attr, o as observable } from './index.js';
|
|
2
2
|
import { a as applyMixins } from './apply-mixins.js';
|
|
3
|
-
import { A as ARIAGlobalStatesAndProperties
|
|
3
|
+
import { A as ARIAGlobalStatesAndProperties } from './aria-global.js';
|
|
4
|
+
import { S as StartEnd } from './start-end.js';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* An Anchor Custom HTML Element.
|
package/shared/aria-global.js
CHANGED
|
@@ -1,51 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { r as ref } from './ref.js';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* A mixin class implementing start and end elements.
|
|
6
|
-
* These are generally used to decorate text elements with icons or other visual indicators.
|
|
7
|
-
* @public
|
|
8
|
-
*/
|
|
9
|
-
class StartEnd {
|
|
10
|
-
handleStartContentChange() {
|
|
11
|
-
this.startContainer.classList.toggle("start", this.start.assignedNodes().length > 0);
|
|
12
|
-
}
|
|
13
|
-
handleEndContentChange() {
|
|
14
|
-
this.endContainer.classList.toggle("end", this.end.assignedNodes().length > 0);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* The template for the end element.
|
|
19
|
-
* For use with {@link StartEnd}
|
|
20
|
-
*
|
|
21
|
-
* @public
|
|
22
|
-
* @deprecated - use endSlotTemplate
|
|
23
|
-
*/
|
|
24
|
-
html `
|
|
25
|
-
<span part="end" ${ref("endContainer")}>
|
|
26
|
-
<slot
|
|
27
|
-
name="end"
|
|
28
|
-
${ref("end")}
|
|
29
|
-
@slotchange="${x => x.handleEndContentChange()}"
|
|
30
|
-
></slot>
|
|
31
|
-
</span>
|
|
32
|
-
`;
|
|
33
|
-
/**
|
|
34
|
-
* The template for the start element.
|
|
35
|
-
* For use with {@link StartEnd}
|
|
36
|
-
*
|
|
37
|
-
* @public
|
|
38
|
-
* @deprecated - use startSlotTemplate
|
|
39
|
-
*/
|
|
40
|
-
html `
|
|
41
|
-
<span part="start" ${ref("startContainer")}>
|
|
42
|
-
<slot
|
|
43
|
-
name="start"
|
|
44
|
-
${ref("start")}
|
|
45
|
-
@slotchange="${x => x.handleStartContentChange()}"
|
|
46
|
-
></slot>
|
|
47
|
-
</span>
|
|
48
|
-
`;
|
|
1
|
+
import { _ as __decorate, a as attr } from './index.js';
|
|
49
2
|
|
|
50
3
|
/**
|
|
51
4
|
* Some states and properties are applicable to all host language elements regardless of whether a role is applied.
|
|
@@ -116,4 +69,4 @@ __decorate([
|
|
|
116
69
|
attr({ attribute: "aria-roledescription" })
|
|
117
70
|
], ARIAGlobalStatesAndProperties.prototype, "ariaRoledescription", void 0);
|
|
118
71
|
|
|
119
|
-
export { ARIAGlobalStatesAndProperties as A
|
|
72
|
+
export { ARIAGlobalStatesAndProperties as A };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as __decorate, o as observable } from './index.js';
|
|
2
2
|
import { A as Anchor, D as DelegatesARIALink } from './anchor.js';
|
|
3
3
|
import { a as applyMixins } from './apply-mixins.js';
|
|
4
|
-
import { S as StartEnd } from './
|
|
4
|
+
import { S as StartEnd } from './start-end.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* A Breadcrumb Item Custom HTML Element.
|
package/shared/button.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { F as FoundationElement, _ as __decorate, a as attr, o as observable } from './index.js';
|
|
2
2
|
import { a as applyMixins } from './apply-mixins.js';
|
|
3
3
|
import { F as FormAssociated } from './form-associated.js';
|
|
4
|
-
import { A as ARIAGlobalStatesAndProperties
|
|
4
|
+
import { A as ARIAGlobalStatesAndProperties } from './aria-global.js';
|
|
5
|
+
import { S as StartEnd } from './start-end.js';
|
|
5
6
|
|
|
6
7
|
class _Button extends FoundationElement {
|
|
7
8
|
}
|