@vonage/vivid 3.0.0-next.3 → 3.0.0-next.6
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 +61 -0
- package/accordion-item/index.js +125 -0
- package/badge/index.js +19 -10
- package/banner/index.js +212 -0
- package/breadcrumb/index.js +24 -136
- package/breadcrumb-item/index.js +13 -7
- package/button/index.js +24 -15
- package/calendar/index.js +1521 -0
- package/elevation/index.js +5 -12
- package/focus/index.js +2 -2
- package/icon/index.js +33 -4
- package/index.d.ts +1 -0
- package/index.js +17 -4
- package/layout/index.js +1 -1
- 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 +3 -0
- package/lib/badge/badge.d.ts +3 -3
- package/lib/banner/banner.d.ts +20 -0
- package/lib/banner/banner.template.d.ts +6 -0
- package/lib/banner/index.d.ts +2 -0
- package/lib/breadcrumb-item/breadcrumb-item.template.d.ts +0 -1
- package/lib/breadcrumb-item/index.d.ts +1 -0
- package/lib/button/button.d.ts +3 -3
- package/lib/calendar/calendar.d.ts +11 -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 +3 -0
- package/lib/components.d.ts +7 -0
- package/lib/elevation/elevation.d.ts +1 -1
- package/lib/enums.d.ts +3 -2
- package/lib/icon/icon.d.ts +1 -3
- package/lib/popup/index.d.ts +4 -0
- package/lib/popup/popup.d.ts +29 -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 +6 -0
- package/lib/progress-ring/progress-ring.template.d.ts +4 -0
- package/lib/side-drawer/index.d.ts +2 -0
- package/lib/side-drawer/side-drawer.d.ts +12 -0
- package/lib/side-drawer/side-drawer.template.d.ts +4 -0
- package/lib/sidenav-item/sidenav-item.d.ts +4 -5
- package/lib/text/index.d.ts +2 -0
- package/lib/text/text.d.ts +10 -0
- package/lib/text/text.template.d.ts +4 -0
- package/lib/text-anchor/text-anchor.d.ts +3 -0
- package/lib/tooltip/index.d.ts +3 -0
- package/lib/tooltip/tooltip.d.ts +10 -0
- package/lib/tooltip/tooltip.template.d.ts +4 -0
- package/package.json +10 -5
- package/popup/index.js +2087 -0
- package/progress/index.js +98 -0
- package/progress-ring/index.js +76 -0
- package/shared/_has.js +58 -0
- package/shared/affix.js +10 -25
- package/shared/anchor.js +2 -2
- package/shared/aria-global.js +20 -20
- package/shared/base-progress.js +65 -0
- package/shared/breadcrumb-item.js +2 -2
- package/shared/es.object.assign.js +68 -0
- package/shared/icon.js +1393 -0
- package/shared/index.js +4918 -1427
- package/shared/index2.js +15 -4905
- package/shared/patterns/affix.d.ts +3 -4
- package/shared/slotted.js +119 -0
- package/shared/text-anchor.js +21 -0
- package/shared/text-anchor.template.js +13 -6
- package/shared/web.dom-collections.iterator.js +639 -639
- package/shared/when.js +15 -0
- package/side-drawer/index.js +103 -0
- package/sidenav-item/index.js +15 -56
- package/styles/themes/dark.css +4 -4
- package/styles/themes/light.css +4 -4
- package/text/index.js +45 -0
- package/text-anchor/index.js +7 -13
- package/tooltip/index.js +73 -0
- package/shared/index3.js +0 -21
package/shared/when.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A directive that enables basic conditional rendering in a template.
|
|
3
|
+
* @param binding - The condition to test for rendering.
|
|
4
|
+
* @param templateOrTemplateBinding - The template or a binding that gets
|
|
5
|
+
* the template to render when the condition is true.
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
function when(binding, templateOrTemplateBinding) {
|
|
9
|
+
const getTemplate = typeof templateOrTemplateBinding === "function"
|
|
10
|
+
? templateOrTemplateBinding
|
|
11
|
+
: () => templateOrTemplateBinding;
|
|
12
|
+
return (source, context) => binding(source, context) ? getTemplate(source, context) : null;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export { when as w };
|
|
@@ -0,0 +1,103 @@
|
|
|
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 '../shared/web.dom-collections.iterator.js';
|
|
3
|
+
import { s as styleInject } from '../shared/style-inject.es.js';
|
|
4
|
+
import { s as slotted } from '../shared/slotted.js';
|
|
5
|
+
import { c as classNames } from '../shared/class-names.js';
|
|
6
|
+
|
|
7
|
+
class SideDrawer extends FoundationElement {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
this.alternate = false;
|
|
11
|
+
this.modal = false;
|
|
12
|
+
this.open = false;
|
|
13
|
+
|
|
14
|
+
this.handleScrimClick = () => {
|
|
15
|
+
if (this.modal && this.open) {
|
|
16
|
+
this.hide();
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
show() {
|
|
22
|
+
this.open = true;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
hide() {
|
|
26
|
+
this.open = false;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
handleKeydown({
|
|
30
|
+
key
|
|
31
|
+
}) {
|
|
32
|
+
if (this.open && key === 'Escape') {
|
|
33
|
+
this.hide();
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
__decorate([attr({
|
|
40
|
+
mode: 'boolean'
|
|
41
|
+
}), __metadata("design:type", Object)], SideDrawer.prototype, "alternate", void 0);
|
|
42
|
+
|
|
43
|
+
__decorate([attr({
|
|
44
|
+
mode: 'boolean'
|
|
45
|
+
}), __metadata("design:type", Object)], SideDrawer.prototype, "modal", void 0);
|
|
46
|
+
|
|
47
|
+
__decorate([attr({
|
|
48
|
+
mode: 'boolean'
|
|
49
|
+
}), __metadata("design:type", Object)], SideDrawer.prototype, "open", void 0);
|
|
50
|
+
|
|
51
|
+
__decorate([attr, __metadata("design:type", String)], SideDrawer.prototype, "position", void 0);
|
|
52
|
+
|
|
53
|
+
var css_248z = "/*\n Do not edit directly\n Generated on Sun, 23 Jan 2022 11:15:05 GMT\n*/\n:host {\n display: flex;\n block-size: 100vh;\n}\n\n:host([position=end]) {\n flex-direction: row-reverse;\n}\n\n.control {\n position: fixed;\n z-index: var(--side-drawer-z-index, 6);\n top: auto;\n bottom: 0;\n display: flex;\n overflow: auto;\n flex-direction: column;\n flex-shrink: 0;\n background-color: var(--side-drawer-background-color, var(--vvd-color-canvas));\n block-size: inherit;\n color: var(--side-drawer-color, var(--vvd-color-on-canvas));\n inline-size: var(--side-drawer-inline-size, 280px);\n}\n.control.alternate {\n background-color: var(--vvd-color-canvas);\n}\n.control:not(.open).end {\n transform: translateX(100%);\n}\n.control:not(.open):not(.end) {\n transform: translateX(-100%);\n}\n.control.control.open:not(.modal) + .side-drawer-app-content {\n font: 400 ultra-condensed 16px / 24px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n margin-inline-start: var(--side-drawer-inline-size, 280px);\n}\n.control.control.open:not(.modal) + .side-drawer-app-content ::slotted(vwc-top-app-bar),\n.control.control.open:not(.modal) + .side-drawer-app-content ::slotted(vwc-top-app-bar-fixed) {\n --mdc-top-app-bar-width: calc(100% - var(--side-drawer-inline-size, 280px));\n}\n.control.control.open:not(.modal).end + .side-drawer-app-content {\n margin-inline-end: var(--side-drawer-inline-size, 280px);\n margin-inline-start: 0;\n}\n@media (prefers-reduced-motion: no-preference) {\n .control {\n transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n }\n}\n\n.side-drawer-top-bar {\n font: 500 condensed 26px / 36px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n display: flex;\n flex-shrink: 0;\n align-items: center;\n padding-inline-end: var(--side-drawer-padding-top-bar, 16px);\n padding-inline-start: var(--side-drawer-padding-top-bar, 16px);\n}\n\n.side-drawer-content {\n background-color: inherit;\n overflow-y: auto;\n padding-inline-end: var(--side-drawer-padding-body, 16px);\n padding-inline-start: var(--side-drawer-padding-body, 16px);\n}\n\n.modal:not(.end) {\n inset-inline-start: 0;\n}\n.modal.end {\n inset-inline-end: 0;\n}\n\n.scrim {\n background-color: var(--vvd-color-on-canvas);\n opacity: 0.5;\n position: fixed;\n z-index: calc(6 - 1);\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n}";
|
|
54
|
+
styleInject(css_248z);
|
|
55
|
+
|
|
56
|
+
let _ = t => t,
|
|
57
|
+
_t,
|
|
58
|
+
_t2,
|
|
59
|
+
_t3;
|
|
60
|
+
|
|
61
|
+
const getClasses = ({
|
|
62
|
+
alternate,
|
|
63
|
+
modal,
|
|
64
|
+
open,
|
|
65
|
+
position
|
|
66
|
+
}) => classNames('control', ['alternate', alternate], ['modal', modal], ['open', open], ['end', position === 'end']);
|
|
67
|
+
|
|
68
|
+
const sideDrawerTemplate = (context, definition) => html(_t || (_t = _`
|
|
69
|
+
<aside class="${0}" part="${0}"
|
|
70
|
+
@keydown="${0}">
|
|
71
|
+
|
|
72
|
+
${0}
|
|
73
|
+
|
|
74
|
+
<div class="side-drawer-content">
|
|
75
|
+
<slot></slot>
|
|
76
|
+
</div>
|
|
77
|
+
</aside>
|
|
78
|
+
|
|
79
|
+
<div class="side-drawer-app-content">
|
|
80
|
+
<slot name="app-content"></slot>
|
|
81
|
+
</div>
|
|
82
|
+
|
|
83
|
+
${0}
|
|
84
|
+
`), getClasses, x => x.alternate ? 'vvd-theme-alternate' : '', (x, c) => x.handleKeydown(c.event), renderTopBar(), x => x.modal && x.open ? renderScrim() : '');
|
|
85
|
+
|
|
86
|
+
const renderTopBar = () => html(_t2 || (_t2 = _`
|
|
87
|
+
<header class="side-drawer-top-bar" part="side-drawer-top-bar">
|
|
88
|
+
<slot name="top-bar" ${0}></slot>
|
|
89
|
+
</header>`), slotted('hasTopBar'));
|
|
90
|
+
|
|
91
|
+
const renderScrim = () => {
|
|
92
|
+
return html(_t3 || (_t3 = _`
|
|
93
|
+
<div class="scrim" @click="${0}" @keydown="${0}"></div>`), x => x.handleScrimClick(), x => x.handleScrimClick());
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
const VIVIDSideDrawer = SideDrawer.compose({
|
|
97
|
+
baseName: 'side-drawer',
|
|
98
|
+
template: sideDrawerTemplate,
|
|
99
|
+
styles: css_248z
|
|
100
|
+
});
|
|
101
|
+
designSystem.register(VIVIDSideDrawer());
|
|
102
|
+
|
|
103
|
+
export { VIVIDSideDrawer };
|
package/sidenav-item/index.js
CHANGED
|
@@ -1,70 +1,29 @@
|
|
|
1
|
-
import '../
|
|
2
|
-
import {
|
|
1
|
+
import '../icon/index.js';
|
|
2
|
+
import { h as html, d as designSystem } from '../shared/index.js';
|
|
3
3
|
import { s as styleInject } from '../shared/style-inject.es.js';
|
|
4
|
-
import '../shared/
|
|
5
|
-
import {
|
|
6
|
-
import { A as Anchor } from '../shared/anchor.js';
|
|
4
|
+
import { b as AffixIcon } from '../shared/affix.js';
|
|
5
|
+
import { T as TextAnchor } from '../shared/text-anchor.js';
|
|
7
6
|
import { a as applyMixins } from '../shared/apply-mixins.js';
|
|
8
|
-
import {
|
|
7
|
+
import { t as textAnchorTemplate } from '../shared/text-anchor.template.js';
|
|
8
|
+
import '../shared/icon.js';
|
|
9
|
+
import '../shared/web.dom-collections.iterator.js';
|
|
10
|
+
import '../shared/_has.js';
|
|
11
|
+
import '../shared/when.js';
|
|
12
|
+
import '../shared/class-names.js';
|
|
13
|
+
import '../shared/anchor.js';
|
|
9
14
|
import '../shared/aria-global.js';
|
|
10
15
|
|
|
11
16
|
var css_248z = "/*\n Do not edit directly\n Generated on Sun, 23 Jan 2022 11:15:05 GMT\n*/\n.control {\n font: 400 ultra-condensed 14px / 20px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n position: relative;\n display: inline-flex;\n box-sizing: border-box;\n align-items: center;\n background-color: transparent;\n border-radius: 6px;\n color: var(--vvd-color-on-canvas);\n gap: 8px;\n -webkit-hyphens: auto;\n hyphens: auto;\n inline-size: 100%;\n min-block-size: 40px;\n outline: 0 none;\n padding-block: 10px;\n padding-inline: 8px;\n text-decoration: none;\n vertical-align: middle;\n word-break: break-word;\n}\n:host, .control {\n outline: 0 none;\n}\n\n.control.icon-only {\n display: flex;\n block-size: 40px;\n inline-size: 40px;\n place-content: center;\n}\n\n.control:focus {\n background-color: var(--vvd-color-neutral-20);\n}\n\n.control:focus-visible {\n box-shadow: inset 0 0 0 1px darkorange;\n}\n\n.icon {\n font-size: 20px;\n}";
|
|
12
17
|
styleInject(css_248z);
|
|
13
18
|
|
|
14
|
-
class SidenavItem extends
|
|
15
|
-
|
|
16
|
-
super(...arguments);
|
|
17
|
-
this.text = '';
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
__decorate([attr, __metadata("design:type", Object)], SidenavItem.prototype, "text", void 0);
|
|
23
|
-
|
|
24
|
-
applyMixins(SidenavItem, Prefix);
|
|
19
|
+
class SidenavItem extends TextAnchor {}
|
|
20
|
+
applyMixins(SidenavItem, AffixIcon);
|
|
25
21
|
|
|
26
22
|
let _ = t => t,
|
|
27
23
|
_t;
|
|
28
|
-
|
|
29
|
-
const getClasses = ({
|
|
30
|
-
text,
|
|
31
|
-
icon
|
|
32
|
-
}) => classNames('control', ['icon-only', !text && !!icon]);
|
|
33
|
-
|
|
34
|
-
const SidenavItemTemplate = context => html(_t || (_t = _`<a
|
|
35
|
-
class="${0}"
|
|
36
|
-
download="${0}"
|
|
37
|
-
href="${0}"
|
|
38
|
-
hreflang="${0}"
|
|
39
|
-
ping="${0}"
|
|
40
|
-
referrerpolicy="${0}"
|
|
41
|
-
rel="${0}"
|
|
42
|
-
target="${0}"
|
|
43
|
-
type="${0}"
|
|
44
|
-
aria-atomic="${0}"
|
|
45
|
-
aria-busy="${0}"
|
|
46
|
-
aria-controls="${0}"
|
|
47
|
-
aria-current="${0}"
|
|
48
|
-
aria-describedBy="${0}"
|
|
49
|
-
aria-details="${0}"
|
|
50
|
-
aria-disabled="${0}"
|
|
51
|
-
aria-errormessage="${0}"
|
|
52
|
-
aria-expanded="${0}"
|
|
53
|
-
aria-flowto="${0}"
|
|
54
|
-
aria-haspopup="${0}"
|
|
55
|
-
aria-hidden="${0}"
|
|
56
|
-
aria-invalid="${0}"
|
|
57
|
-
aria-keyshortcuts="${0}"
|
|
58
|
-
aria-label="${0}"
|
|
59
|
-
aria-labelledby="${0}"
|
|
60
|
-
aria-live="${0}"
|
|
61
|
-
aria-owns="${0}"
|
|
62
|
-
aria-relevant="${0}"
|
|
63
|
-
aria-roledescription="${0}"
|
|
64
|
-
>
|
|
65
|
-
${0}
|
|
24
|
+
const SidenavItemTemplate = (context, definition) => html(_t || (_t = _`
|
|
66
25
|
${0}
|
|
67
|
-
|
|
26
|
+
`), textAnchorTemplate(context));
|
|
68
27
|
|
|
69
28
|
const vividSidenavItem = SidenavItem.compose({
|
|
70
29
|
baseName: 'sidenav-item',
|
package/styles/themes/dark.css
CHANGED
|
@@ -88,9 +88,9 @@
|
|
|
88
88
|
--vvd-shadow-surface-16dp: drop-shadow(0 6px 32px rgba(0, 0, 0, 0.25)) drop-shadow(0 16px 24px rgba(0, 0, 0, 0.25)) drop-shadow(0 8px 12px rgba(0, 0, 0, 0.25));
|
|
89
89
|
--vvd-shadow-surface-24dp: drop-shadow(0 12px 48px rgba(0, 0, 0, 0.25)) drop-shadow(0 24px 32px rgba(0, 0, 0, 0.25)) drop-shadow(0 12px 16px rgba(0, 0, 0, 0.25));
|
|
90
90
|
}
|
|
91
|
-
@supports (color-
|
|
91
|
+
@supports (color-scheme: dark) {
|
|
92
92
|
:root, .vvd-theme-main, ::part(vvd-theme-main) {
|
|
93
|
-
color-
|
|
93
|
+
color-scheme: dark;
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
|
|
@@ -184,9 +184,9 @@
|
|
|
184
184
|
--vvd-shadow-surface-16dp: drop-shadow(0 6px 32px rgba(0, 0, 0, 0.1)) drop-shadow(0 16px 24px rgba(0, 0, 0, 0.05)) drop-shadow(0 8px 12px rgba(0, 0, 0, 0.05));
|
|
185
185
|
--vvd-shadow-surface-24dp: drop-shadow(0 12px 48px rgba(0, 0, 0, 0.2)) drop-shadow(0 24px 32px rgba(0, 0, 0, 0.05)) drop-shadow(0 12px 16px rgba(0, 0, 0, 0.05));
|
|
186
186
|
}
|
|
187
|
-
@supports (color-
|
|
187
|
+
@supports (color-scheme: light) {
|
|
188
188
|
.vvd-theme-alternate, ::part(vvd-theme-alternate) {
|
|
189
|
-
color-
|
|
189
|
+
color-scheme: light;
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
192
|
|
package/styles/themes/light.css
CHANGED
|
@@ -88,9 +88,9 @@
|
|
|
88
88
|
--vvd-shadow-surface-16dp: drop-shadow(0 6px 32px rgba(0, 0, 0, 0.1)) drop-shadow(0 16px 24px rgba(0, 0, 0, 0.05)) drop-shadow(0 8px 12px rgba(0, 0, 0, 0.05));
|
|
89
89
|
--vvd-shadow-surface-24dp: drop-shadow(0 12px 48px rgba(0, 0, 0, 0.2)) drop-shadow(0 24px 32px rgba(0, 0, 0, 0.05)) drop-shadow(0 12px 16px rgba(0, 0, 0, 0.05));
|
|
90
90
|
}
|
|
91
|
-
@supports (color-
|
|
91
|
+
@supports (color-scheme: light) {
|
|
92
92
|
:root, .vvd-theme-main, ::part(vvd-theme-main) {
|
|
93
|
-
color-
|
|
93
|
+
color-scheme: light;
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
|
|
@@ -184,9 +184,9 @@
|
|
|
184
184
|
--vvd-shadow-surface-16dp: drop-shadow(0 6px 32px rgba(0, 0, 0, 0.25)) drop-shadow(0 16px 24px rgba(0, 0, 0, 0.25)) drop-shadow(0 8px 12px rgba(0, 0, 0, 0.25));
|
|
185
185
|
--vvd-shadow-surface-24dp: drop-shadow(0 12px 48px rgba(0, 0, 0, 0.25)) drop-shadow(0 24px 32px rgba(0, 0, 0, 0.25)) drop-shadow(0 12px 16px rgba(0, 0, 0, 0.25));
|
|
186
186
|
}
|
|
187
|
-
@supports (color-
|
|
187
|
+
@supports (color-scheme: dark) {
|
|
188
188
|
.vvd-theme-alternate, ::part(vvd-theme-alternate) {
|
|
189
|
-
color-
|
|
189
|
+
color-scheme: dark;
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
192
|
|
package/text/index.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
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 { s as styleInject } from '../shared/style-inject.es.js';
|
|
3
|
+
import '../shared/web.dom-collections.iterator.js';
|
|
4
|
+
import { c as classNames } from '../shared/class-names.js';
|
|
5
|
+
|
|
6
|
+
var css_248z = "/*\n Do not edit directly\n Generated on Sun, 23 Jan 2022 11:15:05 GMT\n*/\n.control:not(.tight):not(.font-face-body-1, .font-face-body-1-bold, .font-face-body-1-code, .font-face-body-1-link, .font-face-body-2, .font-face-body-2-bold, .font-face-body-2-code, .font-face-body-2-link, .font-face-button, .font-face-button-dense, .font-face-button-enlarge, .font-face-caption, .font-face-caption-bold, .font-face-caption-code, .font-face-caption-link, .font-face-headline-1, .font-face-headline-2, .font-face-subtitle-1, .font-face-subtitle-2, .font-face-title-1, .font-face-title-2), .control.font-face-body-1:not(.tight), .control.font-face-body-1-bold:not(.tight), .control.font-face-body-1-code:not(.tight), .control.font-face-body-1-link:not(.tight), .control.font-face-body-2:not(.tight), .control.font-face-body-2-bold:not(.tight), .control.font-face-body-2-code:not(.tight), .control.font-face-body-2-link:not(.tight), .control.font-face-subtitle-1:not(.tight), .control.font-face-subtitle-2:not(.tight), .control.font-face-title-1:not(.tight), .control.font-face-title-2:not(.tight), .control.font-face-headline-1:not(.tight), .control.font-face-headline-2:not(.tight) {\n display: block;\n margin: var(--font-face-margin, 0);\n}\n\n.control {\n color: var(--connotation);\n}\n.control.font-face-body-1 {\n font: 400 ultra-condensed 16px / 24px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n}\n.control.font-face-body-1-bold {\n font: 600 ultra-condensed 16px / 24px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n}\n.control.font-face-body-1-code {\n font: 400 ultra-condensed 16px / 24px SpeziaMonoWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n}\n.control.font-face-body-1-link {\n font: 400 ultra-condensed 16px / 24px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: underline;\n text-transform: none;\n}\n.control.font-face-body-2 {\n font: 400 ultra-condensed 14px / 20px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n}\n.control.font-face-body-2-bold {\n font: 600 ultra-condensed 14px / 20px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n}\n.control.font-face-body-2-code {\n font: 400 ultra-condensed 14px / 20px SpeziaMonoWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n}\n.control.font-face-body-2-link {\n font: 400 ultra-condensed 14px / 20px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: underline;\n text-transform: none;\n}\n.control.font-face-button {\n font: 600 ultra-condensed 14px / 100% SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n}\n.control.font-face-button-dense {\n font: 600 ultra-condensed 12px / 100% SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n}\n.control.font-face-button-enlarge {\n font: 600 ultra-condensed 16px / 100% SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n}\n.control.font-face-caption {\n font: 400 ultra-condensed 12px / 16px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n}\n.control.font-face-caption-bold {\n font: 600 ultra-condensed 12px / 16px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n}\n.control.font-face-caption-code {\n font: 400 ultra-condensed 12px / 16px SpeziaMonoWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n}\n.control.font-face-caption-link {\n font: 400 ultra-condensed 12px / 16px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: underline;\n text-transform: none;\n}\n.control.font-face-headline-1 {\n font: 500 condensed 66px / 88px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n}\n.control.font-face-headline-2 {\n font: 500 condensed 52px / 68px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n}\n.control.font-face-subtitle-1 {\n font: 500 condensed 26px / 36px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n}\n.control.font-face-subtitle-2 {\n font: 500 condensed 20px / 28px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n}\n.control.font-face-title-1 {\n font: 500 condensed 40px / 52px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n}\n.control.font-face-title-2 {\n font: 500 condensed 32px / 44px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n}\n.control:not(.font-face-body-1, .font-face-body-1-bold, .font-face-body-1-code, .font-face-body-1-link, .font-face-body-2, .font-face-body-2-bold, .font-face-body-2-code, .font-face-body-2-link, .font-face-button, .font-face-button-dense, .font-face-button-enlarge, .font-face-caption, .font-face-caption-bold, .font-face-caption-code, .font-face-caption-link, .font-face-headline-1, .font-face-headline-2, .font-face-subtitle-1, .font-face-subtitle-2, .font-face-title-1, .font-face-title-2) {\n font: 400 ultra-condensed 16px / 24px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n}\n.control.connotation-primary {\n --connotation: var(--vvd-color-primary);\n --on-connotation: var(--vvd-color-on-primary);\n}\n\n.control.connotation-cta {\n --connotation: var(--vvd-color-cta);\n --on-connotation: var(--vvd-color-on-cta);\n}\n\n.control.connotation-success {\n --connotation: var(--vvd-color-success);\n --on-connotation: var(--vvd-color-on-success);\n}\n\n.control.connotation-alert {\n --connotation: var(--vvd-color-alert);\n --on-connotation: var(--vvd-color-on-alert);\n}\n\n.control.connotation-announcement {\n --connotation: var(--vvd-color-announcement);\n --on-connotation: var(--vvd-color-on-announcement);\n}\n\n.control.connotation-info {\n --connotation: var(--vvd-color-info);\n --on-connotation: var(--vvd-color-on-info);\n}\n\n.control.font-face-headline-1, .control.font-face-headline-2 {\n --font-face-margin: 2.5rem 0;\n}\n.control.font-face-title-1, .control.font-face-title-2 {\n --font-face-margin: 2rem 0;\n}\n.control.font-face-subtitle-1, .control.font-face-subtitle-2 {\n --font-face-margin: 1.5rem 0;\n}\n.control:not(.font-face-body-1, .font-face-body-1-bold, .font-face-body-1-code, .font-face-body-1-link, .font-face-body-2, .font-face-body-2-bold, .font-face-body-2-code, .font-face-body-2-link, .font-face-button, .font-face-button-dense, .font-face-button-enlarge, .font-face-caption, .font-face-caption-bold, .font-face-caption-code, .font-face-caption-link, .font-face-headline-1, .font-face-headline-2, .font-face-subtitle-1, .font-face-subtitle-2, .font-face-title-1, .font-face-title-2), .control.font-face-body-1, .control.font-face-body-1-bold, .control.font-face-body-1-code, .control.font-face-body-1-link, .control.font-face-body-2, .control.font-face-body-2-bold, .control.font-face-body-2-code, .control.font-face-body-2-link {\n --font-face-margin: 1rem 0;\n}\n\n::slotted(:where(h1, h2, h3, h4, h5, h6, p)) {\n margin: initial;\n}\n\n::slotted(*) {\n color: inherit;\n font: inherit;\n}";
|
|
7
|
+
styleInject(css_248z);
|
|
8
|
+
|
|
9
|
+
class Text extends FoundationElement {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this.tight = false;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
__decorate([attr, __metadata("design:type", String)], Text.prototype, "connotation", void 0);
|
|
18
|
+
|
|
19
|
+
__decorate([attr({
|
|
20
|
+
attribute: 'font-face'
|
|
21
|
+
}), __metadata("design:type", String)], Text.prototype, "fontFace", void 0);
|
|
22
|
+
|
|
23
|
+
__decorate([attr({
|
|
24
|
+
mode: 'boolean'
|
|
25
|
+
}), __metadata("design:type", Object)], Text.prototype, "tight", void 0);
|
|
26
|
+
|
|
27
|
+
let _ = t => t,
|
|
28
|
+
_t;
|
|
29
|
+
|
|
30
|
+
const getClasses = ({
|
|
31
|
+
connotation,
|
|
32
|
+
fontFace,
|
|
33
|
+
tight
|
|
34
|
+
}) => classNames('control', [`connotation-${connotation}`, Boolean(connotation)], [`font-face-${fontFace}`, Boolean(fontFace)], ['tight', tight]);
|
|
35
|
+
|
|
36
|
+
const TextTemplate = () => html(_t || (_t = _`<slot class="${0}"></slot>`), getClasses);
|
|
37
|
+
|
|
38
|
+
const vividText = Text.compose({
|
|
39
|
+
baseName: 'text',
|
|
40
|
+
template: TextTemplate,
|
|
41
|
+
styles: css_248z
|
|
42
|
+
});
|
|
43
|
+
designSystem.register(vividText());
|
|
44
|
+
|
|
45
|
+
export { vividText };
|
package/text-anchor/index.js
CHANGED
|
@@ -1,21 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import '../shared/
|
|
3
|
-
import { A as Anchor } from '../shared/anchor.js';
|
|
1
|
+
import { d as designSystem } from '../shared/index.js';
|
|
2
|
+
import { T as TextAnchor } from '../shared/text-anchor.js';
|
|
4
3
|
import { t as textAnchorTemplate } from '../shared/text-anchor.template.js';
|
|
4
|
+
import '../shared/web.dom-collections.iterator.js';
|
|
5
|
+
import '../shared/affix.js';
|
|
6
|
+
import '../shared/icon.js';
|
|
7
|
+
import '../shared/_has.js';
|
|
8
|
+
import '../shared/anchor.js';
|
|
5
9
|
import '../shared/apply-mixins.js';
|
|
6
10
|
import '../shared/aria-global.js';
|
|
7
11
|
import '../shared/class-names.js';
|
|
8
12
|
|
|
9
|
-
class TextAnchor extends Anchor {
|
|
10
|
-
constructor() {
|
|
11
|
-
super(...arguments);
|
|
12
|
-
this.text = '';
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
__decorate([attr, __metadata("design:type", Object)], TextAnchor.prototype, "text", void 0);
|
|
18
|
-
|
|
19
13
|
const vividTextAnchor = TextAnchor.compose({
|
|
20
14
|
baseName: 'text-anchor',
|
|
21
15
|
template: textAnchorTemplate
|
package/tooltip/index.js
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import '../popup/index.js';
|
|
2
|
+
import { F as FoundationElement, _ as __decorate, a as attr, b as __metadata, h as html, d as designSystem } from '../shared/index.js';
|
|
3
|
+
import { s as styleInject } from '../shared/style-inject.es.js';
|
|
4
|
+
import '../shared/web.dom-collections.iterator.js';
|
|
5
|
+
import { c as classNames } from '../shared/class-names.js';
|
|
6
|
+
import '../elevation/index.js';
|
|
7
|
+
import '../button/index.js';
|
|
8
|
+
import '../icon/index.js';
|
|
9
|
+
import '../shared/icon.js';
|
|
10
|
+
import '../shared/_has.js';
|
|
11
|
+
import '../shared/when.js';
|
|
12
|
+
import '../shared/index2.js';
|
|
13
|
+
import '../shared/affix.js';
|
|
14
|
+
import '../shared/apply-mixins.js';
|
|
15
|
+
import '../shared/aria-global.js';
|
|
16
|
+
import '../shared/es.object.assign.js';
|
|
17
|
+
|
|
18
|
+
var css_248z = "/*\n Do not edit directly\n Generated on Sun, 23 Jan 2022 11:15:05 GMT\n*/\n.control {\n pointer-events: none;\n}\n\n.tooltip {\n width: var(--tooltip-inline-size, 240px);\n}\n.tooltip-text {\n font: 600 ultra-condensed 14px / 20px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n padding: 8px 12px;\n color: var(--vvd-color-on-canvas);\n}";
|
|
19
|
+
styleInject(css_248z);
|
|
20
|
+
|
|
21
|
+
class Tooltip extends FoundationElement {
|
|
22
|
+
constructor() {
|
|
23
|
+
super(...arguments);
|
|
24
|
+
this.text = '';
|
|
25
|
+
this.open = false;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
show() {
|
|
29
|
+
this.open = true;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
hide() {
|
|
33
|
+
this.open = false;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
__decorate([attr({
|
|
39
|
+
mode: 'fromView'
|
|
40
|
+
}), __metadata("design:type", Object)], Tooltip.prototype, "text", void 0);
|
|
41
|
+
|
|
42
|
+
__decorate([attr({
|
|
43
|
+
mode: 'boolean'
|
|
44
|
+
}), __metadata("design:type", Object)], Tooltip.prototype, "open", void 0);
|
|
45
|
+
|
|
46
|
+
__decorate([attr, __metadata("design:type", String)], Tooltip.prototype, "corner", void 0);
|
|
47
|
+
|
|
48
|
+
__decorate([attr, __metadata("design:type", String)], Tooltip.prototype, "anchor", void 0);
|
|
49
|
+
|
|
50
|
+
let _2 = t => t,
|
|
51
|
+
_t;
|
|
52
|
+
|
|
53
|
+
const getClasses = _ => classNames('control');
|
|
54
|
+
|
|
55
|
+
const TooltipTemplate = () => html(_t || (_t = _2`
|
|
56
|
+
<vwc-popup class="${0}" arrow alternate="true"
|
|
57
|
+
corner=${0} open=${0} anchor=${0}
|
|
58
|
+
exportparts="vvd-theme-alternate">
|
|
59
|
+
<div class="tooltip">
|
|
60
|
+
<header part="vvd-theme-alternate" class="tooltip-header">
|
|
61
|
+
<div class="tooltip-text">${0}</div>
|
|
62
|
+
</header>
|
|
63
|
+
</div>
|
|
64
|
+
</vwc-popup>`), getClasses, x => x.corner, x => x.open, x => x.anchor, x => x.text);
|
|
65
|
+
|
|
66
|
+
const vividTooltip = Tooltip.compose({
|
|
67
|
+
baseName: 'tooltip',
|
|
68
|
+
template: TooltipTemplate,
|
|
69
|
+
styles: css_248z
|
|
70
|
+
});
|
|
71
|
+
designSystem.register(vividTooltip());
|
|
72
|
+
|
|
73
|
+
export { vividTooltip };
|
package/shared/index3.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { F as FoundationElement, h as html, d as designSystem } from './index2.js';
|
|
2
|
-
import { s as styleInject } from './style-inject.es.js';
|
|
3
|
-
|
|
4
|
-
class Focus extends FoundationElement {}
|
|
5
|
-
|
|
6
|
-
var css_248z = ":host {\n display: contents;\n border-radius: inherit;\n}\n\n.control {\n position: absolute;\n box-sizing: border-box;\n border-radius: inherit;\n box-shadow: inset 0 0 0 2px var(--focus-stroke-color, var(--vvd-color-on-canvas)), inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);\n inset: 0;\n}";
|
|
7
|
-
styleInject(css_248z);
|
|
8
|
-
|
|
9
|
-
let _ = t => t,
|
|
10
|
-
_t;
|
|
11
|
-
const focusTemplate = () => html(_t || (_t = _`
|
|
12
|
-
<span class="control"></span>`));
|
|
13
|
-
|
|
14
|
-
const VIVIDFocus = Focus.compose({
|
|
15
|
-
baseName: 'focus',
|
|
16
|
-
template: focusTemplate,
|
|
17
|
-
styles: css_248z
|
|
18
|
-
});
|
|
19
|
-
designSystem.register(VIVIDFocus());
|
|
20
|
-
|
|
21
|
-
export { Focus as F, VIVIDFocus as V };
|