@warp-ds/elements 2.10.0-next.11 → 2.10.0-next.13
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/custom-elements.json +211 -189
- package/dist/docs/badge/api.md +4 -4
- package/dist/docs/badge/badge.md +4 -4
- package/dist/docs/button/api.md +24 -24
- package/dist/docs/button/button.md +24 -24
- package/dist/docs/checkbox/api.md +2 -2
- package/dist/docs/checkbox/checkbox.md +2 -2
- package/dist/docs/checkbox-group/api.md +6 -6
- package/dist/docs/checkbox-group/checkbox-group.md +6 -6
- package/dist/docs/datepicker/api.md +8 -8
- package/dist/docs/datepicker/datepicker.md +8 -8
- package/dist/docs/expandable/api.md +6 -6
- package/dist/docs/expandable/expandable.md +6 -6
- package/dist/docs/icon/api.md +4 -4
- package/dist/docs/icon/icon.md +4 -4
- package/dist/docs/link/api.md +10 -10
- package/dist/docs/link/link.md +10 -10
- package/dist/docs/modal/api.md +2 -2
- package/dist/docs/modal/modal.md +2 -2
- package/dist/docs/pagination/api.md +4 -4
- package/dist/docs/pagination/pagination.md +4 -4
- package/dist/docs/pill/api.md +8 -8
- package/dist/docs/pill/pill.md +8 -8
- package/dist/docs/select/api.md +10 -10
- package/dist/docs/select/select.md +10 -10
- package/dist/docs/slider/api.md +22 -22
- package/dist/docs/slider/slider.md +22 -22
- package/dist/docs/slider-thumb/api.md +12 -12
- package/dist/docs/slider-thumb/slider-thumb.md +12 -12
- package/dist/docs/tabs/api.md +2 -2
- package/dist/docs/tabs/tabs.md +2 -2
- package/dist/docs/textarea/api.md +14 -14
- package/dist/docs/textarea/textarea.md +14 -14
- package/dist/docs/textfield/api.md +34 -34
- package/dist/docs/textfield/textfield.md +34 -34
- package/dist/packages/affix/affix.d.ts +1 -1
- package/dist/packages/affix/affix.js +8 -8
- package/dist/packages/affix/affix.js.map +4 -4
- package/dist/packages/affix/styles.js +2 -2
- package/dist/packages/alert/alert.js +7 -7
- package/dist/packages/alert/alert.js.map +3 -3
- package/dist/packages/alert/styles.js +2 -2
- package/dist/packages/attention/attention.js +42 -21
- package/dist/packages/attention/attention.js.map +4 -4
- package/dist/packages/attention/attention.stories.js +1 -1
- package/dist/packages/attention/styles.js +2 -2
- package/dist/packages/badge/badge.d.ts +2 -2
- package/dist/packages/badge/badge.js +6 -6
- package/dist/packages/badge/badge.js.map +3 -3
- package/dist/packages/badge/styles.js +2 -2
- package/dist/packages/box/box.js +6 -6
- package/dist/packages/box/box.js.map +3 -3
- package/dist/packages/box/styles.js +2 -2
- package/dist/packages/breadcrumbs/breadcrumbs.d.ts +1 -2
- package/dist/packages/breadcrumbs/breadcrumbs.js +7 -7
- package/dist/packages/breadcrumbs/breadcrumbs.js.map +4 -4
- package/dist/packages/breadcrumbs/breadcrumbs.react.stories.d.ts +1 -1
- package/dist/packages/breadcrumbs/styles.js +2 -2
- package/dist/packages/button/button.d.ts +11 -11
- package/dist/packages/button/button.js +37 -16
- package/dist/packages/button/button.js.map +4 -4
- package/dist/packages/button/button.react.stories.d.ts +2 -2
- package/dist/packages/button/react.d.ts +1 -1
- package/dist/packages/button/styles.js +18 -2
- package/dist/packages/card/card.js +8 -8
- package/dist/packages/card/card.js.map +4 -4
- package/dist/packages/card/styles.js +2 -2
- package/dist/packages/checkbox/checkbox.d.ts +2 -2
- package/dist/packages/checkbox/checkbox.js +9 -9
- package/dist/packages/checkbox/checkbox.js.map +3 -3
- package/dist/packages/checkbox-group/checkbox-group.d.ts +4 -4
- package/dist/packages/checkbox-group/checkbox-group.js.map +2 -2
- package/dist/packages/combobox/combobox.js +14 -15
- package/dist/packages/combobox/combobox.js.map +4 -4
- package/dist/packages/combobox/combobox.react.stories.d.ts +26 -10
- package/dist/packages/combobox/react.d.ts +13 -5
- package/dist/packages/combobox/styles.js +2 -3
- package/dist/packages/datepicker/datepicker.d.ts +5 -5
- package/dist/packages/datepicker/datepicker.js +29 -29
- package/dist/packages/datepicker/datepicker.js.map +4 -4
- package/dist/packages/datepicker/datepicker.react.stories.d.ts +12 -12
- package/dist/packages/datepicker/react.d.ts +6 -6
- package/dist/packages/expandable/expandable.d.ts +3 -3
- package/dist/packages/expandable/expandable.js +10 -10
- package/dist/packages/expandable/expandable.js.map +3 -3
- package/dist/packages/expandable/styles.js +2 -2
- package/dist/packages/icon/icon.d.ts +1 -1
- package/dist/packages/icon/icon.js +2 -2
- package/dist/packages/icon/icon.js.map +1 -1
- package/dist/packages/icon/icon.react.stories.d.ts +1 -1
- package/dist/packages/icon/icon.react.stories.js +2 -0
- package/dist/packages/icon/icon.stories.d.ts +7 -30
- package/dist/packages/icon/icon.stories.js +11 -2
- package/dist/packages/link/link.d.ts +5 -5
- package/dist/packages/link/link.js +40 -19
- package/dist/packages/link/link.js.map +3 -3
- package/dist/packages/link/styles.js +5 -0
- package/dist/packages/modal/modal.d.ts +1 -1
- package/dist/packages/modal/modal.js +7 -7
- package/dist/packages/modal/modal.js.map +3 -3
- package/dist/packages/modal/modal.react.stories.d.ts +4 -4
- package/dist/packages/modal/react.d.ts +4 -4
- package/dist/packages/modal/util.js +3 -1
- package/dist/packages/modal-footer/modal-footer.js +7 -7
- package/dist/packages/modal-footer/modal-footer.js.map +3 -3
- package/dist/packages/modal-header/modal-header.js +11 -11
- package/dist/packages/modal-header/modal-header.js.map +4 -4
- package/dist/packages/modal-header/react.d.ts +2 -2
- package/dist/packages/page-indicator/page-indicator.d.ts +0 -4
- package/dist/packages/page-indicator/page-indicator.js +6 -6
- package/dist/packages/page-indicator/page-indicator.js.map +4 -4
- package/dist/packages/page-indicator/page-indicator.stories.d.ts +8 -26
- package/dist/packages/page-indicator/page-indicator.stories.js +9 -7
- package/dist/packages/pagination/pagination.d.ts +8 -9
- package/dist/packages/pagination/pagination.js +15 -15
- package/dist/packages/pagination/pagination.js.map +4 -4
- package/dist/packages/pagination/pagination.react.stories.d.ts +6 -6
- package/dist/packages/pagination/pagination.test.js +4 -7
- package/dist/packages/pagination/react.d.ts +3 -3
- package/dist/packages/pagination/styles.js +2 -2
- package/dist/packages/pill/pill.d.ts +4 -4
- package/dist/packages/pill/pill.js +9 -9
- package/dist/packages/pill/pill.js.map +4 -4
- package/dist/packages/pill/pill.react.stories.d.ts +8 -8
- package/dist/packages/pill/react.d.ts +4 -4
- package/dist/packages/pill/styles.js +2 -2
- package/dist/packages/radio/form-associated-element.d.ts +1 -1
- package/dist/packages/radio/radio.d.ts +1 -1
- package/dist/packages/radio/radio.js +8 -8
- package/dist/packages/radio/radio.js.map +3 -3
- package/dist/packages/radio-group/radio-group.d.ts +2 -2
- package/dist/packages/radio-group/radio-group.js +11 -11
- package/dist/packages/radio-group/radio-group.js.map +4 -4
- package/dist/packages/radio-group/react.d.ts +4 -4
- package/dist/packages/select/react.d.ts +3 -3
- package/dist/packages/select/select.d.ts +6 -7
- package/dist/packages/select/select.js +13 -13
- package/dist/packages/select/select.js.map +4 -4
- package/dist/packages/select/select.react.stories.d.ts +7 -7
- package/dist/packages/select/select.react.stories.js +15 -10
- package/dist/packages/select/styles.js +2 -2
- package/dist/packages/slider/slider.d.ts +14 -14
- package/dist/packages/slider/slider.js +12 -12
- package/dist/packages/slider/slider.js.map +4 -4
- package/dist/packages/slider/slider.stories.js +1 -0
- package/dist/packages/slider/styles.js +2 -2
- package/dist/packages/slider-thumb/react.d.ts +2 -2
- package/dist/packages/slider-thumb/slider-thumb.d.ts +14 -14
- package/dist/packages/slider-thumb/slider-thumb.js +11 -11
- package/dist/packages/slider-thumb/slider-thumb.js.map +4 -4
- package/dist/packages/slider-thumb/styles.d.ts +1 -0
- package/dist/packages/slider-thumb/styles.js +2 -0
- package/dist/packages/step/step.js +10 -10
- package/dist/packages/step/step.js.map +4 -4
- package/dist/packages/step-indicator/step-indicator.js +6 -6
- package/dist/packages/step-indicator/step-indicator.js.map +3 -3
- package/dist/packages/step-indicator/styles.js +2 -2
- package/dist/packages/styles.js +4 -2
- package/dist/packages/switch/styles.js +2 -2
- package/dist/packages/switch/switch.d.ts +3 -3
- package/dist/packages/switch/switch.js +6 -6
- package/dist/packages/switch/switch.js.map +3 -3
- package/dist/packages/tab/react.d.ts +4 -4
- package/dist/packages/tab/tab.d.ts +1 -1
- package/dist/packages/tab/tab.js +6 -6
- package/dist/packages/tab/tab.js.map +3 -3
- package/dist/packages/tab-panel/tab-panel.js +5 -5
- package/dist/packages/tab-panel/tab-panel.js.map +3 -3
- package/dist/packages/tabs/styles.js +2 -2
- package/dist/packages/tabs/tabs.d.ts +4 -3
- package/dist/packages/tabs/tabs.js +6 -6
- package/dist/packages/tabs/tabs.js.map +3 -3
- package/dist/packages/textarea/react.d.ts +9 -9
- package/dist/packages/textarea/styles.js +2 -2
- package/dist/packages/textarea/textarea.a11y.test.js +1 -1
- package/dist/packages/textarea/textarea.d.ts +10 -10
- package/dist/packages/textarea/textarea.js +10 -10
- package/dist/packages/textarea/textarea.js.map +4 -4
- package/dist/packages/textarea/textarea.react.stories.d.ts +18 -18
- package/dist/packages/textfield/react.d.ts +9 -9
- package/dist/packages/textfield/styles.js +2 -2
- package/dist/packages/textfield/textfield.d.ts +22 -22
- package/dist/packages/textfield/textfield.js +10 -10
- package/dist/packages/textfield/textfield.js.map +3 -3
- package/dist/packages/textfield/textfield.react.stories.d.ts +18 -18
- package/dist/packages/toast/api.d.ts +1 -1
- package/dist/packages/toast/styles.js +2 -2
- package/dist/packages/toast/toast.d.ts +1 -1
- package/dist/packages/toast/toast.js +12 -12
- package/dist/packages/toast/toast.js.map +4 -4
- package/dist/packages/toast-container/styles.d.ts +1 -0
- package/dist/packages/toast-container/styles.js +2 -0
- package/dist/packages/toast-container/toast-container.js +8 -8
- package/dist/packages/toast-container/toast-container.js.map +3 -3
- package/dist/web-types.json +170 -159
- package/eik/index.js +19 -2459
- package/package.json +3 -3
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export const styles =
|
|
1
|
+
import { unsafeCSS } from 'lit';
|
|
2
|
+
export const styles = unsafeCSS("*,:before,:after{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.border-2{border-width:2px}.border-transparent{border-color:#0000}.rounded-4{border-radius:4px}.rounded-8{border-radius:8px}.block{display:block}.focusable:focus{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:focus-visible{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:not(:focus-visible){outline:none}.overflow-hidden{overflow:hidden}.outline{outline-style:solid}.inset-0{top:0;bottom:0;left:0;right:0}.absolute{position:absolute}.relative{position:relative}.static{position:static}.\\!s-bg-selected{background-color:var(--w-s-color-background-selected)!important}.s-bg{background-color:var(--w-s-color-background)}.s-bg-selected{background-color:var(--w-s-color-background-selected)}.\\!hover\\:s-bg-selected-hover:hover{background-color:var(--w-s-color-background-selected-hover)!important}.hover\\:s-bg-hover:hover{background-color:var(--w-s-color-background-hover)}.hover\\:s-bg-selected-hover:hover{background-color:var(--w-s-color-background-selected-hover)}.\\!active\\:s-bg-selected-active:active{background-color:var(--w-s-color-background-selected-active)!important}.active\\:s-bg-active:active{background-color:var(--w-s-color-background-active)}.active\\:s-bg-selected-active:active{background-color:var(--w-s-color-background-selected-active)}.s-border{border-color:var(--w-s-color-border)}.s-border-selected{border-color:var(--w-s-color-border-selected)}.group:hover .group-hover\\:s-border-selected-hover{border-color:var(--w-s-color-border-selected-hover)}.hover\\:s-border-hover:hover{border-color:var(--w-s-color-border-hover)}.hover\\:s-border-selected-hover:hover{border-color:var(--w-s-color-border-selected-hover)}.active\\:s-border-active:active{border-color:var(--w-s-color-border-active)}.active\\:s-border-selected-active:active{border-color:var(--w-s-color-border-selected-active)}.group:active .group-active\\:s-border-active{border-color:var(--w-s-color-border-active)}.group:active .group-active\\:s-border-selected-active{border-color:var(--w-s-color-border-selected-active)}.s-surface-elevated-200{background-color:var(--w-s-color-surface-elevated-200);box-shadow:var(--w-s-shadow-surface-elevated-200)}.hover\\:s-surface-elevated-200-hover:hover{background-color:var(--w-s-color-surface-elevated-200-hover);box-shadow:var(--w-s-shadow-surface-elevated-200-hover)}.active\\:s-surface-elevated-200-active:active{background-color:var(--w-s-color-surface-elevated-200-active);box-shadow:var(--w-s-shadow-surface-elevated-200-active)}.cursor-pointer{cursor:pointer}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.transition-all{transition-property:all;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}");
|
|
@@ -9,12 +9,12 @@ export declare class WarpCheckbox extends WarpCheckbox_base {
|
|
|
9
9
|
static shadowRootOptions: {
|
|
10
10
|
delegatesFocus: boolean;
|
|
11
11
|
clonable?: boolean;
|
|
12
|
-
customElementRegistry?: CustomElementRegistry;
|
|
12
|
+
customElementRegistry?: CustomElementRegistry | null;
|
|
13
13
|
mode: ShadowRootMode;
|
|
14
14
|
serializable?: boolean;
|
|
15
15
|
slotAssignment?: SlotAssignmentMode;
|
|
16
16
|
};
|
|
17
|
-
input: HTMLInputElement
|
|
17
|
+
input: HTMLInputElement;
|
|
18
18
|
/**
|
|
19
19
|
* The name of the checkbox.
|
|
20
20
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var he=Object.defineProperty;var pe=Object.getOwnPropertyDescriptor;var ee=t=>{throw TypeError(t)};var u=(t,r,e,a)=>{for(var l=a>1?void 0:a?pe(r,e):r,g=t.length-1,x;g>=0;g--)(x=t[g])&&(l=(a?x(r,e,l):x(l))||l);return a&&l&&he(r,e,l),l};var D=(t,r,e)=>r.has(t)||ee("Cannot "+e);var k=(t,r,e)=>(D(t,r,"read from private field"),e?e.call(t):r.get(t)),y=(t,r,e)=>r.has(t)?ee("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(t):r.set(t,e),I=(t,r,e,a)=>(D(t,r,"write to private field"),a?a.call(t,e):r.set(t,e),e),b=(t,r,e)=>(D(t,r,"access private method"),e);var n=function(t,r,e,a){if(e==="a"&&!a)throw new TypeError("Private accessor was defined without a getter");if(typeof r=="function"?t!==r||!a:!r.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?a:e==="a"?a.call(t):a?a.value:r.get(t)},c=function(t,r,e,a,l){if(a==="m")throw new TypeError("Private method is not writable");if(a==="a"&&!l)throw new TypeError("Private accessor was defined without a setter");if(typeof r=="function"?t!==r||!l:!r.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return a==="a"?l.call(t,e):l?l.value=e:r.set(t,e),e};function re(t){var r,e,a,l,g,x,z,ce,M,N,R,B,X,E,Z,f,U,O,W;class be extends t{constructor(...o){var i,d,h;super(...o),r.add(this),this.internals=this.attachInternals(),e.set(this,!1),a.set(this,!1),l.set(this,!1),g.set(this,void 0),x.set(this,void 0),z.set(this,!0),M.set(this,""),N.set(this,()=>{c(this,l,!0,"f"),c(this,e,!0,"f"),n(this,r,"m",f).call(this)}),R.set(this,()=>{c(this,e,!1,"f"),n(this,r,"m",U).call(this,this.shouldFormValueUpdate()?n(this,M,"f"):""),!this.validity.valid&&n(this,l,"f")&&c(this,a,!0,"f");let m=n(this,r,"m",f).call(this);this.validationMessageCallback&&this.validationMessageCallback(m?this.internals.validationMessage:"")}),B.set(this,()=>{var m;n(this,z,"f")&&this.validationTarget&&(this.internals.setValidity(this.validity,this.validationMessage,this.validationTarget),c(this,z,!1,"f")),c(this,l,!0,"f"),c(this,a,!0,"f"),n(this,r,"m",f).call(this),(m=this===null||this===void 0?void 0:this.validationMessageCallback)===null||m===void 0||m.call(this,this.showError?this.internals.validationMessage:"")}),X.set(this,void 0),E.set(this,!1),Z.set(this,Promise.resolve()),(i=this.addEventListener)===null||i===void 0||i.call(this,"focus",n(this,N,"f")),(d=this.addEventListener)===null||d===void 0||d.call(this,"blur",n(this,R,"f")),(h=this.addEventListener)===null||h===void 0||h.call(this,"invalid",n(this,B,"f")),this.setValue(null)}static get formAssociated(){return!0}static get validators(){return this.formControlValidators||[]}static get observedAttributes(){let o=this.validators.map(h=>h.attribute).flat(),i=super.observedAttributes||[];return[...new Set([...i,...o])]}static getValidator(o){return this.validators.find(i=>i.attribute===o)||null}static getValidators(o){return this.validators.filter(i=>{var d;if(i.attribute===o||!((d=i.attribute)===null||d===void 0)&&d.includes(o))return!0})}get form(){return this.internals.form}get showError(){return n(this,r,"m",f).call(this)}checkValidity(){return this.internals.checkValidity()}get validity(){return this.internals.validity}get validationMessage(){return this.internals.validationMessage}attributeChangedCallback(o,i,d){var h;(h=super.attributeChangedCallback)===null||h===void 0||h.call(this,o,i,d);let S=this.constructor.getValidators(o);S?.length&&this.validationTarget&&this.setValue(n(this,M,"f"))}setValue(o){var i;c(this,a,!1,"f"),(i=this.validationMessageCallback)===null||i===void 0||i.call(this,""),c(this,M,o,"f");let h=this.shouldFormValueUpdate()?o:null;this.internals.setFormValue(h),n(this,r,"m",U).call(this,h),this.valueChangedCallback&&this.valueChangedCallback(h),n(this,r,"m",f).call(this)}shouldFormValueUpdate(){return!0}get validationComplete(){return new Promise(o=>o(n(this,Z,"f")))}formResetCallback(){var o,i;c(this,l,!1,"f"),c(this,a,!1,"f"),n(this,r,"m",f).call(this),(o=this.resetFormControl)===null||o===void 0||o.call(this),(i=this.validationMessageCallback)===null||i===void 0||i.call(this,n(this,r,"m",f).call(this)?this.validationMessage:"")}}return e=new WeakMap,a=new WeakMap,l=new WeakMap,g=new WeakMap,x=new WeakMap,z=new WeakMap,M=new WeakMap,N=new WeakMap,R=new WeakMap,B=new WeakMap,X=new WeakMap,E=new WeakMap,Z=new WeakMap,r=new WeakSet,ce=function(){let o=this.getRootNode(),i=`${this.localName}[name="${this.getAttribute("name")}"]`;return o.querySelectorAll(i)},f=function(){if(this.hasAttribute("disabled"))return!1;let o=n(this,a,"f")||n(this,l,"f")&&!this.validity.valid&&!n(this,e,"f");return o&&this.internals.states?this.internals.states.add("--show-error"):this.internals.states&&this.internals.states.delete("--show-error"),o},U=function(o){let i=this.constructor,d={},h=i.validators,m=[],S=h.some(v=>v.isValid instanceof Promise);n(this,E,"f")||(c(this,Z,new Promise(v=>{c(this,X,v,"f")}),"f"),c(this,E,!0,"f")),n(this,g,"f")&&(n(this,g,"f").abort(),c(this,x,n(this,g,"f"),"f"));let T=new AbortController;c(this,g,T,"f");let j,Q=!1;h.length&&(h.forEach(v=>{let G=v.key||"customError",C=v.isValid(this,o,T.signal);C instanceof Promise?(m.push(C),C.then(H=>{H!=null&&(d[G]=!H,j=n(this,r,"m",W).call(this,v,o),n(this,r,"m",O).call(this,d,j))})):(d[G]=!C,this.validity[G]!==!C&&(Q=!0),!C&&!j&&(j=n(this,r,"m",W).call(this,v,o)))}),Promise.allSettled(m).then(()=>{var v;T?.signal.aborted||(c(this,E,!1,"f"),(v=n(this,X,"f"))===null||v===void 0||v.call(this))}),(Q||!S)&&n(this,r,"m",O).call(this,d,j))},O=function(o,i){if(this.validationTarget)this.internals.setValidity(o,i,this.validationTarget),c(this,z,!1,"f");else{if(this.internals.setValidity(o,i),this.internals.validity.valid)return;c(this,z,!0,"f")}},W=function(o,i){if(this.validityCallback){let d=this.validityCallback(o.key||"customError");if(d)return d}return o.message instanceof Function?o.message(this,i):o.message},be}import{html as me,LitElement as ae}from"lit";import{property as w,query as we}from"lit/decorators.js";import{ifDefined as K}from"lit/directives/if-defined.js";import{live as ie}from"lit/directives/live.js";import{css as ve}from"lit";import{unsafeCSS as ue}from"lit";var oe=ve`
|
|
2
2
|
*,
|
|
3
3
|
:before,
|
|
4
4
|
:after {
|
|
@@ -271,7 +271,7 @@ var pe=Object.defineProperty;var ve=Object.getOwnPropertyDescriptor;var ee=t=>{t
|
|
|
271
271
|
svg {
|
|
272
272
|
pointer-events: none;
|
|
273
273
|
}
|
|
274
|
-
`,
|
|
274
|
+
`,ze=ue(`*, :before, :after {
|
|
275
275
|
--w-rotate: 0;
|
|
276
276
|
--w-rotate-x: 0;
|
|
277
277
|
--w-rotate-y: 0;
|
|
@@ -2136,8 +2136,8 @@ var pe=Object.defineProperty;var ve=Object.getOwnPropertyDescriptor;var ee=t=>{t
|
|
|
2136
2136
|
overflow-wrap: break-word
|
|
2137
2137
|
}
|
|
2138
2138
|
|
|
2139
|
-
.before\\:content-\\[\\"
|
|
2140
|
-
content: "
|
|
2139
|
+
.before\\:content-\\[\\"\xE2\u20AC\u201C\\"\\]:before {
|
|
2140
|
+
content: "\xE2\u20AC\u201C"
|
|
2141
2141
|
}
|
|
2142
2142
|
|
|
2143
2143
|
.before\\:content-\\[\\"\\"\\]:before {
|
|
@@ -2437,7 +2437,7 @@ var pe=Object.defineProperty;var ve=Object.getOwnPropertyDescriptor;var ee=t=>{t
|
|
|
2437
2437
|
display: none
|
|
2438
2438
|
}
|
|
2439
2439
|
}
|
|
2440
|
-
|
|
2440
|
+
`);import{css as ge}from"lit";var te=ge`
|
|
2441
2441
|
:host {
|
|
2442
2442
|
--_label-font-size: var(--w-c-checkbox-label-font-size, var(--w-font-size-m));
|
|
2443
2443
|
--_label-line-height: var(--w-c-checkbox-label-line-height, var(--w-line-height-m));
|
|
@@ -2570,7 +2570,7 @@ var pe=Object.defineProperty;var ve=Object.getOwnPropertyDescriptor;var ee=t=>{t
|
|
|
2570
2570
|
@media (prefers-reduced-motion: reduce) {
|
|
2571
2571
|
:host { --w-c-checkbox-transition: none; }
|
|
2572
2572
|
}
|
|
2573
|
-
`;var F,_,A,$,L,s,q,se,
|
|
2573
|
+
`;var F,_,A,$,L,s,q,ne,se,J,V,P,le,de,p=class extends re(ae){constructor(){super(...arguments);y(this,s);this.value=null;this.indeterminate=!1;this.checked=!1;this.disabled=!1;this.required=!1;this.invalid=!1;y(this,F,!1);y(this,_,!1);y(this,A,!1);y(this,$,()=>{b(this,s,q).call(this),b(this,s,V).call(this)});y(this,L,e=>{if(!this.disabled&&!e.defaultPrevented&&!(e.key!==" "&&e.key!=="Spacebar"&&e.key!=="Enter")){if(e.key==="Enter"&&this.internals.form){this.internals.form.requestSubmit();return}e.composedPath()[0]!==this.input&&(e.preventDefault(),this.click())}})}set name(e){this._ownName=e}get name(){return this._ownName||this._groupName}get _computedInvalid(){return this.invalid||this._groupInvalid===!0}connectedCallback(){super.connectedCallback();let e=this.getAttribute("value");this.value=e??"on",I(this,F,this.hasAttribute("checked")),this.checked=k(this,F),this.addEventListener("invalid",k(this,$)),this.addEventListener("keydown",k(this,L)),b(this,s,P).call(this)}handleClick(){this.disabled||(b(this,s,q).call(this),this.checked=!this.checked,this.indeterminate=!1,this.updateComplete.then(()=>{this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}))}updated(e){super.updated(e),(e.has("checked")||e.has("indeterminate"))&&b(this,s,le).call(this),b(this,s,de).call(this,e)&&(b(this,s,P).call(this),b(this,s,V).call(this))}resetFormControl(){this.checked=k(this,F),b(this,s,P).call(this),b(this,s,V).call(this)}click(){this.disabled||this.input?.click()}focus(e){this.input?.focus(e)}blur(){this.input?.blur()}get validationMessage(){return this.internals.validationMessage}get validity(){return this.internals.validity}checkValidity(){return b(this,s,V).call(this),this.internals.checkValidity()}reportValidity(){return b(this,s,q).call(this),b(this,s,V).call(this),this.internals.checkValidity()}render(){let e=!this.checked&&this.indeterminate,a=e?"mixed":this.checked?"true":"false";return me`
|
|
2574
2574
|
<label part="base" class="wrapper">
|
|
2575
2575
|
<span part="control" class="checkbox control">
|
|
2576
2576
|
<input
|
|
@@ -2579,8 +2579,8 @@ var pe=Object.defineProperty;var ve=Object.getOwnPropertyDescriptor;var ee=t=>{t
|
|
|
2579
2579
|
type="checkbox"
|
|
2580
2580
|
name=${K(this.name||void 0)}
|
|
2581
2581
|
value=${K(this.value)}
|
|
2582
|
-
.indeterminate=${
|
|
2583
|
-
.checked=${
|
|
2582
|
+
.indeterminate=${ie(this.indeterminate)}
|
|
2583
|
+
.checked=${ie(this.checked)}
|
|
2584
2584
|
.disabled=${this.disabled}
|
|
2585
2585
|
.required=${this.required}
|
|
2586
2586
|
aria-checked=${a}
|
|
@@ -2591,5 +2591,5 @@ var pe=Object.defineProperty;var ve=Object.getOwnPropertyDescriptor;var ee=t=>{t
|
|
|
2591
2591
|
|
|
2592
2592
|
<slot part="label"></slot>
|
|
2593
2593
|
</label>
|
|
2594
|
-
`}};F=new WeakMap,_=new WeakMap,A=new WeakMap,$=new WeakMap,L=new WeakMap,s=new WeakSet,q=function(){I(this,A,!0)},
|
|
2594
|
+
`}};F=new WeakMap,_=new WeakMap,A=new WeakMap,$=new WeakMap,L=new WeakMap,s=new WeakSet,q=function(){I(this,A,!0)},ne=function(){return this.input?.validationMessage||" "},se=function(){return this.input??void 0},J=function(e){this.internals.setValidity(e,b(this,s,ne).call(this),b(this,s,se).call(this))},V=function(){if(this.disabled){this.internals.setValidity({});return}let e=this.required&&!this.checked,a=this.invalid&&!k(this,_);if(e){I(this,_,!0),this.invalid=k(this,A),b(this,s,J).call(this,{valueMissing:!0});return}if(k(this,_)&&(this.invalid=!1,I(this,_,!1)),a){b(this,s,J).call(this,{customError:!0});return}this.internals.setValidity({})},P=function(){if(this.disabled){this.setValue(null);return}let e=this.checked?this.value:null;this.setValue(e)},le=function(){this.input&&(this.input.checked=this.checked,this.input.indeterminate=this.indeterminate)},de=function(e){return e.has("checked")||e.has("value")||e.has("disabled")||e.has("required")||e.has("invalid")},p.styles=[oe,te],p.shadowRootOptions={...ae.shadowRootOptions,delegatesFocus:!0},u([we('input[type="checkbox"]')],p.prototype,"input",2),u([w({reflect:!0})],p.prototype,"name",1),u([w({reflect:!0})],p.prototype,"value",2),u([w({type:Boolean,reflect:!0})],p.prototype,"indeterminate",2),u([w({type:Boolean,reflect:!0})],p.prototype,"checked",2),u([w({type:Boolean,reflect:!0})],p.prototype,"disabled",2),u([w({type:Boolean,reflect:!0})],p.prototype,"required",2),u([w({type:Boolean,reflect:!0})],p.prototype,"invalid",2),u([w({attribute:!1})],p.prototype,"_groupInvalid",2),u([w({attribute:!1})],p.prototype,"_groupName",2);var Xe=p;customElements.get("w-checkbox")||customElements.define("w-checkbox",p);export{Xe as WCheckbox,p as WarpCheckbox};
|
|
2595
2595
|
//# sourceMappingURL=checkbox.js.map
|