@warp-ds/elements 2.8.2-next.6 → 2.9.0-next.1

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.
@@ -0,0 +1,213 @@
1
+ import { css } from "lit";
2
+ export const styles = css `
3
+ /* If not a link variant this should look like a button */
4
+ :host(:not([variant="link"])) {
5
+ --_background: var(--background, var(--w-s-color-background));
6
+ --_background-hover: var(
7
+ --background-hover,
8
+ var(--w-s-color-background-hover)
9
+ );
10
+ --_background-active: var(
11
+ --background-active,
12
+ var(--w-s-color-background-active)
13
+ );
14
+ --_text-color: var(--color, var(--w-s-color-text-link));
15
+ --_text-color-hover: var(--color-hover, var(--w-s-color-text-link));
16
+ --_text-color-active: var(--color-active, var(--w-s-color-text-link));
17
+ --_border-width: var(--border-width, 2px);
18
+ --_border: var(--border, var(--w-s-color-border));
19
+ --_border-hover: var(--border-hover, var(--w-s-color-border-hover));
20
+ --_border-active: var(--border-active, var(--w-s-color-border-active));
21
+ --_border-radius: var(--border-radius, var(--w-button-radius-default, 8px));
22
+ --_font-size: var(--font-size, var(--w-font-size-m));
23
+ --_line-height: var(--line-height, var(--w-line-height-m));
24
+ --_font-weight: var(--font-weight, bold);
25
+ --_padding-x: var(--padding-x, 16px);
26
+ --_padding-y: var(--padding-y, 13px);
27
+ }
28
+
29
+ :host(:not([variant="link"])) a {
30
+ display: inline-flex;
31
+ justify-content: center;
32
+ align-items: center;
33
+ text-align: center;
34
+ text-decoration: none;
35
+ cursor: pointer;
36
+ transition:
37
+ color 150ms cubic-bezier(0.4, 0, 0.2, 1),
38
+ background-color 150ms cubic-bezier(0.4, 0, 0.2, 1),
39
+ border-color 150ms cubic-bezier(0.4, 0, 0.2, 1),
40
+ fill 150ms cubic-bezier(0.4, 0, 0.2, 1),
41
+ stroke 150ms cubic-bezier(0.4, 0, 0.2, 1);
42
+
43
+ background-color: var(--_background);
44
+ color: var(--_text-color);
45
+ border: var(--_border-width) solid var(--_border);
46
+ border-radius: var(--_border-radius);
47
+ padding: calc(var(--_padding-y) - var(--_border-width))
48
+ calc(var(--_padding-x) - var(--_border-width));
49
+ font-size: var(--_font-size);
50
+ line-height: var(--_line-height);
51
+ font-weight: var(--_font-weight);
52
+ }
53
+
54
+ :host(:not([variant="link"])) a:hover {
55
+ background-color: var(--_background-hover);
56
+ border-color: var(--_border-hover);
57
+ color: var(--_text-color-hover);
58
+ }
59
+
60
+ :host(:not([variant="link"])) a:active {
61
+ background-color: var(--_background-active);
62
+ border-color: var(--_border-active);
63
+ color: var(--_text-color-active);
64
+ }
65
+
66
+ :host(:not([variant="link"])) a:focus-visible {
67
+ outline: 2px solid var(--w-s-color-border-focus);
68
+ outline-offset: var(--w-outline-offset, 1px);
69
+ }
70
+
71
+ /* Variants config */
72
+ :host([variant="primary"]) {
73
+ --background: var(--w-s-color-background-primary);
74
+ --background-hover: var(--w-s-color-background-primary-hover);
75
+ --background-active: var(--w-s-color-background-primary-active);
76
+ --color: var(--w-s-color-text-inverted);
77
+ --color-hover: var(--w-s-color-text-inverted);
78
+ --color-active: var(--w-s-color-text-inverted);
79
+ --border-width: 0px;
80
+ }
81
+ :host([variant="quiet"]),
82
+ :host([quiet]) /* deprecated, backwards compatibility, use variant="quiet" */ {
83
+ --background: transparent;
84
+ --color: var(--w-s-color-text-link);
85
+ --color-hover: var(--w-s-color-text-link-hover);
86
+ --color-active: var(--w-s-color-text-link-active);
87
+ --border-width: 0px;
88
+ }
89
+ :host([variant="negative"]) {
90
+ --background: var(--w-s-color-background-negative);
91
+ --background-hover: var(--w-s-color-background-negative-hover);
92
+ --background-active: var(--w-s-color-background-negative-active);
93
+ --color: var(--w-s-color-text-inverted);
94
+ --color-hover: var(--w-s-color-text-inverted);
95
+ --color-active: var(--w-s-color-text-inverted);
96
+ --border-width: 0px;
97
+ }
98
+ :host([variant="negativeQuiet"]),
99
+ :host([quiet][variant="negative"]) /* deprecated, backwards compatibility */ {
100
+ --background: transparent;
101
+ --background-hover: var(--w-s-color-background-negative-subtle-hover);
102
+ --background-active: var(--w-s-color-background-negative-subtle-active);
103
+ --color: var(--w-s-color-text-negative);
104
+ --color-hover: var(--w-s-color-text-negative);
105
+ --color-active: var(--w-s-color-text-negative);
106
+ --border-width: 0px;
107
+ }
108
+ :host([variant="utility"]) {
109
+ --background: var(--w-s-color-background);
110
+ --background-hover: var(--w-s-color-background-hover);
111
+ --background-active: var(--w-s-color-background-active);
112
+ --color: var(--w-s-color-text);
113
+ --color-hover: var(--w-s-color-text);
114
+ --color-active: var(--w-s-color-text);
115
+ --border-radius: var(--w-button-radius-utility, 4px);
116
+ --border-width: 1px;
117
+ }
118
+ :host([variant="utilityQuiet"]),
119
+ :host([quiet][variant="utility"]) /* deprecated, backwards compatibility */ {
120
+ --background: transparent;
121
+ --color: var(--w-s-color-text);
122
+ --color-hover: var(--w-s-color-text);
123
+ --color-active: var(--w-s-color-text);
124
+ --border-width: 0px;
125
+ }
126
+ :host([variant="overlay"]) {
127
+ --background: var(--w-color-background);
128
+ --background-hover: var(--w-color-background-hover);
129
+ --background-active: var(--w-color-background-active);
130
+ --color: var(--w-s-color-text);
131
+ --color-hover: var(--w-s-color-text);
132
+ --color-active: var(--w-s-color-text);
133
+ --border-radius: 9999px;
134
+ --border-width: 0px;
135
+ }
136
+ :host([variant="overlayQuiet"]),
137
+ :host([quiet][variant="overlay"]) /* deprecated, backwards compatibility */ {
138
+ --background: transparent;
139
+ --background-hover: var(--w-s-color-background-hover);
140
+ --background-active: var(--w-s-color-background-active);
141
+ --color: var(--w-s-color-text);
142
+ --color-hover: var(--w-s-color-text);
143
+ --color-active: var(--w-s-color-text);
144
+ --border-radius: 9999px;
145
+ --border-width: 0px;
146
+ }
147
+ :host([variant="overlayInverted"]) {
148
+ --background: var(--w-s-color-background-inverted);
149
+ --background-hover: var(--w-s-color-background-inverted-hover);
150
+ --background-active: var(--w-s-color-background-inverted-active);
151
+ --color: var(--w-s-color-text-inverted);
152
+ --color-hover: var(--w-s-color-text-inverted);
153
+ --color-active: var(--w-s-color-text-inverted);
154
+ --border-radius: 9999px;
155
+ --border-width: 0px;
156
+ }
157
+ :host([variant="overlayInvertedQuiet"]),
158
+ :host([quiet][variant="overlayInverted"]) /* deprecated, backwards compatibility */ {
159
+ --background: transparent;
160
+ --background-hover: var(--w-s-color-background-inverted-hover);
161
+ --background-active: var(--w-s-color-background-inverted-active);
162
+ --color: var(--w-s-color-text-inverted);
163
+ --color-hover: var(--w-s-color-text-inverted);
164
+ --color-active: var(--w-s-color-text-inverted);
165
+ --border-radius: 9999px;
166
+ --border-width: 0px;
167
+ }
168
+
169
+ :host([variant="link"]) {
170
+ --background: none;
171
+ --background-hover: none;
172
+ --background-active: none;
173
+ --border-width: 0px;
174
+ --font-weight: normal;
175
+ display: inline;
176
+ }
177
+
178
+ /* States config, selects --loading as well since loading is always supposed to be disabled */
179
+ :host(:disabled),
180
+ :host([disabled]) {
181
+ --background: var(--w-s-color-background-disabled);
182
+ --background-hover: var(--w-s-color-background-disabled);
183
+ --background-active: var(--w-s-color-background-disabled);
184
+ --color: var(--w-s-color-text-inverted);
185
+ --color-hover: var(--w-s-color-text-inverted);
186
+ --color-active: var(--w-s-color-text-inverted);
187
+ --border-width: 0px;
188
+ }
189
+
190
+ :host(:disabled) a,
191
+ :host([disabled]) a {
192
+ cursor: not-allowed;
193
+ pointer-events: none;
194
+ }
195
+
196
+ :host([variant="link"]):hover a {
197
+ text-decoration: underline;
198
+ }
199
+
200
+ /* Sizes config */
201
+ :host([small]) {
202
+ --padding-x: 12px;
203
+ --padding-y: 8px;
204
+ --font-size: var(--w-font-size-xs);
205
+ --line-height: var(--w-line-height-xs);
206
+ }
207
+
208
+ /* Width config */
209
+ :host([full-width]) a {
210
+ width: 100%;
211
+ max-width: 100%;
212
+ }
213
+ `;
@@ -1,13 +1,13 @@
1
- var Se=Object.create;var D=Object.defineProperty;var Z=Object.getOwnPropertyDescriptor;var Le=Object.getOwnPropertyNames;var Ce=Object.getPrototypeOf,Fe=Object.prototype.hasOwnProperty;var B=o=>{throw TypeError(o)};var J=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports);var Oe=(o,e,r,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Le(e))!Fe.call(o,a)&&a!==r&&D(o,a,{get:()=>e[a],enumerable:!(t=Z(e,a))||t.enumerable});return o};var Ne=(o,e,r)=>(r=o!=null?Se(Ce(o)):{},Oe(e||!o||!o.__esModule?D(r,"default",{value:o,enumerable:!0}):r,o));var b=(o,e,r,t)=>{for(var a=t>1?void 0:t?Z(e,r):e,n=o.length-1,i;n>=0;n--)(i=o[n])&&(a=(t?i(e,r,a):i(a))||a);return t&&a&&D(e,r,a),a};var Ae=(o,e,r)=>e.has(o)||B("Cannot "+r);var G=(o,e,r)=>e.has(o)?B("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,r);var u=(o,e,r)=>(Ae(o,e,"access private method"),r);var K=J(y=>{"use strict";Object.defineProperty(y,"__esModule",{value:!0});y.errorMessages=y.ErrorType=void 0;var E;(function(o){o.MalformedUnicode="MALFORMED_UNICODE",o.MalformedHexadecimal="MALFORMED_HEXADECIMAL",o.CodePointLimit="CODE_POINT_LIMIT",o.OctalDeprecation="OCTAL_DEPRECATION",o.EndOfString="END_OF_STRING"})(E=y.ErrorType||(y.ErrorType={}));y.errorMessages=new Map([[E.MalformedUnicode,"malformed Unicode character escape sequence"],[E.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[E.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[E.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[E.EndOfString,"malformed escape sequence at end of string"]])});var ee=J(m=>{"use strict";Object.defineProperty(m,"__esModule",{value:!0});m.unraw=m.errorMessages=m.ErrorType=void 0;var p=K();Object.defineProperty(m,"ErrorType",{enumerable:!0,get:function(){return p.ErrorType}});Object.defineProperty(m,"errorMessages",{enumerable:!0,get:function(){return p.errorMessages}});function De(o){return!o.match(/[^a-f0-9]/i)?parseInt(o,16):NaN}function S(o,e,r){let t=De(o);if(Number.isNaN(t)||r!==void 0&&r!==o.length)throw new SyntaxError(p.errorMessages.get(e));return t}function Ie(o){let e=S(o,p.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(e)}function Q(o,e){let r=S(o,p.ErrorType.MalformedUnicode,4);if(e!==void 0){let t=S(e,p.ErrorType.MalformedUnicode,4);return String.fromCharCode(r,t)}return String.fromCharCode(r)}function qe(o){return o.charAt(0)==="{"&&o.charAt(o.length-1)==="}"}function je(o){if(!qe(o))throw new SyntaxError(p.errorMessages.get(p.ErrorType.MalformedUnicode));let e=o.slice(1,-1),r=S(e,p.ErrorType.MalformedUnicode);try{return String.fromCodePoint(r)}catch(t){throw t instanceof RangeError?new SyntaxError(p.errorMessages.get(p.ErrorType.CodePointLimit)):t}}function Pe(o,e=!1){if(e)throw new SyntaxError(p.errorMessages.get(p.ErrorType.OctalDeprecation));let r=parseInt(o,8);return String.fromCharCode(r)}var Re=new Map([["b","\b"],["f","\f"],["n",`
2
- `],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function Ye(o){return Re.get(o)||o}var $e=/\\(?:(\\)|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 W(o,e=!1){return o.replace($e,function(r,t,a,n,i,s,l,h,x){if(t!==void 0)return"\\";if(a!==void 0)return Ie(a);if(n!==void 0)return je(n);if(i!==void 0)return Q(i,s);if(l!==void 0)return Q(l);if(h==="0")return"\0";if(h!==void 0)return Pe(h,!e);if(x!==void 0)return Ye(x);throw new SyntaxError(p.errorMessages.get(p.ErrorType.EndOfString))})}m.unraw=W;m.default=W});import{html as z,LitElement as ke,nothing as $}from"lit";import{property as g,state as O}from"lit/decorators.js";var te=Ne(ee(),1);var f=o=>typeof o=="string",He=o=>typeof o=="function",re=new Map,ae="en";function P(o){return[...Array.isArray(o)?o:[o],ae]}function R(o,e,r){let t=P(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 L(()=>C("date",t,r),()=>new Intl.DateTimeFormat(t,a)).format(f(e)?new Date(e):e)}function Xe(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 R(o,e,t)}function I(o,e,r){let t=P(o);return L(()=>C("number",t,r),()=>new Intl.NumberFormat(t,r)).format(e)}function oe(o,e,r,{offset:t=0,...a}){var s,l;let n=P(o),i=e?L(()=>C("plural-ordinal",n),()=>new Intl.PluralRules(n,{type:"ordinal"})):L(()=>C("plural-cardinal",n),()=>new Intl.PluralRules(n,{type:"cardinal"}));return(l=(s=a[r])!=null?s:a[i.select(r-t)])!=null?l:a.other}function L(o,e){let r=o(),t=re.get(r);return t||(t=e(),re.set(r,t)),t}function C(o,e,r){let t=e.join("-");return`${o}-${t}-${JSON.stringify(r)}`}var ie=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,ne="%__lingui_octothorpe__%",Ue=(o,e,r={})=>{let t=e||o,a=i=>typeof i=="object"?i:r[i],n=(i,s)=>{let l=Object.keys(r).length?a("number"):void 0,h=I(t,i,l);return s.replace(new RegExp(ne,"g"),h)};return{plural:(i,s)=>{let{offset:l=0}=s,h=oe(t,!1,i,s);return n(i-l,h)},selectordinal:(i,s)=>{let{offset:l=0}=s,h=oe(t,!0,i,s);return n(i-l,h)},select:Ve,number:(i,s)=>I(t,i,a(s)||{style:s}),date:(i,s)=>R(t,i,a(s)||s),time:(i,s)=>Xe(t,i,a(s)||s)}},Ve=(o,e)=>{var r;return(r=e[o])!=null?r:e.other};function Ze(o,e,r){return(t={},a)=>{let n=Ue(e,r,a),i=(l,h=!1)=>Array.isArray(l)?l.reduce((x,M)=>{if(M==="#"&&h)return x+ne;if(f(M))return x+M;let[U,k,V]=M,N={};k==="plural"||k==="selectordinal"||k==="select"?Object.entries(V).forEach(([A,Te])=>{N[A]=i(Te,k==="plural"||k==="selectordinal")}):N=V;let T;if(k){let A=n[k];T=A(t[U],N)}else T=t[U];return T==null?x:x+T},""):l,s=i(o);return f(s)&&ie.test(s)?(0,te.unraw)(s):f(s)?s:s?String(s):""}}var Be=Object.defineProperty,Je=(o,e,r)=>e in o?Be(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,Ge=(o,e,r)=>(Je(o,typeof e!="symbol"?e+"":e,r),r),q=class{constructor(){Ge(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}},Ke=Object.defineProperty,Qe=(o,e,r)=>e in o?Ke(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,_=(o,e,r)=>(Qe(o,typeof e!="symbol"?e+"":e,r),r),j=class extends q{constructor(e){var r;super(),_(this,"_locale",""),_(this,"_locales"),_(this,"_localeData",{}),_(this,"_messages",{}),_(this,"_missing"),_(this,"_messageCompiler"),_(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:ae,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=""),f(e)||(r=e.values||r,a=e.message,e=e.id);let n=this.messages[e],i=n===void 0,s=this._missing;if(s&&i)return He(s)?s(this._locale,e):s;i&&this.emit("missing",{id:e,locale:this._locale});let l=n||a||e;return f(l)&&(this._messageCompiler?l=this._messageCompiler(l):console.warn(`Uncompiled message detected! Message:
1
+ var Le=Object.create;var I=Object.defineProperty;var Z=Object.getOwnPropertyDescriptor;var Ce=Object.getOwnPropertyNames;var Fe=Object.getPrototypeOf,Oe=Object.prototype.hasOwnProperty;var B=o=>{throw TypeError(o)};var J=(o,r)=>()=>(r||o((r={exports:{}}).exports,r),r.exports);var Ne=(o,r,e,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of Ce(r))!Oe.call(o,a)&&a!==e&&I(o,a,{get:()=>r[a],enumerable:!(t=Z(r,a))||t.enumerable});return o};var Ae=(o,r,e)=>(e=o!=null?Le(Fe(o)):{},Ne(r||!o||!o.__esModule?I(e,"default",{value:o,enumerable:!0}):e,o));var b=(o,r,e,t)=>{for(var a=t>1?void 0:t?Z(r,e):r,n=o.length-1,i;n>=0;n--)(i=o[n])&&(a=(t?i(r,e,a):i(a))||a);return t&&a&&I(r,e,a),a};var De=(o,r,e)=>r.has(o)||B("Cannot "+e);var G=(o,r,e)=>r.has(o)?B("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(o):r.set(o,e);var u=(o,r,e)=>(De(o,r,"access private method"),e);var K=J(y=>{"use strict";Object.defineProperty(y,"__esModule",{value:!0});y.errorMessages=y.ErrorType=void 0;var E;(function(o){o.MalformedUnicode="MALFORMED_UNICODE",o.MalformedHexadecimal="MALFORMED_HEXADECIMAL",o.CodePointLimit="CODE_POINT_LIMIT",o.OctalDeprecation="OCTAL_DEPRECATION",o.EndOfString="END_OF_STRING"})(E=y.ErrorType||(y.ErrorType={}));y.errorMessages=new Map([[E.MalformedUnicode,"malformed Unicode character escape sequence"],[E.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[E.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[E.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[E.EndOfString,"malformed escape sequence at end of string"]])});var ee=J(m=>{"use strict";Object.defineProperty(m,"__esModule",{value:!0});m.unraw=m.errorMessages=m.ErrorType=void 0;var h=K();Object.defineProperty(m,"ErrorType",{enumerable:!0,get:function(){return h.ErrorType}});Object.defineProperty(m,"errorMessages",{enumerable:!0,get:function(){return h.errorMessages}});function Ie(o){return!o.match(/[^a-f0-9]/i)?parseInt(o,16):NaN}function S(o,r,e){let t=Ie(o);if(Number.isNaN(t)||e!==void 0&&e!==o.length)throw new SyntaxError(h.errorMessages.get(r));return t}function qe(o){let r=S(o,h.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(r)}function Q(o,r){let e=S(o,h.ErrorType.MalformedUnicode,4);if(r!==void 0){let t=S(r,h.ErrorType.MalformedUnicode,4);return String.fromCharCode(e,t)}return String.fromCharCode(e)}function je(o){return o.charAt(0)==="{"&&o.charAt(o.length-1)==="}"}function Re(o){if(!je(o))throw new SyntaxError(h.errorMessages.get(h.ErrorType.MalformedUnicode));let r=o.slice(1,-1),e=S(r,h.ErrorType.MalformedUnicode);try{return String.fromCodePoint(e)}catch(t){throw t instanceof RangeError?new SyntaxError(h.errorMessages.get(h.ErrorType.CodePointLimit)):t}}function $e(o,r=!1){if(r)throw new SyntaxError(h.errorMessages.get(h.ErrorType.OctalDeprecation));let e=parseInt(o,8);return String.fromCharCode(e)}var Pe=new Map([["b","\b"],["f","\f"],["n",`
2
+ `],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function Ye(o){return Pe.get(o)||o}var He=/\\(?:(\\)|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 W(o,r=!1){return o.replace(He,function(e,t,a,n,i,s,d,p,x){if(t!==void 0)return"\\";if(a!==void 0)return qe(a);if(n!==void 0)return Re(n);if(i!==void 0)return Q(i,s);if(d!==void 0)return Q(d);if(p==="0")return"\0";if(p!==void 0)return $e(p,!r);if(x!==void 0)return Ye(x);throw new SyntaxError(h.errorMessages.get(h.ErrorType.EndOfString))})}m.unraw=W;m.default=W});import{html as z,LitElement as ke,nothing as H}from"lit";import{property as g,state as O}from"lit/decorators.js";var te=Ae(ee(),1);var f=o=>typeof o=="string",Xe=o=>typeof o=="function",re=new Map,ae="en";function $(o){return[...Array.isArray(o)?o:[o],ae]}function P(o,r,e){let t=$(o);e||(e="default");let a;if(typeof e=="string")switch(a={day:"numeric",month:"short",year:"numeric"},e){case"full":a.weekday="long";case"long":a.month="long";break;case"short":a.month="numeric";break}else a=e;return L(()=>C("date",t,e),()=>new Intl.DateTimeFormat(t,a)).format(f(r)?new Date(r):r)}function Ue(o,r,e){let t;if(e||(e="default"),typeof e=="string")switch(t={second:"numeric",minute:"numeric",hour:"numeric"},e){case"full":case"long":t.timeZoneName="short";break;case"short":delete t.second}else t=e;return P(o,r,t)}function q(o,r,e){let t=$(o);return L(()=>C("number",t,e),()=>new Intl.NumberFormat(t,e)).format(r)}function oe(o,r,e,{offset:t=0,...a}){var s,d;let n=$(o),i=r?L(()=>C("plural-ordinal",n),()=>new Intl.PluralRules(n,{type:"ordinal"})):L(()=>C("plural-cardinal",n),()=>new Intl.PluralRules(n,{type:"cardinal"}));return(d=(s=a[e])!=null?s:a[i.select(e-t)])!=null?d:a.other}function L(o,r){let e=o(),t=re.get(e);return t||(t=r(),re.set(e,t)),t}function C(o,r,e){let t=r.join("-");return`${o}-${t}-${JSON.stringify(e)}`}var ie=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,ne="%__lingui_octothorpe__%",Ve=(o,r,e={})=>{let t=r||o,a=i=>typeof i=="object"?i:e[i],n=(i,s)=>{let d=Object.keys(e).length?a("number"):void 0,p=q(t,i,d);return s.replace(new RegExp(ne,"g"),p)};return{plural:(i,s)=>{let{offset:d=0}=s,p=oe(t,!1,i,s);return n(i-d,p)},selectordinal:(i,s)=>{let{offset:d=0}=s,p=oe(t,!0,i,s);return n(i-d,p)},select:Ze,number:(i,s)=>q(t,i,a(s)||{style:s}),date:(i,s)=>P(t,i,a(s)||s),time:(i,s)=>Ue(t,i,a(s)||s)}},Ze=(o,r)=>{var e;return(e=r[o])!=null?e:r.other};function Be(o,r,e){return(t={},a)=>{let n=Ve(r,e,a),i=(d,p=!1)=>Array.isArray(d)?d.reduce((x,M)=>{if(M==="#"&&p)return x+ne;if(f(M))return x+M;let[U,k,V]=M,A={};k==="plural"||k==="selectordinal"||k==="select"?Object.entries(V).forEach(([D,Se])=>{A[D]=i(Se,k==="plural"||k==="selectordinal")}):A=V;let T;if(k){let D=n[k];T=D(t[U],A)}else T=t[U];return T==null?x:x+T},""):d,s=i(o);return f(s)&&ie.test(s)?(0,te.unraw)(s):f(s)?s:s?String(s):""}}var Je=Object.defineProperty,Ge=(o,r,e)=>r in o?Je(o,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[r]=e,Ke=(o,r,e)=>(Ge(o,typeof r!="symbol"?r+"":r,e),e),j=class{constructor(){Ke(this,"_events",{})}on(r,e){var a;var t;return(a=(t=this._events)[r])!=null||(t[r]=[]),this._events[r].push(e),()=>this.removeListener(r,e)}removeListener(r,e){let t=this._getListeners(r);if(!t)return;let a=t.indexOf(e);~a&&t.splice(a,1)}emit(r,...e){let t=this._getListeners(r);t&&t.map(a=>a.apply(this,e))}_getListeners(r){let e=this._events[r];return Array.isArray(e)?e:!1}},Qe=Object.defineProperty,We=(o,r,e)=>r in o?Qe(o,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[r]=e,_=(o,r,e)=>(We(o,typeof r!="symbol"?r+"":r,e),e),R=class extends j{constructor(r){var e;super(),_(this,"_locale",""),_(this,"_locales"),_(this,"_localeData",{}),_(this,"_messages",{}),_(this,"_missing"),_(this,"_messageCompiler"),_(this,"t",this._.bind(this)),r.missing!=null&&(this._missing=r.missing),r.messages!=null&&this.load(r.messages),r.localeData!=null&&this.loadLocaleData(r.localeData),(typeof r.locale=="string"||r.locales)&&this.activate((e=r.locale)!=null?e:ae,r.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){var r;return(r=this._messages[this._locale])!=null?r:{}}get localeData(){var r;return(r=this._localeData[this._locale])!=null?r:{}}_loadLocaleData(r,e){let t=this._localeData[r];t?Object.assign(t,e):this._localeData[r]=e}setMessagesCompiler(r){return this._messageCompiler=r,this}loadLocaleData(r,e){typeof r=="string"?this._loadLocaleData(r,e):Object.keys(r).forEach(t=>this._loadLocaleData(t,r[t])),this.emit("change")}_load(r,e){let t=this._messages[r];t?Object.assign(t,e):this._messages[r]=e}load(r,e){typeof r=="string"&&typeof e=="object"?this._load(r,e):Object.entries(r).forEach(([t,a])=>this._load(t,a)),this.emit("change")}loadAndActivate({locale:r,locales:e,messages:t}){this._locale=r,this._locales=e||void 0,this._messages[this._locale]=t,this.emit("change")}activate(r,e){this._locale=r,this._locales=e,this.emit("change")}_(r,e,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;r||(r=""),f(r)||(e=r.values||e,a=r.message,r=r.id);let n=this.messages[r],i=n===void 0,s=this._missing;if(s&&i)return Xe(s)?s(this._locale,r):s;i&&this.emit("missing",{id:r,locale:this._locale});let d=n||a||r;return f(d)&&(this._messageCompiler?d=this._messageCompiler(d):console.warn(`Uncompiled message detected! Message:
3
3
 
4
- > ${l}
4
+ > ${d}
5
5
 
6
6
  That means you use raw catalog or your catalog doesn't have a translation for the message and fallback was used.
7
7
  ICU features such as interpolation and plurals will not work properly for that message.
8
8
 
9
9
  Please compile your catalog first.
10
- `)),f(l)&&ie.test(l)?JSON.parse(`"${l}"`):f(l)?l:Ze(l,this._locale,this._locales)(r,t==null?void 0:t.formats)}date(e,r){return R(this._locales||this._locale,e,r)}number(e,r){return I(this._locales||this._locale,e,r)}};function We(o={}){return new j(o)}var v=We();var er=["en","nb","fi","da","sv"],Y="en",F=o=>er.find(e=>o===e||o.toLowerCase().includes(e))||Y;function de(){if(typeof window=="undefined"){let o=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return F(o)}try{let o=le(document);if(o)return F(o);let e=ar();if(e)return F(e);let r=le(ue());return r?F(r):Y}catch(o){return console.warn("could not detect locale, falling back to source locale",o),Y}}var ce=(o,e,r,t,a)=>{v.load("en",o),v.load("nb",e),v.load("fi",r),v.load("da",t),v.load("sv",a);let n=de();v.activate(n),be(),or()},rr="warp-i18n-change";function be(){typeof window!="undefined"&&window.dispatchEvent(new Event(rr))}var se=!1;function or(){if(se||typeof window=="undefined"||!(document!=null&&document.documentElement))return;se=!0;let o=()=>{let a=de();v.locale!==a&&(v.activate(a),be())},e=new MutationObserver(a=>{for(let n of a)if(n.type==="attributes"&&n.attributeName==="lang"){o();break}});e.observe(document.documentElement,{attributes:!0,attributeFilter:["lang"]});let r=ue();r&&r.documentElement&&r!==document&&e.observe(r.documentElement,{attributes:!0,attributeFilter:["lang"]});let t=tr();t&&e.observe(t,{attributes:!0,attributeFilter:["lang"]})}function ue(){var o,e;try{return(e=(o=window.parent)==null?void 0:o.document)!=null?e:null}catch(r){return null}}function le(o){var e,r;try{return(r=(e=o==null?void 0:o.documentElement)==null?void 0:e.lang)!=null?r:""}catch(t){return""}}function tr(){var o;try{return(o=window.frameElement)!=null?o:null}catch(e){return null}}function ar(){var o,e,r;try{return(r=(e=(o=window.frameElement)==null?void 0:o.getAttribute)==null?void 0:e.call(o,"lang"))!=null?r:""}catch(t){return""}}import{css as ge}from"lit";var pe=ge`
10
+ `)),f(d)&&ie.test(d)?JSON.parse(`"${d}"`):f(d)?d:Be(d,this._locale,this._locales)(e,t==null?void 0:t.formats)}date(r,e){return P(this._locales||this._locale,r,e)}number(r,e){return q(this._locales||this._locale,r,e)}};function er(o={}){return new R(o)}var v=er();var rr=["en","nb","fi","da","sv"],Y="en",F=o=>rr.find(r=>o===r||o.toLowerCase().includes(r))||Y;function de(){if(typeof window=="undefined"){let o=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return F(o)}try{let o=le(document);if(o)return F(o);let r=ir();if(r)return F(r);let e=le(ue());return e?F(e):Y}catch(o){return console.warn("could not detect locale, falling back to source locale",o),Y}}var ce=(o,r,e,t,a)=>{v.load("en",o),v.load("nb",r),v.load("fi",e),v.load("da",t),v.load("sv",a);let n=de();v.activate(n),be(),tr()},or="warp-i18n-change";function be(){typeof window!="undefined"&&window.dispatchEvent(new Event(or))}var se=!1;function tr(){if(se||typeof window=="undefined"||!(document!=null&&document.documentElement))return;se=!0;let o=()=>{let a=de();v.locale!==a&&(v.activate(a),be())},r=new MutationObserver(a=>{for(let n of a)if(n.type==="attributes"&&n.attributeName==="lang"){o();break}});r.observe(document.documentElement,{attributes:!0,attributeFilter:["lang"]});let e=ue();e&&e.documentElement&&e!==document&&r.observe(e.documentElement,{attributes:!0,attributeFilter:["lang"]});let t=ar();t&&r.observe(t,{attributes:!0,attributeFilter:["lang"]})}function ue(){var o,r;try{return(r=(o=window.parent)==null?void 0:o.document)!=null?r:null}catch(e){return null}}function le(o){var r,e;try{return(e=(r=o==null?void 0:o.documentElement)==null?void 0:r.lang)!=null?e:""}catch(t){return""}}function ar(){var o;try{return(o=window.frameElement)!=null?o:null}catch(r){return null}}function ir(){var o,r,e;try{return(e=(r=(o=window.frameElement)==null?void 0:o.getAttribute)==null?void 0:r.call(o,"lang"))!=null?e:""}catch(t){return""}}import{css as ge}from"lit";var he=ge`
11
11
  *,
12
12
  :before,
13
13
  :after {
@@ -2446,7 +2446,7 @@ Please compile your catalog first.
2446
2446
  display: none
2447
2447
  }
2448
2448
  }
2449
- `;var he=JSON.parse('{"slider.label.from":["From"],"slider.placeholder.to":["Max"],"slider.placeholder.from":["Min"],"slider.error.overlap":["Maksimumv\xE6rdien m\xE5 ikke v\xE6re mindre end minimumv\xE6rdien"],"slider.error.required":["Dette felt er p\xE5kr\xE6vet"],"slider.label.to":["To"],"slider.error.out_of_bounds":["V\xE6rdien skal v\xE6re mellem ",["min"]," og ",["max"]]}');var me=JSON.parse('{"slider.label.from":["From"],"slider.placeholder.to":["Max"],"slider.placeholder.from":["Min"],"slider.error.overlap":["The maximum value cannot be less than the minimum"],"slider.error.required":["This field is required"],"slider.label.to":["To"],"slider.error.out_of_bounds":["Value must be between ",["min"]," and ",["max"]]}');var ve=JSON.parse('{"slider.label.from":["From"],"slider.placeholder.to":["Max"],"slider.placeholder.from":["Min"],"slider.error.overlap":["Maksimiarvo ei voi olla pienempi kuin minimiarvo"],"slider.error.required":["T\xE4m\xE4 kentt\xE4 on pakollinen"],"slider.label.to":["To"],"slider.error.out_of_bounds":["Arvon on oltava v\xE4lill\xE4 ",["min"]," - ",["max"]]}');var fe=JSON.parse('{"slider.label.from":["From"],"slider.placeholder.to":["Max"],"slider.placeholder.from":["Min"],"slider.error.overlap":["Maksimumsverdien kan ikke v\xE6re mindre enn minimumsverdien"],"slider.error.required":["Dette feltet er p\xE5krevd"],"slider.label.to":["To"],"slider.error.out_of_bounds":["Verdien m\xE5 v\xE6re mellom ",["min"]," og ",["max"]]}');var we=JSON.parse('{"slider.label.from":["From"],"slider.placeholder.to":["Max"],"slider.placeholder.from":["Min"],"slider.error.overlap":["Maxv\xE4rdet kan inte vara mindre \xE4n minimiv\xE4rdet"],"slider.error.required":["Detta f\xE4lt \xE4r obligatoriskt"],"slider.label.to":["To"],"slider.error.out_of_bounds":["V\xE4rdet m\xE5ste vara mellan ",["min"]," och ",["max"]]}');import{css as ir}from"lit";var xe=ir`
2449
+ `;var pe=JSON.parse('{"slider.label.from":["From"],"slider.placeholder.to":["Max"],"slider.placeholder.from":["Min"],"slider.error.overlap":["Maksimumv\xE6rdien m\xE5 ikke v\xE6re mindre end minimumv\xE6rdien"],"slider.error.required":["Dette felt er p\xE5kr\xE6vet"],"slider.label.to":["To"],"slider.error.out_of_bounds":["V\xE6rdien skal v\xE6re mellem ",["min"]," og ",["max"]]}');var me=JSON.parse('{"slider.label.from":["From"],"slider.placeholder.to":["Max"],"slider.placeholder.from":["Min"],"slider.error.overlap":["The maximum value cannot be less than the minimum"],"slider.error.required":["This field is required"],"slider.label.to":["To"],"slider.error.out_of_bounds":["Value must be between ",["min"]," and ",["max"]]}');var ve=JSON.parse('{"slider.label.from":["From"],"slider.placeholder.to":["Max"],"slider.placeholder.from":["Min"],"slider.error.overlap":["Maksimiarvo ei voi olla pienempi kuin minimiarvo"],"slider.error.required":["T\xE4m\xE4 kentt\xE4 on pakollinen"],"slider.label.to":["To"],"slider.error.out_of_bounds":["Arvon on oltava v\xE4lill\xE4 ",["min"]," - ",["max"]]}');var fe=JSON.parse('{"slider.label.from":["From"],"slider.placeholder.to":["Max"],"slider.placeholder.from":["Min"],"slider.error.overlap":["Maksimumsverdien kan ikke v\xE6re mindre enn minimumsverdien"],"slider.error.required":["Dette feltet er p\xE5krevd"],"slider.label.to":["To"],"slider.error.out_of_bounds":["Verdien m\xE5 v\xE6re mellom ",["min"]," og ",["max"]]}');var we=JSON.parse('{"slider.label.from":["From"],"slider.placeholder.to":["Max"],"slider.placeholder.from":["Min"],"slider.error.overlap":["Maxv\xE4rdet kan inte vara mindre \xE4n minimiv\xE4rdet"],"slider.error.required":["Detta f\xE4lt \xE4r obligatoriskt"],"slider.label.to":["To"],"slider.error.out_of_bounds":["V\xE4rdet m\xE5ste vara mellan ",["min"]," och ",["max"]]}');import{css as nr}from"lit";var xe=nr`
2450
2450
  .w-slider {
2451
2451
  position: relative;
2452
2452
  border: none;
@@ -2598,44 +2598,45 @@ Please compile your catalog first.
2598
2598
  bottom: 0;
2599
2599
  grid-area: slider;
2600
2600
  }
2601
- `;var d,w,ye,_e,Ee,ze,Me,H,X,c=class extends ke{constructor(){super();G(this,d);this.disabled=!1;this.openEnded=!1;this.invalid=!1;this.required=!1;this.hiddenTextfield=!1;this._invalidMessage="";this._hasInternalError=!1;this._showError=!1;this._tabbableElements=[];ce(me,fe,ve,he,we)}get edgeMin(){return this.openEnded?(Number(this.min)-1).toString():this.min}get edgeMax(){return this.openEnded?(Number(this.max)+1).toString():this.max}async connectedCallback(){super.connectedCallback(),await this.updateComplete,requestAnimationFrame(()=>{requestAnimationFrame(()=>{setTimeout(()=>{this.step&&this.style.setProperty("--step",String(this.step)),this.min!==void 0&&this.style.setProperty("--min",this.edgeMin),this.max!==void 0&&this.style.setProperty("--max",this.max),this.markers&&this.style.setProperty("--markers",String(this.markers)),this.openEnded&&this.style.setProperty("--over-under-offset","1"),this.querySelectorAll("w-slider-thumb").length===2&&this.style.setProperty("--range-slider-magic-pixel","1px")},0)})});let r=this.querySelectorAll("w-slider-thumb");if(r.length===2){let a=Array.from(r);this._tabbableElements[0]=a[0].shadowRoot.querySelector("input"),this._tabbableElements[1]=a[1].shadowRoot.querySelector("input"),this._tabbableElements[2]=a[0].shadowRoot.querySelector("w-textfield"),this._tabbableElements[3]=a[1].shadowRoot.querySelector("w-textfield")}else if(r.length===1){let a=Array.from(r);this._tabbableElements[0]=a[0].shadowRoot.querySelector("input"),this._tabbableElements[1]=a[0].shadowRoot.querySelector("w-textfield")}this.invalid&&this.error&&(this._showError=!0),u(this,d,w).call(this)}updated(r){(r.has("disabled")||r.has("required")||r.has("min")||r.has("step")||r.has("max")||r.has("suffix")||r.has("labelFormatter")||r.has("valueFormatter")||r.has("_invalidMessage")||r.has("_hasInternalError"))&&u(this,d,w).call(this),(r.has("error")||r.has("invalid"))&&(this.error&&this.invalid?this._showError=!0:this._showError=!1,u(this,d,w).call(this))}get componentHasError(){return this.invalid||this._hasInternalError}get errorText(){return this._showError?this.error||this._invalidMessage:""}render(){return z`
2601
+ `;var l,w,ye,_e,Ee,ze,Me,Te,X,N,c=class extends ke{constructor(){super();G(this,l);this.disabled=!1;this.openEnded=!1;this.invalid=!1;this.required=!1;this.hiddenTextfield=!1;this._invalidMessage="";this._hasInternalError=!1;this._showError=!1;this._tabbableElements=[];ce(me,fe,ve,pe,we)}get edgeMin(){return this.openEnded?(Number(this.min)-1).toString():this.min}get edgeMax(){return this.openEnded?(Number(this.max)+1).toString():this.max}async connectedCallback(){super.connectedCallback(),await this.updateComplete,requestAnimationFrame(()=>{requestAnimationFrame(()=>{setTimeout(()=>{this.step&&this.style.setProperty("--step",String(this.step)),this.min!==void 0&&this.style.setProperty("--min",this.edgeMin),this.max!==void 0&&this.style.setProperty("--max",this.max),this.markers&&this.style.setProperty("--markers",String(this.markers)),this.openEnded&&this.style.setProperty("--over-under-offset","1"),this.querySelectorAll("w-slider-thumb").length===2&&this.style.setProperty("--range-slider-magic-pixel","1px")},0)})});let e=this.querySelectorAll("w-slider-thumb");if(e.length===2){let a=Array.from(e);this._tabbableElements[0]=a[0].shadowRoot.querySelector("input"),this._tabbableElements[1]=a[1].shadowRoot.querySelector("input"),this._tabbableElements[2]=a[0].shadowRoot.querySelector("w-textfield"),this._tabbableElements[3]=a[1].shadowRoot.querySelector("w-textfield")}else if(e.length===1){let a=Array.from(e);this._tabbableElements[0]=a[0].shadowRoot.querySelector("input"),this._tabbableElements[1]=a[0].shadowRoot.querySelector("w-textfield")}this.invalid&&this.error&&(this._showError=!0),u(this,l,w).call(this)}updated(e){(e.has("disabled")||e.has("required")||e.has("min")||e.has("step")||e.has("max")||e.has("suffix")||e.has("labelFormatter")||e.has("valueFormatter")||e.has("_invalidMessage")||e.has("_hasInternalError"))&&u(this,l,w).call(this),(e.has("error")||e.has("invalid"))&&(this.error&&this.invalid?this._showError=!0:this._showError=!1,u(this,l,w).call(this))}get componentHasError(){return this.invalid||this._hasInternalError}get errorText(){return this._showError?this.error||this._invalidMessage:""}render(){return z`
2602
2602
  <fieldset
2603
2603
  id="fieldset"
2604
2604
  class="w-slider"
2605
- @input="${u(this,d,ye)}"
2606
- @focusout="${u(this,d,_e)}"
2607
- @slidervalidity="${u(this,d,Me)}"
2608
- @keydown="${u(this,d,Ee)}"
2609
- aria-invalid="${this.errorText?"true":$}"
2605
+ @input="${u(this,l,_e)}"
2606
+ @focusout="${u(this,l,Ee)}"
2607
+ @slidervalidity="${u(this,l,Te)}"
2608
+ @thumbreset="${u(this,l,ye)}"
2609
+ @keydown="${u(this,l,ze)}"
2610
+ aria-invalid="${this.errorText?"true":H}"
2610
2611
  ?disabled="${this.disabled}"
2611
2612
  >
2612
2613
  ${this.label?z`<legend class="w-slider__label">
2613
2614
  <slot id="label" name="label">${this.label}</slot>
2614
2615
  </legend>`:z`<slot id="label" name="label"></slot>`}
2615
2616
  <slot class="w-slider__description" name="description"></slot>
2616
- ${this.markers?z`<div class="w-slider__markers"></div>`:$}
2617
+ ${this.markers?z`<div class="w-slider__markers"></div>`:H}
2617
2618
  <div class="w-slider__range">
2618
2619
  <div class="w-slider__active-range"></div>
2619
2620
  </div>
2620
2621
  <slot
2621
2622
  class="w-slider__slider"
2622
- @slotchange=${u(this,d,w)}
2623
+ @slotchange=${u(this,l,w)}
2623
2624
  ></slot>
2624
2625
  <slot
2625
2626
  class="w-slider__slider"
2626
2627
  name="from"
2627
- @slotchange=${u(this,d,w)}
2628
+ @slotchange=${u(this,l,w)}
2628
2629
  ></slot>
2629
2630
  <slot
2630
2631
  class="w-slider__slider"
2631
2632
  name="to"
2632
- @slotchange=${u(this,d,w)}
2633
+ @slotchange=${u(this,l,w)}
2633
2634
  ></slot>
2634
2635
  ${this.errorText?z`<p class="w-slider__error" aria-describes="fieldset">
2635
2636
  ${this.errorText}
2636
2637
  </p>`:this.helpText?z`<p class="w-slider__help-text" aria-describes="fieldset">
2637
2638
  ${this.helpText}
2638
- </p>`:$}
2639
+ </p>`:H}
2639
2640
  </fieldset>
2640
- `}};d=new WeakSet,w=function(){var n;let r=this.querySelectorAll("w-slider-thumb"),t=!1;for(let i of r.values())i.min=this.edgeMin,i.max=this.edgeMax,i.step=this.step,i.suffix=(n=this.suffix)!=null?n:"",i.required=this.required,i.labelFormatter=this.labelFormatter,i.valueFormatter=this.valueFormatter,i.tooltipFormatter=this.tooltipFormatter,i.openEnded=this.openEnded,i._hiddenTextfield=this.hiddenTextfield,i.ariaLabel||(i.slot||(i.ariaLabel=this.label),i.slot==="from"&&(i.ariaLabel=`${this.label} min`),i.slot==="to"&&(i.ariaLabel=`${this.label} max`)),(i.slot==="from"||i.slot==="to")&&(t=!0),i.disabled=this.disabled,i.invalid=!!this.errorText,u(this,d,X).call(this,i);let a=this.shadowRoot.querySelector("fieldset");t?(a.style.setProperty("--active-range-inline-start-padding","var(--w-slider-thumb-size, 28px)"),a.style.setProperty("--active-range-inline-end-padding","var(--w-slider-thumb-size, 28px)")):a.style.setProperty("--active-range-border-radius","4px")},ye=function(r){let t=r.target;u(this,d,X).call(this,t),t.slot&&u(this,d,ze).call(this)},_e=function(){this.componentHasError?this._showError=!0:this._showError=!1,u(this,d,w).call(this)},Ee=function(r){if(r.key==="Tab"){let t=this._tabbableElements.indexOf(r.target.shadowRoot.activeElement);if(t===-1)return;let a=r.shiftKey?-1:1,n=this._tabbableElements[t+a];if(!n)return;r.preventDefault(),n.focus()}},ze=function(){let r,t,a=this.querySelectorAll("w-slider-thumb");for(let n of a.values())n.slot==="from"&&(r=n),n.slot==="to"&&(t=n);!r||!t||!r.invalid&&t.invalid},Me=function(r){r.stopPropagation();let t=this._hasInternalError||this.invalid,a=r.target;if(this._hasInternalError=!!r.detail.invalid||this.invalid,this._invalidMessage=r.detail.invalid,t===!0&&this._hasInternalError===!1){let n=this.querySelectorAll("w-slider-thumb");for(let i of n.values())i!==a&&i.updateFieldAfterValidation()}},H=function(r,t){return(t.value===void 0||t.value===null)&&(t.value=this.openEnded?"":r),t.value===""?r:t.value},X=function(r){let t=r.slot;t||this.style.setProperty("--from","0"),t==="from"&&this.style.setProperty("--from",u(this,d,H).call(this,this.edgeMin,r)),(!t||t==="to")&&this.style.setProperty("--to",u(this,d,H).call(this,this.edgeMax,r))},c.shadowRootOptions={...ke.shadowRootOptions,delegatesFocus:!0},c.styles=[pe,xe],b([g({reflect:!0})],c.prototype,"label",2),b([g({type:Boolean,reflect:!0})],c.prototype,"disabled",2),b([g({type:Boolean,attribute:"open-ended"})],c.prototype,"openEnded",2),b([g({type:String,reflect:!0})],c.prototype,"error",2),b([g({type:String,reflect:!0,attribute:"help-text"})],c.prototype,"helpText",2),b([g({type:Boolean,reflect:!0})],c.prototype,"invalid",2),b([g({type:Boolean,reflect:!0})],c.prototype,"required",2),b([g({reflect:!0})],c.prototype,"min",2),b([g({reflect:!0})],c.prototype,"max",2),b([g({type:Number,reflect:!0})],c.prototype,"markers",2),b([g({type:Number,reflect:!0})],c.prototype,"step",2),b([g({reflect:!0})],c.prototype,"suffix",2),b([g({type:Boolean,reflect:!0,attribute:"hidden-textfield"})],c.prototype,"hiddenTextfield",2),b([g({attribute:!1})],c.prototype,"valueFormatter",2),b([g({attribute:!1})],c.prototype,"tooltipFormatter",2),b([g({attribute:!1})],c.prototype,"labelFormatter",2),b([O()],c.prototype,"_invalidMessage",2),b([O()],c.prototype,"_hasInternalError",2),b([O()],c.prototype,"_showError",2),b([O()],c.prototype,"_tabbableElements",2);customElements.get("w-slider")||customElements.define("w-slider",c);export{c as WarpSlider};
2641
+ `}};l=new WeakSet,w=function(){var n;let e=this.querySelectorAll("w-slider-thumb"),t=!1;for(let i of e.values())i.min=this.edgeMin,i.max=this.edgeMax,i.step=this.step,i.suffix=(n=this.suffix)!=null?n:"",i.required=this.required,i.labelFormatter=this.labelFormatter,i.valueFormatter=this.valueFormatter,i.tooltipFormatter=this.tooltipFormatter,i.openEnded=this.openEnded,i._hiddenTextfield=this.hiddenTextfield,i.ariaLabel||(i.slot||(i.ariaLabel=this.label),i.slot==="from"&&(i.ariaLabel=`${this.label} min`),i.slot==="to"&&(i.ariaLabel=`${this.label} max`)),(i.slot==="from"||i.slot==="to")&&(t=!0),i.disabled=this.disabled,i.invalid=!!this.errorText,u(this,l,N).call(this,i);let a=this.shadowRoot.querySelector("fieldset");t?(a.style.setProperty("--active-range-inline-start-padding","var(--w-slider-thumb-size, 28px)"),a.style.setProperty("--active-range-inline-end-padding","var(--w-slider-thumb-size, 28px)")):a.style.setProperty("--active-range-border-radius","4px")},ye=function(e){let t=e.target;u(this,l,N).call(this,t)},_e=function(e){let t=e.target;u(this,l,N).call(this,t),t.slot&&u(this,l,Me).call(this)},Ee=function(){this.componentHasError?this._showError=!0:this._showError=!1,u(this,l,w).call(this)},ze=function(e){if(e.key==="Tab"){let t=this._tabbableElements.indexOf(e.target.shadowRoot.activeElement);if(t===-1)return;let a=e.shiftKey?-1:1,n=this._tabbableElements[t+a];if(!n)return;e.preventDefault(),n.focus()}},Me=function(){let e,t,a=this.querySelectorAll("w-slider-thumb");for(let n of a.values())n.slot==="from"&&(e=n),n.slot==="to"&&(t=n);!e||!t||!e.invalid&&t.invalid},Te=function(e){e.stopPropagation();let t=this._hasInternalError||this.invalid,a=e.target;if(this._hasInternalError=!!e.detail.invalid||this.invalid,this._invalidMessage=e.detail.invalid,t===!0&&this._hasInternalError===!1){let n=this.querySelectorAll("w-slider-thumb");for(let i of n.values())i!==a&&i.updateFieldAfterValidation()}},X=function(e,t){return(t.value===void 0||t.value===null)&&(t.value=this.openEnded?"":e),t.value===""?e:t.value},N=function(e){let t=e.slot;t||this.style.setProperty("--from","0"),t==="from"&&this.style.setProperty("--from",u(this,l,X).call(this,this.edgeMin,e)),(!t||t==="to")&&this.style.setProperty("--to",u(this,l,X).call(this,this.edgeMax,e))},c.shadowRootOptions={...ke.shadowRootOptions,delegatesFocus:!0},c.styles=[he,xe],b([g({reflect:!0})],c.prototype,"label",2),b([g({type:Boolean,reflect:!0})],c.prototype,"disabled",2),b([g({type:Boolean,attribute:"open-ended"})],c.prototype,"openEnded",2),b([g({type:String,reflect:!0})],c.prototype,"error",2),b([g({type:String,reflect:!0,attribute:"help-text"})],c.prototype,"helpText",2),b([g({type:Boolean,reflect:!0})],c.prototype,"invalid",2),b([g({type:Boolean,reflect:!0})],c.prototype,"required",2),b([g({reflect:!0})],c.prototype,"min",2),b([g({reflect:!0})],c.prototype,"max",2),b([g({type:Number,reflect:!0})],c.prototype,"markers",2),b([g({type:Number,reflect:!0})],c.prototype,"step",2),b([g({reflect:!0})],c.prototype,"suffix",2),b([g({type:Boolean,reflect:!0,attribute:"hidden-textfield"})],c.prototype,"hiddenTextfield",2),b([g({attribute:!1})],c.prototype,"valueFormatter",2),b([g({attribute:!1})],c.prototype,"tooltipFormatter",2),b([g({attribute:!1})],c.prototype,"labelFormatter",2),b([O()],c.prototype,"_invalidMessage",2),b([O()],c.prototype,"_hasInternalError",2),b([O()],c.prototype,"_showError",2),b([O()],c.prototype,"_tabbableElements",2);customElements.get("w-slider")||customElements.define("w-slider",c);export{c as WarpSlider};
2641
2642
  //# sourceMappingURL=slider.js.map