@vonage/vivid 3.27.0 → 3.29.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 +2 -1
- package/accordion/index.js +0 -2
- package/accordion-item/index.js +0 -2
- package/alert/index.js +0 -2
- package/avatar/index.js +0 -2
- package/badge/index.js +0 -2
- package/banner/index.js +0 -2
- package/breadcrumb-item/index.js +0 -2
- package/button/index.js +0 -2
- package/calendar/index.js +0 -1
- package/calendar-event/index.js +0 -2
- package/card/index.js +0 -2
- package/checkbox/index.js +0 -2
- package/combobox/index.js +0 -3
- package/custom-elements.json +173 -52
- package/data-grid/index.js +1 -5
- package/dialog/index.js +0 -2
- package/empty-state/index.js +0 -2
- package/fab/index.js +0 -2
- package/file-picker/index.js +0 -2
- package/icon/index.js +0 -2
- package/index.d.ts +3 -3
- package/index.js +1 -6
- package/lib/accordion/accordion.d.ts +5 -5
- package/lib/accordion/accordion.template.d.ts +3 -3
- package/lib/accordion/definition.d.ts +2 -2
- package/lib/accordion/index.d.ts +1 -1
- package/lib/accordion-item/accordion-item.d.ts +12 -12
- package/lib/accordion-item/accordion-item.template.d.ts +4 -4
- package/lib/accordion-item/definition.d.ts +1 -1
- package/lib/accordion-item/index.d.ts +1 -1
- package/lib/action-group/action-group.d.ts +11 -11
- package/lib/action-group/action-group.template.d.ts +4 -4
- package/lib/action-group/definition.d.ts +2 -2
- package/lib/action-group/index.d.ts +1 -1
- package/lib/alert/alert.d.ts +22 -22
- package/lib/alert/alert.template.d.ts +4 -4
- package/lib/alert/definition.d.ts +2 -2
- package/lib/alert/index.d.ts +1 -1
- package/lib/avatar/avatar.d.ts +14 -14
- package/lib/avatar/avatar.template.d.ts +4 -4
- package/lib/avatar/definition.d.ts +2 -2
- package/lib/avatar/index.d.ts +1 -1
- package/lib/badge/badge.d.ts +14 -14
- package/lib/badge/badge.template.d.ts +4 -4
- package/lib/badge/definition.d.ts +4 -4
- package/lib/badge/index.d.ts +1 -1
- package/lib/banner/banner.d.ts +20 -20
- package/lib/banner/banner.template.d.ts +4 -4
- package/lib/banner/definition.d.ts +2 -2
- package/lib/banner/index.d.ts +1 -1
- package/lib/breadcrumb/breadcrumb.d.ts +3 -3
- package/lib/breadcrumb/breadcrumb.template.d.ts +4 -4
- package/lib/breadcrumb/definition.d.ts +1 -1
- package/lib/breadcrumb/index.d.ts +1 -1
- package/lib/breadcrumb-item/breadcrumb-item.d.ts +5 -5
- package/lib/breadcrumb-item/breadcrumb-item.template.d.ts +4 -4
- package/lib/breadcrumb-item/definition.d.ts +1 -1
- package/lib/breadcrumb-item/index.d.ts +1 -1
- package/lib/button/button.d.ts +18 -18
- package/lib/button/button.template.d.ts +4 -4
- package/lib/button/definition.d.ts +2 -2
- package/lib/button/index.d.ts +1 -1
- package/lib/calendar/calendar.d.ts +13 -13
- package/lib/calendar/calendar.template.d.ts +4 -4
- package/lib/calendar/definition.d.ts +1 -1
- package/lib/calendar/helpers/calendar.date-functions.d.ts +2 -2
- package/lib/calendar/helpers/calendar.event-context.d.ts +6 -6
- package/lib/calendar/helpers/calendar.keyboard-interactions.d.ts +9 -9
- package/lib/calendar/index.d.ts +1 -1
- package/lib/calendar-event/calendar-event.d.ts +13 -13
- package/lib/calendar-event/calendar-event.template.d.ts +4 -4
- package/lib/calendar-event/definition.d.ts +2 -2
- package/lib/calendar-event/index.d.ts +1 -1
- package/lib/card/card.d.ts +10 -10
- package/lib/card/card.template.d.ts +4 -4
- package/lib/card/definition.d.ts +1 -1
- package/lib/card/index.d.ts +1 -1
- package/lib/checkbox/checkbox.d.ts +10 -11
- package/lib/checkbox/checkbox.template.d.ts +4 -4
- package/lib/checkbox/definition.d.ts +1 -1
- package/lib/checkbox/index.d.ts +1 -1
- package/lib/combobox/combobox.d.ts +12 -13
- package/lib/combobox/combobox.template.d.ts +4 -4
- package/lib/combobox/definition.d.ts +3 -4
- package/lib/combobox/index.d.ts +1 -1
- package/lib/components.d.ts +52 -52
- package/lib/data-grid/data-grid-cell.d.ts +22 -22
- package/lib/data-grid/data-grid-cell.template.d.ts +4 -4
- package/lib/data-grid/data-grid-row.d.ts +4 -4
- package/lib/data-grid/data-grid-row.template.d.ts +3 -3
- package/lib/data-grid/data-grid.d.ts +20 -20
- package/lib/data-grid/data-grid.options.d.ts +38 -38
- package/lib/data-grid/data-grid.template.d.ts +3 -3
- package/lib/data-grid/definition.d.ts +6 -6
- package/lib/data-grid/index.d.ts +1 -1
- package/lib/dialog/definition.d.ts +2 -2
- package/lib/dialog/dialog.d.ts +26 -26
- package/lib/dialog/dialog.template.d.ts +4 -4
- package/lib/dialog/index.d.ts +1 -1
- package/lib/divider/definition.d.ts +1 -1
- package/lib/divider/divider.d.ts +3 -3
- package/lib/divider/divider.template.d.ts +4 -4
- package/lib/divider/index.d.ts +1 -1
- package/lib/elevation/definition.d.ts +1 -1
- package/lib/elevation/elevation.d.ts +5 -5
- package/lib/elevation/elevation.template.d.ts +4 -4
- package/lib/elevation/index.d.ts +1 -1
- package/lib/empty-state/definition.d.ts +3 -3
- package/lib/empty-state/empty-state.d.ts +5 -5
- package/lib/empty-state/empty-state.template.d.ts +4 -4
- package/lib/empty-state/index.d.ts +1 -1
- package/lib/enums.d.ts +60 -60
- package/lib/fab/definition.d.ts +4 -4
- package/lib/fab/fab.d.ts +12 -12
- package/lib/fab/fab.template.d.ts +4 -4
- package/lib/fab/index.d.ts +1 -1
- package/lib/file-picker/definition.d.ts +3 -3
- package/lib/file-picker/file-picker.d.ts +22 -22
- package/lib/file-picker/file-picker.template.d.ts +4 -4
- package/lib/file-picker/index.d.ts +1 -1
- package/lib/focus/definition.d.ts +3 -3
- package/lib/focus/focus.d.ts +3 -3
- package/lib/focus/focus.template.d.ts +4 -4
- package/lib/focus/index.d.ts +1 -1
- package/lib/header/definition.d.ts +3 -3
- package/lib/header/header.d.ts +5 -5
- package/lib/header/header.template.d.ts +4 -4
- package/lib/header/index.d.ts +1 -1
- package/lib/icon/definition.d.ts +4 -4
- package/lib/icon/icon.d.ts +12 -12
- package/lib/icon/icon.placeholder.d.ts +1 -1
- package/lib/icon/icon.template.d.ts +4 -4
- package/lib/icon/index.d.ts +1 -1
- package/lib/layout/definition.d.ts +4 -4
- package/lib/layout/index.d.ts +1 -1
- package/lib/layout/layout.d.ts +17 -17
- package/lib/layout/layout.template.d.ts +4 -4
- package/lib/listbox/definition.d.ts +4 -4
- package/lib/listbox/index.d.ts +1 -1
- package/lib/listbox/listbox.d.ts +6 -6
- package/lib/listbox/listbox.template.d.ts +4 -4
- package/lib/menu/definition.d.ts +12 -12
- package/lib/menu/index.d.ts +1 -1
- package/lib/menu/menu.d.ts +16 -15
- package/lib/menu/menu.template.d.ts +3 -3
- package/lib/menu-item/definition.d.ts +3 -3
- package/lib/menu-item/index.d.ts +1 -1
- package/lib/menu-item/menu-item.d.ts +14 -14
- package/lib/menu-item/menu-item.template.d.ts +4 -4
- package/lib/nav/definition.d.ts +3 -3
- package/lib/nav/index.d.ts +1 -1
- package/lib/nav/nav.d.ts +3 -3
- package/lib/nav/nav.template.d.ts +4 -4
- package/lib/nav-disclosure/definition.d.ts +3 -3
- package/lib/nav-disclosure/index.d.ts +1 -1
- package/lib/nav-disclosure/nav-disclosure.d.ts +10 -10
- package/lib/nav-disclosure/nav-disclosure.template.d.ts +4 -4
- package/lib/nav-item/definition.d.ts +3 -3
- package/lib/nav-item/index.d.ts +1 -1
- package/lib/nav-item/nav-item.d.ts +7 -7
- package/lib/nav-item/nav-item.template.d.ts +4 -4
- package/lib/note/definition.d.ts +4 -4
- package/lib/note/index.d.ts +1 -1
- package/lib/note/note.d.ts +10 -10
- package/lib/note/note.template.d.ts +4 -4
- package/lib/number-field/definition.d.ts +5 -5
- package/lib/number-field/index.d.ts +1 -1
- package/lib/number-field/number-field.d.ts +13 -13
- package/lib/number-field/number-field.template.d.ts +4 -4
- package/lib/option/definition.d.ts +3 -3
- package/lib/option/index.d.ts +1 -1
- package/lib/option/option.d.ts +12 -12
- package/lib/option/option.template.d.ts +4 -4
- package/lib/pagination/definition.d.ts +3 -3
- package/lib/pagination/index.d.ts +1 -1
- package/lib/pagination/pagination.d.ts +18 -18
- package/lib/pagination/pagination.template.d.ts +4 -4
- package/lib/popup/definition.d.ts +5 -5
- package/lib/popup/index.d.ts +1 -1
- package/lib/popup/popup.d.ts +21 -21
- package/lib/popup/popup.template.d.ts +4 -4
- package/lib/progress/definition.d.ts +4 -4
- package/lib/progress/index.d.ts +1 -1
- package/lib/progress/progress.d.ts +9 -9
- package/lib/progress/progress.template.d.ts +5 -5
- package/lib/progress-ring/definition.d.ts +4 -4
- package/lib/progress-ring/index.d.ts +1 -1
- package/lib/progress-ring/progress-ring.d.ts +7 -7
- package/lib/progress-ring/progress-ring.template.d.ts +4 -4
- package/lib/radio/definition.d.ts +3 -3
- package/lib/radio/index.d.ts +1 -1
- package/lib/radio/radio.d.ts +7 -7
- package/lib/radio/radio.template.d.ts +4 -4
- package/lib/radio-group/definition.d.ts +11 -11
- package/lib/radio-group/index.d.ts +1 -1
- package/lib/radio-group/radio-group.d.ts +4 -4
- package/lib/radio-group/radio-group.template.d.ts +4 -4
- package/lib/select/definition.d.ts +4 -4
- package/lib/select/index.d.ts +1 -1
- package/lib/select/select.d.ts +17 -18
- package/lib/select/select.template.d.ts +4 -4
- package/lib/side-drawer/definition.d.ts +3 -3
- package/lib/side-drawer/index.d.ts +1 -1
- package/lib/side-drawer/side-drawer.d.ts +9 -9
- package/lib/side-drawer/side-drawer.template.d.ts +4 -4
- package/lib/slider/definition.d.ts +3 -3
- package/lib/slider/index.d.ts +1 -1
- package/lib/slider/slider.d.ts +4 -4
- package/lib/slider/slider.template.d.ts +4 -4
- package/lib/switch/definition.d.ts +4 -4
- package/lib/switch/index.d.ts +1 -1
- package/lib/switch/switch.d.ts +7 -7
- package/lib/switch/switch.template.d.ts +4 -4
- package/lib/tab/definition.d.ts +4 -4
- package/lib/tab/index.d.ts +1 -1
- package/lib/tab/tab.d.ts +14 -14
- package/lib/tab/tab.template.d.ts +3 -3
- package/lib/tab-panel/definition.d.ts +3 -3
- package/lib/tab-panel/index.d.ts +1 -1
- package/lib/tab-panel/tab-panel.d.ts +3 -3
- package/lib/tab-panel/tab-panel.template.d.ts +2 -2
- package/lib/tabs/definition.d.ts +3 -3
- package/lib/tabs/index.d.ts +1 -1
- package/lib/tabs/tabs.d.ts +15 -15
- package/lib/tabs/tabs.template.d.ts +2 -2
- package/lib/tag/definition.d.ts +4 -4
- package/lib/tag/index.d.ts +1 -1
- package/lib/tag/tag.d.ts +22 -22
- package/lib/tag/tag.template.d.ts +4 -4
- package/lib/tag-group/definition.d.ts +3 -3
- package/lib/tag-group/index.d.ts +1 -1
- package/lib/tag-group/tag-group.d.ts +3 -3
- package/lib/tag-group/tag-group.template.d.ts +4 -4
- package/lib/text-anchor/definition.d.ts +3 -3
- package/lib/text-anchor/index.d.ts +1 -1
- package/lib/text-anchor/text-anchor.d.ts +7 -7
- package/lib/text-anchor/text-anchor.template.d.ts +4 -4
- package/lib/text-area/definition.d.ts +4 -4
- package/lib/text-area/index.d.ts +1 -1
- package/lib/text-area/text-area.d.ts +8 -9
- package/lib/text-area/text-area.template.d.ts +4 -4
- package/lib/text-field/definition.d.ts +4 -4
- package/lib/text-field/index.d.ts +1 -1
- package/lib/text-field/text-field.d.ts +13 -14
- package/lib/text-field/text-field.template.d.ts +4 -4
- package/lib/toggletip/definition.d.ts +3 -3
- package/lib/toggletip/index.d.ts +1 -1
- package/lib/toggletip/toggletip.d.ts +15 -15
- package/lib/toggletip/toggletip.template.d.ts +4 -4
- package/lib/tooltip/definition.d.ts +3 -3
- package/lib/tooltip/index.d.ts +1 -1
- package/lib/tooltip/tooltip.d.ts +14 -14
- package/lib/tooltip/tooltip.template.d.ts +4 -4
- package/lib/tree-item/definition.d.ts +3 -3
- package/lib/tree-item/index.d.ts +1 -1
- package/lib/tree-item/tree-item.d.ts +7 -7
- package/lib/tree-item/tree-item.template.d.ts +4 -4
- package/lib/tree-view/definition.d.ts +3 -3
- package/lib/tree-view/index.d.ts +1 -1
- package/lib/tree-view/tree-view.d.ts +3 -3
- package/lib/tree-view/tree-view.template.d.ts +2 -2
- package/listbox/index.js +17 -21
- package/menu/index.js +0 -3
- package/menu-item/index.js +0 -3
- package/nav-disclosure/index.js +0 -2
- package/nav-item/index.js +0 -2
- package/note/index.js +0 -2
- package/number-field/index.js +0 -3
- package/option/index.js +0 -2
- package/package.json +9 -8
- package/pagination/index.js +1 -5
- package/popup/index.js +0 -3
- package/radio-group/index.js +2 -2
- package/select/index.js +0 -3
- package/shared/affix.js +2 -5
- package/shared/anchor.js +2 -1
- package/shared/apply-mixins.js +1 -1
- package/shared/definition.js +7 -9
- package/shared/definition10.js +13 -17
- package/shared/definition11.js +6 -9
- package/shared/definition12.js +16 -18
- package/shared/definition13.js +6 -8
- package/shared/definition14.js +7 -12
- package/shared/definition15.js +43 -52
- package/shared/definition16.js +8 -71
- package/shared/definition17.js +36 -45
- package/shared/definition18.js +19 -24
- package/shared/definition19.js +45 -49
- package/shared/definition2.js +24 -28
- package/shared/definition20.js +389 -280
- package/shared/definition21.js +12 -16
- package/shared/definition22.js +82 -168
- package/shared/definition23.js +35 -41
- package/shared/definition24.js +6 -8
- package/shared/definition25.js +10 -14
- package/shared/definition26.js +40 -42
- package/shared/definition27.js +24 -27
- package/shared/definition28.js +6 -8
- package/shared/definition29.js +3 -5
- package/shared/definition3.js +5 -9
- package/shared/definition30.js +88 -45
- package/shared/definition31.js +33 -43
- package/shared/definition32.js +2 -4
- package/shared/definition33.js +11 -15
- package/shared/definition34.js +5 -9
- package/shared/definition35.js +7 -11
- package/shared/definition36.js +66 -71
- package/shared/definition37.js +60 -101
- package/shared/definition38.js +14 -46
- package/shared/definition39.js +11 -14
- package/shared/definition4.js +3 -5
- package/shared/definition40.js +17 -20
- package/shared/definition41.js +56 -62
- package/shared/definition42.js +8 -11
- package/shared/definition43.js +20 -58
- package/shared/definition44.js +14 -17
- package/shared/definition45.js +8 -10
- package/shared/definition46.js +2 -4
- package/shared/definition47.js +12 -15
- package/shared/definition48.js +19 -24
- package/shared/definition49.js +3 -5
- package/shared/definition5.js +7 -8
- package/shared/definition50.js +51 -55
- package/shared/definition51.js +56 -60
- package/shared/definition52.js +12 -520
- package/shared/definition53.js +9 -11
- package/shared/definition54.js +27 -31
- package/shared/definition55.js +12 -14
- package/shared/definition6.js +17 -23
- package/shared/definition7.js +43 -47
- package/shared/definition8.js +3 -5
- package/shared/definition9.js +13 -17
- package/shared/design-system/index.d.ts +3 -3
- package/shared/focus2.js +1 -3
- package/shared/form-associated.js +1 -1
- package/shared/form-elements.js +16 -20
- package/shared/icon.js +2 -1171
- package/shared/index.js +41 -1549
- package/shared/listbox.js +1 -1
- package/shared/patterns/affix.d.ts +9 -9
- package/shared/patterns/focus.d.ts +3 -3
- package/shared/patterns/form-elements/form-elements.d.ts +57 -57
- package/shared/patterns/form-elements/index.d.ts +1 -1
- package/shared/patterns/index.d.ts +3 -3
- package/shared/repeat.js +1 -1
- package/shared/text-anchor.template.js +38 -40
- package/shared/text-field.js +1 -1
- package/shared/text-field2.js +1 -1
- package/shared/when.js +19 -5
- package/slider/index.js +0 -3
- 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 +17 -17
- package/styles/tokens/theme-light.css +17 -17
- package/switch/index.js +0 -2
- package/tab/index.js +0 -2
- package/tabs/index.js +0 -2
- package/tag/index.js +0 -2
- package/text-anchor/index.js +0 -2
- package/text-area/index.js +0 -2
- package/text-field/index.js +0 -2
- package/toggletip/index.js +0 -4
- package/tooltip/index.js +0 -3
- package/tree-item/index.js +1 -3
- package/vivid.api.json +48 -84
- package/shared/es.object.assign.js +0 -68
- package/shared/es.regexp.to-string.js +0 -61
- package/shared/es.string.includes.js +0 -83
- package/shared/string-trim.js +0 -40
- package/shared/to-string.js +0 -51
package/shared/definition25.js
CHANGED
|
@@ -1,42 +1,38 @@
|
|
|
1
1
|
import { F as FoundationElement, _ as __decorate, a as attr, b as __metadata, o as observable, h as html, r as registerFactory } from './index.js';
|
|
2
2
|
import { i as iconRegistries } from './definition3.js';
|
|
3
3
|
import { I as Icon } from './icon.js';
|
|
4
|
-
import { s as slotted } from './slotted.js';
|
|
5
4
|
import { w as when } from './when.js';
|
|
5
|
+
import { s as slotted } from './slotted.js';
|
|
6
6
|
import { c as classNames } from './class-names.js';
|
|
7
7
|
|
|
8
|
-
var css_248z = "/**\n * Do not edit directly\n * Generated on
|
|
8
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Wed, 09 Aug 2023 13:23:44 GMT\n */\n:host {\n display: block;\n}\n\n.base {\n display: flex;\n box-sizing: border-box;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n block-size: 100%;\n gap: 24px;\n}\n\n.icon-container {\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--vvd-color-neutral-100);\n block-size: 120px;\n border-radius: 50%;\n inline-size: 120px;\n}\n\n.content {\n display: flex;\n flex-direction: column;\n font: var(--vvd-typography-base);\n gap: 8px;\n text-align: center;\n}\n\nheader {\n font: var(--vvd-typography-base-bold);\n}\n\n.actions {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: center;\n gap: 8px;\n}\n.base.no-actions .actions {\n display: none;\n}";
|
|
9
9
|
|
|
10
10
|
class EmptyState extends FoundationElement {}
|
|
11
11
|
__decorate([attr, __metadata("design:type", String)], EmptyState.prototype, "headline", void 0);
|
|
12
12
|
__decorate([attr, __metadata("design:type", String)], EmptyState.prototype, "icon", void 0);
|
|
13
13
|
__decorate([observable, __metadata("design:type", Array)], EmptyState.prototype, "slottedActionItems", void 0);
|
|
14
14
|
|
|
15
|
-
let _ = t => t,
|
|
16
|
-
_t,
|
|
17
|
-
_t2,
|
|
18
|
-
_t3;
|
|
19
15
|
const getClasses = x => {
|
|
20
16
|
var _a;
|
|
21
17
|
return classNames('base', ['no-actions', ((_a = x.slottedActionItems) === null || _a === void 0 ? void 0 : _a.length) === 0]);
|
|
22
18
|
};
|
|
23
19
|
const EmptyStateTemplate = context => {
|
|
24
20
|
const iconTag = context.tagFor(Icon);
|
|
25
|
-
return html
|
|
26
|
-
<div class="${
|
|
21
|
+
return html`
|
|
22
|
+
<div class="${getClasses}">
|
|
27
23
|
<slot name="graphic">
|
|
28
|
-
${
|
|
24
|
+
${when(x => x.icon, html`<div class="icon-container">
|
|
25
|
+
<${iconTag} class="icon" name="${x => x.icon}" size="5"></${iconTag}>
|
|
26
|
+
</div>`)}
|
|
29
27
|
</slot>
|
|
30
28
|
<div class="content">
|
|
31
|
-
${
|
|
29
|
+
${when(x => x.headline, html`<header>${x => x.headline}</header>`)}
|
|
32
30
|
<slot></slot>
|
|
33
31
|
</div>
|
|
34
32
|
<div class="actions">
|
|
35
|
-
<slot name="action-items" ${
|
|
33
|
+
<slot name="action-items" ${slotted('slottedActionItems')}></slot>
|
|
36
34
|
</div>
|
|
37
|
-
</div
|
|
38
|
-
<${0} class="icon" name="${0}" size="5"></${0}>
|
|
39
|
-
</div>`), iconTag, x => x.icon, iconTag)), when(x => x.headline, html(_t3 || (_t3 = _`<header>${0}</header>`), x => x.headline)), slotted('slottedActionItems'));
|
|
35
|
+
</div>`;
|
|
40
36
|
};
|
|
41
37
|
|
|
42
38
|
const emptyStateDefinition = EmptyState.compose({
|
package/shared/definition26.js
CHANGED
|
@@ -8,7 +8,7 @@ import { f as focusTemplateFactory } from './focus2.js';
|
|
|
8
8
|
import { r as ref } from './ref.js';
|
|
9
9
|
import { c as classNames } from './class-names.js';
|
|
10
10
|
|
|
11
|
-
var css_248z = "/**\n * Do not edit directly\n * Generated on
|
|
11
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Wed, 09 Aug 2023 13:23:44 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 /* @cssprop [--vvd-fab-accent-primary=var(--vvd-color-canvas-text)] */\n --_connotation-color-primary: var(--vvd-fab-accent-primary, var(--vvd-color-canvas-text));\n /* @cssprop [--vvd-fab-accent-primary-text=var(--vvd-color-canvas)] */\n --_connotation-color-primary-text: var(--vvd-fab-accent-primary-text, var(--vvd-color-canvas));\n /* @cssprop [--vvd-fab-accent-primary-increment=var(--vvd-color-neutral-800)] */\n --_connotation-color-primary-increment: var(--vvd-fab-accent-primary-increment, var(--vvd-color-neutral-800));\n /* @cssprop [--vvd-fab-accent-contrast=var(--vvd-color-neutral-800)] */\n --_connotation-color-contrast: var(--vvd-fab-accent-contrast, var(--vvd-color-neutral-800));\n /* @cssprop [--vvd-fab-accent-fierce=var(--vvd-color-neutral-700)] */\n --_connotation-color-fierce: var(--vvd-fab-accent-fierce, var(--vvd-color-neutral-700));\n /* @cssprop [--vvd-fab-accent-firm=var(--vvd-color-canvas-text)] */\n --_connotation-color-firm: var(--vvd-fab-accent-firm, var(--vvd-color-canvas-text));\n}\n.control.connotation-cta {\n /* @cssprop [--vvd-fab-cta-primary=var(--vvd-color-cta-500)] */\n --_connotation-color-primary: var(--vvd-fab-cta-primary, var(--vvd-color-cta-500));\n /* @cssprop [--vvd-fab-cta-primary-text=var(--vvd-color-canvas)] */\n --_connotation-color-primary-text: var(--vvd-fab-cta-primary-text, var(--vvd-color-canvas));\n /* @cssprop [--vvd-fab-cta-primary-increment=var(--vvd-color-cta-600)] */\n --_connotation-color-primary-increment: var(--vvd-fab-cta-primary-increment, var(--vvd-color-cta-600));\n /* @cssprop [--vvd-fab-cta-contrast=var(--vvd-color-cta-800)] */\n --_connotation-color-contrast: var(--vvd-fab-cta-contrast, var(--vvd-color-cta-800));\n /* @cssprop [--vvd-fab-cta-fierce=var(--vvd-color-cta-700)] */\n --_connotation-color-fierce: var(--vvd-fab-cta-fierce, var(--vvd-color-cta-700));\n /* @cssprop [--vvd-fab-cta-firm=var(--vvd-color-cta-600)] */\n --_connotation-color-firm: var(--vvd-fab-cta-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-300);\n --_appearance-color-fill: var(--vvd-color-neutral-100);\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}";
|
|
12
12
|
|
|
13
13
|
class Fab extends Button {}
|
|
14
14
|
__decorate([attr, __metadata("design:type", String)], Fab.prototype, "connotation", void 0);
|
|
@@ -16,8 +16,6 @@ __decorate([attr, __metadata("design:type", String)], Fab.prototype, "size", voi
|
|
|
16
16
|
__decorate([attr, __metadata("design:type", String)], Fab.prototype, "label", void 0);
|
|
17
17
|
applyMixins(Fab, AffixIconWithTrailing);
|
|
18
18
|
|
|
19
|
-
let _ = t => t,
|
|
20
|
-
_t;
|
|
21
19
|
const getClasses = ({
|
|
22
20
|
connotation,
|
|
23
21
|
size,
|
|
@@ -29,48 +27,48 @@ const getClasses = ({
|
|
|
29
27
|
const FabTemplate = context => {
|
|
30
28
|
const affixIconTemplate = affixIconTemplateFactory(context);
|
|
31
29
|
const focusTemplate = focusTemplateFactory(context);
|
|
32
|
-
return html
|
|
30
|
+
return html`
|
|
33
31
|
<button
|
|
34
|
-
class="${
|
|
35
|
-
?autofocus="${
|
|
36
|
-
?disabled="${
|
|
37
|
-
form="${
|
|
38
|
-
formaction="${
|
|
39
|
-
formenctype="${
|
|
40
|
-
formmethod="${
|
|
41
|
-
formnovalidate="${
|
|
42
|
-
formtarget="${
|
|
43
|
-
name="${
|
|
44
|
-
type="${
|
|
45
|
-
value="${
|
|
46
|
-
aria-atomic="${
|
|
47
|
-
aria-busy="${
|
|
48
|
-
aria-controls="${
|
|
49
|
-
aria-current="${
|
|
50
|
-
aria-describedby="${
|
|
51
|
-
aria-details="${
|
|
52
|
-
aria-disabled="${
|
|
53
|
-
aria-errormessage="${
|
|
54
|
-
aria-expanded="${
|
|
55
|
-
aria-flowto="${
|
|
56
|
-
aria-haspopup="${
|
|
57
|
-
aria-hidden="${
|
|
58
|
-
aria-invalid="${
|
|
59
|
-
aria-keyshortcuts="${
|
|
60
|
-
aria-label="${
|
|
61
|
-
aria-labelledby="${
|
|
62
|
-
aria-live="${
|
|
63
|
-
aria-owns="${
|
|
64
|
-
aria-pressed="${
|
|
65
|
-
aria-relevant="${
|
|
66
|
-
aria-roledescription="${
|
|
67
|
-
${
|
|
32
|
+
class="${getClasses} "
|
|
33
|
+
?autofocus="${x => x.autofocus}"
|
|
34
|
+
?disabled="${x => x.disabled}"
|
|
35
|
+
form="${x => x.formId}"
|
|
36
|
+
formaction="${x => x.formaction}"
|
|
37
|
+
formenctype="${x => x.formenctype}"
|
|
38
|
+
formmethod="${x => x.formmethod}"
|
|
39
|
+
formnovalidate="${x => x.formnovalidate}"
|
|
40
|
+
formtarget="${x => x.formtarget}"
|
|
41
|
+
name="${x => x.name}"
|
|
42
|
+
type="${x => x.type}"
|
|
43
|
+
value="${x => x.value}"
|
|
44
|
+
aria-atomic="${x => x.ariaAtomic}"
|
|
45
|
+
aria-busy="${x => x.ariaBusy}"
|
|
46
|
+
aria-controls="${x => x.ariaControls}"
|
|
47
|
+
aria-current="${x => x.ariaCurrent}"
|
|
48
|
+
aria-describedby="${x => x.ariaDescribedby}"
|
|
49
|
+
aria-details="${x => x.ariaDetails}"
|
|
50
|
+
aria-disabled="${x => x.ariaDisabled}"
|
|
51
|
+
aria-errormessage="${x => x.ariaErrormessage}"
|
|
52
|
+
aria-expanded="${x => x.ariaExpanded}"
|
|
53
|
+
aria-flowto="${x => x.ariaFlowto}"
|
|
54
|
+
aria-haspopup="${x => x.ariaHaspopup}"
|
|
55
|
+
aria-hidden="${x => x.ariaHidden}"
|
|
56
|
+
aria-invalid="${x => x.ariaInvalid}"
|
|
57
|
+
aria-keyshortcuts="${x => x.ariaKeyshortcuts}"
|
|
58
|
+
aria-label="${x => x.ariaLabel}"
|
|
59
|
+
aria-labelledby="${x => x.ariaLabelledby}"
|
|
60
|
+
aria-live="${x => x.ariaLive}"
|
|
61
|
+
aria-owns="${x => x.ariaOwns}"
|
|
62
|
+
aria-pressed="${x => x.ariaPressed}"
|
|
63
|
+
aria-relevant="${x => x.ariaRelevant}"
|
|
64
|
+
aria-roledescription="${x => x.ariaRoledescription}"
|
|
65
|
+
${ref('control')}
|
|
68
66
|
>
|
|
69
|
-
${
|
|
70
|
-
${
|
|
71
|
-
${
|
|
67
|
+
${() => focusTemplate}
|
|
68
|
+
${x => affixIconTemplate(x.icon)}
|
|
69
|
+
${x => x.label}
|
|
72
70
|
</button>
|
|
73
|
-
|
|
71
|
+
`;
|
|
74
72
|
};
|
|
75
73
|
|
|
76
74
|
const fabDefinition = Fab.compose({
|
package/shared/definition27.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as FoundationElement,
|
|
1
|
+
import { F as FoundationElement, d as __classPrivateFieldGet, f as __classPrivateFieldSet, _ as __decorate, a as attr, b as __metadata, h as html, r as registerFactory } from './index.js';
|
|
2
2
|
import { i as iconRegistries } from './definition3.js';
|
|
3
3
|
import { f as focusRegistries } from './definition4.js';
|
|
4
4
|
import { C as Connotation, B as Button, b as buttonRegistries } from './definition7.js';
|
|
@@ -10,7 +10,7 @@ import { f as focusTemplateFactory } from './focus2.js';
|
|
|
10
10
|
import { w as when } from './when.js';
|
|
11
11
|
import { c as classNames } from './class-names.js';
|
|
12
12
|
|
|
13
|
-
var css_248z = "/**\n * Do not edit directly\n * Generated on
|
|
13
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Wed, 09 Aug 2023 13:23:44 GMT\n */\n:host {\n display: block;\n max-inline-size: 400px;\n}\n\n.base {\n display: flex;\n flex-direction: column;\n}\n\n.control {\n position: relative;\n display: flex;\n box-sizing: border-box;\n flex-wrap: wrap;\n align-items: center;\n justify-content: center;\n padding: 16px;\n border: 1px dashed var(--vvd-color-neutral-400);\n background-color: var(--vvd-color-cta-50);\n border-radius: 6px;\n color: var(--vvd-color-neutral-600);\n cursor: pointer;\n font: var(--vvd-typography-base);\n gap: 8px;\n inline-size: 100%;\n min-block-size: 52px;\n outline: none;\n}\n@supports selector(:focus-visible) {\n .control:focus {\n outline: none;\n }\n}\n.control:not(.size-expanded) {\n min-block-size: 52px;\n}\n.control.size-expanded {\n min-block-size: 120px;\n}\n\n.main {\n pointer-events: none;\n}\n\n.dz-preview {\n display: grid;\n box-sizing: border-box;\n padding: 6px 12px;\n border-radius: 6px;\n grid-template-columns: 1fr auto;\n grid-template-rows: auto auto;\n inline-size: 100%;\n}\n.dz-preview .dz-details {\n display: flex;\n min-width: 0;\n flex-direction: column;\n max-inline-size: 100%;\n}\n.dz-preview .dz-details .dz-filename {\n overflow: hidden;\n color: var(--vvd-color-canvas-text);\n font: var(--vvd-typography-base);\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.dz-preview .dz-details .dz-size {\n color: var(--vvd-color-neutral-600);\n font: var(--vvd-typography-base-condensed);\n}\n.dz-preview .dz-error-message {\n color: var(--vvd-color-alert-500);\n font: var(--vvd-typography-base-condensed);\n margin-block-start: 4px;\n}\n.dz-preview:not(.dz-error) .dz-error-message {\n display: none;\n}\n.dz-preview.dz-error {\n border: 1px solid var(--vvd-color-alert-500);\n}\n.dz-preview.dz-error .dz-details .dz-size,\n.dz-preview.dz-error .dz-progress {\n display: none;\n}\n.dz-preview .remove-btn {\n display: inline;\n align-self: center;\n grid-column: 2/-1;\n grid-row: 1/-1;\n}\n\n.message {\n margin-block-start: 4px;\n --_low-ink-color: var(--vvd-color-neutral-600);\n}\n\n.preview-list {\n display: flex;\n flex-direction: column;\n gap: 12px;\n margin-block-start: 12px;\n overflow-y: auto;\n}\n.preview-list:empty {\n display: none;\n}\n\n.control:not(:focus-visible) .focus-indicator {\n display: none;\n}";
|
|
14
14
|
|
|
15
15
|
var objectExtend = extend;
|
|
16
16
|
|
|
@@ -2140,14 +2140,6 @@ function $3ed269f2f0fb224b$var$__guardMethod__(obj, methodName, transform) {
|
|
|
2140
2140
|
|
|
2141
2141
|
var _FilePicker_instances, _FilePicker_dropzone, _FilePicker_chooseFile, _FilePicker_updateHiddenFileInput, _FilePicker_handleFilesChanged;
|
|
2142
2142
|
class FilePicker extends FoundationElement {
|
|
2143
|
-
constructor() {
|
|
2144
|
-
super();
|
|
2145
|
-
_FilePicker_instances.add(this);
|
|
2146
|
-
_FilePicker_dropzone.set(this, void 0);
|
|
2147
|
-
this.maxFileSize = 256;
|
|
2148
|
-
this.buttonTag = 'vwc-button';
|
|
2149
|
-
$3ed269f2f0fb224b$export$2e2bcd8739ae039.autoDiscover = false;
|
|
2150
|
-
}
|
|
2151
2143
|
get files() {
|
|
2152
2144
|
var _a, _b;
|
|
2153
2145
|
return (_b = (_a = __classPrivateFieldGet(this, _FilePicker_dropzone, "f")) === null || _a === void 0 ? void 0 : _a.getAcceptedFiles()) !== null && _b !== void 0 ? _b : [];
|
|
@@ -2171,6 +2163,14 @@ class FilePicker extends FoundationElement {
|
|
|
2171
2163
|
}
|
|
2172
2164
|
__classPrivateFieldGet(this, _FilePicker_dropzone, "f").options.acceptedFiles = newValue;
|
|
2173
2165
|
}
|
|
2166
|
+
constructor() {
|
|
2167
|
+
super();
|
|
2168
|
+
_FilePicker_instances.add(this);
|
|
2169
|
+
_FilePicker_dropzone.set(this, void 0);
|
|
2170
|
+
this.maxFileSize = 256;
|
|
2171
|
+
this.buttonTag = 'vwc-button';
|
|
2172
|
+
$3ed269f2f0fb224b$export$2e2bcd8739ae039.autoDiscover = false;
|
|
2173
|
+
}
|
|
2174
2174
|
connectedCallback() {
|
|
2175
2175
|
var _a;
|
|
2176
2176
|
super.connectedCallback();
|
|
@@ -2256,32 +2256,29 @@ __decorate([attr, __metadata("design:type", String)], FilePicker.prototype, "acc
|
|
|
2256
2256
|
__decorate([attr, __metadata("design:type", String)], FilePicker.prototype, "size", void 0);
|
|
2257
2257
|
applyMixins(FilePicker, FormElementHelperText);
|
|
2258
2258
|
|
|
2259
|
-
let _ = t => t,
|
|
2260
|
-
_t,
|
|
2261
|
-
_t2;
|
|
2262
2259
|
const getClasses = ({
|
|
2263
2260
|
size
|
|
2264
2261
|
}) => classNames('control', 'dz-default', 'dz-message', [`size-${size}`, Boolean(size)]);
|
|
2265
2262
|
const FilePickerTemplate = context => {
|
|
2266
2263
|
const focusTemplate = focusTemplateFactory(context);
|
|
2267
|
-
return html
|
|
2268
|
-
${
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2264
|
+
return html`
|
|
2265
|
+
${x => {
|
|
2266
|
+
x.setButtonTag(context.tagFor(Button));
|
|
2267
|
+
}}
|
|
2268
|
+
<div class="base" aria-label="${x => x.label}">
|
|
2269
|
+
${when(x => x.label, html`<label>${x => x.label}</label>`)}
|
|
2270
|
+
<div class="${getClasses}" tabindex="0" role="button"
|
|
2271
|
+
@keydown="${(x, c) => x.handleKeydown(c.event)}">
|
|
2273
2272
|
<slot class="main"></slot>
|
|
2274
|
-
${
|
|
2273
|
+
${() => focusTemplate}
|
|
2275
2274
|
</div>
|
|
2276
|
-
${
|
|
2277
|
-
<div class="preview-list"></div>
|
|
2278
|
-
</div>
|
|
2279
|
-
`), x => {
|
|
2280
|
-
x.setButtonTag(context.tagFor(Button));
|
|
2281
|
-
}, x => x.label, when(x => x.label, html(_t2 || (_t2 = _`<label>${0}</label>`), x => x.label)), getClasses, (x, c) => x.handleKeydown(c.event), () => focusTemplate, when(x => {
|
|
2275
|
+
${when(x => {
|
|
2282
2276
|
var _a;
|
|
2283
2277
|
return (_a = x.helperText) === null || _a === void 0 ? void 0 : _a.length;
|
|
2284
|
-
}, getFeedbackTemplate('helper', context))
|
|
2278
|
+
}, getFeedbackTemplate('helper', context))}
|
|
2279
|
+
<div class="preview-list"></div>
|
|
2280
|
+
</div>
|
|
2281
|
+
`;
|
|
2285
2282
|
};
|
|
2286
2283
|
|
|
2287
2284
|
const filePickerDefinition = FilePicker.compose({
|
package/shared/definition28.js
CHANGED
|
@@ -2,7 +2,7 @@ import { F as FoundationElement, _ as __decorate, a as attr, b as __metadata, h
|
|
|
2
2
|
import { E as Elevation, e as elevationRegistries } from './definition8.js';
|
|
3
3
|
import { c as classNames } from './class-names.js';
|
|
4
4
|
|
|
5
|
-
var css_248z = "/**\n * Do not edit directly\n * Generated on
|
|
5
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Wed, 09 Aug 2023 13:23:44 GMT\n */\n.base {\n z-index: 1;\n block-size: calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2))) + calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16)));\n font: var(--vvd-typography-heading-4);\n inline-size: 100%;\n}\n.base .header-content {\n display: inline-flex;\n align-items: center;\n column-gap: 4px;\n}\n\n.container {\n display: flex;\n box-sizing: border-box;\n justify-content: space-between;\n background-color: var(--header-bg-color, var(--vvd-color-canvas));\n block-size: inherit;\n color: var(--vvd-color-canvas-text);\n column-gap: 12px;\n padding-block: 8px;\n padding-inline: 16px;\n}\n.container[part~=vvd-theme-alternate] {\n color-scheme: var(--vvd-color-scheme);\n}\n\n.app-content {\n --vvd-header-block-size: calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2))) + calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16)));\n}";
|
|
6
6
|
|
|
7
7
|
class Header extends FoundationElement {
|
|
8
8
|
constructor() {
|
|
@@ -19,19 +19,17 @@ __decorate([attr({
|
|
|
19
19
|
mode: 'boolean'
|
|
20
20
|
}), __metadata("design:type", Object)], Header.prototype, "alternate", void 0);
|
|
21
21
|
|
|
22
|
-
let _ = t => t,
|
|
23
|
-
_t;
|
|
24
22
|
const getPartAlternate = ({
|
|
25
23
|
alternate
|
|
26
24
|
}) => classNames(['vvd-theme-alternate', Boolean(alternate)]);
|
|
27
25
|
const headerTemplate = context => {
|
|
28
26
|
const elevationTag = context.tagFor(Elevation);
|
|
29
|
-
return html
|
|
30
|
-
<${
|
|
27
|
+
return html`
|
|
28
|
+
<${elevationTag} dp="4" ?no-shadow=${x => !x.elevationShadow}>
|
|
31
29
|
<header class="base" part="base">
|
|
32
30
|
<!-- a container is needed to distinguish the surface background color of the
|
|
33
31
|
element from its shadow when applying elevation with alternate -->
|
|
34
|
-
<div class="container" part="${
|
|
32
|
+
<div class="container" part="${getPartAlternate}">
|
|
35
33
|
<section class="header-content">
|
|
36
34
|
<slot></slot>
|
|
37
35
|
</section>
|
|
@@ -40,11 +38,11 @@ const headerTemplate = context => {
|
|
|
40
38
|
</section>
|
|
41
39
|
</div>
|
|
42
40
|
</header>
|
|
43
|
-
</${
|
|
41
|
+
</${elevationTag}>
|
|
44
42
|
<div class="app-content">
|
|
45
43
|
<slot name="app-content"></slot>
|
|
46
44
|
</div>
|
|
47
|
-
|
|
45
|
+
`;
|
|
48
46
|
};
|
|
49
47
|
|
|
50
48
|
const headerDefinition = Header.compose({
|
package/shared/definition29.js
CHANGED
|
@@ -23,8 +23,6 @@ __decorate([attr({
|
|
|
23
23
|
|
|
24
24
|
var css_248z = "/* #region SIZEs */\n/* #region BASES */\n/* #region SPACES */\n.control {\n display: grid;\n grid-auto-rows: var(--layout-grid-template-rows, min-content);\n}\n.control.column-basis-small {\n grid-template-columns: var(--layout-grid-template-columns, repeat(var(--_auto-sizing), minmax(160px, 1fr)));\n}\n.control:not(.column-basis-small):not(.column-basis-medium):not(.column-basis-large):not(.column-basis-block), .control.column-basis-medium {\n grid-template-columns: var(--layout-grid-template-columns, repeat(var(--_auto-sizing), minmax(320px, 1fr)));\n}\n.control.column-basis-large {\n grid-template-columns: var(--layout-grid-template-columns, repeat(var(--_auto-sizing), minmax(380px, 1fr)));\n}\n.control.column-basis-block {\n grid-template-columns: var(--layout-grid-template-columns, repeat(var(--_auto-sizing), minmax(1fr, 1fr)));\n}\n.control.column-spacing-small {\n column-gap: var(--layout-column-gap, calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2))) - calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16))));\n}\n.control.column-spacing-small-inline {\n column-gap: var(--layout-column-gap, 0 calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2))) - calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16))));\n}\n.control.column-spacing-small-block {\n column-gap: var(--layout-column-gap, calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2))) - calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16))) 0);\n}\n.control:not(.column-spacing-small):not(.column-spacing-small-inline):not(.column-spacing-small-block):not(.column-spacing-medium):not(.column-spacing-medium-inline):not(.column-spacing-medium-block):not(.column-spacing-large):not(.column-spacing-large-inline):not(.column-spacing-large-block), .control.column-spacing-medium {\n column-gap: var(--layout-column-gap, calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16)));\n}\n.control.column-spacing-medium-inline {\n column-gap: var(--layout-column-gap, 0 calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16)));\n}\n.control.column-spacing-medium-block {\n column-gap: var(--layout-column-gap, calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16)) 0);\n}\n.control.column-spacing-large {\n column-gap: var(--layout-column-gap, calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 8)));\n}\n.control.column-spacing-large-inline {\n column-gap: var(--layout-column-gap, 0 calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 8)));\n}\n.control.column-spacing-large-block {\n column-gap: var(--layout-column-gap, calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 8)) 0);\n}\n.control.row-spacing-small {\n row-gap: var(--layout-row-gap, calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2))) - calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16))));\n}\n.control.row-spacing-small-inline {\n row-gap: var(--layout-row-gap, 0 calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2))) - calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16))));\n}\n.control.row-spacing-small-block {\n row-gap: var(--layout-row-gap, calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2))) - calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16))) 0);\n}\n.control:not(.row-spacing-small):not(.row-spacing-small-inline):not(.row-spacing-small-block):not(.row-spacing-medium):not(.row-spacing-medium-inline):not(.row-spacing-medium-block):not(.row-spacing-large):not(.row-spacing-large-inline):not(.row-spacing-large-block), .control.row-spacing-medium {\n row-gap: var(--layout-row-gap, calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16)));\n}\n.control.row-spacing-medium-inline {\n row-gap: var(--layout-row-gap, 0 calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16)));\n}\n.control.row-spacing-medium-block {\n row-gap: var(--layout-row-gap, calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16)) 0);\n}\n.control.row-spacing-large {\n row-gap: var(--layout-row-gap, calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 8)));\n}\n.control.row-spacing-large-inline {\n row-gap: var(--layout-row-gap, 0 calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 8)));\n}\n.control.row-spacing-large-block {\n row-gap: var(--layout-row-gap, calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 8)) 0);\n}\n.control.gutters-small {\n margin: calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2))) - calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16)));\n}\n.control.gutters-small-inline {\n margin: 0 calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2))) - calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16)));\n}\n.control.gutters-small-block {\n margin: calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2))) - calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16))) 0;\n}\n.control.gutters-medium {\n margin: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16));\n}\n.control.gutters-medium-inline {\n margin: 0 calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16));\n}\n.control.gutters-medium-block {\n margin: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16)) 0;\n}\n.control.gutters-large {\n margin: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 8));\n}\n.control.gutters-large-inline {\n margin: 0 calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 8));\n}\n.control.gutters-large-block {\n margin: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 8)) 0;\n}\n.control.auto-sizing-fill {\n --_auto-sizing: auto-fill;\n}\n.control:not(.auto-sizing-fill):not(.auto-sizing-fit), .control.auto-sizing-fit {\n --_auto-sizing: auto-fit;\n}";
|
|
25
25
|
|
|
26
|
-
let _ = t => t,
|
|
27
|
-
_t;
|
|
28
26
|
const getClasses = ({
|
|
29
27
|
columnBasis,
|
|
30
28
|
gutters,
|
|
@@ -32,10 +30,10 @@ const getClasses = ({
|
|
|
32
30
|
autoSizing,
|
|
33
31
|
rowSpacing
|
|
34
32
|
}) => classNames('control', [`column-basis-${columnBasis}`, Boolean(columnBasis)], [`gutters-${gutters}`, Boolean(gutters)], [`column-spacing-${columnSpacing}`, Boolean(columnSpacing)], [`row-spacing-${rowSpacing ? rowSpacing : columnSpacing}`, Boolean(rowSpacing) || Boolean(columnSpacing)], [`auto-sizing-${autoSizing}`, Boolean(autoSizing)]);
|
|
35
|
-
const layoutTemplate = () => html
|
|
36
|
-
<div class="${
|
|
33
|
+
const layoutTemplate = () => html`
|
|
34
|
+
<div class="${getClasses}">
|
|
37
35
|
<slot></slot>
|
|
38
|
-
</div
|
|
36
|
+
</div>`;
|
|
39
37
|
|
|
40
38
|
const layoutDefinition = Layout.compose({
|
|
41
39
|
baseName: 'layout',
|
package/shared/definition3.js
CHANGED
|
@@ -5,24 +5,20 @@ import { w as when } from './when.js';
|
|
|
5
5
|
|
|
6
6
|
var css_248z = ":host {\n display: inline-block;\n vertical-align: sub;\n}\n\n.control {\n display: flex;\n margin: unset;\n block-size: var(--_icon-block-size);\n color: currentColor;\n contain: strict;\n inline-size: var(--_icon-block-size);\n}\n.control.connotation-accent {\n /* @cssprop [--vvd-icon-accent-primary=var(--vvd-color-canvas-text)] */\n --_connotation-color-primary: var(--vvd-icon-accent-primary, var(--vvd-color-canvas-text));\n}\n.control.connotation-announcement {\n /* @cssprop [--vvd-icon-announcement-primary=var(--vvd-color-announcement-500)] */\n --_connotation-color-primary: var(--vvd-icon-announcement-primary, var(--vvd-color-announcement-500));\n}\n.control.connotation-cta {\n /* @cssprop [--vvd-icon-cta-primary=var(--vvd-color-cta-500)] */\n --_connotation-color-primary: var(--vvd-icon-cta-primary, var(--vvd-color-cta-500));\n}\n.control.connotation-success {\n /* @cssprop [--vvd-icon-success-primary=var(--vvd-color-success-500)] */\n --_connotation-color-primary: var(--vvd-icon-success-primary, var(--vvd-color-success-500));\n}\n.control.connotation-alert {\n /* @cssprop [--vvd-icon-alert-primary=var(--vvd-color-alert-500)] */\n --_connotation-color-primary: var(--vvd-icon-alert-primary, var(--vvd-color-alert-500));\n}\n.control.connotation-information {\n /* @cssprop [--vvd-icon-information-primary=var(--vvd-color-information-500)] */\n --_connotation-color-primary: var(--vvd-icon-information-primary, var(--vvd-color-information-500));\n}\n.control.size--6 {\n --_icon-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2)) - 1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16));\n}\n.control.size--5 {\n --_icon-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 20));\n}\n.control.size--4 {\n --_icon-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16));\n}\n.control.size--3 {\n --_icon-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 12));\n}\n.control.size--2 {\n --_icon-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 8));\n}\n.control.size--1 {\n --_icon-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 4));\n}\n.control.size-0 {\n --_icon-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2)));\n}\n.control.size-1 {\n --_icon-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) + 4));\n}\n.control.size-2 {\n --_icon-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) + 8));\n}\n.control.size-3 {\n --_icon-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) + 12));\n}\n.control.size-4 {\n --_icon-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) + 16));\n}\n.control.size-5 {\n --_icon-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) + 20));\n}\n.control:not(.size--6, .size--5, .size--4, .size--3, .size--2, .size--1, .size-0, .size-1, .size-2, .size-3, .size-4, .size-5) {\n --_icon-block-size: 1em;\n}\n\n.control[class*=connotation] {\n color: var(--_connotation-color-primary);\n}\n\nslot, svg, ::slotted(:where(svg, img)) {\n margin: auto;\n block-size: inherit;\n inline-size: inherit;\n}";
|
|
7
7
|
|
|
8
|
-
let _ = t => t,
|
|
9
|
-
_t,
|
|
10
|
-
_t2,
|
|
11
|
-
_t3;
|
|
12
8
|
const getClasses = ({
|
|
13
9
|
connotation,
|
|
14
10
|
size
|
|
15
11
|
}) => classNames('control', [`connotation-${connotation}`, Boolean(connotation)], [`size-${size}`, Boolean(size)]);
|
|
16
|
-
const iconTemplate = () => html
|
|
12
|
+
const iconTemplate = () => html`
|
|
17
13
|
|
|
18
|
-
<figure class="${
|
|
14
|
+
<figure class="${getClasses}">
|
|
19
15
|
<slot>
|
|
20
|
-
${
|
|
21
|
-
${
|
|
16
|
+
${when(x => !x.iconLoaded, html`<img alt="${x => x.name}" src="${x => x.iconUrl}"/>`)}
|
|
17
|
+
${when(x => x.iconLoaded && x._svg, x => html`${x._svg}`)}
|
|
22
18
|
</slot>
|
|
23
19
|
</figure>
|
|
24
20
|
|
|
25
|
-
|
|
21
|
+
`;
|
|
26
22
|
|
|
27
23
|
const iconDefinition = Icon.compose({
|
|
28
24
|
baseName: 'icon',
|
package/shared/definition30.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { F as FoundationElement,
|
|
1
|
+
import { F as FoundationElement, D as DOM, _ as __decorate, o as observable, f as __classPrivateFieldSet, d as __classPrivateFieldGet, a as attr, b as __metadata, h as html, r as registerFactory } from './index.js';
|
|
2
2
|
import { P as Popup, p as popupRegistries } from './definition20.js';
|
|
3
3
|
import { M as MenuItem, a as MenuItemRole, r as roleForMenuItem, m as menuItemRegistries } from './definition31.js';
|
|
4
4
|
import { i as isHTMLElement } from './dom.js';
|
|
5
5
|
import { a as keyHome, k as keyEnd, c as keyArrowUp, b as keyArrowDown } from './key-codes.js';
|
|
6
6
|
import { s as slotted } from './slotted.js';
|
|
7
|
-
import { r as ref } from './ref.js';
|
|
8
7
|
import { c as classNames } from './class-names.js';
|
|
9
8
|
|
|
10
9
|
/**
|
|
@@ -293,56 +292,101 @@ __decorate([
|
|
|
293
292
|
observable
|
|
294
293
|
], Menu$1.prototype, "items", void 0);
|
|
295
294
|
|
|
296
|
-
var css_248z = "/**\n * Do not edit directly\n * Generated on
|
|
295
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Wed, 09 Aug 2023 13:23:44 GMT\n */\n.base {\n display: flex;\n box-sizing: border-box;\n flex-direction: column;\n gap: 8px;\n max-block-size: var(--menu-block-size, 408px);\n max-inline-size: var(--menu-max-inline-size, 100%);\n min-inline-size: var(--menu-min-inline-size);\n overflow-x: hidden;\n overflow-y: auto;\n padding-block: 8px;\n}\n\n::slotted(a) {\n color: var(--vvd-color-canvas-text);\n text-decoration: none;\n}\n\n::slotted(a[role=menuitem]:focus) {\n display: block;\n border-radius: 6px;\n box-shadow: inset 0 0 0 3px currentColor;\n outline: 2px solid currentColor;\n outline-offset: -2px;\n}\n\n.header {\n padding-block-start: 8px;\n padding-inline: 16px;\n}\n.hide-header .header {\n display: none;\n}\n\n.action-items {\n display: flex;\n justify-content: flex-end;\n gap: 8px;\n padding-inline: 8px;\n}\n.hide-actions .action-items {\n display: none;\n}";
|
|
297
296
|
|
|
298
|
-
var
|
|
297
|
+
var _Menu_instances, _Menu_observer, _Menu_anchorEl, _Menu_observeMissingAnchor, _Menu_setupAnchor, _Menu_cleanupAnchor, _Menu_openIfClosed, _Menu_closeOnClickOutside;
|
|
299
298
|
class Menu extends Menu$1 {
|
|
300
299
|
constructor() {
|
|
301
300
|
super(...arguments);
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
301
|
+
_Menu_instances.add(this);
|
|
302
|
+
_Menu_observer.set(this, void 0);
|
|
303
|
+
_Menu_anchorEl.set(this, null);
|
|
304
|
+
_Menu_observeMissingAnchor.set(this, anchorId => {
|
|
305
|
+
__classPrivateFieldSet(this, _Menu_observer, new MutationObserver(() => {
|
|
306
|
+
const anchor = document.getElementById(anchorId);
|
|
307
|
+
if (anchor) {
|
|
308
|
+
__classPrivateFieldSet(this, _Menu_anchorEl, anchor, "f");
|
|
309
|
+
__classPrivateFieldGet(this, _Menu_instances, "m", _Menu_setupAnchor).call(this, __classPrivateFieldGet(this, _Menu_anchorEl, "f"));
|
|
310
|
+
__classPrivateFieldGet(this, _Menu_observer, "f").disconnect();
|
|
311
|
+
__classPrivateFieldSet(this, _Menu_observer, undefined, "f");
|
|
312
|
+
}
|
|
313
|
+
}), "f");
|
|
314
|
+
__classPrivateFieldGet(this, _Menu_observer, "f").observe(document.body, {
|
|
315
|
+
childList: true,
|
|
316
|
+
subtree: true
|
|
317
|
+
});
|
|
307
318
|
});
|
|
308
|
-
this.
|
|
319
|
+
this.placement = 'bottom';
|
|
320
|
+
this.anchor = '';
|
|
309
321
|
this.autoDismiss = false;
|
|
322
|
+
this.open = false;
|
|
323
|
+
_Menu_openIfClosed.set(this, () => {
|
|
324
|
+
if (!this.open) DOM.queueUpdate(() => this.open = true);
|
|
325
|
+
});
|
|
326
|
+
_Menu_closeOnClickOutside.set(this, e => {
|
|
327
|
+
if (!this.contains(e.target)) this.open = false;
|
|
328
|
+
});
|
|
310
329
|
}
|
|
311
|
-
anchorChanged(
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
330
|
+
anchorChanged(_, newValue) {
|
|
331
|
+
var _a;
|
|
332
|
+
if (__classPrivateFieldGet(this, _Menu_anchorEl, "f")) __classPrivateFieldGet(this, _Menu_instances, "m", _Menu_cleanupAnchor).call(this, __classPrivateFieldGet(this, _Menu_anchorEl, "f"));
|
|
333
|
+
(_a = __classPrivateFieldGet(this, _Menu_observer, "f")) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
334
|
+
__classPrivateFieldSet(this, _Menu_anchorEl, newValue instanceof HTMLElement ? newValue : document.getElementById(newValue), "f");
|
|
335
|
+
if (__classPrivateFieldGet(this, _Menu_anchorEl, "f")) {
|
|
336
|
+
__classPrivateFieldGet(this, _Menu_instances, "m", _Menu_setupAnchor).call(this, __classPrivateFieldGet(this, _Menu_anchorEl, "f"));
|
|
337
|
+
} else {
|
|
338
|
+
__classPrivateFieldGet(this, _Menu_observeMissingAnchor, "f").call(this, newValue);
|
|
339
|
+
}
|
|
316
340
|
}
|
|
317
|
-
autoDismissChanged() {
|
|
318
|
-
if (
|
|
319
|
-
|
|
341
|
+
autoDismissChanged(oldValue, newValue) {
|
|
342
|
+
if (oldValue === undefined) return;
|
|
343
|
+
if (newValue) {
|
|
344
|
+
document.addEventListener('click', __classPrivateFieldGet(this, _Menu_closeOnClickOutside, "f"));
|
|
320
345
|
} else {
|
|
321
|
-
document.removeEventListener('click', __classPrivateFieldGet(this,
|
|
346
|
+
document.removeEventListener('click', __classPrivateFieldGet(this, _Menu_closeOnClickOutside, "f"));
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
openChanged(_, newValue) {
|
|
350
|
+
newValue ? this.$emit('open', undefined, {
|
|
351
|
+
bubbles: false
|
|
352
|
+
}) : this.$emit('close', undefined, {
|
|
353
|
+
bubbles: false
|
|
354
|
+
});
|
|
355
|
+
if (__classPrivateFieldGet(this, _Menu_anchorEl, "f")) {
|
|
356
|
+
__classPrivateFieldGet(this, _Menu_anchorEl, "f").ariaExpanded = this.open.toString();
|
|
322
357
|
}
|
|
323
358
|
}
|
|
324
359
|
disconnectedCallback() {
|
|
360
|
+
var _a;
|
|
325
361
|
super.disconnectedCallback();
|
|
326
|
-
if (this.
|
|
327
|
-
|
|
328
|
-
|
|
362
|
+
if (__classPrivateFieldGet(this, _Menu_anchorEl, "f")) __classPrivateFieldGet(this, _Menu_instances, "m", _Menu_cleanupAnchor).call(this, __classPrivateFieldGet(this, _Menu_anchorEl, "f"));
|
|
363
|
+
(_a = __classPrivateFieldGet(this, _Menu_observer, "f")) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
364
|
+
document.removeEventListener('click', __classPrivateFieldGet(this, _Menu_closeOnClickOutside, "f"));
|
|
329
365
|
}
|
|
330
366
|
}
|
|
331
|
-
|
|
367
|
+
_Menu_observer = new WeakMap(), _Menu_anchorEl = new WeakMap(), _Menu_observeMissingAnchor = new WeakMap(), _Menu_openIfClosed = new WeakMap(), _Menu_closeOnClickOutside = new WeakMap(), _Menu_instances = new WeakSet(), _Menu_setupAnchor = function _Menu_setupAnchor(a) {
|
|
368
|
+
a.addEventListener('click', __classPrivateFieldGet(this, _Menu_openIfClosed, "f"), true);
|
|
369
|
+
a.setAttribute('aria-haspopup', 'menu');
|
|
370
|
+
}, _Menu_cleanupAnchor = function _Menu_cleanupAnchor(a) {
|
|
371
|
+
a.removeEventListener('click', __classPrivateFieldGet(this, _Menu_openIfClosed, "f"), true);
|
|
372
|
+
a.removeAttribute('aria-hasPopup');
|
|
373
|
+
};
|
|
332
374
|
__decorate([attr({
|
|
333
|
-
mode: '
|
|
334
|
-
}), __metadata("design:type",
|
|
335
|
-
__decorate([attr
|
|
336
|
-
|
|
375
|
+
mode: 'fromView'
|
|
376
|
+
}), __metadata("design:type", String)], Menu.prototype, "placement", void 0);
|
|
377
|
+
__decorate([attr({
|
|
378
|
+
mode: 'fromView'
|
|
379
|
+
}), __metadata("design:type", Object)], Menu.prototype, "anchor", void 0);
|
|
337
380
|
__decorate([attr({
|
|
338
381
|
mode: 'boolean',
|
|
339
382
|
attribute: 'auto-dismiss'
|
|
340
383
|
}), __metadata("design:type", Object)], Menu.prototype, "autoDismiss", void 0);
|
|
384
|
+
__decorate([attr({
|
|
385
|
+
mode: 'boolean'
|
|
386
|
+
}), __metadata("design:type", Object)], Menu.prototype, "open", void 0);
|
|
341
387
|
__decorate([observable, __metadata("design:type", Array)], Menu.prototype, "headerSlottedContent", void 0);
|
|
342
388
|
__decorate([observable, __metadata("design:type", Array)], Menu.prototype, "actionItemsSlottedContent", void 0);
|
|
343
389
|
|
|
344
|
-
let _ = t => t,
|
|
345
|
-
_t;
|
|
346
390
|
const getClasses = ({
|
|
347
391
|
headerSlottedContent,
|
|
348
392
|
actionItemsSlottedContent
|
|
@@ -352,32 +396,31 @@ const MenuTemplate = context => {
|
|
|
352
396
|
function handlePopupEvents(x, state) {
|
|
353
397
|
x.open = state;
|
|
354
398
|
}
|
|
355
|
-
return html
|
|
399
|
+
return html`
|
|
356
400
|
<template>
|
|
357
|
-
<${
|
|
358
|
-
:placement=${
|
|
359
|
-
:open=${
|
|
360
|
-
:anchor=${
|
|
361
|
-
@vwc-popup:open="${
|
|
362
|
-
@vwc-popup:close="${
|
|
363
|
-
${0}
|
|
401
|
+
<${popupTag}
|
|
402
|
+
:placement=${x => x.placement}
|
|
403
|
+
:open=${x => x.open}
|
|
404
|
+
:anchor=${x => x.anchor}
|
|
405
|
+
@vwc-popup:open="${x => handlePopupEvents(x, true)}"
|
|
406
|
+
@vwc-popup:close="${x => handlePopupEvents(x, false)}"
|
|
364
407
|
>
|
|
365
|
-
<div class="${
|
|
408
|
+
<div class="${getClasses}">
|
|
366
409
|
<div class="header">
|
|
367
|
-
<slot name="header" ${
|
|
410
|
+
<slot name="header" ${slotted('headerSlottedContent')}></slot>
|
|
368
411
|
</div>
|
|
369
412
|
<div
|
|
370
413
|
class="body"
|
|
371
414
|
role="menu"
|
|
372
|
-
@keydown="${
|
|
373
|
-
@focusout="${
|
|
415
|
+
@keydown="${(x, c) => x.handleMenuKeyDown(c.event)}"
|
|
416
|
+
@focusout="${(x, c) => x.handleFocusOut(c.event)}"
|
|
374
417
|
>
|
|
375
|
-
<slot ${
|
|
418
|
+
<slot ${slotted('items')}></slot>
|
|
376
419
|
</div>
|
|
377
|
-
<footer class="action-items"><slot name="action-items" ${
|
|
420
|
+
<footer class="action-items"><slot name="action-items" ${slotted('actionItemsSlottedContent')}></slot></footer>
|
|
378
421
|
</div>
|
|
379
|
-
</${
|
|
380
|
-
</template
|
|
422
|
+
</${popupTag}>
|
|
423
|
+
</template>`;
|
|
381
424
|
};
|
|
382
425
|
|
|
383
426
|
const menuDefinition = Menu.compose({
|