@warp-ds/elements 2.2.0-next.20 → 2.2.0-next.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -37
- package/dist/api.js.map +1 -1
- package/dist/custom-elements.json +1118 -977
- package/dist/index.d.ts +183 -162
- package/dist/packages/affix/affix.react.stories.d.ts +9 -0
- package/dist/packages/affix/affix.react.stories.js +10 -0
- package/dist/packages/affix/affix.stories.js +1 -1
- package/dist/packages/affix/index.js +1 -1
- package/dist/packages/affix/index.js.map +4 -4
- package/dist/packages/affix/react.d.ts +1 -1
- package/dist/packages/affix/react.js +10 -3
- package/dist/packages/alert/alert.react.stories.d.ts +13 -0
- package/dist/packages/alert/alert.react.stories.js +44 -0
- package/dist/packages/alert/alert.stories.js +1 -1
- package/dist/packages/alert/alert.test.js +3 -1
- package/dist/packages/alert/index.d.ts +1 -1
- package/dist/packages/alert/index.js +2 -2
- package/dist/packages/alert/index.js.map +4 -4
- package/dist/packages/alert/react.d.ts +1 -1
- package/dist/packages/alert/react.js +6 -3
- package/dist/packages/alert/styles.js +1 -1
- package/dist/packages/attention/attention.react.stories.d.ts +15 -0
- package/dist/packages/attention/attention.react.stories.js +92 -0
- package/dist/packages/attention/attention.stories.d.ts +1 -0
- package/dist/packages/attention/attention.stories.js +31 -39
- package/dist/packages/attention/attention.test.js +1 -1
- package/dist/packages/attention/index.d.ts +3 -2
- package/dist/packages/attention/index.js +238 -17
- package/dist/packages/attention/index.js.map +4 -4
- package/dist/packages/attention/react.d.ts +15 -1
- package/dist/packages/attention/react.js +13 -5
- package/dist/packages/attention/styles.js +1 -1
- package/dist/packages/badge/badge.react.stories.d.ts +18 -0
- package/dist/packages/badge/badge.react.stories.js +60 -0
- package/dist/packages/badge/badge.stories.js +1 -1
- package/dist/packages/badge/index.js +1 -1
- package/dist/packages/badge/index.js.map +4 -4
- package/dist/packages/badge/react.d.ts +1 -1
- package/dist/packages/badge/react.js +6 -3
- package/dist/packages/box/box.react.stories.d.ts +15 -0
- package/dist/packages/box/box.react.stories.js +45 -0
- package/dist/packages/box/box.stories.js +1 -1
- package/dist/packages/box/index.js +3 -3
- package/dist/packages/box/index.js.map +4 -4
- package/dist/packages/box/react.d.ts +1 -1
- package/dist/packages/box/react.js +6 -3
- package/dist/packages/breadcrumbs/breadcrumbs.react.stories.d.ts +13 -0
- package/dist/packages/breadcrumbs/breadcrumbs.react.stories.js +40 -0
- package/dist/packages/breadcrumbs/breadcrumbs.stories.js +1 -1
- package/dist/packages/breadcrumbs/index.js +6 -6
- package/dist/packages/breadcrumbs/index.js.map +4 -4
- package/dist/packages/breadcrumbs/react.d.ts +1 -1
- package/dist/packages/breadcrumbs/react.js +6 -3
- package/dist/packages/button/button.react.stories.d.ts +22 -0
- package/dist/packages/button/button.react.stories.js +102 -0
- package/dist/packages/button/button.stories.js +1 -1
- package/dist/packages/button/index.js +2 -2
- package/dist/packages/button/index.js.map +4 -4
- package/dist/packages/button/react.d.ts +1 -1
- package/dist/packages/button/react.js +6 -3
- package/dist/packages/card/card.react.stories.d.ts +16 -0
- package/dist/packages/card/card.react.stories.js +63 -0
- package/dist/packages/card/card.stories.js +2 -2
- package/dist/packages/card/index.d.ts +1 -1
- package/dist/packages/card/index.js +2 -2
- package/dist/packages/card/index.js.map +4 -4
- package/dist/packages/card/react.d.ts +1 -1
- package/dist/packages/card/react.js +6 -3
- package/dist/packages/combobox/combobox.react.stories.d.ts +28 -0
- package/dist/packages/combobox/combobox.react.stories.js +90 -0
- package/dist/packages/combobox/combobox.stories.d.ts +5 -1
- package/dist/packages/combobox/combobox.stories.js +47 -25
- package/dist/packages/combobox/index.d.ts +1 -1
- package/dist/packages/combobox/index.js +4 -4
- package/dist/packages/combobox/index.js.map +4 -4
- package/dist/packages/combobox/react.d.ts +7 -0
- package/dist/packages/combobox/react.js +17 -0
- package/dist/packages/datepicker/DatePicker.test.d.ts +1 -0
- package/dist/packages/datepicker/DatePicker.test.js +3 -2
- package/dist/packages/datepicker/datepicker.d.ts +1 -1
- package/dist/packages/datepicker/datepicker.js +105 -105
- package/dist/packages/datepicker/datepicker.js.map +4 -4
- package/dist/packages/datepicker/datepicker.react.stories.d.ts +18 -0
- package/dist/packages/datepicker/datepicker.react.stories.js +26 -0
- package/dist/packages/datepicker/datepicker.stories.js +1 -1
- package/dist/packages/datepicker/datepicker.test.js +1 -1
- package/dist/packages/datepicker/index.js +105 -105
- package/dist/packages/datepicker/index.js.map +4 -4
- package/dist/packages/datepicker/react.d.ts +5 -2
- package/dist/packages/datepicker/react.js +10 -3
- package/dist/packages/dead-toggle/dead-toggle.react.stories.d.ts +15 -0
- package/dist/packages/dead-toggle/dead-toggle.react.stories.js +34 -0
- package/dist/packages/dead-toggle/dead-toggle.stories.d.ts +5 -1
- package/dist/packages/dead-toggle/dead-toggle.stories.js +25 -3
- package/dist/packages/dead-toggle/index.js +1 -1
- package/dist/packages/dead-toggle/index.js.map +2 -2
- package/dist/packages/dead-toggle/react.d.ts +1 -1
- package/dist/packages/dead-toggle/react.js +6 -3
- package/dist/packages/expandable/expandable.react.stories.d.ts +18 -0
- package/dist/packages/expandable/expandable.react.stories.js +103 -0
- package/dist/packages/expandable/expandable.stories.js +1 -1
- package/dist/packages/expandable/index.js +2 -2
- package/dist/packages/expandable/index.js.map +4 -4
- package/dist/packages/expandable/react.d.ts +1 -1
- package/dist/packages/expandable/react.js +6 -3
- package/dist/packages/i18n.js +2 -1
- package/dist/packages/link/index.js +1 -1
- package/dist/packages/link/index.js.map +4 -4
- package/dist/packages/link/link.react.stories.d.ts +21 -0
- package/dist/packages/link/link.react.stories.js +96 -0
- package/dist/packages/link/link.stories.js +1 -12
- package/dist/packages/link/link.test.js +1 -1
- package/dist/packages/link/react.d.ts +1 -1
- package/dist/packages/link/react.js +6 -3
- package/dist/packages/modal/index.js +8 -8
- package/dist/packages/modal/index.js.map +4 -4
- package/dist/packages/modal/modal-footer.js +3 -3
- package/dist/packages/modal/modal-footer.js.map +3 -3
- package/dist/packages/modal/modal-header.js +4 -4
- package/dist/packages/modal/modal-header.js.map +4 -4
- package/dist/packages/modal/modal-main.js.map +1 -1
- package/dist/packages/modal/modal.react.stories.d.ts +14 -0
- package/dist/packages/modal/modal.react.stories.js +27 -0
- package/dist/packages/modal/modal.stories.d.ts +1 -1
- package/dist/packages/modal/modal.stories.js +1 -1
- package/dist/packages/modal/react.d.ts +11 -3
- package/dist/packages/modal/react.js +19 -6
- package/dist/packages/pageindicator/pageindicator.react.stories.d.ts +19 -0
- package/dist/packages/pageindicator/pageindicator.react.stories.js +20 -0
- package/dist/packages/pageindicator/pageindicator.stories.d.ts +1 -1
- package/dist/packages/pageindicator/pageindicator.stories.js +1 -1
- package/dist/packages/pageindicator/react.d.ts +1 -1
- package/dist/packages/pageindicator/react.js +6 -3
- package/dist/packages/pagination/index.js +9 -3
- package/dist/packages/pagination/index.js.map +3 -3
- package/dist/packages/pagination/pagination.react.stories.d.ts +21 -0
- package/dist/packages/pagination/pagination.react.stories.js +45 -0
- package/dist/packages/pagination/pagination.stories.js +6 -6
- package/dist/packages/pagination/pagination.test.js +1 -1
- package/dist/packages/pagination/react.d.ts +5 -2
- package/dist/packages/pagination/react.js +10 -3
- package/dist/packages/pill/index.js +1 -1
- package/dist/packages/pill/index.js.map +2 -2
- package/dist/packages/pill/pill.react.stories.d.ts +23 -0
- package/dist/packages/pill/pill.react.stories.js +22 -0
- package/dist/packages/pill/pill.stories.js +1 -1
- package/dist/packages/pill/pill.test.js +3 -1
- package/dist/packages/pill/react.d.ts +7 -0
- package/dist/packages/pill/react.js +17 -0
- package/dist/packages/pill/styles.js +1 -1
- package/dist/packages/rip-and-tear-checkbox/checkbox.js +5 -5
- package/dist/packages/rip-and-tear-checkbox/checkbox.js.map +3 -3
- package/dist/packages/rip-and-tear-checkbox/checkbox.stories.d.ts +8 -0
- package/dist/packages/rip-and-tear-checkbox/checkbox.stories.js +11 -0
- package/dist/packages/rip-and-tear-checkbox/index.js +5 -5
- package/dist/packages/rip-and-tear-checkbox/index.js.map +3 -3
- package/dist/packages/rip-and-tear-checkbox/react.d.ts +5 -0
- package/dist/packages/rip-and-tear-checkbox/react.js +15 -0
- package/dist/packages/rip-and-tear-checkbox/rip-and-tear-checkbox.react.stories.d.ts +12 -0
- package/dist/packages/rip-and-tear-checkbox/rip-and-tear-checkbox.react.stories.js +10 -0
- package/dist/packages/rip-and-tear-radio/index.js +8 -8
- package/dist/packages/rip-and-tear-radio/index.js.map +3 -3
- package/dist/packages/rip-and-tear-radio/radio-group.js +8 -8
- package/dist/packages/rip-and-tear-radio/radio-group.js.map +3 -3
- package/dist/packages/rip-and-tear-radio/radio.js.map +2 -2
- package/dist/packages/rip-and-tear-radio/radio.stories.js +9 -9
- package/dist/packages/rip-and-tear-radio/radio.stories.js.map +3 -3
- package/dist/packages/rip-and-tear-radio/react.d.ts +9 -0
- package/dist/packages/rip-and-tear-radio/react.js +22 -0
- package/dist/packages/rip-and-tear-radio/rip-and-tear-radio.react.stories.d.ts +9 -0
- package/dist/packages/rip-and-tear-radio/rip-and-tear-radio.react.stories.js +10 -0
- package/dist/packages/rip-and-tear-radio/slot.js +3 -3
- package/dist/packages/select/index.d.ts +4 -4
- package/dist/packages/select/index.js +12 -12
- package/dist/packages/select/index.js.map +3 -3
- package/dist/packages/select/react.d.ts +6 -2
- package/dist/packages/select/react.js +15 -3
- package/dist/packages/select/select.react.stories.d.ts +18 -0
- package/dist/packages/select/select.react.stories.js +28 -0
- package/dist/packages/select/select.stories.js +2 -2
- package/dist/packages/select/select.test.js +1 -1
- package/dist/packages/select/styles.js +1 -1
- package/dist/packages/slider/Slider.js +1 -1
- package/dist/packages/slider/SliderThumb.js +1 -1
- package/dist/packages/slider/index.js +6 -6
- package/dist/packages/slider/index.js.map +4 -4
- package/dist/packages/slider/react.d.ts +8 -0
- package/dist/packages/slider/react.js +20 -0
- package/dist/packages/slider/slider-thumb.js +3 -3
- package/dist/packages/slider/slider-thumb.js.map +4 -4
- package/dist/packages/slider/slider.js +2 -2
- package/dist/packages/slider/slider.js.map +4 -4
- package/dist/packages/slider/slider.react.stories.d.ts +18 -0
- package/dist/packages/slider/slider.react.stories.js +119 -0
- package/dist/packages/slider/slider.stories.js +2 -2
- package/dist/packages/slider/slider.test.js +1 -1
- package/dist/packages/slider/styles.js +1 -1
- package/dist/packages/steps/index.js +2 -2
- package/dist/packages/steps/index.js.map +4 -4
- package/dist/packages/steps/react.d.ts +1 -1
- package/dist/packages/steps/react.js +7 -4
- package/dist/packages/steps/steps.react.stories.d.ts +15 -0
- package/dist/packages/steps/steps.react.stories.js +112 -0
- package/dist/packages/switch/index.js +1 -1
- package/dist/packages/switch/index.js.map +4 -4
- package/dist/packages/switch/react.d.ts +5 -2
- package/dist/packages/switch/react.js +10 -3
- package/dist/packages/switch/switch.react.stories.d.ts +15 -0
- package/dist/packages/switch/switch.react.stories.js +29 -0
- package/dist/packages/tabs/index.d.ts +1 -1
- package/dist/packages/tabs/index.js +12 -12
- package/dist/packages/tabs/index.js.map +4 -4
- package/dist/packages/tabs/react.d.ts +11 -3
- package/dist/packages/tabs/react.js +18 -5
- package/dist/packages/tabs/tab-panel.js.map +2 -2
- package/dist/packages/tabs/tab.js +1 -1
- package/dist/packages/tabs/tab.js.map +4 -4
- package/dist/packages/tabs/tabs.d.ts +2 -0
- package/dist/packages/tabs/tabs.js +4 -4
- package/dist/packages/tabs/tabs.js.map +4 -4
- package/dist/packages/tabs/tabs.react.stories.d.ts +15 -0
- package/dist/packages/tabs/tabs.react.stories.js +51 -0
- package/dist/packages/tabs/tabs.stories.js +12 -12
- package/dist/packages/tabs/tabs.stories.js.map +4 -4
- package/dist/packages/textfield/index.js +2 -2
- package/dist/packages/textfield/index.js.map +4 -4
- package/dist/packages/textfield/react.d.ts +11 -2
- package/dist/packages/textfield/react.js +16 -3
- package/dist/packages/textfield/styles.js +1 -1
- package/dist/packages/textfield/textfield.react.stories.d.ts +37 -0
- package/dist/packages/textfield/textfield.react.stories.js +88 -0
- package/dist/packages/textfield/textfield.stories.js +1 -1
- package/dist/packages/textfield/textfield.test.js +1 -1
- package/dist/packages/toast/api.d.ts +1 -1
- package/dist/packages/toast/index.d.ts +1 -1
- package/dist/packages/toast/index.js +14 -14
- package/dist/packages/toast/index.js.map +4 -4
- package/dist/packages/toast/toast-container.d.ts +1 -1
- package/dist/packages/toast/toast-container.js +2454 -149
- package/dist/packages/toast/toast-container.js.map +7 -0
- package/dist/packages/toast/toast.js +2459 -193
- package/dist/packages/toast/toast.js.map +7 -0
- package/dist/packages/toast/toast.stories.js +1 -1
- package/dist/packages/utils/expand-transition.js +1 -1
- package/dist/vscode.html-custom-data.json +83 -78
- package/dist/web-types.json +135 -127
- package/package.json +22 -21
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var ie=Object.defineProperty;var se=Object.getOwnPropertyDescriptor;var U=a=>{throw TypeError(a)};var u=(a,o,e,r)=>{for(var n=r>1?void 0:r?se(o,e):o,p=a.length-1,g;p>=0;p--)(g=a[p])&&(n=(r?g(o,e,n):g(n))||n);return r&&n&&ie(o,e,n),n};var R=(a,o,e)=>o.has(a)||U("Cannot "+e);var B=(a,o,e)=>(R(a,o,"read from private field"),e?e.call(a):o.get(a)),L=(a,o,e)=>o.has(a)?U("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(a):o.set(a,e),G=(a,o,e,r)=>(R(a,o,"write to private field"),r?r.call(a,e):o.set(a,e),e),m=(a,o,e)=>(R(a,o,"access private method"),e);
|
|
1
|
+
var ie=Object.defineProperty;var se=Object.getOwnPropertyDescriptor;var U=a=>{throw TypeError(a)};var u=(a,o,e,r)=>{for(var n=r>1?void 0:r?se(o,e):o,p=a.length-1,g;p>=0;p--)(g=a[p])&&(n=(r?g(o,e,n):g(n))||n);return r&&n&&ie(o,e,n),n};var R=(a,o,e)=>o.has(a)||U("Cannot "+e);var B=(a,o,e)=>(R(a,o,"read from private field"),e?e.call(a):o.get(a)),L=(a,o,e)=>o.has(a)?U("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(a):o.set(a,e),G=(a,o,e,r)=>(R(a,o,"write to private field"),r?r.call(a,e):o.set(a,e),e),m=(a,o,e)=>(R(a,o,"access private method"),e);var s=function(a,o,e,r){if(e==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof o=="function"?a!==o||!r:!o.has(a))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?r:e==="a"?r.call(a):r?r.value:o.get(a)},d=function(a,o,e,r,n){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof o=="function"?a!==o||!n:!o.has(a))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?n.call(a,e):n?n.value=e:o.set(a,e),e};function D(a){var o,e,r,n,p,g,f,P,z,j,A,X,S,C,T,k,Z,I,$;class ae extends a{constructor(...t){var i,l,c;super(...t),o.add(this),this.internals=this.attachInternals(),e.set(this,!1),r.set(this,!1),n.set(this,!1),p.set(this,void 0),g.set(this,void 0),f.set(this,!0),z.set(this,""),j.set(this,()=>{d(this,n,!0,"f"),d(this,e,!0,"f"),s(this,o,"m",k).call(this)}),A.set(this,()=>{d(this,e,!1,"f"),s(this,o,"m",Z).call(this,this.shouldFormValueUpdate()?s(this,z,"f"):""),!this.validity.valid&&s(this,n,"f")&&d(this,r,!0,"f");let x=s(this,o,"m",k).call(this);this.validationMessageCallback&&this.validationMessageCallback(x?this.internals.validationMessage:"")}),X.set(this,()=>{var x;s(this,f,"f")&&this.validationTarget&&(this.internals.setValidity(this.validity,this.validationMessage,this.validationTarget),d(this,f,!1,"f")),d(this,n,!0,"f"),d(this,r,!0,"f"),s(this,o,"m",k).call(this),(x=this===null||this===void 0?void 0:this.validationMessageCallback)===null||x===void 0||x.call(this,this.showError?this.internals.validationMessage:"")}),S.set(this,void 0),C.set(this,!1),T.set(this,Promise.resolve()),(i=this.addEventListener)===null||i===void 0||i.call(this,"focus",s(this,j,"f")),(l=this.addEventListener)===null||l===void 0||l.call(this,"blur",s(this,A,"f")),(c=this.addEventListener)===null||c===void 0||c.call(this,"invalid",s(this,X,"f")),this.setValue(null)}static get formAssociated(){return!0}static get validators(){return this.formControlValidators||[]}static get observedAttributes(){let t=this.validators.map(c=>c.attribute).flat(),i=super.observedAttributes||[];return[...new Set([...i,...t])]}static getValidator(t){return this.validators.find(i=>i.attribute===t)||null}static getValidators(t){return this.validators.filter(i=>{var l;if(i.attribute===t||!((l=i.attribute)===null||l===void 0)&&l.includes(t))return!0})}get form(){return this.internals.form}get showError(){return s(this,o,"m",k).call(this)}checkValidity(){return this.internals.checkValidity()}get validity(){return this.internals.validity}get validationMessage(){return this.internals.validationMessage}attributeChangedCallback(t,i,l){var c;(c=super.attributeChangedCallback)===null||c===void 0||c.call(this,t,i,l);let V=this.constructor.getValidators(t);V!=null&&V.length&&this.validationTarget&&this.setValue(s(this,z,"f"))}setValue(t){var i;d(this,r,!1,"f"),(i=this.validationMessageCallback)===null||i===void 0||i.call(this,""),d(this,z,t,"f");let c=this.shouldFormValueUpdate()?t:null;this.internals.setFormValue(c),s(this,o,"m",Z).call(this,c),this.valueChangedCallback&&this.valueChangedCallback(c),s(this,o,"m",k).call(this)}shouldFormValueUpdate(){return!0}get validationComplete(){return new Promise(t=>t(s(this,T,"f")))}formResetCallback(){var t,i;d(this,n,!1,"f"),d(this,r,!1,"f"),s(this,o,"m",k).call(this),(t=this.resetFormControl)===null||t===void 0||t.call(this),(i=this.validationMessageCallback)===null||i===void 0||i.call(this,s(this,o,"m",k).call(this)?this.validationMessage:"")}}return e=new WeakMap,r=new WeakMap,n=new WeakMap,p=new WeakMap,g=new WeakMap,f=new WeakMap,z=new WeakMap,j=new WeakMap,A=new WeakMap,X=new WeakMap,S=new WeakMap,C=new WeakMap,T=new WeakMap,o=new WeakSet,P=function(){let t=this.getRootNode(),i=`${this.localName}[name="${this.getAttribute("name")}"]`;return t.querySelectorAll(i)},k=function(){if(this.hasAttribute("disabled"))return!1;let t=s(this,r,"f")||s(this,n,"f")&&!this.validity.valid&&!s(this,e,"f");return t&&this.internals.states?this.internals.states.add("--show-error"):this.internals.states&&this.internals.states.delete("--show-error"),t},Z=function(t){let i=this.constructor,l={},c=i.validators,x=[],V=c.some(v=>v.isValid instanceof Promise);s(this,C,"f")||(d(this,T,new Promise(v=>{d(this,S,v,"f")}),"f"),d(this,C,!0,"f")),s(this,p,"f")&&(s(this,p,"f").abort(),d(this,g,s(this,p,"f"),"f"));let M=new AbortController;d(this,p,M,"f");let Y,O=!1;c.length&&(c.forEach(v=>{let q=v.key||"customError",y=v.isValid(this,t,M.signal);y instanceof Promise?(x.push(y),y.then(N=>{N!=null&&(l[q]=!N,Y=s(this,o,"m",$).call(this,v,t),s(this,o,"m",I).call(this,l,Y))})):(l[q]=!y,this.validity[q]!==!y&&(O=!0),!y&&!Y&&(Y=s(this,o,"m",$).call(this,v,t)))}),Promise.allSettled(x).then(()=>{var v;M!=null&&M.signal.aborted||(d(this,C,!1,"f"),(v=s(this,S,"f"))===null||v===void 0||v.call(this))}),(O||!V)&&s(this,o,"m",I).call(this,l,Y))},I=function(t,i){if(this.validationTarget)this.internals.setValidity(t,i,this.validationTarget),d(this,f,!1,"f");else{if(this.internals.setValidity(t,i),this.internals.validity.valid)return;d(this,f,!0,"f")}},$=function(t,i){if(this.validityCallback){let l=this.validityCallback(t.key||"customError");if(l)return l}return t.message instanceof Function?t.message(this,i):t.message},ae}import{html as Q,LitElement as ee,nothing as le}from"lit";import{property as w}from"lit/decorators.js";import{css as H}from"lit";var J=H`
|
|
2
2
|
*,
|
|
3
3
|
:before,
|
|
4
4
|
:after {
|
|
@@ -2565,5 +2565,5 @@ var ie=Object.defineProperty;var se=Object.getOwnPropertyDescriptor;var U=a=>{th
|
|
|
2565
2565
|
<slot class="w-slider__slider" name="from" @slotchange=${m(this,b,_)}></slot>
|
|
2566
2566
|
<slot class="w-slider__slider" name="to" @slotchange=${m(this,b,_)}></slot>
|
|
2567
2567
|
</fieldset>
|
|
2568
|
-
`}};E=new WeakMap,b=new WeakSet,_=function(){let e=this.querySelectorAll("w-slider-thumb");for(let r of e.values())r.min=this.min,r.max=this.max,r.step=this.step,r.suffix=this.suffix,r.required=this.required,r.formatter=this.formatter,r.ariaLabel||(r.slot||(r.ariaLabel=this.label),r.slot==="from"&&(r.ariaLabel=`${this.label} min`),r.slot==="to"&&(r.ariaLabel=`${this.label} max`)),r.forceDisabled=this.disabled,r.forceInvalid=this.invalid,m(this,b,W).call(this,r)},re=function(e){let r=e.target;m(this,b,W).call(this,r)},oe=function(e){e.stopPropagation(),this.invalid=e.detail.invalid},W=function(e){var n,p;let r=e.slot;if(r){let g=m(this,b,te).call(this),f=B(this,E),P=f-g;g<=f&&this.style.setProperty("--thumb-offset",String(P))}if(r||this.style.setProperty("--from","0"),r==="from"){let g=(n=e.value)!=null?n:e.value=this.min;this.style.setProperty("--from",g)}if(!r||r==="to"){let g=(p=e.value)!=null?p:e.value=this.max;this.style.setProperty("--to",g)}},te=function(){let e=window.getComputedStyle(this.shadowRoot.querySelector(".w-slider__active-range"),"::before").width;return Number.parseFloat(e.replace("px",""))},h.shadowRootOptions={...ee.shadowRootOptions,delegatesFocus:!0},h.styles=[J,K],u([w()],h.prototype,"label",2),u([w({type:Boolean,reflect:!0})],h.prototype,"disabled",2),u([w({type:Boolean,reflect:!0})],h.prototype,"invalid",2),u([w({type:Boolean,reflect:!0})],h.prototype,"required",2),u([w({reflect:!0})],h.prototype,"min",2),u([w({reflect:!0})],h.prototype,"max",2),u([w({type:Number})],h.prototype,"markers",2),u([w({type:Number})],h.prototype,"step",2),u([w()],h.prototype,"suffix",2),u([w({attribute:!1})],h.prototype,"formatter",2);customElements.get("w-slider")||customElements.define("w-slider",h);export{h as WarpSlider};
|
|
2568
|
+
`}};E=new WeakMap,b=new WeakSet,_=function(){let e=this.querySelectorAll("w-slider-thumb");for(let r of e.values())r.min=this.min,r.max=this.max,r.step=this.step,r.suffix=this.suffix,r.required=this.required,r.formatter=this.formatter,r.ariaLabel||(r.slot||(r.ariaLabel=this.label),r.slot==="from"&&(r.ariaLabel=`${this.label} min`),r.slot==="to"&&(r.ariaLabel=`${this.label} max`)),r.forceDisabled=this.disabled,r.forceInvalid=this.invalid,m(this,b,W).call(this,r)},re=function(e){let r=e.target;m(this,b,W).call(this,r)},oe=function(e){e.stopPropagation(),this.invalid=e.detail.invalid},W=function(e){var n,p;let r=e.slot;if(r){let g=m(this,b,te).call(this),f=B(this,E),P=f-g;g<=f&&this.style.setProperty("--thumb-offset",String(P))}if(r||this.style.setProperty("--from","0"),r==="from"){let g=(n=e.value)!=null?n:e.value=this.min;this.style.setProperty("--from",g)}if(!r||r==="to"){let g=(p=e.value)!=null?p:e.value=this.max;this.style.setProperty("--to",g)}},te=function(){let e=window.getComputedStyle(this.shadowRoot.querySelector(".w-slider__active-range"),"::before").width;return Number.parseFloat(e.replace("px",""))},h.shadowRootOptions={...ee.shadowRootOptions,delegatesFocus:!0},h.styles=[J,K],u([w({reflect:!0})],h.prototype,"label",2),u([w({type:Boolean,reflect:!0})],h.prototype,"disabled",2),u([w({type:Boolean,reflect:!0})],h.prototype,"invalid",2),u([w({type:Boolean,reflect:!0})],h.prototype,"required",2),u([w({reflect:!0})],h.prototype,"min",2),u([w({reflect:!0})],h.prototype,"max",2),u([w({type:Number,reflect:!0})],h.prototype,"markers",2),u([w({type:Number,reflect:!0})],h.prototype,"step",2),u([w({reflect:!0})],h.prototype,"suffix",2),u([w({attribute:!1})],h.prototype,"formatter",2);customElements.get("w-slider")||customElements.define("w-slider",h);export{h as WarpSlider};
|
|
2569
2569
|
//# sourceMappingURL=slider.js.map
|