@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 +17 -0
- package/lib/decidablesElements.esm.js +43 -42
- package/lib/decidablesElements.esm.js.map +1 -1
- package/lib/decidablesElements.esm.min.js +8 -7
- package/lib/decidablesElements.esm.min.js.map +1 -1
- package/lib/decidablesElements.umd.js +43 -42
- package/lib/decidablesElements.umd.js.map +1 -1
- package/lib/decidablesElements.umd.min.js +8 -7
- package/lib/decidablesElements.umd.min.js.map +1 -1
- package/package.json +5 -5
- package/src/slider.js +2 -2
- package/src/switch.js +3 -2
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._$
|
|
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._$
|
|
193
|
+
(this._$EO ??= new Set()).add(t), void 0 !== this.renderRoot && this.isConnected && t.hostConnected?.();
|
|
194
194
|
}
|
|
195
195
|
removeController(t) {
|
|
196
|
-
this._$
|
|
196
|
+
this._$EO?.delete(t);
|
|
197
197
|
}
|
|
198
|
-
_$
|
|
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._$
|
|
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._$
|
|
213
|
+
this._$EO?.forEach(t => t.hostDisconnected?.());
|
|
214
214
|
}
|
|
215
215
|
attributeChangedCallback(t, s, i) {
|
|
216
216
|
this._$AK(t, i);
|
|
217
217
|
}
|
|
218
|
-
_$
|
|
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
|
|
237
|
+
requestUpdate(t, s, i) {
|
|
238
238
|
if (void 0 !== t) {
|
|
239
|
-
if (i ??= this.constructor.getPropertyOptions(t), !(i.hasChanged ?? f$1)(
|
|
240
|
-
this.
|
|
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._$
|
|
242
|
+
!1 === this.isUpdatePending && (this._$ES = this._$ET());
|
|
243
243
|
}
|
|
244
|
-
|
|
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 _$
|
|
247
|
+
async _$ET() {
|
|
248
248
|
this.isUpdatePending = !0;
|
|
249
249
|
try {
|
|
250
|
-
await this._$
|
|
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.
|
|
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._$
|
|
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._$
|
|
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._$
|
|
281
|
+
this._$EO?.forEach(t => t.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
282
282
|
}
|
|
283
|
-
_$
|
|
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._$
|
|
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._$
|
|
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.
|
|
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$${
|
|
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
|
|
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
|
-
|
|
494
|
+
S(t) {
|
|
495
495
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
496
496
|
}
|
|
497
|
-
|
|
498
|
-
this._$AH !== t && (this._$AR(), this._$AH = this.
|
|
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
|
|
501
|
+
this._$AH !== T && c(this._$AH) ? this._$AA.nextSibling.data = t : this.T(r$1.createTextNode(t)), this._$AH = t;
|
|
502
502
|
}
|
|
503
|
-
|
|
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
|
|
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
|
-
|
|
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.
|
|
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.
|
|
555
|
+
o && !e && this.j(t);
|
|
556
556
|
}
|
|
557
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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.
|
|
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.
|
|
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
|
|
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`
|