@vonage/vivid 3.0.0-next.9 → 3.0.0-next.91
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 +141 -4
- package/accordion/index.js +3 -12
- package/accordion-item/index.js +30 -38
- package/action-group/index.js +41 -0
- package/avatar/index.js +60 -0
- package/badge/index.js +16 -30
- package/banner/index.js +25 -111
- package/breadcrumb/index.js +21 -18
- package/breadcrumb-item/index.js +23 -20
- package/button/index.js +19 -757
- package/calendar/index.js +72 -67
- package/calendar-event/index.js +112 -0
- package/card/index.js +113 -0
- package/checkbox/index.js +176 -0
- package/dialog/index.js +229 -0
- package/divider/index.js +4 -0
- package/elevation/index.js +3 -31
- package/fab/index.js +99 -0
- package/focus/index.js +18 -3
- package/header/index.js +61 -0
- package/icon/index.js +10 -9
- package/index.js +57 -20
- package/layout/index.js +5 -15
- package/lib/accordion-item/accordion-item.d.ts +2 -2
- package/lib/accordion-item/index.d.ts +2 -1
- package/lib/action-group/action-group.d.ts +10 -0
- package/lib/{sidenav-item/sidenav-item.template.d.ts → action-group/action-group.template.d.ts} +2 -2
- package/lib/{sidenav-item → action-group}/index.d.ts +1 -2
- 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 +3 -5
- package/lib/badge/index.d.ts +1 -1
- package/lib/banner/banner.d.ts +1 -1
- package/lib/banner/banner.template.d.ts +0 -2
- package/lib/banner/index.d.ts +1 -0
- package/lib/breadcrumb/breadcrumb.template.d.ts +4 -0
- package/lib/breadcrumb-item/breadcrumb-item.d.ts +1 -1
- package/lib/breadcrumb-item/index.d.ts +1 -0
- package/lib/button/button.d.ts +6 -5
- package/lib/button/index.d.ts +2 -19
- package/lib/calendar/calendar.d.ts +3 -1
- package/lib/calendar/index.d.ts +0 -1
- 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/{text/text.template.d.ts → card/card.template.d.ts} +2 -2
- 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 +29 -10
- 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 +1 -0
- package/lib/elevation/index.d.ts +1 -1
- package/lib/enums.d.ts +11 -6
- 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/index.d.ts +1 -1
- 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 +4 -3
- package/lib/layout/index.d.ts +1 -1
- package/lib/layout/layout.d.ts +3 -3
- package/lib/listbox-option/index.d.ts +4 -0
- package/lib/listbox-option/listbox-option.d.ts +7 -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/{sidenav-item/sidenav-item.d.ts → nav-item/nav-item.d.ts} +2 -2
- package/lib/nav-item/nav-item.template.d.ts +4 -0
- package/lib/{text → note}/index.d.ts +1 -1
- 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 +1 -1
- package/lib/popup/popup.d.ts +2 -1
- package/lib/progress/progress.d.ts +1 -1
- package/lib/progress-ring/progress-ring.d.ts +2 -1
- 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 +1 -1
- package/lib/side-drawer/side-drawer.d.ts +3 -2
- package/lib/text-anchor/text-anchor.d.ts +1 -1
- 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/tooltip.d.ts +2 -2
- package/listbox-option/index.js +248 -0
- package/menu/index.js +376 -0
- package/menu-item/index.js +20 -0
- package/nav/index.js +17 -0
- package/nav-disclosure/index.js +81 -0
- package/nav-item/index.js +45 -0
- package/note/index.js +58 -0
- package/number-field/index.js +516 -0
- package/package.json +58 -10
- package/popup/index.js +22 -2061
- package/progress/index.js +35 -36
- package/progress-ring/index.js +11 -11
- package/radio/index.js +50 -0
- package/radio-group/index.js +435 -0
- package/shared/affix.js +1 -6
- package/shared/anchor.js +10 -2
- package/shared/apply-mixins.js +5 -4
- package/shared/aria-global.js +2 -86
- package/shared/aria.js +9 -0
- package/shared/base-progress.js +5 -0
- package/shared/breadcrumb-item.js +1 -1
- package/shared/button.js +200 -0
- package/shared/calendar-event.js +19 -0
- package/shared/dialog-polyfill.esm.js +858 -0
- package/shared/direction.js +20 -0
- package/shared/enums.js +62 -0
- package/shared/es.object.assign.js +3 -2
- 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 +534 -531
- package/shared/index.js +108 -79
- package/shared/index2.js +100 -14
- package/shared/index3.js +31 -0
- package/shared/index4.js +77 -0
- package/shared/index5.js +1525 -0
- package/shared/index6.js +349 -0
- package/shared/iterators.js +61 -0
- package/shared/key-codes.js +96 -0
- package/shared/object-keys.js +13 -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 +2 -0
- package/shared/radio.js +127 -0
- package/shared/ref.js +41 -0
- package/shared/slotted.js +1 -1
- package/shared/start-end.js +50 -0
- package/shared/text-anchor.js +2 -13
- package/shared/text-anchor.template.js +6 -5
- package/shared/to-string.js +51 -0
- package/shared/web.dom-collections.iterator.js +74 -1081
- package/side-drawer/index.js +41 -33
- 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 +9 -12
- package/styles/tokens/theme-dark.css +230 -0
- package/styles/tokens/theme-light.css +230 -0
- package/text-anchor/index.js +9 -1
- package/text-area/index.js +288 -0
- package/text-field/index.js +129 -0
- package/tooltip/index.js +23 -24
- package/lib/text/text.d.ts +0 -10
- package/shared/style-inject.es.js +0 -28
- package/sidenav-item/index.js +0 -38
- package/styles/themes/dark.css +0 -205
- package/styles/themes/light.css +0 -205
- package/text/index.js +0 -45
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import '../icon/index.js';
|
|
2
|
+
import '../focus/index.js';
|
|
3
|
+
import { F as FoundationElement, c as __classPrivateFieldGet, _ as __decorate, a as attr, b as __metadata, h as html, d as designSystem } from '../shared/index.js';
|
|
4
|
+
import '../shared/web.dom-collections.iterator.js';
|
|
5
|
+
import { b as AffixIcon, a as affixIconTemplateFactory } from '../shared/affix.js';
|
|
6
|
+
import { a as applyMixins } from '../shared/apply-mixins.js';
|
|
7
|
+
import { f as focusTemplateFactory } from '../shared/focus2.js';
|
|
8
|
+
import { w as when } from '../shared/when.js';
|
|
9
|
+
import { r as ref } from '../shared/ref.js';
|
|
10
|
+
import '../shared/icon.js';
|
|
11
|
+
import '../shared/export.js';
|
|
12
|
+
import '../shared/iterators.js';
|
|
13
|
+
import '../shared/to-string.js';
|
|
14
|
+
import '../shared/_has.js';
|
|
15
|
+
import '../shared/class-names.js';
|
|
16
|
+
import '../shared/focus.js';
|
|
17
|
+
import '../shared/object-keys.js';
|
|
18
|
+
|
|
19
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Thu, 03 Nov 2022 17:26:06 GMT\n */\n.control {\n position: relative;\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 cursor: pointer;\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-inline: 8px;\n text-decoration: none;\n vertical-align: middle;\n word-break: break-word;\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)) {\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(: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.control: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.control {\n --_connotation-color-primary: var(--vvd-color-canvas-text);\n --_connotation-color-primary-text: var(--vvd-color-canvas);\n --_connotation-color-faint: var(--vvd-color-neutral-50);\n --_connotation-color-soft: var(--vvd-color-neutral-100);\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 .toggleIcon {\n margin-inline-start: auto;\n}\n\n.control:not(:focus-visible) .focus-indicator {\n display: none;\n}\n\n.icon {\n font-size: 20px;\n}\n\n.content {\n border-inline-start: 1px solid var(--vvd-color-neutral-200);\n margin-inline-start: 20px;\n padding-inline-start: 12px;\n}\n\ndetails > summary {\n list-style: none;\n}\n\ndetails > summary::-webkit-details-marker {\n display: none;\n}";
|
|
20
|
+
|
|
21
|
+
var _NavDisclosure_onToggle;
|
|
22
|
+
class NavDisclosure extends FoundationElement {
|
|
23
|
+
constructor() {
|
|
24
|
+
super(...arguments);
|
|
25
|
+
this.open = false;
|
|
26
|
+
_NavDisclosure_onToggle.set(this, () => {
|
|
27
|
+
this.open = this.details.open;
|
|
28
|
+
this.$emit('toggle');
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
connectedCallback() {
|
|
32
|
+
super.connectedCallback();
|
|
33
|
+
this.details.addEventListener('toggle', __classPrivateFieldGet(this, _NavDisclosure_onToggle, "f"));
|
|
34
|
+
this.details.open = this.open;
|
|
35
|
+
}
|
|
36
|
+
disconnectedCallback() {
|
|
37
|
+
super.disconnectedCallback();
|
|
38
|
+
this.details.removeEventListener('toggle', __classPrivateFieldGet(this, _NavDisclosure_onToggle, "f"));
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
_NavDisclosure_onToggle = new WeakMap();
|
|
42
|
+
__decorate([attr, __metadata("design:type", String)], NavDisclosure.prototype, "label", void 0);
|
|
43
|
+
__decorate([attr({
|
|
44
|
+
mode: 'boolean'
|
|
45
|
+
}), __metadata("design:type", Object)], NavDisclosure.prototype, "open", void 0);
|
|
46
|
+
applyMixins(NavDisclosure, AffixIcon);
|
|
47
|
+
|
|
48
|
+
let _ = t => t,
|
|
49
|
+
_t,
|
|
50
|
+
_t2,
|
|
51
|
+
_t3;
|
|
52
|
+
const NavDisclosureTemplate = context => {
|
|
53
|
+
const affixIconTemplate = affixIconTemplateFactory(context);
|
|
54
|
+
const focusTemplate = focusTemplateFactory(context);
|
|
55
|
+
return html(_t || (_t = _`<details class="base" ${0} ?open=${0}>
|
|
56
|
+
<summary class="control"
|
|
57
|
+
role="button"
|
|
58
|
+
aria-controls="disclosure-content"
|
|
59
|
+
aria-expanded="${0}"
|
|
60
|
+
>
|
|
61
|
+
${0}
|
|
62
|
+
${0}
|
|
63
|
+
${0}
|
|
64
|
+
${0}
|
|
65
|
+
${0}
|
|
66
|
+
</summary>
|
|
67
|
+
<div class="content" id="disclosure-content">
|
|
68
|
+
<slot></slot>
|
|
69
|
+
</div>
|
|
70
|
+
</details>
|
|
71
|
+
`), ref('details'), x => x.open, x => x.open, x => affixIconTemplate(x.icon), x => x.label, when(x => x.open, html(_t2 || (_t2 = _`<vwc-icon class="toggleIcon" type='chevron-up-solid'></vwc-icon>`))), when(x => !x.open, html(_t3 || (_t3 = _`<vwc-icon class="toggleIcon" type='chevron-down-solid'></vwc-icon>`))), () => focusTemplate);
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
const vividNavDisclosure = NavDisclosure.compose({
|
|
75
|
+
baseName: 'nav-disclosure',
|
|
76
|
+
template: NavDisclosureTemplate,
|
|
77
|
+
styles: css_248z
|
|
78
|
+
});
|
|
79
|
+
designSystem.register(vividNavDisclosure());
|
|
80
|
+
|
|
81
|
+
export { vividNavDisclosure };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import '../icon/index.js';
|
|
2
|
+
import '../focus/index.js';
|
|
3
|
+
import { h as html, d as designSystem } from '../shared/index.js';
|
|
4
|
+
import { b as AffixIcon } from '../shared/affix.js';
|
|
5
|
+
import { T as TextAnchor } from '../shared/text-anchor.js';
|
|
6
|
+
import { a as applyMixins } from '../shared/apply-mixins.js';
|
|
7
|
+
import { t as textAnchorTemplate } from '../shared/text-anchor.template.js';
|
|
8
|
+
import '../shared/icon.js';
|
|
9
|
+
import '../shared/export.js';
|
|
10
|
+
import '../shared/iterators.js';
|
|
11
|
+
import '../shared/to-string.js';
|
|
12
|
+
import '../shared/_has.js';
|
|
13
|
+
import '../shared/when.js';
|
|
14
|
+
import '../shared/class-names.js';
|
|
15
|
+
import '../shared/focus.js';
|
|
16
|
+
import '../shared/web.dom-collections.iterator.js';
|
|
17
|
+
import '../shared/object-keys.js';
|
|
18
|
+
import '../shared/anchor.js';
|
|
19
|
+
import '../shared/aria-global.js';
|
|
20
|
+
import '../shared/start-end.js';
|
|
21
|
+
import '../shared/ref.js';
|
|
22
|
+
import '../shared/focus2.js';
|
|
23
|
+
|
|
24
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Thu, 03 Nov 2022 17:26:06 GMT\n */\n.control {\n position: relative;\n display: inline-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-inline: 8px;\n text-decoration: none;\n vertical-align: middle;\n word-break: break-word;\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)) {\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(: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.control: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.control: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.control {\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@supports selector(:focus-visible) {\n .control:focus {\n outline: none;\n }\n}\n.control.icon-only {\n display: flex;\n block-size: calc(1px * (40 + 8 * clamp(-1, var(--vvd-size-density, 0), 1)));\n inline-size: calc(1px * (40 + 8 * clamp(-1, var(--vvd-size-density, 0), 1)));\n place-content: center;\n}\n\n.control:not(:focus-visible) .focus-indicator {\n display: none;\n}\n\n.icon {\n font-size: 20px;\n}";
|
|
25
|
+
|
|
26
|
+
class NavItem extends TextAnchor {}
|
|
27
|
+
applyMixins(NavItem, AffixIcon);
|
|
28
|
+
|
|
29
|
+
let _ = t => t,
|
|
30
|
+
_t;
|
|
31
|
+
const NavItemTemplate = (context, definition) => html(_t || (_t = _`
|
|
32
|
+
${0}
|
|
33
|
+
`), textAnchorTemplate(context));
|
|
34
|
+
|
|
35
|
+
const vividNavItem = NavItem.compose({
|
|
36
|
+
baseName: 'nav-item',
|
|
37
|
+
template: NavItemTemplate,
|
|
38
|
+
styles: css_248z,
|
|
39
|
+
shadowOptions: {
|
|
40
|
+
delegatesFocus: true
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
designSystem.register(vividNavItem());
|
|
44
|
+
|
|
45
|
+
export { vividNavItem };
|
package/note/index.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { F as FoundationElement, _ as __decorate, a as attr, b as __metadata, h as html, d as designSystem } from '../shared/index.js';
|
|
2
|
+
import { b as AffixIcon } from '../shared/affix.js';
|
|
3
|
+
import '../shared/focus.js';
|
|
4
|
+
import '../shared/web.dom-collections.iterator.js';
|
|
5
|
+
import '../shared/icon.js';
|
|
6
|
+
import { a as applyMixins } from '../shared/apply-mixins.js';
|
|
7
|
+
import '../icon/index.js';
|
|
8
|
+
import { C as Connotation } from '../shared/enums.js';
|
|
9
|
+
import { w as when } from '../shared/when.js';
|
|
10
|
+
import { c as classNames } from '../shared/class-names.js';
|
|
11
|
+
import '../shared/export.js';
|
|
12
|
+
import '../shared/object-keys.js';
|
|
13
|
+
import '../shared/iterators.js';
|
|
14
|
+
import '../shared/to-string.js';
|
|
15
|
+
import '../shared/_has.js';
|
|
16
|
+
|
|
17
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Thu, 03 Nov 2022 17:26:06 GMT\n */\n.base {\n display: flex;\n align-items: stretch;\n padding: 20px;\n border-left: 8px solid var(--_connotation-color-primary);\n background-color: var(--vvd-color-canvas);\n border-radius: 6px;\n box-shadow: inset 0 1px 0 0 var(--vvd-color-neutral-300), inset -1px 0 0 0 var(--vvd-color-neutral-300), inset 0 -1px 0 0 var(--vvd-color-neutral-300);\n color: var(--vvd-color-canvas-text);\n}\n.base.connotation-success {\n --_connotation-color-primary: var(--vvd-color-success-500);\n}\n.base.connotation-information {\n --_connotation-color-primary: var(--vvd-color-information-500);\n}\n.base.connotation-alert {\n --_connotation-color-primary: var(--vvd-color-alert-500);\n}\n.base.connotation-warning {\n --_connotation-color-primary: var(--vvd-color-warning-500);\n}\n.base:not(.connotation-success, .connotation-information, .connotation-alert, .connotation-warning) {\n --_connotation-color-primary: var(--vvd-color-announcement-500);\n}\n@supports (contain: content) {\n .base {\n contain: content;\n }\n}\n@supports not (contain: content) {\n .base {\n overflow: hidden;\n }\n}\n\n.icon {\n align-self: flex-start;\n font-size: 24px;\n margin-inline-end: 16px;\n}\n\n.text {\n display: flex;\n min-height: 24px;\n flex: 1;\n flex-direction: column;\n justify-content: center;\n gap: 4px;\n text-align: start;\n}\n.text .headline {\n font: var(--vvd-typography-base-bold);\n}\n.text .message {\n font: var(--vvd-typography-base);\n}";
|
|
18
|
+
|
|
19
|
+
class Note extends FoundationElement {}
|
|
20
|
+
__decorate([attr, __metadata("design:type", String)], Note.prototype, "headline", void 0);
|
|
21
|
+
__decorate([attr, __metadata("design:type", String)], Note.prototype, "connotation", void 0);
|
|
22
|
+
applyMixins(Note, AffixIcon);
|
|
23
|
+
|
|
24
|
+
let _ = t => t,
|
|
25
|
+
_t,
|
|
26
|
+
_t2,
|
|
27
|
+
_t3;
|
|
28
|
+
const connotationIconMap = new Map([[Connotation.Information, 'info-solid'], [Connotation.Announcement, 'megaphone-solid'], [Connotation.Success, 'check-circle-solid'], [Connotation.Warning, 'warning-solid'], [Connotation.Alert, 'error-solid']]);
|
|
29
|
+
const getClasses = ({
|
|
30
|
+
connotation
|
|
31
|
+
}) => classNames('base', `connotation-${connotation}`);
|
|
32
|
+
function getHeaderTemplate() {
|
|
33
|
+
return html(_t || (_t = _`<div class="headline">${0}</div>`), x => x.headline);
|
|
34
|
+
}
|
|
35
|
+
function getIconType(note) {
|
|
36
|
+
return note.icon ? note.icon : note.connotation ? connotationIconMap.get(note.connotation) : 'megaphone-solid';
|
|
37
|
+
}
|
|
38
|
+
function getIconTemplate() {
|
|
39
|
+
return html(_t2 || (_t2 = _`<vwc-icon class="icon" type="${0}"></vwc-icon>`), getIconType);
|
|
40
|
+
}
|
|
41
|
+
const NoteTemplate = () => html(_t3 || (_t3 = _`
|
|
42
|
+
<div class="${0}">
|
|
43
|
+
${0}
|
|
44
|
+
<div class="text">
|
|
45
|
+
${0}
|
|
46
|
+
<slot class="message"></slot>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
`), getClasses, getIconTemplate(), when(x => x.headline, getHeaderTemplate()));
|
|
50
|
+
|
|
51
|
+
const vividNote = Note.compose({
|
|
52
|
+
baseName: 'note',
|
|
53
|
+
template: NoteTemplate,
|
|
54
|
+
styles: css_248z
|
|
55
|
+
});
|
|
56
|
+
designSystem.register(vividNote());
|
|
57
|
+
|
|
58
|
+
export { vividNote };
|