@cupra/ui-kit 2.0.0-canary.83 → 2.0.0-canary.85
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-sidebar-navigation/ds-sidebar-navigation.cjs +20 -20
- package/dist/cjs/components/ds-theme-provider/ds-theme-provider.cjs +1 -1
- package/dist/cjs/styles/source/shared/fonts-config.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-sidebar-navigation/ds-sidebar-navigation.js +60 -50
- package/dist/esm/components/ds-theme-provider/ds-theme-provider.js +1 -1
- package/dist/esm/styles/source/shared/fonts-config.js +7 -0
- 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/base/ds-base-progress-bar/styles/seat-legacy.styles.d.ts +1 -0
- package/dist/types/components/ds-sidebar-navigation/ds-sidebar-navigation.d.ts +6 -1
- package/dist/types/components/ds-sidebar-navigation/ds-sidebar-navigation.types.d.ts +1 -0
- package/dist-react/cjs/components/ds-sidebar-navigation/ds-sidebar-navigation.cjs +20 -20
- package/dist-react/cjs/components/ds-theme-provider/ds-theme-provider.cjs +1 -1
- package/dist-react/cjs/styles/source/shared/fonts-config.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-sidebar-navigation/ds-sidebar-navigation.js +60 -50
- package/dist-react/esm/components/ds-theme-provider/ds-theme-provider.js +1 -1
- package/dist-react/esm/styles/source/shared/fonts-config.js +7 -0
- 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/base/ds-base-progress-bar/styles/seat-legacy.styles.d.ts +1 -0
- package/dist-react/types/components/ds-sidebar-navigation/ds-sidebar-navigation.d.ts +6 -1
- package/dist-react/types/components/ds-sidebar-navigation/ds-sidebar-navigation.types.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../base/UiKitElement.cjs"),
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../base/UiKitElement.cjs"),d=require("../../decorators/customUiKitElement.cjs"),c=require("../../utils/booleanConverter.cjs");require("../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.cjs");const m=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 u=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/query-assigned-elements.cjs"),v=require("../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.cjs"),h=require("./styles/common.styles.cjs");var b=Object.defineProperty,g=Object.getOwnPropertyDescriptor,n=(i,e,a,s)=>{for(var t=s>1?void 0:s?g(e,a):e,o=i.length-1,l;o>=0;o--)(l=i[o])&&(t=(s?l(e,a,t):l(t))||t);return s&&t&&b(e,a,t),t};exports.DsSidebarNavigation=class extends r.UiKitElement{constructor(){super(...arguments),this.open=!1,this.scrollLocked=!1,this.savedBodyOverflow="",this.toggleModal=()=>{this.open=!this.open,this.open?this.dispatchEvent(new Event("ds-sidebar-navigation:open",{bubbles:!0,composed:!0})):this.dispatchEvent(new Event("ds-sidebar-navigation:close",{bubbles:!0,composed:!0}))},this.handleModalClick=e=>{e.target===e.currentTarget&&this.toggleModal()},this.handleSlotChange=e=>{const t=e.target.assignedElements().find(o=>o.tagName==="DS-BUTTON");this.setMainCtaSize(t)},this.setMainCtaSize=e=>{e&&e.setAttribute("size",JSON.stringify({xxl:"large",xl:"large",l:"medium",m:"medium",s:"small",xs:"small",xxs:"small"}))}}firstUpdated(e){var s;super.firstUpdated(e);const a=(s=this.mainCtas)==null?void 0:s[0];a&&this.setMainCtaSize(a)}updated(e){super.updated(e),e.has("open")&&(this.open?(this.savedBodyOverflow=document.body.style.overflow,document.body.style.overflow="hidden",this.scrollLocked=!0):this.scrollLocked&&(document.body.style.overflow=this.savedBodyOverflow,this.scrollLocked=!1))}disconnectedCallback(){super.disconnectedCallback(),this.scrollLocked&&(document.body.style.overflow=this.savedBodyOverflow,this.scrollLocked=!1)}modalButtonTemplate(){return this.componentFactory.createIconButton({class:"modal-button","icon-name":this.open?"cross":"triple-dot-v","@click":this.toggleModal,"data-testid":"modal-button","data-aria-label":"more actions",variant:"tertiary",size:JSON.stringify({xxl:"large",xl:"large",l:"medium",m:"medium",s:"small",xs:"small",xxs:"small"})})}classes(){return{container:!0,open:this.open}}render(){return m.html`
|
|
2
|
+
<div class=${v.classMap(this.classes())}>
|
|
3
|
+
<nav class="nav" part="bar">
|
|
4
|
+
<div class="aside" part="aside">
|
|
5
|
+
<slot name="aside-text"></slot>
|
|
6
|
+
<span class="helper-text-container">
|
|
7
|
+
<slot name="aside-icon"></slot>
|
|
8
|
+
<slot name="aside-helper-text"></slot>
|
|
9
|
+
</span>
|
|
10
|
+
</div>
|
|
11
|
+
<div class="actions-container" part="actions-container">
|
|
12
|
+
<slot name="main-cta" @slotchange=${this.handleSlotChange}></slot>
|
|
13
|
+
${this.modalButtonTemplate()}
|
|
14
|
+
</div>
|
|
15
|
+
</nav>
|
|
16
|
+
<div part="modal" class="modal" @click=${this.handleModalClick}>
|
|
17
|
+
<slot name="ctas"></slot>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
`}};exports.DsSidebarNavigation.styles=[h.commonStyles];n([u.property({type:Boolean,converter:c.booleanConverter,reflect:!0})],exports.DsSidebarNavigation.prototype,"open",2);n([p.queryAssignedElements({slot:"main-cta",selector:"ds-button",flatten:!0})],exports.DsSidebarNavigation.prototype,"mainCtas",2);exports.DsSidebarNavigation=n([d.customUiKitElement("ds-sidebar-navigation")],exports.DsSidebarNavigation);
|
|
@@ -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.85",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 e={cupra:{fonts:[{name:"cupra-screen",weight:"300",file:"CupraScreen-Light"},{name:"cupra-screen",weight:"350",file:"CupraScreen-Book"},{name:"cupra-screen",weight:"400",file:"CupraScreen-Regular"},{name:"cupra-screen",weight:"500",file:"CupraScreen-Medium"}]},"cupra-diagonal":{fonts:[{name:"cupra-screen",weight:"300",file:"CupraScreen-Light"},{name:"cupra-screen",weight:"350",file:"CupraScreen-Book"},{name:"cupra-screen",weight:"400",file:"CupraScreen-Regular"},{name:"cupra-screen",weight:"500",file:"CupraScreen-Medium"}]},seat:{fonts:[{name:"seat",weight:"400",file:"SeatBcn-Regular"},{name:"seat",weight:"500",file:"SeatBcn-Medium"},{name:"seat",weight:"700",file:"SeatBcn-Bold"}]}};exports.fontsConfig=e;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={cupra:{fonts:[{name:"cupra-screen",weight:"300",file:"CupraScreen-Light"},{name:"cupra-screen",weight:"350",file:"CupraScreen-Book"},{name:"cupra-screen",weight:"400",file:"CupraScreen-Regular"},{name:"cupra-screen",weight:"500",file:"CupraScreen-Medium"}]},"cupra-diagonal":{fonts:[{name:"cupra-screen",weight:"300",file:"CupraScreen-Light"},{name:"cupra-screen",weight:"350",file:"CupraScreen-Book"},{name:"cupra-screen",weight:"400",file:"CupraScreen-Regular"},{name:"cupra-screen",weight:"500",file:"CupraScreen-Medium"}]},seat:{fonts:[{name:"seat",weight:"400",file:"SeatBcn-Regular"},{name:"seat",weight:"500",file:"SeatBcn-Medium"},{name:"seat",weight:"700",file:"SeatBcn-Bold"}]},"seat-legacy":{fonts:[{name:"seat",weight:"400",file:"SeatBcn-Regular"},{name:"seat",weight:"500",file:"SeatBcn-Medium"},{name:"seat",weight:"700",file:"SeatBcn-Bold"}]}};exports.fontsConfig=e;
|
|
@@ -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.85"),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.85"),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.85/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-85"),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-85"),n=o.unsafeHTML(r);return i.html`${n}`}exports.htmlWithTokens=a;
|
|
@@ -1,24 +1,27 @@
|
|
|
1
|
-
import { UiKitElement as
|
|
2
|
-
import { customUiKitElement as
|
|
1
|
+
import { UiKitElement as d } from "../base/UiKitElement.js";
|
|
2
|
+
import { customUiKitElement as c } from "../../decorators/customUiKitElement.js";
|
|
3
|
+
import { booleanConverter as m } from "../../utils/booleanConverter.js";
|
|
3
4
|
import "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
|
|
4
|
-
import { html as
|
|
5
|
+
import { html as p } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
|
|
5
6
|
import "../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
6
|
-
import {
|
|
7
|
-
import { queryAssignedElements as
|
|
8
|
-
import { classMap as
|
|
9
|
-
import { commonStyles as
|
|
10
|
-
var
|
|
11
|
-
for (var
|
|
12
|
-
(
|
|
13
|
-
return
|
|
7
|
+
import { property as h } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";
|
|
8
|
+
import { queryAssignedElements as u } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query-assigned-elements.js";
|
|
9
|
+
import { classMap as f } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js";
|
|
10
|
+
import { commonStyles as v } from "./styles/common.styles.js";
|
|
11
|
+
var b = Object.defineProperty, g = Object.getOwnPropertyDescriptor, n = (t, s, o, a) => {
|
|
12
|
+
for (var e = a > 1 ? void 0 : a ? g(s, o) : s, i = t.length - 1, r; i >= 0; i--)
|
|
13
|
+
(r = t[i]) && (e = (a ? r(s, o, e) : r(e)) || e);
|
|
14
|
+
return a && e && b(s, o, e), e;
|
|
14
15
|
};
|
|
15
|
-
let
|
|
16
|
+
let l = class extends d {
|
|
16
17
|
constructor() {
|
|
17
|
-
super(...arguments), this.open = !1, this.toggleModal = () => {
|
|
18
|
-
this.open = !this.open;
|
|
18
|
+
super(...arguments), this.open = !1, this.scrollLocked = !1, this.savedBodyOverflow = "", this.toggleModal = () => {
|
|
19
|
+
this.open = !this.open, this.open ? this.dispatchEvent(new Event("ds-sidebar-navigation:open", { bubbles: !0, composed: !0 })) : this.dispatchEvent(new Event("ds-sidebar-navigation:close", { bubbles: !0, composed: !0 }));
|
|
20
|
+
}, this.handleModalClick = (t) => {
|
|
21
|
+
t.target === t.currentTarget && this.toggleModal();
|
|
19
22
|
}, this.handleSlotChange = (t) => {
|
|
20
|
-
const
|
|
21
|
-
this.setMainCtaSize(
|
|
23
|
+
const a = t.target.assignedElements().find((e) => e.tagName === "DS-BUTTON");
|
|
24
|
+
this.setMainCtaSize(a);
|
|
22
25
|
}, this.setMainCtaSize = (t) => {
|
|
23
26
|
t && t.setAttribute(
|
|
24
27
|
"size",
|
|
@@ -35,10 +38,16 @@ let i = class extends m {
|
|
|
35
38
|
};
|
|
36
39
|
}
|
|
37
40
|
firstUpdated(t) {
|
|
38
|
-
var
|
|
41
|
+
var o;
|
|
39
42
|
super.firstUpdated(t);
|
|
40
|
-
const
|
|
41
|
-
|
|
43
|
+
const s = (o = this.mainCtas) == null ? void 0 : o[0];
|
|
44
|
+
s && this.setMainCtaSize(s);
|
|
45
|
+
}
|
|
46
|
+
updated(t) {
|
|
47
|
+
super.updated(t), t.has("open") && (this.open ? (this.savedBodyOverflow = document.body.style.overflow, document.body.style.overflow = "hidden", this.scrollLocked = !0) : this.scrollLocked && (document.body.style.overflow = this.savedBodyOverflow, this.scrollLocked = !1));
|
|
48
|
+
}
|
|
49
|
+
disconnectedCallback() {
|
|
50
|
+
super.disconnectedCallback(), this.scrollLocked && (document.body.style.overflow = this.savedBodyOverflow, this.scrollLocked = !1);
|
|
42
51
|
}
|
|
43
52
|
modalButtonTemplate() {
|
|
44
53
|
return this.componentFactory.createIconButton({
|
|
@@ -47,6 +56,7 @@ let i = class extends m {
|
|
|
47
56
|
"@click": this.toggleModal,
|
|
48
57
|
"data-testid": "modal-button",
|
|
49
58
|
"data-aria-label": "more actions",
|
|
59
|
+
variant: "tertiary",
|
|
50
60
|
size: JSON.stringify({
|
|
51
61
|
xxl: "large",
|
|
52
62
|
xl: "large",
|
|
@@ -65,38 +75,38 @@ let i = class extends m {
|
|
|
65
75
|
};
|
|
66
76
|
}
|
|
67
77
|
render() {
|
|
68
|
-
return
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
78
|
+
return p`
|
|
79
|
+
<div class=${f(this.classes())}>
|
|
80
|
+
<nav class="nav" part="bar">
|
|
81
|
+
<div class="aside" part="aside">
|
|
82
|
+
<slot name="aside-text"></slot>
|
|
83
|
+
<span class="helper-text-container">
|
|
84
|
+
<slot name="aside-icon"></slot>
|
|
85
|
+
<slot name="aside-helper-text"></slot>
|
|
86
|
+
</span>
|
|
87
|
+
</div>
|
|
88
|
+
<div class="actions-container" part="actions-container">
|
|
89
|
+
<slot name="main-cta" @slotchange=${this.handleSlotChange}></slot>
|
|
90
|
+
${this.modalButtonTemplate()}
|
|
91
|
+
</div>
|
|
92
|
+
</nav>
|
|
93
|
+
<div part="modal" class="modal" @click=${this.handleModalClick}>
|
|
94
|
+
<slot name="ctas"></slot>
|
|
95
|
+
</div>
|
|
96
|
+
</div>
|
|
97
|
+
`;
|
|
88
98
|
}
|
|
89
99
|
};
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
],
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
],
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
],
|
|
100
|
+
l.styles = [v];
|
|
101
|
+
n([
|
|
102
|
+
h({ type: Boolean, converter: m, reflect: !0 })
|
|
103
|
+
], l.prototype, "open", 2);
|
|
104
|
+
n([
|
|
105
|
+
u({ slot: "main-cta", selector: "ds-button", flatten: !0 })
|
|
106
|
+
], l.prototype, "mainCtas", 2);
|
|
107
|
+
l = n([
|
|
108
|
+
c("ds-sidebar-navigation")
|
|
109
|
+
], l);
|
|
100
110
|
export {
|
|
101
|
-
|
|
111
|
+
l as DsSidebarNavigation
|
|
102
112
|
};
|
|
@@ -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.85", 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");
|
|
@@ -21,6 +21,13 @@ const e = {
|
|
|
21
21
|
{ name: "seat", weight: "500", file: "SeatBcn-Medium" },
|
|
22
22
|
{ name: "seat", weight: "700", file: "SeatBcn-Bold" }
|
|
23
23
|
]
|
|
24
|
+
},
|
|
25
|
+
"seat-legacy": {
|
|
26
|
+
fonts: [
|
|
27
|
+
{ name: "seat", weight: "400", file: "SeatBcn-Regular" },
|
|
28
|
+
{ name: "seat", weight: "500", file: "SeatBcn-Medium" },
|
|
29
|
+
{ name: "seat", weight: "700", file: "SeatBcn-Bold" }
|
|
30
|
+
]
|
|
24
31
|
}
|
|
25
32
|
};
|
|
26
33
|
export {
|
|
@@ -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.85"), 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.85"), 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.85/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-85"), 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-85"), e = i(o);
|
|
7
7
|
return n`${e}`;
|
|
8
8
|
}
|
|
9
9
|
export {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const seatStyles: import("lit").CSSResult[];
|
|
@@ -3,10 +3,15 @@ import { type PropertyValues } from 'lit';
|
|
|
3
3
|
import type { DsSidebarNavigationAttrs } from './ds-sidebar-navigation.types';
|
|
4
4
|
export declare class DsSidebarNavigation extends UiKitElement implements DsSidebarNavigationAttrs {
|
|
5
5
|
static styles: import("lit").CSSResult[];
|
|
6
|
-
|
|
6
|
+
open: DsSidebarNavigationAttrs['open'];
|
|
7
7
|
mainCtas: Array<Node>;
|
|
8
|
+
private scrollLocked;
|
|
9
|
+
private savedBodyOverflow;
|
|
8
10
|
protected firstUpdated(_changedProperties: PropertyValues): void;
|
|
11
|
+
protected updated(_changedProperties: PropertyValues): void;
|
|
12
|
+
disconnectedCallback(): void;
|
|
9
13
|
private toggleModal;
|
|
14
|
+
private handleModalClick;
|
|
10
15
|
private modalButtonTemplate;
|
|
11
16
|
private handleSlotChange;
|
|
12
17
|
private setMainCtaSize;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../base/UiKitElement.cjs"),
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../base/UiKitElement.cjs"),d=require("../../decorators/customUiKitElement.cjs"),c=require("../../utils/booleanConverter.cjs");require("../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.cjs");const m=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 u=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/query-assigned-elements.cjs"),v=require("../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.cjs"),h=require("./styles/common.styles.cjs");var b=Object.defineProperty,g=Object.getOwnPropertyDescriptor,n=(i,e,a,s)=>{for(var t=s>1?void 0:s?g(e,a):e,o=i.length-1,l;o>=0;o--)(l=i[o])&&(t=(s?l(e,a,t):l(t))||t);return s&&t&&b(e,a,t),t};exports.DsSidebarNavigation=class extends r.UiKitElement{constructor(){super(...arguments),this.open=!1,this.scrollLocked=!1,this.savedBodyOverflow="",this.toggleModal=()=>{this.open=!this.open,this.open?this.dispatchEvent(new Event("ds-sidebar-navigation:open",{bubbles:!0,composed:!0})):this.dispatchEvent(new Event("ds-sidebar-navigation:close",{bubbles:!0,composed:!0}))},this.handleModalClick=e=>{e.target===e.currentTarget&&this.toggleModal()},this.handleSlotChange=e=>{const t=e.target.assignedElements().find(o=>o.tagName==="DS-BUTTON");this.setMainCtaSize(t)},this.setMainCtaSize=e=>{e&&e.setAttribute("size",JSON.stringify({xxl:"large",xl:"large",l:"medium",m:"medium",s:"small",xs:"small",xxs:"small"}))}}firstUpdated(e){var s;super.firstUpdated(e);const a=(s=this.mainCtas)==null?void 0:s[0];a&&this.setMainCtaSize(a)}updated(e){super.updated(e),e.has("open")&&(this.open?(this.savedBodyOverflow=document.body.style.overflow,document.body.style.overflow="hidden",this.scrollLocked=!0):this.scrollLocked&&(document.body.style.overflow=this.savedBodyOverflow,this.scrollLocked=!1))}disconnectedCallback(){super.disconnectedCallback(),this.scrollLocked&&(document.body.style.overflow=this.savedBodyOverflow,this.scrollLocked=!1)}modalButtonTemplate(){return this.componentFactory.createIconButton({class:"modal-button","icon-name":this.open?"cross":"triple-dot-v","@click":this.toggleModal,"data-testid":"modal-button","data-aria-label":"more actions",variant:"tertiary",size:JSON.stringify({xxl:"large",xl:"large",l:"medium",m:"medium",s:"small",xs:"small",xxs:"small"})})}classes(){return{container:!0,open:this.open}}render(){return m.html`
|
|
2
|
+
<div class=${v.classMap(this.classes())}>
|
|
3
|
+
<nav class="nav" part="bar">
|
|
4
|
+
<div class="aside" part="aside">
|
|
5
|
+
<slot name="aside-text"></slot>
|
|
6
|
+
<span class="helper-text-container">
|
|
7
|
+
<slot name="aside-icon"></slot>
|
|
8
|
+
<slot name="aside-helper-text"></slot>
|
|
9
|
+
</span>
|
|
10
|
+
</div>
|
|
11
|
+
<div class="actions-container" part="actions-container">
|
|
12
|
+
<slot name="main-cta" @slotchange=${this.handleSlotChange}></slot>
|
|
13
|
+
${this.modalButtonTemplate()}
|
|
14
|
+
</div>
|
|
15
|
+
</nav>
|
|
16
|
+
<div part="modal" class="modal" @click=${this.handleModalClick}>
|
|
17
|
+
<slot name="ctas"></slot>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
`}};exports.DsSidebarNavigation.styles=[h.commonStyles];n([u.property({type:Boolean,converter:c.booleanConverter,reflect:!0})],exports.DsSidebarNavigation.prototype,"open",2);n([p.queryAssignedElements({slot:"main-cta",selector:"ds-button",flatten:!0})],exports.DsSidebarNavigation.prototype,"mainCtas",2);exports.DsSidebarNavigation=n([d.customUiKitElement("ds-sidebar-navigation")],exports.DsSidebarNavigation);
|
|
@@ -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.85",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 e={cupra:{fonts:[{name:"cupra-screen",weight:"300",file:"CupraScreen-Light"},{name:"cupra-screen",weight:"350",file:"CupraScreen-Book"},{name:"cupra-screen",weight:"400",file:"CupraScreen-Regular"},{name:"cupra-screen",weight:"500",file:"CupraScreen-Medium"}]},"cupra-diagonal":{fonts:[{name:"cupra-screen",weight:"300",file:"CupraScreen-Light"},{name:"cupra-screen",weight:"350",file:"CupraScreen-Book"},{name:"cupra-screen",weight:"400",file:"CupraScreen-Regular"},{name:"cupra-screen",weight:"500",file:"CupraScreen-Medium"}]},seat:{fonts:[{name:"seat",weight:"400",file:"SeatBcn-Regular"},{name:"seat",weight:"500",file:"SeatBcn-Medium"},{name:"seat",weight:"700",file:"SeatBcn-Bold"}]}};exports.fontsConfig=e;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={cupra:{fonts:[{name:"cupra-screen",weight:"300",file:"CupraScreen-Light"},{name:"cupra-screen",weight:"350",file:"CupraScreen-Book"},{name:"cupra-screen",weight:"400",file:"CupraScreen-Regular"},{name:"cupra-screen",weight:"500",file:"CupraScreen-Medium"}]},"cupra-diagonal":{fonts:[{name:"cupra-screen",weight:"300",file:"CupraScreen-Light"},{name:"cupra-screen",weight:"350",file:"CupraScreen-Book"},{name:"cupra-screen",weight:"400",file:"CupraScreen-Regular"},{name:"cupra-screen",weight:"500",file:"CupraScreen-Medium"}]},seat:{fonts:[{name:"seat",weight:"400",file:"SeatBcn-Regular"},{name:"seat",weight:"500",file:"SeatBcn-Medium"},{name:"seat",weight:"700",file:"SeatBcn-Bold"}]},"seat-legacy":{fonts:[{name:"seat",weight:"400",file:"SeatBcn-Regular"},{name:"seat",weight:"500",file:"SeatBcn-Medium"},{name:"seat",weight:"700",file:"SeatBcn-Bold"}]}};exports.fontsConfig=e;
|
|
@@ -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.85"),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.85"),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.85/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-85"),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-85"),n=o.unsafeHTML(r);return i.html`${n}`}exports.htmlWithTokens=a;
|
|
@@ -1,24 +1,27 @@
|
|
|
1
|
-
import { UiKitElement as
|
|
2
|
-
import { customUiKitElement as
|
|
1
|
+
import { UiKitElement as d } from "../base/UiKitElement.js";
|
|
2
|
+
import { customUiKitElement as c } from "../../decorators/customUiKitElement.js";
|
|
3
|
+
import { booleanConverter as m } from "../../utils/booleanConverter.js";
|
|
3
4
|
import "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
|
|
4
|
-
import { html as
|
|
5
|
+
import { html as p } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
|
|
5
6
|
import "../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
6
|
-
import {
|
|
7
|
-
import { queryAssignedElements as
|
|
8
|
-
import { classMap as
|
|
9
|
-
import { commonStyles as
|
|
10
|
-
var
|
|
11
|
-
for (var
|
|
12
|
-
(
|
|
13
|
-
return
|
|
7
|
+
import { property as h } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";
|
|
8
|
+
import { queryAssignedElements as u } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query-assigned-elements.js";
|
|
9
|
+
import { classMap as f } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js";
|
|
10
|
+
import { commonStyles as v } from "./styles/common.styles.js";
|
|
11
|
+
var b = Object.defineProperty, g = Object.getOwnPropertyDescriptor, n = (t, s, o, a) => {
|
|
12
|
+
for (var e = a > 1 ? void 0 : a ? g(s, o) : s, i = t.length - 1, r; i >= 0; i--)
|
|
13
|
+
(r = t[i]) && (e = (a ? r(s, o, e) : r(e)) || e);
|
|
14
|
+
return a && e && b(s, o, e), e;
|
|
14
15
|
};
|
|
15
|
-
let
|
|
16
|
+
let l = class extends d {
|
|
16
17
|
constructor() {
|
|
17
|
-
super(...arguments), this.open = !1, this.toggleModal = () => {
|
|
18
|
-
this.open = !this.open;
|
|
18
|
+
super(...arguments), this.open = !1, this.scrollLocked = !1, this.savedBodyOverflow = "", this.toggleModal = () => {
|
|
19
|
+
this.open = !this.open, this.open ? this.dispatchEvent(new Event("ds-sidebar-navigation:open", { bubbles: !0, composed: !0 })) : this.dispatchEvent(new Event("ds-sidebar-navigation:close", { bubbles: !0, composed: !0 }));
|
|
20
|
+
}, this.handleModalClick = (t) => {
|
|
21
|
+
t.target === t.currentTarget && this.toggleModal();
|
|
19
22
|
}, this.handleSlotChange = (t) => {
|
|
20
|
-
const
|
|
21
|
-
this.setMainCtaSize(
|
|
23
|
+
const a = t.target.assignedElements().find((e) => e.tagName === "DS-BUTTON");
|
|
24
|
+
this.setMainCtaSize(a);
|
|
22
25
|
}, this.setMainCtaSize = (t) => {
|
|
23
26
|
t && t.setAttribute(
|
|
24
27
|
"size",
|
|
@@ -35,10 +38,16 @@ let i = class extends m {
|
|
|
35
38
|
};
|
|
36
39
|
}
|
|
37
40
|
firstUpdated(t) {
|
|
38
|
-
var
|
|
41
|
+
var o;
|
|
39
42
|
super.firstUpdated(t);
|
|
40
|
-
const
|
|
41
|
-
|
|
43
|
+
const s = (o = this.mainCtas) == null ? void 0 : o[0];
|
|
44
|
+
s && this.setMainCtaSize(s);
|
|
45
|
+
}
|
|
46
|
+
updated(t) {
|
|
47
|
+
super.updated(t), t.has("open") && (this.open ? (this.savedBodyOverflow = document.body.style.overflow, document.body.style.overflow = "hidden", this.scrollLocked = !0) : this.scrollLocked && (document.body.style.overflow = this.savedBodyOverflow, this.scrollLocked = !1));
|
|
48
|
+
}
|
|
49
|
+
disconnectedCallback() {
|
|
50
|
+
super.disconnectedCallback(), this.scrollLocked && (document.body.style.overflow = this.savedBodyOverflow, this.scrollLocked = !1);
|
|
42
51
|
}
|
|
43
52
|
modalButtonTemplate() {
|
|
44
53
|
return this.componentFactory.createIconButton({
|
|
@@ -47,6 +56,7 @@ let i = class extends m {
|
|
|
47
56
|
"@click": this.toggleModal,
|
|
48
57
|
"data-testid": "modal-button",
|
|
49
58
|
"data-aria-label": "more actions",
|
|
59
|
+
variant: "tertiary",
|
|
50
60
|
size: JSON.stringify({
|
|
51
61
|
xxl: "large",
|
|
52
62
|
xl: "large",
|
|
@@ -65,38 +75,38 @@ let i = class extends m {
|
|
|
65
75
|
};
|
|
66
76
|
}
|
|
67
77
|
render() {
|
|
68
|
-
return
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
78
|
+
return p`
|
|
79
|
+
<div class=${f(this.classes())}>
|
|
80
|
+
<nav class="nav" part="bar">
|
|
81
|
+
<div class="aside" part="aside">
|
|
82
|
+
<slot name="aside-text"></slot>
|
|
83
|
+
<span class="helper-text-container">
|
|
84
|
+
<slot name="aside-icon"></slot>
|
|
85
|
+
<slot name="aside-helper-text"></slot>
|
|
86
|
+
</span>
|
|
87
|
+
</div>
|
|
88
|
+
<div class="actions-container" part="actions-container">
|
|
89
|
+
<slot name="main-cta" @slotchange=${this.handleSlotChange}></slot>
|
|
90
|
+
${this.modalButtonTemplate()}
|
|
91
|
+
</div>
|
|
92
|
+
</nav>
|
|
93
|
+
<div part="modal" class="modal" @click=${this.handleModalClick}>
|
|
94
|
+
<slot name="ctas"></slot>
|
|
95
|
+
</div>
|
|
96
|
+
</div>
|
|
97
|
+
`;
|
|
88
98
|
}
|
|
89
99
|
};
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
],
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
],
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
],
|
|
100
|
+
l.styles = [v];
|
|
101
|
+
n([
|
|
102
|
+
h({ type: Boolean, converter: m, reflect: !0 })
|
|
103
|
+
], l.prototype, "open", 2);
|
|
104
|
+
n([
|
|
105
|
+
u({ slot: "main-cta", selector: "ds-button", flatten: !0 })
|
|
106
|
+
], l.prototype, "mainCtas", 2);
|
|
107
|
+
l = n([
|
|
108
|
+
c("ds-sidebar-navigation")
|
|
109
|
+
], l);
|
|
100
110
|
export {
|
|
101
|
-
|
|
111
|
+
l as DsSidebarNavigation
|
|
102
112
|
};
|
|
@@ -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.85", 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");
|
|
@@ -21,6 +21,13 @@ const e = {
|
|
|
21
21
|
{ name: "seat", weight: "500", file: "SeatBcn-Medium" },
|
|
22
22
|
{ name: "seat", weight: "700", file: "SeatBcn-Bold" }
|
|
23
23
|
]
|
|
24
|
+
},
|
|
25
|
+
"seat-legacy": {
|
|
26
|
+
fonts: [
|
|
27
|
+
{ name: "seat", weight: "400", file: "SeatBcn-Regular" },
|
|
28
|
+
{ name: "seat", weight: "500", file: "SeatBcn-Medium" },
|
|
29
|
+
{ name: "seat", weight: "700", file: "SeatBcn-Bold" }
|
|
30
|
+
]
|
|
24
31
|
}
|
|
25
32
|
};
|
|
26
33
|
export {
|
|
@@ -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.85"), 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.85"), 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.85/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-85"), 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-85"), e = i(o);
|
|
7
7
|
return n`${e}`;
|
|
8
8
|
}
|
|
9
9
|
export {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const seatStyles: import("lit").CSSResult[];
|
|
@@ -3,10 +3,15 @@ import { type PropertyValues } from 'lit';
|
|
|
3
3
|
import type { DsSidebarNavigationAttrs } from './ds-sidebar-navigation.types';
|
|
4
4
|
export declare class DsSidebarNavigation extends UiKitElement implements DsSidebarNavigationAttrs {
|
|
5
5
|
static styles: import("lit").CSSResult[];
|
|
6
|
-
|
|
6
|
+
open: DsSidebarNavigationAttrs['open'];
|
|
7
7
|
mainCtas: Array<Node>;
|
|
8
|
+
private scrollLocked;
|
|
9
|
+
private savedBodyOverflow;
|
|
8
10
|
protected firstUpdated(_changedProperties: PropertyValues): void;
|
|
11
|
+
protected updated(_changedProperties: PropertyValues): void;
|
|
12
|
+
disconnectedCallback(): void;
|
|
9
13
|
private toggleModal;
|
|
14
|
+
private handleModalClick;
|
|
10
15
|
private modalButtonTemplate;
|
|
11
16
|
private handleSlotChange;
|
|
12
17
|
private setMainCtaSize;
|