@pushengineering/umg-web-components 2.0.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/dist/node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/css-tag.js +56 -0
- package/dist/node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/decorators/base.js +9 -0
- package/dist/node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/decorators/custom-element.js +13 -0
- package/dist/node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/decorators/property.js +37 -0
- package/dist/node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/decorators/query-assigned-elements.js +19 -0
- package/dist/node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/decorators/query.js +34 -0
- package/dist/node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/decorators/state.js +12 -0
- package/dist/node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/reactive-element.js +260 -0
- package/dist/node_modules/.pnpm/lit-element@4.0.4/node_modules/lit-element/lit-element.js +50 -0
- package/dist/node_modules/.pnpm/lit-html@3.1.2/node_modules/lit-html/directive.js +27 -0
- package/dist/node_modules/.pnpm/lit-html@3.1.2/node_modules/lit-html/directives/class-map.js +37 -0
- package/dist/node_modules/.pnpm/lit-html@3.1.2/node_modules/lit-html/directives/if-defined.js +10 -0
- package/dist/node_modules/.pnpm/lit-html@3.1.2/node_modules/lit-html/directives/map.js +15 -0
- package/dist/node_modules/.pnpm/lit-html@3.1.2/node_modules/lit-html/directives/range.js +14 -0
- package/dist/node_modules/.pnpm/lit-html@3.1.2/node_modules/lit-html/directives/style-map.js +39 -0
- package/dist/node_modules/.pnpm/lit-html@3.1.2/node_modules/lit-html/lit-html.js +259 -0
- package/dist/packages/web-components/classes/event-manager/event-manager.js +50 -0
- package/dist/packages/web-components/classes/index.js +4 -0
- package/dist/packages/web-components/components/badge/badge.js +146 -0
- package/dist/packages/web-components/components/banner/banner.js +389 -0
- package/dist/packages/web-components/components/banner-image/banner-image.js +161 -0
- package/dist/packages/web-components/components/box/box.js +208 -0
- package/dist/packages/web-components/components/button/button.js +336 -0
- package/dist/packages/web-components/components/button-group/button-group.js +98 -0
- package/dist/packages/web-components/components/button-icon/button-icon.js +246 -0
- package/dist/packages/web-components/components/caption-card/caption-card.js +331 -0
- package/dist/packages/web-components/components/deferred-media/deferred-media.js +212 -0
- package/dist/packages/web-components/components/disclosure/disclosure.js +255 -0
- package/dist/packages/web-components/components/event-table/event-content.js +106 -0
- package/dist/packages/web-components/components/event-table/event-date.js +45 -0
- package/dist/packages/web-components/components/event-table/event-table.js +74 -0
- package/dist/packages/web-components/components/event-table/event.js +45 -0
- package/dist/packages/web-components/components/footer/footer.js +153 -0
- package/dist/packages/web-components/components/grid/grid-cell.js +40 -0
- package/dist/packages/web-components/components/grid/grid.js +106 -0
- package/dist/packages/web-components/components/header/header.js +368 -0
- package/dist/packages/web-components/components/header-drawer/header-drawer.js +292 -0
- package/dist/packages/web-components/components/header-drawer/menu-drawer.js +176 -0
- package/dist/packages/web-components/components/horizontal-stack/horizontal-stack.js +93 -0
- package/dist/packages/web-components/components/icon/icon.js +81 -0
- package/dist/packages/web-components/components/icon/icons.svg.js +191 -0
- package/dist/packages/web-components/components/image/image.js +157 -0
- package/dist/packages/web-components/components/index.js +82 -0
- package/dist/packages/web-components/components/link/link.js +95 -0
- package/dist/packages/web-components/components/link-group/link-group.js +126 -0
- package/dist/packages/web-components/components/logo/logo.js +161 -0
- package/dist/packages/web-components/components/media-gallery/media-gallery.js +82 -0
- package/dist/packages/web-components/components/media-gallery/media.js +31 -0
- package/dist/packages/web-components/components/media-text/media-text.js +276 -0
- package/dist/packages/web-components/components/media-text/styles/media-size.js +119 -0
- package/dist/packages/web-components/components/menu/menu.js +328 -0
- package/dist/packages/web-components/components/modal/modal.js +143 -0
- package/dist/packages/web-components/components/number-field/number-field.js +339 -0
- package/dist/packages/web-components/components/overlay/overlay.js +77 -0
- package/dist/packages/web-components/components/page/page.js +105 -0
- package/dist/packages/web-components/components/popover/popover.js +163 -0
- package/dist/packages/web-components/components/rich-text/rich-text.js +126 -0
- package/dist/packages/web-components/components/section/section.js +400 -0
- package/dist/packages/web-components/components/select/select.js +359 -0
- package/dist/packages/web-components/components/slider/slide.js +68 -0
- package/dist/packages/web-components/components/slider/slider-controls.js +258 -0
- package/dist/packages/web-components/components/slider/slider.js +374 -0
- package/dist/packages/web-components/components/slider/styles/controls.js +98 -0
- package/dist/packages/web-components/components/slider/styles/slider.js +233 -0
- package/dist/packages/web-components/components/socials/socials.js +96 -0
- package/dist/packages/web-components/components/table/table.js +158 -0
- package/dist/packages/web-components/components/text/text.js +245 -0
- package/dist/packages/web-components/components/text-field/text-field.js +257 -0
- package/dist/packages/web-components/components/thumbnail-slider/thumbnail-slide.js +51 -0
- package/dist/packages/web-components/components/thumbnail-slider/thumbnail-slider.js +88 -0
- package/dist/packages/web-components/components/vertical-stack/vertical-stack.js +95 -0
- package/dist/packages/web-components/components/video/video.js +185 -0
- package/dist/packages/web-components/scripts/mergeStyles.js +8 -0
- package/dist/packages/web-components/scripts/polyfills/scrollyfills.js +43 -0
- package/dist/packages/web-components/scripts/settings.js +7 -0
- package/dist/packages/web-components/scripts/themeStyleSheet.js +9 -0
- package/dist/packages/web-components/scripts/utilities/debounce.js +9 -0
- package/dist/packages/web-components/scripts/utilities/paddingTransformations.js +46 -0
- package/dist/packages/web-components/styles/button.js +55 -0
- package/dist/packages/web-components/styles/fonts.js +181 -0
- package/dist/packages/web-components/styles/global.js +40 -0
- package/dist/packages/web-components/styles/grid.js +114 -0
- package/dist/packages/web-components/styles/group.js +121 -0
- package/dist/packages/web-components/styles/icon-size.js +19 -0
- package/dist/packages/web-components/styles/link.js +30 -0
- package/dist/packages/web-components/styles/placeholder-media.js +27 -0
- package/package.json +92 -0
- package/readme.md +266 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import "../../../../node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/reactive-element.js";
|
|
2
|
+
import { html as u } from "../../../../node_modules/.pnpm/lit-html@3.1.2/node_modules/lit-html/lit-html.js";
|
|
3
|
+
import { LitElement as c } from "../../../../node_modules/.pnpm/lit-element@4.0.4/node_modules/lit-element/lit-element.js";
|
|
4
|
+
import { styleMap as f } from "../../../../node_modules/.pnpm/lit-html@3.1.2/node_modules/lit-html/directives/style-map.js";
|
|
5
|
+
import { classMap as g } from "../../../../node_modules/.pnpm/lit-html@3.1.2/node_modules/lit-html/directives/class-map.js";
|
|
6
|
+
import { customElement as n } from "../../../../node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/decorators/custom-element.js";
|
|
7
|
+
import { property as r } from "../../../../node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/decorators/property.js";
|
|
8
|
+
import { settings as y } from "../../scripts/settings.js";
|
|
9
|
+
import { global as h } from "../../styles/global.js";
|
|
10
|
+
import { groupMobileAlign as v, groupMobileJustify as b, groupAlign as d, groupJustify as j } from "../../styles/group.js";
|
|
11
|
+
import { mergeStyles as k } from "../../scripts/mergeStyles.js";
|
|
12
|
+
import { css as x } from "../../../../node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/css-tag.js";
|
|
13
|
+
var _ = Object.defineProperty, A = Object.getOwnPropertyDescriptor, i = (t, o, a, l) => {
|
|
14
|
+
for (var e = l > 1 ? void 0 : l ? A(o, a) : o, p = t.length - 1, m; p >= 0; p--)
|
|
15
|
+
(m = t[p]) && (e = (l ? m(o, a, e) : m(e)) || e);
|
|
16
|
+
return l && e && _(o, a, e), e;
|
|
17
|
+
};
|
|
18
|
+
const { prefix: J } = y;
|
|
19
|
+
let s = class extends c {
|
|
20
|
+
constructor() {
|
|
21
|
+
super(...arguments), this.align = "stretch", this.justify = "start";
|
|
22
|
+
}
|
|
23
|
+
stackStyles() {
|
|
24
|
+
let t = {};
|
|
25
|
+
return this.gap !== void 0 && (t = {
|
|
26
|
+
...t,
|
|
27
|
+
"--um-space-vertical-stack-gap": this.gap / 16 + "rem"
|
|
28
|
+
}), t;
|
|
29
|
+
}
|
|
30
|
+
stackClasses() {
|
|
31
|
+
const t = {};
|
|
32
|
+
return t["group-justify--" + this.justify] = !0, t["group-align--" + this.align] = !0, this.mobileJustify ? t["group-mobile-justify--" + this.mobileJustify] = !0 : t["group-mobile-justify--" + this.justify] = !0, this.mobileAlign ? t["group-mobile-align--" + this.mobileAlign] = !0 : t["group-mobile-align--" + this.align] = !0, t;
|
|
33
|
+
}
|
|
34
|
+
render() {
|
|
35
|
+
return u`
|
|
36
|
+
<div
|
|
37
|
+
class="vertical-stack${g(this.stackClasses())}"
|
|
38
|
+
style="${f(this.stackStyles())}"
|
|
39
|
+
>
|
|
40
|
+
<slot></slot>
|
|
41
|
+
</div>
|
|
42
|
+
`;
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
s.styles = k([
|
|
46
|
+
h,
|
|
47
|
+
x`
|
|
48
|
+
:host {
|
|
49
|
+
display: block;
|
|
50
|
+
width: 100%;
|
|
51
|
+
height: 100%;
|
|
52
|
+
}
|
|
53
|
+
::slotted(*) {
|
|
54
|
+
flex-shrink: 1;
|
|
55
|
+
height: auto;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.vertical-stack {
|
|
59
|
+
display: flex;
|
|
60
|
+
flex-direction: column;
|
|
61
|
+
gap: var(--um-space-vertical-stack-gap, var(--um-space-grid-desktop-vertical, 1rem));
|
|
62
|
+
height: 100%;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.vertical-stack.group-justify--stretch ::slotted(*) {
|
|
66
|
+
flex-grow: 1;
|
|
67
|
+
flex-shrink: 0;
|
|
68
|
+
}
|
|
69
|
+
`,
|
|
70
|
+
v,
|
|
71
|
+
b,
|
|
72
|
+
d,
|
|
73
|
+
j
|
|
74
|
+
]);
|
|
75
|
+
i([
|
|
76
|
+
r({ type: Number })
|
|
77
|
+
], s.prototype, "gap", 2);
|
|
78
|
+
i([
|
|
79
|
+
r()
|
|
80
|
+
], s.prototype, "align", 2);
|
|
81
|
+
i([
|
|
82
|
+
r()
|
|
83
|
+
], s.prototype, "justify", 2);
|
|
84
|
+
i([
|
|
85
|
+
r()
|
|
86
|
+
], s.prototype, "mobileAlign", 2);
|
|
87
|
+
i([
|
|
88
|
+
r()
|
|
89
|
+
], s.prototype, "mobileJustify", 2);
|
|
90
|
+
s = i([
|
|
91
|
+
n(`${J}-vertical-stack`)
|
|
92
|
+
], s);
|
|
93
|
+
export {
|
|
94
|
+
s as VerticalStack
|
|
95
|
+
};
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import "../../../../node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/reactive-element.js";
|
|
2
|
+
import { html as r } from "../../../../node_modules/.pnpm/lit-html@3.1.2/node_modules/lit-html/lit-html.js";
|
|
3
|
+
import { LitElement as d } from "../../../../node_modules/.pnpm/lit-element@4.0.4/node_modules/lit-element/lit-element.js";
|
|
4
|
+
import { customElement as m } from "../../../../node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/decorators/custom-element.js";
|
|
5
|
+
import { property as o } from "../../../../node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/decorators/property.js";
|
|
6
|
+
import { state as y } from "../../../../node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/decorators/state.js";
|
|
7
|
+
import { query as u } from "../../../../node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/decorators/query.js";
|
|
8
|
+
import { classMap as c } from "../../../../node_modules/.pnpm/lit-html@3.1.2/node_modules/lit-html/directives/class-map.js";
|
|
9
|
+
import { ifDefined as v } from "../../../../node_modules/.pnpm/lit-html@3.1.2/node_modules/lit-html/directives/if-defined.js";
|
|
10
|
+
import { global as f } from "../../styles/global.js";
|
|
11
|
+
import { placeholderMedia as g } from "../../styles/placeholder-media.js";
|
|
12
|
+
import { settings as $ } from "../../scripts/settings.js";
|
|
13
|
+
import { mergeStyles as w } from "../../scripts/mergeStyles.js";
|
|
14
|
+
import { css as _ } from "../../../../node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/css-tag.js";
|
|
15
|
+
var P = Object.defineProperty, C = Object.getOwnPropertyDescriptor, i = (e, a, p, h) => {
|
|
16
|
+
for (var s = h > 1 ? void 0 : h ? C(a, p) : a, l = e.length - 1, n; l >= 0; l--)
|
|
17
|
+
(n = e[l]) && (s = (h ? n(a, p, s) : n(s)) || s);
|
|
18
|
+
return h && s && P(a, p, s), s;
|
|
19
|
+
};
|
|
20
|
+
const { prefix: b } = $;
|
|
21
|
+
let t = class extends d {
|
|
22
|
+
constructor() {
|
|
23
|
+
super(), this.sources = [], this.posterSource = void 0, this.width = 100, this.height = 100, this.fit = "adapt", this.inBackground = !1, this.autoplay = !0, this.muted = !0, this.loop = !1, this.controls = !1, this._hasPlayed = !1, this.initialise();
|
|
24
|
+
}
|
|
25
|
+
containerClasses() {
|
|
26
|
+
const e = {};
|
|
27
|
+
return e["image-fit--" + this.fit] = !0, e;
|
|
28
|
+
}
|
|
29
|
+
async initialise() {
|
|
30
|
+
var e;
|
|
31
|
+
await this.updateComplete, this._hasPlayed || ((e = this._videoElement) == null || e.play(), this._hasPlayed = !0);
|
|
32
|
+
}
|
|
33
|
+
handleFirstPlay() {
|
|
34
|
+
this._hasPlayed || (this._hasPlayed = !0);
|
|
35
|
+
}
|
|
36
|
+
videoType() {
|
|
37
|
+
return this.inBackground ? r`
|
|
38
|
+
<video
|
|
39
|
+
width="${this.width}"
|
|
40
|
+
height="${this.height}"
|
|
41
|
+
playsinline
|
|
42
|
+
autoplay
|
|
43
|
+
loop
|
|
44
|
+
muted
|
|
45
|
+
@play=${this.handleFirstPlay}
|
|
46
|
+
>
|
|
47
|
+
${this.sources.map((e) => r`
|
|
48
|
+
<source
|
|
49
|
+
.src="${e.src}"
|
|
50
|
+
.type="video/${e.type}"
|
|
51
|
+
width="${this.width}"
|
|
52
|
+
height="${this.height}"
|
|
53
|
+
>
|
|
54
|
+
</source>
|
|
55
|
+
`)}
|
|
56
|
+
</video>
|
|
57
|
+
` : r`
|
|
58
|
+
<video
|
|
59
|
+
width="${this.width}"
|
|
60
|
+
height="${this.height}"
|
|
61
|
+
poster="${v(this.posterSource)}"
|
|
62
|
+
?controls="${this.controls}"
|
|
63
|
+
?autoplay="${this.autoplay}"
|
|
64
|
+
?loop="${this.loop}"
|
|
65
|
+
?muted="${this.muted}"
|
|
66
|
+
@play=${this.handleFirstPlay}
|
|
67
|
+
>
|
|
68
|
+
${this.sources.map((e) => r`
|
|
69
|
+
<source
|
|
70
|
+
.src="${e.src}"
|
|
71
|
+
.type="video/${e.type}"
|
|
72
|
+
width="${this.width}"
|
|
73
|
+
height="${this.height}"
|
|
74
|
+
>
|
|
75
|
+
</source>
|
|
76
|
+
`)}
|
|
77
|
+
</video>
|
|
78
|
+
`;
|
|
79
|
+
}
|
|
80
|
+
video() {
|
|
81
|
+
return Array.isArray(this.sources) && this.sources.length ? r`
|
|
82
|
+
${this.videoType()}
|
|
83
|
+
` : r`
|
|
84
|
+
<div class="placeholder image image--desktop${c(this.containerClasses())}" style="aspect-ratio: ${this.width / this.height}">
|
|
85
|
+
<div class="placeholder-inner">
|
|
86
|
+
<svg class="icon" xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 576 512" fill="currentcolor">
|
|
87
|
+
<path d="M70.5 138.1C31 172.2 16 219.1 16 272c0 52 18.4 91.6 46.9 118.3C91.6 417.2 131.5 432 176 432h8.4c18.2 0 34.8-10.3 42.9-26.5l23.2-46.3C257.6 345 272.1 336 288 336s30.4 9 37.5 23.2l23.2 46.3c8.1 16.3 24.8 26.5 42.9 26.5H400c44.5 0 84.4-14.8 113.1-41.7C541.6 363.6 560 324 560 272c0-52.9-15-99.8-54.5-133.9C465.6 103.6 398.1 80 288 80s-177.6 23.6-217.5 58.1zM0 272C0 160 64 64 288 64s288 96 288 208s-80 176-176 176h-8.4c-24.2 0-46.4-13.7-57.2-35.4l-23.2-46.3c-4.4-8.8-13.3-14.3-23.2-14.3s-18.8 5.5-23.2 14.3l-23.2 46.3c-10.8 21.7-33 35.4-57.2 35.4H176C80 448 0 384 0 272zm160 32a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm0-112a64 64 0 1 1 0 128 64 64 0 1 1 0-128zm304 64a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zm-112 0a64 64 0 1 1 128 0 64 64 0 1 1 -128 0z"/>
|
|
88
|
+
</svg>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
`;
|
|
92
|
+
}
|
|
93
|
+
render() {
|
|
94
|
+
return r`
|
|
95
|
+
<div
|
|
96
|
+
class="video-container${c(this.containerClasses())}"
|
|
97
|
+
part="video-container"
|
|
98
|
+
>
|
|
99
|
+
${this.video()}
|
|
100
|
+
</div>
|
|
101
|
+
`;
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
t.styles = w([
|
|
105
|
+
f,
|
|
106
|
+
g,
|
|
107
|
+
_`
|
|
108
|
+
:host {
|
|
109
|
+
display: block;
|
|
110
|
+
}
|
|
111
|
+
:host([fit=cover]),
|
|
112
|
+
:host([fit=contain]) {
|
|
113
|
+
height: 100%;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.video-container.image-fit--cover,
|
|
117
|
+
.video-container.image-fit--contain {
|
|
118
|
+
height: 100%;
|
|
119
|
+
position: relative;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.image-fit--cover video,
|
|
123
|
+
.image-fit--contain video {
|
|
124
|
+
position: absolute;
|
|
125
|
+
height: 100%;
|
|
126
|
+
width: 100%;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
video, .image {
|
|
130
|
+
display: block;
|
|
131
|
+
height: auto;
|
|
132
|
+
width: 100%;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/* Image fit */
|
|
136
|
+
.image-fit--cover video {
|
|
137
|
+
object-fit: cover;
|
|
138
|
+
}
|
|
139
|
+
.image-fit--contain video {
|
|
140
|
+
object-fit: contain;
|
|
141
|
+
}
|
|
142
|
+
`
|
|
143
|
+
]);
|
|
144
|
+
i([
|
|
145
|
+
o({ type: Array })
|
|
146
|
+
], t.prototype, "sources", 2);
|
|
147
|
+
i([
|
|
148
|
+
o()
|
|
149
|
+
], t.prototype, "posterSource", 2);
|
|
150
|
+
i([
|
|
151
|
+
o({ type: Number })
|
|
152
|
+
], t.prototype, "width", 2);
|
|
153
|
+
i([
|
|
154
|
+
o({ type: Number })
|
|
155
|
+
], t.prototype, "height", 2);
|
|
156
|
+
i([
|
|
157
|
+
o({ type: String })
|
|
158
|
+
], t.prototype, "fit", 2);
|
|
159
|
+
i([
|
|
160
|
+
o({ type: Boolean })
|
|
161
|
+
], t.prototype, "inBackground", 2);
|
|
162
|
+
i([
|
|
163
|
+
o({ type: Boolean })
|
|
164
|
+
], t.prototype, "autoplay", 2);
|
|
165
|
+
i([
|
|
166
|
+
o({ type: Boolean })
|
|
167
|
+
], t.prototype, "muted", 2);
|
|
168
|
+
i([
|
|
169
|
+
o({ type: Boolean })
|
|
170
|
+
], t.prototype, "loop", 2);
|
|
171
|
+
i([
|
|
172
|
+
o({ type: Boolean })
|
|
173
|
+
], t.prototype, "controls", 2);
|
|
174
|
+
i([
|
|
175
|
+
y()
|
|
176
|
+
], t.prototype, "_hasPlayed", 2);
|
|
177
|
+
i([
|
|
178
|
+
u("video")
|
|
179
|
+
], t.prototype, "_videoElement", 2);
|
|
180
|
+
t = i([
|
|
181
|
+
m(`${b}-video`)
|
|
182
|
+
], t);
|
|
183
|
+
export {
|
|
184
|
+
t as Video
|
|
185
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
const u = "onscrollend" in window;
|
|
2
|
+
if (!u) {
|
|
3
|
+
let s = function(r, e, l) {
|
|
4
|
+
let t = r[e];
|
|
5
|
+
r[e] = function() {
|
|
6
|
+
let n = Array.prototype.slice.apply(arguments, [0]);
|
|
7
|
+
t.apply(this, n), n.unshift(t), l.apply(this, n);
|
|
8
|
+
};
|
|
9
|
+
}, i = function(r, e) {
|
|
10
|
+
if (e != "scroll" && e != "scrollend")
|
|
11
|
+
return;
|
|
12
|
+
let l = this, t = o.get(l);
|
|
13
|
+
if (t === void 0) {
|
|
14
|
+
let n = 0;
|
|
15
|
+
t = {
|
|
16
|
+
scrollListener: (p) => {
|
|
17
|
+
clearTimeout(n), n = setTimeout(() => {
|
|
18
|
+
c.size ? setTimeout(t.scrollListener, 100) : (l.dispatchEvent(a), n = 0);
|
|
19
|
+
}, 100);
|
|
20
|
+
},
|
|
21
|
+
listeners: 0
|
|
22
|
+
// Count of number of listeners.
|
|
23
|
+
}, r.apply(l, ["scroll", t.scrollListener]), o.set(l, t);
|
|
24
|
+
}
|
|
25
|
+
t.listeners++;
|
|
26
|
+
}, d = function(r, e, l) {
|
|
27
|
+
if (e != "scroll" && e != "scrollend")
|
|
28
|
+
return;
|
|
29
|
+
let t = this, n = o.get(t);
|
|
30
|
+
n !== void 0 && (n[e]--, !(--n.listeners > 0) && (r.apply(t, ["scroll", n.scrollListener]), o.delete(t)));
|
|
31
|
+
};
|
|
32
|
+
var f = s, v = i, h = d;
|
|
33
|
+
const a = new Event("scrollend"), c = /* @__PURE__ */ new Set();
|
|
34
|
+
document.addEventListener("touchstart", (r) => {
|
|
35
|
+
for (let e of r.changedTouches)
|
|
36
|
+
c.add(e.identifier);
|
|
37
|
+
}, { passive: !0 }), document.addEventListener("touchend", (r) => {
|
|
38
|
+
for (let e of r.changedTouches)
|
|
39
|
+
c.delete(e.identifier);
|
|
40
|
+
}, { passive: !0 });
|
|
41
|
+
let o = /* @__PURE__ */ new WeakMap();
|
|
42
|
+
s(Element.prototype, "addEventListener", i), s(window, "addEventListener", i), s(document, "addEventListener", i), s(Element.prototype, "removeEventListener", d), s(window, "removeEventListener", d), s(document, "removeEventListener", d);
|
|
43
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { settings as e } from "./settings.js";
|
|
2
|
+
function n() {
|
|
3
|
+
const t = e.globalConstructedStyleSheet;
|
|
4
|
+
if (window.constructibleStyleSheets !== void 0 && window.constructibleStyleSheets[t] !== void 0)
|
|
5
|
+
return window.constructibleStyleSheets[t];
|
|
6
|
+
}
|
|
7
|
+
export {
|
|
8
|
+
n as themeStyleSheet
|
|
9
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
function n(t) {
|
|
2
|
+
const r = t == null ? void 0 : t.split(",");
|
|
3
|
+
if (r !== void 0 && Array.isArray(r) && r.length && r.length <= 4)
|
|
4
|
+
return r.length === 1 ? Array(4).fill(r[0]).flat() : r.length === 2 ? Array(2).fill(r).flat() : (r.length === 3 && r.push(r[1]), r);
|
|
5
|
+
if (r !== void 0 && Array.isArray(r) && r.length > 4) {
|
|
6
|
+
console.log("Maximum 4 values required in padding array.");
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
function l(t) {
|
|
11
|
+
let r = [];
|
|
12
|
+
if (Array.isArray(t) && t && t.length) {
|
|
13
|
+
t.forEach((e) => {
|
|
14
|
+
e.map((o) => o === "" ? "0" : o);
|
|
15
|
+
}), r = t[0];
|
|
16
|
+
for (let e = 1; e < t.length; e++)
|
|
17
|
+
if (Array.isArray(t[e]) && t[e] !== void 0)
|
|
18
|
+
for (let o = 0; o < t[e].length; o++)
|
|
19
|
+
t[e][o] !== "" && (r[o] = t[e][o]);
|
|
20
|
+
const i = r.map((e) => (Number(e) / 16).toString() + "rem");
|
|
21
|
+
return {
|
|
22
|
+
unitless: {
|
|
23
|
+
top: r[0],
|
|
24
|
+
right: r[1],
|
|
25
|
+
bottom: r[2],
|
|
26
|
+
left: r[3]
|
|
27
|
+
},
|
|
28
|
+
rem: {
|
|
29
|
+
top: (Number(r[0]) / 16).toString() + "rem",
|
|
30
|
+
right: (Number(r[1]) / 16).toString() + "rem",
|
|
31
|
+
bottom: (Number(r[2]) / 16).toString() + "rem",
|
|
32
|
+
left: (Number(r[3]) / 16).toString() + "rem"
|
|
33
|
+
},
|
|
34
|
+
cssRem: i.join(" ")
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
function m(t) {
|
|
39
|
+
if (t)
|
|
40
|
+
return t.split(",").map((e) => e !== "0" ? (Number(e) / 16).toString() + "rem" : "0").join(" ");
|
|
41
|
+
}
|
|
42
|
+
export {
|
|
43
|
+
l as mergePaddingArrays,
|
|
44
|
+
n as paddingToCssShorthandArray,
|
|
45
|
+
m as paddingToRem
|
|
46
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import "../../../node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/reactive-element.js";
|
|
2
|
+
import "../../../node_modules/.pnpm/lit-html@3.1.2/node_modules/lit-html/lit-html.js";
|
|
3
|
+
import "../../../node_modules/.pnpm/lit-element@4.0.4/node_modules/lit-element/lit-element.js";
|
|
4
|
+
import { css as o } from "../../../node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/css-tag.js";
|
|
5
|
+
const a = o`
|
|
6
|
+
.button {
|
|
7
|
+
cursor: pointer;
|
|
8
|
+
font-family: var(--um-font-family-button, --um-font-family-body, Roboto, Arial, Helvetica, sans-serif);
|
|
9
|
+
font-weight: var(--um-font-weight-button, --um-font-weight-regular, 400);
|
|
10
|
+
font-size: var( --um-font-size-button-default, --um-font-size-body-sm, 0.875rem);
|
|
11
|
+
letter-spacing: 0.06rem;
|
|
12
|
+
color: rgb(var(--um-color-button-primary-text, var(--um-color-page-bg, 255,255,255)),1);
|
|
13
|
+
background-color: rgba(var(--um-color-button-primary-bg, var(--um-color-page-text, 62,62,62)),var(--um-opacity-button-bg, 1));
|
|
14
|
+
background-clip:padding-box;
|
|
15
|
+
border-color: rgba(var(--um-color-button-primary-bg, var(--um-color-page-text, 62,62,62)), var(--um-opacity-button-bg, 1));
|
|
16
|
+
border-radius: var(--um-border-button-radius, 0);
|
|
17
|
+
border-width: var(--um-border-button-width, 0.0625rem);
|
|
18
|
+
border-style: solid;
|
|
19
|
+
outline: none;
|
|
20
|
+
appearance: none;
|
|
21
|
+
text-decoration: none;
|
|
22
|
+
appearance: none;
|
|
23
|
+
--webkit-appearance: none;
|
|
24
|
+
}
|
|
25
|
+
a.button {
|
|
26
|
+
display: inline-flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
justify-content: center;
|
|
29
|
+
line-height: normal;
|
|
30
|
+
}
|
|
31
|
+
.button:not(.btn--plain):not(.btn--plain-underline):not(.btn--outline):hover {
|
|
32
|
+
box-shadow: 0 0 0 0.0625rem rgb(var(--um-color-button-primary-bg, var(--um-color-page-text, 62,62,62)));
|
|
33
|
+
}
|
|
34
|
+
.button[disabled],
|
|
35
|
+
.button[disabled]:hover {
|
|
36
|
+
cursor: default;
|
|
37
|
+
color: rgb(var(--um-color-button-primary-text, var(--um-color-page-bg, 255,255,255)),0.5);
|
|
38
|
+
}
|
|
39
|
+
.button[disabled]:not(.btn--plain):not(.btn--plain-underline):not(.btn--outline),
|
|
40
|
+
.button[disabled]:not(.btn--plain):not(.btn--plain-underline):not(.btn--outline):hover {
|
|
41
|
+
background-color: rgba(var(--um-color-button-primary-bg, var(--um-color-page-text, 62,62,62)),var(--um-opacity-button-bg, 0.5));
|
|
42
|
+
border: none;
|
|
43
|
+
box-shadow: none;
|
|
44
|
+
}
|
|
45
|
+
.button:active {
|
|
46
|
+
outline: none;
|
|
47
|
+
}
|
|
48
|
+
.button:focus-visible {
|
|
49
|
+
outline-offset: 0.1875rem;
|
|
50
|
+
outline: 0.125rem solid rgba(var(--um-color-button-primary-bg, var(--um-color-page-text, 62,62,62)),1);
|
|
51
|
+
}
|
|
52
|
+
`;
|
|
53
|
+
export {
|
|
54
|
+
a as buttonState
|
|
55
|
+
};
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import "../../../node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/reactive-element.js";
|
|
2
|
+
import "../../../node_modules/.pnpm/lit-html@3.1.2/node_modules/lit-html/lit-html.js";
|
|
3
|
+
import "../../../node_modules/.pnpm/lit-element@4.0.4/node_modules/lit-element/lit-element.js";
|
|
4
|
+
import { css as t } from "../../../node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/css-tag.js";
|
|
5
|
+
const n = t`
|
|
6
|
+
.txt--headingXs,
|
|
7
|
+
.txt--headingSm,
|
|
8
|
+
.txt--headingMd,
|
|
9
|
+
.txt--headingLg,
|
|
10
|
+
.txt--headingXl,
|
|
11
|
+
.txt--heading2xl,
|
|
12
|
+
.txt--heading3xl,
|
|
13
|
+
.txt--heading4xl,
|
|
14
|
+
.txt--heading5xl {
|
|
15
|
+
font-family: var(--um-font-family-heading, 'Roboto Serif', Times, 'Times New Roman', Georgia, serif);
|
|
16
|
+
}
|
|
17
|
+
.txt--bodyXs,
|
|
18
|
+
.txt--bodySm,
|
|
19
|
+
.txt--bodyMd,
|
|
20
|
+
.txt--bodyLg,
|
|
21
|
+
.txt--bodyXl,
|
|
22
|
+
.txt--body2xl,
|
|
23
|
+
.txt--body3xl,
|
|
24
|
+
.txt--body4xl,
|
|
25
|
+
.txt--body5xl {
|
|
26
|
+
font-family: var(--um-font-family-body, Roboto, Arial, Helvetica, sans-serif);
|
|
27
|
+
}
|
|
28
|
+
.txt--headingXs {
|
|
29
|
+
font-size: var(--um-font-size-heading-xs, 0.75rem);
|
|
30
|
+
line-height: calc(1 + 0.2 / max(1, var(--um-font-size-heading-scale, 1)));
|
|
31
|
+
}
|
|
32
|
+
.txt--headingSm {
|
|
33
|
+
font-size: var(--um-font-size-heading-sm, 0.875rem);
|
|
34
|
+
line-height: calc(1 + 0.2 / max(1, var(--um-font-size-heading-scale, 1)));
|
|
35
|
+
}
|
|
36
|
+
.txt--headingMd {
|
|
37
|
+
font-size: var(--um-font-size-heading-md, 1rem);
|
|
38
|
+
line-height: calc(1 + 0.15 / max(1, var(--um-font-size-heading-scale, 1)));
|
|
39
|
+
}
|
|
40
|
+
.txt--headingLg {
|
|
41
|
+
font-size: calc(var(--um-font-size-heading-scale, 1) * var(--um-font-size-heading-lg, 1.25rem));
|
|
42
|
+
line-height: calc(1 + 0.15 / max(1, var(--um-font-size-heading-scale, 1)));
|
|
43
|
+
}
|
|
44
|
+
.txt--headingXl {
|
|
45
|
+
font-size: calc(var(--um-font-size-heading-scale, 1) * var(--um-font-size-heading-xl, 1.5rem));
|
|
46
|
+
line-height: calc(1 + 0.15 / max(1, var(--um-font-size-heading-scale, 1)));
|
|
47
|
+
}
|
|
48
|
+
.txt--heading2xl {
|
|
49
|
+
font-size: calc(var(--um-font-size-heading-scale, 1) * var(--um-font-size-heading-2xl, 1.75rem));
|
|
50
|
+
line-height: calc(1 + 0.15 / max(1, var(--um-font-size-heading-scale, 1)));
|
|
51
|
+
}
|
|
52
|
+
.txt--heading3xl {
|
|
53
|
+
font-size: calc(var(--um-font-size-heading-scale, 1) * var(--um-font-size-heading-3xl, 2rem));
|
|
54
|
+
line-height: calc(1 + 0.15 / max(1, var(--um-font-size-heading-scale, 1)));
|
|
55
|
+
}
|
|
56
|
+
.txt--heading4xl {
|
|
57
|
+
font-size: calc(var(--um-font-size-heading-scale, 1) * var(--um-font-size-heading-4xl, 3rem));
|
|
58
|
+
line-height: calc(1 + 0 / max(1, var(--um-font-size-heading-scale, 1)));
|
|
59
|
+
}
|
|
60
|
+
.txt--heading5xl {
|
|
61
|
+
font-size: calc(var(--um-font-size-heading-scale, 1) * var(--um-font-size-heading-5xl, 4rem));
|
|
62
|
+
line-height: calc(1 + 0 / max(1, var(--um-font-size-heading-scale, 1)));
|
|
63
|
+
}
|
|
64
|
+
.txt--bodyXs {
|
|
65
|
+
font-size: var(--um-font-size-body-xs, 0.75rem);
|
|
66
|
+
line-height: calc(1 + 0.2 / max(1, var(--um-font-size-body-scale, 1)));
|
|
67
|
+
}
|
|
68
|
+
.txt--bodySm {
|
|
69
|
+
font-size: var(--um-font-size-body-sm, 0.875rem);
|
|
70
|
+
line-height: calc(1 + 0.2 / max(1, var(--um-font-size-body-scale, 1)));
|
|
71
|
+
}
|
|
72
|
+
.txt--bodyMd {
|
|
73
|
+
font-size: calc(var(--um-font-size-body-scale, 1) * var(--um-font-size-body-md, 1rem));
|
|
74
|
+
line-height: calc(1 + 0.3 / max(1, var(--um-font-size-body-scale, 1)));
|
|
75
|
+
}
|
|
76
|
+
.txt--bodyLg {
|
|
77
|
+
font-size: calc(var(--um-font-size-body-scale, 1) * var(--um-font-size-body-lg, 1.25rem));
|
|
78
|
+
line-height: calc(1 + 0.25 / max(1, var(--um-font-size-body-scale, 1)));
|
|
79
|
+
}
|
|
80
|
+
.txt--bodyXl {
|
|
81
|
+
font-size: calc(var(--um-font-size-body-scale, 1) * var(--um-font-size-body-xl, 1.5rem));
|
|
82
|
+
line-height: calc(1 + 0.25 / max(1, var(--um-font-size-body-scale, 1)));
|
|
83
|
+
}
|
|
84
|
+
.txt--body2xl {
|
|
85
|
+
font-size: calc(var(--um-font-size-body-scale, 1) * var(--um-font-size-body-2xl, 1.75rem));
|
|
86
|
+
line-height: calc(1 + 0.15 / max(1, var(--um-font-size-body-scale, 1)));
|
|
87
|
+
}
|
|
88
|
+
.txt--body3xl {
|
|
89
|
+
font-size: calc(var(--um-font-size-body-scale, 1) * var(--um-font-size-body-3xl, 2rem));
|
|
90
|
+
line-height: calc(1 + 0.15 / max(1, var(--um-font-size-body-scale, 1)));
|
|
91
|
+
}
|
|
92
|
+
.txt--body4xl {
|
|
93
|
+
font-size: calc(var(--um-font-size-body-scale, 1) * var(--um-font-size-body-4xl, 3rem));
|
|
94
|
+
line-height: calc(1 + 0 / max(1, var(--um-font-size-body-scale, 1)));
|
|
95
|
+
}
|
|
96
|
+
.txt--body5xl {
|
|
97
|
+
font-size: calc(var(--um-font-size-body-scale, 1) * var(--um-font-size-body-5xl, 4rem));
|
|
98
|
+
line-height: calc(1 + 0 / max(1, var(--um-font-size-body-scale, 1)));
|
|
99
|
+
}
|
|
100
|
+
`, m = t`
|
|
101
|
+
.txt--light {
|
|
102
|
+
font-weight: var(--um-font-weight-light, 300);
|
|
103
|
+
}
|
|
104
|
+
.txt--regular {
|
|
105
|
+
font-weight: var(--um-font-weight-regular, 400);
|
|
106
|
+
}
|
|
107
|
+
.txt--medium {
|
|
108
|
+
font-weight: var(--um-font-weight-medium, 500);
|
|
109
|
+
}
|
|
110
|
+
.txt--semibold {
|
|
111
|
+
font-weight: var(--um-font-weight-semibold, 600);
|
|
112
|
+
}
|
|
113
|
+
.txt--bold {
|
|
114
|
+
font-weight: var(--um-font-weight-bold, 700);
|
|
115
|
+
}
|
|
116
|
+
.txt--extrabold {
|
|
117
|
+
font-weight: var(--um-font-weight-extrabold, 800);
|
|
118
|
+
}
|
|
119
|
+
.txt--black {
|
|
120
|
+
font-weight: var(--um-font-weight-black, 900);
|
|
121
|
+
}
|
|
122
|
+
`, l = t`
|
|
123
|
+
.txt--headingXs {
|
|
124
|
+
margin-bottom: var(--um-space-4, 0.25rem);
|
|
125
|
+
}
|
|
126
|
+
.txt--headingSm {
|
|
127
|
+
margin-bottom: var(--um-space-8, 0.5rem);
|
|
128
|
+
}
|
|
129
|
+
.txt--headingMd {
|
|
130
|
+
margin-bottom: var(--um-space-12, 0.75rem);
|
|
131
|
+
}
|
|
132
|
+
.txt--headingLg {
|
|
133
|
+
margin-bottom: var(--um-space-12, 0.75rem);
|
|
134
|
+
}
|
|
135
|
+
.txt--headingXl {
|
|
136
|
+
margin-bottom: var(--um-space-16, 1rem);
|
|
137
|
+
}
|
|
138
|
+
.txt--heading2xl {
|
|
139
|
+
margin-bottom: var(--um-space-16, 1rem);
|
|
140
|
+
}
|
|
141
|
+
.txt--heading3xl {
|
|
142
|
+
margin-bottom: var(--um-space-16, 1rem);
|
|
143
|
+
}
|
|
144
|
+
.txt--heading4xl {
|
|
145
|
+
margin-bottom: var(--um-space-20, 1.25rem);
|
|
146
|
+
}
|
|
147
|
+
.txt--heading5xl {
|
|
148
|
+
margin-bottom: var(--um-space-24, 1.5rem);
|
|
149
|
+
}
|
|
150
|
+
.txt--bodyXs {
|
|
151
|
+
margin-bottom: var(--um-space-4, 0.25rem);
|
|
152
|
+
}
|
|
153
|
+
.txt--bodySm {
|
|
154
|
+
margin-bottom: var(--um-space-8, 0.5rem);
|
|
155
|
+
}
|
|
156
|
+
.txt--bodyMd,
|
|
157
|
+
.txt--bodyLg,
|
|
158
|
+
.txt--bodyXl,
|
|
159
|
+
.txt--body2xl,
|
|
160
|
+
.txt--body3xl,
|
|
161
|
+
.txt--body4xl,
|
|
162
|
+
.txt--body5xl {
|
|
163
|
+
margin-bottom: var(--pu-space-12, 0.75rem);
|
|
164
|
+
}
|
|
165
|
+
`, s = t`
|
|
166
|
+
.txt--italic {
|
|
167
|
+
font-style: italic;
|
|
168
|
+
}
|
|
169
|
+
.txt--oblique {
|
|
170
|
+
font-style: oblique;
|
|
171
|
+
}
|
|
172
|
+
.txt--normal {
|
|
173
|
+
font-style: normal;
|
|
174
|
+
}
|
|
175
|
+
`;
|
|
176
|
+
export {
|
|
177
|
+
l as fontMargins,
|
|
178
|
+
n as fontSizes,
|
|
179
|
+
s as fontStyle,
|
|
180
|
+
m as fontWeights
|
|
181
|
+
};
|