@vonage/vivid 3.27.0 → 3.28.2
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 +142 -53
- 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 +83 -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/definition21.js
CHANGED
|
@@ -229,10 +229,6 @@ __decorate([attr({
|
|
|
229
229
|
}), __metadata("design:type", String)], ListboxOption.prototype, "_label", void 0);
|
|
230
230
|
applyMixins(ListboxOption, AffixIconWithTrailing);
|
|
231
231
|
|
|
232
|
-
let _ = t => t,
|
|
233
|
-
_t,
|
|
234
|
-
_t2,
|
|
235
|
-
_t3;
|
|
236
232
|
const getClasses = ({
|
|
237
233
|
icon,
|
|
238
234
|
disabled,
|
|
@@ -242,26 +238,26 @@ const getClasses = ({
|
|
|
242
238
|
const ListboxOptionTemplate = context => {
|
|
243
239
|
const affixIconTemplate = affixIconTemplateFactory(context, false);
|
|
244
240
|
const focusTemplate = focusTemplateFactory(context);
|
|
245
|
-
return html
|
|
241
|
+
return html`
|
|
246
242
|
<template
|
|
247
|
-
aria-checked="${
|
|
248
|
-
aria-disabled="${
|
|
249
|
-
aria-posinset="${
|
|
250
|
-
aria-selected="${
|
|
251
|
-
aria-setsize="${
|
|
243
|
+
aria-checked="${x => x.ariaChecked}"
|
|
244
|
+
aria-disabled="${x => x.ariaDisabled}"
|
|
245
|
+
aria-posinset="${x => x.ariaPosInSet}"
|
|
246
|
+
aria-selected="${x => x.ariaSelected}"
|
|
247
|
+
aria-setsize="${x => x.ariaSetSize}"
|
|
252
248
|
role="option">
|
|
253
|
-
<div class="${
|
|
254
|
-
${
|
|
249
|
+
<div class="${getClasses}">
|
|
250
|
+
${() => focusTemplate}
|
|
255
251
|
<slot name="icon">
|
|
256
|
-
${
|
|
252
|
+
${when(x => x.icon, html`${x => affixIconTemplate(x.icon)}`)}
|
|
257
253
|
</slot>
|
|
258
|
-
${
|
|
254
|
+
${when(x => x.text, html`<div class="text">${x => x.text}</div>`)}
|
|
259
255
|
</div>
|
|
260
256
|
</template>
|
|
261
|
-
|
|
257
|
+
`;
|
|
262
258
|
};
|
|
263
259
|
|
|
264
|
-
var css_248z = "/**\n * Do not edit directly\n * Generated on
|
|
260
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Mon, 07 Aug 2023 18:00:27 GMT\n */\n.base {\n position: relative; /* this is needed for the focus */\n display: flex;\n box-sizing: border-box;\n align-items: center;\n background-color: var(--_appearance-color-fill);\n border-radius: 6px;\n box-shadow: inset 0 0 0 1px var(--_appearance-color-outline);\n color: var(--_option-appearance-color-text, var(--_appearance-color-text));\n font: var(--vvd-typography-base);\n gap: 12px;\n hyphens: auto;\n inline-size: 100%;\n min-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2)));\n padding-inline: 16px;\n vertical-align: middle;\n word-break: break-word;\n}\n.base {\n /* @cssprop [--vvd-option-accent-primary=var(--vvd-color-canvas-text)] */\n --_connotation-color-primary: var(--vvd-option-accent-primary, var(--vvd-color-canvas-text));\n /* @cssprop [--vvd-option-accent-primary-text=var(--vvd-color-canvas)] */\n --_connotation-color-primary-text: var(--vvd-option-accent-primary-text, var(--vvd-color-canvas));\n /* @cssprop [--vvd-option-accent-primary-increment=var(--vvd-color-neutral-800)] */\n --_connotation-color-primary-increment: var(--vvd-option-accent-primary-increment, var(--vvd-color-neutral-800));\n /* @cssprop [--vvd-option-accent-faint=var(--vvd-color-neutral-50)] */\n --_connotation-color-faint: var(--vvd-option-accent-faint, var(--vvd-color-neutral-50));\n /* @cssprop [--vvd-option-accent-soft=var(--vvd-color-neutral-100)] */\n --_connotation-color-soft: var(--vvd-option-accent-soft, var(--vvd-color-neutral-100));\n /* @cssprop [--vvd-option-accent-pale=var(--vvd-color-neutral-300)] */\n --_connotation-color-pale: var(--vvd-option-accent-pale, var(--vvd-color-neutral-300));\n /* @cssprop [--vvd-option-accent-dim=var(--vvd-color-neutral-200)] */\n --_connotation-color-dim: var(--vvd-option-accent-dim, var(--vvd-color-neutral-200));\n}\n.base {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: transparent;\n}\n.base:where(:hover, .hover):where(:not(:disabled, .disabled, .readonly)) {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: var(--_connotation-color-faint);\n --_appearance-color-outline: transparent;\n}\n.base:where(:disabled, .disabled) {\n --_appearance-color-text: var(--vvd-color-neutral-300);\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: transparent;\n}\n.base:where(:active, .active):where(:not(:disabled, .disabled)) {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: var(--_connotation-color-soft);\n --_appearance-color-outline: transparent;\n}\n.base:where(.selected, [aria-current]):where(:not(:disabled, .disabled, :hover, .hover)) {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: var(--_connotation-color-dim);\n --_appearance-color-outline: transparent;\n}\n.base:where(.selected, [aria-current]):where(:hover, .hover) {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: var(--_connotation-color-pale);\n --_appearance-color-outline: transparent;\n}\n@supports (user-select: none) {\n .base {\n user-select: none;\n }\n}\n.base:not(.disabled) {\n cursor: pointer;\n}\n.base.disabled {\n cursor: not-allowed;\n pointer-events: none;\n}\n.base .text {\n font: var(--vvd-typography-base);\n}\n\nslot[name=icon] {\n font-size: 20px;\n line-height: 1;\n}\n.base:not(.disabled, .selected) slot[name=icon] {\n color: var(--vvd-color-neutral-600);\n}\n\n.focus-indicator {\n --focus-stroke-color: var(--vvd-color-neutral-500);\n --focus-stroke-gap-color: transparent;\n}\n:host(:not([aria-checked=true])) .focus-indicator {\n display: none;\n}";
|
|
265
261
|
|
|
266
262
|
const listboxOptionDefinition = ListboxOption.compose({
|
|
267
263
|
baseName: 'option',
|
package/shared/definition22.js
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import { F as FoundationElement, _ as __decorate, a as attr, o as observable, Y as DOM, h as html, v as aCallable$1, a2 as toObject$1, a3 as indexedObject, Q as lengthOfArrayLike$1, l as fails$1, G as _export, E as engineV8Version, V as __classPrivateFieldGet, b as __metadata, r as registerFactory } from './index.js';
|
|
2
1
|
import { i as iconRegistries } from './definition3.js';
|
|
3
|
-
import './
|
|
4
|
-
import './es.regexp.to-string.js';
|
|
5
|
-
import { e as engineIsNode, I as Icon } from './icon.js';
|
|
2
|
+
import { F as FoundationElement, _ as __decorate, a as attr, o as observable, D as DOM, h as html, d as __classPrivateFieldGet, b as __metadata, r as registerFactory } from './index.js';
|
|
6
3
|
import { k as keyEnd, a as keyHome, h as keyArrowRight, i as keyArrowLeft, j as keyPageDown, l as keyPageUp, b as keyArrowDown, c as keyArrowUp, f as keyEscape, m as keyFunction2, d as keyEnter } from './key-codes.js';
|
|
7
4
|
import { R as RepeatDirective } from './repeat.js';
|
|
8
5
|
import { e as elements } from './node-observation.js';
|
|
9
6
|
import { c as children } from './children.js';
|
|
10
7
|
import { s as slotted } from './slotted.js';
|
|
8
|
+
import { I as Icon } from './icon.js';
|
|
11
9
|
import { f as focusTemplateFactory } from './focus2.js';
|
|
12
10
|
import { w as when } from './when.js';
|
|
13
11
|
|
|
@@ -912,82 +910,9 @@ __decorate([
|
|
|
912
910
|
|
|
913
911
|
var css_248z$2 = ":host {\n display: block;\n}\n\n:host([generate-header=sticky]) {\n max-block-size: 400px;\n}\n\n.base {\n position: relative;\n overflow: auto;\n block-size: inherit;\n inline-size: 100%;\n max-block-size: inherit;\n}\n.base::-webkit-scrollbar {\n display: none;\n}";
|
|
914
912
|
|
|
915
|
-
var css_248z$1 = "/**\n * Do not edit directly\n * Generated on
|
|
913
|
+
var css_248z$1 = "/**\n * Do not edit directly\n * Generated on Mon, 07 Aug 2023 18:00:27 GMT\n */\n.base {\n display: grid;\n width: 100%;\n box-sizing: border-box;\n color: var(--vvd-color-canvas-text);\n}\n.base.connotation-cta {\n /* @cssprop [--vvd-data-grid-row-cta-primary=var(--vvd-color-cta-500)] */\n --_connotation-color-primary: var(--vvd-data-grid-row-cta-primary, var(--vvd-color-cta-500));\n /* @cssprop [--vvd-data-grid-row-cta-primary-text=var(--vvd-color-canvas)] */\n --_connotation-color-primary-text: var(--vvd-data-grid-row-cta-primary-text, var(--vvd-color-canvas));\n /* @cssprop [--vvd-data-grid-row-cta-primary-increment=var(--vvd-color-cta-600)] */\n --_connotation-color-primary-increment: var(--vvd-data-grid-row-cta-primary-increment, var(--vvd-color-cta-600));\n /* @cssprop [--vvd-data-grid-row-cta-faint=var(--vvd-color-cta-50)] */\n --_connotation-color-faint: var(--vvd-data-grid-row-cta-faint, var(--vvd-color-cta-50));\n /* @cssprop [--vvd-data-grid-row-cta-pale=var(--vvd-color-cta-300)] */\n --_connotation-color-pale: var(--vvd-data-grid-row-cta-pale, var(--vvd-color-cta-300));\n /* @cssprop [--vvd-data-grid-row-cta-dim=var(--vvd-color-cta-200)] */\n --_connotation-color-dim: var(--vvd-data-grid-row-cta-dim, var(--vvd-color-cta-200));\n}\n.base:not(.connotation-cta) {\n /* @cssprop [--vvd-data-grid-row-accent-primary=var(--vvd-color-canvas-text)] */\n --_connotation-color-primary: var(--vvd-data-grid-row-accent-primary, var(--vvd-color-canvas-text));\n /* @cssprop [--vvd-data-grid-row-accent-primary-text=var(--vvd-color-canvas)] */\n --_connotation-color-primary-text: var(--vvd-data-grid-row-accent-primary-text, var(--vvd-color-canvas));\n /* @cssprop [--vvd-data-grid-row-accent-primary-increment=var(--vvd-color-neutral-800)] */\n --_connotation-color-primary-increment: var(--vvd-data-grid-row-accent-primary-increment, var(--vvd-color-neutral-800));\n /* @cssprop [--vvd-data-grid-row-accent-faint=var(--vvd-color-neutral-50)] */\n --_connotation-color-faint: var(--vvd-data-grid-row-accent-faint, var(--vvd-color-neutral-50));\n /* @cssprop [--vvd-data-grid-row-accent-pale=var(--vvd-color-neutral-300)] */\n --_connotation-color-pale: var(--vvd-data-grid-row-accent-pale, var(--vvd-color-neutral-300));\n /* @cssprop [--vvd-data-grid-row-accent-dim=var(--vvd-color-neutral-200)] */\n --_connotation-color-dim: var(--vvd-data-grid-row-accent-dim, var(--vvd-color-neutral-200));\n}\n.base {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: transparent;\n}\n.base:where(:hover, .hover):where(:not(:disabled, .disabled, .readonly)) {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: var(--_connotation-color-faint);\n --_appearance-color-outline: transparent;\n}\n.base:where(.selected, [aria-current]):where(:not(:disabled, .disabled, :hover, .hover)) {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: var(--_connotation-color-dim);\n --_appearance-color-outline: transparent;\n}\n.base:where(.selected, [aria-current]):where(:hover, .hover) {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: var(--_connotation-color-pale);\n --_appearance-color-outline: transparent;\n}\n:host([row-type=sticky-header]) .base {\n position: sticky;\n z-index: 9;\n top: 0;\n background: var(--data-grid-row-background, var(--vvd-color-canvas));\n}\n:host([row-type=hidden-header]) .base {\n display: none;\n}\n:host(:is([aria-selected]):not([row-type=header])) .base {\n background-color: var(--_appearance-color-fill);\n}";
|
|
916
914
|
|
|
917
|
-
var css_248z = "/**\n * Do not edit directly\n * Generated on
|
|
918
|
-
|
|
919
|
-
var aCallable = aCallable$1;
|
|
920
|
-
var toObject = toObject$1;
|
|
921
|
-
var IndexedObject = indexedObject;
|
|
922
|
-
var lengthOfArrayLike = lengthOfArrayLike$1;
|
|
923
|
-
|
|
924
|
-
var $TypeError = TypeError;
|
|
925
|
-
|
|
926
|
-
// `Array.prototype.{ reduce, reduceRight }` methods implementation
|
|
927
|
-
var createMethod = function (IS_RIGHT) {
|
|
928
|
-
return function (that, callbackfn, argumentsLength, memo) {
|
|
929
|
-
aCallable(callbackfn);
|
|
930
|
-
var O = toObject(that);
|
|
931
|
-
var self = IndexedObject(O);
|
|
932
|
-
var length = lengthOfArrayLike(O);
|
|
933
|
-
var index = IS_RIGHT ? length - 1 : 0;
|
|
934
|
-
var i = IS_RIGHT ? -1 : 1;
|
|
935
|
-
if (argumentsLength < 2) while (true) {
|
|
936
|
-
if (index in self) {
|
|
937
|
-
memo = self[index];
|
|
938
|
-
index += i;
|
|
939
|
-
break;
|
|
940
|
-
}
|
|
941
|
-
index += i;
|
|
942
|
-
if (IS_RIGHT ? index < 0 : length <= index) {
|
|
943
|
-
throw $TypeError('Reduce of empty array with no initial value');
|
|
944
|
-
}
|
|
945
|
-
}
|
|
946
|
-
for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
|
|
947
|
-
memo = callbackfn(memo, self[index], index, O);
|
|
948
|
-
}
|
|
949
|
-
return memo;
|
|
950
|
-
};
|
|
951
|
-
};
|
|
952
|
-
|
|
953
|
-
var arrayReduce = {
|
|
954
|
-
// `Array.prototype.reduce` method
|
|
955
|
-
// https://tc39.es/ecma262/#sec-array.prototype.reduce
|
|
956
|
-
left: createMethod(false),
|
|
957
|
-
// `Array.prototype.reduceRight` method
|
|
958
|
-
// https://tc39.es/ecma262/#sec-array.prototype.reduceright
|
|
959
|
-
right: createMethod(true)
|
|
960
|
-
};
|
|
961
|
-
|
|
962
|
-
var fails = fails$1;
|
|
963
|
-
|
|
964
|
-
var arrayMethodIsStrict$1 = function (METHOD_NAME, argument) {
|
|
965
|
-
var method = [][METHOD_NAME];
|
|
966
|
-
return !!method && fails(function () {
|
|
967
|
-
// eslint-disable-next-line no-useless-call -- required for testing
|
|
968
|
-
method.call(null, argument || function () { return 1; }, 1);
|
|
969
|
-
});
|
|
970
|
-
};
|
|
971
|
-
|
|
972
|
-
var $ = _export;
|
|
973
|
-
var $reduce = arrayReduce.left;
|
|
974
|
-
var arrayMethodIsStrict = arrayMethodIsStrict$1;
|
|
975
|
-
var CHROME_VERSION = engineV8Version;
|
|
976
|
-
var IS_NODE = engineIsNode;
|
|
977
|
-
|
|
978
|
-
var STRICT_METHOD = arrayMethodIsStrict('reduce');
|
|
979
|
-
// Chrome 80-82 has a critical bug
|
|
980
|
-
// https://bugs.chromium.org/p/chromium/issues/detail?id=1049982
|
|
981
|
-
var CHROME_BUG = !IS_NODE && CHROME_VERSION > 79 && CHROME_VERSION < 83;
|
|
982
|
-
|
|
983
|
-
// `Array.prototype.reduce` method
|
|
984
|
-
// https://tc39.es/ecma262/#sec-array.prototype.reduce
|
|
985
|
-
$({ target: 'Array', proto: true, forced: !STRICT_METHOD || CHROME_BUG }, {
|
|
986
|
-
reduce: function reduce(callbackfn /* , initialValue */) {
|
|
987
|
-
var length = arguments.length;
|
|
988
|
-
return $reduce(this, callbackfn, length, length > 1 ? arguments[1] : undefined);
|
|
989
|
-
}
|
|
990
|
-
});
|
|
915
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Mon, 07 Aug 2023 18:00:27 GMT\n */\n:host {\n min-inline-size: 80px;\n}\n\n.base {\n position: relative;\n display: flex;\n box-sizing: border-box;\n align-items: center;\n padding: 8px 12px;\n border-bottom: 1px solid var(--vvd-color-neutral-400);\n block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) + 8));\n color: var(--_appearance-color-text);\n font: var(--vvd-typography-base);\n}\n.base.connotation-cta {\n /* @cssprop [--vvd-data-grid-cell-cta-primary=var(--vvd-color-cta-500)] */\n --_connotation-color-primary: var(--vvd-data-grid-cell-cta-primary, var(--vvd-color-cta-500));\n /* @cssprop [--vvd-data-grid-cell-cta-primary-text=var(--vvd-color-canvas)] */\n --_connotation-color-primary-text: var(--vvd-data-grid-cell-cta-primary-text, var(--vvd-color-canvas));\n /* @cssprop [--vvd-data-grid-cell-cta-primary-increment=var(--vvd-color-cta-600)] */\n --_connotation-color-primary-increment: var(--vvd-data-grid-cell-cta-primary-increment, var(--vvd-color-cta-600));\n /* @cssprop [--vvd-data-grid-cell-cta-faint=var(--vvd-color-cta-50)] */\n --_connotation-color-faint: var(--vvd-data-grid-cell-cta-faint, var(--vvd-color-cta-50));\n /* @cssprop [--vvd-data-grid-cell-cta-pale=var(--vvd-color-cta-300)] */\n --_connotation-color-pale: var(--vvd-data-grid-cell-cta-pale, var(--vvd-color-cta-300));\n /* @cssprop [--vvd-data-grid-cell-cta-dim=var(--vvd-color-cta-200)] */\n --_connotation-color-dim: var(--vvd-data-grid-cell-cta-dim, var(--vvd-color-cta-200));\n}\n.base:not(.connotation-cta) {\n /* @cssprop [--vvd-data-grid-cell-accent-primary=var(--vvd-color-canvas-text)] */\n --_connotation-color-primary: var(--vvd-data-grid-cell-accent-primary, var(--vvd-color-canvas-text));\n /* @cssprop [--vvd-data-grid-cell-accent-primary-text=var(--vvd-color-canvas)] */\n --_connotation-color-primary-text: var(--vvd-data-grid-cell-accent-primary-text, var(--vvd-color-canvas));\n /* @cssprop [--vvd-data-grid-cell-accent-primary-increment=var(--vvd-color-neutral-800)] */\n --_connotation-color-primary-increment: var(--vvd-data-grid-cell-accent-primary-increment, var(--vvd-color-neutral-800));\n /* @cssprop [--vvd-data-grid-cell-accent-faint=var(--vvd-color-neutral-50)] */\n --_connotation-color-faint: var(--vvd-data-grid-cell-accent-faint, var(--vvd-color-neutral-50));\n /* @cssprop [--vvd-data-grid-cell-accent-pale=var(--vvd-color-neutral-300)] */\n --_connotation-color-pale: var(--vvd-data-grid-cell-accent-pale, var(--vvd-color-neutral-300));\n /* @cssprop [--vvd-data-grid-cell-accent-dim=var(--vvd-color-neutral-200)] */\n --_connotation-color-dim: var(--vvd-data-grid-cell-accent-dim, var(--vvd-color-neutral-200));\n}\n.base {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: transparent;\n}\n.base:where(:hover, .hover):where(:not(:disabled, .disabled, .readonly)) {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: var(--_connotation-color-faint);\n --_appearance-color-outline: transparent;\n}\n.base:where(.selected, [aria-current]):where(:not(:disabled, .disabled, :hover, .hover)) {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: var(--_connotation-color-dim);\n --_appearance-color-outline: transparent;\n}\n.base:where(.selected, [aria-current]):where(:hover, .hover) {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: var(--_connotation-color-pale);\n --_appearance-color-outline: transparent;\n}\n:host([cell-type=columnheader]) .base {\n border-color: var(--vvd-color-canvas-text);\n font: var(--vvd-typography-base-bold);\n}\n:host(:is([aria-selected]):not([cell-type=columnheader])) .base {\n background-color: var(--_appearance-color-fill);\n}\n\n.focus-indicator {\n --focus-stroke-gap-color: transparent;\n pointer-events: none;\n}\n.base:not(.active) > .focus-indicator {\n display: none;\n}\n\nslot {\n display: block;\n overflow: hidden;\n inline-size: 100%;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.header-icon {\n margin-inline-start: auto;\n}";
|
|
991
916
|
|
|
992
917
|
var _DataGrid_instances, _DataGrid_selectedRows_get, _DataGrid_selectedCells_get, _DataGrid_handleKeypress, _DataGrid_handleClick, _DataGrid_handleCellSelection, _DataGrid_handleRowSelection, _DataGrid_setSelectedState, _DataGrid_resetSelection, _DataGrid_initSelections;
|
|
993
918
|
const DataGridSelectionMode = {
|
|
@@ -998,6 +923,13 @@ const DataGridSelectionMode = {
|
|
|
998
923
|
multiCell: 'multi-cell'
|
|
999
924
|
};
|
|
1000
925
|
class DataGrid extends DataGrid$1 {
|
|
926
|
+
selectionModeChanged(oldValue) {
|
|
927
|
+
if (oldValue === undefined) {
|
|
928
|
+
DOM.queueUpdate(__classPrivateFieldGet(this, _DataGrid_initSelections, "f"));
|
|
929
|
+
return;
|
|
930
|
+
}
|
|
931
|
+
__classPrivateFieldGet(this, _DataGrid_resetSelection, "f").call(this);
|
|
932
|
+
}
|
|
1001
933
|
constructor() {
|
|
1002
934
|
super();
|
|
1003
935
|
_DataGrid_instances.add(this);
|
|
@@ -1095,13 +1027,6 @@ class DataGrid extends DataGrid$1 {
|
|
|
1095
1027
|
this.addEventListener('click', __classPrivateFieldGet(this, _DataGrid_handleClick, "f"));
|
|
1096
1028
|
this.addEventListener('keydown', __classPrivateFieldGet(this, _DataGrid_handleKeypress, "f"));
|
|
1097
1029
|
}
|
|
1098
|
-
selectionModeChanged(oldValue) {
|
|
1099
|
-
if (oldValue === undefined) {
|
|
1100
|
-
DOM.queueUpdate(__classPrivateFieldGet(this, _DataGrid_initSelections, "f"));
|
|
1101
|
-
return;
|
|
1102
|
-
}
|
|
1103
|
-
__classPrivateFieldGet(this, _DataGrid_resetSelection, "f").call(this);
|
|
1104
|
-
}
|
|
1105
1030
|
static generateColumns(rowData) {
|
|
1106
1031
|
return Object.keys(rowData).map((property, index) => {
|
|
1107
1032
|
return {
|
|
@@ -1156,18 +1081,15 @@ const DataGridCellRole = {
|
|
|
1156
1081
|
default: 'gridcell'
|
|
1157
1082
|
};
|
|
1158
1083
|
|
|
1159
|
-
let _2$2 = t => t,
|
|
1160
|
-
_t$2,
|
|
1161
|
-
_t2$2;
|
|
1162
1084
|
function createRowItemTemplate(context) {
|
|
1163
1085
|
const rowTag = context.tagFor(DataGridRow);
|
|
1164
|
-
return html
|
|
1165
|
-
<${
|
|
1166
|
-
:rowData="${
|
|
1167
|
-
:cellItemTemplate="${
|
|
1168
|
-
:headerCellItemTemplate="${
|
|
1169
|
-
></${
|
|
1170
|
-
|
|
1086
|
+
return html`
|
|
1087
|
+
<${rowTag}
|
|
1088
|
+
:rowData="${x => x}"
|
|
1089
|
+
:cellItemTemplate="${(_, c) => c.parent.cellItemTemplate}"
|
|
1090
|
+
:headerCellItemTemplate="${(_, c) => c.parent.headerCellItemTemplate}"
|
|
1091
|
+
></${rowTag}>
|
|
1092
|
+
`;
|
|
1171
1093
|
}
|
|
1172
1094
|
function getMultiSelectAriaState(x) {
|
|
1173
1095
|
return x.selectionMode === undefined || x.selectionMode === DataGridSelectionMode.none ? null : x.selectionMode.includes('multi') ? 'true' : 'false';
|
|
@@ -1190,40 +1112,28 @@ function handleColumnSort(_, {
|
|
|
1190
1112
|
const DataGridTemplate = context => {
|
|
1191
1113
|
const rowItemTemplate = createRowItemTemplate(context);
|
|
1192
1114
|
const rowTag = context.tagFor(DataGridRow);
|
|
1193
|
-
return html
|
|
1115
|
+
return html`
|
|
1194
1116
|
<template
|
|
1195
|
-
aria-multiselectable="${
|
|
1117
|
+
aria-multiselectable="${getMultiSelectAriaState}"
|
|
1196
1118
|
role="grid"
|
|
1197
1119
|
tabindex="0"
|
|
1198
|
-
@sort="${
|
|
1199
|
-
:rowElementTag="${
|
|
1200
|
-
:defaultRowItemTemplate="${
|
|
1201
|
-
${
|
|
1120
|
+
@sort="${handleColumnSort}"
|
|
1121
|
+
:rowElementTag="${() => rowTag}"
|
|
1122
|
+
:defaultRowItemTemplate="${rowItemTemplate}"
|
|
1123
|
+
${children({
|
|
1124
|
+
property: 'rowElements',
|
|
1125
|
+
filter: elements('[role=row]')
|
|
1126
|
+
})}
|
|
1202
1127
|
>
|
|
1203
1128
|
<div class="base">
|
|
1204
|
-
${
|
|
1129
|
+
${setHeaderRow}
|
|
1205
1130
|
<slot></slot>
|
|
1206
1131
|
</div>
|
|
1207
1132
|
</template>
|
|
1208
|
-
|
|
1209
|
-
property: 'rowElements',
|
|
1210
|
-
filter: elements('[role=row]')
|
|
1211
|
-
}), setHeaderRow);
|
|
1133
|
+
`;
|
|
1212
1134
|
};
|
|
1213
1135
|
|
|
1214
1136
|
class DataGridCell extends DataGridCell$1 {
|
|
1215
|
-
constructor() {
|
|
1216
|
-
super();
|
|
1217
|
-
this.ariaSelected = null;
|
|
1218
|
-
this.ariaSort = null;
|
|
1219
|
-
this.updateCellStyle = () => {
|
|
1220
|
-
if (this.gridColumn && !this.gridColumn.includes('undefined')) {
|
|
1221
|
-
this.style.gridColumn = this.gridColumn;
|
|
1222
|
-
} else {
|
|
1223
|
-
this.style.removeProperty('grid-column');
|
|
1224
|
-
}
|
|
1225
|
-
};
|
|
1226
|
-
}
|
|
1227
1137
|
ariaSelectedChanged(_, selectedState) {
|
|
1228
1138
|
var _a;
|
|
1229
1139
|
(_a = this.shadowRoot.querySelector('.base')) === null || _a === void 0 ? void 0 : _a.classList.toggle('selected', selectedState === 'true');
|
|
@@ -1240,6 +1150,18 @@ class DataGridCell extends DataGridCell$1 {
|
|
|
1240
1150
|
super.handleFocusout(e);
|
|
1241
1151
|
this.shadowRoot.querySelector('.base').classList.remove('active');
|
|
1242
1152
|
}
|
|
1153
|
+
constructor() {
|
|
1154
|
+
super();
|
|
1155
|
+
this.ariaSelected = null;
|
|
1156
|
+
this.ariaSort = null;
|
|
1157
|
+
this.updateCellStyle = () => {
|
|
1158
|
+
if (this.gridColumn && !this.gridColumn.includes('undefined')) {
|
|
1159
|
+
this.style.gridColumn = this.gridColumn;
|
|
1160
|
+
} else {
|
|
1161
|
+
this.style.removeProperty('grid-column');
|
|
1162
|
+
}
|
|
1163
|
+
};
|
|
1164
|
+
}
|
|
1243
1165
|
}
|
|
1244
1166
|
__decorate([attr({
|
|
1245
1167
|
attribute: 'aria-selected',
|
|
@@ -1249,59 +1171,51 @@ __decorate([attr({
|
|
|
1249
1171
|
attribute: 'aria-sort'
|
|
1250
1172
|
}), __metadata("design:type", Object)], DataGridCell.prototype, "ariaSort", void 0);
|
|
1251
1173
|
|
|
1252
|
-
let _2$1 = t => t,
|
|
1253
|
-
_t$1,
|
|
1254
|
-
_t2$1,
|
|
1255
|
-
_t3$1;
|
|
1256
1174
|
function createCellItemTemplate(context) {
|
|
1257
1175
|
const cellTag = context.tagFor(DataGridCell);
|
|
1258
|
-
return html
|
|
1259
|
-
<${
|
|
1260
|
-
cell-type="${
|
|
1261
|
-
grid-column="${
|
|
1262
|
-
:rowData="${
|
|
1263
|
-
:columnDefinition="${
|
|
1264
|
-
selected="${
|
|
1265
|
-
></${
|
|
1266
|
-
|
|
1176
|
+
return html`
|
|
1177
|
+
<${cellTag}
|
|
1178
|
+
cell-type="${x => x.isRowHeader ? 'rowheader' : undefined}"
|
|
1179
|
+
grid-column="${(_, c) => c.index + 1}"
|
|
1180
|
+
:rowData="${(_, c) => c.parent.rowData}"
|
|
1181
|
+
:columnDefinition="${x => x}"
|
|
1182
|
+
selected="${(_, c) => c.parent.ariaSelected === 'true' ? true : null}"
|
|
1183
|
+
></${cellTag}>
|
|
1184
|
+
`;
|
|
1267
1185
|
}
|
|
1268
1186
|
function createHeaderCellItemTemplate(context) {
|
|
1269
1187
|
const cellTag = context.tagFor(DataGridCell);
|
|
1270
|
-
return html
|
|
1271
|
-
<${
|
|
1188
|
+
return html`
|
|
1189
|
+
<${cellTag}
|
|
1272
1190
|
cell-type="columnheader"
|
|
1273
|
-
grid-column="${
|
|
1274
|
-
:columnDefinition="${
|
|
1275
|
-
></${
|
|
1276
|
-
|
|
1191
|
+
grid-column="${(_, c) => c.index + 1}"
|
|
1192
|
+
:columnDefinition="${x => x}"
|
|
1193
|
+
></${cellTag}>
|
|
1194
|
+
`;
|
|
1277
1195
|
}
|
|
1278
1196
|
const DataGridRowTemplate = context => {
|
|
1279
1197
|
const cellItemTemplate = createCellItemTemplate(context);
|
|
1280
1198
|
const headerCellItemTemplate = createHeaderCellItemTemplate(context);
|
|
1281
|
-
return html
|
|
1199
|
+
return html`
|
|
1282
1200
|
<template
|
|
1283
1201
|
role="row"
|
|
1284
|
-
class="${
|
|
1285
|
-
:defaultCellItemTemplate="${
|
|
1286
|
-
:defaultHeaderCellItemTemplate="${
|
|
1287
|
-
${
|
|
1202
|
+
class="${x => x.rowType !== 'default' ? x.rowType : ''}"
|
|
1203
|
+
:defaultCellItemTemplate="${cellItemTemplate}"
|
|
1204
|
+
:defaultHeaderCellItemTemplate="${headerCellItemTemplate}"
|
|
1205
|
+
${children({
|
|
1206
|
+
property: 'cellElements',
|
|
1207
|
+
filter: elements('[role="cell"],[role="gridcell"],[role="columnheader"],[role="rowheader"]')
|
|
1208
|
+
})}
|
|
1288
1209
|
>
|
|
1289
|
-
<div class="base ${
|
|
1290
|
-
style="grid-template-columns: ${
|
|
1210
|
+
<div class="base ${x => x.ariaSelected === 'true' ? 'selected' : ''}"
|
|
1211
|
+
style="grid-template-columns: ${x => x.gridTemplateColumns};"
|
|
1291
1212
|
>
|
|
1292
|
-
<slot ${
|
|
1213
|
+
<slot ${slotted('slottedCellElements')}></slot>
|
|
1293
1214
|
</div>
|
|
1294
1215
|
</template>
|
|
1295
|
-
|
|
1296
|
-
property: 'cellElements',
|
|
1297
|
-
filter: elements('[role="cell"],[role="gridcell"],[role="columnheader"],[role="rowheader"]')
|
|
1298
|
-
}), x => x.ariaSelected === 'true' ? 'selected' : '', x => x.gridTemplateColumns, slotted('slottedCellElements'));
|
|
1216
|
+
`;
|
|
1299
1217
|
};
|
|
1300
1218
|
|
|
1301
|
-
let _2 = t => t,
|
|
1302
|
-
_t,
|
|
1303
|
-
_t2,
|
|
1304
|
-
_t3;
|
|
1305
1219
|
function shouldShowSortIcons(x) {
|
|
1306
1220
|
if (x.columnDefinition) {
|
|
1307
1221
|
x.ariaSort = !x.columnDefinition.sortable ? null : x.columnDefinition.sortDirection ? x.columnDefinition.sortDirection : DataGridCellSortStates.none;
|
|
@@ -1313,11 +1227,11 @@ function getSortIcon(x) {
|
|
|
1313
1227
|
}
|
|
1314
1228
|
function renderSortIcons(c) {
|
|
1315
1229
|
const iconTag = c.tagFor(Icon);
|
|
1316
|
-
return html
|
|
1317
|
-
${
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1230
|
+
return html`
|
|
1231
|
+
${when(shouldShowSortIcons, html`
|
|
1232
|
+
<${iconTag} class="header-icon" name="${getSortIcon}"></${iconTag}>
|
|
1233
|
+
`)}
|
|
1234
|
+
`;
|
|
1321
1235
|
}
|
|
1322
1236
|
function handleClick(x) {
|
|
1323
1237
|
if (x.cellType === 'columnheader' && x.ariaSort !== null) {
|
|
@@ -1329,23 +1243,23 @@ function handleClick(x) {
|
|
|
1329
1243
|
}
|
|
1330
1244
|
function DataGridCellTemplate(context) {
|
|
1331
1245
|
const focusTemplate = focusTemplateFactory(context);
|
|
1332
|
-
return html
|
|
1246
|
+
return html`
|
|
1333
1247
|
<template
|
|
1334
1248
|
tabindex="-1"
|
|
1335
|
-
role="${
|
|
1336
|
-
|
|
1249
|
+
role="${x => {
|
|
1250
|
+
var _a;
|
|
1251
|
+
return (_a = DataGridCellRole[x.cellType]) !== null && _a !== void 0 ? _a : DataGridCellRole.default;
|
|
1252
|
+
}}"
|
|
1253
|
+
@click="${handleClick}"
|
|
1337
1254
|
>
|
|
1338
1255
|
<div class="base">
|
|
1339
1256
|
<slot></slot>
|
|
1340
|
-
${
|
|
1341
|
-
${
|
|
1257
|
+
${() => focusTemplate}
|
|
1258
|
+
${_ => renderSortIcons(context)}
|
|
1342
1259
|
</div>
|
|
1343
1260
|
|
|
1344
1261
|
</template>
|
|
1345
|
-
|
|
1346
|
-
var _a;
|
|
1347
|
-
return (_a = DataGridCellRole[x.cellType]) !== null && _a !== void 0 ? _a : DataGridCellRole.default;
|
|
1348
|
-
}, handleClick, () => focusTemplate, _ => renderSortIcons(context));
|
|
1262
|
+
`;
|
|
1349
1263
|
}
|
|
1350
1264
|
|
|
1351
1265
|
const dataGrid = DataGrid.compose({
|
package/shared/definition23.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { F as FoundationElement,
|
|
1
|
+
import { F as FoundationElement, d as __classPrivateFieldGet, _ as __decorate, a as attr, b as __metadata, o as observable, f as __classPrivateFieldSet, h as html, r as registerFactory } from './index.js';
|
|
2
2
|
import { i as iconRegistries } from './definition3.js';
|
|
3
3
|
import { B as Button, b as buttonRegistries } from './definition7.js';
|
|
4
4
|
import { E as Elevation, e as elevationRegistries } from './definition8.js';
|
|
5
5
|
import { I as Icon } from './icon.js';
|
|
6
|
-
import { s as slotted } from './slotted.js';
|
|
7
6
|
import { w as when } from './when.js';
|
|
7
|
+
import { s as slotted } from './slotted.js';
|
|
8
8
|
import { c as classNames } from './class-names.js';
|
|
9
9
|
|
|
10
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
11
|
|
|
12
|
-
var css_248z = "/**\n * Do not edit directly\n * Generated on
|
|
12
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Mon, 07 Aug 2023 18:00:27 GMT\n */\n.base {\n box-sizing: border-box;\n padding: 0;\n border: none;\n background-color: transparent;\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 {\n position: fixed;\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);\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 display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 24px;\n padding-inline: 24px;\n}\n.hide-footer .footer {\n display: none;\n}\n.footer .actions {\n display: flex;\n align-self: flex-end;\n gap: 8px;\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}";
|
|
13
13
|
|
|
14
14
|
var _Dialog_instances, _Dialog_modal, _Dialog_dialogElement, _Dialog_dialog_get, _Dialog_handleScrimClick, _Dialog_handleInternalFormSubmit, _Dialog_handleModal;
|
|
15
15
|
const isDialogSupported = Boolean(HTMLDialogElement && HTMLDialogElement.prototype.showModal);
|
|
@@ -140,12 +140,6 @@ __decorate([observable, __metadata("design:type", Array)], Dialog.prototype, "bo
|
|
|
140
140
|
__decorate([observable, __metadata("design:type", Array)], Dialog.prototype, "footerSlottedContent", void 0);
|
|
141
141
|
__decorate([observable, __metadata("design:type", Array)], Dialog.prototype, "actionItemsSlottedContent", void 0);
|
|
142
142
|
|
|
143
|
-
let _ = t => t,
|
|
144
|
-
_t,
|
|
145
|
-
_t2,
|
|
146
|
-
_t3,
|
|
147
|
-
_t4,
|
|
148
|
-
_t5;
|
|
149
143
|
const getClasses = ({
|
|
150
144
|
iconPlacement,
|
|
151
145
|
bodySlottedContent,
|
|
@@ -153,34 +147,34 @@ const getClasses = ({
|
|
|
153
147
|
actionItemsSlottedContent
|
|
154
148
|
}) => 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) || (actionItemsSlottedContent === null || actionItemsSlottedContent === void 0 ? void 0 : actionItemsSlottedContent.length))]);
|
|
155
149
|
function icon(iconTag) {
|
|
156
|
-
return html
|
|
157
|
-
<${
|
|
158
|
-
|
|
150
|
+
return html`
|
|
151
|
+
<${iconTag} class="icon" name="${x => x.icon}"></${iconTag}>
|
|
152
|
+
`;
|
|
159
153
|
}
|
|
160
154
|
function headline() {
|
|
161
|
-
return html
|
|
155
|
+
return html`
|
|
162
156
|
<div class="headline">
|
|
163
|
-
${
|
|
157
|
+
${x => x.headline}
|
|
164
158
|
</div>
|
|
165
|
-
|
|
159
|
+
`;
|
|
166
160
|
}
|
|
167
161
|
function subtitle() {
|
|
168
|
-
return html
|
|
162
|
+
return html`
|
|
169
163
|
<div class="subtitle">
|
|
170
|
-
${
|
|
164
|
+
${x => x.subtitle}
|
|
171
165
|
</div>
|
|
172
|
-
|
|
166
|
+
`;
|
|
173
167
|
}
|
|
174
168
|
function renderDismissButton(buttonTag) {
|
|
175
|
-
return html
|
|
176
|
-
<${
|
|
169
|
+
return html`
|
|
170
|
+
<${buttonTag}
|
|
177
171
|
size="condensed"
|
|
178
172
|
class="dismiss-button"
|
|
179
173
|
icon="close-line"
|
|
180
|
-
@click="${
|
|
181
|
-
</${0}>`), buttonTag, x => {
|
|
174
|
+
@click="${x => {
|
|
182
175
|
x.open = false;
|
|
183
|
-
}
|
|
176
|
+
}}">
|
|
177
|
+
</${buttonTag}>`;
|
|
184
178
|
}
|
|
185
179
|
function handleEscapeKey(dialog, event) {
|
|
186
180
|
if (event.key === 'Escape' && dialog.modal) {
|
|
@@ -192,40 +186,40 @@ const DialogTemplate = context => {
|
|
|
192
186
|
const elevationTag = context.tagFor(Elevation);
|
|
193
187
|
const iconTag = context.tagFor(Icon);
|
|
194
188
|
const buttonTag = context.tagFor(Button);
|
|
195
|
-
return html
|
|
196
|
-
<${
|
|
197
|
-
<dialog class="${
|
|
198
|
-
@keydown="${
|
|
199
|
-
returnValue="${
|
|
200
|
-
aria-labelledby="${
|
|
201
|
-
aria-label="${
|
|
202
|
-
aria-describedby="${
|
|
189
|
+
return html`
|
|
190
|
+
<${elevationTag} dp="8">
|
|
191
|
+
<dialog class="${getClasses}"
|
|
192
|
+
@keydown="${(x, c) => handleEscapeKey(x, c.event)}"
|
|
193
|
+
returnValue="${x => x.returnValue}"
|
|
194
|
+
aria-labelledby="${x => x.ariaLabelledBy}"
|
|
195
|
+
aria-label="${x => x.ariaLabel}"
|
|
196
|
+
aria-describedby="${x => x.ariaDescribedBy}"
|
|
203
197
|
>
|
|
204
198
|
<slot name="main">
|
|
205
199
|
<div class="main-wrapper">
|
|
206
|
-
<div class="header ${
|
|
200
|
+
<div class="header ${x => x.subtitle ? 'border' : ''}">
|
|
207
201
|
<slot name="graphic">
|
|
208
|
-
${
|
|
202
|
+
${when(x => x.icon, icon(iconTag))}
|
|
209
203
|
</slot>
|
|
210
|
-
${
|
|
211
|
-
${
|
|
212
|
-
${
|
|
204
|
+
${when(x => x.headline, headline())}
|
|
205
|
+
${when(x => x.subtitle, subtitle())}
|
|
206
|
+
${renderDismissButton(buttonTag)}
|
|
213
207
|
</div>
|
|
214
|
-
<div class="body ${
|
|
215
|
-
<slot name="body" ${
|
|
208
|
+
<div class="body ${x => x.fullWidthBody ? 'full-width' : ''}" >
|
|
209
|
+
<slot name="body" ${slotted('bodySlottedContent')}></slot>
|
|
216
210
|
</div>
|
|
217
211
|
<div class="footer">
|
|
218
212
|
<div>
|
|
219
|
-
<slot name="footer" ${
|
|
213
|
+
<slot name="footer" ${slotted('footerSlottedContent')}></slot>
|
|
220
214
|
</div>
|
|
221
215
|
<div class="actions">
|
|
222
|
-
<slot name="action-items" ${
|
|
216
|
+
<slot name="action-items" ${slotted('actionItemsSlottedContent')}></slot>
|
|
223
217
|
</div>
|
|
224
218
|
</div>
|
|
225
219
|
</div>
|
|
226
220
|
</slot>
|
|
227
221
|
</dialog>
|
|
228
|
-
</${
|
|
222
|
+
</${elevationTag}>`;
|
|
229
223
|
};
|
|
230
224
|
|
|
231
225
|
const dialogDefinition = Dialog.compose({
|
package/shared/definition24.js
CHANGED
|
@@ -51,21 +51,19 @@ __decorate([
|
|
|
51
51
|
attr
|
|
52
52
|
], Divider$1.prototype, "orientation", void 0);
|
|
53
53
|
|
|
54
|
-
var css_248z = "/**\n * Do not edit directly\n * Generated on
|
|
54
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Mon, 07 Aug 2023 18:00:27 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
55
|
|
|
56
56
|
class Divider extends Divider$1 {}
|
|
57
57
|
|
|
58
|
-
let _ = t => t,
|
|
59
|
-
_t;
|
|
60
58
|
const getClasses = ({
|
|
61
59
|
orientation
|
|
62
60
|
}) => classNames('base', [`${orientation}`, Boolean(orientation)]);
|
|
63
|
-
const DividerTemplate = () => html
|
|
61
|
+
const DividerTemplate = () => html`
|
|
64
62
|
<span
|
|
65
|
-
class="${
|
|
66
|
-
orientation="${
|
|
67
|
-
role="${
|
|
68
|
-
></span
|
|
63
|
+
class="${getClasses}"
|
|
64
|
+
orientation="${x => x.orientation}"
|
|
65
|
+
role="${x => x.role}"
|
|
66
|
+
></span>`;
|
|
69
67
|
|
|
70
68
|
const dividerDefinition = Divider.compose({
|
|
71
69
|
baseName: 'divider',
|