@cupra/ui-kit 2.0.0-canary.95 → 2.0.0-canary.97

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 (51) hide show
  1. package/dist/cjs/components/ds-icon/iconNames.cjs +1 -1
  2. package/dist/cjs/components/ds-navigation-controls/ds-navigation-controls.cjs +3 -3
  3. package/dist/cjs/components/ds-navigation-controls/styles/common.styles.cjs +1 -1
  4. package/dist/cjs/components/ds-secondary-navigation/ds-secondary-navigation.cjs +7 -7
  5. package/dist/cjs/components/ds-theme-provider/ds-theme-provider.cjs +1 -1
  6. package/dist/cjs/utils/IconsManager.cjs +1 -1
  7. package/dist/cjs/utils/PubSub.cjs +1 -1
  8. package/dist/cjs/utils/StylesRegistry/StylesRegistry.cjs +1 -1
  9. package/dist/cjs/utils/cssWithTokens.cjs +1 -1
  10. package/dist/cjs/utils/htmlWithTokens.cjs +1 -1
  11. package/dist/esm/components/ds-icon/iconNames.js +1 -1
  12. package/dist/esm/components/ds-navigation-controls/ds-navigation-controls.js +35 -8
  13. package/dist/esm/components/ds-navigation-controls/styles/common.styles.js +1 -1
  14. package/dist/esm/components/ds-secondary-navigation/ds-secondary-navigation.js +68 -47
  15. package/dist/esm/components/ds-theme-provider/ds-theme-provider.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/cssWithTokens.js +1 -1
  20. package/dist/esm/utils/htmlWithTokens.js +1 -1
  21. package/dist/types/components/ds-icon/Icons.type.d.ts +1 -1
  22. package/dist/types/components/ds-icon/iconNames.d.ts +1 -1
  23. package/dist/types/components/ds-navigation-controls/ds-navigation-controls.d.ts +11 -1
  24. package/dist/types/components/ds-secondary-navigation/ds-secondary-navigation.d.ts +8 -2
  25. package/dist/types/components/ds-secondary-navigation/ds-secondary-navigation.types.d.ts +4 -0
  26. package/dist-react/cjs/components/ds-icon/iconNames.cjs +1 -1
  27. package/dist-react/cjs/components/ds-navigation-controls/ds-navigation-controls.cjs +3 -3
  28. package/dist-react/cjs/components/ds-navigation-controls/styles/common.styles.cjs +1 -1
  29. package/dist-react/cjs/components/ds-secondary-navigation/ds-secondary-navigation.cjs +7 -7
  30. package/dist-react/cjs/components/ds-theme-provider/ds-theme-provider.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/cssWithTokens.cjs +1 -1
  35. package/dist-react/cjs/utils/htmlWithTokens.cjs +1 -1
  36. package/dist-react/esm/components/ds-icon/iconNames.js +1 -1
  37. package/dist-react/esm/components/ds-navigation-controls/ds-navigation-controls.js +35 -8
  38. package/dist-react/esm/components/ds-navigation-controls/styles/common.styles.js +1 -1
  39. package/dist-react/esm/components/ds-secondary-navigation/ds-secondary-navigation.js +68 -47
  40. package/dist-react/esm/components/ds-theme-provider/ds-theme-provider.js +1 -1
  41. package/dist-react/esm/utils/IconsManager.js +1 -1
  42. package/dist-react/esm/utils/PubSub.js +1 -1
  43. package/dist-react/esm/utils/StylesRegistry/StylesRegistry.js +1 -1
  44. package/dist-react/esm/utils/cssWithTokens.js +1 -1
  45. package/dist-react/esm/utils/htmlWithTokens.js +1 -1
  46. package/dist-react/types/components/ds-icon/Icons.type.d.ts +1 -1
  47. package/dist-react/types/components/ds-icon/iconNames.d.ts +1 -1
  48. package/dist-react/types/components/ds-navigation-controls/ds-navigation-controls.d.ts +11 -1
  49. package/dist-react/types/components/ds-secondary-navigation/ds-secondary-navigation.d.ts +8 -2
  50. package/dist-react/types/components/ds-secondary-navigation/ds-secondary-navigation.types.d.ts +4 -0
  51. package/package.json +2 -1
@@ -1,5 +1,15 @@
1
1
  import { UiKitElement } from '../base/UiKitElement.ts';
2
- export declare class DsNavigationControls extends UiKitElement {
2
+ import { type PropertyValues } from 'lit';
3
+ declare const DsNavigationControls_base: (new (...args: any[]) => import("../../mixins/ViewportMixin.ts").ViewportInterface) & typeof UiKitElement;
4
+ export declare class DsNavigationControls extends DsNavigationControls_base {
3
5
  static styles: import("lit").CSSResult[];
6
+ private slottedElements;
7
+ protected firstUpdated(changedProperties: PropertyValues): void;
8
+ protected updated(changedProperties: PropertyValues): void;
9
+ private handleSlotChange;
10
+ private getButtonSize;
11
+ private findIconButtons;
12
+ private updateIconButtonSizes;
4
13
  render(): import("lit").TemplateResult<1>;
5
14
  }
15
+ export {};
@@ -1,6 +1,6 @@
1
1
  import { UiKitElement } from '../base/UiKitElement.ts';
2
2
  import { type PropertyValues } from 'lit';
3
- import type { DsSecondaryNavigationAttrs } from './ds-secondary-navigation.types';
3
+ import type { ActionsMode, DsSecondaryNavigationAttrs, ItemsMode } from './ds-secondary-navigation.types';
4
4
  declare const DsSecondaryNavigation_base: (new (...args: any[]) => import("../../mixins/ViewportMixin.ts").ViewportInterface) & typeof UiKitElement;
5
5
  export declare class DsSecondaryNavigation extends DsSecondaryNavigation_base {
6
6
  static styles: import("lit").CSSResult[];
@@ -8,6 +8,8 @@ export declare class DsSecondaryNavigation extends DsSecondaryNavigation_base {
8
8
  selectedIndex: DsSecondaryNavigationAttrs['selected-index'];
9
9
  textTransform: DsSecondaryNavigationAttrs['text-transform'];
10
10
  keepDropdownButtonText: DsSecondaryNavigationAttrs['keep-dropdown-button-text'];
11
+ itemsMode: ItemsMode;
12
+ actionsMode: ActionsMode;
11
13
  private openItems;
12
14
  private openCtas;
13
15
  private hasScrollLeft;
@@ -31,15 +33,19 @@ export declare class DsSecondaryNavigation extends DsSecondaryNavigation_base {
31
33
  private updateCtas;
32
34
  private handleItemClick;
33
35
  private get textTransformStyle();
36
+ private get shouldShowItemsInline();
37
+ private get shouldShowItemsDropdownButton();
38
+ private get shouldShowActionsInline();
39
+ private get shouldShowActionsDropdownButton();
34
40
  render(): import("lit").TemplateResult<1>;
35
41
  private get itemsTemplate();
36
42
  private get actionsTemplate();
37
43
  protected get iconTemplate(): any;
44
+ protected get listIconTemplate(): any;
38
45
  private get itemsDropdownButtonTemplate();
39
46
  private get itemsDropdownTemplate();
40
47
  private get actionsDropdownButtonTemplate();
41
48
  private get actionsDropdownTemplate();
42
49
  private get backdropTemplate();
43
- private get shouldShowActionsDropdown();
44
50
  }
45
51
  export {};
@@ -1,7 +1,11 @@
1
1
  import { CommonAttrs } from '../../types/types';
2
+ export type ItemsMode = 'auto' | 'inline' | 'select' | 'icon-button';
3
+ export type ActionsMode = 'auto' | 'inline' | 'dropdown';
2
4
  export type DsSecondaryNavigationAttrs = {
3
5
  'dropdown-button-text'?: string;
4
6
  'selected-index'?: number;
5
7
  'text-transform'?: string;
6
8
  'keep-dropdown-button-text'?: boolean;
9
+ 'items-mode'?: ItemsMode;
10
+ 'actions-mode'?: ActionsMode;
7
11
  } & CommonAttrs;
@@ -1 +1 @@
1
- var e=`9-circles.ad-color.ae-color.af-color.ag-color.ai-color.al-color.am-color.an-color.ao-color.ar-color.arrow-down.arrow-down-line.arrow-download.arrow-exit.arrow-expand.arrow-external-link.arrow-left.arrow-left-line.arrow-reload.arrow-right.arrow-right-line.arrow-rotate-360.arrow-rotate-360-horizontal.arrow-switch.arrow-up.arrow-up-line.arrow-upload.at-color.au-color.aw-color.ax-color.az-color.b-color.ba-color.battery-g-4-01.battery-inclined-fill.battery-vertical-100.battery-2-sub-arrows-up.battery-3-sub-arrows-up.bb-color.bd-color.be-color.bell.bf-color.bg-color.bh-color.bi-color.bill.bin.bj-color.bm-color.bn-color.bo-color.book-mark.box.br-color.bs-color.bt-color.bw-color.by-color.bz-color.c-color.ca-color.cable.caf-color.calendar.camera.car-arrow-down.car-compare.car-door.car-frontal.car-imodel.car-in-window.car-lateral.car-model.car-seat.cart.cart-down.cas-color.cd-color.cercle-ribbon-check.ceu-color.cf-color.cg-color.ch-color.charger-acc.charger-type-2.chat-bubble.check.check-mark-circle.ci-color.city.cl-color.clock.cloud-co-2.cm-color.cn-color.cna-color.co-color.coc-color.computer-display.cr-color.credit-card.cross.cross-circle.csa-color.cu-color.cv-color.cy-color.cz-color.de-color.dj-color.dk-color.dm-color.do-color.document.document-check.document-copy.document-download.document-time.dot.dz-color.ec-color.eco-color.ee-color.eg-color.electric-station.engine.envelope.equals-sign.er-color.es-color.et-color.eu-color.euro.exclamation-mark-circle.exclamation-mark-triangle.eye.eye-crossed-out.facebook.fi-color.filter.fj-color.fk-color.fm-color.fr-color.fuel-station.ga-color.garage.gb-color.gd-color.ge-color.gear.gg-color.gh-color.gi-color.globe.gm-color.gn-color.gq-color.gr-color.gt-color.gw-color.gy-color.half-star-filled.headlight.heart.heart-filled.highway.hk-color.hn-color.hr-color.ht-color.hu-color.id-color.ie-color.il-color.im-color.in-color.info-circle.info-triangle.instagram.iq-color.ir-color.is-color.it-color.je-color.jm-color.jo-color.jp-color.ke-color.key.kg-color.kh-color.km-color.kn-color.kp-color.kr-color.kw-color.ky-color.kz-color.la-color.label-a-color.label-b-color.label-c-color.label-d-color.label-e-color.label-f-color.label-g-color.label-h-color.label-i-color.label-j-color.label-k-color.label-l-color.label-m-color.lb-color.lc-color.li-color.light.lightning.link.linkedin.list.lk-color.loader.location-poi.lock-locked.lock-unlocked.logo.logo-light.logo-lockup.logo-wordmark.lr-color.ls-color.lt-color.lu-color.lv-color.ly-color.map.ma-color.magnifying-glass.magnifying-glass-minus.magnifying-glass-plus.math-symbols-square.mc-color.md-color.me-color.menu.mg-color.micro.micro-crossed-out.minus.mk-color.ml-color.mm-color.mn-color.mo-color.mobile.moon.mountains.mr-color.ms-color.mt-color.mu-color.mv-color.mw-color.mx-color.my-color.mz-color.na-color.ne-color.ng-color.ni-color.nl-color.no-color.np-color.nz-color.om-color.pa-color.parking.pause.pause-loading.pcircle.pe-color.pen.pen-paper.person-open-arms.pf-color.pg-color.ph-color.phone-contact.pig-coin.pk-color.pl-color.play.play-circle.plug-charge.plug-regular.plus.position.pr-color.pt-color.pw-color.py-color.qa-color.question-mark.ro-color.road.road-mountain.rs-color.ru-color.rw-color.sa-color.sb-color.scan-qr.sc-color.sd-color.se-color.seat-front.sg-color.sh-color.share.shopping-bag.si-color.sk-color.sl-color.sm-color.sn-color.so-color.speaker.speaker-crossed-out.spray.sr-color.st-color.star.star-filled.store.suitcase.sun.sv-color.sy-color.sz-color.tag.tc-color.td-color.telegram.tg-color.th-color.ticket.tj-color.tl-color.tm-color.tn-color.to-color.tr-color.transmission-automatic.transmission-manual.triple-dot-h.triple-dot-v.tt-color.tw-color.twitter.tz-color.ua-color.ug-color.us-color.user.uy-color.uz-color.vc-color.ve-color.vg-color.video-camera.video-camera-crossed-out.vimeo.vn-color.vu-color.wall-charger.whatsapp.wheel.wifi.wrench-hammer.ws-color.ww-color.ye-color.youtube.za-color.zero-color.zm-color.zw-color`.split(`.`);exports.iconNames=e;
1
+ var e=`9-circles.ad-color.ae-color.af-color.ag-color.ai-color.al-color.am-color.an-color.ao-color.ar-color.arrow-down.arrow-down-line.arrow-download.arrow-exit.arrow-expand.arrow-external-link.arrow-left.arrow-left-line.arrow-reload.arrow-right.arrow-right-line.arrow-rotate-360.arrow-rotate-360-horizontal.arrow-switch.arrow-up.arrow-up-line.arrow-upload.at-color.au-color.aw-color.ax-color.az-color.b-color.ba-color.battery-g-4-01.battery-inclined-fill.battery-vertical-100.battery-2-sub-arrows-up.battery-3-sub-arrows-up.bb-color.bd-color.be-color.bell.bf-color.bg-color.bh-color.bi-color.bill.bin.bj-color.bm-color.bn-color.bo-color.book-mark.box.br-color.bs-color.bt-color.bw-color.by-color.bz-color.c-color.ca-color.cable.caf-color.calendar.camera.car-arrow-down.car-compare.car-door.car-frontal.car-imodel.car-in-window.car-lateral.car-model.car-seat.cart.cart-down.cas-color.cd-color.cercle-ribbon-check.ceu-color.cf-color.cg-color.ch-color.charger-acc.charger-type-2.chat-bubble.check.check-mark-circle.ci-color.city.cl-color.clock.cloud-co-2.cm-color.cn-color.cna-color.co-color.coc-color.computer-display.cr-color.credit-card.cross.cross-circle.csa-color.cu-color.cv-color.cy-color.cz-color.de-color.dj-color.dk-color.dm-color.do-color.document.document-check.document-copy.document-download.document-time.dot.dz-color.ec-color.eco-color.ee-color.eg-color.electric-station.engine.envelope.equals-sign.er-color.es-color.et-color.eu-color.euro.exclamation-mark-circle.exclamation-mark-triangle.eye.eye-crossed-out.facebook.fi-color.filter.fj-color.fk-color.fm-color.fr-color.fuel-station.ga-color.garage.gb-color.gd-color.ge-color.gear.gg-color.gh-color.gi-color.globe.gm-color.gn-color.gq-color.gr-color.gt-color.gw-color.gy-color.half-star-filled.headlight.heart.heart-filled.highway.hk-color.hn-color.hr-color.ht-color.hu-color.id-color.ie-color.il-color.im-color.in-color.info-circle.info-triangle.instagram.iq-color.ir-color.is-color.it-color.je-color.jm-color.jo-color.jp-color.ke-color.key.kg-color.kh-color.km-color.kn-color.kp-color.kr-color.kw-color.ky-color.kz-color.la-color.label-a-color.label-b-color.label-c-color.label-d-color.label-e-color.label-f-color.label-g-color.label-h-color.label-i-color.label-j-color.label-k-color.label-l-color.label-m-color.lb-color.lc-color.li-color.light.lightning.link.linkedin.list.list-line.lk-color.loader.location-poi.lock-locked.lock-unlocked.logo.logo-light.logo-lockup.logo-wordmark.lr-color.ls-color.lt-color.lu-color.lv-color.ly-color.map.ma-color.magnifying-glass.magnifying-glass-minus.magnifying-glass-plus.math-symbols-square.mc-color.md-color.me-color.menu.mg-color.micro.micro-crossed-out.minus.mk-color.ml-color.mm-color.mn-color.mo-color.mobile.moon.mountains.mr-color.ms-color.mt-color.mu-color.mv-color.mw-color.mx-color.my-color.mz-color.na-color.ne-color.ng-color.ni-color.nl-color.no-color.np-color.nz-color.om-color.pa-color.parking.pause.pause-loading.pcircle.pe-color.pen.pen-paper.person-open-arms.pf-color.pg-color.ph-color.phone-contact.pig-coin.pk-color.pl-color.play.play-circle.plug-charge.plug-regular.plus.position.pr-color.pt-color.pw-color.py-color.qa-color.question-mark.ro-color.road.road-mountain.rs-color.ru-color.rw-color.sa-color.sb-color.scan-qr.sc-color.sd-color.se-color.seat-front.sg-color.sh-color.share.shopping-bag.si-color.sk-color.sl-color.sm-color.sn-color.so-color.speaker.speaker-crossed-out.spray.sr-color.st-color.star.star-filled.store.suitcase.sun.sv-color.sy-color.sz-color.tag.tc-color.td-color.telegram.tg-color.th-color.ticket.tj-color.tl-color.tm-color.tn-color.to-color.tr-color.transmission-automatic.transmission-manual.triple-dot-h.triple-dot-v.tt-color.tw-color.twitter.tz-color.ua-color.ug-color.us-color.user.uy-color.uz-color.vc-color.ve-color.vg-color.video-camera.video-camera-crossed-out.vimeo.vn-color.vu-color.wall-charger.whatsapp.wheel.wifi.wrench-hammer.ws-color.ww-color.ye-color.youtube.za-color.zero-color.zm-color.zw-color`.split(`.`);exports.iconNames=e;
@@ -1,5 +1,5 @@
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(`../../_virtual/_@oxc-project_runtime@0.122.0/helpers/decorate.cjs`),n=require(`../base/UiKitElement.cjs`),r=require(`../../decorators/customUiKitElement.cjs`),i=require(`./styles/common.styles.cjs`);var a=class extends n.UiKitElement{static{this.styles=[i.commonStyles]}render(){return 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/query-assigned-elements.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(`../../mixins/ViewportMixin.cjs`),o=require(`./styles/common.styles.cjs`);var s=[`DS-ICON-BUTTON`,`DS-ICON-BUTTON-REACT`],c=class extends a.ViewportMixin(r.UiKitElement){constructor(...e){super(...e),this.handleSlotChange=()=>{this.updateIconButtonSizes()}}static{this.styles=[o.commonStyles]}firstUpdated(e){super.firstUpdated(e),this.updateIconButtonSizes()}updated(e){super.updated(e),e.has(`viewport`)&&this.updateIconButtonSizes()}getButtonSize(){return[`xxl`,`xl`].includes(this.viewport)?`large`:`medium`}findIconButtons(e){let t=[];s.includes(e.tagName)&&t.push(e);for(let n of e.children)t.push(...this.findIconButtons(n));return t}updateIconButtonSizes(){let e=this.getButtonSize(),t=this.slottedElements.flatMap(e=>this.findIconButtons(e));for(let n of t)n.setAttribute(`size`,e)}render(){return e.x`
2
2
  <div part="container" class="container" role="group" aria-label="Navigation controls">
3
- <slot></slot>
3
+ <slot @slotchange=${this.handleSlotChange}></slot>
4
4
  </div>
5
- `}};a=t.__decorate([r.customUiKitElement(`ds-navigation-controls`)],a);
5
+ `}};n.__decorate([t.o({flatten:!0})],c.prototype,`slottedElements`,void 0),c=n.__decorate([i.customUiKitElement(`ds-navigation-controls`)],c);
@@ -10,7 +10,7 @@ const e=require(`../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_mo
10
10
 
11
11
  ::slotted(div) {
12
12
  display: flex;
13
- gap: 12px;
13
+ gap: var(--ui-kit-navigation-controls-section-gap, 12px);
14
14
  align-items: center;
15
15
  }
16
16
  `;exports.commonStyles=t;
@@ -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`),n=require(`../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.cjs`),r=require(`../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query.cjs`),i=require(`../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query-assigned-elements.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/decorators.cjs`);const a=require(`../../_virtual/_@oxc-project_runtime@0.122.0/helpers/decorate.cjs`),o=require(`../base/UiKitElement.cjs`),s=require(`../../decorators/customUiKitElement.cjs`),c=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 l=require(`../../mixins/ViewportMixin.cjs`),u=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/style-map.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/directives/style-map.cjs`);const d=require(`./styles/common.styles.cjs`);var f=class extends l.ViewportMixin(o.UiKitElement){constructor(...e){super(...e),this.dropdownButtonText=`Menu`,this.textTransform=`none`,this.keepDropdownButtonText=!1,this.openItems=!1,this.openCtas=!1,this.hasScrollLeft=!1,this.hasScrollRight=!1,this.resizeObserver=new ResizeObserver(()=>{this.handleScroll()}),this.handleScroll=()=>{let e=this.itemsContainer?.scrollLeft+this.itemsContainer?.clientWidth;this.hasScrollLeft=this.itemsContainer?.scrollLeft>0,this.hasScrollRight=e<this.itemsContainer?.scrollWidth}}static{this.styles=[d.commonStyles]}updated(e){super.updated(e),e.has(`viewport`)&&this.updateCtas(),e.has(`selectedIndex`)&&this.updateSelectedItem()}firstUpdated(e){super.firstUpdated(e),this.handleScroll(),this.resizeObserver.observe(this.itemsContainer),window.addEventListener(`resize`,this.handleScroll),this.itemsContainer?.addEventListener(`scroll`,this.handleScroll)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.disconnect(),window.removeEventListener(`resize`,this.handleScroll)}get selectedItemText(){return this.keepDropdownButtonText?this.dropdownButtonText:this.items?.[this.selectedIndex]?.textContent?.trim()||this.dropdownButtonText}get classes(){return{nav:!0,"ds-blur":!0,"scroll-left":this.hasScrollLeft,"scroll-right":this.hasScrollRight}}toggleItemsDropdown(){this.openItems=!this.openItems,this.openItems&&(this.openCtas=!1)}toggleActionsDropdown(){this.openCtas=!this.openCtas,this.openCtas&&(this.openItems=!1)}closeDropdowns(){this.openItems=!1}handleItemsSlotChange(){this.updateSelectedItem()}handleActionsSlotChange(){this.updateCtas()}updateSelectedItem(){this.items?.forEach((e,t)=>{t===this.selectedIndex?e.classList.add(`selected`):e.classList.remove(`selected`)})}updateCtas(){this.ctas?.forEach(e=>{[`xxl`,`xl`].includes(this.viewport)?e?.setAttribute(`size`,`large`):e?.setAttribute(`size`,`medium`)})}handleItemClick(e){let t=e.target,n=this.items?.indexOf(t)??-1;if(n!==-1){this.selectedIndex=n,this.updateSelectedItem();let e=t.textContent?.trim()||t.getAttribute(`data-label`)||``;this.dispatchEvent(new CustomEvent(`ds-secondary-navigation:select`,{detail:{index:n,label:e},bubbles:!0,composed:!0})),this.closeDropdowns()}}get textTransformStyle(){return{textTransform:this.textTransform}}render(){return 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`),n=require(`../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.cjs`),r=require(`../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query.cjs`),i=require(`../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query-assigned-elements.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/decorators.cjs`);const a=require(`../../_virtual/_@oxc-project_runtime@0.122.0/helpers/decorate.cjs`),o=require(`../base/UiKitElement.cjs`),s=require(`../../decorators/customUiKitElement.cjs`),c=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 l=require(`../../mixins/ViewportMixin.cjs`),u=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/style-map.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/directives/style-map.cjs`);const d=require(`./styles/common.styles.cjs`);var f=class extends l.ViewportMixin(o.UiKitElement){constructor(...e){super(...e),this.dropdownButtonText=`Menu`,this.textTransform=`none`,this.keepDropdownButtonText=!1,this.itemsMode=`auto`,this.actionsMode=`auto`,this.openItems=!1,this.openCtas=!1,this.hasScrollLeft=!1,this.hasScrollRight=!1,this.resizeObserver=new ResizeObserver(()=>{this.handleScroll()}),this.handleScroll=()=>{let e=this.itemsContainer?.scrollLeft+this.itemsContainer?.clientWidth;this.hasScrollLeft=this.itemsContainer?.scrollLeft>0,this.hasScrollRight=e<this.itemsContainer?.scrollWidth}}static{this.styles=[d.commonStyles]}updated(e){super.updated(e),(e.has(`viewport`)||e.has(`actionsMode`))&&this.updateCtas(),e.has(`selectedIndex`)&&this.updateSelectedItem()}firstUpdated(e){super.firstUpdated(e),this.handleScroll(),this.resizeObserver.observe(this.itemsContainer),window.addEventListener(`resize`,this.handleScroll),this.itemsContainer?.addEventListener(`scroll`,this.handleScroll)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.disconnect(),window.removeEventListener(`resize`,this.handleScroll)}get selectedItemText(){return this.keepDropdownButtonText?this.dropdownButtonText:this.items?.[this.selectedIndex]?.textContent?.trim()||this.dropdownButtonText}get classes(){return{nav:!0,"ds-blur":!0,"scroll-left":this.hasScrollLeft,"scroll-right":this.hasScrollRight}}toggleItemsDropdown(){this.openItems=!this.openItems,this.openItems&&(this.openCtas=!1)}toggleActionsDropdown(){this.openCtas=!this.openCtas,this.openCtas&&(this.openItems=!1)}closeDropdowns(){this.openItems=!1}handleItemsSlotChange(){this.updateSelectedItem()}handleActionsSlotChange(){this.updateCtas()}updateSelectedItem(){this.items?.forEach((e,t)=>{t===this.selectedIndex?e.classList.add(`selected`):e.classList.remove(`selected`)})}updateCtas(){this.ctas?.forEach(e=>{[`xxl`,`xl`].includes(this.viewport)?e?.setAttribute(`size`,`large`):e?.setAttribute(`size`,`medium`)})}handleItemClick(e){let t=e.target,n=this.items?.indexOf(t)??-1;if(n!==-1){this.selectedIndex=n,this.updateSelectedItem();let e=t.textContent?.trim()||t.getAttribute(`data-label`)||``;this.dispatchEvent(new CustomEvent(`ds-secondary-navigation:select`,{detail:{index:n,label:e},bubbles:!0,composed:!0})),this.closeDropdowns()}}get textTransformStyle(){return{textTransform:this.textTransform}}get shouldShowItemsInline(){return this.itemsMode===`inline`?!0:this.itemsMode===`select`||this.itemsMode===`icon-button`?!1:[`l`,`xl`,`xxl`].includes(this.viewport)}get shouldShowItemsDropdownButton(){return this.itemsMode===`inline`?!1:this.itemsMode===`select`||this.itemsMode===`icon-button`?!0:[`xxs`,`xs`,`s`,`m`].includes(this.viewport)}get shouldShowActionsInline(){if(this.actionsMode===`inline`)return!0;if(this.actionsMode===`dropdown`)return!1;let e=[`xxs`,`xs`,`s`].includes(this.viewport);return[`m`,`l`,`xl`,`xxl`].includes(this.viewport)||e&&!this.shouldShowActionsDropdownButton}get shouldShowActionsDropdownButton(){return this.actionsMode===`inline`?!1:this.actionsMode===`dropdown`?!0:[`xxs`,`xs`,`s`].includes(this.viewport)&&this.ctas.length>1}render(){return e.x`
2
2
  ${this.backdropTemplate}
3
3
  <div class="container gutter">
4
4
  <nav data-testid="ds-secondary-navigation-container" class=${c.e(this.classes)}>
@@ -10,17 +10,17 @@ const e=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/l
10
10
  ${this.itemsDropdownTemplate}
11
11
  ${this.actionsDropdownTemplate}
12
12
  </div>
13
- `}get itemsTemplate(){return[`l`,`xl`,`xxl`].includes(this.viewport)?e.x`
13
+ `}get itemsTemplate(){return this.shouldShowItemsInline?e.x`
14
14
  <div class="items-container">
15
15
  <div style=${u.o(this.textTransformStyle)}>
16
16
  <slot name="items" @slotchange=${this.handleItemsSlotChange} @click=${this.handleItemClick}></slot>
17
17
  </div>
18
18
  </div>
19
- `:e.E}get actionsTemplate(){let t=[`xxs`,`xs`,`s`].includes(this.viewport);return![`m`,`l`,`xl`,`xxl`].includes(this.viewport)&&!(t&&!this.shouldShowActionsDropdown)?e.E:e.x`
19
+ `:e.E}get actionsTemplate(){return this.shouldShowActionsInline?e.x`
20
20
  <div class="actions-container" style=${u.o(this.textTransformStyle)}>
21
21
  <slot name="actions" @slotchange=${this.handleActionsSlotChange}></slot>
22
22
  </div>
23
- `}get iconTemplate(){return this.componentFactory.createIcon({class:`icon`,"icon-name":this.openItems?`arrow-down`:`arrow-up`,size:20})}get itemsDropdownButtonTemplate(){return[`xxs`,`xs`,`s`,`m`].includes(this.viewport)?e.x`
23
+ `:e.E}get iconTemplate(){return this.componentFactory.createIcon({class:`icon`,"icon-name":this.openItems?`arrow-down`:`arrow-up`,size:20})}get listIconTemplate(){return this.componentFactory.createIcon({class:`icon`,"icon-name":`list-line`,size:20})}get itemsDropdownButtonTemplate(){return this.shouldShowItemsDropdownButton?this.itemsMode===`icon-button`?this.componentFactory.createIconButton({class:`items-list-button`,"data-aria-label":`open items dropdown`,"@click":this.toggleItemsDropdown,size:`medium`,"icon-name":`list-line`}):e.x`
24
24
  <button
25
25
  class="items-dropdown-button"
26
26
  @click=${this.toggleItemsDropdown}
@@ -31,7 +31,7 @@ const e=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/l
31
31
  <span>${this.selectedItemText}</span>
32
32
  ${this.iconTemplate}
33
33
  </button>
34
- `:e.E}get itemsDropdownTemplate(){return[`xxs`,`xs`,`s`,`m`].includes(this.viewport)?e.x`
34
+ `:e.E}get itemsDropdownTemplate(){return this.shouldShowItemsDropdownButton?e.x`
35
35
  <div
36
36
  class=${c.e({gutter:!0,"dropdown-container":!0,"items-dropdown":!0,open:this.openItems})}
37
37
  role="menu"
@@ -41,7 +41,7 @@ const e=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/l
41
41
  <slot name="items" @slotchange=${this.handleItemsSlotChange} @click=${this.handleItemClick}></slot>
42
42
  </div>
43
43
  </div>
44
- `:e.E}get actionsDropdownButtonTemplate(){return![`xxs`,`xs`,`s`].includes(this.viewport)||!this.shouldShowActionsDropdown?e.E:this.componentFactory.createIconButton({class:`nav-arrow`,"data-aria-label":`open actions dropdown`,"@click":this.toggleActionsDropdown,size:`medium`,"icon-name":`triple-dot-v`})}get actionsDropdownTemplate(){return![`xxs`,`xs`,`s`].includes(this.viewport)||!this.shouldShowActionsDropdown?e.E:e.x`
44
+ `:e.E}get actionsDropdownButtonTemplate(){return this.shouldShowActionsDropdownButton?this.componentFactory.createIconButton({class:`nav-arrow`,"data-aria-label":`open actions dropdown`,"@click":this.toggleActionsDropdown,size:`medium`,"icon-name":`triple-dot-v`}):e.E}get actionsDropdownTemplate(){return this.shouldShowActionsDropdownButton?e.x`
45
45
  <div
46
46
  class=${c.e({gutter:!0,"dropdown-container":!0,"actions-dropdown":!0,open:this.openCtas})}
47
47
  role="menu"
@@ -51,4 +51,4 @@ const e=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/l
51
51
  <slot name="actions"></slot>
52
52
  </div>
53
53
  </div>
54
- `}get backdropTemplate(){return!this.openItems&&!this.openCtas?e.E:e.x`<div class="dropdown-backdrop" @click=${this.closeDropdowns}></div>`}get shouldShowActionsDropdown(){return this.ctas.length>1}};a.__decorate([t.n({type:String,attribute:`dropdown-button-text`})],f.prototype,`dropdownButtonText`,void 0),a.__decorate([t.n({type:Number,attribute:`selected-index`})],f.prototype,`selectedIndex`,void 0),a.__decorate([t.n({type:String,attribute:`text-transform`})],f.prototype,`textTransform`,void 0),a.__decorate([t.n({type:Boolean,attribute:`keep-dropdown-button-text`})],f.prototype,`keepDropdownButtonText`,void 0),a.__decorate([n.r()],f.prototype,`openItems`,void 0),a.__decorate([n.r()],f.prototype,`openCtas`,void 0),a.__decorate([n.r()],f.prototype,`hasScrollLeft`,void 0),a.__decorate([n.r()],f.prototype,`hasScrollRight`,void 0),a.__decorate([i.o({slot:`items`})],f.prototype,`items`,void 0),a.__decorate([i.o({slot:`actions`})],f.prototype,`ctas`,void 0),a.__decorate([r.e(`.items-container`)],f.prototype,`itemsContainer`,void 0),f=a.__decorate([s.customUiKitElement(`ds-secondary-navigation`)],f);
54
+ `:e.E}get backdropTemplate(){return!this.openItems&&!this.openCtas?e.E:e.x`<div class="dropdown-backdrop" @click=${this.closeDropdowns}></div>`}};a.__decorate([t.n({type:String,attribute:`dropdown-button-text`})],f.prototype,`dropdownButtonText`,void 0),a.__decorate([t.n({type:Number,attribute:`selected-index`})],f.prototype,`selectedIndex`,void 0),a.__decorate([t.n({type:String,attribute:`text-transform`})],f.prototype,`textTransform`,void 0),a.__decorate([t.n({type:Boolean,attribute:`keep-dropdown-button-text`})],f.prototype,`keepDropdownButtonText`,void 0),a.__decorate([t.n({type:String,attribute:`items-mode`})],f.prototype,`itemsMode`,void 0),a.__decorate([t.n({type:String,attribute:`actions-mode`})],f.prototype,`actionsMode`,void 0),a.__decorate([n.r()],f.prototype,`openItems`,void 0),a.__decorate([n.r()],f.prototype,`openCtas`,void 0),a.__decorate([n.r()],f.prototype,`hasScrollLeft`,void 0),a.__decorate([n.r()],f.prototype,`hasScrollRight`,void 0),a.__decorate([i.o({slot:`items`})],f.prototype,`items`,void 0),a.__decorate([i.o({slot:`actions`})],f.prototype,`ctas`,void 0),a.__decorate([r.e(`.items-container`)],f.prototype,`itemsContainer`,void 0),f=a.__decorate([s.customUiKitElement(`ds-secondary-navigation`)],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.95`,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.97`,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(`../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.95`),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.97`),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.95`),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.97`),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.95/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.97/styles/${n}/components/${t}.css`,i=this.getCachedStyleSheetPromise({url:r});if(i)return i;let a=e(()=>this.fetchStyle({url:r})).then(e=>(e||this.stylePromises.delete(r),e));return this.stylePromises.set(r,a),this.stylePromises.get(r)}}async fetchStyle({url:e}){try{if(typeof fetch>`u`)return;let t=await fetch(e,{cache:`force-cache`});if(t.ok)return t.text()}catch(t){console.error(`Failed to fetch Style Sheet "${e}":`,t)}}getCachedStyleSheetPromise({url:e}){return this.stylePromises.get(e)}static getInstance(){return t.instance||=new t,t.instance}}.getInstance();exports.stylesRegistry=t;
@@ -1 +1 @@
1
- const e=require(`../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.cjs`);require(`../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.cjs`);function t(t,...n){return e.i`${e.r(String.raw({raw:t},...n).replace(/(--private-[\w-]+)(?=\s*[):,])/g,`$1-v2-0-0-canary-95`))}`}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-97`))}`}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-95`))}`}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-97`))}`}exports.htmlWithTokens=n;
@@ -1,4 +1,4 @@
1
1
  //#region src/components/ds-icon/iconNames.ts
2
- var e = /* @__PURE__ */ "9-circles.ad-color.ae-color.af-color.ag-color.ai-color.al-color.am-color.an-color.ao-color.ar-color.arrow-down.arrow-down-line.arrow-download.arrow-exit.arrow-expand.arrow-external-link.arrow-left.arrow-left-line.arrow-reload.arrow-right.arrow-right-line.arrow-rotate-360.arrow-rotate-360-horizontal.arrow-switch.arrow-up.arrow-up-line.arrow-upload.at-color.au-color.aw-color.ax-color.az-color.b-color.ba-color.battery-g-4-01.battery-inclined-fill.battery-vertical-100.battery-2-sub-arrows-up.battery-3-sub-arrows-up.bb-color.bd-color.be-color.bell.bf-color.bg-color.bh-color.bi-color.bill.bin.bj-color.bm-color.bn-color.bo-color.book-mark.box.br-color.bs-color.bt-color.bw-color.by-color.bz-color.c-color.ca-color.cable.caf-color.calendar.camera.car-arrow-down.car-compare.car-door.car-frontal.car-imodel.car-in-window.car-lateral.car-model.car-seat.cart.cart-down.cas-color.cd-color.cercle-ribbon-check.ceu-color.cf-color.cg-color.ch-color.charger-acc.charger-type-2.chat-bubble.check.check-mark-circle.ci-color.city.cl-color.clock.cloud-co-2.cm-color.cn-color.cna-color.co-color.coc-color.computer-display.cr-color.credit-card.cross.cross-circle.csa-color.cu-color.cv-color.cy-color.cz-color.de-color.dj-color.dk-color.dm-color.do-color.document.document-check.document-copy.document-download.document-time.dot.dz-color.ec-color.eco-color.ee-color.eg-color.electric-station.engine.envelope.equals-sign.er-color.es-color.et-color.eu-color.euro.exclamation-mark-circle.exclamation-mark-triangle.eye.eye-crossed-out.facebook.fi-color.filter.fj-color.fk-color.fm-color.fr-color.fuel-station.ga-color.garage.gb-color.gd-color.ge-color.gear.gg-color.gh-color.gi-color.globe.gm-color.gn-color.gq-color.gr-color.gt-color.gw-color.gy-color.half-star-filled.headlight.heart.heart-filled.highway.hk-color.hn-color.hr-color.ht-color.hu-color.id-color.ie-color.il-color.im-color.in-color.info-circle.info-triangle.instagram.iq-color.ir-color.is-color.it-color.je-color.jm-color.jo-color.jp-color.ke-color.key.kg-color.kh-color.km-color.kn-color.kp-color.kr-color.kw-color.ky-color.kz-color.la-color.label-a-color.label-b-color.label-c-color.label-d-color.label-e-color.label-f-color.label-g-color.label-h-color.label-i-color.label-j-color.label-k-color.label-l-color.label-m-color.lb-color.lc-color.li-color.light.lightning.link.linkedin.list.lk-color.loader.location-poi.lock-locked.lock-unlocked.logo.logo-light.logo-lockup.logo-wordmark.lr-color.ls-color.lt-color.lu-color.lv-color.ly-color.map.ma-color.magnifying-glass.magnifying-glass-minus.magnifying-glass-plus.math-symbols-square.mc-color.md-color.me-color.menu.mg-color.micro.micro-crossed-out.minus.mk-color.ml-color.mm-color.mn-color.mo-color.mobile.moon.mountains.mr-color.ms-color.mt-color.mu-color.mv-color.mw-color.mx-color.my-color.mz-color.na-color.ne-color.ng-color.ni-color.nl-color.no-color.np-color.nz-color.om-color.pa-color.parking.pause.pause-loading.pcircle.pe-color.pen.pen-paper.person-open-arms.pf-color.pg-color.ph-color.phone-contact.pig-coin.pk-color.pl-color.play.play-circle.plug-charge.plug-regular.plus.position.pr-color.pt-color.pw-color.py-color.qa-color.question-mark.ro-color.road.road-mountain.rs-color.ru-color.rw-color.sa-color.sb-color.scan-qr.sc-color.sd-color.se-color.seat-front.sg-color.sh-color.share.shopping-bag.si-color.sk-color.sl-color.sm-color.sn-color.so-color.speaker.speaker-crossed-out.spray.sr-color.st-color.star.star-filled.store.suitcase.sun.sv-color.sy-color.sz-color.tag.tc-color.td-color.telegram.tg-color.th-color.ticket.tj-color.tl-color.tm-color.tn-color.to-color.tr-color.transmission-automatic.transmission-manual.triple-dot-h.triple-dot-v.tt-color.tw-color.twitter.tz-color.ua-color.ug-color.us-color.user.uy-color.uz-color.vc-color.ve-color.vg-color.video-camera.video-camera-crossed-out.vimeo.vn-color.vu-color.wall-charger.whatsapp.wheel.wifi.wrench-hammer.ws-color.ww-color.ye-color.youtube.za-color.zero-color.zm-color.zw-color".split(".");
2
+ var e = /* @__PURE__ */ "9-circles.ad-color.ae-color.af-color.ag-color.ai-color.al-color.am-color.an-color.ao-color.ar-color.arrow-down.arrow-down-line.arrow-download.arrow-exit.arrow-expand.arrow-external-link.arrow-left.arrow-left-line.arrow-reload.arrow-right.arrow-right-line.arrow-rotate-360.arrow-rotate-360-horizontal.arrow-switch.arrow-up.arrow-up-line.arrow-upload.at-color.au-color.aw-color.ax-color.az-color.b-color.ba-color.battery-g-4-01.battery-inclined-fill.battery-vertical-100.battery-2-sub-arrows-up.battery-3-sub-arrows-up.bb-color.bd-color.be-color.bell.bf-color.bg-color.bh-color.bi-color.bill.bin.bj-color.bm-color.bn-color.bo-color.book-mark.box.br-color.bs-color.bt-color.bw-color.by-color.bz-color.c-color.ca-color.cable.caf-color.calendar.camera.car-arrow-down.car-compare.car-door.car-frontal.car-imodel.car-in-window.car-lateral.car-model.car-seat.cart.cart-down.cas-color.cd-color.cercle-ribbon-check.ceu-color.cf-color.cg-color.ch-color.charger-acc.charger-type-2.chat-bubble.check.check-mark-circle.ci-color.city.cl-color.clock.cloud-co-2.cm-color.cn-color.cna-color.co-color.coc-color.computer-display.cr-color.credit-card.cross.cross-circle.csa-color.cu-color.cv-color.cy-color.cz-color.de-color.dj-color.dk-color.dm-color.do-color.document.document-check.document-copy.document-download.document-time.dot.dz-color.ec-color.eco-color.ee-color.eg-color.electric-station.engine.envelope.equals-sign.er-color.es-color.et-color.eu-color.euro.exclamation-mark-circle.exclamation-mark-triangle.eye.eye-crossed-out.facebook.fi-color.filter.fj-color.fk-color.fm-color.fr-color.fuel-station.ga-color.garage.gb-color.gd-color.ge-color.gear.gg-color.gh-color.gi-color.globe.gm-color.gn-color.gq-color.gr-color.gt-color.gw-color.gy-color.half-star-filled.headlight.heart.heart-filled.highway.hk-color.hn-color.hr-color.ht-color.hu-color.id-color.ie-color.il-color.im-color.in-color.info-circle.info-triangle.instagram.iq-color.ir-color.is-color.it-color.je-color.jm-color.jo-color.jp-color.ke-color.key.kg-color.kh-color.km-color.kn-color.kp-color.kr-color.kw-color.ky-color.kz-color.la-color.label-a-color.label-b-color.label-c-color.label-d-color.label-e-color.label-f-color.label-g-color.label-h-color.label-i-color.label-j-color.label-k-color.label-l-color.label-m-color.lb-color.lc-color.li-color.light.lightning.link.linkedin.list.list-line.lk-color.loader.location-poi.lock-locked.lock-unlocked.logo.logo-light.logo-lockup.logo-wordmark.lr-color.ls-color.lt-color.lu-color.lv-color.ly-color.map.ma-color.magnifying-glass.magnifying-glass-minus.magnifying-glass-plus.math-symbols-square.mc-color.md-color.me-color.menu.mg-color.micro.micro-crossed-out.minus.mk-color.ml-color.mm-color.mn-color.mo-color.mobile.moon.mountains.mr-color.ms-color.mt-color.mu-color.mv-color.mw-color.mx-color.my-color.mz-color.na-color.ne-color.ng-color.ni-color.nl-color.no-color.np-color.nz-color.om-color.pa-color.parking.pause.pause-loading.pcircle.pe-color.pen.pen-paper.person-open-arms.pf-color.pg-color.ph-color.phone-contact.pig-coin.pk-color.pl-color.play.play-circle.plug-charge.plug-regular.plus.position.pr-color.pt-color.pw-color.py-color.qa-color.question-mark.ro-color.road.road-mountain.rs-color.ru-color.rw-color.sa-color.sb-color.scan-qr.sc-color.sd-color.se-color.seat-front.sg-color.sh-color.share.shopping-bag.si-color.sk-color.sl-color.sm-color.sn-color.so-color.speaker.speaker-crossed-out.spray.sr-color.st-color.star.star-filled.store.suitcase.sun.sv-color.sy-color.sz-color.tag.tc-color.td-color.telegram.tg-color.th-color.ticket.tj-color.tl-color.tm-color.tn-color.to-color.tr-color.transmission-automatic.transmission-manual.triple-dot-h.triple-dot-v.tt-color.tw-color.twitter.tz-color.ua-color.ug-color.us-color.user.uy-color.uz-color.vc-color.ve-color.vg-color.video-camera.video-camera-crossed-out.vimeo.vn-color.vu-color.wall-charger.whatsapp.wheel.wifi.wrench-hammer.ws-color.ww-color.ye-color.youtube.za-color.zero-color.zm-color.zw-color".split(".");
3
3
  //#endregion
4
4
  export { e as iconNames };
@@ -1,21 +1,48 @@
1
1
  import { x as e } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
2
2
  import "../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.js";
3
- import { __decorate as t } from "../../_virtual/_@oxc-project_runtime@0.122.0/helpers/decorate.js";
4
- import { UiKitElement as n } from "../base/UiKitElement.js";
5
- import { customUiKitElement as r } from "../../decorators/customUiKitElement.js";
6
- import { commonStyles as i } from "./styles/common.styles.js";
3
+ import { o as t } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query-assigned-elements.js";
4
+ import "../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/decorators.js";
5
+ import { __decorate as n } from "../../_virtual/_@oxc-project_runtime@0.122.0/helpers/decorate.js";
6
+ import { UiKitElement as r } from "../base/UiKitElement.js";
7
+ import { customUiKitElement as i } from "../../decorators/customUiKitElement.js";
8
+ import { ViewportMixin as a } from "../../mixins/ViewportMixin.js";
9
+ import { commonStyles as o } from "./styles/common.styles.js";
7
10
  //#region src/components/ds-navigation-controls/ds-navigation-controls.ts
8
- var a = class extends n {
11
+ var s = ["DS-ICON-BUTTON", "DS-ICON-BUTTON-REACT"], c = class extends a(r) {
12
+ constructor(...e) {
13
+ super(...e), this.handleSlotChange = () => {
14
+ this.updateIconButtonSizes();
15
+ };
16
+ }
9
17
  static {
10
- this.styles = [i];
18
+ this.styles = [o];
19
+ }
20
+ firstUpdated(e) {
21
+ super.firstUpdated(e), this.updateIconButtonSizes();
22
+ }
23
+ updated(e) {
24
+ super.updated(e), e.has("viewport") && this.updateIconButtonSizes();
25
+ }
26
+ getButtonSize() {
27
+ return ["xxl", "xl"].includes(this.viewport) ? "large" : "medium";
28
+ }
29
+ findIconButtons(e) {
30
+ let t = [];
31
+ s.includes(e.tagName) && t.push(e);
32
+ for (let n of e.children) t.push(...this.findIconButtons(n));
33
+ return t;
34
+ }
35
+ updateIconButtonSizes() {
36
+ let e = this.getButtonSize(), t = this.slottedElements.flatMap((e) => this.findIconButtons(e));
37
+ for (let n of t) n.setAttribute("size", e);
11
38
  }
12
39
  render() {
13
40
  return e`
14
41
  <div part="container" class="container" role="group" aria-label="Navigation controls">
15
- <slot></slot>
42
+ <slot @slotchange=${this.handleSlotChange}></slot>
16
43
  </div>
17
44
  `;
18
45
  }
19
46
  };
20
- a = t([r("ds-navigation-controls")], a);
47
+ n([t({ flatten: !0 })], c.prototype, "slottedElements", void 0), c = n([i("ds-navigation-controls")], c);
21
48
  //#endregion
@@ -13,7 +13,7 @@ var t = e`
13
13
 
14
14
  ::slotted(div) {
15
15
  display: flex;
16
- gap: 12px;
16
+ gap: var(--ui-kit-navigation-controls-section-gap, 12px);
17
17
  align-items: center;
18
18
  }
19
19
  `;
@@ -17,7 +17,7 @@ import { commonStyles as f } from "./styles/common.styles.js";
17
17
  //#region src/components/ds-secondary-navigation/ds-secondary-navigation.ts
18
18
  var p = class extends u(s) {
19
19
  constructor(...e) {
20
- super(...e), this.dropdownButtonText = "Menu", this.textTransform = "none", this.keepDropdownButtonText = !1, this.openItems = !1, this.openCtas = !1, this.hasScrollLeft = !1, this.hasScrollRight = !1, this.resizeObserver = new ResizeObserver(() => {
20
+ super(...e), this.dropdownButtonText = "Menu", this.textTransform = "none", this.keepDropdownButtonText = !1, this.itemsMode = "auto", this.actionsMode = "auto", this.openItems = !1, this.openCtas = !1, this.hasScrollLeft = !1, this.hasScrollRight = !1, this.resizeObserver = new ResizeObserver(() => {
21
21
  this.handleScroll();
22
22
  }), this.handleScroll = () => {
23
23
  let e = this.itemsContainer?.scrollLeft + this.itemsContainer?.clientWidth;
@@ -28,7 +28,7 @@ var p = class extends u(s) {
28
28
  this.styles = [f];
29
29
  }
30
30
  updated(e) {
31
- super.updated(e), e.has("viewport") && this.updateCtas(), e.has("selectedIndex") && this.updateSelectedItem();
31
+ super.updated(e), (e.has("viewport") || e.has("actionsMode")) && this.updateCtas(), e.has("selectedIndex") && this.updateSelectedItem();
32
32
  }
33
33
  firstUpdated(e) {
34
34
  super.firstUpdated(e), this.handleScroll(), this.resizeObserver.observe(this.itemsContainer), window.addEventListener("resize", this.handleScroll), this.itemsContainer?.addEventListener("scroll", this.handleScroll);
@@ -90,6 +90,43 @@ var p = class extends u(s) {
90
90
  get textTransformStyle() {
91
91
  return { textTransform: this.textTransform };
92
92
  }
93
+ get shouldShowItemsInline() {
94
+ return this.itemsMode === "inline" ? !0 : this.itemsMode === "select" || this.itemsMode === "icon-button" ? !1 : [
95
+ "l",
96
+ "xl",
97
+ "xxl"
98
+ ].includes(this.viewport);
99
+ }
100
+ get shouldShowItemsDropdownButton() {
101
+ return this.itemsMode === "inline" ? !1 : this.itemsMode === "select" || this.itemsMode === "icon-button" ? !0 : [
102
+ "xxs",
103
+ "xs",
104
+ "s",
105
+ "m"
106
+ ].includes(this.viewport);
107
+ }
108
+ get shouldShowActionsInline() {
109
+ if (this.actionsMode === "inline") return !0;
110
+ if (this.actionsMode === "dropdown") return !1;
111
+ let e = [
112
+ "xxs",
113
+ "xs",
114
+ "s"
115
+ ].includes(this.viewport);
116
+ return [
117
+ "m",
118
+ "l",
119
+ "xl",
120
+ "xxl"
121
+ ].includes(this.viewport) || e && !this.shouldShowActionsDropdownButton;
122
+ }
123
+ get shouldShowActionsDropdownButton() {
124
+ return this.actionsMode === "inline" ? !1 : this.actionsMode === "dropdown" ? !0 : [
125
+ "xxs",
126
+ "xs",
127
+ "s"
128
+ ].includes(this.viewport) && this.ctas.length > 1;
129
+ }
93
130
  render() {
94
131
  return t`
95
132
  ${this.backdropTemplate}
@@ -106,11 +143,7 @@ var p = class extends u(s) {
106
143
  `;
107
144
  }
108
145
  get itemsTemplate() {
109
- return [
110
- "l",
111
- "xl",
112
- "xxl"
113
- ].includes(this.viewport) ? t`
146
+ return this.shouldShowItemsInline ? t`
114
147
  <div class="items-container">
115
148
  <div style=${d(this.textTransformStyle)}>
116
149
  <slot name="items" @slotchange=${this.handleItemsSlotChange} @click=${this.handleItemClick}></slot>
@@ -119,21 +152,11 @@ var p = class extends u(s) {
119
152
  ` : e;
120
153
  }
121
154
  get actionsTemplate() {
122
- let n = [
123
- "xxs",
124
- "xs",
125
- "s"
126
- ].includes(this.viewport);
127
- return ![
128
- "m",
129
- "l",
130
- "xl",
131
- "xxl"
132
- ].includes(this.viewport) && !(n && !this.shouldShowActionsDropdown) ? e : t`
155
+ return this.shouldShowActionsInline ? t`
133
156
  <div class="actions-container" style=${d(this.textTransformStyle)}>
134
157
  <slot name="actions" @slotchange=${this.handleActionsSlotChange}></slot>
135
158
  </div>
136
- `;
159
+ ` : e;
137
160
  }
138
161
  get iconTemplate() {
139
162
  return this.componentFactory.createIcon({
@@ -142,13 +165,21 @@ var p = class extends u(s) {
142
165
  size: 20
143
166
  });
144
167
  }
168
+ get listIconTemplate() {
169
+ return this.componentFactory.createIcon({
170
+ class: "icon",
171
+ "icon-name": "list-line",
172
+ size: 20
173
+ });
174
+ }
145
175
  get itemsDropdownButtonTemplate() {
146
- return [
147
- "xxs",
148
- "xs",
149
- "s",
150
- "m"
151
- ].includes(this.viewport) ? t`
176
+ return this.shouldShowItemsDropdownButton ? this.itemsMode === "icon-button" ? this.componentFactory.createIconButton({
177
+ class: "items-list-button",
178
+ "data-aria-label": "open items dropdown",
179
+ "@click": this.toggleItemsDropdown,
180
+ size: "medium",
181
+ "icon-name": "list-line"
182
+ }) : t`
152
183
  <button
153
184
  class="items-dropdown-button"
154
185
  @click=${this.toggleItemsDropdown}
@@ -162,12 +193,7 @@ var p = class extends u(s) {
162
193
  ` : e;
163
194
  }
164
195
  get itemsDropdownTemplate() {
165
- return [
166
- "xxs",
167
- "xs",
168
- "s",
169
- "m"
170
- ].includes(this.viewport) ? t`
196
+ return this.shouldShowItemsDropdownButton ? t`
171
197
  <div
172
198
  class=${l({
173
199
  gutter: !0,
@@ -185,24 +211,16 @@ var p = class extends u(s) {
185
211
  ` : e;
186
212
  }
187
213
  get actionsDropdownButtonTemplate() {
188
- return ![
189
- "xxs",
190
- "xs",
191
- "s"
192
- ].includes(this.viewport) || !this.shouldShowActionsDropdown ? e : this.componentFactory.createIconButton({
214
+ return this.shouldShowActionsDropdownButton ? this.componentFactory.createIconButton({
193
215
  class: "nav-arrow",
194
216
  "data-aria-label": "open actions dropdown",
195
217
  "@click": this.toggleActionsDropdown,
196
218
  size: "medium",
197
219
  "icon-name": "triple-dot-v"
198
- });
220
+ }) : e;
199
221
  }
200
222
  get actionsDropdownTemplate() {
201
- return ![
202
- "xxs",
203
- "xs",
204
- "s"
205
- ].includes(this.viewport) || !this.shouldShowActionsDropdown ? e : t`
223
+ return this.shouldShowActionsDropdownButton ? t`
206
224
  <div
207
225
  class=${l({
208
226
  gutter: !0,
@@ -217,14 +235,11 @@ var p = class extends u(s) {
217
235
  <slot name="actions"></slot>
218
236
  </div>
219
237
  </div>
220
- `;
238
+ ` : e;
221
239
  }
222
240
  get backdropTemplate() {
223
241
  return !this.openItems && !this.openCtas ? e : t`<div class="dropdown-backdrop" @click=${this.closeDropdowns}></div>`;
224
242
  }
225
- get shouldShowActionsDropdown() {
226
- return this.ctas.length > 1;
227
- }
228
243
  };
229
244
  o([n({
230
245
  type: String,
@@ -238,5 +253,11 @@ o([n({
238
253
  })], p.prototype, "textTransform", void 0), o([n({
239
254
  type: Boolean,
240
255
  attribute: "keep-dropdown-button-text"
241
- })], p.prototype, "keepDropdownButtonText", void 0), o([r()], p.prototype, "openItems", void 0), o([r()], p.prototype, "openCtas", void 0), o([r()], p.prototype, "hasScrollLeft", void 0), o([r()], p.prototype, "hasScrollRight", void 0), o([a({ slot: "items" })], p.prototype, "items", void 0), o([a({ slot: "actions" })], p.prototype, "ctas", void 0), o([i(".items-container")], p.prototype, "itemsContainer", void 0), p = o([c("ds-secondary-navigation")], p);
256
+ })], p.prototype, "keepDropdownButtonText", void 0), o([n({
257
+ type: String,
258
+ attribute: "items-mode"
259
+ })], p.prototype, "itemsMode", void 0), o([n({
260
+ type: String,
261
+ attribute: "actions-mode"
262
+ })], p.prototype, "actionsMode", void 0), o([r()], p.prototype, "openItems", void 0), o([r()], p.prototype, "openCtas", void 0), o([r()], p.prototype, "hasScrollLeft", void 0), o([r()], p.prototype, "hasScrollRight", void 0), o([a({ slot: "items" })], p.prototype, "items", void 0), o([a({ slot: "actions" })], p.prototype, "ctas", void 0), o([i(".items-container")], p.prototype, "itemsContainer", void 0), p = o([c("ds-secondary-navigation")], p);
242
263
  //#endregion
@@ -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.95", r = `https://ds-assets.cupra.com${n}/styles/${this.theme}/theme.css`;
53
+ let n = "/2.0.0-canary.97", 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");
@@ -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.95"), i = globalThis, a = i[r];
28
+ }, r = Symbol.for("@cupra/ui-kit/icons-manager/2.0.0-canary.97"), 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.95"), n = globalThis, r = n[t];
21
+ }, t = Symbol.for("@cupra/ui-kit/pubsub/2.0.0-canary.97"), 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.95/styles/${n}/components/${e}.css`, i = this.getCachedStyleSheetPromise({ url: r });
7
+ let r = `https://ds-assets.cupra.com/2.0.0-canary.97/styles/${n}/components/${e}.css`, i = this.getCachedStyleSheetPromise({ url: r });
8
8
  if (i) return i;
9
9
  let a = t(() => this.fetchStyle({ url: r })).then((e) => (e || this.stylePromises.delete(r), e));
10
10
  return this.stylePromises.set(r, a), this.stylePromises.get(r);
@@ -2,7 +2,7 @@ import { i as e, r as t } from "../node_modules/.pnpm/@lit_reactive-element@2.1.
2
2
  import "../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.js";
3
3
  //#region src/utils/cssWithTokens.ts
4
4
  function n(n, ...r) {
5
- return e`${t(String.raw({ raw: n }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v2-0-0-canary-95"))}`;
5
+ return e`${t(String.raw({ raw: n }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v2-0-0-canary-97"))}`;
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-95"))}`;
7
+ return e`${t(String.raw({ raw: n }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v2-0-0-canary-97"))}`;
8
8
  }
9
9
  //#endregion
10
10
  export { n as htmlWithTokens };