@vonage/vivid 2.36.3 → 3.0.0-next.100
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/README.md +144 -0
- package/accordion/index.js +52 -0
- package/accordion-item/index.js +118 -0
- package/action-group/index.js +41 -0
- package/avatar/index.js +61 -0
- package/badge/index.js +51 -0
- package/banner/index.js +128 -0
- package/breadcrumb/index.js +103 -0
- package/breadcrumb-item/index.js +59 -0
- package/button/index.js +24 -0
- package/calendar/index.js +1526 -0
- package/calendar-event/index.js +112 -0
- package/card/index.js +114 -0
- package/checkbox/index.js +179 -0
- package/dialog/index.js +230 -0
- package/divider/index.js +4 -0
- package/elevation/index.js +3 -0
- package/fab/index.js +100 -0
- package/focus/index.js +18 -0
- package/header/index.js +61 -0
- package/icon/index.js +36 -0
- package/index.d.ts +2 -0
- package/index.js +76 -64
- package/layout/index.js +43 -0
- package/lib/accordion/accordion.d.ts +9 -0
- package/lib/accordion/accordion.template.d.ts +4 -0
- package/lib/accordion/index.d.ts +2 -0
- package/lib/accordion-item/accordion-item.d.ts +13 -0
- package/lib/accordion-item/accordion-item.template.d.ts +4 -0
- package/lib/accordion-item/index.d.ts +4 -0
- package/lib/action-group/action-group.d.ts +10 -0
- package/lib/action-group/action-group.template.d.ts +4 -0
- package/lib/action-group/index.d.ts +2 -0
- package/lib/avatar/avatar.d.ts +15 -0
- package/lib/avatar/avatar.template.d.ts +4 -0
- package/lib/avatar/index.d.ts +3 -0
- package/lib/badge/badge.d.ts +15 -0
- package/lib/badge/badge.template.d.ts +4 -0
- package/lib/badge/index.d.ts +3 -0
- package/lib/banner/banner.d.ts +20 -0
- package/lib/banner/banner.template.d.ts +4 -0
- package/lib/banner/index.d.ts +3 -0
- package/lib/breadcrumb/breadcrumb.d.ts +3 -0
- package/lib/breadcrumb/breadcrumb.template.d.ts +4 -0
- package/lib/breadcrumb/index.d.ts +2 -0
- package/lib/breadcrumb-item/breadcrumb-item.d.ts +5 -0
- package/lib/breadcrumb-item/breadcrumb-item.template.d.ts +4 -0
- package/lib/breadcrumb-item/index.d.ts +4 -0
- package/lib/button/button.d.ts +18 -0
- package/lib/button/button.template.d.ts +4 -0
- package/lib/button/index.d.ts +4 -0
- package/lib/calendar/calendar.d.ts +13 -0
- package/lib/calendar/calendar.template.d.ts +4 -0
- package/lib/calendar/helpers/calendar.date-functions.d.ts +2 -0
- package/lib/calendar/helpers/calendar.event-context.d.ts +6 -0
- package/lib/calendar/helpers/calendar.keyboard-interactions.d.ts +9 -0
- package/lib/calendar/index.d.ts +2 -0
- package/lib/calendar-event/calendar-event.d.ts +14 -0
- package/lib/calendar-event/calendar-event.template.d.ts +4 -0
- package/lib/calendar-event/index.d.ts +2 -0
- package/lib/card/card.d.ts +10 -0
- package/lib/card/card.template.d.ts +4 -0
- package/lib/card/index.d.ts +4 -0
- package/lib/checkbox/checkbox.d.ts +5 -0
- package/lib/checkbox/checkbox.template.d.ts +4 -0
- package/lib/checkbox/index.d.ts +4 -0
- package/lib/components.d.ts +38 -0
- package/lib/dialog/dialog.d.ts +20 -0
- package/lib/dialog/dialog.template.d.ts +4 -0
- package/lib/dialog/index.d.ts +5 -0
- package/lib/divider/divider.d.ts +3 -0
- package/lib/divider/divider.template.d.ts +4 -0
- package/lib/divider/index.d.ts +2 -0
- package/lib/elevation/elevation.d.ts +5 -0
- package/lib/elevation/elevation.template.d.ts +4 -0
- package/lib/elevation/index.d.ts +2 -0
- package/lib/enums.d.ts +59 -0
- package/lib/fab/fab.d.ts +13 -0
- package/lib/fab/fab.template.d.ts +4 -0
- package/lib/fab/index.d.ts +4 -0
- package/lib/focus/focus.d.ts +3 -0
- package/lib/focus/focus.template.d.ts +4 -0
- package/lib/focus/index.d.ts +2 -0
- package/lib/header/header.d.ts +5 -0
- package/lib/header/header.template.d.ts +4 -0
- package/lib/header/index.d.ts +3 -0
- package/lib/icon/icon.d.ts +12 -0
- package/lib/icon/icon.placeholder.d.ts +1 -0
- package/lib/icon/icon.template.d.ts +4 -0
- package/lib/icon/index.d.ts +2 -0
- package/lib/layout/index.d.ts +2 -0
- package/lib/layout/layout.d.ts +16 -0
- package/lib/layout/layout.template.d.ts +4 -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/lib/listbox-option/index.d.ts +4 -0
- package/lib/listbox-option/listbox-option.d.ts +9 -0
- package/lib/listbox-option/listbox-option.template.d.ts +4 -0
- package/lib/menu/index.d.ts +12 -0
- package/lib/menu/menu.d.ts +10 -0
- package/lib/menu/menu.template.d.ts +3 -0
- 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/lib/nav/index.d.ts +2 -0
- package/lib/nav/nav.d.ts +3 -0
- package/lib/nav/nav.template.d.ts +4 -0
- package/lib/nav-disclosure/index.d.ts +4 -0
- package/lib/nav-disclosure/nav-disclosure.d.ts +10 -0
- package/lib/nav-disclosure/nav-disclosure.template.d.ts +4 -0
- package/lib/nav-item/index.d.ts +4 -0
- package/lib/nav-item/nav-item.d.ts +6 -0
- package/lib/nav-item/nav-item.template.d.ts +4 -0
- package/lib/note/index.d.ts +2 -0
- package/lib/note/note.d.ts +10 -0
- package/lib/note/note.template.d.ts +5 -0
- package/lib/number-field/index.d.ts +4 -0
- package/lib/number-field/number-field.d.ts +14 -0
- package/lib/number-field/number-field.template.d.ts +4 -0
- package/lib/popup/index.d.ts +4 -0
- package/lib/popup/popup.d.ts +18 -0
- package/lib/popup/popup.template.d.ts +4 -0
- package/lib/progress/index.d.ts +2 -0
- package/lib/progress/progress.d.ts +9 -0
- package/lib/progress/progress.template.d.ts +5 -0
- package/lib/progress-ring/index.d.ts +2 -0
- package/lib/progress-ring/progress-ring.d.ts +7 -0
- package/lib/progress-ring/progress-ring.template.d.ts +4 -0
- package/lib/radio/index.d.ts +3 -0
- package/lib/radio/radio.d.ts +4 -0
- package/lib/radio/radio.template.d.ts +4 -0
- package/lib/radio-group/index.d.ts +10 -0
- package/lib/radio-group/radio-group.d.ts +4 -0
- package/lib/radio-group/radio-group.template.d.ts +4 -0
- package/lib/side-drawer/index.d.ts +2 -0
- package/lib/side-drawer/side-drawer.d.ts +9 -0
- package/lib/side-drawer/side-drawer.template.d.ts +4 -0
- package/lib/slider/index.d.ts +3 -0
- package/lib/slider/slider.d.ts +4 -0
- package/lib/slider/slider.template.d.ts +4 -0
- package/lib/switch/index.d.ts +4 -0
- package/lib/switch/switch.d.ts +7 -0
- package/lib/switch/switch.template.d.ts +4 -0
- package/lib/text-anchor/index.d.ts +2 -0
- package/lib/text-anchor/text-anchor.d.ts +7 -0
- package/lib/text-anchor/text-anchor.template.d.ts +4 -0
- package/lib/text-area/index.d.ts +4 -0
- package/lib/text-area/text-area.d.ts +9 -0
- package/lib/text-area/text-area.template.d.ts +4 -0
- package/lib/text-field/index.d.ts +4 -0
- package/lib/text-field/text-field.d.ts +14 -0
- package/lib/text-field/text-field.template.d.ts +5 -0
- package/lib/tooltip/index.d.ts +3 -0
- package/lib/tooltip/tooltip.d.ts +8 -0
- package/lib/tooltip/tooltip.template.d.ts +4 -0
- package/listbox/index.js +1090 -0
- package/listbox-option/index.js +22 -0
- package/menu/index.js +371 -0
- package/menu-item/index.js +21 -0
- package/nav/index.js +17 -0
- package/nav-disclosure/index.js +82 -0
- package/nav-item/index.js +46 -0
- package/note/index.js +59 -0
- package/number-field/index.js +461 -0
- package/package.json +65 -323
- package/popup/index.js +27 -0
- package/progress/index.js +97 -0
- package/progress-ring/index.js +76 -0
- package/radio/index.js +47 -0
- package/radio-group/index.js +435 -0
- package/shared/_has.js +58 -0
- package/shared/affix.js +24 -0
- package/shared/anchor.js +86 -0
- package/shared/apply-mixins.js +23 -0
- package/shared/aria-global.js +72 -0
- package/shared/aria.js +9 -0
- package/shared/base-progress.js +70 -0
- package/shared/breadcrumb-item.js +25 -0
- package/shared/button.js +200 -0
- package/shared/calendar-event.js +19 -0
- package/shared/class-names.js +15 -0
- package/shared/design-system/index.d.ts +3 -0
- package/shared/dialog-polyfill.esm.js +858 -0
- package/shared/direction.js +20 -0
- package/shared/dom.js +8 -0
- package/shared/enums.js +70 -0
- package/shared/es.object.assign.js +69 -0
- package/shared/es.regexp.to-string.js +59 -0
- package/shared/export.js +1017 -0
- package/shared/focus.js +5 -0
- package/shared/focus2.js +11 -0
- package/shared/form-associated.js +466 -0
- package/shared/form-elements.js +331 -0
- package/shared/icon.js +1361 -0
- package/shared/index.js +5027 -0
- package/shared/index2.js +107 -0
- package/shared/index3.js +31 -0
- package/shared/index4.js +77 -0
- package/shared/index5.js +261 -0
- package/shared/index6.js +1525 -0
- package/shared/index7.js +349 -0
- package/shared/iterators.js +61 -0
- package/shared/key-codes.js +97 -0
- package/shared/numbers.js +25 -0
- package/shared/object-keys.js +13 -0
- package/shared/patterns/affix.d.ts +9 -0
- package/shared/patterns/focus.d.ts +3 -0
- package/shared/patterns/form-elements/form-elements.d.ts +28 -0
- package/shared/patterns/form-elements/index.d.ts +1 -0
- package/shared/patterns/index.d.ts +3 -0
- package/shared/radio.js +127 -0
- package/shared/ref.js +41 -0
- package/shared/slotted.js +119 -0
- package/shared/start-end.js +50 -0
- package/shared/string-trim.js +40 -0
- package/shared/text-anchor.js +10 -0
- package/shared/text-anchor.template.js +55 -0
- package/shared/to-string.js +51 -0
- package/shared/web.dom-collections.iterator.js +472 -0
- package/shared/when.js +15 -0
- package/side-drawer/index.js +89 -0
- package/slider/index.js +596 -0
- package/styles/core/all.css +75 -0
- package/styles/core/theme.css +11 -0
- package/styles/core/typography.css +69 -0
- package/styles/fonts/SpeziaCompleteVariableItalicWeb.woff2 +0 -0
- package/styles/fonts/SpeziaCompleteVariableUprightWeb.woff2 +0 -0
- package/styles/fonts/SpeziaMonoCompleteVariableWeb.woff2 +0 -0
- package/styles/fonts/spezia.css +20 -0
- package/styles/tokens/theme-dark.css +230 -0
- package/styles/tokens/theme-light.css +230 -0
- package/switch/index.js +153 -0
- package/text-anchor/index.js +28 -0
- package/text-area/index.js +289 -0
- package/text-field/index.js +130 -0
- package/tooltip/index.js +65 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { F as FoundationElement, _ as __decorate, o as observable, h as html, d as designSystem } from '../shared/index.js';
|
|
2
|
+
import { s as slotted, e as elements } from '../shared/slotted.js';
|
|
3
|
+
import { B as BreadcrumbItem } from '../shared/breadcrumb-item.js';
|
|
4
|
+
import '../shared/anchor.js';
|
|
5
|
+
import '../shared/apply-mixins.js';
|
|
6
|
+
import '../shared/aria-global.js';
|
|
7
|
+
import '../shared/start-end.js';
|
|
8
|
+
import '../shared/ref.js';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* A Breadcrumb Custom HTML Element.
|
|
12
|
+
* @slot - The default slot for the breadcrumb items
|
|
13
|
+
* @csspart list - The element wrapping the slotted items
|
|
14
|
+
*
|
|
15
|
+
* @public
|
|
16
|
+
*/
|
|
17
|
+
class Breadcrumb$1 extends FoundationElement {
|
|
18
|
+
slottedBreadcrumbItemsChanged() {
|
|
19
|
+
if (this.$fastController.isConnected) {
|
|
20
|
+
if (this.slottedBreadcrumbItems === undefined ||
|
|
21
|
+
this.slottedBreadcrumbItems.length === 0) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
const lastNode = this.slottedBreadcrumbItems[this.slottedBreadcrumbItems.length - 1];
|
|
25
|
+
this.slottedBreadcrumbItems.forEach((item) => {
|
|
26
|
+
const itemIsLastNode = item === lastNode;
|
|
27
|
+
this.setItemSeparator(item, itemIsLastNode);
|
|
28
|
+
this.setAriaCurrent(item, itemIsLastNode);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
setItemSeparator(item, isLastNode) {
|
|
33
|
+
if (item instanceof BreadcrumbItem) {
|
|
34
|
+
item.separator = !isLastNode;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Finds href on childnodes in the light DOM or shadow DOM.
|
|
39
|
+
* We look in the shadow DOM because we insert an anchor when breadcrumb-item has an href.
|
|
40
|
+
*/
|
|
41
|
+
findChildWithHref(node) {
|
|
42
|
+
var _a, _b;
|
|
43
|
+
if (node.childElementCount > 0) {
|
|
44
|
+
return node.querySelector("a[href]");
|
|
45
|
+
}
|
|
46
|
+
else if ((_a = node.shadowRoot) === null || _a === void 0 ? void 0 : _a.childElementCount) {
|
|
47
|
+
return (_b = node.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector("a[href]");
|
|
48
|
+
}
|
|
49
|
+
else
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Sets ARIA Current for the current node
|
|
54
|
+
* If child node with an anchor tag and with href is found then set aria-current to correct value for the child node,
|
|
55
|
+
* otherwise apply aria-current to the host element, with an href
|
|
56
|
+
*/
|
|
57
|
+
setAriaCurrent(item, isLastNode) {
|
|
58
|
+
const childNodeWithHref = this.findChildWithHref(item);
|
|
59
|
+
if (childNodeWithHref === null &&
|
|
60
|
+
item.hasAttribute("href") &&
|
|
61
|
+
item instanceof BreadcrumbItem) {
|
|
62
|
+
isLastNode
|
|
63
|
+
? item.setAttribute("aria-current", "page")
|
|
64
|
+
: item.removeAttribute("aria-current");
|
|
65
|
+
}
|
|
66
|
+
else if (childNodeWithHref !== null) {
|
|
67
|
+
isLastNode
|
|
68
|
+
? childNodeWithHref.setAttribute("aria-current", "page")
|
|
69
|
+
: childNodeWithHref.removeAttribute("aria-current");
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
__decorate([
|
|
74
|
+
observable
|
|
75
|
+
], Breadcrumb$1.prototype, "slottedBreadcrumbItems", void 0);
|
|
76
|
+
|
|
77
|
+
let _ = t => t,
|
|
78
|
+
_t;
|
|
79
|
+
const breadcrumbTemplate = () => html(_t || (_t = _`
|
|
80
|
+
<nav aria-label="breadcrumbs" class="base">
|
|
81
|
+
<div role="list" class="list">
|
|
82
|
+
<slot
|
|
83
|
+
${0}
|
|
84
|
+
></slot>
|
|
85
|
+
</div>
|
|
86
|
+
</nav>
|
|
87
|
+
`), slotted({
|
|
88
|
+
property: 'slottedBreadcrumbItems',
|
|
89
|
+
filter: elements()
|
|
90
|
+
}));
|
|
91
|
+
|
|
92
|
+
var css_248z = ".list {\n display: flex;\n}";
|
|
93
|
+
|
|
94
|
+
class Breadcrumb extends Breadcrumb$1 {}
|
|
95
|
+
|
|
96
|
+
const vividBreadcrumb = Breadcrumb.compose({
|
|
97
|
+
baseName: 'breadcrumb',
|
|
98
|
+
template: breadcrumbTemplate,
|
|
99
|
+
styles: css_248z
|
|
100
|
+
});
|
|
101
|
+
designSystem.register(vividBreadcrumb());
|
|
102
|
+
|
|
103
|
+
export { vividBreadcrumb };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import '../icon/index.js';
|
|
2
|
+
import '../focus/index.js';
|
|
3
|
+
import { _ as __decorate, a as attr, b as __metadata, h as html, d as designSystem } from '../shared/index.js';
|
|
4
|
+
import { B as BreadcrumbItem$1 } from '../shared/breadcrumb-item.js';
|
|
5
|
+
import { t as textAnchorTemplate } from '../shared/text-anchor.template.js';
|
|
6
|
+
import { w as when } from '../shared/when.js';
|
|
7
|
+
import { c as classNames } from '../shared/class-names.js';
|
|
8
|
+
import '../shared/icon.js';
|
|
9
|
+
import '../shared/export.js';
|
|
10
|
+
import '../shared/iterators.js';
|
|
11
|
+
import '../shared/to-string.js';
|
|
12
|
+
import '../shared/string-trim.js';
|
|
13
|
+
import '../shared/_has.js';
|
|
14
|
+
import '../shared/focus.js';
|
|
15
|
+
import '../shared/anchor.js';
|
|
16
|
+
import '../shared/apply-mixins.js';
|
|
17
|
+
import '../shared/aria-global.js';
|
|
18
|
+
import '../shared/start-end.js';
|
|
19
|
+
import '../shared/ref.js';
|
|
20
|
+
import '../shared/affix.js';
|
|
21
|
+
import '../shared/web.dom-collections.iterator.js';
|
|
22
|
+
import '../shared/object-keys.js';
|
|
23
|
+
import '../shared/focus2.js';
|
|
24
|
+
|
|
25
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Tue, 15 Nov 2022 13:39:19 GMT\n */\n.base {\n display: flex;\n align-items: center;\n color: var(--vvd-color-canvas-text);\n font: var(--vvd-typography-base);\n}\n.base vwc-icon {\n margin: 0 16px;\n color: var(--vvd-color-neutral-600);\n font-size: 12px;\n}\n\n.control {\n position: relative;\n font: inherit;\n}\n@supports selector(:focus-visible) {\n .control:focus {\n outline: none;\n }\n}\n.control:any-link {\n color: var(--vvd-color-cta-600);\n text-decoration: none;\n}\n.control:any-link:hover {\n text-decoration: underline;\n}\n\n.focus-indicator {\n --focus-inset: -4px -8px;\n --focus-stroke-gap-color: transparent;\n border-radius: 6px;\n}\n.control:not(:focus-visible) > .focus-indicator {\n display: none;\n}";
|
|
26
|
+
|
|
27
|
+
class BreadcrumbItem extends BreadcrumbItem$1 {
|
|
28
|
+
constructor() {
|
|
29
|
+
super();
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
__decorate([attr, __metadata("design:type", String)], BreadcrumbItem.prototype, "text", void 0);
|
|
33
|
+
|
|
34
|
+
let _2 = t => t,
|
|
35
|
+
_t,
|
|
36
|
+
_t2,
|
|
37
|
+
_t3,
|
|
38
|
+
_t4;
|
|
39
|
+
const getClasses = _ => classNames('base');
|
|
40
|
+
const BreadcrumbItemTemplate = (context, definition) => html(_t || (_t = _2`
|
|
41
|
+
<div role="listitem" class="${0}">
|
|
42
|
+
${0}
|
|
43
|
+
|
|
44
|
+
${0}
|
|
45
|
+
|
|
46
|
+
${0}
|
|
47
|
+
</div>`), getClasses, when(x => x.text && !x.href, html(_t2 || (_t2 = _2`${0}`), x => x.text)), when(x => x.text && x.href && x.href.length > 0, html(_t3 || (_t3 = _2`${0}`), textAnchorTemplate(context))), when(x => x.separator, html(_t4 || (_t4 = _2`<vwc-icon type="chevron-right-solid"></vwc-icon>`))));
|
|
48
|
+
|
|
49
|
+
const vividBreadcrumbItem = BreadcrumbItem.compose({
|
|
50
|
+
baseName: 'breadcrumb-item',
|
|
51
|
+
template: BreadcrumbItemTemplate,
|
|
52
|
+
styles: css_248z,
|
|
53
|
+
shadowOptions: {
|
|
54
|
+
delegatesFocus: true
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
designSystem.register(vividBreadcrumbItem());
|
|
58
|
+
|
|
59
|
+
export { vividBreadcrumbItem };
|
package/button/index.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import '../icon/index.js';
|
|
2
|
+
import '../focus/index.js';
|
|
3
|
+
import '../shared/index.js';
|
|
4
|
+
export { v as vividButton } from '../shared/index2.js';
|
|
5
|
+
import '../shared/button.js';
|
|
6
|
+
import '../shared/icon.js';
|
|
7
|
+
import '../shared/export.js';
|
|
8
|
+
import '../shared/iterators.js';
|
|
9
|
+
import '../shared/to-string.js';
|
|
10
|
+
import '../shared/string-trim.js';
|
|
11
|
+
import '../shared/_has.js';
|
|
12
|
+
import '../shared/when.js';
|
|
13
|
+
import '../shared/class-names.js';
|
|
14
|
+
import '../shared/focus.js';
|
|
15
|
+
import '../shared/web.dom-collections.iterator.js';
|
|
16
|
+
import '../shared/object-keys.js';
|
|
17
|
+
import '../shared/affix.js';
|
|
18
|
+
import '../shared/apply-mixins.js';
|
|
19
|
+
import '../shared/focus2.js';
|
|
20
|
+
import '../shared/ref.js';
|
|
21
|
+
import '../shared/form-associated.js';
|
|
22
|
+
import '../shared/key-codes.js';
|
|
23
|
+
import '../shared/aria-global.js';
|
|
24
|
+
import '../shared/start-end.js';
|