@warp-ds/elements 2.3.0-next.19 → 2.3.0-next.20

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.
@@ -2393,6 +2393,15 @@
2393
2393
  "attribute": "name",
2394
2394
  "reflects": true
2395
2395
  },
2396
+ {
2397
+ "kind": "field",
2398
+ "name": "step",
2399
+ "type": {
2400
+ "text": "number"
2401
+ },
2402
+ "attribute": "step",
2403
+ "reflects": true
2404
+ },
2396
2405
  {
2397
2406
  "kind": "field",
2398
2407
  "name": "formatter",
@@ -2559,6 +2568,13 @@
2559
2568
  "text": "string"
2560
2569
  },
2561
2570
  "fieldName": "name"
2571
+ },
2572
+ {
2573
+ "name": "step",
2574
+ "type": {
2575
+ "text": "number"
2576
+ },
2577
+ "fieldName": "step"
2562
2578
  }
2563
2579
  ],
2564
2580
  "mixins": [
@@ -5528,6 +5544,7 @@
5528
5544
  "type": {
5529
5545
  "text": "boolean"
5530
5546
  },
5547
+ "default": "false",
5531
5548
  "attribute": "invalid",
5532
5549
  "reflects": true
5533
5550
  },
@@ -5586,6 +5603,7 @@
5586
5603
  "type": {
5587
5604
  "text": "string"
5588
5605
  },
5606
+ "default": "''",
5589
5607
  "description": "Set by `<w-slider>`"
5590
5608
  },
5591
5609
  {
@@ -5640,6 +5658,19 @@
5640
5658
  }
5641
5659
  }
5642
5660
  },
5661
+ {
5662
+ "kind": "method",
5663
+ "name": "#handleValidity",
5664
+ "privacy": "private",
5665
+ "parameters": [
5666
+ {
5667
+ "name": "error",
5668
+ "type": {
5669
+ "text": "string"
5670
+ }
5671
+ }
5672
+ ]
5673
+ },
5643
5674
  {
5644
5675
  "kind": "method",
5645
5676
  "name": "#handleValueChange",
@@ -5800,6 +5831,7 @@
5800
5831
  "type": {
5801
5832
  "text": "boolean"
5802
5833
  },
5834
+ "default": "false",
5803
5835
  "fieldName": "invalid"
5804
5836
  }
5805
5837
  ],
@@ -5907,6 +5939,16 @@
5907
5939
  "default": "false",
5908
5940
  "attribute": "allow-values-outside-range"
5909
5941
  },
5942
+ {
5943
+ "kind": "field",
5944
+ "name": "error",
5945
+ "type": {
5946
+ "text": "string"
5947
+ },
5948
+ "default": "''",
5949
+ "attribute": "error",
5950
+ "reflects": true
5951
+ },
5910
5952
  {
5911
5953
  "kind": "field",
5912
5954
  "name": "helpText",
@@ -5914,7 +5956,7 @@
5914
5956
  "text": "string"
5915
5957
  },
5916
5958
  "default": "''",
5917
- "attribute": "helpText",
5959
+ "attribute": "help-text",
5918
5960
  "reflects": true
5919
5961
  },
5920
5962
  {
@@ -5981,6 +6023,7 @@
5981
6023
  "type": {
5982
6024
  "text": "string"
5983
6025
  },
6026
+ "default": "''",
5984
6027
  "description": "Suffix used in text input fields and for the min and max values of the slider.",
5985
6028
  "attribute": "suffix",
5986
6029
  "reflects": true
@@ -5993,6 +6036,22 @@
5993
6036
  },
5994
6037
  "description": "Function to format the to- and from labels and value in the slider thumb tooltip."
5995
6038
  },
6039
+ {
6040
+ "kind": "field",
6041
+ "name": "_invalidMessage",
6042
+ "type": {
6043
+ "text": "string"
6044
+ },
6045
+ "default": "''"
6046
+ },
6047
+ {
6048
+ "kind": "field",
6049
+ "name": "_hasInternalError",
6050
+ "type": {
6051
+ "text": "boolean"
6052
+ },
6053
+ "default": "false"
6054
+ },
5996
6055
  {
5997
6056
  "kind": "method",
5998
6057
  "name": "#syncSliderThumbs",
@@ -6081,6 +6140,22 @@
6081
6140
  }
6082
6141
  ],
6083
6142
  "description": "We use CSS variables to fill the active track with a background color."
6143
+ },
6144
+ {
6145
+ "kind": "field",
6146
+ "name": "componentHasError",
6147
+ "type": {
6148
+ "text": "boolean"
6149
+ },
6150
+ "readonly": true
6151
+ },
6152
+ {
6153
+ "kind": "field",
6154
+ "name": "errorText",
6155
+ "type": {
6156
+ "text": "string"
6157
+ },
6158
+ "readonly": true
6084
6159
  }
6085
6160
  ],
6086
6161
  "attributes": [
@@ -6109,7 +6184,15 @@
6109
6184
  "fieldName": "allowValuesOutsideRange"
6110
6185
  },
6111
6186
  {
6112
- "name": "helpText",
6187
+ "name": "error",
6188
+ "type": {
6189
+ "text": "string"
6190
+ },
6191
+ "default": "''",
6192
+ "fieldName": "error"
6193
+ },
6194
+ {
6195
+ "name": "help-text",
6113
6196
  "type": {
6114
6197
  "text": "string"
6115
6198
  },
@@ -6167,6 +6250,7 @@
6167
6250
  "type": {
6168
6251
  "text": "string"
6169
6252
  },
6253
+ "default": "''",
6170
6254
  "description": "Suffix used in text input fields and for the min and max values of the slider.",
6171
6255
  "fieldName": "suffix"
6172
6256
  }
package/dist/index.d.ts CHANGED
@@ -461,6 +461,8 @@ export type WarpTextFieldProps = {
461
461
  "value"?: WarpTextField['value'];
462
462
  /** */
463
463
  "name"?: WarpTextField['name'];
464
+ /** */
465
+ "step"?: WarpTextField['step'];
464
466
  /** Function to format value when the input field.
465
467
 
466
468
  Only active when the input field does not have focus,
@@ -753,6 +755,10 @@ If you need to display HTML, use the `label` slot instead. */
753
755
  /** */
754
756
  "allowValuesOutsideRange"?: WarpSlider['allowValuesOutsideRange'];
755
757
  /** */
758
+ "error"?: WarpSlider['error'];
759
+ /** */
760
+ "help-text"?: WarpSlider['helpText'];
761
+ /** */
756
762
  "helpText"?: WarpSlider['helpText'];
757
763
  /** */
758
764
  "invalid"?: WarpSlider['invalid'];
@@ -770,6 +776,10 @@ If you need to display HTML, use the `label` slot instead. */
770
776
  "suffix"?: WarpSlider['suffix'];
771
777
  /** Function to format the to- and from labels and value in the slider thumb tooltip. */
772
778
  "formatter"?: WarpSlider['formatter'];
779
+ /** */
780
+ "_invalidMessage"?: WarpSlider['_invalidMessage'];
781
+ /** */
782
+ "_hasInternalError"?: WarpSlider['_hasInternalError'];
773
783
 
774
784
 
775
785
  }
@@ -1200,6 +1210,7 @@ export type WarpTextareaProps = {
1200
1210
  * - `type`: undefined
1201
1211
  * - `value`: undefined
1202
1212
  * - `name`: undefined
1213
+ * - `step`: undefined
1203
1214
  * - `formatter`: Function to format value when the input field.
1204
1215
  *
1205
1216
  * Only active when the input field does not have focus,
@@ -1511,7 +1522,8 @@ export type WarpTextareaProps = {
1511
1522
  * If you need to display HTML, use the `label` slot instead.
1512
1523
  * - `disabled`: undefined
1513
1524
  * - `allow-values-outside-range`/`allowValuesOutsideRange`: undefined
1514
- * - `helpText`: undefined
1525
+ * - `error`: undefined
1526
+ * - `help-text`/`helpText`: undefined
1515
1527
  * - `invalid`: undefined
1516
1528
  * - `required`: Ensures a child slider thumb has a value before allowing the containing form to submit.
1517
1529
  * - `min`: undefined
@@ -1520,8 +1532,12 @@ export type WarpTextareaProps = {
1520
1532
  * - `step`: undefined
1521
1533
  * - `suffix`: Suffix used in text input fields and for the min and max values of the slider.
1522
1534
  * - `formatter`: Function to format the to- and from labels and value in the slider thumb tooltip. (property only)
1535
+ * - `_invalidMessage`: undefined (property only)
1536
+ * - `_hasInternalError`: undefined (property only)
1523
1537
  * - `edgeMin`: undefined (property only) (readonly)
1524
1538
  * - `edgeMax`: undefined (property only) (readonly)
1539
+ * - `componentHasError`: undefined (property only) (readonly)
1540
+ * - `errorText`: undefined (property only) (readonly)
1525
1541
  *
1526
1542
  * ## Slots
1527
1543
  *
@@ -1,4 +1,5 @@
1
- var ce=Object.defineProperty;var he=Object.getOwnPropertyDescriptor;var K=s=>{throw TypeError(s)};var h=(s,o,e,r)=>{for(var a=r>1?void 0:r?he(o,e):o,c=s.length-1,m;c>=0;c--)(m=s[c])&&(a=(r?m(o,e,a):m(a))||a);return r&&a&&ce(o,e,a),a};var be=(s,o,e)=>o.has(s)||K("Cannot "+e);var W=(s,o,e)=>o.has(s)?K("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(s):o.set(s,e);var g=(s,o,e)=>(be(s,o,"access private method"),e);var n=function(s,o,e,r){if(e==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof o=="function"?s!==o||!r:!o.has(s))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?r:e==="a"?r.call(s):r?r.value:o.get(s)},u=function(s,o,e,r,a){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof o=="function"?s!==o||!a:!o.has(s))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?a.call(s,e):a?a.value=e:o.set(s,e),e};function J(s){var o,e,r,a,c,m,w,M,f,x,F,k,j,P,A,C,D,L,I;class de extends s{constructor(...t){var i,b,p;super(...t),o.add(this),this.internals=this.attachInternals(),e.set(this,!1),r.set(this,!1),a.set(this,!1),c.set(this,void 0),m.set(this,void 0),w.set(this,!0),f.set(this,""),x.set(this,()=>{u(this,a,!0,"f"),u(this,e,!0,"f"),n(this,o,"m",C).call(this)}),F.set(this,()=>{u(this,e,!1,"f"),n(this,o,"m",D).call(this,this.shouldFormValueUpdate()?n(this,f,"f"):""),!this.validity.valid&&n(this,a,"f")&&u(this,r,!0,"f");let y=n(this,o,"m",C).call(this);this.validationMessageCallback&&this.validationMessageCallback(y?this.internals.validationMessage:"")}),k.set(this,()=>{var y;n(this,w,"f")&&this.validationTarget&&(this.internals.setValidity(this.validity,this.validationMessage,this.validationTarget),u(this,w,!1,"f")),u(this,a,!0,"f"),u(this,r,!0,"f"),n(this,o,"m",C).call(this),(y=this===null||this===void 0?void 0:this.validationMessageCallback)===null||y===void 0||y.call(this,this.showError?this.internals.validationMessage:"")}),j.set(this,void 0),P.set(this,!1),A.set(this,Promise.resolve()),(i=this.addEventListener)===null||i===void 0||i.call(this,"focus",n(this,x,"f")),(b=this.addEventListener)===null||b===void 0||b.call(this,"blur",n(this,F,"f")),(p=this.addEventListener)===null||p===void 0||p.call(this,"invalid",n(this,k,"f")),this.setValue(null)}static get formAssociated(){return!0}static get validators(){return this.formControlValidators||[]}static get observedAttributes(){let t=this.validators.map(p=>p.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 b;if(i.attribute===t||!((b=i.attribute)===null||b===void 0)&&b.includes(t))return!0})}get form(){return this.internals.form}get showError(){return n(this,o,"m",C).call(this)}checkValidity(){return this.internals.checkValidity()}get validity(){return this.internals.validity}get validationMessage(){return this.internals.validationMessage}attributeChangedCallback(t,i,b){var p;(p=super.attributeChangedCallback)===null||p===void 0||p.call(this,t,i,b);let Y=this.constructor.getValidators(t);Y!=null&&Y.length&&this.validationTarget&&this.setValue(n(this,f,"f"))}setValue(t){var i;u(this,r,!1,"f"),(i=this.validationMessageCallback)===null||i===void 0||i.call(this,""),u(this,f,t,"f");let p=this.shouldFormValueUpdate()?t:null;this.internals.setFormValue(p),n(this,o,"m",D).call(this,p),this.valueChangedCallback&&this.valueChangedCallback(p),n(this,o,"m",C).call(this)}shouldFormValueUpdate(){return!0}get validationComplete(){return new Promise(t=>t(n(this,A,"f")))}formResetCallback(){var t,i;u(this,a,!1,"f"),u(this,r,!1,"f"),n(this,o,"m",C).call(this),(t=this.resetFormControl)===null||t===void 0||t.call(this),(i=this.validationMessageCallback)===null||i===void 0||i.call(this,n(this,o,"m",C).call(this)?this.validationMessage:"")}}return e=new WeakMap,r=new WeakMap,a=new WeakMap,c=new WeakMap,m=new WeakMap,w=new WeakMap,f=new WeakMap,x=new WeakMap,F=new WeakMap,k=new WeakMap,j=new WeakMap,P=new WeakMap,A=new WeakMap,o=new WeakSet,M=function(){let t=this.getRootNode(),i=`${this.localName}[name="${this.getAttribute("name")}"]`;return t.querySelectorAll(i)},C=function(){if(this.hasAttribute("disabled"))return!1;let t=n(this,r,"f")||n(this,a,"f")&&!this.validity.valid&&!n(this,e,"f");return t&&this.internals.states?this.internals.states.add("--show-error"):this.internals.states&&this.internals.states.delete("--show-error"),t},D=function(t){let i=this.constructor,b={},p=i.validators,y=[],Y=p.some(v=>v.isValid instanceof Promise);n(this,P,"f")||(u(this,A,new Promise(v=>{u(this,j,v,"f")}),"f"),u(this,P,!0,"f")),n(this,c,"f")&&(n(this,c,"f").abort(),u(this,m,n(this,c,"f"),"f"));let N=new AbortController;u(this,c,N,"f");let S,G=!1;p.length&&(p.forEach(v=>{let T=v.key||"customError",E=v.isValid(this,t,N.signal);E instanceof Promise?(y.push(E),E.then(Z=>{Z!=null&&(b[T]=!Z,S=n(this,o,"m",I).call(this,v,t),n(this,o,"m",L).call(this,b,S))})):(b[T]=!E,this.validity[T]!==!E&&(G=!0),!E&&!S&&(S=n(this,o,"m",I).call(this,v,t)))}),Promise.allSettled(y).then(()=>{var v;N!=null&&N.signal.aborted||(u(this,P,!1,"f"),(v=n(this,j,"f"))===null||v===void 0||v.call(this))}),(G||!Y)&&n(this,o,"m",L).call(this,b,S))},L=function(t,i){if(this.validationTarget)this.internals.setValidity(t,i,this.validationTarget),u(this,w,!1,"f");else{if(this.internals.setValidity(t,i),this.internals.validity.valid)return;u(this,w,!0,"f")}},I=function(t,i){if(this.validityCallback){let b=this.validityCallback(t.key||"customError");if(b)return b}return t.message instanceof Function?t.message(this,i):t.message},de}import{html as $,LitElement as te,nothing as _}from"lit";import{property as V,query as ae,state as z}from"lit/decorators.js";import{ifDefined as U}from"lit/directives/if-defined.js";import{css as Q}from"lit";var ee=Q`
1
+ var Ae=Object.create;var oe=Object.defineProperty;var be=Object.getOwnPropertyDescriptor;var je=Object.getOwnPropertyNames;var Ie=Object.getPrototypeOf,Ye=Object.prototype.hasOwnProperty;var pe=o=>{throw TypeError(o)};var ge=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports);var Ue=(o,e,r,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of je(e))!Ye.call(o,a)&&a!==r&&oe(o,a,{get:()=>e[a],enumerable:!(t=be(e,a))||t.enumerable});return o};var Xe=(o,e,r)=>(r=o!=null?Ae(Ie(o)):{},Ue(e||!o||!o.__esModule?oe(r,"default",{value:o,enumerable:!0}):r,o));var m=(o,e,r,t)=>{for(var a=t>1?void 0:t?be(e,r):e,n=o.length-1,s;n>=0;n--)(s=o[n])&&(a=(t?s(e,r,a):s(a))||a);return t&&a&&oe(e,r,a),a};var He=(o,e,r)=>e.has(o)||pe("Cannot "+r);var me=(o,e,r)=>e.has(o)?pe("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,r);var g=(o,e,r)=>(He(o,e,"access private method"),r);var ye=ge(D=>{"use strict";Object.defineProperty(D,"__esModule",{value:!0});D.errorMessages=D.ErrorType=void 0;var A;(function(o){o.MalformedUnicode="MALFORMED_UNICODE",o.MalformedHexadecimal="MALFORMED_HEXADECIMAL",o.CodePointLimit="CODE_POINT_LIMIT",o.OctalDeprecation="OCTAL_DEPRECATION",o.EndOfString="END_OF_STRING"})(A=D.ErrorType||(D.ErrorType={}));D.errorMessages=new Map([[A.MalformedUnicode,"malformed Unicode character escape sequence"],[A.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[A.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[A.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[A.EndOfString,"malformed escape sequence at end of string"]])});var ze=ge(F=>{"use strict";Object.defineProperty(F,"__esModule",{value:!0});F.unraw=F.errorMessages=F.ErrorType=void 0;var y=ye();Object.defineProperty(F,"ErrorType",{enumerable:!0,get:function(){return y.ErrorType}});Object.defineProperty(F,"errorMessages",{enumerable:!0,get:function(){return y.errorMessages}});function Be(o){return!o.match(/[^a-f0-9]/i)?parseInt(o,16):NaN}function Z(o,e,r){let t=Be(o);if(Number.isNaN(t)||r!==void 0&&r!==o.length)throw new SyntaxError(y.errorMessages.get(e));return t}function Ge(o){let e=Z(o,y.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(e)}function _e(o,e){let r=Z(o,y.ErrorType.MalformedUnicode,4);if(e!==void 0){let t=Z(e,y.ErrorType.MalformedUnicode,4);return String.fromCharCode(r,t)}return String.fromCharCode(r)}function Ke(o){return o.charAt(0)==="{"&&o.charAt(o.length-1)==="}"}function Je(o){if(!Ke(o))throw new SyntaxError(y.errorMessages.get(y.ErrorType.MalformedUnicode));let e=o.slice(1,-1),r=Z(e,y.ErrorType.MalformedUnicode);try{return String.fromCodePoint(r)}catch(t){throw t instanceof RangeError?new SyntaxError(y.errorMessages.get(y.ErrorType.CodePointLimit)):t}}function We(o,e=!1){if(e)throw new SyntaxError(y.errorMessages.get(y.ErrorType.OctalDeprecation));let r=parseInt(o,8);return String.fromCharCode(r)}var Qe=new Map([["b","\b"],["f","\f"],["n",`
2
+ `],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function er(o){return Qe.get(o)||o}var rr=/\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;function Ce(o,e=!1){return o.replace(rr,function(r,t,a,n,s,i,d,p,x){if(t!==void 0)return"\\";if(a!==void 0)return Ge(a);if(n!==void 0)return Je(n);if(s!==void 0)return _e(s,i);if(d!==void 0)return _e(d);if(p==="0")return"\0";if(p!==void 0)return We(p,!e);if(x!==void 0)return er(x);throw new SyntaxError(y.errorMessages.get(y.ErrorType.EndOfString))})}F.unraw=Ce;F.default=Ce});var u=function(o,e,r,t){if(r==="a"&&!t)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?o!==e||!t:!e.has(o))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?t:r==="a"?t.call(o):t?t.value:e.get(o)},f=function(o,e,r,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"?o!==e||!a:!e.has(o))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t==="a"?a.call(o,r):a?a.value=r:e.set(o,r),r};function ve(o){var e,r,t,a,n,s,i,d,p,x,z,E,w,O,P,_,L,Y,ee;class Re extends o{constructor(...l){var h,v,k;super(...l),e.add(this),this.internals=this.attachInternals(),r.set(this,!1),t.set(this,!1),a.set(this,!1),n.set(this,void 0),s.set(this,void 0),i.set(this,!0),p.set(this,""),x.set(this,()=>{f(this,a,!0,"f"),f(this,r,!0,"f"),u(this,e,"m",_).call(this)}),z.set(this,()=>{f(this,r,!1,"f"),u(this,e,"m",L).call(this,this.shouldFormValueUpdate()?u(this,p,"f"):""),!this.validity.valid&&u(this,a,"f")&&f(this,t,!0,"f");let M=u(this,e,"m",_).call(this);this.validationMessageCallback&&this.validationMessageCallback(M?this.internals.validationMessage:"")}),E.set(this,()=>{var M;u(this,i,"f")&&this.validationTarget&&(this.internals.setValidity(this.validity,this.validationMessage,this.validationTarget),f(this,i,!1,"f")),f(this,a,!0,"f"),f(this,t,!0,"f"),u(this,e,"m",_).call(this),(M=this===null||this===void 0?void 0:this.validationMessageCallback)===null||M===void 0||M.call(this,this.showError?this.internals.validationMessage:"")}),w.set(this,void 0),O.set(this,!1),P.set(this,Promise.resolve()),(h=this.addEventListener)===null||h===void 0||h.call(this,"focus",u(this,x,"f")),(v=this.addEventListener)===null||v===void 0||v.call(this,"blur",u(this,z,"f")),(k=this.addEventListener)===null||k===void 0||k.call(this,"invalid",u(this,E,"f")),this.setValue(null)}static get formAssociated(){return!0}static get validators(){return this.formControlValidators||[]}static get observedAttributes(){let l=this.validators.map(k=>k.attribute).flat(),h=super.observedAttributes||[];return[...new Set([...h,...l])]}static getValidator(l){return this.validators.find(h=>h.attribute===l)||null}static getValidators(l){return this.validators.filter(h=>{var v;if(h.attribute===l||!((v=h.attribute)===null||v===void 0)&&v.includes(l))return!0})}get form(){return this.internals.form}get showError(){return u(this,e,"m",_).call(this)}checkValidity(){return this.internals.checkValidity()}get validity(){return this.internals.validity}get validationMessage(){return this.internals.validationMessage}attributeChangedCallback(l,h,v){var k;(k=super.attributeChangedCallback)===null||k===void 0||k.call(this,l,h,v);let X=this.constructor.getValidators(l);X!=null&&X.length&&this.validationTarget&&this.setValue(u(this,p,"f"))}setValue(l){var h;f(this,t,!1,"f"),(h=this.validationMessageCallback)===null||h===void 0||h.call(this,""),f(this,p,l,"f");let k=this.shouldFormValueUpdate()?l:null;this.internals.setFormValue(k),u(this,e,"m",L).call(this,k),this.valueChangedCallback&&this.valueChangedCallback(k),u(this,e,"m",_).call(this)}shouldFormValueUpdate(){return!0}get validationComplete(){return new Promise(l=>l(u(this,P,"f")))}formResetCallback(){var l,h;f(this,a,!1,"f"),f(this,t,!1,"f"),u(this,e,"m",_).call(this),(l=this.resetFormControl)===null||l===void 0||l.call(this),(h=this.validationMessageCallback)===null||h===void 0||h.call(this,u(this,e,"m",_).call(this)?this.validationMessage:"")}}return r=new WeakMap,t=new WeakMap,a=new WeakMap,n=new WeakMap,s=new WeakMap,i=new WeakMap,p=new WeakMap,x=new WeakMap,z=new WeakMap,E=new WeakMap,w=new WeakMap,O=new WeakMap,P=new WeakMap,e=new WeakSet,d=function(){let l=this.getRootNode(),h=`${this.localName}[name="${this.getAttribute("name")}"]`;return l.querySelectorAll(h)},_=function(){if(this.hasAttribute("disabled"))return!1;let l=u(this,t,"f")||u(this,a,"f")&&!this.validity.valid&&!u(this,r,"f");return l&&this.internals.states?this.internals.states.add("--show-error"):this.internals.states&&this.internals.states.delete("--show-error"),l},L=function(l){let h=this.constructor,v={},k=h.validators,M=[],X=k.some(C=>C.isValid instanceof Promise);u(this,O,"f")||(f(this,P,new Promise(C=>{f(this,w,C,"f")}),"f"),f(this,O,!0,"f")),u(this,n,"f")&&(u(this,n,"f").abort(),f(this,s,u(this,n,"f"),"f"));let H=new AbortController;f(this,n,H,"f");let q,ue=!1;k.length&&(k.forEach(C=>{let re=C.key||"customError",R=C.isValid(this,l,H.signal);R instanceof Promise?(M.push(R),R.then(te=>{te!=null&&(v[re]=!te,q=u(this,e,"m",ee).call(this,C,l),u(this,e,"m",Y).call(this,v,q))})):(v[re]=!R,this.validity[re]!==!R&&(ue=!0),!R&&!q&&(q=u(this,e,"m",ee).call(this,C,l)))}),Promise.allSettled(M).then(()=>{var C;H!=null&&H.signal.aborted||(f(this,O,!1,"f"),(C=u(this,w,"f"))===null||C===void 0||C.call(this))}),(ue||!X)&&u(this,e,"m",Y).call(this,v,q))},Y=function(l,h){if(this.validationTarget)this.internals.setValidity(l,h,this.validationTarget),f(this,i,!1,"f");else{if(this.internals.setValidity(l,h),this.internals.validity.valid)return;f(this,i,!0,"f")}},ee=function(l,h){if(this.validityCallback){let v=this.validityCallback(l.key||"customError");if(v)return v}return l.message instanceof Function?l.message(this,h):l.message},Re}import{html as j,LitElement as Pe,nothing as V}from"lit";import{property as N,query as Se,state as $}from"lit/decorators.js";import{ifDefined as J}from"lit/directives/if-defined.js";import{css as fe}from"lit";var we=fe`
2
3
  *,
3
4
  :before,
4
5
  :after {
@@ -271,7 +272,7 @@ var ce=Object.defineProperty;var he=Object.getOwnPropertyDescriptor;var K=s=>{th
271
272
  svg {
272
273
  pointer-events: none;
273
274
  }
274
- `,fe=Q`*, :before, :after {
275
+ `,vr=fe`*, :before, :after {
275
276
  --w-rotate: 0;
276
277
  --w-rotate-x: 0;
277
278
  --w-rotate-y: 0;
@@ -2437,15 +2438,15 @@ var ce=Object.defineProperty;var he=Object.getOwnPropertyDescriptor;var K=s=>{th
2437
2438
  display: none
2438
2439
  }
2439
2440
  }
2440
- `;import{css as ue}from"lit";var re=ue`
2441
+ `;import{css as qe}from"lit";var xe=qe`
2441
2442
  .w-slider-thumb {
2442
2443
  position: relative;
2443
2444
  display: grid;
2444
2445
  pointer-events: none; /* For range inputs we position two of these on top of each other. Let clicks go through the top one. */
2445
2446
  grid-template-areas:
2446
- 'slider slider slider'
2447
- 'frommarker . tomarker'
2448
- 'fromtextfield . totextfield';
2447
+ "slider slider slider"
2448
+ "frommarker . tomarker"
2449
+ "fromtextfield . totextfield";
2449
2450
  grid-template-columns: 1fr 24px 1fr;
2450
2451
  }
2451
2452
 
@@ -2476,7 +2477,11 @@ var ce=Object.defineProperty;var he=Object.getOwnPropertyDescriptor;var K=s=>{th
2476
2477
  background: var(--w-s-color-background-primary);
2477
2478
  border-radius: 50%;
2478
2479
  height: var(--w-slider-thumb-size);
2479
- margin-top: calc(-1 * calc(var(--w-slider-thumb-offset) - calc(var(--w-slider-track-height) / 2)));
2480
+ margin-top: calc(
2481
+ -1 * calc(var(--w-slider-thumb-offset) - calc(
2482
+ var(--w-slider-track-height) / 2
2483
+ ))
2484
+ );
2480
2485
  pointer-events: initial;
2481
2486
  width: var(--w-slider-thumb-size);
2482
2487
  z-index: 1;
@@ -2491,7 +2496,11 @@ var ce=Object.defineProperty;var he=Object.getOwnPropertyDescriptor;var K=s=>{th
2491
2496
  border-radius: 50%;
2492
2497
  border-color: transparent;
2493
2498
  height: var(--w-slider-thumb-size);
2494
- margin-top: calc(-1 * calc(var(--w-slider-thumb-offset) - calc(var(--w-slider-track-height) / 2)));
2499
+ margin-top: calc(
2500
+ -1 * calc(var(--w-slider-thumb-offset) - calc(
2501
+ var(--w-slider-track-height) / 2
2502
+ ))
2503
+ );
2495
2504
  pointer-events: initial;
2496
2505
  width: var(--w-slider-thumb-size);
2497
2506
  z-index: 1;
@@ -2561,47 +2570,55 @@ var ce=Object.defineProperty;var he=Object.getOwnPropertyDescriptor;var K=s=>{th
2561
2570
  }
2562
2571
 
2563
2572
  .w-slider-thumb__textfield {
2564
- margin-top: 10px;
2573
+ margin-top: 12px;
2565
2574
  pointer-events: auto;
2566
2575
  grid-row: 3 / 4;
2567
2576
  grid-column: 1 / 3; /* Single sliders should have the text field use the fromtextfield _and_ gap portion of the CSS grid. */
2568
2577
  }
2569
2578
 
2570
- :host([name='from']) .w-slider-thumb__textfield {
2579
+ :host([name="from"]) .w-slider-thumb__textfield {
2571
2580
  grid-column: 1 / 2; /* Range sliders should leave the gap empty. */
2572
2581
  }
2573
2582
 
2574
- :host([name='from']) .w-slider-thumb__range {
2583
+ :host([name="from"]) .w-slider-thumb__range {
2575
2584
  margin-left: var(--w-slider-thumb-size);
2576
2585
  }
2577
2586
 
2578
- :host([name='to']) .w-slider-thumb__range {
2587
+ :host([name="to"]) .w-slider-thumb__range {
2579
2588
  margin-right: var(--w-slider-thumb-size);
2580
2589
  }
2581
2590
 
2582
- :host([name='from']) .w-slider-thumb__range::-webkit-slider-thumb,
2583
- :host([name='from']) .w-slider-thumb__tooltip-target {
2591
+ :host([name="from"]) .w-slider-thumb__range::-webkit-slider-thumb,
2592
+ :host([name="from"]) .w-slider-thumb__tooltip-target {
2584
2593
  transform: translateX(calc(-1 * var(--w-slider-thumb-size) - 1px));
2585
2594
  }
2586
2595
 
2587
- :host([name='from']) .w-slider-thumb__range::-moz-range-thumb {
2596
+ :host([name="from"]) .w-slider-thumb__range::-moz-range-thumb {
2588
2597
  transform: translateX(calc(-1 * var(--w-slider-thumb-size) - 1px));
2589
2598
  }
2590
2599
 
2591
- :host([name='to']) .w-slider-thumb__textfield {
2600
+ :host([name="to"]) .w-slider-thumb__textfield {
2592
2601
  grid-row: 3 / 4;
2593
2602
  grid-column: 3 / 4;
2594
2603
  }
2595
2604
 
2596
- :host([name='to']) .w-slider-thumb__tooltip-target,
2597
- :host([name='to']) .w-slider-thumb__range::-webkit-slider-thumb {
2605
+ :host([name="to"]) .w-slider-thumb__tooltip-target,
2606
+ :host([name="to"]) .w-slider-thumb__range::-webkit-slider-thumb {
2598
2607
  transform: translateX(calc(var(--w-slider-thumb-size) - 1px));
2599
2608
  }
2600
2609
 
2601
- :host([name='to']) .w-slider-thumb__range::-moz-range-thumb {
2610
+ :host([name="to"]) .w-slider-thumb__range::-moz-range-thumb {
2602
2611
  transform: translateX(calc(var(--w-slider-thumb-size) - 1px));
2603
2612
  }
2604
- `;import{css as pe}from"lit";var oe=pe`*,: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}.hidden{display:none}.absolute{position:absolute}.relative{position:relative}.static{position:static}.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}`;var ie={};var l,O,X,q,H,B,ne,se,le,d=class extends J(te){constructor(){super(...arguments);W(this,l);this.allowValuesOutsideRange=!1;this._showTooltip=!1;this._inputHasFocus=!1;this.anchorPositioningStyleElement=null}async connectedCallback(){if(super.connectedCallback(),"anchorName"in document.documentElement.style)await this.updateComplete;else{let e=ie.url.substring(0,ie.url.lastIndexOf("/"));try{let[{default:r}]=await Promise.all([import(`${e}/oddbird-css-anchor-positioning.js`),this.updateComplete]);this.anchorPositioningStyleElement||(this.anchorPositioningStyleElement=document.createElement("style"),this.shadowRoot.prepend(this.anchorPositioningStyleElement)),this.anchorPositioningStyleElement.textContent=`
2613
+ `;import{css as Ze}from"lit";var ke=Ze`*,: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}.hidden{display:none}.absolute{position:absolute}.relative{position:relative}.static{position:static}.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}`;var Fe=Xe(ze(),1);var S=o=>typeof o=="string",tr=o=>typeof o=="function",Ee=new Map,Ve="en";function ne(o){return[...Array.isArray(o)?o:[o],Ve]}function le(o,e,r){let t=ne(o);r||(r="default");let a;if(typeof r=="string")switch(a={day:"numeric",month:"short",year:"numeric"},r){case"full":a.weekday="long";case"long":a.month="long";break;case"short":a.month="numeric";break}else a=r;return B(()=>G("date",t,r),()=>new Intl.DateTimeFormat(t,a)).format(S(e)?new Date(e):e)}function or(o,e,r){let t;if(r||(r="default"),typeof r=="string")switch(t={second:"numeric",minute:"numeric",hour:"numeric"},r){case"full":case"long":t.timeZoneName="short";break;case"short":delete t.second}else t=r;return le(o,e,t)}function ae(o,e,r){let t=ne(o);return B(()=>G("number",t,r),()=>new Intl.NumberFormat(t,r)).format(e)}function Me(o,e,r,{offset:t=0,...a}){var i,d;let n=ne(o),s=e?B(()=>G("plural-ordinal",n),()=>new Intl.PluralRules(n,{type:"ordinal"})):B(()=>G("plural-cardinal",n),()=>new Intl.PluralRules(n,{type:"cardinal"}));return(d=(i=a[r])!=null?i:a[s.select(r-t)])!=null?d:a.other}function B(o,e){let r=o(),t=Ee.get(r);return t||(t=e(),Ee.set(r,t)),t}function G(o,e,r){let t=e.join("-");return`${o}-${t}-${JSON.stringify(r)}`}var $e=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,Oe="%__lingui_octothorpe__%",ar=(o,e,r={})=>{let t=e||o,a=s=>typeof s=="object"?s:r[s],n=(s,i)=>{let d=Object.keys(r).length?a("number"):void 0,p=ae(t,s,d);return i.replace(new RegExp(Oe,"g"),p)};return{plural:(s,i)=>{let{offset:d=0}=i,p=Me(t,!1,s,i);return n(s-d,p)},selectordinal:(s,i)=>{let{offset:d=0}=i,p=Me(t,!0,s,i);return n(s-d,p)},select:ir,number:(s,i)=>ae(t,s,a(i)||{style:i}),date:(s,i)=>le(t,s,a(i)||i),time:(s,i)=>or(t,s,a(i)||i)}},ir=(o,e)=>{var r;return(r=e[o])!=null?r:e.other};function sr(o,e,r){return(t={},a)=>{let n=ar(e,r,a),s=(d,p=!1)=>Array.isArray(d)?d.reduce((x,z)=>{if(z==="#"&&p)return x+Oe;if(S(z))return x+z;let[E,w,O]=z,P={};w==="plural"||w==="selectordinal"||w==="select"?Object.entries(O).forEach(([L,Y])=>{P[L]=s(Y,w==="plural"||w==="selectordinal")}):P=O;let _;if(w){let L=n[w];_=L(t[E],P)}else _=t[E];return _==null?x:x+_},""):d,i=s(o);return S(i)&&$e.test(i)?(0,Fe.unraw)(i):S(i)?i:i?String(i):""}}var nr=Object.defineProperty,lr=(o,e,r)=>e in o?nr(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,dr=(o,e,r)=>(lr(o,typeof e!="symbol"?e+"":e,r),r),ie=class{constructor(){dr(this,"_events",{})}on(e,r){var a;var t;return(a=(t=this._events)[e])!=null||(t[e]=[]),this._events[e].push(r),()=>this.removeListener(e,r)}removeListener(e,r){let t=this._getListeners(e);if(!t)return;let a=t.indexOf(r);~a&&t.splice(a,1)}emit(e,...r){let t=this._getListeners(e);t&&t.map(a=>a.apply(this,r))}_getListeners(e){let r=this._events[e];return Array.isArray(r)?r:!1}},cr=Object.defineProperty,hr=(o,e,r)=>e in o?cr(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,T=(o,e,r)=>(hr(o,typeof e!="symbol"?e+"":e,r),r),se=class extends ie{constructor(e){var r;super(),T(this,"_locale",""),T(this,"_locales"),T(this,"_localeData",{}),T(this,"_messages",{}),T(this,"_missing"),T(this,"_messageCompiler"),T(this,"t",this._.bind(this)),e.missing!=null&&(this._missing=e.missing),e.messages!=null&&this.load(e.messages),e.localeData!=null&&this.loadLocaleData(e.localeData),(typeof e.locale=="string"||e.locales)&&this.activate((r=e.locale)!=null?r:Ve,e.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){var e;return(e=this._messages[this._locale])!=null?e:{}}get localeData(){var e;return(e=this._localeData[this._locale])!=null?e:{}}_loadLocaleData(e,r){let t=this._localeData[e];t?Object.assign(t,r):this._localeData[e]=r}setMessagesCompiler(e){return this._messageCompiler=e,this}loadLocaleData(e,r){typeof e=="string"?this._loadLocaleData(e,r):Object.keys(e).forEach(t=>this._loadLocaleData(t,e[t])),this.emit("change")}_load(e,r){let t=this._messages[e];t?Object.assign(t,r):this._messages[e]=r}load(e,r){typeof e=="string"&&typeof r=="object"?this._load(e,r):Object.entries(e).forEach(([t,a])=>this._load(t,a)),this.emit("change")}loadAndActivate({locale:e,locales:r,messages:t}){this._locale=e,this._locales=r||void 0,this._messages[this._locale]=t,this.emit("change")}activate(e,r){this._locale=e,this._locales=r,this.emit("change")}_(e,r,t){if(!this.locale)throw new Error("Lingui: Attempted to call a translation function without setting a locale.\nMake sure to call `i18n.activate(locale)` before using Lingui functions.\nThis issue may also occur due to a race condition in your initialization logic.");let a=t==null?void 0:t.message;e||(e=""),S(e)||(r=e.values||r,a=e.message,e=e.id);let n=this.messages[e],s=n===void 0,i=this._missing;if(i&&s)return tr(i)?i(this._locale,e):i;s&&this.emit("missing",{id:e,locale:this._locale});let d=n||a||e;return S(d)&&(this._messageCompiler?d=this._messageCompiler(d):console.warn(`Uncompiled message detected! Message:
2614
+
2615
+ > ${d}
2616
+
2617
+ That means you use raw catalog or your catalog doesn't have a translation for the message and fallback was used.
2618
+ ICU features such as interpolation and plurals will not work properly for that message.
2619
+
2620
+ Please compile your catalog first.
2621
+ `)),S(d)&&$e.test(d)?JSON.parse(`"${d}"`):S(d)?d:sr(d,this._locale,this._locales)(r,t==null?void 0:t.formats)}date(e,r){return le(this._locales||this._locale,e,r)}number(e,r){return ae(this._locales||this._locale,e,r)}};function ur(o={}){return new se(o)}var K=ur();var Ne={};var c,W,Q,de,I,ce,he,Le,De,Te,b=class extends ve(Pe){constructor(){super(...arguments);me(this,c);this.invalid=!1;this.allowValuesOutsideRange=!1;this.suffix="";this._showTooltip=!1;this._inputHasFocus=!1;this.anchorPositioningStyleElement=null}async connectedCallback(){if(super.connectedCallback(),"anchorName"in document.documentElement.style)await this.updateComplete;else{let r=Ne.url.substring(0,Ne.url.lastIndexOf("/"));try{let[{default:t}]=await Promise.all([import(`${r}/oddbird-css-anchor-positioning.js`),this.updateComplete]);this.anchorPositioningStyleElement||(this.anchorPositioningStyleElement=document.createElement("style"),this.shadowRoot.prepend(this.anchorPositioningStyleElement)),this.anchorPositioningStyleElement.textContent=`
2605
2622
  /*
2606
2623
  * The polyfill can only anchor to ::before and ::after pseudo elements, not the pseudo element slider thumb.
2607
2624
  * We work around that by recreating a transparent version of the active range
@@ -2650,58 +2667,59 @@ var ce=Object.defineProperty;var he=Object.getOwnPropertyDescriptor;var K=s=>{th
2650
2667
  left: anchor(--polyfilled-thumb left);
2651
2668
  margin-left: 38px;
2652
2669
  }
2653
- `,await r({roots:[this.shadowRoot],elements:[this.anchorPositioningStyleElement]})}catch(r){console.error(new Error("Error registering the CSS anchor positioning polyfill. The UI will look broken.",{cause:r}))}}g(this,l,q).call(this)}get boundaryValue(){return this.slot==="from"?this.min:this.max}get textFieldDisplayValue(){var e,r;return this._inputHasFocus?this.value===""?(r=(e=this.range)==null?void 0:e.value)!=null?r:"":this.value:this.value}get tooltipDisplayValue(){var e,r;return this.formatter?this.formatter(this.value,this.slot):this.value===""?(r=(e=this.range)==null?void 0:e.value)!=null?r:this.boundaryValue:this.value||0}updated(e){e.has("value")&&(this.setValue(this.value),g(this,l,q).call(this)),e.has("invalid")&&this.dispatchEvent(new CustomEvent("slidervalidity",{bubbles:!0,detail:{invalid:this.invalid}}))}render(){return $`
2670
+ `,await t({roots:[this.shadowRoot],elements:[this.anchorPositioningStyleElement]})}catch(t){console.error(new Error("Error registering the CSS anchor positioning polyfill. The UI will look broken.",{cause:t}))}}g(this,c,de).call(this)}get boundaryValue(){return this.slot==="from"?this.min:this.max}get textFieldDisplayValue(){var r;return this._inputHasFocus?this.value!==""?this.value:(r=this.range)!=null&&r.value?Math.min(Math.max(Number(this.range.value),Number(this.min)+1),Number(this.max)-1).toString():"":this.value}get tooltipDisplayValue(){var r,t;return this.formatter?this.formatter(this.value,this.slot):this.value===""?(t=(r=this.range)==null?void 0:r.value)!=null?t:this.boundaryValue:this.value||0}updated(r){r.has("value")&&(this.setValue(this.value),g(this,c,de).call(this))}render(){return j`
2654
2671
  <div class="w-slider-thumb">
2655
2672
  <label for="range">${this.label}</label>
2656
- ${"anchorName"in document.documentElement.style?_:$`<div class="polyfill-range">
2673
+ ${"anchorName"in document.documentElement.style?V:j`<div class="polyfill-range">
2657
2674
  <div class="polyfill-active-range"></div>
2658
2675
  </div>`}
2659
2676
  <input
2660
2677
  id="range"
2661
2678
  aria-label="${this.ariaLabel}"
2662
- aria-describedby="${U(this.ariaDescription?"aria-description":void 0)}"
2679
+ aria-describedby="${J(this.ariaDescription?"aria-description":void 0)}"
2663
2680
  class="w-slider-thumb__range"
2664
2681
  type="range"
2665
2682
  .value="${this.value}"
2666
2683
  aria-valuetext="${this.tooltipDisplayValue}"
2667
2684
  min="${this.min}"
2668
2685
  max="${this.max}"
2669
- step="${U(!this.allowValuesOutsideRange&&this.step?this.step:void 0)}"
2686
+ step="${J(!this.allowValuesOutsideRange&&this.step?this.step:void 0)}"
2670
2687
  ?disabled="${this.disabled}"
2671
- @mousedown="${g(this,l,O)}"
2672
- @mouseup="${g(this,l,X)}"
2673
- @touchstart="${g(this,l,O)}"
2674
- @touchend="${g(this,l,X)}"
2675
- @focus="${g(this,l,O)}"
2676
- @blur="${g(this,l,X)}"
2677
- @input="${g(this,l,B)}"
2678
- @keydown="${this.allowValuesOutsideRange?g(this,l,ne):_}"
2688
+ @mousedown="${g(this,c,W)}"
2689
+ @mouseup="${g(this,c,Q)}"
2690
+ @touchstart="${g(this,c,W)}"
2691
+ @touchend="${g(this,c,Q)}"
2692
+ @focus="${g(this,c,W)}"
2693
+ @blur="${g(this,c,Q)}"
2694
+ @input="${g(this,c,he)}"
2695
+ @keydown="${this.allowValuesOutsideRange?g(this,c,Le):V}"
2679
2696
  />
2680
2697
 
2681
- ${this.slot==="from"?$`<span class="w-slider-thumb__from-marker"
2698
+ ${this.slot==="from"?j`<span class="w-slider-thumb__from-marker"
2682
2699
  >${this.formatter?this.formatter(this.allowValuesOutsideRange?"":this.min,"from"):this.min}
2683
2700
  ${this.suffix}</span
2684
- >`:_}
2685
- ${this.slot==="to"?$`<span class="w-slider-thumb__to-marker"
2701
+ >`:V}
2702
+ ${this.slot==="to"?j`<span class="w-slider-thumb__to-marker"
2686
2703
  >${this.formatter?this.formatter(this.allowValuesOutsideRange?"":this.max,"to"):this.max}
2687
2704
  ${this.suffix}</span
2688
- >`:_}
2705
+ >`:V}
2689
2706
 
2690
2707
  <w-textfield
2691
2708
  aria-label="${this.ariaLabel}"
2692
- aria-description="${U(this.ariaDescription)}"
2709
+ aria-description="${J(this.ariaDescription)}"
2693
2710
  class="w-slider-thumb__textfield"
2694
2711
  type="number"
2695
- .formatter=${this.formatter?e=>this.formatter(e,this.slot):_}
2712
+ .formatter=${this.formatter?r=>this.formatter(r,this.slot):V}
2696
2713
  .value="${this.textFieldDisplayValue}"
2697
- min="${this.allowValuesOutsideRange?_:this.min}"
2698
- max="${this.allowValuesOutsideRange?_:this.max}"
2699
- ?invalid="${this.invalid}"
2700
- @input="${g(this,l,B)}"
2701
- @focus="${g(this,l,se)}"
2702
- @blur="${g(this,l,le)}"
2714
+ min="${this.allowValuesOutsideRange?V:this.min}"
2715
+ max="${this.allowValuesOutsideRange?V:this.max}"
2716
+ step="${J(this.step)}"
2717
+ ?invalid="${!!this.invalid}"
2718
+ @input="${g(this,c,he)}"
2719
+ @focus="${g(this,c,De)}"
2720
+ @blur="${g(this,c,Te)}"
2703
2721
  >
2704
- ${this.suffix?$`<w-affix slot="suffix" label="${this.suffix}"></w-affix>`:_}
2722
+ ${this.suffix?j`<w-affix slot="suffix" label="${this.suffix}"></w-affix>`:V}
2705
2723
  </w-textfield>
2706
2724
 
2707
2725
  <w-attention
@@ -2717,7 +2735,7 @@ var ce=Object.defineProperty;var he=Object.getOwnPropertyDescriptor;var K=s=>{th
2717
2735
  slot="target"
2718
2736
  ></output>
2719
2737
  <span slot="message">
2720
- ${this.tooltipDisplayValue}${this.suffix?$`&nbsp;${this.suffix}`:_}
2738
+ ${this.tooltipDisplayValue}${this.suffix?j`&nbsp;${this.suffix}`:V}
2721
2739
  </span>
2722
2740
  </w-attention>
2723
2741
 
@@ -2726,5 +2744,5 @@ var ce=Object.defineProperty;var he=Object.getOwnPropertyDescriptor;var K=s=>{th
2726
2744
  >${this.ariaDescription}</span
2727
2745
  >
2728
2746
  </div>
2729
- `}};l=new WeakSet,O=function(){this._showTooltip=!0,this.shadowRoot.querySelector("w-attention").handleDone()},X=function(){this._showTooltip=!1},q=function(){this.range&&(this.value===""?this.range.value=this.boundaryValue:this.value&&(this.range.value=this.value))},H=async function(e,r){let a=Number.parseInt(e);if(this.allowValuesOutsideRange&&!r&&this.step&&!(this.slot==="to"&&a>=Number(this.max)-1||this.slot==="from"&&a<=Number(this.min)+1)){let x=1/this.step;a=Math.round(a*x)/x,e=a.toString()}let c=Number.parseInt(this.max),m=Number.parseInt(this.min);if(!this.allowValuesOutsideRange&&(a>c||a<m))return this.invalid=!0,{shouldCancel:!0};if(e==="")return this.required&&(this.invalid=!0),{shouldCancel:!0};this.invalid&&(this.invalid=!1),this.value=e;let w=e===this.max||e===this.min,M=!1;if(this.slot){let f=getComputedStyle(this),x=f.getPropertyValue("--to"),F=f.getPropertyValue("--from");if(this.slot==="from"){let k=Math.min(Number.parseInt(x),this.allowValuesOutsideRange?c-1:c);a>k&&(M=!0,this.allowValuesOutsideRange&&w?this.value=String(k):this.value=x,r&&(this.invalid=!0,await this.updateComplete,this.textfield.value=e))}else{let k=Math.max(Number.parseInt(F),this.allowValuesOutsideRange?m+1:m);a<k&&(M=!0,this.allowValuesOutsideRange&&w?this.value=String(k):this.value=F,r&&(this.invalid=!0,await this.updateComplete,this.textfield.value=e))}}return M?{shouldCancel:!0}:(this.range.value=Math.min(Math.max(Number(e),Number(this.min)),Number(this.max)).toString(),this.value=this.allowValuesOutsideRange&&!r&&w?"":e,this.shadowRoot.querySelector("w-attention").handleDone(),{shouldCancel:!1})},B=async function(e){let r=e.currentTarget.tagName==="W-TEXTFIELD";if(e instanceof CustomEvent)return;let a=e.currentTarget.value;return(await g(this,l,H).call(this,a,r)).shouldCancel?(e.preventDefault(),!1):!0},ne=async function(e){if(e.key!=="ArrowLeft"&&e.key!=="ArrowRight")return;let r=Number(this.range.value),a=this.step||1,c;e.key==="ArrowLeft"?c=r-a:c=r+a,c=Math.min(Math.max(c,Number(this.min)),Number(this.max)),(await g(this,l,H).call(this,c.toString(),!1)).shouldCancel&&e.preventDefault()},se=function(e){e instanceof CustomEvent&&e.type==="focus"&&(this._inputHasFocus=!0)},le=function(e){e instanceof CustomEvent&&e.type==="blur"&&(this._inputHasFocus=!1)},d.shadowRootOptions={...te.shadowRootOptions,delegatesFocus:!0},d.styles=[ee,oe,re],h([V({attribute:"aria-label",reflect:!0})],d.prototype,"ariaLabel",2),h([V({attribute:"aria-description",reflect:!0})],d.prototype,"ariaDescription",2),h([V({reflect:!0})],d.prototype,"label",2),h([V({reflect:!0})],d.prototype,"name",2),h([V({reflect:!0})],d.prototype,"value",2),h([V({type:Boolean,reflect:!0})],d.prototype,"disabled",2),h([V({type:Boolean,reflect:!0})],d.prototype,"invalid",2),h([V({attribute:!1,reflect:!1})],d.prototype,"allowValuesOutsideRange",2),h([z()],d.prototype,"markers",2),h([z()],d.prototype,"required",2),h([z()],d.prototype,"step",2),h([z()],d.prototype,"min",2),h([z()],d.prototype,"max",2),h([z()],d.prototype,"suffix",2),h([z()],d.prototype,"formatter",2),h([ae('input[type="range"]')],d.prototype,"range",2),h([ae("w-textfield")],d.prototype,"textfield",2),h([z()],d.prototype,"_showTooltip",2),h([z()],d.prototype,"_inputHasFocus",2);customElements.get("w-slider-thumb")||customElements.define("w-slider-thumb",d);export{d as WarpSliderThumb};
2747
+ `}};c=new WeakSet,W=function(){this._showTooltip=!0,this.shadowRoot.querySelector("w-attention").handleDone()},Q=function(){this._showTooltip=!1},de=function(){this.range&&(this.value===""?this.range.value=this.boundaryValue:this.value&&(this.range.value=this.value))},I=function(r){this.dispatchEvent(new CustomEvent("slidervalidity",{bubbles:!0,detail:{invalid:r,slot:this.slot}}))},ce=async function(r,t){let a=Number.parseInt(r);if(this.allowValuesOutsideRange&&!t&&this.step&&!(this.slot==="to"&&a>=Number(this.max)-1||this.slot==="from"&&a<=Number(this.min)+1)){let x=1/this.step;a=Math.round(a*x)/x,r=a.toString()}let n=Number.parseInt(this.max),s=Number.parseInt(this.min);if(!this.allowValuesOutsideRange&&(a>n||a<s))return g(this,c,I).call(this,K.t({id:"slider.error.out_of_bounds",message:"Value must be between {min} and {max}",values:{min:`${this.min} ${this.suffix}`.trim(),max:`${this.max} ${this.suffix}`.trim()}})),{shouldCancel:!0};if(r==="")return this.required&&g(this,c,I).call(this,K.t({id:"slider.error.required",message:"This field is required"})),{shouldCancel:!0};this.value=r;let i=r===this.max||r===this.min,d=!1;if(this.slot){let p=getComputedStyle(this),x=p.getPropertyValue("--to"),z=p.getPropertyValue("--from"),E=K.t({id:"slider.error.overlap",message:"The maximum value cannot be less than the minimum"});if(this.slot==="from"){let w=Math.min(Number.parseInt(x),this.allowValuesOutsideRange?n-1:n);a>w&&(d=!0,this.allowValuesOutsideRange&&i?this.value=String(w):this.value=x,t&&(g(this,c,I).call(this,E),await this.updateComplete,this.textfield.value=r))}else{let w=Math.max(Number.parseInt(z),this.allowValuesOutsideRange?s+1:s);a<w&&(d=!0,this.allowValuesOutsideRange&&i?this.value=String(w):this.value=z,t&&(g(this,c,I).call(this,E),await this.updateComplete,this.textfield.value=r))}}return d?{shouldCancel:!0}:(g(this,c,I).call(this,""),this.range.value=Math.min(Math.max(Number(r),Number(this.min)),Number(this.max)).toString(),this.value=this.allowValuesOutsideRange&&!t&&i?"":r,this.shadowRoot.querySelector("w-attention").handleDone(),{shouldCancel:!1})},he=async function(r){let t=r.currentTarget.tagName==="W-TEXTFIELD";if(r instanceof CustomEvent)return;let a=r.currentTarget.value;return(await g(this,c,ce).call(this,a,t)).shouldCancel?(r.preventDefault(),!1):!0},Le=async function(r){if(r.key!=="ArrowLeft"&&r.key!=="ArrowRight")return;let t=Number(this.range.value),a=this.step||1,n;r.key==="ArrowLeft"?n=t-a:n=t+a,n=Math.min(Math.max(n,Number(this.min)),Number(this.max)),(await g(this,c,ce).call(this,n.toString(),!1)).shouldCancel&&r.preventDefault()},De=function(r){r instanceof CustomEvent&&r.type==="focus"&&(this._inputHasFocus=!0)},Te=function(r){r instanceof CustomEvent&&r.type==="blur"&&(this._inputHasFocus=!1)},b.shadowRootOptions={...Pe.shadowRootOptions,delegatesFocus:!0},b.styles=[we,ke,xe],m([N({attribute:"aria-label",reflect:!0})],b.prototype,"ariaLabel",2),m([N({attribute:"aria-description",reflect:!0})],b.prototype,"ariaDescription",2),m([N({reflect:!0})],b.prototype,"label",2),m([N({reflect:!0})],b.prototype,"name",2),m([N({reflect:!0})],b.prototype,"value",2),m([N({type:Boolean,reflect:!0})],b.prototype,"disabled",2),m([N({type:Boolean,reflect:!0})],b.prototype,"invalid",2),m([N({attribute:!1,reflect:!1})],b.prototype,"allowValuesOutsideRange",2),m([$()],b.prototype,"markers",2),m([$()],b.prototype,"required",2),m([$()],b.prototype,"step",2),m([$()],b.prototype,"min",2),m([$()],b.prototype,"max",2),m([$()],b.prototype,"suffix",2),m([$()],b.prototype,"formatter",2),m([Se('input[type="range"]')],b.prototype,"range",2),m([Se("w-textfield")],b.prototype,"textfield",2),m([$()],b.prototype,"_showTooltip",2),m([$()],b.prototype,"_inputHasFocus",2);customElements.get("w-slider-thumb")||customElements.define("w-slider-thumb",b);export{b as WarpSliderThumb};
2730
2748
  //# sourceMappingURL=slider-thumb.js.map