@cupra/ui-kit 2.0.0-canary.118 → 2.0.0-canary.119

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/cjs/components/ds-currency/ds-currency.cjs +1 -3
  2. package/dist/cjs/components/ds-currency/styles/common.styles.cjs +2 -2
  3. package/dist/cjs/components/ds-link-button/ds-link-button.cjs +2 -2
  4. package/dist/cjs/components/ds-theme-provider/ds-theme-provider.cjs +1 -1
  5. package/dist/cjs/decorators/customUiKitElement.cjs +1 -1
  6. package/dist/cjs/utils/IconsManager.cjs +1 -1
  7. package/dist/cjs/utils/PubSub.cjs +1 -1
  8. package/dist/cjs/utils/StylesRegistry/StylesRegistry.cjs +1 -1
  9. package/dist/cjs/utils/cssWithTokens.cjs +1 -1
  10. package/dist/cjs/utils/htmlWithTokens.cjs +1 -1
  11. package/dist/cjs/utils/version.cjs +1 -1
  12. package/dist/esm/components/ds-currency/ds-currency.js +5 -7
  13. package/dist/esm/components/ds-currency/styles/common.styles.js +2 -2
  14. package/dist/esm/components/ds-link-button/ds-link-button.js +2 -2
  15. package/dist/esm/components/ds-theme-provider/ds-theme-provider.js +1 -1
  16. package/dist/esm/decorators/customUiKitElement.js +1 -1
  17. package/dist/esm/utils/IconsManager.js +1 -1
  18. package/dist/esm/utils/PubSub.js +1 -1
  19. package/dist/esm/utils/StylesRegistry/StylesRegistry.js +1 -1
  20. package/dist/esm/utils/cssWithTokens.js +1 -1
  21. package/dist/esm/utils/htmlWithTokens.js +1 -1
  22. package/dist/esm/utils/version.js +1 -1
  23. package/dist-react/cjs/components/ds-currency/ds-currency.cjs +1 -3
  24. package/dist-react/cjs/components/ds-currency/styles/common.styles.cjs +2 -2
  25. package/dist-react/cjs/components/ds-link-button/ds-link-button.cjs +2 -2
  26. package/dist-react/cjs/components/ds-theme-provider/ds-theme-provider.cjs +1 -1
  27. package/dist-react/cjs/decorators/customUiKitElement.cjs +1 -1
  28. package/dist-react/cjs/utils/IconsManager.cjs +1 -1
  29. package/dist-react/cjs/utils/PubSub.cjs +1 -1
  30. package/dist-react/cjs/utils/StylesRegistry/StylesRegistry.cjs +1 -1
  31. package/dist-react/cjs/utils/cssWithTokens.cjs +1 -1
  32. package/dist-react/cjs/utils/htmlWithTokens.cjs +1 -1
  33. package/dist-react/cjs/utils/version.cjs +1 -1
  34. package/dist-react/esm/components/ds-currency/ds-currency.js +5 -7
  35. package/dist-react/esm/components/ds-currency/styles/common.styles.js +2 -2
  36. package/dist-react/esm/components/ds-link-button/ds-link-button.js +2 -2
  37. package/dist-react/esm/components/ds-theme-provider/ds-theme-provider.js +1 -1
  38. package/dist-react/esm/decorators/customUiKitElement.js +1 -1
  39. package/dist-react/esm/utils/IconsManager.js +1 -1
  40. package/dist-react/esm/utils/PubSub.js +1 -1
  41. package/dist-react/esm/utils/StylesRegistry/StylesRegistry.js +1 -1
  42. package/dist-react/esm/utils/cssWithTokens.js +1 -1
  43. package/dist-react/esm/utils/htmlWithTokens.js +1 -1
  44. package/dist-react/esm/utils/version.js +1 -1
  45. package/package.json +1 -1
@@ -2,6 +2,4 @@ const e=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/l
2
2
  ${r===`left`?e.x`<span class=${a.e(c)}>${n}</span>`:e.E}
3
3
  <span class=${a.e(s)}>${i}</span>
4
4
  ${r===`right`?e.x`<span class=${a.e(c)}>${n}</span>`:e.E}
5
- `}get periodTemplate(){if(!this.period)return e.E;let t=new Intl.DisplayNames(this.locale,{type:`dateTimeField`});return e.x`
6
- <span class=${a.e({period:!0,text:!0,[`size-${this.periodSize}`]:!0,[`weight-${this.periodWeight}`]:!0})}"period">/${t.of(this.period)}</span>
7
- `}get noteTemplate(){return this.note?e.x` <span class=${a.e({note:!0,text:!0,[`size-${this.noteSize}`]:!0,[`weight-${this.noteWeight}`]:!0})}>${this.note}</span> `:e.E}render(){return e.x` <div class="container">${this.valueTemplate} ${this.noteTemplate} ${this.periodTemplate}</div> `}};n.__decorate([t.n({type:String})],c.prototype,`locale`,void 0),n.__decorate([t.n({type:String,attribute:`currency-code`})],c.prototype,`currencyCode`,void 0),n.__decorate([t.n({type:String,attribute:`currency-display`})],c.prototype,`currencyDisplay`,void 0),n.__decorate([t.n({type:String,attribute:`amount-text`})],c.prototype,`amountText`,void 0),n.__decorate([t.n({type:Number,attribute:`amount-number`})],c.prototype,`amountNumber`,void 0),n.__decorate([t.n({type:Number,attribute:`minimum-fraction-digits`})],c.prototype,`minimumFractionDigits`,void 0),n.__decorate([t.n({type:Number,attribute:`maximum-fraction-digits`})],c.prototype,`maximumFractionDigits`,void 0),n.__decorate([t.n({type:String})],c.prototype,`period`,void 0),n.__decorate([t.n({type:String})],c.prototype,`note`,void 0),n.__decorate([t.n({type:String,attribute:`thousand-separator`})],c.prototype,`thousandSeparator`,void 0),n.__decorate([t.n({type:String,attribute:`fraction-separator`})],c.prototype,`fractionSeparator`,void 0),n.__decorate([t.n({type:String,attribute:`amount-size`})],c.prototype,`amountSize`,void 0),n.__decorate([t.n({type:String,attribute:`amount-weight`})],c.prototype,`amountWeight`,void 0),n.__decorate([t.n({type:String,attribute:`currency-size`})],c.prototype,`currencySize`,void 0),n.__decorate([t.n({type:String,attribute:`currency-weight`})],c.prototype,`currencyWeight`,void 0),n.__decorate([t.n({type:String,attribute:`period-size`})],c.prototype,`periodSize`,void 0),n.__decorate([t.n({type:String,attribute:`period-weight`})],c.prototype,`periodWeight`,void 0),n.__decorate([t.n({type:String,attribute:`note-size`})],c.prototype,`noteSize`,void 0),n.__decorate([t.n({type:String,attribute:`note-weight`})],c.prototype,`noteWeight`,void 0),c=n.__decorate([i.customUiKitElement(`ds-currency`)],c);
5
+ `}get periodTemplate(){if(!this.period)return e.E;let t=new Intl.DisplayNames(this.locale,{type:`dateTimeField`});return e.x`<span class=${a.e({period:!0,text:!0,[`size-${this.periodSize}`]:!0,[`weight-${this.periodWeight}`]:!0})}"period">/${t.of(this.period)}</span>`}get noteTemplate(){return this.note?e.x`<span class=${a.e({note:!0,text:!0,[`size-${this.noteSize}`]:!0,[`weight-${this.noteWeight}`]:!0})}>${this.note}</span>`:e.E}render(){return e.x`<div class="container">${this.valueTemplate}${this.periodTemplate}${this.noteTemplate}</div>`}};n.__decorate([t.n({type:String})],c.prototype,`locale`,void 0),n.__decorate([t.n({type:String,attribute:`currency-code`})],c.prototype,`currencyCode`,void 0),n.__decorate([t.n({type:String,attribute:`currency-display`})],c.prototype,`currencyDisplay`,void 0),n.__decorate([t.n({type:String,attribute:`amount-text`})],c.prototype,`amountText`,void 0),n.__decorate([t.n({type:Number,attribute:`amount-number`})],c.prototype,`amountNumber`,void 0),n.__decorate([t.n({type:Number,attribute:`minimum-fraction-digits`})],c.prototype,`minimumFractionDigits`,void 0),n.__decorate([t.n({type:Number,attribute:`maximum-fraction-digits`})],c.prototype,`maximumFractionDigits`,void 0),n.__decorate([t.n({type:String})],c.prototype,`period`,void 0),n.__decorate([t.n({type:String})],c.prototype,`note`,void 0),n.__decorate([t.n({type:String,attribute:`thousand-separator`})],c.prototype,`thousandSeparator`,void 0),n.__decorate([t.n({type:String,attribute:`fraction-separator`})],c.prototype,`fractionSeparator`,void 0),n.__decorate([t.n({type:String,attribute:`amount-size`})],c.prototype,`amountSize`,void 0),n.__decorate([t.n({type:String,attribute:`amount-weight`})],c.prototype,`amountWeight`,void 0),n.__decorate([t.n({type:String,attribute:`currency-size`})],c.prototype,`currencySize`,void 0),n.__decorate([t.n({type:String,attribute:`currency-weight`})],c.prototype,`currencyWeight`,void 0),n.__decorate([t.n({type:String,attribute:`period-size`})],c.prototype,`periodSize`,void 0),n.__decorate([t.n({type:String,attribute:`period-weight`})],c.prototype,`periodWeight`,void 0),n.__decorate([t.n({type:String,attribute:`note-size`})],c.prototype,`noteSize`,void 0),n.__decorate([t.n({type:String,attribute:`note-weight`})],c.prototype,`noteWeight`,void 0),c=n.__decorate([i.customUiKitElement(`ds-currency`)],c);
@@ -1,10 +1,10 @@
1
1
  const e=require(`../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.cjs`);require(`../../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.cjs`);var t=e.i`
2
2
  :host {
3
- display: inline;
3
+ display: contents;
4
4
  }
5
5
 
6
6
  .container {
7
7
  display: inline-flex;
8
- align-items: flex-end;
8
+ align-items: baseline;
9
9
  }
10
10
  `;exports.commonStyles=t;
@@ -10,7 +10,7 @@ require(`../ds-theme-provider/themeContext.cjs`);const e=require(`../../node_mod
10
10
  ${c.r(this.htmlTagName||`button`,[[`button`,()=>e.x`
11
11
  <button class=${s.e(this.classes)} ?disabled=${this.disabled}>
12
12
  ${this.iconPosition===`left`?this.iconTemplate:e.E}
13
- <slot></slot>
13
+ <span class="label"><slot></slot></span>
14
14
  ${this.iconPosition===`right`?this.iconTemplate:e.E}
15
15
  </button>
16
16
  `],[`a`,()=>e.x`
@@ -23,7 +23,7 @@ require(`../ds-theme-provider/themeContext.cjs`);const e=require(`../../node_mod
23
23
  ?disabled=${this.disabled}
24
24
  >
25
25
  ${this.iconPosition===`left`?this.iconTemplate:e.E}
26
- <slot></slot>
26
+ <span class="label"><slot></slot></span>
27
27
  ${this.iconPosition===`right`?this.iconTemplate:e.E}
28
28
  </a>
29
29
  `]])}
@@ -1,4 +1,4 @@
1
1
  const e=require(`../../node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/decorators/provide.cjs`),t=require(`./themeContext.cjs`),n=require(`../../core/theme.constants.cjs`),r=require(`../../utils/PubSub.cjs`),i=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs`),a=require(`../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.cjs`);const o=require(`../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.cjs`),s=require(`../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/decorators.cjs`);const c=require(`../../_virtual/_@oxc-project_runtime@0.122.0/helpers/decorate.cjs`),l=require(`../../decorators/customUiKitElement.cjs`),u=require(`../../utils/booleanConverter.cjs`),d=require(`../../styles/source/shared/fonts-config.cjs`);var f=class extends a.i{constructor(...e){super(...e),this.loadFonts=!0,this.loadStyles=!0,this.cssLoaded=!1,this.loadedFonts=new Set}updated(e){super.updated(e),e.has(`theme`)&&(r.pubSub.publish(`theme`,this.theme),sessionStorage?.setItem(n.THEME_STORAGE_KEY,this.theme),typeof FontFace<`u`&&document?.fonts&&this.loadThemeFonts(),this.loadThemeStyles().then(()=>{this.cssLoaded=!0,this.dispatchEvent(new CustomEvent(`ui-kit:ready`,{bubbles:!0,composed:!0}))}))}loadThemeFonts(){d.fontsConfig[this.theme]?.fonts.forEach(e=>{this.loadThemeFont(e)})}async loadThemeFont({weight:e,name:t,file:n}){if(!this.loadFonts)return Promise.resolve();let r=`${t}-${e}`;if(this.loadedFonts.has(r))return;let i=new FontFace(t,`url('https://ds-assets.cupra.com/fonts/${this.theme}/${n}.woff2') format('woff2'),
2
2
  url('https://ds-assets.cupra.com/fonts/${this.theme}/${n}.woff') format('woff'),
3
3
  url('https://ds-assets.cupra.com/fonts/${this.theme}/${n}.ttf') format('truetype'),
4
- url('https://ds-assets.cupra.com/fonts/${this.theme}/${n}.otf') format('opentype')`,{style:`normal`,weight:e,display:`swap`});try{await i.load(),document.fonts.add(i),this.loadedFonts.add(r)}catch(n){console.error(`Error loading "${t}" font with "${e}" weight:`,n)}}loadThemeStyles(){return this.loadStyles?new Promise((e,t)=>{let n=`/2.0.0-canary.118`,r=`https://ds-assets.cupra.com${n}/styles/${this.theme}/theme.css`;if(document.head.querySelector(`link[href="${r}"]`))e();else{let i=`ui-kit-theme-${n}`,a=document.getElementById(i),o=document.createElement(`link`);o.id=i,o.rel=`stylesheet`,o.href=r,o.onload=()=>e(),o.onerror=()=>t(Error(`Failed to load theme CSS: ${r}`)),document.head.appendChild(o),a?.remove()}}):Promise.resolve()}render(){return this.cssLoaded?i.x`<slot></slot>`:i.E}};c.__decorate([o.n({type:Boolean,converter:u.booleanConverter,attribute:`load-fonts`})],f.prototype,`loadFonts`,void 0),c.__decorate([o.n({type:Boolean,converter:u.booleanConverter,attribute:`load-styles`})],f.prototype,`loadStyles`,void 0),c.__decorate([e.e({context:t.themeContext}),o.n({type:String})],f.prototype,`theme`,void 0),c.__decorate([s.r()],f.prototype,`cssLoaded`,void 0),c.__decorate([s.r()],f.prototype,`loadedFonts`,void 0),f=c.__decorate([l.customUiKitElement(`ds-theme-provider`)],f);
4
+ url('https://ds-assets.cupra.com/fonts/${this.theme}/${n}.otf') format('opentype')`,{style:`normal`,weight:e,display:`swap`});try{await i.load(),document.fonts.add(i),this.loadedFonts.add(r)}catch(n){console.error(`Error loading "${t}" font with "${e}" weight:`,n)}}loadThemeStyles(){return this.loadStyles?new Promise((e,t)=>{let n=`/2.0.0-canary.119`,r=`https://ds-assets.cupra.com${n}/styles/${this.theme}/theme.css`;if(document.head.querySelector(`link[href="${r}"]`))e();else{let i=`ui-kit-theme-${n}`,a=document.getElementById(i),o=document.createElement(`link`);o.id=i,o.rel=`stylesheet`,o.href=r,o.onload=()=>e(),o.onerror=()=>t(Error(`Failed to load theme CSS: ${r}`)),document.head.appendChild(o),a?.remove()}}):Promise.resolve()}render(){return this.cssLoaded?i.x`<slot></slot>`:i.E}};c.__decorate([o.n({type:Boolean,converter:u.booleanConverter,attribute:`load-fonts`})],f.prototype,`loadFonts`,void 0),c.__decorate([o.n({type:Boolean,converter:u.booleanConverter,attribute:`load-styles`})],f.prototype,`loadStyles`,void 0),c.__decorate([e.e({context:t.themeContext}),o.n({type:String})],f.prototype,`theme`,void 0),c.__decorate([s.r()],f.prototype,`cssLoaded`,void 0),c.__decorate([s.r()],f.prototype,`loadedFonts`,void 0),f=c.__decorate([l.customUiKitElement(`ds-theme-provider`)],f);
@@ -1 +1 @@
1
- const e=require(`../utils/version.cjs`),t=require(`../utils/componentFactory.cjs`);function n(n,r){return function(i){if(!i?.prototype)throw TypeError(`@customUiKitElement requires a class that extends HTMLElement.`);let a=typeof __UIKIT_TARGET__<`u`&&__UIKIT_TARGET__===`react`,o=a?`${n}${e.VERSION_TAG_SUFFIX}`:n;if(globalThis?.customElements?.get(o))return;let s=r?.skipTagAsComponentName?[]:[n];Array.isArray(r?.extendComponentNames)&&(s=[...r.extendComponentNames,...s]),globalThis?.customElements?.define?.(o,class extends i{constructor(...e){super(...e),this.componentFactory=a?t.reactFactory:t.standardFactory}static{this.componentName=s}connectedCallback(){i.prototype.connectedCallback?.call(this),this.setAttribute(`data-ui-kit-version`,`2.0.0-canary.118`)}})}}exports.customUiKitElement=n;
1
+ const e=require(`../utils/version.cjs`),t=require(`../utils/componentFactory.cjs`);function n(n,r){return function(i){if(!i?.prototype)throw TypeError(`@customUiKitElement requires a class that extends HTMLElement.`);let a=typeof __UIKIT_TARGET__<`u`&&__UIKIT_TARGET__===`react`,o=a?`${n}${e.VERSION_TAG_SUFFIX}`:n;if(globalThis?.customElements?.get(o))return;let s=r?.skipTagAsComponentName?[]:[n];Array.isArray(r?.extendComponentNames)&&(s=[...r.extendComponentNames,...s]),globalThis?.customElements?.define?.(o,class extends i{constructor(...e){super(...e),this.componentFactory=a?t.reactFactory:t.standardFactory}static{this.componentName=s}connectedCallback(){i.prototype.connectedCallback?.call(this),this.setAttribute(`data-ui-kit-version`,`2.0.0-canary.119`)}})}}exports.customUiKitElement=n;
@@ -1 +1 @@
1
- const e=require(`../core/theme.constants.cjs`),t=require(`./PubSub.cjs`);var n=class{constructor(){this.icons={},this.handleChangeTheme=e=>{if(this.theme===e)return;this.theme=e;let t=Object.keys(this.icons);this.icons={},t.forEach(e=>this.fetchIcon(e))},this.fetchIcon=async(t,n={})=>{let r=typeof sessionStorage<`u`?sessionStorage?.getItem(e.THEME_STORAGE_KEY):null;!this.theme&&r&&(this.theme=r);let i=this.icons[t];if(i)return await i;let a=this.loadIcon(t,n).catch(e=>{throw delete this.icons[t],e});return this.icons[t]=a,a},this.loadIcon=(e,{cache:t=`force-cache`,...n})=>!this.theme||typeof fetch>`u`?Promise.resolve(`<svg class="ds-icon"></svg>`):fetch(`https://ds-assets.cupra.com/icons/${this.theme}/${e}.svg`,{cache:t,...n}).then(e=>e.text()).catch(t=>{if(t?.name===`AbortError`)throw t;return console.error(`Failed to fetch icon "${e}":`,t),``}),t.pubSub.subscribe(`theme`,this.handleChangeTheme)}},r=Symbol.for(`@cupra/ui-kit/icons-manager/2.0.0-canary.118`),i=globalThis,a=i[r];a||(a=new n,Object.defineProperty(i,r,{value:a,writable:!1,configurable:!1,enumerable:!1}));var o=a;exports.iconsManager=o;
1
+ const e=require(`../core/theme.constants.cjs`),t=require(`./PubSub.cjs`);var n=class{constructor(){this.icons={},this.handleChangeTheme=e=>{if(this.theme===e)return;this.theme=e;let t=Object.keys(this.icons);this.icons={},t.forEach(e=>this.fetchIcon(e))},this.fetchIcon=async(t,n={})=>{let r=typeof sessionStorage<`u`?sessionStorage?.getItem(e.THEME_STORAGE_KEY):null;!this.theme&&r&&(this.theme=r);let i=this.icons[t];if(i)return await i;let a=this.loadIcon(t,n).catch(e=>{throw delete this.icons[t],e});return this.icons[t]=a,a},this.loadIcon=(e,{cache:t=`force-cache`,...n})=>!this.theme||typeof fetch>`u`?Promise.resolve(`<svg class="ds-icon"></svg>`):fetch(`https://ds-assets.cupra.com/icons/${this.theme}/${e}.svg`,{cache:t,...n}).then(e=>e.text()).catch(t=>{if(t?.name===`AbortError`)throw t;return console.error(`Failed to fetch icon "${e}":`,t),``}),t.pubSub.subscribe(`theme`,this.handleChangeTheme)}},r=Symbol.for(`@cupra/ui-kit/icons-manager/2.0.0-canary.119`),i=globalThis,a=i[r];a||(a=new n,Object.defineProperty(i,r,{value:a,writable:!1,configurable:!1,enumerable:!1}));var o=a;exports.iconsManager=o;
@@ -1 +1 @@
1
- var e=class{constructor(){this.subscribers={},this.lastPublishedData={}}subscribe(e,t){return this.subscribers[e]||(this.subscribers[e]=[]),this.subscribers[e].push(t),this.lastPublishedData[e]}unsubscribe(e,t){this.subscribers[e]&&(this.subscribers[e]=this.subscribers[e].filter(e=>e!==t))}publish(e,t){this.lastPublishedData[e]=t,this.subscribers[e]&&this.subscribers[e].forEach(n=>{try{n(t)}catch(t){console.error(`Error in subscriber for event "${e}":`,t)}})}},t=Symbol.for(`@cupra/ui-kit/pubsub/2.0.0-canary.118`),n=globalThis,r=n[t];r||(r=new e,Object.defineProperty(n,t,{value:r,writable:!1,configurable:!1,enumerable:!1}));var i=r;exports.pubSub=i;
1
+ var e=class{constructor(){this.subscribers={},this.lastPublishedData={}}subscribe(e,t){return this.subscribers[e]||(this.subscribers[e]=[]),this.subscribers[e].push(t),this.lastPublishedData[e]}unsubscribe(e,t){this.subscribers[e]&&(this.subscribers[e]=this.subscribers[e].filter(e=>e!==t))}publish(e,t){this.lastPublishedData[e]=t,this.subscribers[e]&&this.subscribers[e].forEach(n=>{try{n(t)}catch(t){console.error(`Error in subscriber for event "${e}":`,t)}})}},t=Symbol.for(`@cupra/ui-kit/pubsub/2.0.0-canary.119`),n=globalThis,r=n[t];r||(r=new e,Object.defineProperty(n,t,{value:r,writable:!1,configurable:!1,enumerable:!1}));var i=r;exports.pubSub=i;
@@ -1 +1 @@
1
- var e=require(`../concurrencyLimit.cjs`).concurrencyLimit(20),t=class t{constructor(){this.stylePromises=new Map,this.getStyles=async({componentName:t,theme:n})=>{if(!n||!t)return;let r=`https://ds-assets.cupra.com/2.0.0-canary.118/styles/${n}/components/${t}.css`,i=this.getCachedStyleSheetPromise({url:r});if(i)return i;let a=e(()=>this.fetchStyle({url:r})).then(e=>(e||this.stylePromises.delete(r),e));return this.stylePromises.set(r,a),this.stylePromises.get(r)}}async fetchStyle({url:e}){try{if(typeof fetch>`u`)return;let 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 t.instance||=new t,t.instance}}.getInstance();exports.stylesRegistry=t;
1
+ var e=require(`../concurrencyLimit.cjs`).concurrencyLimit(20),t=class t{constructor(){this.stylePromises=new Map,this.getStyles=async({componentName:t,theme:n})=>{if(!n||!t)return;let r=`https://ds-assets.cupra.com/2.0.0-canary.119/styles/${n}/components/${t}.css`,i=this.getCachedStyleSheetPromise({url:r});if(i)return i;let a=e(()=>this.fetchStyle({url:r})).then(e=>(e||this.stylePromises.delete(r),e));return this.stylePromises.set(r,a),this.stylePromises.get(r)}}async fetchStyle({url:e}){try{if(typeof fetch>`u`)return;let 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 t.instance||=new t,t.instance}}.getInstance();exports.stylesRegistry=t;
@@ -1 +1 @@
1
- const e=require(`../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.cjs`);require(`../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.cjs`);function t(t,...n){return e.i`${e.r(String.raw({raw:t},...n).replace(/(--private-[\w-]+)(?=\s*[):,])/g,`$1-v2-0-0-canary-118`))}`}exports.cssWithTokens=t;
1
+ const e=require(`../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.cjs`);require(`../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.cjs`);function t(t,...n){return e.i`${e.r(String.raw({raw:t},...n).replace(/(--private-[\w-]+)(?=\s*[):,])/g,`$1-v2-0-0-canary-119`))}`}exports.cssWithTokens=t;
@@ -1 +1 @@
1
- const e=require(`../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs`);require(`../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.cjs`);const t=require(`../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/unsafe-html.cjs`);require(`../node_modules/.pnpm/lit@3.3.1/node_modules/lit/directives/unsafe-html.cjs`);function n(n,...r){return e.x`${t.o(String.raw({raw:n},...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g,`$1-v2-0-0-canary-118`))}`}exports.htmlWithTokens=n;
1
+ const e=require(`../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs`);require(`../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.cjs`);const t=require(`../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/unsafe-html.cjs`);require(`../node_modules/.pnpm/lit@3.3.1/node_modules/lit/directives/unsafe-html.cjs`);function n(n,...r){return e.x`${t.o(String.raw({raw:n},...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g,`$1-v2-0-0-canary-119`))}`}exports.htmlWithTokens=n;
@@ -1 +1 @@
1
- var e=`2.0.0-canary.118`,t=`--v${e.replaceAll(`.`,`-`)}`;exports.VERSION=e,exports.VERSION_TAG_SUFFIX=t;
1
+ var e=`2.0.0-canary.119`,t=`--v${e.replaceAll(`.`,`-`)}`;exports.VERSION=e,exports.VERSION_TAG_SUFFIX=t;
@@ -50,25 +50,23 @@ var l = class extends i {
50
50
  get periodTemplate() {
51
51
  if (!this.period) return e;
52
52
  let n = new Intl.DisplayNames(this.locale, { type: "dateTimeField" });
53
- return t`
54
- <span class=${o({
53
+ return t`<span class=${o({
55
54
  period: !0,
56
55
  text: !0,
57
56
  [`size-${this.periodSize}`]: !0,
58
57
  [`weight-${this.periodWeight}`]: !0
59
- })}"period">/${n.of(this.period)}</span>
60
- `;
58
+ })}"period">/${n.of(this.period)}</span>`;
61
59
  }
62
60
  get noteTemplate() {
63
- return this.note ? t` <span class=${o({
61
+ return this.note ? t`<span class=${o({
64
62
  note: !0,
65
63
  text: !0,
66
64
  [`size-${this.noteSize}`]: !0,
67
65
  [`weight-${this.noteWeight}`]: !0
68
- })}>${this.note}</span> ` : e;
66
+ })}>${this.note}</span>` : e;
69
67
  }
70
68
  render() {
71
- return t` <div class="container">${this.valueTemplate} ${this.noteTemplate} ${this.periodTemplate}</div> `;
69
+ return t`<div class="container">${this.valueTemplate}${this.periodTemplate}${this.noteTemplate}</div>`;
72
70
  }
73
71
  };
74
72
  r([n({ type: String })], l.prototype, "locale", void 0), r([n({
@@ -3,12 +3,12 @@ import "../../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.js";
3
3
  //#region src/components/ds-currency/styles/common.styles.ts
4
4
  var t = e`
5
5
  :host {
6
- display: inline;
6
+ display: contents;
7
7
  }
8
8
 
9
9
  .container {
10
10
  display: inline-flex;
11
- align-items: flex-end;
11
+ align-items: baseline;
12
12
  }
13
13
  `;
14
14
  //#endregion
@@ -54,7 +54,7 @@ var d = class extends i {
54
54
  ${l(this.htmlTagName || "button", [["button", () => t`
55
55
  <button class=${c(this.classes)} ?disabled=${this.disabled}>
56
56
  ${this.iconPosition === "left" ? this.iconTemplate : e}
57
- <slot></slot>
57
+ <span class="label"><slot></slot></span>
58
58
  ${this.iconPosition === "right" ? this.iconTemplate : e}
59
59
  </button>
60
60
  `], ["a", () => t`
@@ -67,7 +67,7 @@ var d = class extends i {
67
67
  ?disabled=${this.disabled}
68
68
  >
69
69
  ${this.iconPosition === "left" ? this.iconTemplate : e}
70
- <slot></slot>
70
+ <span class="label"><slot></slot></span>
71
71
  ${this.iconPosition === "right" ? this.iconTemplate : e}
72
72
  </a>
73
73
  `]])}
@@ -50,7 +50,7 @@ var p = class extends o {
50
50
  }
51
51
  loadThemeStyles() {
52
52
  return this.loadStyles ? new Promise((e, t) => {
53
- let n = "/2.0.0-canary.118", r = `https://ds-assets.cupra.com${n}/styles/${this.theme}/theme.css`;
53
+ let n = "/2.0.0-canary.119", r = `https://ds-assets.cupra.com${n}/styles/${this.theme}/theme.css`;
54
54
  if (document.head.querySelector(`link[href="${r}"]`)) e();
55
55
  else {
56
56
  let i = `ui-kit-theme-${n}`, a = document.getElementById(i), o = document.createElement("link");
@@ -15,7 +15,7 @@ function r(r, i) {
15
15
  this.componentName = c;
16
16
  }
17
17
  connectedCallback() {
18
- a.prototype.connectedCallback?.call(this), this.setAttribute("data-ui-kit-version", "2.0.0-canary.118");
18
+ a.prototype.connectedCallback?.call(this), this.setAttribute("data-ui-kit-version", "2.0.0-canary.119");
19
19
  }
20
20
  });
21
21
  };
@@ -25,7 +25,7 @@ var n = class {
25
25
  return console.error(`Failed to fetch icon "${e}":`, t), "";
26
26
  }), t.subscribe("theme", this.handleChangeTheme);
27
27
  }
28
- }, r = Symbol.for("@cupra/ui-kit/icons-manager/2.0.0-canary.118"), i = globalThis, a = i[r];
28
+ }, r = Symbol.for("@cupra/ui-kit/icons-manager/2.0.0-canary.119"), i = globalThis, a = i[r];
29
29
  a || (a = new n(), Object.defineProperty(i, r, {
30
30
  value: a,
31
31
  writable: !1,
@@ -18,7 +18,7 @@ var e = class {
18
18
  }
19
19
  });
20
20
  }
21
- }, t = Symbol.for("@cupra/ui-kit/pubsub/2.0.0-canary.118"), n = globalThis, r = n[t];
21
+ }, t = Symbol.for("@cupra/ui-kit/pubsub/2.0.0-canary.119"), n = globalThis, r = n[t];
22
22
  r || (r = new e(), Object.defineProperty(n, t, {
23
23
  value: r,
24
24
  writable: !1,
@@ -4,7 +4,7 @@ var t = e(20), n = class e {
4
4
  constructor() {
5
5
  this.stylePromises = /* @__PURE__ */ new Map(), this.getStyles = async ({ componentName: e, theme: n }) => {
6
6
  if (!n || !e) return;
7
- let r = `https://ds-assets.cupra.com/2.0.0-canary.118/styles/${n}/components/${e}.css`, i = this.getCachedStyleSheetPromise({ url: r });
7
+ let r = `https://ds-assets.cupra.com/2.0.0-canary.119/styles/${n}/components/${e}.css`, i = this.getCachedStyleSheetPromise({ url: r });
8
8
  if (i) return i;
9
9
  let a = t(() => this.fetchStyle({ url: r })).then((e) => (e || this.stylePromises.delete(r), e));
10
10
  return this.stylePromises.set(r, a), this.stylePromises.get(r);
@@ -2,7 +2,7 @@ import { i as e, r as t } from "../node_modules/.pnpm/@lit_reactive-element@2.1.
2
2
  import "../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.js";
3
3
  //#region src/utils/cssWithTokens.ts
4
4
  function n(n, ...r) {
5
- return e`${t(String.raw({ raw: n }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v2-0-0-canary-118"))}`;
5
+ return e`${t(String.raw({ raw: n }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v2-0-0-canary-119"))}`;
6
6
  }
7
7
  //#endregion
8
8
  export { n as cssWithTokens };
@@ -4,7 +4,7 @@ import { o as t } from "../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-ht
4
4
  import "../node_modules/.pnpm/lit@3.3.1/node_modules/lit/directives/unsafe-html.js";
5
5
  //#region src/utils/htmlWithTokens.ts
6
6
  function n(n, ...r) {
7
- return e`${t(String.raw({ raw: n }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v2-0-0-canary-118"))}`;
7
+ return e`${t(String.raw({ raw: n }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v2-0-0-canary-119"))}`;
8
8
  }
9
9
  //#endregion
10
10
  export { n as htmlWithTokens };
@@ -1,4 +1,4 @@
1
1
  //#region src/utils/version.ts
2
- var e = "2.0.0-canary.118", t = `--v${e.replaceAll(".", "-")}`;
2
+ var e = "2.0.0-canary.119", t = `--v${e.replaceAll(".", "-")}`;
3
3
  //#endregion
4
4
  export { e as VERSION, t as VERSION_TAG_SUFFIX };
@@ -2,6 +2,4 @@ const e=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/l
2
2
  ${r===`left`?e.x`<span class=${a.e(c)}>${n}</span>`:e.E}
3
3
  <span class=${a.e(s)}>${i}</span>
4
4
  ${r===`right`?e.x`<span class=${a.e(c)}>${n}</span>`:e.E}
5
- `}get periodTemplate(){if(!this.period)return e.E;let t=new Intl.DisplayNames(this.locale,{type:`dateTimeField`});return e.x`
6
- <span class=${a.e({period:!0,text:!0,[`size-${this.periodSize}`]:!0,[`weight-${this.periodWeight}`]:!0})}"period">/${t.of(this.period)}</span>
7
- `}get noteTemplate(){return this.note?e.x` <span class=${a.e({note:!0,text:!0,[`size-${this.noteSize}`]:!0,[`weight-${this.noteWeight}`]:!0})}>${this.note}</span> `:e.E}render(){return e.x` <div class="container">${this.valueTemplate} ${this.noteTemplate} ${this.periodTemplate}</div> `}};n.__decorate([t.n({type:String})],c.prototype,`locale`,void 0),n.__decorate([t.n({type:String,attribute:`currency-code`})],c.prototype,`currencyCode`,void 0),n.__decorate([t.n({type:String,attribute:`currency-display`})],c.prototype,`currencyDisplay`,void 0),n.__decorate([t.n({type:String,attribute:`amount-text`})],c.prototype,`amountText`,void 0),n.__decorate([t.n({type:Number,attribute:`amount-number`})],c.prototype,`amountNumber`,void 0),n.__decorate([t.n({type:Number,attribute:`minimum-fraction-digits`})],c.prototype,`minimumFractionDigits`,void 0),n.__decorate([t.n({type:Number,attribute:`maximum-fraction-digits`})],c.prototype,`maximumFractionDigits`,void 0),n.__decorate([t.n({type:String})],c.prototype,`period`,void 0),n.__decorate([t.n({type:String})],c.prototype,`note`,void 0),n.__decorate([t.n({type:String,attribute:`thousand-separator`})],c.prototype,`thousandSeparator`,void 0),n.__decorate([t.n({type:String,attribute:`fraction-separator`})],c.prototype,`fractionSeparator`,void 0),n.__decorate([t.n({type:String,attribute:`amount-size`})],c.prototype,`amountSize`,void 0),n.__decorate([t.n({type:String,attribute:`amount-weight`})],c.prototype,`amountWeight`,void 0),n.__decorate([t.n({type:String,attribute:`currency-size`})],c.prototype,`currencySize`,void 0),n.__decorate([t.n({type:String,attribute:`currency-weight`})],c.prototype,`currencyWeight`,void 0),n.__decorate([t.n({type:String,attribute:`period-size`})],c.prototype,`periodSize`,void 0),n.__decorate([t.n({type:String,attribute:`period-weight`})],c.prototype,`periodWeight`,void 0),n.__decorate([t.n({type:String,attribute:`note-size`})],c.prototype,`noteSize`,void 0),n.__decorate([t.n({type:String,attribute:`note-weight`})],c.prototype,`noteWeight`,void 0),c=n.__decorate([i.customUiKitElement(`ds-currency`)],c);
5
+ `}get periodTemplate(){if(!this.period)return e.E;let t=new Intl.DisplayNames(this.locale,{type:`dateTimeField`});return e.x`<span class=${a.e({period:!0,text:!0,[`size-${this.periodSize}`]:!0,[`weight-${this.periodWeight}`]:!0})}"period">/${t.of(this.period)}</span>`}get noteTemplate(){return this.note?e.x`<span class=${a.e({note:!0,text:!0,[`size-${this.noteSize}`]:!0,[`weight-${this.noteWeight}`]:!0})}>${this.note}</span>`:e.E}render(){return e.x`<div class="container">${this.valueTemplate}${this.periodTemplate}${this.noteTemplate}</div>`}};n.__decorate([t.n({type:String})],c.prototype,`locale`,void 0),n.__decorate([t.n({type:String,attribute:`currency-code`})],c.prototype,`currencyCode`,void 0),n.__decorate([t.n({type:String,attribute:`currency-display`})],c.prototype,`currencyDisplay`,void 0),n.__decorate([t.n({type:String,attribute:`amount-text`})],c.prototype,`amountText`,void 0),n.__decorate([t.n({type:Number,attribute:`amount-number`})],c.prototype,`amountNumber`,void 0),n.__decorate([t.n({type:Number,attribute:`minimum-fraction-digits`})],c.prototype,`minimumFractionDigits`,void 0),n.__decorate([t.n({type:Number,attribute:`maximum-fraction-digits`})],c.prototype,`maximumFractionDigits`,void 0),n.__decorate([t.n({type:String})],c.prototype,`period`,void 0),n.__decorate([t.n({type:String})],c.prototype,`note`,void 0),n.__decorate([t.n({type:String,attribute:`thousand-separator`})],c.prototype,`thousandSeparator`,void 0),n.__decorate([t.n({type:String,attribute:`fraction-separator`})],c.prototype,`fractionSeparator`,void 0),n.__decorate([t.n({type:String,attribute:`amount-size`})],c.prototype,`amountSize`,void 0),n.__decorate([t.n({type:String,attribute:`amount-weight`})],c.prototype,`amountWeight`,void 0),n.__decorate([t.n({type:String,attribute:`currency-size`})],c.prototype,`currencySize`,void 0),n.__decorate([t.n({type:String,attribute:`currency-weight`})],c.prototype,`currencyWeight`,void 0),n.__decorate([t.n({type:String,attribute:`period-size`})],c.prototype,`periodSize`,void 0),n.__decorate([t.n({type:String,attribute:`period-weight`})],c.prototype,`periodWeight`,void 0),n.__decorate([t.n({type:String,attribute:`note-size`})],c.prototype,`noteSize`,void 0),n.__decorate([t.n({type:String,attribute:`note-weight`})],c.prototype,`noteWeight`,void 0),c=n.__decorate([i.customUiKitElement(`ds-currency`)],c);
@@ -1,10 +1,10 @@
1
1
  const e=require(`../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.cjs`);require(`../../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.cjs`);var t=e.i`
2
2
  :host {
3
- display: inline;
3
+ display: contents;
4
4
  }
5
5
 
6
6
  .container {
7
7
  display: inline-flex;
8
- align-items: flex-end;
8
+ align-items: baseline;
9
9
  }
10
10
  `;exports.commonStyles=t;
@@ -10,7 +10,7 @@ require(`../ds-theme-provider/themeContext.cjs`);const e=require(`../../node_mod
10
10
  ${c.r(this.htmlTagName||`button`,[[`button`,()=>e.x`
11
11
  <button class=${s.e(this.classes)} ?disabled=${this.disabled}>
12
12
  ${this.iconPosition===`left`?this.iconTemplate:e.E}
13
- <slot></slot>
13
+ <span class="label"><slot></slot></span>
14
14
  ${this.iconPosition===`right`?this.iconTemplate:e.E}
15
15
  </button>
16
16
  `],[`a`,()=>e.x`
@@ -23,7 +23,7 @@ require(`../ds-theme-provider/themeContext.cjs`);const e=require(`../../node_mod
23
23
  ?disabled=${this.disabled}
24
24
  >
25
25
  ${this.iconPosition===`left`?this.iconTemplate:e.E}
26
- <slot></slot>
26
+ <span class="label"><slot></slot></span>
27
27
  ${this.iconPosition===`right`?this.iconTemplate:e.E}
28
28
  </a>
29
29
  `]])}
@@ -1,4 +1,4 @@
1
1
  const e=require(`../../node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/decorators/provide.cjs`),t=require(`./themeContext.cjs`),n=require(`../../core/theme.constants.cjs`),r=require(`../../utils/PubSub.cjs`),i=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs`),a=require(`../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.cjs`);const o=require(`../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.cjs`),s=require(`../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/decorators.cjs`);const c=require(`../../_virtual/_@oxc-project_runtime@0.122.0/helpers/decorate.cjs`),l=require(`../../decorators/customUiKitElement.cjs`),u=require(`../../utils/booleanConverter.cjs`),d=require(`../../styles/source/shared/fonts-config.cjs`);var f=class extends a.i{constructor(...e){super(...e),this.loadFonts=!0,this.loadStyles=!0,this.cssLoaded=!1,this.loadedFonts=new Set}updated(e){super.updated(e),e.has(`theme`)&&(r.pubSub.publish(`theme`,this.theme),sessionStorage?.setItem(n.THEME_STORAGE_KEY,this.theme),typeof FontFace<`u`&&document?.fonts&&this.loadThemeFonts(),this.loadThemeStyles().then(()=>{this.cssLoaded=!0,this.dispatchEvent(new CustomEvent(`ui-kit:ready`,{bubbles:!0,composed:!0}))}))}loadThemeFonts(){d.fontsConfig[this.theme]?.fonts.forEach(e=>{this.loadThemeFont(e)})}async loadThemeFont({weight:e,name:t,file:n}){if(!this.loadFonts)return Promise.resolve();let r=`${t}-${e}`;if(this.loadedFonts.has(r))return;let i=new FontFace(t,`url('https://ds-assets.cupra.com/fonts/${this.theme}/${n}.woff2') format('woff2'),
2
2
  url('https://ds-assets.cupra.com/fonts/${this.theme}/${n}.woff') format('woff'),
3
3
  url('https://ds-assets.cupra.com/fonts/${this.theme}/${n}.ttf') format('truetype'),
4
- url('https://ds-assets.cupra.com/fonts/${this.theme}/${n}.otf') format('opentype')`,{style:`normal`,weight:e,display:`swap`});try{await i.load(),document.fonts.add(i),this.loadedFonts.add(r)}catch(n){console.error(`Error loading "${t}" font with "${e}" weight:`,n)}}loadThemeStyles(){return this.loadStyles?new Promise((e,t)=>{let n=`/2.0.0-canary.118`,r=`https://ds-assets.cupra.com${n}/styles/${this.theme}/theme.css`;if(document.head.querySelector(`link[href="${r}"]`))e();else{let i=`ui-kit-theme-${n}`,a=document.getElementById(i),o=document.createElement(`link`);o.id=i,o.rel=`stylesheet`,o.href=r,o.onload=()=>e(),o.onerror=()=>t(Error(`Failed to load theme CSS: ${r}`)),document.head.appendChild(o),a?.remove()}}):Promise.resolve()}render(){return this.cssLoaded?i.x`<slot></slot>`:i.E}};c.__decorate([o.n({type:Boolean,converter:u.booleanConverter,attribute:`load-fonts`})],f.prototype,`loadFonts`,void 0),c.__decorate([o.n({type:Boolean,converter:u.booleanConverter,attribute:`load-styles`})],f.prototype,`loadStyles`,void 0),c.__decorate([e.e({context:t.themeContext}),o.n({type:String})],f.prototype,`theme`,void 0),c.__decorate([s.r()],f.prototype,`cssLoaded`,void 0),c.__decorate([s.r()],f.prototype,`loadedFonts`,void 0),f=c.__decorate([l.customUiKitElement(`ds-theme-provider`)],f);
4
+ url('https://ds-assets.cupra.com/fonts/${this.theme}/${n}.otf') format('opentype')`,{style:`normal`,weight:e,display:`swap`});try{await i.load(),document.fonts.add(i),this.loadedFonts.add(r)}catch(n){console.error(`Error loading "${t}" font with "${e}" weight:`,n)}}loadThemeStyles(){return this.loadStyles?new Promise((e,t)=>{let n=`/2.0.0-canary.119`,r=`https://ds-assets.cupra.com${n}/styles/${this.theme}/theme.css`;if(document.head.querySelector(`link[href="${r}"]`))e();else{let i=`ui-kit-theme-${n}`,a=document.getElementById(i),o=document.createElement(`link`);o.id=i,o.rel=`stylesheet`,o.href=r,o.onload=()=>e(),o.onerror=()=>t(Error(`Failed to load theme CSS: ${r}`)),document.head.appendChild(o),a?.remove()}}):Promise.resolve()}render(){return this.cssLoaded?i.x`<slot></slot>`:i.E}};c.__decorate([o.n({type:Boolean,converter:u.booleanConverter,attribute:`load-fonts`})],f.prototype,`loadFonts`,void 0),c.__decorate([o.n({type:Boolean,converter:u.booleanConverter,attribute:`load-styles`})],f.prototype,`loadStyles`,void 0),c.__decorate([e.e({context:t.themeContext}),o.n({type:String})],f.prototype,`theme`,void 0),c.__decorate([s.r()],f.prototype,`cssLoaded`,void 0),c.__decorate([s.r()],f.prototype,`loadedFonts`,void 0),f=c.__decorate([l.customUiKitElement(`ds-theme-provider`)],f);
@@ -1 +1 @@
1
- const e=require(`../utils/version.cjs`),t=require(`../utils/componentFactory.cjs`);function n(n,r){return function(i){if(!i?.prototype)throw TypeError(`@customUiKitElement requires a class that extends HTMLElement.`);let a=`${n}${e.VERSION_TAG_SUFFIX}`;if(globalThis?.customElements?.get(a))return;let o=r?.skipTagAsComponentName?[]:[n];Array.isArray(r?.extendComponentNames)&&(o=[...r.extendComponentNames,...o]),globalThis?.customElements?.define?.(a,class extends i{constructor(...e){super(...e),this.componentFactory=t.reactFactory}static{this.componentName=o}connectedCallback(){i.prototype.connectedCallback?.call(this),this.setAttribute(`data-ui-kit-version`,`2.0.0-canary.118`)}})}}exports.customUiKitElement=n;
1
+ const e=require(`../utils/version.cjs`),t=require(`../utils/componentFactory.cjs`);function n(n,r){return function(i){if(!i?.prototype)throw TypeError(`@customUiKitElement requires a class that extends HTMLElement.`);let a=`${n}${e.VERSION_TAG_SUFFIX}`;if(globalThis?.customElements?.get(a))return;let o=r?.skipTagAsComponentName?[]:[n];Array.isArray(r?.extendComponentNames)&&(o=[...r.extendComponentNames,...o]),globalThis?.customElements?.define?.(a,class extends i{constructor(...e){super(...e),this.componentFactory=t.reactFactory}static{this.componentName=o}connectedCallback(){i.prototype.connectedCallback?.call(this),this.setAttribute(`data-ui-kit-version`,`2.0.0-canary.119`)}})}}exports.customUiKitElement=n;
@@ -1 +1 @@
1
- const e=require(`../core/theme.constants.cjs`),t=require(`./PubSub.cjs`);var n=class{constructor(){this.icons={},this.handleChangeTheme=e=>{if(this.theme===e)return;this.theme=e;let t=Object.keys(this.icons);this.icons={},t.forEach(e=>this.fetchIcon(e))},this.fetchIcon=async(t,n={})=>{let r=typeof sessionStorage<`u`?sessionStorage?.getItem(e.THEME_STORAGE_KEY):null;!this.theme&&r&&(this.theme=r);let i=this.icons[t];if(i)return await i;let a=this.loadIcon(t,n).catch(e=>{throw delete this.icons[t],e});return this.icons[t]=a,a},this.loadIcon=(e,{cache:t=`force-cache`,...n})=>!this.theme||typeof fetch>`u`?Promise.resolve(`<svg class="ds-icon"></svg>`):fetch(`https://ds-assets.cupra.com/icons/${this.theme}/${e}.svg`,{cache:t,...n}).then(e=>e.text()).catch(t=>{if(t?.name===`AbortError`)throw t;return console.error(`Failed to fetch icon "${e}":`,t),``}),t.pubSub.subscribe(`theme`,this.handleChangeTheme)}},r=Symbol.for(`@cupra/ui-kit/icons-manager/2.0.0-canary.118`),i=globalThis,a=i[r];a||(a=new n,Object.defineProperty(i,r,{value:a,writable:!1,configurable:!1,enumerable:!1}));var o=a;exports.iconsManager=o;
1
+ const e=require(`../core/theme.constants.cjs`),t=require(`./PubSub.cjs`);var n=class{constructor(){this.icons={},this.handleChangeTheme=e=>{if(this.theme===e)return;this.theme=e;let t=Object.keys(this.icons);this.icons={},t.forEach(e=>this.fetchIcon(e))},this.fetchIcon=async(t,n={})=>{let r=typeof sessionStorage<`u`?sessionStorage?.getItem(e.THEME_STORAGE_KEY):null;!this.theme&&r&&(this.theme=r);let i=this.icons[t];if(i)return await i;let a=this.loadIcon(t,n).catch(e=>{throw delete this.icons[t],e});return this.icons[t]=a,a},this.loadIcon=(e,{cache:t=`force-cache`,...n})=>!this.theme||typeof fetch>`u`?Promise.resolve(`<svg class="ds-icon"></svg>`):fetch(`https://ds-assets.cupra.com/icons/${this.theme}/${e}.svg`,{cache:t,...n}).then(e=>e.text()).catch(t=>{if(t?.name===`AbortError`)throw t;return console.error(`Failed to fetch icon "${e}":`,t),``}),t.pubSub.subscribe(`theme`,this.handleChangeTheme)}},r=Symbol.for(`@cupra/ui-kit/icons-manager/2.0.0-canary.119`),i=globalThis,a=i[r];a||(a=new n,Object.defineProperty(i,r,{value:a,writable:!1,configurable:!1,enumerable:!1}));var o=a;exports.iconsManager=o;
@@ -1 +1 @@
1
- var e=class{constructor(){this.subscribers={},this.lastPublishedData={}}subscribe(e,t){return this.subscribers[e]||(this.subscribers[e]=[]),this.subscribers[e].push(t),this.lastPublishedData[e]}unsubscribe(e,t){this.subscribers[e]&&(this.subscribers[e]=this.subscribers[e].filter(e=>e!==t))}publish(e,t){this.lastPublishedData[e]=t,this.subscribers[e]&&this.subscribers[e].forEach(n=>{try{n(t)}catch(t){console.error(`Error in subscriber for event "${e}":`,t)}})}},t=Symbol.for(`@cupra/ui-kit/pubsub/2.0.0-canary.118`),n=globalThis,r=n[t];r||(r=new e,Object.defineProperty(n,t,{value:r,writable:!1,configurable:!1,enumerable:!1}));var i=r;exports.pubSub=i;
1
+ var e=class{constructor(){this.subscribers={},this.lastPublishedData={}}subscribe(e,t){return this.subscribers[e]||(this.subscribers[e]=[]),this.subscribers[e].push(t),this.lastPublishedData[e]}unsubscribe(e,t){this.subscribers[e]&&(this.subscribers[e]=this.subscribers[e].filter(e=>e!==t))}publish(e,t){this.lastPublishedData[e]=t,this.subscribers[e]&&this.subscribers[e].forEach(n=>{try{n(t)}catch(t){console.error(`Error in subscriber for event "${e}":`,t)}})}},t=Symbol.for(`@cupra/ui-kit/pubsub/2.0.0-canary.119`),n=globalThis,r=n[t];r||(r=new e,Object.defineProperty(n,t,{value:r,writable:!1,configurable:!1,enumerable:!1}));var i=r;exports.pubSub=i;
@@ -1 +1 @@
1
- var e=require(`../concurrencyLimit.cjs`).concurrencyLimit(20),t=class t{constructor(){this.stylePromises=new Map,this.getStyles=async({componentName:t,theme:n})=>{if(!n||!t)return;let r=`https://ds-assets.cupra.com/2.0.0-canary.118/styles/${n}/components/${t}.css`,i=this.getCachedStyleSheetPromise({url:r});if(i)return i;let a=e(()=>this.fetchStyle({url:r})).then(e=>(e||this.stylePromises.delete(r),e));return this.stylePromises.set(r,a),this.stylePromises.get(r)}}async fetchStyle({url:e}){try{if(typeof fetch>`u`)return;let 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 t.instance||=new t,t.instance}}.getInstance();exports.stylesRegistry=t;
1
+ var e=require(`../concurrencyLimit.cjs`).concurrencyLimit(20),t=class t{constructor(){this.stylePromises=new Map,this.getStyles=async({componentName:t,theme:n})=>{if(!n||!t)return;let r=`https://ds-assets.cupra.com/2.0.0-canary.119/styles/${n}/components/${t}.css`,i=this.getCachedStyleSheetPromise({url:r});if(i)return i;let a=e(()=>this.fetchStyle({url:r})).then(e=>(e||this.stylePromises.delete(r),e));return this.stylePromises.set(r,a),this.stylePromises.get(r)}}async fetchStyle({url:e}){try{if(typeof fetch>`u`)return;let 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 t.instance||=new t,t.instance}}.getInstance();exports.stylesRegistry=t;
@@ -1 +1 @@
1
- const e=require(`../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.cjs`);require(`../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.cjs`);function t(t,...n){return e.i`${e.r(String.raw({raw:t},...n).replace(/(--private-[\w-]+)(?=\s*[):,])/g,`$1-v2-0-0-canary-118`))}`}exports.cssWithTokens=t;
1
+ const e=require(`../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.cjs`);require(`../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.cjs`);function t(t,...n){return e.i`${e.r(String.raw({raw:t},...n).replace(/(--private-[\w-]+)(?=\s*[):,])/g,`$1-v2-0-0-canary-119`))}`}exports.cssWithTokens=t;
@@ -1 +1 @@
1
- const e=require(`../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs`);require(`../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.cjs`);const t=require(`../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/unsafe-html.cjs`);require(`../node_modules/.pnpm/lit@3.3.1/node_modules/lit/directives/unsafe-html.cjs`);function n(n,...r){return e.x`${t.o(String.raw({raw:n},...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g,`$1-v2-0-0-canary-118`))}`}exports.htmlWithTokens=n;
1
+ const e=require(`../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs`);require(`../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.cjs`);const t=require(`../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/unsafe-html.cjs`);require(`../node_modules/.pnpm/lit@3.3.1/node_modules/lit/directives/unsafe-html.cjs`);function n(n,...r){return e.x`${t.o(String.raw({raw:n},...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g,`$1-v2-0-0-canary-119`))}`}exports.htmlWithTokens=n;
@@ -1 +1 @@
1
- var e=`2.0.0-canary.118`,t=`--v${e.replaceAll(`.`,`-`)}`;exports.VERSION=e,exports.VERSION_TAG_SUFFIX=t;
1
+ var e=`2.0.0-canary.119`,t=`--v${e.replaceAll(`.`,`-`)}`;exports.VERSION=e,exports.VERSION_TAG_SUFFIX=t;
@@ -50,25 +50,23 @@ var l = class extends i {
50
50
  get periodTemplate() {
51
51
  if (!this.period) return e;
52
52
  let n = new Intl.DisplayNames(this.locale, { type: "dateTimeField" });
53
- return t`
54
- <span class=${o({
53
+ return t`<span class=${o({
55
54
  period: !0,
56
55
  text: !0,
57
56
  [`size-${this.periodSize}`]: !0,
58
57
  [`weight-${this.periodWeight}`]: !0
59
- })}"period">/${n.of(this.period)}</span>
60
- `;
58
+ })}"period">/${n.of(this.period)}</span>`;
61
59
  }
62
60
  get noteTemplate() {
63
- return this.note ? t` <span class=${o({
61
+ return this.note ? t`<span class=${o({
64
62
  note: !0,
65
63
  text: !0,
66
64
  [`size-${this.noteSize}`]: !0,
67
65
  [`weight-${this.noteWeight}`]: !0
68
- })}>${this.note}</span> ` : e;
66
+ })}>${this.note}</span>` : e;
69
67
  }
70
68
  render() {
71
- return t` <div class="container">${this.valueTemplate} ${this.noteTemplate} ${this.periodTemplate}</div> `;
69
+ return t`<div class="container">${this.valueTemplate}${this.periodTemplate}${this.noteTemplate}</div>`;
72
70
  }
73
71
  };
74
72
  r([n({ type: String })], l.prototype, "locale", void 0), r([n({
@@ -3,12 +3,12 @@ import "../../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.js";
3
3
  //#region src/components/ds-currency/styles/common.styles.ts
4
4
  var t = e`
5
5
  :host {
6
- display: inline;
6
+ display: contents;
7
7
  }
8
8
 
9
9
  .container {
10
10
  display: inline-flex;
11
- align-items: flex-end;
11
+ align-items: baseline;
12
12
  }
13
13
  `;
14
14
  //#endregion
@@ -54,7 +54,7 @@ var d = class extends i {
54
54
  ${l(this.htmlTagName || "button", [["button", () => t`
55
55
  <button class=${c(this.classes)} ?disabled=${this.disabled}>
56
56
  ${this.iconPosition === "left" ? this.iconTemplate : e}
57
- <slot></slot>
57
+ <span class="label"><slot></slot></span>
58
58
  ${this.iconPosition === "right" ? this.iconTemplate : e}
59
59
  </button>
60
60
  `], ["a", () => t`
@@ -67,7 +67,7 @@ var d = class extends i {
67
67
  ?disabled=${this.disabled}
68
68
  >
69
69
  ${this.iconPosition === "left" ? this.iconTemplate : e}
70
- <slot></slot>
70
+ <span class="label"><slot></slot></span>
71
71
  ${this.iconPosition === "right" ? this.iconTemplate : e}
72
72
  </a>
73
73
  `]])}
@@ -50,7 +50,7 @@ var p = class extends o {
50
50
  }
51
51
  loadThemeStyles() {
52
52
  return this.loadStyles ? new Promise((e, t) => {
53
- let n = "/2.0.0-canary.118", r = `https://ds-assets.cupra.com${n}/styles/${this.theme}/theme.css`;
53
+ let n = "/2.0.0-canary.119", r = `https://ds-assets.cupra.com${n}/styles/${this.theme}/theme.css`;
54
54
  if (document.head.querySelector(`link[href="${r}"]`)) e();
55
55
  else {
56
56
  let i = `ui-kit-theme-${n}`, a = document.getElementById(i), o = document.createElement("link");
@@ -15,7 +15,7 @@ function n(n, r) {
15
15
  this.componentName = o;
16
16
  }
17
17
  connectedCallback() {
18
- i.prototype.connectedCallback?.call(this), this.setAttribute("data-ui-kit-version", "2.0.0-canary.118");
18
+ i.prototype.connectedCallback?.call(this), this.setAttribute("data-ui-kit-version", "2.0.0-canary.119");
19
19
  }
20
20
  });
21
21
  };
@@ -25,7 +25,7 @@ var n = class {
25
25
  return console.error(`Failed to fetch icon "${e}":`, t), "";
26
26
  }), t.subscribe("theme", this.handleChangeTheme);
27
27
  }
28
- }, r = Symbol.for("@cupra/ui-kit/icons-manager/2.0.0-canary.118"), i = globalThis, a = i[r];
28
+ }, r = Symbol.for("@cupra/ui-kit/icons-manager/2.0.0-canary.119"), i = globalThis, a = i[r];
29
29
  a || (a = new n(), Object.defineProperty(i, r, {
30
30
  value: a,
31
31
  writable: !1,
@@ -18,7 +18,7 @@ var e = class {
18
18
  }
19
19
  });
20
20
  }
21
- }, t = Symbol.for("@cupra/ui-kit/pubsub/2.0.0-canary.118"), n = globalThis, r = n[t];
21
+ }, t = Symbol.for("@cupra/ui-kit/pubsub/2.0.0-canary.119"), n = globalThis, r = n[t];
22
22
  r || (r = new e(), Object.defineProperty(n, t, {
23
23
  value: r,
24
24
  writable: !1,
@@ -4,7 +4,7 @@ var t = e(20), n = class e {
4
4
  constructor() {
5
5
  this.stylePromises = /* @__PURE__ */ new Map(), this.getStyles = async ({ componentName: e, theme: n }) => {
6
6
  if (!n || !e) return;
7
- let r = `https://ds-assets.cupra.com/2.0.0-canary.118/styles/${n}/components/${e}.css`, i = this.getCachedStyleSheetPromise({ url: r });
7
+ let r = `https://ds-assets.cupra.com/2.0.0-canary.119/styles/${n}/components/${e}.css`, i = this.getCachedStyleSheetPromise({ url: r });
8
8
  if (i) return i;
9
9
  let a = t(() => this.fetchStyle({ url: r })).then((e) => (e || this.stylePromises.delete(r), e));
10
10
  return this.stylePromises.set(r, a), this.stylePromises.get(r);
@@ -2,7 +2,7 @@ import { i as e, r as t } from "../node_modules/.pnpm/@lit_reactive-element@2.1.
2
2
  import "../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.js";
3
3
  //#region src/utils/cssWithTokens.ts
4
4
  function n(n, ...r) {
5
- return e`${t(String.raw({ raw: n }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v2-0-0-canary-118"))}`;
5
+ return e`${t(String.raw({ raw: n }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v2-0-0-canary-119"))}`;
6
6
  }
7
7
  //#endregion
8
8
  export { n as cssWithTokens };
@@ -4,7 +4,7 @@ import { o as t } from "../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-ht
4
4
  import "../node_modules/.pnpm/lit@3.3.1/node_modules/lit/directives/unsafe-html.js";
5
5
  //#region src/utils/htmlWithTokens.ts
6
6
  function n(n, ...r) {
7
- return e`${t(String.raw({ raw: n }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v2-0-0-canary-118"))}`;
7
+ return e`${t(String.raw({ raw: n }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v2-0-0-canary-119"))}`;
8
8
  }
9
9
  //#endregion
10
10
  export { n as htmlWithTokens };
@@ -1,4 +1,4 @@
1
1
  //#region src/utils/version.ts
2
- var e = "2.0.0-canary.118", t = `--v${e.replaceAll(".", "-")}`;
2
+ var e = "2.0.0-canary.119", t = `--v${e.replaceAll(".", "-")}`;
3
3
  //#endregion
4
4
  export { e as VERSION, t as VERSION_TAG_SUFFIX };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cupra/ui-kit",
3
- "version": "2.0.0-canary.118",
3
+ "version": "2.0.0-canary.119",
4
4
  "description": "Web components library",
5
5
  "author": "SEAT S.A.",
6
6
  "license": "SEAT S.A. Library EULA 1.0",