@cupra/ui-kit 2.0.0-canary.65 → 2.0.0-canary.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/ds-dialog/ds-dialog.cjs +11 -4
- package/dist/cjs/components/ds-theme-provider/ds-theme-provider.cjs +1 -1
- package/dist/cjs/utils/IconsManager.cjs +1 -1
- package/dist/cjs/utils/PubSub.cjs +1 -1
- package/dist/cjs/utils/StylesRegistry/StylesRegistry.cjs +1 -1
- package/dist/cjs/utils/cssWithTokens.cjs +1 -1
- package/dist/cjs/utils/htmlWithTokens.cjs +1 -1
- package/dist/esm/components/ds-dialog/ds-dialog.js +38 -23
- package/dist/esm/components/ds-theme-provider/ds-theme-provider.js +1 -1
- package/dist/esm/utils/IconsManager.js +1 -1
- package/dist/esm/utils/PubSub.js +1 -1
- package/dist/esm/utils/StylesRegistry/StylesRegistry.js +1 -1
- package/dist/esm/utils/cssWithTokens.js +1 -1
- package/dist/esm/utils/htmlWithTokens.js +1 -1
- package/dist/types/components/ds-dialog/ds-dialog.d.ts +3 -0
- package/dist/types/components/ds-dialog/ds-dialog.types.d.ts +2 -0
- package/dist-react/cjs/components/ds-dialog/ds-dialog.cjs +11 -4
- package/dist-react/cjs/components/ds-theme-provider/ds-theme-provider.cjs +1 -1
- package/dist-react/cjs/utils/IconsManager.cjs +1 -1
- package/dist-react/cjs/utils/PubSub.cjs +1 -1
- package/dist-react/cjs/utils/StylesRegistry/StylesRegistry.cjs +1 -1
- package/dist-react/cjs/utils/cssWithTokens.cjs +1 -1
- package/dist-react/cjs/utils/htmlWithTokens.cjs +1 -1
- package/dist-react/esm/components/ds-dialog/ds-dialog.js +38 -23
- package/dist-react/esm/components/ds-theme-provider/ds-theme-provider.js +1 -1
- package/dist-react/esm/utils/IconsManager.js +1 -1
- package/dist-react/esm/utils/PubSub.js +1 -1
- package/dist-react/esm/utils/StylesRegistry/StylesRegistry.js +1 -1
- package/dist-react/esm/utils/cssWithTokens.js +1 -1
- package/dist-react/esm/utils/htmlWithTokens.js +1 -1
- package/dist-react/types/components/ds-dialog/ds-dialog.d.ts +3 -0
- package/dist-react/types/components/ds-dialog/ds-dialog.types.d.ts +2 -0
- package/package.json +4 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../base/UiKitElement.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../base/UiKitElement.cjs"),y=require("../../decorators/customUiKitElement.cjs"),h=require("../../utils/booleanConverter.cjs"),v=require("../../utils/debounce.cjs");require("../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.cjs");const i=require("../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs");require("../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.cjs");const l=require("../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.cjs"),p=require("../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.cjs"),b=require("../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query.cjs"),d=require("../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.cjs"),g=require("./styles/common.styles.cjs");var D=Object.defineProperty,m=Object.getOwnPropertyDescriptor,t=(n,e,o,r)=>{for(var s=r>1?void 0:r?m(e,o):e,a=n.length-1,c;a>=0;a--)(c=n[a])&&(s=(r?c(e,o,s):c(s))||s);return r&&s&&D(e,o,s),s};exports.DsDialog=class extends u.UiKitElement{constructor(){super(...arguments),this.lockClose=!1,this.lockScroll=!0,this.open=!1,this.size="medium",this.hasBeenOpened=!1,this.hasScroll=!1,this.debouncedCheckScroll=v.debounce({func:()=>this.checkScroll()}),this.handleHostClick=e=>{e.stopPropagation()},this.handleKeyDown=e=>{this.open&&e.key==="Escape"&&this.handleClose()}}async updated(e){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())}async handleResizeObserver(){var e;this.lockScroll&&(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())}get containerClasses(){return{container:!0,close:!this.open,"with-scroll":this.open&&this.hasScroll}}get dialogClasses(){return{dialog:!0,[this.size]:!!this.size}}handleClose(){this.lockClose||(this.open=!1,this.dispatchEvent(new Event("ds-dialog:close",{bubbles:!0,composed:!0})))}connectedCallback(){super.connectedCallback(),window.addEventListener("keydown",this.handleKeyDown),this.resizeObserver=new ResizeObserver(this.debouncedCheckScroll),this.handleResizeObserver(),this.addEventListener("click",this.handleHostClick)}disconnectedCallback(){var e;super.disconnectedCallback(),window.removeEventListener("keydown",this.handleKeyDown),this.lockScroll&&(document.body.style.overflow=""),(e=this.resizeObserver)==null||e.disconnect(),this.removeEventListener("click",this.handleHostClick)}checkScroll(){var e,o;this.hasScroll=((e=this.content)==null?void 0:e.scrollHeight)>((o=this.content)==null?void 0:o.clientHeight)}render(){return!this.hasBeenOpened&&!this.open?i.nothing:i.html`
|
|
2
2
|
<style>
|
|
3
3
|
:host {
|
|
4
4
|
display: ${this.open?"flex":"none"};
|
|
@@ -7,8 +7,15 @@
|
|
|
7
7
|
|
|
8
8
|
<div class=${d.classMap(this.containerClasses)}>
|
|
9
9
|
<div class="overlay" @click=${this.handleClose}></div>
|
|
10
|
-
<dialog
|
|
11
|
-
|
|
10
|
+
<dialog
|
|
11
|
+
?open=${this.open}
|
|
12
|
+
data-testid="ds-dialog-container"
|
|
13
|
+
class=${d.classMap(this.dialogClasses)}
|
|
14
|
+
aria-modal="true"
|
|
15
|
+
aria-label=${this.dataAriaLabel||i.nothing}
|
|
16
|
+
aria-description=${this.dataAriaDescription||i.nothing}
|
|
17
|
+
>
|
|
18
|
+
${this.lockClose?i.nothing:i.html`<slot name="close-button" @click=${this.handleClose}></slot>`}
|
|
12
19
|
<div class="content-container">
|
|
13
20
|
<div tabindex="0" class="content ds-scroll">
|
|
14
21
|
<slot @slotchange=${this.handleResizeObserver}></slot>
|
|
@@ -17,4 +24,4 @@
|
|
|
17
24
|
</div>
|
|
18
25
|
</dialog>
|
|
19
26
|
</div>
|
|
20
|
-
`}};exports.DsDialog.styles=[
|
|
27
|
+
`}};exports.DsDialog.styles=[g.commonStyles];t([l.property({type:Boolean,converter:h.booleanConverter,attribute:"lock-close"})],exports.DsDialog.prototype,"lockClose",2);t([l.property({type:Boolean,converter:h.booleanConverter,attribute:"lock-scroll"})],exports.DsDialog.prototype,"lockScroll",2);t([l.property({type:Boolean,converter:h.booleanConverter})],exports.DsDialog.prototype,"open",2);t([l.property({type:String})],exports.DsDialog.prototype,"size",2);t([l.property({type:String,attribute:"data-aria-label"})],exports.DsDialog.prototype,"dataAriaLabel",2);t([l.property({type:String,attribute:"data-aria-description"})],exports.DsDialog.prototype,"dataAriaDescription",2);t([p.state()],exports.DsDialog.prototype,"hasBeenOpened",2);t([p.state()],exports.DsDialog.prototype,"hasScroll",2);t([b.query(".content")],exports.DsDialog.prototype,"content",2);exports.DsDialog=t([y.customUiKitElement("ds-dialog")],exports.DsDialog);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../../core/theme.constants.cjs"),p=require("../../decorators/customUiKitElement.cjs"),f=require("../../node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/decorators/provide.cjs"),y=require("../../utils/PubSub.cjs"),m=require("../../utils/booleanConverter.cjs");require("../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.cjs");const l=require("../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs"),v=require("../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.cjs"),h=require("../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.cjs"),u=require("../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.cjs"),$=require("../../styles/source/shared/fonts-config.cjs"),T=require("./themeContext.cjs");var b=Object.defineProperty,P=Object.getOwnPropertyDescriptor,d=(a,e,s,o)=>{for(var t=o>1?void 0:o?P(e,s):e,r=a.length-1,n;r>=0;r--)(n=a[r])&&(t=(o?n(e,s,t):n(t))||t);return o&&t&&b(e,s,t),t};exports.DsThemeProvider=class extends v.LitElement{constructor(){super(...arguments),this.loadFonts=!0,this.loadStyles=!0,this.cssLoaded=!1,this.loadedFonts=new Set}updated(e){super.updated(e),e.has("theme")&&(y.pubSub.publish("theme",this.theme),sessionStorage==null||sessionStorage.setItem(c.THEME_STORAGE_KEY,this.theme),typeof FontFace<"u"&&(document!=null&&document.fonts)&&this.loadThemeFonts(),this.loadThemeStyles().then(()=>{this.cssLoaded=!0,this.dispatchEvent(new CustomEvent("ui-kit:ready",{bubbles:!0,composed:!0}))}))}loadThemeFonts(){var e;(e=$.fontsConfig[this.theme])==null||e.fonts.forEach(s=>{this.loadThemeFont(s)})}async loadThemeFont({weight:e,name:s,file:o}){if(!this.loadFonts)return Promise.resolve();const t=`${s}-${e}`;if(this.loadedFonts.has(t))return;const r=new FontFace(s,`url('https://ds-assets.cupra.com/fonts/${this.theme}/${o}.woff2') format('woff2'),
|
|
2
2
|
url('https://ds-assets.cupra.com/fonts/${this.theme}/${o}.woff') format('woff'),
|
|
3
3
|
url('https://ds-assets.cupra.com/fonts/${this.theme}/${o}.ttf') format('truetype'),
|
|
4
|
-
url('https://ds-assets.cupra.com/fonts/${this.theme}/${o}.otf') format('opentype')`,{style:"normal",weight:e,display:"swap"});try{await r.load(),document.fonts.add(r),this.loadedFonts.add(t)}catch(n){console.error(`Error loading "${s}" font with "${e}" weight:`,n)}}loadThemeStyles(){return this.loadStyles?new Promise((e,s)=>{const o="/2.0.0-canary.
|
|
4
|
+
url('https://ds-assets.cupra.com/fonts/${this.theme}/${o}.otf') format('opentype')`,{style:"normal",weight:e,display:"swap"});try{await r.load(),document.fonts.add(r),this.loadedFonts.add(t)}catch(n){console.error(`Error loading "${s}" font with "${e}" weight:`,n)}}loadThemeStyles(){return this.loadStyles?new Promise((e,s)=>{const o="/2.0.0-canary.66",t=`https://ds-assets.cupra.com${o}/styles/${this.theme}/theme.css`;if(document.head.querySelector(`link[href="${t}"]`))e();else{const r=`ui-kit-theme-${o}`,n=document.getElementById(r),i=document.createElement("link");i.id=r,i.rel="stylesheet",i.href=t,i.onload=()=>e(),i.onerror=()=>s(new Error(`Failed to load theme CSS: ${t}`)),document.head.appendChild(i),n==null||n.remove()}}):Promise.resolve()}render(){return this.cssLoaded?l.html`<slot></slot>`:l.nothing}};d([h.property({type:Boolean,converter:m.booleanConverter,attribute:"load-fonts"})],exports.DsThemeProvider.prototype,"loadFonts",2);d([h.property({type:Boolean,converter:m.booleanConverter,attribute:"load-styles"})],exports.DsThemeProvider.prototype,"loadStyles",2);d([f.provide({context:T.themeContext}),h.property({type:String})],exports.DsThemeProvider.prototype,"theme",2);d([u.state()],exports.DsThemeProvider.prototype,"cssLoaded",2);d([u.state()],exports.DsThemeProvider.prototype,"loadedFonts",2);exports.DsThemeProvider=d([p.customUiKitElement("ds-theme-provider")],exports.DsThemeProvider);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../core/theme.constants.cjs"),l=require("./PubSub.cjs");class u{constructor(){this.icons={},this.handleChangeTheme=e=>{if(this.theme===e)return;this.theme=e;const n=Object.keys(this.icons);this.icons={},n.forEach(s=>this.fetchIcon(s))},this.fetchIcon=async(e,n={})=>{const s=typeof sessionStorage<"u"?sessionStorage==null?void 0:sessionStorage.getItem(r.THEME_STORAGE_KEY):null;!this.theme&&s&&(this.theme=s);const t=this.icons[e];if(t)return await t;const i=this.loadIcon(e,n).catch(a=>{throw delete this.icons[e],a});return this.icons[e]=i,i},this.loadIcon=(e,{cache:n="force-cache",...s})=>!this.theme||typeof fetch>"u"?Promise.resolve('<svg class="ds-icon"></svg>'):fetch(`https://ds-assets.cupra.com/icons/${this.theme}/${e}.svg`,{cache:n,...s}).then(t=>t.text()).catch(t=>{if((t==null?void 0:t.name)==="AbortError")throw t;return console.error(`Failed to fetch icon "${e}":`,t),""}),l.pubSub.subscribe("theme",this.handleChangeTheme)}}const o=Symbol.for("@cupra/ui-kit/icons-manager/2.0.0-canary.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../core/theme.constants.cjs"),l=require("./PubSub.cjs");class u{constructor(){this.icons={},this.handleChangeTheme=e=>{if(this.theme===e)return;this.theme=e;const n=Object.keys(this.icons);this.icons={},n.forEach(s=>this.fetchIcon(s))},this.fetchIcon=async(e,n={})=>{const s=typeof sessionStorage<"u"?sessionStorage==null?void 0:sessionStorage.getItem(r.THEME_STORAGE_KEY):null;!this.theme&&s&&(this.theme=s);const t=this.icons[e];if(t)return await t;const i=this.loadIcon(e,n).catch(a=>{throw delete this.icons[e],a});return this.icons[e]=i,i},this.loadIcon=(e,{cache:n="force-cache",...s})=>!this.theme||typeof fetch>"u"?Promise.resolve('<svg class="ds-icon"></svg>'):fetch(`https://ds-assets.cupra.com/icons/${this.theme}/${e}.svg`,{cache:n,...s}).then(t=>t.text()).catch(t=>{if((t==null?void 0:t.name)==="AbortError")throw t;return console.error(`Failed to fetch icon "${e}":`,t),""}),l.pubSub.subscribe("theme",this.handleChangeTheme)}}const o=Symbol.for("@cupra/ui-kit/icons-manager/2.0.0-canary.66"),h=globalThis;let c=h[o];c||(c=new u,Object.defineProperty(h,o,{value:c,writable:!1,configurable:!1,enumerable:!1}));const f=c;exports.iconsManager=f;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class u{constructor(){this.subscribers={},this.lastPublishedData={}}subscribe(s,r){return this.subscribers[s]||(this.subscribers[s]=[]),this.subscribers[s].push(r),this.lastPublishedData[s]}unsubscribe(s,r){this.subscribers[s]&&(this.subscribers[s]=this.subscribers[s].filter(i=>i!==r))}publish(s,r){this.lastPublishedData[s]=r,this.subscribers[s]&&this.subscribers[s].forEach(i=>{try{i(r)}catch(c){console.error(`Error in subscriber for event "${s}":`,c)}})}}const t=Symbol.for("@cupra/ui-kit/pubsub/2.0.0-canary.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class u{constructor(){this.subscribers={},this.lastPublishedData={}}subscribe(s,r){return this.subscribers[s]||(this.subscribers[s]=[]),this.subscribers[s].push(r),this.lastPublishedData[s]}unsubscribe(s,r){this.subscribers[s]&&(this.subscribers[s]=this.subscribers[s].filter(i=>i!==r))}publish(s,r){this.lastPublishedData[s]=r,this.subscribers[s]&&this.subscribers[s].forEach(i=>{try{i(r)}catch(c){console.error(`Error in subscriber for event "${s}":`,c)}})}}const t=Symbol.for("@cupra/ui-kit/pubsub/2.0.0-canary.66"),e=globalThis;let b=e[t];b||(b=new u,Object.defineProperty(e,t,{value:b,writable:!1,configurable:!1,enumerable:!1}));const l=b;exports.PubSub=u;exports.pubSub=l;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../concurrencyLimit.cjs"),a=o.concurrencyLimit(20);class s{constructor(){this.stylePromises=new Map,this.getStyles=async({componentName:e,theme:t})=>{if(!t||!e)return;const c=`https://ds-assets.cupra.com/2.0.0-canary.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../concurrencyLimit.cjs"),a=o.concurrencyLimit(20);class s{constructor(){this.stylePromises=new Map,this.getStyles=async({componentName:e,theme:t})=>{if(!t||!e)return;const c=`https://ds-assets.cupra.com/2.0.0-canary.66/styles/${t}/components/${e}.css`,r=this.getCachedStyleSheetPromise({url:c});if(r)return r;const i=a(()=>this.fetchStyle({url:c})).then(n=>(n||this.stylePromises.delete(c),n));return this.stylePromises.set(c,i),this.stylePromises.get(c)}}async fetchStyle({url:e}){try{if(typeof fetch>"u")return;const t=await fetch(e,{cache:"force-cache"});if(t.ok)return t.text()}catch(t){console.error(`Failed to fetch Style Sheet "${e}":`,t)}}getCachedStyleSheetPromise({url:e}){return this.stylePromises.get(e)}static getInstance(){return s.instance||(s.instance=new s),s.instance}}const h=s.getInstance();exports.stylesRegistry=h;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.cjs");require("../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs");require("../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.cjs");const e=require("../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.cjs");function i(r,...t){const s=String.raw({raw:r},...t).replace(/(--private-[\w-]+)(?=\s*[):,])/g,"$1-v2-0-0-canary-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.cjs");require("../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs");require("../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.cjs");const e=require("../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.cjs");function i(r,...t){const s=String.raw({raw:r},...t).replace(/(--private-[\w-]+)(?=\s*[):,])/g,"$1-v2-0-0-canary-66"),n=e.unsafeCSS(s);return e.css`${n}`}exports.cssWithTokens=i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.cjs");const i=require("../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs");require("../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.cjs");const o=require("../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/unsafe-html.cjs");function a(e,...t){const r=String.raw({raw:e},...t).replace(/(--private-[\w-]+)(?=\s*[):,])/g,"$1-v2-0-0-canary-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.cjs");const i=require("../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs");require("../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.cjs");const o=require("../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/unsafe-html.cjs");function a(e,...t){const r=String.raw({raw:e},...t).replace(/(--private-[\w-]+)(?=\s*[):,])/g,"$1-v2-0-0-canary-66"),n=o.unsafeHTML(r);return i.html`${n}`}exports.htmlWithTokens=a;
|
|
@@ -1,23 +1,25 @@
|
|
|
1
1
|
import { UiKitElement as v } from "../base/UiKitElement.js";
|
|
2
|
-
import { customUiKitElement as
|
|
3
|
-
import { booleanConverter as
|
|
2
|
+
import { customUiKitElement as b } from "../../decorators/customUiKitElement.js";
|
|
3
|
+
import { booleanConverter as d } from "../../utils/booleanConverter.js";
|
|
4
4
|
import { debounce as y } from "../../utils/debounce.js";
|
|
5
5
|
import "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
|
|
6
|
-
import { nothing as
|
|
6
|
+
import { nothing as n, html as p } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
|
|
7
7
|
import "../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
8
|
-
import { property as
|
|
8
|
+
import { property as r } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";
|
|
9
9
|
import { state as u } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.js";
|
|
10
|
-
import { query as
|
|
10
|
+
import { query as f } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query.js";
|
|
11
11
|
import { classMap as m } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js";
|
|
12
|
-
import { commonStyles as
|
|
13
|
-
var
|
|
14
|
-
for (var i = l > 1 ? void 0 : l ? w(o,
|
|
15
|
-
(
|
|
16
|
-
return l && i &&
|
|
12
|
+
import { commonStyles as k } from "./styles/common.styles.js";
|
|
13
|
+
var C = Object.defineProperty, w = Object.getOwnPropertyDescriptor, s = (e, o, a, l) => {
|
|
14
|
+
for (var i = l > 1 ? void 0 : l ? w(o, a) : o, c = e.length - 1, h; c >= 0; c--)
|
|
15
|
+
(h = e[c]) && (i = (l ? h(o, a, i) : h(i)) || i);
|
|
16
|
+
return l && i && C(o, a, i), i;
|
|
17
17
|
};
|
|
18
18
|
let t = class extends v {
|
|
19
19
|
constructor() {
|
|
20
|
-
super(...arguments), this.lockClose = !1, this.lockScroll = !0, this.open = !1, this.size = "medium", this.hasBeenOpened = !1, this.hasScroll = !1, this.debouncedCheckScroll = y({ func: () => this.checkScroll() }), this.
|
|
20
|
+
super(...arguments), this.lockClose = !1, this.lockScroll = !0, this.open = !1, this.size = "medium", this.hasBeenOpened = !1, this.hasScroll = !1, this.debouncedCheckScroll = y({ func: () => this.checkScroll() }), this.handleHostClick = (e) => {
|
|
21
|
+
e.stopPropagation();
|
|
22
|
+
}, this.handleKeyDown = (e) => {
|
|
21
23
|
this.open && e.key === "Escape" && this.handleClose();
|
|
22
24
|
};
|
|
23
25
|
}
|
|
@@ -50,18 +52,18 @@ let t = class extends v {
|
|
|
50
52
|
));
|
|
51
53
|
}
|
|
52
54
|
connectedCallback() {
|
|
53
|
-
super.connectedCallback(), window.addEventListener("keydown", this.handleKeyDown), this.resizeObserver = new ResizeObserver(this.debouncedCheckScroll), this.handleResizeObserver();
|
|
55
|
+
super.connectedCallback(), window.addEventListener("keydown", this.handleKeyDown), this.resizeObserver = new ResizeObserver(this.debouncedCheckScroll), this.handleResizeObserver(), this.addEventListener("click", this.handleHostClick);
|
|
54
56
|
}
|
|
55
57
|
disconnectedCallback() {
|
|
56
58
|
var e;
|
|
57
|
-
super.disconnectedCallback(), window.removeEventListener("keydown", this.handleKeyDown), this.lockScroll && (document.body.style.overflow = ""), (e = this.resizeObserver) == null || e.disconnect();
|
|
59
|
+
super.disconnectedCallback(), window.removeEventListener("keydown", this.handleKeyDown), this.lockScroll && (document.body.style.overflow = ""), (e = this.resizeObserver) == null || e.disconnect(), this.removeEventListener("click", this.handleHostClick);
|
|
58
60
|
}
|
|
59
61
|
checkScroll() {
|
|
60
62
|
var e, o;
|
|
61
63
|
this.hasScroll = ((e = this.content) == null ? void 0 : e.scrollHeight) > ((o = this.content) == null ? void 0 : o.clientHeight);
|
|
62
64
|
}
|
|
63
65
|
render() {
|
|
64
|
-
return !this.hasBeenOpened && !this.open ?
|
|
66
|
+
return !this.hasBeenOpened && !this.open ? n : p`
|
|
65
67
|
<style>
|
|
66
68
|
:host {
|
|
67
69
|
display: ${this.open ? "flex" : "none"};
|
|
@@ -70,8 +72,15 @@ let t = class extends v {
|
|
|
70
72
|
|
|
71
73
|
<div class=${m(this.containerClasses)}>
|
|
72
74
|
<div class="overlay" @click=${this.handleClose}></div>
|
|
73
|
-
<dialog
|
|
74
|
-
|
|
75
|
+
<dialog
|
|
76
|
+
?open=${this.open}
|
|
77
|
+
data-testid="ds-dialog-container"
|
|
78
|
+
class=${m(this.dialogClasses)}
|
|
79
|
+
aria-modal="true"
|
|
80
|
+
aria-label=${this.dataAriaLabel || n}
|
|
81
|
+
aria-description=${this.dataAriaDescription || n}
|
|
82
|
+
>
|
|
83
|
+
${this.lockClose ? n : p`<slot name="close-button" @click=${this.handleClose}></slot>`}
|
|
75
84
|
<div class="content-container">
|
|
76
85
|
<div tabindex="0" class="content ds-scroll">
|
|
77
86
|
<slot @slotchange=${this.handleResizeObserver}></slot>
|
|
@@ -83,19 +92,25 @@ let t = class extends v {
|
|
|
83
92
|
`;
|
|
84
93
|
}
|
|
85
94
|
};
|
|
86
|
-
t.styles = [
|
|
95
|
+
t.styles = [k];
|
|
87
96
|
s([
|
|
88
|
-
|
|
97
|
+
r({ type: Boolean, converter: d, attribute: "lock-close" })
|
|
89
98
|
], t.prototype, "lockClose", 2);
|
|
90
99
|
s([
|
|
91
|
-
|
|
100
|
+
r({ type: Boolean, converter: d, attribute: "lock-scroll" })
|
|
92
101
|
], t.prototype, "lockScroll", 2);
|
|
93
102
|
s([
|
|
94
|
-
|
|
103
|
+
r({ type: Boolean, converter: d })
|
|
95
104
|
], t.prototype, "open", 2);
|
|
96
105
|
s([
|
|
97
|
-
|
|
106
|
+
r({ type: String })
|
|
98
107
|
], t.prototype, "size", 2);
|
|
108
|
+
s([
|
|
109
|
+
r({ type: String, attribute: "data-aria-label" })
|
|
110
|
+
], t.prototype, "dataAriaLabel", 2);
|
|
111
|
+
s([
|
|
112
|
+
r({ type: String, attribute: "data-aria-description" })
|
|
113
|
+
], t.prototype, "dataAriaDescription", 2);
|
|
99
114
|
s([
|
|
100
115
|
u()
|
|
101
116
|
], t.prototype, "hasBeenOpened", 2);
|
|
@@ -103,10 +118,10 @@ s([
|
|
|
103
118
|
u()
|
|
104
119
|
], t.prototype, "hasScroll", 2);
|
|
105
120
|
s([
|
|
106
|
-
|
|
121
|
+
f(".content")
|
|
107
122
|
], t.prototype, "content", 2);
|
|
108
123
|
t = s([
|
|
109
|
-
|
|
124
|
+
b("ds-dialog")
|
|
110
125
|
], t);
|
|
111
126
|
export {
|
|
112
127
|
t as DsDialog
|
|
@@ -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 = "/2.0.0-canary.
|
|
57
|
+
const s = "/2.0.0-canary.66", 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");
|
|
@@ -25,7 +25,7 @@ class l {
|
|
|
25
25
|
}), f.subscribe("theme", this.handleChangeTheme);
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
const c = Symbol.for("@cupra/ui-kit/icons-manager/2.0.0-canary.
|
|
28
|
+
const c = Symbol.for("@cupra/ui-kit/icons-manager/2.0.0-canary.66"), h = globalThis;
|
|
29
29
|
let i = h[c];
|
|
30
30
|
i || (i = new l(), Object.defineProperty(h, c, {
|
|
31
31
|
value: i,
|
package/dist/esm/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/2.0.0-canary.
|
|
21
|
+
const u = Symbol.for("@cupra/ui-kit/pubsub/2.0.0-canary.66"), t = globalThis;
|
|
22
22
|
let b = t[u];
|
|
23
23
|
b || (b = new e(), Object.defineProperty(t, u, {
|
|
24
24
|
value: b,
|
|
@@ -7,7 +7,7 @@ class s {
|
|
|
7
7
|
theme: t
|
|
8
8
|
}) => {
|
|
9
9
|
if (!t || !e) return;
|
|
10
|
-
const c = `https://ds-assets.cupra.com/2.0.0-canary.
|
|
10
|
+
const c = `https://ds-assets.cupra.com/2.0.0-canary.66/styles/${t}/components/${e}.css`, r = this.getCachedStyleSheetPromise({ url: c });
|
|
11
11
|
if (r) return r;
|
|
12
12
|
const i = h(() => this.fetchStyle({ url: c })).then((n) => (n || this.stylePromises.delete(c), n));
|
|
13
13
|
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-v2-0-0-canary-
|
|
6
|
+
const e = String.raw({ raw: t }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v2-0-0-canary-66"), 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-v2-0-0-canary-
|
|
6
|
+
const o = String.raw({ raw: t }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v2-0-0-canary-66"), e = i(o);
|
|
7
7
|
return n`${e}`;
|
|
8
8
|
}
|
|
9
9
|
export {
|
|
@@ -9,6 +9,8 @@ export declare class DsDialog extends UiKitElement {
|
|
|
9
9
|
lockScroll: DsDialogAttrs['lock-scroll'];
|
|
10
10
|
open: DsDialogAttrs['open'];
|
|
11
11
|
size: DsDialogAttrs['size'];
|
|
12
|
+
dataAriaLabel: DsDialogAttrs['data-aria-label'];
|
|
13
|
+
dataAriaDescription: DsDialogAttrs['data-aria-description'];
|
|
12
14
|
hasBeenOpened: boolean;
|
|
13
15
|
hasScroll: boolean;
|
|
14
16
|
protected content: HTMLInputElement;
|
|
@@ -21,6 +23,7 @@ export declare class DsDialog extends UiKitElement {
|
|
|
21
23
|
private handleClose;
|
|
22
24
|
connectedCallback(): void;
|
|
23
25
|
disconnectedCallback(): void;
|
|
26
|
+
private handleHostClick;
|
|
24
27
|
private handleKeyDown;
|
|
25
28
|
private checkScroll;
|
|
26
29
|
render(): typeof nothing | import("lit").TemplateResult<1>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../base/UiKitElement.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../base/UiKitElement.cjs"),y=require("../../decorators/customUiKitElement.cjs"),h=require("../../utils/booleanConverter.cjs"),v=require("../../utils/debounce.cjs");require("../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.cjs");const i=require("../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs");require("../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.cjs");const l=require("../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.cjs"),p=require("../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.cjs"),b=require("../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query.cjs"),d=require("../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.cjs"),g=require("./styles/common.styles.cjs");var D=Object.defineProperty,m=Object.getOwnPropertyDescriptor,t=(n,e,o,r)=>{for(var s=r>1?void 0:r?m(e,o):e,a=n.length-1,c;a>=0;a--)(c=n[a])&&(s=(r?c(e,o,s):c(s))||s);return r&&s&&D(e,o,s),s};exports.DsDialog=class extends u.UiKitElement{constructor(){super(...arguments),this.lockClose=!1,this.lockScroll=!0,this.open=!1,this.size="medium",this.hasBeenOpened=!1,this.hasScroll=!1,this.debouncedCheckScroll=v.debounce({func:()=>this.checkScroll()}),this.handleHostClick=e=>{e.stopPropagation()},this.handleKeyDown=e=>{this.open&&e.key==="Escape"&&this.handleClose()}}async updated(e){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())}async handleResizeObserver(){var e;this.lockScroll&&(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())}get containerClasses(){return{container:!0,close:!this.open,"with-scroll":this.open&&this.hasScroll}}get dialogClasses(){return{dialog:!0,[this.size]:!!this.size}}handleClose(){this.lockClose||(this.open=!1,this.dispatchEvent(new Event("ds-dialog:close",{bubbles:!0,composed:!0})))}connectedCallback(){super.connectedCallback(),window.addEventListener("keydown",this.handleKeyDown),this.resizeObserver=new ResizeObserver(this.debouncedCheckScroll),this.handleResizeObserver(),this.addEventListener("click",this.handleHostClick)}disconnectedCallback(){var e;super.disconnectedCallback(),window.removeEventListener("keydown",this.handleKeyDown),this.lockScroll&&(document.body.style.overflow=""),(e=this.resizeObserver)==null||e.disconnect(),this.removeEventListener("click",this.handleHostClick)}checkScroll(){var e,o;this.hasScroll=((e=this.content)==null?void 0:e.scrollHeight)>((o=this.content)==null?void 0:o.clientHeight)}render(){return!this.hasBeenOpened&&!this.open?i.nothing:i.html`
|
|
2
2
|
<style>
|
|
3
3
|
:host {
|
|
4
4
|
display: ${this.open?"flex":"none"};
|
|
@@ -7,8 +7,15 @@
|
|
|
7
7
|
|
|
8
8
|
<div class=${d.classMap(this.containerClasses)}>
|
|
9
9
|
<div class="overlay" @click=${this.handleClose}></div>
|
|
10
|
-
<dialog
|
|
11
|
-
|
|
10
|
+
<dialog
|
|
11
|
+
?open=${this.open}
|
|
12
|
+
data-testid="ds-dialog-container"
|
|
13
|
+
class=${d.classMap(this.dialogClasses)}
|
|
14
|
+
aria-modal="true"
|
|
15
|
+
aria-label=${this.dataAriaLabel||i.nothing}
|
|
16
|
+
aria-description=${this.dataAriaDescription||i.nothing}
|
|
17
|
+
>
|
|
18
|
+
${this.lockClose?i.nothing:i.html`<slot name="close-button" @click=${this.handleClose}></slot>`}
|
|
12
19
|
<div class="content-container">
|
|
13
20
|
<div tabindex="0" class="content ds-scroll">
|
|
14
21
|
<slot @slotchange=${this.handleResizeObserver}></slot>
|
|
@@ -17,4 +24,4 @@
|
|
|
17
24
|
</div>
|
|
18
25
|
</dialog>
|
|
19
26
|
</div>
|
|
20
|
-
`}};exports.DsDialog.styles=[
|
|
27
|
+
`}};exports.DsDialog.styles=[g.commonStyles];t([l.property({type:Boolean,converter:h.booleanConverter,attribute:"lock-close"})],exports.DsDialog.prototype,"lockClose",2);t([l.property({type:Boolean,converter:h.booleanConverter,attribute:"lock-scroll"})],exports.DsDialog.prototype,"lockScroll",2);t([l.property({type:Boolean,converter:h.booleanConverter})],exports.DsDialog.prototype,"open",2);t([l.property({type:String})],exports.DsDialog.prototype,"size",2);t([l.property({type:String,attribute:"data-aria-label"})],exports.DsDialog.prototype,"dataAriaLabel",2);t([l.property({type:String,attribute:"data-aria-description"})],exports.DsDialog.prototype,"dataAriaDescription",2);t([p.state()],exports.DsDialog.prototype,"hasBeenOpened",2);t([p.state()],exports.DsDialog.prototype,"hasScroll",2);t([b.query(".content")],exports.DsDialog.prototype,"content",2);exports.DsDialog=t([y.customUiKitElement("ds-dialog")],exports.DsDialog);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../../core/theme.constants.cjs"),p=require("../../decorators/customUiKitElement.cjs"),f=require("../../node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/decorators/provide.cjs"),y=require("../../utils/PubSub.cjs"),m=require("../../utils/booleanConverter.cjs");require("../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.cjs");const l=require("../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs"),v=require("../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.cjs"),h=require("../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.cjs"),u=require("../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.cjs"),$=require("../../styles/source/shared/fonts-config.cjs"),T=require("./themeContext.cjs");var b=Object.defineProperty,P=Object.getOwnPropertyDescriptor,d=(a,e,s,o)=>{for(var t=o>1?void 0:o?P(e,s):e,r=a.length-1,n;r>=0;r--)(n=a[r])&&(t=(o?n(e,s,t):n(t))||t);return o&&t&&b(e,s,t),t};exports.DsThemeProvider=class extends v.LitElement{constructor(){super(...arguments),this.loadFonts=!0,this.loadStyles=!0,this.cssLoaded=!1,this.loadedFonts=new Set}updated(e){super.updated(e),e.has("theme")&&(y.pubSub.publish("theme",this.theme),sessionStorage==null||sessionStorage.setItem(c.THEME_STORAGE_KEY,this.theme),typeof FontFace<"u"&&(document!=null&&document.fonts)&&this.loadThemeFonts(),this.loadThemeStyles().then(()=>{this.cssLoaded=!0,this.dispatchEvent(new CustomEvent("ui-kit:ready",{bubbles:!0,composed:!0}))}))}loadThemeFonts(){var e;(e=$.fontsConfig[this.theme])==null||e.fonts.forEach(s=>{this.loadThemeFont(s)})}async loadThemeFont({weight:e,name:s,file:o}){if(!this.loadFonts)return Promise.resolve();const t=`${s}-${e}`;if(this.loadedFonts.has(t))return;const r=new FontFace(s,`url('https://ds-assets.cupra.com/fonts/${this.theme}/${o}.woff2') format('woff2'),
|
|
2
2
|
url('https://ds-assets.cupra.com/fonts/${this.theme}/${o}.woff') format('woff'),
|
|
3
3
|
url('https://ds-assets.cupra.com/fonts/${this.theme}/${o}.ttf') format('truetype'),
|
|
4
|
-
url('https://ds-assets.cupra.com/fonts/${this.theme}/${o}.otf') format('opentype')`,{style:"normal",weight:e,display:"swap"});try{await r.load(),document.fonts.add(r),this.loadedFonts.add(t)}catch(n){console.error(`Error loading "${s}" font with "${e}" weight:`,n)}}loadThemeStyles(){return this.loadStyles?new Promise((e,s)=>{const o="/2.0.0-canary.
|
|
4
|
+
url('https://ds-assets.cupra.com/fonts/${this.theme}/${o}.otf') format('opentype')`,{style:"normal",weight:e,display:"swap"});try{await r.load(),document.fonts.add(r),this.loadedFonts.add(t)}catch(n){console.error(`Error loading "${s}" font with "${e}" weight:`,n)}}loadThemeStyles(){return this.loadStyles?new Promise((e,s)=>{const o="/2.0.0-canary.66",t=`https://ds-assets.cupra.com${o}/styles/${this.theme}/theme.css`;if(document.head.querySelector(`link[href="${t}"]`))e();else{const r=`ui-kit-theme-${o}`,n=document.getElementById(r),i=document.createElement("link");i.id=r,i.rel="stylesheet",i.href=t,i.onload=()=>e(),i.onerror=()=>s(new Error(`Failed to load theme CSS: ${t}`)),document.head.appendChild(i),n==null||n.remove()}}):Promise.resolve()}render(){return this.cssLoaded?l.html`<slot></slot>`:l.nothing}};d([h.property({type:Boolean,converter:m.booleanConverter,attribute:"load-fonts"})],exports.DsThemeProvider.prototype,"loadFonts",2);d([h.property({type:Boolean,converter:m.booleanConverter,attribute:"load-styles"})],exports.DsThemeProvider.prototype,"loadStyles",2);d([f.provide({context:T.themeContext}),h.property({type:String})],exports.DsThemeProvider.prototype,"theme",2);d([u.state()],exports.DsThemeProvider.prototype,"cssLoaded",2);d([u.state()],exports.DsThemeProvider.prototype,"loadedFonts",2);exports.DsThemeProvider=d([p.customUiKitElement("ds-theme-provider")],exports.DsThemeProvider);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../core/theme.constants.cjs"),l=require("./PubSub.cjs");class u{constructor(){this.icons={},this.handleChangeTheme=e=>{if(this.theme===e)return;this.theme=e;const n=Object.keys(this.icons);this.icons={},n.forEach(s=>this.fetchIcon(s))},this.fetchIcon=async(e,n={})=>{const s=typeof sessionStorage<"u"?sessionStorage==null?void 0:sessionStorage.getItem(r.THEME_STORAGE_KEY):null;!this.theme&&s&&(this.theme=s);const t=this.icons[e];if(t)return await t;const i=this.loadIcon(e,n).catch(a=>{throw delete this.icons[e],a});return this.icons[e]=i,i},this.loadIcon=(e,{cache:n="force-cache",...s})=>!this.theme||typeof fetch>"u"?Promise.resolve('<svg class="ds-icon"></svg>'):fetch(`https://ds-assets.cupra.com/icons/${this.theme}/${e}.svg`,{cache:n,...s}).then(t=>t.text()).catch(t=>{if((t==null?void 0:t.name)==="AbortError")throw t;return console.error(`Failed to fetch icon "${e}":`,t),""}),l.pubSub.subscribe("theme",this.handleChangeTheme)}}const o=Symbol.for("@cupra/ui-kit/icons-manager/2.0.0-canary.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../core/theme.constants.cjs"),l=require("./PubSub.cjs");class u{constructor(){this.icons={},this.handleChangeTheme=e=>{if(this.theme===e)return;this.theme=e;const n=Object.keys(this.icons);this.icons={},n.forEach(s=>this.fetchIcon(s))},this.fetchIcon=async(e,n={})=>{const s=typeof sessionStorage<"u"?sessionStorage==null?void 0:sessionStorage.getItem(r.THEME_STORAGE_KEY):null;!this.theme&&s&&(this.theme=s);const t=this.icons[e];if(t)return await t;const i=this.loadIcon(e,n).catch(a=>{throw delete this.icons[e],a});return this.icons[e]=i,i},this.loadIcon=(e,{cache:n="force-cache",...s})=>!this.theme||typeof fetch>"u"?Promise.resolve('<svg class="ds-icon"></svg>'):fetch(`https://ds-assets.cupra.com/icons/${this.theme}/${e}.svg`,{cache:n,...s}).then(t=>t.text()).catch(t=>{if((t==null?void 0:t.name)==="AbortError")throw t;return console.error(`Failed to fetch icon "${e}":`,t),""}),l.pubSub.subscribe("theme",this.handleChangeTheme)}}const o=Symbol.for("@cupra/ui-kit/icons-manager/2.0.0-canary.66"),h=globalThis;let c=h[o];c||(c=new u,Object.defineProperty(h,o,{value:c,writable:!1,configurable:!1,enumerable:!1}));const f=c;exports.iconsManager=f;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class u{constructor(){this.subscribers={},this.lastPublishedData={}}subscribe(s,r){return this.subscribers[s]||(this.subscribers[s]=[]),this.subscribers[s].push(r),this.lastPublishedData[s]}unsubscribe(s,r){this.subscribers[s]&&(this.subscribers[s]=this.subscribers[s].filter(i=>i!==r))}publish(s,r){this.lastPublishedData[s]=r,this.subscribers[s]&&this.subscribers[s].forEach(i=>{try{i(r)}catch(c){console.error(`Error in subscriber for event "${s}":`,c)}})}}const t=Symbol.for("@cupra/ui-kit/pubsub/2.0.0-canary.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class u{constructor(){this.subscribers={},this.lastPublishedData={}}subscribe(s,r){return this.subscribers[s]||(this.subscribers[s]=[]),this.subscribers[s].push(r),this.lastPublishedData[s]}unsubscribe(s,r){this.subscribers[s]&&(this.subscribers[s]=this.subscribers[s].filter(i=>i!==r))}publish(s,r){this.lastPublishedData[s]=r,this.subscribers[s]&&this.subscribers[s].forEach(i=>{try{i(r)}catch(c){console.error(`Error in subscriber for event "${s}":`,c)}})}}const t=Symbol.for("@cupra/ui-kit/pubsub/2.0.0-canary.66"),e=globalThis;let b=e[t];b||(b=new u,Object.defineProperty(e,t,{value:b,writable:!1,configurable:!1,enumerable:!1}));const l=b;exports.PubSub=u;exports.pubSub=l;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../concurrencyLimit.cjs"),a=o.concurrencyLimit(20);class s{constructor(){this.stylePromises=new Map,this.getStyles=async({componentName:e,theme:t})=>{if(!t||!e)return;const c=`https://ds-assets.cupra.com/2.0.0-canary.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../concurrencyLimit.cjs"),a=o.concurrencyLimit(20);class s{constructor(){this.stylePromises=new Map,this.getStyles=async({componentName:e,theme:t})=>{if(!t||!e)return;const c=`https://ds-assets.cupra.com/2.0.0-canary.66/styles/${t}/components/${e}.css`,r=this.getCachedStyleSheetPromise({url:c});if(r)return r;const i=a(()=>this.fetchStyle({url:c})).then(n=>(n||this.stylePromises.delete(c),n));return this.stylePromises.set(c,i),this.stylePromises.get(c)}}async fetchStyle({url:e}){try{if(typeof fetch>"u")return;const t=await fetch(e,{cache:"force-cache"});if(t.ok)return t.text()}catch(t){console.error(`Failed to fetch Style Sheet "${e}":`,t)}}getCachedStyleSheetPromise({url:e}){return this.stylePromises.get(e)}static getInstance(){return s.instance||(s.instance=new s),s.instance}}const h=s.getInstance();exports.stylesRegistry=h;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.cjs");require("../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs");require("../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.cjs");const e=require("../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.cjs");function i(r,...t){const s=String.raw({raw:r},...t).replace(/(--private-[\w-]+)(?=\s*[):,])/g,"$1-v2-0-0-canary-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.cjs");require("../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs");require("../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.cjs");const e=require("../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.cjs");function i(r,...t){const s=String.raw({raw:r},...t).replace(/(--private-[\w-]+)(?=\s*[):,])/g,"$1-v2-0-0-canary-66"),n=e.unsafeCSS(s);return e.css`${n}`}exports.cssWithTokens=i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.cjs");const i=require("../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs");require("../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.cjs");const o=require("../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/unsafe-html.cjs");function a(e,...t){const r=String.raw({raw:e},...t).replace(/(--private-[\w-]+)(?=\s*[):,])/g,"$1-v2-0-0-canary-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.cjs");const i=require("../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs");require("../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.cjs");const o=require("../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/unsafe-html.cjs");function a(e,...t){const r=String.raw({raw:e},...t).replace(/(--private-[\w-]+)(?=\s*[):,])/g,"$1-v2-0-0-canary-66"),n=o.unsafeHTML(r);return i.html`${n}`}exports.htmlWithTokens=a;
|
|
@@ -1,23 +1,25 @@
|
|
|
1
1
|
import { UiKitElement as v } from "../base/UiKitElement.js";
|
|
2
|
-
import { customUiKitElement as
|
|
3
|
-
import { booleanConverter as
|
|
2
|
+
import { customUiKitElement as b } from "../../decorators/customUiKitElement.js";
|
|
3
|
+
import { booleanConverter as d } from "../../utils/booleanConverter.js";
|
|
4
4
|
import { debounce as y } from "../../utils/debounce.js";
|
|
5
5
|
import "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
|
|
6
|
-
import { nothing as
|
|
6
|
+
import { nothing as n, html as p } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
|
|
7
7
|
import "../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
8
|
-
import { property as
|
|
8
|
+
import { property as r } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";
|
|
9
9
|
import { state as u } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.js";
|
|
10
|
-
import { query as
|
|
10
|
+
import { query as f } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query.js";
|
|
11
11
|
import { classMap as m } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js";
|
|
12
|
-
import { commonStyles as
|
|
13
|
-
var
|
|
14
|
-
for (var i = l > 1 ? void 0 : l ? w(o,
|
|
15
|
-
(
|
|
16
|
-
return l && i &&
|
|
12
|
+
import { commonStyles as k } from "./styles/common.styles.js";
|
|
13
|
+
var C = Object.defineProperty, w = Object.getOwnPropertyDescriptor, s = (e, o, a, l) => {
|
|
14
|
+
for (var i = l > 1 ? void 0 : l ? w(o, a) : o, c = e.length - 1, h; c >= 0; c--)
|
|
15
|
+
(h = e[c]) && (i = (l ? h(o, a, i) : h(i)) || i);
|
|
16
|
+
return l && i && C(o, a, i), i;
|
|
17
17
|
};
|
|
18
18
|
let t = class extends v {
|
|
19
19
|
constructor() {
|
|
20
|
-
super(...arguments), this.lockClose = !1, this.lockScroll = !0, this.open = !1, this.size = "medium", this.hasBeenOpened = !1, this.hasScroll = !1, this.debouncedCheckScroll = y({ func: () => this.checkScroll() }), this.
|
|
20
|
+
super(...arguments), this.lockClose = !1, this.lockScroll = !0, this.open = !1, this.size = "medium", this.hasBeenOpened = !1, this.hasScroll = !1, this.debouncedCheckScroll = y({ func: () => this.checkScroll() }), this.handleHostClick = (e) => {
|
|
21
|
+
e.stopPropagation();
|
|
22
|
+
}, this.handleKeyDown = (e) => {
|
|
21
23
|
this.open && e.key === "Escape" && this.handleClose();
|
|
22
24
|
};
|
|
23
25
|
}
|
|
@@ -50,18 +52,18 @@ let t = class extends v {
|
|
|
50
52
|
));
|
|
51
53
|
}
|
|
52
54
|
connectedCallback() {
|
|
53
|
-
super.connectedCallback(), window.addEventListener("keydown", this.handleKeyDown), this.resizeObserver = new ResizeObserver(this.debouncedCheckScroll), this.handleResizeObserver();
|
|
55
|
+
super.connectedCallback(), window.addEventListener("keydown", this.handleKeyDown), this.resizeObserver = new ResizeObserver(this.debouncedCheckScroll), this.handleResizeObserver(), this.addEventListener("click", this.handleHostClick);
|
|
54
56
|
}
|
|
55
57
|
disconnectedCallback() {
|
|
56
58
|
var e;
|
|
57
|
-
super.disconnectedCallback(), window.removeEventListener("keydown", this.handleKeyDown), this.lockScroll && (document.body.style.overflow = ""), (e = this.resizeObserver) == null || e.disconnect();
|
|
59
|
+
super.disconnectedCallback(), window.removeEventListener("keydown", this.handleKeyDown), this.lockScroll && (document.body.style.overflow = ""), (e = this.resizeObserver) == null || e.disconnect(), this.removeEventListener("click", this.handleHostClick);
|
|
58
60
|
}
|
|
59
61
|
checkScroll() {
|
|
60
62
|
var e, o;
|
|
61
63
|
this.hasScroll = ((e = this.content) == null ? void 0 : e.scrollHeight) > ((o = this.content) == null ? void 0 : o.clientHeight);
|
|
62
64
|
}
|
|
63
65
|
render() {
|
|
64
|
-
return !this.hasBeenOpened && !this.open ?
|
|
66
|
+
return !this.hasBeenOpened && !this.open ? n : p`
|
|
65
67
|
<style>
|
|
66
68
|
:host {
|
|
67
69
|
display: ${this.open ? "flex" : "none"};
|
|
@@ -70,8 +72,15 @@ let t = class extends v {
|
|
|
70
72
|
|
|
71
73
|
<div class=${m(this.containerClasses)}>
|
|
72
74
|
<div class="overlay" @click=${this.handleClose}></div>
|
|
73
|
-
<dialog
|
|
74
|
-
|
|
75
|
+
<dialog
|
|
76
|
+
?open=${this.open}
|
|
77
|
+
data-testid="ds-dialog-container"
|
|
78
|
+
class=${m(this.dialogClasses)}
|
|
79
|
+
aria-modal="true"
|
|
80
|
+
aria-label=${this.dataAriaLabel || n}
|
|
81
|
+
aria-description=${this.dataAriaDescription || n}
|
|
82
|
+
>
|
|
83
|
+
${this.lockClose ? n : p`<slot name="close-button" @click=${this.handleClose}></slot>`}
|
|
75
84
|
<div class="content-container">
|
|
76
85
|
<div tabindex="0" class="content ds-scroll">
|
|
77
86
|
<slot @slotchange=${this.handleResizeObserver}></slot>
|
|
@@ -83,19 +92,25 @@ let t = class extends v {
|
|
|
83
92
|
`;
|
|
84
93
|
}
|
|
85
94
|
};
|
|
86
|
-
t.styles = [
|
|
95
|
+
t.styles = [k];
|
|
87
96
|
s([
|
|
88
|
-
|
|
97
|
+
r({ type: Boolean, converter: d, attribute: "lock-close" })
|
|
89
98
|
], t.prototype, "lockClose", 2);
|
|
90
99
|
s([
|
|
91
|
-
|
|
100
|
+
r({ type: Boolean, converter: d, attribute: "lock-scroll" })
|
|
92
101
|
], t.prototype, "lockScroll", 2);
|
|
93
102
|
s([
|
|
94
|
-
|
|
103
|
+
r({ type: Boolean, converter: d })
|
|
95
104
|
], t.prototype, "open", 2);
|
|
96
105
|
s([
|
|
97
|
-
|
|
106
|
+
r({ type: String })
|
|
98
107
|
], t.prototype, "size", 2);
|
|
108
|
+
s([
|
|
109
|
+
r({ type: String, attribute: "data-aria-label" })
|
|
110
|
+
], t.prototype, "dataAriaLabel", 2);
|
|
111
|
+
s([
|
|
112
|
+
r({ type: String, attribute: "data-aria-description" })
|
|
113
|
+
], t.prototype, "dataAriaDescription", 2);
|
|
99
114
|
s([
|
|
100
115
|
u()
|
|
101
116
|
], t.prototype, "hasBeenOpened", 2);
|
|
@@ -103,10 +118,10 @@ s([
|
|
|
103
118
|
u()
|
|
104
119
|
], t.prototype, "hasScroll", 2);
|
|
105
120
|
s([
|
|
106
|
-
|
|
121
|
+
f(".content")
|
|
107
122
|
], t.prototype, "content", 2);
|
|
108
123
|
t = s([
|
|
109
|
-
|
|
124
|
+
b("ds-dialog")
|
|
110
125
|
], t);
|
|
111
126
|
export {
|
|
112
127
|
t as DsDialog
|
|
@@ -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 = "/2.0.0-canary.
|
|
57
|
+
const s = "/2.0.0-canary.66", 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");
|
|
@@ -25,7 +25,7 @@ class l {
|
|
|
25
25
|
}), f.subscribe("theme", this.handleChangeTheme);
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
const c = Symbol.for("@cupra/ui-kit/icons-manager/2.0.0-canary.
|
|
28
|
+
const c = Symbol.for("@cupra/ui-kit/icons-manager/2.0.0-canary.66"), h = globalThis;
|
|
29
29
|
let i = h[c];
|
|
30
30
|
i || (i = new l(), Object.defineProperty(h, c, {
|
|
31
31
|
value: i,
|
|
@@ -18,7 +18,7 @@ class e {
|
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
const u = Symbol.for("@cupra/ui-kit/pubsub/2.0.0-canary.
|
|
21
|
+
const u = Symbol.for("@cupra/ui-kit/pubsub/2.0.0-canary.66"), t = globalThis;
|
|
22
22
|
let b = t[u];
|
|
23
23
|
b || (b = new e(), Object.defineProperty(t, u, {
|
|
24
24
|
value: b,
|
|
@@ -7,7 +7,7 @@ class s {
|
|
|
7
7
|
theme: t
|
|
8
8
|
}) => {
|
|
9
9
|
if (!t || !e) return;
|
|
10
|
-
const c = `https://ds-assets.cupra.com/2.0.0-canary.
|
|
10
|
+
const c = `https://ds-assets.cupra.com/2.0.0-canary.66/styles/${t}/components/${e}.css`, r = this.getCachedStyleSheetPromise({ url: c });
|
|
11
11
|
if (r) return r;
|
|
12
12
|
const i = h(() => this.fetchStyle({ url: c })).then((n) => (n || this.stylePromises.delete(c), n));
|
|
13
13
|
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-v2-0-0-canary-
|
|
6
|
+
const e = String.raw({ raw: t }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v2-0-0-canary-66"), 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-v2-0-0-canary-
|
|
6
|
+
const o = String.raw({ raw: t }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v2-0-0-canary-66"), e = i(o);
|
|
7
7
|
return n`${e}`;
|
|
8
8
|
}
|
|
9
9
|
export {
|
|
@@ -9,6 +9,8 @@ export declare class DsDialog extends UiKitElement {
|
|
|
9
9
|
lockScroll: DsDialogAttrs['lock-scroll'];
|
|
10
10
|
open: DsDialogAttrs['open'];
|
|
11
11
|
size: DsDialogAttrs['size'];
|
|
12
|
+
dataAriaLabel: DsDialogAttrs['data-aria-label'];
|
|
13
|
+
dataAriaDescription: DsDialogAttrs['data-aria-description'];
|
|
12
14
|
hasBeenOpened: boolean;
|
|
13
15
|
hasScroll: boolean;
|
|
14
16
|
protected content: HTMLInputElement;
|
|
@@ -21,6 +23,7 @@ export declare class DsDialog extends UiKitElement {
|
|
|
21
23
|
private handleClose;
|
|
22
24
|
connectedCallback(): void;
|
|
23
25
|
disconnectedCallback(): void;
|
|
26
|
+
private handleHostClick;
|
|
24
27
|
private handleKeyDown;
|
|
25
28
|
private checkScroll;
|
|
26
29
|
render(): typeof nothing | import("lit").TemplateResult<1>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cupra/ui-kit",
|
|
3
|
-
"version": "2.0.0-canary.
|
|
3
|
+
"version": "2.0.0-canary.66",
|
|
4
4
|
"description": "Web components library",
|
|
5
5
|
"author": "SEAT S.A.",
|
|
6
6
|
"license": "SEAT S.A. Library EULA 1.0",
|
|
@@ -159,6 +159,9 @@
|
|
|
159
159
|
"storybook:cupra-diagonal": "VITE_DS_CDN_URL=./assets pnpm build-cdn --mode development && pnpm build-assets && storybook dev --config-dir .storybook/themes/cupra-diagonal -p 6006 --ci -- --force",
|
|
160
160
|
"storybook:watch:cupra-diagonal": "nodemon --exec \"VITE_DS_CDN_URL=./assets pnpm build-cdn --mode development && pnpm build-assets && storybook dev --config-dir .storybook/themes/cupra-diagonal -p 6006 --ci -- --force\"",
|
|
161
161
|
"build-storybook:cupra-diagonal": "pnpm build-cdn && pnpm build-assets && storybook build --config-dir .storybook/themes/cupra-diagonal --output-dir dist-storybook/cupra-diagonal",
|
|
162
|
+
"storybook:seat": "VITE_DS_CDN_URL=./assets pnpm build-cdn --mode development && pnpm build-assets && storybook dev --config-dir .storybook/themes/seat -p 6006 --ci -- --force",
|
|
163
|
+
"storybook:watch:seat": "nodemon --exec \"VITE_DS_CDN_URL=./assets pnpm build-cdn --mode development && pnpm build-assets && storybook dev --config-dir .storybook/themes/seat -p 6006 --ci -- --force\"",
|
|
164
|
+
"build-storybook:seat": "pnpm build-cdn && pnpm build-assets && storybook build --config-dir .storybook/themes/seat --output-dir dist-storybook/seat",
|
|
162
165
|
"build:tokens": "node style-dictionary.config.js && biome format --write src/styles/generated-tokens-css/",
|
|
163
166
|
"process-icons": "node scripts/process-icons/process-icons.js && git add .",
|
|
164
167
|
"process-docs": "node scripts/process-docs/process-docs.js",
|