@cupra/ui-kit 2.0.0-canary.157 → 2.0.0-canary.159
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-icon/iconNames.cjs +1 -1
- package/dist/cjs/components/ds-list-item/ds-list-item.cjs +4 -4
- package/dist/cjs/components/ds-slider/ds-slider.cjs +11 -11
- package/dist/cjs/components/ds-theme-provider/ds-theme-provider.cjs +2 -2
- 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-icon/iconNames.js +1 -1
- package/dist/esm/components/ds-list-item/ds-list-item.js +11 -10
- package/dist/esm/components/ds-slider/ds-slider.js +54 -53
- package/dist/esm/components/ds-theme-provider/ds-theme-provider.js +21 -8
- 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/types/components/ds-icon/Icons.type.d.ts +1 -1
- package/dist/types/components/ds-icon/iconNames.d.ts +1 -1
- package/dist/types/components/ds-slider/ds-slider.d.ts +2 -2
- package/dist/types/components/ds-theme-provider/ds-theme-provider.d.ts +2 -0
- package/dist/types/components/ds-theme-provider/ds-theme-provider.types.d.ts +1 -0
- package/dist-react/cjs/components/ds-icon/iconNames.cjs +1 -1
- package/dist-react/cjs/components/ds-list-item/ds-list-item.cjs +4 -4
- package/dist-react/cjs/components/ds-slider/ds-slider.cjs +11 -11
- package/dist-react/cjs/components/ds-theme-provider/ds-theme-provider.cjs +2 -2
- 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-icon/iconNames.js +1 -1
- package/dist-react/esm/components/ds-list-item/ds-list-item.js +11 -10
- package/dist-react/esm/components/ds-slider/ds-slider.js +54 -53
- package/dist-react/esm/components/ds-theme-provider/ds-theme-provider.js +21 -8
- 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/dist-react/types/components/ds-icon/Icons.type.d.ts +1 -1
- package/dist-react/types/components/ds-icon/iconNames.d.ts +1 -1
- package/dist-react/types/components/ds-slider/ds-slider.d.ts +2 -2
- package/dist-react/types/components/ds-theme-provider/ds-theme-provider.d.ts +2 -0
- package/dist-react/types/components/ds-theme-provider/ds-theme-provider.types.d.ts +1 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=`9-circles.ad-color.ae-color.af-color.ag-color.ai-color.al-color.am-color.an-color.ao-color.ar-color.arrow-down.arrow-down-line.arrow-download.arrow-exit.arrow-expand.arrow-external-link.arrow-left.arrow-left-line.arrow-reload.arrow-right.arrow-right-line.arrow-rotate-360.arrow-rotate-360-horizontal.arrow-switch.arrow-up.arrow-up-line.arrow-upload.at-color.au-color.aw-color.ax-color.az-color.b-color.ba-color.battery-g-4-01.battery-inclined-fill.battery-vertical-100.battery-2-sub-arrows-up.battery-3-sub-arrows-up.bb-color.bd-color.be-color.bell.bf-color.bg-color.bh-color.bi-color.bill.bin.bj-color.bm-color.bn-color.bo-color.book-mark.box.br-color.bs-color.bt-color.bw-color.by-color.bz-color.c-color.ca-color.cable.caf-color.calendar.camera.car-arrow-down.car-compare.car-door.car-frontal.car-imodel.car-in-window.car-lateral.car-model.car-seat.cart.cart-down.cas-color.cd-color.cercle-ribbon-check.ceu-color.cf-color.cg-color.ch-color.charger-acc.charger-type-2.chat-bubble.check.check-mark-circle.ci-color.city.cl-color.clock.cloud-co-2.cm-color.cn-color.cna-color.co-color.coc-color.computer-display.cr-color.credit-card.debit-card.cross.cross-circle.csa-color.cu-color.cv-color.cy-color.cz-color.de-color.dj-color.dk-color.dm-color.do-color.document.document-check.document-copy.document-download.document-time.dot.dz-color.ec-color.eco-color.ee-color.eg-color.electric-station.engine.envelope.equals-sign.er-color.es-color.et-color.eu-color.euro.exclamation-mark-circle.exclamation-mark-triangle.eye.eye-crossed-out.facebook.fi-color.filter.fj-color.fk-color.fm-color.fr-color.fuel-station.ga-color.garage.gb-color.gd-color.ge-color.gear.gg-color.gh-color.gi-color.globe.gm-color.gn-color.gq-color.gr-color.gt-color.gw-color.gy-color.half-star-filled.headlight.heart.heart-filled.highway.hk-color.hn-color.hr-color.ht-color.hu-color.id-color.ie-color.il-color.im-color.in-color.info-circle.info-triangle.instagram.iq-color.ir-color.is-color.it-color.je-color.jm-color.jo-color.jp-color.ke-color.key.kg-color.kh-color.km-color.kn-color.kp-color.kr-color.kw-color.ky-color.kz-color.la-color.label-a-color.label-b-color.label-c-color.label-d-color.label-e-color.label-f-color.label-g-color.label-h-color.label-i-color.label-j-color.label-k-color.label-l-color.label-m-color.lb-color.lc-color.li-color.light.lightning.link.linkedin.list.list-line.lk-color.loader.location-poi.lock-locked.lock-unlocked.logo.logo-light.logo-lockup.logo-wordmark.lr-color.ls-color.lt-color.lu-color.lv-color.ly-color.map.ma-color.magnifying-glass.magnifying-glass-minus.magnifying-glass-plus.math-symbols-square.mc-color.md-color.me-color.menu.mg-color.micro.micro-crossed-out.minus.mk-color.ml-color.mm-color.mn-color.mo-color.mobile.moon.mountains.mr-color.ms-color.mt-color.mu-color.mv-color.mw-color.mx-color.my-color.mz-color.na-color.ne-color.ng-color.ni-color.nl-color.no-color.np-color.nz-color.om-color.pa-color.parking.pause.pause-loading.pcircle.pe-color.pen.pen-paper.person-open-arms.pf-color.pg-color.ph-color.phone-contact.pig-coin.pk-color.pl-color.play.play-circle.plug-charge.plug-regular.plus.position.pr-color.pt-color.pw-color.py-color.qa-color.question-mark.ro-color.road.road-mountain.rs-color.ru-color.rw-color.sa-color.sb-color.scan-qr.sc-color.sd-color.se-color.seat-front.sg-color.sh-color.share.shopping-bag.si-color.sk-color.sl-color.sm-color.sn-color.so-color.speaker.speaker-crossed-out.spray.sr-color.st-color.star.star-filled.store.suitcase.sun.sv-color.sy-color.sz-color.tag.tc-color.td-color.telegram.tg-color.th-color.ticket.tj-color.tl-color.tm-color.tn-color.to-color.tr-color.transmission-automatic.transmission-manual.triple-dot-h.triple-dot-v.tt-color.tw-color.twitter.tz-color.ua-color.ug-color.us-color.user.uy-color.uz-color.vc-color.ve-color.vg-color.video-camera.video-camera-crossed-out.vimeo.vn-color.vu-color.wall-charger.whatsapp.wheel.wifi.wrench-hammer.ws-color.ww-color.ye-color.youtube.za-color.zero-color.zm-color.zw-color`.split(`.`);exports.iconNames=e;
|
|
1
|
+
var e=`9-circles.ad-color.ae-color.af-color.ag-color.ai-color.al-color.am-color.an-color.ao-color.ar-color.arrow-down.arrow-down-line.arrow-download.arrow-exit.arrow-expand.arrow-external-link.arrow-left.arrow-left-line.arrow-reload.arrow-right.arrow-right-line.arrow-rotate-360.arrow-rotate-360-horizontal.arrow-switch.arrow-up.arrow-up-line.arrow-upload.at-color.au-color.aw-color.ax-color.az-color.b-color.ba-color.battery-g-4-01.battery-inclined-fill.battery-vertical-100.battery-2-sub-arrows-up.battery-3-sub-arrows-up.bb-color.bd-color.be-color.bell.bf-color.bg-color.bh-color.bi-color.bill.bin.bj-color.bm-color.bn-color.bo-color.book-mark.box.br-color.bs-color.bt-color.bw-color.by-color.bz-color.c-color.ca-color.cable.caf-color.calendar.camera.car-arrow-down.car-compare.car-door.car-frontal.car-imodel.car-in-window.car-lateral.car-model.car-seat.cart.cart-down.cas-color.cd-color.cercle-ribbon-check.ceu-color.cf-color.cg-color.ch-color.charger-acc.charger-type-2.chat-bubble.check.check-mark-circle.ci-color.city.cl-color.clock.cloud-co-2.cm-color.cn-color.cna-color.co-color.coc-color.computer-display.cr-color.credit-card.debit-card.cross.cross-circle.csa-color.cu-color.cv-color.cy-color.cz-color.de-color.dj-color.dk-color.dm-color.do-color.document.document-check.document-copy.document-download.document-time.dot.dz-color.ec-color.eco-color.ee-color.eg-color.electric-station.engine.envelope.equals-sign.er-color.es-color.et-color.eu-color.euro.exclamation-mark-circle.exclamation-mark-triangle.eye.eye-crossed-out.facebook.fi-color.filter.fj-color.fk-color.fm-color.fr-color.fuel-station.ga-color.garage.gb-color.gd-color.ge-color.gear.gg-color.gh-color.gi-color.globe.gm-color.gn-color.gq-color.gr-color.gt-color.gw-color.gy-color.half-star-filled.headlight.heart.heart-filled.highway.hk-color.hn-color.hr-color.ht-color.hu-color.id-color.ie-color.il-color.im-color.in-color.info-circle.info-triangle.instagram.iq-color.ir-color.is-color.it-color.je-color.jm-color.jo-color.jp-color.ke-color.key.kg-color.kh-color.km-color.kn-color.kp-color.kr-color.kw-color.ky-color.kz-color.la-color.label-a-color.label-b-color.label-c-color.label-d-color.label-e-color.label-f-color.label-g-color.label-h-color.label-i-color.label-j-color.label-k-color.label-l-color.label-m-color.lb-color.lc-color.li-color.light.lightning.link.linkedin.list.list-line.lk-color.loader.location-poi.lock-locked.lock-unlocked.logo.logo-light.logo-lockup.logo-wordmark.lr-color.ls-color.lt-color.lu-color.lv-color.ly-color.map.ma-color.magnifying-glass.magnifying-glass-minus.magnifying-glass-plus.math-symbols-square.mc-color.md-color.me-color.menu.mg-color.micro.micro-crossed-out.minus.mk-color.ml-color.mm-color.mn-color.mo-color.mobile.moon.mountains.mr-color.ms-color.mt-color.mu-color.mv-color.mw-color.mx-color.my-color.mz-color.na-color.ne-color.ng-color.ni-color.nl-color.no-color.np-color.nz-color.om-color.pa-color.parking.pause.pause-loading.pcircle.pe-color.pen.pen-paper.person-open-arms.pf-color.pg-color.ph-color.phone-contact.pig-coin.pk-color.pl-color.play.play-circle.plug-charge.plug-regular.plus.position.pr-color.pt-color.pw-color.py-color.qa-color.question-mark.ro-color.road.road-mountain.rs-color.ru-color.rw-color.sa-color.sb-color.scan-qr.sc-color.sd-color.se-color.seat-front.sg-color.sh-color.share.shopping-bag.si-color.sk-color.sl-color.sm-color.sn-color.snowflake.so-color.speaker.speaker-crossed-out.spray.sr-color.st-color.star.star-filled.store.suitcase.sun.sunset.sv-color.sy-color.sz-color.tag.tc-color.td-color.telegram.tg-color.th-color.ticket.tj-color.tl-color.tm-color.tn-color.to-color.tr-color.transmission-automatic.transmission-manual.triple-dot-h.triple-dot-v.tt-color.tw-color.twitter.tz-color.ua-color.ug-color.us-color.user.uy-color.uz-color.vc-color.ve-color.vg-color.video-camera.video-camera-crossed-out.vimeo.vn-color.vu-color.wall-charger.whatsapp.wheel.wifi.wrench-hammer.ws-color.ww-color.ye-color.youtube.za-color.zero-color.zm-color.zw-color`.split(`.`);exports.iconNames=e;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.cjs`);const t=require(`../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/decorators.cjs`);const n=require(`../../_virtual/_@oxc-project_runtime@0.122.0/helpers/decorate.cjs`),r=require(`../base/UiKitElement.cjs`),i=require(`../../decorators/customUiKitElement.cjs`),a=require(`../../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
|
|
1
|
+
const e=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.cjs`);const t=require(`../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/decorators.cjs`);const n=require(`../../_virtual/_@oxc-project_runtime@0.122.0/helpers/decorate.cjs`),r=require(`../base/UiKitElement.cjs`),i=require(`../../decorators/customUiKitElement.cjs`),a=require(`../../utils/uiKitHtml.cjs`),o=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 s=require(`./styles/common.styles.cjs`);var c=class extends r.UiKitElement{constructor(...e){super(...e),this.variant=`selection`,this.selected=!1,this.disabled=!1,this.size=`large`}static{this.styles=[s.commonStyles]}get classes(){return{content:!0,[this.size]:!0,[`${this.variant}-variant`]:!0,selected:this.selected,disabled:this.disabled}}connectedCallback(){if(super.connectedCallback?.(),!this.hasAttribute(`size`)){let e=this.closest(`ds-list`);e&&(this.size=e.size)}}renderSelectionTemplate(){return e.x`
|
|
2
2
|
<slot name="input-left"></slot>
|
|
3
3
|
<slot name="icon"></slot>
|
|
4
4
|
<div class="container-text">
|
|
@@ -28,9 +28,9 @@ const e=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/l
|
|
|
28
28
|
</div>
|
|
29
29
|
<slot name="aside"></slot>
|
|
30
30
|
`}renderByTemplate(){switch(this.variant){case`selection`:return this.renderSelectionTemplate();case`action`:return this.renderActionTemplate();case`info`:return this.renderInfoTemplate();default:return e.E}}render(){let t=this.variant!==`info`;return e.x`
|
|
31
|
-
<li class=${
|
|
31
|
+
<li class=${o.e(this.classes)} role="listitem" tabindex="0" ?aria-disabled=${this.disabled}>
|
|
32
32
|
${this.renderByTemplate()}
|
|
33
33
|
</li>
|
|
34
34
|
|
|
35
|
-
${t?
|
|
36
|
-
`}};n.__decorate([t.n({type:String,reflect:!0})],
|
|
35
|
+
${t?a.uiKitHtml`<ds-divider orientation="horizontal" variant="primary" role="presentation"></ds-divider>`:e.E}
|
|
36
|
+
`}};n.__decorate([t.n({type:String,reflect:!0})],c.prototype,`variant`,void 0),n.__decorate([t.n({type:Boolean,reflect:!0})],c.prototype,`selected`,void 0),n.__decorate([t.n({type:Boolean,reflect:!0})],c.prototype,`disabled`,void 0),n.__decorate([t.n({type:String,reflect:!0})],c.prototype,`size`,void 0),c=n.__decorate([i.customUiKitElement(`ds-list-item`)],c);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
require(`../ds-theme-provider/themeContext.cjs`);const e=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.cjs`);const t=require(`../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.cjs`),n=require(`../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.cjs`),r=require(`../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/decorators.cjs`);const i=require(`../../_virtual/_@oxc-project_runtime@0.122.0/helpers/decorate.cjs`),a=require(`../base/UiKitElement.cjs`),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
|
|
1
|
+
require(`../ds-theme-provider/themeContext.cjs`);const e=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.cjs`);const t=require(`../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.cjs`),n=require(`../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.cjs`),r=require(`../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/decorators.cjs`);const i=require(`../../_virtual/_@oxc-project_runtime@0.122.0/helpers/decorate.cjs`),a=require(`../base/UiKitElement.cjs`),o=require(`../../decorators/customUiKitElement.cjs`),s=require(`../../utils/booleanConverter.cjs`),c=require(`../../utils/uiKitHtml.cjs`),l=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 u=require(`../../mixins/ViewportMixin.cjs`),d=require(`../../utils/objectConverter.cjs`),f=require(`../../utils/formatNumber/formatNumber.cjs`);require(`../ds-text-input/ds-text-input.cjs`);const p=require(`./utils/getStepValue/getStepValue.cjs`),m=require(`./utils/roundToDecimals/roundToDecimals.cjs`),h=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/live.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/directives/live.cjs`);const g=require(`./styles/common.styles.cjs`);var _,v=class extends u.ViewportMixin(a.UiKitElement){static{_=this}constructor(...e){super(...e),this.variant=`primary`,this.min=0,this.max=100,this.minLabel=``,this.maxLabel=``,this.step=1,this.initialValueMin=0,this.mode=`light`,this.locale=void 0,this.localeMatcher=`lookup`,this.useGrouping=!0,this.minimumIntegerDigits=1,this.minimumFractionDigits=0,this.maximumFractionDigits=3,this.size=`medium`,this.disabled=!1,this.keyboardMode=!1,this._initialValuesApplied=!1,this.getNewValue=e=>{let{width:t,left:n}=this.track.getBoundingClientRect(),r=this.thumbRadius,i=e.type.indexOf(`mouse`)===-1?e.touches[0].clientX:e.clientX,a=t-r*2,o=Math.min(Math.max(0,i-n-r),a),s=a>0?o*100/a:0;return this.min+s*(this.max-this.min)/100},this.setActiveThumb=e=>{let t=this.getNewValue(e);typeof this._valueMax!=`number`||t<=this._valueMin?this.activeThumb=`min`:t>=this._valueMax?this.activeThumb=`max`:t-this._valueMin<this._valueMax-t?this.activeThumb=`min`:this.activeThumb=`max`},this.handleMouseMove=e=>{this.animationFrameRequest&&cancelAnimationFrame(this.animationFrameRequest),this.animationFrameRequest=requestAnimationFrame(()=>{let t=this.getNewValue(e),n=this.activeThumb??`min`,{stepValue:r}=this.computeStep({proposedValue:t,role:n});this.handleChange({value:r,role:n})})},this.handleMouseDown=e=>{this.disabled||(e?.preventDefault?.(),this.setActiveThumb(e),this.handleMouseMove(e),window?.addEventListener(`mousemove`,this.handleMouseMove),window?.addEventListener(`touchmove`,this.handleMouseMove),window?.addEventListener(`pointerup`,this.handlePointerUp))},this.handlePointerUp=()=>{window?.removeEventListener(`mousemove`,this.handleMouseMove),window?.removeEventListener(`touchmove`,this.handleMouseMove),window?.removeEventListener(`pointerup`,this.handlePointerUp)},this.handleKeydown=()=>{this.keyboardMode=!0},this.handlePointerOrMouseDown=()=>{this.keyboardMode=!1},this.onInputFocus=(e,t)=>{let n=e.currentTarget,r=this.getRoleById(t);this.editingField=r,n.type=`number`,n.step=String(this.step??1);let i=r===`min`?this._valueMin:this._valueMax;n.value=String(i??``),this.keyboardMode&&n.classList.add(`focus-visible`)},this.commitInputValue=(e,t)=>{let n=e.currentTarget,r=this.getRoleById(t),{stepValue:i}=this.computeStep({proposedValue:Number(n.value),role:r}),a=m.roundToDecimals({value:i,fractionDigits:this.maximumFractionDigits});this.handleChange({value:a,role:r}),this.isControlled(r)||(n.value=String(a))},this.onInputBlur=e=>{this.editingField=void 0,e.currentTarget?.classList?.remove(`focus-visible`)},this.onInputKeyDown=(e,t)=>{e.key===`Enter`&&(e.preventDefault(),this.commitInputValue(e,t))},this.onThumbKeyDown=(e,t)=>{if(!this.disabled&&(e.key===`ArrowLeft`||e.key===`ArrowRight`)){e.preventDefault();let n=this.step??1,r=e.key===`ArrowLeft`?-n:n,i=this.getRoleById(t),a=i===`min`?this._valueMin:this._valueMax,{stepValue:o}=this.computeStep({proposedValue:a+r,role:i});this.handleChange({value:o,role:i})}}}static{this.styles=[g.commonStyles,g.trackStyles,g.thumbStyles,g.currentValueStyles,g.rangeValueStyles,g.inputResetStyles]}get isRange(){return typeof this.initialValueMax==`number`||typeof this.valueMax==`number`}get sliderSizeToTextInputSize(){return(typeof this.size==`string`?this.size:this.size?.[this.viewport])===`large`?`large`:`medium`}isControlled(e){return typeof(e===`min`?this.valueMin:this.valueMax)==`number`}getRoleById(e){return e===1?`min`:`max`}get currentValues(){return{1:this._valueMin,...typeof this._valueMax==`number`?{2:this._valueMax}:{}}}computeStep({proposedValue:e,role:t}){return p.getStepValue({step:this.step,min:this.min,max:this.max,proposedValue:e,role:t,currentValues:this.currentValues})}willUpdate(e){super.willUpdate(e),typeof this.valueMin==`number`&&(this._valueMin=this.valueMin),typeof this.valueMax==`number`&&(this._valueMax=this.valueMax),this._initialValuesApplied||(this._initialValuesApplied=!0,this.applyInitialValues())}disconnectedCallback(){super.disconnectedCallback(),window?.removeEventListener(`mousemove`,this.handleMouseMove),window?.removeEventListener(`touchmove`,this.handleMouseMove),window?.removeEventListener(`pointerup`,this.handlePointerUp),window?.removeEventListener(`keydown`,this.handleKeydown),window?.removeEventListener(`mousedown`,this.handlePointerOrMouseDown),window?.removeEventListener(`pointerdown`,this.handlePointerOrMouseDown)}firstUpdated(e){super.firstUpdated(e),window?.addEventListener(`keydown`,this.handleKeydown),window?.addEventListener(`mousedown`,this.handlePointerOrMouseDown),window?.addEventListener(`pointerdown`,this.handlePointerOrMouseDown)}applyInitialValues(){[`min`,`max`].forEach(e=>{if(this.isControlled(e))return;let t=this[e===`min`?`initialValueMin`:`initialValueMax`];if(typeof t!=`number`)return;let{stepValue:n}=this.computeStep({proposedValue:t,role:e});this[e===`min`?`_valueMin`:`_valueMax`]!==n&&this.handleChange({value:n,role:e})})}getTrackPct(e){let t=this.max-this.min;return t===0?0:(e-this.min)/t*100}get thumbRadius(){let e=this.renderRoot?.querySelector(`.thumb`);return e?e.offsetWidth/2:0}static{this.THUMB_RADIUS_CSS_VAR=`var(--ui-kit-private-slider-thumb-radius, 0px)`}trackPosition(e){let t=_.THUMB_RADIUS_CSS_VAR;return`calc(${t} + (100% - ${t} * 2) * ${e/100})`}trackWidth(e){return`calc((100% - ${_.THUMB_RADIUS_CSS_VAR} * 2) * ${e/100})`}handleChange({value:e,role:t}){let n=m.roundToDecimals({value:e,fractionDigits:this.maximumFractionDigits}),r=t===`min`?`_valueMin`:`_valueMax`;this[r]!==n&&(this.isControlled(t)||(this[r]=n),this.dispatchEvent(new CustomEvent(`change`,{bubbles:!0,composed:!0,detail:{role:t,value:n}})))}formatNumber(e){return f.formatNumber({value:e,locale:this.locale,...this.unitStyle&&{style:this.unitStyle},...this.currency&&{currency:this.currency},...this.unit&&{unit:this.unit},localeMatcher:this.localeMatcher,minimumIntegerDigits:this.minimumIntegerDigits,minimumFractionDigits:this.minimumFractionDigits,maximumFractionDigits:this.maximumFractionDigits,thousandSeparator:this.thousandSeparator,fractionSeparator:this.fractionSeparator,useGrouping:this.useGrouping})}get rangeValuesTemplates(){let{formattedNumber:t,unitSymbol:n,unitSymbolPosition:r}=this.formatNumber(this.min),i=this.unitSymbol??n,a=this.unitSymbolPosition??r??(i?`right`:void 0),{formattedNumber:o}=this.formatNumber(this.max);return e.x`
|
|
2
2
|
<div class="range-value-text">
|
|
3
3
|
${this.minLabel?e.x`<span class="range-value-label">${this.minLabel}</span>`:e.E}
|
|
4
4
|
${a===`left`?e.x`<span>${i}</span>`:e.E}
|
|
@@ -49,23 +49,23 @@ require(`../ds-theme-provider/themeContext.cjs`);const e=require(`../../node_mod
|
|
|
49
49
|
}
|
|
50
50
|
</style>
|
|
51
51
|
<div class="track-range" role="presentation"></div>
|
|
52
|
-
`}getInputTemplate(
|
|
52
|
+
`}getInputTemplate(e){let t=this.getRoleById(e),n=this.editingField===t,r=t===`min`?this._valueMin:this._valueMax,{formattedNumber:i,unitSymbol:a,unitSymbolPosition:o}=this.formatNumber(r),s=this.unitSymbolPosition??o,l=this.unitSymbol??a,u=l?s===`left`?`${l} ${i}`:`${i} ${l}`:`${i}`,d=n?`number`:`text`,f=n?String(r??``):u,p=e===1?this.inputMinAriaLabel:this.inputMaxAriaLabel,m=this.isRange?e===1?`Start value`:`End value`:`Value`,g=p??m;return c.uiKitHtml`
|
|
53
53
|
<div class="input-wrapper">
|
|
54
54
|
<ds-text-input size=${this.sliderSizeToTextInputSize} hide-clear-button>
|
|
55
55
|
<input
|
|
56
|
-
class="input-value input-value-${
|
|
56
|
+
class="input-value input-value-${e}"
|
|
57
57
|
type=${d}
|
|
58
|
-
.value=${
|
|
58
|
+
.value=${h.l(f)}
|
|
59
59
|
step=${String(this.step??1)}
|
|
60
60
|
?disabled=${this.disabled}
|
|
61
61
|
tabindex=${this.disabled?-1:0}
|
|
62
62
|
aria-disabled=${String(!!this.disabled)}
|
|
63
63
|
aria-label=${g}
|
|
64
64
|
?readonly=${this.disabled}
|
|
65
|
-
@focus=${
|
|
65
|
+
@focus=${t=>this.onInputFocus(t,e)}
|
|
66
66
|
@blur=${this.onInputBlur}
|
|
67
|
-
@change=${
|
|
68
|
-
@keydown=${
|
|
67
|
+
@change=${t=>this.commitInputValue(t,e)}
|
|
68
|
+
@keydown=${t=>this.onInputKeyDown(t,e)}
|
|
69
69
|
title=${f}
|
|
70
70
|
/>
|
|
71
71
|
</ds-text-input>
|
|
@@ -75,14 +75,14 @@ require(`../ds-theme-provider/themeContext.cjs`);const e=require(`../../node_mod
|
|
|
75
75
|
${this.getInputTemplate(1)}
|
|
76
76
|
${this.isRange?this.getInputTemplate(2):e.E}
|
|
77
77
|
</div>
|
|
78
|
-
`}getSecondaryInputTemplate(t){let n=this.getRoleById(t)===`min`?this._valueMin:this._valueMax,{unitSymbol:r}=this.formatNumber(n),i=this.unitSymbol??r,a=t===1?this.inputMinAriaLabel:this.inputMaxAriaLabel,o=this.isRange?t===1?`Start value`:`End value`:`Value`,s=a??o;return
|
|
78
|
+
`}getSecondaryInputTemplate(t){let n=this.getRoleById(t)===`min`?this._valueMin:this._valueMax,{unitSymbol:r}=this.formatNumber(n),i=this.unitSymbol??r,a=t===1?this.inputMinAriaLabel:this.inputMaxAriaLabel,o=this.isRange?t===1?`Start value`:`End value`:`Value`,s=a??o;return c.uiKitHtml`
|
|
79
79
|
<div class="secondary-input-group">
|
|
80
80
|
<div class="secondary-input-wrapper">
|
|
81
81
|
<ds-text-input size="xlarge" hide-clear-button>
|
|
82
82
|
<input
|
|
83
83
|
class="secondary-input-value secondary-input-value-${t}"
|
|
84
84
|
type="number"
|
|
85
|
-
.value=${
|
|
85
|
+
.value=${h.l(String(n??``))}
|
|
86
86
|
step=${String(this.step??1)}
|
|
87
87
|
?disabled=${this.disabled}
|
|
88
88
|
tabindex=${this.disabled?-1:0}
|
|
@@ -110,7 +110,7 @@ require(`../ds-theme-provider/themeContext.cjs`);const e=require(`../../node_mod
|
|
|
110
110
|
</style>
|
|
111
111
|
`}render(){let t=this.variant===`secondary`;return e.x`
|
|
112
112
|
${this.styleTokens}
|
|
113
|
-
<div class=${
|
|
113
|
+
<div class=${l.e(this.containerClasses)}>
|
|
114
114
|
${t?this.secondaryInputsTemplate:e.E}
|
|
115
115
|
<div @touchstart=${this.handleMouseDown} @mousedown=${this.handleMouseDown} class="track" role="presentation">
|
|
116
116
|
${this.thumbTemplates}
|
|
@@ -119,4 +119,4 @@ require(`../ds-theme-provider/themeContext.cjs`);const e=require(`../../node_mod
|
|
|
119
119
|
<div class="range-value-container">${this.rangeValuesTemplates}</div>
|
|
120
120
|
${t?e.E:this.inputsTemplate}
|
|
121
121
|
</div>
|
|
122
|
-
`}};i.__decorate([t.n({type:String})],
|
|
122
|
+
`}};i.__decorate([t.n({type:String})],v.prototype,`variant`,void 0),i.__decorate([t.n({type:Number})],v.prototype,`min`,void 0),i.__decorate([t.n({type:Number})],v.prototype,`max`,void 0),i.__decorate([t.n({type:String,attribute:`min-label`})],v.prototype,`minLabel`,void 0),i.__decorate([t.n({type:String,attribute:`max-label`})],v.prototype,`maxLabel`,void 0),i.__decorate([t.n({type:Number})],v.prototype,`step`,void 0),i.__decorate([t.n({type:Number,attribute:`initial-value-min`})],v.prototype,`initialValueMin`,void 0),i.__decorate([t.n({type:Number,attribute:`initial-value-max`})],v.prototype,`initialValueMax`,void 0),i.__decorate([t.n({type:Number,attribute:`value-min`})],v.prototype,`valueMin`,void 0),i.__decorate([t.n({type:Number,attribute:`value-max`})],v.prototype,`valueMax`,void 0),i.__decorate([t.n({type:String,reflect:!0})],v.prototype,`mode`,void 0),i.__decorate([t.n({type:String,attribute:`locale`})],v.prototype,`locale`,void 0),i.__decorate([t.n({type:String,attribute:`locale-matcher`})],v.prototype,`localeMatcher`,void 0),i.__decorate([t.n({type:String,attribute:`unit-symbol`})],v.prototype,`unitSymbol`,void 0),i.__decorate([t.n({type:String,attribute:`unit-symbol-position`})],v.prototype,`unitSymbolPosition`,void 0),i.__decorate([t.n({type:String,attribute:`unit-style`})],v.prototype,`unitStyle`,void 0),i.__decorate([t.n({type:String,attribute:`currency`})],v.prototype,`currency`,void 0),i.__decorate([t.n({type:String,attribute:`unit`})],v.prototype,`unit`,void 0),i.__decorate([t.n({type:String,attribute:`use-grouping`,converter:e=>e===`auto`?`auto`:typeof e==`boolean`?e:e===`true`||e===``?!0:e!==`false`})],v.prototype,`useGrouping`,void 0),i.__decorate([t.n({type:Number,attribute:`minimum-integer-digits`})],v.prototype,`minimumIntegerDigits`,void 0),i.__decorate([t.n({type:Number,attribute:`minimum-fraction-digits`})],v.prototype,`minimumFractionDigits`,void 0),i.__decorate([t.n({type:Number,attribute:`maximum-fraction-digits`})],v.prototype,`maximumFractionDigits`,void 0),i.__decorate([t.n({type:String,attribute:`thousand-separator`})],v.prototype,`thousandSeparator`,void 0),i.__decorate([t.n({type:String,attribute:`fraction-separator`})],v.prototype,`fractionSeparator`,void 0),i.__decorate([t.n({type:String,converter:d.objectConverter})],v.prototype,`size`,void 0),i.__decorate([t.n({type:Boolean,converter:s.booleanConverter})],v.prototype,`disabled`,void 0),i.__decorate([t.n({type:String,attribute:`input-min-aria-label`})],v.prototype,`inputMinAriaLabel`,void 0),i.__decorate([t.n({type:String,attribute:`input-max-aria-label`})],v.prototype,`inputMaxAriaLabel`,void 0),i.__decorate([r.e(`.track`)],v.prototype,`track`,void 0),i.__decorate([n.r()],v.prototype,`_valueMin`,void 0),i.__decorate([n.r()],v.prototype,`_valueMax`,void 0),i.__decorate([n.r()],v.prototype,`editingField`,void 0),v=_=i.__decorate([o.customUiKitElement(`ds-slider`)],v);
|
|
@@ -1,4 +1,4 @@
|
|
|
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'),
|
|
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.loadUnusedStyles=!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:`
|
|
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.159`;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?.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?.remove()}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([o.n({type:Boolean,converter:u.booleanConverter,attribute:`load-unused-styles`})],f.prototype,`loadUnusedStyles`,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
|
-
require(`../utils/version.cjs`);function e(e,t){return function(n){if(!n?.prototype)throw TypeError(`@customUiKitElement requires a class that extends HTMLElement.`);let r=e;if(globalThis?.customElements?.get(r))return;let i=t?.skipTagAsComponentName?[]:[e];Array.isArray(t?.extendComponentNames)&&(i=[...t.extendComponentNames,...i]),globalThis?.customElements?.define?.(r,class extends n{static{this.componentName=i}connectedCallback(){n.prototype.connectedCallback?.call(this),this.setAttribute(`data-ui-kit-version`,`2.0.0-canary.
|
|
1
|
+
require(`../utils/version.cjs`);function e(e,t){return function(n){if(!n?.prototype)throw TypeError(`@customUiKitElement requires a class that extends HTMLElement.`);let r=e;if(globalThis?.customElements?.get(r))return;let i=t?.skipTagAsComponentName?[]:[e];Array.isArray(t?.extendComponentNames)&&(i=[...t.extendComponentNames,...i]),globalThis?.customElements?.define?.(r,class extends n{static{this.componentName=i}connectedCallback(){n.prototype.connectedCallback?.call(this),this.setAttribute(`data-ui-kit-version`,`2.0.0-canary.159`)}})}}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={})=>{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.159`),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.159`),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.159/styles/${n}/components/${t}.css`,i=this.getCachedStyleSheetPromise({url:r});if(i)return i;let a=e(()=>this.fetchStyle({url:r})).then(e=>(e||this.stylePromises.delete(r),e));return this.stylePromises.set(r,a),this.stylePromises.get(r)}}async fetchStyle({url:e}){try{if(typeof fetch>`u`)return;let t=await fetch(e,{cache:`force-cache`});if(t.ok)return t.text()}catch(t){console.error(`Failed to fetch Style Sheet "${e}":`,t)}}getCachedStyleSheetPromise({url:e}){return this.stylePromises.get(e)}static getInstance(){return t.instance||=new t,t.instance}}.getInstance();exports.stylesRegistry=t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=`2.0.0-canary.
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=`2.0.0-canary.159`,t=`--v${e.replaceAll(`.`,`-`)}`;exports.VERSION=e,exports.VERSION_TAG_SUFFIX=t;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
//#region src/components/ds-icon/iconNames.ts
|
|
2
|
-
var e = /* @__PURE__ */ "9-circles.ad-color.ae-color.af-color.ag-color.ai-color.al-color.am-color.an-color.ao-color.ar-color.arrow-down.arrow-down-line.arrow-download.arrow-exit.arrow-expand.arrow-external-link.arrow-left.arrow-left-line.arrow-reload.arrow-right.arrow-right-line.arrow-rotate-360.arrow-rotate-360-horizontal.arrow-switch.arrow-up.arrow-up-line.arrow-upload.at-color.au-color.aw-color.ax-color.az-color.b-color.ba-color.battery-g-4-01.battery-inclined-fill.battery-vertical-100.battery-2-sub-arrows-up.battery-3-sub-arrows-up.bb-color.bd-color.be-color.bell.bf-color.bg-color.bh-color.bi-color.bill.bin.bj-color.bm-color.bn-color.bo-color.book-mark.box.br-color.bs-color.bt-color.bw-color.by-color.bz-color.c-color.ca-color.cable.caf-color.calendar.camera.car-arrow-down.car-compare.car-door.car-frontal.car-imodel.car-in-window.car-lateral.car-model.car-seat.cart.cart-down.cas-color.cd-color.cercle-ribbon-check.ceu-color.cf-color.cg-color.ch-color.charger-acc.charger-type-2.chat-bubble.check.check-mark-circle.ci-color.city.cl-color.clock.cloud-co-2.cm-color.cn-color.cna-color.co-color.coc-color.computer-display.cr-color.credit-card.debit-card.cross.cross-circle.csa-color.cu-color.cv-color.cy-color.cz-color.de-color.dj-color.dk-color.dm-color.do-color.document.document-check.document-copy.document-download.document-time.dot.dz-color.ec-color.eco-color.ee-color.eg-color.electric-station.engine.envelope.equals-sign.er-color.es-color.et-color.eu-color.euro.exclamation-mark-circle.exclamation-mark-triangle.eye.eye-crossed-out.facebook.fi-color.filter.fj-color.fk-color.fm-color.fr-color.fuel-station.ga-color.garage.gb-color.gd-color.ge-color.gear.gg-color.gh-color.gi-color.globe.gm-color.gn-color.gq-color.gr-color.gt-color.gw-color.gy-color.half-star-filled.headlight.heart.heart-filled.highway.hk-color.hn-color.hr-color.ht-color.hu-color.id-color.ie-color.il-color.im-color.in-color.info-circle.info-triangle.instagram.iq-color.ir-color.is-color.it-color.je-color.jm-color.jo-color.jp-color.ke-color.key.kg-color.kh-color.km-color.kn-color.kp-color.kr-color.kw-color.ky-color.kz-color.la-color.label-a-color.label-b-color.label-c-color.label-d-color.label-e-color.label-f-color.label-g-color.label-h-color.label-i-color.label-j-color.label-k-color.label-l-color.label-m-color.lb-color.lc-color.li-color.light.lightning.link.linkedin.list.list-line.lk-color.loader.location-poi.lock-locked.lock-unlocked.logo.logo-light.logo-lockup.logo-wordmark.lr-color.ls-color.lt-color.lu-color.lv-color.ly-color.map.ma-color.magnifying-glass.magnifying-glass-minus.magnifying-glass-plus.math-symbols-square.mc-color.md-color.me-color.menu.mg-color.micro.micro-crossed-out.minus.mk-color.ml-color.mm-color.mn-color.mo-color.mobile.moon.mountains.mr-color.ms-color.mt-color.mu-color.mv-color.mw-color.mx-color.my-color.mz-color.na-color.ne-color.ng-color.ni-color.nl-color.no-color.np-color.nz-color.om-color.pa-color.parking.pause.pause-loading.pcircle.pe-color.pen.pen-paper.person-open-arms.pf-color.pg-color.ph-color.phone-contact.pig-coin.pk-color.pl-color.play.play-circle.plug-charge.plug-regular.plus.position.pr-color.pt-color.pw-color.py-color.qa-color.question-mark.ro-color.road.road-mountain.rs-color.ru-color.rw-color.sa-color.sb-color.scan-qr.sc-color.sd-color.se-color.seat-front.sg-color.sh-color.share.shopping-bag.si-color.sk-color.sl-color.sm-color.sn-color.so-color.speaker.speaker-crossed-out.spray.sr-color.st-color.star.star-filled.store.suitcase.sun.sv-color.sy-color.sz-color.tag.tc-color.td-color.telegram.tg-color.th-color.ticket.tj-color.tl-color.tm-color.tn-color.to-color.tr-color.transmission-automatic.transmission-manual.triple-dot-h.triple-dot-v.tt-color.tw-color.twitter.tz-color.ua-color.ug-color.us-color.user.uy-color.uz-color.vc-color.ve-color.vg-color.video-camera.video-camera-crossed-out.vimeo.vn-color.vu-color.wall-charger.whatsapp.wheel.wifi.wrench-hammer.ws-color.ww-color.ye-color.youtube.za-color.zero-color.zm-color.zw-color".split(".");
|
|
2
|
+
var e = /* @__PURE__ */ "9-circles.ad-color.ae-color.af-color.ag-color.ai-color.al-color.am-color.an-color.ao-color.ar-color.arrow-down.arrow-down-line.arrow-download.arrow-exit.arrow-expand.arrow-external-link.arrow-left.arrow-left-line.arrow-reload.arrow-right.arrow-right-line.arrow-rotate-360.arrow-rotate-360-horizontal.arrow-switch.arrow-up.arrow-up-line.arrow-upload.at-color.au-color.aw-color.ax-color.az-color.b-color.ba-color.battery-g-4-01.battery-inclined-fill.battery-vertical-100.battery-2-sub-arrows-up.battery-3-sub-arrows-up.bb-color.bd-color.be-color.bell.bf-color.bg-color.bh-color.bi-color.bill.bin.bj-color.bm-color.bn-color.bo-color.book-mark.box.br-color.bs-color.bt-color.bw-color.by-color.bz-color.c-color.ca-color.cable.caf-color.calendar.camera.car-arrow-down.car-compare.car-door.car-frontal.car-imodel.car-in-window.car-lateral.car-model.car-seat.cart.cart-down.cas-color.cd-color.cercle-ribbon-check.ceu-color.cf-color.cg-color.ch-color.charger-acc.charger-type-2.chat-bubble.check.check-mark-circle.ci-color.city.cl-color.clock.cloud-co-2.cm-color.cn-color.cna-color.co-color.coc-color.computer-display.cr-color.credit-card.debit-card.cross.cross-circle.csa-color.cu-color.cv-color.cy-color.cz-color.de-color.dj-color.dk-color.dm-color.do-color.document.document-check.document-copy.document-download.document-time.dot.dz-color.ec-color.eco-color.ee-color.eg-color.electric-station.engine.envelope.equals-sign.er-color.es-color.et-color.eu-color.euro.exclamation-mark-circle.exclamation-mark-triangle.eye.eye-crossed-out.facebook.fi-color.filter.fj-color.fk-color.fm-color.fr-color.fuel-station.ga-color.garage.gb-color.gd-color.ge-color.gear.gg-color.gh-color.gi-color.globe.gm-color.gn-color.gq-color.gr-color.gt-color.gw-color.gy-color.half-star-filled.headlight.heart.heart-filled.highway.hk-color.hn-color.hr-color.ht-color.hu-color.id-color.ie-color.il-color.im-color.in-color.info-circle.info-triangle.instagram.iq-color.ir-color.is-color.it-color.je-color.jm-color.jo-color.jp-color.ke-color.key.kg-color.kh-color.km-color.kn-color.kp-color.kr-color.kw-color.ky-color.kz-color.la-color.label-a-color.label-b-color.label-c-color.label-d-color.label-e-color.label-f-color.label-g-color.label-h-color.label-i-color.label-j-color.label-k-color.label-l-color.label-m-color.lb-color.lc-color.li-color.light.lightning.link.linkedin.list.list-line.lk-color.loader.location-poi.lock-locked.lock-unlocked.logo.logo-light.logo-lockup.logo-wordmark.lr-color.ls-color.lt-color.lu-color.lv-color.ly-color.map.ma-color.magnifying-glass.magnifying-glass-minus.magnifying-glass-plus.math-symbols-square.mc-color.md-color.me-color.menu.mg-color.micro.micro-crossed-out.minus.mk-color.ml-color.mm-color.mn-color.mo-color.mobile.moon.mountains.mr-color.ms-color.mt-color.mu-color.mv-color.mw-color.mx-color.my-color.mz-color.na-color.ne-color.ng-color.ni-color.nl-color.no-color.np-color.nz-color.om-color.pa-color.parking.pause.pause-loading.pcircle.pe-color.pen.pen-paper.person-open-arms.pf-color.pg-color.ph-color.phone-contact.pig-coin.pk-color.pl-color.play.play-circle.plug-charge.plug-regular.plus.position.pr-color.pt-color.pw-color.py-color.qa-color.question-mark.ro-color.road.road-mountain.rs-color.ru-color.rw-color.sa-color.sb-color.scan-qr.sc-color.sd-color.se-color.seat-front.sg-color.sh-color.share.shopping-bag.si-color.sk-color.sl-color.sm-color.sn-color.snowflake.so-color.speaker.speaker-crossed-out.spray.sr-color.st-color.star.star-filled.store.suitcase.sun.sunset.sv-color.sy-color.sz-color.tag.tc-color.td-color.telegram.tg-color.th-color.ticket.tj-color.tl-color.tm-color.tn-color.to-color.tr-color.transmission-automatic.transmission-manual.triple-dot-h.triple-dot-v.tt-color.tw-color.twitter.tz-color.ua-color.ug-color.us-color.user.uy-color.uz-color.vc-color.ve-color.vg-color.video-camera.video-camera-crossed-out.vimeo.vn-color.vu-color.wall-charger.whatsapp.wheel.wifi.wrench-hammer.ws-color.ww-color.ye-color.youtube.za-color.zero-color.zm-color.zw-color".split(".");
|
|
3
3
|
//#endregion
|
|
4
4
|
export { e as iconNames };
|
|
@@ -5,16 +5,17 @@ import "../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/decorators.js";
|
|
|
5
5
|
import { __decorate as r } from "../../_virtual/_@oxc-project_runtime@0.122.0/helpers/decorate.js";
|
|
6
6
|
import { UiKitElement as i } from "../base/UiKitElement.js";
|
|
7
7
|
import { customUiKitElement as a } from "../../decorators/customUiKitElement.js";
|
|
8
|
-
import {
|
|
8
|
+
import { uiKitHtml as o } from "../../utils/uiKitHtml.js";
|
|
9
|
+
import { e as s } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js";
|
|
9
10
|
import "../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/directives/class-map.js";
|
|
10
|
-
import { commonStyles as
|
|
11
|
+
import { commonStyles as c } from "./styles/common.styles.js";
|
|
11
12
|
//#region src/components/ds-list-item/ds-list-item.ts
|
|
12
|
-
var
|
|
13
|
+
var l = class extends i {
|
|
13
14
|
constructor(...e) {
|
|
14
15
|
super(...e), this.variant = "selection", this.selected = !1, this.disabled = !1, this.size = "large";
|
|
15
16
|
}
|
|
16
17
|
static {
|
|
17
|
-
this.styles = [
|
|
18
|
+
this.styles = [c];
|
|
18
19
|
}
|
|
19
20
|
get classes() {
|
|
20
21
|
return {
|
|
@@ -80,25 +81,25 @@ var c = class extends i {
|
|
|
80
81
|
render() {
|
|
81
82
|
let n = this.variant !== "info";
|
|
82
83
|
return t`
|
|
83
|
-
<li class=${
|
|
84
|
+
<li class=${s(this.classes)} role="listitem" tabindex="0" ?aria-disabled=${this.disabled}>
|
|
84
85
|
${this.renderByTemplate()}
|
|
85
86
|
</li>
|
|
86
87
|
|
|
87
|
-
${n ?
|
|
88
|
+
${n ? o`<ds-divider orientation="horizontal" variant="primary" role="presentation"></ds-divider>` : e}
|
|
88
89
|
`;
|
|
89
90
|
}
|
|
90
91
|
};
|
|
91
92
|
r([n({
|
|
92
93
|
type: String,
|
|
93
94
|
reflect: !0
|
|
94
|
-
})],
|
|
95
|
+
})], l.prototype, "variant", void 0), r([n({
|
|
95
96
|
type: Boolean,
|
|
96
97
|
reflect: !0
|
|
97
|
-
})],
|
|
98
|
+
})], l.prototype, "selected", void 0), r([n({
|
|
98
99
|
type: Boolean,
|
|
99
100
|
reflect: !0
|
|
100
|
-
})],
|
|
101
|
+
})], l.prototype, "disabled", void 0), r([n({
|
|
101
102
|
type: String,
|
|
102
103
|
reflect: !0
|
|
103
|
-
})],
|
|
104
|
+
})], l.prototype, "size", void 0), l = r([a("ds-list-item")], l);
|
|
104
105
|
//#endregion
|
|
@@ -9,21 +9,22 @@ import { __decorate as a } from "../../_virtual/_@oxc-project_runtime@0.122.0/he
|
|
|
9
9
|
import { UiKitElement as o } from "../base/UiKitElement.js";
|
|
10
10
|
import { customUiKitElement as s } from "../../decorators/customUiKitElement.js";
|
|
11
11
|
import { booleanConverter as c } from "../../utils/booleanConverter.js";
|
|
12
|
-
import {
|
|
12
|
+
import { uiKitHtml as l } from "../../utils/uiKitHtml.js";
|
|
13
|
+
import { e as u } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js";
|
|
13
14
|
import "../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/directives/class-map.js";
|
|
14
|
-
import { ViewportMixin as
|
|
15
|
-
import { objectConverter as
|
|
16
|
-
import { formatNumber as
|
|
15
|
+
import { ViewportMixin as d } from "../../mixins/ViewportMixin.js";
|
|
16
|
+
import { objectConverter as f } from "../../utils/objectConverter.js";
|
|
17
|
+
import { formatNumber as p } from "../../utils/formatNumber/formatNumber.js";
|
|
17
18
|
import "../ds-text-input/ds-text-input.js";
|
|
18
|
-
import { getStepValue as
|
|
19
|
-
import { roundToDecimals as
|
|
20
|
-
import { l as
|
|
19
|
+
import { getStepValue as m } from "./utils/getStepValue/getStepValue.js";
|
|
20
|
+
import { roundToDecimals as h } from "./utils/roundToDecimals/roundToDecimals.js";
|
|
21
|
+
import { l as g } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/live.js";
|
|
21
22
|
import "../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/directives/live.js";
|
|
22
|
-
import { commonStyles as
|
|
23
|
+
import { commonStyles as _, currentValueStyles as v, inputResetStyles as y, rangeValueStyles as b, thumbStyles as x, trackStyles as S } from "./styles/common.styles.js";
|
|
23
24
|
//#region src/components/ds-slider/ds-slider.ts
|
|
24
|
-
var
|
|
25
|
+
var C, w = class extends d(o) {
|
|
25
26
|
static {
|
|
26
|
-
|
|
27
|
+
C = this;
|
|
27
28
|
}
|
|
28
29
|
constructor(...e) {
|
|
29
30
|
super(...e), this.variant = "primary", this.min = 0, this.max = 100, this.minLabel = "", this.maxLabel = "", this.step = 1, this.initialValueMin = 0, this.mode = "light", this.locale = void 0, this.localeMatcher = "lookup", this.useGrouping = !0, this.minimumIntegerDigits = 1, this.minimumFractionDigits = 0, this.maximumFractionDigits = 3, this.size = "medium", this.disabled = !1, this.keyboardMode = !1, this._initialValuesApplied = !1, this.getNewValue = (e) => {
|
|
@@ -60,7 +61,7 @@ var S, C = class extends u(o) {
|
|
|
60
61
|
let n = e.currentTarget, r = this.getRoleById(t), { stepValue: i } = this.computeStep({
|
|
61
62
|
proposedValue: Number(n.value),
|
|
62
63
|
role: r
|
|
63
|
-
}), a =
|
|
64
|
+
}), a = h({
|
|
64
65
|
value: i,
|
|
65
66
|
fractionDigits: this.maximumFractionDigits
|
|
66
67
|
});
|
|
@@ -88,12 +89,12 @@ var S, C = class extends u(o) {
|
|
|
88
89
|
}
|
|
89
90
|
static {
|
|
90
91
|
this.styles = [
|
|
91
|
-
|
|
92
|
+
_,
|
|
93
|
+
S,
|
|
92
94
|
x,
|
|
95
|
+
v,
|
|
93
96
|
b,
|
|
94
|
-
|
|
95
|
-
y,
|
|
96
|
-
v
|
|
97
|
+
y
|
|
97
98
|
];
|
|
98
99
|
}
|
|
99
100
|
get isRange() {
|
|
@@ -115,7 +116,7 @@ var S, C = class extends u(o) {
|
|
|
115
116
|
};
|
|
116
117
|
}
|
|
117
118
|
computeStep({ proposedValue: e, role: t }) {
|
|
118
|
-
return
|
|
119
|
+
return m({
|
|
119
120
|
step: this.step,
|
|
120
121
|
min: this.min,
|
|
121
122
|
max: this.max,
|
|
@@ -160,14 +161,14 @@ var S, C = class extends u(o) {
|
|
|
160
161
|
this.THUMB_RADIUS_CSS_VAR = "var(--ui-kit-private-slider-thumb-radius, 0px)";
|
|
161
162
|
}
|
|
162
163
|
trackPosition(e) {
|
|
163
|
-
let t =
|
|
164
|
+
let t = C.THUMB_RADIUS_CSS_VAR;
|
|
164
165
|
return `calc(${t} + (100% - ${t} * 2) * ${e / 100})`;
|
|
165
166
|
}
|
|
166
167
|
trackWidth(e) {
|
|
167
|
-
return `calc((100% - ${
|
|
168
|
+
return `calc((100% - ${C.THUMB_RADIUS_CSS_VAR} * 2) * ${e / 100})`;
|
|
168
169
|
}
|
|
169
170
|
handleChange({ value: e, role: t }) {
|
|
170
|
-
let n =
|
|
171
|
+
let n = h({
|
|
171
172
|
value: e,
|
|
172
173
|
fractionDigits: this.maximumFractionDigits
|
|
173
174
|
}), r = t === "min" ? "_valueMin" : "_valueMax";
|
|
@@ -181,7 +182,7 @@ var S, C = class extends u(o) {
|
|
|
181
182
|
})));
|
|
182
183
|
}
|
|
183
184
|
formatNumber(e) {
|
|
184
|
-
return
|
|
185
|
+
return p({
|
|
185
186
|
value: e,
|
|
186
187
|
locale: this.locale,
|
|
187
188
|
...this.unitStyle && { style: this.unitStyle },
|
|
@@ -268,19 +269,19 @@ var S, C = class extends u(o) {
|
|
|
268
269
|
`;
|
|
269
270
|
}
|
|
270
271
|
getInputTemplate(e) {
|
|
271
|
-
let
|
|
272
|
-
return
|
|
272
|
+
let t = this.getRoleById(e), n = this.editingField === t, r = t === "min" ? this._valueMin : this._valueMax, { formattedNumber: i, unitSymbol: a, unitSymbolPosition: o } = this.formatNumber(r), s = this.unitSymbolPosition ?? o, c = this.unitSymbol ?? a, u = c ? s === "left" ? `${c} ${i}` : `${i} ${c}` : `${i}`, d = n ? "number" : "text", f = n ? String(r ?? "") : u, p = e === 1 ? this.inputMinAriaLabel : this.inputMaxAriaLabel, m = this.isRange ? e === 1 ? "Start value" : "End value" : "Value", h = p ?? m;
|
|
273
|
+
return l`
|
|
273
274
|
<div class="input-wrapper">
|
|
274
275
|
<ds-text-input size=${this.sliderSizeToTextInputSize} hide-clear-button>
|
|
275
276
|
<input
|
|
276
277
|
class="input-value input-value-${e}"
|
|
277
278
|
type=${d}
|
|
278
|
-
.value=${
|
|
279
|
+
.value=${g(f)}
|
|
279
280
|
step=${String(this.step ?? 1)}
|
|
280
281
|
?disabled=${this.disabled}
|
|
281
282
|
tabindex=${this.disabled ? -1 : 0}
|
|
282
283
|
aria-disabled=${String(!!this.disabled)}
|
|
283
|
-
aria-label=${
|
|
284
|
+
aria-label=${h}
|
|
284
285
|
?readonly=${this.disabled}
|
|
285
286
|
@focus=${(t) => this.onInputFocus(t, e)}
|
|
286
287
|
@blur=${this.onInputBlur}
|
|
@@ -302,14 +303,14 @@ var S, C = class extends u(o) {
|
|
|
302
303
|
}
|
|
303
304
|
getSecondaryInputTemplate(n) {
|
|
304
305
|
let r = this.getRoleById(n) === "min" ? this._valueMin : this._valueMax, { unitSymbol: i } = this.formatNumber(r), a = this.unitSymbol ?? i, o = n === 1 ? this.inputMinAriaLabel : this.inputMaxAriaLabel, s = this.isRange ? n === 1 ? "Start value" : "End value" : "Value", c = o ?? s;
|
|
305
|
-
return
|
|
306
|
+
return l`
|
|
306
307
|
<div class="secondary-input-group">
|
|
307
308
|
<div class="secondary-input-wrapper">
|
|
308
309
|
<ds-text-input size="xlarge" hide-clear-button>
|
|
309
310
|
<input
|
|
310
311
|
class="secondary-input-value secondary-input-value-${n}"
|
|
311
312
|
type="number"
|
|
312
|
-
.value=${
|
|
313
|
+
.value=${g(String(r ?? ""))}
|
|
313
314
|
step=${String(this.step ?? 1)}
|
|
314
315
|
?disabled=${this.disabled}
|
|
315
316
|
tabindex=${this.disabled ? -1 : 0}
|
|
@@ -357,7 +358,7 @@ var S, C = class extends u(o) {
|
|
|
357
358
|
let n = this.variant === "secondary";
|
|
358
359
|
return t`
|
|
359
360
|
${this.styleTokens}
|
|
360
|
-
<div class=${
|
|
361
|
+
<div class=${u(this.containerClasses)}>
|
|
361
362
|
${n ? this.secondaryInputsTemplate : e}
|
|
362
363
|
<div @touchstart=${this.handleMouseDown} @mousedown=${this.handleMouseDown} class="track" role="presentation">
|
|
363
364
|
${this.thumbTemplates}
|
|
@@ -369,78 +370,78 @@ var S, C = class extends u(o) {
|
|
|
369
370
|
`;
|
|
370
371
|
}
|
|
371
372
|
};
|
|
372
|
-
a([n({ type: String })],
|
|
373
|
+
a([n({ type: String })], w.prototype, "variant", void 0), a([n({ type: Number })], w.prototype, "min", void 0), a([n({ type: Number })], w.prototype, "max", void 0), a([n({
|
|
373
374
|
type: String,
|
|
374
375
|
attribute: "min-label"
|
|
375
|
-
})],
|
|
376
|
+
})], w.prototype, "minLabel", void 0), a([n({
|
|
376
377
|
type: String,
|
|
377
378
|
attribute: "max-label"
|
|
378
|
-
})],
|
|
379
|
+
})], w.prototype, "maxLabel", void 0), a([n({ type: Number })], w.prototype, "step", void 0), a([n({
|
|
379
380
|
type: Number,
|
|
380
381
|
attribute: "initial-value-min"
|
|
381
|
-
})],
|
|
382
|
+
})], w.prototype, "initialValueMin", void 0), a([n({
|
|
382
383
|
type: Number,
|
|
383
384
|
attribute: "initial-value-max"
|
|
384
|
-
})],
|
|
385
|
+
})], w.prototype, "initialValueMax", void 0), a([n({
|
|
385
386
|
type: Number,
|
|
386
387
|
attribute: "value-min"
|
|
387
|
-
})],
|
|
388
|
+
})], w.prototype, "valueMin", void 0), a([n({
|
|
388
389
|
type: Number,
|
|
389
390
|
attribute: "value-max"
|
|
390
|
-
})],
|
|
391
|
+
})], w.prototype, "valueMax", void 0), a([n({
|
|
391
392
|
type: String,
|
|
392
393
|
reflect: !0
|
|
393
|
-
})],
|
|
394
|
+
})], w.prototype, "mode", void 0), a([n({
|
|
394
395
|
type: String,
|
|
395
396
|
attribute: "locale"
|
|
396
|
-
})],
|
|
397
|
+
})], w.prototype, "locale", void 0), a([n({
|
|
397
398
|
type: String,
|
|
398
399
|
attribute: "locale-matcher"
|
|
399
|
-
})],
|
|
400
|
+
})], w.prototype, "localeMatcher", void 0), a([n({
|
|
400
401
|
type: String,
|
|
401
402
|
attribute: "unit-symbol"
|
|
402
|
-
})],
|
|
403
|
+
})], w.prototype, "unitSymbol", void 0), a([n({
|
|
403
404
|
type: String,
|
|
404
405
|
attribute: "unit-symbol-position"
|
|
405
|
-
})],
|
|
406
|
+
})], w.prototype, "unitSymbolPosition", void 0), a([n({
|
|
406
407
|
type: String,
|
|
407
408
|
attribute: "unit-style"
|
|
408
|
-
})],
|
|
409
|
+
})], w.prototype, "unitStyle", void 0), a([n({
|
|
409
410
|
type: String,
|
|
410
411
|
attribute: "currency"
|
|
411
|
-
})],
|
|
412
|
+
})], w.prototype, "currency", void 0), a([n({
|
|
412
413
|
type: String,
|
|
413
414
|
attribute: "unit"
|
|
414
|
-
})],
|
|
415
|
+
})], w.prototype, "unit", void 0), a([n({
|
|
415
416
|
type: String,
|
|
416
417
|
attribute: "use-grouping",
|
|
417
418
|
converter: (e) => e === "auto" ? "auto" : typeof e == "boolean" ? e : e === "true" || e === "" ? !0 : e !== "false"
|
|
418
|
-
})],
|
|
419
|
+
})], w.prototype, "useGrouping", void 0), a([n({
|
|
419
420
|
type: Number,
|
|
420
421
|
attribute: "minimum-integer-digits"
|
|
421
|
-
})],
|
|
422
|
+
})], w.prototype, "minimumIntegerDigits", void 0), a([n({
|
|
422
423
|
type: Number,
|
|
423
424
|
attribute: "minimum-fraction-digits"
|
|
424
|
-
})],
|
|
425
|
+
})], w.prototype, "minimumFractionDigits", void 0), a([n({
|
|
425
426
|
type: Number,
|
|
426
427
|
attribute: "maximum-fraction-digits"
|
|
427
|
-
})],
|
|
428
|
+
})], w.prototype, "maximumFractionDigits", void 0), a([n({
|
|
428
429
|
type: String,
|
|
429
430
|
attribute: "thousand-separator"
|
|
430
|
-
})],
|
|
431
|
+
})], w.prototype, "thousandSeparator", void 0), a([n({
|
|
431
432
|
type: String,
|
|
432
433
|
attribute: "fraction-separator"
|
|
433
|
-
})],
|
|
434
|
+
})], w.prototype, "fractionSeparator", void 0), a([n({
|
|
434
435
|
type: String,
|
|
435
|
-
converter:
|
|
436
|
-
})],
|
|
436
|
+
converter: f
|
|
437
|
+
})], w.prototype, "size", void 0), a([n({
|
|
437
438
|
type: Boolean,
|
|
438
439
|
converter: c
|
|
439
|
-
})],
|
|
440
|
+
})], w.prototype, "disabled", void 0), a([n({
|
|
440
441
|
type: String,
|
|
441
442
|
attribute: "input-min-aria-label"
|
|
442
|
-
})],
|
|
443
|
+
})], w.prototype, "inputMinAriaLabel", void 0), a([n({
|
|
443
444
|
type: String,
|
|
444
445
|
attribute: "input-max-aria-label"
|
|
445
|
-
})],
|
|
446
|
+
})], w.prototype, "inputMaxAriaLabel", void 0), a([i(".track")], w.prototype, "track", void 0), a([r()], w.prototype, "_valueMin", void 0), a([r()], w.prototype, "_valueMax", void 0), a([r()], w.prototype, "editingField", void 0), w = C = a([s("ds-slider")], w);
|
|
446
447
|
//#endregion
|