@cupra/ui-kit 1.1.0-canary.4 → 1.1.0-canary.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ds-media-control/ds-media-control.d.ts +17 -0
- package/dist/components/ds-media-control/ds-media-control.js +107 -0
- package/dist/components/ds-media-control/ds-media-control.test.d.ts +8 -0
- package/dist/components/ds-media-control/ds-media-control.types.d.ts +8 -0
- package/dist/components/ds-media-control/styles/common.styles.d.ts +1 -0
- package/dist/components/ds-media-control/styles/common.styles.js +54 -0
- 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.js +1 -1
- package/dist/utils/PubSub.js +1 -1
- 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/ds-media-control/ds-media-control.d.ts +17 -0
- package/dist-react/components/ds-media-control/ds-media-control.js +107 -0
- package/dist-react/components/ds-media-control/ds-media-control.test.d.ts +8 -0
- package/dist-react/components/ds-media-control/ds-media-control.types.d.ts +8 -0
- package/dist-react/components/ds-media-control/styles/common.styles.d.ts +1 -0
- package/dist-react/components/ds-media-control/styles/common.styles.js +54 -0
- 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.js +1 -1
- package/dist-react/utils/PubSub.js +1 -1
- 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
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { UiKitElement } from '../base/UiKitElement.ts';
|
|
2
|
+
import type { DsMediaControlAttrs } from './ds-media-control.types.ts';
|
|
3
|
+
export declare class DsMediaControl extends UiKitElement {
|
|
4
|
+
static styles: import("lit").CSSResult[];
|
|
5
|
+
state: DsMediaControlAttrs['state'];
|
|
6
|
+
size: DsMediaControlAttrs['size'];
|
|
7
|
+
progress: DsMediaControlAttrs['progress'];
|
|
8
|
+
private get normalizedProgress();
|
|
9
|
+
protected get classes(): Record<string, boolean>;
|
|
10
|
+
private get iconSize();
|
|
11
|
+
private get iconName();
|
|
12
|
+
private get iconTemplate();
|
|
13
|
+
private handleToggle;
|
|
14
|
+
private onKeyDown;
|
|
15
|
+
private get progressTemplate();
|
|
16
|
+
render(): import("lit").TemplateResult<1>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { UiKitElement as u } from "../base/UiKitElement.js";
|
|
2
|
+
import { customUiKitElement as d } 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 { html as p } 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 l } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";
|
|
7
|
+
import { classMap as g } 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
|
+
var y = Object.defineProperty, v = Object.getOwnPropertyDescriptor, c = (e, s, r, o) => {
|
|
10
|
+
for (var t = o > 1 ? void 0 : o ? v(s, r) : s, a = e.length - 1, n; a >= 0; a--)
|
|
11
|
+
(n = e[a]) && (t = (o ? n(s, r, t) : n(t)) || t);
|
|
12
|
+
return o && t && y(s, r, t), t;
|
|
13
|
+
};
|
|
14
|
+
let i = class extends u {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments), this.state = "pause", this.size = "medium", this.progress = 0, this.handleToggle = (e) => {
|
|
17
|
+
e.stopPropagation();
|
|
18
|
+
const s = this.state === "play" ? "pause" : "play";
|
|
19
|
+
this.state = s;
|
|
20
|
+
const r = s === "play" ? "ds-media-control:play" : "ds-media-control:pause";
|
|
21
|
+
this.dispatchEvent(new CustomEvent(r, { bubbles: !0, composed: !0 }));
|
|
22
|
+
}, this.onKeyDown = (e) => {
|
|
23
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), this.handleToggle(e));
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
get normalizedProgress() {
|
|
27
|
+
const e = Number(this.progress ?? 0);
|
|
28
|
+
return Number.isNaN(e) ? 0 : Math.min(100, Math.max(0, e));
|
|
29
|
+
}
|
|
30
|
+
get classes() {
|
|
31
|
+
return {
|
|
32
|
+
container: !0,
|
|
33
|
+
[this.size]: !!this.size,
|
|
34
|
+
[this.state]: !!this.state
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
get iconSize() {
|
|
38
|
+
switch (this.size) {
|
|
39
|
+
case "large":
|
|
40
|
+
return 24;
|
|
41
|
+
case "small":
|
|
42
|
+
return 16;
|
|
43
|
+
default:
|
|
44
|
+
return 20;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
get iconName() {
|
|
48
|
+
return this.state === "play" ? "pause" : "play";
|
|
49
|
+
}
|
|
50
|
+
get iconTemplate() {
|
|
51
|
+
return this.componentFactory.createIcon({
|
|
52
|
+
class: "icon",
|
|
53
|
+
"icon-name": this.iconName,
|
|
54
|
+
size: this.iconSize
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
get progressTemplate() {
|
|
58
|
+
const e = this.size === "large" ? 46 : this.size === "small" ? 30 : 38, r = e / 2 - 2 / 2, o = r - 1, t = 2 * Math.PI * r, a = this.normalizedProgress / 100, n = t.toFixed(3), m = (t * (1 - a)).toFixed(3), h = `${-e / 2} ${-e / 2} ${e} ${e}`;
|
|
59
|
+
return p`
|
|
60
|
+
<svg part="progress" class="progress" viewBox="${h}" aria-hidden="true" focusable="false">
|
|
61
|
+
<circle
|
|
62
|
+
class="indicator"
|
|
63
|
+
cx="0"
|
|
64
|
+
cy="0"
|
|
65
|
+
r="${o}"
|
|
66
|
+
fill="none"
|
|
67
|
+
stroke-dasharray="${n}"
|
|
68
|
+
stroke-dashoffset="${m}"
|
|
69
|
+
vector-effect="non-scaling-stroke"
|
|
70
|
+
></circle>
|
|
71
|
+
</svg>
|
|
72
|
+
`;
|
|
73
|
+
}
|
|
74
|
+
render() {
|
|
75
|
+
const e = this.state === "play" ? "pause" : "play";
|
|
76
|
+
return p`
|
|
77
|
+
<div
|
|
78
|
+
part="container"
|
|
79
|
+
class=${g(this.classes)}
|
|
80
|
+
role="button"
|
|
81
|
+
tabindex="0"
|
|
82
|
+
aria-label=${`${e} media ${this.size}`}
|
|
83
|
+
@click=${this.handleToggle}
|
|
84
|
+
@keydown=${this.onKeyDown}
|
|
85
|
+
>
|
|
86
|
+
${this.progressTemplate}
|
|
87
|
+
${this.iconTemplate}
|
|
88
|
+
</div>
|
|
89
|
+
`;
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
i.styles = [f];
|
|
93
|
+
c([
|
|
94
|
+
l({ type: String, reflect: !0 })
|
|
95
|
+
], i.prototype, "state", 2);
|
|
96
|
+
c([
|
|
97
|
+
l({ type: String, reflect: !0 })
|
|
98
|
+
], i.prototype, "size", 2);
|
|
99
|
+
c([
|
|
100
|
+
l({ type: Number, reflect: !0 })
|
|
101
|
+
], i.prototype, "progress", 2);
|
|
102
|
+
i = c([
|
|
103
|
+
d("ds-media-control")
|
|
104
|
+
], i);
|
|
105
|
+
export {
|
|
106
|
+
i as DsMediaControl
|
|
107
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const commonStyles: import("lit").CSSResult;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import "../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
|
|
2
|
+
import "../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
|
|
3
|
+
import "../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
4
|
+
import { css as r } from "../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";
|
|
5
|
+
const s = r`
|
|
6
|
+
:host {
|
|
7
|
+
display: contents;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
[part='container'] {
|
|
11
|
+
position: relative;
|
|
12
|
+
display: inline-grid;
|
|
13
|
+
place-items: center;
|
|
14
|
+
border-radius: var(--ds-border-radius-full, 100000px);
|
|
15
|
+
background: var(--ds-color-surface-contrast, rgba(9, 9, 11, 0.3));
|
|
16
|
+
user-select: none;
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
outline: none;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.container.small {
|
|
22
|
+
width: 32px;
|
|
23
|
+
height: 32px;
|
|
24
|
+
}
|
|
25
|
+
.container.medium {
|
|
26
|
+
width: 40px;
|
|
27
|
+
height: 40px;
|
|
28
|
+
}
|
|
29
|
+
.container.large {
|
|
30
|
+
width: 48px;
|
|
31
|
+
height: 48px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.progress {
|
|
35
|
+
position: absolute;
|
|
36
|
+
inset: 0;
|
|
37
|
+
width: 100%;
|
|
38
|
+
height: 100%;
|
|
39
|
+
pointer-events: none;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.progress .indicator {
|
|
43
|
+
stroke: var(--ds-icon-color);
|
|
44
|
+
stroke-width: 1.5px;
|
|
45
|
+
transform: rotate(-90deg);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
[part='container']:focus-visible {
|
|
49
|
+
box-shadow: 0 0 0 2px var(--ds-color-focus-ring, rgba(255, 255, 255, 0.6));
|
|
50
|
+
}
|
|
51
|
+
`;
|
|
52
|
+
export {
|
|
53
|
+
s as commonStyles
|
|
54
|
+
};
|
|
@@ -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.1.0-canary.
|
|
57
|
+
const s = "/1.1.0-canary.6", 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
|
@@ -63,7 +63,8 @@ import "./components/ds-toast-message/ds-toast-message.js";
|
|
|
63
63
|
import "./components/ds-toggle-button/ds-toggle-button.js";
|
|
64
64
|
import "./components/ds-toggle-switch/ds-toggle-switch.js";
|
|
65
65
|
import "./components/ds-tooltip/ds-tooltip.js";
|
|
66
|
-
import
|
|
66
|
+
import "./components/ds-media-control/ds-media-control.js";
|
|
67
|
+
import { iconNames as bo } from "./components/ds-icon/iconNames.js";
|
|
67
68
|
export {
|
|
68
|
-
|
|
69
|
+
bo as iconNames
|
|
69
70
|
};
|
|
@@ -25,7 +25,7 @@ class f {
|
|
|
25
25
|
}) : Promise.resolve('<svg class="ds-icon"></svg>'), l.subscribe("theme", this.handleChangeTheme);
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
const c = Symbol.for("@cupra/ui-kit/icons-manager/1.1.0-canary.
|
|
28
|
+
const c = Symbol.for("@cupra/ui-kit/icons-manager/1.1.0-canary.6"), h = globalThis;
|
|
29
29
|
let n = h[c];
|
|
30
30
|
n || (n = new f(), Object.defineProperty(h, c, {
|
|
31
31
|
value: n,
|
package/dist/utils/PubSub.js
CHANGED
|
@@ -18,7 +18,7 @@ class e {
|
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
const u = Symbol.for("@cupra/ui-kit/pubsub/1.1.0-canary.
|
|
21
|
+
const u = Symbol.for("@cupra/ui-kit/pubsub/1.1.0-canary.6"), t = globalThis;
|
|
22
22
|
let b = t[u];
|
|
23
23
|
b || (b = new e(), Object.defineProperty(t, u, {
|
|
24
24
|
value: b,
|
|
@@ -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.1.0-canary.
|
|
8
|
+
const c = `https://ds-assets.cupra.com/1.1.0-canary.6/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-1-0-canary-
|
|
6
|
+
const e = String.raw({ raw: t }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v1-1-0-canary-6"), 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-1-0-canary-
|
|
6
|
+
const o = String.raw({ raw: t }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v1-1-0-canary-6"), e = i(o);
|
|
7
7
|
return n`${e}`;
|
|
8
8
|
}
|
|
9
9
|
export {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { UiKitElement } from '../base/UiKitElement.ts';
|
|
2
|
+
import type { DsMediaControlAttrs } from './ds-media-control.types.ts';
|
|
3
|
+
export declare class DsMediaControl extends UiKitElement {
|
|
4
|
+
static styles: import("lit").CSSResult[];
|
|
5
|
+
state: DsMediaControlAttrs['state'];
|
|
6
|
+
size: DsMediaControlAttrs['size'];
|
|
7
|
+
progress: DsMediaControlAttrs['progress'];
|
|
8
|
+
private get normalizedProgress();
|
|
9
|
+
protected get classes(): Record<string, boolean>;
|
|
10
|
+
private get iconSize();
|
|
11
|
+
private get iconName();
|
|
12
|
+
private get iconTemplate();
|
|
13
|
+
private handleToggle;
|
|
14
|
+
private onKeyDown;
|
|
15
|
+
private get progressTemplate();
|
|
16
|
+
render(): import("lit").TemplateResult<1>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { UiKitElement as u } from "../base/UiKitElement.js";
|
|
2
|
+
import { customUiKitElement as d } 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 { html as p } 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 l } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";
|
|
7
|
+
import { classMap as g } 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
|
+
var y = Object.defineProperty, v = Object.getOwnPropertyDescriptor, c = (e, s, r, o) => {
|
|
10
|
+
for (var t = o > 1 ? void 0 : o ? v(s, r) : s, a = e.length - 1, n; a >= 0; a--)
|
|
11
|
+
(n = e[a]) && (t = (o ? n(s, r, t) : n(t)) || t);
|
|
12
|
+
return o && t && y(s, r, t), t;
|
|
13
|
+
};
|
|
14
|
+
let i = class extends u {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments), this.state = "pause", this.size = "medium", this.progress = 0, this.handleToggle = (e) => {
|
|
17
|
+
e.stopPropagation();
|
|
18
|
+
const s = this.state === "play" ? "pause" : "play";
|
|
19
|
+
this.state = s;
|
|
20
|
+
const r = s === "play" ? "ds-media-control:play" : "ds-media-control:pause";
|
|
21
|
+
this.dispatchEvent(new CustomEvent(r, { bubbles: !0, composed: !0 }));
|
|
22
|
+
}, this.onKeyDown = (e) => {
|
|
23
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), this.handleToggle(e));
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
get normalizedProgress() {
|
|
27
|
+
const e = Number(this.progress ?? 0);
|
|
28
|
+
return Number.isNaN(e) ? 0 : Math.min(100, Math.max(0, e));
|
|
29
|
+
}
|
|
30
|
+
get classes() {
|
|
31
|
+
return {
|
|
32
|
+
container: !0,
|
|
33
|
+
[this.size]: !!this.size,
|
|
34
|
+
[this.state]: !!this.state
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
get iconSize() {
|
|
38
|
+
switch (this.size) {
|
|
39
|
+
case "large":
|
|
40
|
+
return 24;
|
|
41
|
+
case "small":
|
|
42
|
+
return 16;
|
|
43
|
+
default:
|
|
44
|
+
return 20;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
get iconName() {
|
|
48
|
+
return this.state === "play" ? "pause" : "play";
|
|
49
|
+
}
|
|
50
|
+
get iconTemplate() {
|
|
51
|
+
return this.componentFactory.createIcon({
|
|
52
|
+
class: "icon",
|
|
53
|
+
"icon-name": this.iconName,
|
|
54
|
+
size: this.iconSize
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
get progressTemplate() {
|
|
58
|
+
const e = this.size === "large" ? 46 : this.size === "small" ? 30 : 38, r = e / 2 - 2 / 2, o = r - 1, t = 2 * Math.PI * r, a = this.normalizedProgress / 100, n = t.toFixed(3), m = (t * (1 - a)).toFixed(3), h = `${-e / 2} ${-e / 2} ${e} ${e}`;
|
|
59
|
+
return p`
|
|
60
|
+
<svg part="progress" class="progress" viewBox="${h}" aria-hidden="true" focusable="false">
|
|
61
|
+
<circle
|
|
62
|
+
class="indicator"
|
|
63
|
+
cx="0"
|
|
64
|
+
cy="0"
|
|
65
|
+
r="${o}"
|
|
66
|
+
fill="none"
|
|
67
|
+
stroke-dasharray="${n}"
|
|
68
|
+
stroke-dashoffset="${m}"
|
|
69
|
+
vector-effect="non-scaling-stroke"
|
|
70
|
+
></circle>
|
|
71
|
+
</svg>
|
|
72
|
+
`;
|
|
73
|
+
}
|
|
74
|
+
render() {
|
|
75
|
+
const e = this.state === "play" ? "pause" : "play";
|
|
76
|
+
return p`
|
|
77
|
+
<div
|
|
78
|
+
part="container"
|
|
79
|
+
class=${g(this.classes)}
|
|
80
|
+
role="button"
|
|
81
|
+
tabindex="0"
|
|
82
|
+
aria-label=${`${e} media ${this.size}`}
|
|
83
|
+
@click=${this.handleToggle}
|
|
84
|
+
@keydown=${this.onKeyDown}
|
|
85
|
+
>
|
|
86
|
+
${this.progressTemplate}
|
|
87
|
+
${this.iconTemplate}
|
|
88
|
+
</div>
|
|
89
|
+
`;
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
i.styles = [f];
|
|
93
|
+
c([
|
|
94
|
+
l({ type: String, reflect: !0 })
|
|
95
|
+
], i.prototype, "state", 2);
|
|
96
|
+
c([
|
|
97
|
+
l({ type: String, reflect: !0 })
|
|
98
|
+
], i.prototype, "size", 2);
|
|
99
|
+
c([
|
|
100
|
+
l({ type: Number, reflect: !0 })
|
|
101
|
+
], i.prototype, "progress", 2);
|
|
102
|
+
i = c([
|
|
103
|
+
d("ds-media-control")
|
|
104
|
+
], i);
|
|
105
|
+
export {
|
|
106
|
+
i as DsMediaControl
|
|
107
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const commonStyles: import("lit").CSSResult;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import "../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
|
|
2
|
+
import "../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
|
|
3
|
+
import "../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
4
|
+
import { css as r } from "../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";
|
|
5
|
+
const s = r`
|
|
6
|
+
:host {
|
|
7
|
+
display: contents;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
[part='container'] {
|
|
11
|
+
position: relative;
|
|
12
|
+
display: inline-grid;
|
|
13
|
+
place-items: center;
|
|
14
|
+
border-radius: var(--ds-border-radius-full, 100000px);
|
|
15
|
+
background: var(--ds-color-surface-contrast, rgba(9, 9, 11, 0.3));
|
|
16
|
+
user-select: none;
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
outline: none;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.container.small {
|
|
22
|
+
width: 32px;
|
|
23
|
+
height: 32px;
|
|
24
|
+
}
|
|
25
|
+
.container.medium {
|
|
26
|
+
width: 40px;
|
|
27
|
+
height: 40px;
|
|
28
|
+
}
|
|
29
|
+
.container.large {
|
|
30
|
+
width: 48px;
|
|
31
|
+
height: 48px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.progress {
|
|
35
|
+
position: absolute;
|
|
36
|
+
inset: 0;
|
|
37
|
+
width: 100%;
|
|
38
|
+
height: 100%;
|
|
39
|
+
pointer-events: none;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.progress .indicator {
|
|
43
|
+
stroke: var(--ds-icon-color);
|
|
44
|
+
stroke-width: 1.5px;
|
|
45
|
+
transform: rotate(-90deg);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
[part='container']:focus-visible {
|
|
49
|
+
box-shadow: 0 0 0 2px var(--ds-color-focus-ring, rgba(255, 255, 255, 0.6));
|
|
50
|
+
}
|
|
51
|
+
`;
|
|
52
|
+
export {
|
|
53
|
+
s as commonStyles
|
|
54
|
+
};
|
|
@@ -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.1.0-canary.
|
|
57
|
+
const s = "/1.1.0-canary.6", 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
|
@@ -63,7 +63,8 @@ import "./components/ds-toast-message/ds-toast-message.js";
|
|
|
63
63
|
import "./components/ds-toggle-button/ds-toggle-button.js";
|
|
64
64
|
import "./components/ds-toggle-switch/ds-toggle-switch.js";
|
|
65
65
|
import "./components/ds-tooltip/ds-tooltip.js";
|
|
66
|
-
import
|
|
66
|
+
import "./components/ds-media-control/ds-media-control.js";
|
|
67
|
+
import { iconNames as bo } from "./components/ds-icon/iconNames.js";
|
|
67
68
|
export {
|
|
68
|
-
|
|
69
|
+
bo as iconNames
|
|
69
70
|
};
|
|
@@ -25,7 +25,7 @@ class f {
|
|
|
25
25
|
}) : Promise.resolve('<svg class="ds-icon"></svg>'), l.subscribe("theme", this.handleChangeTheme);
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
const c = Symbol.for("@cupra/ui-kit/icons-manager/1.1.0-canary.
|
|
28
|
+
const c = Symbol.for("@cupra/ui-kit/icons-manager/1.1.0-canary.6"), h = globalThis;
|
|
29
29
|
let n = h[c];
|
|
30
30
|
n || (n = new f(), Object.defineProperty(h, c, {
|
|
31
31
|
value: n,
|
|
@@ -18,7 +18,7 @@ class e {
|
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
const u = Symbol.for("@cupra/ui-kit/pubsub/1.1.0-canary.
|
|
21
|
+
const u = Symbol.for("@cupra/ui-kit/pubsub/1.1.0-canary.6"), t = globalThis;
|
|
22
22
|
let b = t[u];
|
|
23
23
|
b || (b = new e(), Object.defineProperty(t, u, {
|
|
24
24
|
value: b,
|
|
@@ -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.1.0-canary.
|
|
8
|
+
const c = `https://ds-assets.cupra.com/1.1.0-canary.6/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-1-0-canary-
|
|
6
|
+
const e = String.raw({ raw: t }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v1-1-0-canary-6"), 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-1-0-canary-
|
|
6
|
+
const o = String.raw({ raw: t }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v1-1-0-canary-6"), e = i(o);
|
|
7
7
|
return n`${e}`;
|
|
8
8
|
}
|
|
9
9
|
export {
|