@decidables/decidables-elements 0.4.8 → 0.5.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/CHANGELOG.md +17 -0
- package/README.md +50 -0
- package/lib/decidablesElements.esm.js +238 -157
- package/lib/decidablesElements.esm.js.map +1 -1
- package/lib/decidablesElements.esm.min.js +84 -39
- package/lib/decidablesElements.esm.min.js.map +1 -1
- package/lib/decidablesElements.umd.js +238 -157
- package/lib/decidablesElements.umd.js.map +1 -1
- package/lib/decidablesElements.umd.min.js +85 -40
- package/lib/decidablesElements.umd.min.js.map +1 -1
- package/package.json +3 -3
- package/src/button.js +5 -2
- package/src/slider.js +126 -19
|
@@ -4,20 +4,20 @@
|
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
5
|
*/
|
|
6
6
|
const t$1 = globalThis,
|
|
7
|
-
e$2 = t$1.ShadowRoot && (
|
|
8
|
-
s$
|
|
7
|
+
e$2 = t$1.ShadowRoot && (undefined === t$1.ShadyCSS || t$1.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype,
|
|
8
|
+
s$1 = Symbol(),
|
|
9
9
|
o$3 = new WeakMap();
|
|
10
10
|
let n$2 = class n {
|
|
11
11
|
constructor(t, e, o) {
|
|
12
|
-
if (this._$cssResult$ =
|
|
12
|
+
if (this._$cssResult$ = true, o !== s$1) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
13
13
|
this.cssText = t, this.t = e;
|
|
14
14
|
}
|
|
15
15
|
get styleSheet() {
|
|
16
16
|
let t = this.o;
|
|
17
17
|
const s = this.t;
|
|
18
|
-
if (e$2 &&
|
|
19
|
-
const e =
|
|
20
|
-
e && (t = o$3.get(s)),
|
|
18
|
+
if (e$2 && undefined === t) {
|
|
19
|
+
const e = undefined !== s && 1 === s.length;
|
|
20
|
+
e && (t = o$3.get(s)), undefined === t && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), e && o$3.set(s, t));
|
|
21
21
|
}
|
|
22
22
|
return t;
|
|
23
23
|
}
|
|
@@ -25,20 +25,20 @@ let n$2 = class n {
|
|
|
25
25
|
return this.cssText;
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
|
-
const r$3 = t => new n$2("string" == typeof t ? t : t + "",
|
|
29
|
-
i$
|
|
28
|
+
const r$3 = t => new n$2("string" == typeof t ? t : t + "", undefined, s$1),
|
|
29
|
+
i$3 = (t, ...e) => {
|
|
30
30
|
const o = 1 === t.length ? t[0] : e.reduce((e, s, o) => e + (t => {
|
|
31
|
-
if (
|
|
31
|
+
if (true === t._$cssResult$) return t.cssText;
|
|
32
32
|
if ("number" == typeof t) return t;
|
|
33
33
|
throw Error("Value passed to 'css' function must be a 'css' function result: " + t + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
34
34
|
})(s) + t[o + 1], t[0]);
|
|
35
|
-
return new n$2(o, t, s$
|
|
35
|
+
return new n$2(o, t, s$1);
|
|
36
36
|
},
|
|
37
37
|
S$1 = (s, o) => {
|
|
38
38
|
if (e$2) s.adoptedStyleSheets = o.map(t => t instanceof CSSStyleSheet ? t : t.styleSheet);else for (const e of o) {
|
|
39
39
|
const o = document.createElement("style"),
|
|
40
40
|
n = t$1.litNonce;
|
|
41
|
-
|
|
41
|
+
undefined !== n && o.setAttribute("nonce", n), o.textContent = e.cssText, s.appendChild(o);
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
c$2 = e$2 ? t => t : t => t instanceof CSSStyleSheet ? (t => {
|
|
@@ -53,7 +53,7 @@ const r$3 = t => new n$2("string" == typeof t ? t : t + "", void 0, s$2),
|
|
|
53
53
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
54
54
|
*/
|
|
55
55
|
const {
|
|
56
|
-
is: i$
|
|
56
|
+
is: i$2,
|
|
57
57
|
defineProperty: e$1,
|
|
58
58
|
getOwnPropertyDescriptor: r$2,
|
|
59
59
|
getOwnPropertyNames: h$1,
|
|
@@ -97,12 +97,12 @@ const {
|
|
|
97
97
|
return i;
|
|
98
98
|
}
|
|
99
99
|
},
|
|
100
|
-
f$1 = (t, s) => !i$
|
|
100
|
+
f$1 = (t, s) => !i$2(t, s),
|
|
101
101
|
y$1 = {
|
|
102
|
-
attribute:
|
|
102
|
+
attribute: true,
|
|
103
103
|
type: String,
|
|
104
104
|
converter: u$1,
|
|
105
|
-
reflect:
|
|
105
|
+
reflect: false,
|
|
106
106
|
hasChanged: f$1
|
|
107
107
|
};
|
|
108
108
|
Symbol.metadata ??= Symbol("metadata"), a$1.litPropertyMetadata ??= new WeakMap();
|
|
@@ -114,10 +114,10 @@ let b$1 = class b extends HTMLElement {
|
|
|
114
114
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
115
115
|
}
|
|
116
116
|
static createProperty(t, s = y$1) {
|
|
117
|
-
if (s.state && (s.attribute =
|
|
117
|
+
if (s.state && (s.attribute = false), this._$Ei(), this.elementProperties.set(t, s), !s.noAccessor) {
|
|
118
118
|
const i = Symbol(),
|
|
119
119
|
r = this.getPropertyDescriptor(t, i, s);
|
|
120
|
-
|
|
120
|
+
undefined !== r && e$1(this.prototype, t, r);
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
static getPropertyDescriptor(t, s, i) {
|
|
@@ -140,8 +140,8 @@ let b$1 = class b extends HTMLElement {
|
|
|
140
140
|
const r = e?.call(this);
|
|
141
141
|
h.call(this, s), this.requestUpdate(t, r, i);
|
|
142
142
|
},
|
|
143
|
-
configurable:
|
|
144
|
-
enumerable:
|
|
143
|
+
configurable: true,
|
|
144
|
+
enumerable: true
|
|
145
145
|
};
|
|
146
146
|
}
|
|
147
147
|
static getPropertyOptions(t) {
|
|
@@ -150,11 +150,11 @@ let b$1 = class b extends HTMLElement {
|
|
|
150
150
|
static _$Ei() {
|
|
151
151
|
if (this.hasOwnProperty(d$1("elementProperties"))) return;
|
|
152
152
|
const t = n$1(this);
|
|
153
|
-
t.finalize(),
|
|
153
|
+
t.finalize(), undefined !== t.l && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
154
154
|
}
|
|
155
155
|
static finalize() {
|
|
156
156
|
if (this.hasOwnProperty(d$1("finalized"))) return;
|
|
157
|
-
if (this.finalized =
|
|
157
|
+
if (this.finalized = true, this._$Ei(), this.hasOwnProperty(d$1("properties"))) {
|
|
158
158
|
const t = this.properties,
|
|
159
159
|
s = [...h$1(t), ...o$2(t)];
|
|
160
160
|
for (const i of s) this.createProperty(i, t[i]);
|
|
@@ -162,12 +162,12 @@ let b$1 = class b extends HTMLElement {
|
|
|
162
162
|
const t = this[Symbol.metadata];
|
|
163
163
|
if (null !== t) {
|
|
164
164
|
const s = litPropertyMetadata.get(t);
|
|
165
|
-
if (
|
|
165
|
+
if (undefined !== s) for (const [t, i] of s) this.elementProperties.set(t, i);
|
|
166
166
|
}
|
|
167
167
|
this._$Eh = new Map();
|
|
168
168
|
for (const [t, s] of this.elementProperties) {
|
|
169
169
|
const i = this._$Eu(t, s);
|
|
170
|
-
|
|
170
|
+
undefined !== i && this._$Eh.set(i, t);
|
|
171
171
|
}
|
|
172
172
|
this.elementStyles = this.finalizeStyles(this.styles);
|
|
173
173
|
}
|
|
@@ -176,21 +176,21 @@ let b$1 = class b extends HTMLElement {
|
|
|
176
176
|
if (Array.isArray(s)) {
|
|
177
177
|
const e = new Set(s.flat(1 / 0).reverse());
|
|
178
178
|
for (const s of e) i.unshift(c$2(s));
|
|
179
|
-
} else
|
|
179
|
+
} else undefined !== s && i.push(c$2(s));
|
|
180
180
|
return i;
|
|
181
181
|
}
|
|
182
182
|
static _$Eu(t, s) {
|
|
183
183
|
const i = s.attribute;
|
|
184
|
-
return
|
|
184
|
+
return false === i ? undefined : "string" == typeof i ? i : "string" == typeof t ? t.toLowerCase() : undefined;
|
|
185
185
|
}
|
|
186
186
|
constructor() {
|
|
187
|
-
super(), this._$Ep =
|
|
187
|
+
super(), this._$Ep = undefined, this.isUpdatePending = false, this.hasUpdated = false, this._$Em = null, this._$Ev();
|
|
188
188
|
}
|
|
189
189
|
_$Ev() {
|
|
190
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._$EO ??= new Set()).add(t),
|
|
193
|
+
(this._$EO ??= new Set()).add(t), undefined !== this.renderRoot && this.isConnected && t.hostConnected?.();
|
|
194
194
|
}
|
|
195
195
|
removeController(t) {
|
|
196
196
|
this._$EO?.delete(t);
|
|
@@ -206,7 +206,7 @@ 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(
|
|
209
|
+
this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(true), this._$EO?.forEach(t => t.hostConnected?.());
|
|
210
210
|
}
|
|
211
211
|
enableUpdating(t) {}
|
|
212
212
|
disconnectedCallback() {
|
|
@@ -218,34 +218,34 @@ let b$1 = class b extends HTMLElement {
|
|
|
218
218
|
_$EC(t, s) {
|
|
219
219
|
const i = this.constructor.elementProperties.get(t),
|
|
220
220
|
e = this.constructor._$Eu(t, i);
|
|
221
|
-
if (
|
|
222
|
-
const r = (
|
|
221
|
+
if (undefined !== e && true === i.reflect) {
|
|
222
|
+
const r = (undefined !== i.converter?.toAttribute ? i.converter : u$1).toAttribute(s, i.type);
|
|
223
223
|
this._$Em = t, null == r ? this.removeAttribute(e) : this.setAttribute(e, r), this._$Em = null;
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
226
|
_$AK(t, s) {
|
|
227
227
|
const i = this.constructor,
|
|
228
228
|
e = i._$Eh.get(t);
|
|
229
|
-
if (
|
|
229
|
+
if (undefined !== e && this._$Em !== e) {
|
|
230
230
|
const t = i.getPropertyOptions(e),
|
|
231
231
|
r = "function" == typeof t.converter ? {
|
|
232
232
|
fromAttribute: t.converter
|
|
233
|
-
} :
|
|
233
|
+
} : undefined !== t.converter?.fromAttribute ? t.converter : u$1;
|
|
234
234
|
this._$Em = e, this[e] = r.fromAttribute(s, t.type), this._$Em = null;
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
237
|
requestUpdate(t, s, i) {
|
|
238
|
-
if (
|
|
238
|
+
if (undefined !== t) {
|
|
239
239
|
if (i ??= this.constructor.getPropertyOptions(t), !(i.hasChanged ?? f$1)(this[t], s)) return;
|
|
240
240
|
this.P(t, s, i);
|
|
241
241
|
}
|
|
242
|
-
|
|
242
|
+
false === this.isUpdatePending && (this._$ES = this._$ET());
|
|
243
243
|
}
|
|
244
244
|
P(t, s, i) {
|
|
245
|
-
this._$AL.has(t) || this._$AL.set(t, s),
|
|
245
|
+
this._$AL.has(t) || this._$AL.set(t, s), true === i.reflect && this._$Em !== t && (this._$Ej ??= new Set()).add(t);
|
|
246
246
|
}
|
|
247
247
|
async _$ET() {
|
|
248
|
-
this.isUpdatePending =
|
|
248
|
+
this.isUpdatePending = true;
|
|
249
249
|
try {
|
|
250
250
|
await this._$ES;
|
|
251
251
|
} catch (t) {
|
|
@@ -262,26 +262,26 @@ let b$1 = class b extends HTMLElement {
|
|
|
262
262
|
if (!this.hasUpdated) {
|
|
263
263
|
if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
|
|
264
264
|
for (const [t, s] of this._$Ep) this[t] = s;
|
|
265
|
-
this._$Ep =
|
|
265
|
+
this._$Ep = undefined;
|
|
266
266
|
}
|
|
267
267
|
const t = this.constructor.elementProperties;
|
|
268
|
-
if (t.size > 0) for (const [s, i] of t)
|
|
268
|
+
if (t.size > 0) for (const [s, i] of t) true !== i.wrapped || this._$AL.has(s) || undefined === this[s] || this.P(s, this[s], i);
|
|
269
269
|
}
|
|
270
|
-
let t =
|
|
270
|
+
let t = false;
|
|
271
271
|
const s = this._$AL;
|
|
272
272
|
try {
|
|
273
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 =
|
|
275
|
+
throw t = false, this._$EU(), s;
|
|
276
276
|
}
|
|
277
277
|
t && this._$AE(s);
|
|
278
278
|
}
|
|
279
279
|
willUpdate(t) {}
|
|
280
280
|
_$AE(t) {
|
|
281
|
-
this._$EO?.forEach(t => t.hostUpdated?.()), this.hasUpdated || (this.hasUpdated =
|
|
281
|
+
this._$EO?.forEach(t => t.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = true, this.firstUpdated(t)), this.updated(t);
|
|
282
282
|
}
|
|
283
283
|
_$EU() {
|
|
284
|
-
this._$AL = new Map(), this.isUpdatePending =
|
|
284
|
+
this._$AL = new Map(), this.isUpdatePending = false;
|
|
285
285
|
}
|
|
286
286
|
get updateComplete() {
|
|
287
287
|
return this.getUpdateComplete();
|
|
@@ -290,7 +290,7 @@ let b$1 = class b extends HTMLElement {
|
|
|
290
290
|
return this._$ES;
|
|
291
291
|
}
|
|
292
292
|
shouldUpdate(t) {
|
|
293
|
-
return
|
|
293
|
+
return true;
|
|
294
294
|
}
|
|
295
295
|
update(t) {
|
|
296
296
|
this._$Ej &&= this._$Ej.forEach(t => this._$EC(t, this[t])), this._$EU();
|
|
@@ -310,10 +310,10 @@ b$1.elementStyles = [], b$1.shadowRootOptions = {
|
|
|
310
310
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
311
311
|
*/
|
|
312
312
|
const t = globalThis,
|
|
313
|
-
i = t.trustedTypes,
|
|
314
|
-
s
|
|
313
|
+
i$1 = t.trustedTypes,
|
|
314
|
+
s = i$1 ? i$1.createPolicy("lit-html", {
|
|
315
315
|
createHTML: t => t
|
|
316
|
-
}) :
|
|
316
|
+
}) : undefined,
|
|
317
317
|
e = "$lit$",
|
|
318
318
|
h = `lit$${Math.random().toFixed(9).slice(2)}$`,
|
|
319
319
|
o$1 = "?" + h,
|
|
@@ -338,19 +338,19 @@ const t = globalThis,
|
|
|
338
338
|
}),
|
|
339
339
|
x = y(1),
|
|
340
340
|
b = y(2),
|
|
341
|
-
|
|
342
|
-
|
|
341
|
+
T = Symbol.for("lit-noChange"),
|
|
342
|
+
E = Symbol.for("lit-nothing"),
|
|
343
343
|
A = new WeakMap(),
|
|
344
|
-
|
|
345
|
-
function
|
|
346
|
-
if (!
|
|
347
|
-
return
|
|
344
|
+
C = r$1.createTreeWalker(r$1, 129);
|
|
345
|
+
function P(t, i) {
|
|
346
|
+
if (!a(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
347
|
+
return undefined !== s ? s.createHTML(i) : i;
|
|
348
348
|
}
|
|
349
|
-
const
|
|
349
|
+
const V = (t, i) => {
|
|
350
350
|
const s = t.length - 1,
|
|
351
351
|
o = [];
|
|
352
352
|
let r,
|
|
353
|
-
l = 2 === i ? "<svg>" : "",
|
|
353
|
+
l = 2 === i ? "<svg>" : 3 === i ? "<math>" : "",
|
|
354
354
|
c = f;
|
|
355
355
|
for (let i = 0; i < s; i++) {
|
|
356
356
|
const s = t[i];
|
|
@@ -358,13 +358,13 @@ const P = (t, i) => {
|
|
|
358
358
|
u,
|
|
359
359
|
d = -1,
|
|
360
360
|
y = 0;
|
|
361
|
-
for (; y < s.length && (c.lastIndex = y, u = c.exec(s), null !== u);) y = c.lastIndex, c === f ? "!--" === u[1] ? c = v :
|
|
361
|
+
for (; y < s.length && (c.lastIndex = y, u = c.exec(s), null !== u);) y = c.lastIndex, c === f ? "!--" === u[1] ? c = v : undefined !== u[1] ? c = _ : undefined !== u[2] ? ($.test(u[2]) && (r = RegExp("</" + u[2], "g")), c = m) : undefined !== u[3] && (c = m) : c === m ? ">" === u[0] ? (c = r ?? f, d = -1) : undefined === u[1] ? d = -2 : (d = c.lastIndex - u[2].length, a = u[1], c = undefined === u[3] ? m : '"' === u[3] ? g : p) : c === g || c === p ? c = m : c === v || c === _ ? c = f : (c = m, r = undefined);
|
|
362
362
|
const x = c === m && t[i + 1].startsWith("/>") ? " " : "";
|
|
363
363
|
l += c === f ? s + n : d >= 0 ? (o.push(a), s.slice(0, d) + e + s.slice(d) + h + x) : s + h + (-2 === d ? i : x);
|
|
364
364
|
}
|
|
365
|
-
return [
|
|
365
|
+
return [P(t, l + (t[s] || "<?>") + (2 === i ? "</svg>" : 3 === i ? "</math>" : "")), o];
|
|
366
366
|
};
|
|
367
|
-
class
|
|
367
|
+
class N {
|
|
368
368
|
constructor({
|
|
369
369
|
strings: t,
|
|
370
370
|
_$litType$: s
|
|
@@ -375,12 +375,12 @@ class V {
|
|
|
375
375
|
a = 0;
|
|
376
376
|
const u = t.length - 1,
|
|
377
377
|
d = this.parts,
|
|
378
|
-
[f, v] =
|
|
379
|
-
if (this.el =
|
|
378
|
+
[f, v] = V(t, s);
|
|
379
|
+
if (this.el = N.createElement(f, n), C.currentNode = this.el.content, 2 === s || 3 === s) {
|
|
380
380
|
const t = this.el.content.firstChild;
|
|
381
381
|
t.replaceWith(...t.childNodes);
|
|
382
382
|
}
|
|
383
|
-
for (; null !== (r =
|
|
383
|
+
for (; null !== (r = C.nextNode()) && d.length < u;) {
|
|
384
384
|
if (1 === r.nodeType) {
|
|
385
385
|
if (r.hasAttributes()) for (const t of r.getAttributeNames()) if (t.endsWith(e)) {
|
|
386
386
|
const i = v[a++],
|
|
@@ -391,7 +391,7 @@ class V {
|
|
|
391
391
|
index: c,
|
|
392
392
|
name: e[2],
|
|
393
393
|
strings: s,
|
|
394
|
-
ctor: "." === e[1] ?
|
|
394
|
+
ctor: "." === e[1] ? H : "?" === e[1] ? I : "@" === e[1] ? L : k
|
|
395
395
|
}), r.removeAttribute(t);
|
|
396
396
|
} else t.startsWith(h) && (d.push({
|
|
397
397
|
type: 6,
|
|
@@ -401,8 +401,8 @@ class V {
|
|
|
401
401
|
const t = r.textContent.split(h),
|
|
402
402
|
s = t.length - 1;
|
|
403
403
|
if (s > 0) {
|
|
404
|
-
r.textContent = i ? i.emptyScript : "";
|
|
405
|
-
for (let i = 0; i < s; i++) r.append(t[i], l()),
|
|
404
|
+
r.textContent = i$1 ? i$1.emptyScript : "";
|
|
405
|
+
for (let i = 0; i < s; i++) r.append(t[i], l()), C.nextNode(), d.push({
|
|
406
406
|
type: 2,
|
|
407
407
|
index: ++c
|
|
408
408
|
});
|
|
@@ -427,15 +427,15 @@ class V {
|
|
|
427
427
|
return s.innerHTML = t, s;
|
|
428
428
|
}
|
|
429
429
|
}
|
|
430
|
-
function
|
|
431
|
-
if (i ===
|
|
432
|
-
let h =
|
|
433
|
-
const o = c(i) ?
|
|
434
|
-
return h?.constructor !== o && (h?._$AO?.(
|
|
430
|
+
function S(t, i, s = t, e) {
|
|
431
|
+
if (i === T) return i;
|
|
432
|
+
let h = undefined !== e ? s._$Co?.[e] : s._$Cl;
|
|
433
|
+
const o = c(i) ? undefined : i._$litDirective$;
|
|
434
|
+
return h?.constructor !== o && (h?._$AO?.(false), undefined === o ? h = undefined : (h = new o(t), h._$AT(t, s, e)), undefined !== e ? (s._$Co ??= [])[e] = h : s._$Cl = h), undefined !== h && (i = S(t, h._$AS(t, i.values), h, e)), i;
|
|
435
435
|
}
|
|
436
|
-
class
|
|
436
|
+
class M {
|
|
437
437
|
constructor(t, i) {
|
|
438
|
-
this._$AV = [], this._$AN =
|
|
438
|
+
this._$AV = [], this._$AN = undefined, this._$AD = t, this._$AM = i;
|
|
439
439
|
}
|
|
440
440
|
get parentNode() {
|
|
441
441
|
return this._$AM.parentNode;
|
|
@@ -450,37 +450,37 @@ class S {
|
|
|
450
450
|
},
|
|
451
451
|
parts: s
|
|
452
452
|
} = this._$AD,
|
|
453
|
-
e = (t?.creationScope ?? r$1).importNode(i,
|
|
454
|
-
|
|
455
|
-
let h =
|
|
453
|
+
e = (t?.creationScope ?? r$1).importNode(i, true);
|
|
454
|
+
C.currentNode = e;
|
|
455
|
+
let h = C.nextNode(),
|
|
456
456
|
o = 0,
|
|
457
457
|
n = 0,
|
|
458
458
|
l = s[0];
|
|
459
|
-
for (;
|
|
459
|
+
for (; undefined !== l;) {
|
|
460
460
|
if (o === l.index) {
|
|
461
461
|
let i;
|
|
462
|
-
2 === l.type ? i = new
|
|
462
|
+
2 === l.type ? i = new R(h, h.nextSibling, this, t) : 1 === l.type ? i = new l.ctor(h, l.name, l.strings, this, t) : 6 === l.type && (i = new z(h, this, t)), this._$AV.push(i), l = s[++n];
|
|
463
463
|
}
|
|
464
|
-
o !== l?.index && (h =
|
|
464
|
+
o !== l?.index && (h = C.nextNode(), o++);
|
|
465
465
|
}
|
|
466
|
-
return
|
|
466
|
+
return C.currentNode = r$1, e;
|
|
467
467
|
}
|
|
468
468
|
p(t) {
|
|
469
469
|
let i = 0;
|
|
470
|
-
for (const s of this._$AV)
|
|
470
|
+
for (const s of this._$AV) undefined !== s && (undefined !== s.strings ? (s._$AI(t, s, i), i += s.strings.length - 2) : s._$AI(t[i])), i++;
|
|
471
471
|
}
|
|
472
472
|
}
|
|
473
|
-
class
|
|
473
|
+
class R {
|
|
474
474
|
get _$AU() {
|
|
475
475
|
return this._$AM?._$AU ?? this._$Cv;
|
|
476
476
|
}
|
|
477
477
|
constructor(t, i, s, e) {
|
|
478
|
-
this.type = 2, this._$AH =
|
|
478
|
+
this.type = 2, this._$AH = E, this._$AN = undefined, this._$AA = t, this._$AB = i, this._$AM = s, this.options = e, this._$Cv = e?.isConnected ?? true;
|
|
479
479
|
}
|
|
480
480
|
get parentNode() {
|
|
481
481
|
let t = this._$AA.parentNode;
|
|
482
482
|
const i = this._$AM;
|
|
483
|
-
return
|
|
483
|
+
return undefined !== i && 11 === t?.nodeType && (t = i.parentNode), t;
|
|
484
484
|
}
|
|
485
485
|
get startNode() {
|
|
486
486
|
return this._$AA;
|
|
@@ -489,52 +489,52 @@ class M {
|
|
|
489
489
|
return this._$AB;
|
|
490
490
|
}
|
|
491
491
|
_$AI(t, i = this) {
|
|
492
|
-
t =
|
|
492
|
+
t = S(this, t, i), c(t) ? t === E || null == t || "" === t ? (this._$AH !== E && this._$AR(), this._$AH = E) : t !== this._$AH && t !== T && this._(t) : undefined !== t._$litType$ ? this.$(t) : undefined !== t.nodeType ? this.T(t) : u(t) ? this.k(t) : this._(t);
|
|
493
493
|
}
|
|
494
|
-
|
|
494
|
+
O(t) {
|
|
495
495
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
496
496
|
}
|
|
497
497
|
T(t) {
|
|
498
|
-
this._$AH !== t && (this._$AR(), this._$AH = this.
|
|
498
|
+
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
499
499
|
}
|
|
500
500
|
_(t) {
|
|
501
|
-
this._$AH !==
|
|
501
|
+
this._$AH !== E && 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
|
|
507
507
|
} = t,
|
|
508
|
-
e = "number" == typeof s ? this._$AC(t) : (
|
|
508
|
+
e = "number" == typeof s ? this._$AC(t) : (undefined === s.el && (s.el = N.createElement(P(s.h, s.h[0]), this.options)), s);
|
|
509
509
|
if (this._$AH?._$AD === e) this._$AH.p(i);else {
|
|
510
|
-
const t = new
|
|
510
|
+
const t = new M(e, this),
|
|
511
511
|
s = t.u(this.options);
|
|
512
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
|
-
return
|
|
517
|
+
return undefined === i && A.set(t.strings, i = new N(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
|
|
524
|
+
for (const h of t) e === i.length ? i.push(s = new R(this.O(l()), this.O(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) {
|
|
528
|
-
for (this._$AP?.(
|
|
528
|
+
for (this._$AP?.(false, true, i); t && t !== this._$AB;) {
|
|
529
529
|
const i = t.nextSibling;
|
|
530
530
|
t.remove(), t = i;
|
|
531
531
|
}
|
|
532
532
|
}
|
|
533
533
|
setConnected(t) {
|
|
534
|
-
|
|
534
|
+
undefined === this._$AM && (this._$Cv = t, this._$AP?.(t));
|
|
535
535
|
}
|
|
536
536
|
}
|
|
537
|
-
class
|
|
537
|
+
class k {
|
|
538
538
|
get tagName() {
|
|
539
539
|
return this.element.tagName;
|
|
540
540
|
}
|
|
@@ -542,72 +542,72 @@ class R {
|
|
|
542
542
|
return this._$AM._$AU;
|
|
543
543
|
}
|
|
544
544
|
constructor(t, i, s, e, h) {
|
|
545
|
-
this.type = 1, this._$AH =
|
|
545
|
+
this.type = 1, this._$AH = E, this._$AN = undefined, this.element = t, this.name = i, this._$AM = e, this.options = h, s.length > 2 || "" !== s[0] || "" !== s[1] ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = E;
|
|
546
546
|
}
|
|
547
547
|
_$AI(t, i = this, s, e) {
|
|
548
548
|
const h = this.strings;
|
|
549
|
-
let o =
|
|
550
|
-
if (
|
|
549
|
+
let o = false;
|
|
550
|
+
if (undefined === h) t = S(this, t, i, 0), o = !c(t) || t !== this._$AH && t !== T, o && (this._$AH = t);else {
|
|
551
551
|
const e = t;
|
|
552
552
|
let n, r;
|
|
553
|
-
for (t = h[0], n = 0; n < h.length - 1; n++) r =
|
|
553
|
+
for (t = h[0], n = 0; n < h.length - 1; n++) r = S(this, e[s + n], i, n), r === T && (r = this._$AH[n]), o ||= !c(r) || r !== this._$AH[n], r === E ? t = E : t !== E && (t += (r ?? "") + h[n + 1]), this._$AH[n] = r;
|
|
554
554
|
}
|
|
555
555
|
o && !e && this.j(t);
|
|
556
556
|
}
|
|
557
557
|
j(t) {
|
|
558
|
-
t ===
|
|
558
|
+
t === E ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
559
559
|
}
|
|
560
560
|
}
|
|
561
|
-
class
|
|
561
|
+
class H extends k {
|
|
562
562
|
constructor() {
|
|
563
563
|
super(...arguments), this.type = 3;
|
|
564
564
|
}
|
|
565
565
|
j(t) {
|
|
566
|
-
this.element[this.name] = t ===
|
|
566
|
+
this.element[this.name] = t === E ? undefined : t;
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
|
-
class
|
|
569
|
+
class I extends k {
|
|
570
570
|
constructor() {
|
|
571
571
|
super(...arguments), this.type = 4;
|
|
572
572
|
}
|
|
573
573
|
j(t) {
|
|
574
|
-
this.element.toggleAttribute(this.name, !!t && t !==
|
|
574
|
+
this.element.toggleAttribute(this.name, !!t && t !== E);
|
|
575
575
|
}
|
|
576
576
|
}
|
|
577
|
-
class
|
|
577
|
+
class L extends k {
|
|
578
578
|
constructor(t, i, s, e, h) {
|
|
579
579
|
super(t, i, s, e, h), this.type = 5;
|
|
580
580
|
}
|
|
581
581
|
_$AI(t, i = this) {
|
|
582
|
-
if ((t =
|
|
582
|
+
if ((t = S(this, t, i, 0) ?? E) === T) return;
|
|
583
583
|
const s = this._$AH,
|
|
584
|
-
e = t ===
|
|
585
|
-
h = t !==
|
|
584
|
+
e = t === E && s !== E || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive,
|
|
585
|
+
h = t !== E && (s === E || e);
|
|
586
586
|
e && this.element.removeEventListener(this.name, this, s), h && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
587
587
|
}
|
|
588
588
|
handleEvent(t) {
|
|
589
589
|
"function" == typeof this._$AH ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
|
|
590
590
|
}
|
|
591
591
|
}
|
|
592
|
-
class
|
|
592
|
+
class z {
|
|
593
593
|
constructor(t, i, s) {
|
|
594
|
-
this.element = t, this.type = 6, this._$AN =
|
|
594
|
+
this.element = t, this.type = 6, this._$AN = undefined, this._$AM = i, this.options = s;
|
|
595
595
|
}
|
|
596
596
|
get _$AU() {
|
|
597
597
|
return this._$AM._$AU;
|
|
598
598
|
}
|
|
599
599
|
_$AI(t) {
|
|
600
|
-
|
|
600
|
+
S(this, t);
|
|
601
601
|
}
|
|
602
602
|
}
|
|
603
|
-
const
|
|
604
|
-
|
|
605
|
-
const
|
|
603
|
+
const j = t.litHtmlPolyfillSupport;
|
|
604
|
+
j?.(N, R), (t.litHtmlVersions ??= []).push("3.2.1");
|
|
605
|
+
const B = (t, i, s) => {
|
|
606
606
|
const e = s?.renderBefore ?? i;
|
|
607
607
|
let h = e._$litPart$;
|
|
608
|
-
if (
|
|
608
|
+
if (undefined === h) {
|
|
609
609
|
const t = s?.renderBefore ?? null;
|
|
610
|
-
e._$litPart$ = h = new
|
|
610
|
+
e._$litPart$ = h = new R(i.insertBefore(l(), t), t, undefined, s ?? {});
|
|
611
611
|
}
|
|
612
612
|
return h._$AI(t), h;
|
|
613
613
|
};
|
|
@@ -617,38 +617,38 @@ const j = (t, i, s) => {
|
|
|
617
617
|
* Copyright 2017 Google LLC
|
|
618
618
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
619
619
|
*/
|
|
620
|
-
class
|
|
620
|
+
class r extends b$1 {
|
|
621
621
|
constructor() {
|
|
622
622
|
super(...arguments), this.renderOptions = {
|
|
623
623
|
host: this
|
|
624
|
-
}, this._$Do =
|
|
624
|
+
}, this._$Do = undefined;
|
|
625
625
|
}
|
|
626
626
|
createRenderRoot() {
|
|
627
627
|
const t = super.createRenderRoot();
|
|
628
628
|
return this.renderOptions.renderBefore ??= t.firstChild, t;
|
|
629
629
|
}
|
|
630
630
|
update(t) {
|
|
631
|
-
const
|
|
632
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do =
|
|
631
|
+
const s = this.render();
|
|
632
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = B(s, this.renderRoot, this.renderOptions);
|
|
633
633
|
}
|
|
634
634
|
connectedCallback() {
|
|
635
|
-
super.connectedCallback(), this._$Do?.setConnected(
|
|
635
|
+
super.connectedCallback(), this._$Do?.setConnected(true);
|
|
636
636
|
}
|
|
637
637
|
disconnectedCallback() {
|
|
638
|
-
super.disconnectedCallback(), this._$Do?.setConnected(
|
|
638
|
+
super.disconnectedCallback(), this._$Do?.setConnected(false);
|
|
639
639
|
}
|
|
640
640
|
render() {
|
|
641
|
-
return
|
|
641
|
+
return T;
|
|
642
642
|
}
|
|
643
643
|
}
|
|
644
|
-
|
|
645
|
-
LitElement:
|
|
644
|
+
r._$litElement$ = true, r["finalized"] = true, globalThis.litElementHydrateSupport?.({
|
|
645
|
+
LitElement: r
|
|
646
646
|
});
|
|
647
|
-
const
|
|
648
|
-
|
|
649
|
-
LitElement:
|
|
647
|
+
const i = globalThis.litElementPolyfillSupport;
|
|
648
|
+
i?.({
|
|
649
|
+
LitElement: r
|
|
650
650
|
});
|
|
651
|
-
(globalThis.litElementVersions ??= []).push("4.
|
|
651
|
+
(globalThis.litElementVersions ??= []).push("4.1.1");
|
|
652
652
|
|
|
653
653
|
var noop = {
|
|
654
654
|
value: () => {}
|
|
@@ -1912,7 +1912,7 @@ function hsl2rgb(h, m1, m2) {
|
|
|
1912
1912
|
return (h < 60 ? m1 + (m2 - m1) * h / 60 : h < 180 ? m2 : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 : m1) * 255;
|
|
1913
1913
|
}
|
|
1914
1914
|
|
|
1915
|
-
var constant =
|
|
1915
|
+
var constant = x => () => x;
|
|
1916
1916
|
|
|
1917
1917
|
function linear(a, d) {
|
|
1918
1918
|
return function (t) {
|
|
@@ -3068,7 +3068,7 @@ Transform.prototype;
|
|
|
3068
3068
|
DecidablesElement Base Class - Not intended for instantiation!
|
|
3069
3069
|
<decidables-element>
|
|
3070
3070
|
*/
|
|
3071
|
-
class DecidablesElement extends
|
|
3071
|
+
class DecidablesElement extends r {
|
|
3072
3072
|
getComputedStyleValue(property) {
|
|
3073
3073
|
return getComputedStyle(this).getPropertyValue(property).trim();
|
|
3074
3074
|
}
|
|
@@ -3321,7 +3321,7 @@ class DecidablesElement extends s {
|
|
|
3321
3321
|
`;
|
|
3322
3322
|
}
|
|
3323
3323
|
static get styles() {
|
|
3324
|
-
return i$
|
|
3324
|
+
return i$3`
|
|
3325
3325
|
:host {
|
|
3326
3326
|
---shadow-0: var(--shadow-0, ${r$3(this.cssBoxShadow(0))});
|
|
3327
3327
|
---shadow-2: var(--shadow-2, ${r$3(this.cssBoxShadow(2))});
|
|
@@ -3399,8 +3399,11 @@ class DecidablesButton extends DecidablesElement {
|
|
|
3399
3399
|
this.disabled = false;
|
|
3400
3400
|
}
|
|
3401
3401
|
static get styles() {
|
|
3402
|
-
return [super.styles, i$
|
|
3402
|
+
return [super.styles, i$3`
|
|
3403
3403
|
:host {
|
|
3404
|
+
---decidables-button-background-color-disabled: var(--decidables-button-background-color, var(---color-element-disabled));
|
|
3405
|
+
---decidables-button-background-color-enabled: var(--decidables-button-background-color, var(---color-element-enabled));
|
|
3406
|
+
|
|
3404
3407
|
margin: 0.25rem;
|
|
3405
3408
|
}
|
|
3406
3409
|
|
|
@@ -3420,7 +3423,7 @@ class DecidablesButton extends DecidablesElement {
|
|
|
3420
3423
|
}
|
|
3421
3424
|
|
|
3422
3425
|
button:disabled {
|
|
3423
|
-
background-color: var(
|
|
3426
|
+
background-color: var(---decidables-button-background-color-disabled);
|
|
3424
3427
|
outline: none;
|
|
3425
3428
|
box-shadow: none;
|
|
3426
3429
|
}
|
|
@@ -3428,7 +3431,7 @@ class DecidablesButton extends DecidablesElement {
|
|
|
3428
3431
|
button:enabled {
|
|
3429
3432
|
cursor: pointer;
|
|
3430
3433
|
|
|
3431
|
-
background-color: var(
|
|
3434
|
+
background-color: var(---decidables-button-background-color-enabled);
|
|
3432
3435
|
outline: none;
|
|
3433
3436
|
box-shadow: var(---shadow-2);
|
|
3434
3437
|
}
|
|
@@ -3469,7 +3472,7 @@ customElements.define('decidables-button', DecidablesButton);
|
|
|
3469
3472
|
* Copyright 2018 Google LLC
|
|
3470
3473
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3471
3474
|
*/
|
|
3472
|
-
const o = o => o ??
|
|
3475
|
+
const o = o => o ?? E;
|
|
3473
3476
|
|
|
3474
3477
|
class DecidablesSlider extends DecidablesElement {
|
|
3475
3478
|
static get properties() {
|
|
@@ -3479,6 +3482,11 @@ class DecidablesSlider extends DecidablesElement {
|
|
|
3479
3482
|
type: Boolean,
|
|
3480
3483
|
reflect: true
|
|
3481
3484
|
},
|
|
3485
|
+
scale: {
|
|
3486
|
+
attribute: 'scale',
|
|
3487
|
+
type: Boolean,
|
|
3488
|
+
reflect: true
|
|
3489
|
+
},
|
|
3482
3490
|
max: {
|
|
3483
3491
|
attribute: 'max',
|
|
3484
3492
|
type: Number,
|
|
@@ -3498,6 +3506,11 @@ class DecidablesSlider extends DecidablesElement {
|
|
|
3498
3506
|
attribute: 'value',
|
|
3499
3507
|
type: Number,
|
|
3500
3508
|
reflect: true
|
|
3509
|
+
},
|
|
3510
|
+
nonlinear: {
|
|
3511
|
+
attribute: false,
|
|
3512
|
+
type: Boolean,
|
|
3513
|
+
reflect: false
|
|
3501
3514
|
}
|
|
3502
3515
|
};
|
|
3503
3516
|
}
|
|
@@ -3506,13 +3519,30 @@ class DecidablesSlider extends DecidablesElement {
|
|
|
3506
3519
|
|
|
3507
3520
|
// Attributes
|
|
3508
3521
|
this.disabled = false;
|
|
3522
|
+
this.scale = false;
|
|
3509
3523
|
this.max = undefined;
|
|
3510
3524
|
this.min = undefined;
|
|
3511
3525
|
this.step = undefined;
|
|
3512
3526
|
this.value = undefined;
|
|
3527
|
+
this.nonlinear = false;
|
|
3528
|
+
|
|
3529
|
+
// Properties
|
|
3530
|
+
this.rangeMax = undefined;
|
|
3531
|
+
this.rangeMin = undefined;
|
|
3532
|
+
this.rangeStep = undefined;
|
|
3533
|
+
this.rangeValue = undefined;
|
|
3534
|
+
|
|
3535
|
+
// Transform
|
|
3536
|
+
this.toRange = undefined;
|
|
3537
|
+
this.fromRange = undefined;
|
|
3513
3538
|
}
|
|
3514
|
-
|
|
3515
|
-
this.
|
|
3539
|
+
nonlinearRange(nonlinear, toRange, fromRange) {
|
|
3540
|
+
this.nonlinear = nonlinear;
|
|
3541
|
+
this.toRange = nonlinear ? toRange : undefined;
|
|
3542
|
+
this.fromRange = nonlinear ? fromRange : undefined;
|
|
3543
|
+
}
|
|
3544
|
+
rangeChanged(event) {
|
|
3545
|
+
this.value = this.nonlinear ? this.fromRange(event.target.value) : event.target.value;
|
|
3516
3546
|
this.dispatchEvent(new CustomEvent('change', {
|
|
3517
3547
|
detail: {
|
|
3518
3548
|
value: this.value
|
|
@@ -3520,12 +3550,25 @@ class DecidablesSlider extends DecidablesElement {
|
|
|
3520
3550
|
bubbles: true
|
|
3521
3551
|
}));
|
|
3522
3552
|
}
|
|
3523
|
-
|
|
3553
|
+
rangeInputted(event) {
|
|
3554
|
+
this.value = this.nonlinear ? this.fromRange(event.target.value) : event.target.value;
|
|
3555
|
+
}
|
|
3556
|
+
spinnerInputted(event) {
|
|
3524
3557
|
this.value = event.target.value;
|
|
3525
3558
|
}
|
|
3559
|
+
willUpdate() {
|
|
3560
|
+
this.rangeMax = this.max === undefined ? undefined : this.nonlinear ? this.toRange(this.max) : this.max;
|
|
3561
|
+
this.rangeMin = this.min === undefined ? undefined : this.nonlinear ? this.toRange(this.min) : this.min;
|
|
3562
|
+
this.rangeStep = this.step === undefined ? undefined : this.nonlinear ? 'any' : this.step;
|
|
3563
|
+
this.rangeValue = this.value === undefined ? undefined : this.nonlinear ? this.toRange(this.value) : this.value;
|
|
3564
|
+
}
|
|
3526
3565
|
static get styles() {
|
|
3527
|
-
return [super.styles, i$
|
|
3566
|
+
return [super.styles, i$3`
|
|
3528
3567
|
:host {
|
|
3568
|
+
---decidables-slider-background-color: var(--decidables-slider-background-color, var(---color-element-disabled));
|
|
3569
|
+
---decidables-slider-color: var(--decidables-slider-color, var(---color-element-enabled));
|
|
3570
|
+
---decidables-spinner-background-color: var(--decidables-slider-background-color, none);
|
|
3571
|
+
|
|
3529
3572
|
---shadow-2-rotate: var(--shadow-2-rotate, ${r$3(this.cssBoxShadow(2, true, false))});
|
|
3530
3573
|
---shadow-4-rotate: var(--shadow-4-rotate, ${r$3(this.cssBoxShadow(4, true, false))});
|
|
3531
3574
|
---shadow-8-rotate: var(--shadow-8-rotate, ${r$3(this.cssBoxShadow(8, true, false))});
|
|
@@ -3543,7 +3586,10 @@ class DecidablesSlider extends DecidablesElement {
|
|
|
3543
3586
|
}
|
|
3544
3587
|
|
|
3545
3588
|
.range {
|
|
3546
|
-
|
|
3589
|
+
position: relative;
|
|
3590
|
+
display: flex;
|
|
3591
|
+
|
|
3592
|
+
flex-direction: row;
|
|
3547
3593
|
|
|
3548
3594
|
width: 3.5rem;
|
|
3549
3595
|
height: 4.75rem;
|
|
@@ -3554,6 +3600,8 @@ class DecidablesSlider extends DecidablesElement {
|
|
|
3554
3600
|
--decidables-spinner-input-width: 3.5rem;
|
|
3555
3601
|
|
|
3556
3602
|
margin: 0 0.25rem 0.25rem;
|
|
3603
|
+
|
|
3604
|
+
background: var(---decidables-spinner-background-color);
|
|
3557
3605
|
}
|
|
3558
3606
|
|
|
3559
3607
|
/* Adapted from http://danielstern.ca/range.css/#/ */
|
|
@@ -3592,14 +3640,14 @@ class DecidablesSlider extends DecidablesElement {
|
|
|
3592
3640
|
width: 100%;
|
|
3593
3641
|
height: 4px;
|
|
3594
3642
|
|
|
3595
|
-
background: var(---
|
|
3643
|
+
background: var(---decidables-slider-background-color);
|
|
3596
3644
|
border: 0;
|
|
3597
3645
|
border-radius: 2px;
|
|
3598
3646
|
box-shadow: none;
|
|
3599
3647
|
}
|
|
3600
3648
|
|
|
3601
3649
|
input[type=range]:focus::-webkit-slider-runnable-track {
|
|
3602
|
-
background: var(---
|
|
3650
|
+
background: var(---decidables-slider-background-color);
|
|
3603
3651
|
}
|
|
3604
3652
|
|
|
3605
3653
|
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
@@ -3607,7 +3655,7 @@ class DecidablesSlider extends DecidablesElement {
|
|
|
3607
3655
|
width: 100%;
|
|
3608
3656
|
height: 4px;
|
|
3609
3657
|
|
|
3610
|
-
background: var(---
|
|
3658
|
+
background: var(---decidables-slider-background-color);
|
|
3611
3659
|
border: 0;
|
|
3612
3660
|
border-radius: 2px;
|
|
3613
3661
|
box-shadow: none;
|
|
@@ -3627,7 +3675,7 @@ class DecidablesSlider extends DecidablesElement {
|
|
|
3627
3675
|
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
3628
3676
|
input[type=range]::-ms-fill-lower {
|
|
3629
3677
|
background: #cccccc;
|
|
3630
|
-
/* background: var(---
|
|
3678
|
+
/* background: var(---decidables-slider-background-color); */
|
|
3631
3679
|
border: 0;
|
|
3632
3680
|
border-radius: 2px;
|
|
3633
3681
|
box-shadow: none;
|
|
@@ -3636,7 +3684,7 @@ class DecidablesSlider extends DecidablesElement {
|
|
|
3636
3684
|
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
3637
3685
|
input[type=range]::-ms-fill-upper {
|
|
3638
3686
|
background: #cccccc;
|
|
3639
|
-
/* background: var(---
|
|
3687
|
+
/* background: var(---decidables-slider-background-color); */
|
|
3640
3688
|
border: 0;
|
|
3641
3689
|
border-radius: 2px;
|
|
3642
3690
|
box-shadow: none;
|
|
@@ -3644,12 +3692,12 @@ class DecidablesSlider extends DecidablesElement {
|
|
|
3644
3692
|
|
|
3645
3693
|
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
3646
3694
|
input[type=range]:focus::-ms-fill-lower {
|
|
3647
|
-
background: var(---
|
|
3695
|
+
background: var(---decidables-slider-background-color);
|
|
3648
3696
|
}
|
|
3649
3697
|
|
|
3650
3698
|
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
3651
3699
|
input[type=range]:focus::-ms-fill-upper {
|
|
3652
|
-
background: var(---
|
|
3700
|
+
background: var(---decidables-slider-background-color);
|
|
3653
3701
|
}
|
|
3654
3702
|
|
|
3655
3703
|
/* Thumb */
|
|
@@ -3667,12 +3715,12 @@ class DecidablesSlider extends DecidablesElement {
|
|
|
3667
3715
|
}
|
|
3668
3716
|
|
|
3669
3717
|
input[type=range]:disabled::-webkit-slider-thumb {
|
|
3670
|
-
background: var(---
|
|
3718
|
+
background: var(---decidables-slider-background-color);
|
|
3671
3719
|
box-shadow: none;
|
|
3672
3720
|
}
|
|
3673
3721
|
|
|
3674
3722
|
input[type=range]:enabled::-webkit-slider-thumb {
|
|
3675
|
-
background: var(---
|
|
3723
|
+
background: var(---decidables-slider-color);
|
|
3676
3724
|
box-shadow: var(---shadow-2-rotate);
|
|
3677
3725
|
}
|
|
3678
3726
|
|
|
@@ -3703,13 +3751,13 @@ class DecidablesSlider extends DecidablesElement {
|
|
|
3703
3751
|
|
|
3704
3752
|
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
3705
3753
|
input[type=range]:disabled::-moz-range-thumb {
|
|
3706
|
-
background: var(---
|
|
3754
|
+
background: var(---decidables-slider-background-color);
|
|
3707
3755
|
box-shadow: none;
|
|
3708
3756
|
}
|
|
3709
3757
|
|
|
3710
3758
|
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
3711
3759
|
input[type=range]:enabled::-moz-range-thumb {
|
|
3712
|
-
background: var(---
|
|
3760
|
+
background: var(---decidables-slider-color);
|
|
3713
3761
|
box-shadow: var(---shadow-2-rotate);
|
|
3714
3762
|
}
|
|
3715
3763
|
|
|
@@ -3746,13 +3794,13 @@ class DecidablesSlider extends DecidablesElement {
|
|
|
3746
3794
|
|
|
3747
3795
|
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
3748
3796
|
input[type=range]:disabled::-ms-thumb {
|
|
3749
|
-
background: var(---
|
|
3797
|
+
background: var(---decidables-slider-background-color);
|
|
3750
3798
|
box-shadow: none;
|
|
3751
3799
|
}
|
|
3752
3800
|
|
|
3753
3801
|
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
3754
3802
|
input[type=range]:enabled::-ms-thumb {
|
|
3755
|
-
background: var(---
|
|
3803
|
+
background: var(---decidables-slider-color);
|
|
3756
3804
|
box-shadow: var(---shadow-2-rotate);
|
|
3757
3805
|
}
|
|
3758
3806
|
|
|
@@ -3774,6 +3822,33 @@ class DecidablesSlider extends DecidablesElement {
|
|
|
3774
3822
|
:host(.keyboard) input[type=range]:enabled:focus:active::-ms-thumb {
|
|
3775
3823
|
box-shadow: var(---shadow-8-rotate);
|
|
3776
3824
|
}
|
|
3825
|
+
|
|
3826
|
+
datalist {
|
|
3827
|
+
position: absolute;
|
|
3828
|
+
left: 2rem;
|
|
3829
|
+
z-index: -1;
|
|
3830
|
+
display: flex;
|
|
3831
|
+
|
|
3832
|
+
flex-direction: column;
|
|
3833
|
+
|
|
3834
|
+
align-items: flex-start;
|
|
3835
|
+
justify-content: space-between;
|
|
3836
|
+
|
|
3837
|
+
height: 4.75rem;
|
|
3838
|
+
|
|
3839
|
+
font-size: 0.75rem;
|
|
3840
|
+
}
|
|
3841
|
+
|
|
3842
|
+
option {
|
|
3843
|
+
padding: 0;
|
|
3844
|
+
|
|
3845
|
+
line-height: 0.8;
|
|
3846
|
+
min-block-size: 0;
|
|
3847
|
+
}
|
|
3848
|
+
|
|
3849
|
+
option::before {
|
|
3850
|
+
content: "– ";
|
|
3851
|
+
}
|
|
3777
3852
|
`];
|
|
3778
3853
|
}
|
|
3779
3854
|
render() {
|
|
@@ -3782,9 +3857,15 @@ class DecidablesSlider extends DecidablesElement {
|
|
|
3782
3857
|
<slot></slot>
|
|
3783
3858
|
</label>
|
|
3784
3859
|
<div class="range">
|
|
3785
|
-
<input ?disabled=${this.disabled} type="range" id="slider" min=${o(this.
|
|
3860
|
+
<input ?disabled=${this.disabled} type="range" id="slider" min=${o(this.rangeMin)} max=${o(this.rangeMax)} step=${o(this.rangeStep)} .value=${this.rangeValue} @change=${this.rangeChanged.bind(this)} @input=${this.rangeInputted.bind(this)}>
|
|
3861
|
+
${this.scale ? x`
|
|
3862
|
+
<datalist id="ticks">
|
|
3863
|
+
<option value=${o(this.rangeMax)} label=${o(this.max)}></option>
|
|
3864
|
+
<option value=${o(this.rangeMin)} label=${o(this.min)}></option>
|
|
3865
|
+
</datalist>
|
|
3866
|
+
` : x``}
|
|
3786
3867
|
</div>
|
|
3787
|
-
<decidables-spinner ?disabled=${this.disabled} min=${o(this.min)} max=${o(this.max)} step=${o(this.step)} .value=${this.value} @input=${this.
|
|
3868
|
+
<decidables-spinner ?disabled=${this.disabled} min=${o(this.min)} max=${o(this.max)} step=${o(this.step)} .value=${this.value} @input=${this.spinnerInputted.bind(this)}></decidables-spinner>
|
|
3788
3869
|
`;
|
|
3789
3870
|
}
|
|
3790
3871
|
}
|
|
@@ -3834,7 +3915,7 @@ class DecidablesSpinner extends DecidablesElement {
|
|
|
3834
3915
|
this.value = event.target.value;
|
|
3835
3916
|
}
|
|
3836
3917
|
static get styles() {
|
|
3837
|
-
return [super.styles, i$
|
|
3918
|
+
return [super.styles, i$3`
|
|
3838
3919
|
:host {
|
|
3839
3920
|
---decidables-spinner-font-size: var(--decidables-spinner-font-size, 1.125rem);
|
|
3840
3921
|
---decidables-spinner-input-width: var(--decidables-spinner-input-width, 4rem);
|
|
@@ -3973,7 +4054,7 @@ class DecidablesSwitch extends DecidablesElement {
|
|
|
3973
4054
|
}));
|
|
3974
4055
|
}
|
|
3975
4056
|
static get styles() {
|
|
3976
|
-
return [super.styles, i$
|
|
4057
|
+
return [super.styles, i$3`
|
|
3977
4058
|
:host {
|
|
3978
4059
|
display: flex;
|
|
3979
4060
|
|
|
@@ -4126,7 +4207,7 @@ class DecidablesToggle extends DecidablesElement {
|
|
|
4126
4207
|
this.disabled = false;
|
|
4127
4208
|
}
|
|
4128
4209
|
static get styles() {
|
|
4129
|
-
return [super.styles, i$
|
|
4210
|
+
return [super.styles, i$3`
|
|
4130
4211
|
fieldset {
|
|
4131
4212
|
display: flex;
|
|
4132
4213
|
|
|
@@ -4201,7 +4282,7 @@ class DecidablesToggleOption extends DecidablesElement {
|
|
|
4201
4282
|
}));
|
|
4202
4283
|
}
|
|
4203
4284
|
static get styles() {
|
|
4204
|
-
return [super.styles, i$
|
|
4285
|
+
return [super.styles, i$3`
|
|
4205
4286
|
:host {
|
|
4206
4287
|
display: flex;
|
|
4207
4288
|
}
|