@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,339 @@
|
|
|
1
|
+
import "../../../../node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/reactive-element.js";
|
|
2
|
+
import { html as o } from "../../../../node_modules/.pnpm/lit-html@3.1.2/node_modules/lit-html/lit-html.js";
|
|
3
|
+
import { LitElement as m } from "../../../../node_modules/.pnpm/lit-element@4.0.4/node_modules/lit-element/lit-element.js";
|
|
4
|
+
import { customElement as c } from "../../../../node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/decorators/custom-element.js";
|
|
5
|
+
import { property as i } from "../../../../node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/decorators/property.js";
|
|
6
|
+
import { classMap as d } from "../../../../node_modules/.pnpm/lit-html@3.1.2/node_modules/lit-html/directives/class-map.js";
|
|
7
|
+
import { query as b } from "../../../../node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/decorators/query.js";
|
|
8
|
+
import { ifDefined as h } from "../../../../node_modules/.pnpm/lit-html@3.1.2/node_modules/lit-html/directives/if-defined.js";
|
|
9
|
+
import { debounce as f } from "../../scripts/utilities/debounce.js";
|
|
10
|
+
import { global as v } from "../../styles/global.js";
|
|
11
|
+
import { settings as y } from "../../scripts/settings.js";
|
|
12
|
+
import { mergeStyles as g } from "../../scripts/mergeStyles.js";
|
|
13
|
+
import "../button-icon/button-icon.js";
|
|
14
|
+
import { css as x } from "../../../../node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/css-tag.js";
|
|
15
|
+
var $ = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, t = (r, n, a, l) => {
|
|
16
|
+
for (var s = l > 1 ? void 0 : l ? _(n, a) : n, u = r.length - 1, p; u >= 0; u--)
|
|
17
|
+
(p = r[u]) && (s = (l ? p(n, a, s) : p(s)) || s);
|
|
18
|
+
return l && s && $(n, a, s), s;
|
|
19
|
+
};
|
|
20
|
+
const { prefix: w } = y;
|
|
21
|
+
let e = class extends m {
|
|
22
|
+
constructor() {
|
|
23
|
+
super(...arguments), this.hideLabel = !1, this.layout = "arrows", this.placeholder = void 0, this.disabled = !1, this.required = !1, this.id = "", this.error = !1, this.name = "", this.value = "1", this.step = 1, this.min = 1, this.max = 1e3;
|
|
24
|
+
}
|
|
25
|
+
changeEvent() {
|
|
26
|
+
this.dispatchEvent(new CustomEvent("change", {
|
|
27
|
+
detail: {
|
|
28
|
+
eventName: this.name,
|
|
29
|
+
fieldId: this.id,
|
|
30
|
+
value: this.value
|
|
31
|
+
},
|
|
32
|
+
bubbles: !0,
|
|
33
|
+
composed: !0
|
|
34
|
+
}));
|
|
35
|
+
}
|
|
36
|
+
setNumericalValue(r) {
|
|
37
|
+
this.disabled = !0;
|
|
38
|
+
const n = this.value;
|
|
39
|
+
this._input && (r === "plus" ? (this._input.stepUp(), this.value = this._input.value, this.disabled = !1) : r === "minus" ? (this._input.stepDown(), this.value = this._input.value, this.disabled = !1) : (this.value = this._input.value, this.disabled = !1)), n !== this.value && f(() => {
|
|
40
|
+
this.changeEvent();
|
|
41
|
+
}, 500)();
|
|
42
|
+
}
|
|
43
|
+
fieldClasses() {
|
|
44
|
+
return {
|
|
45
|
+
"label-hidden": this.hideLabel,
|
|
46
|
+
"field--required": this.required,
|
|
47
|
+
"field--symbols": this.layout === "symbols",
|
|
48
|
+
"field--min": Number(this.value) === this.min,
|
|
49
|
+
"field--max": Number(this.value) >= this.max
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
inputClasses() {
|
|
53
|
+
return {
|
|
54
|
+
"input--error": this.error
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
labelClasses() {
|
|
58
|
+
return {
|
|
59
|
+
"visually-hidden": this.hideLabel
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
renderLabel() {
|
|
63
|
+
return o`
|
|
64
|
+
<label class="field__label${d(this.labelClasses())}" for="${this.id}">
|
|
65
|
+
<slot name="label">
|
|
66
|
+
<umg-text as="span" variant="bodySm">Label:</umg-text>
|
|
67
|
+
</slot>
|
|
68
|
+
</label>
|
|
69
|
+
`;
|
|
70
|
+
}
|
|
71
|
+
renderButtons() {
|
|
72
|
+
return this.layout === "symbols" ? o`
|
|
73
|
+
<umg-button-icon
|
|
74
|
+
part="increase"
|
|
75
|
+
class="spinner increase"
|
|
76
|
+
icon="plus"
|
|
77
|
+
size="small"
|
|
78
|
+
@click="${() => this.setNumericalValue("plus")}"
|
|
79
|
+
>
|
|
80
|
+
</umg-button-icon>
|
|
81
|
+
<umg-button-icon
|
|
82
|
+
part="decrease"
|
|
83
|
+
class="spinner decrease"
|
|
84
|
+
icon="minus"
|
|
85
|
+
size="small"
|
|
86
|
+
@click="${() => this.setNumericalValue("minus")}"
|
|
87
|
+
>
|
|
88
|
+
</umg-button-icon>
|
|
89
|
+
` : o`
|
|
90
|
+
<umg-button-icon
|
|
91
|
+
part="increase"
|
|
92
|
+
class="spinner increase"
|
|
93
|
+
icon="chevron-up"
|
|
94
|
+
size="xSmall"
|
|
95
|
+
@click="${() => this.setNumericalValue("plus")}"
|
|
96
|
+
>
|
|
97
|
+
</umg-button-icon>
|
|
98
|
+
<umg-button-icon
|
|
99
|
+
part="decrease"
|
|
100
|
+
class="spinner decrease"
|
|
101
|
+
icon="chevron-down"
|
|
102
|
+
size="xSmall"
|
|
103
|
+
@click="${() => this.setNumericalValue("minus")}"
|
|
104
|
+
>
|
|
105
|
+
</umg-button-icon>
|
|
106
|
+
`;
|
|
107
|
+
}
|
|
108
|
+
renderNumber() {
|
|
109
|
+
return o`
|
|
110
|
+
<div class="input-container">
|
|
111
|
+
${this.renderButtons()}
|
|
112
|
+
<input
|
|
113
|
+
part="text-field"
|
|
114
|
+
class="input${d(this.inputClasses())}"
|
|
115
|
+
id="${this.id}"
|
|
116
|
+
name="${this.name}"
|
|
117
|
+
step="${this.step}"
|
|
118
|
+
min="${this.min}"
|
|
119
|
+
max="${this.max}"
|
|
120
|
+
type="number"
|
|
121
|
+
value="${this.value}"
|
|
122
|
+
?disabled="${this.disabled}"
|
|
123
|
+
?required="${this.required}"
|
|
124
|
+
placeholder="${h(this.placeholder)}"
|
|
125
|
+
@keyup="${() => this.setNumericalValue("value")}"
|
|
126
|
+
>
|
|
127
|
+
</div>
|
|
128
|
+
`;
|
|
129
|
+
}
|
|
130
|
+
renderErrorMessage() {
|
|
131
|
+
if (this.error)
|
|
132
|
+
return o`
|
|
133
|
+
<span class="error-text">
|
|
134
|
+
<slot name="error-message"></slot>
|
|
135
|
+
</span>
|
|
136
|
+
`;
|
|
137
|
+
}
|
|
138
|
+
render() {
|
|
139
|
+
return o`
|
|
140
|
+
<div class="field${d(this.fieldClasses())}">
|
|
141
|
+
<div class="field__inner">
|
|
142
|
+
${this.renderLabel()}
|
|
143
|
+
${this.renderNumber()}
|
|
144
|
+
${this.renderErrorMessage()}
|
|
145
|
+
</div>
|
|
146
|
+
</div>
|
|
147
|
+
`;
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
e.styles = g([
|
|
151
|
+
v,
|
|
152
|
+
x`
|
|
153
|
+
:host([disabled]) {
|
|
154
|
+
opacity: 0.4;
|
|
155
|
+
pointer-events: none;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
:host([disabled]) .spinner:hover {
|
|
159
|
+
background-color: rgb(0,0,0,0);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/** Field container */
|
|
163
|
+
.field {
|
|
164
|
+
display: flex;
|
|
165
|
+
flex-direction: column;
|
|
166
|
+
position: relative;
|
|
167
|
+
font-size: var(--um-font-size-bodySm, 0.875rem);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.field:not(.label-hidden) .field__inner {
|
|
171
|
+
display: flex;
|
|
172
|
+
flex-direction: column;
|
|
173
|
+
align-items: flex-start;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/** Property styles */
|
|
177
|
+
.field--inline .field__inner {
|
|
178
|
+
flex-direction: row;
|
|
179
|
+
}
|
|
180
|
+
.field--required .input-container::before {
|
|
181
|
+
content: '';
|
|
182
|
+
position: absolute;
|
|
183
|
+
top: 0;
|
|
184
|
+
left: 0;
|
|
185
|
+
bottom: 0;
|
|
186
|
+
display: block;
|
|
187
|
+
border-right: 0.25rem solid rgba(var(--um-color-base-text-warning, 200,0,0), 0.7);
|
|
188
|
+
width: 0;
|
|
189
|
+
height: 100%;
|
|
190
|
+
z-index: 1;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/* Field label */
|
|
194
|
+
.field__label {
|
|
195
|
+
color: inherit;
|
|
196
|
+
font-size: inherit;
|
|
197
|
+
margin-bottom: var(--um-space-4, 0.25rem);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/* Input container */
|
|
201
|
+
.input-container {
|
|
202
|
+
position: relative;
|
|
203
|
+
-moz-appearance: textfield;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/* Input tag */
|
|
207
|
+
input {
|
|
208
|
+
border: var(--um-border-input-width, 0.0625rem) solid rgba(var(--um-color-input-border, var(--um-color-section-text, 0,0,0), var(--um-opacity-input-border, 0.2)));
|
|
209
|
+
border-radius: var(--um-border-input-radius, 0);
|
|
210
|
+
font-family: var(--um-font-family-body, Roboto, Arial, Helvetica, sans-serif);
|
|
211
|
+
font-size: inherit;
|
|
212
|
+
padding: 0 var(--um-space-8, 0.5rem);
|
|
213
|
+
height: var(--um-space-40);
|
|
214
|
+
width: 3.5rem;
|
|
215
|
+
}
|
|
216
|
+
input::-webkit-outer-spin-button {
|
|
217
|
+
appearance: none;
|
|
218
|
+
}
|
|
219
|
+
input::-webkit-inner-spin-button {
|
|
220
|
+
appearance: none;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/** Input states */
|
|
224
|
+
.input--error {
|
|
225
|
+
border: 0.0625rem solid rgba(var(--um-color-base-text-warning, 245,0,0), 1);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/** Spinner buttons */
|
|
229
|
+
:host(:not([disabled])) .field--min .spinner.decrease::part(button-icon) {
|
|
230
|
+
opacity: 0.4;
|
|
231
|
+
pointer-events: none;
|
|
232
|
+
cursor: default;
|
|
233
|
+
}
|
|
234
|
+
:host(:not([disabled])) .field--max .spinner.increase::part(button-icon) {
|
|
235
|
+
opacity: 0.4;
|
|
236
|
+
pointer-events: none;
|
|
237
|
+
cursor: default;
|
|
238
|
+
}
|
|
239
|
+
.spinner {
|
|
240
|
+
position: absolute;
|
|
241
|
+
height: 50%;
|
|
242
|
+
right: 0rem;
|
|
243
|
+
border-left: 0.0625rem solid rgba(var(--um-color-input-border, var(--um-color-section-text, 0,0,0), var(--um-opacity-input-border, 0.2)));
|
|
244
|
+
--um-space-button-icon-padding: 0;
|
|
245
|
+
}
|
|
246
|
+
.spinner::part(button-icon) {
|
|
247
|
+
padding: 0.2rem;
|
|
248
|
+
}
|
|
249
|
+
.spinner:hover {
|
|
250
|
+
background-color: rgb(0,0,0,0.1);
|
|
251
|
+
}
|
|
252
|
+
.spinner.increase {
|
|
253
|
+
top: 0;
|
|
254
|
+
}
|
|
255
|
+
.spinner.decrease {
|
|
256
|
+
bottom: 0;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/** Symbol spinner buttons */
|
|
260
|
+
.field--symbols .input-container {
|
|
261
|
+
display: flex;
|
|
262
|
+
align-items: stretch;
|
|
263
|
+
}
|
|
264
|
+
.field--symbols input {
|
|
265
|
+
order: 2;
|
|
266
|
+
text-align: center;
|
|
267
|
+
height: 1.75rem;
|
|
268
|
+
width: 2.5rem;
|
|
269
|
+
}
|
|
270
|
+
.field--symbols .spinner {
|
|
271
|
+
border: none;
|
|
272
|
+
position: relative;
|
|
273
|
+
height: 1.75rem;
|
|
274
|
+
}
|
|
275
|
+
.field--symbols .spinner::part(button-icon) {
|
|
276
|
+
padding: 0.45rem;
|
|
277
|
+
}
|
|
278
|
+
.field--symbols .spinner.increase {
|
|
279
|
+
border-left: none;
|
|
280
|
+
order: 3;
|
|
281
|
+
}
|
|
282
|
+
.field--symbols .spinner.decrease {
|
|
283
|
+
border-right: none;
|
|
284
|
+
order: 1;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/** Error text */
|
|
288
|
+
.error-text {
|
|
289
|
+
color: rgba(var(--um-color-base-text-warning, 245,0,0), 1);
|
|
290
|
+
font-size: calc(var(--um-font-size-body-scale, 1) * var(--um-font-size-body-sm, 0.875rem));
|
|
291
|
+
padding-top: var(--um-space-4, 0.25rem);
|
|
292
|
+
}
|
|
293
|
+
`
|
|
294
|
+
]);
|
|
295
|
+
t([
|
|
296
|
+
i({ type: Boolean })
|
|
297
|
+
], e.prototype, "hideLabel", 2);
|
|
298
|
+
t([
|
|
299
|
+
i()
|
|
300
|
+
], e.prototype, "layout", 2);
|
|
301
|
+
t([
|
|
302
|
+
i()
|
|
303
|
+
], e.prototype, "placeholder", 2);
|
|
304
|
+
t([
|
|
305
|
+
i({ type: Boolean, reflect: !0 })
|
|
306
|
+
], e.prototype, "disabled", 2);
|
|
307
|
+
t([
|
|
308
|
+
i({ type: Boolean })
|
|
309
|
+
], e.prototype, "required", 2);
|
|
310
|
+
t([
|
|
311
|
+
i()
|
|
312
|
+
], e.prototype, "id", 2);
|
|
313
|
+
t([
|
|
314
|
+
i({ type: Boolean })
|
|
315
|
+
], e.prototype, "error", 2);
|
|
316
|
+
t([
|
|
317
|
+
i()
|
|
318
|
+
], e.prototype, "name", 2);
|
|
319
|
+
t([
|
|
320
|
+
i({ reflect: !0 })
|
|
321
|
+
], e.prototype, "value", 2);
|
|
322
|
+
t([
|
|
323
|
+
i({ type: Number })
|
|
324
|
+
], e.prototype, "step", 2);
|
|
325
|
+
t([
|
|
326
|
+
i({ type: Number })
|
|
327
|
+
], e.prototype, "min", 2);
|
|
328
|
+
t([
|
|
329
|
+
i({ type: Number })
|
|
330
|
+
], e.prototype, "max", 2);
|
|
331
|
+
t([
|
|
332
|
+
b("input")
|
|
333
|
+
], e.prototype, "_input", 2);
|
|
334
|
+
e = t([
|
|
335
|
+
c(`${w}-number-field`)
|
|
336
|
+
], e);
|
|
337
|
+
export {
|
|
338
|
+
e as NumberField
|
|
339
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import "../../../../node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/reactive-element.js";
|
|
2
|
+
import { html as p } 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 { 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 v } from "../../../../node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/decorators/property.js";
|
|
6
|
+
import { state as d } from "../../../../node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/decorators/state.js";
|
|
7
|
+
import { classMap as y } from "../../../../node_modules/.pnpm/lit-html@3.1.2/node_modules/lit-html/directives/class-map.js";
|
|
8
|
+
import { global as b } from "../../styles/global.js";
|
|
9
|
+
import { settings as h } from "../../scripts/settings.js";
|
|
10
|
+
import { mergeStyles as f } from "../../scripts/mergeStyles.js";
|
|
11
|
+
import { css as u } from "../../../../node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/css-tag.js";
|
|
12
|
+
var w = Object.defineProperty, O = Object.getOwnPropertyDescriptor, i = (r, s, l, t) => {
|
|
13
|
+
for (var e = t > 1 ? void 0 : t ? O(s, l) : s, n = r.length - 1, a; n >= 0; n--)
|
|
14
|
+
(a = r[n]) && (e = (t ? a(s, l, e) : a(e)) || e);
|
|
15
|
+
return t && e && w(s, l, e), e;
|
|
16
|
+
};
|
|
17
|
+
const { prefix: _ } = h;
|
|
18
|
+
let o = class extends c {
|
|
19
|
+
constructor() {
|
|
20
|
+
super(...arguments), this.colorText = "", this.colorBg = "", this._visible = !1;
|
|
21
|
+
}
|
|
22
|
+
connectedCallback() {
|
|
23
|
+
super.connectedCallback(), window.addEventListener("overlay-open", this.openOverlay.bind(this)), window.addEventListener("overlay-close", this.closeOverlay.bind(this));
|
|
24
|
+
}
|
|
25
|
+
disconnectedCallback() {
|
|
26
|
+
window.removeEventListener("overlay-open", this.openOverlay.bind(this)), window.removeEventListener("overlay-close", this.closeOverlay.bind(this)), super.disconnectedCallback();
|
|
27
|
+
}
|
|
28
|
+
openOverlay() {
|
|
29
|
+
this._visible = !0;
|
|
30
|
+
}
|
|
31
|
+
closeOverlay() {
|
|
32
|
+
this._visible = !1;
|
|
33
|
+
}
|
|
34
|
+
overlayClasses() {
|
|
35
|
+
const r = {};
|
|
36
|
+
return this._visible && (r["menu-overlay--visible"] = !0), r;
|
|
37
|
+
}
|
|
38
|
+
render() {
|
|
39
|
+
return p`
|
|
40
|
+
<div class="menu-overlay${y(this.overlayClasses())}"></div>
|
|
41
|
+
`;
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
o.styles = f([
|
|
45
|
+
b,
|
|
46
|
+
u`
|
|
47
|
+
.menu-overlay {
|
|
48
|
+
display: none;
|
|
49
|
+
position: absolute;
|
|
50
|
+
inset: 0;
|
|
51
|
+
height: 100%;
|
|
52
|
+
width: 100%;
|
|
53
|
+
z-index: 500;
|
|
54
|
+
background-color: rgb(var(--um-color-modal-bg, 0,0,0), 0.7);
|
|
55
|
+
pointer-events: none;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.menu-overlay--visible {
|
|
59
|
+
display: block;
|
|
60
|
+
}
|
|
61
|
+
`
|
|
62
|
+
]);
|
|
63
|
+
i([
|
|
64
|
+
v()
|
|
65
|
+
], o.prototype, "colorText", 2);
|
|
66
|
+
i([
|
|
67
|
+
v()
|
|
68
|
+
], o.prototype, "colorBg", 2);
|
|
69
|
+
i([
|
|
70
|
+
d()
|
|
71
|
+
], o.prototype, "_visible", 2);
|
|
72
|
+
o = i([
|
|
73
|
+
m(`${_}-overlay`)
|
|
74
|
+
], o);
|
|
75
|
+
export {
|
|
76
|
+
o as Overlay
|
|
77
|
+
};
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import "../../../../node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/reactive-element.js";
|
|
2
|
+
import { html as c } from "../../../../node_modules/.pnpm/lit-html@3.1.2/node_modules/lit-html/lit-html.js";
|
|
3
|
+
import { LitElement as g } from "../../../../node_modules/.pnpm/lit-element@4.0.4/node_modules/lit-element/lit-element.js";
|
|
4
|
+
import { customElement as n } from "../../../../node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/decorators/custom-element.js";
|
|
5
|
+
import { property as s } from "../../../../node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/decorators/property.js";
|
|
6
|
+
import { classMap as d } from "../../../../node_modules/.pnpm/lit-html@3.1.2/node_modules/lit-html/directives/class-map.js";
|
|
7
|
+
import { styleMap as h } from "../../../../node_modules/.pnpm/lit-html@3.1.2/node_modules/lit-html/directives/style-map.js";
|
|
8
|
+
import { global as u } from "../../styles/global.js";
|
|
9
|
+
import { settings as b } from "../../scripts/settings.js";
|
|
10
|
+
import { mergeStyles as f } from "../../scripts/mergeStyles.js";
|
|
11
|
+
import { css as v } from "../../../../node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/css-tag.js";
|
|
12
|
+
var y = Object.defineProperty, x = Object.getOwnPropertyDescriptor, o = (e, i, p, a) => {
|
|
13
|
+
for (var t = a > 1 ? void 0 : a ? x(i, p) : i, m = e.length - 1, l; m >= 0; m--)
|
|
14
|
+
(l = e[m]) && (t = (a ? l(i, p, t) : l(t)) || t);
|
|
15
|
+
return a && t && y(i, p, t), t;
|
|
16
|
+
};
|
|
17
|
+
const { prefix: _ } = b;
|
|
18
|
+
let r = class extends g {
|
|
19
|
+
constructor() {
|
|
20
|
+
super(...arguments), this.divider = !1, this.colorText = "", this.colorBg = "";
|
|
21
|
+
}
|
|
22
|
+
pageClasses() {
|
|
23
|
+
return {
|
|
24
|
+
"page--divider": this.divider
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
pageStyles() {
|
|
28
|
+
let e = {};
|
|
29
|
+
return this.sectionMargins && (e = {
|
|
30
|
+
...e,
|
|
31
|
+
"--um-space-section-margin-top": this.sectionMargins / 16 + "rem",
|
|
32
|
+
"--um-space-section-margin-bottom": this.sectionMargins / 16 + "rem"
|
|
33
|
+
}), this.width && (e = {
|
|
34
|
+
...e,
|
|
35
|
+
"--um-size-page-width": this.width / 16 + "rem"
|
|
36
|
+
}), this.colorText && (e = {
|
|
37
|
+
...e,
|
|
38
|
+
"--um-color-page-text": this.colorText
|
|
39
|
+
}), this.colorBg && (e = {
|
|
40
|
+
...e,
|
|
41
|
+
"--um-color-page-bg": this.colorBg
|
|
42
|
+
}), e;
|
|
43
|
+
}
|
|
44
|
+
render() {
|
|
45
|
+
return c`
|
|
46
|
+
<main
|
|
47
|
+
id="page"
|
|
48
|
+
class="page${d(this.pageClasses())}"
|
|
49
|
+
style="${h(this.pageStyles())}"
|
|
50
|
+
part="page"
|
|
51
|
+
>
|
|
52
|
+
<div class="page__inner" part="page-inner">
|
|
53
|
+
<slot></slot>
|
|
54
|
+
</div>
|
|
55
|
+
</main>
|
|
56
|
+
`;
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
r.styles = f([
|
|
60
|
+
u,
|
|
61
|
+
v`
|
|
62
|
+
:host {
|
|
63
|
+
display: block;
|
|
64
|
+
position: relative;
|
|
65
|
+
width: 100%;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.page {
|
|
69
|
+
color: rgb(var(--um-color-page-text, var(--um-color-base-text)));
|
|
70
|
+
background-color: rgb(var(--um-color-page-bg, var(--um-color-base-bg)));
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* Divider */
|
|
74
|
+
.page--divider {
|
|
75
|
+
border-bottom: 0.065rem solid rgba(var(--um-color-border),1);
|
|
76
|
+
border-top: 0.065rem solid rgba(var(--um-color-border),1);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/* First section's top margin is removed if set by the page */
|
|
80
|
+
::slotted(*:first-child) {
|
|
81
|
+
--um-space-section-margin-top: 0;
|
|
82
|
+
}
|
|
83
|
+
`
|
|
84
|
+
]);
|
|
85
|
+
o([
|
|
86
|
+
s({ type: Number })
|
|
87
|
+
], r.prototype, "width", 2);
|
|
88
|
+
o([
|
|
89
|
+
s({ type: Number })
|
|
90
|
+
], r.prototype, "sectionMargins", 2);
|
|
91
|
+
o([
|
|
92
|
+
s({ type: Boolean })
|
|
93
|
+
], r.prototype, "divider", 2);
|
|
94
|
+
o([
|
|
95
|
+
s()
|
|
96
|
+
], r.prototype, "colorText", 2);
|
|
97
|
+
o([
|
|
98
|
+
s()
|
|
99
|
+
], r.prototype, "colorBg", 2);
|
|
100
|
+
r = o([
|
|
101
|
+
n(`${_}-page`)
|
|
102
|
+
], r);
|
|
103
|
+
export {
|
|
104
|
+
r as Page
|
|
105
|
+
};
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import "../../../../node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/reactive-element.js";
|
|
2
|
+
import { html as a } 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 { customElement as v } from "../../../../node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/decorators/custom-element.js";
|
|
5
|
+
import { property as m } from "../../../../node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/decorators/property.js";
|
|
6
|
+
import { classMap as u } from "../../../../node_modules/.pnpm/lit-html@3.1.2/node_modules/lit-html/directives/class-map.js";
|
|
7
|
+
import { styleMap as b } from "../../../../node_modules/.pnpm/lit-html@3.1.2/node_modules/lit-html/directives/style-map.js";
|
|
8
|
+
import { EventManager as d } from "../../classes/event-manager/event-manager.js";
|
|
9
|
+
import { global as h } from "../../styles/global.js";
|
|
10
|
+
import { settings as f } from "../../scripts/settings.js";
|
|
11
|
+
import { mergeStyles as g } from "../../scripts/mergeStyles.js";
|
|
12
|
+
import "../box/box.js";
|
|
13
|
+
import "../vertical-stack/vertical-stack.js";
|
|
14
|
+
import "../horizontal-stack/horizontal-stack.js";
|
|
15
|
+
import "../button-icon/button-icon.js";
|
|
16
|
+
import { css as y } from "../../../../node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/css-tag.js";
|
|
17
|
+
var x = Object.defineProperty, w = Object.getOwnPropertyDescriptor, l = (e, t, r, s) => {
|
|
18
|
+
for (var o = s > 1 ? void 0 : s ? w(t, r) : t, n = e.length - 1, p; n >= 0; n--)
|
|
19
|
+
(p = e[n]) && (o = (s ? p(t, r, o) : p(o)) || o);
|
|
20
|
+
return s && o && x(t, r, o), o;
|
|
21
|
+
};
|
|
22
|
+
const { prefix: _ } = f;
|
|
23
|
+
let i = class extends c {
|
|
24
|
+
constructor() {
|
|
25
|
+
super(...arguments), this.visible = !1, this.eventManager = new d(this);
|
|
26
|
+
}
|
|
27
|
+
_eventsDispatcher(e) {
|
|
28
|
+
if (!e)
|
|
29
|
+
throw new Error("Missing custom event type");
|
|
30
|
+
const t = { bubbles: !0, composed: !0 }, r = {};
|
|
31
|
+
e === "close" && (e = "close-popover", this.eventManager.dispatchCustomEvent(e, r, t));
|
|
32
|
+
}
|
|
33
|
+
closePopover() {
|
|
34
|
+
this.visible = !1, this._eventsDispatcher("close");
|
|
35
|
+
}
|
|
36
|
+
popoverClasses() {
|
|
37
|
+
return {
|
|
38
|
+
"popover--visible": this.visible
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
popoverStyles() {
|
|
42
|
+
return {
|
|
43
|
+
visibility: this.visible ? "visible" : "hidden"
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
closeButton() {
|
|
47
|
+
if (this.visible)
|
|
48
|
+
return a`
|
|
49
|
+
<umg-button-icon
|
|
50
|
+
part="close-button"
|
|
51
|
+
class="close-button"
|
|
52
|
+
icon="close"
|
|
53
|
+
padding="4"
|
|
54
|
+
@click="${this.closePopover}"
|
|
55
|
+
>
|
|
56
|
+
</umg-button-icon>
|
|
57
|
+
`;
|
|
58
|
+
}
|
|
59
|
+
render() {
|
|
60
|
+
return a`
|
|
61
|
+
<div
|
|
62
|
+
class="popover${u(this.popoverClasses())}"
|
|
63
|
+
style="${b(this.popoverStyles())}"
|
|
64
|
+
>
|
|
65
|
+
<div class="popover-inner">
|
|
66
|
+
<umg-vertical-stack
|
|
67
|
+
align="center"
|
|
68
|
+
justify="center"
|
|
69
|
+
>
|
|
70
|
+
<umg-box
|
|
71
|
+
class="popover-content"
|
|
72
|
+
opacity="1"
|
|
73
|
+
padding="24"
|
|
74
|
+
borderRadius="40"
|
|
75
|
+
border
|
|
76
|
+
>
|
|
77
|
+
<umg-vertical-stack gap="20">
|
|
78
|
+
<umg-horizontal-stack
|
|
79
|
+
class="popover-title"
|
|
80
|
+
align="center"
|
|
81
|
+
justify="center"
|
|
82
|
+
mobileJustify="space-between"
|
|
83
|
+
>
|
|
84
|
+
<slot name="title" alignment="start"></slot>
|
|
85
|
+
${this.closeButton()}
|
|
86
|
+
</umg-horizontal-stack>
|
|
87
|
+
<slot name="content"></slot>
|
|
88
|
+
</umg-vertical-stack>
|
|
89
|
+
</umg-box>
|
|
90
|
+
</umg-vertical-stack>
|
|
91
|
+
</div>
|
|
92
|
+
</div>
|
|
93
|
+
`;
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
i.styles = g([
|
|
97
|
+
h,
|
|
98
|
+
y`
|
|
99
|
+
.popover {
|
|
100
|
+
background-color: rgb(var(--um-color-box-bg), 0.95);
|
|
101
|
+
position: fixed;
|
|
102
|
+
visibility: hidden;
|
|
103
|
+
inset: 0;
|
|
104
|
+
z-index: 100;
|
|
105
|
+
flex-direction: column;
|
|
106
|
+
justify-content: stretch;
|
|
107
|
+
overflow: hidden;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.popover-inner {
|
|
111
|
+
height: 100%;
|
|
112
|
+
width: 100%;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
@media only screen and (hover: hover) {
|
|
116
|
+
.close-button {
|
|
117
|
+
display: none;
|
|
118
|
+
}
|
|
119
|
+
.popover {
|
|
120
|
+
position: absolute;
|
|
121
|
+
border-radius: var(--um-border-caption-card-radius);
|
|
122
|
+
}
|
|
123
|
+
.popover-inner {
|
|
124
|
+
opacity: 0;
|
|
125
|
+
max-width: 320px;
|
|
126
|
+
margin: 0 auto;
|
|
127
|
+
}
|
|
128
|
+
.popover-inner .popover-content::part(box) {
|
|
129
|
+
border: none;
|
|
130
|
+
--um-opacity-box-bg: 0;
|
|
131
|
+
}
|
|
132
|
+
.popover--visible .popover-inner {
|
|
133
|
+
opacity: 1;
|
|
134
|
+
transition: opacity 0.3s
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
@media screen and (hover: none) {
|
|
139
|
+
.popover-inner {
|
|
140
|
+
padding: var(--um-space-24);
|
|
141
|
+
transform: translateX(100%);
|
|
142
|
+
max-width: 22rem;
|
|
143
|
+
margin: 0 auto;
|
|
144
|
+
}
|
|
145
|
+
.popover--visible .popover-inner {
|
|
146
|
+
transform: translateX(0);
|
|
147
|
+
transition: all 0.3s
|
|
148
|
+
}
|
|
149
|
+
.popover-inner .popover-title::part(horizontal-stack) {
|
|
150
|
+
justify-content: space-between;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
`
|
|
154
|
+
]);
|
|
155
|
+
l([
|
|
156
|
+
m({ type: Boolean, reflect: !0 })
|
|
157
|
+
], i.prototype, "visible", 2);
|
|
158
|
+
i = l([
|
|
159
|
+
v(`${_}-popover`)
|
|
160
|
+
], i);
|
|
161
|
+
export {
|
|
162
|
+
i as Popover
|
|
163
|
+
};
|