@cupra/ui-kit 2.0.0-canary.59 → 2.0.0-canary.61
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 +5 -5
- package/dist/cjs/components/ds-dialog-fullscreen/ds-dialog-fullscreen.cjs +3 -3
- package/dist/cjs/components/ds-navigation-controls/styles/common.styles.cjs +6 -0
- 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 +40 -37
- package/dist/esm/components/ds-dialog-fullscreen/ds-dialog-fullscreen.js +21 -18
- package/dist/esm/components/ds-navigation-controls/styles/common.styles.js +8 -2
- 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 +1 -0
- package/dist/types/components/ds-dialog/ds-dialog.test.d.ts +7 -0
- package/dist/types/components/ds-dialog/ds-dialog.types.d.ts +1 -0
- package/dist/types/components/ds-dialog-fullscreen/ds-dialog-fullscreen.d.ts +1 -0
- package/dist-react/cjs/components/ds-dialog/ds-dialog.cjs +5 -5
- package/dist-react/cjs/components/ds-dialog-fullscreen/ds-dialog-fullscreen.cjs +3 -3
- package/dist-react/cjs/components/ds-navigation-controls/styles/common.styles.cjs +6 -0
- 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 +40 -37
- package/dist-react/esm/components/ds-dialog-fullscreen/ds-dialog-fullscreen.js +21 -18
- package/dist-react/esm/components/ds-navigation-controls/styles/common.styles.js +8 -2
- 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 +1 -0
- package/dist-react/types/components/ds-dialog/ds-dialog.test.d.ts +7 -0
- package/dist-react/types/components/ds-dialog/ds-dialog.types.d.ts +1 -0
- package/dist-react/types/components/ds-dialog-fullscreen/ds-dialog-fullscreen.d.ts +1 -0
- package/package.json +2 -2
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../base/UiKitElement.cjs"),v=require("../../decorators/customUiKitElement.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../base/UiKitElement.cjs"),v=require("../../decorators/customUiKitElement.cjs"),h=require("../../utils/booleanConverter.cjs"),y=require("../../utils/debounce.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");require("../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.cjs");const n=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"),D=require("./styles/common.styles.cjs");var g=Object.defineProperty,m=Object.getOwnPropertyDescriptor,t=(r,e,o,i)=>{for(var s=i>1?void 0:i?m(e,o):e,c=r.length-1,a;c>=0;c--)(a=r[c])&&(s=(i?a(e,o,s):a(s))||s);return i&&s&&g(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=y.debounce({func:()=>this.checkScroll()}),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()}disconnectedCallback(){var e;super.disconnectedCallback(),window.removeEventListener("keydown",this.handleKeyDown),this.lockScroll&&(document.body.style.overflow=""),(e=this.resizeObserver)==null||e.disconnect()}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?l.nothing:l.html`
|
|
2
2
|
<style>
|
|
3
3
|
:host {
|
|
4
4
|
display: ${this.open?"flex":"none"};
|
|
5
5
|
}
|
|
6
6
|
</style>
|
|
7
7
|
|
|
8
|
-
<div class=${
|
|
8
|
+
<div class=${d.classMap(this.containerClasses)}>
|
|
9
9
|
<div class="overlay" @click=${this.handleClose}></div>
|
|
10
|
-
<dialog ?open=${this.open} data-testid="ds-dialog-container" class=${
|
|
11
|
-
|
|
10
|
+
<dialog ?open=${this.open} data-testid="ds-dialog-container" class=${d.classMap(this.dialogClasses)}>
|
|
11
|
+
${this.lockClose?l.nothing:l.html`<slot name="close-button" @click=${this.handleClose}></slot>`}
|
|
12
12
|
<div class="content-container">
|
|
13
13
|
<div tabindex="0" class="content ds-scroll">
|
|
14
14
|
<slot @slotchange=${this.handleResizeObserver}></slot>
|
|
@@ -17,4 +17,4 @@
|
|
|
17
17
|
</div>
|
|
18
18
|
</dialog>
|
|
19
19
|
</div>
|
|
20
|
-
`}};exports.DsDialog.styles=[D.commonStyles];t([
|
|
20
|
+
`}};exports.DsDialog.styles=[D.commonStyles];t([n.property({type:Boolean,converter:h.booleanConverter,attribute:"lock-close"})],exports.DsDialog.prototype,"lockClose",2);t([n.property({type:Boolean,converter:h.booleanConverter,attribute:"lock-scroll"})],exports.DsDialog.prototype,"lockScroll",2);t([n.property({type:Boolean,converter:h.booleanConverter})],exports.DsDialog.prototype,"open",2);t([n.property({type:String})],exports.DsDialog.prototype,"size",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([v.customUiKitElement("ds-dialog")],exports.DsDialog);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("../base/UiKitElement.cjs"),p=require("../../decorators/customUiKitElement.cjs"),a=require("../../utils/booleanConverter.cjs"),y=require("../../utils/debounce.cjs");require("../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.cjs");const n=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 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"),b=require("../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query.cjs"),v=require("../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.cjs"),f=require("./styles/common.styles.cjs");var m=Object.defineProperty,D=Object.getOwnPropertyDescriptor,o=(r,e,s,l)=>{for(var t=l>1?void 0:l?D(e,s):e,i=r.length-1,c;i>=0;i--)(c=r[i])&&(t=(l?c(e,s,t):c(t))||t);return l&&t&&m(e,s,t),t};exports.DsDialogFullscreen=class extends d.UiKitElement{constructor(){super(...arguments),this.lockClose=!1,this.lockScroll=!0,this.open=!1,this.hasBeenOpened=!1,this.hasScroll=!1,this.debouncedCheckScroll=y.debounce({func:()=>this.checkScroll()}),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.getElementById("storybook-root")||(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-fullscreen":!0,close:!this.open,"with-scroll":this.open&&this.hasScroll}}handleClose(){this.lockClose||(this.open=!1,this.dispatchEvent(new Event("ds-dialog-fullscreen:close",{bubbles:!0,composed:!0})))}connectedCallback(){super.connectedCallback(),window.addEventListener("keydown",this.handleKeyDown),this.resizeObserver=new ResizeObserver(this.debouncedCheckScroll),this.handleResizeObserver()}disconnectedCallback(){var e;super.disconnectedCallback(),window.removeEventListener("keydown",this.handleKeyDown),this.lockScroll&&(document.getElementById("storybook-root")||(document.body.style.overflow="")),(e=this.resizeObserver)==null||e.disconnect()}checkScroll(){var e,s;this.hasScroll=((e=this.content)==null?void 0:e.scrollHeight)>((s=this.content)==null?void 0:s.clientHeight)}render(){return!this.hasBeenOpened&&!this.open?n.nothing:n.html`
|
|
2
2
|
<style>
|
|
3
3
|
:host {
|
|
4
4
|
display: ${this.open?"flex":"none"};
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
|
|
8
8
|
<div class=${v.classMap(this.containerClasses)}>
|
|
9
9
|
<dialog ?open=${this.open} data-testid="ds-dialog-fullscreen-container" class="dialog-fullscreen">
|
|
10
|
-
|
|
10
|
+
${this.lockClose?n.nothing:n.html`<slot name="close-button" @click=${this.handleClose}></slot>`}
|
|
11
11
|
<div class="content-container-fullscreen">
|
|
12
12
|
<div tabindex="0" class="content-fullscreen ds-scroll">
|
|
13
13
|
<slot @slotchange=${this.handleResizeObserver}></slot>
|
|
14
14
|
</div>
|
|
15
15
|
</dialog>
|
|
16
16
|
</div>
|
|
17
|
-
`}};exports.DsDialogFullscreen.styles=[f.commonStyles];o([h.property({type:Boolean,converter:a.booleanConverter,attribute:"lock-scroll"})],exports.DsDialogFullscreen.prototype,"lockScroll",2);o([h.property({type:Boolean,converter:a.booleanConverter})],exports.DsDialogFullscreen.prototype,"open",2);o([
|
|
17
|
+
`}};exports.DsDialogFullscreen.styles=[f.commonStyles];o([h.property({type:Boolean,converter:a.booleanConverter,attribute:"lock-close"})],exports.DsDialogFullscreen.prototype,"lockClose",2);o([h.property({type:Boolean,converter:a.booleanConverter,attribute:"lock-scroll"})],exports.DsDialogFullscreen.prototype,"lockScroll",2);o([h.property({type:Boolean,converter:a.booleanConverter})],exports.DsDialogFullscreen.prototype,"open",2);o([u.state()],exports.DsDialogFullscreen.prototype,"hasBeenOpened",2);o([u.state()],exports.DsDialogFullscreen.prototype,"hasScroll",2);o([b.query(".content")],exports.DsDialogFullscreen.prototype,"content",2);exports.DsDialogFullscreen=o([p.customUiKitElement("ds-dialog-fullscreen")],exports.DsDialogFullscreen);
|
|
@@ -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.61",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.61"),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.61"),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"});class s{constructor(){this.stylePromises=new Map,this.getStyles=async({componentName:e,theme:t})=>{if(!t||!e)return;const r=`https://ds-assets.cupra.com/2.0.0-canary.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class s{constructor(){this.stylePromises=new Map,this.getStyles=async({componentName:e,theme:t})=>{if(!t||!e)return;const r=`https://ds-assets.cupra.com/2.0.0-canary.61/styles/${t}/components/${e}.css`,c=this.getCachedStyleSheetPromise({url:r});if(c)return c;const i=this.fetchStyle({url:r}).then(n=>(n||this.stylePromises.delete(r),n));return this.stylePromises.set(r,i),this.stylePromises.get(r)}}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 o=s.getInstance();exports.stylesRegistry=o;
|
|
@@ -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-61"),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-61"),n=o.unsafeHTML(r);return i.html`${n}`}exports.htmlWithTokens=a;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { UiKitElement as
|
|
2
|
-
import { customUiKitElement as
|
|
3
|
-
import { booleanConverter as
|
|
4
|
-
import { debounce as
|
|
1
|
+
import { UiKitElement as v } from "../base/UiKitElement.js";
|
|
2
|
+
import { customUiKitElement as f } from "../../decorators/customUiKitElement.js";
|
|
3
|
+
import { booleanConverter as h } from "../../utils/booleanConverter.js";
|
|
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 d, 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
|
|
9
|
-
import { state as
|
|
8
|
+
import { property as n } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";
|
|
9
|
+
import { state as u } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.js";
|
|
10
10
|
import { query as b } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query.js";
|
|
11
|
-
import { classMap as
|
|
12
|
-
import { commonStyles as
|
|
13
|
-
var
|
|
14
|
-
for (var
|
|
15
|
-
(a = e[
|
|
16
|
-
return
|
|
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 C } from "./styles/common.styles.js";
|
|
13
|
+
var k = Object.defineProperty, w = Object.getOwnPropertyDescriptor, s = (e, o, r, l) => {
|
|
14
|
+
for (var i = l > 1 ? void 0 : l ? w(o, r) : o, c = e.length - 1, a; c >= 0; c--)
|
|
15
|
+
(a = e[c]) && (i = (l ? a(o, r, i) : a(i)) || i);
|
|
16
|
+
return l && i && k(o, r, i), i;
|
|
17
17
|
};
|
|
18
|
-
let t = class extends
|
|
18
|
+
let t = class extends v {
|
|
19
19
|
constructor() {
|
|
20
|
-
super(...arguments), this.lockScroll = !0, this.open = !1, this.size = "medium", this.hasBeenOpened = !1, this.hasScroll = !1, this.debouncedCheckScroll =
|
|
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.handleKeyDown = (e) => {
|
|
21
21
|
this.open && e.key === "Escape" && this.handleClose();
|
|
22
22
|
};
|
|
23
23
|
}
|
|
@@ -42,12 +42,12 @@ let t = class extends m {
|
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
44
|
handleClose() {
|
|
45
|
-
this.open = !1, this.dispatchEvent(
|
|
45
|
+
this.lockClose || (this.open = !1, this.dispatchEvent(
|
|
46
46
|
new Event("ds-dialog:close", {
|
|
47
47
|
bubbles: !0,
|
|
48
48
|
composed: !0
|
|
49
49
|
})
|
|
50
|
-
);
|
|
50
|
+
));
|
|
51
51
|
}
|
|
52
52
|
connectedCallback() {
|
|
53
53
|
super.connectedCallback(), window.addEventListener("keydown", this.handleKeyDown), this.resizeObserver = new ResizeObserver(this.debouncedCheckScroll), this.handleResizeObserver();
|
|
@@ -57,21 +57,21 @@ let t = class extends m {
|
|
|
57
57
|
super.disconnectedCallback(), window.removeEventListener("keydown", this.handleKeyDown), this.lockScroll && (document.body.style.overflow = ""), (e = this.resizeObserver) == null || e.disconnect();
|
|
58
58
|
}
|
|
59
59
|
checkScroll() {
|
|
60
|
-
var e,
|
|
61
|
-
this.hasScroll = ((e = this.content) == null ? void 0 : e.scrollHeight) > ((
|
|
60
|
+
var e, o;
|
|
61
|
+
this.hasScroll = ((e = this.content) == null ? void 0 : e.scrollHeight) > ((o = this.content) == null ? void 0 : o.clientHeight);
|
|
62
62
|
}
|
|
63
63
|
render() {
|
|
64
|
-
return !this.hasBeenOpened && !this.open ?
|
|
64
|
+
return !this.hasBeenOpened && !this.open ? d : p`
|
|
65
65
|
<style>
|
|
66
66
|
:host {
|
|
67
67
|
display: ${this.open ? "flex" : "none"};
|
|
68
68
|
}
|
|
69
69
|
</style>
|
|
70
70
|
|
|
71
|
-
<div class=${
|
|
71
|
+
<div class=${m(this.containerClasses)}>
|
|
72
72
|
<div class="overlay" @click=${this.handleClose}></div>
|
|
73
|
-
<dialog ?open=${this.open} data-testid="ds-dialog-container" class=${
|
|
74
|
-
|
|
73
|
+
<dialog ?open=${this.open} data-testid="ds-dialog-container" class=${m(this.dialogClasses)}>
|
|
74
|
+
${this.lockClose ? d : p`<slot name="close-button" @click=${this.handleClose}></slot>`}
|
|
75
75
|
<div class="content-container">
|
|
76
76
|
<div tabindex="0" class="content ds-scroll">
|
|
77
77
|
<slot @slotchange=${this.handleResizeObserver}></slot>
|
|
@@ -83,27 +83,30 @@ let t = class extends m {
|
|
|
83
83
|
`;
|
|
84
84
|
}
|
|
85
85
|
};
|
|
86
|
-
t.styles = [
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
t.styles = [C];
|
|
87
|
+
s([
|
|
88
|
+
n({ type: Boolean, converter: h, attribute: "lock-close" })
|
|
89
|
+
], t.prototype, "lockClose", 2);
|
|
90
|
+
s([
|
|
91
|
+
n({ type: Boolean, converter: h, attribute: "lock-scroll" })
|
|
89
92
|
], t.prototype, "lockScroll", 2);
|
|
90
|
-
|
|
91
|
-
|
|
93
|
+
s([
|
|
94
|
+
n({ type: Boolean, converter: h })
|
|
92
95
|
], t.prototype, "open", 2);
|
|
93
|
-
|
|
94
|
-
|
|
96
|
+
s([
|
|
97
|
+
n({ type: String })
|
|
95
98
|
], t.prototype, "size", 2);
|
|
96
|
-
|
|
97
|
-
|
|
99
|
+
s([
|
|
100
|
+
u()
|
|
98
101
|
], t.prototype, "hasBeenOpened", 2);
|
|
99
|
-
|
|
100
|
-
|
|
102
|
+
s([
|
|
103
|
+
u()
|
|
101
104
|
], t.prototype, "hasScroll", 2);
|
|
102
|
-
|
|
105
|
+
s([
|
|
103
106
|
b(".content")
|
|
104
107
|
], t.prototype, "content", 2);
|
|
105
|
-
t =
|
|
106
|
-
|
|
108
|
+
t = s([
|
|
109
|
+
f("ds-dialog")
|
|
107
110
|
], t);
|
|
108
111
|
export {
|
|
109
112
|
t as DsDialog
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { UiKitElement as
|
|
1
|
+
import { UiKitElement as f } from "../base/UiKitElement.js";
|
|
2
2
|
import { customUiKitElement as m } from "../../decorators/customUiKitElement.js";
|
|
3
3
|
import { booleanConverter as a } from "../../utils/booleanConverter.js";
|
|
4
|
-
import { debounce as
|
|
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 d, 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
8
|
import { property as h } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";
|
|
9
|
-
import { state as
|
|
10
|
-
import { query as
|
|
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 b } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query.js";
|
|
11
11
|
import { classMap as v } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js";
|
|
12
12
|
import { commonStyles as k } from "./styles/common.styles.js";
|
|
13
|
-
var w = Object.defineProperty,
|
|
14
|
-
for (var s =
|
|
15
|
-
(c = e[i]) && (s = (
|
|
16
|
-
return
|
|
13
|
+
var w = Object.defineProperty, C = Object.getOwnPropertyDescriptor, n = (e, t, r, l) => {
|
|
14
|
+
for (var s = l > 1 ? void 0 : l ? C(t, r) : t, i = e.length - 1, c; i >= 0; i--)
|
|
15
|
+
(c = e[i]) && (s = (l ? c(t, r, s) : c(s)) || s);
|
|
16
|
+
return l && s && w(t, r, s), s;
|
|
17
17
|
};
|
|
18
|
-
let o = class extends
|
|
18
|
+
let o = class extends f {
|
|
19
19
|
constructor() {
|
|
20
|
-
super(...arguments), this.lockScroll = !0, this.open = !1, this.hasBeenOpened = !1, this.hasScroll = !1, this.debouncedCheckScroll =
|
|
20
|
+
super(...arguments), this.lockClose = !1, this.lockScroll = !0, this.open = !1, this.hasBeenOpened = !1, this.hasScroll = !1, this.debouncedCheckScroll = y({ func: () => this.checkScroll() }), this.handleKeyDown = (e) => {
|
|
21
21
|
this.open && e.key === "Escape" && this.handleClose();
|
|
22
22
|
};
|
|
23
23
|
}
|
|
@@ -36,12 +36,12 @@ let o = class extends p {
|
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
38
|
handleClose() {
|
|
39
|
-
this.open = !1, this.dispatchEvent(
|
|
39
|
+
this.lockClose || (this.open = !1, this.dispatchEvent(
|
|
40
40
|
new Event("ds-dialog-fullscreen:close", {
|
|
41
41
|
bubbles: !0,
|
|
42
42
|
composed: !0
|
|
43
43
|
})
|
|
44
|
-
);
|
|
44
|
+
));
|
|
45
45
|
}
|
|
46
46
|
connectedCallback() {
|
|
47
47
|
super.connectedCallback(), window.addEventListener("keydown", this.handleKeyDown), this.resizeObserver = new ResizeObserver(this.debouncedCheckScroll), this.handleResizeObserver();
|
|
@@ -55,7 +55,7 @@ let o = class extends p {
|
|
|
55
55
|
this.hasScroll = ((e = this.content) == null ? void 0 : e.scrollHeight) > ((t = this.content) == null ? void 0 : t.clientHeight);
|
|
56
56
|
}
|
|
57
57
|
render() {
|
|
58
|
-
return !this.hasBeenOpened && !this.open ?
|
|
58
|
+
return !this.hasBeenOpened && !this.open ? d : p`
|
|
59
59
|
<style>
|
|
60
60
|
:host {
|
|
61
61
|
display: ${this.open ? "flex" : "none"};
|
|
@@ -64,7 +64,7 @@ let o = class extends p {
|
|
|
64
64
|
|
|
65
65
|
<div class=${v(this.containerClasses)}>
|
|
66
66
|
<dialog ?open=${this.open} data-testid="ds-dialog-fullscreen-container" class="dialog-fullscreen">
|
|
67
|
-
|
|
67
|
+
${this.lockClose ? d : p`<slot name="close-button" @click=${this.handleClose}></slot>`}
|
|
68
68
|
<div class="content-container-fullscreen">
|
|
69
69
|
<div tabindex="0" class="content-fullscreen ds-scroll">
|
|
70
70
|
<slot @slotchange=${this.handleResizeObserver}></slot>
|
|
@@ -75,6 +75,9 @@ let o = class extends p {
|
|
|
75
75
|
}
|
|
76
76
|
};
|
|
77
77
|
o.styles = [k];
|
|
78
|
+
n([
|
|
79
|
+
h({ type: Boolean, converter: a, attribute: "lock-close" })
|
|
80
|
+
], o.prototype, "lockClose", 2);
|
|
78
81
|
n([
|
|
79
82
|
h({ type: Boolean, converter: a, attribute: "lock-scroll" })
|
|
80
83
|
], o.prototype, "lockScroll", 2);
|
|
@@ -82,13 +85,13 @@ n([
|
|
|
82
85
|
h({ type: Boolean, converter: a })
|
|
83
86
|
], o.prototype, "open", 2);
|
|
84
87
|
n([
|
|
85
|
-
|
|
88
|
+
u()
|
|
86
89
|
], o.prototype, "hasBeenOpened", 2);
|
|
87
90
|
n([
|
|
88
|
-
|
|
91
|
+
u()
|
|
89
92
|
], o.prototype, "hasScroll", 2);
|
|
90
93
|
n([
|
|
91
|
-
|
|
94
|
+
b(".content")
|
|
92
95
|
], o.prototype, "content", 2);
|
|
93
96
|
o = n([
|
|
94
97
|
m("ds-dialog-fullscreen")
|
|
@@ -2,7 +2,7 @@ import "../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@li
|
|
|
2
2
|
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 { css as i } from "../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";
|
|
5
|
-
const
|
|
5
|
+
const o = i`
|
|
6
6
|
:host {
|
|
7
7
|
display: inline-flex;
|
|
8
8
|
}
|
|
@@ -11,7 +11,13 @@ const s = i`
|
|
|
11
11
|
display: inline-flex;
|
|
12
12
|
align-items: center;
|
|
13
13
|
}
|
|
14
|
+
|
|
15
|
+
::slotted(div) {
|
|
16
|
+
display: flex;
|
|
17
|
+
gap: 12px;
|
|
18
|
+
align-items: center;
|
|
19
|
+
}
|
|
14
20
|
`;
|
|
15
21
|
export {
|
|
16
|
-
|
|
22
|
+
o as commonStyles
|
|
17
23
|
};
|
|
@@ -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.61", 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.61"), 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.61"), 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 r = `https://ds-assets.cupra.com/2.0.0-canary.
|
|
8
|
+
const r = `https://ds-assets.cupra.com/2.0.0-canary.61/styles/${t}/components/${e}.css`, c = this.getCachedStyleSheetPromise({ url: r });
|
|
9
9
|
if (c) return c;
|
|
10
10
|
const i = this.fetchStyle({ url: r }).then((n) => (n || this.stylePromises.delete(r), n));
|
|
11
11
|
return this.stylePromises.set(r, i), this.stylePromises.get(r);
|
|
@@ -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-61"), 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-61"), e = i(o);
|
|
7
7
|
return n`${e}`;
|
|
8
8
|
}
|
|
9
9
|
export {
|
|
@@ -5,6 +5,7 @@ import type { DsDialogAttrs } from './ds-dialog.types.ts';
|
|
|
5
5
|
export declare class DsDialog extends UiKitElement {
|
|
6
6
|
static styles: import("lit").CSSResult[];
|
|
7
7
|
protected componentFactory: ComponentFactory;
|
|
8
|
+
lockClose: DsDialogAttrs['lock-close'];
|
|
8
9
|
lockScroll: DsDialogAttrs['lock-scroll'];
|
|
9
10
|
open: DsDialogAttrs['open'];
|
|
10
11
|
size: DsDialogAttrs['size'];
|
|
@@ -3,6 +3,7 @@ import { type PropertyValues, nothing } from 'lit';
|
|
|
3
3
|
import type { DsDialogFullscreenAttrs } from './ds-dialog-fullscreen.types.ts';
|
|
4
4
|
export declare class DsDialogFullscreen extends UiKitElement {
|
|
5
5
|
static styles: import("lit").CSSResult[];
|
|
6
|
+
lockClose: DsDialogFullscreenAttrs['lock-close'];
|
|
6
7
|
lockScroll: DsDialogFullscreenAttrs['lock-scroll'];
|
|
7
8
|
open: DsDialogFullscreenAttrs['open'];
|
|
8
9
|
hasBeenOpened: boolean;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../base/UiKitElement.cjs"),v=require("../../decorators/customUiKitElement.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../base/UiKitElement.cjs"),v=require("../../decorators/customUiKitElement.cjs"),h=require("../../utils/booleanConverter.cjs"),y=require("../../utils/debounce.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");require("../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.cjs");const n=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"),D=require("./styles/common.styles.cjs");var g=Object.defineProperty,m=Object.getOwnPropertyDescriptor,t=(r,e,o,i)=>{for(var s=i>1?void 0:i?m(e,o):e,c=r.length-1,a;c>=0;c--)(a=r[c])&&(s=(i?a(e,o,s):a(s))||s);return i&&s&&g(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=y.debounce({func:()=>this.checkScroll()}),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()}disconnectedCallback(){var e;super.disconnectedCallback(),window.removeEventListener("keydown",this.handleKeyDown),this.lockScroll&&(document.body.style.overflow=""),(e=this.resizeObserver)==null||e.disconnect()}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?l.nothing:l.html`
|
|
2
2
|
<style>
|
|
3
3
|
:host {
|
|
4
4
|
display: ${this.open?"flex":"none"};
|
|
5
5
|
}
|
|
6
6
|
</style>
|
|
7
7
|
|
|
8
|
-
<div class=${
|
|
8
|
+
<div class=${d.classMap(this.containerClasses)}>
|
|
9
9
|
<div class="overlay" @click=${this.handleClose}></div>
|
|
10
|
-
<dialog ?open=${this.open} data-testid="ds-dialog-container" class=${
|
|
11
|
-
|
|
10
|
+
<dialog ?open=${this.open} data-testid="ds-dialog-container" class=${d.classMap(this.dialogClasses)}>
|
|
11
|
+
${this.lockClose?l.nothing:l.html`<slot name="close-button" @click=${this.handleClose}></slot>`}
|
|
12
12
|
<div class="content-container">
|
|
13
13
|
<div tabindex="0" class="content ds-scroll">
|
|
14
14
|
<slot @slotchange=${this.handleResizeObserver}></slot>
|
|
@@ -17,4 +17,4 @@
|
|
|
17
17
|
</div>
|
|
18
18
|
</dialog>
|
|
19
19
|
</div>
|
|
20
|
-
`}};exports.DsDialog.styles=[D.commonStyles];t([
|
|
20
|
+
`}};exports.DsDialog.styles=[D.commonStyles];t([n.property({type:Boolean,converter:h.booleanConverter,attribute:"lock-close"})],exports.DsDialog.prototype,"lockClose",2);t([n.property({type:Boolean,converter:h.booleanConverter,attribute:"lock-scroll"})],exports.DsDialog.prototype,"lockScroll",2);t([n.property({type:Boolean,converter:h.booleanConverter})],exports.DsDialog.prototype,"open",2);t([n.property({type:String})],exports.DsDialog.prototype,"size",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([v.customUiKitElement("ds-dialog")],exports.DsDialog);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("../base/UiKitElement.cjs"),p=require("../../decorators/customUiKitElement.cjs"),a=require("../../utils/booleanConverter.cjs"),y=require("../../utils/debounce.cjs");require("../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.cjs");const n=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 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"),b=require("../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query.cjs"),v=require("../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.cjs"),f=require("./styles/common.styles.cjs");var m=Object.defineProperty,D=Object.getOwnPropertyDescriptor,o=(r,e,s,l)=>{for(var t=l>1?void 0:l?D(e,s):e,i=r.length-1,c;i>=0;i--)(c=r[i])&&(t=(l?c(e,s,t):c(t))||t);return l&&t&&m(e,s,t),t};exports.DsDialogFullscreen=class extends d.UiKitElement{constructor(){super(...arguments),this.lockClose=!1,this.lockScroll=!0,this.open=!1,this.hasBeenOpened=!1,this.hasScroll=!1,this.debouncedCheckScroll=y.debounce({func:()=>this.checkScroll()}),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.getElementById("storybook-root")||(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-fullscreen":!0,close:!this.open,"with-scroll":this.open&&this.hasScroll}}handleClose(){this.lockClose||(this.open=!1,this.dispatchEvent(new Event("ds-dialog-fullscreen:close",{bubbles:!0,composed:!0})))}connectedCallback(){super.connectedCallback(),window.addEventListener("keydown",this.handleKeyDown),this.resizeObserver=new ResizeObserver(this.debouncedCheckScroll),this.handleResizeObserver()}disconnectedCallback(){var e;super.disconnectedCallback(),window.removeEventListener("keydown",this.handleKeyDown),this.lockScroll&&(document.getElementById("storybook-root")||(document.body.style.overflow="")),(e=this.resizeObserver)==null||e.disconnect()}checkScroll(){var e,s;this.hasScroll=((e=this.content)==null?void 0:e.scrollHeight)>((s=this.content)==null?void 0:s.clientHeight)}render(){return!this.hasBeenOpened&&!this.open?n.nothing:n.html`
|
|
2
2
|
<style>
|
|
3
3
|
:host {
|
|
4
4
|
display: ${this.open?"flex":"none"};
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
|
|
8
8
|
<div class=${v.classMap(this.containerClasses)}>
|
|
9
9
|
<dialog ?open=${this.open} data-testid="ds-dialog-fullscreen-container" class="dialog-fullscreen">
|
|
10
|
-
|
|
10
|
+
${this.lockClose?n.nothing:n.html`<slot name="close-button" @click=${this.handleClose}></slot>`}
|
|
11
11
|
<div class="content-container-fullscreen">
|
|
12
12
|
<div tabindex="0" class="content-fullscreen ds-scroll">
|
|
13
13
|
<slot @slotchange=${this.handleResizeObserver}></slot>
|
|
14
14
|
</div>
|
|
15
15
|
</dialog>
|
|
16
16
|
</div>
|
|
17
|
-
`}};exports.DsDialogFullscreen.styles=[f.commonStyles];o([h.property({type:Boolean,converter:a.booleanConverter,attribute:"lock-scroll"})],exports.DsDialogFullscreen.prototype,"lockScroll",2);o([h.property({type:Boolean,converter:a.booleanConverter})],exports.DsDialogFullscreen.prototype,"open",2);o([
|
|
17
|
+
`}};exports.DsDialogFullscreen.styles=[f.commonStyles];o([h.property({type:Boolean,converter:a.booleanConverter,attribute:"lock-close"})],exports.DsDialogFullscreen.prototype,"lockClose",2);o([h.property({type:Boolean,converter:a.booleanConverter,attribute:"lock-scroll"})],exports.DsDialogFullscreen.prototype,"lockScroll",2);o([h.property({type:Boolean,converter:a.booleanConverter})],exports.DsDialogFullscreen.prototype,"open",2);o([u.state()],exports.DsDialogFullscreen.prototype,"hasBeenOpened",2);o([u.state()],exports.DsDialogFullscreen.prototype,"hasScroll",2);o([b.query(".content")],exports.DsDialogFullscreen.prototype,"content",2);exports.DsDialogFullscreen=o([p.customUiKitElement("ds-dialog-fullscreen")],exports.DsDialogFullscreen);
|
|
@@ -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.61",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.61"),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.61"),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"});class s{constructor(){this.stylePromises=new Map,this.getStyles=async({componentName:e,theme:t})=>{if(!t||!e)return;const r=`https://ds-assets.cupra.com/2.0.0-canary.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class s{constructor(){this.stylePromises=new Map,this.getStyles=async({componentName:e,theme:t})=>{if(!t||!e)return;const r=`https://ds-assets.cupra.com/2.0.0-canary.61/styles/${t}/components/${e}.css`,c=this.getCachedStyleSheetPromise({url:r});if(c)return c;const i=this.fetchStyle({url:r}).then(n=>(n||this.stylePromises.delete(r),n));return this.stylePromises.set(r,i),this.stylePromises.get(r)}}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 o=s.getInstance();exports.stylesRegistry=o;
|
|
@@ -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-61"),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-61"),n=o.unsafeHTML(r);return i.html`${n}`}exports.htmlWithTokens=a;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { UiKitElement as
|
|
2
|
-
import { customUiKitElement as
|
|
3
|
-
import { booleanConverter as
|
|
4
|
-
import { debounce as
|
|
1
|
+
import { UiKitElement as v } from "../base/UiKitElement.js";
|
|
2
|
+
import { customUiKitElement as f } from "../../decorators/customUiKitElement.js";
|
|
3
|
+
import { booleanConverter as h } from "../../utils/booleanConverter.js";
|
|
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 d, 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
|
|
9
|
-
import { state as
|
|
8
|
+
import { property as n } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";
|
|
9
|
+
import { state as u } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.js";
|
|
10
10
|
import { query as b } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query.js";
|
|
11
|
-
import { classMap as
|
|
12
|
-
import { commonStyles as
|
|
13
|
-
var
|
|
14
|
-
for (var
|
|
15
|
-
(a = e[
|
|
16
|
-
return
|
|
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 C } from "./styles/common.styles.js";
|
|
13
|
+
var k = Object.defineProperty, w = Object.getOwnPropertyDescriptor, s = (e, o, r, l) => {
|
|
14
|
+
for (var i = l > 1 ? void 0 : l ? w(o, r) : o, c = e.length - 1, a; c >= 0; c--)
|
|
15
|
+
(a = e[c]) && (i = (l ? a(o, r, i) : a(i)) || i);
|
|
16
|
+
return l && i && k(o, r, i), i;
|
|
17
17
|
};
|
|
18
|
-
let t = class extends
|
|
18
|
+
let t = class extends v {
|
|
19
19
|
constructor() {
|
|
20
|
-
super(...arguments), this.lockScroll = !0, this.open = !1, this.size = "medium", this.hasBeenOpened = !1, this.hasScroll = !1, this.debouncedCheckScroll =
|
|
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.handleKeyDown = (e) => {
|
|
21
21
|
this.open && e.key === "Escape" && this.handleClose();
|
|
22
22
|
};
|
|
23
23
|
}
|
|
@@ -42,12 +42,12 @@ let t = class extends m {
|
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
44
|
handleClose() {
|
|
45
|
-
this.open = !1, this.dispatchEvent(
|
|
45
|
+
this.lockClose || (this.open = !1, this.dispatchEvent(
|
|
46
46
|
new Event("ds-dialog:close", {
|
|
47
47
|
bubbles: !0,
|
|
48
48
|
composed: !0
|
|
49
49
|
})
|
|
50
|
-
);
|
|
50
|
+
));
|
|
51
51
|
}
|
|
52
52
|
connectedCallback() {
|
|
53
53
|
super.connectedCallback(), window.addEventListener("keydown", this.handleKeyDown), this.resizeObserver = new ResizeObserver(this.debouncedCheckScroll), this.handleResizeObserver();
|
|
@@ -57,21 +57,21 @@ let t = class extends m {
|
|
|
57
57
|
super.disconnectedCallback(), window.removeEventListener("keydown", this.handleKeyDown), this.lockScroll && (document.body.style.overflow = ""), (e = this.resizeObserver) == null || e.disconnect();
|
|
58
58
|
}
|
|
59
59
|
checkScroll() {
|
|
60
|
-
var e,
|
|
61
|
-
this.hasScroll = ((e = this.content) == null ? void 0 : e.scrollHeight) > ((
|
|
60
|
+
var e, o;
|
|
61
|
+
this.hasScroll = ((e = this.content) == null ? void 0 : e.scrollHeight) > ((o = this.content) == null ? void 0 : o.clientHeight);
|
|
62
62
|
}
|
|
63
63
|
render() {
|
|
64
|
-
return !this.hasBeenOpened && !this.open ?
|
|
64
|
+
return !this.hasBeenOpened && !this.open ? d : p`
|
|
65
65
|
<style>
|
|
66
66
|
:host {
|
|
67
67
|
display: ${this.open ? "flex" : "none"};
|
|
68
68
|
}
|
|
69
69
|
</style>
|
|
70
70
|
|
|
71
|
-
<div class=${
|
|
71
|
+
<div class=${m(this.containerClasses)}>
|
|
72
72
|
<div class="overlay" @click=${this.handleClose}></div>
|
|
73
|
-
<dialog ?open=${this.open} data-testid="ds-dialog-container" class=${
|
|
74
|
-
|
|
73
|
+
<dialog ?open=${this.open} data-testid="ds-dialog-container" class=${m(this.dialogClasses)}>
|
|
74
|
+
${this.lockClose ? d : p`<slot name="close-button" @click=${this.handleClose}></slot>`}
|
|
75
75
|
<div class="content-container">
|
|
76
76
|
<div tabindex="0" class="content ds-scroll">
|
|
77
77
|
<slot @slotchange=${this.handleResizeObserver}></slot>
|
|
@@ -83,27 +83,30 @@ let t = class extends m {
|
|
|
83
83
|
`;
|
|
84
84
|
}
|
|
85
85
|
};
|
|
86
|
-
t.styles = [
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
t.styles = [C];
|
|
87
|
+
s([
|
|
88
|
+
n({ type: Boolean, converter: h, attribute: "lock-close" })
|
|
89
|
+
], t.prototype, "lockClose", 2);
|
|
90
|
+
s([
|
|
91
|
+
n({ type: Boolean, converter: h, attribute: "lock-scroll" })
|
|
89
92
|
], t.prototype, "lockScroll", 2);
|
|
90
|
-
|
|
91
|
-
|
|
93
|
+
s([
|
|
94
|
+
n({ type: Boolean, converter: h })
|
|
92
95
|
], t.prototype, "open", 2);
|
|
93
|
-
|
|
94
|
-
|
|
96
|
+
s([
|
|
97
|
+
n({ type: String })
|
|
95
98
|
], t.prototype, "size", 2);
|
|
96
|
-
|
|
97
|
-
|
|
99
|
+
s([
|
|
100
|
+
u()
|
|
98
101
|
], t.prototype, "hasBeenOpened", 2);
|
|
99
|
-
|
|
100
|
-
|
|
102
|
+
s([
|
|
103
|
+
u()
|
|
101
104
|
], t.prototype, "hasScroll", 2);
|
|
102
|
-
|
|
105
|
+
s([
|
|
103
106
|
b(".content")
|
|
104
107
|
], t.prototype, "content", 2);
|
|
105
|
-
t =
|
|
106
|
-
|
|
108
|
+
t = s([
|
|
109
|
+
f("ds-dialog")
|
|
107
110
|
], t);
|
|
108
111
|
export {
|
|
109
112
|
t as DsDialog
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { UiKitElement as
|
|
1
|
+
import { UiKitElement as f } from "../base/UiKitElement.js";
|
|
2
2
|
import { customUiKitElement as m } from "../../decorators/customUiKitElement.js";
|
|
3
3
|
import { booleanConverter as a } from "../../utils/booleanConverter.js";
|
|
4
|
-
import { debounce as
|
|
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 d, 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
8
|
import { property as h } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";
|
|
9
|
-
import { state as
|
|
10
|
-
import { query as
|
|
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 b } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query.js";
|
|
11
11
|
import { classMap as v } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js";
|
|
12
12
|
import { commonStyles as k } from "./styles/common.styles.js";
|
|
13
|
-
var w = Object.defineProperty,
|
|
14
|
-
for (var s =
|
|
15
|
-
(c = e[i]) && (s = (
|
|
16
|
-
return
|
|
13
|
+
var w = Object.defineProperty, C = Object.getOwnPropertyDescriptor, n = (e, t, r, l) => {
|
|
14
|
+
for (var s = l > 1 ? void 0 : l ? C(t, r) : t, i = e.length - 1, c; i >= 0; i--)
|
|
15
|
+
(c = e[i]) && (s = (l ? c(t, r, s) : c(s)) || s);
|
|
16
|
+
return l && s && w(t, r, s), s;
|
|
17
17
|
};
|
|
18
|
-
let o = class extends
|
|
18
|
+
let o = class extends f {
|
|
19
19
|
constructor() {
|
|
20
|
-
super(...arguments), this.lockScroll = !0, this.open = !1, this.hasBeenOpened = !1, this.hasScroll = !1, this.debouncedCheckScroll =
|
|
20
|
+
super(...arguments), this.lockClose = !1, this.lockScroll = !0, this.open = !1, this.hasBeenOpened = !1, this.hasScroll = !1, this.debouncedCheckScroll = y({ func: () => this.checkScroll() }), this.handleKeyDown = (e) => {
|
|
21
21
|
this.open && e.key === "Escape" && this.handleClose();
|
|
22
22
|
};
|
|
23
23
|
}
|
|
@@ -36,12 +36,12 @@ let o = class extends p {
|
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
38
|
handleClose() {
|
|
39
|
-
this.open = !1, this.dispatchEvent(
|
|
39
|
+
this.lockClose || (this.open = !1, this.dispatchEvent(
|
|
40
40
|
new Event("ds-dialog-fullscreen:close", {
|
|
41
41
|
bubbles: !0,
|
|
42
42
|
composed: !0
|
|
43
43
|
})
|
|
44
|
-
);
|
|
44
|
+
));
|
|
45
45
|
}
|
|
46
46
|
connectedCallback() {
|
|
47
47
|
super.connectedCallback(), window.addEventListener("keydown", this.handleKeyDown), this.resizeObserver = new ResizeObserver(this.debouncedCheckScroll), this.handleResizeObserver();
|
|
@@ -55,7 +55,7 @@ let o = class extends p {
|
|
|
55
55
|
this.hasScroll = ((e = this.content) == null ? void 0 : e.scrollHeight) > ((t = this.content) == null ? void 0 : t.clientHeight);
|
|
56
56
|
}
|
|
57
57
|
render() {
|
|
58
|
-
return !this.hasBeenOpened && !this.open ?
|
|
58
|
+
return !this.hasBeenOpened && !this.open ? d : p`
|
|
59
59
|
<style>
|
|
60
60
|
:host {
|
|
61
61
|
display: ${this.open ? "flex" : "none"};
|
|
@@ -64,7 +64,7 @@ let o = class extends p {
|
|
|
64
64
|
|
|
65
65
|
<div class=${v(this.containerClasses)}>
|
|
66
66
|
<dialog ?open=${this.open} data-testid="ds-dialog-fullscreen-container" class="dialog-fullscreen">
|
|
67
|
-
|
|
67
|
+
${this.lockClose ? d : p`<slot name="close-button" @click=${this.handleClose}></slot>`}
|
|
68
68
|
<div class="content-container-fullscreen">
|
|
69
69
|
<div tabindex="0" class="content-fullscreen ds-scroll">
|
|
70
70
|
<slot @slotchange=${this.handleResizeObserver}></slot>
|
|
@@ -75,6 +75,9 @@ let o = class extends p {
|
|
|
75
75
|
}
|
|
76
76
|
};
|
|
77
77
|
o.styles = [k];
|
|
78
|
+
n([
|
|
79
|
+
h({ type: Boolean, converter: a, attribute: "lock-close" })
|
|
80
|
+
], o.prototype, "lockClose", 2);
|
|
78
81
|
n([
|
|
79
82
|
h({ type: Boolean, converter: a, attribute: "lock-scroll" })
|
|
80
83
|
], o.prototype, "lockScroll", 2);
|
|
@@ -82,13 +85,13 @@ n([
|
|
|
82
85
|
h({ type: Boolean, converter: a })
|
|
83
86
|
], o.prototype, "open", 2);
|
|
84
87
|
n([
|
|
85
|
-
|
|
88
|
+
u()
|
|
86
89
|
], o.prototype, "hasBeenOpened", 2);
|
|
87
90
|
n([
|
|
88
|
-
|
|
91
|
+
u()
|
|
89
92
|
], o.prototype, "hasScroll", 2);
|
|
90
93
|
n([
|
|
91
|
-
|
|
94
|
+
b(".content")
|
|
92
95
|
], o.prototype, "content", 2);
|
|
93
96
|
o = n([
|
|
94
97
|
m("ds-dialog-fullscreen")
|
|
@@ -2,7 +2,7 @@ import "../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@li
|
|
|
2
2
|
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 { css as i } from "../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";
|
|
5
|
-
const
|
|
5
|
+
const o = i`
|
|
6
6
|
:host {
|
|
7
7
|
display: inline-flex;
|
|
8
8
|
}
|
|
@@ -11,7 +11,13 @@ const s = i`
|
|
|
11
11
|
display: inline-flex;
|
|
12
12
|
align-items: center;
|
|
13
13
|
}
|
|
14
|
+
|
|
15
|
+
::slotted(div) {
|
|
16
|
+
display: flex;
|
|
17
|
+
gap: 12px;
|
|
18
|
+
align-items: center;
|
|
19
|
+
}
|
|
14
20
|
`;
|
|
15
21
|
export {
|
|
16
|
-
|
|
22
|
+
o as commonStyles
|
|
17
23
|
};
|
|
@@ -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.61", 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.61"), 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.61"), 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 r = `https://ds-assets.cupra.com/2.0.0-canary.
|
|
8
|
+
const r = `https://ds-assets.cupra.com/2.0.0-canary.61/styles/${t}/components/${e}.css`, c = this.getCachedStyleSheetPromise({ url: r });
|
|
9
9
|
if (c) return c;
|
|
10
10
|
const i = this.fetchStyle({ url: r }).then((n) => (n || this.stylePromises.delete(r), n));
|
|
11
11
|
return this.stylePromises.set(r, i), this.stylePromises.get(r);
|
|
@@ -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-61"), 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-61"), e = i(o);
|
|
7
7
|
return n`${e}`;
|
|
8
8
|
}
|
|
9
9
|
export {
|
|
@@ -5,6 +5,7 @@ import type { DsDialogAttrs } from './ds-dialog.types.ts';
|
|
|
5
5
|
export declare class DsDialog extends UiKitElement {
|
|
6
6
|
static styles: import("lit").CSSResult[];
|
|
7
7
|
protected componentFactory: ComponentFactory;
|
|
8
|
+
lockClose: DsDialogAttrs['lock-close'];
|
|
8
9
|
lockScroll: DsDialogAttrs['lock-scroll'];
|
|
9
10
|
open: DsDialogAttrs['open'];
|
|
10
11
|
size: DsDialogAttrs['size'];
|
|
@@ -3,6 +3,7 @@ import { type PropertyValues, nothing } from 'lit';
|
|
|
3
3
|
import type { DsDialogFullscreenAttrs } from './ds-dialog-fullscreen.types.ts';
|
|
4
4
|
export declare class DsDialogFullscreen extends UiKitElement {
|
|
5
5
|
static styles: import("lit").CSSResult[];
|
|
6
|
+
lockClose: DsDialogFullscreenAttrs['lock-close'];
|
|
6
7
|
lockScroll: DsDialogFullscreenAttrs['lock-scroll'];
|
|
7
8
|
open: DsDialogFullscreenAttrs['open'];
|
|
8
9
|
hasBeenOpened: boolean;
|
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.61",
|
|
4
4
|
"description": "Web components library",
|
|
5
5
|
"author": "SEAT S.A.",
|
|
6
6
|
"license": "SEAT S.A. Library EULA 1.0",
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
"autoprefixer": "^10.4.20",
|
|
114
114
|
"camelcase": "^8.0.0",
|
|
115
115
|
"chromatic": "^11.27.0",
|
|
116
|
-
"cssnano": "^7.
|
|
116
|
+
"cssnano": "^7.1.3",
|
|
117
117
|
"dotenv": "^16.4.7",
|
|
118
118
|
"jsdom": "^26.0.0",
|
|
119
119
|
"lodash": "^4.17.23",
|