@vonage/vivid 2.36.3 → 3.0.0-next.100
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +144 -0
- package/accordion/index.js +52 -0
- package/accordion-item/index.js +118 -0
- package/action-group/index.js +41 -0
- package/avatar/index.js +61 -0
- package/badge/index.js +51 -0
- package/banner/index.js +128 -0
- package/breadcrumb/index.js +103 -0
- package/breadcrumb-item/index.js +59 -0
- package/button/index.js +24 -0
- package/calendar/index.js +1526 -0
- package/calendar-event/index.js +112 -0
- package/card/index.js +114 -0
- package/checkbox/index.js +179 -0
- package/dialog/index.js +230 -0
- package/divider/index.js +4 -0
- package/elevation/index.js +3 -0
- package/fab/index.js +100 -0
- package/focus/index.js +18 -0
- package/header/index.js +61 -0
- package/icon/index.js +36 -0
- package/index.d.ts +2 -0
- package/index.js +76 -64
- package/layout/index.js +43 -0
- package/lib/accordion/accordion.d.ts +9 -0
- package/lib/accordion/accordion.template.d.ts +4 -0
- package/lib/accordion/index.d.ts +2 -0
- package/lib/accordion-item/accordion-item.d.ts +13 -0
- package/lib/accordion-item/accordion-item.template.d.ts +4 -0
- package/lib/accordion-item/index.d.ts +4 -0
- package/lib/action-group/action-group.d.ts +10 -0
- package/lib/action-group/action-group.template.d.ts +4 -0
- package/lib/action-group/index.d.ts +2 -0
- package/lib/avatar/avatar.d.ts +15 -0
- package/lib/avatar/avatar.template.d.ts +4 -0
- package/lib/avatar/index.d.ts +3 -0
- package/lib/badge/badge.d.ts +15 -0
- package/lib/badge/badge.template.d.ts +4 -0
- package/lib/badge/index.d.ts +3 -0
- package/lib/banner/banner.d.ts +20 -0
- package/lib/banner/banner.template.d.ts +4 -0
- package/lib/banner/index.d.ts +3 -0
- package/lib/breadcrumb/breadcrumb.d.ts +3 -0
- package/lib/breadcrumb/breadcrumb.template.d.ts +4 -0
- package/lib/breadcrumb/index.d.ts +2 -0
- package/lib/breadcrumb-item/breadcrumb-item.d.ts +5 -0
- package/lib/breadcrumb-item/breadcrumb-item.template.d.ts +4 -0
- package/lib/breadcrumb-item/index.d.ts +4 -0
- package/lib/button/button.d.ts +18 -0
- package/lib/button/button.template.d.ts +4 -0
- package/lib/button/index.d.ts +4 -0
- package/lib/calendar/calendar.d.ts +13 -0
- package/lib/calendar/calendar.template.d.ts +4 -0
- package/lib/calendar/helpers/calendar.date-functions.d.ts +2 -0
- package/lib/calendar/helpers/calendar.event-context.d.ts +6 -0
- package/lib/calendar/helpers/calendar.keyboard-interactions.d.ts +9 -0
- package/lib/calendar/index.d.ts +2 -0
- package/lib/calendar-event/calendar-event.d.ts +14 -0
- package/lib/calendar-event/calendar-event.template.d.ts +4 -0
- package/lib/calendar-event/index.d.ts +2 -0
- package/lib/card/card.d.ts +10 -0
- package/lib/card/card.template.d.ts +4 -0
- package/lib/card/index.d.ts +4 -0
- package/lib/checkbox/checkbox.d.ts +5 -0
- package/lib/checkbox/checkbox.template.d.ts +4 -0
- package/lib/checkbox/index.d.ts +4 -0
- package/lib/components.d.ts +38 -0
- package/lib/dialog/dialog.d.ts +20 -0
- package/lib/dialog/dialog.template.d.ts +4 -0
- package/lib/dialog/index.d.ts +5 -0
- package/lib/divider/divider.d.ts +3 -0
- package/lib/divider/divider.template.d.ts +4 -0
- package/lib/divider/index.d.ts +2 -0
- package/lib/elevation/elevation.d.ts +5 -0
- package/lib/elevation/elevation.template.d.ts +4 -0
- package/lib/elevation/index.d.ts +2 -0
- package/lib/enums.d.ts +59 -0
- package/lib/fab/fab.d.ts +13 -0
- package/lib/fab/fab.template.d.ts +4 -0
- package/lib/fab/index.d.ts +4 -0
- package/lib/focus/focus.d.ts +3 -0
- package/lib/focus/focus.template.d.ts +4 -0
- package/lib/focus/index.d.ts +2 -0
- package/lib/header/header.d.ts +5 -0
- package/lib/header/header.template.d.ts +4 -0
- package/lib/header/index.d.ts +3 -0
- package/lib/icon/icon.d.ts +12 -0
- package/lib/icon/icon.placeholder.d.ts +1 -0
- package/lib/icon/icon.template.d.ts +4 -0
- package/lib/icon/index.d.ts +2 -0
- package/lib/layout/index.d.ts +2 -0
- package/lib/layout/layout.d.ts +16 -0
- package/lib/layout/layout.template.d.ts +4 -0
- package/lib/listbox/index.d.ts +4 -0
- package/lib/listbox/listbox.d.ts +9 -0
- package/lib/listbox/listbox.template.d.ts +4 -0
- package/lib/listbox-option/index.d.ts +4 -0
- package/lib/listbox-option/listbox-option.d.ts +9 -0
- package/lib/listbox-option/listbox-option.template.d.ts +4 -0
- package/lib/menu/index.d.ts +12 -0
- package/lib/menu/menu.d.ts +10 -0
- package/lib/menu/menu.template.d.ts +3 -0
- package/lib/menu-item/index.d.ts +3 -0
- package/lib/menu-item/menu-item.d.ts +7 -0
- package/lib/menu-item/menu-item.template.d.ts +5 -0
- package/lib/nav/index.d.ts +2 -0
- package/lib/nav/nav.d.ts +3 -0
- package/lib/nav/nav.template.d.ts +4 -0
- package/lib/nav-disclosure/index.d.ts +4 -0
- package/lib/nav-disclosure/nav-disclosure.d.ts +10 -0
- package/lib/nav-disclosure/nav-disclosure.template.d.ts +4 -0
- package/lib/nav-item/index.d.ts +4 -0
- package/lib/nav-item/nav-item.d.ts +6 -0
- package/lib/nav-item/nav-item.template.d.ts +4 -0
- package/lib/note/index.d.ts +2 -0
- package/lib/note/note.d.ts +10 -0
- package/lib/note/note.template.d.ts +5 -0
- package/lib/number-field/index.d.ts +4 -0
- package/lib/number-field/number-field.d.ts +14 -0
- package/lib/number-field/number-field.template.d.ts +4 -0
- package/lib/popup/index.d.ts +4 -0
- package/lib/popup/popup.d.ts +18 -0
- package/lib/popup/popup.template.d.ts +4 -0
- package/lib/progress/index.d.ts +2 -0
- package/lib/progress/progress.d.ts +9 -0
- package/lib/progress/progress.template.d.ts +5 -0
- package/lib/progress-ring/index.d.ts +2 -0
- package/lib/progress-ring/progress-ring.d.ts +7 -0
- package/lib/progress-ring/progress-ring.template.d.ts +4 -0
- package/lib/radio/index.d.ts +3 -0
- package/lib/radio/radio.d.ts +4 -0
- package/lib/radio/radio.template.d.ts +4 -0
- package/lib/radio-group/index.d.ts +10 -0
- package/lib/radio-group/radio-group.d.ts +4 -0
- package/lib/radio-group/radio-group.template.d.ts +4 -0
- package/lib/side-drawer/index.d.ts +2 -0
- package/lib/side-drawer/side-drawer.d.ts +9 -0
- package/lib/side-drawer/side-drawer.template.d.ts +4 -0
- package/lib/slider/index.d.ts +3 -0
- package/lib/slider/slider.d.ts +4 -0
- package/lib/slider/slider.template.d.ts +4 -0
- package/lib/switch/index.d.ts +4 -0
- package/lib/switch/switch.d.ts +7 -0
- package/lib/switch/switch.template.d.ts +4 -0
- package/lib/text-anchor/index.d.ts +2 -0
- package/lib/text-anchor/text-anchor.d.ts +7 -0
- package/lib/text-anchor/text-anchor.template.d.ts +4 -0
- package/lib/text-area/index.d.ts +4 -0
- package/lib/text-area/text-area.d.ts +9 -0
- package/lib/text-area/text-area.template.d.ts +4 -0
- package/lib/text-field/index.d.ts +4 -0
- package/lib/text-field/text-field.d.ts +14 -0
- package/lib/text-field/text-field.template.d.ts +5 -0
- package/lib/tooltip/index.d.ts +3 -0
- package/lib/tooltip/tooltip.d.ts +8 -0
- package/lib/tooltip/tooltip.template.d.ts +4 -0
- package/listbox/index.js +1090 -0
- package/listbox-option/index.js +22 -0
- package/menu/index.js +371 -0
- package/menu-item/index.js +21 -0
- package/nav/index.js +17 -0
- package/nav-disclosure/index.js +82 -0
- package/nav-item/index.js +46 -0
- package/note/index.js +59 -0
- package/number-field/index.js +461 -0
- package/package.json +65 -323
- package/popup/index.js +27 -0
- package/progress/index.js +97 -0
- package/progress-ring/index.js +76 -0
- package/radio/index.js +47 -0
- package/radio-group/index.js +435 -0
- package/shared/_has.js +58 -0
- package/shared/affix.js +24 -0
- package/shared/anchor.js +86 -0
- package/shared/apply-mixins.js +23 -0
- package/shared/aria-global.js +72 -0
- package/shared/aria.js +9 -0
- package/shared/base-progress.js +70 -0
- package/shared/breadcrumb-item.js +25 -0
- package/shared/button.js +200 -0
- package/shared/calendar-event.js +19 -0
- package/shared/class-names.js +15 -0
- package/shared/design-system/index.d.ts +3 -0
- package/shared/dialog-polyfill.esm.js +858 -0
- package/shared/direction.js +20 -0
- package/shared/dom.js +8 -0
- package/shared/enums.js +70 -0
- package/shared/es.object.assign.js +69 -0
- package/shared/es.regexp.to-string.js +59 -0
- package/shared/export.js +1017 -0
- package/shared/focus.js +5 -0
- package/shared/focus2.js +11 -0
- package/shared/form-associated.js +466 -0
- package/shared/form-elements.js +331 -0
- package/shared/icon.js +1361 -0
- package/shared/index.js +5027 -0
- package/shared/index2.js +107 -0
- package/shared/index3.js +31 -0
- package/shared/index4.js +77 -0
- package/shared/index5.js +261 -0
- package/shared/index6.js +1525 -0
- package/shared/index7.js +349 -0
- package/shared/iterators.js +61 -0
- package/shared/key-codes.js +97 -0
- package/shared/numbers.js +25 -0
- package/shared/object-keys.js +13 -0
- package/shared/patterns/affix.d.ts +9 -0
- package/shared/patterns/focus.d.ts +3 -0
- package/shared/patterns/form-elements/form-elements.d.ts +28 -0
- package/shared/patterns/form-elements/index.d.ts +1 -0
- package/shared/patterns/index.d.ts +3 -0
- package/shared/radio.js +127 -0
- package/shared/ref.js +41 -0
- package/shared/slotted.js +119 -0
- package/shared/start-end.js +50 -0
- package/shared/string-trim.js +40 -0
- package/shared/text-anchor.js +10 -0
- package/shared/text-anchor.template.js +55 -0
- package/shared/to-string.js +51 -0
- package/shared/web.dom-collections.iterator.js +472 -0
- package/shared/when.js +15 -0
- package/side-drawer/index.js +89 -0
- package/slider/index.js +596 -0
- package/styles/core/all.css +75 -0
- package/styles/core/theme.css +11 -0
- package/styles/core/typography.css +69 -0
- package/styles/fonts/SpeziaCompleteVariableItalicWeb.woff2 +0 -0
- package/styles/fonts/SpeziaCompleteVariableUprightWeb.woff2 +0 -0
- package/styles/fonts/SpeziaMonoCompleteVariableWeb.woff2 +0 -0
- package/styles/fonts/spezia.css +20 -0
- package/styles/tokens/theme-dark.css +230 -0
- package/styles/tokens/theme-light.css +230 -0
- package/switch/index.js +153 -0
- package/text-anchor/index.js +28 -0
- package/text-area/index.js +289 -0
- package/text-field/index.js +130 -0
- package/tooltip/index.js +65 -0
package/shared/index2.js
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import '../icon/index.js';
|
|
2
|
+
import '../focus/index.js';
|
|
3
|
+
import { _ as __decorate, a as attr, b as __metadata, h as html, d as designSystem } from './index.js';
|
|
4
|
+
import './web.dom-collections.iterator.js';
|
|
5
|
+
import { A as AffixIconWithTrailing, a as affixIconTemplateFactory } from './affix.js';
|
|
6
|
+
import { B as Button$1 } from './button.js';
|
|
7
|
+
import { a as applyMixins } from './apply-mixins.js';
|
|
8
|
+
import { f as focusTemplateFactory } from './focus2.js';
|
|
9
|
+
import { r as ref } from './ref.js';
|
|
10
|
+
import { c as classNames } from './class-names.js';
|
|
11
|
+
|
|
12
|
+
class Button extends Button$1 {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
this.stacked = false;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
__decorate([attr, __metadata("design:type", String)], Button.prototype, "connotation", void 0);
|
|
19
|
+
__decorate([attr, __metadata("design:type", String)], Button.prototype, "shape", void 0);
|
|
20
|
+
__decorate([attr, __metadata("design:type", String)], Button.prototype, "appearance", void 0);
|
|
21
|
+
__decorate([attr, __metadata("design:type", String)], Button.prototype, "size", void 0);
|
|
22
|
+
__decorate([attr({
|
|
23
|
+
mode: 'boolean',
|
|
24
|
+
attribute: 'stacked'
|
|
25
|
+
}), __metadata("design:type", Object)], Button.prototype, "stacked", void 0);
|
|
26
|
+
__decorate([attr, __metadata("design:type", String)], Button.prototype, "label", void 0);
|
|
27
|
+
applyMixins(Button, AffixIconWithTrailing);
|
|
28
|
+
|
|
29
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Tue, 15 Nov 2022 13:39:19 GMT\n */\n:host {\n display: inline-block;\n}\n\n.control {\n position: relative;\n display: inline-flex;\n box-sizing: border-box;\n align-items: center;\n border: 0 none;\n margin: 0;\n background-color: var(--_appearance-color-fill);\n block-size: var(--_button-block-size);\n box-shadow: inset 0 0 0 1px var(--_appearance-color-outline);\n color: var(--_appearance-color-text);\n gap: var(--_button-icon-gap);\n vertical-align: middle;\n white-space: nowrap;\n /* Size */\n}\n.control.connotation-cta {\n --_connotation-color-primary: var(--vvd-color-cta-500);\n --_connotation-color-primary-text: var(--vvd-color-canvas);\n --_connotation-color-primary-increment: var(--vvd-color-cta-600);\n --_connotation-color-contrast: var(--vvd-color-cta-800);\n --_connotation-color-fierce: var(--vvd-color-cta-700);\n --_connotation-color-firm: var(--vvd-color-cta-600);\n --_connotation-color-soft: var(--vvd-color-cta-100);\n --_connotation-color-faint: var(--vvd-color-cta-50);\n}\n.control.connotation-success {\n --_connotation-color-primary: var(--vvd-color-success-500);\n --_connotation-color-primary-text: var(--vvd-color-canvas);\n --_connotation-color-primary-increment: var(--vvd-color-success-600);\n --_connotation-color-contrast: var(--vvd-color-success-800);\n --_connotation-color-fierce: var(--vvd-color-success-700);\n --_connotation-color-firm: var(--vvd-color-success-600);\n --_connotation-color-soft: var(--vvd-color-success-100);\n --_connotation-color-faint: var(--vvd-color-success-50);\n}\n.control.connotation-alert {\n --_connotation-color-primary: var(--vvd-color-alert-500);\n --_connotation-color-primary-text: var(--vvd-color-canvas);\n --_connotation-color-primary-increment: var(--vvd-color-alert-600);\n --_connotation-color-contrast: var(--vvd-color-alert-800);\n --_connotation-color-fierce: var(--vvd-color-alert-700);\n --_connotation-color-firm: var(--vvd-color-alert-600);\n --_connotation-color-soft: var(--vvd-color-alert-100);\n --_connotation-color-faint: var(--vvd-color-alert-50);\n}\n.control:not(.connotation-cta, .connotation-success, .connotation-alert) {\n --_connotation-color-primary: var(--vvd-color-canvas-text);\n --_connotation-color-primary-text: var(--vvd-color-canvas);\n --_connotation-color-primary-increment: var(--vvd-color-neutral-800);\n --_connotation-color-contrast: var(--vvd-color-neutral-800);\n --_connotation-color-fierce: var(--vvd-color-neutral-700);\n --_connotation-color-firm: var(--vvd-color-canvas-text);\n --_connotation-color-soft: var(--vvd-color-neutral-100);\n --_connotation-color-faint: var(--vvd-color-neutral-50);\n}\n.control.appearance-filled {\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.appearance-outlined {\n --_appearance-color-text: var(--_connotation-color-firm);\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: var(--_connotation-color-firm);\n}\n.control {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: transparent;\n}\n.control:where(:hover, .hover):where(:not(:disabled, .disabled, .readonly)).appearance-filled {\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(:hover, .hover):where(:not(:disabled, .disabled, .readonly)).appearance-outlined {\n --_appearance-color-text: var(--_connotation-color-firm);\n --_appearance-color-fill: var(--_connotation-color-faint);\n --_appearance-color-outline: var(--_connotation-color-firm);\n}\n.control: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.control:where(:disabled, .disabled).appearance-filled {\n --_appearance-color-text: var(--vvd-color-neutral-400);\n --_appearance-color-fill: var(--vvd-color-neutral-200);\n --_appearance-color-outline: transparent;\n}\n.control:where(:disabled, .disabled).appearance-outlined {\n --_appearance-color-text: var(--vvd-color-neutral-400);\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: var(--vvd-color-neutral-400);\n}\n.control:where(:disabled, .disabled) {\n --_appearance-color-text: var(--vvd-color-neutral-400);\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: transparent;\n}\n.control:where(:active, .active):where(:not(:disabled, .disabled)).appearance-filled {\n --_appearance-color-text: var(--_connotation-color-primary-text);\n --_appearance-color-fill: var(--_connotation-color-fierce);\n --_appearance-color-outline: transparent;\n}\n.control:where(:active, .active):where(:not(:disabled, .disabled)).appearance-outlined {\n --_appearance-color-text: var(--_connotation-color-firm);\n --_appearance-color-fill: var(--_connotation-color-soft);\n --_appearance-color-outline: var(--_connotation-color-firm);\n}\n.control: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@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:not(:disabled) {\n cursor: pointer;\n}\n.control:disabled {\n cursor: not-allowed;\n}\n.control.icon-only {\n contain: size;\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(--_button-block-size);\n }\n}\n.control:not(.stacked).size-condensed {\n --_button-block-size: calc(1px * (40 + 8 * clamp(-1, var(--vvd-size-density, 0), 1) - 8));\n font: var(--vvd-typography-base-condensed-bold);\n}\n.control:not(.stacked).size-condensed:not(.icon-only) {\n --_button-icon-gap: 8px;\n padding-inline: 12px;\n}\n.control:not(.stacked).size-condensed .icon {\n font-size: 16px;\n}\n.control:not(.stacked).size-expanded {\n --_button-block-size: calc(1px * (40 + 8 * clamp(-1, var(--vvd-size-density, 0), 1) + 8));\n font: var(--vvd-typography-base-extended-bold);\n}\n.control:not(.stacked).size-expanded:not(.icon-only) {\n --_button-icon-gap: 10px;\n padding-inline: 20px;\n}\n.control:not(.stacked).size-expanded .icon {\n font-size: 24px;\n}\n.control:not(.stacked):not(.size-condensed, .size-expanded) {\n --_button-block-size: calc(1px * (40 + 8 * clamp(-1, var(--vvd-size-density, 0), 1)));\n font: var(--vvd-typography-base-bold);\n}\n.control:not(.stacked):not(.size-condensed, .size-expanded):not(.icon-only) {\n --_button-icon-gap: 8px;\n padding-inline: 16px;\n}\n.control:not(.stacked):not(.size-condensed, .size-expanded) .icon {\n font-size: 20px;\n}\n.control.stacked {\n flex-direction: column;\n justify-content: center;\n --_button-block-size: calc(calc(1px * (40 + 8 * clamp(-1, var(--vvd-size-density, 0), 1) + 8)) + calc(1px * (40 + 8 * clamp(-1, var(--vvd-size-density, 0), 1) - 20)));\n font: var(--vvd-typography-base-bold);\n}\n.control.stacked:not(.icon-only) {\n --_button-icon-gap: 10px;\n padding-inline: 16px;\n}\n.control.stacked .icon {\n font-size: 20px;\n}\n\n/* Shape */\n.control:not(.shape-pill:not(.stacked)) {\n border-radius: 6px;\n}\n\n.control.shape-pill:not(.stacked):not(.icon-only) {\n border-radius: 24px;\n}\n.control.shape-pill:not(.stacked).icon-only {\n border-radius: 50%;\n}\n\n/* Icon */\n.icon-trailing .icon {\n order: 1;\n}\n\n:not(:focus-visible) > .focus-indicator {\n display: none;\n}\n.appearance-outlined .focus-indicator, .appearance-ghost .focus-indicator {\n --focus-stroke-gap-color: transparent;\n}";
|
|
30
|
+
|
|
31
|
+
let _ = t => t,
|
|
32
|
+
_t;
|
|
33
|
+
const getAppearanceClassName = (appearance, disabled) => {
|
|
34
|
+
let className = `appearance-${appearance}`;
|
|
35
|
+
disabled && (className += ' disabled');
|
|
36
|
+
return className;
|
|
37
|
+
};
|
|
38
|
+
const getClasses = ({
|
|
39
|
+
connotation,
|
|
40
|
+
appearance,
|
|
41
|
+
shape,
|
|
42
|
+
iconTrailing,
|
|
43
|
+
icon,
|
|
44
|
+
label,
|
|
45
|
+
disabled,
|
|
46
|
+
stacked,
|
|
47
|
+
size
|
|
48
|
+
}) => classNames('control', [`connotation-${connotation}`, Boolean(connotation)], [getAppearanceClassName(appearance, disabled), Boolean(appearance)], [`shape-${shape}`, Boolean(shape)], [`size-${size}`, Boolean(size)], ['icon-only', !label && !!icon], ['icon-trailing', iconTrailing], ['stacked', Boolean(stacked)]);
|
|
49
|
+
const buttonTemplate = context => {
|
|
50
|
+
const affixIconTemplate = affixIconTemplateFactory(context);
|
|
51
|
+
const focusTemplate = focusTemplateFactory(context);
|
|
52
|
+
return html(_t || (_t = _`
|
|
53
|
+
<button
|
|
54
|
+
class="${0}"
|
|
55
|
+
?autofocus="${0}"
|
|
56
|
+
?disabled="${0}"
|
|
57
|
+
form="${0}"
|
|
58
|
+
formaction="${0}"
|
|
59
|
+
formenctype="${0}"
|
|
60
|
+
formmethod="${0}"
|
|
61
|
+
formnovalidate="${0}"
|
|
62
|
+
formtarget="${0}"
|
|
63
|
+
name="${0}"
|
|
64
|
+
type="${0}"
|
|
65
|
+
value="${0}"
|
|
66
|
+
aria-atomic="${0}"
|
|
67
|
+
aria-busy="${0}"
|
|
68
|
+
aria-controls="${0}"
|
|
69
|
+
aria-current="${0}"
|
|
70
|
+
aria-describedby="${0}"
|
|
71
|
+
aria-details="${0}"
|
|
72
|
+
aria-disabled="${0}"
|
|
73
|
+
aria-errormessage="${0}"
|
|
74
|
+
aria-expanded="${0}"
|
|
75
|
+
aria-flowto="${0}"
|
|
76
|
+
aria-haspopup="${0}"
|
|
77
|
+
aria-hidden="${0}"
|
|
78
|
+
aria-invalid="${0}"
|
|
79
|
+
aria-keyshortcuts="${0}"
|
|
80
|
+
aria-label="${0}"
|
|
81
|
+
aria-labelledby="${0}"
|
|
82
|
+
aria-live="${0}"
|
|
83
|
+
aria-owns="${0}"
|
|
84
|
+
aria-pressed="${0}"
|
|
85
|
+
aria-relevant="${0}"
|
|
86
|
+
aria-roledescription="${0}"
|
|
87
|
+
${0}
|
|
88
|
+
>
|
|
89
|
+
${0}
|
|
90
|
+
${0}
|
|
91
|
+
${0}
|
|
92
|
+
</button>
|
|
93
|
+
`), getClasses, x => x.autofocus, x => x.disabled, x => x.formId, x => x.formaction, x => x.formenctype, x => x.formmethod, x => x.formnovalidate, x => x.formtarget, x => x.name, x => x.type, x => x.value, x => x.ariaAtomic, x => x.ariaBusy, x => x.ariaControls, x => x.ariaCurrent, x => x.ariaDescribedby, x => x.ariaDetails, x => x.ariaDisabled, x => x.ariaErrormessage, x => x.ariaExpanded, x => x.ariaFlowto, x => x.ariaHaspopup, x => x.ariaHidden, x => x.ariaInvalid, x => x.ariaKeyshortcuts, x => x.ariaLabel, x => x.ariaLabelledby, x => x.ariaLive, x => x.ariaOwns, x => x.ariaPressed, x => x.ariaRelevant, x => x.ariaRoledescription, ref('control'), () => focusTemplate, x => affixIconTemplate(x.icon), x => x.label);
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
const vividButton = Button.compose({
|
|
97
|
+
baseName: 'button',
|
|
98
|
+
baseClass: Button$1,
|
|
99
|
+
template: buttonTemplate,
|
|
100
|
+
styles: css_248z,
|
|
101
|
+
shadowOptions: {
|
|
102
|
+
delegatesFocus: true
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
designSystem.register(vividButton());
|
|
106
|
+
|
|
107
|
+
export { Button as B, vividButton as v };
|
package/shared/index3.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { F as FoundationElement, _ as __decorate, a as attr, b as __metadata, h as html, d as designSystem } from './index.js';
|
|
2
|
+
import { c as classNames } from './class-names.js';
|
|
3
|
+
|
|
4
|
+
class Elevation extends FoundationElement {}
|
|
5
|
+
__decorate([attr, __metadata("design:type", Number)], Elevation.prototype, "dp", void 0);
|
|
6
|
+
__decorate([attr({
|
|
7
|
+
attribute: 'no-shadow',
|
|
8
|
+
mode: 'boolean'
|
|
9
|
+
}), __metadata("design:type", Boolean)], Elevation.prototype, "noShadow", void 0);
|
|
10
|
+
|
|
11
|
+
var css_248z = ":host {\n display: contents;\n}\n\n.control {\n display: contents;\n}\n.control.dp-0 {\n --_elevation-fill: var(--vvd-color-surface-0dp);\n --_elevation-shadow: var(--vvd-shadow-surface-0dp);\n}\n.control.dp-4 {\n --_elevation-fill: var(--vvd-color-surface-4dp);\n --_elevation-shadow: var(--vvd-shadow-surface-4dp);\n}\n.control.dp-8 {\n --_elevation-fill: var(--vvd-color-surface-8dp);\n --_elevation-shadow: var(--vvd-shadow-surface-8dp);\n}\n.control.dp-12 {\n --_elevation-fill: var(--vvd-color-surface-12dp);\n --_elevation-shadow: var(--vvd-shadow-surface-12dp);\n}\n.control.dp-16 {\n --_elevation-fill: var(--vvd-color-surface-16dp);\n --_elevation-shadow: var(--vvd-shadow-surface-16dp);\n}\n.control.dp-24 {\n --_elevation-fill: var(--vvd-color-surface-24dp);\n --_elevation-shadow: var(--vvd-shadow-surface-24dp);\n}\n.control:not(.dp-0, .dp-4, .dp-8, .dp-12, .dp-16, .dp-24) {\n --_elevation-fill: var(--vvd-color-surface-2dp);\n --_elevation-shadow: var(--vvd-shadow-surface-2dp);\n}\n.control ::slotted(*) {\n background: var(--_elevation-fill);\n filter: var(--_elevation-shadow);\n transition: background-color 0.15s linear, filter 0.15s linear;\n}\n.control.no-shadow ::slotted(*) {\n filter: none;\n}";
|
|
12
|
+
|
|
13
|
+
let _ = t => t,
|
|
14
|
+
_t;
|
|
15
|
+
const getClasses = ({
|
|
16
|
+
dp,
|
|
17
|
+
noShadow
|
|
18
|
+
}) => classNames('control', [`dp-${dp}`, Boolean(dp)], ['no-shadow', Boolean(noShadow)]);
|
|
19
|
+
const elevationTemplate = () => html(_t || (_t = _`
|
|
20
|
+
<div class="${0}" part="base">
|
|
21
|
+
<slot></slot>
|
|
22
|
+
</div>`), getClasses);
|
|
23
|
+
|
|
24
|
+
const vividElevation = Elevation.compose({
|
|
25
|
+
baseName: 'elevation',
|
|
26
|
+
template: elevationTemplate,
|
|
27
|
+
styles: css_248z
|
|
28
|
+
});
|
|
29
|
+
designSystem.register(vividElevation());
|
|
30
|
+
|
|
31
|
+
export { Elevation as E, vividElevation as v };
|
package/shared/index4.js
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { F as FoundationElement, _ as __decorate, a as attr, h as html, d as designSystem } from './index.js';
|
|
2
|
+
import { O as Orientation } from './aria.js';
|
|
3
|
+
import { c as classNames } from './class-names.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Divider roles
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
const DividerRole = {
|
|
10
|
+
/**
|
|
11
|
+
* The divider semantically separates content
|
|
12
|
+
*/
|
|
13
|
+
separator: "separator",
|
|
14
|
+
/**
|
|
15
|
+
* The divider has no semantic value and is for visual presentation only.
|
|
16
|
+
*/
|
|
17
|
+
presentation: "presentation",
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* A Divider Custom HTML Element.
|
|
22
|
+
* Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#separator | ARIA separator } or {@link https://www.w3.org/TR/wai-aria-1.1/#presentation | ARIA presentation}.
|
|
23
|
+
*
|
|
24
|
+
* @public
|
|
25
|
+
*/
|
|
26
|
+
class Divider$1 extends FoundationElement {
|
|
27
|
+
constructor() {
|
|
28
|
+
super(...arguments);
|
|
29
|
+
/**
|
|
30
|
+
* The role of the element.
|
|
31
|
+
*
|
|
32
|
+
* @public
|
|
33
|
+
* @remarks
|
|
34
|
+
* HTML Attribute: role
|
|
35
|
+
*/
|
|
36
|
+
this.role = DividerRole.separator;
|
|
37
|
+
/**
|
|
38
|
+
* The orientation of the divider.
|
|
39
|
+
*
|
|
40
|
+
* @public
|
|
41
|
+
* @remarks
|
|
42
|
+
* HTML Attribute: orientation
|
|
43
|
+
*/
|
|
44
|
+
this.orientation = Orientation.horizontal;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
__decorate([
|
|
48
|
+
attr
|
|
49
|
+
], Divider$1.prototype, "role", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
attr
|
|
52
|
+
], Divider$1.prototype, "orientation", void 0);
|
|
53
|
+
|
|
54
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Tue, 15 Nov 2022 13:39:19 GMT\n */\n:host {\n display: block;\n}\n\n.base {\n display: block;\n background-color: var(--vvd-color-neutral-200);\n}\n.base:not(.vertical) {\n block-size: 1px;\n inline-size: 100%;\n}\n.base.vertical {\n block-size: 100%;\n inline-size: 1px;\n}";
|
|
55
|
+
|
|
56
|
+
class Divider extends Divider$1 {}
|
|
57
|
+
|
|
58
|
+
let _ = t => t,
|
|
59
|
+
_t;
|
|
60
|
+
const getClasses = ({
|
|
61
|
+
orientation
|
|
62
|
+
}) => classNames('base', [`${orientation}`, Boolean(orientation)]);
|
|
63
|
+
const DividerTemplate = () => html(_t || (_t = _`
|
|
64
|
+
<span
|
|
65
|
+
class="${0}"
|
|
66
|
+
orientation="${0}"
|
|
67
|
+
role="${0}"
|
|
68
|
+
></span>`), getClasses, x => x.orientation, x => x.role);
|
|
69
|
+
|
|
70
|
+
const vividDivider = Divider.compose({
|
|
71
|
+
baseName: 'divider',
|
|
72
|
+
template: DividerTemplate,
|
|
73
|
+
styles: css_248z
|
|
74
|
+
});
|
|
75
|
+
designSystem.register(vividDivider());
|
|
76
|
+
|
|
77
|
+
export { Divider as D, vividDivider as v };
|
package/shared/index5.js
ADDED
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
import '../icon/index.js';
|
|
2
|
+
import '../focus/index.js';
|
|
3
|
+
import { F as FoundationElement, O as Observable, _ as __decorate, o as observable, a as attr, b as __metadata, h as html, d as designSystem } from './index.js';
|
|
4
|
+
import { A as AffixIconWithTrailing, a as affixIconTemplateFactory } from './affix.js';
|
|
5
|
+
import { A as ARIAGlobalStatesAndProperties } from './aria-global.js';
|
|
6
|
+
import { S as StartEnd } from './start-end.js';
|
|
7
|
+
import { a as applyMixins } from './apply-mixins.js';
|
|
8
|
+
import { i as isHTMLElement } from './dom.js';
|
|
9
|
+
import { f as focusTemplateFactory } from './focus2.js';
|
|
10
|
+
import './web.dom-collections.iterator.js';
|
|
11
|
+
import './icon.js';
|
|
12
|
+
import { w as when } from './when.js';
|
|
13
|
+
import { c as classNames } from './class-names.js';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Determines if the element is a {@link (ListboxOption:class)}
|
|
17
|
+
*
|
|
18
|
+
* @param element - the element to test.
|
|
19
|
+
* @public
|
|
20
|
+
*/
|
|
21
|
+
function isListboxOption(el) {
|
|
22
|
+
return (isHTMLElement(el) &&
|
|
23
|
+
(el.getAttribute("role") === "option" ||
|
|
24
|
+
el instanceof HTMLOptionElement));
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* An Option Custom HTML Element.
|
|
28
|
+
* Implements {@link https://www.w3.org/TR/wai-aria-1.1/#option | ARIA option }.
|
|
29
|
+
*
|
|
30
|
+
* @slot start - Content which can be provided before the listbox option content
|
|
31
|
+
* @slot end - Content which can be provided after the listbox option content
|
|
32
|
+
* @slot - The default slot for listbox option content
|
|
33
|
+
* @csspart content - Wraps the listbox option content
|
|
34
|
+
*
|
|
35
|
+
* @public
|
|
36
|
+
*/
|
|
37
|
+
class ListboxOption$1 extends FoundationElement {
|
|
38
|
+
constructor(text, value, defaultSelected, selected) {
|
|
39
|
+
super();
|
|
40
|
+
/**
|
|
41
|
+
* The defaultSelected state of the option.
|
|
42
|
+
* @public
|
|
43
|
+
*/
|
|
44
|
+
this.defaultSelected = false;
|
|
45
|
+
/**
|
|
46
|
+
* Tracks whether the "selected" property has been changed.
|
|
47
|
+
* @internal
|
|
48
|
+
*/
|
|
49
|
+
this.dirtySelected = false;
|
|
50
|
+
/**
|
|
51
|
+
* The checked state of the control.
|
|
52
|
+
*
|
|
53
|
+
* @public
|
|
54
|
+
*/
|
|
55
|
+
this.selected = this.defaultSelected;
|
|
56
|
+
/**
|
|
57
|
+
* Track whether the value has been changed from the initial value
|
|
58
|
+
*/
|
|
59
|
+
this.dirtyValue = false;
|
|
60
|
+
if (text) {
|
|
61
|
+
this.textContent = text;
|
|
62
|
+
}
|
|
63
|
+
if (value) {
|
|
64
|
+
this.initialValue = value;
|
|
65
|
+
}
|
|
66
|
+
if (defaultSelected) {
|
|
67
|
+
this.defaultSelected = defaultSelected;
|
|
68
|
+
}
|
|
69
|
+
if (selected) {
|
|
70
|
+
this.selected = selected;
|
|
71
|
+
}
|
|
72
|
+
this.proxy = new Option(`${this.textContent}`, this.initialValue, this.defaultSelected, this.selected);
|
|
73
|
+
this.proxy.disabled = this.disabled;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Updates the ariaChecked property when the checked property changes.
|
|
77
|
+
*
|
|
78
|
+
* @param prev - the previous checked value
|
|
79
|
+
* @param next - the current checked value
|
|
80
|
+
*
|
|
81
|
+
* @public
|
|
82
|
+
*/
|
|
83
|
+
checkedChanged(prev, next) {
|
|
84
|
+
if (typeof next === "boolean") {
|
|
85
|
+
this.ariaChecked = next ? "true" : "false";
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
this.ariaChecked = null;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Updates the proxy's text content when the default slot changes.
|
|
92
|
+
* @param prev - the previous content value
|
|
93
|
+
* @param next - the current content value
|
|
94
|
+
*
|
|
95
|
+
* @internal
|
|
96
|
+
*/
|
|
97
|
+
contentChanged(prev, next) {
|
|
98
|
+
if (this.proxy instanceof HTMLOptionElement) {
|
|
99
|
+
this.proxy.textContent = this.textContent;
|
|
100
|
+
}
|
|
101
|
+
this.$emit("contentchange", null, { bubbles: true });
|
|
102
|
+
}
|
|
103
|
+
defaultSelectedChanged() {
|
|
104
|
+
if (!this.dirtySelected) {
|
|
105
|
+
this.selected = this.defaultSelected;
|
|
106
|
+
if (this.proxy instanceof HTMLOptionElement) {
|
|
107
|
+
this.proxy.selected = this.defaultSelected;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
disabledChanged(prev, next) {
|
|
112
|
+
this.ariaDisabled = this.disabled ? "true" : "false";
|
|
113
|
+
if (this.proxy instanceof HTMLOptionElement) {
|
|
114
|
+
this.proxy.disabled = this.disabled;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
selectedAttributeChanged() {
|
|
118
|
+
this.defaultSelected = this.selectedAttribute;
|
|
119
|
+
if (this.proxy instanceof HTMLOptionElement) {
|
|
120
|
+
this.proxy.defaultSelected = this.defaultSelected;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
selectedChanged() {
|
|
124
|
+
this.ariaSelected = this.selected ? "true" : "false";
|
|
125
|
+
if (!this.dirtySelected) {
|
|
126
|
+
this.dirtySelected = true;
|
|
127
|
+
}
|
|
128
|
+
if (this.proxy instanceof HTMLOptionElement) {
|
|
129
|
+
this.proxy.selected = this.selected;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
initialValueChanged(previous, next) {
|
|
133
|
+
// If the value is clean and the component is connected to the DOM
|
|
134
|
+
// then set value equal to the attribute value.
|
|
135
|
+
if (!this.dirtyValue) {
|
|
136
|
+
this.value = this.initialValue;
|
|
137
|
+
this.dirtyValue = false;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
get label() {
|
|
141
|
+
var _a;
|
|
142
|
+
return (_a = this.value) !== null && _a !== void 0 ? _a : this.text;
|
|
143
|
+
}
|
|
144
|
+
get text() {
|
|
145
|
+
var _a, _b;
|
|
146
|
+
return (_b = (_a = this.textContent) === null || _a === void 0 ? void 0 : _a.replace(/\s+/g, " ").trim()) !== null && _b !== void 0 ? _b : "";
|
|
147
|
+
}
|
|
148
|
+
set value(next) {
|
|
149
|
+
const newValue = `${next !== null && next !== void 0 ? next : ""}`;
|
|
150
|
+
this._value = newValue;
|
|
151
|
+
this.dirtyValue = true;
|
|
152
|
+
if (this.proxy instanceof HTMLOptionElement) {
|
|
153
|
+
this.proxy.value = newValue;
|
|
154
|
+
}
|
|
155
|
+
Observable.notify(this, "value");
|
|
156
|
+
}
|
|
157
|
+
get value() {
|
|
158
|
+
var _a;
|
|
159
|
+
Observable.track(this, "value");
|
|
160
|
+
return (_a = this._value) !== null && _a !== void 0 ? _a : this.text;
|
|
161
|
+
}
|
|
162
|
+
get form() {
|
|
163
|
+
return this.proxy ? this.proxy.form : null;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
__decorate([
|
|
167
|
+
observable
|
|
168
|
+
], ListboxOption$1.prototype, "checked", void 0);
|
|
169
|
+
__decorate([
|
|
170
|
+
observable
|
|
171
|
+
], ListboxOption$1.prototype, "content", void 0);
|
|
172
|
+
__decorate([
|
|
173
|
+
observable
|
|
174
|
+
], ListboxOption$1.prototype, "defaultSelected", void 0);
|
|
175
|
+
__decorate([
|
|
176
|
+
attr({ mode: "boolean" })
|
|
177
|
+
], ListboxOption$1.prototype, "disabled", void 0);
|
|
178
|
+
__decorate([
|
|
179
|
+
attr({ attribute: "selected", mode: "boolean" })
|
|
180
|
+
], ListboxOption$1.prototype, "selectedAttribute", void 0);
|
|
181
|
+
__decorate([
|
|
182
|
+
observable
|
|
183
|
+
], ListboxOption$1.prototype, "selected", void 0);
|
|
184
|
+
__decorate([
|
|
185
|
+
attr({ attribute: "value", mode: "fromView" })
|
|
186
|
+
], ListboxOption$1.prototype, "initialValue", void 0);
|
|
187
|
+
/**
|
|
188
|
+
* States and properties relating to the ARIA `option` role.
|
|
189
|
+
*
|
|
190
|
+
* @public
|
|
191
|
+
*/
|
|
192
|
+
class DelegatesARIAListboxOption {
|
|
193
|
+
}
|
|
194
|
+
__decorate([
|
|
195
|
+
observable
|
|
196
|
+
], DelegatesARIAListboxOption.prototype, "ariaChecked", void 0);
|
|
197
|
+
__decorate([
|
|
198
|
+
observable
|
|
199
|
+
], DelegatesARIAListboxOption.prototype, "ariaPosInSet", void 0);
|
|
200
|
+
__decorate([
|
|
201
|
+
observable
|
|
202
|
+
], DelegatesARIAListboxOption.prototype, "ariaSelected", void 0);
|
|
203
|
+
__decorate([
|
|
204
|
+
observable
|
|
205
|
+
], DelegatesARIAListboxOption.prototype, "ariaSetSize", void 0);
|
|
206
|
+
applyMixins(DelegatesARIAListboxOption, ARIAGlobalStatesAndProperties);
|
|
207
|
+
applyMixins(ListboxOption$1, StartEnd, DelegatesARIAListboxOption);
|
|
208
|
+
|
|
209
|
+
class ListboxOption extends ListboxOption$1 {
|
|
210
|
+
set text(value) {
|
|
211
|
+
this._text = value;
|
|
212
|
+
}
|
|
213
|
+
get text() {
|
|
214
|
+
var _a;
|
|
215
|
+
return (_a = this._text) !== null && _a !== void 0 ? _a : '';
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
__decorate([attr({
|
|
219
|
+
attribute: 'text'
|
|
220
|
+
}), __metadata("design:type", String)], ListboxOption.prototype, "_text", void 0);
|
|
221
|
+
applyMixins(ListboxOption, AffixIconWithTrailing);
|
|
222
|
+
|
|
223
|
+
let _ = t => t,
|
|
224
|
+
_t,
|
|
225
|
+
_t2;
|
|
226
|
+
const getClasses = ({
|
|
227
|
+
icon,
|
|
228
|
+
disabled,
|
|
229
|
+
selected,
|
|
230
|
+
checked
|
|
231
|
+
}) => classNames('base', ['disabled', disabled], ['selected', Boolean(selected)], ['active', Boolean(checked)], ['icon', Boolean(icon)]);
|
|
232
|
+
const ListboxOptionTemplate = context => {
|
|
233
|
+
const affixIconTemplate = affixIconTemplateFactory(context);
|
|
234
|
+
const focusTemplate = focusTemplateFactory(context);
|
|
235
|
+
return html(_t || (_t = _`
|
|
236
|
+
<template
|
|
237
|
+
aria-checked="${0}"
|
|
238
|
+
aria-disabled="${0}"
|
|
239
|
+
aria-posinset="${0}"
|
|
240
|
+
aria-selected="${0}"
|
|
241
|
+
aria-setsize="${0}"
|
|
242
|
+
role="option">
|
|
243
|
+
<div class="${0}">
|
|
244
|
+
${0}
|
|
245
|
+
${0}
|
|
246
|
+
${0}
|
|
247
|
+
</div>
|
|
248
|
+
</template>
|
|
249
|
+
`), x => x.ariaChecked, x => x.ariaDisabled, x => x.ariaPosInSet, x => x.ariaSelected, x => x.ariaSetSize, getClasses, () => focusTemplate, x => affixIconTemplate(x.icon), when(x => x.text, html(_t2 || (_t2 = _`<div class="text">${0}</div>`), x => x.text)));
|
|
250
|
+
};
|
|
251
|
+
|
|
252
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Tue, 15 Nov 2022 13:39:19 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(--_appearance-color-text);\n font: var(--vvd-typography-base);\n gap: 8px;\n hyphens: auto;\n inline-size: 100%;\n min-block-size: calc(1px * (40 + 8 * clamp(-1, var(--vvd-size-density, 0), 1)));\n padding-block: 10px;\n padding-inline: 8px;\n vertical-align: middle;\n word-break: break-word;\n}\n.base {\n --_connotation-color-primary: var(--vvd-color-canvas-text);\n --_connotation-color-primary-text: var(--vvd-color-canvas);\n --_connotation-color-primary-increment: var(--vvd-color-neutral-800);\n --_connotation-color-faint: var(--vvd-color-neutral-50);\n --_connotation-color-soft: var(--vvd-color-neutral-100);\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-400);\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-text);\n --_appearance-color-fill: var(--_connotation-color-primary);\n --_appearance-color-outline: transparent;\n}\n.base:where(.selected, [aria-current]):where(:hover, .hover) {\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@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}\n.base .text {\n font: var(--vvd-typography-base);\n}\n\n.icon {\n font-size: 20px;\n}\n.base:not(.disabled, .selected) .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}";
|
|
253
|
+
|
|
254
|
+
const vividListboxOption = ListboxOption.compose({
|
|
255
|
+
baseName: 'option',
|
|
256
|
+
template: ListboxOptionTemplate,
|
|
257
|
+
styles: css_248z
|
|
258
|
+
});
|
|
259
|
+
designSystem.register(vividListboxOption());
|
|
260
|
+
|
|
261
|
+
export { isListboxOption as i, vividListboxOption as v };
|