@vonage/vivid 3.5.0 → 3.6.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/README.md +22 -9
- package/banner/index.js +2 -0
- package/breadcrumb/index.js +1 -1
- package/breadcrumb-item/index.js +1 -1
- package/button/index.js +2 -0
- 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/combobox/index.js +6 -4
- package/custom-elements.json +49 -0
- package/data-grid/index.js +1 -1
- package/dialog/index.js +4 -2
- package/divider/index.js +1 -1
- package/elevation/index.js +1 -1
- package/fab/index.js +1 -1
- package/header/index.js +2 -2
- package/index.js +26 -26
- package/layout/index.js +1 -1
- package/lib/action-group/action-group.d.ts +2 -0
- package/lib/button/button.d.ts +1 -0
- package/lib/button/button.template.d.ts +1 -1
- package/lib/select/select.d.ts +2 -3
- package/listbox/index.js +2 -2
- package/menu/index.js +6 -4
- package/menu-item/index.js +1 -1
- package/nav/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 +4 -2
- package/option/index.js +1 -1
- package/package.json +1 -1
- package/popup/index.js +4 -2
- package/progress/index.js +1 -1
- package/progress-ring/index.js +1 -1
- package/select/index.js +5 -3
- package/shared/definition.js +1 -1
- package/shared/definition10.js +69 -91
- package/shared/definition11.js +91 -40
- package/shared/definition12.js +31 -755
- package/shared/definition13.js +754 -93
- package/shared/definition14.js +100 -103
- package/shared/definition15.js +106 -24
- package/shared/definition16.js +24 -164
- package/shared/definition17.js +108 -663
- package/shared/definition18.js +667 -1533
- package/shared/definition19.js +1545 -223
- package/shared/definition2.js +1 -1
- package/shared/definition20.js +183 -964
- package/shared/definition21.js +1037 -222
- package/shared/definition22.js +226 -67
- package/shared/definition23.js +68 -77
- package/shared/definition24.js +76 -47
- package/shared/definition25.js +46 -32
- package/shared/definition26.js +35 -49
- package/shared/definition27.js +48 -344
- package/shared/definition28.js +273 -282
- package/shared/definition29.js +356 -14
- package/shared/definition30.js +13 -67
- package/shared/definition31.js +65 -21
- package/shared/definition32.js +21 -39
- package/shared/definition33.js +31 -432
- package/shared/definition34.js +432 -76
- package/shared/definition35.js +76 -59
- package/shared/definition36.js +1 -1
- package/shared/definition37.js +1 -1
- package/shared/definition38.js +7 -6
- package/shared/definition39.js +1 -1
- package/shared/definition4.js +1 -1
- package/shared/definition41.js +1 -1
- package/shared/definition42.js +1 -1
- package/shared/definition44.js +1 -1
- package/shared/definition45.js +1 -1
- package/shared/definition47.js +2 -2
- package/shared/definition48.js +1 -1
- package/shared/definition5.js +10 -3
- package/shared/definition6.js +1 -1
- package/shared/definition7.js +1 -1
- package/shared/definition8.js +1 -1
- package/shared/definition9.js +14 -4
- package/shared/form-elements.js +1 -1
- package/shared/icon.js +1 -1
- package/shared/listbox.js +1 -1
- package/shared/patterns/form-elements/form-elements.d.ts +2 -2
- package/shared/text-field.js +1 -1
- package/styles/core/all.css +1 -1
- package/styles/core/theme.css +1 -1
- package/styles/core/typography.css +1 -1
- package/styles/tokens/theme-dark.css +4 -4
- package/styles/tokens/theme-light.css +4 -4
- package/tooltip/index.js +4 -2
package/shared/definition22.js
CHANGED
|
@@ -1,78 +1,237 @@
|
|
|
1
|
-
import { F as FoundationElement, _ as __decorate, a as attr, h as html, r as registerFactory } from './index.js';
|
|
2
|
-
import {
|
|
1
|
+
import { F as FoundationElement, U as __classPrivateFieldGet, _ as __decorate, a as attr, b as __metadata, o as observable, a5 as __classPrivateFieldSet, h as html, r as registerFactory } from './index.js';
|
|
2
|
+
import { i as iconRegistries } from './definition3.js';
|
|
3
|
+
import { B as Button, b as buttonRegistries } from './definition9.js';
|
|
4
|
+
import { E as Elevation, e as elevationRegistries } from './definition16.js';
|
|
5
|
+
import { I as Icon } from './icon.js';
|
|
6
|
+
import { s as slotted } from './slotted.js';
|
|
7
|
+
import { w as when } from './when.js';
|
|
3
8
|
import { c as classNames } from './class-names.js';
|
|
4
9
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
* @
|
|
8
|
-
*/
|
|
9
|
-
const DividerRole = {
|
|
10
|
-
/**
|
|
11
|
-
* The divider semantically separates content
|
|
12
|
-
*/
|
|
13
|
-
separator: "separator",
|
|
14
|
-
/**
|
|
15
|
-
* The divider has no semantic value and is for visual presentation only.
|
|
16
|
-
*/
|
|
17
|
-
presentation: "presentation",
|
|
18
|
-
};
|
|
10
|
+
var css_248z$1 = "dialog {\n position: absolute;\n left: 0; right: 0;\n width: -moz-fit-content;\n width: -webkit-fit-content;\n width: fit-content;\n height: -moz-fit-content;\n height: -webkit-fit-content;\n height: fit-content;\n margin: auto;\n border: solid;\n padding: 1em;\n background: white;\n color: black;\n display: block;\n}\n\ndialog:not([open]) {\n display: none;\n}\n\ndialog + .backdrop {\n position: fixed;\n top: 0; right: 0; bottom: 0; left: 0;\n background: rgba(0,0,0,0.1);\n}\n\n._dialog_overlay {\n position: fixed;\n top: 0; right: 0; bottom: 0; left: 0;\n}\n\ndialog.fixed {\n position: fixed;\n top: 50%;\n transform: translate(0, -50%);\n}";
|
|
11
|
+
|
|
12
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Thu, 30 Mar 2023 16:21:30 GMT\n */\n.base {\n box-sizing: border-box;\n padding: 0;\n border: none;\n background: var(--_elevation-fill);\n border-radius: 6px;\n color: var(--vvd-color-canvas-text);\n max-block-size: var(--dialog-max-block-size, calc(100vh - 64px));\n max-inline-size: var(--dialog-max-inline-size, var(--_dialog-default-max-inline-size));\n min-inline-size: var(--dialog-min-inline-size, 280px);\n}\n@media not all and (min-width: 600px) {\n .base {\n --_dialog-default-max-inline-size: 90vw;\n }\n}\n@media (min-width: 600px) {\n .base {\n --_dialog-default-max-inline-size: 560px;\n }\n}\n.base:not(.modal) {\n z-index: var(--dialog-z-index, 1);\n}\n.base.modal::backdrop {\n background-color: var(--vvd-color-canvas-text, currentColor);\n opacity: 0.5;\n}\n\n.main-wrapper {\n display: flex;\n box-sizing: border-box;\n flex-direction: column;\n gap: 24px;\n padding-block: 24px;\n}\n.main-wrapper > * {\n box-sizing: border-box;\n}\n\n.header {\n display: grid;\n align-items: flex-start;\n justify-content: space-between;\n inline-size: 100%;\n padding-inline: 24px;\n}\n.base:not(.icon-placement-side) .header {\n grid-template-columns: 1fr auto;\n grid-template-rows: auto auto auto;\n}\n.base:not(.icon-placement-side) .header .icon {\n font-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 8));\n grid-column: 1/2;\n grid-row: 1/2;\n line-height: 1;\n margin-block-end: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16));\n}\n.base.icon-placement-side .header {\n grid-template-columns: auto 1fr auto;\n grid-template-rows: auto auto;\n}\n.base.icon-placement-side .header .icon {\n font-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 12));\n}\n.base.icon-placement-side .header ::slotted(*),\n.base.icon-placement-side .header .icon {\n grid-column: 1/2;\n grid-row: 1/-1;\n margin-inline-end: calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 8)) / 2);\n}\n.header.border {\n position: relative;\n}\n.header.border::after {\n position: absolute;\n bottom: -24px;\n left: 0;\n background-color: var(--vvd-color-neutral-200);\n block-size: 1px;\n content: \"\";\n inline-size: 100%;\n}\n.base.hide-body .header.border::after {\n content: none;\n}\n\n.body:not(.full-width) {\n padding-inline: 24px;\n}\n.hide-body .body {\n display: none;\n}\n\n.footer {\n padding-inline: 24px;\n}\n.hide-footer .footer {\n display: none;\n}\n\n.dismiss-button {\n flex-shrink: 0;\n grid-column: -2/-1;\n grid-row: 1/-1;\n margin-block-start: -8px;\n margin-inline-end: -8px;\n margin-inline-start: 4px;\n}\n\n.headline {\n font: var(--vvd-typography-heading-4);\n}\n\n.subtitle {\n font: var(--vvd-typography-base);\n}\n\nslot[name=main] {\n display: block;\n overflow: hidden auto;\n max-width: inherit;\n max-height: inherit;\n border-radius: inherit;\n}";
|
|
19
13
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
14
|
+
var _Dialog_instances, _Dialog_modal, _Dialog_dialogElement, _Dialog_dialog_get, _Dialog_handleScrimClick, _Dialog_handleInternalFormSubmit, _Dialog_handleModal;
|
|
15
|
+
let dialogPolyfill;
|
|
16
|
+
(async () => {
|
|
17
|
+
if (!HTMLDialogElement || !HTMLDialogElement.prototype.showModal) {
|
|
18
|
+
delete window.HTMLDialogElement;
|
|
19
|
+
dialogPolyfill = await import('./dialog-polyfill.esm.js');
|
|
20
|
+
}
|
|
21
|
+
})();
|
|
22
|
+
class Dialog extends FoundationElement {
|
|
23
|
+
constructor() {
|
|
24
|
+
super(...arguments);
|
|
25
|
+
_Dialog_instances.add(this);
|
|
26
|
+
this.open = false;
|
|
27
|
+
this.fullWidthBody = false;
|
|
28
|
+
this.ariaLabelledBy = null;
|
|
29
|
+
this.ariaLabel = null;
|
|
30
|
+
this.ariaDescribedBy = null;
|
|
31
|
+
_Dialog_modal.set(this, false);
|
|
32
|
+
_Dialog_dialogElement.set(this, void 0);
|
|
33
|
+
_Dialog_handleScrimClick.set(this, event => {
|
|
34
|
+
if (event.target !== __classPrivateFieldGet(this, _Dialog_instances, "a", _Dialog_dialog_get)) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
const rect = __classPrivateFieldGet(this, _Dialog_instances, "a", _Dialog_dialog_get).getBoundingClientRect();
|
|
38
|
+
const clickedInDialog = rect.top <= event.clientY && event.clientY <= rect.top + rect.height && rect.left <= event.clientX && event.clientX <= rect.left + rect.width;
|
|
39
|
+
this.open = clickedInDialog;
|
|
40
|
+
});
|
|
41
|
+
_Dialog_handleInternalFormSubmit.set(this, event => {
|
|
42
|
+
if (event.target.method !== 'dialog') {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
this.open = false;
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
set returnValue(value) {
|
|
49
|
+
__classPrivateFieldGet(this, _Dialog_instances, "a", _Dialog_dialog_get).returnValue = value;
|
|
50
|
+
}
|
|
51
|
+
get returnValue() {
|
|
52
|
+
var _a;
|
|
53
|
+
return (_a = __classPrivateFieldGet(this, _Dialog_instances, "a", _Dialog_dialog_get)) === null || _a === void 0 ? void 0 : _a.returnValue;
|
|
54
|
+
}
|
|
55
|
+
get modal() {
|
|
56
|
+
return __classPrivateFieldGet(this, _Dialog_modal, "f");
|
|
57
|
+
}
|
|
58
|
+
openChanged(oldValue, newValue) {
|
|
59
|
+
if (oldValue === undefined) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
if (!newValue) {
|
|
63
|
+
this.close();
|
|
64
|
+
} else {
|
|
65
|
+
if (__classPrivateFieldGet(this, _Dialog_instances, "a", _Dialog_dialog_get)) {
|
|
66
|
+
__classPrivateFieldGet(this, _Dialog_instances, "a", _Dialog_dialog_get).open = true;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
close() {
|
|
71
|
+
if (__classPrivateFieldGet(this, _Dialog_instances, "a", _Dialog_dialog_get).open) {
|
|
72
|
+
__classPrivateFieldGet(this, _Dialog_instances, "a", _Dialog_dialog_get).close();
|
|
73
|
+
this.$emit('close', this.returnValue, {
|
|
74
|
+
bubbles: false
|
|
75
|
+
});
|
|
45
76
|
}
|
|
77
|
+
this.open = false;
|
|
78
|
+
__classPrivateFieldGet(this, _Dialog_instances, "m", _Dialog_handleModal).call(this, false);
|
|
79
|
+
}
|
|
80
|
+
show() {
|
|
81
|
+
__classPrivateFieldGet(this, _Dialog_instances, "a", _Dialog_dialog_get).show();
|
|
82
|
+
this.open = true;
|
|
83
|
+
}
|
|
84
|
+
showModal() {
|
|
85
|
+
__classPrivateFieldGet(this, _Dialog_instances, "a", _Dialog_dialog_get).showModal();
|
|
86
|
+
this.open = true;
|
|
87
|
+
__classPrivateFieldGet(this, _Dialog_instances, "m", _Dialog_handleModal).call(this, true);
|
|
88
|
+
}
|
|
89
|
+
connectedCallback() {
|
|
90
|
+
super.connectedCallback();
|
|
91
|
+
__classPrivateFieldGet(this, _Dialog_instances, "a", _Dialog_dialog_get).addEventListener('click', __classPrivateFieldGet(this, _Dialog_handleScrimClick, "f"));
|
|
92
|
+
__classPrivateFieldGet(this, _Dialog_instances, "a", _Dialog_dialog_get).addEventListener('submit', __classPrivateFieldGet(this, _Dialog_handleInternalFormSubmit, "f"));
|
|
93
|
+
}
|
|
94
|
+
disconnectedCallback() {
|
|
95
|
+
super.disconnectedCallback();
|
|
96
|
+
__classPrivateFieldGet(this, _Dialog_instances, "a", _Dialog_dialog_get).removeEventListener('click', __classPrivateFieldGet(this, _Dialog_handleScrimClick, "f"));
|
|
97
|
+
__classPrivateFieldGet(this, _Dialog_instances, "a", _Dialog_dialog_get).removeEventListener('submit', __classPrivateFieldGet(this, _Dialog_handleInternalFormSubmit, "f"));
|
|
98
|
+
}
|
|
46
99
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
100
|
+
_Dialog_modal = new WeakMap(), _Dialog_dialogElement = new WeakMap(), _Dialog_handleScrimClick = new WeakMap(), _Dialog_handleInternalFormSubmit = new WeakMap(), _Dialog_instances = new WeakSet(), _Dialog_dialog_get = function _Dialog_dialog_get() {
|
|
101
|
+
if (!__classPrivateFieldGet(this, _Dialog_dialogElement, "f")) {
|
|
102
|
+
__classPrivateFieldSet(this, _Dialog_dialogElement, this.shadowRoot.querySelector('dialog'), "f");
|
|
103
|
+
if (__classPrivateFieldGet(this, _Dialog_dialogElement, "f")) {
|
|
104
|
+
__classPrivateFieldGet(this, _Dialog_dialogElement, "f").open = this.open;
|
|
105
|
+
if (dialogPolyfill) {
|
|
106
|
+
dialogPolyfill.registerDialog(__classPrivateFieldGet(this, _Dialog_dialogElement, "f"));
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return __classPrivateFieldGet(this, _Dialog_dialogElement, "f");
|
|
111
|
+
}, _Dialog_handleModal = function _Dialog_handleModal(show) {
|
|
112
|
+
__classPrivateFieldSet(this, _Dialog_modal, show, "f");
|
|
113
|
+
__classPrivateFieldGet(this, _Dialog_instances, "a", _Dialog_dialog_get).toggleAttribute('aria-modal', show);
|
|
114
|
+
__classPrivateFieldGet(this, _Dialog_instances, "a", _Dialog_dialog_get).classList.toggle('modal', show);
|
|
115
|
+
};
|
|
116
|
+
__decorate([attr({
|
|
117
|
+
mode: 'boolean'
|
|
118
|
+
}), __metadata("design:type", Object)], Dialog.prototype, "open", void 0);
|
|
119
|
+
__decorate([attr, __metadata("design:type", String)], Dialog.prototype, "icon", void 0);
|
|
120
|
+
__decorate([attr({
|
|
121
|
+
attribute: 'icon-placement'
|
|
122
|
+
}), __metadata("design:type", String)], Dialog.prototype, "iconPlacement", void 0);
|
|
123
|
+
__decorate([attr, __metadata("design:type", String)], Dialog.prototype, "subtitle", void 0);
|
|
124
|
+
__decorate([attr, __metadata("design:type", String)], Dialog.prototype, "headline", void 0);
|
|
125
|
+
__decorate([attr({
|
|
126
|
+
attribute: 'full-width-body',
|
|
127
|
+
mode: 'boolean'
|
|
128
|
+
}), __metadata("design:type", Object)], Dialog.prototype, "fullWidthBody", void 0);
|
|
129
|
+
__decorate([attr({
|
|
130
|
+
attribute: 'aria-labelledby'
|
|
131
|
+
}), __metadata("design:type", Object)], Dialog.prototype, "ariaLabelledBy", void 0);
|
|
132
|
+
__decorate([attr({
|
|
133
|
+
attribute: 'aria-label'
|
|
134
|
+
}), __metadata("design:type", Object)], Dialog.prototype, "ariaLabel", void 0);
|
|
135
|
+
__decorate([attr({
|
|
136
|
+
attribute: 'aria-describedby'
|
|
137
|
+
}), __metadata("design:type", Object)], Dialog.prototype, "ariaDescribedBy", void 0);
|
|
138
|
+
__decorate([observable, __metadata("design:type", Array)], Dialog.prototype, "bodySlottedContent", void 0);
|
|
139
|
+
__decorate([observable, __metadata("design:type", Array)], Dialog.prototype, "footerSlottedContent", void 0);
|
|
57
140
|
|
|
58
141
|
let _ = t => t,
|
|
59
|
-
_t
|
|
142
|
+
_t,
|
|
143
|
+
_t2,
|
|
144
|
+
_t3,
|
|
145
|
+
_t4,
|
|
146
|
+
_t5;
|
|
60
147
|
const getClasses = ({
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
148
|
+
iconPlacement,
|
|
149
|
+
bodySlottedContent,
|
|
150
|
+
footerSlottedContent
|
|
151
|
+
}) => classNames('base', [`icon-placement-${iconPlacement}`, Boolean(iconPlacement)], ['hide-body', !(bodySlottedContent === null || bodySlottedContent === void 0 ? void 0 : bodySlottedContent.length)], ['hide-footer', !(footerSlottedContent === null || footerSlottedContent === void 0 ? void 0 : footerSlottedContent.length)]);
|
|
152
|
+
function icon(iconTag) {
|
|
153
|
+
return html(_t || (_t = _`
|
|
154
|
+
<${0} class="icon" name="${0}"></${0}>
|
|
155
|
+
`), iconTag, x => x.icon, iconTag);
|
|
156
|
+
}
|
|
157
|
+
function headline() {
|
|
158
|
+
return html(_t2 || (_t2 = _`
|
|
159
|
+
<div class="headline">
|
|
160
|
+
${0}
|
|
161
|
+
</div>
|
|
162
|
+
`), x => x.headline);
|
|
163
|
+
}
|
|
164
|
+
function subtitle() {
|
|
165
|
+
return html(_t3 || (_t3 = _`
|
|
166
|
+
<div class="subtitle">
|
|
167
|
+
${0}
|
|
168
|
+
</div>
|
|
169
|
+
`), x => x.subtitle);
|
|
170
|
+
}
|
|
171
|
+
function renderDismissButton(buttonTag) {
|
|
172
|
+
return html(_t4 || (_t4 = _`
|
|
173
|
+
<${0}
|
|
174
|
+
size="condensed"
|
|
175
|
+
class="dismiss-button"
|
|
176
|
+
icon="close-line"
|
|
177
|
+
@click="${0}">
|
|
178
|
+
</${0}>`), buttonTag, x => {
|
|
179
|
+
x.open = false;
|
|
180
|
+
}, buttonTag);
|
|
181
|
+
}
|
|
182
|
+
function handleEscapeKey(dialog, event) {
|
|
183
|
+
if (event.key === 'Escape' && dialog.modal) {
|
|
184
|
+
dialog.open = false;
|
|
185
|
+
}
|
|
186
|
+
return true;
|
|
187
|
+
}
|
|
188
|
+
const DialogTemplate = context => {
|
|
189
|
+
const elevationTag = context.tagFor(Elevation);
|
|
190
|
+
const iconTag = context.tagFor(Icon);
|
|
191
|
+
const buttonTag = context.tagFor(Button);
|
|
192
|
+
return html(_t5 || (_t5 = _`
|
|
193
|
+
<${0} dp="12">
|
|
194
|
+
<dialog class="${0}"
|
|
195
|
+
@keydown="${0}"
|
|
196
|
+
returnValue="${0}"
|
|
197
|
+
aria-labelledby="${0}"
|
|
198
|
+
aria-label="${0}"
|
|
199
|
+
aria-describedby="${0}"
|
|
200
|
+
>
|
|
201
|
+
<slot name="main">
|
|
202
|
+
<div class="main-wrapper">
|
|
203
|
+
<div class="header ${0}">
|
|
204
|
+
<slot name="graphic">
|
|
205
|
+
${0}
|
|
206
|
+
</slot>
|
|
207
|
+
${0}
|
|
208
|
+
${0}
|
|
209
|
+
${0}
|
|
210
|
+
</div>
|
|
211
|
+
<div class="body ${0} ${0}" >
|
|
212
|
+
<slot name="body" ${0}></slot>
|
|
213
|
+
</div>
|
|
214
|
+
<div class="footer ${0}">
|
|
215
|
+
<slot name="footer" ${0}></slot>
|
|
216
|
+
</div>
|
|
217
|
+
</div>
|
|
218
|
+
</slot>
|
|
219
|
+
</dialog>
|
|
220
|
+
</${0}>`), elevationTag, getClasses, (x, c) => handleEscapeKey(x, c.event), x => x.returnValue, x => x.ariaLabelledBy, x => x.ariaLabel, x => x.ariaDescribedBy, x => x.subtitle ? 'border' : '', when(x => x.icon, icon(iconTag)), when(x => x.headline, headline()), when(x => x.subtitle, subtitle()), renderDismissButton(buttonTag), x => {
|
|
221
|
+
var _a;
|
|
222
|
+
return ((_a = x.bodySlottedContent) === null || _a === void 0 ? void 0 : _a.length) ? '' : 'hide';
|
|
223
|
+
}, x => x.fullWidthBody ? 'full-width' : '', slotted('bodySlottedContent'), x => {
|
|
224
|
+
var _a;
|
|
225
|
+
return ((_a = x.footerSlottedContent) === null || _a === void 0 ? void 0 : _a.length) ? '' : 'hide';
|
|
226
|
+
}, slotted('footerSlottedContent'), elevationTag);
|
|
227
|
+
};
|
|
69
228
|
|
|
70
|
-
const
|
|
71
|
-
baseName: '
|
|
72
|
-
template:
|
|
73
|
-
styles: css_248z
|
|
229
|
+
const dialogDefinition = Dialog.compose({
|
|
230
|
+
baseName: 'dialog',
|
|
231
|
+
template: DialogTemplate,
|
|
232
|
+
styles: [css_248z, css_248z$1]
|
|
74
233
|
});
|
|
75
|
-
const
|
|
76
|
-
const
|
|
234
|
+
const dialogRegistries = [dialogDefinition(), ...iconRegistries, ...buttonRegistries, ...elevationRegistries];
|
|
235
|
+
const registerDialog = registerFactory(dialogRegistries);
|
|
77
236
|
|
|
78
|
-
export {
|
|
237
|
+
export { dialogRegistries as a, dialogDefinition as d, registerDialog as r };
|
package/shared/definition23.js
CHANGED
|
@@ -1,87 +1,78 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { f as focusRegistries } from './definition4.js';
|
|
4
|
-
import { A as AffixIconWithTrailing, a as affixIconTemplateFactory } from './affix.js';
|
|
5
|
-
import { B as Button } from './button.js';
|
|
6
|
-
import { a as applyMixins } from './apply-mixins.js';
|
|
7
|
-
import { f as focusTemplateFactory } from './focus2.js';
|
|
8
|
-
import { r as ref } from './ref.js';
|
|
1
|
+
import { F as FoundationElement, _ as __decorate, a as attr, h as html, r as registerFactory } from './index.js';
|
|
2
|
+
import { O as Orientation } from './aria.js';
|
|
9
3
|
import { c as classNames } from './class-names.js';
|
|
10
4
|
|
|
11
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Divider roles
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
const DividerRole = {
|
|
10
|
+
/**
|
|
11
|
+
* The divider semantically separates content
|
|
12
|
+
*/
|
|
13
|
+
separator: "separator",
|
|
14
|
+
/**
|
|
15
|
+
* The divider has no semantic value and is for visual presentation only.
|
|
16
|
+
*/
|
|
17
|
+
presentation: "presentation",
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* A Divider Custom HTML Element.
|
|
22
|
+
* Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#separator | ARIA separator } or {@link https://www.w3.org/TR/wai-aria-1.1/#presentation | ARIA presentation}.
|
|
23
|
+
*
|
|
24
|
+
* @public
|
|
25
|
+
*/
|
|
26
|
+
class Divider$1 extends FoundationElement {
|
|
27
|
+
constructor() {
|
|
28
|
+
super(...arguments);
|
|
29
|
+
/**
|
|
30
|
+
* The role of the element.
|
|
31
|
+
*
|
|
32
|
+
* @public
|
|
33
|
+
* @remarks
|
|
34
|
+
* HTML Attribute: role
|
|
35
|
+
*/
|
|
36
|
+
this.role = DividerRole.separator;
|
|
37
|
+
/**
|
|
38
|
+
* The orientation of the divider.
|
|
39
|
+
*
|
|
40
|
+
* @public
|
|
41
|
+
* @remarks
|
|
42
|
+
* HTML Attribute: orientation
|
|
43
|
+
*/
|
|
44
|
+
this.orientation = Orientation.horizontal;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
__decorate([
|
|
48
|
+
attr
|
|
49
|
+
], Divider$1.prototype, "role", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
attr
|
|
52
|
+
], Divider$1.prototype, "orientation", void 0);
|
|
12
53
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
__decorate([attr, __metadata("design:type", String)], Fab.prototype, "label", void 0);
|
|
17
|
-
applyMixins(Fab, AffixIconWithTrailing);
|
|
54
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Thu, 30 Mar 2023 16:21:30 GMT\n */\n:host {\n display: block;\n}\n\n.base {\n display: block;\n background-color: var(--vvd-color-neutral-200);\n}\n.base:not(.vertical) {\n block-size: 1px;\n inline-size: 100%;\n}\n.base.vertical {\n block-size: 100%;\n inline-size: 1px;\n}";
|
|
55
|
+
|
|
56
|
+
class Divider extends Divider$1 {}
|
|
18
57
|
|
|
19
58
|
let _ = t => t,
|
|
20
59
|
_t;
|
|
21
60
|
const getClasses = ({
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
const affixIconTemplate = affixIconTemplateFactory(context);
|
|
31
|
-
const focusTemplate = focusTemplateFactory(context);
|
|
32
|
-
return html(_t || (_t = _`
|
|
33
|
-
<button
|
|
34
|
-
class="${0} "
|
|
35
|
-
?autofocus="${0}"
|
|
36
|
-
?disabled="${0}"
|
|
37
|
-
form="${0}"
|
|
38
|
-
formaction="${0}"
|
|
39
|
-
formenctype="${0}"
|
|
40
|
-
formmethod="${0}"
|
|
41
|
-
formnovalidate="${0}"
|
|
42
|
-
formtarget="${0}"
|
|
43
|
-
name="${0}"
|
|
44
|
-
type="${0}"
|
|
45
|
-
value="${0}"
|
|
46
|
-
aria-atomic="${0}"
|
|
47
|
-
aria-busy="${0}"
|
|
48
|
-
aria-controls="${0}"
|
|
49
|
-
aria-current="${0}"
|
|
50
|
-
aria-describedby="${0}"
|
|
51
|
-
aria-details="${0}"
|
|
52
|
-
aria-disabled="${0}"
|
|
53
|
-
aria-errormessage="${0}"
|
|
54
|
-
aria-expanded="${0}"
|
|
55
|
-
aria-flowto="${0}"
|
|
56
|
-
aria-haspopup="${0}"
|
|
57
|
-
aria-hidden="${0}"
|
|
58
|
-
aria-invalid="${0}"
|
|
59
|
-
aria-keyshortcuts="${0}"
|
|
60
|
-
aria-label="${0}"
|
|
61
|
-
aria-labelledby="${0}"
|
|
62
|
-
aria-live="${0}"
|
|
63
|
-
aria-owns="${0}"
|
|
64
|
-
aria-pressed="${0}"
|
|
65
|
-
aria-relevant="${0}"
|
|
66
|
-
aria-roledescription="${0}"
|
|
67
|
-
${0}
|
|
68
|
-
>
|
|
69
|
-
${0}
|
|
70
|
-
${0}
|
|
71
|
-
${0}
|
|
72
|
-
</button>
|
|
73
|
-
`), getClasses, x => x.autofocus, x => x.disabled, x => x.formId, x => x.formaction, x => x.formenctype, x => x.formmethod, x => x.formnovalidate, x => x.formtarget, x => x.name, x => x.type, x => x.value, x => x.ariaAtomic, x => x.ariaBusy, x => x.ariaControls, x => x.ariaCurrent, x => x.ariaDescribedby, x => x.ariaDetails, x => x.ariaDisabled, x => x.ariaErrormessage, x => x.ariaExpanded, x => x.ariaFlowto, x => x.ariaHaspopup, x => x.ariaHidden, x => x.ariaInvalid, x => x.ariaKeyshortcuts, x => x.ariaLabel, x => x.ariaLabelledby, x => x.ariaLive, x => x.ariaOwns, x => x.ariaPressed, x => x.ariaRelevant, x => x.ariaRoledescription, ref('control'), () => focusTemplate, x => affixIconTemplate(x.icon), x => x.label);
|
|
74
|
-
};
|
|
61
|
+
orientation
|
|
62
|
+
}) => classNames('base', [`${orientation}`, Boolean(orientation)]);
|
|
63
|
+
const DividerTemplate = () => html(_t || (_t = _`
|
|
64
|
+
<span
|
|
65
|
+
class="${0}"
|
|
66
|
+
orientation="${0}"
|
|
67
|
+
role="${0}"
|
|
68
|
+
></span>`), getClasses, x => x.orientation, x => x.role);
|
|
75
69
|
|
|
76
|
-
const
|
|
77
|
-
baseName: '
|
|
78
|
-
template:
|
|
79
|
-
styles: css_248z
|
|
80
|
-
shadowOptions: {
|
|
81
|
-
delegatesFocus: true
|
|
82
|
-
}
|
|
70
|
+
const dividerDefinition = Divider.compose({
|
|
71
|
+
baseName: 'divider',
|
|
72
|
+
template: DividerTemplate,
|
|
73
|
+
styles: css_248z
|
|
83
74
|
});
|
|
84
|
-
const
|
|
85
|
-
const
|
|
75
|
+
const dividerRegistries = [dividerDefinition()];
|
|
76
|
+
const registerDivider = registerFactory(dividerRegistries);
|
|
86
77
|
|
|
87
|
-
export {
|
|
78
|
+
export { Divider as D, dividerDefinition as a, dividerRegistries as d, registerDivider as r };
|
package/shared/definition24.js
CHANGED
|
@@ -1,58 +1,87 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { _ as __decorate, a as attr, b as __metadata, h as html, r as registerFactory } from './index.js';
|
|
2
|
+
import { i as iconRegistries } from './definition3.js';
|
|
3
|
+
import { f as focusRegistries } from './definition4.js';
|
|
4
|
+
import { A as AffixIconWithTrailing, a as affixIconTemplateFactory } from './affix.js';
|
|
5
|
+
import { B as Button } from './button.js';
|
|
6
|
+
import { a as applyMixins } from './apply-mixins.js';
|
|
7
|
+
import { f as focusTemplateFactory } from './focus2.js';
|
|
8
|
+
import { r as ref } from './ref.js';
|
|
3
9
|
import { c as classNames } from './class-names.js';
|
|
4
10
|
|
|
5
|
-
var css_248z = "/**\n * Do not edit directly\n * Generated on
|
|
11
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Thu, 30 Mar 2023 16:21:30 GMT\n */\n.control {\n position: relative;\n display: inline-flex;\n box-sizing: border-box;\n align-items: center;\n border: 0 none;\n background: var(--_appearance-color-fill, var(--_elevation-fill));\n block-size: var(--_fab-block-size);\n border-radius: var(--_fab-border-radius);\n color: var(--_appearance-color-text, var(--vvd-color-canvas-text));\n column-gap: var(--fab-icon-gap);\n filter: var(--_elevation-shadow);\n font: var(--vvd-typography-base-bold);\n transition: background-color 0.15s linear, filter 0.15s linear;\n vertical-align: middle;\n /* Size */\n}\n.control.connotation-accent {\n --_connotation-color-primary: var(--vvd-color-canvas-text);\n --_connotation-color-primary-text: var(--vvd-color-canvas);\n --_connotation-color-primary-increment: var(--vvd-color-neutral-800);\n --_connotation-color-contrast: var(--vvd-color-neutral-800);\n --_connotation-color-fierce: var(--vvd-color-neutral-700);\n --_connotation-color-firm: var(--vvd-color-canvas-text);\n}\n.control.connotation-cta {\n --_connotation-color-primary: var(--vvd-color-cta-500);\n --_connotation-color-primary-text: var(--vvd-color-canvas);\n --_connotation-color-primary-increment: var(--vvd-color-cta-600);\n --_connotation-color-contrast: var(--vvd-color-cta-800);\n --_connotation-color-fierce: var(--vvd-color-cta-700);\n --_connotation-color-firm: var(--vvd-color-cta-600);\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:where(:hover, .hover):where(:not(:disabled, .disabled, .readonly)) {\n --_appearance-color-text: var(--_connotation-color-primary-text);\n --_appearance-color-fill: var(--_connotation-color-primary-increment);\n --_appearance-color-outline: transparent;\n}\n.control:where(:disabled, .disabled) {\n --_appearance-color-text: var(--vvd-color-neutral-400);\n --_appearance-color-fill: var(--vvd-color-neutral-200);\n --_appearance-color-outline: transparent;\n}\n.control:where(:active, .active):where(:not(:disabled, .disabled)) {\n --_appearance-color-text: var(--_connotation-color-primary-text);\n --_appearance-color-fill: var(--_connotation-color-fierce);\n --_appearance-color-outline: transparent;\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.size-expanded {\n --_fab-border-radius: 30px;\n --_fab-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) + 16));\n}\n.control:not(.size-expanded) {\n --_fab-border-radius: 24px;\n --_fab-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2)));\n}\n.control.icon-only {\n border-radius: 50%;\n padding-inline: 0;\n place-content: center;\n}\n@supports (aspect-ratio: 1) {\n .control.icon-only {\n aspect-ratio: 1;\n }\n}\n@supports not (aspect-ratio: 1) {\n .control.icon-only {\n inline-size: var(--_fab-block-size);\n }\n}\n.control:not(.icon-only) {\n --fab-icon-gap: 10px;\n padding-inline: 20px;\n}\n.control:disabled {\n --_elevation-fill: var(--vvd-color-surface-0dp);\n --_elevation-shadow: var(--vvd-shadow-surface-0dp);\n cursor: not-allowed;\n}\n.control:not(:disabled) {\n --_elevation-fill: var(--vvd-color-surface-4dp);\n --_elevation-shadow: var(--vvd-shadow-surface-4dp);\n cursor: pointer;\n}\n.control:not(:disabled):hover {\n --_elevation-fill: var(--vvd-color-surface-12dp);\n --_elevation-shadow: var(--vvd-shadow-surface-12dp);\n}\n.control:not(:disabled):active {\n --_elevation-fill: var(--vvd-color-surface-24dp);\n --_elevation-shadow: var(--vvd-shadow-surface-24dp);\n}\n\n/* Icon */\n.icon {\n line-height: 1;\n}\n.icon-trailing .icon {\n order: 1;\n}\n.control.size-extended .icon {\n font-size: calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) + 16)) / 2.3333);\n}\n.control:not(.size-extended) .icon {\n font-size: calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2))) / 2);\n}\n\n:not(:focus-visible) .focus-indicator {\n display: none;\n}";
|
|
6
12
|
|
|
7
|
-
class
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
__decorate([attr({
|
|
15
|
-
attribute: 'elevation-shadow',
|
|
16
|
-
mode: 'boolean'
|
|
17
|
-
}), __metadata("design:type", Object)], Header.prototype, "elevationShadow", void 0);
|
|
18
|
-
__decorate([attr({
|
|
19
|
-
mode: 'boolean'
|
|
20
|
-
}), __metadata("design:type", Object)], Header.prototype, "alternate", void 0);
|
|
13
|
+
class Fab extends Button {}
|
|
14
|
+
__decorate([attr, __metadata("design:type", String)], Fab.prototype, "connotation", void 0);
|
|
15
|
+
__decorate([attr, __metadata("design:type", String)], Fab.prototype, "size", void 0);
|
|
16
|
+
__decorate([attr, __metadata("design:type", String)], Fab.prototype, "label", void 0);
|
|
17
|
+
applyMixins(Fab, AffixIconWithTrailing);
|
|
21
18
|
|
|
22
19
|
let _ = t => t,
|
|
23
20
|
_t;
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
21
|
+
const getClasses = ({
|
|
22
|
+
connotation,
|
|
23
|
+
size,
|
|
24
|
+
icon,
|
|
25
|
+
label,
|
|
26
|
+
iconTrailing,
|
|
27
|
+
disabled
|
|
28
|
+
}) => classNames('control', [`connotation-${connotation}`, Boolean(connotation)], [`size-${size}`, Boolean(size)], ['icon-only', !label && !!icon], ['icon-trailing', iconTrailing], ['disabled', disabled]);
|
|
29
|
+
const FabTemplate = context => {
|
|
30
|
+
const affixIconTemplate = affixIconTemplateFactory(context);
|
|
31
|
+
const focusTemplate = focusTemplateFactory(context);
|
|
29
32
|
return html(_t || (_t = _`
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
33
|
+
<button
|
|
34
|
+
class="${0} "
|
|
35
|
+
?autofocus="${0}"
|
|
36
|
+
?disabled="${0}"
|
|
37
|
+
form="${0}"
|
|
38
|
+
formaction="${0}"
|
|
39
|
+
formenctype="${0}"
|
|
40
|
+
formmethod="${0}"
|
|
41
|
+
formnovalidate="${0}"
|
|
42
|
+
formtarget="${0}"
|
|
43
|
+
name="${0}"
|
|
44
|
+
type="${0}"
|
|
45
|
+
value="${0}"
|
|
46
|
+
aria-atomic="${0}"
|
|
47
|
+
aria-busy="${0}"
|
|
48
|
+
aria-controls="${0}"
|
|
49
|
+
aria-current="${0}"
|
|
50
|
+
aria-describedby="${0}"
|
|
51
|
+
aria-details="${0}"
|
|
52
|
+
aria-disabled="${0}"
|
|
53
|
+
aria-errormessage="${0}"
|
|
54
|
+
aria-expanded="${0}"
|
|
55
|
+
aria-flowto="${0}"
|
|
56
|
+
aria-haspopup="${0}"
|
|
57
|
+
aria-hidden="${0}"
|
|
58
|
+
aria-invalid="${0}"
|
|
59
|
+
aria-keyshortcuts="${0}"
|
|
60
|
+
aria-label="${0}"
|
|
61
|
+
aria-labelledby="${0}"
|
|
62
|
+
aria-live="${0}"
|
|
63
|
+
aria-owns="${0}"
|
|
64
|
+
aria-pressed="${0}"
|
|
65
|
+
aria-relevant="${0}"
|
|
66
|
+
aria-roledescription="${0}"
|
|
67
|
+
${0}
|
|
68
|
+
>
|
|
69
|
+
${0}
|
|
70
|
+
${0}
|
|
71
|
+
${0}
|
|
72
|
+
</button>
|
|
73
|
+
`), getClasses, x => x.autofocus, x => x.disabled, x => x.formId, x => x.formaction, x => x.formenctype, x => x.formmethod, x => x.formnovalidate, x => x.formtarget, x => x.name, x => x.type, x => x.value, x => x.ariaAtomic, x => x.ariaBusy, x => x.ariaControls, x => x.ariaCurrent, x => x.ariaDescribedby, x => x.ariaDetails, x => x.ariaDisabled, x => x.ariaErrormessage, x => x.ariaExpanded, x => x.ariaFlowto, x => x.ariaHaspopup, x => x.ariaHidden, x => x.ariaInvalid, x => x.ariaKeyshortcuts, x => x.ariaLabel, x => x.ariaLabelledby, x => x.ariaLive, x => x.ariaOwns, x => x.ariaPressed, x => x.ariaRelevant, x => x.ariaRoledescription, ref('control'), () => focusTemplate, x => affixIconTemplate(x.icon), x => x.label);
|
|
48
74
|
};
|
|
49
75
|
|
|
50
|
-
const
|
|
51
|
-
baseName: '
|
|
52
|
-
template:
|
|
53
|
-
styles: css_248z
|
|
76
|
+
const fabDefinition = Fab.compose({
|
|
77
|
+
baseName: 'fab',
|
|
78
|
+
template: FabTemplate,
|
|
79
|
+
styles: css_248z,
|
|
80
|
+
shadowOptions: {
|
|
81
|
+
delegatesFocus: true
|
|
82
|
+
}
|
|
54
83
|
});
|
|
55
|
-
const
|
|
56
|
-
const
|
|
84
|
+
const fabRegistries = [fabDefinition(), ...iconRegistries, ...focusRegistries];
|
|
85
|
+
const registerFab = registerFactory(fabRegistries);
|
|
57
86
|
|
|
58
|
-
export {
|
|
87
|
+
export { fabRegistries as a, fabDefinition as f, registerFab as r };
|