@cupra/ui-kit 2.0.0-canary.119 → 2.0.0-canary.120
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/cjs/components/ds-checkbox/ds-checkbox.cjs +2 -2
- package/dist/cjs/components/ds-dialog/ds-dialog.cjs +2 -2
- package/dist/cjs/components/ds-dialog-fullscreen/ds-dialog-fullscreen.cjs +2 -2
- package/dist/cjs/components/ds-drawer/ds-drawer.cjs +4 -4
- package/dist/cjs/components/ds-media-control/ds-media-control.cjs +3 -3
- package/dist/cjs/components/ds-tabs/ds-tabs.cjs +2 -2
- package/dist/cjs/components/ds-theme-provider/ds-theme-provider.cjs +1 -1
- package/dist/cjs/components/ds-toggle-switch/ds-toggle-switch.cjs +3 -3
- package/dist/cjs/decorators/customUiKitElement.cjs +1 -1
- package/dist/cjs/utils/IconsManager.cjs +1 -1
- package/dist/cjs/utils/PubSub.cjs +1 -1
- package/dist/cjs/utils/StylesRegistry/StylesRegistry.cjs +1 -1
- package/dist/cjs/utils/cssWithTokens.cjs +1 -1
- package/dist/cjs/utils/htmlWithTokens.cjs +1 -1
- package/dist/cjs/utils/version.cjs +1 -1
- package/dist/esm/components/ds-checkbox/ds-checkbox.js +12 -4
- package/dist/esm/components/ds-dialog/ds-dialog.js +11 -4
- package/dist/esm/components/ds-dialog-fullscreen/ds-dialog-fullscreen.js +12 -5
- package/dist/esm/components/ds-drawer/ds-drawer.js +26 -18
- package/dist/esm/components/ds-media-control/ds-media-control.js +22 -14
- package/dist/esm/components/ds-tabs/ds-tabs.js +10 -4
- package/dist/esm/components/ds-theme-provider/ds-theme-provider.js +1 -1
- package/dist/esm/components/ds-toggle-switch/ds-toggle-switch.js +30 -21
- package/dist/esm/decorators/customUiKitElement.js +1 -1
- package/dist/esm/utils/IconsManager.js +1 -1
- package/dist/esm/utils/PubSub.js +1 -1
- package/dist/esm/utils/StylesRegistry/StylesRegistry.js +1 -1
- package/dist/esm/utils/cssWithTokens.js +1 -1
- package/dist/esm/utils/htmlWithTokens.js +1 -1
- package/dist/esm/utils/version.js +1 -1
- package/dist/types/components/ds-checkbox/ds-checkbox.d.ts +4 -1
- package/dist/types/components/ds-dialog/ds-dialog.d.ts +4 -1
- package/dist/types/components/ds-dialog-fullscreen/ds-dialog-fullscreen.d.ts +4 -1
- package/dist/types/components/ds-drawer/ds-drawer.d.ts +4 -1
- package/dist/types/components/ds-drawer/ds-drawer.types.d.ts +1 -1
- package/dist/types/components/ds-media-control/ds-media-control.d.ts +4 -1
- package/dist/types/components/ds-tabs/ds-tabs.d.ts +4 -1
- package/dist/types/components/ds-toggle-switch/ds-toggle-switch.d.ts +4 -1
- package/dist-react/cjs/components/ds-checkbox/ds-checkbox.cjs +2 -2
- package/dist-react/cjs/components/ds-dialog/ds-dialog.cjs +2 -2
- package/dist-react/cjs/components/ds-dialog-fullscreen/ds-dialog-fullscreen.cjs +2 -2
- package/dist-react/cjs/components/ds-drawer/ds-drawer.cjs +4 -4
- package/dist-react/cjs/components/ds-media-control/ds-media-control.cjs +3 -3
- package/dist-react/cjs/components/ds-tabs/ds-tabs.cjs +2 -2
- package/dist-react/cjs/components/ds-theme-provider/ds-theme-provider.cjs +1 -1
- package/dist-react/cjs/components/ds-toggle-switch/ds-toggle-switch.cjs +3 -3
- package/dist-react/cjs/decorators/customUiKitElement.cjs +1 -1
- package/dist-react/cjs/utils/IconsManager.cjs +1 -1
- package/dist-react/cjs/utils/PubSub.cjs +1 -1
- package/dist-react/cjs/utils/StylesRegistry/StylesRegistry.cjs +1 -1
- package/dist-react/cjs/utils/cssWithTokens.cjs +1 -1
- package/dist-react/cjs/utils/htmlWithTokens.cjs +1 -1
- package/dist-react/cjs/utils/version.cjs +1 -1
- package/dist-react/esm/components/ds-checkbox/ds-checkbox.js +12 -4
- package/dist-react/esm/components/ds-dialog/ds-dialog.js +11 -4
- package/dist-react/esm/components/ds-dialog-fullscreen/ds-dialog-fullscreen.js +12 -5
- package/dist-react/esm/components/ds-drawer/ds-drawer.js +26 -18
- package/dist-react/esm/components/ds-media-control/ds-media-control.js +22 -14
- package/dist-react/esm/components/ds-tabs/ds-tabs.js +10 -4
- package/dist-react/esm/components/ds-theme-provider/ds-theme-provider.js +1 -1
- package/dist-react/esm/components/ds-toggle-switch/ds-toggle-switch.js +30 -21
- package/dist-react/esm/decorators/customUiKitElement.js +1 -1
- package/dist-react/esm/utils/IconsManager.js +1 -1
- package/dist-react/esm/utils/PubSub.js +1 -1
- package/dist-react/esm/utils/StylesRegistry/StylesRegistry.js +1 -1
- package/dist-react/esm/utils/cssWithTokens.js +1 -1
- package/dist-react/esm/utils/htmlWithTokens.js +1 -1
- package/dist-react/esm/utils/version.js +1 -1
- package/dist-react/types/components/ds-checkbox/ds-checkbox.d.ts +4 -1
- package/dist-react/types/components/ds-dialog/ds-dialog.d.ts +4 -1
- package/dist-react/types/components/ds-dialog-fullscreen/ds-dialog-fullscreen.d.ts +4 -1
- package/dist-react/types/components/ds-drawer/ds-drawer.d.ts +4 -1
- package/dist-react/types/components/ds-drawer/ds-drawer.types.d.ts +1 -1
- package/dist-react/types/components/ds-media-control/ds-media-control.d.ts +4 -1
- package/dist-react/types/components/ds-tabs/ds-tabs.d.ts +4 -1
- package/dist-react/types/components/ds-toggle-switch/ds-toggle-switch.d.ts +4 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.cjs`);require(`../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.cjs`);function t(t,...n){return e.i`${e.r(String.raw({raw:t},...n).replace(/(--private-[\w-]+)(?=\s*[):,])/g,`$1-v2-0-0-canary-
|
|
1
|
+
const e=require(`../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.cjs`);require(`../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.cjs`);function t(t,...n){return e.i`${e.r(String.raw({raw:t},...n).replace(/(--private-[\w-]+)(?=\s*[):,])/g,`$1-v2-0-0-canary-120`))}`}exports.cssWithTokens=t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs`);require(`../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.cjs`);const t=require(`../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/unsafe-html.cjs`);require(`../node_modules/.pnpm/lit@3.3.1/node_modules/lit/directives/unsafe-html.cjs`);function n(n,...r){return e.x`${t.o(String.raw({raw:n},...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g,`$1-v2-0-0-canary-
|
|
1
|
+
const e=require(`../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs`);require(`../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.cjs`);const t=require(`../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/unsafe-html.cjs`);require(`../node_modules/.pnpm/lit@3.3.1/node_modules/lit/directives/unsafe-html.cjs`);function n(n,...r){return e.x`${t.o(String.raw({raw:n},...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g,`$1-v2-0-0-canary-120`))}`}exports.htmlWithTokens=n;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=`2.0.0-canary.
|
|
1
|
+
var e=`2.0.0-canary.120`,t=`--v${e.replaceAll(`.`,`-`)}`;exports.VERSION=e,exports.VERSION_TAG_SUFFIX=t;
|
|
@@ -17,7 +17,13 @@ import { commonStyles as h } from "./styles/common.styles.js";
|
|
|
17
17
|
//#region src/components/ds-checkbox/ds-checkbox.ts
|
|
18
18
|
var g = class extends m(o) {
|
|
19
19
|
constructor(...e) {
|
|
20
|
-
super(...e), this.inputPlacement = "left", this.
|
|
20
|
+
super(...e), this.inputPlacement = "left", this._checked = void 0, this._checkedState = !1, this.required = !1, this._disabled = !1, this.mode = "light", this._size = "medium", this.helperText = "", this.infoText = "", this._forcedError = "", this.invalidError = "", this.indeterminate = !1, this.dataAriaLabel = "";
|
|
21
|
+
}
|
|
22
|
+
get checked() {
|
|
23
|
+
return this._checked ?? this._checkedState;
|
|
24
|
+
}
|
|
25
|
+
set checked(e) {
|
|
26
|
+
this._checked = e;
|
|
21
27
|
}
|
|
22
28
|
static {
|
|
23
29
|
this.styles = [h];
|
|
@@ -77,11 +83,12 @@ var g = class extends m(o) {
|
|
|
77
83
|
return this.errorGroup ?? !!this._forcedError;
|
|
78
84
|
}
|
|
79
85
|
handleChange(e) {
|
|
80
|
-
|
|
86
|
+
let t = e.target.checked;
|
|
87
|
+
this._checkedState = t, this._checked = void 0, this.dispatchEvent(new CustomEvent("change", {
|
|
81
88
|
bubbles: !0,
|
|
82
89
|
composed: !0,
|
|
83
90
|
detail: {
|
|
84
|
-
checked:
|
|
91
|
+
checked: t,
|
|
85
92
|
value: this.value
|
|
86
93
|
}
|
|
87
94
|
}));
|
|
@@ -155,9 +162,10 @@ a([r({ type: String })], g.prototype, "name", void 0), a([r({ type: String })],
|
|
|
155
162
|
attribute: "input-placement"
|
|
156
163
|
})], g.prototype, "inputPlacement", void 0), a([r({
|
|
157
164
|
type: Boolean,
|
|
165
|
+
attribute: "checked",
|
|
158
166
|
converter: c,
|
|
159
167
|
reflect: !0
|
|
160
|
-
})], g.prototype, "
|
|
168
|
+
})], g.prototype, "_checked", void 0), a([i()], g.prototype, "_checkedState", void 0), a([r({
|
|
161
169
|
type: Boolean,
|
|
162
170
|
converter: c
|
|
163
171
|
})], g.prototype, "required", void 0), a([r({
|
|
@@ -16,7 +16,7 @@ import { commonStyles as f } from "./styles/common.styles.js";
|
|
|
16
16
|
//#region src/components/ds-dialog/ds-dialog.ts
|
|
17
17
|
var p = class extends o {
|
|
18
18
|
constructor(...e) {
|
|
19
|
-
super(...e), this.lockClose = !1, this.lockScroll = !0, this.
|
|
19
|
+
super(...e), this.lockClose = !1, this.lockScroll = !0, this._open = void 0, this._openState = !1, this.size = "medium", this.hasBeenOpened = !1, this.hasScroll = !1, this.debouncedCheckScroll = u({ func: () => this.checkScroll() }), this.scrollLocked = !1, this.handleCloseButtonClick = () => {
|
|
20
20
|
this.handleClose("button");
|
|
21
21
|
}, this.handleDialogClick = (e) => {
|
|
22
22
|
e.target === this.nativeDialog && this.handleClose("backdrop");
|
|
@@ -29,8 +29,14 @@ var p = class extends o {
|
|
|
29
29
|
static {
|
|
30
30
|
this.styles = [f];
|
|
31
31
|
}
|
|
32
|
+
get open() {
|
|
33
|
+
return this._open ?? this._openState;
|
|
34
|
+
}
|
|
35
|
+
set open(e) {
|
|
36
|
+
this._open = e;
|
|
37
|
+
}
|
|
32
38
|
updated(e) {
|
|
33
|
-
super.updated(e), !this.hasBeenOpened && e.has("
|
|
39
|
+
super.updated(e), !this.hasBeenOpened && (e.has("_open") || e.has("_openState")) && this.open && (this.hasBeenOpened = !0), (e.has("_open") || e.has("_openState")) && (this.open || (this.hasScroll = !1), this.handleResizeObserver(), this.syncNativeDialogState(), this.syncScrollLock());
|
|
34
40
|
}
|
|
35
41
|
syncScrollLock() {
|
|
36
42
|
this.open && this.lockScroll ? (d.lock(), this.scrollLocked = !0) : this.scrollLocked &&= (d.unlock(), !1);
|
|
@@ -65,7 +71,7 @@ var p = class extends o {
|
|
|
65
71
|
}));
|
|
66
72
|
}
|
|
67
73
|
handleClose(e) {
|
|
68
|
-
this.lockClose || (this.
|
|
74
|
+
this.lockClose || (this._openState = !1, this._open = void 0, this.dispatchCloseEvents(e));
|
|
69
75
|
}
|
|
70
76
|
connectedCallback() {
|
|
71
77
|
super.connectedCallback(), this.resizeObserver = new ResizeObserver(this.debouncedCheckScroll), this.handleResizeObserver(), this.addEventListener("click", this.handleHostClick);
|
|
@@ -109,8 +115,9 @@ a([n({
|
|
|
109
115
|
attribute: "lock-scroll"
|
|
110
116
|
})], p.prototype, "lockScroll", void 0), a([n({
|
|
111
117
|
type: Boolean,
|
|
118
|
+
attribute: "open",
|
|
112
119
|
converter: c
|
|
113
|
-
})], p.prototype, "
|
|
120
|
+
})], p.prototype, "_open", void 0), a([r()], p.prototype, "_openState", void 0), a([n({ type: String })], p.prototype, "size", void 0), a([n({
|
|
114
121
|
type: String,
|
|
115
122
|
attribute: "data-aria-label"
|
|
116
123
|
})], p.prototype, "dataAriaLabel", void 0), a([n({
|
|
@@ -15,18 +15,24 @@ import { commonStyles as d } from "./styles/common.styles.js";
|
|
|
15
15
|
//#region src/components/ds-dialog-fullscreen/ds-dialog-fullscreen.ts
|
|
16
16
|
var f = class extends o {
|
|
17
17
|
constructor(...e) {
|
|
18
|
-
super(...e), this.lockClose = !1, this.lockScroll = !0, this.
|
|
18
|
+
super(...e), this.lockClose = !1, this.lockScroll = !0, this._open = void 0, this._openState = !1, this.hasScroll = !1, this.hasBeenOpened = !1, this.debouncedCheckScroll = u({ func: () => this.checkScroll() }), this.handleKeyDown = (e) => {
|
|
19
19
|
this.open && e.key === "Escape" && this.handleClose();
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
static {
|
|
23
23
|
this.styles = [d];
|
|
24
24
|
}
|
|
25
|
+
get open() {
|
|
26
|
+
return this._open ?? this._openState;
|
|
27
|
+
}
|
|
28
|
+
set open(e) {
|
|
29
|
+
this._open = e;
|
|
30
|
+
}
|
|
25
31
|
willUpdate(e) {
|
|
26
|
-
super.willUpdate(e), !this.hasBeenOpened && e.has("
|
|
32
|
+
super.willUpdate(e), !this.hasBeenOpened && (e.has("_open") || e.has("_openState")) && this.open && (this.hasBeenOpened = !0);
|
|
27
33
|
}
|
|
28
34
|
updated(e) {
|
|
29
|
-
super.updated(e), e.has("
|
|
35
|
+
super.updated(e), (e.has("_open") || e.has("_openState")) && this.handleResizeObserver();
|
|
30
36
|
}
|
|
31
37
|
async handleResizeObserver() {
|
|
32
38
|
this.lockScroll && (document.getElementById("storybook-root") || (document.body.style.overflow = this.open ? "hidden" : "")), this.resizeObserver?.disconnect(), this.content && (this.resizeObserver.observe(this.content), await new Promise(requestAnimationFrame), this.checkScroll());
|
|
@@ -39,7 +45,7 @@ var f = class extends o {
|
|
|
39
45
|
};
|
|
40
46
|
}
|
|
41
47
|
handleClose() {
|
|
42
|
-
this.lockClose || (this.
|
|
48
|
+
this.lockClose || (this._openState = !1, this._open = void 0, this.dispatchEvent(new Event("ds-dialog-fullscreen:close", {
|
|
43
49
|
bubbles: !0,
|
|
44
50
|
composed: !0
|
|
45
51
|
})));
|
|
@@ -84,6 +90,7 @@ a([n({
|
|
|
84
90
|
attribute: "lock-scroll"
|
|
85
91
|
})], f.prototype, "lockScroll", void 0), a([n({
|
|
86
92
|
type: Boolean,
|
|
93
|
+
attribute: "open",
|
|
87
94
|
converter: c
|
|
88
|
-
})], f.prototype, "
|
|
95
|
+
})], f.prototype, "_open", void 0), a([r()], f.prototype, "_openState", void 0), a([r()], f.prototype, "hasScroll", void 0), a([i(".content")], f.prototype, "content", void 0), f = a([s("ds-dialog-fullscreen")], f);
|
|
89
96
|
//#endregion
|
|
@@ -1,29 +1,36 @@
|
|
|
1
1
|
import { x as e } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
|
|
2
2
|
import "../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.js";
|
|
3
3
|
import { n as t } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";
|
|
4
|
+
import { r as n } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.js";
|
|
4
5
|
import "../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/decorators.js";
|
|
5
|
-
import { __decorate as
|
|
6
|
-
import { UiKitElement as
|
|
7
|
-
import { customUiKitElement as
|
|
8
|
-
import { booleanConverter as
|
|
9
|
-
import { e as
|
|
6
|
+
import { __decorate as r } from "../../_virtual/_@oxc-project_runtime@0.122.0/helpers/decorate.js";
|
|
7
|
+
import { UiKitElement as i } from "../base/UiKitElement.js";
|
|
8
|
+
import { customUiKitElement as a } from "../../decorators/customUiKitElement.js";
|
|
9
|
+
import { booleanConverter as o } from "../../utils/booleanConverter.js";
|
|
10
|
+
import { e as s } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js";
|
|
10
11
|
import "../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/directives/class-map.js";
|
|
11
|
-
import { commonStyles as
|
|
12
|
-
import { themeConfig as
|
|
12
|
+
import { commonStyles as c, iconStyles as l } from "./styles/common.styles.js";
|
|
13
|
+
import { themeConfig as u } from "./theme-config.js";
|
|
13
14
|
//#region src/components/ds-drawer/ds-drawer.ts
|
|
14
|
-
var
|
|
15
|
+
var d = class extends i {
|
|
15
16
|
constructor(...e) {
|
|
16
|
-
super(...e), this.
|
|
17
|
+
super(...e), this._open = void 0, this._openState = !1, this.handleOverlayClick = () => {
|
|
17
18
|
this.dispatchEvent(new Event("ds-drawer:close", {
|
|
18
19
|
bubbles: !0,
|
|
19
20
|
composed: !0
|
|
20
|
-
})), this.
|
|
21
|
+
})), this._openState = !1, this._open = void 0;
|
|
21
22
|
}, this.handleKeyDown = (e) => {
|
|
22
23
|
(e.key === "Escape" || e.key === "Esc") && this.open && this.handleOverlayClick();
|
|
23
24
|
};
|
|
24
25
|
}
|
|
25
26
|
static {
|
|
26
|
-
this.styles = [
|
|
27
|
+
this.styles = [c, l];
|
|
28
|
+
}
|
|
29
|
+
get open() {
|
|
30
|
+
return this._open ?? this._openState;
|
|
31
|
+
}
|
|
32
|
+
set open(e) {
|
|
33
|
+
this._open = e;
|
|
27
34
|
}
|
|
28
35
|
get classes() {
|
|
29
36
|
return {
|
|
@@ -32,7 +39,7 @@ var u = class extends r {
|
|
|
32
39
|
};
|
|
33
40
|
}
|
|
34
41
|
getIconButtonTemplate() {
|
|
35
|
-
let e =
|
|
42
|
+
let e = u[this.theme]?.["icon-button-variant"];
|
|
36
43
|
return this.componentFactory.createIconButton({
|
|
37
44
|
class: "close-button visible",
|
|
38
45
|
"data-testid": "close-button",
|
|
@@ -45,18 +52,18 @@ var u = class extends r {
|
|
|
45
52
|
});
|
|
46
53
|
}
|
|
47
54
|
updated(e) {
|
|
48
|
-
super.updated?.(e), e.has && e.has("
|
|
55
|
+
super.updated?.(e), e.has && (e.has("_open") || e.has("_openState")) && window.addEventListener("keydown", this.handleKeyDown);
|
|
49
56
|
}
|
|
50
57
|
disconnectedCallback() {
|
|
51
58
|
window.removeEventListener("keydown", this.handleKeyDown), super.disconnectedCallback();
|
|
52
59
|
}
|
|
53
60
|
render() {
|
|
54
61
|
return e`
|
|
55
|
-
<div class=${
|
|
62
|
+
<div class=${s({
|
|
56
63
|
overlay: !0,
|
|
57
64
|
open: !!this.open
|
|
58
65
|
})} @click=${this.handleOverlayClick}></div>
|
|
59
|
-
<div data-testid="ds-drawer-container" class=${
|
|
66
|
+
<div data-testid="ds-drawer-container" class=${s(this.classes)}>
|
|
60
67
|
<div class="scroll-area" tabindex="0">
|
|
61
68
|
<div class="drawer-header">
|
|
62
69
|
<slot name="header"></slot>
|
|
@@ -75,8 +82,9 @@ var u = class extends r {
|
|
|
75
82
|
`;
|
|
76
83
|
}
|
|
77
84
|
};
|
|
78
|
-
|
|
85
|
+
r([t({
|
|
79
86
|
type: Boolean,
|
|
80
|
-
|
|
81
|
-
|
|
87
|
+
attribute: "open",
|
|
88
|
+
converter: o
|
|
89
|
+
})], d.prototype, "_open", void 0), r([n()], d.prototype, "_openState", void 0), d = r([a("ds-drawer")], d);
|
|
82
90
|
//#endregion
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { x as e } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
|
|
2
2
|
import "../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.js";
|
|
3
3
|
import { n as t } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";
|
|
4
|
+
import { r as n } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.js";
|
|
4
5
|
import "../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/decorators.js";
|
|
5
|
-
import { __decorate as
|
|
6
|
-
import { UiKitElement as
|
|
7
|
-
import { customUiKitElement as
|
|
8
|
-
import { e as
|
|
6
|
+
import { __decorate as r } from "../../_virtual/_@oxc-project_runtime@0.122.0/helpers/decorate.js";
|
|
7
|
+
import { UiKitElement as i } from "../base/UiKitElement.js";
|
|
8
|
+
import { customUiKitElement as a } from "../../decorators/customUiKitElement.js";
|
|
9
|
+
import { e as o } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js";
|
|
9
10
|
import "../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/directives/class-map.js";
|
|
10
|
-
import { commonStyles as
|
|
11
|
+
import { commonStyles as s } from "./styles/common.styles.js";
|
|
11
12
|
//#region src/components/ds-media-control/ds-media-control.ts
|
|
12
|
-
var
|
|
13
|
+
var c = class extends i {
|
|
13
14
|
constructor(...e) {
|
|
14
|
-
super(...e), this.
|
|
15
|
+
super(...e), this._state = void 0, this._stateValue = "pause", this.size = "medium", this.progress = 0, this.handleToggle = (e) => {
|
|
15
16
|
e.stopPropagation();
|
|
16
17
|
let t = this.state === "play" ? "pause" : "play";
|
|
17
|
-
this.
|
|
18
|
+
this._stateValue = t, this._state = void 0;
|
|
18
19
|
let n = t === "play" ? "ds-media-control:play" : "ds-media-control:pause";
|
|
19
20
|
this.dispatchEvent(new CustomEvent(n, {
|
|
20
21
|
bubbles: !0,
|
|
@@ -25,7 +26,13 @@ var s = class extends r {
|
|
|
25
26
|
};
|
|
26
27
|
}
|
|
27
28
|
static {
|
|
28
|
-
this.styles = [
|
|
29
|
+
this.styles = [s];
|
|
30
|
+
}
|
|
31
|
+
get state() {
|
|
32
|
+
return this._state ?? this._stateValue;
|
|
33
|
+
}
|
|
34
|
+
set state(e) {
|
|
35
|
+
this._state = e;
|
|
29
36
|
}
|
|
30
37
|
get normalizedProgress() {
|
|
31
38
|
let e = Number(this.progress ?? 0);
|
|
@@ -77,7 +84,7 @@ var s = class extends r {
|
|
|
77
84
|
return e`
|
|
78
85
|
<div
|
|
79
86
|
part="container"
|
|
80
|
-
class=${
|
|
87
|
+
class=${o(this.classes)}
|
|
81
88
|
role="button"
|
|
82
89
|
tabindex="0"
|
|
83
90
|
aria-label=${`${t} media ${this.size}`}
|
|
@@ -90,14 +97,15 @@ var s = class extends r {
|
|
|
90
97
|
`;
|
|
91
98
|
}
|
|
92
99
|
};
|
|
93
|
-
|
|
100
|
+
r([t({
|
|
94
101
|
type: String,
|
|
102
|
+
attribute: "state",
|
|
95
103
|
reflect: !0
|
|
96
|
-
})],
|
|
104
|
+
})], c.prototype, "_state", void 0), r([n()], c.prototype, "_stateValue", void 0), r([t({
|
|
97
105
|
type: String,
|
|
98
106
|
reflect: !0
|
|
99
|
-
})],
|
|
107
|
+
})], c.prototype, "size", void 0), r([t({
|
|
100
108
|
type: Number,
|
|
101
109
|
reflect: !0
|
|
102
|
-
})],
|
|
110
|
+
})], c.prototype, "progress", void 0), c = r([a("ds-media-control")], c);
|
|
103
111
|
//#endregion
|
|
@@ -15,7 +15,7 @@ import { themeConfig as m } from "./theme-config.js";
|
|
|
15
15
|
//#region src/components/ds-tabs/ds-tabs.ts
|
|
16
16
|
var h = class extends o {
|
|
17
17
|
constructor(...e) {
|
|
18
|
-
super(...e), this.
|
|
18
|
+
super(...e), this._selectedTab = void 0, this._selectedTabState = 0, this.mode = "light", this.variant = "primary", this.size = "large", this.disabled = !1, this.focusedTabIndex = -1, this.handleKeyDown = (e) => {
|
|
19
19
|
if (!(this.focusedTabIndex < 0)) switch (e.key) {
|
|
20
20
|
case "ArrowRight":
|
|
21
21
|
case "Right":
|
|
@@ -65,6 +65,12 @@ var h = class extends o {
|
|
|
65
65
|
f
|
|
66
66
|
];
|
|
67
67
|
}
|
|
68
|
+
get selectedTab() {
|
|
69
|
+
return this._selectedTab ?? this._selectedTabState;
|
|
70
|
+
}
|
|
71
|
+
set selectedTab(e) {
|
|
72
|
+
this._selectedTab = e;
|
|
73
|
+
}
|
|
68
74
|
connectedCallback() {
|
|
69
75
|
super.connectedCallback(), this.tabs = Array.from(this.querySelectorAll("[slot=tab]")), this.panels = Array.from(this.querySelectorAll("[slot=panel]"));
|
|
70
76
|
}
|
|
@@ -88,7 +94,7 @@ var h = class extends o {
|
|
|
88
94
|
this.handleScrollNav(), this.resizeObserver.observe(this.nav), this.tabs.forEach((e) => this.resizeObserver.observe(e)), window.addEventListener("resize", this.handleScrollNav), this.nav.addEventListener("scroll", this.handleScrollNav), this.setTabsFocusable();
|
|
89
95
|
}
|
|
90
96
|
updated(e) {
|
|
91
|
-
if (super.updated(e), e.has("
|
|
97
|
+
if (super.updated(e), (e.has("_selectedTab") || e.has("_selectedTabState")) && this.selectTab(this.selectedTab), e.has("variant")) {
|
|
92
98
|
let e = this.variant === "secondary" || this.variant === "primary" ? this.variant : "primary";
|
|
93
99
|
this.variant !== e && (this.variant = e);
|
|
94
100
|
}
|
|
@@ -122,7 +128,7 @@ var h = class extends o {
|
|
|
122
128
|
bubbles: !0,
|
|
123
129
|
composed: !0,
|
|
124
130
|
detail: { selectedTab: e }
|
|
125
|
-
})), this.
|
|
131
|
+
})), this._selectedTabState = e, this._selectedTab = void 0;
|
|
126
132
|
}
|
|
127
133
|
handleSelect(e) {
|
|
128
134
|
let t;
|
|
@@ -165,7 +171,7 @@ a([n({
|
|
|
165
171
|
type: Number,
|
|
166
172
|
attribute: "selected-tab",
|
|
167
173
|
reflect: !0
|
|
168
|
-
})], h.prototype, "
|
|
174
|
+
})], h.prototype, "_selectedTab", void 0), a([r()], h.prototype, "_selectedTabState", void 0), a([n({
|
|
169
175
|
type: String,
|
|
170
176
|
reflect: !0
|
|
171
177
|
})], h.prototype, "mode", void 0), a([n({
|
|
@@ -50,7 +50,7 @@ var p = class extends o {
|
|
|
50
50
|
}
|
|
51
51
|
loadThemeStyles() {
|
|
52
52
|
return this.loadStyles ? new Promise((e, t) => {
|
|
53
|
-
let n = "/2.0.0-canary.
|
|
53
|
+
let n = "/2.0.0-canary.120", r = `https://ds-assets.cupra.com${n}/styles/${this.theme}/theme.css`;
|
|
54
54
|
if (document.head.querySelector(`link[href="${r}"]`)) e();
|
|
55
55
|
else {
|
|
56
56
|
let i = `ui-kit-theme-${n}`, a = document.getElementById(i), o = document.createElement("link");
|
|
@@ -2,28 +2,36 @@ import "../ds-theme-provider/themeContext.js";
|
|
|
2
2
|
import { x as e } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
|
|
3
3
|
import "../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.js";
|
|
4
4
|
import { n as t } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";
|
|
5
|
+
import { r as n } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.js";
|
|
5
6
|
import "../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/decorators.js";
|
|
6
|
-
import { __decorate as
|
|
7
|
-
import { UiKitElement as
|
|
8
|
-
import { customUiKitElement as
|
|
9
|
-
import { booleanConverter as
|
|
10
|
-
import { htmlWithTokens as
|
|
11
|
-
import { e as
|
|
7
|
+
import { __decorate as r } from "../../_virtual/_@oxc-project_runtime@0.122.0/helpers/decorate.js";
|
|
8
|
+
import { UiKitElement as i } from "../base/UiKitElement.js";
|
|
9
|
+
import { customUiKitElement as a } from "../../decorators/customUiKitElement.js";
|
|
10
|
+
import { booleanConverter as o } from "../../utils/booleanConverter.js";
|
|
11
|
+
import { htmlWithTokens as s } from "../../utils/htmlWithTokens.js";
|
|
12
|
+
import { e as c } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js";
|
|
12
13
|
import "../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/directives/class-map.js";
|
|
13
|
-
import { commonStyles as
|
|
14
|
+
import { commonStyles as l } from "./styles/common.styles.js";
|
|
14
15
|
//#region src/components/ds-toggle-switch/ds-toggle-switch.ts
|
|
15
|
-
var
|
|
16
|
+
var u = class extends i {
|
|
16
17
|
constructor(...e) {
|
|
17
|
-
super(...e), this.size = "medium", this.
|
|
18
|
+
super(...e), this.size = "medium", this._checked = void 0, this._checkedState = !1, this.disabled = !1, this.mode = "light";
|
|
18
19
|
}
|
|
19
20
|
static {
|
|
20
|
-
this.styles = [
|
|
21
|
+
this.styles = [l];
|
|
22
|
+
}
|
|
23
|
+
get checked() {
|
|
24
|
+
return this._checked ?? this._checkedState;
|
|
25
|
+
}
|
|
26
|
+
set checked(e) {
|
|
27
|
+
this._checked = e;
|
|
21
28
|
}
|
|
22
29
|
handleClick() {
|
|
23
|
-
|
|
30
|
+
let e = !this.checked;
|
|
31
|
+
this._checkedState = e, this._checked = void 0, this.dispatchEvent(new CustomEvent("change", {
|
|
24
32
|
bubbles: !0,
|
|
25
33
|
composed: !0,
|
|
26
|
-
detail: { checked:
|
|
34
|
+
detail: { checked: e }
|
|
27
35
|
}));
|
|
28
36
|
}
|
|
29
37
|
handleClickOff(e) {
|
|
@@ -33,7 +41,7 @@ var l = class extends r {
|
|
|
33
41
|
e.stopPropagation(), !this.checked && this.handleClick();
|
|
34
42
|
}
|
|
35
43
|
get styleTokens() {
|
|
36
|
-
return
|
|
44
|
+
return s`
|
|
37
45
|
<style>
|
|
38
46
|
:host {
|
|
39
47
|
color-scheme: ${this.mode};
|
|
@@ -54,7 +62,7 @@ var l = class extends r {
|
|
|
54
62
|
return e`
|
|
55
63
|
${this.styleTokens}
|
|
56
64
|
<div
|
|
57
|
-
class=${
|
|
65
|
+
class=${c(this.labelClasses)}
|
|
58
66
|
@click=${this.handleClick}
|
|
59
67
|
>
|
|
60
68
|
<slot name="off" @click=${this.handleClickOff}></slot>
|
|
@@ -77,19 +85,20 @@ var l = class extends r {
|
|
|
77
85
|
`;
|
|
78
86
|
}
|
|
79
87
|
};
|
|
80
|
-
|
|
88
|
+
r([t({ type: String })], u.prototype, "size", void 0), r([t({
|
|
81
89
|
type: Boolean,
|
|
82
|
-
|
|
90
|
+
attribute: "checked",
|
|
91
|
+
converter: o,
|
|
83
92
|
reflect: !0
|
|
84
|
-
})],
|
|
93
|
+
})], u.prototype, "_checked", void 0), r([n()], u.prototype, "_checkedState", void 0), r([t({
|
|
85
94
|
type: Boolean,
|
|
86
|
-
converter:
|
|
95
|
+
converter: o,
|
|
87
96
|
reflect: !0
|
|
88
|
-
})],
|
|
97
|
+
})], u.prototype, "disabled", void 0), r([t({
|
|
89
98
|
type: String,
|
|
90
99
|
reflect: !0
|
|
91
|
-
})],
|
|
100
|
+
})], u.prototype, "mode", void 0), r([t({
|
|
92
101
|
type: String,
|
|
93
102
|
attribute: "data-aria-label"
|
|
94
|
-
})],
|
|
103
|
+
})], u.prototype, "dataAriaLabel", void 0), u = r([a("ds-toggle-switch")], u);
|
|
95
104
|
//#endregion
|
|
@@ -15,7 +15,7 @@ function n(n, r) {
|
|
|
15
15
|
this.componentName = o;
|
|
16
16
|
}
|
|
17
17
|
connectedCallback() {
|
|
18
|
-
i.prototype.connectedCallback?.call(this), this.setAttribute("data-ui-kit-version", "2.0.0-canary.
|
|
18
|
+
i.prototype.connectedCallback?.call(this), this.setAttribute("data-ui-kit-version", "2.0.0-canary.120");
|
|
19
19
|
}
|
|
20
20
|
});
|
|
21
21
|
};
|
|
@@ -25,7 +25,7 @@ var n = class {
|
|
|
25
25
|
return console.error(`Failed to fetch icon "${e}":`, t), "";
|
|
26
26
|
}), t.subscribe("theme", this.handleChangeTheme);
|
|
27
27
|
}
|
|
28
|
-
}, r = Symbol.for("@cupra/ui-kit/icons-manager/2.0.0-canary.
|
|
28
|
+
}, r = Symbol.for("@cupra/ui-kit/icons-manager/2.0.0-canary.120"), i = globalThis, a = i[r];
|
|
29
29
|
a || (a = new n(), Object.defineProperty(i, r, {
|
|
30
30
|
value: a,
|
|
31
31
|
writable: !1,
|
|
@@ -18,7 +18,7 @@ var e = class {
|
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
|
-
}, t = Symbol.for("@cupra/ui-kit/pubsub/2.0.0-canary.
|
|
21
|
+
}, t = Symbol.for("@cupra/ui-kit/pubsub/2.0.0-canary.120"), n = globalThis, r = n[t];
|
|
22
22
|
r || (r = new e(), Object.defineProperty(n, t, {
|
|
23
23
|
value: r,
|
|
24
24
|
writable: !1,
|
|
@@ -4,7 +4,7 @@ var t = e(20), n = class e {
|
|
|
4
4
|
constructor() {
|
|
5
5
|
this.stylePromises = /* @__PURE__ */ new Map(), this.getStyles = async ({ componentName: e, theme: n }) => {
|
|
6
6
|
if (!n || !e) return;
|
|
7
|
-
let r = `https://ds-assets.cupra.com/2.0.0-canary.
|
|
7
|
+
let r = `https://ds-assets.cupra.com/2.0.0-canary.120/styles/${n}/components/${e}.css`, i = this.getCachedStyleSheetPromise({ url: r });
|
|
8
8
|
if (i) return i;
|
|
9
9
|
let a = t(() => this.fetchStyle({ url: r })).then((e) => (e || this.stylePromises.delete(r), e));
|
|
10
10
|
return this.stylePromises.set(r, a), this.stylePromises.get(r);
|
|
@@ -2,7 +2,7 @@ import { i as e, r as t } from "../node_modules/.pnpm/@lit_reactive-element@2.1.
|
|
|
2
2
|
import "../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.js";
|
|
3
3
|
//#region src/utils/cssWithTokens.ts
|
|
4
4
|
function n(n, ...r) {
|
|
5
|
-
return e`${t(String.raw({ raw: n }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v2-0-0-canary-
|
|
5
|
+
return e`${t(String.raw({ raw: n }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v2-0-0-canary-120"))}`;
|
|
6
6
|
}
|
|
7
7
|
//#endregion
|
|
8
8
|
export { n as cssWithTokens };
|
|
@@ -4,7 +4,7 @@ import { o as t } from "../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-ht
|
|
|
4
4
|
import "../node_modules/.pnpm/lit@3.3.1/node_modules/lit/directives/unsafe-html.js";
|
|
5
5
|
//#region src/utils/htmlWithTokens.ts
|
|
6
6
|
function n(n, ...r) {
|
|
7
|
-
return e`${t(String.raw({ raw: n }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v2-0-0-canary-
|
|
7
|
+
return e`${t(String.raw({ raw: n }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v2-0-0-canary-120"))}`;
|
|
8
8
|
}
|
|
9
9
|
//#endregion
|
|
10
10
|
export { n as htmlWithTokens };
|
|
@@ -6,7 +6,10 @@ export declare class DsCheckbox extends DsCheckbox_base {
|
|
|
6
6
|
name: DsCheckboxAttrs['name'];
|
|
7
7
|
value: DsCheckboxAttrs['value'];
|
|
8
8
|
inputPlacement: DsCheckboxAttrs['input-placement'];
|
|
9
|
-
|
|
9
|
+
_checked: DsCheckboxAttrs['checked'];
|
|
10
|
+
private _checkedState;
|
|
11
|
+
get checked(): boolean;
|
|
12
|
+
set checked(value: boolean | undefined);
|
|
10
13
|
required: DsCheckboxAttrs['required'];
|
|
11
14
|
_disabled: DsCheckboxAttrs['disabled'];
|
|
12
15
|
mode: DsCheckboxAttrs['mode'];
|
|
@@ -7,7 +7,10 @@ export declare class DsDialog extends UiKitElement {
|
|
|
7
7
|
protected componentFactory: ComponentFactory;
|
|
8
8
|
lockClose: DsDialogAttrs['lock-close'];
|
|
9
9
|
lockScroll: DsDialogAttrs['lock-scroll'];
|
|
10
|
-
|
|
10
|
+
_open: DsDialogAttrs['open'];
|
|
11
|
+
private _openState;
|
|
12
|
+
get open(): boolean;
|
|
13
|
+
set open(value: DsDialogAttrs['open']);
|
|
11
14
|
size: DsDialogAttrs['size'];
|
|
12
15
|
dataAriaLabel: DsDialogAttrs['data-aria-label'];
|
|
13
16
|
dataAriaDescription: DsDialogAttrs['data-aria-description'];
|
|
@@ -5,7 +5,10 @@ export declare class DsDialogFullscreen extends UiKitElement {
|
|
|
5
5
|
static styles: import("lit").CSSResult[];
|
|
6
6
|
lockClose: DsDialogFullscreenAttrs['lock-close'];
|
|
7
7
|
lockScroll: DsDialogFullscreenAttrs['lock-scroll'];
|
|
8
|
-
|
|
8
|
+
_open: DsDialogFullscreenAttrs['open'];
|
|
9
|
+
private _openState;
|
|
10
|
+
get open(): boolean;
|
|
11
|
+
set open(value: DsDialogFullscreenAttrs['open']);
|
|
9
12
|
hasScroll: boolean;
|
|
10
13
|
private hasBeenOpened;
|
|
11
14
|
protected content: HTMLInputElement;
|
|
@@ -3,7 +3,10 @@ import { PropertyValues } from 'lit';
|
|
|
3
3
|
import type { DsDrawerAttrs } from './ds-drawer.types.ts';
|
|
4
4
|
export declare class DsDrawer extends UiKitElement {
|
|
5
5
|
static styles: import("lit").CSSResult[];
|
|
6
|
-
|
|
6
|
+
_open: DsDrawerAttrs['open'];
|
|
7
|
+
private _openState;
|
|
8
|
+
get open(): boolean;
|
|
9
|
+
set open(value: DsDrawerAttrs['open']);
|
|
7
10
|
private get classes();
|
|
8
11
|
private handleOverlayClick;
|
|
9
12
|
private handleKeyDown;
|
|
@@ -2,7 +2,10 @@ import { UiKitElement } from '../base/UiKitElement.ts';
|
|
|
2
2
|
import type { DsMediaControlAttrs } from './ds-media-control.types.ts';
|
|
3
3
|
export declare class DsMediaControl extends UiKitElement {
|
|
4
4
|
static styles: import("lit").CSSResult[];
|
|
5
|
-
|
|
5
|
+
_state: DsMediaControlAttrs['state'];
|
|
6
|
+
private _stateValue;
|
|
7
|
+
get state(): DsMediaControlAttrs['state'];
|
|
8
|
+
set state(value: DsMediaControlAttrs['state']);
|
|
6
9
|
size: DsMediaControlAttrs['size'];
|
|
7
10
|
progress: DsMediaControlAttrs['progress'];
|
|
8
11
|
private get normalizedProgress();
|
|
@@ -3,7 +3,10 @@ import { type PropertyValues, type TemplateResult } from 'lit';
|
|
|
3
3
|
import type { DsTabsAttrs } from './ds-tabs.types';
|
|
4
4
|
export declare class DsTabs extends UiKitElement {
|
|
5
5
|
static styles: import("lit").CSSResult[];
|
|
6
|
-
|
|
6
|
+
_selectedTab: DsTabsAttrs['selected-tab'];
|
|
7
|
+
private _selectedTabState;
|
|
8
|
+
get selectedTab(): number;
|
|
9
|
+
set selectedTab(value: DsTabsAttrs['selected-tab']);
|
|
7
10
|
mode: DsTabsAttrs['mode'];
|
|
8
11
|
variant: string;
|
|
9
12
|
size: DsTabsAttrs['size'];
|