@vonage/vivid 3.32.0 → 3.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/index.js +5 -5
- package/accordion-item/index.js +4 -4
- package/action-group/index.js +1 -1
- package/alert/index.js +6 -6
- package/avatar/index.js +2 -2
- package/badge/index.js +2 -2
- package/banner/index.js +5 -5
- package/breadcrumb/index.js +1 -1
- package/breadcrumb-item/index.js +3 -3
- package/button/index.js +4 -4
- package/calendar/index.js +1 -1
- package/calendar-event/index.js +1 -1
- package/card/index.js +3 -3
- package/checkbox/index.js +5 -3
- package/combobox/index.js +8 -8
- package/custom-elements.json +246 -16
- package/data-grid/index.js +2 -2
- package/date-picker/index.js +9 -9
- package/dialog/index.js +6 -6
- package/divider/index.js +1 -1
- package/elevation/index.js +1 -1
- package/empty-state/index.js +2 -2
- package/fab/index.js +4 -4
- package/file-picker/index.js +5 -5
- package/focus/index.js +1 -1
- package/header/index.js +2 -2
- package/icon/index.js +1 -1
- package/index.js +59 -59
- package/layout/index.js +1 -1
- package/lib/calendar/calendar.d.ts +1 -1
- package/lib/date-picker/calendar/dateStr.d.ts +1 -0
- package/lib/date-picker/calendar/month.d.ts +1 -0
- package/lib/date-picker/calendar/year.d.ts +2 -0
- package/lib/date-picker/date-picker.d.ts +2 -0
- package/lib/icon/icon.d.ts +0 -1
- package/lib/listbox/listbox.d.ts +9 -1
- package/lib/text-field/text-field.d.ts +1 -0
- package/listbox/index.js +20 -16
- package/locales/en-GB.js +48 -14
- package/locales/en-US.js +48 -14
- package/locales/ja-JP.js +48 -14
- package/locales/zh-CN.js +48 -14
- package/menu/index.js +8 -8
- package/menu-item/index.js +4 -4
- package/nav/index.js +1 -1
- package/nav-disclosure/index.js +3 -3
- package/nav-item/index.js +3 -3
- package/note/index.js +2 -3
- package/number-field/index.js +6 -6
- package/option/index.js +3 -3
- package/package.json +2 -16
- package/pagination/index.js +5 -5
- package/popup/index.js +6 -6
- package/progress/index.js +1 -1
- package/progress-ring/index.js +1 -1
- package/radio/index.js +2 -2
- package/radio-group/index.js +1 -1
- package/select/index.js +8 -8
- package/shared/affix.js +25 -9
- package/shared/apply-mixins.js +1 -1
- package/shared/breadcrumb-item.js +5 -5
- package/shared/button.js +13 -13
- package/shared/calendar-event.js +36 -16
- package/shared/definition.js +133 -194
- package/shared/definition10.js +225 -40
- package/shared/definition11.js +36 -32
- package/shared/definition12.js +763 -98
- package/shared/definition13.js +125 -89
- package/shared/definition14.js +207 -27
- package/shared/definition15.js +710 -731
- package/shared/definition16.js +1289 -47
- package/shared/definition17.js +6113 -93
- package/shared/definition18.js +242 -164
- package/shared/definition19.js +47 -692
- package/shared/definition2.js +199 -117
- package/shared/definition20.js +59 -1671
- package/shared/definition21.js +95 -255
- package/shared/definition22.js +2218 -1167
- package/shared/definition23.js +61 -5784
- package/shared/definition24.js +28 -117
- package/shared/definition25.js +52 -66
- package/shared/definition26.js +391 -214
- package/shared/definition27.js +441 -34
- package/shared/definition28.js +85 -73
- package/shared/definition29.js +21 -2283
- package/shared/definition3.js +61 -24
- package/shared/definition30.js +13 -49
- package/shared/definition31.js +54 -39
- package/shared/definition32.js +413 -375
- package/shared/definition33.js +223 -304
- package/shared/definition34.js +197 -13
- package/shared/definition35.js +88 -73
- package/shared/definition36.js +75 -25
- package/shared/definition37.js +434 -34
- package/shared/definition38.js +32 -432
- package/shared/definition39.js +677 -187
- package/shared/definition4.js +157 -12
- package/shared/definition40.js +95 -48
- package/shared/definition41.js +577 -31
- package/shared/definition42.js +126 -424
- package/shared/definition43.js +114 -618
- package/shared/definition44.js +24 -80
- package/shared/definition45.js +71 -543
- package/shared/definition46.js +499 -92
- package/shared/definition47.js +19 -133
- package/shared/definition48.js +129 -52
- package/shared/definition49.js +281 -17
- package/shared/definition5.js +71 -36
- package/shared/definition50.js +153 -484
- package/shared/definition51.js +131 -98
- package/shared/definition52.js +131 -16
- package/shared/definition53.js +80 -264
- package/shared/definition54.js +293 -118
- package/shared/definition55.js +12 -117
- package/shared/definition56.js +39 -68
- package/shared/definition57.js +166 -288
- package/shared/definition6.js +56 -111
- package/shared/definition7.js +120 -195
- package/shared/definition8.js +58 -23
- package/shared/definition9.js +92 -66
- package/shared/focus.js +2 -1
- package/shared/focus2.js +1 -1
- package/shared/form-associated.js +2 -2
- package/shared/icon.js +48 -27
- package/shared/index.js +7 -27
- package/shared/index2.js +108 -80
- package/shared/key-codes.js +1 -1
- package/shared/listbox.js +88 -11
- package/shared/patterns/form-elements/form-elements.d.ts +4 -4
- package/shared/radio.js +23 -7
- package/shared/repeat.js +1 -1
- package/shared/text-anchor.js +21 -4
- package/shared/text-anchor.template.js +37 -40
- package/shared/text-field.js +2 -2
- package/shared/text-field2.js +15 -15
- package/shared/tree-item.js +12 -12
- package/side-drawer/index.js +1 -1
- package/slider/index.js +2 -2
- package/split-button/index.js +3 -3
- package/style.css +6097 -0
- package/styles/core/all.css +1 -1
- package/styles/core/theme.css +1 -1
- package/styles/core/typography.css +1 -1
- package/styles/tokens/theme-dark.css +4 -4
- package/styles/tokens/theme-light.css +4 -4
- package/styles/tokens/vivid-2-compat.css +1 -1
- package/switch/index.js +3 -3
- package/tab/index.js +3 -3
- package/tab-panel/index.js +1 -1
- package/tabs/index.js +5 -5
- package/tag/index.js +3 -3
- package/tag-group/index.js +1 -1
- package/text-anchor/index.js +1 -1
- package/text-area/index.js +3 -3
- package/text-field/index.js +3 -3
- package/toggletip/index.js +7 -7
- package/tooltip/index.js +7 -7
- package/tree-item/index.js +3 -3
- package/tree-view/index.js +1 -1
- package/lib/accordion/index.d.ts +0 -1
- package/lib/accordion-item/index.d.ts +0 -1
- package/lib/action-group/index.d.ts +0 -1
- package/lib/alert/index.d.ts +0 -1
- package/lib/avatar/index.d.ts +0 -1
- package/lib/badge/index.d.ts +0 -1
- package/lib/banner/index.d.ts +0 -1
- package/lib/breadcrumb/index.d.ts +0 -1
- package/lib/breadcrumb-item/index.d.ts +0 -1
- package/lib/button/index.d.ts +0 -1
- package/lib/calendar/index.d.ts +0 -1
- package/lib/calendar-event/index.d.ts +0 -1
- package/lib/card/index.d.ts +0 -1
- package/lib/checkbox/index.d.ts +0 -1
- package/lib/combobox/index.d.ts +0 -1
- package/lib/data-grid/index.d.ts +0 -1
- package/lib/date-picker/index.d.ts +0 -1
- package/lib/dialog/index.d.ts +0 -1
- package/lib/divider/index.d.ts +0 -1
- package/lib/elevation/index.d.ts +0 -1
- package/lib/empty-state/index.d.ts +0 -1
- package/lib/fab/index.d.ts +0 -1
- package/lib/file-picker/index.d.ts +0 -1
- package/lib/focus/index.d.ts +0 -1
- package/lib/header/index.d.ts +0 -1
- package/lib/icon/index.d.ts +0 -1
- package/lib/layout/index.d.ts +0 -1
- package/lib/listbox/index.d.ts +0 -1
- package/lib/menu/index.d.ts +0 -1
- package/lib/menu-item/index.d.ts +0 -1
- package/lib/nav/index.d.ts +0 -1
- package/lib/nav-disclosure/index.d.ts +0 -1
- package/lib/nav-item/index.d.ts +0 -1
- package/lib/note/index.d.ts +0 -1
- package/lib/number-field/index.d.ts +0 -1
- package/lib/option/index.d.ts +0 -1
- package/lib/pagination/index.d.ts +0 -1
- package/lib/popup/index.d.ts +0 -1
- package/lib/progress/index.d.ts +0 -1
- package/lib/progress-ring/index.d.ts +0 -1
- package/lib/radio/index.d.ts +0 -1
- package/lib/radio-group/index.d.ts +0 -1
- package/lib/select/index.d.ts +0 -1
- package/lib/side-drawer/index.d.ts +0 -1
- package/lib/slider/index.d.ts +0 -1
- package/lib/split-button/index.d.ts +0 -1
- package/lib/switch/index.d.ts +0 -1
- package/lib/tab/index.d.ts +0 -1
- package/lib/tab-panel/index.d.ts +0 -1
- package/lib/tabs/index.d.ts +0 -1
- package/lib/tag/index.d.ts +0 -1
- package/lib/tag-group/index.d.ts +0 -1
- package/lib/text-anchor/index.d.ts +0 -1
- package/lib/text-area/index.d.ts +0 -1
- package/lib/text-field/index.d.ts +0 -1
- package/lib/toggletip/index.d.ts +0 -1
- package/lib/tooltip/index.d.ts +0 -1
- package/lib/tree-item/index.d.ts +0 -1
- package/lib/tree-view/index.d.ts +0 -1
package/shared/definition3.js
CHANGED
|
@@ -1,31 +1,68 @@
|
|
|
1
|
-
import { h as html, r as registerFactory } from './index.js';
|
|
2
|
-
import { I as Icon } from './icon.js';
|
|
1
|
+
import { a as attr, F as FoundationElement, h as html, r as registerFactory } from './index.js';
|
|
3
2
|
import { c as classNames } from './class-names.js';
|
|
4
|
-
import { w as when } from './when.js';
|
|
5
3
|
|
|
6
|
-
|
|
4
|
+
const styles = "/**\n * Do not edit directly\n * Generated on Mon, 04 Sep 2023 12:44:18 GMT\n */\n:host {\n display: inline-block;\n}\n\n.base {\n position: relative;\n display: flex;\n box-sizing: border-box;\n align-items: center;\n background-color: var(--_appearance-color-fill);\n inline-size: inherit;\n vertical-align: middle;\n}\n.base {\n /* @cssprop [--vvd-action-group-accent-backdrop=var(--vvd-color-canvas)] */\n --_connotation-color-backdrop: var(--vvd-action-group-accent-backdrop, var(--vvd-color-canvas));\n /* @cssprop [--vvd-action-group-accent-primary=var(--vvd-color-canvas-text)] */\n --_connotation-color-primary: var(--vvd-action-group-accent-primary, var(--vvd-color-canvas-text));\n /* @cssprop [--vvd-action-group-accent-intermediate=var(--vvd-color-neutral-500)] */\n --_connotation-color-intermediate: var(--vvd-action-group-accent-intermediate, var(--vvd-color-neutral-500));\n /* @cssprop [--vvd-action-group-accent-faint=var(--vvd-color-neutral-50)] */\n --_connotation-color-faint: var(--vvd-action-group-accent-faint, var(--vvd-color-neutral-50));\n}\n.base {\n --_appearance-color-text: var(--vvd-color-canvas-text);\n --_appearance-color-fill: var(--_connotation-color-backdrop);\n --_appearance-color-outline: var(--_connotation-color-intermediate);\n}\n.base.appearance-ghost {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: transparent;\n}\n.base::before {\n position: absolute;\n z-index: 1;\n border-radius: inherit;\n box-shadow: inset 0 0 0 1px var(--_appearance-color-outline);\n content: \"\";\n inset: 0;\n pointer-events: none;\n}\n.base:not(.tight) {\n padding: 4px;\n column-gap: 4px;\n}\n\n/* Shape */\n.base:not(.shape-pill) {\n border-radius: 6px;\n}\n\n.base.shape-pill {\n border-radius: 24px;\n}\n\n/* Separator */\n::slotted([role=separator]) {\n align-self: stretch;\n margin-block: 4px;\n}";
|
|
7
5
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
6
|
+
var __defProp = Object.defineProperty;
|
|
7
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
8
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
9
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
10
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
11
|
+
if (decorator = decorators[i])
|
|
12
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
13
|
+
if (kind && result)
|
|
14
|
+
__defProp(target, key, result);
|
|
15
|
+
return result;
|
|
16
|
+
};
|
|
17
|
+
class ActionGroup extends FoundationElement {
|
|
18
|
+
constructor() {
|
|
19
|
+
super(...arguments);
|
|
20
|
+
this.tight = false;
|
|
21
|
+
this.role = null;
|
|
22
|
+
this.ariaLabel = null;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
__decorateClass([
|
|
26
|
+
attr
|
|
27
|
+
], ActionGroup.prototype, "shape", 2);
|
|
28
|
+
__decorateClass([
|
|
29
|
+
attr
|
|
30
|
+
], ActionGroup.prototype, "appearance", 2);
|
|
31
|
+
__decorateClass([
|
|
32
|
+
attr({
|
|
33
|
+
mode: "boolean"
|
|
34
|
+
})
|
|
35
|
+
], ActionGroup.prototype, "tight", 2);
|
|
36
|
+
__decorateClass([
|
|
37
|
+
attr()
|
|
38
|
+
], ActionGroup.prototype, "role", 2);
|
|
39
|
+
__decorateClass([
|
|
40
|
+
attr({ attribute: "aria-label" })
|
|
41
|
+
], ActionGroup.prototype, "ariaLabel", 2);
|
|
20
42
|
|
|
21
|
-
|
|
43
|
+
const getClasses = ({
|
|
44
|
+
appearance,
|
|
45
|
+
shape,
|
|
46
|
+
tight
|
|
47
|
+
}) => classNames(
|
|
48
|
+
"base",
|
|
49
|
+
[`appearance-${appearance}`, Boolean(appearance)],
|
|
50
|
+
[`shape-${shape}`, Boolean(shape)],
|
|
51
|
+
["tight", tight]
|
|
52
|
+
);
|
|
53
|
+
const ActionGroupTemplate = () => html`
|
|
54
|
+
<div class="${getClasses}"
|
|
55
|
+
role="${(x) => x.role ? x.role : "group"}"
|
|
56
|
+
aria-label="${(x) => x.ariaLabel}">
|
|
57
|
+
<slot></slot>
|
|
58
|
+
</div>`;
|
|
22
59
|
|
|
23
|
-
const
|
|
24
|
-
baseName:
|
|
25
|
-
template:
|
|
26
|
-
styles
|
|
60
|
+
const actionGroupDefinition = ActionGroup.compose({
|
|
61
|
+
baseName: "action-group",
|
|
62
|
+
template: ActionGroupTemplate,
|
|
63
|
+
styles
|
|
27
64
|
});
|
|
28
|
-
const
|
|
29
|
-
const
|
|
65
|
+
const actionGroupRegistries = [actionGroupDefinition()];
|
|
66
|
+
const registerActionGroup = registerFactory(actionGroupRegistries);
|
|
30
67
|
|
|
31
|
-
export {
|
|
68
|
+
export { actionGroupDefinition as a, actionGroupRegistries as b, registerActionGroup as r };
|
package/shared/definition30.js
CHANGED
|
@@ -1,56 +1,20 @@
|
|
|
1
|
-
import { F as FoundationElement,
|
|
2
|
-
import { E as Elevation, e as elevationRegistries } from './definition8.js';
|
|
3
|
-
import { c as classNames } from './class-names.js';
|
|
1
|
+
import { F as FoundationElement, h as html, r as registerFactory } from './index.js';
|
|
4
2
|
|
|
5
|
-
|
|
3
|
+
const styles = "nav {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}";
|
|
6
4
|
|
|
7
|
-
class
|
|
8
|
-
constructor() {
|
|
9
|
-
super(...arguments);
|
|
10
|
-
this.elevationShadow = false;
|
|
11
|
-
this.alternate = false;
|
|
12
|
-
}
|
|
5
|
+
class Nav extends FoundationElement {
|
|
13
6
|
}
|
|
14
|
-
__decorate([attr({
|
|
15
|
-
attribute: 'elevation-shadow',
|
|
16
|
-
mode: 'boolean'
|
|
17
|
-
}), __metadata("design:type", Object)], Header.prototype, "elevationShadow", void 0);
|
|
18
|
-
__decorate([attr({
|
|
19
|
-
mode: 'boolean'
|
|
20
|
-
}), __metadata("design:type", Object)], Header.prototype, "alternate", void 0);
|
|
21
7
|
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const headerTemplate = context => {
|
|
26
|
-
const elevationTag = context.tagFor(Elevation);
|
|
27
|
-
return html`
|
|
28
|
-
<${elevationTag} dp="4" ?no-shadow=${x => !x.elevationShadow}>
|
|
29
|
-
<header class="base" part="base">
|
|
30
|
-
<!-- a container is needed to distinguish the surface background color of the
|
|
31
|
-
element from its shadow when applying elevation with alternate -->
|
|
32
|
-
<div class="container" part="${getPartAlternate}">
|
|
33
|
-
<section class="header-content">
|
|
34
|
-
<slot></slot>
|
|
35
|
-
</section>
|
|
36
|
-
<section class="header-content">
|
|
37
|
-
<slot name="action-items"></slot>
|
|
38
|
-
</section>
|
|
39
|
-
</div>
|
|
40
|
-
</header>
|
|
41
|
-
</${elevationTag}>
|
|
42
|
-
<div class="app-content">
|
|
43
|
-
<slot name="app-content"></slot>
|
|
44
|
-
</div>
|
|
45
|
-
`;
|
|
46
|
-
};
|
|
8
|
+
const NavTemplate = () => html`
|
|
9
|
+
<nav><slot></slot></nav>
|
|
10
|
+
`;
|
|
47
11
|
|
|
48
|
-
const
|
|
49
|
-
baseName:
|
|
50
|
-
template:
|
|
51
|
-
styles
|
|
12
|
+
const navDefinition = Nav.compose({
|
|
13
|
+
baseName: "nav",
|
|
14
|
+
template: NavTemplate,
|
|
15
|
+
styles
|
|
52
16
|
});
|
|
53
|
-
const
|
|
54
|
-
const
|
|
17
|
+
const navRegistries = [navDefinition()];
|
|
18
|
+
const registerNav = registerFactory(navRegistries);
|
|
55
19
|
|
|
56
|
-
export {
|
|
20
|
+
export { navRegistries as a, navDefinition as n, registerNav as r };
|
package/shared/definition31.js
CHANGED
|
@@ -1,46 +1,61 @@
|
|
|
1
|
-
import { F as FoundationElement,
|
|
1
|
+
import { F as FoundationElement, a as attr, h as html, r as registerFactory } from './index.js';
|
|
2
|
+
import { a as iconRegistries } from './definition24.js';
|
|
3
|
+
import { A as AffixIcon } from './affix.js';
|
|
4
|
+
import './index2.js';
|
|
5
|
+
import { a as applyMixins } from './apply-mixins.js';
|
|
6
|
+
import { I as Icon } from './icon.js';
|
|
7
|
+
import { w as when } from './when.js';
|
|
2
8
|
import { c as classNames } from './class-names.js';
|
|
3
9
|
|
|
4
|
-
var
|
|
5
|
-
(function (AUTO_SIZING) {
|
|
6
|
-
AUTO_SIZING["Fit"] = "fit";
|
|
7
|
-
AUTO_SIZING["Fill"] = "fill";
|
|
8
|
-
})(AUTO_SIZING || (AUTO_SIZING = {}));
|
|
9
|
-
class Layout extends FoundationElement {}
|
|
10
|
-
__decorate([attr, __metadata("design:type", String)], Layout.prototype, "gutters", void 0);
|
|
11
|
-
__decorate([attr({
|
|
12
|
-
attribute: 'column-basis'
|
|
13
|
-
}), __metadata("design:type", String)], Layout.prototype, "columnBasis", void 0);
|
|
14
|
-
__decorate([attr({
|
|
15
|
-
attribute: 'column-spacing'
|
|
16
|
-
}), __metadata("design:type", String)], Layout.prototype, "columnSpacing", void 0);
|
|
17
|
-
__decorate([attr({
|
|
18
|
-
attribute: 'row-spacing'
|
|
19
|
-
}), __metadata("design:type", String)], Layout.prototype, "rowSpacing", void 0);
|
|
20
|
-
__decorate([attr({
|
|
21
|
-
attribute: 'auto-sizing'
|
|
22
|
-
}), __metadata("design:type", String)], Layout.prototype, "autoSizing", void 0);
|
|
10
|
+
const styles = "/**\n * Do not edit directly\n * Generated on Mon, 04 Sep 2023 12:44:18 GMT\n */\n.base {\n display: flex;\n align-items: flex-start;\n padding: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 20));\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 column-gap: 16px;\n}\n.base.connotation-success {\n /* @cssprop [--vvd-note-success-primary=var(--vvd-color-success-500)] */\n --_connotation-color-primary: var(--vvd-note-success-primary, var(--vvd-color-success-500));\n /* @cssprop [--vvd-note-success-intermediate=var(--vvd-color-success-500)] */\n --_connotation-color-intermediate: var(--vvd-note-success-intermediate, var(--vvd-color-success-500));\n /* @cssprop [--vvd-note-success-backdrop=var(--vvd-color-success-50)] */\n --_connotation-color-backdrop: var(--vvd-note-success-backdrop, var(--vvd-color-success-50));\n}\n.base.connotation-information {\n /* @cssprop [--vvd-note-information-primary=var(--vvd-color-information-500)] */\n --_connotation-color-primary: var(--vvd-note-information-primary, var(--vvd-color-information-500));\n /* @cssprop [--vvd-note-information-intermediate=var(--vvd-color-information-500)] */\n --_connotation-color-intermediate: var(--vvd-note-information-intermediate, var(--vvd-color-information-500));\n /* @cssprop [--vvd-note-information-backdrop=var(--vvd-color-information-50)] */\n --_connotation-color-backdrop: var(--vvd-note-information-backdrop, var(--vvd-color-information-50));\n}\n.base.connotation-alert {\n /* @cssprop [--vvd-note-alert-primary=var(--vvd-color-alert-500)] */\n --_connotation-color-primary: var(--vvd-note-alert-primary, var(--vvd-color-alert-500));\n /* @cssprop [--vvd-note-alert-intermediate=var(--vvd-color-alert-500)] */\n --_connotation-color-intermediate: var(--vvd-note-alert-intermediate, var(--vvd-color-alert-500));\n /* @cssprop [--vvd-note-alert-backdrop=var(--vvd-color-alert-50)] */\n --_connotation-color-backdrop: var(--vvd-note-alert-backdrop, var(--vvd-color-alert-50));\n}\n.base.connotation-warning {\n /* @cssprop [--vvd-note-warning-primary=var(--vvd-color-warning-300)] */\n --_connotation-color-primary: var(--vvd-note-warning-primary, var(--vvd-color-warning-300));\n /* @cssprop [--vvd-note-warning-intermediate=var(--vvd-color-warning-300)] */\n --_connotation-color-intermediate: var(--vvd-note-warning-intermediate, var(--vvd-color-warning-300));\n /* @cssprop [--vvd-note-warning-backdrop=var(--vvd-color-warning-50)] */\n --_connotation-color-backdrop: var(--vvd-note-warning-backdrop, var(--vvd-color-warning-50));\n}\n.base:not(.connotation-success, .connotation-information, .connotation-alert, .connotation-warning) {\n /* @cssprop [--vvd-note-accent-primary=var(--vvd-color-canvas-text)] */\n --_connotation-color-primary: var(--vvd-note-accent-primary, var(--vvd-color-canvas-text));\n /* @cssprop [--vvd-note-accent-intermediate=var(--vvd-color-neutral-500)] */\n --_connotation-color-intermediate: var(--vvd-note-accent-intermediate, var(--vvd-color-neutral-500));\n /* @cssprop [--vvd-note-accent-backdrop=var(--vvd-color-canvas)] */\n --_connotation-color-backdrop: var(--vvd-note-accent-backdrop, var(--vvd-color-canvas));\n}\n.base {\n --_appearance-color-text: var(--vvd-color-canvas-text);\n --_appearance-color-fill: var(--_connotation-color-backdrop);\n --_appearance-color-outline: var(--_connotation-color-intermediate);\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 color: var(--_appearance-color-outline);\n font-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16));\n}\n\n.text {\n display: flex;\n min-height: 24px;\n flex-direction: column;\n flex-grow: 1;\n align-items: flex-start;\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}";
|
|
23
11
|
|
|
24
|
-
var
|
|
12
|
+
var __defProp = Object.defineProperty;
|
|
13
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
14
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
15
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
16
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
17
|
+
if (decorator = decorators[i])
|
|
18
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
19
|
+
if (kind && result)
|
|
20
|
+
__defProp(target, key, result);
|
|
21
|
+
return result;
|
|
22
|
+
};
|
|
23
|
+
class Note extends FoundationElement {
|
|
24
|
+
}
|
|
25
|
+
__decorateClass([
|
|
26
|
+
attr
|
|
27
|
+
], Note.prototype, "headline", 2);
|
|
28
|
+
__decorateClass([
|
|
29
|
+
attr
|
|
30
|
+
], Note.prototype, "connotation", 2);
|
|
31
|
+
applyMixins(Note, AffixIcon);
|
|
25
32
|
|
|
26
|
-
const getClasses = ({
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
const getClasses = ({ connotation }) => classNames(
|
|
34
|
+
"base",
|
|
35
|
+
`connotation-${connotation}`
|
|
36
|
+
);
|
|
37
|
+
function getHeaderTemplate() {
|
|
38
|
+
return html`<div class="headline">${(x) => x.headline}</div>`;
|
|
39
|
+
}
|
|
40
|
+
const NoteTemplate = (context) => {
|
|
41
|
+
const iconTag = context.tagFor(Icon);
|
|
42
|
+
return html`
|
|
43
|
+
<div class="${getClasses}">
|
|
44
|
+
${when((x) => x.icon, html`<${iconTag} class="icon" name="${(x) => x.icon}"></${iconTag}>`)}
|
|
45
|
+
<div class="text">
|
|
46
|
+
${when((x) => x.headline, getHeaderTemplate())}
|
|
47
|
+
<slot class="message"></slot>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
`;
|
|
51
|
+
};
|
|
37
52
|
|
|
38
|
-
const
|
|
39
|
-
baseName:
|
|
40
|
-
template:
|
|
41
|
-
styles
|
|
53
|
+
const noteDefinition = Note.compose({
|
|
54
|
+
baseName: "note",
|
|
55
|
+
template: NoteTemplate,
|
|
56
|
+
styles
|
|
42
57
|
});
|
|
43
|
-
const
|
|
44
|
-
const
|
|
58
|
+
const noteRegistries = [noteDefinition(), ...iconRegistries];
|
|
59
|
+
const registerNote = registerFactory(noteRegistries);
|
|
45
60
|
|
|
46
|
-
export {
|
|
61
|
+
export { noteRegistries as a, noteDefinition as n, registerNote as r };
|