@cupra/ui-kit 1.1.0-canary.3 → 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-theme-provider/ds-theme-provider.js +1 -1
- package/dist/components/index.d.ts +4 -0
- package/dist/index.js +6 -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/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-theme-provider/ds-theme-provider.js +1 -1
- package/dist-react/components/index.d.ts +4 -0
- package/dist-react/index.js +6 -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/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
|
+
};
|
|
@@ -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");
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import './ds-accordion/ds-accordion.ts';
|
|
2
2
|
import './ds-avatar/ds-avatar.ts';
|
|
3
3
|
import './ds-badge/ds-badge.ts';
|
|
4
|
+
import './ds-basic-card/ds-basic-card.ts';
|
|
5
|
+
import './ds-basic-card-image/ds-basic-card-image.ts';
|
|
6
|
+
import './ds-basic-card-header/ds-basic-card-header.ts';
|
|
7
|
+
import './ds-basic-card-section/ds-basic-card-section.ts';
|
|
4
8
|
import './ds-bullets/ds-bullets.ts';
|
|
5
9
|
import './ds-button/ds-button.ts';
|
|
6
10
|
import './ds-carousel-indicator/ds-carousel-indicator.ts';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import "./components/ds-accordion/ds-accordion.js";
|
|
2
2
|
import "./components/ds-avatar/ds-avatar.js";
|
|
3
3
|
import "./components/ds-badge/ds-badge.js";
|
|
4
|
+
import "./components/ds-basic-card/ds-basic-card.js";
|
|
5
|
+
import "./components/ds-basic-card-image/ds-basic-card-image.js";
|
|
6
|
+
import "./components/ds-basic-card-header/ds-basic-card-header.js";
|
|
7
|
+
import "./components/ds-basic-card-section/ds-basic-card-section.js";
|
|
4
8
|
import "./components/ds-bullets/ds-bullets.js";
|
|
5
9
|
import "./components/ds-button/ds-button.js";
|
|
6
10
|
import "./components/ds-carousel-indicator/ds-carousel-indicator.js";
|
|
@@ -59,7 +63,7 @@ import "./components/ds-toast-message/ds-toast-message.js";
|
|
|
59
63
|
import "./components/ds-toggle-button/ds-toggle-button.js";
|
|
60
64
|
import "./components/ds-toggle-switch/ds-toggle-switch.js";
|
|
61
65
|
import "./components/ds-tooltip/ds-tooltip.js";
|
|
62
|
-
import { iconNames as
|
|
66
|
+
import { iconNames as No } from "./components/ds-icon/iconNames.js";
|
|
63
67
|
export {
|
|
64
|
-
|
|
68
|
+
No as iconNames
|
|
65
69
|
};
|
|
@@ -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.4"), 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.4"), 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.4/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);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { DsButtonAttrs } from '../components/ds-button/ds-button.types.ts';
|
|
2
|
+
import { DsDividerAttrs } from '../components/ds-divider/ds-divider.types';
|
|
2
3
|
import type { DsIconButtonAttrs } from '../components/ds-icon-button/ds-icon-button.types.ts';
|
|
3
4
|
import type { DsIconAttrs } from '../components/ds-icon/ds-icon.types.ts';
|
|
4
5
|
import type { DsLoaderSpinnerAttrs } from '../components/ds-loader-spinner/ds-loader-spinner.types.ts';
|
|
@@ -7,6 +8,7 @@ type GetAttributes<T> = (props?: T) => any;
|
|
|
7
8
|
export type ComponentFactory = {
|
|
8
9
|
createIcon: GetAttributes<DsIconAttrs>;
|
|
9
10
|
createButton: GetAttributes<DsButtonAttrs>;
|
|
11
|
+
createDivider: GetAttributes<DsDividerAttrs>;
|
|
10
12
|
createIconButton: GetAttributes<DsIconButtonAttrs>;
|
|
11
13
|
createLoaderSpinner: GetAttributes<DsLoaderSpinnerAttrs>;
|
|
12
14
|
createToastMessage: GetAttributes<DsToastMessageAttrs>;
|
|
@@ -43,6 +43,15 @@ const m = {
|
|
|
43
43
|
${t.children}
|
|
44
44
|
</ds-button>
|
|
45
45
|
`),
|
|
46
|
+
createDivider: (t = {}) => (i("ds-divider", () => import("../components/ds-divider/ds-divider.js")), a`
|
|
47
|
+
<ds-divider
|
|
48
|
+
class=${t == null ? void 0 : t.class}
|
|
49
|
+
variant=${(t == null ? void 0 : t.variant) ?? "primary"}
|
|
50
|
+
orientation=${(t == null ? void 0 : t.orientation) ?? "horizontal"}
|
|
51
|
+
data-testid=${t == null ? void 0 : t["data-testid"]}
|
|
52
|
+
>
|
|
53
|
+
</ds-divider>
|
|
54
|
+
`),
|
|
46
55
|
createIconButton: (t = {}) => (i("ds-icon-button", () => import("../components/ds-icon-button/ds-icon-button.js")), a`
|
|
47
56
|
<ds-icon-button
|
|
48
57
|
class=${t == null ? void 0 : t.class}
|
|
@@ -119,6 +128,15 @@ const m = {
|
|
|
119
128
|
${t.children}
|
|
120
129
|
</ds-button-react>
|
|
121
130
|
`),
|
|
131
|
+
createDivider: (t = {}) => (i("ds-divider-react", () => import("../components/ds-divider/ds-divider.js")), a`
|
|
132
|
+
<ds-divider-react
|
|
133
|
+
class=${t == null ? void 0 : t.class}
|
|
134
|
+
variant=${(t == null ? void 0 : t.variant) ?? "primary"}
|
|
135
|
+
orientation=${(t == null ? void 0 : t.orientation) ?? "horizontal"}
|
|
136
|
+
data-testid=${t == null ? void 0 : t["data-testid"]}
|
|
137
|
+
>
|
|
138
|
+
</ds-divider-react>
|
|
139
|
+
`),
|
|
122
140
|
createIconButton: (t = {}) => (i("ds-icon-button-react", () => import("../components/ds-icon-button/ds-icon-button.js")), a`
|
|
123
141
|
<ds-icon-button-react
|
|
124
142
|
class=${t == null ? void 0 : t.class}
|
|
@@ -155,9 +173,9 @@ const m = {
|
|
|
155
173
|
></ds-toast-message-react>
|
|
156
174
|
`)
|
|
157
175
|
};
|
|
158
|
-
function i(t,
|
|
176
|
+
function i(t, d) {
|
|
159
177
|
try {
|
|
160
|
-
typeof window < "u" && typeof customElements < "u" && !customElements.get(t) &&
|
|
178
|
+
typeof window < "u" && typeof customElements < "u" && !customElements.get(t) && d();
|
|
161
179
|
} catch {
|
|
162
180
|
}
|
|
163
181
|
}
|
|
@@ -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-4"), 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-4"), e = i(o);
|
|
7
7
|
return n`${e}`;
|
|
8
8
|
}
|
|
9
9
|
export {
|
|
@@ -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
|
+
};
|
|
@@ -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");
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import './ds-accordion/ds-accordion.ts';
|
|
2
2
|
import './ds-avatar/ds-avatar.ts';
|
|
3
3
|
import './ds-badge/ds-badge.ts';
|
|
4
|
+
import './ds-basic-card/ds-basic-card.ts';
|
|
5
|
+
import './ds-basic-card-image/ds-basic-card-image.ts';
|
|
6
|
+
import './ds-basic-card-header/ds-basic-card-header.ts';
|
|
7
|
+
import './ds-basic-card-section/ds-basic-card-section.ts';
|
|
4
8
|
import './ds-bullets/ds-bullets.ts';
|
|
5
9
|
import './ds-button/ds-button.ts';
|
|
6
10
|
import './ds-carousel-indicator/ds-carousel-indicator.ts';
|
package/dist-react/index.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import "./components/ds-accordion/ds-accordion.js";
|
|
2
2
|
import "./components/ds-avatar/ds-avatar.js";
|
|
3
3
|
import "./components/ds-badge/ds-badge.js";
|
|
4
|
+
import "./components/ds-basic-card/ds-basic-card.js";
|
|
5
|
+
import "./components/ds-basic-card-image/ds-basic-card-image.js";
|
|
6
|
+
import "./components/ds-basic-card-header/ds-basic-card-header.js";
|
|
7
|
+
import "./components/ds-basic-card-section/ds-basic-card-section.js";
|
|
4
8
|
import "./components/ds-bullets/ds-bullets.js";
|
|
5
9
|
import "./components/ds-button/ds-button.js";
|
|
6
10
|
import "./components/ds-carousel-indicator/ds-carousel-indicator.js";
|
|
@@ -59,7 +63,7 @@ import "./components/ds-toast-message/ds-toast-message.js";
|
|
|
59
63
|
import "./components/ds-toggle-button/ds-toggle-button.js";
|
|
60
64
|
import "./components/ds-toggle-switch/ds-toggle-switch.js";
|
|
61
65
|
import "./components/ds-tooltip/ds-tooltip.js";
|
|
62
|
-
import { iconNames as
|
|
66
|
+
import { iconNames as No } from "./components/ds-icon/iconNames.js";
|
|
63
67
|
export {
|
|
64
|
-
|
|
68
|
+
No as iconNames
|
|
65
69
|
};
|
|
@@ -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.4"), 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.4"), 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.4/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);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { DsButtonAttrs } from '../components/ds-button/ds-button.types.ts';
|
|
2
|
+
import { DsDividerAttrs } from '../components/ds-divider/ds-divider.types';
|
|
2
3
|
import type { DsIconButtonAttrs } from '../components/ds-icon-button/ds-icon-button.types.ts';
|
|
3
4
|
import type { DsIconAttrs } from '../components/ds-icon/ds-icon.types.ts';
|
|
4
5
|
import type { DsLoaderSpinnerAttrs } from '../components/ds-loader-spinner/ds-loader-spinner.types.ts';
|
|
@@ -7,6 +8,7 @@ type GetAttributes<T> = (props?: T) => any;
|
|
|
7
8
|
export type ComponentFactory = {
|
|
8
9
|
createIcon: GetAttributes<DsIconAttrs>;
|
|
9
10
|
createButton: GetAttributes<DsButtonAttrs>;
|
|
11
|
+
createDivider: GetAttributes<DsDividerAttrs>;
|
|
10
12
|
createIconButton: GetAttributes<DsIconButtonAttrs>;
|
|
11
13
|
createLoaderSpinner: GetAttributes<DsLoaderSpinnerAttrs>;
|
|
12
14
|
createToastMessage: GetAttributes<DsToastMessageAttrs>;
|
|
@@ -43,6 +43,15 @@ const m = {
|
|
|
43
43
|
${t.children}
|
|
44
44
|
</ds-button-react>
|
|
45
45
|
`),
|
|
46
|
+
createDivider: (t = {}) => (i("ds-divider-react", () => import("../components/ds-divider/ds-divider.js")), a`
|
|
47
|
+
<ds-divider-react
|
|
48
|
+
class=${t == null ? void 0 : t.class}
|
|
49
|
+
variant=${(t == null ? void 0 : t.variant) ?? "primary"}
|
|
50
|
+
orientation=${(t == null ? void 0 : t.orientation) ?? "horizontal"}
|
|
51
|
+
data-testid=${t == null ? void 0 : t["data-testid"]}
|
|
52
|
+
>
|
|
53
|
+
</ds-divider-react>
|
|
54
|
+
`),
|
|
46
55
|
createIconButton: (t = {}) => (i("ds-icon-button-react", () => import("../components/ds-icon-button/ds-icon-button.js")), a`
|
|
47
56
|
<ds-icon-button-react
|
|
48
57
|
class=${t == null ? void 0 : t.class}
|
|
@@ -79,9 +88,9 @@ const m = {
|
|
|
79
88
|
></ds-toast-message-react>
|
|
80
89
|
`)
|
|
81
90
|
};
|
|
82
|
-
function i(t,
|
|
91
|
+
function i(t, d) {
|
|
83
92
|
try {
|
|
84
|
-
typeof window < "u" && typeof customElements < "u" && !customElements.get(t) &&
|
|
93
|
+
typeof window < "u" && typeof customElements < "u" && !customElements.get(t) && d();
|
|
85
94
|
} catch {
|
|
86
95
|
}
|
|
87
96
|
}
|
|
@@ -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-4"), 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-4"), e = i(o);
|
|
7
7
|
return n`${e}`;
|
|
8
8
|
}
|
|
9
9
|
export {
|