@decidables/decidables-elements 0.4.9 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/README.md +50 -0
- package/lib/decidablesElements.esm.js +242 -148
- package/lib/decidablesElements.esm.js.map +1 -1
- package/lib/decidablesElements.esm.min.js +87 -44
- package/lib/decidablesElements.esm.min.js.map +1 -1
- package/lib/decidablesElements.umd.js +242 -148
- package/lib/decidablesElements.umd.js.map +1 -1
- package/lib/decidablesElements.umd.min.js +85 -42
- package/lib/decidablesElements.umd.min.js.map +1 -1
- package/package.json +4 -4
- package/src/button.js +5 -2
- package/src/decidables-element.js +1 -0
- package/src/slider.js +126 -19
- package/src/switch.js +0 -1
- package/src/toggle-option.js +0 -1
|
@@ -10,20 +10,20 @@
|
|
|
10
10
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
11
|
*/
|
|
12
12
|
const t$1 = globalThis,
|
|
13
|
-
e$2 = t$1.ShadowRoot && (
|
|
14
|
-
s$
|
|
15
|
-
o$
|
|
13
|
+
e$2 = t$1.ShadowRoot && (void 0 === t$1.ShadyCSS || t$1.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype,
|
|
14
|
+
s$2 = Symbol(),
|
|
15
|
+
o$4 = new WeakMap();
|
|
16
16
|
let n$2 = class n {
|
|
17
17
|
constructor(t, e, o) {
|
|
18
|
-
if (this._$cssResult$ = true, o !== s$
|
|
18
|
+
if (this._$cssResult$ = true, o !== s$2) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
19
19
|
this.cssText = t, this.t = e;
|
|
20
20
|
}
|
|
21
21
|
get styleSheet() {
|
|
22
22
|
let t = this.o;
|
|
23
23
|
const s = this.t;
|
|
24
|
-
if (e$2 &&
|
|
25
|
-
const e =
|
|
26
|
-
e && (t = o$
|
|
24
|
+
if (e$2 && void 0 === t) {
|
|
25
|
+
const e = void 0 !== s && 1 === s.length;
|
|
26
|
+
e && (t = o$4.get(s)), void 0 === t && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), e && o$4.set(s, t));
|
|
27
27
|
}
|
|
28
28
|
return t;
|
|
29
29
|
}
|
|
@@ -31,26 +31,26 @@
|
|
|
31
31
|
return this.cssText;
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
|
-
const r$
|
|
34
|
+
const r$2 = t => new n$2("string" == typeof t ? t : t + "", void 0, s$2),
|
|
35
35
|
i$3 = (t, ...e) => {
|
|
36
36
|
const o = 1 === t.length ? t[0] : e.reduce((e, s, o) => e + (t => {
|
|
37
37
|
if (true === t._$cssResult$) return t.cssText;
|
|
38
38
|
if ("number" == typeof t) return t;
|
|
39
39
|
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.");
|
|
40
40
|
})(s) + t[o + 1], t[0]);
|
|
41
|
-
return new n$2(o, t, s$
|
|
41
|
+
return new n$2(o, t, s$2);
|
|
42
42
|
},
|
|
43
43
|
S$1 = (s, o) => {
|
|
44
44
|
if (e$2) s.adoptedStyleSheets = o.map(t => t instanceof CSSStyleSheet ? t : t.styleSheet);else for (const e of o) {
|
|
45
45
|
const o = document.createElement("style"),
|
|
46
46
|
n = t$1.litNonce;
|
|
47
|
-
|
|
47
|
+
void 0 !== n && o.setAttribute("nonce", n), o.textContent = e.cssText, s.appendChild(o);
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
c$2 = e$2 ? t => t : t => t instanceof CSSStyleSheet ? (t => {
|
|
51
51
|
let e = "";
|
|
52
52
|
for (const s of t.cssRules) e += s.cssText;
|
|
53
|
-
return r$
|
|
53
|
+
return r$2(e);
|
|
54
54
|
})(t) : t;
|
|
55
55
|
|
|
56
56
|
/**
|
|
@@ -61,9 +61,9 @@
|
|
|
61
61
|
const {
|
|
62
62
|
is: i$2,
|
|
63
63
|
defineProperty: e$1,
|
|
64
|
-
getOwnPropertyDescriptor:
|
|
65
|
-
getOwnPropertyNames:
|
|
66
|
-
getOwnPropertySymbols: o$
|
|
64
|
+
getOwnPropertyDescriptor: h$1,
|
|
65
|
+
getOwnPropertyNames: r$1,
|
|
66
|
+
getOwnPropertySymbols: o$3,
|
|
67
67
|
getPrototypeOf: n$1
|
|
68
68
|
} = Object,
|
|
69
69
|
a$1 = globalThis,
|
|
@@ -104,33 +104,34 @@
|
|
|
104
104
|
}
|
|
105
105
|
},
|
|
106
106
|
f$1 = (t, s) => !i$2(t, s),
|
|
107
|
-
|
|
107
|
+
b$1 = {
|
|
108
108
|
attribute: true,
|
|
109
109
|
type: String,
|
|
110
110
|
converter: u$1,
|
|
111
111
|
reflect: false,
|
|
112
|
+
useDefault: false,
|
|
112
113
|
hasChanged: f$1
|
|
113
114
|
};
|
|
114
115
|
Symbol.metadata ??= Symbol("metadata"), a$1.litPropertyMetadata ??= new WeakMap();
|
|
115
|
-
let
|
|
116
|
+
let y$1 = class y extends HTMLElement {
|
|
116
117
|
static addInitializer(t) {
|
|
117
118
|
this._$Ei(), (this.l ??= []).push(t);
|
|
118
119
|
}
|
|
119
120
|
static get observedAttributes() {
|
|
120
121
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
121
122
|
}
|
|
122
|
-
static createProperty(t, s =
|
|
123
|
-
if (s.state && (s.attribute = false), this._$Ei(), this.elementProperties.set(t, s), !s.noAccessor) {
|
|
123
|
+
static createProperty(t, s = b$1) {
|
|
124
|
+
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) {
|
|
124
125
|
const i = Symbol(),
|
|
125
|
-
|
|
126
|
-
|
|
126
|
+
h = this.getPropertyDescriptor(t, i, s);
|
|
127
|
+
void 0 !== h && e$1(this.prototype, t, h);
|
|
127
128
|
}
|
|
128
129
|
}
|
|
129
130
|
static getPropertyDescriptor(t, s, i) {
|
|
130
131
|
const {
|
|
131
132
|
get: e,
|
|
132
|
-
set:
|
|
133
|
-
} =
|
|
133
|
+
set: r
|
|
134
|
+
} = h$1(this.prototype, t) ?? {
|
|
134
135
|
get() {
|
|
135
136
|
return this[s];
|
|
136
137
|
},
|
|
@@ -139,41 +140,39 @@
|
|
|
139
140
|
}
|
|
140
141
|
};
|
|
141
142
|
return {
|
|
142
|
-
get
|
|
143
|
-
return e?.call(this);
|
|
144
|
-
},
|
|
143
|
+
get: e,
|
|
145
144
|
set(s) {
|
|
146
|
-
const
|
|
147
|
-
|
|
145
|
+
const h = e?.call(this);
|
|
146
|
+
r?.call(this, s), this.requestUpdate(t, h, i);
|
|
148
147
|
},
|
|
149
148
|
configurable: true,
|
|
150
149
|
enumerable: true
|
|
151
150
|
};
|
|
152
151
|
}
|
|
153
152
|
static getPropertyOptions(t) {
|
|
154
|
-
return this.elementProperties.get(t) ??
|
|
153
|
+
return this.elementProperties.get(t) ?? b$1;
|
|
155
154
|
}
|
|
156
155
|
static _$Ei() {
|
|
157
156
|
if (this.hasOwnProperty(d$1("elementProperties"))) return;
|
|
158
157
|
const t = n$1(this);
|
|
159
|
-
t.finalize(),
|
|
158
|
+
t.finalize(), void 0 !== t.l && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
160
159
|
}
|
|
161
160
|
static finalize() {
|
|
162
161
|
if (this.hasOwnProperty(d$1("finalized"))) return;
|
|
163
162
|
if (this.finalized = true, this._$Ei(), this.hasOwnProperty(d$1("properties"))) {
|
|
164
163
|
const t = this.properties,
|
|
165
|
-
s = [...
|
|
164
|
+
s = [...r$1(t), ...o$3(t)];
|
|
166
165
|
for (const i of s) this.createProperty(i, t[i]);
|
|
167
166
|
}
|
|
168
167
|
const t = this[Symbol.metadata];
|
|
169
168
|
if (null !== t) {
|
|
170
169
|
const s = litPropertyMetadata.get(t);
|
|
171
|
-
if (
|
|
170
|
+
if (void 0 !== s) for (const [t, i] of s) this.elementProperties.set(t, i);
|
|
172
171
|
}
|
|
173
172
|
this._$Eh = new Map();
|
|
174
173
|
for (const [t, s] of this.elementProperties) {
|
|
175
174
|
const i = this._$Eu(t, s);
|
|
176
|
-
|
|
175
|
+
void 0 !== i && this._$Eh.set(i, t);
|
|
177
176
|
}
|
|
178
177
|
this.elementStyles = this.finalizeStyles(this.styles);
|
|
179
178
|
}
|
|
@@ -182,21 +181,21 @@
|
|
|
182
181
|
if (Array.isArray(s)) {
|
|
183
182
|
const e = new Set(s.flat(1 / 0).reverse());
|
|
184
183
|
for (const s of e) i.unshift(c$2(s));
|
|
185
|
-
} else
|
|
184
|
+
} else void 0 !== s && i.push(c$2(s));
|
|
186
185
|
return i;
|
|
187
186
|
}
|
|
188
187
|
static _$Eu(t, s) {
|
|
189
188
|
const i = s.attribute;
|
|
190
|
-
return false === i ?
|
|
189
|
+
return false === i ? void 0 : "string" == typeof i ? i : "string" == typeof t ? t.toLowerCase() : void 0;
|
|
191
190
|
}
|
|
192
191
|
constructor() {
|
|
193
|
-
super(), this._$Ep =
|
|
192
|
+
super(), this._$Ep = void 0, this.isUpdatePending = false, this.hasUpdated = false, this._$Em = null, this._$Ev();
|
|
194
193
|
}
|
|
195
194
|
_$Ev() {
|
|
196
195
|
this._$ES = new Promise(t => this.enableUpdating = t), this._$AL = new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach(t => t(this));
|
|
197
196
|
}
|
|
198
197
|
addController(t) {
|
|
199
|
-
(this._$EO ??= new Set()).add(t),
|
|
198
|
+
(this._$EO ??= new Set()).add(t), void 0 !== this.renderRoot && this.isConnected && t.hostConnected?.();
|
|
200
199
|
}
|
|
201
200
|
removeController(t) {
|
|
202
201
|
this._$EO?.delete(t);
|
|
@@ -221,36 +220,44 @@
|
|
|
221
220
|
attributeChangedCallback(t, s, i) {
|
|
222
221
|
this._$AK(t, i);
|
|
223
222
|
}
|
|
224
|
-
_$
|
|
223
|
+
_$ET(t, s) {
|
|
225
224
|
const i = this.constructor.elementProperties.get(t),
|
|
226
225
|
e = this.constructor._$Eu(t, i);
|
|
227
|
-
if (
|
|
228
|
-
const
|
|
229
|
-
this._$Em = t, null ==
|
|
226
|
+
if (void 0 !== e && true === i.reflect) {
|
|
227
|
+
const h = (void 0 !== i.converter?.toAttribute ? i.converter : u$1).toAttribute(s, i.type);
|
|
228
|
+
this._$Em = t, null == h ? this.removeAttribute(e) : this.setAttribute(e, h), this._$Em = null;
|
|
230
229
|
}
|
|
231
230
|
}
|
|
232
231
|
_$AK(t, s) {
|
|
233
232
|
const i = this.constructor,
|
|
234
233
|
e = i._$Eh.get(t);
|
|
235
|
-
if (
|
|
234
|
+
if (void 0 !== e && this._$Em !== e) {
|
|
236
235
|
const t = i.getPropertyOptions(e),
|
|
237
|
-
|
|
236
|
+
h = "function" == typeof t.converter ? {
|
|
238
237
|
fromAttribute: t.converter
|
|
239
|
-
} :
|
|
240
|
-
this._$Em = e
|
|
238
|
+
} : void 0 !== t.converter?.fromAttribute ? t.converter : u$1;
|
|
239
|
+
this._$Em = e;
|
|
240
|
+
const r = h.fromAttribute(s, t.type);
|
|
241
|
+
this[e] = r ?? this._$Ej?.get(e) ?? r, this._$Em = null;
|
|
241
242
|
}
|
|
242
243
|
}
|
|
243
244
|
requestUpdate(t, s, i) {
|
|
244
|
-
if (
|
|
245
|
-
|
|
246
|
-
|
|
245
|
+
if (void 0 !== t) {
|
|
246
|
+
const e = this.constructor,
|
|
247
|
+
h = this[t];
|
|
248
|
+
if (i ??= e.getPropertyOptions(t), !((i.hasChanged ?? f$1)(h, s) || i.useDefault && i.reflect && h === this._$Ej?.get(t) && !this.hasAttribute(e._$Eu(t, i)))) return;
|
|
249
|
+
this.C(t, s, i);
|
|
247
250
|
}
|
|
248
|
-
false === this.isUpdatePending && (this._$ES = this._$
|
|
251
|
+
false === this.isUpdatePending && (this._$ES = this._$EP());
|
|
249
252
|
}
|
|
250
|
-
|
|
251
|
-
|
|
253
|
+
C(t, s, {
|
|
254
|
+
useDefault: i,
|
|
255
|
+
reflect: e,
|
|
256
|
+
wrapped: h
|
|
257
|
+
}, r) {
|
|
258
|
+
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));
|
|
252
259
|
}
|
|
253
|
-
async _$
|
|
260
|
+
async _$EP() {
|
|
254
261
|
this.isUpdatePending = true;
|
|
255
262
|
try {
|
|
256
263
|
await this._$ES;
|
|
@@ -268,17 +275,23 @@
|
|
|
268
275
|
if (!this.hasUpdated) {
|
|
269
276
|
if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
|
|
270
277
|
for (const [t, s] of this._$Ep) this[t] = s;
|
|
271
|
-
this._$Ep =
|
|
278
|
+
this._$Ep = void 0;
|
|
272
279
|
}
|
|
273
280
|
const t = this.constructor.elementProperties;
|
|
274
|
-
if (t.size > 0) for (const [s, i] of t)
|
|
281
|
+
if (t.size > 0) for (const [s, i] of t) {
|
|
282
|
+
const {
|
|
283
|
+
wrapped: t
|
|
284
|
+
} = i,
|
|
285
|
+
e = this[s];
|
|
286
|
+
true !== t || this._$AL.has(s) || void 0 === e || this.C(s, void 0, i, e);
|
|
287
|
+
}
|
|
275
288
|
}
|
|
276
289
|
let t = false;
|
|
277
290
|
const s = this._$AL;
|
|
278
291
|
try {
|
|
279
|
-
t = this.shouldUpdate(s), t ? (this.willUpdate(s), this._$EO?.forEach(t => t.hostUpdate?.()), this.update(s)) : this._$
|
|
292
|
+
t = this.shouldUpdate(s), t ? (this.willUpdate(s), this._$EO?.forEach(t => t.hostUpdate?.()), this.update(s)) : this._$EM();
|
|
280
293
|
} catch (s) {
|
|
281
|
-
throw t = false, this._$
|
|
294
|
+
throw t = false, this._$EM(), s;
|
|
282
295
|
}
|
|
283
296
|
t && this._$AE(s);
|
|
284
297
|
}
|
|
@@ -286,7 +299,7 @@
|
|
|
286
299
|
_$AE(t) {
|
|
287
300
|
this._$EO?.forEach(t => t.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = true, this.firstUpdated(t)), this.updated(t);
|
|
288
301
|
}
|
|
289
|
-
_$
|
|
302
|
+
_$EM() {
|
|
290
303
|
this._$AL = new Map(), this.isUpdatePending = false;
|
|
291
304
|
}
|
|
292
305
|
get updateComplete() {
|
|
@@ -299,16 +312,16 @@
|
|
|
299
312
|
return true;
|
|
300
313
|
}
|
|
301
314
|
update(t) {
|
|
302
|
-
this._$
|
|
315
|
+
this._$Eq &&= this._$Eq.forEach(t => this._$ET(t, this[t])), this._$EM();
|
|
303
316
|
}
|
|
304
317
|
updated(t) {}
|
|
305
318
|
firstUpdated(t) {}
|
|
306
319
|
};
|
|
307
|
-
|
|
320
|
+
y$1.elementStyles = [], y$1.shadowRootOptions = {
|
|
308
321
|
mode: "open"
|
|
309
|
-
},
|
|
310
|
-
ReactiveElement:
|
|
311
|
-
}), (a$1.reactiveElementVersions ??= []).push("2.
|
|
322
|
+
}, y$1[d$1("elementProperties")] = new Map(), y$1[d$1("finalized")] = new Map(), p$1?.({
|
|
323
|
+
ReactiveElement: y$1
|
|
324
|
+
}), (a$1.reactiveElementVersions ??= []).push("2.1.1");
|
|
312
325
|
|
|
313
326
|
/**
|
|
314
327
|
* @license
|
|
@@ -317,15 +330,15 @@
|
|
|
317
330
|
*/
|
|
318
331
|
const t = globalThis,
|
|
319
332
|
i$1 = t.trustedTypes,
|
|
320
|
-
s = i$1 ? i$1.createPolicy("lit-html", {
|
|
333
|
+
s$1 = i$1 ? i$1.createPolicy("lit-html", {
|
|
321
334
|
createHTML: t => t
|
|
322
|
-
}) :
|
|
335
|
+
}) : void 0,
|
|
323
336
|
e = "$lit$",
|
|
324
337
|
h = `lit$${Math.random().toFixed(9).slice(2)}$`,
|
|
325
|
-
o$
|
|
326
|
-
n = `<${o$
|
|
327
|
-
r
|
|
328
|
-
l = () => r
|
|
338
|
+
o$2 = "?" + h,
|
|
339
|
+
n = `<${o$2}>`,
|
|
340
|
+
r = document,
|
|
341
|
+
l = () => r.createComment(""),
|
|
329
342
|
c = t => null === t || "object" != typeof t && "function" != typeof t,
|
|
330
343
|
a = Array.isArray,
|
|
331
344
|
u = t => a(t) || "function" == typeof t?.[Symbol.iterator],
|
|
@@ -347,10 +360,10 @@
|
|
|
347
360
|
T = Symbol.for("lit-noChange"),
|
|
348
361
|
E = Symbol.for("lit-nothing"),
|
|
349
362
|
A = new WeakMap(),
|
|
350
|
-
C = r
|
|
363
|
+
C = r.createTreeWalker(r, 129);
|
|
351
364
|
function P(t, i) {
|
|
352
365
|
if (!a(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
353
|
-
return
|
|
366
|
+
return void 0 !== s$1 ? s$1.createHTML(i) : i;
|
|
354
367
|
}
|
|
355
368
|
const V = (t, i) => {
|
|
356
369
|
const s = t.length - 1,
|
|
@@ -364,7 +377,7 @@
|
|
|
364
377
|
u,
|
|
365
378
|
d = -1,
|
|
366
379
|
y = 0;
|
|
367
|
-
for (; y < s.length && (c.lastIndex = y, u = c.exec(s), null !== u);) y = c.lastIndex, c === f ? "!--" === u[1] ? c = v :
|
|
380
|
+
for (; y < s.length && (c.lastIndex = y, u = c.exec(s), null !== u);) y = c.lastIndex, c === f ? "!--" === u[1] ? c = v : void 0 !== u[1] ? c = _ : void 0 !== u[2] ? ($.test(u[2]) && (r = RegExp("</" + u[2], "g")), c = m) : void 0 !== u[3] && (c = m) : c === m ? ">" === u[0] ? (c = r ?? f, d = -1) : void 0 === u[1] ? d = -2 : (d = c.lastIndex - u[2].length, a = u[1], c = void 0 === u[3] ? m : '"' === u[3] ? g : p) : c === g || c === p ? c = m : c === v || c === _ ? c = f : (c = m, r = void 0);
|
|
368
381
|
const x = c === m && t[i + 1].startsWith("/>") ? " " : "";
|
|
369
382
|
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);
|
|
370
383
|
}
|
|
@@ -415,7 +428,7 @@
|
|
|
415
428
|
r.append(t[s], l());
|
|
416
429
|
}
|
|
417
430
|
}
|
|
418
|
-
} else if (8 === r.nodeType) if (r.data === o$
|
|
431
|
+
} else if (8 === r.nodeType) if (r.data === o$2) d.push({
|
|
419
432
|
type: 2,
|
|
420
433
|
index: c
|
|
421
434
|
});else {
|
|
@@ -429,19 +442,19 @@
|
|
|
429
442
|
}
|
|
430
443
|
}
|
|
431
444
|
static createElement(t, i) {
|
|
432
|
-
const s = r
|
|
445
|
+
const s = r.createElement("template");
|
|
433
446
|
return s.innerHTML = t, s;
|
|
434
447
|
}
|
|
435
448
|
}
|
|
436
449
|
function S(t, i, s = t, e) {
|
|
437
450
|
if (i === T) return i;
|
|
438
|
-
let h =
|
|
439
|
-
const o = c(i) ?
|
|
440
|
-
return h?.constructor !== o && (h?._$AO?.(false),
|
|
451
|
+
let h = void 0 !== e ? s._$Co?.[e] : s._$Cl;
|
|
452
|
+
const o = c(i) ? void 0 : i._$litDirective$;
|
|
453
|
+
return h?.constructor !== o && (h?._$AO?.(false), void 0 === o ? h = void 0 : (h = new o(t), h._$AT(t, s, e)), void 0 !== e ? (s._$Co ??= [])[e] = h : s._$Cl = h), void 0 !== h && (i = S(t, h._$AS(t, i.values), h, e)), i;
|
|
441
454
|
}
|
|
442
455
|
class M {
|
|
443
456
|
constructor(t, i) {
|
|
444
|
-
this._$AV = [], this._$AN =
|
|
457
|
+
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = i;
|
|
445
458
|
}
|
|
446
459
|
get parentNode() {
|
|
447
460
|
return this._$AM.parentNode;
|
|
@@ -456,24 +469,24 @@
|
|
|
456
469
|
},
|
|
457
470
|
parts: s
|
|
458
471
|
} = this._$AD,
|
|
459
|
-
e = (t?.creationScope ?? r
|
|
472
|
+
e = (t?.creationScope ?? r).importNode(i, true);
|
|
460
473
|
C.currentNode = e;
|
|
461
474
|
let h = C.nextNode(),
|
|
462
475
|
o = 0,
|
|
463
476
|
n = 0,
|
|
464
477
|
l = s[0];
|
|
465
|
-
for (;
|
|
478
|
+
for (; void 0 !== l;) {
|
|
466
479
|
if (o === l.index) {
|
|
467
480
|
let i;
|
|
468
481
|
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];
|
|
469
482
|
}
|
|
470
483
|
o !== l?.index && (h = C.nextNode(), o++);
|
|
471
484
|
}
|
|
472
|
-
return C.currentNode = r
|
|
485
|
+
return C.currentNode = r, e;
|
|
473
486
|
}
|
|
474
487
|
p(t) {
|
|
475
488
|
let i = 0;
|
|
476
|
-
for (const s of this._$AV)
|
|
489
|
+
for (const s of this._$AV) void 0 !== s && (void 0 !== s.strings ? (s._$AI(t, s, i), i += s.strings.length - 2) : s._$AI(t[i])), i++;
|
|
477
490
|
}
|
|
478
491
|
}
|
|
479
492
|
class R {
|
|
@@ -481,12 +494,12 @@
|
|
|
481
494
|
return this._$AM?._$AU ?? this._$Cv;
|
|
482
495
|
}
|
|
483
496
|
constructor(t, i, s, e) {
|
|
484
|
-
this.type = 2, this._$AH = E, this._$AN =
|
|
497
|
+
this.type = 2, this._$AH = E, this._$AN = void 0, this._$AA = t, this._$AB = i, this._$AM = s, this.options = e, this._$Cv = e?.isConnected ?? true;
|
|
485
498
|
}
|
|
486
499
|
get parentNode() {
|
|
487
500
|
let t = this._$AA.parentNode;
|
|
488
501
|
const i = this._$AM;
|
|
489
|
-
return
|
|
502
|
+
return void 0 !== i && 11 === t?.nodeType && (t = i.parentNode), t;
|
|
490
503
|
}
|
|
491
504
|
get startNode() {
|
|
492
505
|
return this._$AA;
|
|
@@ -495,7 +508,7 @@
|
|
|
495
508
|
return this._$AB;
|
|
496
509
|
}
|
|
497
510
|
_$AI(t, i = this) {
|
|
498
|
-
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) :
|
|
511
|
+
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) : void 0 !== t._$litType$ ? this.$(t) : void 0 !== t.nodeType ? this.T(t) : u(t) ? this.k(t) : this._(t);
|
|
499
512
|
}
|
|
500
513
|
O(t) {
|
|
501
514
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
@@ -504,14 +517,14 @@
|
|
|
504
517
|
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
505
518
|
}
|
|
506
519
|
_(t) {
|
|
507
|
-
this._$AH !== E && c(this._$AH) ? this._$AA.nextSibling.data = t : this.T(r
|
|
520
|
+
this._$AH !== E && c(this._$AH) ? this._$AA.nextSibling.data = t : this.T(r.createTextNode(t)), this._$AH = t;
|
|
508
521
|
}
|
|
509
522
|
$(t) {
|
|
510
523
|
const {
|
|
511
524
|
values: i,
|
|
512
525
|
_$litType$: s
|
|
513
526
|
} = t,
|
|
514
|
-
e = "number" == typeof s ? this._$AC(t) : (
|
|
527
|
+
e = "number" == typeof s ? this._$AC(t) : (void 0 === s.el && (s.el = N.createElement(P(s.h, s.h[0]), this.options)), s);
|
|
515
528
|
if (this._$AH?._$AD === e) this._$AH.p(i);else {
|
|
516
529
|
const t = new M(e, this),
|
|
517
530
|
s = t.u(this.options);
|
|
@@ -520,7 +533,7 @@
|
|
|
520
533
|
}
|
|
521
534
|
_$AC(t) {
|
|
522
535
|
let i = A.get(t.strings);
|
|
523
|
-
return
|
|
536
|
+
return void 0 === i && A.set(t.strings, i = new N(t)), i;
|
|
524
537
|
}
|
|
525
538
|
k(t) {
|
|
526
539
|
a(this._$AH) || (this._$AH = [], this._$AR());
|
|
@@ -531,13 +544,13 @@
|
|
|
531
544
|
e < i.length && (this._$AR(s && s._$AB.nextSibling, e), i.length = e);
|
|
532
545
|
}
|
|
533
546
|
_$AR(t = this._$AA.nextSibling, i) {
|
|
534
|
-
for (this._$AP?.(false, true, i); t
|
|
547
|
+
for (this._$AP?.(false, true, i); t !== this._$AB;) {
|
|
535
548
|
const i = t.nextSibling;
|
|
536
549
|
t.remove(), t = i;
|
|
537
550
|
}
|
|
538
551
|
}
|
|
539
552
|
setConnected(t) {
|
|
540
|
-
|
|
553
|
+
void 0 === this._$AM && (this._$Cv = t, this._$AP?.(t));
|
|
541
554
|
}
|
|
542
555
|
}
|
|
543
556
|
class k {
|
|
@@ -548,12 +561,12 @@
|
|
|
548
561
|
return this._$AM._$AU;
|
|
549
562
|
}
|
|
550
563
|
constructor(t, i, s, e, h) {
|
|
551
|
-
this.type = 1, this._$AH = E, this._$AN =
|
|
564
|
+
this.type = 1, this._$AH = E, this._$AN = void 0, 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;
|
|
552
565
|
}
|
|
553
566
|
_$AI(t, i = this, s, e) {
|
|
554
567
|
const h = this.strings;
|
|
555
568
|
let o = false;
|
|
556
|
-
if (
|
|
569
|
+
if (void 0 === h) t = S(this, t, i, 0), o = !c(t) || t !== this._$AH && t !== T, o && (this._$AH = t);else {
|
|
557
570
|
const e = t;
|
|
558
571
|
let n, r;
|
|
559
572
|
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;
|
|
@@ -569,7 +582,7 @@
|
|
|
569
582
|
super(...arguments), this.type = 3;
|
|
570
583
|
}
|
|
571
584
|
j(t) {
|
|
572
|
-
this.element[this.name] = t === E ?
|
|
585
|
+
this.element[this.name] = t === E ? void 0 : t;
|
|
573
586
|
}
|
|
574
587
|
}
|
|
575
588
|
class I extends k {
|
|
@@ -597,7 +610,7 @@
|
|
|
597
610
|
}
|
|
598
611
|
class z {
|
|
599
612
|
constructor(t, i, s) {
|
|
600
|
-
this.element = t, this.type = 6, this._$AN =
|
|
613
|
+
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = i, this.options = s;
|
|
601
614
|
}
|
|
602
615
|
get _$AU() {
|
|
603
616
|
return this._$AM._$AU;
|
|
@@ -607,13 +620,13 @@
|
|
|
607
620
|
}
|
|
608
621
|
}
|
|
609
622
|
const j = t.litHtmlPolyfillSupport;
|
|
610
|
-
j?.(N, R), (t.litHtmlVersions ??= []).push("3.
|
|
623
|
+
j?.(N, R), (t.litHtmlVersions ??= []).push("3.3.1");
|
|
611
624
|
const B = (t, i, s) => {
|
|
612
625
|
const e = s?.renderBefore ?? i;
|
|
613
626
|
let h = e._$litPart$;
|
|
614
|
-
if (
|
|
627
|
+
if (void 0 === h) {
|
|
615
628
|
const t = s?.renderBefore ?? null;
|
|
616
|
-
e._$litPart$ = h = new R(i.insertBefore(l(), t), t,
|
|
629
|
+
e._$litPart$ = h = new R(i.insertBefore(l(), t), t, void 0, s ?? {});
|
|
617
630
|
}
|
|
618
631
|
return h._$AI(t), h;
|
|
619
632
|
};
|
|
@@ -623,19 +636,20 @@
|
|
|
623
636
|
* Copyright 2017 Google LLC
|
|
624
637
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
625
638
|
*/
|
|
626
|
-
|
|
639
|
+
const s = globalThis;
|
|
640
|
+
class i extends y$1 {
|
|
627
641
|
constructor() {
|
|
628
642
|
super(...arguments), this.renderOptions = {
|
|
629
643
|
host: this
|
|
630
|
-
}, this._$Do =
|
|
644
|
+
}, this._$Do = void 0;
|
|
631
645
|
}
|
|
632
646
|
createRenderRoot() {
|
|
633
647
|
const t = super.createRenderRoot();
|
|
634
648
|
return this.renderOptions.renderBefore ??= t.firstChild, t;
|
|
635
649
|
}
|
|
636
650
|
update(t) {
|
|
637
|
-
const
|
|
638
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = B(
|
|
651
|
+
const r = this.render();
|
|
652
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = B(r, this.renderRoot, this.renderOptions);
|
|
639
653
|
}
|
|
640
654
|
connectedCallback() {
|
|
641
655
|
super.connectedCallback(), this._$Do?.setConnected(true);
|
|
@@ -647,14 +661,14 @@
|
|
|
647
661
|
return T;
|
|
648
662
|
}
|
|
649
663
|
}
|
|
650
|
-
|
|
651
|
-
LitElement:
|
|
664
|
+
i._$litElement$ = true, i["finalized"] = true, s.litElementHydrateSupport?.({
|
|
665
|
+
LitElement: i
|
|
652
666
|
});
|
|
653
|
-
const
|
|
654
|
-
|
|
655
|
-
LitElement:
|
|
667
|
+
const o$1 = s.litElementPolyfillSupport;
|
|
668
|
+
o$1?.({
|
|
669
|
+
LitElement: i
|
|
656
670
|
});
|
|
657
|
-
(
|
|
671
|
+
(s.litElementVersions ??= []).push("4.2.1");
|
|
658
672
|
|
|
659
673
|
var noop = {
|
|
660
674
|
value: () => {}
|
|
@@ -3074,7 +3088,7 @@
|
|
|
3074
3088
|
DecidablesElement Base Class - Not intended for instantiation!
|
|
3075
3089
|
<decidables-element>
|
|
3076
3090
|
*/
|
|
3077
|
-
class DecidablesElement extends
|
|
3091
|
+
class DecidablesElement extends i {
|
|
3078
3092
|
getComputedStyleValue(property) {
|
|
3079
3093
|
return getComputedStyle(this).getPropertyValue(property).trim();
|
|
3080
3094
|
}
|
|
@@ -3329,22 +3343,22 @@
|
|
|
3329
3343
|
static get styles() {
|
|
3330
3344
|
return i$3`
|
|
3331
3345
|
:host {
|
|
3332
|
-
---shadow-0: var(--shadow-0, ${r$
|
|
3333
|
-
---shadow-2: var(--shadow-2, ${r$
|
|
3334
|
-
---shadow-4: var(--shadow-4, ${r$
|
|
3335
|
-
---shadow-8: var(--shadow-8, ${r$
|
|
3336
|
-
|
|
3337
|
-
---color-background: var(--color-background, ${r$
|
|
3338
|
-
---color-border: var(--color-border, ${r$
|
|
3339
|
-
---color-text: var(--color-text, ${r$
|
|
3340
|
-
---color-text-inverse: var(--color-text-inverse, ${r$
|
|
3341
|
-
---color-link: var(--color-link, ${r$
|
|
3342
|
-
---color-element-background: var(--color-element-background, ${r$
|
|
3343
|
-
---color-element-disabled: var(--color-element-disabled, ${r$
|
|
3344
|
-
---color-element-enabled: var(--color-element-enabled, ${r$
|
|
3345
|
-
---color-element-selected: var(--color-element-selected, ${r$
|
|
3346
|
-
---color-element-border: var(--color-element-border, ${r$
|
|
3347
|
-
---color-element-emphasis: var(--color-element-emphasis, ${r$
|
|
3346
|
+
---shadow-0: var(--shadow-0, ${r$2(this.cssBoxShadow(0))});
|
|
3347
|
+
---shadow-2: var(--shadow-2, ${r$2(this.cssBoxShadow(2))});
|
|
3348
|
+
---shadow-4: var(--shadow-4, ${r$2(this.cssBoxShadow(4))});
|
|
3349
|
+
---shadow-8: var(--shadow-8, ${r$2(this.cssBoxShadow(8))});
|
|
3350
|
+
|
|
3351
|
+
---color-background: var(--color-background, ${r$2(this.greys.white)});
|
|
3352
|
+
---color-border: var(--color-border, ${r$2(this.greys.light75)});
|
|
3353
|
+
---color-text: var(--color-text, ${r$2(this.greys.dark75)});
|
|
3354
|
+
---color-text-inverse: var(--color-text-inverse, ${r$2(this.greys.white)});
|
|
3355
|
+
---color-link: var(--color-link, ${r$2(this.greys.dark25)});
|
|
3356
|
+
---color-element-background: var(--color-element-background, ${r$2(this.greys.light75)});
|
|
3357
|
+
---color-element-disabled: var(--color-element-disabled, ${r$2(this.greys.light50)});
|
|
3358
|
+
---color-element-enabled: var(--color-element-enabled, ${r$2(this.greys.dark25)});
|
|
3359
|
+
---color-element-selected: var(--color-element-selected, ${r$2(this.greys.grey)});
|
|
3360
|
+
---color-element-border: var(--color-element-border, ${r$2(this.greys.dark50)});
|
|
3361
|
+
---color-element-emphasis: var(--color-element-emphasis, ${r$2(this.greys.dark75)});
|
|
3348
3362
|
|
|
3349
3363
|
---font-family-base: var(--font-family-base, "Source Sans", sans-serif);
|
|
3350
3364
|
---font-family-math: var(--font-family-math, "Source Serif", serif);
|
|
@@ -3354,6 +3368,7 @@
|
|
|
3354
3368
|
---transition-duration: var(--transition-duration, 500ms);
|
|
3355
3369
|
|
|
3356
3370
|
font-family: var(---font-family-base);
|
|
3371
|
+
font-weight: normal;
|
|
3357
3372
|
}
|
|
3358
3373
|
|
|
3359
3374
|
:host,
|
|
@@ -3407,6 +3422,9 @@
|
|
|
3407
3422
|
static get styles() {
|
|
3408
3423
|
return [super.styles, i$3`
|
|
3409
3424
|
:host {
|
|
3425
|
+
---decidables-button-background-color-disabled: var(--decidables-button-background-color, var(---color-element-disabled));
|
|
3426
|
+
---decidables-button-background-color-enabled: var(--decidables-button-background-color, var(---color-element-enabled));
|
|
3427
|
+
|
|
3410
3428
|
margin: 0.25rem;
|
|
3411
3429
|
}
|
|
3412
3430
|
|
|
@@ -3426,7 +3444,7 @@
|
|
|
3426
3444
|
}
|
|
3427
3445
|
|
|
3428
3446
|
button:disabled {
|
|
3429
|
-
background-color: var(
|
|
3447
|
+
background-color: var(---decidables-button-background-color-disabled);
|
|
3430
3448
|
outline: none;
|
|
3431
3449
|
box-shadow: none;
|
|
3432
3450
|
}
|
|
@@ -3434,7 +3452,7 @@
|
|
|
3434
3452
|
button:enabled {
|
|
3435
3453
|
cursor: pointer;
|
|
3436
3454
|
|
|
3437
|
-
background-color: var(
|
|
3455
|
+
background-color: var(---decidables-button-background-color-enabled);
|
|
3438
3456
|
outline: none;
|
|
3439
3457
|
box-shadow: var(---shadow-2);
|
|
3440
3458
|
}
|
|
@@ -3485,6 +3503,11 @@
|
|
|
3485
3503
|
type: Boolean,
|
|
3486
3504
|
reflect: true
|
|
3487
3505
|
},
|
|
3506
|
+
scale: {
|
|
3507
|
+
attribute: 'scale',
|
|
3508
|
+
type: Boolean,
|
|
3509
|
+
reflect: true
|
|
3510
|
+
},
|
|
3488
3511
|
max: {
|
|
3489
3512
|
attribute: 'max',
|
|
3490
3513
|
type: Number,
|
|
@@ -3504,6 +3527,11 @@
|
|
|
3504
3527
|
attribute: 'value',
|
|
3505
3528
|
type: Number,
|
|
3506
3529
|
reflect: true
|
|
3530
|
+
},
|
|
3531
|
+
nonlinear: {
|
|
3532
|
+
attribute: false,
|
|
3533
|
+
type: Boolean,
|
|
3534
|
+
reflect: false
|
|
3507
3535
|
}
|
|
3508
3536
|
};
|
|
3509
3537
|
}
|
|
@@ -3512,13 +3540,30 @@
|
|
|
3512
3540
|
|
|
3513
3541
|
// Attributes
|
|
3514
3542
|
this.disabled = false;
|
|
3543
|
+
this.scale = false;
|
|
3515
3544
|
this.max = undefined;
|
|
3516
3545
|
this.min = undefined;
|
|
3517
3546
|
this.step = undefined;
|
|
3518
3547
|
this.value = undefined;
|
|
3548
|
+
this.nonlinear = false;
|
|
3549
|
+
|
|
3550
|
+
// Properties
|
|
3551
|
+
this.rangeMax = undefined;
|
|
3552
|
+
this.rangeMin = undefined;
|
|
3553
|
+
this.rangeStep = undefined;
|
|
3554
|
+
this.rangeValue = undefined;
|
|
3555
|
+
|
|
3556
|
+
// Transform
|
|
3557
|
+
this.toRange = undefined;
|
|
3558
|
+
this.fromRange = undefined;
|
|
3519
3559
|
}
|
|
3520
|
-
|
|
3521
|
-
this.
|
|
3560
|
+
nonlinearRange(nonlinear, toRange, fromRange) {
|
|
3561
|
+
this.nonlinear = nonlinear;
|
|
3562
|
+
this.toRange = nonlinear ? toRange : undefined;
|
|
3563
|
+
this.fromRange = nonlinear ? fromRange : undefined;
|
|
3564
|
+
}
|
|
3565
|
+
rangeChanged(event) {
|
|
3566
|
+
this.value = this.nonlinear ? this.fromRange(event.target.value) : event.target.value;
|
|
3522
3567
|
this.dispatchEvent(new CustomEvent('change', {
|
|
3523
3568
|
detail: {
|
|
3524
3569
|
value: this.value
|
|
@@ -3526,15 +3571,28 @@
|
|
|
3526
3571
|
bubbles: true
|
|
3527
3572
|
}));
|
|
3528
3573
|
}
|
|
3529
|
-
|
|
3574
|
+
rangeInputted(event) {
|
|
3575
|
+
this.value = this.nonlinear ? this.fromRange(event.target.value) : event.target.value;
|
|
3576
|
+
}
|
|
3577
|
+
spinnerInputted(event) {
|
|
3530
3578
|
this.value = event.target.value;
|
|
3531
3579
|
}
|
|
3580
|
+
willUpdate() {
|
|
3581
|
+
this.rangeMax = this.max === undefined ? undefined : this.nonlinear ? this.toRange(this.max) : this.max;
|
|
3582
|
+
this.rangeMin = this.min === undefined ? undefined : this.nonlinear ? this.toRange(this.min) : this.min;
|
|
3583
|
+
this.rangeStep = this.step === undefined ? undefined : this.nonlinear ? 'any' : this.step;
|
|
3584
|
+
this.rangeValue = this.value === undefined ? undefined : this.nonlinear ? this.toRange(this.value) : this.value;
|
|
3585
|
+
}
|
|
3532
3586
|
static get styles() {
|
|
3533
3587
|
return [super.styles, i$3`
|
|
3534
3588
|
:host {
|
|
3535
|
-
---
|
|
3536
|
-
---
|
|
3537
|
-
---
|
|
3589
|
+
---decidables-slider-background-color: var(--decidables-slider-background-color, var(---color-element-disabled));
|
|
3590
|
+
---decidables-slider-color: var(--decidables-slider-color, var(---color-element-enabled));
|
|
3591
|
+
---decidables-spinner-background-color: var(--decidables-slider-background-color, none);
|
|
3592
|
+
|
|
3593
|
+
---shadow-2-rotate: var(--shadow-2-rotate, ${r$2(this.cssBoxShadow(2, true, false))});
|
|
3594
|
+
---shadow-4-rotate: var(--shadow-4-rotate, ${r$2(this.cssBoxShadow(4, true, false))});
|
|
3595
|
+
---shadow-8-rotate: var(--shadow-8-rotate, ${r$2(this.cssBoxShadow(8, true, false))});
|
|
3538
3596
|
|
|
3539
3597
|
display: flex;
|
|
3540
3598
|
|
|
@@ -3549,7 +3607,10 @@
|
|
|
3549
3607
|
}
|
|
3550
3608
|
|
|
3551
3609
|
.range {
|
|
3552
|
-
|
|
3610
|
+
position: relative;
|
|
3611
|
+
display: flex;
|
|
3612
|
+
|
|
3613
|
+
flex-direction: row;
|
|
3553
3614
|
|
|
3554
3615
|
width: 3.5rem;
|
|
3555
3616
|
height: 4.75rem;
|
|
@@ -3560,6 +3621,8 @@
|
|
|
3560
3621
|
--decidables-spinner-input-width: 3.5rem;
|
|
3561
3622
|
|
|
3562
3623
|
margin: 0 0.25rem 0.25rem;
|
|
3624
|
+
|
|
3625
|
+
background: var(---decidables-spinner-background-color);
|
|
3563
3626
|
}
|
|
3564
3627
|
|
|
3565
3628
|
/* Adapted from http://danielstern.ca/range.css/#/ */
|
|
@@ -3598,14 +3661,14 @@
|
|
|
3598
3661
|
width: 100%;
|
|
3599
3662
|
height: 4px;
|
|
3600
3663
|
|
|
3601
|
-
background: var(---
|
|
3664
|
+
background: var(---decidables-slider-background-color);
|
|
3602
3665
|
border: 0;
|
|
3603
3666
|
border-radius: 2px;
|
|
3604
3667
|
box-shadow: none;
|
|
3605
3668
|
}
|
|
3606
3669
|
|
|
3607
3670
|
input[type=range]:focus::-webkit-slider-runnable-track {
|
|
3608
|
-
background: var(---
|
|
3671
|
+
background: var(---decidables-slider-background-color);
|
|
3609
3672
|
}
|
|
3610
3673
|
|
|
3611
3674
|
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
@@ -3613,7 +3676,7 @@
|
|
|
3613
3676
|
width: 100%;
|
|
3614
3677
|
height: 4px;
|
|
3615
3678
|
|
|
3616
|
-
background: var(---
|
|
3679
|
+
background: var(---decidables-slider-background-color);
|
|
3617
3680
|
border: 0;
|
|
3618
3681
|
border-radius: 2px;
|
|
3619
3682
|
box-shadow: none;
|
|
@@ -3633,7 +3696,7 @@
|
|
|
3633
3696
|
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
3634
3697
|
input[type=range]::-ms-fill-lower {
|
|
3635
3698
|
background: #cccccc;
|
|
3636
|
-
/* background: var(---
|
|
3699
|
+
/* background: var(---decidables-slider-background-color); */
|
|
3637
3700
|
border: 0;
|
|
3638
3701
|
border-radius: 2px;
|
|
3639
3702
|
box-shadow: none;
|
|
@@ -3642,7 +3705,7 @@
|
|
|
3642
3705
|
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
3643
3706
|
input[type=range]::-ms-fill-upper {
|
|
3644
3707
|
background: #cccccc;
|
|
3645
|
-
/* background: var(---
|
|
3708
|
+
/* background: var(---decidables-slider-background-color); */
|
|
3646
3709
|
border: 0;
|
|
3647
3710
|
border-radius: 2px;
|
|
3648
3711
|
box-shadow: none;
|
|
@@ -3650,12 +3713,12 @@
|
|
|
3650
3713
|
|
|
3651
3714
|
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
3652
3715
|
input[type=range]:focus::-ms-fill-lower {
|
|
3653
|
-
background: var(---
|
|
3716
|
+
background: var(---decidables-slider-background-color);
|
|
3654
3717
|
}
|
|
3655
3718
|
|
|
3656
3719
|
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
3657
3720
|
input[type=range]:focus::-ms-fill-upper {
|
|
3658
|
-
background: var(---
|
|
3721
|
+
background: var(---decidables-slider-background-color);
|
|
3659
3722
|
}
|
|
3660
3723
|
|
|
3661
3724
|
/* Thumb */
|
|
@@ -3673,12 +3736,12 @@
|
|
|
3673
3736
|
}
|
|
3674
3737
|
|
|
3675
3738
|
input[type=range]:disabled::-webkit-slider-thumb {
|
|
3676
|
-
background: var(---
|
|
3739
|
+
background: var(---decidables-slider-background-color);
|
|
3677
3740
|
box-shadow: none;
|
|
3678
3741
|
}
|
|
3679
3742
|
|
|
3680
3743
|
input[type=range]:enabled::-webkit-slider-thumb {
|
|
3681
|
-
background: var(---
|
|
3744
|
+
background: var(---decidables-slider-color);
|
|
3682
3745
|
box-shadow: var(---shadow-2-rotate);
|
|
3683
3746
|
}
|
|
3684
3747
|
|
|
@@ -3709,13 +3772,13 @@
|
|
|
3709
3772
|
|
|
3710
3773
|
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
3711
3774
|
input[type=range]:disabled::-moz-range-thumb {
|
|
3712
|
-
background: var(---
|
|
3775
|
+
background: var(---decidables-slider-background-color);
|
|
3713
3776
|
box-shadow: none;
|
|
3714
3777
|
}
|
|
3715
3778
|
|
|
3716
3779
|
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
3717
3780
|
input[type=range]:enabled::-moz-range-thumb {
|
|
3718
|
-
background: var(---
|
|
3781
|
+
background: var(---decidables-slider-color);
|
|
3719
3782
|
box-shadow: var(---shadow-2-rotate);
|
|
3720
3783
|
}
|
|
3721
3784
|
|
|
@@ -3752,13 +3815,13 @@
|
|
|
3752
3815
|
|
|
3753
3816
|
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
3754
3817
|
input[type=range]:disabled::-ms-thumb {
|
|
3755
|
-
background: var(---
|
|
3818
|
+
background: var(---decidables-slider-background-color);
|
|
3756
3819
|
box-shadow: none;
|
|
3757
3820
|
}
|
|
3758
3821
|
|
|
3759
3822
|
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
|
|
3760
3823
|
input[type=range]:enabled::-ms-thumb {
|
|
3761
|
-
background: var(---
|
|
3824
|
+
background: var(---decidables-slider-color);
|
|
3762
3825
|
box-shadow: var(---shadow-2-rotate);
|
|
3763
3826
|
}
|
|
3764
3827
|
|
|
@@ -3780,6 +3843,33 @@
|
|
|
3780
3843
|
:host(.keyboard) input[type=range]:enabled:focus:active::-ms-thumb {
|
|
3781
3844
|
box-shadow: var(---shadow-8-rotate);
|
|
3782
3845
|
}
|
|
3846
|
+
|
|
3847
|
+
datalist {
|
|
3848
|
+
position: absolute;
|
|
3849
|
+
left: 2rem;
|
|
3850
|
+
z-index: -1;
|
|
3851
|
+
display: flex;
|
|
3852
|
+
|
|
3853
|
+
flex-direction: column;
|
|
3854
|
+
|
|
3855
|
+
align-items: flex-start;
|
|
3856
|
+
justify-content: space-between;
|
|
3857
|
+
|
|
3858
|
+
height: 4.75rem;
|
|
3859
|
+
|
|
3860
|
+
font-size: 0.75rem;
|
|
3861
|
+
}
|
|
3862
|
+
|
|
3863
|
+
option {
|
|
3864
|
+
padding: 0;
|
|
3865
|
+
|
|
3866
|
+
line-height: 0.8;
|
|
3867
|
+
min-block-size: 0;
|
|
3868
|
+
}
|
|
3869
|
+
|
|
3870
|
+
option::before {
|
|
3871
|
+
content: "– ";
|
|
3872
|
+
}
|
|
3783
3873
|
`];
|
|
3784
3874
|
}
|
|
3785
3875
|
render() {
|
|
@@ -3788,9 +3878,15 @@
|
|
|
3788
3878
|
<slot></slot>
|
|
3789
3879
|
</label>
|
|
3790
3880
|
<div class="range">
|
|
3791
|
-
<input ?disabled=${this.disabled} type="range" id="slider" min=${o(this.
|
|
3881
|
+
<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)}>
|
|
3882
|
+
${this.scale ? x`
|
|
3883
|
+
<datalist id="ticks">
|
|
3884
|
+
<option value=${o(this.rangeMax)} label=${o(this.max)}></option>
|
|
3885
|
+
<option value=${o(this.rangeMin)} label=${o(this.min)}></option>
|
|
3886
|
+
</datalist>
|
|
3887
|
+
` : x``}
|
|
3792
3888
|
</div>
|
|
3793
|
-
<decidables-spinner ?disabled=${this.disabled} min=${o(this.min)} max=${o(this.max)} step=${o(this.step)} .value=${this.value} @input=${this.
|
|
3889
|
+
<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>
|
|
3794
3890
|
`;
|
|
3795
3891
|
}
|
|
3796
3892
|
}
|
|
@@ -3999,7 +4095,6 @@
|
|
|
3999
4095
|
padding: 0;
|
|
4000
4096
|
margin: -1px;
|
|
4001
4097
|
overflow: hidden;
|
|
4002
|
-
clip: rect(0 0 0 0);
|
|
4003
4098
|
|
|
4004
4099
|
white-space: nowrap;
|
|
4005
4100
|
|
|
@@ -4221,7 +4316,6 @@
|
|
|
4221
4316
|
padding: 0;
|
|
4222
4317
|
margin: -1px;
|
|
4223
4318
|
overflow: hidden;
|
|
4224
|
-
clip: rect(0 0 0 0);
|
|
4225
4319
|
|
|
4226
4320
|
white-space: nowrap;
|
|
4227
4321
|
|