@warp-ds/elements 2.2.0-next.20 → 2.2.0-next.21
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/api.js.map +1 -1
- package/dist/custom-elements.json +1219 -1078
- package/dist/index.d.ts +194 -173
- 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 +1 -1
- 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/attention/attention.react.stories.d.ts +15 -0
- package/dist/packages/attention/attention.react.stories.js +92 -0
- package/dist/packages/attention/attention.stories.js +17 -32
- 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/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.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/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/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 +2 -2
- 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/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 +1 -1
- 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/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 +90 -85
- package/dist/web-types.json +147 -139
- package/package.json +22 -21
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { EventName } from '@lit/react';
|
|
2
|
+
import { WarpSlider } from './slider';
|
|
3
|
+
import { WarpSliderThumb } from './slider-thumb';
|
|
4
|
+
export declare const Slider: import("@lit/react").ReactWebComponent<WarpSlider, {}>;
|
|
5
|
+
export declare const SliderThumb: import("@lit/react").ReactWebComponent<WarpSliderThumb, {
|
|
6
|
+
onSliderValidity: EventName<CustomEvent>;
|
|
7
|
+
'onslider-validity': EventName<CustomEvent>;
|
|
8
|
+
}>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { createComponent } from '@lit/react';
|
|
4
|
+
// decouple from CDN by providing a dummy class
|
|
5
|
+
class Component extends LitElement {
|
|
6
|
+
}
|
|
7
|
+
export const Slider = createComponent({
|
|
8
|
+
tagName: 'w-slider',
|
|
9
|
+
elementClass: Component,
|
|
10
|
+
react: React,
|
|
11
|
+
});
|
|
12
|
+
export const SliderThumb = createComponent({
|
|
13
|
+
tagName: 'w-slider-thumb',
|
|
14
|
+
elementClass: Component,
|
|
15
|
+
react: React,
|
|
16
|
+
events: {
|
|
17
|
+
onSliderValidity: 'slidervalidity',
|
|
18
|
+
'onslider-validity': 'slidervalidity', // should be slider-validity
|
|
19
|
+
},
|
|
20
|
+
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var ie=Object.defineProperty;var ne=Object.getOwnPropertyDescriptor;var G=s=>{throw TypeError(s)};var d=(s,e,o,t)=>{for(var a=t>1?void 0:t?ne(e,o):e,b=s.length-1,m;b>=0;b--)(m=s[b])&&(a=(t?m(e,o,a):m(a))||a);return t&&a&&ie(e,o,a),a};var se=(s,e,o)=>e.has(s)||G("Cannot "+o);var B=(s,e,o)=>e.has(s)?G("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(s):e.set(s,o);var x=(s,e,o)=>(se(s,e,"access private method"),o);
|
|
1
|
+
var ie=Object.defineProperty;var ne=Object.getOwnPropertyDescriptor;var G=s=>{throw TypeError(s)};var d=(s,e,o,t)=>{for(var a=t>1?void 0:t?ne(e,o):e,b=s.length-1,m;b>=0;b--)(m=s[b])&&(a=(t?m(e,o,a):m(a))||a);return t&&a&&ie(e,o,a),a};var se=(s,e,o)=>e.has(s)||G("Cannot "+o);var B=(s,e,o)=>e.has(s)?G("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(s):e.set(s,o);var x=(s,e,o)=>(se(s,e,"access private method"),o);var n=function(s,e,o,t){if(o==="a"&&!t)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?s!==e||!t:!e.has(s))throw new TypeError("Cannot read private member from an object whose class did not declare it");return o==="m"?t:o==="a"?t.call(s):t?t.value:e.get(s)},h=function(s,e,o,t,a){if(t==="m")throw new TypeError("Private method is not writable");if(t==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?s!==e||!a:!e.has(s))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t==="a"?a.call(s,o):a?a.value=o:e.set(s,o),o};function W(s){var e,o,t,a,b,m,k,F,y,w,X,T,Y,E,j,_,A,S,Z;class ae extends s{constructor(...r){var i,c,p;super(...r),e.add(this),this.internals=this.attachInternals(),o.set(this,!1),t.set(this,!1),a.set(this,!1),b.set(this,void 0),m.set(this,void 0),k.set(this,!0),y.set(this,""),w.set(this,()=>{h(this,a,!0,"f"),h(this,o,!0,"f"),n(this,e,"m",_).call(this)}),X.set(this,()=>{h(this,o,!1,"f"),n(this,e,"m",A).call(this,this.shouldFormValueUpdate()?n(this,y,"f"):""),!this.validity.valid&&n(this,a,"f")&&h(this,t,!0,"f");let f=n(this,e,"m",_).call(this);this.validationMessageCallback&&this.validationMessageCallback(f?this.internals.validationMessage:"")}),T.set(this,()=>{var f;n(this,k,"f")&&this.validationTarget&&(this.internals.setValidity(this.validity,this.validationMessage,this.validationTarget),h(this,k,!1,"f")),h(this,a,!0,"f"),h(this,t,!0,"f"),n(this,e,"m",_).call(this),(f=this===null||this===void 0?void 0:this.validationMessageCallback)===null||f===void 0||f.call(this,this.showError?this.internals.validationMessage:"")}),Y.set(this,void 0),E.set(this,!1),j.set(this,Promise.resolve()),(i=this.addEventListener)===null||i===void 0||i.call(this,"focus",n(this,w,"f")),(c=this.addEventListener)===null||c===void 0||c.call(this,"blur",n(this,X,"f")),(p=this.addEventListener)===null||p===void 0||p.call(this,"invalid",n(this,T,"f")),this.setValue(null)}static get formAssociated(){return!0}static get validators(){return this.formControlValidators||[]}static get observedAttributes(){let r=this.validators.map(p=>p.attribute).flat(),i=super.observedAttributes||[];return[...new Set([...i,...r])]}static getValidator(r){return this.validators.find(i=>i.attribute===r)||null}static getValidators(r){return this.validators.filter(i=>{var c;if(i.attribute===r||!((c=i.attribute)===null||c===void 0)&&c.includes(r))return!0})}get form(){return this.internals.form}get showError(){return n(this,e,"m",_).call(this)}checkValidity(){return this.internals.checkValidity()}get validity(){return this.internals.validity}get validationMessage(){return this.internals.validationMessage}attributeChangedCallback(r,i,c){var p;(p=super.attributeChangedCallback)===null||p===void 0||p.call(this,r,i,c);let V=this.constructor.getValidators(r);V!=null&&V.length&&this.validationTarget&&this.setValue(n(this,y,"f"))}setValue(r){var i;h(this,t,!1,"f"),(i=this.validationMessageCallback)===null||i===void 0||i.call(this,""),h(this,y,r,"f");let p=this.shouldFormValueUpdate()?r:null;this.internals.setFormValue(p),n(this,e,"m",A).call(this,p),this.valueChangedCallback&&this.valueChangedCallback(p),n(this,e,"m",_).call(this)}shouldFormValueUpdate(){return!0}get validationComplete(){return new Promise(r=>r(n(this,j,"f")))}formResetCallback(){var r,i;h(this,a,!1,"f"),h(this,t,!1,"f"),n(this,e,"m",_).call(this),(r=this.resetFormControl)===null||r===void 0||r.call(this),(i=this.validationMessageCallback)===null||i===void 0||i.call(this,n(this,e,"m",_).call(this)?this.validationMessage:"")}}return o=new WeakMap,t=new WeakMap,a=new WeakMap,b=new WeakMap,m=new WeakMap,k=new WeakMap,y=new WeakMap,w=new WeakMap,X=new WeakMap,T=new WeakMap,Y=new WeakMap,E=new WeakMap,j=new WeakMap,e=new WeakSet,F=function(){let r=this.getRootNode(),i=`${this.localName}[name="${this.getAttribute("name")}"]`;return r.querySelectorAll(i)},_=function(){if(this.hasAttribute("disabled"))return!1;let r=n(this,t,"f")||n(this,a,"f")&&!this.validity.valid&&!n(this,o,"f");return r&&this.internals.states?this.internals.states.add("--show-error"):this.internals.states&&this.internals.states.delete("--show-error"),r},A=function(r){let i=this.constructor,c={},p=i.validators,f=[],V=p.some(g=>g.isValid instanceof Promise);n(this,E,"f")||(h(this,j,new Promise(g=>{h(this,Y,g,"f")}),"f"),h(this,E,!0,"f")),n(this,b,"f")&&(n(this,b,"f").abort(),h(this,m,n(this,b,"f"),"f"));let M=new AbortController;h(this,b,M,"f");let P,H=!1;p.length&&(p.forEach(g=>{let R=g.key||"customError",z=g.isValid(this,r,M.signal);z instanceof Promise?(f.push(z),z.then(D=>{D!=null&&(c[R]=!D,P=n(this,e,"m",Z).call(this,g,r),n(this,e,"m",S).call(this,c,P))})):(c[R]=!z,this.validity[R]!==!z&&(H=!0),!z&&!P&&(P=n(this,e,"m",Z).call(this,g,r)))}),Promise.allSettled(f).then(()=>{var g;M!=null&&M.signal.aborted||(h(this,E,!1,"f"),(g=n(this,Y,"f"))===null||g===void 0||g.call(this))}),(H||!V)&&n(this,e,"m",S).call(this,c,P))},S=function(r,i){if(this.validationTarget)this.internals.setValidity(r,i,this.validationTarget),h(this,k,!1,"f");else{if(this.internals.setValidity(r,i),this.internals.validity.valid)return;h(this,k,!0,"f")}},Z=function(r,i){if(this.validityCallback){let c=this.validityCallback(r.key||"customError");if(c)return c}return r.message instanceof Function?r.message(this,i):r.message},ae}import{html as I,LitElement as re,nothing as U}from"lit";import{property as C,query as oe,state as v}from"lit/decorators.js";import{classMap as ce}from"lit/directives/class-map.js";import{ifDefined as q}from"lit/directives/if-defined.js";import{css as J}from"lit";var K=J`
|
|
2
2
|
*,
|
|
3
3
|
:before,
|
|
4
4
|
:after {
|
|
@@ -2659,5 +2659,5 @@ var ie=Object.defineProperty;var ne=Object.getOwnPropertyDescriptor;var G=s=>{th
|
|
|
2659
2659
|
<!-- aria-description is still not recommended for general use, so make a visually hidden element and refer to it with aria-describedby -->
|
|
2660
2660
|
<span class="sr-only" id="aria-description">${this.ariaDescription}</span>
|
|
2661
2661
|
</div>
|
|
2662
|
-
`}};u=new WeakSet,N=function(){this._showTooltip=!0},L=function(){this._showTooltip=!1},O=function(o){let t=o.currentTarget.tagName==="W-TEXTFIELD";if(o instanceof CustomEvent)return;let a=o.currentTarget.value;if(a==="")return this.required&&(this._invalid=!0),!1;t&&this._invalid&&(this._invalid=!1);let b=Number.parseInt(a),m=Number.parseInt(this.max),k=Number.parseInt(this.min);(b>m||b<k)&&(this._invalid=!0);let F=!1;if(this.slot){let y=getComputedStyle(this);if(this.slot==="from"){let w=y.getPropertyValue("--to");if(b>Number.parseInt(w)){if(t)return this._invalid=!0,!1;F=!0,this.value=w}}else{let w=y.getPropertyValue("--from");if(b<Number.parseInt(w)){if(t)return this._invalid=!0,!1;F=!0,this.value=w}}}return F?(o.preventDefault(),this.range.value=this.value,!1):(this.value=a,!0)},l.shadowRootOptions={...re.shadowRootOptions,delegatesFocus:!0},l.styles=[K,ee,Q],d([C({attribute:"aria-label"})],l.prototype,"ariaLabel",2),d([C({attribute:"aria-description"})],l.prototype,"ariaDescription",2),d([C()],l.prototype,"label",2),d([C()],l.prototype,"name",2),d([C({reflect:!0})],l.prototype,"value",2),d([C({type:Boolean,reflect:!0})],l.prototype,"disabled",2),d([v()],l.prototype,"markers",2),d([v()],l.prototype,"required",2),d([v()],l.prototype,"step",2),d([v()],l.prototype,"min",2),d([v()],l.prototype,"max",2),d([v()],l.prototype,"suffix",2),d([v()],l.prototype,"forceDisabled",2),d([v()],l.prototype,"forceInvalid",2),d([v()],l.prototype,"formatter",2),d([oe('input[type="range"]')],l.prototype,"range",2),d([oe("w-textfield")],l.prototype,"textfield",2),d([v()],l.prototype,"_invalid",2),d([v()],l.prototype,"_showTooltip",2);customElements.get("w-slider-thumb")||customElements.define("w-slider-thumb",l);export{l as WarpSliderThumb};
|
|
2662
|
+
`}};u=new WeakSet,N=function(){this._showTooltip=!0},L=function(){this._showTooltip=!1},O=function(o){let t=o.currentTarget.tagName==="W-TEXTFIELD";if(o instanceof CustomEvent)return;let a=o.currentTarget.value;if(a==="")return this.required&&(this._invalid=!0),!1;t&&this._invalid&&(this._invalid=!1);let b=Number.parseInt(a),m=Number.parseInt(this.max),k=Number.parseInt(this.min);(b>m||b<k)&&(this._invalid=!0);let F=!1;if(this.slot){let y=getComputedStyle(this);if(this.slot==="from"){let w=y.getPropertyValue("--to");if(b>Number.parseInt(w)){if(t)return this._invalid=!0,!1;F=!0,this.value=w}}else{let w=y.getPropertyValue("--from");if(b<Number.parseInt(w)){if(t)return this._invalid=!0,!1;F=!0,this.value=w}}}return F?(o.preventDefault(),this.range.value=this.value,!1):(this.value=a,!0)},l.shadowRootOptions={...re.shadowRootOptions,delegatesFocus:!0},l.styles=[K,ee,Q],d([C({attribute:"aria-label",reflect:!0})],l.prototype,"ariaLabel",2),d([C({attribute:"aria-description",reflect:!0})],l.prototype,"ariaDescription",2),d([C({reflect:!0})],l.prototype,"label",2),d([C({reflect:!0})],l.prototype,"name",2),d([C({reflect:!0})],l.prototype,"value",2),d([C({type:Boolean,reflect:!0})],l.prototype,"disabled",2),d([v()],l.prototype,"markers",2),d([v()],l.prototype,"required",2),d([v()],l.prototype,"step",2),d([v()],l.prototype,"min",2),d([v()],l.prototype,"max",2),d([v()],l.prototype,"suffix",2),d([v()],l.prototype,"forceDisabled",2),d([v()],l.prototype,"forceInvalid",2),d([v()],l.prototype,"formatter",2),d([oe('input[type="range"]')],l.prototype,"range",2),d([oe("w-textfield")],l.prototype,"textfield",2),d([v()],l.prototype,"_invalid",2),d([v()],l.prototype,"_showTooltip",2);customElements.get("w-slider-thumb")||customElements.define("w-slider-thumb",l);export{l as WarpSliderThumb};
|
|
2663
2663
|
//# sourceMappingURL=slider-thumb.js.map
|