@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.
Files changed (88) hide show
  1. package/dist/node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/css-tag.js +56 -0
  2. package/dist/node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/decorators/base.js +9 -0
  3. package/dist/node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/decorators/custom-element.js +13 -0
  4. package/dist/node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/decorators/property.js +37 -0
  5. package/dist/node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/decorators/query-assigned-elements.js +19 -0
  6. package/dist/node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/decorators/query.js +34 -0
  7. package/dist/node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/decorators/state.js +12 -0
  8. package/dist/node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/reactive-element.js +260 -0
  9. package/dist/node_modules/.pnpm/lit-element@4.0.4/node_modules/lit-element/lit-element.js +50 -0
  10. package/dist/node_modules/.pnpm/lit-html@3.1.2/node_modules/lit-html/directive.js +27 -0
  11. package/dist/node_modules/.pnpm/lit-html@3.1.2/node_modules/lit-html/directives/class-map.js +37 -0
  12. package/dist/node_modules/.pnpm/lit-html@3.1.2/node_modules/lit-html/directives/if-defined.js +10 -0
  13. package/dist/node_modules/.pnpm/lit-html@3.1.2/node_modules/lit-html/directives/map.js +15 -0
  14. package/dist/node_modules/.pnpm/lit-html@3.1.2/node_modules/lit-html/directives/range.js +14 -0
  15. package/dist/node_modules/.pnpm/lit-html@3.1.2/node_modules/lit-html/directives/style-map.js +39 -0
  16. package/dist/node_modules/.pnpm/lit-html@3.1.2/node_modules/lit-html/lit-html.js +259 -0
  17. package/dist/packages/web-components/classes/event-manager/event-manager.js +50 -0
  18. package/dist/packages/web-components/classes/index.js +4 -0
  19. package/dist/packages/web-components/components/badge/badge.js +146 -0
  20. package/dist/packages/web-components/components/banner/banner.js +389 -0
  21. package/dist/packages/web-components/components/banner-image/banner-image.js +161 -0
  22. package/dist/packages/web-components/components/box/box.js +208 -0
  23. package/dist/packages/web-components/components/button/button.js +336 -0
  24. package/dist/packages/web-components/components/button-group/button-group.js +98 -0
  25. package/dist/packages/web-components/components/button-icon/button-icon.js +246 -0
  26. package/dist/packages/web-components/components/caption-card/caption-card.js +331 -0
  27. package/dist/packages/web-components/components/deferred-media/deferred-media.js +212 -0
  28. package/dist/packages/web-components/components/disclosure/disclosure.js +255 -0
  29. package/dist/packages/web-components/components/event-table/event-content.js +106 -0
  30. package/dist/packages/web-components/components/event-table/event-date.js +45 -0
  31. package/dist/packages/web-components/components/event-table/event-table.js +74 -0
  32. package/dist/packages/web-components/components/event-table/event.js +45 -0
  33. package/dist/packages/web-components/components/footer/footer.js +153 -0
  34. package/dist/packages/web-components/components/grid/grid-cell.js +40 -0
  35. package/dist/packages/web-components/components/grid/grid.js +106 -0
  36. package/dist/packages/web-components/components/header/header.js +368 -0
  37. package/dist/packages/web-components/components/header-drawer/header-drawer.js +292 -0
  38. package/dist/packages/web-components/components/header-drawer/menu-drawer.js +176 -0
  39. package/dist/packages/web-components/components/horizontal-stack/horizontal-stack.js +93 -0
  40. package/dist/packages/web-components/components/icon/icon.js +81 -0
  41. package/dist/packages/web-components/components/icon/icons.svg.js +191 -0
  42. package/dist/packages/web-components/components/image/image.js +157 -0
  43. package/dist/packages/web-components/components/index.js +82 -0
  44. package/dist/packages/web-components/components/link/link.js +95 -0
  45. package/dist/packages/web-components/components/link-group/link-group.js +126 -0
  46. package/dist/packages/web-components/components/logo/logo.js +161 -0
  47. package/dist/packages/web-components/components/media-gallery/media-gallery.js +82 -0
  48. package/dist/packages/web-components/components/media-gallery/media.js +31 -0
  49. package/dist/packages/web-components/components/media-text/media-text.js +276 -0
  50. package/dist/packages/web-components/components/media-text/styles/media-size.js +119 -0
  51. package/dist/packages/web-components/components/menu/menu.js +328 -0
  52. package/dist/packages/web-components/components/modal/modal.js +143 -0
  53. package/dist/packages/web-components/components/number-field/number-field.js +339 -0
  54. package/dist/packages/web-components/components/overlay/overlay.js +77 -0
  55. package/dist/packages/web-components/components/page/page.js +105 -0
  56. package/dist/packages/web-components/components/popover/popover.js +163 -0
  57. package/dist/packages/web-components/components/rich-text/rich-text.js +126 -0
  58. package/dist/packages/web-components/components/section/section.js +400 -0
  59. package/dist/packages/web-components/components/select/select.js +359 -0
  60. package/dist/packages/web-components/components/slider/slide.js +68 -0
  61. package/dist/packages/web-components/components/slider/slider-controls.js +258 -0
  62. package/dist/packages/web-components/components/slider/slider.js +374 -0
  63. package/dist/packages/web-components/components/slider/styles/controls.js +98 -0
  64. package/dist/packages/web-components/components/slider/styles/slider.js +233 -0
  65. package/dist/packages/web-components/components/socials/socials.js +96 -0
  66. package/dist/packages/web-components/components/table/table.js +158 -0
  67. package/dist/packages/web-components/components/text/text.js +245 -0
  68. package/dist/packages/web-components/components/text-field/text-field.js +257 -0
  69. package/dist/packages/web-components/components/thumbnail-slider/thumbnail-slide.js +51 -0
  70. package/dist/packages/web-components/components/thumbnail-slider/thumbnail-slider.js +88 -0
  71. package/dist/packages/web-components/components/vertical-stack/vertical-stack.js +95 -0
  72. package/dist/packages/web-components/components/video/video.js +185 -0
  73. package/dist/packages/web-components/scripts/mergeStyles.js +8 -0
  74. package/dist/packages/web-components/scripts/polyfills/scrollyfills.js +43 -0
  75. package/dist/packages/web-components/scripts/settings.js +7 -0
  76. package/dist/packages/web-components/scripts/themeStyleSheet.js +9 -0
  77. package/dist/packages/web-components/scripts/utilities/debounce.js +9 -0
  78. package/dist/packages/web-components/scripts/utilities/paddingTransformations.js +46 -0
  79. package/dist/packages/web-components/styles/button.js +55 -0
  80. package/dist/packages/web-components/styles/fonts.js +181 -0
  81. package/dist/packages/web-components/styles/global.js +40 -0
  82. package/dist/packages/web-components/styles/grid.js +114 -0
  83. package/dist/packages/web-components/styles/group.js +121 -0
  84. package/dist/packages/web-components/styles/icon-size.js +19 -0
  85. package/dist/packages/web-components/styles/link.js +30 -0
  86. package/dist/packages/web-components/styles/placeholder-media.js +27 -0
  87. package/package.json +92 -0
  88. package/readme.md +266 -0
@@ -0,0 +1,259 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2017 Google LLC
4
+ * SPDX-License-Identifier: BSD-3-Clause
5
+ */
6
+ const y = globalThis, S = y.trustedTypes, I = S ? S.createPolicy("lit-html", { createHTML: (h) => h }) : void 0, L = "$lit$", p = `lit$${(Math.random() + "").slice(9)}$`, W = "?" + p, z = `<${W}>`, v = document, x = () => v.createComment(""), H = (h) => h === null || typeof h != "object" && typeof h != "function", k = Array.isArray, Z = (h) => k(h) || typeof (h == null ? void 0 : h[Symbol.iterator]) == "function", w = `[
7
+ \f\r]`, m = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, B = /-->/g, P = />/g, u = RegExp(`>|${w}(?:([^\\s"'>=/]+)(${w}*=${w}*(?:[^
8
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), R = /'/g, U = /"/g, D = /^(?:script|style|textarea|title)$/i, V = (h) => (t, ...e) => ({ _$litType$: h, strings: t, values: e }), X = V(1), Y = V(2), N = Symbol.for("lit-noChange"), A = Symbol.for("lit-nothing"), j = /* @__PURE__ */ new WeakMap(), g = v.createTreeWalker(v, 129);
9
+ function O(h, t) {
10
+ if (!Array.isArray(h) || !h.hasOwnProperty("raw"))
11
+ throw Error("invalid template strings array");
12
+ return I !== void 0 ? I.createHTML(t) : t;
13
+ }
14
+ const q = (h, t) => {
15
+ const e = h.length - 1, s = [];
16
+ let i, o = t === 2 ? "<svg>" : "", n = m;
17
+ for (let a = 0; a < e; a++) {
18
+ const r = h[a];
19
+ let $, _, l = -1, c = 0;
20
+ for (; c < r.length && (n.lastIndex = c, _ = n.exec(r), _ !== null); )
21
+ c = n.lastIndex, n === m ? _[1] === "!--" ? n = B : _[1] !== void 0 ? n = P : _[2] !== void 0 ? (D.test(_[2]) && (i = RegExp("</" + _[2], "g")), n = u) : _[3] !== void 0 && (n = u) : n === u ? _[0] === ">" ? (n = i ?? m, l = -1) : _[1] === void 0 ? l = -2 : (l = n.lastIndex - _[2].length, $ = _[1], n = _[3] === void 0 ? u : _[3] === '"' ? U : R) : n === U || n === R ? n = u : n === B || n === P ? n = m : (n = u, i = void 0);
22
+ const d = n === u && h[a + 1].startsWith("/>") ? " " : "";
23
+ o += n === m ? r + z : l >= 0 ? (s.push($), r.slice(0, l) + L + r.slice(l) + p + d) : r + p + (l === -2 ? a : d);
24
+ }
25
+ return [O(h, o + (h[e] || "<?>") + (t === 2 ? "</svg>" : "")), s];
26
+ };
27
+ class T {
28
+ constructor({ strings: t, _$litType$: e }, s) {
29
+ let i;
30
+ this.parts = [];
31
+ let o = 0, n = 0;
32
+ const a = t.length - 1, r = this.parts, [$, _] = q(t, e);
33
+ if (this.el = T.createElement($, s), g.currentNode = this.el.content, e === 2) {
34
+ const l = this.el.content.firstChild;
35
+ l.replaceWith(...l.childNodes);
36
+ }
37
+ for (; (i = g.nextNode()) !== null && r.length < a; ) {
38
+ if (i.nodeType === 1) {
39
+ if (i.hasAttributes())
40
+ for (const l of i.getAttributeNames())
41
+ if (l.endsWith(L)) {
42
+ const c = _[n++], d = i.getAttribute(l).split(p), C = /([.?@])?(.*)/.exec(c);
43
+ r.push({ type: 1, index: o, name: C[2], strings: d, ctor: C[1] === "." ? G : C[1] === "?" ? J : C[1] === "@" ? K : M }), i.removeAttribute(l);
44
+ } else
45
+ l.startsWith(p) && (r.push({ type: 6, index: o }), i.removeAttribute(l));
46
+ if (D.test(i.tagName)) {
47
+ const l = i.textContent.split(p), c = l.length - 1;
48
+ if (c > 0) {
49
+ i.textContent = S ? S.emptyScript : "";
50
+ for (let d = 0; d < c; d++)
51
+ i.append(l[d], x()), g.nextNode(), r.push({ type: 2, index: ++o });
52
+ i.append(l[c], x());
53
+ }
54
+ }
55
+ } else if (i.nodeType === 8)
56
+ if (i.data === W)
57
+ r.push({ type: 2, index: o });
58
+ else {
59
+ let l = -1;
60
+ for (; (l = i.data.indexOf(p, l + 1)) !== -1; )
61
+ r.push({ type: 7, index: o }), l += p.length - 1;
62
+ }
63
+ o++;
64
+ }
65
+ }
66
+ static createElement(t, e) {
67
+ const s = v.createElement("template");
68
+ return s.innerHTML = t, s;
69
+ }
70
+ }
71
+ function f(h, t, e = h, s) {
72
+ var n, a;
73
+ if (t === N)
74
+ return t;
75
+ let i = s !== void 0 ? (n = e._$Co) == null ? void 0 : n[s] : e._$Cl;
76
+ const o = H(t) ? void 0 : t._$litDirective$;
77
+ return (i == null ? void 0 : i.constructor) !== o && ((a = i == null ? void 0 : i._$AO) == null || a.call(i, !1), o === void 0 ? i = void 0 : (i = new o(h), i._$AT(h, e, s)), s !== void 0 ? (e._$Co ?? (e._$Co = []))[s] = i : e._$Cl = i), i !== void 0 && (t = f(h, i._$AS(h, t.values), i, s)), t;
78
+ }
79
+ class F {
80
+ constructor(t, e) {
81
+ this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
82
+ }
83
+ get parentNode() {
84
+ return this._$AM.parentNode;
85
+ }
86
+ get _$AU() {
87
+ return this._$AM._$AU;
88
+ }
89
+ u(t) {
90
+ const { el: { content: e }, parts: s } = this._$AD, i = ((t == null ? void 0 : t.creationScope) ?? v).importNode(e, !0);
91
+ g.currentNode = i;
92
+ let o = g.nextNode(), n = 0, a = 0, r = s[0];
93
+ for (; r !== void 0; ) {
94
+ if (n === r.index) {
95
+ let $;
96
+ r.type === 2 ? $ = new b(o, o.nextSibling, this, t) : r.type === 1 ? $ = new r.ctor(o, r.name, r.strings, this, t) : r.type === 6 && ($ = new Q(o, this, t)), this._$AV.push($), r = s[++a];
97
+ }
98
+ n !== (r == null ? void 0 : r.index) && (o = g.nextNode(), n++);
99
+ }
100
+ return g.currentNode = v, i;
101
+ }
102
+ p(t) {
103
+ let e = 0;
104
+ for (const s of this._$AV)
105
+ s !== void 0 && (s.strings !== void 0 ? (s._$AI(t, s, e), e += s.strings.length - 2) : s._$AI(t[e])), e++;
106
+ }
107
+ }
108
+ class b {
109
+ get _$AU() {
110
+ var t;
111
+ return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
112
+ }
113
+ constructor(t, e, s, i) {
114
+ this.type = 2, this._$AH = A, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = i, this._$Cv = (i == null ? void 0 : i.isConnected) ?? !0;
115
+ }
116
+ get parentNode() {
117
+ let t = this._$AA.parentNode;
118
+ const e = this._$AM;
119
+ return e !== void 0 && (t == null ? void 0 : t.nodeType) === 11 && (t = e.parentNode), t;
120
+ }
121
+ get startNode() {
122
+ return this._$AA;
123
+ }
124
+ get endNode() {
125
+ return this._$AB;
126
+ }
127
+ _$AI(t, e = this) {
128
+ t = f(this, t, e), H(t) ? t === A || t == null || t === "" ? (this._$AH !== A && this._$AR(), this._$AH = A) : t !== this._$AH && t !== N && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Z(t) ? this.k(t) : this._(t);
129
+ }
130
+ S(t) {
131
+ return this._$AA.parentNode.insertBefore(t, this._$AB);
132
+ }
133
+ T(t) {
134
+ this._$AH !== t && (this._$AR(), this._$AH = this.S(t));
135
+ }
136
+ _(t) {
137
+ this._$AH !== A && H(this._$AH) ? this._$AA.nextSibling.data = t : this.T(v.createTextNode(t)), this._$AH = t;
138
+ }
139
+ $(t) {
140
+ var o;
141
+ const { values: e, _$litType$: s } = t, i = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = T.createElement(O(s.h, s.h[0]), this.options)), s);
142
+ if (((o = this._$AH) == null ? void 0 : o._$AD) === i)
143
+ this._$AH.p(e);
144
+ else {
145
+ const n = new F(i, this), a = n.u(this.options);
146
+ n.p(e), this.T(a), this._$AH = n;
147
+ }
148
+ }
149
+ _$AC(t) {
150
+ let e = j.get(t.strings);
151
+ return e === void 0 && j.set(t.strings, e = new T(t)), e;
152
+ }
153
+ k(t) {
154
+ k(this._$AH) || (this._$AH = [], this._$AR());
155
+ const e = this._$AH;
156
+ let s, i = 0;
157
+ for (const o of t)
158
+ i === e.length ? e.push(s = new b(this.S(x()), this.S(x()), this, this.options)) : s = e[i], s._$AI(o), i++;
159
+ i < e.length && (this._$AR(s && s._$AB.nextSibling, i), e.length = i);
160
+ }
161
+ _$AR(t = this._$AA.nextSibling, e) {
162
+ var s;
163
+ for ((s = this._$AP) == null ? void 0 : s.call(this, !1, !0, e); t && t !== this._$AB; ) {
164
+ const i = t.nextSibling;
165
+ t.remove(), t = i;
166
+ }
167
+ }
168
+ setConnected(t) {
169
+ var e;
170
+ this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
171
+ }
172
+ }
173
+ class M {
174
+ get tagName() {
175
+ return this.element.tagName;
176
+ }
177
+ get _$AU() {
178
+ return this._$AM._$AU;
179
+ }
180
+ constructor(t, e, s, i, o) {
181
+ this.type = 1, this._$AH = A, this._$AN = void 0, this.element = t, this.name = e, this._$AM = i, this.options = o, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = A;
182
+ }
183
+ _$AI(t, e = this, s, i) {
184
+ const o = this.strings;
185
+ let n = !1;
186
+ if (o === void 0)
187
+ t = f(this, t, e, 0), n = !H(t) || t !== this._$AH && t !== N, n && (this._$AH = t);
188
+ else {
189
+ const a = t;
190
+ let r, $;
191
+ for (t = o[0], r = 0; r < o.length - 1; r++)
192
+ $ = f(this, a[s + r], e, r), $ === N && ($ = this._$AH[r]), n || (n = !H($) || $ !== this._$AH[r]), $ === A ? t = A : t !== A && (t += ($ ?? "") + o[r + 1]), this._$AH[r] = $;
193
+ }
194
+ n && !i && this.j(t);
195
+ }
196
+ j(t) {
197
+ t === A ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
198
+ }
199
+ }
200
+ class G extends M {
201
+ constructor() {
202
+ super(...arguments), this.type = 3;
203
+ }
204
+ j(t) {
205
+ this.element[this.name] = t === A ? void 0 : t;
206
+ }
207
+ }
208
+ class J extends M {
209
+ constructor() {
210
+ super(...arguments), this.type = 4;
211
+ }
212
+ j(t) {
213
+ this.element.toggleAttribute(this.name, !!t && t !== A);
214
+ }
215
+ }
216
+ class K extends M {
217
+ constructor(t, e, s, i, o) {
218
+ super(t, e, s, i, o), this.type = 5;
219
+ }
220
+ _$AI(t, e = this) {
221
+ if ((t = f(this, t, e, 0) ?? A) === N)
222
+ return;
223
+ const s = this._$AH, i = t === A && s !== A || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, o = t !== A && (s === A || i);
224
+ i && this.element.removeEventListener(this.name, this, s), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
225
+ }
226
+ handleEvent(t) {
227
+ var e;
228
+ typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
229
+ }
230
+ }
231
+ class Q {
232
+ constructor(t, e, s) {
233
+ this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = s;
234
+ }
235
+ get _$AU() {
236
+ return this._$AM._$AU;
237
+ }
238
+ _$AI(t) {
239
+ f(this, t);
240
+ }
241
+ }
242
+ const E = y.litHtmlPolyfillSupport;
243
+ E == null || E(T, b), (y.litHtmlVersions ?? (y.litHtmlVersions = [])).push("3.1.2");
244
+ const tt = (h, t, e) => {
245
+ const s = (e == null ? void 0 : e.renderBefore) ?? t;
246
+ let i = s._$litPart$;
247
+ if (i === void 0) {
248
+ const o = (e == null ? void 0 : e.renderBefore) ?? null;
249
+ s._$litPart$ = i = new b(t.insertBefore(x(), o), o, void 0, e ?? {});
250
+ }
251
+ return i._$AI(h), i;
252
+ };
253
+ export {
254
+ X as html,
255
+ N as noChange,
256
+ A as nothing,
257
+ tt as render,
258
+ Y as svg
259
+ };
@@ -0,0 +1,50 @@
1
+ class n {
2
+ /**
3
+ * Creates an instance of EventManager.
4
+ *
5
+ * @constructor
6
+ * @param {EventTarget} target - The element or object to manage events for.
7
+ */
8
+ constructor(t) {
9
+ this.listeners = /* @__PURE__ */ new Map(), this.target = t;
10
+ }
11
+ /**
12
+ * Adds an event listener to the associated HTMLElement or target object.
13
+ *
14
+ * @param {string} eventType - The type of the event to listen for.
15
+ * @param {EventListenerOrEventListenerObject} handler - The callback function to execute when the event is triggered.
16
+ * @param {AddEventListenerOptions} [options] - An options object that specifies characteristics about the event listener.
17
+ * @returns {() => void} - A function to remove the added event listener.
18
+ */
19
+ addEventListener(t, e, s) {
20
+ const i = this.listeners.get(t) || /* @__PURE__ */ new Set();
21
+ return this.listeners.set(t, i), i.add(e), this.target.addEventListener(t, e, s), () => {
22
+ this.removeEventListener(t, e, s);
23
+ };
24
+ }
25
+ /**
26
+ * Removes an event listener from the associated HTMLElement or target object.
27
+ *
28
+ * @param {string} eventType - The type of the event for which to remove the listener.
29
+ * @param {EventListenerOrEventListenerObject} handler - The event listener function to remove.
30
+ * @param {EventListenerOptions} [options] - An options object that specifies characteristics about the event listener.
31
+ */
32
+ removeEventListener(t, e, s) {
33
+ const i = this.listeners.get(t);
34
+ i && (i.delete(e), i.size === 0 && this.listeners.delete(t)), this.target.removeEventListener(t, e, s);
35
+ }
36
+ /**
37
+ * Dispatches a custom event on the associated HTMLElement.
38
+ *
39
+ * @template T - The type of the event detail.
40
+ * @param {string} eventType - The type of the custom event.
41
+ * @param {T} detail - The data associated with the custom event.
42
+ * @param {CustomEventInit} [options] - An options object that specifies characteristics about the custom event.
43
+ */
44
+ dispatchCustomEvent(t, e, s) {
45
+ this.target.dispatchEvent(new CustomEvent(t, { detail: e, ...s }));
46
+ }
47
+ }
48
+ export {
49
+ n as EventManager
50
+ };
@@ -0,0 +1,4 @@
1
+ import { EventManager as a } from "./event-manager/event-manager.js";
2
+ export {
3
+ a as EventManager
4
+ };
@@ -0,0 +1,146 @@
1
+ import "../../../../node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/reactive-element.js";
2
+ import { html as g } 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 b } from "../../../../node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/decorators/custom-element.js";
5
+ import { property as r } from "../../../../node_modules/.pnpm/@lit_reactive-element@2.0.4/node_modules/@lit/reactive-element/decorators/property.js";
6
+ import { ifDefined as p } from "../../../../node_modules/.pnpm/lit-html@3.1.2/node_modules/lit-html/directives/if-defined.js";
7
+ import { styleMap as n } from "../../../../node_modules/.pnpm/lit-html@3.1.2/node_modules/lit-html/directives/style-map.js";
8
+ import { classMap as h } from "../../../../node_modules/.pnpm/lit-html@3.1.2/node_modules/lit-html/directives/class-map.js";
9
+ import "../box/box.js";
10
+ import "../text/text.js";
11
+ import { global as u } from "../../styles/global.js";
12
+ import { settings as f } from "../../scripts/settings.js";
13
+ import { mergeStyles as y } from "../../scripts/mergeStyles.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 v = Object.defineProperty, $ = Object.getOwnPropertyDescriptor, o = (t, a, d, i) => {
16
+ for (var s = i > 1 ? void 0 : i ? $(a, d) : a, m = t.length - 1, l; m >= 0; m--)
17
+ (l = t[m]) && (s = (i ? l(a, d, s) : l(s)) || s);
18
+ return i && s && v(a, d, s), s;
19
+ };
20
+ const { prefix: z } = f;
21
+ let e = class extends c {
22
+ constructor() {
23
+ super(...arguments), this.size = "small", this.border = !1, this.borderRadius = "0";
24
+ }
25
+ badgeStyles() {
26
+ let t = {};
27
+ return this.colorText && (t = {
28
+ ...t,
29
+ "--um-color-badge-text": this.colorText
30
+ }), this.colorBg && (t = {
31
+ ...t,
32
+ "--um-color-badge-bg": this.colorBg
33
+ }), this.opacity !== void 0 && (t = {
34
+ ...t,
35
+ "--um-opacity-badge-bg": this.opacity
36
+ }), this.borderRadius !== "0" && (t = {
37
+ ...t,
38
+ "--um-border-badge-radius": "var(--um-border-radius-" + this.borderRadius + ")"
39
+ }), t;
40
+ }
41
+ badgeClasses() {
42
+ const t = {};
43
+ return this.border && (t["badge--border"] = !0), t["badge--size-" + this.size] = !0, t;
44
+ }
45
+ render() {
46
+ return g`
47
+ <div
48
+ class="badge${h(this.badgeClasses())}"
49
+ style="${n(this.badgeStyles())}"
50
+ part="badge"
51
+ >
52
+ <div class="badge__content" part="badge-content">
53
+ <umg-box
54
+ padding="0"
55
+ colorText=${this.colorText ? this.colorText : "255,255,255"}
56
+ colorBg=${this.colorBg ? this.colorBg : "0,0,0"}
57
+ ?border=${this.border}
58
+ borderRadius=${this.borderRadius}
59
+ opacity=${p(this.opacity)}
60
+ >
61
+ <umg-text
62
+ as="span"
63
+ variant="${p(this.fontSize)}"
64
+ fontWeight="${p(this.fontWeight)}"
65
+ fontStyle="${p(this.fontStyle)}"
66
+ lineHeight="compact"
67
+ withoutMargin
68
+ >
69
+ <slot>Badge label</slot>
70
+ </umg-text>
71
+ </umg-box>
72
+ </div>
73
+ </div>
74
+ `;
75
+ }
76
+ };
77
+ e.styles = y([
78
+ u,
79
+ x`
80
+ :host {
81
+ display: block;
82
+ }
83
+ umg-text {
84
+ letter-spacing: 0.07rem
85
+ }
86
+ umg-box {
87
+ display: block;
88
+ }
89
+ .badge ::part(box-content) {
90
+ display: flex;
91
+ align-items: center;
92
+ }
93
+ .badge ::part(span-text) {
94
+ display: block;
95
+ }
96
+ .badge--size-large ::part(box-content) {
97
+ height: var(--um-space-48, 3rem);
98
+ padding: 0 var(--um-space-32, 2rem);
99
+ }
100
+ .badge--size-medium ::part(box-content) {
101
+ height: var(--um-space-40, 2.5rem);
102
+ padding: 0 var(--um-space-24, 1.5rem);
103
+ }
104
+ .badge--size-small ::part(box-content) {
105
+ height: var(--um-space-32, 2rem);
106
+ padding: 0 var(--um-space-16, 0.75rem);
107
+ }
108
+ .badge--size-slim ::part(box-content) {
109
+ height: var(--um-space-24, 1.5rem);
110
+ padding: 0 var(--um-space-12, 0.5rem);
111
+ }
112
+ `
113
+ ]);
114
+ o([
115
+ r()
116
+ ], e.prototype, "size", 2);
117
+ o([
118
+ r()
119
+ ], e.prototype, "colorBg", 2);
120
+ o([
121
+ r()
122
+ ], e.prototype, "colorText", 2);
123
+ o([
124
+ r({ type: Boolean })
125
+ ], e.prototype, "border", 2);
126
+ o([
127
+ r()
128
+ ], e.prototype, "borderRadius", 2);
129
+ o([
130
+ r()
131
+ ], e.prototype, "opacity", 2);
132
+ o([
133
+ r()
134
+ ], e.prototype, "fontSize", 2);
135
+ o([
136
+ r()
137
+ ], e.prototype, "fontWeight", 2);
138
+ o([
139
+ r()
140
+ ], e.prototype, "fontStyle", 2);
141
+ e = o([
142
+ b(`${z}-badge`)
143
+ ], e);
144
+ export {
145
+ e as Badge
146
+ };