@cupra/ui-kit 2.0.0-canary.113 → 2.0.0-canary.115
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-breadcrumbs/ds-breadcrumbs.cjs +8 -8
- package/dist/cjs/components/ds-date-picker/ds-date-picker.cjs +1 -1
- package/dist/cjs/components/ds-text/ds-text.cjs +3 -3
- package/dist/cjs/components/ds-theme-provider/ds-theme-provider.cjs +1 -1
- package/dist/cjs/decorators/customUiKitElement.cjs +1 -1
- package/dist/cjs/index.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/componentFactory.cjs +124 -122
- package/dist/cjs/utils/cssWithTokens.cjs +1 -1
- package/dist/cjs/utils/htmlWithTokens.cjs +1 -1
- package/dist/cjs/utils/version.cjs +1 -0
- package/dist/esm/components/ds-breadcrumbs/ds-breadcrumbs.js +13 -12
- package/dist/esm/components/ds-date-picker/ds-date-picker.js +2 -7
- package/dist/esm/components/ds-text/ds-text.js +10 -10
- package/dist/esm/components/ds-theme-provider/ds-theme-provider.js +1 -1
- package/dist/esm/decorators/customUiKitElement.js +14 -13
- package/dist/esm/index.js +3 -2
- 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/componentFactory.js +130 -125
- package/dist/esm/utils/cssWithTokens.js +1 -1
- package/dist/esm/utils/htmlWithTokens.js +1 -1
- package/dist/esm/utils/version.js +4 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/utils/componentFactory.d.ts +1 -0
- package/dist/types/utils/version.d.ts +2 -0
- package/dist-react/cjs/components/ds-breadcrumbs/ds-breadcrumbs.cjs +8 -8
- package/dist-react/cjs/components/ds-date-picker/ds-date-picker.cjs +1 -1
- package/dist-react/cjs/components/ds-text/ds-text.cjs +3 -3
- 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/index.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/componentFactory.cjs +113 -112
- package/dist-react/cjs/utils/cssWithTokens.cjs +1 -1
- package/dist-react/cjs/utils/htmlWithTokens.cjs +1 -1
- package/dist-react/cjs/utils/version.cjs +1 -0
- package/dist-react/esm/components/ds-breadcrumbs/ds-breadcrumbs.js +13 -12
- package/dist-react/esm/components/ds-date-picker/ds-date-picker.js +2 -7
- package/dist-react/esm/components/ds-text/ds-text.js +10 -10
- package/dist-react/esm/components/ds-theme-provider/ds-theme-provider.js +1 -1
- package/dist-react/esm/decorators/customUiKitElement.js +14 -13
- package/dist-react/esm/index.js +3 -2
- 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/componentFactory.js +117 -114
- package/dist-react/esm/utils/cssWithTokens.js +1 -1
- package/dist-react/esm/utils/htmlWithTokens.js +1 -1
- package/dist-react/esm/utils/version.js +4 -0
- package/dist-react/types/index.d.ts +1 -0
- package/dist-react/types/utils/componentFactory.d.ts +1 -0
- package/dist-react/types/utils/version.d.ts +2 -0
- package/package.json +2 -2
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
const e=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.cjs`);const t=require(`../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.cjs`),n=require(`../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query-assigned-nodes.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/decorators.cjs`);const r=require(`../../_virtual/_@oxc-project_runtime@0.122.0/helpers/decorate.cjs`),i=require(`../base/UiKitElement.cjs`),a=require(`../../
|
|
1
|
+
const e=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.cjs`);const t=require(`../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.cjs`),n=require(`../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query-assigned-nodes.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/decorators.cjs`);const r=require(`../../_virtual/_@oxc-project_runtime@0.122.0/helpers/decorate.cjs`),i=require(`../base/UiKitElement.cjs`),a=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/static.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/static-html.cjs`);const o=require(`../../decorators/customUiKitElement.cjs`),s=require(`../../utils/booleanConverter.cjs`),c=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/directives/class-map.cjs`);const l=require(`../../mixins/ViewportMixin.cjs`),u=require(`../../utils/objectConverter.cjs`),d=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/style-map.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/directives/style-map.cjs`);const f=require(`./styles/common.styles.cjs`);var p=new Set([`span`,`p`,`strong`,`em`,`small`,`label`,`div`,`h1`,`h2`,`h3`,`h4`,`h5`,`h6`]),m=class extends l.ViewportMixin(i.UiKitElement){constructor(...e){super(...e),this.size=`medium`,this.weight=`regular`,this.variant=`body`,this.htmlTagName=`span`,this.mode=`light`}static{this.styles=[f.commonStyles]}get classes(){let e=typeof this.size==`string`?this.size:this.size[this.viewport];return{container:!0,[`size-${e}`]:!!e,[`mode-${this.mode}`]:!!this.mode,[`weight-${this.weight}`]:!!this.weight,[`variant-${this.variant}`]:!!this.variant,"display-contents":this.slotedNodes?.some?.(e=>e.nodeType!==Node.TEXT_NODE),uppercase:this.uppercase}}render(){let t=(this.htmlTagName??``).toLowerCase(),n=a.s(p.has(t)?t:`span`);return a.u`
|
|
2
2
|
<${n}
|
|
3
3
|
part="container"
|
|
4
4
|
data-testid="ds-text-container"
|
|
5
|
-
class=${
|
|
5
|
+
class=${c.e(this.classes)}
|
|
6
6
|
style=${d.o({color:this.color||`var(--ui-kit-text-color)`})}
|
|
7
7
|
>
|
|
8
8
|
${this.value?this.value:e.E}
|
|
9
9
|
<slot></slot>
|
|
10
10
|
</${n}>
|
|
11
|
-
`}};r.__decorate([t.n({type:String,converter:u.objectConverter})],m.prototype,`size`,void 0),r.__decorate([t.n({type:String})],m.prototype,`weight`,void 0),r.__decorate([t.n({type:String})],m.prototype,`variant`,void 0),r.__decorate([t.n({type:String,attribute:`html-tag-name`})],m.prototype,`htmlTagName`,void 0),r.__decorate([t.n({type:String})],m.prototype,`value`,void 0),r.__decorate([t.n({type:String,reflect:!0})],m.prototype,`mode`,void 0),r.__decorate([t.n({type:String,reflect:!0})],m.prototype,`color`,void 0),r.__decorate([t.n({type:Boolean,converter:
|
|
11
|
+
`}};r.__decorate([t.n({type:String,converter:u.objectConverter})],m.prototype,`size`,void 0),r.__decorate([t.n({type:String})],m.prototype,`weight`,void 0),r.__decorate([t.n({type:String})],m.prototype,`variant`,void 0),r.__decorate([t.n({type:String,attribute:`html-tag-name`})],m.prototype,`htmlTagName`,void 0),r.__decorate([t.n({type:String})],m.prototype,`value`,void 0),r.__decorate([t.n({type:String,reflect:!0})],m.prototype,`mode`,void 0),r.__decorate([t.n({type:String,reflect:!0})],m.prototype,`color`,void 0),r.__decorate([t.n({type:Boolean,converter:s.booleanConverter,reflect:!0})],m.prototype,`uppercase`,void 0),r.__decorate([n.n({slot:``,flatten:!0})],m.prototype,`slotedNodes`,void 0),m=r.__decorate([o.customUiKitElement(`ds-text`)],m);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
const e=require(`../../node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/decorators/provide.cjs`),t=require(`./themeContext.cjs`),n=require(`../../core/theme.constants.cjs`),r=require(`../../utils/PubSub.cjs`),i=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs`),a=require(`../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.cjs`);const o=require(`../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.cjs`),s=require(`../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/decorators.cjs`);const c=require(`../../_virtual/_@oxc-project_runtime@0.122.0/helpers/decorate.cjs`),l=require(`../../decorators/customUiKitElement.cjs`),u=require(`../../utils/booleanConverter.cjs`),d=require(`../../styles/source/shared/fonts-config.cjs`);var f=class extends a.i{constructor(...e){super(...e),this.loadFonts=!0,this.loadStyles=!0,this.cssLoaded=!1,this.loadedFonts=new Set}updated(e){super.updated(e),e.has(`theme`)&&(r.pubSub.publish(`theme`,this.theme),sessionStorage?.setItem(n.THEME_STORAGE_KEY,this.theme),typeof FontFace<`u`&&document?.fonts&&this.loadThemeFonts(),this.loadThemeStyles().then(()=>{this.cssLoaded=!0,this.dispatchEvent(new CustomEvent(`ui-kit:ready`,{bubbles:!0,composed:!0}))}))}loadThemeFonts(){d.fontsConfig[this.theme]?.fonts.forEach(e=>{this.loadThemeFont(e)})}async loadThemeFont({weight:e,name:t,file:n}){if(!this.loadFonts)return Promise.resolve();let r=`${t}-${e}`;if(this.loadedFonts.has(r))return;let i=new FontFace(t,`url('https://ds-assets.cupra.com/fonts/${this.theme}/${n}.woff2') format('woff2'),
|
|
2
2
|
url('https://ds-assets.cupra.com/fonts/${this.theme}/${n}.woff') format('woff'),
|
|
3
3
|
url('https://ds-assets.cupra.com/fonts/${this.theme}/${n}.ttf') format('truetype'),
|
|
4
|
-
url('https://ds-assets.cupra.com/fonts/${this.theme}/${n}.otf') format('opentype')`,{style:`normal`,weight:e,display:`swap`});try{await i.load(),document.fonts.add(i),this.loadedFonts.add(r)}catch(n){console.error(`Error loading "${t}" font with "${e}" weight:`,n)}}loadThemeStyles(){return this.loadStyles?new Promise((e,t)=>{let n=`/2.0.0-canary.
|
|
4
|
+
url('https://ds-assets.cupra.com/fonts/${this.theme}/${n}.otf') format('opentype')`,{style:`normal`,weight:e,display:`swap`});try{await i.load(),document.fonts.add(i),this.loadedFonts.add(r)}catch(n){console.error(`Error loading "${t}" font with "${e}" weight:`,n)}}loadThemeStyles(){return this.loadStyles?new Promise((e,t)=>{let n=`/2.0.0-canary.115`,r=`https://ds-assets.cupra.com${n}/styles/${this.theme}/theme.css`;if(document.head.querySelector(`link[href="${r}"]`))e();else{let i=`ui-kit-theme-${n}`,a=document.getElementById(i),o=document.createElement(`link`);o.id=i,o.rel=`stylesheet`,o.href=r,o.onload=()=>e(),o.onerror=()=>t(Error(`Failed to load theme CSS: ${r}`)),document.head.appendChild(o),a?.remove()}}):Promise.resolve()}render(){return this.cssLoaded?i.x`<slot></slot>`:i.E}};c.__decorate([o.n({type:Boolean,converter:u.booleanConverter,attribute:`load-fonts`})],f.prototype,`loadFonts`,void 0),c.__decorate([o.n({type:Boolean,converter:u.booleanConverter,attribute:`load-styles`})],f.prototype,`loadStyles`,void 0),c.__decorate([e.e({context:t.themeContext}),o.n({type:String})],f.prototype,`theme`,void 0),c.__decorate([s.r()],f.prototype,`cssLoaded`,void 0),c.__decorate([s.r()],f.prototype,`loadedFonts`,void 0),f=c.__decorate([l.customUiKitElement(`ds-theme-provider`)],f);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../utils/componentFactory.cjs`);function
|
|
1
|
+
const e=require(`../utils/version.cjs`),t=require(`../utils/componentFactory.cjs`);function n(n,r){return function(i){if(!i?.prototype)throw TypeError(`@customUiKitElement requires a class that extends HTMLElement.`);let a=`${n}${e.VERSION_TAG_SUFFIX}`;if(globalThis?.customElements?.get(a))return;let o=r?.skipTagAsComponentName?[]:[n];Array.isArray(r?.extendComponentNames)&&(o=[...r.extendComponentNames,...o]),globalThis?.customElements?.define?.(a,class extends i{constructor(...e){super(...e),this.componentFactory=t.reactFactory}static{this.componentName=o}connectedCallback(){i.prototype.connectedCallback?.call(this),this.setAttribute(`data-ui-kit-version`,`2.0.0-canary.115`)}})}}exports.customUiKitElement=n;
|
package/dist-react/cjs/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`})
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./utils/version.cjs`);require(`./components/index.cjs`);const t=require(`./components/ds-icon/iconNames.cjs`);exports.VERSION=e.VERSION,exports.VERSION_TAG_SUFFIX=e.VERSION_TAG_SUFFIX,exports.iconNames=t.iconNames;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../core/theme.constants.cjs`),t=require(`./PubSub.cjs`);var n=class{constructor(){this.icons={},this.handleChangeTheme=e=>{if(this.theme===e)return;this.theme=e;let t=Object.keys(this.icons);this.icons={},t.forEach(e=>this.fetchIcon(e))},this.fetchIcon=async(t,n={})=>{let r=typeof sessionStorage<`u`?sessionStorage?.getItem(e.THEME_STORAGE_KEY):null;!this.theme&&r&&(this.theme=r);let i=this.icons[t];if(i)return await i;let a=this.loadIcon(t,n).catch(e=>{throw delete this.icons[t],e});return this.icons[t]=a,a},this.loadIcon=(e,{cache:t=`force-cache`,...n})=>!this.theme||typeof fetch>`u`?Promise.resolve(`<svg class="ds-icon"></svg>`):fetch(`https://ds-assets.cupra.com/icons/${this.theme}/${e}.svg`,{cache:t,...n}).then(e=>e.text()).catch(t=>{if(t?.name===`AbortError`)throw t;return console.error(`Failed to fetch icon "${e}":`,t),``}),t.pubSub.subscribe(`theme`,this.handleChangeTheme)}},r=Symbol.for(`@cupra/ui-kit/icons-manager/2.0.0-canary.
|
|
1
|
+
const e=require(`../core/theme.constants.cjs`),t=require(`./PubSub.cjs`);var n=class{constructor(){this.icons={},this.handleChangeTheme=e=>{if(this.theme===e)return;this.theme=e;let t=Object.keys(this.icons);this.icons={},t.forEach(e=>this.fetchIcon(e))},this.fetchIcon=async(t,n={})=>{let r=typeof sessionStorage<`u`?sessionStorage?.getItem(e.THEME_STORAGE_KEY):null;!this.theme&&r&&(this.theme=r);let i=this.icons[t];if(i)return await i;let a=this.loadIcon(t,n).catch(e=>{throw delete this.icons[t],e});return this.icons[t]=a,a},this.loadIcon=(e,{cache:t=`force-cache`,...n})=>!this.theme||typeof fetch>`u`?Promise.resolve(`<svg class="ds-icon"></svg>`):fetch(`https://ds-assets.cupra.com/icons/${this.theme}/${e}.svg`,{cache:t,...n}).then(e=>e.text()).catch(t=>{if(t?.name===`AbortError`)throw t;return console.error(`Failed to fetch icon "${e}":`,t),``}),t.pubSub.subscribe(`theme`,this.handleChangeTheme)}},r=Symbol.for(`@cupra/ui-kit/icons-manager/2.0.0-canary.115`),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.115`),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.115/styles/${n}/components/${t}.css`,i=this.getCachedStyleSheetPromise({url:r});if(i)return i;let a=e(()=>this.fetchStyle({url:r})).then(e=>(e||this.stylePromises.delete(r),e));return this.stylePromises.set(r,a),this.stylePromises.get(r)}}async fetchStyle({url:e}){try{if(typeof fetch>`u`)return;let t=await fetch(e,{cache:`force-cache`});if(t.ok)return t.text()}catch(t){console.error(`Failed to fetch Style Sheet "${e}":`,t)}}getCachedStyleSheetPromise({url:e}){return this.stylePromises.get(e)}static getInstance(){return t.instance||=new t,t.instance}}.getInstance();exports.stylesRegistry=t;
|
|
@@ -1,117 +1,118 @@
|
|
|
1
|
-
const e=require(`../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/
|
|
2
|
-
|
|
3
|
-
class=${
|
|
4
|
-
data-testid=${
|
|
5
|
-
@click=${
|
|
6
|
-
@keydown=${
|
|
7
|
-
icon-name=${
|
|
8
|
-
color=${
|
|
9
|
-
background-color=${
|
|
10
|
-
size=${
|
|
11
|
-
aria-label=${
|
|
12
|
-
aria-hidden=${
|
|
13
|
-
role=${
|
|
14
|
-
tabindex=${
|
|
1
|
+
require(`../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.cjs`);const e=require(`../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/if-defined.cjs`);require(`../node_modules/.pnpm/lit@3.3.1/node_modules/lit/directives/if-defined.cjs`);const t=require(`../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/static.cjs`);require(`../node_modules/.pnpm/lit@3.3.1/node_modules/lit/static-html.cjs`);const n=require(`./version.cjs`);var r=t.s(`ds-icon${n.VERSION_TAG_SUFFIX}`),i=t.s(`ds-calendar-day${n.VERSION_TAG_SUFFIX}`),a=t.s(`ds-button${n.VERSION_TAG_SUFFIX}`),o=t.s(`ds-divider${n.VERSION_TAG_SUFFIX}`),s=t.s(`ds-icon-button${n.VERSION_TAG_SUFFIX}`),c=t.s(`ds-loader-spinner${n.VERSION_TAG_SUFFIX}`),l=t.s(`ds-skeleton${n.VERSION_TAG_SUFFIX}`),u=t.s(`ds-toast-message${n.VERSION_TAG_SUFFIX}`),d=t.s(`ds-inline-alert${n.VERSION_TAG_SUFFIX}`),f=t.s(`ds-tooltip${n.VERSION_TAG_SUFFIX}`),p={createIcon:i=>(m(`ds-icon${n.VERSION_TAG_SUFFIX}`,()=>Promise.resolve().then(()=>require(`../components/ds-icon/ds-icon.cjs`))),t.u`
|
|
2
|
+
<${r}
|
|
3
|
+
class=${e.o(i?.class)}
|
|
4
|
+
data-testid=${e.o(i?.[`data-testid`])}
|
|
5
|
+
@click=${i?.[`@click`]}
|
|
6
|
+
@keydown=${i?.[`@keydown`]}
|
|
7
|
+
icon-name=${i?.[`icon-name`]}
|
|
8
|
+
color=${e.o(i?.color)}
|
|
9
|
+
background-color=${e.o(i?.[`background-color`])}
|
|
10
|
+
size=${e.o(i?.size)}
|
|
11
|
+
aria-label=${e.o(i?.[`aria-label`])}
|
|
12
|
+
aria-hidden=${e.o(i?.[`aria-hidden`])}
|
|
13
|
+
role=${e.o(i?.role)}
|
|
14
|
+
tabindex=${e.o(i?.tabindex)}
|
|
15
15
|
>
|
|
16
|
-
${
|
|
17
|
-
|
|
18
|
-
`),createCalendarDay:(
|
|
19
|
-
|
|
20
|
-
class=${
|
|
21
|
-
day=${
|
|
22
|
-
size=${
|
|
23
|
-
?disabled=${
|
|
24
|
-
?selected=${
|
|
25
|
-
?today=${
|
|
26
|
-
?outside-month=${
|
|
27
|
-
data-testid=${
|
|
28
|
-
|
|
29
|
-
`),createButton:(
|
|
30
|
-
|
|
31
|
-
class=${
|
|
32
|
-
@click=${
|
|
33
|
-
.size=${
|
|
34
|
-
type=${
|
|
35
|
-
icon-position=${
|
|
36
|
-
.rounded=${
|
|
37
|
-
.full-width=${
|
|
38
|
-
variant=${
|
|
39
|
-
mode=${
|
|
40
|
-
.disabled=${
|
|
41
|
-
icon-name=${
|
|
42
|
-
html-tag-name=${
|
|
43
|
-
href=${
|
|
44
|
-
rel=${
|
|
45
|
-
target=${
|
|
46
|
-
data-testid=${
|
|
16
|
+
${i.children}
|
|
17
|
+
</${r}>
|
|
18
|
+
`),createCalendarDay:(r={})=>(m(`ds-calendar-day${n.VERSION_TAG_SUFFIX}`,()=>Promise.resolve().then(()=>require(`../components/ds-calendar-day/ds-calendar-day.cjs`))),t.u`
|
|
19
|
+
<${i}
|
|
20
|
+
class=${e.o(r?.class)}
|
|
21
|
+
day=${e.o(r?.day)}
|
|
22
|
+
size=${e.o(r?.size)}
|
|
23
|
+
?disabled=${r?.disabled}
|
|
24
|
+
?selected=${r?.selected}
|
|
25
|
+
?today=${r?.today}
|
|
26
|
+
?outside-month=${r?.[`outside-month`]}
|
|
27
|
+
data-testid=${e.o(r?.[`data-testid`])}
|
|
28
|
+
></${i}>
|
|
29
|
+
`),createButton:(r={})=>(m(`ds-button${n.VERSION_TAG_SUFFIX}`,()=>Promise.resolve().then(()=>require(`../components/ds-button/ds-button.cjs`))),t.u`
|
|
30
|
+
<${a}
|
|
31
|
+
class=${r?.class}
|
|
32
|
+
@click=${r?.[`@click`]}
|
|
33
|
+
.size=${e.o(r?.size)}
|
|
34
|
+
type=${r?.type}
|
|
35
|
+
icon-position=${r?.[`icon-position`]}
|
|
36
|
+
.rounded=${r?.rounded}
|
|
37
|
+
.full-width=${r?.[`full-width`]}
|
|
38
|
+
variant=${r?.variant??`primary`}
|
|
39
|
+
mode=${r?.mode??`light`}
|
|
40
|
+
.disabled=${r?.disabled}
|
|
41
|
+
icon-name=${r?.[`icon-name`]}
|
|
42
|
+
html-tag-name=${r?.[`html-tag-name`]}
|
|
43
|
+
href=${r?.href}
|
|
44
|
+
rel=${r?.rel}
|
|
45
|
+
target=${r?.target}
|
|
46
|
+
data-testid=${r?.[`data-testid`]}
|
|
47
47
|
>
|
|
48
|
-
${
|
|
49
|
-
|
|
50
|
-
`),createDivider:(
|
|
51
|
-
|
|
52
|
-
class=${
|
|
53
|
-
variant=${
|
|
54
|
-
orientation=${
|
|
55
|
-
data-testid=${
|
|
48
|
+
${r.children}
|
|
49
|
+
</${a}>
|
|
50
|
+
`),createDivider:(e={})=>(m(`ds-divider${n.VERSION_TAG_SUFFIX}`,()=>Promise.resolve().then(()=>require(`../components/ds-divider/ds-divider.cjs`))),t.u`
|
|
51
|
+
<${o}
|
|
52
|
+
class=${e?.class}
|
|
53
|
+
variant=${e?.variant??`primary`}
|
|
54
|
+
orientation=${e?.orientation??`horizontal`}
|
|
55
|
+
data-testid=${e?.[`data-testid`]}
|
|
56
56
|
>
|
|
57
|
-
|
|
58
|
-
`),createIconButton:(
|
|
59
|
-
|
|
60
|
-
class=${
|
|
61
|
-
@click=${
|
|
62
|
-
size=${
|
|
63
|
-
variant=${
|
|
64
|
-
mode=${
|
|
65
|
-
.disabled=${
|
|
66
|
-
icon-name=${
|
|
67
|
-
html-tag-name=${
|
|
68
|
-
href=${
|
|
69
|
-
rel=${
|
|
70
|
-
target=${
|
|
71
|
-
data-testid=${
|
|
72
|
-
data-aria-label=${
|
|
57
|
+
</${o}>
|
|
58
|
+
`),createIconButton:(r={})=>(m(`ds-icon-button${n.VERSION_TAG_SUFFIX}`,()=>Promise.resolve().then(()=>require(`../components/ds-icon-button/ds-icon-button.cjs`))),t.u`
|
|
59
|
+
<${s}
|
|
60
|
+
class=${r?.class}
|
|
61
|
+
@click=${r?.[`@click`]}
|
|
62
|
+
size=${e.o(r?.size)}
|
|
63
|
+
variant=${r?.variant??`primary`}
|
|
64
|
+
mode=${r?.mode??`light`}
|
|
65
|
+
.disabled=${r?.disabled}
|
|
66
|
+
icon-name=${r?.[`icon-name`]}
|
|
67
|
+
html-tag-name=${r?.[`html-tag-name`]}
|
|
68
|
+
href=${r?.href}
|
|
69
|
+
rel=${r?.rel}
|
|
70
|
+
target=${r?.target}
|
|
71
|
+
data-testid=${r?.[`data-testid`]}
|
|
72
|
+
data-aria-label=${r?.[`data-aria-label`]}
|
|
73
73
|
>
|
|
74
|
-
${
|
|
75
|
-
|
|
76
|
-
`),createLoaderSpinner:(
|
|
77
|
-
|
|
78
|
-
?show=${
|
|
79
|
-
orientation=${
|
|
80
|
-
mode=${
|
|
81
|
-
|
|
82
|
-
`),createSkeleton:(
|
|
83
|
-
|
|
84
|
-
class=${
|
|
85
|
-
data-testid=${
|
|
86
|
-
variant=${
|
|
87
|
-
width=${
|
|
88
|
-
height=${
|
|
89
|
-
animation=${
|
|
90
|
-
|
|
91
|
-
`),createToastMessage:
|
|
92
|
-
|
|
93
|
-
data-id="${
|
|
94
|
-
data-template="${
|
|
95
|
-
title="${
|
|
96
|
-
text="${
|
|
97
|
-
status="${
|
|
98
|
-
|
|
99
|
-
`),createInlineAlert:
|
|
100
|
-
|
|
101
|
-
title="${
|
|
102
|
-
text="${
|
|
103
|
-
status="${
|
|
104
|
-
?show=${
|
|
105
|
-
|
|
106
|
-
`),createTooltip:(
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
?
|
|
111
|
-
?disable-
|
|
112
|
-
?disable-
|
|
74
|
+
${r.children}
|
|
75
|
+
</${s}>
|
|
76
|
+
`),createLoaderSpinner:(e={})=>(m(`ds-loader-spinner${n.VERSION_TAG_SUFFIX}`,()=>Promise.resolve().then(()=>require(`../components/ds-loader-spinner/ds-loader-spinner.cjs`))),t.u`
|
|
77
|
+
<${c}
|
|
78
|
+
?show=${e?.show}
|
|
79
|
+
orientation=${e?.orientation??`row`}
|
|
80
|
+
mode=${e?.mode??`light`}
|
|
81
|
+
></${c}>
|
|
82
|
+
`),createSkeleton:(r={})=>(m(`ds-skeleton${n.VERSION_TAG_SUFFIX}`,()=>Promise.resolve().then(()=>require(`../components/ds-skeleton/ds-skeleton.cjs`))),t.u`
|
|
83
|
+
<${l}
|
|
84
|
+
class=${e.o(r?.class)}
|
|
85
|
+
data-testid=${e.o(r?.[`data-testid`])}
|
|
86
|
+
variant=${e.o(r?.variant)}
|
|
87
|
+
width=${e.o(r?.width)}
|
|
88
|
+
height=${e.o(r?.height)}
|
|
89
|
+
animation=${e.o(r?.animation)}
|
|
90
|
+
></${l}>
|
|
91
|
+
`),createToastMessage:e=>(m(`ds-toast-message${n.VERSION_TAG_SUFFIX}`,()=>Promise.resolve().then(()=>require(`../components/ds-toast-message/ds-toast-message.cjs`))),t.u`
|
|
92
|
+
<${u}
|
|
93
|
+
data-id="${e[`data-id`]}"
|
|
94
|
+
data-template="${e[`data-template`]}"
|
|
95
|
+
title="${e.title}"
|
|
96
|
+
text="${e.text}"
|
|
97
|
+
status="${e.status}"
|
|
98
|
+
></${u}>
|
|
99
|
+
`),createInlineAlert:e=>(m(`ds-inline-alert${n.VERSION_TAG_SUFFIX}`,()=>Promise.resolve().then(()=>require(`../components/ds-inline-alert/ds-inline-alert.cjs`))),t.u`
|
|
100
|
+
<${d}
|
|
101
|
+
title="${e.title}"
|
|
102
|
+
text="${e.text}"
|
|
103
|
+
status="${e.status}"
|
|
104
|
+
?show=${e.show??!0}
|
|
105
|
+
></${d}>
|
|
106
|
+
`),createTooltip:(r={})=>(m(`ds-tooltip${n.VERSION_TAG_SUFFIX}`,()=>Promise.resolve().then(()=>require(`../components/ds-tooltip/ds-tooltip.cjs`))),t.u`
|
|
107
|
+
<${f}
|
|
108
|
+
class=${e.o(r?.class)}
|
|
109
|
+
mode=${e.o(r.mode)}
|
|
110
|
+
?show=${r.show??!1}
|
|
111
|
+
?disable-hover-listener=${r?.[`disable-hover-listener`]}
|
|
112
|
+
?disable-focus-listener=${r?.[`disable-focus-listener`]}
|
|
113
|
+
?disable-press-listener=${r?.[`disable-press-listener`]}
|
|
113
114
|
>
|
|
114
|
-
${
|
|
115
|
-
<div slot="content">${
|
|
116
|
-
|
|
117
|
-
`)};function
|
|
115
|
+
${r.children}
|
|
116
|
+
<div slot="content">${r.content}</div>
|
|
117
|
+
</${f}>
|
|
118
|
+
`)};function m(e,t){try{typeof window<`u`&&typeof customElements<`u`&&!customElements.get(e)&&t().catch(e=>{})}catch{}}exports.reactFactory=p;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.cjs`);require(`../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.cjs`);function t(t,...n){return e.i`${e.r(String.raw({raw:t},...n).replace(/(--private-[\w-]+)(?=\s*[):,])/g,`$1-v2-0-0-canary-
|
|
1
|
+
const e=require(`../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.cjs`);require(`../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.cjs`);function t(t,...n){return e.i`${e.r(String.raw({raw:t},...n).replace(/(--private-[\w-]+)(?=\s*[):,])/g,`$1-v2-0-0-canary-115`))}`}exports.cssWithTokens=t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs`);require(`../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.cjs`);const t=require(`../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/unsafe-html.cjs`);require(`../node_modules/.pnpm/lit@3.3.1/node_modules/lit/directives/unsafe-html.cjs`);function n(n,...r){return e.x`${t.o(String.raw({raw:n},...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g,`$1-v2-0-0-canary-
|
|
1
|
+
const e=require(`../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs`);require(`../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.cjs`);const t=require(`../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/unsafe-html.cjs`);require(`../node_modules/.pnpm/lit@3.3.1/node_modules/lit/directives/unsafe-html.cjs`);function n(n,...r){return e.x`${t.o(String.raw({raw:n},...r).replace(/(--private-[\w-]+)(?=\s*[):,])/g,`$1-v2-0-0-canary-115`))}`}exports.htmlWithTokens=n;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=`2.0.0-canary.115`,t=`--v${e.replaceAll(`.`,`-`)}`;exports.VERSION=e,exports.VERSION_TAG_SUFFIX=t;
|
|
@@ -6,9 +6,9 @@ import { __decorate as n } from "../../_virtual/_@oxc-project_runtime@0.122.0/he
|
|
|
6
6
|
import { UiKitElement as r } from "../base/UiKitElement.js";
|
|
7
7
|
import { o as i } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/if-defined.js";
|
|
8
8
|
import "../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/directives/if-defined.js";
|
|
9
|
-
import {
|
|
10
|
-
import { s as o, u as s } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/static.js";
|
|
9
|
+
import { s as a, u as o } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/static.js";
|
|
11
10
|
import "../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/static-html.js";
|
|
11
|
+
import { customUiKitElement as s } from "../../decorators/customUiKitElement.js";
|
|
12
12
|
import "../ds-breadcrumbs-item/ds-breadcrumbs-item.js";
|
|
13
13
|
//#region src/components/ds-breadcrumbs/ds-breadcrumbs.ts
|
|
14
14
|
var c = [{
|
|
@@ -50,24 +50,24 @@ var c = [{
|
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
52
|
itemTemplate(t, n) {
|
|
53
|
-
let r = t.selected || n, i =
|
|
54
|
-
return
|
|
53
|
+
let r = t.selected || n, i = a(this.itemTag), s = r || t.disabled || !t.href ? o`<span slot="item">${t.label}</span>` : o`<a href=${t.href} slot="item">${t.label}</a>`;
|
|
54
|
+
return o`<li class="breadcrumb-list-item">
|
|
55
55
|
<${i}
|
|
56
56
|
?selected=${r}
|
|
57
57
|
?disabled=${t.disabled}
|
|
58
58
|
?loading=${t.loading}
|
|
59
59
|
>
|
|
60
|
-
${
|
|
60
|
+
${s}
|
|
61
61
|
</${i}>
|
|
62
62
|
${n ? e : this.separatorIcon}
|
|
63
63
|
</li>`;
|
|
64
64
|
}
|
|
65
65
|
get slotTemplate() {
|
|
66
|
-
return
|
|
66
|
+
return o`<slot @slotchange=${this.handleSlotChange} style="display: none;"></slot>`;
|
|
67
67
|
}
|
|
68
68
|
get overflowMenuTemplate() {
|
|
69
|
-
return
|
|
70
|
-
${this.items.slice(1, this.items.length - (this.maxItems - 2)).map((e) =>
|
|
69
|
+
return o`<ul class="overflow-menu" role="menu">
|
|
70
|
+
${this.items.slice(1, this.items.length - (this.maxItems - 2)).map((e) => o`
|
|
71
71
|
<li class="overflow-menu-item" role="none">
|
|
72
72
|
<a href=${i(e.href)} class="overflow-menu-link" role="menuitem">${e.label}</a>
|
|
73
73
|
</li>
|
|
@@ -75,12 +75,13 @@ var c = [{
|
|
|
75
75
|
</ul>`;
|
|
76
76
|
}
|
|
77
77
|
get overflowTriggerTemplate() {
|
|
78
|
-
return
|
|
78
|
+
return o`<button class="overflow-trigger">
|
|
79
79
|
<span class="overflow-label">...</span>
|
|
80
80
|
</button>`;
|
|
81
81
|
}
|
|
82
82
|
get tooltipTemplate() {
|
|
83
83
|
return this.componentFactory.createTooltip({
|
|
84
|
+
class: "breadcrumbs-tooltip",
|
|
84
85
|
content: this.overflowMenuTemplate,
|
|
85
86
|
children: this.overflowTriggerTemplate
|
|
86
87
|
});
|
|
@@ -89,7 +90,7 @@ var c = [{
|
|
|
89
90
|
let { items: e, maxItems: t } = this;
|
|
90
91
|
if (e.length <= t) return e.map((t, n) => this.itemTemplate(t, n === e.length - 1));
|
|
91
92
|
let n = e.slice(e.length - (t - 2));
|
|
92
|
-
return
|
|
93
|
+
return o`
|
|
93
94
|
${this.itemTemplate(e[0], !1)}
|
|
94
95
|
<li class="breadcrumb-list-item">
|
|
95
96
|
<div class="overflow-item-wrapper">
|
|
@@ -101,7 +102,7 @@ var c = [{
|
|
|
101
102
|
`;
|
|
102
103
|
}
|
|
103
104
|
render() {
|
|
104
|
-
return
|
|
105
|
+
return o`
|
|
105
106
|
${this.slotTemplate}
|
|
106
107
|
<nav class="container" aria-label="Breadcrumb">
|
|
107
108
|
<ol class="breadcrumb-list">
|
|
@@ -111,5 +112,5 @@ var c = [{
|
|
|
111
112
|
`;
|
|
112
113
|
}
|
|
113
114
|
};
|
|
114
|
-
n([t()], u.prototype, "items", void 0), n([t()], u.prototype, "maxItems", void 0), n([t()], u.prototype, "itemTag", void 0), u = n([
|
|
115
|
+
n([t()], u.prototype, "items", void 0), n([t()], u.prototype, "maxItems", void 0), n([t()], u.prototype, "itemTag", void 0), u = n([s("ds-breadcrumbs")], u);
|
|
115
116
|
//#endregion
|
|
@@ -33,18 +33,13 @@ var u, d = class extends c(a) {
|
|
|
33
33
|
this.nativeStylesInjected = !1;
|
|
34
34
|
}
|
|
35
35
|
connectedCallback() {
|
|
36
|
-
super.connectedCallback(), document.addEventListener("click", this.handleDocumentClick), this.addEventListener("ds-calendar-change", this.handleCalendarChange), u.injectNativeInputStyles();
|
|
36
|
+
super.connectedCallback(), this.classList.add("ds-date-picker"), document.addEventListener("click", this.handleDocumentClick), this.addEventListener("ds-calendar-change", this.handleCalendarChange), u.injectNativeInputStyles();
|
|
37
37
|
}
|
|
38
38
|
static injectNativeInputStyles() {
|
|
39
39
|
if (u.nativeStylesInjected) return;
|
|
40
40
|
u.nativeStylesInjected = !0;
|
|
41
41
|
let e = document.createElement("style");
|
|
42
|
-
e.
|
|
43
|
-
"ds-date-picker input[type=\"date\"]::-webkit-calendar-picker-indicator { display: none !important; }",
|
|
44
|
-
"ds-date-picker input[type=\"date\"]::-webkit-inner-spin-button { display: none !important; }",
|
|
45
|
-
"ds-date-picker-react input[type=\"date\"]::-webkit-calendar-picker-indicator { display: none !important; }",
|
|
46
|
-
"ds-date-picker-react input[type=\"date\"]::-webkit-inner-spin-button { display: none !important; }"
|
|
47
|
-
].join("\n"), document.head.appendChild(e);
|
|
42
|
+
e.textContent = [".ds-date-picker input[type=\"date\"]::-webkit-calendar-picker-indicator { display: none !important; }", ".ds-date-picker input[type=\"date\"]::-webkit-inner-spin-button { display: none !important; }"].join("\n"), document.head.appendChild(e);
|
|
48
43
|
}
|
|
49
44
|
disconnectedCallback() {
|
|
50
45
|
super.disconnectedCallback(), document.removeEventListener("click", this.handleDocumentClick), this.removeEventListener("ds-calendar-change", this.handleCalendarChange);
|
|
@@ -5,12 +5,12 @@ import { n } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_mod
|
|
|
5
5
|
import "../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/decorators.js";
|
|
6
6
|
import { __decorate as r } from "../../_virtual/_@oxc-project_runtime@0.122.0/helpers/decorate.js";
|
|
7
7
|
import { UiKitElement as i } from "../base/UiKitElement.js";
|
|
8
|
-
import {
|
|
9
|
-
import { booleanConverter as o } from "../../utils/booleanConverter.js";
|
|
10
|
-
import { e as s } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js";
|
|
11
|
-
import "../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/directives/class-map.js";
|
|
12
|
-
import { s as c, u as l } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/static.js";
|
|
8
|
+
import { s as a, u as o } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/static.js";
|
|
13
9
|
import "../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/static-html.js";
|
|
10
|
+
import { customUiKitElement as s } from "../../decorators/customUiKitElement.js";
|
|
11
|
+
import { booleanConverter as c } from "../../utils/booleanConverter.js";
|
|
12
|
+
import { e as l } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js";
|
|
13
|
+
import "../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/directives/class-map.js";
|
|
14
14
|
import { ViewportMixin as u } from "../../mixins/ViewportMixin.js";
|
|
15
15
|
import { objectConverter as d } from "../../utils/objectConverter.js";
|
|
16
16
|
import { o as f } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/style-map.js";
|
|
@@ -51,12 +51,12 @@ var m = new Set([
|
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
53
|
render() {
|
|
54
|
-
let t = (this.htmlTagName ?? "").toLowerCase(), n =
|
|
55
|
-
return
|
|
54
|
+
let t = (this.htmlTagName ?? "").toLowerCase(), n = a(m.has(t) ? t : "span");
|
|
55
|
+
return o`
|
|
56
56
|
<${n}
|
|
57
57
|
part="container"
|
|
58
58
|
data-testid="ds-text-container"
|
|
59
|
-
class=${
|
|
59
|
+
class=${l(this.classes)}
|
|
60
60
|
style=${f({ color: this.color || "var(--ui-kit-text-color)" })}
|
|
61
61
|
>
|
|
62
62
|
${this.value ? this.value : e}
|
|
@@ -79,10 +79,10 @@ r([t({
|
|
|
79
79
|
reflect: !0
|
|
80
80
|
})], h.prototype, "color", void 0), r([t({
|
|
81
81
|
type: Boolean,
|
|
82
|
-
converter:
|
|
82
|
+
converter: c,
|
|
83
83
|
reflect: !0
|
|
84
84
|
})], h.prototype, "uppercase", void 0), r([n({
|
|
85
85
|
slot: "",
|
|
86
86
|
flatten: !0
|
|
87
|
-
})], h.prototype, "slotedNodes", void 0), h = r([
|
|
87
|
+
})], h.prototype, "slotedNodes", void 0), h = r([s("ds-text")], h);
|
|
88
88
|
//#endregion
|
|
@@ -50,7 +50,7 @@ var p = class extends o {
|
|
|
50
50
|
}
|
|
51
51
|
loadThemeStyles() {
|
|
52
52
|
return this.loadStyles ? new Promise((e, t) => {
|
|
53
|
-
let n = "/2.0.0-canary.
|
|
53
|
+
let n = "/2.0.0-canary.115", r = `https://ds-assets.cupra.com${n}/styles/${this.theme}/theme.css`;
|
|
54
54
|
if (document.head.querySelector(`link[href="${r}"]`)) e();
|
|
55
55
|
else {
|
|
56
56
|
let i = `ui-kit-theme-${n}`, a = document.getElementById(i), o = document.createElement("link");
|
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { VERSION_TAG_SUFFIX as e } from "../utils/version.js";
|
|
2
|
+
import { reactFactory as t } from "../utils/componentFactory.js";
|
|
2
3
|
//#region src/decorators/customUiKitElement.ts
|
|
3
|
-
function
|
|
4
|
-
return function(
|
|
5
|
-
if (!
|
|
6
|
-
let
|
|
7
|
-
if (globalThis?.customElements?.get(
|
|
8
|
-
let
|
|
9
|
-
Array.isArray(
|
|
10
|
-
constructor(...
|
|
11
|
-
super(...
|
|
4
|
+
function n(n, r) {
|
|
5
|
+
return function(i) {
|
|
6
|
+
if (!i?.prototype) throw TypeError("@customUiKitElement requires a class that extends HTMLElement.");
|
|
7
|
+
let a = `${n}${e}`;
|
|
8
|
+
if (globalThis?.customElements?.get(a)) return;
|
|
9
|
+
let o = r?.skipTagAsComponentName ? [] : [n];
|
|
10
|
+
Array.isArray(r?.extendComponentNames) && (o = [...r.extendComponentNames, ...o]), globalThis?.customElements?.define?.(a, class extends i {
|
|
11
|
+
constructor(...e) {
|
|
12
|
+
super(...e), this.componentFactory = t;
|
|
12
13
|
}
|
|
13
14
|
static {
|
|
14
|
-
this.componentName =
|
|
15
|
+
this.componentName = o;
|
|
15
16
|
}
|
|
16
17
|
connectedCallback() {
|
|
17
|
-
|
|
18
|
+
i.prototype.connectedCallback?.call(this), this.setAttribute("data-ui-kit-version", "2.0.0-canary.115");
|
|
18
19
|
}
|
|
19
20
|
});
|
|
20
21
|
};
|
|
21
22
|
}
|
|
22
23
|
//#endregion
|
|
23
|
-
export {
|
|
24
|
+
export { n as customUiKitElement };
|
package/dist-react/esm/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { VERSION as e, VERSION_TAG_SUFFIX as t } from "./utils/version.js";
|
|
1
2
|
import "./components/index.js";
|
|
2
|
-
import { iconNames as
|
|
3
|
-
export { e as iconNames };
|
|
3
|
+
import { iconNames as n } from "./components/ds-icon/iconNames.js";
|
|
4
|
+
export { e as VERSION, t as VERSION_TAG_SUFFIX, n as iconNames };
|
|
@@ -25,7 +25,7 @@ var n = class {
|
|
|
25
25
|
return console.error(`Failed to fetch icon "${e}":`, t), "";
|
|
26
26
|
}), t.subscribe("theme", this.handleChangeTheme);
|
|
27
27
|
}
|
|
28
|
-
}, r = Symbol.for("@cupra/ui-kit/icons-manager/2.0.0-canary.
|
|
28
|
+
}, r = Symbol.for("@cupra/ui-kit/icons-manager/2.0.0-canary.115"), i = globalThis, a = i[r];
|
|
29
29
|
a || (a = new n(), Object.defineProperty(i, r, {
|
|
30
30
|
value: a,
|
|
31
31
|
writable: !1,
|
|
@@ -18,7 +18,7 @@ var e = class {
|
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
|
-
}, t = Symbol.for("@cupra/ui-kit/pubsub/2.0.0-canary.
|
|
21
|
+
}, t = Symbol.for("@cupra/ui-kit/pubsub/2.0.0-canary.115"), 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.115/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);
|