@cupra/ui-kit 2.0.0-canary.21 → 2.0.0-canary.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/ds-secondary-navigation/ds-secondary-navigation.cjs +10 -15
- package/dist/cjs/components/ds-theme-provider/ds-theme-provider.cjs +1 -1
- package/dist/cjs/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/style-map.cjs +5 -0
- package/dist/cjs/utils/IconsManager.cjs +1 -1
- package/dist/cjs/utils/PubSub.cjs +1 -1
- package/dist/cjs/utils/StylesRegistry/StylesRegistry.cjs +1 -1
- package/dist/cjs/utils/cssWithTokens.cjs +1 -1
- package/dist/cjs/utils/htmlWithTokens.cjs +1 -1
- package/dist/esm/components/ds-secondary-navigation/ds-secondary-navigation.js +55 -53
- package/dist/esm/components/ds-theme-provider/ds-theme-provider.js +1 -1
- package/dist/esm/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/style-map.js +36 -0
- package/dist/esm/utils/IconsManager.js +1 -1
- package/dist/esm/utils/PubSub.js +1 -1
- package/dist/esm/utils/StylesRegistry/StylesRegistry.js +1 -1
- package/dist/esm/utils/cssWithTokens.js +1 -1
- package/dist/esm/utils/htmlWithTokens.js +1 -1
- package/dist/types/components/ds-secondary-navigation/ds-secondary-navigation.d.ts +2 -0
- package/dist/types/components/ds-secondary-navigation/ds-secondary-navigation.types.d.ts +1 -0
- package/dist-react/cjs/components/ds-secondary-navigation/ds-secondary-navigation.cjs +10 -15
- package/dist-react/cjs/components/ds-theme-provider/ds-theme-provider.cjs +1 -1
- package/dist-react/cjs/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/style-map.cjs +5 -0
- package/dist-react/cjs/utils/IconsManager.cjs +1 -1
- package/dist-react/cjs/utils/PubSub.cjs +1 -1
- package/dist-react/cjs/utils/StylesRegistry/StylesRegistry.cjs +1 -1
- package/dist-react/cjs/utils/cssWithTokens.cjs +1 -1
- package/dist-react/cjs/utils/htmlWithTokens.cjs +1 -1
- package/dist-react/esm/components/ds-secondary-navigation/ds-secondary-navigation.js +55 -53
- package/dist-react/esm/components/ds-theme-provider/ds-theme-provider.js +1 -1
- package/dist-react/esm/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/style-map.js +36 -0
- package/dist-react/esm/utils/IconsManager.js +1 -1
- package/dist-react/esm/utils/PubSub.js +1 -1
- package/dist-react/esm/utils/StylesRegistry/StylesRegistry.js +1 -1
- package/dist-react/esm/utils/cssWithTokens.js +1 -1
- package/dist-react/esm/utils/htmlWithTokens.js +1 -1
- package/dist-react/types/components/ds-secondary-navigation/ds-secondary-navigation.d.ts +2 -0
- package/dist-react/types/components/ds-secondary-navigation/ds-secondary-navigation.types.d.ts +1 -0
- package/package.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../base/UiKitElement.cjs"),g=require("../../decorators/customUiKitElement.cjs"),v=require("../../mixins/ViewportMixin.cjs");require("../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.cjs");const i=require("../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs");require("../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.cjs");const h=require("../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.cjs"),d=require("../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.cjs"),y=require("../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query.cjs"),m=require("../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query-assigned-elements.cjs"),p=require("../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.cjs"),l=require("../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/style-map.cjs"),x=require("./styles/common.styles.cjs");var w=Object.defineProperty,f=Object.getOwnPropertyDescriptor,n=(c,e,t,s)=>{for(var o=s>1?void 0:s?f(e,t):e,r=c.length-1,a;r>=0;r--)(a=c[r])&&(o=(s?a(e,t,o):a(o))||o);return s&&o&&w(e,t,o),o};exports.DsSecondaryNavigation=class extends v.ViewportMixin(u.UiKitElement){constructor(){super(...arguments),this.dropdownButtonText="Menu",this.textTransform="none",this.openItems=!1,this.openCtas=!1,this.hasScrollLeft=!1,this.hasScrollRight=!1,this.resizeObserver=new ResizeObserver(()=>{this.handleScroll()}),this.handleScroll=()=>{var t,s,o,r;const e=((t=this.itemsContainer)==null?void 0:t.scrollLeft)+((s=this.itemsContainer)==null?void 0:s.clientWidth);this.hasScrollLeft=((o=this.itemsContainer)==null?void 0:o.scrollLeft)>0,this.hasScrollRight=e<((r=this.itemsContainer)==null?void 0:r.scrollWidth)}}updated(e){super.updated(e),e.has("viewport")&&this.updateCtas(),e.has("selectedIndex")&&this.updateSelectedItem()}firstUpdated(e){var t;super.firstUpdated(e),this.handleScroll(),this.resizeObserver.observe(this.itemsContainer),window.addEventListener("resize",this.handleScroll),(t=this.itemsContainer)==null||t.addEventListener("scroll",this.handleScroll)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.disconnect(),window.removeEventListener("resize",this.handleScroll)}get selectedItemText(){var e,t,s;return((s=(t=(e=this.items)==null?void 0:e[this.selectedIndex])==null?void 0:t.textContent)==null?void 0:s.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(){var e;(e=this.items)==null||e.forEach((t,s)=>{s===this.selectedIndex?t.classList.add("selected"):t.classList.remove("selected")})}updateCtas(){var e;(e=this.ctas)==null||e.forEach(t=>{["xxl","xl"].includes(this.viewport)?t==null||t.setAttribute("size","large"):t==null||t.setAttribute("size","medium")})}handleItemClick(e){var o,r;const t=e.target,s=((o=this.items)==null?void 0:o.indexOf(t))??-1;if(s!==-1){this.selectedIndex=s,this.updateSelectedItem();const a=((r=t.textContent)==null?void 0:r.trim())||t.getAttribute("data-label")||"";this.dispatchEvent(new CustomEvent("ds-secondary-navigation:select",{detail:{index:s,label:a},bubbles:!0,composed:!0})),this.closeDropdowns()}}get textTransformStyle(){return{textTransform:this.textTransform}}render(){return i.html`
|
|
2
2
|
${this.backdropTemplate}
|
|
3
3
|
<div class="container gutter">
|
|
4
|
-
<nav data-testid="ds-secondary-navigation-container" class=${
|
|
4
|
+
<nav data-testid="ds-secondary-navigation-container" class=${p.classMap(this.classes)}>
|
|
5
5
|
${this.itemsTemplate}
|
|
6
6
|
${this.itemsDropdownButtonTemplate}
|
|
7
7
|
${this.actionsTemplate}
|
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
</div>
|
|
13
13
|
`}get itemsTemplate(){return["l","xl","xxl"].includes(this.viewport)?i.html`
|
|
14
14
|
<div class="items-container">
|
|
15
|
-
<div>
|
|
15
|
+
<div style=${l.styleMap(this.textTransformStyle)}>
|
|
16
16
|
<slot name="items" @slotchange=${this.handleItemsSlotChange} @click=${this.handleItemClick}></slot>
|
|
17
17
|
</div>
|
|
18
18
|
</div>
|
|
19
19
|
`:i.nothing}get actionsTemplate(){return["m","l","xl","xxl"].includes(this.viewport)?i.html`
|
|
20
|
-
<div class="actions-container">
|
|
20
|
+
<div class="actions-container" style=${l.styleMap(this.textTransformStyle)}>
|
|
21
21
|
<slot name="actions" @slotchange=${this.handleActionsSlotChange}></slot>
|
|
22
22
|
</div>
|
|
23
23
|
`:i.nothing}get iconTemplate(){return this.componentFactory.createIcon({class:"icon","icon-name":this.openItems?"arrow-up":"arrow-down",size:20})}get itemsDropdownButtonTemplate(){return["xxs","xs","s","m"].includes(this.viewport)?i.html`
|
|
@@ -32,27 +32,22 @@
|
|
|
32
32
|
</button>
|
|
33
33
|
`:i.nothing}get itemsDropdownTemplate(){return["xxs","xs","s","m"].includes(this.viewport)?i.html`
|
|
34
34
|
<div
|
|
35
|
-
class=${
|
|
35
|
+
class=${p.classMap({gutter:!0,"dropdown-container":!0,"items-dropdown":!0,open:this.openItems})}
|
|
36
36
|
role="menu"
|
|
37
37
|
aria-hidden=${!this.openItems}
|
|
38
38
|
>
|
|
39
|
-
<div
|
|
40
|
-
class="dropdown ds-blur"
|
|
41
|
-
>
|
|
39
|
+
<div class="dropdown ds-blur" style=${l.styleMap(this.textTransformStyle)}>
|
|
42
40
|
<slot name="items" @slotchange=${this.handleItemsSlotChange} @click=${this.handleItemClick}></slot>
|
|
43
41
|
</div>
|
|
44
42
|
</div>
|
|
45
43
|
`:i.nothing}get actionsDropdownButtonTemplate(){return["xxs","xs","s"].includes(this.viewport)?this.componentFactory.createIconButton({class:"nav-arrow","data-aria-label":"open actions dropdown","@click":this.toggleActionsDropdown,size:"medium","icon-name":"triple-dot-v"}):i.nothing}get actionsDropdownTemplate(){return["xxs","xs","s"].includes(this.viewport)?i.html`
|
|
46
|
-
<div
|
|
47
|
-
class=${
|
|
44
|
+
<div
|
|
45
|
+
class=${p.classMap({gutter:!0,"dropdown-container":!0,"actions-dropdown":!0,open:this.openCtas})}
|
|
48
46
|
role="menu"
|
|
49
47
|
aria-hidden=${!this.openCtas}
|
|
50
48
|
>
|
|
51
|
-
<div
|
|
52
|
-
class="dropdown ds-blur"
|
|
53
|
-
|
|
54
|
-
>
|
|
49
|
+
<div class="dropdown ds-blur" style=${l.styleMap(this.textTransformStyle)}>
|
|
55
50
|
<slot name="actions"></slot>
|
|
56
51
|
</div>
|
|
57
52
|
</div>
|
|
58
|
-
`:i.nothing}get backdropTemplate(){return!this.openItems&&!this.openCtas?i.nothing:i.html`<div class="dropdown-backdrop" @click=${this.closeDropdowns}></div>`}};exports.DsSecondaryNavigation.styles=[
|
|
53
|
+
`:i.nothing}get backdropTemplate(){return!this.openItems&&!this.openCtas?i.nothing:i.html`<div class="dropdown-backdrop" @click=${this.closeDropdowns}></div>`}};exports.DsSecondaryNavigation.styles=[x.commonStyles];n([h.property({type:String,attribute:"dropdown-button-text"})],exports.DsSecondaryNavigation.prototype,"dropdownButtonText",2);n([h.property({type:Number,attribute:"selected-index"})],exports.DsSecondaryNavigation.prototype,"selectedIndex",2);n([h.property({type:String,attribute:"text-transform"})],exports.DsSecondaryNavigation.prototype,"textTransform",2);n([d.state()],exports.DsSecondaryNavigation.prototype,"openItems",2);n([d.state()],exports.DsSecondaryNavigation.prototype,"openCtas",2);n([d.state()],exports.DsSecondaryNavigation.prototype,"hasScrollLeft",2);n([d.state()],exports.DsSecondaryNavigation.prototype,"hasScrollRight",2);n([m.queryAssignedElements({slot:"items"})],exports.DsSecondaryNavigation.prototype,"items",2);n([m.queryAssignedElements({slot:"actions"})],exports.DsSecondaryNavigation.prototype,"ctas",2);n([y.query(".items-container")],exports.DsSecondaryNavigation.prototype,"itemsContainer",2);exports.DsSecondaryNavigation=n([g.customUiKitElement("ds-secondary-navigation")],exports.DsSecondaryNavigation);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../../core/theme.constants.cjs"),p=require("../../decorators/customUiKitElement.cjs"),f=require("../../node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/decorators/provide.cjs"),y=require("../../utils/PubSub.cjs"),m=require("../../utils/booleanConverter.cjs");require("../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.cjs");const l=require("../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs"),v=require("../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.cjs"),h=require("../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.cjs"),c=require("../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.cjs"),$=require("../../styles/fonts-config.cjs"),T=require("./themeContext.cjs");var P=Object.defineProperty,F=Object.getOwnPropertyDescriptor,a=(d,e,s,o)=>{for(var t=o>1?void 0:o?F(e,s):e,r=d.length-1,n;r>=0;r--)(n=d[r])&&(t=(o?n(e,s,t):n(t))||t);return o&&t&&P(e,s,t),t};exports.DsThemeProvider=class extends v.LitElement{constructor(){super(...arguments),this.loadFonts=!0,this.loadStyles=!0,this.cssLoaded=!1,this.loadedFonts=new Set}updated(e){if(super.updated(e),e.has("theme")){if(y.pubSub.publish("theme",this.theme),sessionStorage==null||sessionStorage.setItem(u.THEME_STORAGE_KEY,this.theme),typeof FontFace>"u"||!(document!=null&&document.fonts))return;this.loadThemeFonts(),this.loadThemeStyles().then(()=>{this.cssLoaded=!0})}}loadThemeFonts(){var e;(e=$.fontsConfig[this.theme])==null||e.fonts.forEach(s=>{this.loadThemeFont(s)})}async loadThemeFont({weight:e,name:s,file:o}){if(!this.loadFonts)return Promise.resolve();const t=`${s}-${e}`;if(this.loadedFonts.has(t))return;const r=new FontFace(s,`url('https://ds-assets.cupra.com/fonts/${this.theme}/${o}.woff2') format('woff2'),
|
|
2
2
|
url('https://ds-assets.cupra.com/fonts/${this.theme}/${o}.woff') format('woff'),
|
|
3
3
|
url('https://ds-assets.cupra.com/fonts/${this.theme}/${o}.ttf') format('truetype'),
|
|
4
|
-
url('https://ds-assets.cupra.com/fonts/${this.theme}/${o}.otf') format('opentype')`,{style:"normal",weight:e,display:"swap"});try{await r.load(),document.fonts.add(r),this.loadedFonts.add(t)}catch(n){console.error(`Error loading "${s}" font with "${e}" weight:`,n)}}loadThemeStyles(){return this.loadStyles?new Promise((e,s)=>{const o="/2.0.0-canary.
|
|
4
|
+
url('https://ds-assets.cupra.com/fonts/${this.theme}/${o}.otf') format('opentype')`,{style:"normal",weight:e,display:"swap"});try{await r.load(),document.fonts.add(r),this.loadedFonts.add(t)}catch(n){console.error(`Error loading "${s}" font with "${e}" weight:`,n)}}loadThemeStyles(){return this.loadStyles?new Promise((e,s)=>{const o="/2.0.0-canary.22",t=`https://ds-assets.cupra.com${o}/styles/${this.theme}/theme.css`;if(document.head.querySelector(`link[href="${t}"]`))e();else{const r=`ui-kit-theme-${o}`,n=document.getElementById(r),i=document.createElement("link");i.id=r,i.rel="stylesheet",i.href=t,i.onload=()=>e(),i.onerror=()=>s(new Error(`Failed to load theme CSS: ${t}`)),document.head.appendChild(i),n==null||n.remove()}}):Promise.resolve()}render(){return this.cssLoaded?l.html`<slot></slot>`:l.nothing}};a([h.property({type:Boolean,converter:m.booleanConverter,attribute:"load-fonts"})],exports.DsThemeProvider.prototype,"loadFonts",2);a([h.property({type:Boolean,converter:m.booleanConverter,attribute:"load-styles"})],exports.DsThemeProvider.prototype,"loadStyles",2);a([f.provide({context:T.themeContext}),h.property({type:String})],exports.DsThemeProvider.prototype,"theme",2);a([c.state()],exports.DsThemeProvider.prototype,"cssLoaded",2);a([c.state()],exports.DsThemeProvider.prototype,"loadedFonts",2);exports.DsThemeProvider=a([p.customUiKitElement("ds-theme-provider")],exports.DsThemeProvider);
|
package/dist/cjs/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/style-map.cjs
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../lit-html.cjs"),o=require("../directive.cjs");/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2018 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/const l="important",u=" !"+l,d=o.directive(class extends o.Directive{constructor(n){var t;if(super(n),n.type!==o.PartType.ATTRIBUTE||n.name!=="style"||((t=n.strings)==null?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(n){return Object.keys(n).reduce(((t,s)=>{const e=n[s];return e==null?t:t+`${s=s.includes("-")?s:s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${e};`}),"")}update(n,[t]){const{style:s}=n.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(const e of this.ft)t[e]==null&&(this.ft.delete(e),e.includes("-")?s.removeProperty(e):s[e]=null);for(const e in t){const r=t[e];if(r!=null){this.ft.add(e);const i=typeof r=="string"&&r.endsWith(u);e.includes("-")||i?s.setProperty(e,i?r.slice(0,-11):r,i?l:""):s[e]=r}}return c.noChange}});exports.styleMap=d;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../core/theme.constants.cjs"),l=require("./PubSub.cjs");class u{constructor(){this.icons={},this.handleChangeTheme=e=>{if(this.theme===e)return;this.theme=e;const n=Object.keys(this.icons);this.icons={},n.forEach(s=>this.fetchIcon(s))},this.fetchIcon=async(e,n={})=>{const s=typeof sessionStorage<"u"?sessionStorage==null?void 0:sessionStorage.getItem(r.THEME_STORAGE_KEY):null;!this.theme&&s&&(this.theme=s);const t=this.icons[e];if(t)return await t;const i=this.loadIcon(e,n).catch(a=>{throw delete this.icons[e],a});return this.icons[e]=i,i},this.loadIcon=(e,{cache:n="force-cache",...s})=>!this.theme||typeof fetch>"u"?Promise.resolve('<svg class="ds-icon"></svg>'):fetch(`https://ds-assets.cupra.com/icons/${this.theme}/${e}.svg`,{cache:n,...s}).then(t=>t.text()).catch(t=>{if((t==null?void 0:t.name)==="AbortError")throw t;return console.error(`Failed to fetch icon "${e}":`,t),""}),l.pubSub.subscribe("theme",this.handleChangeTheme)}}const o=Symbol.for("@cupra/ui-kit/icons-manager/2.0.0-canary.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../core/theme.constants.cjs"),l=require("./PubSub.cjs");class u{constructor(){this.icons={},this.handleChangeTheme=e=>{if(this.theme===e)return;this.theme=e;const n=Object.keys(this.icons);this.icons={},n.forEach(s=>this.fetchIcon(s))},this.fetchIcon=async(e,n={})=>{const s=typeof sessionStorage<"u"?sessionStorage==null?void 0:sessionStorage.getItem(r.THEME_STORAGE_KEY):null;!this.theme&&s&&(this.theme=s);const t=this.icons[e];if(t)return await t;const i=this.loadIcon(e,n).catch(a=>{throw delete this.icons[e],a});return this.icons[e]=i,i},this.loadIcon=(e,{cache:n="force-cache",...s})=>!this.theme||typeof fetch>"u"?Promise.resolve('<svg class="ds-icon"></svg>'):fetch(`https://ds-assets.cupra.com/icons/${this.theme}/${e}.svg`,{cache:n,...s}).then(t=>t.text()).catch(t=>{if((t==null?void 0:t.name)==="AbortError")throw t;return console.error(`Failed to fetch icon "${e}":`,t),""}),l.pubSub.subscribe("theme",this.handleChangeTheme)}}const o=Symbol.for("@cupra/ui-kit/icons-manager/2.0.0-canary.22"),h=globalThis;let c=h[o];c||(c=new u,Object.defineProperty(h,o,{value:c,writable:!1,configurable:!1,enumerable:!1}));const f=c;exports.iconsManager=f;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class u{constructor(){this.subscribers={},this.lastPublishedData={}}subscribe(s,r){return this.subscribers[s]||(this.subscribers[s]=[]),this.subscribers[s].push(r),this.lastPublishedData[s]}unsubscribe(s,r){this.subscribers[s]&&(this.subscribers[s]=this.subscribers[s].filter(i=>i!==r))}publish(s,r){this.lastPublishedData[s]=r,this.subscribers[s]&&this.subscribers[s].forEach(i=>{try{i(r)}catch(c){console.error(`Error in subscriber for event "${s}":`,c)}})}}const t=Symbol.for("@cupra/ui-kit/pubsub/2.0.0-canary.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class u{constructor(){this.subscribers={},this.lastPublishedData={}}subscribe(s,r){return this.subscribers[s]||(this.subscribers[s]=[]),this.subscribers[s].push(r),this.lastPublishedData[s]}unsubscribe(s,r){this.subscribers[s]&&(this.subscribers[s]=this.subscribers[s].filter(i=>i!==r))}publish(s,r){this.lastPublishedData[s]=r,this.subscribers[s]&&this.subscribers[s].forEach(i=>{try{i(r)}catch(c){console.error(`Error in subscriber for event "${s}":`,c)}})}}const t=Symbol.for("@cupra/ui-kit/pubsub/2.0.0-canary.22"),e=globalThis;let b=e[t];b||(b=new u,Object.defineProperty(e,t,{value:b,writable:!1,configurable:!1,enumerable:!1}));const l=b;exports.PubSub=u;exports.pubSub=l;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class s{constructor(){this.stylePromises=new Map,this.getStyles=async({componentName:e,theme:t})=>{if(!t||!e)return;const r=`https://ds-assets.cupra.com/2.0.0-canary.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class s{constructor(){this.stylePromises=new Map,this.getStyles=async({componentName:e,theme:t})=>{if(!t||!e)return;const r=`https://ds-assets.cupra.com/2.0.0-canary.22/styles/${t}/components/${e}.css`,c=this.getCachedStyleSheetPromise({url:r});if(c)return c;const i=this.fetchStyle({url:r}).then(n=>(n||this.stylePromises.delete(r),n));return this.stylePromises.set(r,i),this.stylePromises.get(r)}}async fetchStyle({url:e}){try{if(typeof fetch>"u")return;const t=await fetch(e,{cache:"force-cache"});if(t.ok)return t.text()}catch(t){console.error(`Failed to fetch Style Sheet "${e}":`,t)}}getCachedStyleSheetPromise({url:e}){return this.stylePromises.get(e)}static getInstance(){return s.instance||(s.instance=new s),s.instance}}const o=s.getInstance();exports.stylesRegistry=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.cjs");require("../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs");require("../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.cjs");const e=require("../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.cjs");function i(r,...t){const s=String.raw({raw:r},...t).replace(/(--private-[\w-]+)(?=\s*[):,])/g,"$1-v2-0-0-canary-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.cjs");require("../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs");require("../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.cjs");const e=require("../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.cjs");function i(r,...t){const s=String.raw({raw:r},...t).replace(/(--private-[\w-]+)(?=\s*[):,])/g,"$1-v2-0-0-canary-22"),n=e.unsafeCSS(s);return e.css`${n}`}exports.cssWithTokens=i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.cjs");const i=require("../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs");require("../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.cjs");const o=require("../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/unsafe-html.cjs");function a(e,...t){const r=String.raw({raw:e},...t).replace(/(--private-[\w-]+)(?=\s*[):,])/g,"$1-v2-0-0-canary-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.cjs");const i=require("../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs");require("../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.cjs");const o=require("../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/unsafe-html.cjs");function a(e,...t){const r=String.raw({raw:e},...t).replace(/(--private-[\w-]+)(?=\s*[):,])/g,"$1-v2-0-0-canary-22"),n=o.unsafeHTML(r);return i.html`${n}`}exports.htmlWithTokens=a;
|
|
@@ -1,28 +1,29 @@
|
|
|
1
1
|
import { UiKitElement as v } from "../base/UiKitElement.js";
|
|
2
|
-
import { customUiKitElement as
|
|
2
|
+
import { customUiKitElement as x } from "../../decorators/customUiKitElement.js";
|
|
3
3
|
import { ViewportMixin as w } from "../../mixins/ViewportMixin.js";
|
|
4
4
|
import "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
|
|
5
5
|
import { html as a, nothing as l } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
|
|
6
6
|
import "../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
7
|
-
import { property as
|
|
8
|
-
import { state as
|
|
7
|
+
import { property as u } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";
|
|
8
|
+
import { state as c } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.js";
|
|
9
9
|
import { query as g } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query.js";
|
|
10
|
-
import { queryAssignedElements as
|
|
11
|
-
import { classMap as
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
import { queryAssignedElements as f } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query-assigned-elements.js";
|
|
11
|
+
import { classMap as m } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js";
|
|
12
|
+
import { styleMap as p } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/style-map.js";
|
|
13
|
+
import { commonStyles as I } from "./styles/common.styles.js";
|
|
14
|
+
var y = Object.defineProperty, C = Object.getOwnPropertyDescriptor, r = (e, t, s, n) => {
|
|
15
|
+
for (var o = n > 1 ? void 0 : n ? C(t, s) : t, d = e.length - 1, h; d >= 0; d--)
|
|
16
|
+
(h = e[d]) && (o = (n ? h(t, s, o) : h(o)) || o);
|
|
17
|
+
return n && o && y(t, s, o), o;
|
|
17
18
|
};
|
|
18
|
-
let
|
|
19
|
+
let i = class extends w(v) {
|
|
19
20
|
constructor() {
|
|
20
|
-
super(...arguments), this.dropdownButtonText = "Menu", this.openItems = !1, this.openCtas = !1, this.hasScrollLeft = !1, this.hasScrollRight = !1, this.resizeObserver = new ResizeObserver(() => {
|
|
21
|
+
super(...arguments), this.dropdownButtonText = "Menu", this.textTransform = "none", this.openItems = !1, this.openCtas = !1, this.hasScrollLeft = !1, this.hasScrollRight = !1, this.resizeObserver = new ResizeObserver(() => {
|
|
21
22
|
this.handleScroll();
|
|
22
23
|
}), this.handleScroll = () => {
|
|
23
|
-
var t, s, n,
|
|
24
|
+
var t, s, n, o;
|
|
24
25
|
const e = ((t = this.itemsContainer) == null ? void 0 : t.scrollLeft) + ((s = this.itemsContainer) == null ? void 0 : s.clientWidth);
|
|
25
|
-
this.hasScrollLeft = ((n = this.itemsContainer) == null ? void 0 : n.scrollLeft) > 0, this.hasScrollRight = e < ((
|
|
26
|
+
this.hasScrollLeft = ((n = this.itemsContainer) == null ? void 0 : n.scrollLeft) > 0, this.hasScrollRight = e < ((o = this.itemsContainer) == null ? void 0 : o.scrollWidth);
|
|
26
27
|
};
|
|
27
28
|
}
|
|
28
29
|
updated(e) {
|
|
@@ -54,7 +55,7 @@ let o = class extends w(v) {
|
|
|
54
55
|
this.openCtas = !this.openCtas, this.openCtas && (this.openItems = !1);
|
|
55
56
|
}
|
|
56
57
|
closeDropdowns() {
|
|
57
|
-
this.openItems = !1
|
|
58
|
+
this.openItems = !1;
|
|
58
59
|
}
|
|
59
60
|
handleItemsSlotChange() {
|
|
60
61
|
this.updateSelectedItem();
|
|
@@ -75,11 +76,11 @@ let o = class extends w(v) {
|
|
|
75
76
|
});
|
|
76
77
|
}
|
|
77
78
|
handleItemClick(e) {
|
|
78
|
-
var n,
|
|
79
|
+
var n, o;
|
|
79
80
|
const t = e.target, s = ((n = this.items) == null ? void 0 : n.indexOf(t)) ?? -1;
|
|
80
81
|
if (s !== -1) {
|
|
81
82
|
this.selectedIndex = s, this.updateSelectedItem();
|
|
82
|
-
const d = ((
|
|
83
|
+
const d = ((o = t.textContent) == null ? void 0 : o.trim()) || t.getAttribute("data-label") || "";
|
|
83
84
|
this.dispatchEvent(
|
|
84
85
|
new CustomEvent("ds-secondary-navigation:select", {
|
|
85
86
|
detail: {
|
|
@@ -92,11 +93,14 @@ let o = class extends w(v) {
|
|
|
92
93
|
), this.closeDropdowns();
|
|
93
94
|
}
|
|
94
95
|
}
|
|
96
|
+
get textTransformStyle() {
|
|
97
|
+
return { textTransform: this.textTransform };
|
|
98
|
+
}
|
|
95
99
|
render() {
|
|
96
100
|
return a`
|
|
97
101
|
${this.backdropTemplate}
|
|
98
102
|
<div class="container gutter">
|
|
99
|
-
<nav data-testid="ds-secondary-navigation-container" class=${
|
|
103
|
+
<nav data-testid="ds-secondary-navigation-container" class=${m(this.classes)}>
|
|
100
104
|
${this.itemsTemplate}
|
|
101
105
|
${this.itemsDropdownButtonTemplate}
|
|
102
106
|
${this.actionsTemplate}
|
|
@@ -110,7 +114,7 @@ let o = class extends w(v) {
|
|
|
110
114
|
get itemsTemplate() {
|
|
111
115
|
return ["l", "xl", "xxl"].includes(this.viewport) ? a`
|
|
112
116
|
<div class="items-container">
|
|
113
|
-
<div>
|
|
117
|
+
<div style=${p(this.textTransformStyle)}>
|
|
114
118
|
<slot name="items" @slotchange=${this.handleItemsSlotChange} @click=${this.handleItemClick}></slot>
|
|
115
119
|
</div>
|
|
116
120
|
</div>
|
|
@@ -118,7 +122,7 @@ let o = class extends w(v) {
|
|
|
118
122
|
}
|
|
119
123
|
get actionsTemplate() {
|
|
120
124
|
return ["m", "l", "xl", "xxl"].includes(this.viewport) ? a`
|
|
121
|
-
<div class="actions-container">
|
|
125
|
+
<div class="actions-container" style=${p(this.textTransformStyle)}>
|
|
122
126
|
<slot name="actions" @slotchange=${this.handleActionsSlotChange}></slot>
|
|
123
127
|
</div>
|
|
124
128
|
` : l;
|
|
@@ -146,7 +150,7 @@ let o = class extends w(v) {
|
|
|
146
150
|
get itemsDropdownTemplate() {
|
|
147
151
|
return ["xxs", "xs", "s", "m"].includes(this.viewport) ? a`
|
|
148
152
|
<div
|
|
149
|
-
class=${
|
|
153
|
+
class=${m({
|
|
150
154
|
gutter: !0,
|
|
151
155
|
"dropdown-container": !0,
|
|
152
156
|
"items-dropdown": !0,
|
|
@@ -155,9 +159,7 @@ let o = class extends w(v) {
|
|
|
155
159
|
role="menu"
|
|
156
160
|
aria-hidden=${!this.openItems}
|
|
157
161
|
>
|
|
158
|
-
<div
|
|
159
|
-
class="dropdown ds-blur"
|
|
160
|
-
>
|
|
162
|
+
<div class="dropdown ds-blur" style=${p(this.textTransformStyle)}>
|
|
161
163
|
<slot name="items" @slotchange=${this.handleItemsSlotChange} @click=${this.handleItemClick}></slot>
|
|
162
164
|
</div>
|
|
163
165
|
</div>
|
|
@@ -174,20 +176,17 @@ let o = class extends w(v) {
|
|
|
174
176
|
}
|
|
175
177
|
get actionsDropdownTemplate() {
|
|
176
178
|
return ["xxs", "xs", "s"].includes(this.viewport) ? a`
|
|
177
|
-
<div
|
|
178
|
-
class=${
|
|
179
|
+
<div
|
|
180
|
+
class=${m({
|
|
179
181
|
gutter: !0,
|
|
180
182
|
"dropdown-container": !0,
|
|
181
183
|
"actions-dropdown": !0,
|
|
182
184
|
open: this.openCtas
|
|
183
|
-
})}
|
|
185
|
+
})}
|
|
184
186
|
role="menu"
|
|
185
187
|
aria-hidden=${!this.openCtas}
|
|
186
188
|
>
|
|
187
|
-
<div
|
|
188
|
-
class="dropdown ds-blur"
|
|
189
|
-
|
|
190
|
-
>
|
|
189
|
+
<div class="dropdown ds-blur" style=${p(this.textTransformStyle)}>
|
|
191
190
|
<slot name="actions"></slot>
|
|
192
191
|
</div>
|
|
193
192
|
</div>
|
|
@@ -197,37 +196,40 @@ let o = class extends w(v) {
|
|
|
197
196
|
return !this.openItems && !this.openCtas ? l : a`<div class="dropdown-backdrop" @click=${this.closeDropdowns}></div>`;
|
|
198
197
|
}
|
|
199
198
|
};
|
|
200
|
-
|
|
199
|
+
i.styles = [I];
|
|
200
|
+
r([
|
|
201
|
+
u({ type: String, attribute: "dropdown-button-text" })
|
|
202
|
+
], i.prototype, "dropdownButtonText", 2);
|
|
201
203
|
r([
|
|
202
|
-
|
|
203
|
-
],
|
|
204
|
+
u({ type: Number, attribute: "selected-index" })
|
|
205
|
+
], i.prototype, "selectedIndex", 2);
|
|
204
206
|
r([
|
|
205
|
-
|
|
206
|
-
],
|
|
207
|
+
u({ type: String, attribute: "text-transform" })
|
|
208
|
+
], i.prototype, "textTransform", 2);
|
|
207
209
|
r([
|
|
208
|
-
|
|
209
|
-
],
|
|
210
|
+
c()
|
|
211
|
+
], i.prototype, "openItems", 2);
|
|
210
212
|
r([
|
|
211
|
-
|
|
212
|
-
],
|
|
213
|
+
c()
|
|
214
|
+
], i.prototype, "openCtas", 2);
|
|
213
215
|
r([
|
|
214
|
-
|
|
215
|
-
],
|
|
216
|
+
c()
|
|
217
|
+
], i.prototype, "hasScrollLeft", 2);
|
|
216
218
|
r([
|
|
217
|
-
|
|
218
|
-
],
|
|
219
|
+
c()
|
|
220
|
+
], i.prototype, "hasScrollRight", 2);
|
|
219
221
|
r([
|
|
220
|
-
|
|
221
|
-
],
|
|
222
|
+
f({ slot: "items" })
|
|
223
|
+
], i.prototype, "items", 2);
|
|
222
224
|
r([
|
|
223
|
-
|
|
224
|
-
],
|
|
225
|
+
f({ slot: "actions" })
|
|
226
|
+
], i.prototype, "ctas", 2);
|
|
225
227
|
r([
|
|
226
228
|
g(".items-container")
|
|
227
|
-
],
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
],
|
|
229
|
+
], i.prototype, "itemsContainer", 2);
|
|
230
|
+
i = r([
|
|
231
|
+
x("ds-secondary-navigation")
|
|
232
|
+
], i);
|
|
231
233
|
export {
|
|
232
|
-
|
|
234
|
+
i as DsSecondaryNavigation
|
|
233
235
|
};
|
|
@@ -57,7 +57,7 @@ let m = class extends F {
|
|
|
57
57
|
}
|
|
58
58
|
loadThemeStyles() {
|
|
59
59
|
return this.loadStyles ? new Promise((t, o) => {
|
|
60
|
-
const s = "/2.0.0-canary.
|
|
60
|
+
const s = "/2.0.0-canary.22", r = `https://ds-assets.cupra.com${s}/styles/${this.theme}/theme.css`;
|
|
61
61
|
if (document.head.querySelector(`link[href="${r}"]`)) t();
|
|
62
62
|
else {
|
|
63
63
|
const e = `ui-kit-theme-${s}`, a = document.getElementById(e), n = document.createElement("link");
|
package/dist/esm/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/style-map.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { noChange as l } from "../lit-html.js";
|
|
2
|
+
import { directive as c, Directive as a, PartType as u } from "../directive.js";
|
|
3
|
+
/**
|
|
4
|
+
* @license
|
|
5
|
+
* Copyright 2018 Google LLC
|
|
6
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
7
|
+
*/
|
|
8
|
+
const o = "important", d = " !" + o, h = c(class extends a {
|
|
9
|
+
constructor(n) {
|
|
10
|
+
var t;
|
|
11
|
+
if (super(n), n.type !== u.ATTRIBUTE || n.name !== "style" || ((t = n.strings) == null ? void 0 : t.length) > 2) throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");
|
|
12
|
+
}
|
|
13
|
+
render(n) {
|
|
14
|
+
return Object.keys(n).reduce(((t, s) => {
|
|
15
|
+
const e = n[s];
|
|
16
|
+
return e == null ? t : t + `${s = s.includes("-") ? s : s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g, "-$&").toLowerCase()}:${e};`;
|
|
17
|
+
}), "");
|
|
18
|
+
}
|
|
19
|
+
update(n, [t]) {
|
|
20
|
+
const { style: s } = n.element;
|
|
21
|
+
if (this.ft === void 0) return this.ft = new Set(Object.keys(t)), this.render(t);
|
|
22
|
+
for (const e of this.ft) t[e] == null && (this.ft.delete(e), e.includes("-") ? s.removeProperty(e) : s[e] = null);
|
|
23
|
+
for (const e in t) {
|
|
24
|
+
const r = t[e];
|
|
25
|
+
if (r != null) {
|
|
26
|
+
this.ft.add(e);
|
|
27
|
+
const i = typeof r == "string" && r.endsWith(d);
|
|
28
|
+
e.includes("-") || i ? s.setProperty(e, i ? r.slice(0, -11) : r, i ? o : "") : s[e] = r;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return l;
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
export {
|
|
35
|
+
h as styleMap
|
|
36
|
+
};
|
|
@@ -25,7 +25,7 @@ class l {
|
|
|
25
25
|
}), f.subscribe("theme", this.handleChangeTheme);
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
const c = Symbol.for("@cupra/ui-kit/icons-manager/2.0.0-canary.
|
|
28
|
+
const c = Symbol.for("@cupra/ui-kit/icons-manager/2.0.0-canary.22"), h = globalThis;
|
|
29
29
|
let i = h[c];
|
|
30
30
|
i || (i = new l(), Object.defineProperty(h, c, {
|
|
31
31
|
value: i,
|
package/dist/esm/utils/PubSub.js
CHANGED
|
@@ -18,7 +18,7 @@ class e {
|
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
const u = Symbol.for("@cupra/ui-kit/pubsub/2.0.0-canary.
|
|
21
|
+
const u = Symbol.for("@cupra/ui-kit/pubsub/2.0.0-canary.22"), t = globalThis;
|
|
22
22
|
let b = t[u];
|
|
23
23
|
b || (b = new e(), Object.defineProperty(t, u, {
|
|
24
24
|
value: b,
|
|
@@ -5,7 +5,7 @@ class s {
|
|
|
5
5
|
theme: t
|
|
6
6
|
}) => {
|
|
7
7
|
if (!t || !e) return;
|
|
8
|
-
const r = `https://ds-assets.cupra.com/2.0.0-canary.
|
|
8
|
+
const r = `https://ds-assets.cupra.com/2.0.0-canary.22/styles/${t}/components/${e}.css`, c = this.getCachedStyleSheetPromise({ url: r });
|
|
9
9
|
if (c) return c;
|
|
10
10
|
const i = this.fetchStyle({ url: r }).then((n) => (n || this.stylePromises.delete(r), n));
|
|
11
11
|
return this.stylePromises.set(r, i), this.stylePromises.get(r);
|
|
@@ -3,7 +3,7 @@ import "../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
|
|
|
3
3
|
import "../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
4
4
|
import { unsafeCSS as n, css as o } from "../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";
|
|
5
5
|
function x(t, ...r) {
|
|
6
|
-
const e = String.raw({ raw: t }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v2-0-0-canary-
|
|
6
|
+
const e = String.raw({ raw: t }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v2-0-0-canary-22"), i = n(e);
|
|
7
7
|
return o`${i}`;
|
|
8
8
|
}
|
|
9
9
|
export {
|
|
@@ -3,7 +3,7 @@ import { html as n } from "../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit
|
|
|
3
3
|
import "../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
4
4
|
import { unsafeHTML as i } from "../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/unsafe-html.js";
|
|
5
5
|
function x(t, ...r) {
|
|
6
|
-
const o = String.raw({ raw: t }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v2-0-0-canary-
|
|
6
|
+
const o = String.raw({ raw: t }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v2-0-0-canary-22"), e = i(o);
|
|
7
7
|
return n`${e}`;
|
|
8
8
|
}
|
|
9
9
|
export {
|
|
@@ -6,6 +6,7 @@ export declare class DsSecondaryNavigation extends DsSecondaryNavigation_base {
|
|
|
6
6
|
static styles: import("lit").CSSResult[];
|
|
7
7
|
dropdownButtonText: DsSecondaryNavigationAttrs['dropdown-button-text'];
|
|
8
8
|
selectedIndex: DsSecondaryNavigationAttrs['selected-index'];
|
|
9
|
+
textTransform: DsSecondaryNavigationAttrs['text-transform'];
|
|
9
10
|
private openItems;
|
|
10
11
|
private openCtas;
|
|
11
12
|
private hasScrollLeft;
|
|
@@ -28,6 +29,7 @@ export declare class DsSecondaryNavigation extends DsSecondaryNavigation_base {
|
|
|
28
29
|
private updateSelectedItem;
|
|
29
30
|
private updateCtas;
|
|
30
31
|
private handleItemClick;
|
|
32
|
+
private get textTransformStyle();
|
|
31
33
|
render(): import("lit").TemplateResult<1>;
|
|
32
34
|
private get itemsTemplate();
|
|
33
35
|
private get actionsTemplate();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../base/UiKitElement.cjs"),g=require("../../decorators/customUiKitElement.cjs"),v=require("../../mixins/ViewportMixin.cjs");require("../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.cjs");const i=require("../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs");require("../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.cjs");const h=require("../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.cjs"),d=require("../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.cjs"),y=require("../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query.cjs"),m=require("../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query-assigned-elements.cjs"),p=require("../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.cjs"),l=require("../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/style-map.cjs"),x=require("./styles/common.styles.cjs");var w=Object.defineProperty,f=Object.getOwnPropertyDescriptor,n=(c,e,t,s)=>{for(var o=s>1?void 0:s?f(e,t):e,r=c.length-1,a;r>=0;r--)(a=c[r])&&(o=(s?a(e,t,o):a(o))||o);return s&&o&&w(e,t,o),o};exports.DsSecondaryNavigation=class extends v.ViewportMixin(u.UiKitElement){constructor(){super(...arguments),this.dropdownButtonText="Menu",this.textTransform="none",this.openItems=!1,this.openCtas=!1,this.hasScrollLeft=!1,this.hasScrollRight=!1,this.resizeObserver=new ResizeObserver(()=>{this.handleScroll()}),this.handleScroll=()=>{var t,s,o,r;const e=((t=this.itemsContainer)==null?void 0:t.scrollLeft)+((s=this.itemsContainer)==null?void 0:s.clientWidth);this.hasScrollLeft=((o=this.itemsContainer)==null?void 0:o.scrollLeft)>0,this.hasScrollRight=e<((r=this.itemsContainer)==null?void 0:r.scrollWidth)}}updated(e){super.updated(e),e.has("viewport")&&this.updateCtas(),e.has("selectedIndex")&&this.updateSelectedItem()}firstUpdated(e){var t;super.firstUpdated(e),this.handleScroll(),this.resizeObserver.observe(this.itemsContainer),window.addEventListener("resize",this.handleScroll),(t=this.itemsContainer)==null||t.addEventListener("scroll",this.handleScroll)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.disconnect(),window.removeEventListener("resize",this.handleScroll)}get selectedItemText(){var e,t,s;return((s=(t=(e=this.items)==null?void 0:e[this.selectedIndex])==null?void 0:t.textContent)==null?void 0:s.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(){var e;(e=this.items)==null||e.forEach((t,s)=>{s===this.selectedIndex?t.classList.add("selected"):t.classList.remove("selected")})}updateCtas(){var e;(e=this.ctas)==null||e.forEach(t=>{["xxl","xl"].includes(this.viewport)?t==null||t.setAttribute("size","large"):t==null||t.setAttribute("size","medium")})}handleItemClick(e){var o,r;const t=e.target,s=((o=this.items)==null?void 0:o.indexOf(t))??-1;if(s!==-1){this.selectedIndex=s,this.updateSelectedItem();const a=((r=t.textContent)==null?void 0:r.trim())||t.getAttribute("data-label")||"";this.dispatchEvent(new CustomEvent("ds-secondary-navigation:select",{detail:{index:s,label:a},bubbles:!0,composed:!0})),this.closeDropdowns()}}get textTransformStyle(){return{textTransform:this.textTransform}}render(){return i.html`
|
|
2
2
|
${this.backdropTemplate}
|
|
3
3
|
<div class="container gutter">
|
|
4
|
-
<nav data-testid="ds-secondary-navigation-container" class=${
|
|
4
|
+
<nav data-testid="ds-secondary-navigation-container" class=${p.classMap(this.classes)}>
|
|
5
5
|
${this.itemsTemplate}
|
|
6
6
|
${this.itemsDropdownButtonTemplate}
|
|
7
7
|
${this.actionsTemplate}
|
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
</div>
|
|
13
13
|
`}get itemsTemplate(){return["l","xl","xxl"].includes(this.viewport)?i.html`
|
|
14
14
|
<div class="items-container">
|
|
15
|
-
<div>
|
|
15
|
+
<div style=${l.styleMap(this.textTransformStyle)}>
|
|
16
16
|
<slot name="items" @slotchange=${this.handleItemsSlotChange} @click=${this.handleItemClick}></slot>
|
|
17
17
|
</div>
|
|
18
18
|
</div>
|
|
19
19
|
`:i.nothing}get actionsTemplate(){return["m","l","xl","xxl"].includes(this.viewport)?i.html`
|
|
20
|
-
<div class="actions-container">
|
|
20
|
+
<div class="actions-container" style=${l.styleMap(this.textTransformStyle)}>
|
|
21
21
|
<slot name="actions" @slotchange=${this.handleActionsSlotChange}></slot>
|
|
22
22
|
</div>
|
|
23
23
|
`:i.nothing}get iconTemplate(){return this.componentFactory.createIcon({class:"icon","icon-name":this.openItems?"arrow-up":"arrow-down",size:20})}get itemsDropdownButtonTemplate(){return["xxs","xs","s","m"].includes(this.viewport)?i.html`
|
|
@@ -32,27 +32,22 @@
|
|
|
32
32
|
</button>
|
|
33
33
|
`:i.nothing}get itemsDropdownTemplate(){return["xxs","xs","s","m"].includes(this.viewport)?i.html`
|
|
34
34
|
<div
|
|
35
|
-
class=${
|
|
35
|
+
class=${p.classMap({gutter:!0,"dropdown-container":!0,"items-dropdown":!0,open:this.openItems})}
|
|
36
36
|
role="menu"
|
|
37
37
|
aria-hidden=${!this.openItems}
|
|
38
38
|
>
|
|
39
|
-
<div
|
|
40
|
-
class="dropdown ds-blur"
|
|
41
|
-
>
|
|
39
|
+
<div class="dropdown ds-blur" style=${l.styleMap(this.textTransformStyle)}>
|
|
42
40
|
<slot name="items" @slotchange=${this.handleItemsSlotChange} @click=${this.handleItemClick}></slot>
|
|
43
41
|
</div>
|
|
44
42
|
</div>
|
|
45
43
|
`:i.nothing}get actionsDropdownButtonTemplate(){return["xxs","xs","s"].includes(this.viewport)?this.componentFactory.createIconButton({class:"nav-arrow","data-aria-label":"open actions dropdown","@click":this.toggleActionsDropdown,size:"medium","icon-name":"triple-dot-v"}):i.nothing}get actionsDropdownTemplate(){return["xxs","xs","s"].includes(this.viewport)?i.html`
|
|
46
|
-
<div
|
|
47
|
-
class=${
|
|
44
|
+
<div
|
|
45
|
+
class=${p.classMap({gutter:!0,"dropdown-container":!0,"actions-dropdown":!0,open:this.openCtas})}
|
|
48
46
|
role="menu"
|
|
49
47
|
aria-hidden=${!this.openCtas}
|
|
50
48
|
>
|
|
51
|
-
<div
|
|
52
|
-
class="dropdown ds-blur"
|
|
53
|
-
|
|
54
|
-
>
|
|
49
|
+
<div class="dropdown ds-blur" style=${l.styleMap(this.textTransformStyle)}>
|
|
55
50
|
<slot name="actions"></slot>
|
|
56
51
|
</div>
|
|
57
52
|
</div>
|
|
58
|
-
`:i.nothing}get backdropTemplate(){return!this.openItems&&!this.openCtas?i.nothing:i.html`<div class="dropdown-backdrop" @click=${this.closeDropdowns}></div>`}};exports.DsSecondaryNavigation.styles=[
|
|
53
|
+
`:i.nothing}get backdropTemplate(){return!this.openItems&&!this.openCtas?i.nothing:i.html`<div class="dropdown-backdrop" @click=${this.closeDropdowns}></div>`}};exports.DsSecondaryNavigation.styles=[x.commonStyles];n([h.property({type:String,attribute:"dropdown-button-text"})],exports.DsSecondaryNavigation.prototype,"dropdownButtonText",2);n([h.property({type:Number,attribute:"selected-index"})],exports.DsSecondaryNavigation.prototype,"selectedIndex",2);n([h.property({type:String,attribute:"text-transform"})],exports.DsSecondaryNavigation.prototype,"textTransform",2);n([d.state()],exports.DsSecondaryNavigation.prototype,"openItems",2);n([d.state()],exports.DsSecondaryNavigation.prototype,"openCtas",2);n([d.state()],exports.DsSecondaryNavigation.prototype,"hasScrollLeft",2);n([d.state()],exports.DsSecondaryNavigation.prototype,"hasScrollRight",2);n([m.queryAssignedElements({slot:"items"})],exports.DsSecondaryNavigation.prototype,"items",2);n([m.queryAssignedElements({slot:"actions"})],exports.DsSecondaryNavigation.prototype,"ctas",2);n([y.query(".items-container")],exports.DsSecondaryNavigation.prototype,"itemsContainer",2);exports.DsSecondaryNavigation=n([g.customUiKitElement("ds-secondary-navigation")],exports.DsSecondaryNavigation);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../../core/theme.constants.cjs"),p=require("../../decorators/customUiKitElement.cjs"),f=require("../../node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/decorators/provide.cjs"),y=require("../../utils/PubSub.cjs"),m=require("../../utils/booleanConverter.cjs");require("../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.cjs");const l=require("../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs"),v=require("../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.cjs"),h=require("../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.cjs"),c=require("../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.cjs"),$=require("../../styles/fonts-config.cjs"),T=require("./themeContext.cjs");var P=Object.defineProperty,F=Object.getOwnPropertyDescriptor,a=(d,e,s,o)=>{for(var t=o>1?void 0:o?F(e,s):e,r=d.length-1,n;r>=0;r--)(n=d[r])&&(t=(o?n(e,s,t):n(t))||t);return o&&t&&P(e,s,t),t};exports.DsThemeProvider=class extends v.LitElement{constructor(){super(...arguments),this.loadFonts=!0,this.loadStyles=!0,this.cssLoaded=!1,this.loadedFonts=new Set}updated(e){if(super.updated(e),e.has("theme")){if(y.pubSub.publish("theme",this.theme),sessionStorage==null||sessionStorage.setItem(u.THEME_STORAGE_KEY,this.theme),typeof FontFace>"u"||!(document!=null&&document.fonts))return;this.loadThemeFonts(),this.loadThemeStyles().then(()=>{this.cssLoaded=!0})}}loadThemeFonts(){var e;(e=$.fontsConfig[this.theme])==null||e.fonts.forEach(s=>{this.loadThemeFont(s)})}async loadThemeFont({weight:e,name:s,file:o}){if(!this.loadFonts)return Promise.resolve();const t=`${s}-${e}`;if(this.loadedFonts.has(t))return;const r=new FontFace(s,`url('https://ds-assets.cupra.com/fonts/${this.theme}/${o}.woff2') format('woff2'),
|
|
2
2
|
url('https://ds-assets.cupra.com/fonts/${this.theme}/${o}.woff') format('woff'),
|
|
3
3
|
url('https://ds-assets.cupra.com/fonts/${this.theme}/${o}.ttf') format('truetype'),
|
|
4
|
-
url('https://ds-assets.cupra.com/fonts/${this.theme}/${o}.otf') format('opentype')`,{style:"normal",weight:e,display:"swap"});try{await r.load(),document.fonts.add(r),this.loadedFonts.add(t)}catch(n){console.error(`Error loading "${s}" font with "${e}" weight:`,n)}}loadThemeStyles(){return this.loadStyles?new Promise((e,s)=>{const o="/2.0.0-canary.
|
|
4
|
+
url('https://ds-assets.cupra.com/fonts/${this.theme}/${o}.otf') format('opentype')`,{style:"normal",weight:e,display:"swap"});try{await r.load(),document.fonts.add(r),this.loadedFonts.add(t)}catch(n){console.error(`Error loading "${s}" font with "${e}" weight:`,n)}}loadThemeStyles(){return this.loadStyles?new Promise((e,s)=>{const o="/2.0.0-canary.22",t=`https://ds-assets.cupra.com${o}/styles/${this.theme}/theme.css`;if(document.head.querySelector(`link[href="${t}"]`))e();else{const r=`ui-kit-theme-${o}`,n=document.getElementById(r),i=document.createElement("link");i.id=r,i.rel="stylesheet",i.href=t,i.onload=()=>e(),i.onerror=()=>s(new Error(`Failed to load theme CSS: ${t}`)),document.head.appendChild(i),n==null||n.remove()}}):Promise.resolve()}render(){return this.cssLoaded?l.html`<slot></slot>`:l.nothing}};a([h.property({type:Boolean,converter:m.booleanConverter,attribute:"load-fonts"})],exports.DsThemeProvider.prototype,"loadFonts",2);a([h.property({type:Boolean,converter:m.booleanConverter,attribute:"load-styles"})],exports.DsThemeProvider.prototype,"loadStyles",2);a([f.provide({context:T.themeContext}),h.property({type:String})],exports.DsThemeProvider.prototype,"theme",2);a([c.state()],exports.DsThemeProvider.prototype,"cssLoaded",2);a([c.state()],exports.DsThemeProvider.prototype,"loadedFonts",2);exports.DsThemeProvider=a([p.customUiKitElement("ds-theme-provider")],exports.DsThemeProvider);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../lit-html.cjs"),o=require("../directive.cjs");/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2018 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/const l="important",u=" !"+l,d=o.directive(class extends o.Directive{constructor(n){var t;if(super(n),n.type!==o.PartType.ATTRIBUTE||n.name!=="style"||((t=n.strings)==null?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(n){return Object.keys(n).reduce(((t,s)=>{const e=n[s];return e==null?t:t+`${s=s.includes("-")?s:s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${e};`}),"")}update(n,[t]){const{style:s}=n.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(const e of this.ft)t[e]==null&&(this.ft.delete(e),e.includes("-")?s.removeProperty(e):s[e]=null);for(const e in t){const r=t[e];if(r!=null){this.ft.add(e);const i=typeof r=="string"&&r.endsWith(u);e.includes("-")||i?s.setProperty(e,i?r.slice(0,-11):r,i?l:""):s[e]=r}}return c.noChange}});exports.styleMap=d;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../core/theme.constants.cjs"),l=require("./PubSub.cjs");class u{constructor(){this.icons={},this.handleChangeTheme=e=>{if(this.theme===e)return;this.theme=e;const n=Object.keys(this.icons);this.icons={},n.forEach(s=>this.fetchIcon(s))},this.fetchIcon=async(e,n={})=>{const s=typeof sessionStorage<"u"?sessionStorage==null?void 0:sessionStorage.getItem(r.THEME_STORAGE_KEY):null;!this.theme&&s&&(this.theme=s);const t=this.icons[e];if(t)return await t;const i=this.loadIcon(e,n).catch(a=>{throw delete this.icons[e],a});return this.icons[e]=i,i},this.loadIcon=(e,{cache:n="force-cache",...s})=>!this.theme||typeof fetch>"u"?Promise.resolve('<svg class="ds-icon"></svg>'):fetch(`https://ds-assets.cupra.com/icons/${this.theme}/${e}.svg`,{cache:n,...s}).then(t=>t.text()).catch(t=>{if((t==null?void 0:t.name)==="AbortError")throw t;return console.error(`Failed to fetch icon "${e}":`,t),""}),l.pubSub.subscribe("theme",this.handleChangeTheme)}}const o=Symbol.for("@cupra/ui-kit/icons-manager/2.0.0-canary.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../core/theme.constants.cjs"),l=require("./PubSub.cjs");class u{constructor(){this.icons={},this.handleChangeTheme=e=>{if(this.theme===e)return;this.theme=e;const n=Object.keys(this.icons);this.icons={},n.forEach(s=>this.fetchIcon(s))},this.fetchIcon=async(e,n={})=>{const s=typeof sessionStorage<"u"?sessionStorage==null?void 0:sessionStorage.getItem(r.THEME_STORAGE_KEY):null;!this.theme&&s&&(this.theme=s);const t=this.icons[e];if(t)return await t;const i=this.loadIcon(e,n).catch(a=>{throw delete this.icons[e],a});return this.icons[e]=i,i},this.loadIcon=(e,{cache:n="force-cache",...s})=>!this.theme||typeof fetch>"u"?Promise.resolve('<svg class="ds-icon"></svg>'):fetch(`https://ds-assets.cupra.com/icons/${this.theme}/${e}.svg`,{cache:n,...s}).then(t=>t.text()).catch(t=>{if((t==null?void 0:t.name)==="AbortError")throw t;return console.error(`Failed to fetch icon "${e}":`,t),""}),l.pubSub.subscribe("theme",this.handleChangeTheme)}}const o=Symbol.for("@cupra/ui-kit/icons-manager/2.0.0-canary.22"),h=globalThis;let c=h[o];c||(c=new u,Object.defineProperty(h,o,{value:c,writable:!1,configurable:!1,enumerable:!1}));const f=c;exports.iconsManager=f;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class u{constructor(){this.subscribers={},this.lastPublishedData={}}subscribe(s,r){return this.subscribers[s]||(this.subscribers[s]=[]),this.subscribers[s].push(r),this.lastPublishedData[s]}unsubscribe(s,r){this.subscribers[s]&&(this.subscribers[s]=this.subscribers[s].filter(i=>i!==r))}publish(s,r){this.lastPublishedData[s]=r,this.subscribers[s]&&this.subscribers[s].forEach(i=>{try{i(r)}catch(c){console.error(`Error in subscriber for event "${s}":`,c)}})}}const t=Symbol.for("@cupra/ui-kit/pubsub/2.0.0-canary.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class u{constructor(){this.subscribers={},this.lastPublishedData={}}subscribe(s,r){return this.subscribers[s]||(this.subscribers[s]=[]),this.subscribers[s].push(r),this.lastPublishedData[s]}unsubscribe(s,r){this.subscribers[s]&&(this.subscribers[s]=this.subscribers[s].filter(i=>i!==r))}publish(s,r){this.lastPublishedData[s]=r,this.subscribers[s]&&this.subscribers[s].forEach(i=>{try{i(r)}catch(c){console.error(`Error in subscriber for event "${s}":`,c)}})}}const t=Symbol.for("@cupra/ui-kit/pubsub/2.0.0-canary.22"),e=globalThis;let b=e[t];b||(b=new u,Object.defineProperty(e,t,{value:b,writable:!1,configurable:!1,enumerable:!1}));const l=b;exports.PubSub=u;exports.pubSub=l;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class s{constructor(){this.stylePromises=new Map,this.getStyles=async({componentName:e,theme:t})=>{if(!t||!e)return;const r=`https://ds-assets.cupra.com/2.0.0-canary.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class s{constructor(){this.stylePromises=new Map,this.getStyles=async({componentName:e,theme:t})=>{if(!t||!e)return;const r=`https://ds-assets.cupra.com/2.0.0-canary.22/styles/${t}/components/${e}.css`,c=this.getCachedStyleSheetPromise({url:r});if(c)return c;const i=this.fetchStyle({url:r}).then(n=>(n||this.stylePromises.delete(r),n));return this.stylePromises.set(r,i),this.stylePromises.get(r)}}async fetchStyle({url:e}){try{if(typeof fetch>"u")return;const t=await fetch(e,{cache:"force-cache"});if(t.ok)return t.text()}catch(t){console.error(`Failed to fetch Style Sheet "${e}":`,t)}}getCachedStyleSheetPromise({url:e}){return this.stylePromises.get(e)}static getInstance(){return s.instance||(s.instance=new s),s.instance}}const o=s.getInstance();exports.stylesRegistry=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.cjs");require("../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs");require("../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.cjs");const e=require("../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.cjs");function i(r,...t){const s=String.raw({raw:r},...t).replace(/(--private-[\w-]+)(?=\s*[):,])/g,"$1-v2-0-0-canary-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.cjs");require("../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs");require("../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.cjs");const e=require("../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.cjs");function i(r,...t){const s=String.raw({raw:r},...t).replace(/(--private-[\w-]+)(?=\s*[):,])/g,"$1-v2-0-0-canary-22"),n=e.unsafeCSS(s);return e.css`${n}`}exports.cssWithTokens=i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.cjs");const i=require("../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs");require("../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.cjs");const o=require("../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/unsafe-html.cjs");function a(e,...t){const r=String.raw({raw:e},...t).replace(/(--private-[\w-]+)(?=\s*[):,])/g,"$1-v2-0-0-canary-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.cjs");const i=require("../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs");require("../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.cjs");const o=require("../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/unsafe-html.cjs");function a(e,...t){const r=String.raw({raw:e},...t).replace(/(--private-[\w-]+)(?=\s*[):,])/g,"$1-v2-0-0-canary-22"),n=o.unsafeHTML(r);return i.html`${n}`}exports.htmlWithTokens=a;
|
|
@@ -1,28 +1,29 @@
|
|
|
1
1
|
import { UiKitElement as v } from "../base/UiKitElement.js";
|
|
2
|
-
import { customUiKitElement as
|
|
2
|
+
import { customUiKitElement as x } from "../../decorators/customUiKitElement.js";
|
|
3
3
|
import { ViewportMixin as w } from "../../mixins/ViewportMixin.js";
|
|
4
4
|
import "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
|
|
5
5
|
import { html as a, nothing as l } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
|
|
6
6
|
import "../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
7
|
-
import { property as
|
|
8
|
-
import { state as
|
|
7
|
+
import { property as u } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";
|
|
8
|
+
import { state as c } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.js";
|
|
9
9
|
import { query as g } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query.js";
|
|
10
|
-
import { queryAssignedElements as
|
|
11
|
-
import { classMap as
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
import { queryAssignedElements as f } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query-assigned-elements.js";
|
|
11
|
+
import { classMap as m } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js";
|
|
12
|
+
import { styleMap as p } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/style-map.js";
|
|
13
|
+
import { commonStyles as I } from "./styles/common.styles.js";
|
|
14
|
+
var y = Object.defineProperty, C = Object.getOwnPropertyDescriptor, r = (e, t, s, n) => {
|
|
15
|
+
for (var o = n > 1 ? void 0 : n ? C(t, s) : t, d = e.length - 1, h; d >= 0; d--)
|
|
16
|
+
(h = e[d]) && (o = (n ? h(t, s, o) : h(o)) || o);
|
|
17
|
+
return n && o && y(t, s, o), o;
|
|
17
18
|
};
|
|
18
|
-
let
|
|
19
|
+
let i = class extends w(v) {
|
|
19
20
|
constructor() {
|
|
20
|
-
super(...arguments), this.dropdownButtonText = "Menu", this.openItems = !1, this.openCtas = !1, this.hasScrollLeft = !1, this.hasScrollRight = !1, this.resizeObserver = new ResizeObserver(() => {
|
|
21
|
+
super(...arguments), this.dropdownButtonText = "Menu", this.textTransform = "none", this.openItems = !1, this.openCtas = !1, this.hasScrollLeft = !1, this.hasScrollRight = !1, this.resizeObserver = new ResizeObserver(() => {
|
|
21
22
|
this.handleScroll();
|
|
22
23
|
}), this.handleScroll = () => {
|
|
23
|
-
var t, s, n,
|
|
24
|
+
var t, s, n, o;
|
|
24
25
|
const e = ((t = this.itemsContainer) == null ? void 0 : t.scrollLeft) + ((s = this.itemsContainer) == null ? void 0 : s.clientWidth);
|
|
25
|
-
this.hasScrollLeft = ((n = this.itemsContainer) == null ? void 0 : n.scrollLeft) > 0, this.hasScrollRight = e < ((
|
|
26
|
+
this.hasScrollLeft = ((n = this.itemsContainer) == null ? void 0 : n.scrollLeft) > 0, this.hasScrollRight = e < ((o = this.itemsContainer) == null ? void 0 : o.scrollWidth);
|
|
26
27
|
};
|
|
27
28
|
}
|
|
28
29
|
updated(e) {
|
|
@@ -54,7 +55,7 @@ let o = class extends w(v) {
|
|
|
54
55
|
this.openCtas = !this.openCtas, this.openCtas && (this.openItems = !1);
|
|
55
56
|
}
|
|
56
57
|
closeDropdowns() {
|
|
57
|
-
this.openItems = !1
|
|
58
|
+
this.openItems = !1;
|
|
58
59
|
}
|
|
59
60
|
handleItemsSlotChange() {
|
|
60
61
|
this.updateSelectedItem();
|
|
@@ -75,11 +76,11 @@ let o = class extends w(v) {
|
|
|
75
76
|
});
|
|
76
77
|
}
|
|
77
78
|
handleItemClick(e) {
|
|
78
|
-
var n,
|
|
79
|
+
var n, o;
|
|
79
80
|
const t = e.target, s = ((n = this.items) == null ? void 0 : n.indexOf(t)) ?? -1;
|
|
80
81
|
if (s !== -1) {
|
|
81
82
|
this.selectedIndex = s, this.updateSelectedItem();
|
|
82
|
-
const d = ((
|
|
83
|
+
const d = ((o = t.textContent) == null ? void 0 : o.trim()) || t.getAttribute("data-label") || "";
|
|
83
84
|
this.dispatchEvent(
|
|
84
85
|
new CustomEvent("ds-secondary-navigation:select", {
|
|
85
86
|
detail: {
|
|
@@ -92,11 +93,14 @@ let o = class extends w(v) {
|
|
|
92
93
|
), this.closeDropdowns();
|
|
93
94
|
}
|
|
94
95
|
}
|
|
96
|
+
get textTransformStyle() {
|
|
97
|
+
return { textTransform: this.textTransform };
|
|
98
|
+
}
|
|
95
99
|
render() {
|
|
96
100
|
return a`
|
|
97
101
|
${this.backdropTemplate}
|
|
98
102
|
<div class="container gutter">
|
|
99
|
-
<nav data-testid="ds-secondary-navigation-container" class=${
|
|
103
|
+
<nav data-testid="ds-secondary-navigation-container" class=${m(this.classes)}>
|
|
100
104
|
${this.itemsTemplate}
|
|
101
105
|
${this.itemsDropdownButtonTemplate}
|
|
102
106
|
${this.actionsTemplate}
|
|
@@ -110,7 +114,7 @@ let o = class extends w(v) {
|
|
|
110
114
|
get itemsTemplate() {
|
|
111
115
|
return ["l", "xl", "xxl"].includes(this.viewport) ? a`
|
|
112
116
|
<div class="items-container">
|
|
113
|
-
<div>
|
|
117
|
+
<div style=${p(this.textTransformStyle)}>
|
|
114
118
|
<slot name="items" @slotchange=${this.handleItemsSlotChange} @click=${this.handleItemClick}></slot>
|
|
115
119
|
</div>
|
|
116
120
|
</div>
|
|
@@ -118,7 +122,7 @@ let o = class extends w(v) {
|
|
|
118
122
|
}
|
|
119
123
|
get actionsTemplate() {
|
|
120
124
|
return ["m", "l", "xl", "xxl"].includes(this.viewport) ? a`
|
|
121
|
-
<div class="actions-container">
|
|
125
|
+
<div class="actions-container" style=${p(this.textTransformStyle)}>
|
|
122
126
|
<slot name="actions" @slotchange=${this.handleActionsSlotChange}></slot>
|
|
123
127
|
</div>
|
|
124
128
|
` : l;
|
|
@@ -146,7 +150,7 @@ let o = class extends w(v) {
|
|
|
146
150
|
get itemsDropdownTemplate() {
|
|
147
151
|
return ["xxs", "xs", "s", "m"].includes(this.viewport) ? a`
|
|
148
152
|
<div
|
|
149
|
-
class=${
|
|
153
|
+
class=${m({
|
|
150
154
|
gutter: !0,
|
|
151
155
|
"dropdown-container": !0,
|
|
152
156
|
"items-dropdown": !0,
|
|
@@ -155,9 +159,7 @@ let o = class extends w(v) {
|
|
|
155
159
|
role="menu"
|
|
156
160
|
aria-hidden=${!this.openItems}
|
|
157
161
|
>
|
|
158
|
-
<div
|
|
159
|
-
class="dropdown ds-blur"
|
|
160
|
-
>
|
|
162
|
+
<div class="dropdown ds-blur" style=${p(this.textTransformStyle)}>
|
|
161
163
|
<slot name="items" @slotchange=${this.handleItemsSlotChange} @click=${this.handleItemClick}></slot>
|
|
162
164
|
</div>
|
|
163
165
|
</div>
|
|
@@ -174,20 +176,17 @@ let o = class extends w(v) {
|
|
|
174
176
|
}
|
|
175
177
|
get actionsDropdownTemplate() {
|
|
176
178
|
return ["xxs", "xs", "s"].includes(this.viewport) ? a`
|
|
177
|
-
<div
|
|
178
|
-
class=${
|
|
179
|
+
<div
|
|
180
|
+
class=${m({
|
|
179
181
|
gutter: !0,
|
|
180
182
|
"dropdown-container": !0,
|
|
181
183
|
"actions-dropdown": !0,
|
|
182
184
|
open: this.openCtas
|
|
183
|
-
})}
|
|
185
|
+
})}
|
|
184
186
|
role="menu"
|
|
185
187
|
aria-hidden=${!this.openCtas}
|
|
186
188
|
>
|
|
187
|
-
<div
|
|
188
|
-
class="dropdown ds-blur"
|
|
189
|
-
|
|
190
|
-
>
|
|
189
|
+
<div class="dropdown ds-blur" style=${p(this.textTransformStyle)}>
|
|
191
190
|
<slot name="actions"></slot>
|
|
192
191
|
</div>
|
|
193
192
|
</div>
|
|
@@ -197,37 +196,40 @@ let o = class extends w(v) {
|
|
|
197
196
|
return !this.openItems && !this.openCtas ? l : a`<div class="dropdown-backdrop" @click=${this.closeDropdowns}></div>`;
|
|
198
197
|
}
|
|
199
198
|
};
|
|
200
|
-
|
|
199
|
+
i.styles = [I];
|
|
200
|
+
r([
|
|
201
|
+
u({ type: String, attribute: "dropdown-button-text" })
|
|
202
|
+
], i.prototype, "dropdownButtonText", 2);
|
|
201
203
|
r([
|
|
202
|
-
|
|
203
|
-
],
|
|
204
|
+
u({ type: Number, attribute: "selected-index" })
|
|
205
|
+
], i.prototype, "selectedIndex", 2);
|
|
204
206
|
r([
|
|
205
|
-
|
|
206
|
-
],
|
|
207
|
+
u({ type: String, attribute: "text-transform" })
|
|
208
|
+
], i.prototype, "textTransform", 2);
|
|
207
209
|
r([
|
|
208
|
-
|
|
209
|
-
],
|
|
210
|
+
c()
|
|
211
|
+
], i.prototype, "openItems", 2);
|
|
210
212
|
r([
|
|
211
|
-
|
|
212
|
-
],
|
|
213
|
+
c()
|
|
214
|
+
], i.prototype, "openCtas", 2);
|
|
213
215
|
r([
|
|
214
|
-
|
|
215
|
-
],
|
|
216
|
+
c()
|
|
217
|
+
], i.prototype, "hasScrollLeft", 2);
|
|
216
218
|
r([
|
|
217
|
-
|
|
218
|
-
],
|
|
219
|
+
c()
|
|
220
|
+
], i.prototype, "hasScrollRight", 2);
|
|
219
221
|
r([
|
|
220
|
-
|
|
221
|
-
],
|
|
222
|
+
f({ slot: "items" })
|
|
223
|
+
], i.prototype, "items", 2);
|
|
222
224
|
r([
|
|
223
|
-
|
|
224
|
-
],
|
|
225
|
+
f({ slot: "actions" })
|
|
226
|
+
], i.prototype, "ctas", 2);
|
|
225
227
|
r([
|
|
226
228
|
g(".items-container")
|
|
227
|
-
],
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
],
|
|
229
|
+
], i.prototype, "itemsContainer", 2);
|
|
230
|
+
i = r([
|
|
231
|
+
x("ds-secondary-navigation")
|
|
232
|
+
], i);
|
|
231
233
|
export {
|
|
232
|
-
|
|
234
|
+
i as DsSecondaryNavigation
|
|
233
235
|
};
|
|
@@ -57,7 +57,7 @@ let m = class extends F {
|
|
|
57
57
|
}
|
|
58
58
|
loadThemeStyles() {
|
|
59
59
|
return this.loadStyles ? new Promise((t, o) => {
|
|
60
|
-
const s = "/2.0.0-canary.
|
|
60
|
+
const s = "/2.0.0-canary.22", r = `https://ds-assets.cupra.com${s}/styles/${this.theme}/theme.css`;
|
|
61
61
|
if (document.head.querySelector(`link[href="${r}"]`)) t();
|
|
62
62
|
else {
|
|
63
63
|
const e = `ui-kit-theme-${s}`, a = document.getElementById(e), n = document.createElement("link");
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { noChange as l } from "../lit-html.js";
|
|
2
|
+
import { directive as c, Directive as a, PartType as u } from "../directive.js";
|
|
3
|
+
/**
|
|
4
|
+
* @license
|
|
5
|
+
* Copyright 2018 Google LLC
|
|
6
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
7
|
+
*/
|
|
8
|
+
const o = "important", d = " !" + o, h = c(class extends a {
|
|
9
|
+
constructor(n) {
|
|
10
|
+
var t;
|
|
11
|
+
if (super(n), n.type !== u.ATTRIBUTE || n.name !== "style" || ((t = n.strings) == null ? void 0 : t.length) > 2) throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");
|
|
12
|
+
}
|
|
13
|
+
render(n) {
|
|
14
|
+
return Object.keys(n).reduce(((t, s) => {
|
|
15
|
+
const e = n[s];
|
|
16
|
+
return e == null ? t : t + `${s = s.includes("-") ? s : s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g, "-$&").toLowerCase()}:${e};`;
|
|
17
|
+
}), "");
|
|
18
|
+
}
|
|
19
|
+
update(n, [t]) {
|
|
20
|
+
const { style: s } = n.element;
|
|
21
|
+
if (this.ft === void 0) return this.ft = new Set(Object.keys(t)), this.render(t);
|
|
22
|
+
for (const e of this.ft) t[e] == null && (this.ft.delete(e), e.includes("-") ? s.removeProperty(e) : s[e] = null);
|
|
23
|
+
for (const e in t) {
|
|
24
|
+
const r = t[e];
|
|
25
|
+
if (r != null) {
|
|
26
|
+
this.ft.add(e);
|
|
27
|
+
const i = typeof r == "string" && r.endsWith(d);
|
|
28
|
+
e.includes("-") || i ? s.setProperty(e, i ? r.slice(0, -11) : r, i ? o : "") : s[e] = r;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return l;
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
export {
|
|
35
|
+
h as styleMap
|
|
36
|
+
};
|
|
@@ -25,7 +25,7 @@ class l {
|
|
|
25
25
|
}), f.subscribe("theme", this.handleChangeTheme);
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
const c = Symbol.for("@cupra/ui-kit/icons-manager/2.0.0-canary.
|
|
28
|
+
const c = Symbol.for("@cupra/ui-kit/icons-manager/2.0.0-canary.22"), h = globalThis;
|
|
29
29
|
let i = h[c];
|
|
30
30
|
i || (i = new l(), Object.defineProperty(h, c, {
|
|
31
31
|
value: i,
|
|
@@ -18,7 +18,7 @@ class e {
|
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
const u = Symbol.for("@cupra/ui-kit/pubsub/2.0.0-canary.
|
|
21
|
+
const u = Symbol.for("@cupra/ui-kit/pubsub/2.0.0-canary.22"), t = globalThis;
|
|
22
22
|
let b = t[u];
|
|
23
23
|
b || (b = new e(), Object.defineProperty(t, u, {
|
|
24
24
|
value: b,
|
|
@@ -5,7 +5,7 @@ class s {
|
|
|
5
5
|
theme: t
|
|
6
6
|
}) => {
|
|
7
7
|
if (!t || !e) return;
|
|
8
|
-
const r = `https://ds-assets.cupra.com/2.0.0-canary.
|
|
8
|
+
const r = `https://ds-assets.cupra.com/2.0.0-canary.22/styles/${t}/components/${e}.css`, c = this.getCachedStyleSheetPromise({ url: r });
|
|
9
9
|
if (c) return c;
|
|
10
10
|
const i = this.fetchStyle({ url: r }).then((n) => (n || this.stylePromises.delete(r), n));
|
|
11
11
|
return this.stylePromises.set(r, i), this.stylePromises.get(r);
|
|
@@ -3,7 +3,7 @@ import "../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
|
|
|
3
3
|
import "../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
4
4
|
import { unsafeCSS as n, css as o } from "../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";
|
|
5
5
|
function x(t, ...r) {
|
|
6
|
-
const e = String.raw({ raw: t }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v2-0-0-canary-
|
|
6
|
+
const e = String.raw({ raw: t }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v2-0-0-canary-22"), i = n(e);
|
|
7
7
|
return o`${i}`;
|
|
8
8
|
}
|
|
9
9
|
export {
|
|
@@ -3,7 +3,7 @@ import { html as n } from "../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit
|
|
|
3
3
|
import "../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
|
|
4
4
|
import { unsafeHTML as i } from "../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/unsafe-html.js";
|
|
5
5
|
function x(t, ...r) {
|
|
6
|
-
const o = String.raw({ raw: t }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v2-0-0-canary-
|
|
6
|
+
const o = String.raw({ raw: t }, ...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g, "$1-v2-0-0-canary-22"), e = i(o);
|
|
7
7
|
return n`${e}`;
|
|
8
8
|
}
|
|
9
9
|
export {
|
|
@@ -6,6 +6,7 @@ export declare class DsSecondaryNavigation extends DsSecondaryNavigation_base {
|
|
|
6
6
|
static styles: import("lit").CSSResult[];
|
|
7
7
|
dropdownButtonText: DsSecondaryNavigationAttrs['dropdown-button-text'];
|
|
8
8
|
selectedIndex: DsSecondaryNavigationAttrs['selected-index'];
|
|
9
|
+
textTransform: DsSecondaryNavigationAttrs['text-transform'];
|
|
9
10
|
private openItems;
|
|
10
11
|
private openCtas;
|
|
11
12
|
private hasScrollLeft;
|
|
@@ -28,6 +29,7 @@ export declare class DsSecondaryNavigation extends DsSecondaryNavigation_base {
|
|
|
28
29
|
private updateSelectedItem;
|
|
29
30
|
private updateCtas;
|
|
30
31
|
private handleItemClick;
|
|
32
|
+
private get textTransformStyle();
|
|
31
33
|
render(): import("lit").TemplateResult<1>;
|
|
32
34
|
private get itemsTemplate();
|
|
33
35
|
private get actionsTemplate();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cupra/ui-kit",
|
|
3
|
-
"version": "2.0.0-canary.
|
|
3
|
+
"version": "2.0.0-canary.22",
|
|
4
4
|
"description": "Web components library",
|
|
5
5
|
"author": "SEAT S.A.",
|
|
6
6
|
"license": "SEAT S.A. Library EULA 1.0",
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
"cssnano": "^7.0.6",
|
|
117
117
|
"dotenv": "^16.4.7",
|
|
118
118
|
"jsdom": "^26.0.0",
|
|
119
|
-
"lodash": "^4.17.
|
|
119
|
+
"lodash": "^4.17.23",
|
|
120
120
|
"nodemon": "^3.1.10",
|
|
121
121
|
"playwright": "1.56.1",
|
|
122
122
|
"postcss": "^8.5.3",
|