@cupra/ui-kit 1.0.1-canary.0 → 1.1.0-canary.2

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.
Files changed (33) hide show
  1. package/dist/components/ds-drawer/ds-drawer.d.ts +14 -0
  2. package/dist/components/ds-drawer/ds-drawer.js +87 -0
  3. package/dist/components/ds-drawer/ds-drawer.test.d.ts +7 -0
  4. package/dist/components/ds-drawer/ds-drawer.types.d.ts +4 -0
  5. package/dist/components/ds-drawer/styles/common.styles.d.ts +2 -0
  6. package/dist/components/ds-drawer/styles/common.styles.js +117 -0
  7. package/dist/components/ds-drawer/theme-config.d.ts +8 -0
  8. package/dist/components/ds-drawer/theme-config.js +14 -0
  9. package/dist/components/ds-theme-provider/ds-theme-provider.js +1 -1
  10. package/dist/components/index.d.ts +1 -0
  11. package/dist/index.js +3 -2
  12. package/dist/utils/IconsManager.js +1 -1
  13. package/dist/utils/PubSub.js +1 -1
  14. package/dist/utils/StylesRegistry/StylesRegistry.js +1 -1
  15. package/dist/utils/cssWithTokens.js +1 -1
  16. package/dist/utils/htmlWithTokens.js +1 -1
  17. package/dist-react/components/ds-drawer/ds-drawer.d.ts +14 -0
  18. package/dist-react/components/ds-drawer/ds-drawer.js +87 -0
  19. package/dist-react/components/ds-drawer/ds-drawer.test.d.ts +7 -0
  20. package/dist-react/components/ds-drawer/ds-drawer.types.d.ts +4 -0
  21. package/dist-react/components/ds-drawer/styles/common.styles.d.ts +2 -0
  22. package/dist-react/components/ds-drawer/styles/common.styles.js +117 -0
  23. package/dist-react/components/ds-drawer/theme-config.d.ts +8 -0
  24. package/dist-react/components/ds-drawer/theme-config.js +14 -0
  25. package/dist-react/components/ds-theme-provider/ds-theme-provider.js +1 -1
  26. package/dist-react/components/index.d.ts +1 -0
  27. package/dist-react/index.js +3 -2
  28. package/dist-react/utils/IconsManager.js +1 -1
  29. package/dist-react/utils/PubSub.js +1 -1
  30. package/dist-react/utils/StylesRegistry/StylesRegistry.js +1 -1
  31. package/dist-react/utils/cssWithTokens.js +1 -1
  32. package/dist-react/utils/htmlWithTokens.js +1 -1
  33. package/package.json +1 -1
@@ -0,0 +1,14 @@
1
+ import { UiKitElement } from '../base/UiKitElement.ts';
2
+ import { PropertyValues } from 'lit';
3
+ import type { DsDrawerAttrs } from './ds-drawer.types.ts';
4
+ export declare class DsDrawer extends UiKitElement {
5
+ static styles: import("lit").CSSResult[];
6
+ open: DsDrawerAttrs['open'];
7
+ private get classes();
8
+ private handleOverlayClick;
9
+ private handleKeyDown;
10
+ private getIconButtonTemplate;
11
+ updated(changed: PropertyValues): void;
12
+ disconnectedCallback(): void;
13
+ render(): import("lit").TemplateResult<1>;
14
+ }
@@ -0,0 +1,87 @@
1
+ import { UiKitElement as d } from "../base/UiKitElement.js";
2
+ import { customUiKitElement as p } from "../../decorators/customUiKitElement.js";
3
+ import { booleanConverter as m } 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 { html as v } 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 h } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";
8
+ import { classMap as l } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js";
9
+ import { commonStyles as u, iconStyles as f } from "./styles/common.styles.js";
10
+ import { themeConfig as w } from "./theme-config.js";
11
+ var y = Object.defineProperty, b = Object.getOwnPropertyDescriptor, c = (e, t, n, s) => {
12
+ for (var o = s > 1 ? void 0 : s ? b(t, n) : t, a = e.length - 1, i; a >= 0; a--)
13
+ (i = e[a]) && (o = (s ? i(t, n, o) : i(o)) || o);
14
+ return s && o && y(t, n, o), o;
15
+ };
16
+ let r = class extends d {
17
+ constructor() {
18
+ super(...arguments), this.open = !1, this.handleOverlayClick = () => {
19
+ this.dispatchEvent(
20
+ new Event("ds-drawer:close", {
21
+ bubbles: !0,
22
+ composed: !0
23
+ })
24
+ ), this.open = !1;
25
+ }, this.handleKeyDown = (e) => {
26
+ (e.key === "Escape" || e.key === "Esc") && this.open && this.handleOverlayClick();
27
+ };
28
+ }
29
+ get classes() {
30
+ return {
31
+ container: !0,
32
+ open: !!this.open
33
+ };
34
+ }
35
+ getIconButtonTemplate() {
36
+ var t;
37
+ const e = (t = w[this.theme]) == null ? void 0 : t["icon-button-variant"];
38
+ return this.componentFactory.createIconButton({
39
+ class: "close-button visible",
40
+ "data-testid": "close-button",
41
+ "data-aria-label": "close-button",
42
+ "@click": this.handleOverlayClick,
43
+ size: "medium",
44
+ "icon-name": "cross",
45
+ variant: e,
46
+ mode: "dark"
47
+ });
48
+ }
49
+ updated(e) {
50
+ var t;
51
+ (t = super.updated) == null || t.call(this, e), e.has && e.has("open") && window.addEventListener("keydown", this.handleKeyDown);
52
+ }
53
+ disconnectedCallback() {
54
+ window.removeEventListener("keydown", this.handleKeyDown), super.disconnectedCallback();
55
+ }
56
+ render() {
57
+ return v`
58
+ <div class=${l({ overlay: !0, open: !!this.open })} @click=${this.handleOverlayClick}></div>
59
+ <div data-testid="ds-drawer-container" class=${l(this.classes)}>
60
+ <div class="scroll-area">
61
+ <div class="drawer-header">
62
+ <slot name="header"></slot>
63
+ ${this.getIconButtonTemplate()}
64
+ </div>
65
+
66
+ <div class="drawer-content">
67
+ <slot name="content"></slot>
68
+ </div>
69
+ </div>
70
+
71
+ <div class="drawer-footer">
72
+ <slot name="footer"></slot>
73
+ </div>
74
+ </div>
75
+ `;
76
+ }
77
+ };
78
+ r.styles = [u, f];
79
+ c([
80
+ h({ type: Boolean, converter: m })
81
+ ], r.prototype, "open", 2);
82
+ r = c([
83
+ p("ds-drawer")
84
+ ], r);
85
+ export {
86
+ r as DsDrawer
87
+ };
@@ -0,0 +1,7 @@
1
+ import type { DsDrawer } from './ds-drawer';
2
+ import './ds-drawer.ts';
3
+ declare global {
4
+ interface HTMLElementTagNameMap {
5
+ 'ds-drawer': DsDrawer;
6
+ }
7
+ }
@@ -0,0 +1,4 @@
1
+ import { CommonAttrs } from '../../types/types';
2
+ export interface DsDrawerAttrs extends CommonAttrs {
3
+ open: boolean;
4
+ }
@@ -0,0 +1,2 @@
1
+ export declare const commonStyles: import("lit").CSSResult;
2
+ export declare const iconStyles: import("lit").CSSResult;
@@ -0,0 +1,117 @@
1
+ import { cssQueries as o } from "../../../utils/cssQueries.js";
2
+ import { cssWithTokens as a } from "../../../utils/cssWithTokens.js";
3
+ const e = a`
4
+ :host {
5
+ display: block;
6
+ }
7
+
8
+ .overlay {
9
+ position: fixed;
10
+ inset: 0;
11
+ opacity: 0;
12
+ pointer-events: none;
13
+ transition: opacity 300ms ease;
14
+ z-index: 9998;
15
+ background: var(--dg-global-opacity-black-40);
16
+ backdrop-filter: var(--dg-elevation-blur-soft);
17
+ }
18
+
19
+ .overlay.open {
20
+ opacity: 1;
21
+ pointer-events: auto;
22
+ }
23
+
24
+ .container {
25
+ position: fixed;
26
+ z-index: 9999;
27
+ transition: transform 320ms ease;
28
+ will-change: transform;
29
+ display: flex;
30
+ flex-direction: column;
31
+ overflow: auto;
32
+ border-radius: 0;
33
+ height: 100vh;
34
+ width: 100%;
35
+ bottom: 0;
36
+ right: 0;
37
+ transform: translateY(100%);
38
+
39
+ ${o.m} {
40
+ border-radius: var(--dg-border-radius-m) 0px 0px var(--dg-border-radius-m);
41
+ top: 0;
42
+ transform: translateX(100%);
43
+ width: 491px;
44
+ }
45
+
46
+ ${o.l} {
47
+ width: 579px;
48
+ }
49
+
50
+ ${o.xl} {
51
+ width: 588px;
52
+ }
53
+
54
+ ${o.xxl} {
55
+ width: 780px;
56
+ }
57
+ }
58
+
59
+ .container.open {
60
+ transform: translateY(0);
61
+ ${o.m} {
62
+ transform: translateX(0);
63
+ box-shadow: 0 -8px 32px 0 var(--ds-opacity-black-60, rgba(9, 9, 11, 0.60));
64
+ }
65
+ }
66
+
67
+ .drawer-header,
68
+ .drawer-content,
69
+ .drawer-footer {
70
+ padding-left: var(--dg-layout-margin);
71
+ padding-right: var(--dg-layout-margin);
72
+ }
73
+
74
+ .drawer-header {
75
+ padding-top: var(--dg-spacing-layout-s);
76
+ padding-bottom: var(--dg-spacing-m-3);
77
+ ${o.m} {
78
+ padding-bottom: var(--dg-spacing-layout-m);
79
+ }
80
+ }
81
+
82
+ .drawer-footer {
83
+ padding-top: var(--dg-spacing-layout-m);
84
+ padding-bottom: var(--dg-spacing-layout-l);
85
+ }
86
+
87
+ .drawer-footer ::slotted(*) {
88
+ display: flex;
89
+ flex-direction: column;
90
+ gap: var(--dg-spacing-m-2);
91
+ ${o.s} {
92
+ flex-direction: row;
93
+ }
94
+ }
95
+
96
+ .drawer-content {
97
+ flex: 0 0 auto;
98
+ }
99
+
100
+ .scroll-area {
101
+ display: flex;
102
+ flex-direction: column;
103
+ height: 100%;
104
+ overflow: auto;
105
+ -webkit-overflow-scrolling: touch;
106
+ }
107
+ `, i = a`
108
+ .close-button {
109
+ position: absolute;
110
+ top: calc(var(--dg-spacing-layout-s) - 2px);
111
+ right: var(--dg-spacing-layout-xl);
112
+ }
113
+ `;
114
+ export {
115
+ e as commonStyles,
116
+ i as iconStyles
117
+ };
@@ -0,0 +1,8 @@
1
+ type BrandConfig = {
2
+ 'icon-button-variant': string;
3
+ };
4
+ export type ThemeConfig = {
5
+ [brand: string]: BrandConfig;
6
+ };
7
+ export declare const themeConfig: ThemeConfig;
8
+ export {};
@@ -0,0 +1,14 @@
1
+ const t = {
2
+ cupra: {
3
+ "icon-button-variant": "primary"
4
+ },
5
+ "cupra-diagonal": {
6
+ "icon-button-variant": "tertiary"
7
+ },
8
+ seat: {
9
+ "icon-button-variant": "rounded"
10
+ }
11
+ };
12
+ export {
13
+ t as themeConfig
14
+ };
@@ -54,7 +54,7 @@ let m = class extends v {
54
54
  }
55
55
  loadThemeStyles() {
56
56
  return this.loadStyles ? new Promise((t, o) => {
57
- const s = "/1.0.1-canary.0", r = `https://ds-assets.cupra.com${s}/styles/${this.theme}/theme.css`;
57
+ const s = "/1.1.0-canary.2", 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");
@@ -11,6 +11,7 @@ import './ds-dialog-footer/ds-dialog-footer.ts';
11
11
  import './ds-dialog-header/ds-dialog-header.ts';
12
12
  import './ds-dialog/ds-dialog.ts';
13
13
  import './ds-divider/ds-divider.ts';
14
+ import './ds-drawer/ds-drawer.ts';
14
15
  import './ds-hyperlink/ds-hyperlink.ts';
15
16
  import './ds-icon-button/ds-icon-button.ts';
16
17
  import './ds-icon/ds-icon.ts';
package/dist/index.js CHANGED
@@ -11,6 +11,7 @@ import "./components/ds-dialog-footer/ds-dialog-footer.js";
11
11
  import "./components/ds-dialog-header/ds-dialog-header.js";
12
12
  import "./components/ds-dialog/ds-dialog.js";
13
13
  import "./components/ds-divider/ds-divider.js";
14
+ import "./components/ds-drawer/ds-drawer.js";
14
15
  import "./components/ds-hyperlink/ds-hyperlink.js";
15
16
  import "./components/ds-icon-button/ds-icon-button.js";
16
17
  import "./components/ds-icon/ds-icon.js";
@@ -57,7 +58,7 @@ import "./components/ds-interactive-card/ds-interactive-card.js";
57
58
  import "./components/ds-radio-button-group/ds-radio-button-group.js";
58
59
  import "./components/ds-sidebar-navigation/ds-sidebar-navigation.js";
59
60
  import "./components/ds-badge/ds-badge.js";
60
- import { iconNames as ao } from "./components/ds-icon/iconNames.js";
61
+ import { iconNames as co } from "./components/ds-icon/iconNames.js";
61
62
  export {
62
- ao as iconNames
63
+ co as iconNames
63
64
  };
@@ -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.0.1-canary.0"), h = globalThis;
28
+ const c = Symbol.for("@cupra/ui-kit/icons-manager/1.1.0-canary.2"), 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.0.1-canary.0"), t = globalThis;
21
+ const u = Symbol.for("@cupra/ui-kit/pubsub/1.1.0-canary.2"), 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.0.1-canary.0/styles/${t}/components/${e}.css`, r = this.getCachedStyleSheetPromise({ url: c });
8
+ const c = `https://ds-assets.cupra.com/1.1.0-canary.2/styles/${t}/components/${e}.css`, r = this.getCachedStyleSheetPromise({ url: c });
9
9
  if (r) return r;
10
10
  const i = this.fetchStyle({ url: c }).then((n) => (n || this.stylePromises.delete(c), n));
11
11
  return this.stylePromises.set(c, i), this.stylePromises.get(c);
@@ -3,7 +3,7 @@ import "../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
3
3
  import "../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
4
4
  import { unsafeCSS as n, css as o } from "../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";
5
5
  function x(t, ...r) {
6
- const e = String.raw({ raw: t }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v1-0-1-canary-0"), i = n(e);
6
+ const e = String.raw({ raw: t }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v1-1-0-canary-2"), i = n(e);
7
7
  return o`${i}`;
8
8
  }
9
9
  export {
@@ -3,7 +3,7 @@ import { html as n } from "../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit
3
3
  import "../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
4
4
  import { unsafeHTML as i } from "../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/unsafe-html.js";
5
5
  function x(t, ...r) {
6
- const o = String.raw({ raw: t }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v1-0-1-canary-0"), e = i(o);
6
+ const o = String.raw({ raw: t }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v1-1-0-canary-2"), e = i(o);
7
7
  return n`${e}`;
8
8
  }
9
9
  export {
@@ -0,0 +1,14 @@
1
+ import { UiKitElement } from '../base/UiKitElement.ts';
2
+ import { PropertyValues } from 'lit';
3
+ import type { DsDrawerAttrs } from './ds-drawer.types.ts';
4
+ export declare class DsDrawer extends UiKitElement {
5
+ static styles: import("lit").CSSResult[];
6
+ open: DsDrawerAttrs['open'];
7
+ private get classes();
8
+ private handleOverlayClick;
9
+ private handleKeyDown;
10
+ private getIconButtonTemplate;
11
+ updated(changed: PropertyValues): void;
12
+ disconnectedCallback(): void;
13
+ render(): import("lit").TemplateResult<1>;
14
+ }
@@ -0,0 +1,87 @@
1
+ import { UiKitElement as d } from "../base/UiKitElement.js";
2
+ import { customUiKitElement as p } from "../../decorators/customUiKitElement.js";
3
+ import { booleanConverter as m } 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 { html as v } 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 h } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";
8
+ import { classMap as l } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js";
9
+ import { commonStyles as u, iconStyles as f } from "./styles/common.styles.js";
10
+ import { themeConfig as w } from "./theme-config.js";
11
+ var y = Object.defineProperty, b = Object.getOwnPropertyDescriptor, c = (e, t, n, s) => {
12
+ for (var o = s > 1 ? void 0 : s ? b(t, n) : t, a = e.length - 1, i; a >= 0; a--)
13
+ (i = e[a]) && (o = (s ? i(t, n, o) : i(o)) || o);
14
+ return s && o && y(t, n, o), o;
15
+ };
16
+ let r = class extends d {
17
+ constructor() {
18
+ super(...arguments), this.open = !1, this.handleOverlayClick = () => {
19
+ this.dispatchEvent(
20
+ new Event("ds-drawer:close", {
21
+ bubbles: !0,
22
+ composed: !0
23
+ })
24
+ ), this.open = !1;
25
+ }, this.handleKeyDown = (e) => {
26
+ (e.key === "Escape" || e.key === "Esc") && this.open && this.handleOverlayClick();
27
+ };
28
+ }
29
+ get classes() {
30
+ return {
31
+ container: !0,
32
+ open: !!this.open
33
+ };
34
+ }
35
+ getIconButtonTemplate() {
36
+ var t;
37
+ const e = (t = w[this.theme]) == null ? void 0 : t["icon-button-variant"];
38
+ return this.componentFactory.createIconButton({
39
+ class: "close-button visible",
40
+ "data-testid": "close-button",
41
+ "data-aria-label": "close-button",
42
+ "@click": this.handleOverlayClick,
43
+ size: "medium",
44
+ "icon-name": "cross",
45
+ variant: e,
46
+ mode: "dark"
47
+ });
48
+ }
49
+ updated(e) {
50
+ var t;
51
+ (t = super.updated) == null || t.call(this, e), e.has && e.has("open") && window.addEventListener("keydown", this.handleKeyDown);
52
+ }
53
+ disconnectedCallback() {
54
+ window.removeEventListener("keydown", this.handleKeyDown), super.disconnectedCallback();
55
+ }
56
+ render() {
57
+ return v`
58
+ <div class=${l({ overlay: !0, open: !!this.open })} @click=${this.handleOverlayClick}></div>
59
+ <div data-testid="ds-drawer-container" class=${l(this.classes)}>
60
+ <div class="scroll-area">
61
+ <div class="drawer-header">
62
+ <slot name="header"></slot>
63
+ ${this.getIconButtonTemplate()}
64
+ </div>
65
+
66
+ <div class="drawer-content">
67
+ <slot name="content"></slot>
68
+ </div>
69
+ </div>
70
+
71
+ <div class="drawer-footer">
72
+ <slot name="footer"></slot>
73
+ </div>
74
+ </div>
75
+ `;
76
+ }
77
+ };
78
+ r.styles = [u, f];
79
+ c([
80
+ h({ type: Boolean, converter: m })
81
+ ], r.prototype, "open", 2);
82
+ r = c([
83
+ p("ds-drawer")
84
+ ], r);
85
+ export {
86
+ r as DsDrawer
87
+ };
@@ -0,0 +1,7 @@
1
+ import type { DsDrawer } from './ds-drawer';
2
+ import './ds-drawer.ts';
3
+ declare global {
4
+ interface HTMLElementTagNameMap {
5
+ 'ds-drawer': DsDrawer;
6
+ }
7
+ }
@@ -0,0 +1,4 @@
1
+ import { CommonAttrs } from '../../types/types';
2
+ export interface DsDrawerAttrs extends CommonAttrs {
3
+ open: boolean;
4
+ }
@@ -0,0 +1,2 @@
1
+ export declare const commonStyles: import("lit").CSSResult;
2
+ export declare const iconStyles: import("lit").CSSResult;
@@ -0,0 +1,117 @@
1
+ import { cssQueries as o } from "../../../utils/cssQueries.js";
2
+ import { cssWithTokens as a } from "../../../utils/cssWithTokens.js";
3
+ const e = a`
4
+ :host {
5
+ display: block;
6
+ }
7
+
8
+ .overlay {
9
+ position: fixed;
10
+ inset: 0;
11
+ opacity: 0;
12
+ pointer-events: none;
13
+ transition: opacity 300ms ease;
14
+ z-index: 9998;
15
+ background: var(--dg-global-opacity-black-40);
16
+ backdrop-filter: var(--dg-elevation-blur-soft);
17
+ }
18
+
19
+ .overlay.open {
20
+ opacity: 1;
21
+ pointer-events: auto;
22
+ }
23
+
24
+ .container {
25
+ position: fixed;
26
+ z-index: 9999;
27
+ transition: transform 320ms ease;
28
+ will-change: transform;
29
+ display: flex;
30
+ flex-direction: column;
31
+ overflow: auto;
32
+ border-radius: 0;
33
+ height: 100vh;
34
+ width: 100%;
35
+ bottom: 0;
36
+ right: 0;
37
+ transform: translateY(100%);
38
+
39
+ ${o.m} {
40
+ border-radius: var(--dg-border-radius-m) 0px 0px var(--dg-border-radius-m);
41
+ top: 0;
42
+ transform: translateX(100%);
43
+ width: 491px;
44
+ }
45
+
46
+ ${o.l} {
47
+ width: 579px;
48
+ }
49
+
50
+ ${o.xl} {
51
+ width: 588px;
52
+ }
53
+
54
+ ${o.xxl} {
55
+ width: 780px;
56
+ }
57
+ }
58
+
59
+ .container.open {
60
+ transform: translateY(0);
61
+ ${o.m} {
62
+ transform: translateX(0);
63
+ box-shadow: 0 -8px 32px 0 var(--ds-opacity-black-60, rgba(9, 9, 11, 0.60));
64
+ }
65
+ }
66
+
67
+ .drawer-header,
68
+ .drawer-content,
69
+ .drawer-footer {
70
+ padding-left: var(--dg-layout-margin);
71
+ padding-right: var(--dg-layout-margin);
72
+ }
73
+
74
+ .drawer-header {
75
+ padding-top: var(--dg-spacing-layout-s);
76
+ padding-bottom: var(--dg-spacing-m-3);
77
+ ${o.m} {
78
+ padding-bottom: var(--dg-spacing-layout-m);
79
+ }
80
+ }
81
+
82
+ .drawer-footer {
83
+ padding-top: var(--dg-spacing-layout-m);
84
+ padding-bottom: var(--dg-spacing-layout-l);
85
+ }
86
+
87
+ .drawer-footer ::slotted(*) {
88
+ display: flex;
89
+ flex-direction: column;
90
+ gap: var(--dg-spacing-m-2);
91
+ ${o.s} {
92
+ flex-direction: row;
93
+ }
94
+ }
95
+
96
+ .drawer-content {
97
+ flex: 0 0 auto;
98
+ }
99
+
100
+ .scroll-area {
101
+ display: flex;
102
+ flex-direction: column;
103
+ height: 100%;
104
+ overflow: auto;
105
+ -webkit-overflow-scrolling: touch;
106
+ }
107
+ `, i = a`
108
+ .close-button {
109
+ position: absolute;
110
+ top: calc(var(--dg-spacing-layout-s) - 2px);
111
+ right: var(--dg-spacing-layout-xl);
112
+ }
113
+ `;
114
+ export {
115
+ e as commonStyles,
116
+ i as iconStyles
117
+ };
@@ -0,0 +1,8 @@
1
+ type BrandConfig = {
2
+ 'icon-button-variant': string;
3
+ };
4
+ export type ThemeConfig = {
5
+ [brand: string]: BrandConfig;
6
+ };
7
+ export declare const themeConfig: ThemeConfig;
8
+ export {};
@@ -0,0 +1,14 @@
1
+ const t = {
2
+ cupra: {
3
+ "icon-button-variant": "primary"
4
+ },
5
+ "cupra-diagonal": {
6
+ "icon-button-variant": "tertiary"
7
+ },
8
+ seat: {
9
+ "icon-button-variant": "rounded"
10
+ }
11
+ };
12
+ export {
13
+ t as themeConfig
14
+ };
@@ -54,7 +54,7 @@ let m = class extends v {
54
54
  }
55
55
  loadThemeStyles() {
56
56
  return this.loadStyles ? new Promise((t, o) => {
57
- const s = "/1.0.1-canary.0", r = `https://ds-assets.cupra.com${s}/styles/${this.theme}/theme.css`;
57
+ const s = "/1.1.0-canary.2", 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");
@@ -11,6 +11,7 @@ import './ds-dialog-footer/ds-dialog-footer.ts';
11
11
  import './ds-dialog-header/ds-dialog-header.ts';
12
12
  import './ds-dialog/ds-dialog.ts';
13
13
  import './ds-divider/ds-divider.ts';
14
+ import './ds-drawer/ds-drawer.ts';
14
15
  import './ds-hyperlink/ds-hyperlink.ts';
15
16
  import './ds-icon-button/ds-icon-button.ts';
16
17
  import './ds-icon/ds-icon.ts';
@@ -11,6 +11,7 @@ import "./components/ds-dialog-footer/ds-dialog-footer.js";
11
11
  import "./components/ds-dialog-header/ds-dialog-header.js";
12
12
  import "./components/ds-dialog/ds-dialog.js";
13
13
  import "./components/ds-divider/ds-divider.js";
14
+ import "./components/ds-drawer/ds-drawer.js";
14
15
  import "./components/ds-hyperlink/ds-hyperlink.js";
15
16
  import "./components/ds-icon-button/ds-icon-button.js";
16
17
  import "./components/ds-icon/ds-icon.js";
@@ -57,7 +58,7 @@ import "./components/ds-interactive-card/ds-interactive-card.js";
57
58
  import "./components/ds-radio-button-group/ds-radio-button-group.js";
58
59
  import "./components/ds-sidebar-navigation/ds-sidebar-navigation.js";
59
60
  import "./components/ds-badge/ds-badge.js";
60
- import { iconNames as ao } from "./components/ds-icon/iconNames.js";
61
+ import { iconNames as co } from "./components/ds-icon/iconNames.js";
61
62
  export {
62
- ao as iconNames
63
+ co as iconNames
63
64
  };
@@ -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.0.1-canary.0"), h = globalThis;
28
+ const c = Symbol.for("@cupra/ui-kit/icons-manager/1.1.0-canary.2"), 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.0.1-canary.0"), t = globalThis;
21
+ const u = Symbol.for("@cupra/ui-kit/pubsub/1.1.0-canary.2"), 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.0.1-canary.0/styles/${t}/components/${e}.css`, r = this.getCachedStyleSheetPromise({ url: c });
8
+ const c = `https://ds-assets.cupra.com/1.1.0-canary.2/styles/${t}/components/${e}.css`, r = this.getCachedStyleSheetPromise({ url: c });
9
9
  if (r) return r;
10
10
  const i = this.fetchStyle({ url: c }).then((n) => (n || this.stylePromises.delete(c), n));
11
11
  return this.stylePromises.set(c, i), this.stylePromises.get(c);
@@ -3,7 +3,7 @@ import "../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
3
3
  import "../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
4
4
  import { unsafeCSS as n, css as o } from "../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";
5
5
  function x(t, ...r) {
6
- const e = String.raw({ raw: t }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v1-0-1-canary-0"), i = n(e);
6
+ const e = String.raw({ raw: t }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v1-1-0-canary-2"), i = n(e);
7
7
  return o`${i}`;
8
8
  }
9
9
  export {
@@ -3,7 +3,7 @@ import { html as n } from "../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit
3
3
  import "../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
4
4
  import { unsafeHTML as i } from "../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/unsafe-html.js";
5
5
  function x(t, ...r) {
6
- const o = String.raw({ raw: t }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v1-0-1-canary-0"), e = i(o);
6
+ const o = String.raw({ raw: t }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v1-1-0-canary-2"), e = i(o);
7
7
  return n`${e}`;
8
8
  }
9
9
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cupra/ui-kit",
3
- "version": "1.0.1-canary.0",
3
+ "version": "1.1.0-canary.2",
4
4
  "description": "Web components library",
5
5
  "author": "SEAT S.A.",
6
6
  "license": "SEAT S.A. Library EULA 1.0",