@cupra/ui-kit 2.0.0-canary.182 → 2.0.0-canary.184
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/README.md +27 -0
- package/dist/cjs/components/ds-tabs/ds-tabs.cjs +1 -0
- package/dist/cjs/components/ds-tabs/styles/common.styles.cjs +21 -26
- package/dist/cjs/components/ds-theme-provider/ds-theme-provider.cjs +1 -1
- package/dist/cjs/decorators/customUiKitElement.cjs +1 -1
- package/dist/cjs/utils/IconsManager.cjs +1 -1
- package/dist/cjs/utils/PubSub.cjs +1 -1
- package/dist/cjs/utils/StylesRegistry/StylesRegistry.cjs +1 -1
- package/dist/cjs/utils/version.cjs +1 -1
- package/dist/esm/components/ds-tabs/ds-tabs.js +1 -0
- package/dist/esm/components/ds-tabs/styles/common.styles.js +21 -26
- package/dist/esm/components/ds-theme-provider/ds-theme-provider.js +1 -1
- package/dist/esm/decorators/customUiKitElement.js +1 -1
- 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/version.js +1 -1
- package/dist-react/cjs/components/ds-tabs/ds-tabs.cjs +1 -0
- package/dist-react/cjs/components/ds-tabs/styles/common.styles.cjs +21 -26
- package/dist-react/cjs/components/ds-theme-provider/ds-theme-provider.cjs +1 -1
- package/dist-react/cjs/decorators/customUiKitElement.cjs +1 -1
- package/dist-react/cjs/utils/IconsManager.cjs +1 -1
- package/dist-react/cjs/utils/PubSub.cjs +1 -1
- package/dist-react/cjs/utils/StylesRegistry/StylesRegistry.cjs +1 -1
- package/dist-react/cjs/utils/version.cjs +1 -1
- package/dist-react/esm/components/ds-tabs/ds-tabs.js +1 -0
- package/dist-react/esm/components/ds-tabs/styles/common.styles.js +21 -26
- package/dist-react/esm/components/ds-theme-provider/ds-theme-provider.js +1 -1
- package/dist-react/esm/decorators/customUiKitElement.js +1 -1
- 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/version.js +1 -1
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -15,6 +15,33 @@ Use `@cupra/ui-kit` if you want the **smallest, most portable** way to adopt DS-
|
|
|
15
15
|
|
|
16
16
|
If your application is **React-only**, and you prefer idiomatic React props & JSX, use `@cupra/ui-react` instead.
|
|
17
17
|
|
|
18
|
+
## Browser Support
|
|
19
|
+
|
|
20
|
+
| Platform | Minimum supported version |
|
|
21
|
+
| --- | --- |
|
|
22
|
+
| iOS / iPadOS | 17+ |
|
|
23
|
+
| Android | 13+ |
|
|
24
|
+
| Chrome (desktop) | Current stable version − 1 |
|
|
25
|
+
| Edge (desktop) | Current stable version − 1 |
|
|
26
|
+
| Firefox (desktop) | Current stable version − 1 |
|
|
27
|
+
| Safari (desktop) | Latest version available on supported macOS releases |
|
|
28
|
+
|
|
29
|
+
Any browser/OS version representing more than 1% of total website traffic remains supported even
|
|
30
|
+
if it falls below these versions, until its traffic share drops back under that threshold.
|
|
31
|
+
|
|
32
|
+
Technical guarantees behind this matrix:
|
|
33
|
+
|
|
34
|
+
- **Guaranteed:** the published JavaScript is transpiled to a deliberately conservative target
|
|
35
|
+
(ES2020, pinned to `chrome >= 87`, `edge >= 88`, `firefox >= 78`, `safari >= 14`), so the
|
|
36
|
+
shipped *syntax* never requires a newer JS engine than that.
|
|
37
|
+
- **Not guaranteed:** no polyfills are shipped for runtime *APIs* (e.g. `ResizeObserver`,
|
|
38
|
+
`structuredClone`) below the official minimum versions above.
|
|
39
|
+
- **Required natively:** Custom Elements, Shadow DOM and `<slot>` content projection — these
|
|
40
|
+
platform features are never polyfilled.
|
|
41
|
+
|
|
42
|
+
Full rationale, transpilation details and maintenance guide:
|
|
43
|
+
[BROWSER_SUPPORT.md](../../BROWSER_SUPPORT.md) (repository only — not included in the npm package).
|
|
44
|
+
|
|
18
45
|
## Installation
|
|
19
46
|
|
|
20
47
|
### Install the package
|
|
@@ -14,6 +14,7 @@ const e=require("../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/l
|
|
|
14
14
|
<slot @slotchange=${this.handleTabsSlotchange} name="tab" @click=${this.handleSelect}></slot>
|
|
15
15
|
</nav>
|
|
16
16
|
${this.getScrollButtonTemplate(`right`,this.handleScrollRight)}
|
|
17
|
+
<div class="scroll-fade" aria-hidden="true"></div>
|
|
17
18
|
</div>
|
|
18
19
|
<slot @slotchange=${this.handlePanelSlotchange} name="panel"></slot>
|
|
19
20
|
</div>
|
|
@@ -20,36 +20,31 @@ const e=require("../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_mo
|
|
|
20
20
|
display: flex;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
rgba(0, 0, 0, 0.5) 95%,
|
|
29
|
-
rgba(0, 0, 0, 0) 100%
|
|
30
|
-
);
|
|
23
|
+
.scroll-fade {
|
|
24
|
+
position: absolute;
|
|
25
|
+
inset: 0;
|
|
26
|
+
pointer-events: none;
|
|
27
|
+
z-index: 2;
|
|
31
28
|
}
|
|
32
29
|
|
|
33
|
-
.nav-container.scroll-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
);
|
|
30
|
+
.nav-container.scroll-left .scroll-fade::before {
|
|
31
|
+
content: '';
|
|
32
|
+
position: absolute;
|
|
33
|
+
top: 0;
|
|
34
|
+
left: 0;
|
|
35
|
+
bottom: 0;
|
|
36
|
+
width: 32px;
|
|
37
|
+
background: linear-gradient(to right, var(--ds-color-surface-contrast) 0%, transparent 100%);
|
|
41
38
|
}
|
|
42
39
|
|
|
43
|
-
.nav-container.scroll-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
rgba(0, 0, 0, 0) 100%
|
|
52
|
-
);
|
|
40
|
+
.nav-container.scroll-right .scroll-fade::after {
|
|
41
|
+
content: '';
|
|
42
|
+
position: absolute;
|
|
43
|
+
top: 0;
|
|
44
|
+
right: 0;
|
|
45
|
+
bottom: 0;
|
|
46
|
+
width: 32px;
|
|
47
|
+
background: linear-gradient(to left, var(--ds-color-surface-contrast) 0%, transparent 100%);
|
|
53
48
|
}
|
|
54
49
|
|
|
55
50
|
.nav-arrow {
|
|
@@ -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");require("../../core/theme.constants.cjs");const n=require("../../utils/PubSub.cjs"),r=require("../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs"),i=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 a=require("../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.cjs"),o=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 s=require("../../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/decorate.cjs"),c=require("../../decorators/customUiKitElement.cjs"),l=require("../../utils/booleanConverter.cjs"),u=require("../../styles/source/shared/fonts-config.cjs");var d=class extends i.i{constructor(...e){super(...e),this.loadFonts=!0,this.loadStyles=!0,this.loadUnusedStyles=!0,this.cssLoaded=!1,this.loadedFonts=new Set}updated(e){if(super.updated(e),e.has(`theme`)){var t,r;n.pubSub.publish(`theme`,this.theme),(t=sessionStorage)==null||t.setItem(`@cupra/ui-kit/theme`,this.theme),typeof FontFace<`u`&&(r=document)!=null&&r.fonts&&this.loadThemeFonts(),this.loadThemeStyles().then(()=>{this.cssLoaded=!0,this.dispatchEvent(new CustomEvent(`ui-kit:ready`,{bubbles:!0,composed:!0}))})}}loadThemeFonts(){var e;(e=u.fontsConfig[this.theme])==null||e.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:`optional`});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(){let e=`/2.0.0-canary.
|
|
4
|
+
url('https://ds-assets.cupra.com/fonts/${this.theme}/${n}.otf') format('opentype')`,{style:`normal`,weight:e,display:`optional`});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(){let e=`/2.0.0-canary.184`;return this.loadUnusedStyles&&this.applyUnusedStyles(e),this.loadStyles?new Promise((t,n)=>{let r=`https://ds-assets.cupra.com${e}/styles/${this.theme}/theme.css`;if(document.head.querySelector(`link[href="${r}"]`))t();else{let i=`ui-kit-theme-${e}`,a=document.getElementById(i),o=document.createElement(`link`);o.id=i,o.rel=`stylesheet`,o.href=r,o.onload=()=>t(),o.onerror=()=>n(Error(`Failed to load theme CSS: ${r}`)),document.head.appendChild(o),a==null||a.remove()}}):Promise.resolve()}applyUnusedStyles(e){let t=`https://ds-assets.cupra.com${e}/styles/${this.theme}/unused-styles.css`;if(document.head.querySelector(`link[href="${t}"]`))return;let n=`ui-kit-unused-styles-${e}`,r=document.getElementById(n),i=document.createElement(`link`);i.id=n,i.rel=`preload`,i.as=`style`,i.href=t,i.onload=()=>{i.rel=`stylesheet`},document.head.appendChild(i),r==null||r.remove()}render(){return this.cssLoaded?r.x`<slot></slot>`:r.E}};s.__decorate([a.n({type:Boolean,converter:l.booleanConverter,attribute:`load-fonts`})],d.prototype,`loadFonts`,void 0),s.__decorate([a.n({type:Boolean,converter:l.booleanConverter,attribute:`load-styles`})],d.prototype,`loadStyles`,void 0),s.__decorate([a.n({type:Boolean,converter:l.booleanConverter,attribute:`load-unused-styles`})],d.prototype,`loadUnusedStyles`,void 0),s.__decorate([e.e({context:t.themeContext}),a.n({type:String})],d.prototype,`theme`,void 0),s.__decorate([o.r()],d.prototype,`cssLoaded`,void 0),s.__decorate([o.r()],d.prototype,`loadedFonts`,void 0),d=s.__decorate([c.customUiKitElement(`ds-theme-provider`)],d);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require("../utils/version.cjs");function e(e,t){return function(n){var r,i,a,o;if(!(n!=null&&n.prototype))throw TypeError(`@customUiKitElement requires a class that extends HTMLElement.`);let s=e;if(!((r=globalThis)==null||(r=r.customElements)==null)&&r.get(s))return;let c=t!=null&&t.skipTagAsComponentName?[]:[e];Array.isArray(t==null?void 0:t.extendComponentNames)&&(c=[...t.extendComponentNames,...c]),(i=globalThis)==null||(i=i.customElements)==null||(a=i.define)==null||a.call(i,s,(o=class extends n{connectedCallback(){var e;(e=n.prototype.connectedCallback)==null||e.call(this),this.setAttribute(`data-ui-kit-version`,`2.0.0-canary.
|
|
1
|
+
require("../utils/version.cjs");function e(e,t){return function(n){var r,i,a,o;if(!(n!=null&&n.prototype))throw TypeError(`@customUiKitElement requires a class that extends HTMLElement.`);let s=e;if(!((r=globalThis)==null||(r=r.customElements)==null)&&r.get(s))return;let c=t!=null&&t.skipTagAsComponentName?[]:[e];Array.isArray(t==null?void 0:t.extendComponentNames)&&(c=[...t.extendComponentNames,...c]),(i=globalThis)==null||(i=i.customElements)==null||(a=i.define)==null||a.call(i,s,(o=class extends n{connectedCallback(){var e;(e=n.prototype.connectedCallback)==null||e.call(this),this.setAttribute(`data-ui-kit-version`,`2.0.0-canary.184`)}},o.componentName=c,o))}}exports.customUiKitElement=e;
|
|
@@ -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={})=>{var r;let i=typeof sessionStorage<`u`?(r=sessionStorage)==null?void 0:r.getItem(e.THEME_STORAGE_KEY):null;!this.theme&&i&&(this.theme=i);let a=this.icons[t];if(a)return await a;let o=this.loadIcon(t,n).catch(e=>{throw delete this.icons[t],e});return this.icons[t]=o,o},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==null?void 0: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.
|
|
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={})=>{var r;let i=typeof sessionStorage<`u`?(r=sessionStorage)==null?void 0:r.getItem(e.THEME_STORAGE_KEY):null;!this.theme&&i&&(this.theme=i);let a=this.icons[t];if(a)return await a;let o=this.loadIcon(t,n).catch(e=>{throw delete this.icons[t],e});return this.icons[t]=o,o},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==null?void 0: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.184`),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.
|
|
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.184`),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.
|
|
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.184/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||(t.instance=new t),t.instance}}.getInstance();exports.stylesRegistry=t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=`2.0.0-canary.
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=`2.0.0-canary.184`,t=`--v${e.replaceAll(`.`,`-`)}`;exports.VERSION=e,exports.VERSION_TAG_SUFFIX=t;
|
|
@@ -172,6 +172,7 @@ var _, v = (_ = class extends o {
|
|
|
172
172
|
<slot @slotchange=${this.handleTabsSlotchange} name="tab" @click=${this.handleSelect}></slot>
|
|
173
173
|
</nav>
|
|
174
174
|
${this.getScrollButtonTemplate("right", this.handleScrollRight)}
|
|
175
|
+
<div class="scroll-fade" aria-hidden="true"></div>
|
|
175
176
|
</div>
|
|
176
177
|
<slot @slotchange=${this.handlePanelSlotchange} name="panel"></slot>
|
|
177
178
|
</div>
|
|
@@ -23,36 +23,31 @@ var t = e`
|
|
|
23
23
|
display: flex;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
rgba(0, 0, 0, 0.5) 95%,
|
|
32
|
-
rgba(0, 0, 0, 0) 100%
|
|
33
|
-
);
|
|
26
|
+
.scroll-fade {
|
|
27
|
+
position: absolute;
|
|
28
|
+
inset: 0;
|
|
29
|
+
pointer-events: none;
|
|
30
|
+
z-index: 2;
|
|
34
31
|
}
|
|
35
32
|
|
|
36
|
-
.nav-container.scroll-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
);
|
|
33
|
+
.nav-container.scroll-left .scroll-fade::before {
|
|
34
|
+
content: '';
|
|
35
|
+
position: absolute;
|
|
36
|
+
top: 0;
|
|
37
|
+
left: 0;
|
|
38
|
+
bottom: 0;
|
|
39
|
+
width: 32px;
|
|
40
|
+
background: linear-gradient(to right, var(--ds-color-surface-contrast) 0%, transparent 100%);
|
|
44
41
|
}
|
|
45
42
|
|
|
46
|
-
.nav-container.scroll-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
rgba(0, 0, 0, 0) 100%
|
|
55
|
-
);
|
|
43
|
+
.nav-container.scroll-right .scroll-fade::after {
|
|
44
|
+
content: '';
|
|
45
|
+
position: absolute;
|
|
46
|
+
top: 0;
|
|
47
|
+
right: 0;
|
|
48
|
+
bottom: 0;
|
|
49
|
+
width: 32px;
|
|
50
|
+
background: linear-gradient(to left, var(--ds-color-surface-contrast) 0%, transparent 100%);
|
|
56
51
|
}
|
|
57
52
|
|
|
58
53
|
.nav-arrow {
|
|
@@ -53,7 +53,7 @@ var f = class extends a {
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
loadThemeStyles() {
|
|
56
|
-
let e = "/2.0.0-canary.
|
|
56
|
+
let e = "/2.0.0-canary.184";
|
|
57
57
|
return this.loadUnusedStyles && this.applyUnusedStyles(e), this.loadStyles ? new Promise((t, n) => {
|
|
58
58
|
let r = `https://ds-assets.cupra.com${e}/styles/${this.theme}/theme.css`;
|
|
59
59
|
if (document.head.querySelector(`link[href="${r}"]`)) t();
|
|
@@ -10,7 +10,7 @@ function e(e, t) {
|
|
|
10
10
|
Array.isArray(t == null ? void 0 : t.extendComponentNames) && (c = [...t.extendComponentNames, ...c]), (i = globalThis) == null || (i = i.customElements) == null || (a = i.define) == null || a.call(i, s, (o = class extends n {
|
|
11
11
|
connectedCallback() {
|
|
12
12
|
var e;
|
|
13
|
-
(e = n.prototype.connectedCallback) == null || e.call(this), this.setAttribute("data-ui-kit-version", "2.0.0-canary.
|
|
13
|
+
(e = n.prototype.connectedCallback) == null || e.call(this), this.setAttribute("data-ui-kit-version", "2.0.0-canary.184");
|
|
14
14
|
}
|
|
15
15
|
}, o.componentName = c, o));
|
|
16
16
|
};
|
|
@@ -26,7 +26,7 @@ var n = class {
|
|
|
26
26
|
return console.error(`Failed to fetch icon "${e}":`, t), "";
|
|
27
27
|
}), t.subscribe("theme", this.handleChangeTheme);
|
|
28
28
|
}
|
|
29
|
-
}, r = Symbol.for("@cupra/ui-kit/icons-manager/2.0.0-canary.
|
|
29
|
+
}, r = Symbol.for("@cupra/ui-kit/icons-manager/2.0.0-canary.184"), i = globalThis, a = i[r];
|
|
30
30
|
a || (a = new n(), Object.defineProperty(i, r, {
|
|
31
31
|
value: a,
|
|
32
32
|
writable: !1,
|
package/dist/esm/utils/PubSub.js
CHANGED
|
@@ -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.
|
|
21
|
+
}, t = Symbol.for("@cupra/ui-kit/pubsub/2.0.0-canary.184"), 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.
|
|
7
|
+
let r = `https://ds-assets.cupra.com/2.0.0-canary.184/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);
|
|
@@ -14,6 +14,7 @@ const e=require("../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/l
|
|
|
14
14
|
<slot @slotchange=${this.handleTabsSlotchange} name="tab" @click=${this.handleSelect}></slot>
|
|
15
15
|
</nav>
|
|
16
16
|
${this.getScrollButtonTemplate(`right`,this.handleScrollRight)}
|
|
17
|
+
<div class="scroll-fade" aria-hidden="true"></div>
|
|
17
18
|
</div>
|
|
18
19
|
<slot @slotchange=${this.handlePanelSlotchange} name="panel"></slot>
|
|
19
20
|
</div>
|
|
@@ -20,36 +20,31 @@ const e=require("../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_mo
|
|
|
20
20
|
display: flex;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
rgba(0, 0, 0, 0.5) 95%,
|
|
29
|
-
rgba(0, 0, 0, 0) 100%
|
|
30
|
-
);
|
|
23
|
+
.scroll-fade {
|
|
24
|
+
position: absolute;
|
|
25
|
+
inset: 0;
|
|
26
|
+
pointer-events: none;
|
|
27
|
+
z-index: 2;
|
|
31
28
|
}
|
|
32
29
|
|
|
33
|
-
.nav-container.scroll-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
);
|
|
30
|
+
.nav-container.scroll-left .scroll-fade::before {
|
|
31
|
+
content: '';
|
|
32
|
+
position: absolute;
|
|
33
|
+
top: 0;
|
|
34
|
+
left: 0;
|
|
35
|
+
bottom: 0;
|
|
36
|
+
width: 32px;
|
|
37
|
+
background: linear-gradient(to right, var(--ds-color-surface-contrast) 0%, transparent 100%);
|
|
41
38
|
}
|
|
42
39
|
|
|
43
|
-
.nav-container.scroll-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
rgba(0, 0, 0, 0) 100%
|
|
52
|
-
);
|
|
40
|
+
.nav-container.scroll-right .scroll-fade::after {
|
|
41
|
+
content: '';
|
|
42
|
+
position: absolute;
|
|
43
|
+
top: 0;
|
|
44
|
+
right: 0;
|
|
45
|
+
bottom: 0;
|
|
46
|
+
width: 32px;
|
|
47
|
+
background: linear-gradient(to left, var(--ds-color-surface-contrast) 0%, transparent 100%);
|
|
53
48
|
}
|
|
54
49
|
|
|
55
50
|
.nav-arrow {
|
|
@@ -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");require("../../core/theme.constants.cjs");const n=require("../../utils/PubSub.cjs"),r=require("../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs"),i=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 a=require("../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.cjs"),o=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 s=require("../../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/decorate.cjs"),c=require("../../decorators/customUiKitElement.cjs"),l=require("../../utils/booleanConverter.cjs"),u=require("../../styles/source/shared/fonts-config.cjs");var d=class extends i.i{constructor(...e){super(...e),this.loadFonts=!0,this.loadStyles=!0,this.loadUnusedStyles=!0,this.cssLoaded=!1,this.loadedFonts=new Set}updated(e){if(super.updated(e),e.has(`theme`)){var t,r;n.pubSub.publish(`theme`,this.theme),(t=sessionStorage)==null||t.setItem(`@cupra/ui-kit/theme`,this.theme),typeof FontFace<`u`&&(r=document)!=null&&r.fonts&&this.loadThemeFonts(),this.loadThemeStyles().then(()=>{this.cssLoaded=!0,this.dispatchEvent(new CustomEvent(`ui-kit:ready`,{bubbles:!0,composed:!0}))})}}loadThemeFonts(){var e;(e=u.fontsConfig[this.theme])==null||e.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:`optional`});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(){let e=`/2.0.0-canary.
|
|
4
|
+
url('https://ds-assets.cupra.com/fonts/${this.theme}/${n}.otf') format('opentype')`,{style:`normal`,weight:e,display:`optional`});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(){let e=`/2.0.0-canary.184`;return this.loadUnusedStyles&&this.applyUnusedStyles(e),this.loadStyles?new Promise((t,n)=>{let r=`https://ds-assets.cupra.com${e}/styles/${this.theme}/theme.css`;if(document.head.querySelector(`link[href="${r}"]`))t();else{let i=`ui-kit-theme-${e}`,a=document.getElementById(i),o=document.createElement(`link`);o.id=i,o.rel=`stylesheet`,o.href=r,o.onload=()=>t(),o.onerror=()=>n(Error(`Failed to load theme CSS: ${r}`)),document.head.appendChild(o),a==null||a.remove()}}):Promise.resolve()}applyUnusedStyles(e){let t=`https://ds-assets.cupra.com${e}/styles/${this.theme}/unused-styles.css`;if(document.head.querySelector(`link[href="${t}"]`))return;let n=`ui-kit-unused-styles-${e}`,r=document.getElementById(n),i=document.createElement(`link`);i.id=n,i.rel=`preload`,i.as=`style`,i.href=t,i.onload=()=>{i.rel=`stylesheet`},document.head.appendChild(i),r==null||r.remove()}render(){return this.cssLoaded?r.x`<slot></slot>`:r.E}};s.__decorate([a.n({type:Boolean,converter:l.booleanConverter,attribute:`load-fonts`})],d.prototype,`loadFonts`,void 0),s.__decorate([a.n({type:Boolean,converter:l.booleanConverter,attribute:`load-styles`})],d.prototype,`loadStyles`,void 0),s.__decorate([a.n({type:Boolean,converter:l.booleanConverter,attribute:`load-unused-styles`})],d.prototype,`loadUnusedStyles`,void 0),s.__decorate([e.e({context:t.themeContext}),a.n({type:String})],d.prototype,`theme`,void 0),s.__decorate([o.r()],d.prototype,`cssLoaded`,void 0),s.__decorate([o.r()],d.prototype,`loadedFonts`,void 0),d=s.__decorate([c.customUiKitElement(`ds-theme-provider`)],d);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../utils/version.cjs");function t(t,n){return function(r){var i,a,o,s;if(!(r!=null&&r.prototype))throw TypeError(`@customUiKitElement requires a class that extends HTMLElement.`);let c=`${t}${e.VERSION_TAG_SUFFIX}`;if(!((i=globalThis)==null||(i=i.customElements)==null)&&i.get(c))return;let l=n!=null&&n.skipTagAsComponentName?[]:[t];Array.isArray(n==null?void 0:n.extendComponentNames)&&(l=[...n.extendComponentNames,...l]),(a=globalThis)==null||(a=a.customElements)==null||(o=a.define)==null||o.call(a,c,(s=class extends r{connectedCallback(){var e;(e=r.prototype.connectedCallback)==null||e.call(this),this.setAttribute(`data-ui-kit-version`,`2.0.0-canary.
|
|
1
|
+
const e=require("../utils/version.cjs");function t(t,n){return function(r){var i,a,o,s;if(!(r!=null&&r.prototype))throw TypeError(`@customUiKitElement requires a class that extends HTMLElement.`);let c=`${t}${e.VERSION_TAG_SUFFIX}`;if(!((i=globalThis)==null||(i=i.customElements)==null)&&i.get(c))return;let l=n!=null&&n.skipTagAsComponentName?[]:[t];Array.isArray(n==null?void 0:n.extendComponentNames)&&(l=[...n.extendComponentNames,...l]),(a=globalThis)==null||(a=a.customElements)==null||(o=a.define)==null||o.call(a,c,(s=class extends r{connectedCallback(){var e;(e=r.prototype.connectedCallback)==null||e.call(this),this.setAttribute(`data-ui-kit-version`,`2.0.0-canary.184`)}},s.componentName=l,s))}}exports.customUiKitElement=t;
|
|
@@ -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={})=>{var r;let i=typeof sessionStorage<`u`?(r=sessionStorage)==null?void 0:r.getItem(e.THEME_STORAGE_KEY):null;!this.theme&&i&&(this.theme=i);let a=this.icons[t];if(a)return await a;let o=this.loadIcon(t,n).catch(e=>{throw delete this.icons[t],e});return this.icons[t]=o,o},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==null?void 0: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.
|
|
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={})=>{var r;let i=typeof sessionStorage<`u`?(r=sessionStorage)==null?void 0:r.getItem(e.THEME_STORAGE_KEY):null;!this.theme&&i&&(this.theme=i);let a=this.icons[t];if(a)return await a;let o=this.loadIcon(t,n).catch(e=>{throw delete this.icons[t],e});return this.icons[t]=o,o},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==null?void 0: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.184`),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.
|
|
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.184`),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.
|
|
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.184/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||(t.instance=new t),t.instance}}.getInstance();exports.stylesRegistry=t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=`2.0.0-canary.
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=`2.0.0-canary.184`,t=`--v${e.replaceAll(`.`,`-`)}`;exports.VERSION=e,exports.VERSION_TAG_SUFFIX=t;
|
|
@@ -172,6 +172,7 @@ var _, v = (_ = class extends o {
|
|
|
172
172
|
<slot @slotchange=${this.handleTabsSlotchange} name="tab" @click=${this.handleSelect}></slot>
|
|
173
173
|
</nav>
|
|
174
174
|
${this.getScrollButtonTemplate("right", this.handleScrollRight)}
|
|
175
|
+
<div class="scroll-fade" aria-hidden="true"></div>
|
|
175
176
|
</div>
|
|
176
177
|
<slot @slotchange=${this.handlePanelSlotchange} name="panel"></slot>
|
|
177
178
|
</div>
|
|
@@ -23,36 +23,31 @@ var t = e`
|
|
|
23
23
|
display: flex;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
rgba(0, 0, 0, 0.5) 95%,
|
|
32
|
-
rgba(0, 0, 0, 0) 100%
|
|
33
|
-
);
|
|
26
|
+
.scroll-fade {
|
|
27
|
+
position: absolute;
|
|
28
|
+
inset: 0;
|
|
29
|
+
pointer-events: none;
|
|
30
|
+
z-index: 2;
|
|
34
31
|
}
|
|
35
32
|
|
|
36
|
-
.nav-container.scroll-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
);
|
|
33
|
+
.nav-container.scroll-left .scroll-fade::before {
|
|
34
|
+
content: '';
|
|
35
|
+
position: absolute;
|
|
36
|
+
top: 0;
|
|
37
|
+
left: 0;
|
|
38
|
+
bottom: 0;
|
|
39
|
+
width: 32px;
|
|
40
|
+
background: linear-gradient(to right, var(--ds-color-surface-contrast) 0%, transparent 100%);
|
|
44
41
|
}
|
|
45
42
|
|
|
46
|
-
.nav-container.scroll-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
rgba(0, 0, 0, 0) 100%
|
|
55
|
-
);
|
|
43
|
+
.nav-container.scroll-right .scroll-fade::after {
|
|
44
|
+
content: '';
|
|
45
|
+
position: absolute;
|
|
46
|
+
top: 0;
|
|
47
|
+
right: 0;
|
|
48
|
+
bottom: 0;
|
|
49
|
+
width: 32px;
|
|
50
|
+
background: linear-gradient(to left, var(--ds-color-surface-contrast) 0%, transparent 100%);
|
|
56
51
|
}
|
|
57
52
|
|
|
58
53
|
.nav-arrow {
|
|
@@ -53,7 +53,7 @@ var f = class extends a {
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
loadThemeStyles() {
|
|
56
|
-
let e = "/2.0.0-canary.
|
|
56
|
+
let e = "/2.0.0-canary.184";
|
|
57
57
|
return this.loadUnusedStyles && this.applyUnusedStyles(e), this.loadStyles ? new Promise((t, n) => {
|
|
58
58
|
let r = `https://ds-assets.cupra.com${e}/styles/${this.theme}/theme.css`;
|
|
59
59
|
if (document.head.querySelector(`link[href="${r}"]`)) t();
|
|
@@ -10,7 +10,7 @@ function t(t, n) {
|
|
|
10
10
|
Array.isArray(n == null ? void 0 : n.extendComponentNames) && (l = [...n.extendComponentNames, ...l]), (a = globalThis) == null || (a = a.customElements) == null || (o = a.define) == null || o.call(a, c, (s = class extends r {
|
|
11
11
|
connectedCallback() {
|
|
12
12
|
var e;
|
|
13
|
-
(e = r.prototype.connectedCallback) == null || e.call(this), this.setAttribute("data-ui-kit-version", "2.0.0-canary.
|
|
13
|
+
(e = r.prototype.connectedCallback) == null || e.call(this), this.setAttribute("data-ui-kit-version", "2.0.0-canary.184");
|
|
14
14
|
}
|
|
15
15
|
}, s.componentName = l, s));
|
|
16
16
|
};
|
|
@@ -26,7 +26,7 @@ var n = class {
|
|
|
26
26
|
return console.error(`Failed to fetch icon "${e}":`, t), "";
|
|
27
27
|
}), t.subscribe("theme", this.handleChangeTheme);
|
|
28
28
|
}
|
|
29
|
-
}, r = Symbol.for("@cupra/ui-kit/icons-manager/2.0.0-canary.
|
|
29
|
+
}, r = Symbol.for("@cupra/ui-kit/icons-manager/2.0.0-canary.184"), i = globalThis, a = i[r];
|
|
30
30
|
a || (a = new n(), Object.defineProperty(i, r, {
|
|
31
31
|
value: a,
|
|
32
32
|
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.
|
|
21
|
+
}, t = Symbol.for("@cupra/ui-kit/pubsub/2.0.0-canary.184"), 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.
|
|
7
|
+
let r = `https://ds-assets.cupra.com/2.0.0-canary.184/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);
|
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.184",
|
|
4
4
|
"description": "Web components library",
|
|
5
5
|
"author": "SEAT S.A.",
|
|
6
6
|
"license": "SEAT S.A. Library EULA 1.0",
|
|
@@ -113,6 +113,7 @@
|
|
|
113
113
|
"chromatic": "^11.27.0",
|
|
114
114
|
"cssnano": "^7.1.3",
|
|
115
115
|
"dotenv": "^16.4.7",
|
|
116
|
+
"es-check": "^9.6.4",
|
|
116
117
|
"jsdom": "^26.0.0",
|
|
117
118
|
"lodash": "^4.18.1",
|
|
118
119
|
"lottie-web": "^5.13.0",
|
|
@@ -147,6 +148,7 @@
|
|
|
147
148
|
"build-breakpoints": "mkdir -p dist/styles && cp src/styles/source/shared/breakpoints.css dist/styles/breakpoints.css",
|
|
148
149
|
"build": "pnpm build-assets && pnpm clean-dist && pnpm build-ts && BUILD_FORMAT=esm vite build --emptyOutDir false && BUILD_FORMAT=cjs vite build --emptyOutDir false && pnpm build-breakpoints",
|
|
149
150
|
"build-cdn": "pnpm build-assets && pnpm clean-dist-cdn && vite build --config vite.cdn.config.js --mode production",
|
|
151
|
+
"check:browser-compat": "es-check es2020 dist-cdn/*.iife.js",
|
|
150
152
|
"build:react": "pnpm build-assets && pnpm clean-dist:react && pnpm build-ts:react && BUILD_FORMAT=esm vite build --config vite.react.config.js --emptyOutDir false && BUILD_FORMAT=cjs vite build --config vite.react.config.js --emptyOutDir false",
|
|
151
153
|
"build:react:dev": "pnpm build-assets && pnpm clean-dist:react && pnpm build-ts:react && BUILD_FORMAT=esm vite build --mode development --config vite.react.config.js --emptyOutDir false && BUILD_FORMAT=cjs vite build --mode development --config vite.react.config.js --emptyOutDir false",
|
|
152
154
|
"analyze": "pnpm clean-dist && pnpm build-ts && ANALYZE=true vite build --mode production",
|