@m3e/checkbox 1.0.5 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -19,26 +19,24 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
19
19
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
20
20
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
21
21
  PERFORMANCE OF THIS SOFTWARE.
22
- ***************************************************************************** */
23
- /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
24
-
25
-
26
- function __decorate(decorators, target, key, desc) {
27
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
28
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
29
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
30
- return c > 3 && r && Object.defineProperty(target, key, r), r;
31
- }
32
-
33
- function __classPrivateFieldGet(receiver, state, kind, f) {
34
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
35
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
36
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
37
- }
38
-
39
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
40
- var e = new Error(message);
41
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
22
+ ***************************************************************************** */
23
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
24
+
25
+ function __decorate(decorators, target, key, desc) {
26
+ var c = arguments.length,
27
+ r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
28
+ d;
29
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
30
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
31
+ }
32
+ function __classPrivateFieldGet(receiver, state, kind, f) {
33
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
34
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
35
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
36
+ }
37
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
38
+ var e = new Error(message);
39
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
42
40
  };
43
41
 
44
42
  /**
@@ -46,39 +44,395 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
46
44
  * Copyright 2017 Google LLC
47
45
  * SPDX-License-Identifier: BSD-3-Clause
48
46
  */
49
- const t$1=t=>(e,o)=>{ void 0!==o?o.addInitializer((()=>{customElements.define(t,e);})):customElements.define(t,e);};
47
+ const t$1 = t => (e, o) => {
48
+ void 0 !== o ? o.addInitializer(() => {
49
+ customElements.define(t, e);
50
+ }) : customElements.define(t, e);
51
+ };
50
52
 
51
53
  /**
52
54
  * @license
53
55
  * Copyright 2019 Google LLC
54
56
  * SPDX-License-Identifier: BSD-3-Clause
55
57
  */
56
- const t=globalThis,e$3=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),o$2=new WeakMap;let n$2 = class n{constructor(t,e,o){if(this._$cssResult$=true,o!==s)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e;}get styleSheet(){let t=this.o;const s=this.t;if(e$3&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o$2.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o$2.set(s,t));}return t}toString(){return this.cssText}};const r$2=t=>new n$2("string"==typeof t?t:t+"",void 0,s),S=(s,o)=>{if(e$3)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement("style"),n=t.litNonce;void 0!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o);}},c$1=e$3?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$2(e)})(t):t;
58
+ const t = globalThis,
59
+ e$3 = t.ShadowRoot && (void 0 === t.ShadyCSS || t.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype,
60
+ s = Symbol(),
61
+ o$2 = new WeakMap();
62
+ let n$2 = class n {
63
+ constructor(t, e, o) {
64
+ if (this._$cssResult$ = true, o !== s) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
65
+ this.cssText = t, this.t = e;
66
+ }
67
+ get styleSheet() {
68
+ let t = this.o;
69
+ const s = this.t;
70
+ if (e$3 && void 0 === t) {
71
+ const e = void 0 !== s && 1 === s.length;
72
+ e && (t = o$2.get(s)), void 0 === t && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), e && o$2.set(s, t));
73
+ }
74
+ return t;
75
+ }
76
+ toString() {
77
+ return this.cssText;
78
+ }
79
+ };
80
+ const r$2 = t => new n$2("string" == typeof t ? t : t + "", void 0, s),
81
+ S = (s, o) => {
82
+ if (e$3) s.adoptedStyleSheets = o.map(t => t instanceof CSSStyleSheet ? t : t.styleSheet);else for (const e of o) {
83
+ const o = document.createElement("style"),
84
+ n = t.litNonce;
85
+ void 0 !== n && o.setAttribute("nonce", n), o.textContent = e.cssText, s.appendChild(o);
86
+ }
87
+ },
88
+ c$1 = e$3 ? t => t : t => t instanceof CSSStyleSheet ? (t => {
89
+ let e = "";
90
+ for (const s of t.cssRules) e += s.cssText;
91
+ return r$2(e);
92
+ })(t) : t;
57
93
 
58
94
  /**
59
95
  * @license
60
96
  * Copyright 2017 Google LLC
61
97
  * SPDX-License-Identifier: BSD-3-Clause
62
- */const{is:i,defineProperty:e$2,getOwnPropertyDescriptor:h,getOwnPropertyNames:r$1,getOwnPropertySymbols:o$1,getPrototypeOf:n$1}=Object,a=globalThis,c=a.trustedTypes,l=c?c.emptyScript:"",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={toAttribute(t,s){switch(s){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f=(t,s)=>!i(t,s),b={attribute:true,type:String,converter:u,reflect:false,useDefault:false,hasChanged:f};Symbol.metadata??=Symbol("metadata"),a.litPropertyMetadata??=new WeakMap;class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=false),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=true),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e$2(this.prototype,t,h);}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d("elementProperties")))return;const t=n$1(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(d("properties"))){const t=this.properties,s=[...r$1(t),...o$1(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$1(s));}else void 0!==s&&i.push(c$1(s));return i}static _$Eu(t,s){const i=s.attribute;return false===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)));}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach((t=>t.hostConnected?.()));}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()));}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&true===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null;}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u;this._$Em=e;const r=h.fromAttribute(s,t.type);this[e]=r??this._$Ej?.get(e)??r,this._$Em=null;}}requestUpdate(t,s,i){if(void 0!==t){const e=this.constructor,h=this[t];if(i??=e.getPropertyOptions(t),!((i.hasChanged??f)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(e._$Eu(t,i))))return;this.C(t,s,i);} false===this.isUpdatePending&&(this._$ES=this._$EP());}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),true!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),true===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t));}async _$EP(){this.isUpdatePending=true;try{await this._$ES;}catch(t){Promise.reject(t);}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0;}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];true!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e);}}let t=false;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EM();}catch(s){throw t=false,this._$EM(),s}t&&this._$AE(s);}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(t)),this.updated(t);}_$EM(){this._$AL=new Map,this.isUpdatePending=false;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return true}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM();}updated(t){}firstUpdated(t){}}y.elementStyles=[],y.shadowRootOptions={mode:"open"},y[d("elementProperties")]=new Map,y[d("finalized")]=new Map,p?.({ReactiveElement:y}),(a.reactiveElementVersions??=[]).push("2.1.1");
98
+ */
99
+ const {
100
+ is: i,
101
+ defineProperty: e$2,
102
+ getOwnPropertyDescriptor: h,
103
+ getOwnPropertyNames: r$1,
104
+ getOwnPropertySymbols: o$1,
105
+ getPrototypeOf: n$1
106
+ } = Object,
107
+ a = globalThis,
108
+ c = a.trustedTypes,
109
+ l = c ? c.emptyScript : "",
110
+ p = a.reactiveElementPolyfillSupport,
111
+ d = (t, s) => t,
112
+ u = {
113
+ toAttribute(t, s) {
114
+ switch (s) {
115
+ case Boolean:
116
+ t = t ? l : null;
117
+ break;
118
+ case Object:
119
+ case Array:
120
+ t = null == t ? t : JSON.stringify(t);
121
+ }
122
+ return t;
123
+ },
124
+ fromAttribute(t, s) {
125
+ let i = t;
126
+ switch (s) {
127
+ case Boolean:
128
+ i = null !== t;
129
+ break;
130
+ case Number:
131
+ i = null === t ? null : Number(t);
132
+ break;
133
+ case Object:
134
+ case Array:
135
+ try {
136
+ i = JSON.parse(t);
137
+ } catch (t) {
138
+ i = null;
139
+ }
140
+ }
141
+ return i;
142
+ }
143
+ },
144
+ f = (t, s) => !i(t, s),
145
+ b = {
146
+ attribute: true,
147
+ type: String,
148
+ converter: u,
149
+ reflect: false,
150
+ useDefault: false,
151
+ hasChanged: f
152
+ };
153
+ Symbol.metadata ??= Symbol("metadata"), a.litPropertyMetadata ??= new WeakMap();
154
+ class y extends HTMLElement {
155
+ static addInitializer(t) {
156
+ this._$Ei(), (this.l ??= []).push(t);
157
+ }
158
+ static get observedAttributes() {
159
+ return this.finalize(), this._$Eh && [...this._$Eh.keys()];
160
+ }
161
+ static createProperty(t, s = b) {
162
+ if (s.state && (s.attribute = false), this._$Ei(), this.prototype.hasOwnProperty(t) && ((s = Object.create(s)).wrapped = true), this.elementProperties.set(t, s), !s.noAccessor) {
163
+ const i = Symbol(),
164
+ h = this.getPropertyDescriptor(t, i, s);
165
+ void 0 !== h && e$2(this.prototype, t, h);
166
+ }
167
+ }
168
+ static getPropertyDescriptor(t, s, i) {
169
+ const {
170
+ get: e,
171
+ set: r
172
+ } = h(this.prototype, t) ?? {
173
+ get() {
174
+ return this[s];
175
+ },
176
+ set(t) {
177
+ this[s] = t;
178
+ }
179
+ };
180
+ return {
181
+ get: e,
182
+ set(s) {
183
+ const h = e?.call(this);
184
+ r?.call(this, s), this.requestUpdate(t, h, i);
185
+ },
186
+ configurable: true,
187
+ enumerable: true
188
+ };
189
+ }
190
+ static getPropertyOptions(t) {
191
+ return this.elementProperties.get(t) ?? b;
192
+ }
193
+ static _$Ei() {
194
+ if (this.hasOwnProperty(d("elementProperties"))) return;
195
+ const t = n$1(this);
196
+ t.finalize(), void 0 !== t.l && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
197
+ }
198
+ static finalize() {
199
+ if (this.hasOwnProperty(d("finalized"))) return;
200
+ if (this.finalized = true, this._$Ei(), this.hasOwnProperty(d("properties"))) {
201
+ const t = this.properties,
202
+ s = [...r$1(t), ...o$1(t)];
203
+ for (const i of s) this.createProperty(i, t[i]);
204
+ }
205
+ const t = this[Symbol.metadata];
206
+ if (null !== t) {
207
+ const s = litPropertyMetadata.get(t);
208
+ if (void 0 !== s) for (const [t, i] of s) this.elementProperties.set(t, i);
209
+ }
210
+ this._$Eh = new Map();
211
+ for (const [t, s] of this.elementProperties) {
212
+ const i = this._$Eu(t, s);
213
+ void 0 !== i && this._$Eh.set(i, t);
214
+ }
215
+ this.elementStyles = this.finalizeStyles(this.styles);
216
+ }
217
+ static finalizeStyles(s) {
218
+ const i = [];
219
+ if (Array.isArray(s)) {
220
+ const e = new Set(s.flat(1 / 0).reverse());
221
+ for (const s of e) i.unshift(c$1(s));
222
+ } else void 0 !== s && i.push(c$1(s));
223
+ return i;
224
+ }
225
+ static _$Eu(t, s) {
226
+ const i = s.attribute;
227
+ return false === i ? void 0 : "string" == typeof i ? i : "string" == typeof t ? t.toLowerCase() : void 0;
228
+ }
229
+ constructor() {
230
+ super(), this._$Ep = void 0, this.isUpdatePending = false, this.hasUpdated = false, this._$Em = null, this._$Ev();
231
+ }
232
+ _$Ev() {
233
+ this._$ES = new Promise(t => this.enableUpdating = t), this._$AL = new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach(t => t(this));
234
+ }
235
+ addController(t) {
236
+ (this._$EO ??= new Set()).add(t), void 0 !== this.renderRoot && this.isConnected && t.hostConnected?.();
237
+ }
238
+ removeController(t) {
239
+ this._$EO?.delete(t);
240
+ }
241
+ _$E_() {
242
+ const t = new Map(),
243
+ s = this.constructor.elementProperties;
244
+ for (const i of s.keys()) this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
245
+ t.size > 0 && (this._$Ep = t);
246
+ }
247
+ createRenderRoot() {
248
+ const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
249
+ return S(t, this.constructor.elementStyles), t;
250
+ }
251
+ connectedCallback() {
252
+ this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(true), this._$EO?.forEach(t => t.hostConnected?.());
253
+ }
254
+ enableUpdating(t) {}
255
+ disconnectedCallback() {
256
+ this._$EO?.forEach(t => t.hostDisconnected?.());
257
+ }
258
+ attributeChangedCallback(t, s, i) {
259
+ this._$AK(t, i);
260
+ }
261
+ _$ET(t, s) {
262
+ const i = this.constructor.elementProperties.get(t),
263
+ e = this.constructor._$Eu(t, i);
264
+ if (void 0 !== e && true === i.reflect) {
265
+ const h = (void 0 !== i.converter?.toAttribute ? i.converter : u).toAttribute(s, i.type);
266
+ this._$Em = t, null == h ? this.removeAttribute(e) : this.setAttribute(e, h), this._$Em = null;
267
+ }
268
+ }
269
+ _$AK(t, s) {
270
+ const i = this.constructor,
271
+ e = i._$Eh.get(t);
272
+ if (void 0 !== e && this._$Em !== e) {
273
+ const t = i.getPropertyOptions(e),
274
+ h = "function" == typeof t.converter ? {
275
+ fromAttribute: t.converter
276
+ } : void 0 !== t.converter?.fromAttribute ? t.converter : u;
277
+ this._$Em = e;
278
+ const r = h.fromAttribute(s, t.type);
279
+ this[e] = r ?? this._$Ej?.get(e) ?? r, this._$Em = null;
280
+ }
281
+ }
282
+ requestUpdate(t, s, i) {
283
+ if (void 0 !== t) {
284
+ const e = this.constructor,
285
+ h = this[t];
286
+ if (i ??= e.getPropertyOptions(t), !((i.hasChanged ?? f)(h, s) || i.useDefault && i.reflect && h === this._$Ej?.get(t) && !this.hasAttribute(e._$Eu(t, i)))) return;
287
+ this.C(t, s, i);
288
+ }
289
+ false === this.isUpdatePending && (this._$ES = this._$EP());
290
+ }
291
+ C(t, s, {
292
+ useDefault: i,
293
+ reflect: e,
294
+ wrapped: h
295
+ }, r) {
296
+ i && !(this._$Ej ??= new Map()).has(t) && (this._$Ej.set(t, r ?? s ?? this[t]), true !== h || void 0 !== r) || (this._$AL.has(t) || (this.hasUpdated || i || (s = void 0), this._$AL.set(t, s)), true === e && this._$Em !== t && (this._$Eq ??= new Set()).add(t));
297
+ }
298
+ async _$EP() {
299
+ this.isUpdatePending = true;
300
+ try {
301
+ await this._$ES;
302
+ } catch (t) {
303
+ Promise.reject(t);
304
+ }
305
+ const t = this.scheduleUpdate();
306
+ return null != t && (await t), !this.isUpdatePending;
307
+ }
308
+ scheduleUpdate() {
309
+ return this.performUpdate();
310
+ }
311
+ performUpdate() {
312
+ if (!this.isUpdatePending) return;
313
+ if (!this.hasUpdated) {
314
+ if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
315
+ for (const [t, s] of this._$Ep) this[t] = s;
316
+ this._$Ep = void 0;
317
+ }
318
+ const t = this.constructor.elementProperties;
319
+ if (t.size > 0) for (const [s, i] of t) {
320
+ const {
321
+ wrapped: t
322
+ } = i,
323
+ e = this[s];
324
+ true !== t || this._$AL.has(s) || void 0 === e || this.C(s, void 0, i, e);
325
+ }
326
+ }
327
+ let t = false;
328
+ const s = this._$AL;
329
+ try {
330
+ t = this.shouldUpdate(s), t ? (this.willUpdate(s), this._$EO?.forEach(t => t.hostUpdate?.()), this.update(s)) : this._$EM();
331
+ } catch (s) {
332
+ throw t = false, this._$EM(), s;
333
+ }
334
+ t && this._$AE(s);
335
+ }
336
+ willUpdate(t) {}
337
+ _$AE(t) {
338
+ this._$EO?.forEach(t => t.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = true, this.firstUpdated(t)), this.updated(t);
339
+ }
340
+ _$EM() {
341
+ this._$AL = new Map(), this.isUpdatePending = false;
342
+ }
343
+ get updateComplete() {
344
+ return this.getUpdateComplete();
345
+ }
346
+ getUpdateComplete() {
347
+ return this._$ES;
348
+ }
349
+ shouldUpdate(t) {
350
+ return true;
351
+ }
352
+ update(t) {
353
+ this._$Eq &&= this._$Eq.forEach(t => this._$ET(t, this[t])), this._$EM();
354
+ }
355
+ updated(t) {}
356
+ firstUpdated(t) {}
357
+ }
358
+ y.elementStyles = [], y.shadowRootOptions = {
359
+ mode: "open"
360
+ }, y[d("elementProperties")] = new Map(), y[d("finalized")] = new Map(), p?.({
361
+ ReactiveElement: y
362
+ }), (a.reactiveElementVersions ??= []).push("2.1.1");
63
363
 
64
364
  /**
65
365
  * @license
66
366
  * Copyright 2017 Google LLC
67
367
  * SPDX-License-Identifier: BSD-3-Clause
68
- */const o={attribute:true,type:String,converter:u,reflect:false,hasChanged:f},r=(t=o,e,r)=>{const{kind:n,metadata:i}=r;let s=globalThis.litPropertyMetadata.get(i);if(void 0===s&&globalThis.litPropertyMetadata.set(i,s=new Map),"setter"===n&&((t=Object.create(t)).wrapped=true),s.set(r.name,t),"accessor"===n){const{name:o}=r;return {set(r){const n=e.get.call(this);e.set.call(this,r),this.requestUpdate(o,n,t);},init(e){return void 0!==e&&this.C(o,void 0,t,e),e}}}if("setter"===n){const{name:o}=r;return function(r){const n=this[o];e.call(this,r),this.requestUpdate(o,n,t);}}throw Error("Unsupported decorator location: "+n)};function n(t){return (e,o)=>"object"==typeof o?r(t,e,o):((t,e,o)=>{const r=e.hasOwnProperty(o);return e.constructor.createProperty(o,t),r?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)}
368
+ */
369
+ const o = {
370
+ attribute: true,
371
+ type: String,
372
+ converter: u,
373
+ reflect: false,
374
+ hasChanged: f
375
+ },
376
+ r = (t = o, e, r) => {
377
+ const {
378
+ kind: n,
379
+ metadata: i
380
+ } = r;
381
+ let s = globalThis.litPropertyMetadata.get(i);
382
+ if (void 0 === s && globalThis.litPropertyMetadata.set(i, s = new Map()), "setter" === n && ((t = Object.create(t)).wrapped = true), s.set(r.name, t), "accessor" === n) {
383
+ const {
384
+ name: o
385
+ } = r;
386
+ return {
387
+ set(r) {
388
+ const n = e.get.call(this);
389
+ e.set.call(this, r), this.requestUpdate(o, n, t);
390
+ },
391
+ init(e) {
392
+ return void 0 !== e && this.C(o, void 0, t, e), e;
393
+ }
394
+ };
395
+ }
396
+ if ("setter" === n) {
397
+ const {
398
+ name: o
399
+ } = r;
400
+ return function (r) {
401
+ const n = this[o];
402
+ e.call(this, r), this.requestUpdate(o, n, t);
403
+ };
404
+ }
405
+ throw Error("Unsupported decorator location: " + n);
406
+ };
407
+ function n(t) {
408
+ return (e, o) => "object" == typeof o ? r(t, e, o) : ((t, e, o) => {
409
+ const r = e.hasOwnProperty(o);
410
+ return e.constructor.createProperty(o, t), r ? Object.getOwnPropertyDescriptor(e, o) : void 0;
411
+ })(t, e, o);
412
+ }
69
413
 
70
414
  /**
71
415
  * @license
72
416
  * Copyright 2017 Google LLC
73
417
  * SPDX-License-Identifier: BSD-3-Clause
74
418
  */
75
- const e$1=(e,t,c)=>(c.configurable=true,c.enumerable=true,Reflect.decorate&&"object"!=typeof t&&Object.defineProperty(e,t,c),c);
419
+ const e$1 = (e, t, c) => (c.configurable = true, c.enumerable = true, Reflect.decorate && "object" != typeof t && Object.defineProperty(e, t, c), c);
76
420
 
77
421
  /**
78
422
  * @license
79
423
  * Copyright 2017 Google LLC
80
424
  * SPDX-License-Identifier: BSD-3-Clause
81
- */function e(e,r){return (n,s,i)=>{const o=t=>t.renderRoot?.querySelector(e)??null;return e$1(n,s,{get(){return o(this)}})}}
425
+ */
426
+ function e(e, r) {
427
+ return (n, s, i) => {
428
+ const o = t => t.renderRoot?.querySelector(e) ?? null;
429
+ return e$1(n, s, {
430
+ get() {
431
+ return o(this);
432
+ }
433
+ });
434
+ };
435
+ }
82
436
 
83
437
  var _M3eCheckboxElement_instances, _M3eCheckboxElement_clickHandler, _M3eCheckboxElement_hoverController, _M3eCheckboxElement_pressedController, _M3eCheckboxElement_renderIcon, _M3eCheckboxElement_handleClick;
84
438
  /**
@@ -149,261 +503,106 @@ var _M3eCheckboxElement_instances, _M3eCheckboxElement_clickHandler, _M3eCheckbo
149
503
  * @cssprop --m3e-checkbox-selected-error-ripple-color - Ripple base color for invalid selected state.
150
504
  */
151
505
  let M3eCheckboxElement = class M3eCheckboxElement extends Labelled(RequiredConstraintValidation(Dirty(Touched(Required(ConstraintValidation(CheckedIndeterminate(FormAssociated(KeyboardClick(Focusable(Disabled(AttachInternals(Role(LitElement, "checkbox")))), false))))))))) {
152
- constructor() {
153
- super(...arguments);
154
- _M3eCheckboxElement_instances.add(this);
155
- /** @private */ _M3eCheckboxElement_clickHandler.set(this, (e) => __classPrivateFieldGet(this, _M3eCheckboxElement_instances, "m", _M3eCheckboxElement_handleClick).call(this, e));
156
- /** @private */ _M3eCheckboxElement_hoverController.set(this, new HoverController(this, {
157
- target: null,
158
- callback: (hovering) => {
159
- if (this.disabled)
160
- return;
161
- if (hovering) {
162
- this._stateLayer?.show("hover");
163
- }
164
- else {
165
- this._stateLayer?.hide("hover");
166
- }
167
- },
168
- }));
169
- /** @private */ _M3eCheckboxElement_pressedController.set(this, new PressedController(this, {
170
- target: null,
171
- minPressedDuration: 150,
172
- callback: (pressed) => {
173
- if (this.disabled)
174
- return;
175
- if (pressed) {
176
- this._ripple?.show(0, 0, true);
177
- }
178
- else {
179
- this._ripple?.hide();
180
- }
181
- },
182
- }));
183
- /**
184
- * A string representing the value of the checkbox.
185
- * @default "on"
186
- */
187
- this.value = "on";
188
- }
189
- /** @inheritdoc @private */
190
- get [(_M3eCheckboxElement_clickHandler = new WeakMap(), _M3eCheckboxElement_hoverController = new WeakMap(), _M3eCheckboxElement_pressedController = new WeakMap(), _M3eCheckboxElement_instances = new WeakSet(), formValue)]() {
191
- return !this.checked || this.indeterminate ? null : this.value;
192
- }
193
- /** @inheritdoc */
194
- connectedCallback() {
195
- super.connectedCallback();
196
- this.addEventListener("click", __classPrivateFieldGet(this, _M3eCheckboxElement_clickHandler, "f"));
197
- for (const label of this.labels) {
198
- __classPrivateFieldGet(this, _M3eCheckboxElement_hoverController, "f").observe(label);
199
- __classPrivateFieldGet(this, _M3eCheckboxElement_pressedController, "f").observe(label);
506
+ constructor() {
507
+ super(...arguments);
508
+ _M3eCheckboxElement_instances.add(this);
509
+ /** @private */
510
+ _M3eCheckboxElement_clickHandler.set(this, e => __classPrivateFieldGet(this, _M3eCheckboxElement_instances, "m", _M3eCheckboxElement_handleClick).call(this, e));
511
+ /** @private */
512
+ _M3eCheckboxElement_hoverController.set(this, new HoverController(this, {
513
+ target: null,
514
+ callback: hovering => {
515
+ if (this.disabled) return;
516
+ if (hovering) {
517
+ this._stateLayer?.show("hover");
518
+ } else {
519
+ this._stateLayer?.hide("hover");
200
520
  }
201
- }
202
- /** @inheritdoc */
203
- disconnectedCallback() {
204
- super.disconnectedCallback();
205
- this.removeEventListener("click", __classPrivateFieldGet(this, _M3eCheckboxElement_clickHandler, "f"));
206
- for (const label of this.labels) {
207
- __classPrivateFieldGet(this, _M3eCheckboxElement_hoverController, "f").unobserve(label);
208
- __classPrivateFieldGet(this, _M3eCheckboxElement_pressedController, "f").unobserve(label);
521
+ }
522
+ }));
523
+ /** @private */
524
+ _M3eCheckboxElement_pressedController.set(this, new PressedController(this, {
525
+ target: null,
526
+ minPressedDuration: 150,
527
+ callback: pressed => {
528
+ if (this.disabled) return;
529
+ if (pressed) {
530
+ this._ripple?.show(0, 0, true);
531
+ } else {
532
+ this._ripple?.hide();
209
533
  }
534
+ }
535
+ }));
536
+ /**
537
+ * A string representing the value of the checkbox.
538
+ * @default "on"
539
+ */
540
+ this.value = "on";
541
+ }
542
+ /** @inheritdoc @private */
543
+ get [(_M3eCheckboxElement_clickHandler = new WeakMap(), _M3eCheckboxElement_hoverController = new WeakMap(), _M3eCheckboxElement_pressedController = new WeakMap(), _M3eCheckboxElement_instances = new WeakSet(), formValue)]() {
544
+ return !this.checked || this.indeterminate ? null : this.value;
545
+ }
546
+ /** @inheritdoc */
547
+ connectedCallback() {
548
+ super.connectedCallback();
549
+ this.addEventListener("click", __classPrivateFieldGet(this, _M3eCheckboxElement_clickHandler, "f"));
550
+ for (const label of this.labels) {
551
+ __classPrivateFieldGet(this, _M3eCheckboxElement_hoverController, "f").observe(label);
552
+ __classPrivateFieldGet(this, _M3eCheckboxElement_pressedController, "f").observe(label);
210
553
  }
211
- /** @inheritdoc */
212
- firstUpdated(_changedProperties) {
213
- super.firstUpdated(_changedProperties);
214
- [this._focusRing, this._stateLayer, this._ripple].forEach((x) => x?.attach(this));
215
- }
216
- /** @inheritdoc */
217
- render() {
218
- return html `<div class="base">
219
- <m3e-state-layer class="state-layer" ?disabled="${this.disabled}"></m3e-state-layer>
220
- <m3e-focus-ring class="focus-ring" ?disabled="${this.disabled}"></m3e-focus-ring>
221
- <m3e-ripple class="ripple" centered ?disabled="${this.disabled}"></m3e-ripple>
222
- <div class="touch" aria-hidden="true"></div>
223
- <div class="wrapper" aria-hidden="true">${__classPrivateFieldGet(this, _M3eCheckboxElement_instances, "m", _M3eCheckboxElement_renderIcon).call(this)}</div>
224
- </div>`;
554
+ }
555
+ /** @inheritdoc */
556
+ disconnectedCallback() {
557
+ super.disconnectedCallback();
558
+ this.removeEventListener("click", __classPrivateFieldGet(this, _M3eCheckboxElement_clickHandler, "f"));
559
+ for (const label of this.labels) {
560
+ __classPrivateFieldGet(this, _M3eCheckboxElement_hoverController, "f").unobserve(label);
561
+ __classPrivateFieldGet(this, _M3eCheckboxElement_pressedController, "f").unobserve(label);
225
562
  }
563
+ }
564
+ /** @inheritdoc */
565
+ firstUpdated(_changedProperties) {
566
+ super.firstUpdated(_changedProperties);
567
+ [this._focusRing, this._stateLayer, this._ripple].forEach(x => x?.attach(this));
568
+ }
569
+ /** @inheritdoc */
570
+ render() {
571
+ return html`<div class="base"><m3e-state-layer class="state-layer" ?disabled="${this.disabled}"></m3e-state-layer><m3e-focus-ring class="focus-ring" ?disabled="${this.disabled}"></m3e-focus-ring><m3e-ripple class="ripple" centered ?disabled="${this.disabled}"></m3e-ripple><div class="touch" aria-hidden="true"></div><div class="wrapper" aria-hidden="true">${__classPrivateFieldGet(this, _M3eCheckboxElement_instances, "m", _M3eCheckboxElement_renderIcon).call(this)}</div></div>`;
572
+ }
226
573
  };
227
574
  _M3eCheckboxElement_renderIcon = function _M3eCheckboxElement_renderIcon() {
228
- if (this.indeterminate) {
229
- return html `<svg viewBox="0 -960 960 960" fill="currentColor">
230
- <path Required d="M240-440v-80h480v80H240Z" />
231
- </svg>`;
232
- }
233
- if (this.checked) {
234
- return html `<svg viewBox="0 -960 960 960" fill="currentColor">
235
- <path d="M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z" />
236
- </svg>`;
237
- }
238
- return nothing;
575
+ if (this.indeterminate) {
576
+ return html`<svg viewBox="0 -960 960 960" fill="currentColor"><path Required d="M240-440v-80h480v80H240Z"/></svg>`;
577
+ }
578
+ if (this.checked) {
579
+ return html`<svg viewBox="0 -960 960 960" fill="currentColor"><path d="M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z"/></svg>`;
580
+ }
581
+ return nothing;
239
582
  };
240
583
  _M3eCheckboxElement_handleClick = function _M3eCheckboxElement_handleClick(e) {
241
- if (e.defaultPrevented)
242
- return;
584
+ if (e.defaultPrevented) return;
585
+ this.checked = !this.checked;
586
+ if (this.dispatchEvent(new Event("input", {
587
+ bubbles: true,
588
+ composed: true,
589
+ cancelable: true
590
+ }))) {
591
+ this.indeterminate = false;
592
+ this.dispatchEvent(new Event("change", {
593
+ bubbles: true
594
+ }));
595
+ } else {
243
596
  this.checked = !this.checked;
244
- if (this.dispatchEvent(new Event("input", { bubbles: true, composed: true, cancelable: true }))) {
245
- this.indeterminate = false;
246
- this.dispatchEvent(new Event("change", { bubbles: true }));
247
- }
248
- else {
249
- this.checked = !this.checked;
250
- }
597
+ }
251
598
  };
252
599
  /** The styles of the element. */
253
- M3eCheckboxElement.styles = css `
254
- :host {
255
- display: inline-block;
256
- outline: none;
257
- width: fit-content;
258
- height: fit-content;
259
- vertical-align: middle;
260
- user-select: none;
261
- -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
262
- }
263
- :host(:not([aria-disabled="true"])) {
264
- cursor: pointer;
265
- }
266
- .base {
267
- box-sizing: border-box;
268
- vertical-align: middle;
269
- display: inline-flex;
270
- align-items: center;
271
- justify-content: center;
272
- position: relative;
273
- border-radius: 50%;
274
- width: calc(var(--m3e-checkbox-container-size, 2.5rem) + ${DesignToken.density.calc(-3)});
275
- height: calc(var(--m3e-checkbox-container-size, 2.5rem) + ${DesignToken.density.calc(-3)});
276
- }
277
- .touch {
278
- position: absolute;
279
- height: 3rem;
280
- width: 3rem;
281
- margin: auto;
282
- }
283
- .wrapper {
284
- box-sizing: border-box;
285
- pointer-events: none;
286
- width: var(--m3e-checkbox-icon-size, 1.125rem);
287
- height: var(--m3e-checkbox-icon-size, 1.125rem);
288
- border-radius: var(--m3e-checkbox-container-shape, 0.125rem);
289
- }
290
- :host(:not([checked]):not([indeterminate])) .wrapper {
291
- border-width: var(--m3e-checkbox-unselected-outline-thickness, 0.125rem);
292
- border-style: solid;
293
- }
294
- :host(:not(.-touched.-invalid):not([indeterminate]):not([checked])) .base {
295
- --m3e-state-layer-hover-color: var(--m3e-checkbox-unselected-hover-color, ${DesignToken.color.onSurface});
296
- --m3e-state-layer-focus-color: var(--m3e-checkbox-unselected-focus-color, ${DesignToken.color.onSurface});
297
- --m3e-ripple-color: var(--m3e-checkbox-unselected-ripple-color, ${DesignToken.color.onSurface});
298
- }
299
- :host(:not(.-touched.-invalid)[checked]) .base,
300
- :host(:not(.-touched.-invalid)[indeterminate]) .base {
301
- --m3e-state-layer-hover-color: var(--m3e-checkbox-selected-hover-color, ${DesignToken.color.primary});
302
- --m3e-state-layer-focus-color: var(--m3e-checkbox-selected-focus-color, ${DesignToken.color.primary});
303
- --m3e-ripple-color: var(--m3e-checkbox-selected-ripple-color, ${DesignToken.color.primary});
304
- }
305
- :host(:not([aria-disabled="true"]):not(.-touched.-invalid)[checked]) .wrapper,
306
- :host(:not([aria-disabled="true"]):not(.-touched.-invalid)[indeterminate]) .wrapper {
307
- background-color: var(--m3e-checkbox-selected-container-color, ${DesignToken.color.primary});
308
- color: var(--m3e-checkbox-selected-icon-color, ${DesignToken.color.onPrimary});
309
- }
310
- :host(:not([aria-disabled="true"]):not(.-touched.-invalid):not([checked]):not([indeterminate]):not(:hover))
311
- .wrapper {
312
- border-color: var(--m3e-checkbox-unselected-outline-color, ${DesignToken.color.onSurfaceVariant});
313
- }
314
- :host(:not([aria-disabled="true"]):not(.-touched.-invalid):not([checked]):not([indeterminate]):hover) .wrapper {
315
- border-color: var(--m3e-checkbox-unselected-hover-outline-color, ${DesignToken.color.onSurface});
316
- }
317
- :host([aria-disabled="true"]:not([checked]):not([indeterminate])) .wrapper {
318
- border-color: color-mix(
319
- in srgb,
320
- var(--m3e-checkbox-unselected-disabled-outline-color, ${DesignToken.color.onSurface})
321
- var(--m3e-checkbox-unselected-disabled-outline-opacity, 38%),
322
- transparent
323
- );
324
- }
325
- :host([aria-disabled="true"][checked]) .wrapper,
326
- :host([aria-disabled="true"][indeterminate]) .wrapper {
327
- background-color: color-mix(
328
- in srgb,
329
- var(--m3e-checkbox-selected-disabled-container-color, ${DesignToken.color.onSurface})
330
- var(--m3e-checkbox-selected-disabled-container-opacity, 38%),
331
- transparent
332
- );
333
- color: color-mix(
334
- in srgb,
335
- var(--m3e-checkbox-selected-disabled-icon-color, ${DesignToken.color.surface})
336
- var(--m3e-checkbox-selected-disabled-icon-opacity, 100%),
337
- transparent
338
- );
339
- }
340
- :host(:not([aria-disabled="true"]).-touched.-invalid:not([checked]):not([indeterminate])) .base {
341
- --m3e-state-layer-hover-color: var(--m3e-checkbox-unselected-error-hover-color, ${DesignToken.color.error});
342
- --m3e-state-layer-focus-color: var(--m3e-checkbox-unselected-error-focus-color, ${DesignToken.color.error});
343
- --m3e-ripple-color: var(--m3e-checkbox-unselected-error-ripple-color, ${DesignToken.color.error});
344
- }
345
- :host(:not([aria-disabled="true"]).-touched.-invalid[checked]) .base,
346
- :host(:not([aria-disabled="true"]).-touched.-invalid[indeterminate]) .base {
347
- --m3e-state-layer-hover-color: var(--m3e-checkbox-selected-error-hover-color, ${DesignToken.color.onError});
348
- --m3e-state-layer-focus-color: var(--m3e-checkbox-selected-error-focus-color, ${DesignToken.color.onError});
349
- --m3e-ripple-color: var(--m3e-checkbox-selected-error-ripple-color, ${DesignToken.color.onError});
350
- }
351
- :host(:not([aria-disabled="true"]).-touched.-invalid:not([checked]):not([indeterminate])) .wrapper {
352
- border-color: var(--m3e-checkbox-unselected-error-outline-color, ${DesignToken.color.error});
353
- }
354
- @media (forced-colors: active) {
355
- :host(:not(.-touched.-invalid):not([indeterminate]):not([checked])) .base,
356
- :host(:not(.-touched.-invalid)[checked]) .base,
357
- :host(:not(.-touched.-invalid)[indeterminate]) .base {
358
- --m3e-state-layer-hover-color: CanvasText;
359
- --m3e-state-layer-focus-color: CanvasText;
360
- --m3e-ripple-color: CanvasText;
361
- }
362
- :host(:not([aria-disabled="true"]):not(.-touched.-invalid):not([checked]):not([indeterminate]):not(:hover))
363
- .wrapper,
364
- :host(:not([aria-disabled="true"]):not(.-touched.-invalid):not([checked]):not([indeterminate]):hover) .wrapper {
365
- border-color: CanvasText;
366
- }
367
- :host(:not([aria-disabled="true"]):not(.-touched.-invalid)[checked]) .wrapper,
368
- :host(:not([aria-disabled="true"]):not(.-touched.-invalid)[indeterminate]) .wrapper {
369
- background-color: CanvasText;
370
- color: Canvas;
371
- }
372
- :host([aria-disabled="true"]:not([checked]):not([indeterminate])) .wrapper {
373
- border-color: GrayText;
374
- }
375
- :host([aria-disabled="true"][checked]) .wrapper,
376
- :host([aria-disabled="true"][indeterminate]) .wrapper {
377
- background-color: GrayText;
378
- color: Canvas;
379
- }
380
- :host(:not([aria-disabled="true"]).-touched.-invalid:not([checked]):not([indeterminate])) .wrapper {
381
- border-color: Highlight;
382
- }
383
- :host(:not([aria-disabled="true"]).-touched.-invalid:not([checked]):not([indeterminate])) .base,
384
- :host(:not([aria-disabled="true"]).-touched.-invalid[checked]) .base,
385
- :host(:not([aria-disabled="true"]).-touched.-invalid[indeterminate]) .base {
386
- --m3e-state-layer-hover-color: Highlight;
387
- --m3e-state-layer-focus-color: Highlight;
388
- --m3e-ripple-color: Highlight;
389
- }
390
- }
391
- `;
392
- __decorate([
393
- e(".focus-ring")
394
- ], M3eCheckboxElement.prototype, "_focusRing", void 0);
395
- __decorate([
396
- e(".state-layer")
397
- ], M3eCheckboxElement.prototype, "_stateLayer", void 0);
398
- __decorate([
399
- e(".ripple")
400
- ], M3eCheckboxElement.prototype, "_ripple", void 0);
401
- __decorate([
402
- n()
403
- ], M3eCheckboxElement.prototype, "value", void 0);
404
- M3eCheckboxElement = __decorate([
405
- t$1("m3e-checkbox")
406
- ], M3eCheckboxElement);
600
+ M3eCheckboxElement.styles = css`:host { display: inline-block; outline: none; width: fit-content; height: fit-content; vertical-align: middle; user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } :host(:not([aria-disabled="true"])) { cursor: pointer; } .base { box-sizing: border-box; vertical-align: middle; display: inline-flex; align-items: center; justify-content: center; position: relative; border-radius: 50%; width: calc(var(--m3e-checkbox-container-size, 2.5rem) + ${DesignToken.density.calc(-3)}); height: calc(var(--m3e-checkbox-container-size, 2.5rem) + ${DesignToken.density.calc(-3)}); } .touch { position: absolute; height: 3rem; width: 3rem; margin: auto; } .wrapper { box-sizing: border-box; pointer-events: none; width: var(--m3e-checkbox-icon-size, 1.125rem); height: var(--m3e-checkbox-icon-size, 1.125rem); border-radius: var(--m3e-checkbox-container-shape, 0.125rem); } :host(:not([checked]):not([indeterminate])) .wrapper { border-width: var(--m3e-checkbox-unselected-outline-thickness, 0.125rem); border-style: solid; } :host(:not(.-touched.-invalid):not([indeterminate]):not([checked])) .base { --m3e-state-layer-hover-color: var(--m3e-checkbox-unselected-hover-color, ${DesignToken.color.onSurface}); --m3e-state-layer-focus-color: var(--m3e-checkbox-unselected-focus-color, ${DesignToken.color.onSurface}); --m3e-ripple-color: var(--m3e-checkbox-unselected-ripple-color, ${DesignToken.color.onSurface}); } :host(:not(.-touched.-invalid)[checked]) .base, :host(:not(.-touched.-invalid)[indeterminate]) .base { --m3e-state-layer-hover-color: var(--m3e-checkbox-selected-hover-color, ${DesignToken.color.primary}); --m3e-state-layer-focus-color: var(--m3e-checkbox-selected-focus-color, ${DesignToken.color.primary}); --m3e-ripple-color: var(--m3e-checkbox-selected-ripple-color, ${DesignToken.color.primary}); } :host(:not([aria-disabled="true"]):not(.-touched.-invalid)[checked]) .wrapper, :host(:not([aria-disabled="true"]):not(.-touched.-invalid)[indeterminate]) .wrapper { background-color: var(--m3e-checkbox-selected-container-color, ${DesignToken.color.primary}); color: var(--m3e-checkbox-selected-icon-color, ${DesignToken.color.onPrimary}); } :host(:not([aria-disabled="true"]):not(.-touched.-invalid):not([checked]):not([indeterminate]):not(:hover)) .wrapper { border-color: var(--m3e-checkbox-unselected-outline-color, ${DesignToken.color.onSurfaceVariant}); } :host(:not([aria-disabled="true"]):not(.-touched.-invalid):not([checked]):not([indeterminate]):hover) .wrapper { border-color: var(--m3e-checkbox-unselected-hover-outline-color, ${DesignToken.color.onSurface}); } :host([aria-disabled="true"]:not([checked]):not([indeterminate])) .wrapper { border-color: color-mix( in srgb, var(--m3e-checkbox-unselected-disabled-outline-color, ${DesignToken.color.onSurface}) var(--m3e-checkbox-unselected-disabled-outline-opacity, 38%), transparent ); } :host([aria-disabled="true"][checked]) .wrapper, :host([aria-disabled="true"][indeterminate]) .wrapper { background-color: color-mix( in srgb, var(--m3e-checkbox-selected-disabled-container-color, ${DesignToken.color.onSurface}) var(--m3e-checkbox-selected-disabled-container-opacity, 38%), transparent ); color: color-mix( in srgb, var(--m3e-checkbox-selected-disabled-icon-color, ${DesignToken.color.surface}) var(--m3e-checkbox-selected-disabled-icon-opacity, 100%), transparent ); } :host(:not([aria-disabled="true"]).-touched.-invalid:not([checked]):not([indeterminate])) .base { --m3e-state-layer-hover-color: var(--m3e-checkbox-unselected-error-hover-color, ${DesignToken.color.error}); --m3e-state-layer-focus-color: var(--m3e-checkbox-unselected-error-focus-color, ${DesignToken.color.error}); --m3e-ripple-color: var(--m3e-checkbox-unselected-error-ripple-color, ${DesignToken.color.error}); } :host(:not([aria-disabled="true"]).-touched.-invalid[checked]) .base, :host(:not([aria-disabled="true"]).-touched.-invalid[indeterminate]) .base { --m3e-state-layer-hover-color: var(--m3e-checkbox-selected-error-hover-color, ${DesignToken.color.onError}); --m3e-state-layer-focus-color: var(--m3e-checkbox-selected-error-focus-color, ${DesignToken.color.onError}); --m3e-ripple-color: var(--m3e-checkbox-selected-error-ripple-color, ${DesignToken.color.onError}); } :host(:not([aria-disabled="true"]).-touched.-invalid:not([checked]):not([indeterminate])) .wrapper { border-color: var(--m3e-checkbox-unselected-error-outline-color, ${DesignToken.color.error}); } @media (forced-colors: active) { :host(:not(.-touched.-invalid):not([indeterminate]):not([checked])) .base, :host(:not(.-touched.-invalid)[checked]) .base, :host(:not(.-touched.-invalid)[indeterminate]) .base { --m3e-state-layer-hover-color: CanvasText; --m3e-state-layer-focus-color: CanvasText; --m3e-ripple-color: CanvasText; } :host(:not([aria-disabled="true"]):not(.-touched.-invalid):not([checked]):not([indeterminate]):not(:hover)) .wrapper, :host(:not([aria-disabled="true"]):not(.-touched.-invalid):not([checked]):not([indeterminate]):hover) .wrapper { border-color: CanvasText; } :host(:not([aria-disabled="true"]):not(.-touched.-invalid)[checked]) .wrapper, :host(:not([aria-disabled="true"]):not(.-touched.-invalid)[indeterminate]) .wrapper { background-color: CanvasText; color: Canvas; } :host([aria-disabled="true"]:not([checked]):not([indeterminate])) .wrapper { border-color: GrayText; } :host([aria-disabled="true"][checked]) .wrapper, :host([aria-disabled="true"][indeterminate]) .wrapper { background-color: GrayText; color: Canvas; } :host(:not([aria-disabled="true"]).-touched.-invalid:not([checked]):not([indeterminate])) .wrapper { border-color: Highlight; } :host(:not([aria-disabled="true"]).-touched.-invalid:not([checked]):not([indeterminate])) .base, :host(:not([aria-disabled="true"]).-touched.-invalid[checked]) .base, :host(:not([aria-disabled="true"]).-touched.-invalid[indeterminate]) .base { --m3e-state-layer-hover-color: Highlight; --m3e-state-layer-focus-color: Highlight; --m3e-ripple-color: Highlight; } }`;
601
+ __decorate([e(".focus-ring")], M3eCheckboxElement.prototype, "_focusRing", void 0);
602
+ __decorate([e(".state-layer")], M3eCheckboxElement.prototype, "_stateLayer", void 0);
603
+ __decorate([e(".ripple")], M3eCheckboxElement.prototype, "_ripple", void 0);
604
+ __decorate([n()], M3eCheckboxElement.prototype, "value", void 0);
605
+ M3eCheckboxElement = __decorate([t$1("m3e-checkbox")], M3eCheckboxElement);
407
606
 
408
607
  export { M3eCheckboxElement };
409
608
  //# sourceMappingURL=index.js.map