@decidables/decidables-elements 0.4.5 → 0.4.7

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/CHANGELOG.md CHANGED
@@ -3,6 +3,23 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [0.4.7](https://github.com/decidables/decidables/compare/@decidables/decidables-elements@0.4.6...@decidables/decidables-elements@0.4.7) (2025-01-17)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **decidables-elements:** fix disabled attribute for slider ([9dd5c5a](https://github.com/decidables/decidables/commit/9dd5c5a4f69fa67a5ec80eb7160e933609bfbc77))
12
+
13
+
14
+
15
+ ## [0.4.6](https://github.com/decidables/decidables/compare/@decidables/decidables-elements@0.4.5...@decidables/decidables-elements@0.4.6) (2024-05-04)
16
+
17
+ **Note:** Version bump only for package @decidables/decidables-elements
18
+
19
+
20
+
21
+
22
+
6
23
  ## [0.4.5](https://github.com/decidables/decidables/compare/@decidables/decidables-elements@0.4.4...@decidables/decidables-elements@0.4.5) (2024-01-27)
7
24
 
8
25
  **Note:** Version bump only for package @decidables/decidables-elements
@@ -187,15 +187,15 @@ let b$1 = class b extends HTMLElement {
187
187
  super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
188
188
  }
189
189
  _$Ev() {
190
- this._$Eg = new Promise(t => this.enableUpdating = t), this._$AL = new Map(), this._$ES(), this.requestUpdate(), this.constructor.l?.forEach(t => t(this));
190
+ this._$ES = new Promise(t => this.enableUpdating = t), this._$AL = new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach(t => t(this));
191
191
  }
192
192
  addController(t) {
193
- (this._$E_ ??= new Set()).add(t), void 0 !== this.renderRoot && this.isConnected && t.hostConnected?.();
193
+ (this._$EO ??= new Set()).add(t), void 0 !== this.renderRoot && this.isConnected && t.hostConnected?.();
194
194
  }
195
195
  removeController(t) {
196
- this._$E_?.delete(t);
196
+ this._$EO?.delete(t);
197
197
  }
198
- _$ES() {
198
+ _$E_() {
199
199
  const t = new Map(),
200
200
  s = this.constructor.elementProperties;
201
201
  for (const i of s.keys()) this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
@@ -206,16 +206,16 @@ let b$1 = class b extends HTMLElement {
206
206
  return S$1(t, this.constructor.elementStyles), t;
207
207
  }
208
208
  connectedCallback() {
209
- this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$E_?.forEach(t => t.hostConnected?.());
209
+ this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach(t => t.hostConnected?.());
210
210
  }
211
211
  enableUpdating(t) {}
212
212
  disconnectedCallback() {
213
- this._$E_?.forEach(t => t.hostDisconnected?.());
213
+ this._$EO?.forEach(t => t.hostDisconnected?.());
214
214
  }
215
215
  attributeChangedCallback(t, s, i) {
216
216
  this._$AK(t, i);
217
217
  }
218
- _$EO(t, s) {
218
+ _$EC(t, s) {
219
219
  const i = this.constructor.elementProperties.get(t),
220
220
  e = this.constructor._$Eu(t, i);
221
221
  if (void 0 !== e && !0 === i.reflect) {
@@ -234,20 +234,20 @@ let b$1 = class b extends HTMLElement {
234
234
  this._$Em = e, this[e] = r.fromAttribute(s, t.type), this._$Em = null;
235
235
  }
236
236
  }
237
- requestUpdate(t, s, i, e = !1, r) {
237
+ requestUpdate(t, s, i) {
238
238
  if (void 0 !== t) {
239
- if (i ??= this.constructor.getPropertyOptions(t), !(i.hasChanged ?? f$1)(e ? r : this[t], s)) return;
240
- this.C(t, s, i);
239
+ if (i ??= this.constructor.getPropertyOptions(t), !(i.hasChanged ?? f$1)(this[t], s)) return;
240
+ this.P(t, s, i);
241
241
  }
242
- !1 === this.isUpdatePending && (this._$Eg = this._$EP());
242
+ !1 === this.isUpdatePending && (this._$ES = this._$ET());
243
243
  }
244
- C(t, s, i) {
244
+ P(t, s, i) {
245
245
  this._$AL.has(t) || this._$AL.set(t, s), !0 === i.reflect && this._$Em !== t && (this._$Ej ??= new Set()).add(t);
246
246
  }
247
- async _$EP() {
247
+ async _$ET() {
248
248
  this.isUpdatePending = !0;
249
249
  try {
250
- await this._$Eg;
250
+ await this._$ES;
251
251
  } catch (t) {
252
252
  Promise.reject(t);
253
253
  }
@@ -265,35 +265,35 @@ let b$1 = class b extends HTMLElement {
265
265
  this._$Ep = void 0;
266
266
  }
267
267
  const t = this.constructor.elementProperties;
268
- if (t.size > 0) for (const [s, i] of t) !0 !== i.wrapped || this._$AL.has(s) || void 0 === this[s] || this.C(s, this[s], i);
268
+ if (t.size > 0) for (const [s, i] of t) !0 !== i.wrapped || this._$AL.has(s) || void 0 === this[s] || this.P(s, this[s], i);
269
269
  }
270
270
  let t = !1;
271
271
  const s = this._$AL;
272
272
  try {
273
- t = this.shouldUpdate(s), t ? (this.willUpdate(s), this._$E_?.forEach(t => t.hostUpdate?.()), this.update(s)) : this._$ET();
273
+ t = this.shouldUpdate(s), t ? (this.willUpdate(s), this._$EO?.forEach(t => t.hostUpdate?.()), this.update(s)) : this._$EU();
274
274
  } catch (s) {
275
- throw t = !1, this._$ET(), s;
275
+ throw t = !1, this._$EU(), s;
276
276
  }
277
277
  t && this._$AE(s);
278
278
  }
279
279
  willUpdate(t) {}
280
280
  _$AE(t) {
281
- this._$E_?.forEach(t => t.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
281
+ this._$EO?.forEach(t => t.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
282
282
  }
283
- _$ET() {
283
+ _$EU() {
284
284
  this._$AL = new Map(), this.isUpdatePending = !1;
285
285
  }
286
286
  get updateComplete() {
287
287
  return this.getUpdateComplete();
288
288
  }
289
289
  getUpdateComplete() {
290
- return this._$Eg;
290
+ return this._$ES;
291
291
  }
292
292
  shouldUpdate(t) {
293
293
  return !0;
294
294
  }
295
295
  update(t) {
296
- this._$Ej &&= this._$Ej.forEach(t => this._$EO(t, this[t])), this._$ET();
296
+ this._$Ej &&= this._$Ej.forEach(t => this._$EC(t, this[t])), this._$EU();
297
297
  }
298
298
  updated(t) {}
299
299
  firstUpdated(t) {}
@@ -302,7 +302,7 @@ b$1.elementStyles = [], b$1.shadowRootOptions = {
302
302
  mode: "open"
303
303
  }, b$1[d$1("elementProperties")] = new Map(), b$1[d$1("finalized")] = new Map(), p$1?.({
304
304
  ReactiveElement: b$1
305
- }), (a$1.reactiveElementVersions ??= []).push("2.0.2");
305
+ }), (a$1.reactiveElementVersions ??= []).push("2.0.4");
306
306
 
307
307
  /**
308
308
  * @license
@@ -315,7 +315,7 @@ const t = globalThis,
315
315
  createHTML: t => t
316
316
  }) : void 0,
317
317
  e = "$lit$",
318
- h = `lit$${(Math.random() + "").slice(9)}$`,
318
+ h = `lit$${Math.random().toFixed(9).slice(2)}$`,
319
319
  o$1 = "?" + h,
320
320
  n = `<${o$1}>`,
321
321
  r$1 = document,
@@ -489,18 +489,18 @@ class M {
489
489
  return this._$AB;
490
490
  }
491
491
  _$AI(t, i = this) {
492
- t = N(this, t, i), c(t) ? t === T || null == t || "" === t ? (this._$AH !== T && this._$AR(), this._$AH = T) : t !== this._$AH && t !== w && this._(t) : void 0 !== t._$litType$ ? this.g(t) : void 0 !== t.nodeType ? this.$(t) : u(t) ? this.T(t) : this._(t);
492
+ t = N(this, t, i), c(t) ? t === T || null == t || "" === t ? (this._$AH !== T && this._$AR(), this._$AH = T) : t !== this._$AH && t !== w && this._(t) : void 0 !== t._$litType$ ? this.$(t) : void 0 !== t.nodeType ? this.T(t) : u(t) ? this.k(t) : this._(t);
493
493
  }
494
- k(t) {
494
+ S(t) {
495
495
  return this._$AA.parentNode.insertBefore(t, this._$AB);
496
496
  }
497
- $(t) {
498
- this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
497
+ T(t) {
498
+ this._$AH !== t && (this._$AR(), this._$AH = this.S(t));
499
499
  }
500
500
  _(t) {
501
- this._$AH !== T && c(this._$AH) ? this._$AA.nextSibling.data = t : this.$(r$1.createTextNode(t)), this._$AH = t;
501
+ this._$AH !== T && c(this._$AH) ? this._$AA.nextSibling.data = t : this.T(r$1.createTextNode(t)), this._$AH = t;
502
502
  }
503
- g(t) {
503
+ $(t) {
504
504
  const {
505
505
  values: i,
506
506
  _$litType$: s
@@ -509,19 +509,19 @@ class M {
509
509
  if (this._$AH?._$AD === e) this._$AH.p(i);else {
510
510
  const t = new S(e, this),
511
511
  s = t.u(this.options);
512
- t.p(i), this.$(s), this._$AH = t;
512
+ t.p(i), this.T(s), this._$AH = t;
513
513
  }
514
514
  }
515
515
  _$AC(t) {
516
516
  let i = A.get(t.strings);
517
517
  return void 0 === i && A.set(t.strings, i = new V(t)), i;
518
518
  }
519
- T(t) {
519
+ k(t) {
520
520
  a(this._$AH) || (this._$AH = [], this._$AR());
521
521
  const i = this._$AH;
522
522
  let s,
523
523
  e = 0;
524
- for (const h of t) e === i.length ? i.push(s = new M(this.k(l()), this.k(l()), this, this.options)) : s = i[e], s._$AI(h), e++;
524
+ for (const h of t) e === i.length ? i.push(s = new M(this.S(l()), this.S(l()), this, this.options)) : s = i[e], s._$AI(h), e++;
525
525
  e < i.length && (this._$AR(s && s._$AB.nextSibling, e), i.length = e);
526
526
  }
527
527
  _$AR(t = this._$AA.nextSibling, i) {
@@ -552,9 +552,9 @@ class R {
552
552
  let n, r;
553
553
  for (t = h[0], n = 0; n < h.length - 1; n++) r = N(this, e[s + n], i, n), r === w && (r = this._$AH[n]), o ||= !c(r) || r !== this._$AH[n], r === T ? t = T : t !== T && (t += (r ?? "") + h[n + 1]), this._$AH[n] = r;
554
554
  }
555
- o && !e && this.O(t);
555
+ o && !e && this.j(t);
556
556
  }
557
- O(t) {
557
+ j(t) {
558
558
  t === T ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
559
559
  }
560
560
  }
@@ -562,7 +562,7 @@ class k extends R {
562
562
  constructor() {
563
563
  super(...arguments), this.type = 3;
564
564
  }
565
- O(t) {
565
+ j(t) {
566
566
  this.element[this.name] = t === T ? void 0 : t;
567
567
  }
568
568
  }
@@ -570,7 +570,7 @@ class H extends R {
570
570
  constructor() {
571
571
  super(...arguments), this.type = 4;
572
572
  }
573
- O(t) {
573
+ j(t) {
574
574
  this.element.toggleAttribute(this.name, !!t && t !== T);
575
575
  }
576
576
  }
@@ -601,7 +601,7 @@ class L {
601
601
  }
602
602
  }
603
603
  const Z = t.litHtmlPolyfillSupport;
604
- Z?.(V, M), (t.litHtmlVersions ??= []).push("3.1.0");
604
+ Z?.(V, M), (t.litHtmlVersions ??= []).push("3.1.3");
605
605
  const j = (t, i, s) => {
606
606
  const e = s?.renderBefore ?? i;
607
607
  let h = e._$litPart$;
@@ -648,7 +648,7 @@ const r = globalThis.litElementPolyfillSupport;
648
648
  r?.({
649
649
  LitElement: s
650
650
  });
651
- (globalThis.litElementVersions ??= []).push("4.0.2");
651
+ (globalThis.litElementVersions ??= []).push("4.0.5");
652
652
 
653
653
  var noop = {
654
654
  value: () => {}
@@ -3782,9 +3782,9 @@ class DecidablesSlider extends DecidablesElement {
3782
3782
  <slot></slot>
3783
3783
  </label>
3784
3784
  <div class="range">
3785
- <input type="range" id="slider" min=${o(this.min)} max=${o(this.max)} step=${o(this.step)} .value=${this.value} @change=${this.changed.bind(this)} @input=${this.inputted.bind(this)}>
3785
+ <input ?disabled=${this.disabled} type="range" id="slider" min=${o(this.min)} max=${o(this.max)} step=${o(this.step)} .value=${this.value} @change=${this.changed.bind(this)} @input=${this.inputted.bind(this)}>
3786
3786
  </div>
3787
- <decidables-spinner min=${o(this.min)} max=${o(this.max)} step=${o(this.step)} .value=${this.value} @input=${this.inputted.bind(this)}></decidables-spinner>
3787
+ <decidables-spinner ?disabled=${this.disabled} min=${o(this.min)} max=${o(this.max)} step=${o(this.step)} .value=${this.value} @input=${this.inputted.bind(this)}></decidables-spinner>
3788
3788
  `;
3789
3789
  }
3790
3790
  }
@@ -4087,12 +4087,13 @@ class DecidablesSwitch extends DecidablesElement {
4087
4087
  box-shadow: var(---shadow-4);
4088
4088
  }
4089
4089
 
4090
- /* stylelint-disable-next-line selector-max-compound-selectors */
4090
+ /* stylelint-disable selector-max-compound-selectors */
4091
4091
  :host(.keyboard) input[type=checkbox]:enabled:focus + label + label:active::after,
4092
4092
  :host(.keyboard) input[type=checkbox]:enabled:focus:active + label + label::after {
4093
4093
  box-shadow: var(---shadow-8);
4094
4094
  }
4095
- `];
4095
+ /* stylelint-enable selector-max-compound-selectors */
4096
+ `];
4096
4097
  }
4097
4098
  render() {
4098
4099
  return x`