@cupra/ui-kit 1.0.0-canary.18 → 1.0.0-canary.19
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/components/base/UiKitElement.js +1 -1
- package/dist/components/ds-badge/ds-badge.d.ts +18 -0
- package/dist/components/ds-badge/ds-badge.js +53 -0
- package/dist/components/ds-badge/ds-badge.test.d.ts +8 -0
- package/dist/components/ds-badge/ds-badge.types.d.ts +6 -0
- package/dist/components/ds-badge/styles/common.styles.d.ts +1 -0
- package/dist/components/ds-badge/styles/common.styles.js +9 -0
- package/dist/components/ds-badge/styles/cupra-diagonal.styles.d.ts +1 -0
- package/dist/components/ds-badge/styles/cupra-diagonal.styles.js +47 -0
- package/dist/components/ds-icon/ds-icon.js +34 -29
- package/dist/components/ds-theme-provider/ds-theme-provider.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/index.js +3 -2
- package/dist/utils/IconsManager.d.ts +1 -4
- package/dist/utils/IconsManager.js +33 -27
- package/dist/utils/StylesRegistry/StylesRegistry.js +1 -1
- package/dist/utils/cssWithTokens.js +1 -1
- package/dist/utils/htmlWithTokens.js +1 -1
- package/dist-react/components/base/UiKitElement.js +1 -1
- package/dist-react/components/ds-badge/ds-badge.d.ts +18 -0
- package/dist-react/components/ds-badge/ds-badge.js +53 -0
- package/dist-react/components/ds-badge/ds-badge.test.d.ts +8 -0
- package/dist-react/components/ds-badge/ds-badge.types.d.ts +6 -0
- package/dist-react/components/ds-badge/styles/common.styles.d.ts +1 -0
- package/dist-react/components/ds-badge/styles/common.styles.js +9 -0
- package/dist-react/components/ds-badge/styles/cupra-diagonal.styles.d.ts +1 -0
- package/dist-react/components/ds-badge/styles/cupra-diagonal.styles.js +47 -0
- package/dist-react/components/ds-icon/ds-icon.js +34 -29
- package/dist-react/components/ds-theme-provider/ds-theme-provider.js +1 -1
- package/dist-react/components/index.d.ts +1 -0
- package/dist-react/index.js +3 -2
- package/dist-react/utils/IconsManager.d.ts +1 -4
- package/dist-react/utils/IconsManager.js +33 -27
- package/dist-react/utils/StylesRegistry/StylesRegistry.js +1 -1
- package/dist-react/utils/cssWithTokens.js +1 -1
- package/dist-react/utils/htmlWithTokens.js +1 -1
- package/package.json +1 -1
|
@@ -21,7 +21,7 @@ const E = C`:host([unresolved]){visibility:hidden}`, h = class c extends y {
|
|
|
21
21
|
}, this.pubSubTheme = p.subscribe("theme", this.handleChangeTheme);
|
|
22
22
|
}
|
|
23
23
|
get theme() {
|
|
24
|
-
const e = sessionStorage == null ? void 0 : sessionStorage.getItem(d);
|
|
24
|
+
const e = typeof sessionStorage < "u" ? sessionStorage == null ? void 0 : sessionStorage.getItem(d) : null;
|
|
25
25
|
return this.contextTheme ?? this.pubSubTheme ?? e;
|
|
26
26
|
}
|
|
27
27
|
connectedCallback() {
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { UiKitElement } from '../base/UiKitElement.ts';
|
|
2
|
+
import { nothing } from 'lit';
|
|
3
|
+
import type { DsBadgeAttrs } from './ds-badge.types.js';
|
|
4
|
+
export declare class DsBadge extends UiKitElement {
|
|
5
|
+
static styles: import("lit").CSSResult[];
|
|
6
|
+
number?: number;
|
|
7
|
+
variant: DsBadgeAttrs['variant'];
|
|
8
|
+
size: DsBadgeAttrs['size'];
|
|
9
|
+
protected get hasNumber(): boolean;
|
|
10
|
+
protected get classes(): {
|
|
11
|
+
[x: string]: boolean;
|
|
12
|
+
container: boolean;
|
|
13
|
+
dot: boolean;
|
|
14
|
+
number: boolean;
|
|
15
|
+
};
|
|
16
|
+
protected get contentTemplate(): typeof nothing | import("lit").TemplateResult<1>;
|
|
17
|
+
render(): import("lit").TemplateResult<1>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { UiKitElement as h } from "../base/UiKitElement.js";
|
|
2
|
+
import { customUiKitElement as l } from "../../decorators/customUiKitElement.js";
|
|
3
|
+
import "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
|
|
4
|
+
import { nothing as b, html as u } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
|
|
5
|
+
import "../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
6
|
+
import { property as a } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";
|
|
7
|
+
import { classMap as c } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js";
|
|
8
|
+
import { commonStyles as f } from "./styles/common.styles.js";
|
|
9
|
+
import { cupraDiagonalStyles as v } from "./styles/cupra-diagonal.styles.js";
|
|
10
|
+
var y = Object.defineProperty, g = Object.getOwnPropertyDescriptor, i = (p, r, m, s) => {
|
|
11
|
+
for (var t = s > 1 ? void 0 : s ? g(r, m) : r, o = p.length - 1, n; o >= 0; o--)
|
|
12
|
+
(n = p[o]) && (t = (s ? n(r, m, t) : n(t)) || t);
|
|
13
|
+
return s && t && y(r, m, t), t;
|
|
14
|
+
};
|
|
15
|
+
let e = class extends h {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments), this.variant = "base", this.size = "medium";
|
|
18
|
+
}
|
|
19
|
+
get hasNumber() {
|
|
20
|
+
return typeof this.number == "number" && !Number.isNaN(this.number);
|
|
21
|
+
}
|
|
22
|
+
get classes() {
|
|
23
|
+
return {
|
|
24
|
+
container: !0,
|
|
25
|
+
dot: !this.hasNumber,
|
|
26
|
+
number: this.hasNumber,
|
|
27
|
+
[`variant-${this.variant}`]: !0,
|
|
28
|
+
[`size-${this.size}`]: !0
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
get contentTemplate() {
|
|
32
|
+
return this.hasNumber ? u`${this.number}` : b;
|
|
33
|
+
}
|
|
34
|
+
render() {
|
|
35
|
+
return u` <div class=${c(this.classes)}>${this.contentTemplate}</div> `;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
e.styles = [f, v];
|
|
39
|
+
i([
|
|
40
|
+
a({ type: Number })
|
|
41
|
+
], e.prototype, "number", 2);
|
|
42
|
+
i([
|
|
43
|
+
a({ type: String })
|
|
44
|
+
], e.prototype, "variant", 2);
|
|
45
|
+
i([
|
|
46
|
+
a({ type: String })
|
|
47
|
+
], e.prototype, "size", 2);
|
|
48
|
+
e = i([
|
|
49
|
+
l("ds-badge")
|
|
50
|
+
], e);
|
|
51
|
+
export {
|
|
52
|
+
e as DsBadge
|
|
53
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const commonStyles: import("lit").CSSResult;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const cupraDiagonalStyles: import("lit").CSSResult;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { cssWithTokens as e } from "../../../utils/cssWithTokens.js";
|
|
2
|
+
const o = e`
|
|
3
|
+
.container {
|
|
4
|
+
border-radius: 50%;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.number {
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
font-family: var(--dg-font-family-base);
|
|
12
|
+
font-weight: 400;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.number.size-medium {
|
|
16
|
+
width: var(--dg-size-24);
|
|
17
|
+
height: var(--dg-size-24);
|
|
18
|
+
font-size: var(--dg-font-size-body-s);
|
|
19
|
+
line-height: var(--dg-font-body-s-medium-line-height);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.number.size-small {
|
|
23
|
+
width: var(--dg-size-16);
|
|
24
|
+
height: var(--dg-size-16);
|
|
25
|
+
font-size: var(--dg-font-size-body-xs);
|
|
26
|
+
line-height: var(--dg-font-body-xs-medium-line-height);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.variant-base {
|
|
30
|
+
color: var(--dg-color-text-strong);
|
|
31
|
+
background-color: var(--dg-color-bg-base);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.variant-inverted {
|
|
35
|
+
background-color: var(--dg-color-bg-inverted);
|
|
36
|
+
color: var(--dg-color-text-inverted);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.dot {
|
|
40
|
+
width: var(--dg-size-08);
|
|
41
|
+
height: var(--dg-size-08);
|
|
42
|
+
background-color: var(--dg-color-bg-error);
|
|
43
|
+
}
|
|
44
|
+
`;
|
|
45
|
+
export {
|
|
46
|
+
o as cupraDiagonalStyles
|
|
47
|
+
};
|
|
@@ -1,53 +1,58 @@
|
|
|
1
1
|
import { UiKitElement as f } from "../base/UiKitElement.js";
|
|
2
2
|
import { customUiKitElement as u } from "../../decorators/customUiKitElement.js";
|
|
3
|
-
import { iconsManager as
|
|
4
|
-
import { pubSub as
|
|
5
|
-
import { htmlWithTokens as
|
|
3
|
+
import { iconsManager as y } from "../../utils/IconsManager.js";
|
|
4
|
+
import { pubSub as _ } from "../../utils/PubSub.js";
|
|
5
|
+
import { htmlWithTokens as g } from "../../utils/htmlWithTokens.js";
|
|
6
6
|
import "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
|
|
7
7
|
import { html as l } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
|
|
8
8
|
import "../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
9
|
-
import { property as
|
|
9
|
+
import { property as a } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";
|
|
10
10
|
import { state as w } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.js";
|
|
11
|
-
import { unsafeHTML as
|
|
11
|
+
import { unsafeHTML as x } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/unsafe-html.js";
|
|
12
12
|
import { css as $ } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";
|
|
13
|
-
var k = Object.defineProperty,
|
|
13
|
+
var k = Object.defineProperty, H = Object.getOwnPropertyDescriptor, m = (t) => {
|
|
14
14
|
throw TypeError(t);
|
|
15
|
-
}, n = (t,
|
|
16
|
-
for (var
|
|
17
|
-
(p = t[h]) && (
|
|
18
|
-
return
|
|
19
|
-
},
|
|
15
|
+
}, n = (t, e, i, s) => {
|
|
16
|
+
for (var r = s > 1 ? void 0 : s ? H(e, i) : e, h = t.length - 1, p; h >= 0; h--)
|
|
17
|
+
(p = t[h]) && (r = (s ? p(e, i, r) : p(r)) || r);
|
|
18
|
+
return s && r && k(e, i, r), r;
|
|
19
|
+
}, d = (t, e, i) => e.has(t) || m("Cannot " + i), v = (t, e, i) => (d(t, e, "read from private field"), i ? i.call(t) : e.get(t)), I = (t, e, i) => e.has(t) ? m("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, i), D = (t, e, i, s) => (d(t, e, "write to private field"), e.set(t, i), i), N = (t, e, i, s) => ({
|
|
20
|
+
set _(r) {
|
|
21
|
+
D(t, e, r);
|
|
22
|
+
},
|
|
23
|
+
get _() {
|
|
24
|
+
return v(t, e, s);
|
|
25
|
+
}
|
|
26
|
+
}), c;
|
|
20
27
|
let o = class extends f {
|
|
21
28
|
constructor() {
|
|
22
|
-
super(), this.iconHtml = "",
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
this.iconHtml = await ((r = (e = g).fetchIcon) == null ? void 0 : r.call(e, this.iconName, { signal: t }));
|
|
27
|
-
}, y.subscribe("theme", this.getIcon);
|
|
29
|
+
super(), this.iconHtml = "", I(this, c, 0), this.getIcon = async () => {
|
|
30
|
+
const t = ++N(this, c)._, e = await y.fetchIcon(this.iconName);
|
|
31
|
+
t === v(this, c) && (this.iconHtml = e);
|
|
32
|
+
}, _.subscribe("theme", this.getIcon);
|
|
28
33
|
}
|
|
29
34
|
async updated(t) {
|
|
30
35
|
super.updated(t), (t.has("iconName") || !this.iconHtml) && await this.getIcon();
|
|
31
36
|
}
|
|
32
|
-
getDimension(t,
|
|
33
|
-
return t ? `${t}px` :
|
|
37
|
+
getDimension(t, e, i) {
|
|
38
|
+
return t ? `${t}px` : e ? "auto" : this.size ? `${this.size}px` : i;
|
|
34
39
|
}
|
|
35
40
|
get styleTokens() {
|
|
36
41
|
const t = this.getDimension(
|
|
37
42
|
this.width,
|
|
38
43
|
this.height,
|
|
39
44
|
"var(--private-ds-icon-width, var(--ds-icon-width, 20px))"
|
|
40
|
-
),
|
|
45
|
+
), e = this.getDimension(
|
|
41
46
|
this.height,
|
|
42
47
|
this.width,
|
|
43
48
|
"var(--private-ds-icon-height, var(--ds-icon-height, 20px))"
|
|
44
49
|
);
|
|
45
|
-
return
|
|
50
|
+
return g`
|
|
46
51
|
<style>
|
|
47
52
|
.ds-icon {
|
|
48
53
|
display: inline-block;
|
|
49
54
|
width: ${t};
|
|
50
|
-
height: ${
|
|
55
|
+
height: ${e};
|
|
51
56
|
}
|
|
52
57
|
|
|
53
58
|
.ds-icon-color {
|
|
@@ -63,11 +68,11 @@ let o = class extends f {
|
|
|
63
68
|
render() {
|
|
64
69
|
return l`
|
|
65
70
|
${this.styleTokens}
|
|
66
|
-
${this.iconHtml ?
|
|
71
|
+
${this.iconHtml ? x(this.iconHtml) : l`<svg class="ds-icon">x</svg>`}
|
|
67
72
|
`;
|
|
68
73
|
}
|
|
69
74
|
};
|
|
70
|
-
|
|
75
|
+
c = /* @__PURE__ */ new WeakMap();
|
|
71
76
|
o.styles = $`
|
|
72
77
|
:host {
|
|
73
78
|
line-height: 0;
|
|
@@ -75,19 +80,19 @@ o.styles = $`
|
|
|
75
80
|
}
|
|
76
81
|
`;
|
|
77
82
|
n([
|
|
78
|
-
|
|
83
|
+
a({ type: String, attribute: "icon-name" })
|
|
79
84
|
], o.prototype, "iconName", 2);
|
|
80
85
|
n([
|
|
81
|
-
|
|
86
|
+
a({ type: String, attribute: "color" })
|
|
82
87
|
], o.prototype, "color", 2);
|
|
83
88
|
n([
|
|
84
|
-
|
|
89
|
+
a({ type: Number })
|
|
85
90
|
], o.prototype, "width", 2);
|
|
86
91
|
n([
|
|
87
|
-
|
|
92
|
+
a({ type: Number })
|
|
88
93
|
], o.prototype, "height", 2);
|
|
89
94
|
n([
|
|
90
|
-
|
|
95
|
+
a({ type: Number, attribute: "size" })
|
|
91
96
|
], o.prototype, "size", 2);
|
|
92
97
|
n([
|
|
93
98
|
w()
|
|
@@ -54,7 +54,7 @@ let m = class extends v {
|
|
|
54
54
|
}
|
|
55
55
|
loadThemeStyles() {
|
|
56
56
|
return this.loadStyles ? new Promise((t, o) => {
|
|
57
|
-
const s = "/1.0.0-canary.
|
|
57
|
+
const s = "/1.0.0-canary.19", r = `https://ds-assets.cupra.com${s}/styles/${this.theme}/theme.css`;
|
|
58
58
|
if (document.head.querySelector(`link[href="${r}"]`)) t();
|
|
59
59
|
else {
|
|
60
60
|
const e = `ui-kit-theme-${s}`, a = document.getElementById(e), n = document.createElement("link");
|
package/dist/index.js
CHANGED
|
@@ -56,7 +56,8 @@ import "./components/ds-static-box/ds-static-box.js";
|
|
|
56
56
|
import "./components/ds-interactive-card/ds-interactive-card.js";
|
|
57
57
|
import "./components/ds-radio-button-group/ds-radio-button-group.js";
|
|
58
58
|
import "./components/ds-sidebar-navigation/ds-sidebar-navigation.js";
|
|
59
|
-
import
|
|
59
|
+
import "./components/ds-badge/ds-badge.js";
|
|
60
|
+
import { iconNames as ao } from "./components/ds-icon/iconNames.js";
|
|
60
61
|
export {
|
|
61
|
-
|
|
62
|
+
ao as iconNames
|
|
62
63
|
};
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import type { Icons } from '../components/ds-icon/Icons.type.ts';
|
|
2
2
|
declare class IconsManager {
|
|
3
|
-
private static instance;
|
|
4
3
|
private icons;
|
|
5
4
|
private theme;
|
|
6
|
-
|
|
5
|
+
constructor();
|
|
7
6
|
handleChangeTheme: (theme: string) => void;
|
|
8
|
-
static getInstance(): IconsManager;
|
|
9
|
-
private getCachedIcon;
|
|
10
7
|
fetchIcon: (iconName: Icons, requestInit?: RequestInit) => Promise<string>;
|
|
11
8
|
private loadIcon;
|
|
12
9
|
}
|
|
@@ -1,32 +1,38 @@
|
|
|
1
|
-
import { THEME_STORAGE_KEY as
|
|
2
|
-
import { pubSub as
|
|
3
|
-
class
|
|
1
|
+
import { THEME_STORAGE_KEY as r } from "../core/theme.constants.js";
|
|
2
|
+
import { pubSub as l } from "./PubSub.js";
|
|
3
|
+
class f {
|
|
4
4
|
constructor() {
|
|
5
|
-
this.icons = {}, this.handleChangeTheme = (
|
|
6
|
-
this.theme =
|
|
7
|
-
const
|
|
8
|
-
this.icons = {},
|
|
9
|
-
}, this.fetchIcon = async (
|
|
10
|
-
const
|
|
11
|
-
!this.theme &&
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
...e
|
|
26
|
-
}).then((s) => s.text()).catch((s) => ((s == null ? void 0 : s.name) !== "AbortError" && console.error(`Failed to fetch icon "${t}":`, s), "")) : Promise.resolve('<svg class="ds-icon"></svg>');
|
|
5
|
+
this.icons = {}, this.handleChangeTheme = (s) => {
|
|
6
|
+
this.theme = s;
|
|
7
|
+
const o = Object.keys(this.icons);
|
|
8
|
+
this.icons = {}, o.forEach((t) => this.fetchIcon(t));
|
|
9
|
+
}, this.fetchIcon = async (s, o = {}) => {
|
|
10
|
+
const t = typeof sessionStorage < "u" ? sessionStorage == null ? void 0 : sessionStorage.getItem(r) : null;
|
|
11
|
+
!this.theme && t && (this.theme = t);
|
|
12
|
+
const e = this.icons[s];
|
|
13
|
+
if (e) return await e;
|
|
14
|
+
const n = this.loadIcon(s, o).catch((a) => {
|
|
15
|
+
throw delete this.icons[s], a;
|
|
16
|
+
});
|
|
17
|
+
return this.icons[s] = n, n;
|
|
18
|
+
}, this.loadIcon = (s, { cache: o = "force-cache", ...t }) => this.theme ? fetch(`https://ds-assets.cupra.com/icons/${this.theme}/${s}.svg`, {
|
|
19
|
+
cache: o,
|
|
20
|
+
...t
|
|
21
|
+
}).then((e) => e.text()).catch((e) => {
|
|
22
|
+
if ((e == null ? void 0 : e.name) === "AbortError") throw e;
|
|
23
|
+
return console.error(`Failed to fetch icon "${s}":`, e), "";
|
|
24
|
+
}) : Promise.resolve('<svg class="ds-icon"></svg>'), l.subscribe("theme", this.handleChangeTheme);
|
|
27
25
|
}
|
|
28
26
|
}
|
|
29
|
-
const
|
|
27
|
+
const c = Symbol.for("@cupra/ui-kit/icons-manager"), h = globalThis;
|
|
28
|
+
let i = h[c];
|
|
29
|
+
i || (i = new f(), Object.defineProperty(h, c, {
|
|
30
|
+
value: i,
|
|
31
|
+
writable: !1,
|
|
32
|
+
configurable: !1,
|
|
33
|
+
enumerable: !1
|
|
34
|
+
}));
|
|
35
|
+
const b = i;
|
|
30
36
|
export {
|
|
31
|
-
|
|
37
|
+
b as iconsManager
|
|
32
38
|
};
|
|
@@ -5,7 +5,7 @@ class s {
|
|
|
5
5
|
theme: t
|
|
6
6
|
}) => {
|
|
7
7
|
if (!t || !e) return;
|
|
8
|
-
const c = `https://ds-assets.cupra.com/1.0.0-canary.
|
|
8
|
+
const c = `https://ds-assets.cupra.com/1.0.0-canary.19/styles/${t}/components/${e}.css`, r = this.getCachedStyleSheetPromise({ url: c });
|
|
9
9
|
if (r) return r;
|
|
10
10
|
const i = this.fetchStyle({ url: c }).then((n) => (n || this.stylePromises.delete(c), n));
|
|
11
11
|
return this.stylePromises.set(c, i), this.stylePromises.get(c);
|
|
@@ -3,7 +3,7 @@ import "../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
|
|
|
3
3
|
import "../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
4
4
|
import { unsafeCSS as n, css as o } from "../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";
|
|
5
5
|
function x(t, ...r) {
|
|
6
|
-
const e = String.raw({ raw: t }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v1-0-0-canary-
|
|
6
|
+
const e = String.raw({ raw: t }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v1-0-0-canary-19"), i = n(e);
|
|
7
7
|
return o`${i}`;
|
|
8
8
|
}
|
|
9
9
|
export {
|
|
@@ -3,7 +3,7 @@ import { html as n } from "../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit
|
|
|
3
3
|
import "../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
4
4
|
import { unsafeHTML as i } from "../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/unsafe-html.js";
|
|
5
5
|
function x(t, ...r) {
|
|
6
|
-
const o = String.raw({ raw: t }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v1-0-0-canary-
|
|
6
|
+
const o = String.raw({ raw: t }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v1-0-0-canary-19"), e = i(o);
|
|
7
7
|
return n`${e}`;
|
|
8
8
|
}
|
|
9
9
|
export {
|
|
@@ -21,7 +21,7 @@ const E = C`:host([unresolved]){visibility:hidden}`, h = class c extends y {
|
|
|
21
21
|
}, this.pubSubTheme = p.subscribe("theme", this.handleChangeTheme);
|
|
22
22
|
}
|
|
23
23
|
get theme() {
|
|
24
|
-
const e = sessionStorage == null ? void 0 : sessionStorage.getItem(d);
|
|
24
|
+
const e = typeof sessionStorage < "u" ? sessionStorage == null ? void 0 : sessionStorage.getItem(d) : null;
|
|
25
25
|
return this.contextTheme ?? this.pubSubTheme ?? e;
|
|
26
26
|
}
|
|
27
27
|
connectedCallback() {
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { UiKitElement } from '../base/UiKitElement.ts';
|
|
2
|
+
import { nothing } from 'lit';
|
|
3
|
+
import type { DsBadgeAttrs } from './ds-badge.types.js';
|
|
4
|
+
export declare class DsBadge extends UiKitElement {
|
|
5
|
+
static styles: import("lit").CSSResult[];
|
|
6
|
+
number?: number;
|
|
7
|
+
variant: DsBadgeAttrs['variant'];
|
|
8
|
+
size: DsBadgeAttrs['size'];
|
|
9
|
+
protected get hasNumber(): boolean;
|
|
10
|
+
protected get classes(): {
|
|
11
|
+
[x: string]: boolean;
|
|
12
|
+
container: boolean;
|
|
13
|
+
dot: boolean;
|
|
14
|
+
number: boolean;
|
|
15
|
+
};
|
|
16
|
+
protected get contentTemplate(): typeof nothing | import("lit").TemplateResult<1>;
|
|
17
|
+
render(): import("lit").TemplateResult<1>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { UiKitElement as h } from "../base/UiKitElement.js";
|
|
2
|
+
import { customUiKitElement as l } from "../../decorators/customUiKitElement.js";
|
|
3
|
+
import "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
|
|
4
|
+
import { nothing as b, html as u } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
|
|
5
|
+
import "../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
6
|
+
import { property as a } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";
|
|
7
|
+
import { classMap as c } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js";
|
|
8
|
+
import { commonStyles as f } from "./styles/common.styles.js";
|
|
9
|
+
import { cupraDiagonalStyles as v } from "./styles/cupra-diagonal.styles.js";
|
|
10
|
+
var y = Object.defineProperty, g = Object.getOwnPropertyDescriptor, i = (p, r, m, s) => {
|
|
11
|
+
for (var t = s > 1 ? void 0 : s ? g(r, m) : r, o = p.length - 1, n; o >= 0; o--)
|
|
12
|
+
(n = p[o]) && (t = (s ? n(r, m, t) : n(t)) || t);
|
|
13
|
+
return s && t && y(r, m, t), t;
|
|
14
|
+
};
|
|
15
|
+
let e = class extends h {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments), this.variant = "base", this.size = "medium";
|
|
18
|
+
}
|
|
19
|
+
get hasNumber() {
|
|
20
|
+
return typeof this.number == "number" && !Number.isNaN(this.number);
|
|
21
|
+
}
|
|
22
|
+
get classes() {
|
|
23
|
+
return {
|
|
24
|
+
container: !0,
|
|
25
|
+
dot: !this.hasNumber,
|
|
26
|
+
number: this.hasNumber,
|
|
27
|
+
[`variant-${this.variant}`]: !0,
|
|
28
|
+
[`size-${this.size}`]: !0
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
get contentTemplate() {
|
|
32
|
+
return this.hasNumber ? u`${this.number}` : b;
|
|
33
|
+
}
|
|
34
|
+
render() {
|
|
35
|
+
return u` <div class=${c(this.classes)}>${this.contentTemplate}</div> `;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
e.styles = [f, v];
|
|
39
|
+
i([
|
|
40
|
+
a({ type: Number })
|
|
41
|
+
], e.prototype, "number", 2);
|
|
42
|
+
i([
|
|
43
|
+
a({ type: String })
|
|
44
|
+
], e.prototype, "variant", 2);
|
|
45
|
+
i([
|
|
46
|
+
a({ type: String })
|
|
47
|
+
], e.prototype, "size", 2);
|
|
48
|
+
e = i([
|
|
49
|
+
l("ds-badge")
|
|
50
|
+
], e);
|
|
51
|
+
export {
|
|
52
|
+
e as DsBadge
|
|
53
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const commonStyles: import("lit").CSSResult;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const cupraDiagonalStyles: import("lit").CSSResult;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { cssWithTokens as e } from "../../../utils/cssWithTokens.js";
|
|
2
|
+
const o = e`
|
|
3
|
+
.container {
|
|
4
|
+
border-radius: 50%;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.number {
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
font-family: var(--dg-font-family-base);
|
|
12
|
+
font-weight: 400;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.number.size-medium {
|
|
16
|
+
width: var(--dg-size-24);
|
|
17
|
+
height: var(--dg-size-24);
|
|
18
|
+
font-size: var(--dg-font-size-body-s);
|
|
19
|
+
line-height: var(--dg-font-body-s-medium-line-height);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.number.size-small {
|
|
23
|
+
width: var(--dg-size-16);
|
|
24
|
+
height: var(--dg-size-16);
|
|
25
|
+
font-size: var(--dg-font-size-body-xs);
|
|
26
|
+
line-height: var(--dg-font-body-xs-medium-line-height);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.variant-base {
|
|
30
|
+
color: var(--dg-color-text-strong);
|
|
31
|
+
background-color: var(--dg-color-bg-base);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.variant-inverted {
|
|
35
|
+
background-color: var(--dg-color-bg-inverted);
|
|
36
|
+
color: var(--dg-color-text-inverted);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.dot {
|
|
40
|
+
width: var(--dg-size-08);
|
|
41
|
+
height: var(--dg-size-08);
|
|
42
|
+
background-color: var(--dg-color-bg-error);
|
|
43
|
+
}
|
|
44
|
+
`;
|
|
45
|
+
export {
|
|
46
|
+
o as cupraDiagonalStyles
|
|
47
|
+
};
|
|
@@ -1,53 +1,58 @@
|
|
|
1
1
|
import { UiKitElement as f } from "../base/UiKitElement.js";
|
|
2
2
|
import { customUiKitElement as u } from "../../decorators/customUiKitElement.js";
|
|
3
|
-
import { iconsManager as
|
|
4
|
-
import { pubSub as
|
|
5
|
-
import { htmlWithTokens as
|
|
3
|
+
import { iconsManager as y } from "../../utils/IconsManager.js";
|
|
4
|
+
import { pubSub as _ } from "../../utils/PubSub.js";
|
|
5
|
+
import { htmlWithTokens as g } from "../../utils/htmlWithTokens.js";
|
|
6
6
|
import "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
|
|
7
7
|
import { html as l } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
|
|
8
8
|
import "../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
9
|
-
import { property as
|
|
9
|
+
import { property as a } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";
|
|
10
10
|
import { state as w } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.js";
|
|
11
|
-
import { unsafeHTML as
|
|
11
|
+
import { unsafeHTML as x } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/unsafe-html.js";
|
|
12
12
|
import { css as $ } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";
|
|
13
|
-
var k = Object.defineProperty,
|
|
13
|
+
var k = Object.defineProperty, H = Object.getOwnPropertyDescriptor, m = (t) => {
|
|
14
14
|
throw TypeError(t);
|
|
15
|
-
}, n = (t,
|
|
16
|
-
for (var
|
|
17
|
-
(p = t[h]) && (
|
|
18
|
-
return
|
|
19
|
-
},
|
|
15
|
+
}, n = (t, e, i, s) => {
|
|
16
|
+
for (var r = s > 1 ? void 0 : s ? H(e, i) : e, h = t.length - 1, p; h >= 0; h--)
|
|
17
|
+
(p = t[h]) && (r = (s ? p(e, i, r) : p(r)) || r);
|
|
18
|
+
return s && r && k(e, i, r), r;
|
|
19
|
+
}, d = (t, e, i) => e.has(t) || m("Cannot " + i), v = (t, e, i) => (d(t, e, "read from private field"), i ? i.call(t) : e.get(t)), I = (t, e, i) => e.has(t) ? m("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, i), D = (t, e, i, s) => (d(t, e, "write to private field"), e.set(t, i), i), N = (t, e, i, s) => ({
|
|
20
|
+
set _(r) {
|
|
21
|
+
D(t, e, r);
|
|
22
|
+
},
|
|
23
|
+
get _() {
|
|
24
|
+
return v(t, e, s);
|
|
25
|
+
}
|
|
26
|
+
}), c;
|
|
20
27
|
let o = class extends f {
|
|
21
28
|
constructor() {
|
|
22
|
-
super(), this.iconHtml = "",
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
this.iconHtml = await ((r = (e = g).fetchIcon) == null ? void 0 : r.call(e, this.iconName, { signal: t }));
|
|
27
|
-
}, y.subscribe("theme", this.getIcon);
|
|
29
|
+
super(), this.iconHtml = "", I(this, c, 0), this.getIcon = async () => {
|
|
30
|
+
const t = ++N(this, c)._, e = await y.fetchIcon(this.iconName);
|
|
31
|
+
t === v(this, c) && (this.iconHtml = e);
|
|
32
|
+
}, _.subscribe("theme", this.getIcon);
|
|
28
33
|
}
|
|
29
34
|
async updated(t) {
|
|
30
35
|
super.updated(t), (t.has("iconName") || !this.iconHtml) && await this.getIcon();
|
|
31
36
|
}
|
|
32
|
-
getDimension(t,
|
|
33
|
-
return t ? `${t}px` :
|
|
37
|
+
getDimension(t, e, i) {
|
|
38
|
+
return t ? `${t}px` : e ? "auto" : this.size ? `${this.size}px` : i;
|
|
34
39
|
}
|
|
35
40
|
get styleTokens() {
|
|
36
41
|
const t = this.getDimension(
|
|
37
42
|
this.width,
|
|
38
43
|
this.height,
|
|
39
44
|
"var(--private-ds-icon-width, var(--ds-icon-width, 20px))"
|
|
40
|
-
),
|
|
45
|
+
), e = this.getDimension(
|
|
41
46
|
this.height,
|
|
42
47
|
this.width,
|
|
43
48
|
"var(--private-ds-icon-height, var(--ds-icon-height, 20px))"
|
|
44
49
|
);
|
|
45
|
-
return
|
|
50
|
+
return g`
|
|
46
51
|
<style>
|
|
47
52
|
.ds-icon {
|
|
48
53
|
display: inline-block;
|
|
49
54
|
width: ${t};
|
|
50
|
-
height: ${
|
|
55
|
+
height: ${e};
|
|
51
56
|
}
|
|
52
57
|
|
|
53
58
|
.ds-icon-color {
|
|
@@ -63,11 +68,11 @@ let o = class extends f {
|
|
|
63
68
|
render() {
|
|
64
69
|
return l`
|
|
65
70
|
${this.styleTokens}
|
|
66
|
-
${this.iconHtml ?
|
|
71
|
+
${this.iconHtml ? x(this.iconHtml) : l`<svg class="ds-icon">x</svg>`}
|
|
67
72
|
`;
|
|
68
73
|
}
|
|
69
74
|
};
|
|
70
|
-
|
|
75
|
+
c = /* @__PURE__ */ new WeakMap();
|
|
71
76
|
o.styles = $`
|
|
72
77
|
:host {
|
|
73
78
|
line-height: 0;
|
|
@@ -75,19 +80,19 @@ o.styles = $`
|
|
|
75
80
|
}
|
|
76
81
|
`;
|
|
77
82
|
n([
|
|
78
|
-
|
|
83
|
+
a({ type: String, attribute: "icon-name" })
|
|
79
84
|
], o.prototype, "iconName", 2);
|
|
80
85
|
n([
|
|
81
|
-
|
|
86
|
+
a({ type: String, attribute: "color" })
|
|
82
87
|
], o.prototype, "color", 2);
|
|
83
88
|
n([
|
|
84
|
-
|
|
89
|
+
a({ type: Number })
|
|
85
90
|
], o.prototype, "width", 2);
|
|
86
91
|
n([
|
|
87
|
-
|
|
92
|
+
a({ type: Number })
|
|
88
93
|
], o.prototype, "height", 2);
|
|
89
94
|
n([
|
|
90
|
-
|
|
95
|
+
a({ type: Number, attribute: "size" })
|
|
91
96
|
], o.prototype, "size", 2);
|
|
92
97
|
n([
|
|
93
98
|
w()
|
|
@@ -54,7 +54,7 @@ let m = class extends v {
|
|
|
54
54
|
}
|
|
55
55
|
loadThemeStyles() {
|
|
56
56
|
return this.loadStyles ? new Promise((t, o) => {
|
|
57
|
-
const s = "/1.0.0-canary.
|
|
57
|
+
const s = "/1.0.0-canary.19", r = `https://ds-assets.cupra.com${s}/styles/${this.theme}/theme.css`;
|
|
58
58
|
if (document.head.querySelector(`link[href="${r}"]`)) t();
|
|
59
59
|
else {
|
|
60
60
|
const e = `ui-kit-theme-${s}`, a = document.getElementById(e), n = document.createElement("link");
|
package/dist-react/index.js
CHANGED
|
@@ -56,7 +56,8 @@ import "./components/ds-static-box/ds-static-box.js";
|
|
|
56
56
|
import "./components/ds-interactive-card/ds-interactive-card.js";
|
|
57
57
|
import "./components/ds-radio-button-group/ds-radio-button-group.js";
|
|
58
58
|
import "./components/ds-sidebar-navigation/ds-sidebar-navigation.js";
|
|
59
|
-
import
|
|
59
|
+
import "./components/ds-badge/ds-badge.js";
|
|
60
|
+
import { iconNames as ao } from "./components/ds-icon/iconNames.js";
|
|
60
61
|
export {
|
|
61
|
-
|
|
62
|
+
ao as iconNames
|
|
62
63
|
};
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import type { Icons } from '../components/ds-icon/Icons.type.ts';
|
|
2
2
|
declare class IconsManager {
|
|
3
|
-
private static instance;
|
|
4
3
|
private icons;
|
|
5
4
|
private theme;
|
|
6
|
-
|
|
5
|
+
constructor();
|
|
7
6
|
handleChangeTheme: (theme: string) => void;
|
|
8
|
-
static getInstance(): IconsManager;
|
|
9
|
-
private getCachedIcon;
|
|
10
7
|
fetchIcon: (iconName: Icons, requestInit?: RequestInit) => Promise<string>;
|
|
11
8
|
private loadIcon;
|
|
12
9
|
}
|
|
@@ -1,32 +1,38 @@
|
|
|
1
|
-
import { THEME_STORAGE_KEY as
|
|
2
|
-
import { pubSub as
|
|
3
|
-
class
|
|
1
|
+
import { THEME_STORAGE_KEY as r } from "../core/theme.constants.js";
|
|
2
|
+
import { pubSub as l } from "./PubSub.js";
|
|
3
|
+
class f {
|
|
4
4
|
constructor() {
|
|
5
|
-
this.icons = {}, this.handleChangeTheme = (
|
|
6
|
-
this.theme =
|
|
7
|
-
const
|
|
8
|
-
this.icons = {},
|
|
9
|
-
}, this.fetchIcon = async (
|
|
10
|
-
const
|
|
11
|
-
!this.theme &&
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
...e
|
|
26
|
-
}).then((s) => s.text()).catch((s) => ((s == null ? void 0 : s.name) !== "AbortError" && console.error(`Failed to fetch icon "${t}":`, s), "")) : Promise.resolve('<svg class="ds-icon"></svg>');
|
|
5
|
+
this.icons = {}, this.handleChangeTheme = (s) => {
|
|
6
|
+
this.theme = s;
|
|
7
|
+
const o = Object.keys(this.icons);
|
|
8
|
+
this.icons = {}, o.forEach((t) => this.fetchIcon(t));
|
|
9
|
+
}, this.fetchIcon = async (s, o = {}) => {
|
|
10
|
+
const t = typeof sessionStorage < "u" ? sessionStorage == null ? void 0 : sessionStorage.getItem(r) : null;
|
|
11
|
+
!this.theme && t && (this.theme = t);
|
|
12
|
+
const e = this.icons[s];
|
|
13
|
+
if (e) return await e;
|
|
14
|
+
const n = this.loadIcon(s, o).catch((a) => {
|
|
15
|
+
throw delete this.icons[s], a;
|
|
16
|
+
});
|
|
17
|
+
return this.icons[s] = n, n;
|
|
18
|
+
}, this.loadIcon = (s, { cache: o = "force-cache", ...t }) => this.theme ? fetch(`https://ds-assets.cupra.com/icons/${this.theme}/${s}.svg`, {
|
|
19
|
+
cache: o,
|
|
20
|
+
...t
|
|
21
|
+
}).then((e) => e.text()).catch((e) => {
|
|
22
|
+
if ((e == null ? void 0 : e.name) === "AbortError") throw e;
|
|
23
|
+
return console.error(`Failed to fetch icon "${s}":`, e), "";
|
|
24
|
+
}) : Promise.resolve('<svg class="ds-icon"></svg>'), l.subscribe("theme", this.handleChangeTheme);
|
|
27
25
|
}
|
|
28
26
|
}
|
|
29
|
-
const
|
|
27
|
+
const c = Symbol.for("@cupra/ui-kit/icons-manager"), h = globalThis;
|
|
28
|
+
let i = h[c];
|
|
29
|
+
i || (i = new f(), Object.defineProperty(h, c, {
|
|
30
|
+
value: i,
|
|
31
|
+
writable: !1,
|
|
32
|
+
configurable: !1,
|
|
33
|
+
enumerable: !1
|
|
34
|
+
}));
|
|
35
|
+
const b = i;
|
|
30
36
|
export {
|
|
31
|
-
|
|
37
|
+
b as iconsManager
|
|
32
38
|
};
|
|
@@ -5,7 +5,7 @@ class s {
|
|
|
5
5
|
theme: t
|
|
6
6
|
}) => {
|
|
7
7
|
if (!t || !e) return;
|
|
8
|
-
const c = `https://ds-assets.cupra.com/1.0.0-canary.
|
|
8
|
+
const c = `https://ds-assets.cupra.com/1.0.0-canary.19/styles/${t}/components/${e}.css`, r = this.getCachedStyleSheetPromise({ url: c });
|
|
9
9
|
if (r) return r;
|
|
10
10
|
const i = this.fetchStyle({ url: c }).then((n) => (n || this.stylePromises.delete(c), n));
|
|
11
11
|
return this.stylePromises.set(c, i), this.stylePromises.get(c);
|
|
@@ -3,7 +3,7 @@ import "../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
|
|
|
3
3
|
import "../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
4
4
|
import { unsafeCSS as n, css as o } from "../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";
|
|
5
5
|
function x(t, ...r) {
|
|
6
|
-
const e = String.raw({ raw: t }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v1-0-0-canary-
|
|
6
|
+
const e = String.raw({ raw: t }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v1-0-0-canary-19"), i = n(e);
|
|
7
7
|
return o`${i}`;
|
|
8
8
|
}
|
|
9
9
|
export {
|
|
@@ -3,7 +3,7 @@ import { html as n } from "../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit
|
|
|
3
3
|
import "../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
4
4
|
import { unsafeHTML as i } from "../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/unsafe-html.js";
|
|
5
5
|
function x(t, ...r) {
|
|
6
|
-
const o = String.raw({ raw: t }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v1-0-0-canary-
|
|
6
|
+
const o = String.raw({ raw: t }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v1-0-0-canary-19"), e = i(o);
|
|
7
7
|
return n`${e}`;
|
|
8
8
|
}
|
|
9
9
|
export {
|