@cupra/ui-kit 2.0.0-canary.125 → 2.0.0-canary.126

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 (53) hide show
  1. package/dist/cjs/components/ds-button/ds-button.cjs +3 -3
  2. package/dist/cjs/components/ds-icon-button/ds-icon-button.cjs +2 -2
  3. package/dist/cjs/components/ds-theme-provider/ds-theme-provider.cjs +1 -1
  4. package/dist/cjs/decorators/customUiKitElement.cjs +1 -1
  5. package/dist/cjs/utils/IconsManager.cjs +1 -1
  6. package/dist/cjs/utils/PubSub.cjs +1 -1
  7. package/dist/cjs/utils/StylesRegistry/StylesRegistry.cjs +1 -1
  8. package/dist/cjs/utils/componentFactory.cjs +0 -4
  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-button/ds-button.js +5 -8
  13. package/dist/esm/components/ds-icon-button/ds-icon-button.js +5 -8
  14. package/dist/esm/components/ds-theme-provider/ds-theme-provider.js +1 -1
  15. package/dist/esm/decorators/customUiKitElement.js +1 -1
  16. package/dist/esm/utils/IconsManager.js +1 -1
  17. package/dist/esm/utils/PubSub.js +1 -1
  18. package/dist/esm/utils/StylesRegistry/StylesRegistry.js +1 -1
  19. package/dist/esm/utils/componentFactory.js +0 -4
  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/types/components/ds-button/ds-button.d.ts +0 -1
  24. package/dist/types/components/ds-button/ds-button.types.d.ts +6 -16
  25. package/dist/types/components/ds-icon-button/ds-icon-button.d.ts +0 -1
  26. package/dist/types/components/ds-icon-button/ds-icon-button.types.d.ts +6 -16
  27. package/dist-react/cjs/components/ds-button/ds-button.cjs +3 -3
  28. package/dist-react/cjs/components/ds-icon-button/ds-icon-button.cjs +2 -2
  29. package/dist-react/cjs/components/ds-theme-provider/ds-theme-provider.cjs +1 -1
  30. package/dist-react/cjs/decorators/customUiKitElement.cjs +1 -1
  31. package/dist-react/cjs/utils/IconsManager.cjs +1 -1
  32. package/dist-react/cjs/utils/PubSub.cjs +1 -1
  33. package/dist-react/cjs/utils/StylesRegistry/StylesRegistry.cjs +1 -1
  34. package/dist-react/cjs/utils/componentFactory.cjs +0 -2
  35. package/dist-react/cjs/utils/cssWithTokens.cjs +1 -1
  36. package/dist-react/cjs/utils/htmlWithTokens.cjs +1 -1
  37. package/dist-react/cjs/utils/version.cjs +1 -1
  38. package/dist-react/esm/components/ds-button/ds-button.js +5 -8
  39. package/dist-react/esm/components/ds-icon-button/ds-icon-button.js +5 -8
  40. package/dist-react/esm/components/ds-theme-provider/ds-theme-provider.js +1 -1
  41. package/dist-react/esm/decorators/customUiKitElement.js +1 -1
  42. package/dist-react/esm/utils/IconsManager.js +1 -1
  43. package/dist-react/esm/utils/PubSub.js +1 -1
  44. package/dist-react/esm/utils/StylesRegistry/StylesRegistry.js +1 -1
  45. package/dist-react/esm/utils/componentFactory.js +0 -2
  46. package/dist-react/esm/utils/cssWithTokens.js +1 -1
  47. package/dist-react/esm/utils/htmlWithTokens.js +1 -1
  48. package/dist-react/esm/utils/version.js +1 -1
  49. package/dist-react/types/components/ds-button/ds-button.d.ts +0 -1
  50. package/dist-react/types/components/ds-button/ds-button.types.d.ts +6 -16
  51. package/dist-react/types/components/ds-icon-button/ds-icon-button.d.ts +0 -1
  52. package/dist-react/types/components/ds-icon-button/ds-icon-button.types.d.ts +6 -16
  53. package/package.json +1 -1
@@ -1,10 +1,10 @@
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_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/decorators.cjs`);const n=require(`../../_virtual/_@oxc-project_runtime@0.122.0/helpers/decorate.cjs`),r=require(`../base/UiKitElement.cjs`),i=require(`../../decorators/customUiKitElement.cjs`),a=require(`../../utils/booleanConverter.cjs`),o=require(`../../utils/htmlWithTokens.cjs`),s=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/directives/class-map.cjs`);const c=require(`../../mixins/ViewportMixin.cjs`),l=require(`../../utils/objectConverter.cjs`),u=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/choose.cjs`),d=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/when.cjs`),f=require(`./styles/common.styles.cjs`);var p=class extends c.ViewportMixin(r.UiKitElement){constructor(...e){super(...e),this.variant=`primary`,this.mode=`light`,this.size=`large`,this.disabled=!1,this.destructive=!1,this.htmlTagName=`button`,this.type=`button`,this.iconPosition=`left`,this.rounded=!1,this.fullWidth=!1,this.loading=!1,this.baseVariant=`primary`}static{this.styles=[f.buttonStyles,f.textStyles,f.loadingDotsStyles]}connectedCallback(){super.connectedCallback(),this.closestForm=this.closest(`form`)}get classes(){let e=typeof this.size==`string`?this.size:this.size[this.viewport],t=this.variant===`custom`?this.baseVariant:this.variant;return{button:!0,[`tag-${this.htmlTagName}`]:!0,[`variant-${t}`]:!0,custom:this.variant===`custom`,[e]:!!e,[this.mode]:!!this.mode,rounded:this.rounded,disabled:this.disabled||this.loading,destructive:this.destructive,"full-width":this.fullWidth}}handleClick(e){if(this.href||e.preventDefault(),this.closestForm&&this.type===`submit`){let e=new Event(`submit`,{bubbles:!0,composed:!0,cancelable:!0});this.closestForm.dispatchEvent(e)}}handleCustomClick(e){let t=(this.shadowRoot?.querySelector(`slot`))?.assignedElements()[0];t&&!t.contains(e.composedPath()[0])&&(e.stopPropagation(),t.click())}get iconTemplate(){return this.iconName?this.componentFactory.createIcon({class:`icon`,"icon-name":this.iconName}):e.E}get loadingTemplate(){return this.loading?e.x`
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_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/decorators.cjs`);const n=require(`../../_virtual/_@oxc-project_runtime@0.122.0/helpers/decorate.cjs`),r=require(`../base/UiKitElement.cjs`),i=require(`../../decorators/customUiKitElement.cjs`),a=require(`../../utils/booleanConverter.cjs`),o=require(`../../utils/htmlWithTokens.cjs`),s=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/directives/class-map.cjs`);const c=require(`../../mixins/ViewportMixin.cjs`),l=require(`../../utils/objectConverter.cjs`),u=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/choose.cjs`),d=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/when.cjs`),f=require(`./styles/common.styles.cjs`);var p=class extends c.ViewportMixin(r.UiKitElement){constructor(...e){super(...e),this.variant=`primary`,this.mode=`light`,this.size=`large`,this.disabled=!1,this.destructive=!1,this.htmlTagName=`button`,this.type=`button`,this.iconPosition=`left`,this.rounded=!1,this.fullWidth=!1,this.loading=!1}static{this.styles=[f.buttonStyles,f.textStyles,f.loadingDotsStyles]}connectedCallback(){super.connectedCallback(),this.closestForm=this.closest(`form`)}get classes(){let e=typeof this.size==`string`?this.size:this.size[this.viewport],t=!!(this.customBackground||this.customColor);return{button:!0,[`tag-${this.htmlTagName}`]:!0,[`variant-${this.variant}`]:!0,custom:t,[e]:!!e,[this.mode]:!!this.mode,rounded:this.rounded,disabled:this.disabled||this.loading,destructive:this.destructive,"full-width":this.fullWidth}}handleClick(e){if(this.href||e.preventDefault(),this.closestForm&&this.type===`submit`){let e=new Event(`submit`,{bubbles:!0,composed:!0,cancelable:!0});this.closestForm.dispatchEvent(e)}}handleCustomClick(e){let t=(this.shadowRoot?.querySelector(`slot`))?.assignedElements()[0];t&&!t.contains(e.composedPath()[0])&&(e.stopPropagation(),t.click())}get iconTemplate(){return this.iconName?this.componentFactory.createIcon({class:`icon`,"icon-name":this.iconName}):e.E}get loadingTemplate(){return this.loading?e.x`
2
2
  <span class="loading-dots">
3
3
  <span>.</span>
4
4
  <span>.</span>
5
5
  <span>.</span>
6
6
  </span>
7
- `:e.E}get contentTemplate(){return this.loading&&this.textLoading?e.x`${this.textLoading}`:e.x`<slot></slot>`}updated(e){super.updated(e),this.variant===`custom`&&this.customBackground?this.style.setProperty(`--ui-kit-button-custom-bg`,this.customBackground):this.style.removeProperty(`--ui-kit-button-custom-bg`),this.variant===`custom`&&this.customColor?this.style.setProperty(`--ui-kit-button-custom-color`,this.customColor):this.style.removeProperty(`--ui-kit-button-custom-color`)}get cssTokens(){return o.htmlWithTokens`
7
+ `:e.E}get contentTemplate(){return this.loading&&this.textLoading?e.x`${this.textLoading}`:e.x`<slot></slot>`}updated(e){super.updated(e),this.customBackground?this.style.setProperty(`--ui-kit-button-custom-bg`,this.customBackground):this.style.removeProperty(`--ui-kit-button-custom-bg`),this.customColor?this.style.setProperty(`--ui-kit-button-custom-color`,this.customColor):this.style.removeProperty(`--ui-kit-button-custom-color`)}get cssTokens(){return o.htmlWithTokens`
8
8
  <style>
9
9
  :host{
10
10
  color-scheme: ${this.mode};
@@ -54,4 +54,4 @@ const e=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/l
54
54
  ${d.n(this.iconPosition===`right`,()=>e.x`${this.iconTemplate}`)}
55
55
  </div>
56
56
  `]])}
57
- `}};n.__decorate([t.n({type:String,reflect:!0})],p.prototype,`variant`,void 0),n.__decorate([t.n({type:String,reflect:!0})],p.prototype,`mode`,void 0),n.__decorate([t.n({type:String,converter:l.objectConverter})],p.prototype,`size`,void 0),n.__decorate([t.n({type:Boolean,converter:a.booleanConverter})],p.prototype,`disabled`,void 0),n.__decorate([t.n({type:Boolean,converter:a.booleanConverter})],p.prototype,`destructive`,void 0),n.__decorate([t.n({type:String,attribute:`icon-name`})],p.prototype,`iconName`,void 0),n.__decorate([t.n({type:String,attribute:`html-tag-name`})],p.prototype,`htmlTagName`,void 0),n.__decorate([t.n({type:String,reflect:!0})],p.prototype,`href`,void 0),n.__decorate([t.n({type:String,reflect:!0})],p.prototype,`rel`,void 0),n.__decorate([t.n({type:String,reflect:!0})],p.prototype,`target`,void 0),n.__decorate([t.n({type:String})],p.prototype,`type`,void 0),n.__decorate([t.n({type:String,attribute:`icon-position`})],p.prototype,`iconPosition`,void 0),n.__decorate([t.n({type:Boolean,converter:a.booleanConverter})],p.prototype,`rounded`,void 0),n.__decorate([t.n({type:Boolean,converter:a.booleanConverter,attribute:`full-width`})],p.prototype,`fullWidth`,void 0),n.__decorate([t.n({type:Boolean,converter:a.booleanConverter})],p.prototype,`loading`,void 0),n.__decorate([t.n({type:String,attribute:`text-loading`})],p.prototype,`textLoading`,void 0),n.__decorate([t.n({type:String,attribute:`base-variant`})],p.prototype,`baseVariant`,void 0),n.__decorate([t.n({type:String,attribute:`custom-background`})],p.prototype,`customBackground`,void 0),n.__decorate([t.n({type:String,attribute:`custom-color`})],p.prototype,`customColor`,void 0),p=n.__decorate([i.customUiKitElement(`ds-button`)],p),Object.defineProperty(exports,`DsButton`,{enumerable:!0,get:function(){return p}});
57
+ `}};n.__decorate([t.n({type:String,reflect:!0})],p.prototype,`variant`,void 0),n.__decorate([t.n({type:String,reflect:!0})],p.prototype,`mode`,void 0),n.__decorate([t.n({type:String,converter:l.objectConverter})],p.prototype,`size`,void 0),n.__decorate([t.n({type:Boolean,converter:a.booleanConverter})],p.prototype,`disabled`,void 0),n.__decorate([t.n({type:Boolean,converter:a.booleanConverter})],p.prototype,`destructive`,void 0),n.__decorate([t.n({type:String,attribute:`icon-name`})],p.prototype,`iconName`,void 0),n.__decorate([t.n({type:String,attribute:`html-tag-name`})],p.prototype,`htmlTagName`,void 0),n.__decorate([t.n({type:String,reflect:!0})],p.prototype,`href`,void 0),n.__decorate([t.n({type:String,reflect:!0})],p.prototype,`rel`,void 0),n.__decorate([t.n({type:String,reflect:!0})],p.prototype,`target`,void 0),n.__decorate([t.n({type:String})],p.prototype,`type`,void 0),n.__decorate([t.n({type:String,attribute:`icon-position`})],p.prototype,`iconPosition`,void 0),n.__decorate([t.n({type:Boolean,converter:a.booleanConverter})],p.prototype,`rounded`,void 0),n.__decorate([t.n({type:Boolean,converter:a.booleanConverter,attribute:`full-width`})],p.prototype,`fullWidth`,void 0),n.__decorate([t.n({type:Boolean,converter:a.booleanConverter})],p.prototype,`loading`,void 0),n.__decorate([t.n({type:String,attribute:`text-loading`})],p.prototype,`textLoading`,void 0),n.__decorate([t.n({type:String,attribute:`custom-background`})],p.prototype,`customBackground`,void 0),n.__decorate([t.n({type:String,attribute:`custom-color`})],p.prototype,`customColor`,void 0),p=n.__decorate([i.customUiKitElement(`ds-button`)],p),Object.defineProperty(exports,`DsButton`,{enumerable:!0,get:function(){return p}});
@@ -1,4 +1,4 @@
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_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/decorators.cjs`);const n=require(`../../_virtual/_@oxc-project_runtime@0.122.0/helpers/decorate.cjs`),r=require(`../base/UiKitElement.cjs`),i=require(`../../decorators/customUiKitElement.cjs`),a=require(`../../utils/booleanConverter.cjs`),o=require(`../../utils/htmlWithTokens.cjs`),s=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/directives/class-map.cjs`);const c=require(`../../mixins/ViewportMixin.cjs`),l=require(`../../utils/objectConverter.cjs`),u=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/choose.cjs`),d=require(`./styles/common.styles.cjs`);var f=class extends c.ViewportMixin(r.UiKitElement){constructor(...e){super(...e),this.variant=`primary`,this.baseVariant=`primary`,this.mode=`light`,this.size=`large`,this.disabled=!1,this.htmlTagName=`button`}static{this.styles=[d.buttonStyles]}get iconTemplate(){return this.iconName?this.componentFactory.createIcon({class:`icon`,"icon-name":this.iconName}):e.E}handleClick(e){this.href||e.preventDefault()}handleCustomClick(e){let t=(this.shadowRoot?.querySelector(`slot`))?.assignedElements()[0];t&&!t.contains(e.composedPath()[0])&&(e.stopPropagation(),t.click())}get classes(){let e=typeof this.size==`string`?this.size:this.size[this.viewport],t=this.variant===`custom`?this.baseVariant:this.variant;return{button:!0,[`tag-${this.htmlTagName}`]:!0,[`variant-${t}`]:!0,custom:this.variant===`custom`,disabled:this.disabled,[e]:!!e,[this.mode]:!!this.mode}}updated(e){super.updated(e),this.variant===`custom`&&this.customBackground?this.style.setProperty(`--ui-kit-button-custom-bg`,this.customBackground):this.style.removeProperty(`--ui-kit-button-custom-bg`),this.variant===`custom`&&this.customColor?this.style.setProperty(`--ui-kit-button-custom-color`,this.customColor):this.style.removeProperty(`--ui-kit-button-custom-color`)}get variantColorTokens(){return o.htmlWithTokens`
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_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/decorators.cjs`);const n=require(`../../_virtual/_@oxc-project_runtime@0.122.0/helpers/decorate.cjs`),r=require(`../base/UiKitElement.cjs`),i=require(`../../decorators/customUiKitElement.cjs`),a=require(`../../utils/booleanConverter.cjs`),o=require(`../../utils/htmlWithTokens.cjs`),s=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/directives/class-map.cjs`);const c=require(`../../mixins/ViewportMixin.cjs`),l=require(`../../utils/objectConverter.cjs`),u=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/choose.cjs`),d=require(`./styles/common.styles.cjs`);var f=class extends c.ViewportMixin(r.UiKitElement){constructor(...e){super(...e),this.variant=`primary`,this.mode=`light`,this.size=`large`,this.disabled=!1,this.htmlTagName=`button`}static{this.styles=[d.buttonStyles]}get iconTemplate(){return this.iconName?this.componentFactory.createIcon({class:`icon`,"icon-name":this.iconName}):e.E}handleClick(e){this.href||e.preventDefault()}handleCustomClick(e){let t=(this.shadowRoot?.querySelector(`slot`))?.assignedElements()[0];t&&!t.contains(e.composedPath()[0])&&(e.stopPropagation(),t.click())}get classes(){let e=typeof this.size==`string`?this.size:this.size[this.viewport],t=!!(this.customBackground||this.customColor);return{button:!0,[`tag-${this.htmlTagName}`]:!0,[`variant-${this.variant}`]:!0,custom:t,disabled:this.disabled,[e]:!!e,[this.mode]:!!this.mode}}updated(e){super.updated(e),this.customBackground?this.style.setProperty(`--ui-kit-button-custom-bg`,this.customBackground):this.style.removeProperty(`--ui-kit-button-custom-bg`),this.customColor?this.style.setProperty(`--ui-kit-button-custom-color`,this.customColor):this.style.removeProperty(`--ui-kit-button-custom-color`)}get variantColorTokens(){return o.htmlWithTokens`
2
2
  <style>
3
3
  :host{
4
4
  color-scheme: ${this.mode};
@@ -32,4 +32,4 @@ const e=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/l
32
32
  <slot></slot>
33
33
  </div>
34
34
  `]])}
35
- `}};n.__decorate([t.n({type:String,reflect:!0})],f.prototype,`variant`,void 0),n.__decorate([t.n({type:String,attribute:`base-variant`})],f.prototype,`baseVariant`,void 0),n.__decorate([t.n({type:String,attribute:`custom-background`})],f.prototype,`customBackground`,void 0),n.__decorate([t.n({type:String,attribute:`custom-color`})],f.prototype,`customColor`,void 0),n.__decorate([t.n({type:String,reflect:!0})],f.prototype,`mode`,void 0),n.__decorate([t.n({type:String,converter:l.objectConverter})],f.prototype,`size`,void 0),n.__decorate([t.n({type:Boolean,converter:a.booleanConverter})],f.prototype,`disabled`,void 0),n.__decorate([t.n({type:String,attribute:`icon-name`})],f.prototype,`iconName`,void 0),n.__decorate([t.n({type:String,attribute:`html-tag-name`})],f.prototype,`htmlTagName`,void 0),n.__decorate([t.n({type:String,attribute:`data-aria-label`})],f.prototype,`dataAriaLabel`,void 0),n.__decorate([t.n({type:String,reflect:!0})],f.prototype,`href`,void 0),n.__decorate([t.n({type:String,reflect:!0})],f.prototype,`rel`,void 0),n.__decorate([t.n({type:String,reflect:!0})],f.prototype,`target`,void 0),f=n.__decorate([i.customUiKitElement(`ds-icon-button`)],f),Object.defineProperty(exports,`DsIconButton`,{enumerable:!0,get:function(){return f}});
35
+ `}};n.__decorate([t.n({type:String,reflect:!0})],f.prototype,`variant`,void 0),n.__decorate([t.n({type:String,attribute:`custom-background`})],f.prototype,`customBackground`,void 0),n.__decorate([t.n({type:String,attribute:`custom-color`})],f.prototype,`customColor`,void 0),n.__decorate([t.n({type:String,reflect:!0})],f.prototype,`mode`,void 0),n.__decorate([t.n({type:String,converter:l.objectConverter})],f.prototype,`size`,void 0),n.__decorate([t.n({type:Boolean,converter:a.booleanConverter})],f.prototype,`disabled`,void 0),n.__decorate([t.n({type:String,attribute:`icon-name`})],f.prototype,`iconName`,void 0),n.__decorate([t.n({type:String,attribute:`html-tag-name`})],f.prototype,`htmlTagName`,void 0),n.__decorate([t.n({type:String,attribute:`data-aria-label`})],f.prototype,`dataAriaLabel`,void 0),n.__decorate([t.n({type:String,reflect:!0})],f.prototype,`href`,void 0),n.__decorate([t.n({type:String,reflect:!0})],f.prototype,`rel`,void 0),n.__decorate([t.n({type:String,reflect:!0})],f.prototype,`target`,void 0),f=n.__decorate([i.customUiKitElement(`ds-icon-button`)],f),Object.defineProperty(exports,`DsIconButton`,{enumerable:!0,get:function(){return f}});
@@ -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.125`,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.126`,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.125`)}})}}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.126`)}})}}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.125`),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.126`),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.125`),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.126`),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.125/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.126/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;
@@ -44,7 +44,6 @@ const e=require(`../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-
44
44
  rel=${n?.rel}
45
45
  target=${n?.target}
46
46
  data-testid=${n?.[`data-testid`]}
47
- base-variant=${t.o(n?.[`base-variant`])}
48
47
  custom-background=${t.o(n?.[`custom-background`])}
49
48
  custom-color=${t.o(n?.[`custom-color`])}
50
49
  >
@@ -73,7 +72,6 @@ const e=require(`../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-
73
72
  target=${n?.target}
74
73
  data-testid=${n?.[`data-testid`]}
75
74
  data-aria-label=${n?.[`data-aria-label`]}
76
- base-variant=${t.o(n?.[`base-variant`])}
77
75
  custom-background=${t.o(n?.[`custom-background`])}
78
76
  custom-color=${t.o(n?.[`custom-color`])}
79
77
  >
@@ -167,7 +165,6 @@ const e=require(`../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-
167
165
  rel=${e?.rel}
168
166
  target=${e?.target}
169
167
  data-testid=${e?.[`data-testid`]}
170
- base-variant=${t.o(e?.[`base-variant`])}
171
168
  custom-background=${t.o(e?.[`custom-background`])}
172
169
  custom-color=${t.o(e?.[`custom-color`])}
173
170
  >
@@ -196,7 +193,6 @@ const e=require(`../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-
196
193
  target=${e?.target}
197
194
  data-testid=${e?.[`data-testid`]}
198
195
  data-aria-label=${e?.[`data-aria-label`]}
199
- base-variant=${t.o(e?.[`base-variant`])}
200
196
  custom-background=${t.o(e?.[`custom-background`])}
201
197
  custom-color=${t.o(e?.[`custom-color`])}
202
198
  >
@@ -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-125`))}`}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-126`))}`}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-125`))}`}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-126`))}`}exports.htmlWithTokens=n;
@@ -1 +1 @@
1
- var e=`2.0.0-canary.125`,t=`--v${e.replaceAll(`.`,`-`)}`;exports.VERSION=e,exports.VERSION_TAG_SUFFIX=t;
1
+ var e=`2.0.0-canary.126`,t=`--v${e.replaceAll(`.`,`-`)}`;exports.VERSION=e,exports.VERSION_TAG_SUFFIX=t;
@@ -17,7 +17,7 @@ import { buttonStyles as p, loadingDotsStyles as m, textStyles as h } from "./st
17
17
  //#region src/components/ds-button/ds-button.ts
18
18
  var g = class extends l(i) {
19
19
  constructor(...e) {
20
- super(...e), this.variant = "primary", this.mode = "light", this.size = "large", this.disabled = !1, this.destructive = !1, this.htmlTagName = "button", this.type = "button", this.iconPosition = "left", this.rounded = !1, this.fullWidth = !1, this.loading = !1, this.baseVariant = "primary";
20
+ super(...e), this.variant = "primary", this.mode = "light", this.size = "large", this.disabled = !1, this.destructive = !1, this.htmlTagName = "button", this.type = "button", this.iconPosition = "left", this.rounded = !1, this.fullWidth = !1, this.loading = !1;
21
21
  }
22
22
  static {
23
23
  this.styles = [
@@ -30,12 +30,12 @@ var g = class extends l(i) {
30
30
  super.connectedCallback(), this.closestForm = this.closest("form");
31
31
  }
32
32
  get classes() {
33
- let e = typeof this.size == "string" ? this.size : this.size[this.viewport], t = this.variant === "custom" ? this.baseVariant : this.variant;
33
+ let e = typeof this.size == "string" ? this.size : this.size[this.viewport], t = !!(this.customBackground || this.customColor);
34
34
  return {
35
35
  button: !0,
36
36
  [`tag-${this.htmlTagName}`]: !0,
37
- [`variant-${t}`]: !0,
38
- custom: this.variant === "custom",
37
+ [`variant-${this.variant}`]: !0,
38
+ custom: t,
39
39
  [e]: !!e,
40
40
  [this.mode]: !!this.mode,
41
41
  rounded: this.rounded,
@@ -77,7 +77,7 @@ var g = class extends l(i) {
77
77
  return this.loading && this.textLoading ? t`${this.textLoading}` : t`<slot></slot>`;
78
78
  }
79
79
  updated(e) {
80
- super.updated(e), this.variant === "custom" && this.customBackground ? this.style.setProperty("--ui-kit-button-custom-bg", this.customBackground) : this.style.removeProperty("--ui-kit-button-custom-bg"), this.variant === "custom" && this.customColor ? this.style.setProperty("--ui-kit-button-custom-color", this.customColor) : this.style.removeProperty("--ui-kit-button-custom-color");
80
+ super.updated(e), this.customBackground ? this.style.setProperty("--ui-kit-button-custom-bg", this.customBackground) : this.style.removeProperty("--ui-kit-button-custom-bg"), this.customColor ? this.style.setProperty("--ui-kit-button-custom-color", this.customColor) : this.style.removeProperty("--ui-kit-button-custom-color");
81
81
  }
82
82
  get cssTokens() {
83
83
  return s`
@@ -187,9 +187,6 @@ r([n({
187
187
  type: String,
188
188
  attribute: "text-loading"
189
189
  })], g.prototype, "textLoading", void 0), r([n({
190
- type: String,
191
- attribute: "base-variant"
192
- })], g.prototype, "baseVariant", void 0), r([n({
193
190
  type: String,
194
191
  attribute: "custom-background"
195
192
  })], g.prototype, "customBackground", void 0), r([n({
@@ -16,7 +16,7 @@ import { buttonStyles as f } from "./styles/common.styles.js";
16
16
  //#region src/components/ds-icon-button/ds-icon-button.ts
17
17
  var p = class extends l(i) {
18
18
  constructor(...e) {
19
- super(...e), this.variant = "primary", this.baseVariant = "primary", this.mode = "light", this.size = "large", this.disabled = !1, this.htmlTagName = "button";
19
+ super(...e), this.variant = "primary", this.mode = "light", this.size = "large", this.disabled = !1, this.htmlTagName = "button";
20
20
  }
21
21
  static {
22
22
  this.styles = [f];
@@ -35,19 +35,19 @@ var p = class extends l(i) {
35
35
  t && !t.contains(e.composedPath()[0]) && (e.stopPropagation(), t.click());
36
36
  }
37
37
  get classes() {
38
- let e = typeof this.size == "string" ? this.size : this.size[this.viewport], t = this.variant === "custom" ? this.baseVariant : this.variant;
38
+ let e = typeof this.size == "string" ? this.size : this.size[this.viewport], t = !!(this.customBackground || this.customColor);
39
39
  return {
40
40
  button: !0,
41
41
  [`tag-${this.htmlTagName}`]: !0,
42
- [`variant-${t}`]: !0,
43
- custom: this.variant === "custom",
42
+ [`variant-${this.variant}`]: !0,
43
+ custom: t,
44
44
  disabled: this.disabled,
45
45
  [e]: !!e,
46
46
  [this.mode]: !!this.mode
47
47
  };
48
48
  }
49
49
  updated(e) {
50
- super.updated(e), this.variant === "custom" && this.customBackground ? this.style.setProperty("--ui-kit-button-custom-bg", this.customBackground) : this.style.removeProperty("--ui-kit-button-custom-bg"), this.variant === "custom" && this.customColor ? this.style.setProperty("--ui-kit-button-custom-color", this.customColor) : this.style.removeProperty("--ui-kit-button-custom-color");
50
+ super.updated(e), this.customBackground ? this.style.setProperty("--ui-kit-button-custom-bg", this.customBackground) : this.style.removeProperty("--ui-kit-button-custom-bg"), this.customColor ? this.style.setProperty("--ui-kit-button-custom-color", this.customColor) : this.style.removeProperty("--ui-kit-button-custom-color");
51
51
  }
52
52
  get variantColorTokens() {
53
53
  return s`
@@ -98,9 +98,6 @@ r([n({
98
98
  type: String,
99
99
  reflect: !0
100
100
  })], p.prototype, "variant", void 0), r([n({
101
- type: String,
102
- attribute: "base-variant"
103
- })], p.prototype, "baseVariant", void 0), r([n({
104
101
  type: String,
105
102
  attribute: "custom-background"
106
103
  })], p.prototype, "customBackground", void 0), r([n({
@@ -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.125", r = `https://ds-assets.cupra.com${n}/styles/${this.theme}/theme.css`;
53
+ let n = "/2.0.0-canary.126", 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.125");
18
+ a.prototype.connectedCallback?.call(this), this.setAttribute("data-ui-kit-version", "2.0.0-canary.126");
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.125"), i = globalThis, a = i[r];
28
+ }, r = Symbol.for("@cupra/ui-kit/icons-manager/2.0.0-canary.126"), 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.125"), n = globalThis, r = n[t];
21
+ }, t = Symbol.for("@cupra/ui-kit/pubsub/2.0.0-canary.126"), 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.125/styles/${n}/components/${e}.css`, i = this.getCachedStyleSheetPromise({ url: r });
7
+ let r = `https://ds-assets.cupra.com/2.0.0-canary.126/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);
@@ -55,7 +55,6 @@ var a = n(`ds-icon${i}`), o = n(`ds-calendar-day${i}`), s = n(`ds-button${i}`),
55
55
  rel=${n?.rel}
56
56
  target=${n?.target}
57
57
  data-testid=${n?.["data-testid"]}
58
- base-variant=${t(n?.["base-variant"])}
59
58
  custom-background=${t(n?.["custom-background"])}
60
59
  custom-color=${t(n?.["custom-color"])}
61
60
  >
@@ -86,7 +85,6 @@ var a = n(`ds-icon${i}`), o = n(`ds-calendar-day${i}`), s = n(`ds-button${i}`),
86
85
  target=${n?.target}
87
86
  data-testid=${n?.["data-testid"]}
88
87
  data-aria-label=${n?.["data-aria-label"]}
89
- base-variant=${t(n?.["base-variant"])}
90
88
  custom-background=${t(n?.["custom-background"])}
91
89
  custom-color=${t(n?.["custom-color"])}
92
90
  >
@@ -189,7 +187,6 @@ var a = n(`ds-icon${i}`), o = n(`ds-calendar-day${i}`), s = n(`ds-button${i}`),
189
187
  rel=${e?.rel}
190
188
  target=${e?.target}
191
189
  data-testid=${e?.["data-testid"]}
192
- base-variant=${t(e?.["base-variant"])}
193
190
  custom-background=${t(e?.["custom-background"])}
194
191
  custom-color=${t(e?.["custom-color"])}
195
192
  >
@@ -220,7 +217,6 @@ var a = n(`ds-icon${i}`), o = n(`ds-calendar-day${i}`), s = n(`ds-button${i}`),
220
217
  target=${e?.target}
221
218
  data-testid=${e?.["data-testid"]}
222
219
  data-aria-label=${e?.["data-aria-label"]}
223
- base-variant=${t(e?.["base-variant"])}
224
220
  custom-background=${t(e?.["custom-background"])}
225
221
  custom-color=${t(e?.["custom-color"])}
226
222
  >
@@ -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-125"))}`;
5
+ return e`${t(String.raw({ raw: n }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v2-0-0-canary-126"))}`;
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-125"))}`;
7
+ return e`${t(String.raw({ raw: n }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v2-0-0-canary-126"))}`;
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.125", t = `--v${e.replaceAll(".", "-")}`;
2
+ var e = "2.0.0-canary.126", t = `--v${e.replaceAll(".", "-")}`;
3
3
  //#endregion
4
4
  export { e as VERSION, t as VERSION_TAG_SUFFIX };
@@ -19,7 +19,6 @@ export declare class DsButton extends DsButton_base {
19
19
  fullWidth: DsButtonAttrs['full-width'];
20
20
  loading: DsButtonAttrs['loading'];
21
21
  textLoading: DsButtonAttrs['text-loading'];
22
- baseVariant: DsButtonAttrs['base-variant'];
23
22
  customBackground: DsButtonAttrs['custom-background'];
24
23
  customColor: DsButtonAttrs['custom-color'];
25
24
  private closestForm;
@@ -23,7 +23,11 @@ type CustomElement = {
23
23
  target?: never;
24
24
  };
25
25
  type HtmlElement = Link | Button | CustomElement;
26
- type SharedButtonAttrs = {
26
+ export type DsButtonStandardVariant = 'primary' | 'secondary' | 'tertiary' | 'naked';
27
+ export type DsButtonAttrs = {
28
+ variant?: DsButtonStandardVariant | (string & {});
29
+ 'custom-background'?: string;
30
+ 'custom-color'?: string;
27
31
  mode?: 'dark' | 'light';
28
32
  disabled?: boolean;
29
33
  destructive?: boolean;
@@ -36,19 +40,5 @@ type SharedButtonAttrs = {
36
40
  'full-width'?: boolean;
37
41
  loading?: boolean;
38
42
  'text-loading'?: string;
39
- };
40
- export type DsButtonStandardVariant = 'primary' | 'secondary' | 'tertiary' | 'naked';
41
- type StandardVariantAttrs = {
42
- variant?: DsButtonStandardVariant;
43
- 'base-variant'?: never;
44
- 'custom-background'?: never;
45
- 'custom-color'?: never;
46
- };
47
- type CustomVariantAttrs = {
48
- variant: 'custom';
49
- 'base-variant'?: DsButtonStandardVariant;
50
- 'custom-background'?: string;
51
- 'custom-color'?: string;
52
- };
53
- export type DsButtonAttrs = (StandardVariantAttrs | CustomVariantAttrs) & SharedButtonAttrs & HtmlElement & CommonAttrs;
43
+ } & HtmlElement & CommonAttrs;
54
44
  export {};
@@ -5,7 +5,6 @@ declare const DsIconButton_base: (new (...args: any[]) => import("../../mixins/V
5
5
  export declare class DsIconButton extends DsIconButton_base {
6
6
  static styles: import("lit").CSSResult[];
7
7
  variant: DsIconButtonAttrs['variant'];
8
- baseVariant: DsIconButtonAttrs['base-variant'];
9
8
  customBackground: DsIconButtonAttrs['custom-background'];
10
9
  customColor: DsIconButtonAttrs['custom-color'];
11
10
  mode: DsIconButtonAttrs['mode'];
@@ -23,25 +23,15 @@ type CustomElement = {
23
23
  target?: never;
24
24
  };
25
25
  type HtmlElement = Link | Button | CustomElement;
26
- type SharedIconButtonAttrs = {
26
+ export type DsIconButtonStandardVariant = 'primary' | 'secondary' | 'tertiary' | 'quaternary' | 'naked' | 'rounded';
27
+ export type DsIconButtonAttrs = {
28
+ variant?: DsIconButtonStandardVariant | (string & {});
29
+ 'custom-background'?: string;
30
+ 'custom-color'?: string;
27
31
  mode?: 'dark' | 'light';
28
32
  size?: Size | ResponsiveSize;
29
33
  disabled?: boolean;
30
34
  'data-aria-label'?: string;
31
35
  'icon-name'?: DsIconAttrs['icon-name'];
32
- };
33
- export type DsIconButtonStandardVariant = 'primary' | 'secondary' | 'tertiary' | 'quaternary' | 'naked' | 'rounded';
34
- type StandardVariantAttrs = {
35
- variant?: DsIconButtonStandardVariant;
36
- 'base-variant'?: never;
37
- 'custom-background'?: never;
38
- 'custom-color'?: never;
39
- };
40
- type CustomVariantAttrs = {
41
- variant: 'custom';
42
- 'base-variant'?: DsIconButtonStandardVariant;
43
- 'custom-background'?: string;
44
- 'custom-color'?: string;
45
- };
46
- export type DsIconButtonAttrs = (StandardVariantAttrs | CustomVariantAttrs) & SharedIconButtonAttrs & HtmlElement & CommonAttrs;
36
+ } & HtmlElement & CommonAttrs;
47
37
  export {};
@@ -1,10 +1,10 @@
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_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/decorators.cjs`);const n=require(`../../_virtual/_@oxc-project_runtime@0.122.0/helpers/decorate.cjs`),r=require(`../base/UiKitElement.cjs`),i=require(`../../decorators/customUiKitElement.cjs`),a=require(`../../utils/booleanConverter.cjs`),o=require(`../../utils/htmlWithTokens.cjs`),s=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/directives/class-map.cjs`);const c=require(`../../mixins/ViewportMixin.cjs`),l=require(`../../utils/objectConverter.cjs`),u=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/choose.cjs`),d=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/when.cjs`),f=require(`./styles/common.styles.cjs`);var p=class extends c.ViewportMixin(r.UiKitElement){constructor(...e){super(...e),this.variant=`primary`,this.mode=`light`,this.size=`large`,this.disabled=!1,this.destructive=!1,this.htmlTagName=`button`,this.type=`button`,this.iconPosition=`left`,this.rounded=!1,this.fullWidth=!1,this.loading=!1,this.baseVariant=`primary`}static{this.styles=[f.buttonStyles,f.textStyles,f.loadingDotsStyles]}connectedCallback(){super.connectedCallback(),this.closestForm=this.closest(`form`)}get classes(){let e=typeof this.size==`string`?this.size:this.size[this.viewport],t=this.variant===`custom`?this.baseVariant:this.variant;return{button:!0,[`tag-${this.htmlTagName}`]:!0,[`variant-${t}`]:!0,custom:this.variant===`custom`,[e]:!!e,[this.mode]:!!this.mode,rounded:this.rounded,disabled:this.disabled||this.loading,destructive:this.destructive,"full-width":this.fullWidth}}handleClick(e){if(this.href||e.preventDefault(),this.closestForm&&this.type===`submit`){let e=new Event(`submit`,{bubbles:!0,composed:!0,cancelable:!0});this.closestForm.dispatchEvent(e)}}handleCustomClick(e){let t=(this.shadowRoot?.querySelector(`slot`))?.assignedElements()[0];t&&!t.contains(e.composedPath()[0])&&(e.stopPropagation(),t.click())}get iconTemplate(){return this.iconName?this.componentFactory.createIcon({class:`icon`,"icon-name":this.iconName}):e.E}get loadingTemplate(){return this.loading?e.x`
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_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/decorators.cjs`);const n=require(`../../_virtual/_@oxc-project_runtime@0.122.0/helpers/decorate.cjs`),r=require(`../base/UiKitElement.cjs`),i=require(`../../decorators/customUiKitElement.cjs`),a=require(`../../utils/booleanConverter.cjs`),o=require(`../../utils/htmlWithTokens.cjs`),s=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/directives/class-map.cjs`);const c=require(`../../mixins/ViewportMixin.cjs`),l=require(`../../utils/objectConverter.cjs`),u=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/choose.cjs`),d=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/when.cjs`),f=require(`./styles/common.styles.cjs`);var p=class extends c.ViewportMixin(r.UiKitElement){constructor(...e){super(...e),this.variant=`primary`,this.mode=`light`,this.size=`large`,this.disabled=!1,this.destructive=!1,this.htmlTagName=`button`,this.type=`button`,this.iconPosition=`left`,this.rounded=!1,this.fullWidth=!1,this.loading=!1}static{this.styles=[f.buttonStyles,f.textStyles,f.loadingDotsStyles]}connectedCallback(){super.connectedCallback(),this.closestForm=this.closest(`form`)}get classes(){let e=typeof this.size==`string`?this.size:this.size[this.viewport],t=!!(this.customBackground||this.customColor);return{button:!0,[`tag-${this.htmlTagName}`]:!0,[`variant-${this.variant}`]:!0,custom:t,[e]:!!e,[this.mode]:!!this.mode,rounded:this.rounded,disabled:this.disabled||this.loading,destructive:this.destructive,"full-width":this.fullWidth}}handleClick(e){if(this.href||e.preventDefault(),this.closestForm&&this.type===`submit`){let e=new Event(`submit`,{bubbles:!0,composed:!0,cancelable:!0});this.closestForm.dispatchEvent(e)}}handleCustomClick(e){let t=(this.shadowRoot?.querySelector(`slot`))?.assignedElements()[0];t&&!t.contains(e.composedPath()[0])&&(e.stopPropagation(),t.click())}get iconTemplate(){return this.iconName?this.componentFactory.createIcon({class:`icon`,"icon-name":this.iconName}):e.E}get loadingTemplate(){return this.loading?e.x`
2
2
  <span class="loading-dots">
3
3
  <span>.</span>
4
4
  <span>.</span>
5
5
  <span>.</span>
6
6
  </span>
7
- `:e.E}get contentTemplate(){return this.loading&&this.textLoading?e.x`${this.textLoading}`:e.x`<slot></slot>`}updated(e){super.updated(e),this.variant===`custom`&&this.customBackground?this.style.setProperty(`--ui-kit-button-custom-bg`,this.customBackground):this.style.removeProperty(`--ui-kit-button-custom-bg`),this.variant===`custom`&&this.customColor?this.style.setProperty(`--ui-kit-button-custom-color`,this.customColor):this.style.removeProperty(`--ui-kit-button-custom-color`)}get cssTokens(){return o.htmlWithTokens`
7
+ `:e.E}get contentTemplate(){return this.loading&&this.textLoading?e.x`${this.textLoading}`:e.x`<slot></slot>`}updated(e){super.updated(e),this.customBackground?this.style.setProperty(`--ui-kit-button-custom-bg`,this.customBackground):this.style.removeProperty(`--ui-kit-button-custom-bg`),this.customColor?this.style.setProperty(`--ui-kit-button-custom-color`,this.customColor):this.style.removeProperty(`--ui-kit-button-custom-color`)}get cssTokens(){return o.htmlWithTokens`
8
8
  <style>
9
9
  :host{
10
10
  color-scheme: ${this.mode};
@@ -54,4 +54,4 @@ const e=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/l
54
54
  ${d.n(this.iconPosition===`right`,()=>e.x`${this.iconTemplate}`)}
55
55
  </div>
56
56
  `]])}
57
- `}};n.__decorate([t.n({type:String,reflect:!0})],p.prototype,`variant`,void 0),n.__decorate([t.n({type:String,reflect:!0})],p.prototype,`mode`,void 0),n.__decorate([t.n({type:String,converter:l.objectConverter})],p.prototype,`size`,void 0),n.__decorate([t.n({type:Boolean,converter:a.booleanConverter})],p.prototype,`disabled`,void 0),n.__decorate([t.n({type:Boolean,converter:a.booleanConverter})],p.prototype,`destructive`,void 0),n.__decorate([t.n({type:String,attribute:`icon-name`})],p.prototype,`iconName`,void 0),n.__decorate([t.n({type:String,attribute:`html-tag-name`})],p.prototype,`htmlTagName`,void 0),n.__decorate([t.n({type:String,reflect:!0})],p.prototype,`href`,void 0),n.__decorate([t.n({type:String,reflect:!0})],p.prototype,`rel`,void 0),n.__decorate([t.n({type:String,reflect:!0})],p.prototype,`target`,void 0),n.__decorate([t.n({type:String})],p.prototype,`type`,void 0),n.__decorate([t.n({type:String,attribute:`icon-position`})],p.prototype,`iconPosition`,void 0),n.__decorate([t.n({type:Boolean,converter:a.booleanConverter})],p.prototype,`rounded`,void 0),n.__decorate([t.n({type:Boolean,converter:a.booleanConverter,attribute:`full-width`})],p.prototype,`fullWidth`,void 0),n.__decorate([t.n({type:Boolean,converter:a.booleanConverter})],p.prototype,`loading`,void 0),n.__decorate([t.n({type:String,attribute:`text-loading`})],p.prototype,`textLoading`,void 0),n.__decorate([t.n({type:String,attribute:`base-variant`})],p.prototype,`baseVariant`,void 0),n.__decorate([t.n({type:String,attribute:`custom-background`})],p.prototype,`customBackground`,void 0),n.__decorate([t.n({type:String,attribute:`custom-color`})],p.prototype,`customColor`,void 0),p=n.__decorate([i.customUiKitElement(`ds-button`)],p),Object.defineProperty(exports,`DsButton`,{enumerable:!0,get:function(){return p}});
57
+ `}};n.__decorate([t.n({type:String,reflect:!0})],p.prototype,`variant`,void 0),n.__decorate([t.n({type:String,reflect:!0})],p.prototype,`mode`,void 0),n.__decorate([t.n({type:String,converter:l.objectConverter})],p.prototype,`size`,void 0),n.__decorate([t.n({type:Boolean,converter:a.booleanConverter})],p.prototype,`disabled`,void 0),n.__decorate([t.n({type:Boolean,converter:a.booleanConverter})],p.prototype,`destructive`,void 0),n.__decorate([t.n({type:String,attribute:`icon-name`})],p.prototype,`iconName`,void 0),n.__decorate([t.n({type:String,attribute:`html-tag-name`})],p.prototype,`htmlTagName`,void 0),n.__decorate([t.n({type:String,reflect:!0})],p.prototype,`href`,void 0),n.__decorate([t.n({type:String,reflect:!0})],p.prototype,`rel`,void 0),n.__decorate([t.n({type:String,reflect:!0})],p.prototype,`target`,void 0),n.__decorate([t.n({type:String})],p.prototype,`type`,void 0),n.__decorate([t.n({type:String,attribute:`icon-position`})],p.prototype,`iconPosition`,void 0),n.__decorate([t.n({type:Boolean,converter:a.booleanConverter})],p.prototype,`rounded`,void 0),n.__decorate([t.n({type:Boolean,converter:a.booleanConverter,attribute:`full-width`})],p.prototype,`fullWidth`,void 0),n.__decorate([t.n({type:Boolean,converter:a.booleanConverter})],p.prototype,`loading`,void 0),n.__decorate([t.n({type:String,attribute:`text-loading`})],p.prototype,`textLoading`,void 0),n.__decorate([t.n({type:String,attribute:`custom-background`})],p.prototype,`customBackground`,void 0),n.__decorate([t.n({type:String,attribute:`custom-color`})],p.prototype,`customColor`,void 0),p=n.__decorate([i.customUiKitElement(`ds-button`)],p),Object.defineProperty(exports,`DsButton`,{enumerable:!0,get:function(){return p}});
@@ -1,4 +1,4 @@
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_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/decorators.cjs`);const n=require(`../../_virtual/_@oxc-project_runtime@0.122.0/helpers/decorate.cjs`),r=require(`../base/UiKitElement.cjs`),i=require(`../../decorators/customUiKitElement.cjs`),a=require(`../../utils/booleanConverter.cjs`),o=require(`../../utils/htmlWithTokens.cjs`),s=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/directives/class-map.cjs`);const c=require(`../../mixins/ViewportMixin.cjs`),l=require(`../../utils/objectConverter.cjs`),u=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/choose.cjs`),d=require(`./styles/common.styles.cjs`);var f=class extends c.ViewportMixin(r.UiKitElement){constructor(...e){super(...e),this.variant=`primary`,this.baseVariant=`primary`,this.mode=`light`,this.size=`large`,this.disabled=!1,this.htmlTagName=`button`}static{this.styles=[d.buttonStyles]}get iconTemplate(){return this.iconName?this.componentFactory.createIcon({class:`icon`,"icon-name":this.iconName}):e.E}handleClick(e){this.href||e.preventDefault()}handleCustomClick(e){let t=(this.shadowRoot?.querySelector(`slot`))?.assignedElements()[0];t&&!t.contains(e.composedPath()[0])&&(e.stopPropagation(),t.click())}get classes(){let e=typeof this.size==`string`?this.size:this.size[this.viewport],t=this.variant===`custom`?this.baseVariant:this.variant;return{button:!0,[`tag-${this.htmlTagName}`]:!0,[`variant-${t}`]:!0,custom:this.variant===`custom`,disabled:this.disabled,[e]:!!e,[this.mode]:!!this.mode}}updated(e){super.updated(e),this.variant===`custom`&&this.customBackground?this.style.setProperty(`--ui-kit-button-custom-bg`,this.customBackground):this.style.removeProperty(`--ui-kit-button-custom-bg`),this.variant===`custom`&&this.customColor?this.style.setProperty(`--ui-kit-button-custom-color`,this.customColor):this.style.removeProperty(`--ui-kit-button-custom-color`)}get variantColorTokens(){return o.htmlWithTokens`
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_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/decorators.cjs`);const n=require(`../../_virtual/_@oxc-project_runtime@0.122.0/helpers/decorate.cjs`),r=require(`../base/UiKitElement.cjs`),i=require(`../../decorators/customUiKitElement.cjs`),a=require(`../../utils/booleanConverter.cjs`),o=require(`../../utils/htmlWithTokens.cjs`),s=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/directives/class-map.cjs`);const c=require(`../../mixins/ViewportMixin.cjs`),l=require(`../../utils/objectConverter.cjs`),u=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/choose.cjs`),d=require(`./styles/common.styles.cjs`);var f=class extends c.ViewportMixin(r.UiKitElement){constructor(...e){super(...e),this.variant=`primary`,this.mode=`light`,this.size=`large`,this.disabled=!1,this.htmlTagName=`button`}static{this.styles=[d.buttonStyles]}get iconTemplate(){return this.iconName?this.componentFactory.createIcon({class:`icon`,"icon-name":this.iconName}):e.E}handleClick(e){this.href||e.preventDefault()}handleCustomClick(e){let t=(this.shadowRoot?.querySelector(`slot`))?.assignedElements()[0];t&&!t.contains(e.composedPath()[0])&&(e.stopPropagation(),t.click())}get classes(){let e=typeof this.size==`string`?this.size:this.size[this.viewport],t=!!(this.customBackground||this.customColor);return{button:!0,[`tag-${this.htmlTagName}`]:!0,[`variant-${this.variant}`]:!0,custom:t,disabled:this.disabled,[e]:!!e,[this.mode]:!!this.mode}}updated(e){super.updated(e),this.customBackground?this.style.setProperty(`--ui-kit-button-custom-bg`,this.customBackground):this.style.removeProperty(`--ui-kit-button-custom-bg`),this.customColor?this.style.setProperty(`--ui-kit-button-custom-color`,this.customColor):this.style.removeProperty(`--ui-kit-button-custom-color`)}get variantColorTokens(){return o.htmlWithTokens`
2
2
  <style>
3
3
  :host{
4
4
  color-scheme: ${this.mode};
@@ -32,4 +32,4 @@ const e=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/l
32
32
  <slot></slot>
33
33
  </div>
34
34
  `]])}
35
- `}};n.__decorate([t.n({type:String,reflect:!0})],f.prototype,`variant`,void 0),n.__decorate([t.n({type:String,attribute:`base-variant`})],f.prototype,`baseVariant`,void 0),n.__decorate([t.n({type:String,attribute:`custom-background`})],f.prototype,`customBackground`,void 0),n.__decorate([t.n({type:String,attribute:`custom-color`})],f.prototype,`customColor`,void 0),n.__decorate([t.n({type:String,reflect:!0})],f.prototype,`mode`,void 0),n.__decorate([t.n({type:String,converter:l.objectConverter})],f.prototype,`size`,void 0),n.__decorate([t.n({type:Boolean,converter:a.booleanConverter})],f.prototype,`disabled`,void 0),n.__decorate([t.n({type:String,attribute:`icon-name`})],f.prototype,`iconName`,void 0),n.__decorate([t.n({type:String,attribute:`html-tag-name`})],f.prototype,`htmlTagName`,void 0),n.__decorate([t.n({type:String,attribute:`data-aria-label`})],f.prototype,`dataAriaLabel`,void 0),n.__decorate([t.n({type:String,reflect:!0})],f.prototype,`href`,void 0),n.__decorate([t.n({type:String,reflect:!0})],f.prototype,`rel`,void 0),n.__decorate([t.n({type:String,reflect:!0})],f.prototype,`target`,void 0),f=n.__decorate([i.customUiKitElement(`ds-icon-button`)],f),Object.defineProperty(exports,`DsIconButton`,{enumerable:!0,get:function(){return f}});
35
+ `}};n.__decorate([t.n({type:String,reflect:!0})],f.prototype,`variant`,void 0),n.__decorate([t.n({type:String,attribute:`custom-background`})],f.prototype,`customBackground`,void 0),n.__decorate([t.n({type:String,attribute:`custom-color`})],f.prototype,`customColor`,void 0),n.__decorate([t.n({type:String,reflect:!0})],f.prototype,`mode`,void 0),n.__decorate([t.n({type:String,converter:l.objectConverter})],f.prototype,`size`,void 0),n.__decorate([t.n({type:Boolean,converter:a.booleanConverter})],f.prototype,`disabled`,void 0),n.__decorate([t.n({type:String,attribute:`icon-name`})],f.prototype,`iconName`,void 0),n.__decorate([t.n({type:String,attribute:`html-tag-name`})],f.prototype,`htmlTagName`,void 0),n.__decorate([t.n({type:String,attribute:`data-aria-label`})],f.prototype,`dataAriaLabel`,void 0),n.__decorate([t.n({type:String,reflect:!0})],f.prototype,`href`,void 0),n.__decorate([t.n({type:String,reflect:!0})],f.prototype,`rel`,void 0),n.__decorate([t.n({type:String,reflect:!0})],f.prototype,`target`,void 0),f=n.__decorate([i.customUiKitElement(`ds-icon-button`)],f),Object.defineProperty(exports,`DsIconButton`,{enumerable:!0,get:function(){return f}});
@@ -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.125`,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.126`,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.125`)}})}}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.126`)}})}}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.125`),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.126`),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.125`),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.126`),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.125/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.126/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;
@@ -44,7 +44,6 @@ require(`../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.cjs`);const e=re
44
44
  rel=${r?.rel}
45
45
  target=${r?.target}
46
46
  data-testid=${r?.[`data-testid`]}
47
- base-variant=${e.o(r?.[`base-variant`])}
48
47
  custom-background=${e.o(r?.[`custom-background`])}
49
48
  custom-color=${e.o(r?.[`custom-color`])}
50
49
  >
@@ -73,7 +72,6 @@ require(`../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.cjs`);const e=re
73
72
  target=${r?.target}
74
73
  data-testid=${r?.[`data-testid`]}
75
74
  data-aria-label=${r?.[`data-aria-label`]}
76
- base-variant=${e.o(r?.[`base-variant`])}
77
75
  custom-background=${e.o(r?.[`custom-background`])}
78
76
  custom-color=${e.o(r?.[`custom-color`])}
79
77
  >
@@ -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-125`))}`}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-126`))}`}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-125`))}`}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-126`))}`}exports.htmlWithTokens=n;
@@ -1 +1 @@
1
- var e=`2.0.0-canary.125`,t=`--v${e.replaceAll(`.`,`-`)}`;exports.VERSION=e,exports.VERSION_TAG_SUFFIX=t;
1
+ var e=`2.0.0-canary.126`,t=`--v${e.replaceAll(`.`,`-`)}`;exports.VERSION=e,exports.VERSION_TAG_SUFFIX=t;
@@ -17,7 +17,7 @@ import { buttonStyles as p, loadingDotsStyles as m, textStyles as h } from "./st
17
17
  //#region src/components/ds-button/ds-button.ts
18
18
  var g = class extends l(i) {
19
19
  constructor(...e) {
20
- super(...e), this.variant = "primary", this.mode = "light", this.size = "large", this.disabled = !1, this.destructive = !1, this.htmlTagName = "button", this.type = "button", this.iconPosition = "left", this.rounded = !1, this.fullWidth = !1, this.loading = !1, this.baseVariant = "primary";
20
+ super(...e), this.variant = "primary", this.mode = "light", this.size = "large", this.disabled = !1, this.destructive = !1, this.htmlTagName = "button", this.type = "button", this.iconPosition = "left", this.rounded = !1, this.fullWidth = !1, this.loading = !1;
21
21
  }
22
22
  static {
23
23
  this.styles = [
@@ -30,12 +30,12 @@ var g = class extends l(i) {
30
30
  super.connectedCallback(), this.closestForm = this.closest("form");
31
31
  }
32
32
  get classes() {
33
- let e = typeof this.size == "string" ? this.size : this.size[this.viewport], t = this.variant === "custom" ? this.baseVariant : this.variant;
33
+ let e = typeof this.size == "string" ? this.size : this.size[this.viewport], t = !!(this.customBackground || this.customColor);
34
34
  return {
35
35
  button: !0,
36
36
  [`tag-${this.htmlTagName}`]: !0,
37
- [`variant-${t}`]: !0,
38
- custom: this.variant === "custom",
37
+ [`variant-${this.variant}`]: !0,
38
+ custom: t,
39
39
  [e]: !!e,
40
40
  [this.mode]: !!this.mode,
41
41
  rounded: this.rounded,
@@ -77,7 +77,7 @@ var g = class extends l(i) {
77
77
  return this.loading && this.textLoading ? t`${this.textLoading}` : t`<slot></slot>`;
78
78
  }
79
79
  updated(e) {
80
- super.updated(e), this.variant === "custom" && this.customBackground ? this.style.setProperty("--ui-kit-button-custom-bg", this.customBackground) : this.style.removeProperty("--ui-kit-button-custom-bg"), this.variant === "custom" && this.customColor ? this.style.setProperty("--ui-kit-button-custom-color", this.customColor) : this.style.removeProperty("--ui-kit-button-custom-color");
80
+ super.updated(e), this.customBackground ? this.style.setProperty("--ui-kit-button-custom-bg", this.customBackground) : this.style.removeProperty("--ui-kit-button-custom-bg"), this.customColor ? this.style.setProperty("--ui-kit-button-custom-color", this.customColor) : this.style.removeProperty("--ui-kit-button-custom-color");
81
81
  }
82
82
  get cssTokens() {
83
83
  return s`
@@ -187,9 +187,6 @@ r([n({
187
187
  type: String,
188
188
  attribute: "text-loading"
189
189
  })], g.prototype, "textLoading", void 0), r([n({
190
- type: String,
191
- attribute: "base-variant"
192
- })], g.prototype, "baseVariant", void 0), r([n({
193
190
  type: String,
194
191
  attribute: "custom-background"
195
192
  })], g.prototype, "customBackground", void 0), r([n({
@@ -16,7 +16,7 @@ import { buttonStyles as f } from "./styles/common.styles.js";
16
16
  //#region src/components/ds-icon-button/ds-icon-button.ts
17
17
  var p = class extends l(i) {
18
18
  constructor(...e) {
19
- super(...e), this.variant = "primary", this.baseVariant = "primary", this.mode = "light", this.size = "large", this.disabled = !1, this.htmlTagName = "button";
19
+ super(...e), this.variant = "primary", this.mode = "light", this.size = "large", this.disabled = !1, this.htmlTagName = "button";
20
20
  }
21
21
  static {
22
22
  this.styles = [f];
@@ -35,19 +35,19 @@ var p = class extends l(i) {
35
35
  t && !t.contains(e.composedPath()[0]) && (e.stopPropagation(), t.click());
36
36
  }
37
37
  get classes() {
38
- let e = typeof this.size == "string" ? this.size : this.size[this.viewport], t = this.variant === "custom" ? this.baseVariant : this.variant;
38
+ let e = typeof this.size == "string" ? this.size : this.size[this.viewport], t = !!(this.customBackground || this.customColor);
39
39
  return {
40
40
  button: !0,
41
41
  [`tag-${this.htmlTagName}`]: !0,
42
- [`variant-${t}`]: !0,
43
- custom: this.variant === "custom",
42
+ [`variant-${this.variant}`]: !0,
43
+ custom: t,
44
44
  disabled: this.disabled,
45
45
  [e]: !!e,
46
46
  [this.mode]: !!this.mode
47
47
  };
48
48
  }
49
49
  updated(e) {
50
- super.updated(e), this.variant === "custom" && this.customBackground ? this.style.setProperty("--ui-kit-button-custom-bg", this.customBackground) : this.style.removeProperty("--ui-kit-button-custom-bg"), this.variant === "custom" && this.customColor ? this.style.setProperty("--ui-kit-button-custom-color", this.customColor) : this.style.removeProperty("--ui-kit-button-custom-color");
50
+ super.updated(e), this.customBackground ? this.style.setProperty("--ui-kit-button-custom-bg", this.customBackground) : this.style.removeProperty("--ui-kit-button-custom-bg"), this.customColor ? this.style.setProperty("--ui-kit-button-custom-color", this.customColor) : this.style.removeProperty("--ui-kit-button-custom-color");
51
51
  }
52
52
  get variantColorTokens() {
53
53
  return s`
@@ -98,9 +98,6 @@ r([n({
98
98
  type: String,
99
99
  reflect: !0
100
100
  })], p.prototype, "variant", void 0), r([n({
101
- type: String,
102
- attribute: "base-variant"
103
- })], p.prototype, "baseVariant", void 0), r([n({
104
101
  type: String,
105
102
  attribute: "custom-background"
106
103
  })], p.prototype, "customBackground", void 0), r([n({
@@ -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.125", r = `https://ds-assets.cupra.com${n}/styles/${this.theme}/theme.css`;
53
+ let n = "/2.0.0-canary.126", 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.125");
18
+ i.prototype.connectedCallback?.call(this), this.setAttribute("data-ui-kit-version", "2.0.0-canary.126");
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.125"), i = globalThis, a = i[r];
28
+ }, r = Symbol.for("@cupra/ui-kit/icons-manager/2.0.0-canary.126"), 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.125"), n = globalThis, r = n[t];
21
+ }, t = Symbol.for("@cupra/ui-kit/pubsub/2.0.0-canary.126"), 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.125/styles/${n}/components/${e}.css`, i = this.getCachedStyleSheetPromise({ url: r });
7
+ let r = `https://ds-assets.cupra.com/2.0.0-canary.126/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);
@@ -54,7 +54,6 @@ var i = t(`ds-icon${r}`), a = t(`ds-calendar-day${r}`), o = t(`ds-button${r}`),
54
54
  rel=${t?.rel}
55
55
  target=${t?.target}
56
56
  data-testid=${t?.["data-testid"]}
57
- base-variant=${e(t?.["base-variant"])}
58
57
  custom-background=${e(t?.["custom-background"])}
59
58
  custom-color=${e(t?.["custom-color"])}
60
59
  >
@@ -85,7 +84,6 @@ var i = t(`ds-icon${r}`), a = t(`ds-calendar-day${r}`), o = t(`ds-button${r}`),
85
84
  target=${t?.target}
86
85
  data-testid=${t?.["data-testid"]}
87
86
  data-aria-label=${t?.["data-aria-label"]}
88
- base-variant=${e(t?.["base-variant"])}
89
87
  custom-background=${e(t?.["custom-background"])}
90
88
  custom-color=${e(t?.["custom-color"])}
91
89
  >
@@ -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-125"))}`;
5
+ return e`${t(String.raw({ raw: n }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v2-0-0-canary-126"))}`;
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-125"))}`;
7
+ return e`${t(String.raw({ raw: n }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v2-0-0-canary-126"))}`;
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.125", t = `--v${e.replaceAll(".", "-")}`;
2
+ var e = "2.0.0-canary.126", t = `--v${e.replaceAll(".", "-")}`;
3
3
  //#endregion
4
4
  export { e as VERSION, t as VERSION_TAG_SUFFIX };
@@ -19,7 +19,6 @@ export declare class DsButton extends DsButton_base {
19
19
  fullWidth: DsButtonAttrs['full-width'];
20
20
  loading: DsButtonAttrs['loading'];
21
21
  textLoading: DsButtonAttrs['text-loading'];
22
- baseVariant: DsButtonAttrs['base-variant'];
23
22
  customBackground: DsButtonAttrs['custom-background'];
24
23
  customColor: DsButtonAttrs['custom-color'];
25
24
  private closestForm;
@@ -23,7 +23,11 @@ type CustomElement = {
23
23
  target?: never;
24
24
  };
25
25
  type HtmlElement = Link | Button | CustomElement;
26
- type SharedButtonAttrs = {
26
+ export type DsButtonStandardVariant = 'primary' | 'secondary' | 'tertiary' | 'naked';
27
+ export type DsButtonAttrs = {
28
+ variant?: DsButtonStandardVariant | (string & {});
29
+ 'custom-background'?: string;
30
+ 'custom-color'?: string;
27
31
  mode?: 'dark' | 'light';
28
32
  disabled?: boolean;
29
33
  destructive?: boolean;
@@ -36,19 +40,5 @@ type SharedButtonAttrs = {
36
40
  'full-width'?: boolean;
37
41
  loading?: boolean;
38
42
  'text-loading'?: string;
39
- };
40
- export type DsButtonStandardVariant = 'primary' | 'secondary' | 'tertiary' | 'naked';
41
- type StandardVariantAttrs = {
42
- variant?: DsButtonStandardVariant;
43
- 'base-variant'?: never;
44
- 'custom-background'?: never;
45
- 'custom-color'?: never;
46
- };
47
- type CustomVariantAttrs = {
48
- variant: 'custom';
49
- 'base-variant'?: DsButtonStandardVariant;
50
- 'custom-background'?: string;
51
- 'custom-color'?: string;
52
- };
53
- export type DsButtonAttrs = (StandardVariantAttrs | CustomVariantAttrs) & SharedButtonAttrs & HtmlElement & CommonAttrs;
43
+ } & HtmlElement & CommonAttrs;
54
44
  export {};
@@ -5,7 +5,6 @@ declare const DsIconButton_base: (new (...args: any[]) => import("../../mixins/V
5
5
  export declare class DsIconButton extends DsIconButton_base {
6
6
  static styles: import("lit").CSSResult[];
7
7
  variant: DsIconButtonAttrs['variant'];
8
- baseVariant: DsIconButtonAttrs['base-variant'];
9
8
  customBackground: DsIconButtonAttrs['custom-background'];
10
9
  customColor: DsIconButtonAttrs['custom-color'];
11
10
  mode: DsIconButtonAttrs['mode'];
@@ -23,25 +23,15 @@ type CustomElement = {
23
23
  target?: never;
24
24
  };
25
25
  type HtmlElement = Link | Button | CustomElement;
26
- type SharedIconButtonAttrs = {
26
+ export type DsIconButtonStandardVariant = 'primary' | 'secondary' | 'tertiary' | 'quaternary' | 'naked' | 'rounded';
27
+ export type DsIconButtonAttrs = {
28
+ variant?: DsIconButtonStandardVariant | (string & {});
29
+ 'custom-background'?: string;
30
+ 'custom-color'?: string;
27
31
  mode?: 'dark' | 'light';
28
32
  size?: Size | ResponsiveSize;
29
33
  disabled?: boolean;
30
34
  'data-aria-label'?: string;
31
35
  'icon-name'?: DsIconAttrs['icon-name'];
32
- };
33
- export type DsIconButtonStandardVariant = 'primary' | 'secondary' | 'tertiary' | 'quaternary' | 'naked' | 'rounded';
34
- type StandardVariantAttrs = {
35
- variant?: DsIconButtonStandardVariant;
36
- 'base-variant'?: never;
37
- 'custom-background'?: never;
38
- 'custom-color'?: never;
39
- };
40
- type CustomVariantAttrs = {
41
- variant: 'custom';
42
- 'base-variant'?: DsIconButtonStandardVariant;
43
- 'custom-background'?: string;
44
- 'custom-color'?: string;
45
- };
46
- export type DsIconButtonAttrs = (StandardVariantAttrs | CustomVariantAttrs) & SharedIconButtonAttrs & HtmlElement & CommonAttrs;
36
+ } & HtmlElement & CommonAttrs;
47
37
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cupra/ui-kit",
3
- "version": "2.0.0-canary.125",
3
+ "version": "2.0.0-canary.126",
4
4
  "description": "Web components library",
5
5
  "author": "SEAT S.A.",
6
6
  "license": "SEAT S.A. Library EULA 1.0",