@cupra/ui-kit 1.1.0-canary.2 → 1.1.0-canary.4
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-basic-card/ds-basic-card.d.ts +9 -0
- package/dist/components/ds-basic-card/ds-basic-card.js +58 -0
- package/dist/components/ds-basic-card/ds-basic-card.types.d.ts +4 -0
- package/dist/components/ds-basic-card/styles/common.styles.d.ts +1 -0
- package/dist/components/ds-basic-card/styles/common.styles.js +38 -0
- package/dist/components/ds-basic-card-header/ds-basic-card-header.d.ts +7 -0
- package/dist/components/ds-basic-card-header/ds-basic-card-header.js +51 -0
- package/dist/components/ds-basic-card-header/ds-basic-card-header.types.d.ts +2 -0
- package/dist/components/ds-basic-card-header/styles/common.styles.d.ts +1 -0
- package/dist/components/ds-basic-card-header/styles/common.styles.js +57 -0
- package/dist/components/ds-basic-card-image/ds-basic-card-image.d.ts +6 -0
- package/dist/components/ds-basic-card-image/ds-basic-card-image.js +37 -0
- package/dist/components/ds-basic-card-image/ds-basic-card-image.types.d.ts +2 -0
- package/dist/components/ds-basic-card-image/styles/common.styles.d.ts +1 -0
- package/dist/components/ds-basic-card-image/styles/common.styles.js +13 -0
- package/dist/components/ds-basic-card-section/ds-basic-card-section.d.ts +10 -0
- package/dist/components/ds-basic-card-section/ds-basic-card-section.js +52 -0
- package/dist/components/ds-basic-card-section/ds-basic-card-section.types.d.ts +5 -0
- package/dist/components/ds-basic-card-section/styles/common.styles.d.ts +1 -0
- package/dist/components/ds-basic-card-section/styles/common.styles.js +33 -0
- package/dist/components/ds-dialog-fullscreen/ds-dialog-fullscreen.d.ts +21 -0
- package/dist/components/ds-dialog-fullscreen/ds-dialog-fullscreen.js +95 -0
- package/dist/components/ds-dialog-fullscreen/ds-dialog-fullscreen.types.d.ts +4 -0
- package/dist/components/ds-dialog-fullscreen/styles/common.styles.d.ts +1 -0
- package/dist/components/ds-dialog-fullscreen/styles/common.styles.js +88 -0
- package/dist/components/ds-theme-provider/ds-theme-provider.js +1 -1
- package/dist/components/index.d.ts +17 -12
- package/dist/index.js +19 -14
- 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/componentFactory.d.ts +2 -0
- package/dist/utils/componentFactory.js +20 -2
- package/dist/utils/cssWithTokens.js +1 -1
- package/dist/utils/htmlWithTokens.js +1 -1
- package/dist-react/components/ds-basic-card/ds-basic-card.d.ts +9 -0
- package/dist-react/components/ds-basic-card/ds-basic-card.js +58 -0
- package/dist-react/components/ds-basic-card/ds-basic-card.types.d.ts +4 -0
- package/dist-react/components/ds-basic-card/styles/common.styles.d.ts +1 -0
- package/dist-react/components/ds-basic-card/styles/common.styles.js +38 -0
- package/dist-react/components/ds-basic-card-header/ds-basic-card-header.d.ts +7 -0
- package/dist-react/components/ds-basic-card-header/ds-basic-card-header.js +51 -0
- package/dist-react/components/ds-basic-card-header/ds-basic-card-header.types.d.ts +2 -0
- package/dist-react/components/ds-basic-card-header/styles/common.styles.d.ts +1 -0
- package/dist-react/components/ds-basic-card-header/styles/common.styles.js +57 -0
- package/dist-react/components/ds-basic-card-image/ds-basic-card-image.d.ts +6 -0
- package/dist-react/components/ds-basic-card-image/ds-basic-card-image.js +37 -0
- package/dist-react/components/ds-basic-card-image/ds-basic-card-image.types.d.ts +2 -0
- package/dist-react/components/ds-basic-card-image/styles/common.styles.d.ts +1 -0
- package/dist-react/components/ds-basic-card-image/styles/common.styles.js +13 -0
- package/dist-react/components/ds-basic-card-section/ds-basic-card-section.d.ts +10 -0
- package/dist-react/components/ds-basic-card-section/ds-basic-card-section.js +52 -0
- package/dist-react/components/ds-basic-card-section/ds-basic-card-section.types.d.ts +5 -0
- package/dist-react/components/ds-basic-card-section/styles/common.styles.d.ts +1 -0
- package/dist-react/components/ds-basic-card-section/styles/common.styles.js +33 -0
- package/dist-react/components/ds-dialog-fullscreen/ds-dialog-fullscreen.d.ts +21 -0
- package/dist-react/components/ds-dialog-fullscreen/ds-dialog-fullscreen.js +95 -0
- package/dist-react/components/ds-dialog-fullscreen/ds-dialog-fullscreen.types.d.ts +4 -0
- package/dist-react/components/ds-dialog-fullscreen/styles/common.styles.d.ts +1 -0
- package/dist-react/components/ds-dialog-fullscreen/styles/common.styles.js +88 -0
- package/dist-react/components/ds-theme-provider/ds-theme-provider.js +1 -1
- package/dist-react/components/index.d.ts +17 -12
- package/dist-react/index.js +19 -14
- 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/componentFactory.d.ts +2 -0
- package/dist-react/utils/componentFactory.js +11 -2
- package/dist-react/utils/cssWithTokens.js +1 -1
- package/dist-react/utils/htmlWithTokens.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { UiKitElement } from '../base/UiKitElement.ts';
|
|
2
|
+
import { DsBasicCardAttrs } from './ds-basic-card.types.ts';
|
|
3
|
+
export declare class DsBasicCard extends UiKitElement {
|
|
4
|
+
static styles: import("lit").CSSResult[];
|
|
5
|
+
variant: DsBasicCardAttrs['variant'];
|
|
6
|
+
private get classes();
|
|
7
|
+
protected handleClick(): void;
|
|
8
|
+
render(): import("lit").TemplateResult<1>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { UiKitElement as p } 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 { nothing as m, html as n } 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 u } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";
|
|
7
|
+
import { classMap as v } 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 h = Object.defineProperty, b = Object.getOwnPropertyDescriptor, l = (c, r, a, e) => {
|
|
10
|
+
for (var t = e > 1 ? void 0 : e ? b(r, a) : r, i = c.length - 1, o; i >= 0; i--)
|
|
11
|
+
(o = c[i]) && (t = (e ? o(r, a, t) : o(t)) || t);
|
|
12
|
+
return e && t && h(r, a, t), t;
|
|
13
|
+
};
|
|
14
|
+
let s = class extends p {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments), this.variant = "default";
|
|
17
|
+
}
|
|
18
|
+
get classes() {
|
|
19
|
+
return {
|
|
20
|
+
"card-wrapper": !0,
|
|
21
|
+
subgrid: !0,
|
|
22
|
+
[this.variant]: !!this.variant
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
handleClick() {
|
|
26
|
+
this.dispatchEvent(
|
|
27
|
+
new Event("ds-basic-card:click", {
|
|
28
|
+
bubbles: !0,
|
|
29
|
+
composed: !0
|
|
30
|
+
})
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
render() {
|
|
34
|
+
return n`
|
|
35
|
+
<article
|
|
36
|
+
part="card-wrapper"
|
|
37
|
+
class="${v(this.classes)}"
|
|
38
|
+
@click=${this.handleClick}
|
|
39
|
+
data-testid="ds-basic-card-container"
|
|
40
|
+
>
|
|
41
|
+
<div>${this.variant === "featured" ? n`<slot name="featured-text"></slot>` : m}</div>
|
|
42
|
+
<div class="container subgrid">
|
|
43
|
+
<slot></slot>
|
|
44
|
+
</div>
|
|
45
|
+
</article>
|
|
46
|
+
`;
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
s.styles = [f];
|
|
50
|
+
l([
|
|
51
|
+
u({ type: String })
|
|
52
|
+
], s.prototype, "variant", 2);
|
|
53
|
+
s = l([
|
|
54
|
+
d("ds-basic-card")
|
|
55
|
+
], s);
|
|
56
|
+
export {
|
|
57
|
+
s as DsBasicCard
|
|
58
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const commonStyles: import("lit").CSSResult;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { cssQueries as r } from "../../../utils/cssQueries.js";
|
|
2
|
+
import "../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
|
|
3
|
+
import "../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
|
|
4
|
+
import "../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
5
|
+
import { css as s } from "../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";
|
|
6
|
+
const e = s`
|
|
7
|
+
:host {
|
|
8
|
+
row-gap: 0;
|
|
9
|
+
display: grid;
|
|
10
|
+
grid-template-rows: subgrid;
|
|
11
|
+
grid-row: span 7;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.subgrid {
|
|
15
|
+
display: grid;
|
|
16
|
+
grid-template-rows: subgrid;
|
|
17
|
+
grid-row: span 7;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.container {
|
|
21
|
+
cursor: pointer;
|
|
22
|
+
overflow: hidden;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
::slotted([slot='featured-text']) {
|
|
26
|
+
pointer-events: none;
|
|
27
|
+
padding: var(--dg-spacing-s-5, 8px) var(--dg-spacing-m-2, 16px);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
${r.m} {
|
|
31
|
+
::slotted([slot='featured-text']) {
|
|
32
|
+
padding: var(--dg-spacing-s-5, 8px) var(--dg-spacing-m-4, 24px);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
`;
|
|
36
|
+
export {
|
|
37
|
+
e as commonStyles
|
|
38
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { UiKitElement } from '../base/UiKitElement.ts';
|
|
2
|
+
export declare class DsBasicCardHeader extends UiKitElement {
|
|
3
|
+
static styles: import("lit").CSSResult[];
|
|
4
|
+
protected get dividerTemplate(): any;
|
|
5
|
+
private get classes();
|
|
6
|
+
render(): import("lit").TemplateResult<1>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { UiKitElement as l } from "../base/UiKitElement.js";
|
|
2
|
+
import { customUiKitElement as p } 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 m } 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 { classMap as n } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js";
|
|
7
|
+
import { commonStyles as c } from "./styles/common.styles.js";
|
|
8
|
+
var h = Object.getOwnPropertyDescriptor, v = (a, s, d, i) => {
|
|
9
|
+
for (var e = i > 1 ? void 0 : i ? h(s, d) : s, t = a.length - 1, o; t >= 0; t--)
|
|
10
|
+
(o = a[t]) && (e = o(e) || e);
|
|
11
|
+
return e;
|
|
12
|
+
};
|
|
13
|
+
let r = class extends l {
|
|
14
|
+
get dividerTemplate() {
|
|
15
|
+
return this.componentFactory.createDivider({
|
|
16
|
+
class: "divider",
|
|
17
|
+
variant: "secondary"
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
get classes() {
|
|
21
|
+
return {
|
|
22
|
+
"header-wrapper": !0
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
render() {
|
|
26
|
+
return m`
|
|
27
|
+
<header
|
|
28
|
+
part="header-wrapper"
|
|
29
|
+
class="${n(this.classes)}"
|
|
30
|
+
data-testid="ds-basic-card-header-container"
|
|
31
|
+
>
|
|
32
|
+
<div class="header-content">
|
|
33
|
+
<div class="title-wrapper" part="title-container">
|
|
34
|
+
<slot name="title" part="title"></slot>
|
|
35
|
+
<slot name="description" part="description"></slot>
|
|
36
|
+
</div>
|
|
37
|
+
<slot name="meta" part="meta"></slot>
|
|
38
|
+
</div>
|
|
39
|
+
<slot name="sub-header" part="sub-header"></slot>
|
|
40
|
+
${this.dividerTemplate}
|
|
41
|
+
</header>
|
|
42
|
+
`;
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
r.styles = [c];
|
|
46
|
+
r = v([
|
|
47
|
+
p("ds-basic-card-header")
|
|
48
|
+
], r);
|
|
49
|
+
export {
|
|
50
|
+
r as DsBasicCardHeader
|
|
51
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const commonStyles: import("lit").CSSResult;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { cssQueries as p } from "../../../utils/cssQueries.js";
|
|
2
|
+
import "../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
|
|
3
|
+
import "../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
|
|
4
|
+
import "../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
5
|
+
import { css as i } from "../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";
|
|
6
|
+
const d = i`
|
|
7
|
+
:host {
|
|
8
|
+
padding: var(--dg-spacing-m-2, 16px) var(--dg-spacing-m-2, 16px) 0px var(--dg-spacing-m-2, 16px);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.header-wrapper {
|
|
12
|
+
align-items: flex-start;
|
|
13
|
+
align-self: stretch;
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
gap: var(--dg-spacing-m-1, 12px);
|
|
17
|
+
height: 100%;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.header-content {
|
|
21
|
+
display: flex;
|
|
22
|
+
gap: var(--dg-spacing-m-1, 8px);
|
|
23
|
+
width: 100%;
|
|
24
|
+
justify-content: space-between;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.title-wrapper {
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
gap: var(--dg-spacing-s-5, 8px);
|
|
31
|
+
width: 100%;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
::slotted([slot='title']) {
|
|
35
|
+
width: 100%;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
::slotted([slot='sub-header']) {
|
|
39
|
+
display: flex;
|
|
40
|
+
gap: var(--dg-spacing-m-1, 12px);
|
|
41
|
+
flex-direction: column;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.divider {
|
|
45
|
+
margin-top: auto;
|
|
46
|
+
width: 100%;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
${p.m} {
|
|
50
|
+
:host {
|
|
51
|
+
padding: var(--dg-spacing-m-2, 16px) var(--dg-spacing-m-4, 24px) 0px var(--dg-spacing-m-4, 24px);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
`;
|
|
55
|
+
export {
|
|
56
|
+
d as commonStyles
|
|
57
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { UiKitElement as p } 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 { html as c } 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 { classMap as n } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js";
|
|
7
|
+
import { commonStyles as d } from "./styles/common.styles.js";
|
|
8
|
+
var g = Object.getOwnPropertyDescriptor, f = (s, a, o, i) => {
|
|
9
|
+
for (var r = i > 1 ? void 0 : i ? g(a, o) : a, e = s.length - 1, m; e >= 0; e--)
|
|
10
|
+
(m = s[e]) && (r = m(r) || r);
|
|
11
|
+
return r;
|
|
12
|
+
};
|
|
13
|
+
let t = class extends p {
|
|
14
|
+
get classes() {
|
|
15
|
+
return {
|
|
16
|
+
"image-wrapper": !0
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
render() {
|
|
20
|
+
return c`
|
|
21
|
+
<div
|
|
22
|
+
part="image-wrapper"
|
|
23
|
+
class="${n(this.classes)}"
|
|
24
|
+
data-testid="ds-basic-card-image-container"
|
|
25
|
+
>
|
|
26
|
+
<slot></slot>
|
|
27
|
+
</div>
|
|
28
|
+
`;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
t.styles = [d];
|
|
32
|
+
t = f([
|
|
33
|
+
l("ds-basic-card-image")
|
|
34
|
+
], t);
|
|
35
|
+
export {
|
|
36
|
+
t as DsBasicCardImage
|
|
37
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const commonStyles: import("lit").CSSResult;
|
|
@@ -0,0 +1,13 @@
|
|
|
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 o } from "../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";
|
|
5
|
+
const s = o`
|
|
6
|
+
:host {
|
|
7
|
+
height: 100%;
|
|
8
|
+
width: 100%;
|
|
9
|
+
}
|
|
10
|
+
`;
|
|
11
|
+
export {
|
|
12
|
+
s as commonStyles
|
|
13
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { UiKitElement } from '../base/UiKitElement.ts';
|
|
2
|
+
import { DsBasicCardSectionAttrs } from './ds-basic-card-section.types.ts';
|
|
3
|
+
export declare class DsBasicCardSection extends UiKitElement {
|
|
4
|
+
static styles: import("lit").CSSResult[];
|
|
5
|
+
withDivider: DsBasicCardSectionAttrs['divider'];
|
|
6
|
+
centered: DsBasicCardSectionAttrs['centered'];
|
|
7
|
+
protected get dividerTemplate(): any;
|
|
8
|
+
private get classes();
|
|
9
|
+
render(): import("lit").TemplateResult<1>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { UiKitElement as d } from "../base/UiKitElement.js";
|
|
2
|
+
import { customUiKitElement as l } from "../../decorators/customUiKitElement.js";
|
|
3
|
+
import { booleanConverter as p } from "../../utils/booleanConverter.js";
|
|
4
|
+
import "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
|
|
5
|
+
import { nothing as v, html as h } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
|
|
6
|
+
import "../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
7
|
+
import { property as m } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";
|
|
8
|
+
import { classMap as f } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js";
|
|
9
|
+
import { commonStyles as u } from "./styles/common.styles.js";
|
|
10
|
+
var y = Object.defineProperty, D = Object.getOwnPropertyDescriptor, a = (c, r, o, i) => {
|
|
11
|
+
for (var e = i > 1 ? void 0 : i ? D(r, o) : r, s = c.length - 1, n; s >= 0; s--)
|
|
12
|
+
(n = c[s]) && (e = (i ? n(r, o, e) : n(e)) || e);
|
|
13
|
+
return i && e && y(r, o, e), e;
|
|
14
|
+
};
|
|
15
|
+
let t = class extends d {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments), this.withDivider = !0, this.centered = !0;
|
|
18
|
+
}
|
|
19
|
+
get dividerTemplate() {
|
|
20
|
+
return this.componentFactory.createDivider({
|
|
21
|
+
class: "divider",
|
|
22
|
+
variant: "secondary"
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
get classes() {
|
|
26
|
+
return {
|
|
27
|
+
container: !0,
|
|
28
|
+
centered: this.centered
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
render() {
|
|
32
|
+
return h`
|
|
33
|
+
<div part="container" class=${f(this.classes)} data-testid="ds-basic-card-section-container">
|
|
34
|
+
<slot></slot>
|
|
35
|
+
</div>
|
|
36
|
+
${this.withDivider ? this.dividerTemplate : v}
|
|
37
|
+
`;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
t.styles = [u];
|
|
41
|
+
a([
|
|
42
|
+
m({ type: Boolean, converter: p })
|
|
43
|
+
], t.prototype, "withDivider", 2);
|
|
44
|
+
a([
|
|
45
|
+
m({ type: Boolean, converter: p })
|
|
46
|
+
], t.prototype, "centered", 2);
|
|
47
|
+
t = a([
|
|
48
|
+
l("ds-basic-card-section")
|
|
49
|
+
], t);
|
|
50
|
+
export {
|
|
51
|
+
t as DsBasicCardSection
|
|
52
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const commonStyles: import("lit").CSSResult;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { cssQueries as i } from "../../../utils/cssQueries.js";
|
|
2
|
+
import "../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
|
|
3
|
+
import "../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
|
|
4
|
+
import "../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
5
|
+
import { css as p } from "../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";
|
|
6
|
+
const g = p`
|
|
7
|
+
:host {
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
padding: var(--dg-spacing-s-1, 0px) var(--dg-spacing-m-2, 16px);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.container {
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
gap: var(--dg-spacing-m-1, 12px);
|
|
17
|
+
height: 100%;
|
|
18
|
+
padding: var(--dg-spacing-m-4, 24px) var(--dg-spacing-s-1, 0px);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.centered {
|
|
22
|
+
justify-content: center;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
${i.m} {
|
|
26
|
+
:host {
|
|
27
|
+
padding: var(--dg-spacing-s-1, 0px) var(--dg-spacing-m-4, 24px);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
`;
|
|
31
|
+
export {
|
|
32
|
+
g as commonStyles
|
|
33
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { UiKitElement } from '../base/UiKitElement.ts';
|
|
2
|
+
import { type PropertyValues, nothing } from 'lit';
|
|
3
|
+
import type { DsDialogFullscreenAttrs } from './ds-dialog-fullscreen.types.ts';
|
|
4
|
+
export declare class DsDialogFullscreen extends UiKitElement {
|
|
5
|
+
static styles: import("lit").CSSResult[];
|
|
6
|
+
open: DsDialogFullscreenAttrs['open'];
|
|
7
|
+
hasBeenOpened: boolean;
|
|
8
|
+
hasScroll: boolean;
|
|
9
|
+
protected content: HTMLInputElement;
|
|
10
|
+
private resizeObserver;
|
|
11
|
+
private debouncedCheckScroll;
|
|
12
|
+
updated(changedProperties: PropertyValues): Promise<void>;
|
|
13
|
+
handleResizeObserver(): Promise<void>;
|
|
14
|
+
private get containerClasses();
|
|
15
|
+
private handleClose;
|
|
16
|
+
connectedCallback(): void;
|
|
17
|
+
disconnectedCallback(): void;
|
|
18
|
+
private handleKeyDown;
|
|
19
|
+
private checkScroll;
|
|
20
|
+
render(): typeof nothing | import("lit").TemplateResult<1>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { UiKitElement as h } from "../base/UiKitElement.js";
|
|
2
|
+
import { customUiKitElement as d } from "../../decorators/customUiKitElement.js";
|
|
3
|
+
import { booleanConverter as p } from "../../utils/booleanConverter.js";
|
|
4
|
+
import { debounce as m } from "../../utils/debounce.js";
|
|
5
|
+
import "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
|
|
6
|
+
import { nothing as u, html as f } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
|
|
7
|
+
import "../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
8
|
+
import { property as v } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";
|
|
9
|
+
import { state as a } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.js";
|
|
10
|
+
import { query as b } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query.js";
|
|
11
|
+
import { classMap as y } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js";
|
|
12
|
+
import { commonStyles as w } from "./styles/common.styles.js";
|
|
13
|
+
var O = Object.defineProperty, C = Object.getOwnPropertyDescriptor, n = (e, s, i, r) => {
|
|
14
|
+
for (var t = r > 1 ? void 0 : r ? C(s, i) : s, l = e.length - 1, c; l >= 0; l--)
|
|
15
|
+
(c = e[l]) && (t = (r ? c(s, i, t) : c(t)) || t);
|
|
16
|
+
return r && t && O(s, i, t), t;
|
|
17
|
+
};
|
|
18
|
+
let o = class extends h {
|
|
19
|
+
constructor() {
|
|
20
|
+
super(...arguments), this.open = !1, this.hasBeenOpened = !1, this.hasScroll = !1, this.debouncedCheckScroll = m({ func: () => this.checkScroll() }), this.handleKeyDown = (e) => {
|
|
21
|
+
this.open && e.key === "Escape" && this.handleClose();
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
async updated(e) {
|
|
25
|
+
super.updated(e), !this.hasBeenOpened && e.has("open") && this.open && (this.hasBeenOpened = !0), e.has("open") && this.handleResizeObserver(), e.has("open") && this.open && (await this.updateComplete, this.requestUpdate());
|
|
26
|
+
}
|
|
27
|
+
async handleResizeObserver() {
|
|
28
|
+
var e;
|
|
29
|
+
document.body.style.overflow = this.open ? "hidden" : "", (e = this.resizeObserver) == null || e.disconnect(), this.content && (this.resizeObserver.observe(this.content), await new Promise(requestAnimationFrame), this.checkScroll());
|
|
30
|
+
}
|
|
31
|
+
get containerClasses() {
|
|
32
|
+
return {
|
|
33
|
+
"container-fullscreen": !0,
|
|
34
|
+
close: !this.open,
|
|
35
|
+
"with-scroll": this.open && this.hasScroll
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
handleClose() {
|
|
39
|
+
this.open = !1, this.dispatchEvent(
|
|
40
|
+
new Event("ds-dialog-fullscreen:close", {
|
|
41
|
+
bubbles: !0,
|
|
42
|
+
composed: !0
|
|
43
|
+
})
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
connectedCallback() {
|
|
47
|
+
super.connectedCallback(), window.addEventListener("keydown", this.handleKeyDown), this.resizeObserver = new ResizeObserver(this.debouncedCheckScroll), this.handleResizeObserver();
|
|
48
|
+
}
|
|
49
|
+
disconnectedCallback() {
|
|
50
|
+
var e;
|
|
51
|
+
super.disconnectedCallback(), window.removeEventListener("keydown", this.handleKeyDown), document.body.style.overflow = "", (e = this.resizeObserver) == null || e.disconnect();
|
|
52
|
+
}
|
|
53
|
+
checkScroll() {
|
|
54
|
+
var e, s;
|
|
55
|
+
this.hasScroll = ((e = this.content) == null ? void 0 : e.scrollHeight) > ((s = this.content) == null ? void 0 : s.clientHeight);
|
|
56
|
+
}
|
|
57
|
+
render() {
|
|
58
|
+
return !this.hasBeenOpened && !this.open ? u : f`
|
|
59
|
+
<style>
|
|
60
|
+
:host {
|
|
61
|
+
display: ${this.open ? "flex" : "none"};
|
|
62
|
+
}
|
|
63
|
+
</style>
|
|
64
|
+
|
|
65
|
+
<div class=${y(this.containerClasses)}>
|
|
66
|
+
<dialog ?open=${this.open} data-testid="ds-dialog-fullscreen-container" class="dialog-fullscreen">
|
|
67
|
+
<slot name="close-button" @click=${this.handleClose}></slot>
|
|
68
|
+
<div class="content-container-fullscreen">
|
|
69
|
+
<div tabindex="0" class="content-fullscreen ds-scroll">
|
|
70
|
+
<slot @slotchange=${this.handleResizeObserver}></slot>
|
|
71
|
+
</div>
|
|
72
|
+
</dialog>
|
|
73
|
+
</div>
|
|
74
|
+
`;
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
o.styles = [w];
|
|
78
|
+
n([
|
|
79
|
+
v({ type: Boolean, converter: p })
|
|
80
|
+
], o.prototype, "open", 2);
|
|
81
|
+
n([
|
|
82
|
+
a()
|
|
83
|
+
], o.prototype, "hasBeenOpened", 2);
|
|
84
|
+
n([
|
|
85
|
+
a()
|
|
86
|
+
], o.prototype, "hasScroll", 2);
|
|
87
|
+
n([
|
|
88
|
+
b(".content")
|
|
89
|
+
], o.prototype, "content", 2);
|
|
90
|
+
o = n([
|
|
91
|
+
d("ds-dialog-fullscreen")
|
|
92
|
+
], o);
|
|
93
|
+
export {
|
|
94
|
+
o as DsDialogFullscreen
|
|
95
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const commonStyles: import("lit").CSSResult;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { cssQueries as l } from "../../../utils/cssQueries.js";
|
|
2
|
+
import "../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
|
|
3
|
+
import "../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
|
|
4
|
+
import "../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
5
|
+
import { css as r } from "../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";
|
|
6
|
+
const c = r`
|
|
7
|
+
:host {
|
|
8
|
+
transition: display 0.3s cubic-bezier(0, 0, 0.2, 1) allow-discrete;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.container-fullscreen.close {
|
|
12
|
+
display: none;
|
|
13
|
+
opacity: 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.container-fullscreen {
|
|
17
|
+
position: fixed;
|
|
18
|
+
top: 0;
|
|
19
|
+
left: 0;
|
|
20
|
+
padding: 0;
|
|
21
|
+
width: 100dvw;
|
|
22
|
+
height: 100dvh;
|
|
23
|
+
display: flex;
|
|
24
|
+
justify-content: center;
|
|
25
|
+
align-items: center;
|
|
26
|
+
z-index: var(--ds-z-index-modal);
|
|
27
|
+
background-color: var(--dg-color-bg-modal);
|
|
28
|
+
transition:
|
|
29
|
+
opacity 0.3s cubic-bezier(0, 0, 0.2, 1),
|
|
30
|
+
display 0.3s cubic-bezier(0, 0, 0.2, 1) allow-discrete;
|
|
31
|
+
opacity: 1;
|
|
32
|
+
@starting-style {
|
|
33
|
+
opacity: 0;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.dialog-fullscreen {
|
|
38
|
+
padding: 0;
|
|
39
|
+
position: relative;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.content-container-fullscreen {
|
|
43
|
+
display: flex;
|
|
44
|
+
flex-direction: column;
|
|
45
|
+
overflow: hidden;
|
|
46
|
+
height: 100%;
|
|
47
|
+
width: 100%;
|
|
48
|
+
justify-content: center;
|
|
49
|
+
align-items: center;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.ds-scroll::-webkit-scrollbar,
|
|
53
|
+
.ds-scroll-global *::-webkit-scrollbar {
|
|
54
|
+
appearance: none;
|
|
55
|
+
display: initial;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.ds-scroll::-webkit-scrollbar-thumb,
|
|
59
|
+
.ds-scroll-global *::-webkit-scrollbar-thumb {
|
|
60
|
+
border-radius: var(--dg-border-radius-full);
|
|
61
|
+
background-clip: padding-box;
|
|
62
|
+
background-color: var(--dg-global-opacity-white-70);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.ds-scroll::-webkit-scrollbar-track,
|
|
66
|
+
.ds-scroll-global *::-webkit-scrollbar-track {
|
|
67
|
+
background-color: transparent;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
${l.xs} {
|
|
71
|
+
.ds-scroll::-webkit-scrollbar,
|
|
72
|
+
.ds-scroll-global *::-webkit-scrollbar {
|
|
73
|
+
height: 4px;
|
|
74
|
+
width: 4px;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
${l.m} {
|
|
79
|
+
.ds-scroll::-webkit-scrollbar,
|
|
80
|
+
.ds-scroll-global *::-webkit-scrollbar {
|
|
81
|
+
height: 8px;
|
|
82
|
+
width: 8px;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
`;
|
|
86
|
+
export {
|
|
87
|
+
c as commonStyles
|
|
88
|
+
};
|
|
@@ -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.4", 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");
|