@vonage/vivid 3.0.0-next.121 → 3.0.0-next.123
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/header/index.js +4 -56
- package/index.js +21 -20
- package/layout/index.js +1 -1
- package/lib/components.d.ts +1 -0
- package/listbox/index.js +2 -2
- package/menu/index.js +3 -3
- package/menu-item/index.js +1 -1
- package/nav/index.js +1 -1
- package/nav-disclosure/index.js +1 -1
- package/nav-item/index.js +1 -1
- package/note/index.js +1 -1
- package/number-field/index.js +1 -1
- package/option/index.js +1 -1
- package/package.json +1 -43
- package/popup/index.js +1 -1
- package/progress/index.js +1 -1
- package/progress-ring/index.js +1 -1
- package/radio/index.js +1 -1
- package/radio-group/index.js +1 -1
- package/shared/definition.js +1 -1
- package/shared/definition11.js +1 -1
- package/shared/definition12.js +1 -1
- package/shared/definition13.js +1 -1
- package/shared/definition14.js +1 -1
- package/shared/definition16.js +1 -1
- package/shared/definition17.js +1 -1
- package/shared/definition18.js +1 -1
- package/shared/definition19.js +1 -1
- package/shared/definition2.js +1 -1
- package/shared/definition20.js +46 -32
- package/shared/definition21.js +35 -1069
- package/shared/definition22.js +978 -161
- package/shared/definition23.js +211 -298
- package/shared/definition24.js +310 -1491
- package/shared/definition25.js +1492 -314
- package/shared/definition26.js +346 -13
- package/shared/definition27.js +12 -69
- package/shared/definition28.js +65 -21
- package/shared/definition29.js +20 -45
- package/shared/definition30.js +40 -78
- package/shared/definition31.js +76 -59
- package/shared/definition32.js +67 -35
- package/shared/definition33.js +31 -421
- package/shared/definition34.js +418 -69
- package/shared/definition35.js +66 -572
- package/shared/definition36.js +526 -81
- package/shared/definition37.js +85 -217
- package/shared/definition38.js +245 -85
- package/shared/definition39.js +109 -67
- package/shared/definition4.js +1 -1
- package/shared/definition40.js +77 -0
- package/shared/definition5.js +1 -1
- package/shared/definition6.js +1 -1
- package/shared/definition7.js +1 -1
- package/shared/definition8.js +1 -1
- package/shared/definition9.js +1 -1
- package/shared/form-elements.js +1 -1
- package/shared/patterns/form-elements/form-elements.d.ts +2 -2
- package/side-drawer/index.js +1 -1
- package/slider/index.js +1 -1
- 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/switch/index.js +1 -1
- package/text-area/index.js +1 -1
- package/text-field/index.js +1 -1
- package/tooltip/index.js +2 -2
- package/vivid.api.json +105 -0
package/shared/definition20.js
CHANGED
|
@@ -1,44 +1,58 @@
|
|
|
1
1
|
import { F as FoundationElement, _ as __decorate, a as attr, b as __metadata, h as html, r as registerFactory } from './index.js';
|
|
2
|
+
import { E as Elevation, e as elevationRegistries } from './definition15.js';
|
|
2
3
|
import { c as classNames } from './class-names.js';
|
|
3
4
|
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}), __metadata("design:type", String)], Layout.prototype, "columnBasis", void 0);
|
|
5
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Wed, 21 Dec 2022 15:16:28 GMT\n */\n.base {\n z-index: 1;\n block-size: calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2))) + calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16)));\n font: var(--vvd-typography-heading-4);\n inline-size: 100%;\n}\n.base .header-content {\n display: inline-flex;\n align-items: center;\n column-gap: 4px;\n}\n\n.container {\n display: flex;\n box-sizing: border-box;\n justify-content: space-between;\n block-size: inherit;\n color: var(--vvd-color-canvas-text);\n column-gap: 12px;\n padding-block: 8px;\n padding-inline: 16px;\n}\n.container[part~=vvd-theme-alternate] {\n background-color: var(--vvd-color-canvas);\n color: var(--vvd-color-canvas-text);\n color-scheme: var(--vvd-color-scheme);\n}\n\n.app-content {\n --vvd-header-block-size: calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2))) + calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16)));\n}";
|
|
6
|
+
|
|
7
|
+
class Header extends FoundationElement {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
this.elevationShadow = false;
|
|
11
|
+
this.alternate = false;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
14
|
__decorate([attr({
|
|
15
|
-
attribute: '
|
|
16
|
-
|
|
15
|
+
attribute: 'elevation-shadow',
|
|
16
|
+
mode: 'boolean'
|
|
17
|
+
}), __metadata("design:type", Object)], Header.prototype, "elevationShadow", void 0);
|
|
17
18
|
__decorate([attr({
|
|
18
|
-
|
|
19
|
-
}), __metadata("design:type",
|
|
20
|
-
|
|
21
|
-
var css_248z = "/* #region SIZEs */\n/* #region BASES */\n/* #region SPACES */\n.control {\n display: grid;\n grid-auto-rows: min-content;\n}\n.control.column-basis-small {\n grid-template-columns: var(--layout-grid-template-columns, repeat(var(--_auto-sizing), minmax(160px, 1fr)));\n}\n.control:not(.column-basis-small):not(.column-basis-medium):not(.column-basis-large):not(.column-basis-block), .control.column-basis-medium {\n grid-template-columns: var(--layout-grid-template-columns, repeat(var(--_auto-sizing), minmax(320px, 1fr)));\n}\n.control.column-basis-large {\n grid-template-columns: var(--layout-grid-template-columns, repeat(var(--_auto-sizing), minmax(380px, 1fr)));\n}\n.control.column-basis-block {\n grid-template-columns: var(--layout-grid-template-columns, repeat(var(--_auto-sizing), minmax(1fr, 1fr)));\n}\n.control.column-spacing-small {\n gap: 16px;\n}\n.control.column-spacing-small-inline {\n gap: 0 16px;\n}\n.control.column-spacing-small-block {\n gap: 16px 0;\n}\n.control:not(.column-spacing-small):not(.column-spacing-small-inline):not(.column-spacing-small-block):not(.column-spacing-medium):not(.column-spacing-medium-inline):not(.column-spacing-medium-block):not(.column-spacing-large):not(.column-spacing-large-inline):not(.column-spacing-large-block), .control.column-spacing-medium {\n gap: 24px;\n}\n.control.column-spacing-medium-inline {\n gap: 0 24px;\n}\n.control.column-spacing-medium-block {\n gap: 24px 0;\n}\n.control.column-spacing-large {\n gap: 32px;\n}\n.control.column-spacing-large-inline {\n gap: 0 32px;\n}\n.control.column-spacing-large-block {\n gap: 32px 0;\n}\n.control.gutters-small {\n margin: 16px;\n}\n.control.gutters-small-inline {\n margin: 0 16px;\n}\n.control.gutters-small-block {\n margin: 16px 0;\n}\n.control.gutters-medium {\n margin: 24px;\n}\n.control.gutters-medium-inline {\n margin: 0 24px;\n}\n.control.gutters-medium-block {\n margin: 24px 0;\n}\n.control.gutters-large {\n margin: 32px;\n}\n.control.gutters-large-inline {\n margin: 0 32px;\n}\n.control.gutters-large-block {\n margin: 32px 0;\n}\n.control.auto-sizing-fill {\n --_auto-sizing: auto-fill;\n}\n.control:not(.auto-sizing-fill):not(.auto-sizing-fit), .control.auto-sizing-fit {\n --_auto-sizing: auto-fit;\n}";
|
|
19
|
+
mode: 'boolean'
|
|
20
|
+
}), __metadata("design:type", Object)], Header.prototype, "alternate", void 0);
|
|
22
21
|
|
|
23
22
|
let _ = t => t,
|
|
24
23
|
_t;
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
24
|
+
const getPartAlternate = ({
|
|
25
|
+
alternate
|
|
26
|
+
}) => classNames(['vvd-theme-alternate', Boolean(alternate)]);
|
|
27
|
+
const headerTemplate = context => {
|
|
28
|
+
const elevationTag = context.tagFor(Elevation);
|
|
29
|
+
return html(_t || (_t = _`
|
|
30
|
+
<${0} dp="4" ?no-shadow=${0}>
|
|
31
|
+
<header class="base" part="base">
|
|
32
|
+
<!-- a container is needed to distinguish the surface background color of the
|
|
33
|
+
element from its shadow when applying elevation with alternate -->
|
|
34
|
+
<div class="container" part="${0}">
|
|
35
|
+
<section class="header-content">
|
|
36
|
+
<slot></slot>
|
|
37
|
+
</section>
|
|
38
|
+
<section class="header-content">
|
|
39
|
+
<slot name="action-items"></slot>
|
|
40
|
+
</section>
|
|
41
|
+
</div>
|
|
42
|
+
</header>
|
|
43
|
+
</${0}>
|
|
44
|
+
<div class="app-content">
|
|
45
|
+
<slot name="app-content"></slot>
|
|
46
|
+
</div>
|
|
47
|
+
`), elevationTag, x => !x.elevationShadow, getPartAlternate, elevationTag);
|
|
48
|
+
};
|
|
35
49
|
|
|
36
|
-
const
|
|
37
|
-
baseName: '
|
|
38
|
-
template:
|
|
50
|
+
const headerDefinition = Header.compose({
|
|
51
|
+
baseName: 'header',
|
|
52
|
+
template: headerTemplate,
|
|
39
53
|
styles: css_248z
|
|
40
54
|
});
|
|
41
|
-
const
|
|
42
|
-
const
|
|
55
|
+
const headerRegistries = [headerDefinition(), ...elevationRegistries];
|
|
56
|
+
const registerHeader = registerFactory(headerRegistries);
|
|
43
57
|
|
|
44
|
-
export {
|
|
58
|
+
export { headerRegistries as a, headerDefinition as h, registerHeader as r };
|