@vonage/vivid 3.39.0 → 3.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/index.js +2 -2
- package/accordion-item/index.js +2 -2
- package/alert/index.js +7 -5
- package/audio-player/index.js +33 -0
- package/avatar/index.js +2 -2
- package/badge/index.js +2 -2
- package/banner/index.js +9 -5
- package/breadcrumb/index.js +1 -1
- package/breadcrumb-item/index.js +3 -3
- package/button/index.js +5 -4
- package/calendar/index.js +1 -1
- package/calendar-event/index.js +1 -1
- package/card/index.js +4 -3
- package/checkbox/index.js +3 -3
- package/combobox/index.js +9 -7
- package/custom-elements.json +809 -5
- package/data-grid/index.js +3 -2
- package/date-picker/index.js +11 -9
- package/date-range-picker/index.js +11 -9
- package/dialog/index.js +10 -6
- package/divider/index.js +1 -1
- package/elevation/index.js +1 -1
- package/empty-state/index.js +2 -2
- package/fab/index.js +3 -3
- package/file-picker/index.js +6 -5
- package/focus/index.js +1 -1
- package/header/index.js +2 -2
- package/icon/index.js +1 -1
- package/index.js +60 -55
- package/layout/index.js +1 -1
- package/lib/alert/alert.d.ts +3 -1
- package/lib/alert/locale.d.ts +3 -0
- package/lib/audio-player/audio-player.d.ts +17 -0
- package/lib/audio-player/audio-player.template.d.ts +4 -0
- package/lib/audio-player/definition.d.ts +4 -0
- package/lib/audio-player/locale.d.ts +5 -0
- package/lib/banner/banner.d.ts +3 -1
- package/lib/banner/locale.d.ts +3 -0
- package/lib/card/card.d.ts +3 -0
- package/lib/card/card.template.d.ts +1 -1
- package/lib/card/definition.d.ts +1 -0
- package/lib/checkbox/checkbox.d.ts +2 -0
- package/lib/components.d.ts +2 -0
- package/lib/dialog/dialog.d.ts +4 -0
- package/lib/dialog/locale.d.ts +3 -0
- package/lib/enums.d.ts +2 -1
- package/lib/menu/menu.d.ts +1 -0
- package/lib/number-field/locale.d.ts +4 -0
- package/lib/number-field/number-field.d.ts +4 -2
- package/lib/progress/progress.d.ts +1 -0
- package/lib/progress-ring/progress-ring.d.ts +1 -0
- package/lib/radio/radio.d.ts +1 -0
- package/lib/selectable-box/definition.d.ts +3 -0
- package/lib/selectable-box/selectable-box.d.ts +12 -0
- package/lib/selectable-box/selectable-box.template.d.ts +4 -0
- package/lib/slider/definition.d.ts +1 -0
- package/lib/slider/slider.d.ts +5 -0
- package/lib/split-button/locale.d.ts +3 -0
- package/lib/split-button/split-button.d.ts +3 -1
- package/lib/text-area/text-area.d.ts +3 -0
- package/lib/text-field/text-field.d.ts +5 -2
- package/listbox/index.js +5 -4
- package/locales/en-GB.js +21 -0
- package/locales/en-US.js +21 -0
- package/locales/ja-JP.js +21 -0
- package/locales/zh-CN.js +21 -0
- package/menu/index.js +9 -8
- package/menu-item/index.js +3 -3
- package/nav/index.js +1 -1
- package/nav-disclosure/index.js +3 -3
- package/nav-item/index.js +3 -3
- package/note/index.js +2 -2
- package/number-field/index.js +8 -6
- package/option/index.js +3 -3
- package/package.json +1 -1
- package/pagination/index.js +6 -5
- package/popup/index.js +7 -6
- package/progress/index.js +1 -1
- package/progress-ring/index.js +1 -1
- package/radio/index.js +2 -2
- package/radio-group/index.js +2 -2
- package/select/index.js +10 -8
- package/selectable-box/index.js +23 -0
- package/shared/Reflector.js +65 -0
- package/shared/date-picker/calendar/segment.d.ts +21 -0
- package/shared/date-picker/date-picker-base.d.ts +1 -0
- package/shared/definition.js +3 -3
- package/shared/definition10.js +89 -227
- package/shared/definition11.js +151 -29
- package/shared/definition12.js +37 -766
- package/shared/definition13.js +747 -106
- package/shared/definition14.js +122 -192
- package/shared/definition15.js +156 -664
- package/shared/definition16.js +576 -1123
- package/shared/definition17.js +1278 -143
- package/shared/definition18.js +64 -298
- package/shared/definition19.js +358 -211
- package/shared/definition2.js +2 -2
- package/shared/definition20.js +259 -67
- package/shared/definition21.js +66 -58
- package/shared/definition22.js +43 -84
- package/shared/definition23.js +76 -2352
- package/shared/definition24.js +2362 -45
- package/shared/definition25.js +63 -27
- package/shared/definition26.js +24 -51
- package/shared/definition27.js +36 -813
- package/shared/definition28.js +837 -49
- package/shared/definition29.js +52 -89
- package/shared/definition3.js +1 -1
- package/shared/definition30.js +88 -24
- package/shared/definition31.js +25 -12
- package/shared/definition32.js +12 -52
- package/shared/definition33.js +28 -487
- package/shared/definition34.js +442 -197
- package/shared/definition35.js +260 -185
- package/shared/definition36.js +188 -69
- package/shared/definition37.js +72 -52
- package/shared/definition38.js +65 -421
- package/shared/definition39.js +435 -35
- package/shared/definition4.js +44 -16
- package/shared/definition40.js +32 -680
- package/shared/definition41.js +661 -77
- package/shared/definition42.js +103 -555
- package/shared/definition43.js +76 -103
- package/shared/definition44.js +522 -87
- package/shared/definition45.js +133 -22
- package/shared/definition46.js +131 -58
- package/shared/definition47.js +16 -501
- package/shared/definition48.js +69 -23
- package/shared/definition49.js +477 -108
- package/shared/definition5.js +160 -44
- package/shared/definition50.js +25 -271
- package/shared/definition51.js +103 -122
- package/shared/definition52.js +277 -122
- package/shared/definition53.js +274 -103
- package/shared/definition54.js +126 -71
- package/shared/definition55.js +128 -294
- package/shared/definition56.js +91 -13
- package/shared/definition57.js +298 -39
- package/shared/definition58.js +11 -175
- package/shared/definition59.js +47 -0
- package/shared/definition6.js +43 -33
- package/shared/definition60.js +181 -0
- package/shared/definition7.js +39 -105
- package/shared/definition8.js +122 -38
- package/shared/definition9.js +56 -89
- package/shared/enums.js +72 -0
- package/shared/icon.js +2 -2
- package/shared/index2.js +28 -1
- package/shared/key-codes.js +1 -1
- package/shared/key-codes2.js +9 -0
- package/shared/listbox.js +3 -8
- package/shared/localization/Locale.d.ts +12 -0
- package/shared/patterns/form-elements/form-elements.d.ts +6 -6
- package/shared/presentationDate.js +196 -143
- package/shared/radio.js +7 -0
- package/shared/text-field.js +1 -1
- package/shared/utils/Reflector.d.ts +8 -0
- package/shared/utils/randomId.d.ts +1 -0
- package/side-drawer/index.js +1 -1
- package/slider/index.js +3 -3
- package/split-button/index.js +6 -3
- package/style.css +889 -722
- 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/styles/tokens/vivid-2-compat.css +1 -1
- package/switch/index.js +3 -3
- package/tab/index.js +3 -3
- package/tab-panel/index.js +1 -1
- package/tabs/index.js +5 -5
- package/tag/index.js +3 -3
- package/tag-group/index.js +1 -1
- package/text-area/index.js +4 -3
- package/text-field/index.js +4 -3
- package/toggletip/index.js +8 -7
- package/tooltip/index.js +8 -7
- package/tree-item/index.js +3 -3
- package/tree-view/index.js +1 -1
- package/vivid.api.json +392 -0
package/shared/definition8.js
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import { a as attr, h as html, r as registerFactory } from './index.js';
|
|
2
|
-
import { a as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
1
|
+
import { a as attr, F as FoundationElement, o as observable, h as html, r as registerFactory } from './index.js';
|
|
2
|
+
import { B as Button, a as buttonRegistries } from './definition11.js';
|
|
3
|
+
import { a as iconRegistries } from './definition26.js';
|
|
4
|
+
import { C as Connotation } from './enums.js';
|
|
5
|
+
import { A as AffixIcon, a as affixIconTemplateFactory, I as IconWrapper } from './affix.js';
|
|
6
|
+
import './index2.js';
|
|
7
|
+
import { L as Localized } from './localized.js';
|
|
8
|
+
import { a as applyMixins } from './apply-mixins.js';
|
|
9
|
+
import { s as slotted } from './slotted.js';
|
|
7
10
|
import { w as when } from './when.js';
|
|
8
11
|
import { c as classNames } from './class-names.js';
|
|
9
12
|
|
|
10
|
-
const styles = "/**\n * Do not edit directly\n * Generated on
|
|
13
|
+
const styles = "/**\n * Do not edit directly\n * Generated on Wed, 22 Nov 2023 16:09:43 GMT\n */\n:host {\n display: block;\n}\n\n.control {\n overflow: hidden;\n max-height: 160px;\n background-color: var(--_appearance-color-fill);\n color: var(--_appearance-color-text);\n transition: max-height var(--transition-delay, 200ms);\n}\n.control.connotation-success {\n /* @cssprop [--vvd-banner-success-primary=var(--vvd-color-success-500)] */\n --_connotation-color-primary: var(--vvd-banner-success-primary, var(--vvd-color-success-500));\n /* @cssprop [--vvd-banner-success-primary-text=var(--vvd-color-canvas)] */\n --_connotation-color-primary-text: var(--vvd-banner-success-primary-text, var(--vvd-color-canvas));\n}\n.control.connotation-alert {\n /* @cssprop [--vvd-banner-alert-primary=var(--vvd-color-alert-500)] */\n --_connotation-color-primary: var(--vvd-banner-alert-primary, var(--vvd-color-alert-500));\n /* @cssprop [--vvd-banner-alert-primary-text=var(--vvd-color-canvas)] */\n --_connotation-color-primary-text: var(--vvd-banner-alert-primary-text, var(--vvd-color-canvas));\n}\n.control.connotation-announcement {\n /* @cssprop [--vvd-banner-announcement-primary=var(--vvd-color-announcement-500)] */\n --_connotation-color-primary: var(--vvd-banner-announcement-primary, var(--vvd-color-announcement-500));\n /* @cssprop [--vvd-banner-announcement-primary-text=var(--vvd-color-canvas)] */\n --_connotation-color-primary-text: var(--vvd-banner-announcement-primary-text, var(--vvd-color-canvas));\n}\n.control.connotation-warning {\n /* @cssprop [--vvd-banner-warning-primary=var(--vvd-color-warning-300)] */\n --_connotation-color-primary: var(--vvd-banner-warning-primary, var(--vvd-color-warning-300));\n /* @cssprop [--vvd-banner-warning-primary-text=var(--vvd-color-canvas-text)] */\n --_connotation-color-primary-text: var(--vvd-banner-warning-primary-text, var(--vvd-color-canvas-text));\n}\n.control:not(.connotation-success, .connotation-alert, .connotation-announcement, .connotation-warning) {\n /* @cssprop [--vvd-banner-information-primary=var(--vvd-color-information-500)] */\n --_connotation-color-primary: var(--vvd-banner-information-primary, var(--vvd-color-information-500));\n /* @cssprop [--vvd-banner-information-primary-text=var(--vvd-color-canvas)] */\n --_connotation-color-primary-text: var(--vvd-banner-information-primary-text, var(--vvd-color-canvas));\n}\n.control {\n --_appearance-color-text: var(--_connotation-color-primary-text);\n --_appearance-color-fill: var(--_connotation-color-primary);\n --_appearance-color-outline: transparent;\n}\n.control.removing {\n max-height: 0;\n}\n\n.header {\n display: flex;\n min-height: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) + 20));\n align-items: center;\n font: var(--vvd-typography-base-bold);\n inline-size: 100%;\n}\n.header .content {\n display: flex;\n flex-grow: 1;\n align-items: center;\n justify-content: center;\n column-gap: 16px;\n inline-size: 100%;\n padding-inline: 16px;\n}\n.header .content slot[name=icon] {\n flex-shrink: 0;\n font-size: 20px;\n line-height: 1;\n}\n.header .content .action-items {\n flex-shrink: 0;\n}\n.header .dismiss-button {\n flex-shrink: 0;\n margin-inline-end: 8px;\n}";
|
|
11
14
|
|
|
12
15
|
var __defProp = Object.defineProperty;
|
|
13
16
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -20,46 +23,127 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
20
23
|
__defProp(target, key, result);
|
|
21
24
|
return result;
|
|
22
25
|
};
|
|
23
|
-
|
|
26
|
+
const connotationIconMap = /* @__PURE__ */ new Map([
|
|
27
|
+
[Connotation.Information, "info-solid"],
|
|
28
|
+
[Connotation.Announcement, "megaphone-solid"],
|
|
29
|
+
[Connotation.Success, "check-circle-solid"],
|
|
30
|
+
[Connotation.Warning, "warning-solid"],
|
|
31
|
+
[Connotation.Alert, "error-solid"]
|
|
32
|
+
]);
|
|
33
|
+
const defaultConnotation = (connotation = Connotation.Information) => connotationIconMap.get(connotation);
|
|
34
|
+
class Banner extends FoundationElement {
|
|
24
35
|
constructor() {
|
|
25
|
-
super();
|
|
36
|
+
super(...arguments);
|
|
37
|
+
this.dismissButtonAriaLabel = null;
|
|
38
|
+
this.role = null;
|
|
39
|
+
this.removable = false;
|
|
40
|
+
this.#handleRemoveEnd = () => {
|
|
41
|
+
this.$emit("removed");
|
|
42
|
+
this.parentElement && this.parentElement.removeChild(this);
|
|
43
|
+
};
|
|
44
|
+
this.#closeOnKeyDown = (e) => {
|
|
45
|
+
if (e.key !== "Escape" || !this.removable) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
this.remove();
|
|
49
|
+
};
|
|
26
50
|
}
|
|
51
|
+
get conditionedIcon() {
|
|
52
|
+
return this.icon ?? defaultConnotation(this.connotation);
|
|
53
|
+
}
|
|
54
|
+
connectedCallback() {
|
|
55
|
+
super.connectedCallback();
|
|
56
|
+
this.addEventListener("keydown", this.#closeOnKeyDown);
|
|
57
|
+
}
|
|
58
|
+
disconnectedCallback() {
|
|
59
|
+
super.disconnectedCallback();
|
|
60
|
+
this.removeEventListener("keydown", this.#closeOnKeyDown);
|
|
61
|
+
}
|
|
62
|
+
remove() {
|
|
63
|
+
this.$emit("removing");
|
|
64
|
+
const banner = this.shadowRoot && this.shadowRoot.querySelector(".control");
|
|
65
|
+
if (banner) {
|
|
66
|
+
banner.classList.add("removing");
|
|
67
|
+
banner.addEventListener("transitionend", this.#handleRemoveEnd);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
#handleRemoveEnd;
|
|
71
|
+
#closeOnKeyDown;
|
|
27
72
|
}
|
|
73
|
+
__decorateClass([
|
|
74
|
+
attr({ attribute: "dismiss-aria-label" })
|
|
75
|
+
], Banner.prototype, "dismissButtonAriaLabel", 2);
|
|
28
76
|
__decorateClass([
|
|
29
77
|
attr
|
|
30
|
-
],
|
|
78
|
+
], Banner.prototype, "role", 2);
|
|
79
|
+
__decorateClass([
|
|
80
|
+
attr({ attribute: "action-href" })
|
|
81
|
+
], Banner.prototype, "actionHref", 2);
|
|
82
|
+
__decorateClass([
|
|
83
|
+
attr({ attribute: "action-text" })
|
|
84
|
+
], Banner.prototype, "actionText", 2);
|
|
85
|
+
__decorateClass([
|
|
86
|
+
attr({ mode: "boolean" })
|
|
87
|
+
], Banner.prototype, "removable", 2);
|
|
88
|
+
__decorateClass([
|
|
89
|
+
attr({ attribute: "aria-live" })
|
|
90
|
+
], Banner.prototype, "ariaLive", 2);
|
|
91
|
+
__decorateClass([
|
|
92
|
+
attr()
|
|
93
|
+
], Banner.prototype, "text", 2);
|
|
94
|
+
__decorateClass([
|
|
95
|
+
attr()
|
|
96
|
+
], Banner.prototype, "connotation", 2);
|
|
97
|
+
__decorateClass([
|
|
98
|
+
observable
|
|
99
|
+
], Banner.prototype, "actionItemsSlottedContent", 2);
|
|
100
|
+
applyMixins(Banner, AffixIcon);
|
|
101
|
+
applyMixins(Banner, Localized);
|
|
31
102
|
|
|
32
|
-
const getClasses = (_) => classNames(
|
|
33
|
-
|
|
34
|
-
|
|
103
|
+
const getClasses = (_) => classNames(
|
|
104
|
+
"control",
|
|
105
|
+
[`connotation-${_.connotation}`, !!_.connotation]
|
|
106
|
+
);
|
|
107
|
+
function renderDismissButton(buttonTag) {
|
|
35
108
|
return html`
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
109
|
+
<${buttonTag}
|
|
110
|
+
aria-label="${(x) => x.dismissButtonAriaLabel || x.locale.banner.dismissButtonLabel}"
|
|
111
|
+
part="vvd-theme-alternate"
|
|
112
|
+
size="condensed"
|
|
113
|
+
class="dismiss-button"
|
|
114
|
+
icon="close-line"
|
|
115
|
+
@click="${(x) => x.remove()}">
|
|
116
|
+
</${buttonTag}>`;
|
|
117
|
+
}
|
|
118
|
+
const BannerTemplate = (context) => {
|
|
119
|
+
const affixIconTemplate = affixIconTemplateFactory(context);
|
|
120
|
+
const buttonTag = context.tagFor(Button);
|
|
121
|
+
return html`
|
|
122
|
+
<div class="${getClasses}"
|
|
123
|
+
tabindex="${(x) => x.removable || x.actionItemsSlottedContent && x.actionItemsSlottedContent.length ? "0" : null}">
|
|
124
|
+
<header class="header">
|
|
125
|
+
<div class="content">
|
|
126
|
+
${(x) => affixIconTemplate(x.conditionedIcon, IconWrapper.Slot)}
|
|
127
|
+
<div class="banner-message"
|
|
128
|
+
role="${(x) => x.role ? x.role : "status"}"
|
|
129
|
+
aria-live="${(x) => x.ariaLive ? x.ariaLive : "polite"}">
|
|
130
|
+
${(x) => x.text}
|
|
131
|
+
</div>
|
|
132
|
+
<slot class="action-items" ${slotted("actionItemsSlottedContent")} name="action-items"></slot>
|
|
133
|
+
</div>
|
|
46
134
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
</div>`;
|
|
135
|
+
${when((x) => x.removable, renderDismissButton(buttonTag))}
|
|
136
|
+
</header>
|
|
137
|
+
</div>
|
|
138
|
+
`;
|
|
52
139
|
};
|
|
53
140
|
|
|
54
|
-
const
|
|
55
|
-
baseName: "
|
|
56
|
-
template:
|
|
57
|
-
styles
|
|
58
|
-
shadowOptions: {
|
|
59
|
-
delegatesFocus: true
|
|
60
|
-
}
|
|
141
|
+
const bannerDefinition = Banner.compose({
|
|
142
|
+
baseName: "banner",
|
|
143
|
+
template: BannerTemplate,
|
|
144
|
+
styles
|
|
61
145
|
});
|
|
62
|
-
const
|
|
63
|
-
const
|
|
146
|
+
const bannerRegistries = [bannerDefinition(), ...iconRegistries, ...buttonRegistries];
|
|
147
|
+
const registerBanner = registerFactory(bannerRegistries);
|
|
64
148
|
|
|
65
|
-
export {
|
|
149
|
+
export { bannerRegistries as a, bannerDefinition as b, registerBanner as r };
|
package/shared/definition9.js
CHANGED
|
@@ -1,98 +1,65 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { a as attr, h as html, r as registerFactory } from './index.js';
|
|
2
|
+
import { a as iconRegistries } from './definition26.js';
|
|
3
|
+
import { f as focusRegistries } from './definition58.js';
|
|
3
4
|
import { B as BreadcrumbItem$1 } from './breadcrumb-item.js';
|
|
5
|
+
import { t as textAnchorTemplate } from './text-anchor.template.js';
|
|
6
|
+
import { I as Icon } from './icon.js';
|
|
7
|
+
import { w as when } from './when.js';
|
|
8
|
+
import { c as classNames } from './class-names.js';
|
|
4
9
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
const lastNode = this.slottedBreadcrumbItems[this.slottedBreadcrumbItems.length - 1];
|
|
20
|
-
this.slottedBreadcrumbItems.forEach((item) => {
|
|
21
|
-
const itemIsLastNode = item === lastNode;
|
|
22
|
-
this.setItemSeparator(item, itemIsLastNode);
|
|
23
|
-
this.setAriaCurrent(item, itemIsLastNode);
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
setItemSeparator(item, isLastNode) {
|
|
28
|
-
if (item instanceof BreadcrumbItem$1) {
|
|
29
|
-
item.separator = !isLastNode;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Finds href on childnodes in the light DOM or shadow DOM.
|
|
34
|
-
* We look in the shadow DOM because we insert an anchor when breadcrumb-item has an href.
|
|
35
|
-
*/
|
|
36
|
-
findChildWithHref(node) {
|
|
37
|
-
var _a, _b;
|
|
38
|
-
if (node.childElementCount > 0) {
|
|
39
|
-
return node.querySelector("a[href]");
|
|
40
|
-
}
|
|
41
|
-
else if ((_a = node.shadowRoot) === null || _a === void 0 ? void 0 : _a.childElementCount) {
|
|
42
|
-
return (_b = node.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector("a[href]");
|
|
43
|
-
}
|
|
44
|
-
else
|
|
45
|
-
return null;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Sets ARIA Current for the current node
|
|
49
|
-
* If child node with an anchor tag and with href is found then set aria-current to correct value for the child node,
|
|
50
|
-
* otherwise apply aria-current to the host element, with an href
|
|
51
|
-
*/
|
|
52
|
-
setAriaCurrent(item, isLastNode) {
|
|
53
|
-
const childNodeWithHref = this.findChildWithHref(item);
|
|
54
|
-
if (childNodeWithHref === null &&
|
|
55
|
-
item.hasAttribute("href") &&
|
|
56
|
-
item instanceof BreadcrumbItem$1) {
|
|
57
|
-
isLastNode
|
|
58
|
-
? item.setAttribute("aria-current", "page")
|
|
59
|
-
: item.removeAttribute("aria-current");
|
|
60
|
-
}
|
|
61
|
-
else if (childNodeWithHref !== null) {
|
|
62
|
-
isLastNode
|
|
63
|
-
? childNodeWithHref.setAttribute("aria-current", "page")
|
|
64
|
-
: childNodeWithHref.removeAttribute("aria-current");
|
|
65
|
-
}
|
|
66
|
-
}
|
|
10
|
+
const styles = "/**\n * Do not edit directly\n * Generated on Wed, 22 Nov 2023 16:09:43 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 .separator {\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-visible {\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}";
|
|
11
|
+
|
|
12
|
+
var __defProp = Object.defineProperty;
|
|
13
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
14
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
15
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
16
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
17
|
+
if (decorator = decorators[i])
|
|
18
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
19
|
+
if (kind && result)
|
|
20
|
+
__defProp(target, key, result);
|
|
21
|
+
return result;
|
|
67
22
|
};
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
23
|
+
class BreadcrumbItem extends BreadcrumbItem$1 {
|
|
24
|
+
constructor() {
|
|
25
|
+
super();
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
__decorateClass([
|
|
29
|
+
attr
|
|
30
|
+
], BreadcrumbItem.prototype, "text", 2);
|
|
71
31
|
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
</div>
|
|
82
|
-
</nav>
|
|
83
|
-
`;
|
|
32
|
+
const getClasses = (_) => classNames("base");
|
|
33
|
+
const BreadcrumbItemTemplate = (context, definition) => {
|
|
34
|
+
const iconTag = context.tagFor(Icon);
|
|
35
|
+
return html`
|
|
36
|
+
<div role="listitem" class="${getClasses}">
|
|
37
|
+
${when(
|
|
38
|
+
(x) => x.text && !x.href,
|
|
39
|
+
html`${(x) => x.text}`
|
|
40
|
+
)}
|
|
84
41
|
|
|
85
|
-
|
|
42
|
+
${when(
|
|
43
|
+
(x) => x.text && x.href && x.href.length > 0,
|
|
44
|
+
html`${textAnchorTemplate(context)}`
|
|
45
|
+
)}
|
|
86
46
|
|
|
87
|
-
|
|
88
|
-
|
|
47
|
+
${when(
|
|
48
|
+
(x) => x.separator,
|
|
49
|
+
html`<${iconTag} class="separator" name="chevron-right-solid"></${iconTag}>`
|
|
50
|
+
)}
|
|
51
|
+
</div>`;
|
|
52
|
+
};
|
|
89
53
|
|
|
90
|
-
const
|
|
91
|
-
baseName: "breadcrumb",
|
|
92
|
-
template:
|
|
93
|
-
styles
|
|
54
|
+
const breadcrumbItemDefinition = BreadcrumbItem.compose({
|
|
55
|
+
baseName: "breadcrumb-item",
|
|
56
|
+
template: BreadcrumbItemTemplate,
|
|
57
|
+
styles,
|
|
58
|
+
shadowOptions: {
|
|
59
|
+
delegatesFocus: true
|
|
60
|
+
}
|
|
94
61
|
});
|
|
95
|
-
const
|
|
96
|
-
const
|
|
62
|
+
const breadcrumbItemRegistries = [breadcrumbItemDefinition(), ...iconRegistries, ...focusRegistries];
|
|
63
|
+
const registerBreadcrumbItem = registerFactory(breadcrumbItemRegistries);
|
|
97
64
|
|
|
98
|
-
export {
|
|
65
|
+
export { breadcrumbItemRegistries as a, breadcrumbItemDefinition as b, registerBreadcrumbItem as r };
|
package/shared/enums.js
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
var Connotation = /* @__PURE__ */ ((Connotation2) => {
|
|
2
|
+
Connotation2["Accent"] = "accent";
|
|
3
|
+
Connotation2["CTA"] = "cta";
|
|
4
|
+
Connotation2["Success"] = "success";
|
|
5
|
+
Connotation2["Alert"] = "alert";
|
|
6
|
+
Connotation2["Warning"] = "warning";
|
|
7
|
+
Connotation2["Information"] = "information";
|
|
8
|
+
Connotation2["Announcement"] = "announcement";
|
|
9
|
+
return Connotation2;
|
|
10
|
+
})(Connotation || {});
|
|
11
|
+
var ConnotationDecorative = /* @__PURE__ */ ((ConnotationDecorative2) => {
|
|
12
|
+
ConnotationDecorative2["Pacific"] = "pacific";
|
|
13
|
+
return ConnotationDecorative2;
|
|
14
|
+
})(ConnotationDecorative || {});
|
|
15
|
+
var Shape = /* @__PURE__ */ ((Shape2) => {
|
|
16
|
+
Shape2["Rounded"] = "rounded";
|
|
17
|
+
Shape2["Pill"] = "pill";
|
|
18
|
+
Shape2["Circled"] = "circled";
|
|
19
|
+
Shape2["Sharp"] = "sharp";
|
|
20
|
+
return Shape2;
|
|
21
|
+
})(Shape || {});
|
|
22
|
+
var Appearance = /* @__PURE__ */ ((Appearance2) => {
|
|
23
|
+
Appearance2["Filled"] = "filled";
|
|
24
|
+
Appearance2["Outlined"] = "outlined";
|
|
25
|
+
Appearance2["Duotone"] = "duotone";
|
|
26
|
+
Appearance2["Fieldset"] = "fieldset";
|
|
27
|
+
Appearance2["Subtle"] = "subtle";
|
|
28
|
+
Appearance2["Ghost"] = "ghost";
|
|
29
|
+
Appearance2["Listitem"] = "listitem";
|
|
30
|
+
Appearance2["Elevated"] = "elevated";
|
|
31
|
+
return Appearance2;
|
|
32
|
+
})(Appearance || {});
|
|
33
|
+
var Size = /* @__PURE__ */ ((Size2) => {
|
|
34
|
+
Size2["UltraCondensed"] = "ultra-condensed";
|
|
35
|
+
Size2["SuperCondensed"] = "super-condensed";
|
|
36
|
+
Size2["ExtraCondensed"] = "extra-condensed";
|
|
37
|
+
Size2["SemiCondensed"] = "semi-condensed";
|
|
38
|
+
Size2["Condensed"] = "condensed";
|
|
39
|
+
Size2["Normal"] = "normal";
|
|
40
|
+
Size2["SemiExpanded"] = "semi-expanded";
|
|
41
|
+
Size2["Expanded"] = "expanded";
|
|
42
|
+
Size2["ExtraExpanded"] = "extra-expanded";
|
|
43
|
+
Size2["SuperExpanded"] = "super-expanded";
|
|
44
|
+
Size2["UltraExpanded"] = "ultra-expanded";
|
|
45
|
+
return Size2;
|
|
46
|
+
})(Size || {});
|
|
47
|
+
var LayoutSize = /* @__PURE__ */ ((LayoutSize2) => {
|
|
48
|
+
LayoutSize2["Small"] = "small";
|
|
49
|
+
LayoutSize2["Medium"] = "medium";
|
|
50
|
+
LayoutSize2["Large"] = "large";
|
|
51
|
+
return LayoutSize2;
|
|
52
|
+
})(LayoutSize || {});
|
|
53
|
+
var Position = /* @__PURE__ */ ((Position2) => {
|
|
54
|
+
Position2["Top"] = "TOP";
|
|
55
|
+
Position2["Bottom"] = "BOTTOM";
|
|
56
|
+
Position2["Start"] = "START";
|
|
57
|
+
Position2["Center"] = "CENTER";
|
|
58
|
+
Position2["End"] = "END";
|
|
59
|
+
return Position2;
|
|
60
|
+
})(Position || {});
|
|
61
|
+
var Role = /* @__PURE__ */ ((Role2) => {
|
|
62
|
+
Role2["Status"] = "status";
|
|
63
|
+
Role2["Alert"] = "alert";
|
|
64
|
+
return Role2;
|
|
65
|
+
})(Role || {});
|
|
66
|
+
var AriaLive = /* @__PURE__ */ ((AriaLive2) => {
|
|
67
|
+
AriaLive2["Polite"] = "polite";
|
|
68
|
+
AriaLive2["Assertive"] = "assertive";
|
|
69
|
+
return AriaLive2;
|
|
70
|
+
})(AriaLive || {});
|
|
71
|
+
|
|
72
|
+
export { Appearance as A, Connotation as C, LayoutSize as L, Position as P, Role as R, Shape as S, ConnotationDecorative as a, Size as b, AriaLive as c };
|
package/shared/icon.js
CHANGED
|
@@ -143,7 +143,7 @@ _curry2(function memoizeWith(mFn, fn) {
|
|
|
143
143
|
const memoizeWith$1 = memoizeWith;
|
|
144
144
|
|
|
145
145
|
const ICONS_BASE_URL = "https://icon.resources.vonage.com";
|
|
146
|
-
const ICONS_VERSION = "4.
|
|
146
|
+
const ICONS_VERSION = "4.5.1";
|
|
147
147
|
|
|
148
148
|
const PLACEHOLDER_ICON = `<svg width="80%" height="80%" viewBox="0 0 64 64">
|
|
149
149
|
<g>
|
|
@@ -231,4 +231,4 @@ __decorateClass([
|
|
|
231
231
|
volatile
|
|
232
232
|
], Icon.prototype, "iconUrl", 1);
|
|
233
233
|
|
|
234
|
-
export { Icon as I };
|
|
234
|
+
export { Icon as I, memoizeWith$1 as m };
|
package/shared/index2.js
CHANGED
|
@@ -3,7 +3,7 @@ import { a as attr, o as observable, h as html } from './index.js';
|
|
|
3
3
|
import { w as when } from './when.js';
|
|
4
4
|
import enUS from '../locales/en-US.js';
|
|
5
5
|
|
|
6
|
-
const messageStyles = "/**\n * Do not edit directly\n * Generated on
|
|
6
|
+
const messageStyles = "/**\n * Do not edit directly\n * Generated on Wed, 22 Nov 2023 16:09:43 GMT\n */\n.message {\n display: flex;\n contain: inline-size;\n font: var(--vvd-typography-base-condensed);\n gap: 4px;\n grid-column: 1/-1;\n}\n.message-text {\n color: var(--vvd-color-canvas-text);\n}\n.helper-message .message-text {\n color: var(--_low-ink-color);\n}\n.message-icon {\n font-size: 16px;\n}\n.success-message .message-icon {\n color: var(--vvd-color-success-500);\n}\n.error-message .message-icon {\n color: var(--vvd-color-alert-500);\n}";
|
|
7
7
|
|
|
8
8
|
var __defProp$1 = Object.defineProperty;
|
|
9
9
|
var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
|
|
@@ -38,6 +38,33 @@ __decorateClass$1([
|
|
|
38
38
|
})
|
|
39
39
|
], FormElementCharCount.prototype, "charCount", 2);
|
|
40
40
|
function formElements(constructor) {
|
|
41
|
+
let currentPrototype = constructor.prototype;
|
|
42
|
+
while (currentPrototype) {
|
|
43
|
+
const parentPrototype = Object.getPrototypeOf(currentPrototype);
|
|
44
|
+
if (currentPrototype.validate && !parentPrototype.validate) {
|
|
45
|
+
currentPrototype.validate = function(anchor) {
|
|
46
|
+
if (this.proxy instanceof HTMLElement) {
|
|
47
|
+
const isValid = this.proxy.validity.valid;
|
|
48
|
+
const controlIsInvalidDueToMinOrMaxLength = this.control && this.control.validity && !this.control.validity.valid && (this.control.validity.tooShort || this.control.validity.tooLong);
|
|
49
|
+
if (isValid && controlIsInvalidDueToMinOrMaxLength) {
|
|
50
|
+
this.setValidity(
|
|
51
|
+
this.control.validity,
|
|
52
|
+
this.control.validationMessage,
|
|
53
|
+
anchor
|
|
54
|
+
);
|
|
55
|
+
} else {
|
|
56
|
+
this.setValidity(
|
|
57
|
+
this.proxy.validity,
|
|
58
|
+
this.proxy.validationMessage,
|
|
59
|
+
anchor
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
currentPrototype = parentPrototype;
|
|
67
|
+
}
|
|
41
68
|
class Decorated extends constructor {
|
|
42
69
|
constructor(...args) {
|
|
43
70
|
super(...args);
|
package/shared/key-codes.js
CHANGED
|
@@ -97,4 +97,4 @@ const ArrowKeys = {
|
|
|
97
97
|
ArrowUp: keyArrowUp,
|
|
98
98
|
};
|
|
99
99
|
|
|
100
|
-
export { ArrowKeys as A, keySpace as a,
|
|
100
|
+
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, keyArrowRight as h, keyArrowLeft as i, keyPageDown as j, keyEnter as k, keyPageUp as l, keyFunction2 as m };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* String values for use with KeyboardEvent.key
|
|
3
|
+
*/
|
|
4
|
+
const keyArrowLeft = "ArrowLeft";
|
|
5
|
+
const keyArrowRight = "ArrowRight";
|
|
6
|
+
const keyEnter = "Enter";
|
|
7
|
+
const keySpace = " ";
|
|
8
|
+
|
|
9
|
+
export { keyArrowRight as a, keyEnter as b, keySpace as c, keyArrowLeft as k };
|
package/shared/listbox.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { k as keyArrowLeft, a as keyArrowRight } from './key-codes2.js';
|
|
1
2
|
import { F as FoundationElement, O as Observable, _ as __decorate, a as attr, o as observable, D as DOM, n as nullableNumberConverter } from './index.js';
|
|
2
|
-
import { i as isListboxOption } from './
|
|
3
|
+
import { i as isListboxOption } from './definition35.js';
|
|
3
4
|
import { A as ARIAGlobalStatesAndProperties } from './aria-global.js';
|
|
4
5
|
import { a as applyMixins } from './apply-mixins.js';
|
|
5
|
-
import { a as keySpace,
|
|
6
|
+
import { a as keySpace, b as keyEscape, k as keyEnter, c as keyTab, d as keyEnd, e as keyArrowUp, f as keyArrowDown, g as keyHome } from './key-codes.js';
|
|
6
7
|
import { u as uniqueId } from './strings.js';
|
|
7
8
|
import { i as inRange } from './numbers.js';
|
|
8
9
|
|
|
@@ -989,12 +990,6 @@ __decorate([
|
|
|
989
990
|
attr({ converter: nullableNumberConverter })
|
|
990
991
|
], ListboxElement.prototype, "size", void 0);
|
|
991
992
|
|
|
992
|
-
/**
|
|
993
|
-
* String values for use with KeyboardEvent.key
|
|
994
|
-
*/
|
|
995
|
-
const keyArrowLeft = "ArrowLeft";
|
|
996
|
-
const keyArrowRight = "ArrowRight";
|
|
997
|
-
|
|
998
993
|
var __defProp = Object.defineProperty;
|
|
999
994
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
1000
995
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
import type { DatePickerLocale } from '../date-picker/locale';
|
|
2
2
|
import type { FilePickerLocale } from '../../lib/file-picker/locale';
|
|
3
|
+
import type { AudioPlayerLocale } from '../../lib/audio-player/locale';
|
|
4
|
+
import type { AlertLocale } from '../../lib/alert/locale';
|
|
5
|
+
import type { DialogLocale } from '../../lib/dialog/locale';
|
|
6
|
+
import type { BannerLocale } from '../../lib/banner/locale';
|
|
7
|
+
import type { NumberFieldLocale } from '../../lib/number-field/locale';
|
|
8
|
+
import type { SplitButtonLocale } from '../../lib/split-button/locale';
|
|
3
9
|
export interface Locale {
|
|
4
10
|
datePicker: DatePickerLocale;
|
|
5
11
|
filePicker: FilePickerLocale;
|
|
12
|
+
audioPlayer: AudioPlayerLocale;
|
|
13
|
+
alert: AlertLocale;
|
|
14
|
+
dialog: DialogLocale;
|
|
15
|
+
banner: BannerLocale;
|
|
16
|
+
numberField: NumberFieldLocale;
|
|
17
|
+
splitButton: SplitButtonLocale;
|
|
6
18
|
}
|
|
@@ -33,10 +33,10 @@ export declare function formElements<T extends {
|
|
|
33
33
|
[x: string]: any;
|
|
34
34
|
label?: string | undefined;
|
|
35
35
|
errorValidationMessage: string;
|
|
36
|
-
"__#
|
|
37
|
-
"__#
|
|
36
|
+
"__#1@#forceErrorDisplay": boolean;
|
|
37
|
+
"__#1@#hasBeenTouched": boolean;
|
|
38
38
|
connectedCallback(): void;
|
|
39
|
-
"__#
|
|
39
|
+
"__#1@#handleInvalidEvent": () => void;
|
|
40
40
|
disconnectedCallback(): void;
|
|
41
41
|
formResetCallback(): void;
|
|
42
42
|
validate: () => void;
|
|
@@ -50,10 +50,10 @@ export declare function errorText<T extends {
|
|
|
50
50
|
new (...args: any[]): {
|
|
51
51
|
[x: string]: any;
|
|
52
52
|
errorText?: string | undefined;
|
|
53
|
-
"__#
|
|
53
|
+
"__#2@#blockValidateCalls": boolean;
|
|
54
54
|
errorTextChanged(_: string, newErrorText: string | undefined): void;
|
|
55
|
-
"__#
|
|
56
|
-
"__#
|
|
55
|
+
"__#2@#forceCustomError"(errorMessage: string): void;
|
|
56
|
+
"__#2@#clearCustomErrorAndRevalidate"(): void;
|
|
57
57
|
};
|
|
58
58
|
} & T;
|
|
59
59
|
export {};
|