@cupra/ui-kit 2.0.0-canary.118 → 2.0.0-canary.120
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-checkbox/ds-checkbox.cjs +2 -2
- package/dist/cjs/components/ds-currency/ds-currency.cjs +1 -3
- package/dist/cjs/components/ds-currency/styles/common.styles.cjs +2 -2
- package/dist/cjs/components/ds-dialog/ds-dialog.cjs +2 -2
- package/dist/cjs/components/ds-dialog-fullscreen/ds-dialog-fullscreen.cjs +2 -2
- package/dist/cjs/components/ds-drawer/ds-drawer.cjs +4 -4
- package/dist/cjs/components/ds-link-button/ds-link-button.cjs +2 -2
- package/dist/cjs/components/ds-media-control/ds-media-control.cjs +3 -3
- package/dist/cjs/components/ds-tabs/ds-tabs.cjs +2 -2
- package/dist/cjs/components/ds-theme-provider/ds-theme-provider.cjs +1 -1
- package/dist/cjs/components/ds-toggle-switch/ds-toggle-switch.cjs +3 -3
- 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/cssWithTokens.cjs +1 -1
- package/dist/cjs/utils/htmlWithTokens.cjs +1 -1
- package/dist/cjs/utils/version.cjs +1 -1
- package/dist/esm/components/ds-checkbox/ds-checkbox.js +12 -4
- package/dist/esm/components/ds-currency/ds-currency.js +5 -7
- package/dist/esm/components/ds-currency/styles/common.styles.js +2 -2
- package/dist/esm/components/ds-dialog/ds-dialog.js +11 -4
- package/dist/esm/components/ds-dialog-fullscreen/ds-dialog-fullscreen.js +12 -5
- package/dist/esm/components/ds-drawer/ds-drawer.js +26 -18
- package/dist/esm/components/ds-link-button/ds-link-button.js +2 -2
- package/dist/esm/components/ds-media-control/ds-media-control.js +22 -14
- package/dist/esm/components/ds-tabs/ds-tabs.js +10 -4
- package/dist/esm/components/ds-theme-provider/ds-theme-provider.js +1 -1
- package/dist/esm/components/ds-toggle-switch/ds-toggle-switch.js +30 -21
- 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/cssWithTokens.js +1 -1
- package/dist/esm/utils/htmlWithTokens.js +1 -1
- package/dist/esm/utils/version.js +1 -1
- package/dist/types/components/ds-checkbox/ds-checkbox.d.ts +4 -1
- package/dist/types/components/ds-dialog/ds-dialog.d.ts +4 -1
- package/dist/types/components/ds-dialog-fullscreen/ds-dialog-fullscreen.d.ts +4 -1
- package/dist/types/components/ds-drawer/ds-drawer.d.ts +4 -1
- package/dist/types/components/ds-drawer/ds-drawer.types.d.ts +1 -1
- package/dist/types/components/ds-media-control/ds-media-control.d.ts +4 -1
- package/dist/types/components/ds-tabs/ds-tabs.d.ts +4 -1
- package/dist/types/components/ds-toggle-switch/ds-toggle-switch.d.ts +4 -1
- package/dist-react/cjs/components/ds-checkbox/ds-checkbox.cjs +2 -2
- package/dist-react/cjs/components/ds-currency/ds-currency.cjs +1 -3
- package/dist-react/cjs/components/ds-currency/styles/common.styles.cjs +2 -2
- package/dist-react/cjs/components/ds-dialog/ds-dialog.cjs +2 -2
- package/dist-react/cjs/components/ds-dialog-fullscreen/ds-dialog-fullscreen.cjs +2 -2
- package/dist-react/cjs/components/ds-drawer/ds-drawer.cjs +4 -4
- package/dist-react/cjs/components/ds-link-button/ds-link-button.cjs +2 -2
- package/dist-react/cjs/components/ds-media-control/ds-media-control.cjs +3 -3
- package/dist-react/cjs/components/ds-tabs/ds-tabs.cjs +2 -2
- package/dist-react/cjs/components/ds-theme-provider/ds-theme-provider.cjs +1 -1
- package/dist-react/cjs/components/ds-toggle-switch/ds-toggle-switch.cjs +3 -3
- 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/cssWithTokens.cjs +1 -1
- package/dist-react/cjs/utils/htmlWithTokens.cjs +1 -1
- package/dist-react/cjs/utils/version.cjs +1 -1
- package/dist-react/esm/components/ds-checkbox/ds-checkbox.js +12 -4
- package/dist-react/esm/components/ds-currency/ds-currency.js +5 -7
- package/dist-react/esm/components/ds-currency/styles/common.styles.js +2 -2
- package/dist-react/esm/components/ds-dialog/ds-dialog.js +11 -4
- package/dist-react/esm/components/ds-dialog-fullscreen/ds-dialog-fullscreen.js +12 -5
- package/dist-react/esm/components/ds-drawer/ds-drawer.js +26 -18
- package/dist-react/esm/components/ds-link-button/ds-link-button.js +2 -2
- package/dist-react/esm/components/ds-media-control/ds-media-control.js +22 -14
- package/dist-react/esm/components/ds-tabs/ds-tabs.js +10 -4
- package/dist-react/esm/components/ds-theme-provider/ds-theme-provider.js +1 -1
- package/dist-react/esm/components/ds-toggle-switch/ds-toggle-switch.js +30 -21
- 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/cssWithTokens.js +1 -1
- package/dist-react/esm/utils/htmlWithTokens.js +1 -1
- package/dist-react/esm/utils/version.js +1 -1
- package/dist-react/types/components/ds-checkbox/ds-checkbox.d.ts +4 -1
- package/dist-react/types/components/ds-dialog/ds-dialog.d.ts +4 -1
- package/dist-react/types/components/ds-dialog-fullscreen/ds-dialog-fullscreen.d.ts +4 -1
- package/dist-react/types/components/ds-drawer/ds-drawer.d.ts +4 -1
- package/dist-react/types/components/ds-drawer/ds-drawer.types.d.ts +1 -1
- package/dist-react/types/components/ds-media-control/ds-media-control.d.ts +4 -1
- package/dist-react/types/components/ds-tabs/ds-tabs.d.ts +4 -1
- package/dist-react/types/components/ds-toggle-switch/ds-toggle-switch.d.ts +4 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require(`../../node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/controllers/context-consumer.cjs`),t=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 n=require(`../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.cjs`),r=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 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/htmlWithTokens.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(`../ds-checkbox-group/ds-checkbox-group.cjs`),d=require(`../../mixins/FormAssociatedMixin.cjs`),f=require(`./styles/common.styles.cjs`);var p=class extends d.FormAssociatedMixin(a.UiKitElement){constructor(...e){super(...e),this.inputPlacement=`left`,this.
|
|
1
|
+
const e=require(`../../node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/controllers/context-consumer.cjs`),t=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 n=require(`../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.cjs`),r=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 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/htmlWithTokens.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(`../ds-checkbox-group/ds-checkbox-group.cjs`),d=require(`../../mixins/FormAssociatedMixin.cjs`),f=require(`./styles/common.styles.cjs`);var p=class extends d.FormAssociatedMixin(a.UiKitElement){constructor(...e){super(...e),this.inputPlacement=`left`,this._checked=void 0,this._checkedState=!1,this.required=!1,this._disabled=!1,this.mode=`light`,this._size=`medium`,this.helperText=``,this.infoText=``,this._forcedError=``,this.invalidError=``,this.indeterminate=!1,this.dataAriaLabel=``}get checked(){return this._checked??this._checkedState}set checked(e){this._checked=e}static{this.styles=[f.commonStyles]}connectedCallback(){super.connectedCallback(),queueMicrotask(()=>{this.createContextConsumers([{context:u.checkboxGroupDisabledContext,callback:e=>{this.disabledGroup=e}},{context:u.checkboxGroupErrorContext,callback:e=>{this.errorGroup=e}},{context:u.checkboxGroupSizeContext,callback:e=>{this.sizeGroup=e}}])})}createContextConsumers(t){t.forEach(({context:t,callback:n})=>{new e.s(this,{context:t,callback:n,subscribe:!0})})}get disabled(){return this.disabledGroup??this._disabled}set disabled(e){this._disabled=e}get size(){return this.sizeGroup||this._size}set size(e){this._size=e}get forcedError(){return this._forcedError}set forcedError(e){this._forcedError=e}get error(){return this.errorGroup??!!this._forcedError}handleChange(e){let t=e.target.checked;this._checkedState=t,this._checked=void 0,this.dispatchEvent(new CustomEvent(`change`,{bubbles:!0,composed:!0,detail:{checked:t,value:this.value}}))}get classes(){return{container:!0,[this.inputPlacement]:!!this.inputPlacement,[this.mode]:!!this.mode,[this.size]:!!this.size,disabled:this.disabled,checked:this.checked,error:this.error}}get iconTemplate(){if(!this.checked)return t.E;let e=this.indeterminate?`minus`:`check`;return this.componentFactory.createIcon({class:`icon`,"icon-name":e})}get styleTokens(){return c.htmlWithTokens`
|
|
2
2
|
<style>
|
|
3
3
|
:host{
|
|
4
4
|
color-scheme: ${this.mode};
|
|
@@ -36,4 +36,4 @@ const e=require(`../../node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/c
|
|
|
36
36
|
</div>
|
|
37
37
|
</label>
|
|
38
38
|
</div>
|
|
39
|
-
`}};i.__decorate([n.n({type:String})],p.prototype,`name`,void 0),i.__decorate([n.n({type:String})],p.prototype,`value`,void 0),i.__decorate([n.n({type:String,attribute:`input-placement`})],p.prototype,`inputPlacement`,void 0),i.__decorate([n.n({type:Boolean,converter:s.booleanConverter,reflect:!0})],p.prototype,`
|
|
39
|
+
`}};i.__decorate([n.n({type:String})],p.prototype,`name`,void 0),i.__decorate([n.n({type:String})],p.prototype,`value`,void 0),i.__decorate([n.n({type:String,attribute:`input-placement`})],p.prototype,`inputPlacement`,void 0),i.__decorate([n.n({type:Boolean,attribute:`checked`,converter:s.booleanConverter,reflect:!0})],p.prototype,`_checked`,void 0),i.__decorate([r.r()],p.prototype,`_checkedState`,void 0),i.__decorate([n.n({type:Boolean,converter:s.booleanConverter})],p.prototype,`required`,void 0),i.__decorate([n.n({type:Boolean,converter:s.booleanConverter,attribute:`disabled`})],p.prototype,`_disabled`,void 0),i.__decorate([n.n({type:String,reflect:!0})],p.prototype,`mode`,void 0),i.__decorate([n.n({type:String,attribute:`size`})],p.prototype,`_size`,void 0),i.__decorate([n.n({type:String,attribute:`helper-text`})],p.prototype,`helperText`,void 0),i.__decorate([n.n({type:String,attribute:`info-text`})],p.prototype,`infoText`,void 0),i.__decorate([n.n({type:String,attribute:`forced-error`})],p.prototype,`_forcedError`,void 0),i.__decorate([n.n({type:String,attribute:`invalid-error`})],p.prototype,`invalidError`,void 0),i.__decorate([n.n({type:Boolean,converter:s.booleanConverter})],p.prototype,`indeterminate`,void 0),i.__decorate([n.n({type:String,attribute:`data-aria-label`})],p.prototype,`dataAriaLabel`,void 0),i.__decorate([r.r()],p.prototype,`disabledGroup`,void 0),i.__decorate([r.r()],p.prototype,`errorGroup`,void 0),i.__decorate([r.r()],p.prototype,`sizeGroup`,void 0),p=i.__decorate([o.customUiKitElement(`ds-checkbox`)],p);
|
|
@@ -2,6 +2,4 @@ const e=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/l
|
|
|
2
2
|
${r===`left`?e.x`<span class=${a.e(c)}>${n}</span>`:e.E}
|
|
3
3
|
<span class=${a.e(s)}>${i}</span>
|
|
4
4
|
${r===`right`?e.x`<span class=${a.e(c)}>${n}</span>`:e.E}
|
|
5
|
-
`}get periodTemplate(){if(!this.period)return e.E;let t=new Intl.DisplayNames(this.locale,{type:`dateTimeField`});return e.x`
|
|
6
|
-
<span class=${a.e({period:!0,text:!0,[`size-${this.periodSize}`]:!0,[`weight-${this.periodWeight}`]:!0})}"period">/${t.of(this.period)}</span>
|
|
7
|
-
`}get noteTemplate(){return this.note?e.x` <span class=${a.e({note:!0,text:!0,[`size-${this.noteSize}`]:!0,[`weight-${this.noteWeight}`]:!0})}>${this.note}</span> `:e.E}render(){return e.x` <div class="container">${this.valueTemplate} ${this.noteTemplate} ${this.periodTemplate}</div> `}};n.__decorate([t.n({type:String})],c.prototype,`locale`,void 0),n.__decorate([t.n({type:String,attribute:`currency-code`})],c.prototype,`currencyCode`,void 0),n.__decorate([t.n({type:String,attribute:`currency-display`})],c.prototype,`currencyDisplay`,void 0),n.__decorate([t.n({type:String,attribute:`amount-text`})],c.prototype,`amountText`,void 0),n.__decorate([t.n({type:Number,attribute:`amount-number`})],c.prototype,`amountNumber`,void 0),n.__decorate([t.n({type:Number,attribute:`minimum-fraction-digits`})],c.prototype,`minimumFractionDigits`,void 0),n.__decorate([t.n({type:Number,attribute:`maximum-fraction-digits`})],c.prototype,`maximumFractionDigits`,void 0),n.__decorate([t.n({type:String})],c.prototype,`period`,void 0),n.__decorate([t.n({type:String})],c.prototype,`note`,void 0),n.__decorate([t.n({type:String,attribute:`thousand-separator`})],c.prototype,`thousandSeparator`,void 0),n.__decorate([t.n({type:String,attribute:`fraction-separator`})],c.prototype,`fractionSeparator`,void 0),n.__decorate([t.n({type:String,attribute:`amount-size`})],c.prototype,`amountSize`,void 0),n.__decorate([t.n({type:String,attribute:`amount-weight`})],c.prototype,`amountWeight`,void 0),n.__decorate([t.n({type:String,attribute:`currency-size`})],c.prototype,`currencySize`,void 0),n.__decorate([t.n({type:String,attribute:`currency-weight`})],c.prototype,`currencyWeight`,void 0),n.__decorate([t.n({type:String,attribute:`period-size`})],c.prototype,`periodSize`,void 0),n.__decorate([t.n({type:String,attribute:`period-weight`})],c.prototype,`periodWeight`,void 0),n.__decorate([t.n({type:String,attribute:`note-size`})],c.prototype,`noteSize`,void 0),n.__decorate([t.n({type:String,attribute:`note-weight`})],c.prototype,`noteWeight`,void 0),c=n.__decorate([i.customUiKitElement(`ds-currency`)],c);
|
|
5
|
+
`}get periodTemplate(){if(!this.period)return e.E;let t=new Intl.DisplayNames(this.locale,{type:`dateTimeField`});return e.x`<span class=${a.e({period:!0,text:!0,[`size-${this.periodSize}`]:!0,[`weight-${this.periodWeight}`]:!0})}"period">/${t.of(this.period)}</span>`}get noteTemplate(){return this.note?e.x`<span class=${a.e({note:!0,text:!0,[`size-${this.noteSize}`]:!0,[`weight-${this.noteWeight}`]:!0})}>${this.note}</span>`:e.E}render(){return e.x`<div class="container">${this.valueTemplate}${this.periodTemplate}${this.noteTemplate}</div>`}};n.__decorate([t.n({type:String})],c.prototype,`locale`,void 0),n.__decorate([t.n({type:String,attribute:`currency-code`})],c.prototype,`currencyCode`,void 0),n.__decorate([t.n({type:String,attribute:`currency-display`})],c.prototype,`currencyDisplay`,void 0),n.__decorate([t.n({type:String,attribute:`amount-text`})],c.prototype,`amountText`,void 0),n.__decorate([t.n({type:Number,attribute:`amount-number`})],c.prototype,`amountNumber`,void 0),n.__decorate([t.n({type:Number,attribute:`minimum-fraction-digits`})],c.prototype,`minimumFractionDigits`,void 0),n.__decorate([t.n({type:Number,attribute:`maximum-fraction-digits`})],c.prototype,`maximumFractionDigits`,void 0),n.__decorate([t.n({type:String})],c.prototype,`period`,void 0),n.__decorate([t.n({type:String})],c.prototype,`note`,void 0),n.__decorate([t.n({type:String,attribute:`thousand-separator`})],c.prototype,`thousandSeparator`,void 0),n.__decorate([t.n({type:String,attribute:`fraction-separator`})],c.prototype,`fractionSeparator`,void 0),n.__decorate([t.n({type:String,attribute:`amount-size`})],c.prototype,`amountSize`,void 0),n.__decorate([t.n({type:String,attribute:`amount-weight`})],c.prototype,`amountWeight`,void 0),n.__decorate([t.n({type:String,attribute:`currency-size`})],c.prototype,`currencySize`,void 0),n.__decorate([t.n({type:String,attribute:`currency-weight`})],c.prototype,`currencyWeight`,void 0),n.__decorate([t.n({type:String,attribute:`period-size`})],c.prototype,`periodSize`,void 0),n.__decorate([t.n({type:String,attribute:`period-weight`})],c.prototype,`periodWeight`,void 0),n.__decorate([t.n({type:String,attribute:`note-size`})],c.prototype,`noteSize`,void 0),n.__decorate([t.n({type:String,attribute:`note-weight`})],c.prototype,`noteWeight`,void 0),c=n.__decorate([i.customUiKitElement(`ds-currency`)],c);
|
|
@@ -1,10 +1,10 @@
|
|
|
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`);var t=e.i`
|
|
2
2
|
:host {
|
|
3
|
-
display:
|
|
3
|
+
display: contents;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
.container {
|
|
7
7
|
display: inline-flex;
|
|
8
|
-
align-items:
|
|
8
|
+
align-items: baseline;
|
|
9
9
|
}
|
|
10
10
|
`;exports.commonStyles=t;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.cjs`);const t=require(`../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.cjs`),n=require(`../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.cjs`),r=require(`../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query.cjs`);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 l=require(`../../utils/debounce.cjs`),u=require(`../../utils/scrollLock.cjs`),d=require(`./styles/common.styles.cjs`);var f=class extends a.UiKitElement{constructor(...e){super(...e),this.lockClose=!1,this.lockScroll=!0,this.
|
|
1
|
+
const e=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.cjs`);const t=require(`../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.cjs`),n=require(`../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.cjs`),r=require(`../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query.cjs`);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 l=require(`../../utils/debounce.cjs`),u=require(`../../utils/scrollLock.cjs`),d=require(`./styles/common.styles.cjs`);var f=class extends a.UiKitElement{constructor(...e){super(...e),this.lockClose=!1,this.lockScroll=!0,this._open=void 0,this._openState=!1,this.size=`medium`,this.hasBeenOpened=!1,this.hasScroll=!1,this.debouncedCheckScroll=l.debounce({func:()=>this.checkScroll()}),this.scrollLocked=!1,this.handleCloseButtonClick=()=>{this.handleClose(`button`)},this.handleDialogClick=e=>{e.target===this.nativeDialog&&this.handleClose(`backdrop`)},this.handleCancel=e=>{e.preventDefault(),this.lockClose||this.handleClose(`escape`)},this.handleHostClick=e=>{e.stopPropagation()}}static{this.styles=[d.commonStyles]}get open(){return this._open??this._openState}set open(e){this._open=e}updated(e){super.updated(e),!this.hasBeenOpened&&(e.has(`_open`)||e.has(`_openState`))&&this.open&&(this.hasBeenOpened=!0),(e.has(`_open`)||e.has(`_openState`))&&(this.open||(this.hasScroll=!1),this.handleResizeObserver(),this.syncNativeDialogState(),this.syncScrollLock())}syncScrollLock(){this.open&&this.lockScroll?(u.scrollLock.lock(),this.scrollLocked=!0):this.scrollLocked&&=(u.scrollLock.unlock(),!1)}syncNativeDialogState(){this.nativeDialog&&(this.open?this.openNativeDialog():this.closeNativeDialog())}openNativeDialog(){this.nativeDialog.open||this.nativeDialog.showModal?.()}closeNativeDialog(){this.nativeDialog.open&&this.nativeDialog.close?.()}async handleResizeObserver(){this.resizeObserver?.disconnect(),this.content&&(this.resizeObserver.observe(this.content),await new Promise(requestAnimationFrame),this.checkScroll())}get panelClasses(){return{panel:!0,"with-scroll":this.open&&this.hasScroll,[this.size]:!!this.size}}dispatchCloseEvents(e){let t=`ds-dialog:close-${e}`;this.dispatchEvent(new Event(t,{bubbles:!0,composed:!0})),this.dispatchEvent(new Event(`ds-dialog:close`,{bubbles:!0,composed:!0}))}handleClose(e){this.lockClose||(this._openState=!1,this._open=void 0,this.dispatchCloseEvents(e))}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver(this.debouncedCheckScroll),this.handleResizeObserver(),this.addEventListener(`click`,this.handleHostClick)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect(),this.scrollLocked&&=(u.scrollLock.unlock(),!1),this.removeEventListener(`click`,this.handleHostClick)}checkScroll(){this.hasScroll||=this.content?.scrollHeight>this.content?.clientHeight}render(){return!this.hasBeenOpened&&!this.open?e.E:e.x`
|
|
2
2
|
<dialog
|
|
3
3
|
class="dialog"
|
|
4
4
|
data-testid="ds-dialog-container"
|
|
@@ -17,4 +17,4 @@ const e=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/l
|
|
|
17
17
|
</div>
|
|
18
18
|
</div>
|
|
19
19
|
</dialog>
|
|
20
|
-
`}};i.__decorate([t.n({type:Boolean,converter:s.booleanConverter,attribute:`lock-close`})],f.prototype,`lockClose`,void 0),i.__decorate([t.n({type:Boolean,converter:s.booleanConverter,attribute:`lock-scroll`})],f.prototype,`lockScroll`,void 0),i.__decorate([t.n({type:Boolean,converter:s.booleanConverter})],f.prototype,`
|
|
20
|
+
`}};i.__decorate([t.n({type:Boolean,converter:s.booleanConverter,attribute:`lock-close`})],f.prototype,`lockClose`,void 0),i.__decorate([t.n({type:Boolean,converter:s.booleanConverter,attribute:`lock-scroll`})],f.prototype,`lockScroll`,void 0),i.__decorate([t.n({type:Boolean,attribute:`open`,converter:s.booleanConverter})],f.prototype,`_open`,void 0),i.__decorate([n.r()],f.prototype,`_openState`,void 0),i.__decorate([t.n({type:String})],f.prototype,`size`,void 0),i.__decorate([t.n({type:String,attribute:`data-aria-label`})],f.prototype,`dataAriaLabel`,void 0),i.__decorate([t.n({type:String,attribute:`data-aria-description`})],f.prototype,`dataAriaDescription`,void 0),i.__decorate([n.r()],f.prototype,`hasBeenOpened`,void 0),i.__decorate([n.r()],f.prototype,`hasScroll`,void 0),i.__decorate([r.e(`.content`)],f.prototype,`content`,void 0),i.__decorate([r.e(`dialog`)],f.prototype,`nativeDialog`,void 0),f=i.__decorate([o.customUiKitElement(`ds-dialog`)],f);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.cjs`);const t=require(`../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.cjs`),n=require(`../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.cjs`),r=require(`../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query.cjs`);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 l=require(`../../utils/debounce.cjs`),u=require(`./styles/common.styles.cjs`);var d=class extends a.UiKitElement{constructor(...e){super(...e),this.lockClose=!1,this.lockScroll=!0,this.
|
|
1
|
+
const e=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.cjs`);const t=require(`../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.cjs`),n=require(`../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.cjs`),r=require(`../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query.cjs`);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 l=require(`../../utils/debounce.cjs`),u=require(`./styles/common.styles.cjs`);var d=class extends a.UiKitElement{constructor(...e){super(...e),this.lockClose=!1,this.lockScroll=!0,this._open=void 0,this._openState=!1,this.hasScroll=!1,this.hasBeenOpened=!1,this.debouncedCheckScroll=l.debounce({func:()=>this.checkScroll()}),this.handleKeyDown=e=>{this.open&&e.key===`Escape`&&this.handleClose()}}static{this.styles=[u.commonStyles]}get open(){return this._open??this._openState}set open(e){this._open=e}willUpdate(e){super.willUpdate(e),!this.hasBeenOpened&&(e.has(`_open`)||e.has(`_openState`))&&this.open&&(this.hasBeenOpened=!0)}updated(e){super.updated(e),(e.has(`_open`)||e.has(`_openState`))&&this.handleResizeObserver()}async handleResizeObserver(){this.lockScroll&&(document.getElementById(`storybook-root`)||(document.body.style.overflow=this.open?`hidden`:``)),this.resizeObserver?.disconnect(),this.content&&(this.resizeObserver.observe(this.content),await new Promise(requestAnimationFrame),this.checkScroll())}get containerClasses(){return{"container-fullscreen":!0,close:!this.open,"with-scroll":this.open&&this.hasScroll}}handleClose(){this.lockClose||(this._openState=!1,this._open=void 0,this.dispatchEvent(new Event(`ds-dialog-fullscreen:close`,{bubbles:!0,composed:!0})))}connectedCallback(){super.connectedCallback(),window.addEventListener(`keydown`,this.handleKeyDown),this.resizeObserver=new ResizeObserver(this.debouncedCheckScroll),this.handleResizeObserver()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener(`keydown`,this.handleKeyDown),this.lockScroll&&(document.getElementById(`storybook-root`)||(document.body.style.overflow=``)),this.resizeObserver?.disconnect()}checkScroll(){let e=this.content?.scrollHeight>this.content?.clientHeight;e!==this.hasScroll&&(this.hasScroll=e)}render(){return!this.hasBeenOpened&&!this.open?e.E:e.x`
|
|
2
2
|
<style>
|
|
3
3
|
:host {
|
|
4
4
|
display: ${this.open?`flex`:`none`};
|
|
@@ -14,4 +14,4 @@ const e=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/l
|
|
|
14
14
|
</div>
|
|
15
15
|
</dialog>
|
|
16
16
|
</div>
|
|
17
|
-
`}};i.__decorate([t.n({type:Boolean,converter:s.booleanConverter,attribute:`lock-close`})],d.prototype,`lockClose`,void 0),i.__decorate([t.n({type:Boolean,converter:s.booleanConverter,attribute:`lock-scroll`})],d.prototype,`lockScroll`,void 0),i.__decorate([t.n({type:Boolean,converter:s.booleanConverter})],d.prototype,`
|
|
17
|
+
`}};i.__decorate([t.n({type:Boolean,converter:s.booleanConverter,attribute:`lock-close`})],d.prototype,`lockClose`,void 0),i.__decorate([t.n({type:Boolean,converter:s.booleanConverter,attribute:`lock-scroll`})],d.prototype,`lockScroll`,void 0),i.__decorate([t.n({type:Boolean,attribute:`open`,converter:s.booleanConverter})],d.prototype,`_open`,void 0),i.__decorate([n.r()],d.prototype,`_openState`,void 0),i.__decorate([n.r()],d.prototype,`hasScroll`,void 0),i.__decorate([r.e(`.content`)],d.prototype,`content`,void 0),d=i.__decorate([o.customUiKitElement(`ds-dialog-fullscreen`)],d);
|
|
@@ -1,6 +1,6 @@
|
|
|
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
|
|
2
|
-
<div class=${
|
|
3
|
-
<div data-testid="ds-drawer-container" class=${
|
|
1
|
+
const e=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.cjs`);const t=require(`../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.cjs`),n=require(`../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.cjs`);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(`../../decorators/customUiKitElement.cjs`),o=require(`../../utils/booleanConverter.cjs`),s=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 c=require(`./styles/common.styles.cjs`),l=require(`./theme-config.cjs`);var u=class extends i.UiKitElement{constructor(...e){super(...e),this._open=void 0,this._openState=!1,this.handleOverlayClick=()=>{this.dispatchEvent(new Event(`ds-drawer:close`,{bubbles:!0,composed:!0})),this._openState=!1,this._open=void 0},this.handleKeyDown=e=>{(e.key===`Escape`||e.key===`Esc`)&&this.open&&this.handleOverlayClick()}}static{this.styles=[c.commonStyles,c.iconStyles]}get open(){return this._open??this._openState}set open(e){this._open=e}get classes(){return{container:!0,open:!!this.open}}getIconButtonTemplate(){let e=l.themeConfig[this.theme]?.[`icon-button-variant`];return this.componentFactory.createIconButton({class:`close-button visible`,"data-testid":`close-button`,"data-aria-label":`close-button`,"@click":this.handleOverlayClick,size:`medium`,"icon-name":`cross`,variant:e,mode:`dark`})}updated(e){super.updated?.(e),e.has&&(e.has(`_open`)||e.has(`_openState`))&&window.addEventListener(`keydown`,this.handleKeyDown)}disconnectedCallback(){window.removeEventListener(`keydown`,this.handleKeyDown),super.disconnectedCallback()}render(){return e.x`
|
|
2
|
+
<div class=${s.e({overlay:!0,open:!!this.open})} @click=${this.handleOverlayClick}></div>
|
|
3
|
+
<div data-testid="ds-drawer-container" class=${s.e(this.classes)}>
|
|
4
4
|
<div class="scroll-area" tabindex="0">
|
|
5
5
|
<div class="drawer-header">
|
|
6
6
|
<slot name="header"></slot>
|
|
@@ -16,4 +16,4 @@ const e=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/l
|
|
|
16
16
|
<slot name="footer"></slot>
|
|
17
17
|
</div>
|
|
18
18
|
</div>
|
|
19
|
-
`}};
|
|
19
|
+
`}};r.__decorate([t.n({type:Boolean,attribute:`open`,converter:o.booleanConverter})],u.prototype,`_open`,void 0),r.__decorate([n.r()],u.prototype,`_openState`,void 0),u=r.__decorate([a.customUiKitElement(`ds-drawer`)],u);
|
|
@@ -10,7 +10,7 @@ require(`../ds-theme-provider/themeContext.cjs`);const e=require(`../../node_mod
|
|
|
10
10
|
${c.r(this.htmlTagName||`button`,[[`button`,()=>e.x`
|
|
11
11
|
<button class=${s.e(this.classes)} ?disabled=${this.disabled}>
|
|
12
12
|
${this.iconPosition===`left`?this.iconTemplate:e.E}
|
|
13
|
-
<slot></slot>
|
|
13
|
+
<span class="label"><slot></slot></span>
|
|
14
14
|
${this.iconPosition===`right`?this.iconTemplate:e.E}
|
|
15
15
|
</button>
|
|
16
16
|
`],[`a`,()=>e.x`
|
|
@@ -23,7 +23,7 @@ require(`../ds-theme-provider/themeContext.cjs`);const e=require(`../../node_mod
|
|
|
23
23
|
?disabled=${this.disabled}
|
|
24
24
|
>
|
|
25
25
|
${this.iconPosition===`left`?this.iconTemplate:e.E}
|
|
26
|
-
<slot></slot>
|
|
26
|
+
<span class="label"><slot></slot></span>
|
|
27
27
|
${this.iconPosition===`right`?this.iconTemplate:e.E}
|
|
28
28
|
</a>
|
|
29
29
|
`]])}
|
|
@@ -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
|
|
1
|
+
const e=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.cjs`);const t=require(`../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.cjs`),n=require(`../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.cjs`);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(`../../decorators/customUiKitElement.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 i.UiKitElement{constructor(...e){super(...e),this._state=void 0,this._stateValue=`pause`,this.size=`medium`,this.progress=0,this.handleToggle=e=>{e.stopPropagation();let t=this.state===`play`?`pause`:`play`;this._stateValue=t,this._state=void 0;let n=t===`play`?`ds-media-control:play`:`ds-media-control:pause`;this.dispatchEvent(new CustomEvent(n,{bubbles:!0,composed:!0}))},this.onKeyDown=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this.handleToggle(e))}}static{this.styles=[s.commonStyles]}get state(){return this._state??this._stateValue}set state(e){this._state=e}get normalizedProgress(){let e=Number(this.progress??0);return Number.isNaN(e)?0:Math.min(100,Math.max(0,e))}get classes(){return{container:!0,[this.size]:!!this.size,[this.state]:!!this.state}}get iconSize(){switch(this.size){case`large`:return 24;case`small`:return 16;default:return 20}}get iconName(){return this.state===`play`?`pause`:`play`}get iconTemplate(){return this.componentFactory.createIcon({class:`icon`,"icon-name":this.iconName,size:this.iconSize})}get progressTemplate(){let t=this.size===`large`?46:this.size===`small`?30:38,n=t/2-2/2,r=n-1,i=2*Math.PI*n,a=this.normalizedProgress/100,o=i.toFixed(3),s=(i*(1-a)).toFixed(3);return e.x`
|
|
2
2
|
<svg part="progress" class="progress" viewBox="${`${-t/2} ${-t/2} ${t} ${t}`}" aria-hidden="true" focusable="false">
|
|
3
3
|
<circle
|
|
4
4
|
class="indicator"
|
|
@@ -14,7 +14,7 @@ const e=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/l
|
|
|
14
14
|
`}render(){let t=this.state===`play`?`pause`:`play`;return e.x`
|
|
15
15
|
<div
|
|
16
16
|
part="container"
|
|
17
|
-
class=${
|
|
17
|
+
class=${o.e(this.classes)}
|
|
18
18
|
role="button"
|
|
19
19
|
tabindex="0"
|
|
20
20
|
aria-label=${`${t} media ${this.size}`}
|
|
@@ -24,4 +24,4 @@ const e=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/l
|
|
|
24
24
|
${this.progressTemplate}
|
|
25
25
|
${this.iconTemplate}
|
|
26
26
|
</div>
|
|
27
|
-
`}};
|
|
27
|
+
`}};r.__decorate([t.n({type:String,attribute:`state`,reflect:!0})],c.prototype,`_state`,void 0),r.__decorate([n.r()],c.prototype,`_stateValue`,void 0),r.__decorate([t.n({type:String,reflect:!0})],c.prototype,`size`,void 0),r.__decorate([t.n({type:Number,reflect:!0})],c.prototype,`progress`,void 0),c=r.__decorate([a.customUiKitElement(`ds-media-control`)],c);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.cjs`);const t=require(`../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.cjs`),n=require(`../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.cjs`),r=require(`../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query.cjs`);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 l=require(`./styles/common.styles.cjs`),u=require(`./theme-config.cjs`);var d=class extends a.UiKitElement{constructor(...e){super(...e),this.
|
|
1
|
+
const e=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.cjs`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.cjs`);const t=require(`../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.cjs`),n=require(`../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.cjs`),r=require(`../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query.cjs`);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 l=require(`./styles/common.styles.cjs`),u=require(`./theme-config.cjs`);var d=class extends a.UiKitElement{constructor(...e){super(...e),this._selectedTab=void 0,this._selectedTabState=0,this.mode=`light`,this.variant=`primary`,this.size=`large`,this.disabled=!1,this.focusedTabIndex=-1,this.handleKeyDown=e=>{if(!(this.focusedTabIndex<0))switch(e.key){case`ArrowRight`:case`Right`:e.preventDefault(),this.focusedTabIndex+1<this.tabs?.length&&(this.focusedTabIndex+=1,this.tabs[this.focusedTabIndex]?.focus());break;case`ArrowLeft`:case`Left`:e.preventDefault(),this.focusedTabIndex-1>=0&&(--this.focusedTabIndex,this.tabs[this.focusedTabIndex]?.focus());break;case`Enter`:case` `:e.preventDefault(),this.focusedTabIndex>=0&&this.focusedTabIndex<this.tabs?.length&&this.handleChangeSelectedTab(this.focusedTabIndex);break;default:break}},this.hasScrollLeft=!1,this.hasScrollRight=!1,this.resizeObserver=new ResizeObserver(()=>{this.handleScrollNav()}),this.handleScrollNav=()=>{let e=this.nav?.scrollLeft+this.nav?.clientWidth;this.hasScrollLeft=this.nav?.scrollLeft>0,this.hasScrollRight=e<this.nav?.scrollWidth},this.handleScrollLeft=()=>{this.nav.scrollBy({left:-150,behavior:`smooth`})},this.handleScrollRight=()=>{this.nav.scrollBy({left:150,behavior:`smooth`})},this.handleFocus=e=>{let t=e.target,n=this.tabs?.findIndex(e=>e===t)??-1;if(n<0||this.disabled){e.preventDefault();return}this.focusedTabIndex=n},this.handleBlur=()=>{this.focusedTabIndex=-1}}static{this.styles=[l.commonStyles,l.navigationStyles,l.tabsStyles,l.panelsStyles]}get selectedTab(){return this._selectedTab??this._selectedTabState}set selectedTab(e){this._selectedTab=e}connectedCallback(){super.connectedCallback(),this.tabs=Array.from(this.querySelectorAll(`[slot=tab]`)),this.panels=Array.from(this.querySelectorAll(`[slot=panel]`))}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.disconnect(),window.removeEventListener(`resize`,this.handleScrollNav)}getScrollButtonTemplate(t,n){if(!this.theme||t===`left`&&!this.hasScrollLeft||t===`right`&&!this.hasScrollRight)return e.E;let r=`arrow-${t}`,i=u.themeConfig[this.theme]?.[`icon-button-variant`];return this.componentFactory.createIconButton({class:`nav-arrow ${t}`,"data-aria-label":`nav-arrow-${t}`,"@click":n,size:this.size===`medium`?`medium`:`large`,"icon-name":r,mode:this.mode,variant:i})}firstUpdated(){this.handleScrollNav(),this.resizeObserver.observe(this.nav),this.tabs.forEach(e=>this.resizeObserver.observe(e)),window.addEventListener(`resize`,this.handleScrollNav),this.nav.addEventListener(`scroll`,this.handleScrollNav),this.setTabsFocusable()}updated(e){if(super.updated(e),(e.has(`_selectedTab`)||e.has(`_selectedTabState`))&&this.selectTab(this.selectedTab),e.has(`variant`)){let e=this.variant===`secondary`||this.variant===`primary`?this.variant:`primary`;this.variant!==e&&(this.variant=e)}this.setupTabAccessibility()}handleTabsSlotchange(e){this.tabs=e.target.assignedNodes({flatten:!0}),this.setTabsFocusable()}handlePanelSlotchange(e){this.panels=e.target.assignedNodes({flatten:!0}),this.setTabsFocusable()}setTabsFocusable(){this.tabs?.forEach(e=>{e.setAttribute(`tabindex`,`0`)})}selectTab(e){this.tabs?.forEach((t,n)=>{t.removeAttribute(`selected`),t.setAttribute(`aria-selected`,n===e?`true`:`false`)}),this.tabs[e]?.setAttribute(`selected`,``),this.panels.forEach(e=>e.removeAttribute(`selected`)),this.panels[e]?.setAttribute(`selected`,``);let t=this.tabs?.[this.selectedTab];this.nav.scrollLeft=t?.offsetLeft-this.nav?.offsetWidth/2}setupTabAccessibility(){this.tabs?.forEach((e,t)=>{e.setAttribute(`role`,`tab`),e.setAttribute(`tabindex`,t===this.selectedTab&&!this.disabled?`0`:`-1`),e.addEventListener(`focus`,this.handleFocus),e.addEventListener(`blur`,this.handleBlur)})}handleChangeSelectedTab(e){this.dispatchEvent(new CustomEvent(`change`,{bubbles:!0,composed:!0,detail:{selectedTab:e}})),this._selectedTabState=e,this._selectedTab=void 0}handleSelect(e){let t;this.tabs.forEach((n,r)=>{(n===e.target||n.contains(e.target))&&(t=r)}),!(typeof t!=`number`||t===this.selectedTab)&&this.handleChangeSelectedTab(t)}get classes(){return{container:!0,[this.size]:!0,[this.mode]:!0,[this.variant]:!0,disabled:this.disabled}}get navContainerClasses(){return{"nav-container":!0,"scroll-left":this.hasScrollLeft,"scroll-right":this.hasScrollRight}}render(){return e.x`
|
|
2
2
|
<div part="container" class=${c.e(this.classes)}>
|
|
3
3
|
<div class=${c.e(this.navContainerClasses)}>
|
|
4
4
|
${this.getScrollButtonTemplate(`left`,this.handleScrollLeft)}
|
|
@@ -9,4 +9,4 @@ const e=require(`../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/l
|
|
|
9
9
|
</div>
|
|
10
10
|
<slot @slotchange=${this.handlePanelSlotchange} name="panel"></slot>
|
|
11
11
|
</div>
|
|
12
|
-
`}};i.__decorate([t.n({type:Number,attribute:`selected-tab`,reflect:!0})],d.prototype,`
|
|
12
|
+
`}};i.__decorate([t.n({type:Number,attribute:`selected-tab`,reflect:!0})],d.prototype,`_selectedTab`,void 0),i.__decorate([n.r()],d.prototype,`_selectedTabState`,void 0),i.__decorate([t.n({type:String,reflect:!0})],d.prototype,`mode`,void 0),i.__decorate([t.n({type:String,reflect:!0})],d.prototype,`variant`,void 0),i.__decorate([t.n({type:String})],d.prototype,`size`,void 0),i.__decorate([t.n({type:Boolean,converter:s.booleanConverter})],d.prototype,`disabled`,void 0),i.__decorate([n.r()],d.prototype,`focusedTabIndex`,void 0),i.__decorate([r.e(`nav`)],d.prototype,`nav`,void 0),i.__decorate([n.r()],d.prototype,`tabs`,void 0),i.__decorate([n.r()],d.prototype,`panels`,void 0),i.__decorate([n.r()],d.prototype,`hasScrollLeft`,void 0),i.__decorate([n.r()],d.prototype,`hasScrollRight`,void 0),d=i.__decorate([o.customUiKitElement(`ds-tabs`)],d);
|
|
@@ -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.120`,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,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`);require(`../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/decorators.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`);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(`../../decorators/customUiKitElement.cjs`),o=require(`../../utils/booleanConverter.cjs`),s=require(`../../utils/htmlWithTokens.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(`./styles/common.styles.cjs`);var u=class extends i.UiKitElement{constructor(...e){super(...e),this.size=`medium`,this._checked=void 0,this._checkedState=!1,this.disabled=!1,this.mode=`light`}static{this.styles=[l.commonStyles]}get checked(){return this._checked??this._checkedState}set checked(e){this._checked=e}handleClick(){let e=!this.checked;this._checkedState=e,this._checked=void 0,this.dispatchEvent(new CustomEvent(`change`,{bubbles:!0,composed:!0,detail:{checked:e}}))}handleClickOff(e){e.stopPropagation(),this.checked&&this.handleClick()}handleClickOn(e){e.stopPropagation(),!this.checked&&this.handleClick()}get styleTokens(){return s.htmlWithTokens`
|
|
2
2
|
<style>
|
|
3
3
|
:host {
|
|
4
4
|
color-scheme: ${this.mode};
|
|
@@ -7,7 +7,7 @@ require(`../ds-theme-provider/themeContext.cjs`);const e=require(`../../node_mod
|
|
|
7
7
|
`}get labelClasses(){return{container:!0,[this.size]:!!this.size,checked:this.checked,disabled:this.disabled,[this.mode]:!!this.mode}}render(){return e.x`
|
|
8
8
|
${this.styleTokens}
|
|
9
9
|
<div
|
|
10
|
-
class=${
|
|
10
|
+
class=${c.e(this.labelClasses)}
|
|
11
11
|
@click=${this.handleClick}
|
|
12
12
|
>
|
|
13
13
|
<slot name="off" @click=${this.handleClickOff}></slot>
|
|
@@ -27,4 +27,4 @@ require(`../ds-theme-provider/themeContext.cjs`);const e=require(`../../node_mod
|
|
|
27
27
|
</button>
|
|
28
28
|
<slot name="on" @click=${this.handleClickOn}></slot>
|
|
29
29
|
</div>
|
|
30
|
-
`}};
|
|
30
|
+
`}};r.__decorate([t.n({type:String})],u.prototype,`size`,void 0),r.__decorate([t.n({type:Boolean,attribute:`checked`,converter:o.booleanConverter,reflect:!0})],u.prototype,`_checked`,void 0),r.__decorate([n.r()],u.prototype,`_checkedState`,void 0),r.__decorate([t.n({type:Boolean,converter:o.booleanConverter,reflect:!0})],u.prototype,`disabled`,void 0),r.__decorate([t.n({type:String,reflect:!0})],u.prototype,`mode`,void 0),r.__decorate([t.n({type:String,attribute:`data-aria-label`})],u.prototype,`dataAriaLabel`,void 0),u=r.__decorate([a.customUiKitElement(`ds-toggle-switch`)],u);
|
|
@@ -1 +1 @@
|
|
|
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=typeof __UIKIT_TARGET__<`u`&&__UIKIT_TARGET__===`react`,o=a?`${n}${e.VERSION_TAG_SUFFIX}`:n;if(globalThis?.customElements?.get(o))return;let s=r?.skipTagAsComponentName?[]:[n];Array.isArray(r?.extendComponentNames)&&(s=[...r.extendComponentNames,...s]),globalThis?.customElements?.define?.(o,class extends i{constructor(...e){super(...e),this.componentFactory=a?t.reactFactory:t.standardFactory}static{this.componentName=s}connectedCallback(){i.prototype.connectedCallback?.call(this),this.setAttribute(`data-ui-kit-version`,`2.0.0-canary.
|
|
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=typeof __UIKIT_TARGET__<`u`&&__UIKIT_TARGET__===`react`,o=a?`${n}${e.VERSION_TAG_SUFFIX}`:n;if(globalThis?.customElements?.get(o))return;let s=r?.skipTagAsComponentName?[]:[n];Array.isArray(r?.extendComponentNames)&&(s=[...r.extendComponentNames,...s]),globalThis?.customElements?.define?.(o,class extends i{constructor(...e){super(...e),this.componentFactory=a?t.reactFactory:t.standardFactory}static{this.componentName=s}connectedCallback(){i.prototype.connectedCallback?.call(this),this.setAttribute(`data-ui-kit-version`,`2.0.0-canary.120`)}})}}exports.customUiKitElement=n;
|
|
@@ -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.120`),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.120`),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.120/styles/${n}/components/${t}.css`,i=this.getCachedStyleSheetPromise({url:r});if(i)return i;let a=e(()=>this.fetchStyle({url:r})).then(e=>(e||this.stylePromises.delete(r),e));return this.stylePromises.set(r,a),this.stylePromises.get(r)}}async fetchStyle({url:e}){try{if(typeof fetch>`u`)return;let t=await fetch(e,{cache:`force-cache`});if(t.ok)return t.text()}catch(t){console.error(`Failed to fetch Style Sheet "${e}":`,t)}}getCachedStyleSheetPromise({url:e}){return this.stylePromises.get(e)}static getInstance(){return t.instance||=new t,t.instance}}.getInstance();exports.stylesRegistry=t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.cjs`);require(`../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.cjs`);function t(t,...n){return e.i`${e.r(String.raw({raw:t},...n).replace(/(--private-[\w-]+)(?=\s*[):,])/g,`$1-v2-0-0-canary-
|
|
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-120`))}`}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-120`))}`}exports.htmlWithTokens=n;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=`2.0.0-canary.
|
|
1
|
+
var e=`2.0.0-canary.120`,t=`--v${e.replaceAll(`.`,`-`)}`;exports.VERSION=e,exports.VERSION_TAG_SUFFIX=t;
|
|
@@ -17,7 +17,13 @@ import { commonStyles as h } from "./styles/common.styles.js";
|
|
|
17
17
|
//#region src/components/ds-checkbox/ds-checkbox.ts
|
|
18
18
|
var g = class extends m(o) {
|
|
19
19
|
constructor(...e) {
|
|
20
|
-
super(...e), this.inputPlacement = "left", this.
|
|
20
|
+
super(...e), this.inputPlacement = "left", this._checked = void 0, this._checkedState = !1, this.required = !1, this._disabled = !1, this.mode = "light", this._size = "medium", this.helperText = "", this.infoText = "", this._forcedError = "", this.invalidError = "", this.indeterminate = !1, this.dataAriaLabel = "";
|
|
21
|
+
}
|
|
22
|
+
get checked() {
|
|
23
|
+
return this._checked ?? this._checkedState;
|
|
24
|
+
}
|
|
25
|
+
set checked(e) {
|
|
26
|
+
this._checked = e;
|
|
21
27
|
}
|
|
22
28
|
static {
|
|
23
29
|
this.styles = [h];
|
|
@@ -77,11 +83,12 @@ var g = class extends m(o) {
|
|
|
77
83
|
return this.errorGroup ?? !!this._forcedError;
|
|
78
84
|
}
|
|
79
85
|
handleChange(e) {
|
|
80
|
-
|
|
86
|
+
let t = e.target.checked;
|
|
87
|
+
this._checkedState = t, this._checked = void 0, this.dispatchEvent(new CustomEvent("change", {
|
|
81
88
|
bubbles: !0,
|
|
82
89
|
composed: !0,
|
|
83
90
|
detail: {
|
|
84
|
-
checked:
|
|
91
|
+
checked: t,
|
|
85
92
|
value: this.value
|
|
86
93
|
}
|
|
87
94
|
}));
|
|
@@ -155,9 +162,10 @@ a([r({ type: String })], g.prototype, "name", void 0), a([r({ type: String })],
|
|
|
155
162
|
attribute: "input-placement"
|
|
156
163
|
})], g.prototype, "inputPlacement", void 0), a([r({
|
|
157
164
|
type: Boolean,
|
|
165
|
+
attribute: "checked",
|
|
158
166
|
converter: c,
|
|
159
167
|
reflect: !0
|
|
160
|
-
})], g.prototype, "
|
|
168
|
+
})], g.prototype, "_checked", void 0), a([i()], g.prototype, "_checkedState", void 0), a([r({
|
|
161
169
|
type: Boolean,
|
|
162
170
|
converter: c
|
|
163
171
|
})], g.prototype, "required", void 0), a([r({
|
|
@@ -50,25 +50,23 @@ var l = class extends i {
|
|
|
50
50
|
get periodTemplate() {
|
|
51
51
|
if (!this.period) return e;
|
|
52
52
|
let n = new Intl.DisplayNames(this.locale, { type: "dateTimeField" });
|
|
53
|
-
return t
|
|
54
|
-
<span class=${o({
|
|
53
|
+
return t`<span class=${o({
|
|
55
54
|
period: !0,
|
|
56
55
|
text: !0,
|
|
57
56
|
[`size-${this.periodSize}`]: !0,
|
|
58
57
|
[`weight-${this.periodWeight}`]: !0
|
|
59
|
-
})}"period">/${n.of(this.period)}</span
|
|
60
|
-
`;
|
|
58
|
+
})}"period">/${n.of(this.period)}</span>`;
|
|
61
59
|
}
|
|
62
60
|
get noteTemplate() {
|
|
63
|
-
return this.note ? t
|
|
61
|
+
return this.note ? t`<span class=${o({
|
|
64
62
|
note: !0,
|
|
65
63
|
text: !0,
|
|
66
64
|
[`size-${this.noteSize}`]: !0,
|
|
67
65
|
[`weight-${this.noteWeight}`]: !0
|
|
68
|
-
})}>${this.note}</span
|
|
66
|
+
})}>${this.note}</span>` : e;
|
|
69
67
|
}
|
|
70
68
|
render() {
|
|
71
|
-
return t
|
|
69
|
+
return t`<div class="container">${this.valueTemplate}${this.periodTemplate}${this.noteTemplate}</div>`;
|
|
72
70
|
}
|
|
73
71
|
};
|
|
74
72
|
r([n({ type: String })], l.prototype, "locale", void 0), r([n({
|
|
@@ -3,12 +3,12 @@ import "../../../node_modules/.pnpm/lit@3.3.1/node_modules/lit/index.js";
|
|
|
3
3
|
//#region src/components/ds-currency/styles/common.styles.ts
|
|
4
4
|
var t = e`
|
|
5
5
|
:host {
|
|
6
|
-
display:
|
|
6
|
+
display: contents;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
.container {
|
|
10
10
|
display: inline-flex;
|
|
11
|
-
align-items:
|
|
11
|
+
align-items: baseline;
|
|
12
12
|
}
|
|
13
13
|
`;
|
|
14
14
|
//#endregion
|
|
@@ -16,7 +16,7 @@ import { commonStyles as f } from "./styles/common.styles.js";
|
|
|
16
16
|
//#region src/components/ds-dialog/ds-dialog.ts
|
|
17
17
|
var p = class extends o {
|
|
18
18
|
constructor(...e) {
|
|
19
|
-
super(...e), this.lockClose = !1, this.lockScroll = !0, this.
|
|
19
|
+
super(...e), this.lockClose = !1, this.lockScroll = !0, this._open = void 0, this._openState = !1, this.size = "medium", this.hasBeenOpened = !1, this.hasScroll = !1, this.debouncedCheckScroll = u({ func: () => this.checkScroll() }), this.scrollLocked = !1, this.handleCloseButtonClick = () => {
|
|
20
20
|
this.handleClose("button");
|
|
21
21
|
}, this.handleDialogClick = (e) => {
|
|
22
22
|
e.target === this.nativeDialog && this.handleClose("backdrop");
|
|
@@ -29,8 +29,14 @@ var p = class extends o {
|
|
|
29
29
|
static {
|
|
30
30
|
this.styles = [f];
|
|
31
31
|
}
|
|
32
|
+
get open() {
|
|
33
|
+
return this._open ?? this._openState;
|
|
34
|
+
}
|
|
35
|
+
set open(e) {
|
|
36
|
+
this._open = e;
|
|
37
|
+
}
|
|
32
38
|
updated(e) {
|
|
33
|
-
super.updated(e), !this.hasBeenOpened && e.has("
|
|
39
|
+
super.updated(e), !this.hasBeenOpened && (e.has("_open") || e.has("_openState")) && this.open && (this.hasBeenOpened = !0), (e.has("_open") || e.has("_openState")) && (this.open || (this.hasScroll = !1), this.handleResizeObserver(), this.syncNativeDialogState(), this.syncScrollLock());
|
|
34
40
|
}
|
|
35
41
|
syncScrollLock() {
|
|
36
42
|
this.open && this.lockScroll ? (d.lock(), this.scrollLocked = !0) : this.scrollLocked &&= (d.unlock(), !1);
|
|
@@ -65,7 +71,7 @@ var p = class extends o {
|
|
|
65
71
|
}));
|
|
66
72
|
}
|
|
67
73
|
handleClose(e) {
|
|
68
|
-
this.lockClose || (this.
|
|
74
|
+
this.lockClose || (this._openState = !1, this._open = void 0, this.dispatchCloseEvents(e));
|
|
69
75
|
}
|
|
70
76
|
connectedCallback() {
|
|
71
77
|
super.connectedCallback(), this.resizeObserver = new ResizeObserver(this.debouncedCheckScroll), this.handleResizeObserver(), this.addEventListener("click", this.handleHostClick);
|
|
@@ -109,8 +115,9 @@ a([n({
|
|
|
109
115
|
attribute: "lock-scroll"
|
|
110
116
|
})], p.prototype, "lockScroll", void 0), a([n({
|
|
111
117
|
type: Boolean,
|
|
118
|
+
attribute: "open",
|
|
112
119
|
converter: c
|
|
113
|
-
})], p.prototype, "
|
|
120
|
+
})], p.prototype, "_open", void 0), a([r()], p.prototype, "_openState", void 0), a([n({ type: String })], p.prototype, "size", void 0), a([n({
|
|
114
121
|
type: String,
|
|
115
122
|
attribute: "data-aria-label"
|
|
116
123
|
})], p.prototype, "dataAriaLabel", void 0), a([n({
|
|
@@ -15,18 +15,24 @@ import { commonStyles as d } from "./styles/common.styles.js";
|
|
|
15
15
|
//#region src/components/ds-dialog-fullscreen/ds-dialog-fullscreen.ts
|
|
16
16
|
var f = class extends o {
|
|
17
17
|
constructor(...e) {
|
|
18
|
-
super(...e), this.lockClose = !1, this.lockScroll = !0, this.
|
|
18
|
+
super(...e), this.lockClose = !1, this.lockScroll = !0, this._open = void 0, this._openState = !1, this.hasScroll = !1, this.hasBeenOpened = !1, this.debouncedCheckScroll = u({ func: () => this.checkScroll() }), this.handleKeyDown = (e) => {
|
|
19
19
|
this.open && e.key === "Escape" && this.handleClose();
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
static {
|
|
23
23
|
this.styles = [d];
|
|
24
24
|
}
|
|
25
|
+
get open() {
|
|
26
|
+
return this._open ?? this._openState;
|
|
27
|
+
}
|
|
28
|
+
set open(e) {
|
|
29
|
+
this._open = e;
|
|
30
|
+
}
|
|
25
31
|
willUpdate(e) {
|
|
26
|
-
super.willUpdate(e), !this.hasBeenOpened && e.has("
|
|
32
|
+
super.willUpdate(e), !this.hasBeenOpened && (e.has("_open") || e.has("_openState")) && this.open && (this.hasBeenOpened = !0);
|
|
27
33
|
}
|
|
28
34
|
updated(e) {
|
|
29
|
-
super.updated(e), e.has("
|
|
35
|
+
super.updated(e), (e.has("_open") || e.has("_openState")) && this.handleResizeObserver();
|
|
30
36
|
}
|
|
31
37
|
async handleResizeObserver() {
|
|
32
38
|
this.lockScroll && (document.getElementById("storybook-root") || (document.body.style.overflow = this.open ? "hidden" : "")), this.resizeObserver?.disconnect(), this.content && (this.resizeObserver.observe(this.content), await new Promise(requestAnimationFrame), this.checkScroll());
|
|
@@ -39,7 +45,7 @@ var f = class extends o {
|
|
|
39
45
|
};
|
|
40
46
|
}
|
|
41
47
|
handleClose() {
|
|
42
|
-
this.lockClose || (this.
|
|
48
|
+
this.lockClose || (this._openState = !1, this._open = void 0, this.dispatchEvent(new Event("ds-dialog-fullscreen:close", {
|
|
43
49
|
bubbles: !0,
|
|
44
50
|
composed: !0
|
|
45
51
|
})));
|
|
@@ -84,6 +90,7 @@ a([n({
|
|
|
84
90
|
attribute: "lock-scroll"
|
|
85
91
|
})], f.prototype, "lockScroll", void 0), a([n({
|
|
86
92
|
type: Boolean,
|
|
93
|
+
attribute: "open",
|
|
87
94
|
converter: c
|
|
88
|
-
})], f.prototype, "
|
|
95
|
+
})], f.prototype, "_open", void 0), a([r()], f.prototype, "_openState", void 0), a([r()], f.prototype, "hasScroll", void 0), a([i(".content")], f.prototype, "content", void 0), f = a([s("ds-dialog-fullscreen")], f);
|
|
89
96
|
//#endregion
|