@rcarls/rc-slider 0.3.2 → 0.4.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 +47 -0
- package/dist/custom-elements.json +25 -20
- package/dist/{rc-slider-CPApkY9I.js → rc-slider-CRGEKO0W.js} +11 -11
- package/dist/rc-slider-CRGEKO0W.js.map +1 -0
- package/dist/rc-slider-define.js +1 -1
- package/dist/rc-slider.js +1 -1
- package/dist/types/packages/rc-slider/src/rc-slider.d.ts +15 -1
- package/package.json +3 -3
- package/dist/rc-slider-CPApkY9I.js.map +0 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# @rcarls/rc-slider
|
|
2
|
+
|
|
3
|
+
## 0.4.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- @rcarls/rc-common@0.4.1
|
|
8
|
+
|
|
9
|
+
## 0.4.0
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- f45b5ec: Document all `rc-slider` attributes and the `--rc-slider-vertical-size` CSS
|
|
14
|
+
custom property in the generated API reference.
|
|
15
|
+
- Updated dependencies [e57277f]
|
|
16
|
+
- Updated dependencies [ccca8e2]
|
|
17
|
+
- Updated dependencies [037b1b3]
|
|
18
|
+
- @rcarls/rc-common@0.4.0
|
|
19
|
+
|
|
20
|
+
## 0.3.2
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- Updated dependencies [88b4086]
|
|
25
|
+
- @rcarls/rc-common@0.3.2
|
|
26
|
+
|
|
27
|
+
## 0.3.1
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- @rcarls/rc-common@0.3.1
|
|
32
|
+
|
|
33
|
+
## 0.3.0
|
|
34
|
+
|
|
35
|
+
### Changed
|
|
36
|
+
|
|
37
|
+
- Update package metadata, README intro, and docs links.
|
|
38
|
+
|
|
39
|
+
### Dependencies
|
|
40
|
+
|
|
41
|
+
- Sync internal dependencies to 0.3.0.
|
|
42
|
+
|
|
43
|
+
## 0.2.0
|
|
44
|
+
|
|
45
|
+
### Patch Changes
|
|
46
|
+
|
|
47
|
+
- @rcarls/rc-common@0.2.0
|
|
@@ -64,6 +64,11 @@
|
|
|
64
64
|
"name": "--rc-slider-control-size",
|
|
65
65
|
"default": "var(--rc-control-block-size)"
|
|
66
66
|
},
|
|
67
|
+
{
|
|
68
|
+
"description": "Track length when `orientation=\"vertical\"`.",
|
|
69
|
+
"name": "--rc-slider-vertical-size",
|
|
70
|
+
"default": "12.5rem"
|
|
71
|
+
},
|
|
67
72
|
{
|
|
68
73
|
"description": "Visual track thickness.",
|
|
69
74
|
"name": "--rc-slider-track-size",
|
|
@@ -267,7 +272,7 @@
|
|
|
267
272
|
},
|
|
268
273
|
{
|
|
269
274
|
"kind": "field",
|
|
270
|
-
"name": "
|
|
275
|
+
"name": "_$nativeInput",
|
|
271
276
|
"type": {
|
|
272
277
|
"text": "HTMLInputElement | null"
|
|
273
278
|
},
|
|
@@ -279,7 +284,7 @@
|
|
|
279
284
|
"name": "_nativeInputController",
|
|
280
285
|
"privacy": "private",
|
|
281
286
|
"readonly": true,
|
|
282
|
-
"default": "new NativeChildController<HTMLInputElement>(this, { selector: ':scope > input[type=\"range\"]', observe: true, onChange: (input, previous) => this._setupInput(input, previous), onMissing: () => { if (import.meta.env.DEV) { warnMissingDirectChild(this, { selector: ':scope > input[type=\"range\"]', message: '[rc-slider] Requires a child <input type=\"range\"> element.', }); } }, })"
|
|
287
|
+
"default": "new NativeChildController<HTMLInputElement>(this, { selector: ':scope > input[type=\"range\"]', observe: true, onChange: ($input, $previous) => this._setupInput($input, $previous), onMissing: () => { if (import.meta.env.DEV) { warnMissingDirectChild(this, { selector: ':scope > input[type=\"range\"]', message: '[rc-slider] Requires a child <input type=\"range\"> element.', }); } }, })"
|
|
283
288
|
},
|
|
284
289
|
{
|
|
285
290
|
"kind": "field",
|
|
@@ -310,13 +315,13 @@
|
|
|
310
315
|
},
|
|
311
316
|
"parameters": [
|
|
312
317
|
{
|
|
313
|
-
"name": "input",
|
|
318
|
+
"name": "$input",
|
|
314
319
|
"type": {
|
|
315
320
|
"text": "HTMLInputElement | null"
|
|
316
321
|
}
|
|
317
322
|
},
|
|
318
323
|
{
|
|
319
|
-
"name": "previous",
|
|
324
|
+
"name": "$previous",
|
|
320
325
|
"optional": true,
|
|
321
326
|
"type": {
|
|
322
327
|
"text": "HTMLInputElement | null"
|
|
@@ -340,7 +345,7 @@
|
|
|
340
345
|
},
|
|
341
346
|
"parameters": [
|
|
342
347
|
{
|
|
343
|
-
"name": "input",
|
|
348
|
+
"name": "$input",
|
|
344
349
|
"type": {
|
|
345
350
|
"text": "HTMLInputElement"
|
|
346
351
|
}
|
|
@@ -376,7 +381,7 @@
|
|
|
376
381
|
},
|
|
377
382
|
"parameters": [
|
|
378
383
|
{
|
|
379
|
-
"name": "input",
|
|
384
|
+
"name": "$input",
|
|
380
385
|
"type": {
|
|
381
386
|
"text": "HTMLInputElement"
|
|
382
387
|
}
|
|
@@ -394,8 +399,8 @@
|
|
|
394
399
|
},
|
|
395
400
|
"parameters": [
|
|
396
401
|
{
|
|
397
|
-
"name": "input",
|
|
398
|
-
"default": "this.
|
|
402
|
+
"name": "$input",
|
|
403
|
+
"default": "this._$nativeInput"
|
|
399
404
|
}
|
|
400
405
|
]
|
|
401
406
|
},
|
|
@@ -410,7 +415,7 @@
|
|
|
410
415
|
},
|
|
411
416
|
"parameters": [
|
|
412
417
|
{
|
|
413
|
-
"name": "input",
|
|
418
|
+
"name": "$input",
|
|
414
419
|
"type": {
|
|
415
420
|
"text": "HTMLInputElement"
|
|
416
421
|
}
|
|
@@ -470,7 +475,7 @@
|
|
|
470
475
|
},
|
|
471
476
|
"parameters": [
|
|
472
477
|
{
|
|
473
|
-
"name": "input",
|
|
478
|
+
"name": "$input",
|
|
474
479
|
"type": {
|
|
475
480
|
"text": "HTMLInputElement"
|
|
476
481
|
}
|
|
@@ -516,91 +521,91 @@
|
|
|
516
521
|
],
|
|
517
522
|
"attributes": [
|
|
518
523
|
{
|
|
524
|
+
"description": "Minimum slider value.",
|
|
519
525
|
"name": "min",
|
|
520
526
|
"type": {
|
|
521
527
|
"text": "number"
|
|
522
528
|
},
|
|
523
529
|
"default": "0",
|
|
524
|
-
"description": "Minimum slider value.",
|
|
525
530
|
"fieldName": "min"
|
|
526
531
|
},
|
|
527
532
|
{
|
|
533
|
+
"description": "Maximum slider value.",
|
|
528
534
|
"name": "max",
|
|
529
535
|
"type": {
|
|
530
536
|
"text": "number"
|
|
531
537
|
},
|
|
532
538
|
"default": "100",
|
|
533
|
-
"description": "Maximum slider value.",
|
|
534
539
|
"fieldName": "max"
|
|
535
540
|
},
|
|
536
541
|
{
|
|
542
|
+
"description": "Slider step.",
|
|
537
543
|
"name": "step",
|
|
538
544
|
"type": {
|
|
539
545
|
"text": "number"
|
|
540
546
|
},
|
|
541
547
|
"default": "1",
|
|
542
|
-
"description": "Slider step.",
|
|
543
548
|
"fieldName": "step"
|
|
544
549
|
},
|
|
545
550
|
{
|
|
551
|
+
"description": "Current slider value.",
|
|
546
552
|
"name": "value",
|
|
547
553
|
"type": {
|
|
548
554
|
"text": "number"
|
|
549
555
|
},
|
|
550
|
-
"description": "Current slider value.",
|
|
551
556
|
"fieldName": "value"
|
|
552
557
|
},
|
|
553
558
|
{
|
|
559
|
+
"description": "Initial uncontrolled slider value. Has no effect after the first user interaction or `value` write.",
|
|
554
560
|
"name": "default-value",
|
|
555
561
|
"type": {
|
|
556
562
|
"text": "number | undefined"
|
|
557
563
|
},
|
|
558
|
-
"description": "Initial uncontrolled slider value. Has no effect after the first user interaction or `value` write.",
|
|
559
564
|
"fieldName": "defaultValue"
|
|
560
565
|
},
|
|
561
566
|
{
|
|
567
|
+
"description": "Disable the underlying input.",
|
|
562
568
|
"name": "disabled",
|
|
563
569
|
"type": {
|
|
564
570
|
"text": "boolean"
|
|
565
571
|
},
|
|
566
572
|
"default": "false",
|
|
567
|
-
"description": "Disable the underlying input.",
|
|
568
573
|
"fieldName": "disabled"
|
|
569
574
|
},
|
|
570
575
|
{
|
|
576
|
+
"description": "Prevents edits while preserving normal display. Not a native range attribute.",
|
|
571
577
|
"name": "readonly",
|
|
572
578
|
"type": {
|
|
573
579
|
"text": "boolean"
|
|
574
580
|
},
|
|
575
581
|
"default": "false",
|
|
576
|
-
"description": "Prevents edits while preserving normal display. Not a native range attribute.",
|
|
577
582
|
"fieldName": "readonly"
|
|
578
583
|
},
|
|
579
584
|
{
|
|
585
|
+
"description": "Controls the live value display.\n\n- Absent (default) — no value shown.\n- `display` or `display=\"float\"` — floats above the thumb.\n- `display=\"inline-start\"` — rendered before the track, inline in the grid.\n- `display=\"inline-end\"` — rendered after the track, inline in the grid.",
|
|
580
586
|
"name": "display",
|
|
581
587
|
"type": {
|
|
582
588
|
"text": "DisplayValue"
|
|
583
589
|
},
|
|
584
590
|
"default": "null",
|
|
585
|
-
"description": "Controls the live value display.\n\n- Absent (default) — no value shown.\n- `display` or `display=\"float\"` — floats above the thumb.\n- `display=\"inline-start\"` — rendered before the track, inline in the grid.\n- `display=\"inline-end\"` — rendered after the track, inline in the grid.",
|
|
586
591
|
"fieldName": "display"
|
|
587
592
|
},
|
|
588
593
|
{
|
|
594
|
+
"description": "Screen-reader value text. When set, forwarded as `aria-valuetext` on the native input.",
|
|
589
595
|
"name": "value-text",
|
|
590
596
|
"type": {
|
|
591
597
|
"text": "string"
|
|
592
598
|
},
|
|
593
599
|
"default": "\"\"",
|
|
594
|
-
"description": "Screen-reader value text. When set, forwarded as `aria-valuetext` on the native input.",
|
|
595
600
|
"fieldName": "valueText"
|
|
596
601
|
},
|
|
597
602
|
{
|
|
603
|
+
"description": "Orientation; reflected as an attribute and forwarded to `aria-orientation`.",
|
|
598
604
|
"name": "orientation",
|
|
599
605
|
"type": {
|
|
600
606
|
"text": "\"horizontal\" | \"vertical\""
|
|
601
607
|
},
|
|
602
608
|
"default": "\"horizontal\"",
|
|
603
|
-
"description": "Orientation; reflected as an attribute and forwarded to `aria-orientation`.",
|
|
604
609
|
"fieldName": "orientation"
|
|
605
610
|
}
|
|
606
611
|
],
|
|
@@ -22,7 +22,7 @@ function d(r, t) {
|
|
|
22
22
|
}
|
|
23
23
|
const p = class p extends f {
|
|
24
24
|
constructor() {
|
|
25
|
-
super(...arguments), this.min = 0, this.max = 100, this.step = 1, this._valueInitialized = !1, this.disabled = !1, this.readonly = !1, this.display = null, this.valueText = "", this.orientation = "horizontal", this.
|
|
25
|
+
super(...arguments), this.min = 0, this.max = 100, this.step = 1, this._valueInitialized = !1, this.disabled = !1, this.readonly = !1, this.display = null, this.valueText = "", this.orientation = "horizontal", this._$nativeInput = null, this._nativeInputController = new b(this, {
|
|
26
26
|
selector: ':scope > input[type="range"]',
|
|
27
27
|
observe: !0,
|
|
28
28
|
onChange: (t, e) => this._setupInput(t, e),
|
|
@@ -65,11 +65,11 @@ const p = class p extends f {
|
|
|
65
65
|
this._unwireInput(), super.disconnectedCallback();
|
|
66
66
|
}
|
|
67
67
|
updated() {
|
|
68
|
-
const t = this.
|
|
68
|
+
const t = this._$nativeInput;
|
|
69
69
|
t && (t.disabled = this.disabled, this._syncAriaAttributes(t));
|
|
70
70
|
}
|
|
71
71
|
render() {
|
|
72
|
-
if (!this.
|
|
72
|
+
if (!this._$nativeInput) return o;
|
|
73
73
|
const e = h`
|
|
74
74
|
<span
|
|
75
75
|
part="value-display"
|
|
@@ -116,15 +116,15 @@ const p = class p extends f {
|
|
|
116
116
|
return this.valueText || String(this.value);
|
|
117
117
|
}
|
|
118
118
|
get _nativeInputValue() {
|
|
119
|
-
const t = this.
|
|
119
|
+
const t = this._$nativeInput?.valueAsNumber;
|
|
120
120
|
return t === void 0 || isNaN(t) ? 0 : t;
|
|
121
121
|
}
|
|
122
122
|
_setupInput(t, e) {
|
|
123
123
|
if (e && e !== t && this._unwireInput(e), !t) {
|
|
124
|
-
this.
|
|
124
|
+
this._$nativeInput = null;
|
|
125
125
|
return;
|
|
126
126
|
}
|
|
127
|
-
!this.hasAttribute("disabled") && t.disabled && (this.disabled = !0), this.
|
|
127
|
+
!this.hasAttribute("disabled") && t.disabled && (this.disabled = !0), this._$nativeInput = t, this._applyInitialValueToInput(t), this._wireInput(t), this.requestUpdate();
|
|
128
128
|
}
|
|
129
129
|
_applyInitialValueToInput(t) {
|
|
130
130
|
if (this._value !== void 0) {
|
|
@@ -139,12 +139,12 @@ const p = class p extends f {
|
|
|
139
139
|
isNaN(e) || (this._defaultValue = e);
|
|
140
140
|
}
|
|
141
141
|
_applyValueToInput(t) {
|
|
142
|
-
this.
|
|
142
|
+
this._$nativeInput && (this._$nativeInput.value = String(t));
|
|
143
143
|
}
|
|
144
144
|
_wireInput(t) {
|
|
145
145
|
t.addEventListener("input", this._onInput), t.addEventListener("change", this._onChange), t.addEventListener("keydown", this._onKeydown);
|
|
146
146
|
}
|
|
147
|
-
_unwireInput(t = this.
|
|
147
|
+
_unwireInput(t = this._$nativeInput) {
|
|
148
148
|
t?.removeEventListener("input", this._onInput), t?.removeEventListener("change", this._onChange), t?.removeEventListener("keydown", this._onKeydown);
|
|
149
149
|
}
|
|
150
150
|
_syncAriaAttributes(t) {
|
|
@@ -169,13 +169,13 @@ const p = class p extends f {
|
|
|
169
169
|
this._value = t.valueAsNumber, this._valueInitialized = !0, this.requestUpdate("value", e);
|
|
170
170
|
}
|
|
171
171
|
_progressStyle() {
|
|
172
|
-
const t = this.
|
|
172
|
+
const t = this._$nativeInput;
|
|
173
173
|
if (!t) return "";
|
|
174
174
|
const e = d(t.min, 0), s = d(t.max, 100), i = v(t.valueAsNumber, e, s) * 100;
|
|
175
175
|
return this.orientation === "vertical" ? `bottom:0%;height:${i.toFixed(3)}%` : `left:0%;width:${i.toFixed(3)}%`;
|
|
176
176
|
}
|
|
177
177
|
_floatStyle() {
|
|
178
|
-
const t = this.
|
|
178
|
+
const t = this._$nativeInput;
|
|
179
179
|
if (!t) return "";
|
|
180
180
|
const e = d(t.min, 0), s = d(t.max, 100), i = v(t.valueAsNumber, e, s), u = (1 - i * 2).toFixed(4);
|
|
181
181
|
return this.orientation === "vertical" ? `bottom:calc(${(i * 100).toFixed(3)}% + ${u} * var(--rc-thumb-radius, 9px))` : `left:calc(${(i * 100).toFixed(3)}% + ${u} * var(--rc-thumb-radius, 9px))`;
|
|
@@ -329,4 +329,4 @@ l([
|
|
|
329
329
|
export {
|
|
330
330
|
a as R
|
|
331
331
|
};
|
|
332
|
-
//# sourceMappingURL=rc-slider-
|
|
332
|
+
//# sourceMappingURL=rc-slider-CRGEKO0W.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rc-slider-CRGEKO0W.js","sources":["../src/rc-slider.ts"],"sourcesContent":["import { LitElement, css, html, nothing } from \"lit\";\nimport type { ComplexAttributeConverter } from \"lit\";\nimport { property } from \"lit/decorators.js\";\nimport { ifDefined } from \"lit/directives/if-defined.js\";\nimport { NativeChildController, valueToPercent, warnMissingDirectChild } from \"@rcarls/rc-common\";\n\nexport interface RCSliderValueEvent {\n /** Current numeric slider value. */\n value: number;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"rc-slider\": RCSlider;\n }\n\n interface HTMLElementEventMap {\n \"rc-slider-input\": CustomEvent<RCSliderValueEvent>;\n \"rc-slider-change\": CustomEvent<RCSliderValueEvent>;\n }\n}\n\ntype DisplayValue = \"float\" | \"inline-start\" | \"inline-end\" | null;\n\n/**\n * Normalises the `display` attribute.\n * A bare boolean attribute (`display` with no value) maps to `'float'` so\n * the reflected attribute is always an explicit string, never an empty string.\n */\nconst displayConverter: ComplexAttributeConverter<DisplayValue> = {\n fromAttribute(v: string | null): DisplayValue {\n if (v === null) return null;\n if (v === \"\" || v === \"float\") return \"float\";\n if (v === \"inline-start\") return \"inline-start\";\n if (v === \"inline-end\") return \"inline-end\";\n return null;\n },\n toAttribute(v: DisplayValue): string | null {\n return v;\n },\n};\n\n/**\n * Returns the numeric value of a range input's `min`, `max`, or `step`\n * attribute string, falling back to `defaultVal` when the attribute is absent\n * (empty string) or not a valid number.\n */\nfunction parseAttr(s: string, defaultVal: number): number {\n if (s === \"\") return defaultVal;\n const n = parseFloat(s);\n return isNaN(n) ? defaultVal : n;\n}\n\n/**\n * Single-thumb slider backed by a native <input type=\"range\"> with custom track and value\n * display hooks, following the WAI-ARIA Slider pattern.\n *\n * Label association:\n * - Explicit `for`/`id`: `<label for=\"vol\">Volume</label><rc-slider><input id=\"vol\" …></rc-slider>`\n * - Direct `aria-label` on the input: `<input aria-label=\"Volume\" …>`\n *\n * These patterns all work without JavaScript. The component does not render a\n * label element itself — the consumer is responsible for accessible naming.\n *\n * Form participation is handled natively by the consumer-provided input's `name`\n * attribute; no `ElementInternals` setup is required.\n *\n * @see {@link https://richardcarls.github.io/rc-webcomponents/components/rc-slider rc-slider docs}\n * @see {@link https://www.w3.org/WAI/ARIA/apg/patterns/slider/ WAI-ARIA Slider pattern}\n *\n * @slot track-background - Optional decorative content rendered inside the track before the progress fill.\n * @slot value-display - Optional replacement for the rendered value text.\n *\n * @fires rc-slider-input - Fires continuously while the value changes. Detail: `{ value }`.\n * @fires rc-slider-change - Fires when the committed value changes (on release). Detail: `{ value }`.\n *\n * @attr min - Minimum slider value.\n * @attr max - Maximum slider value.\n * @attr step - Slider step.\n * @attr value - Current slider value. Host writes are silent.\n * @attr default-value - Initial uncontrolled slider value. Has no effect after the first user\n * interaction or `value` write.\n * @attr disabled - Disables the underlying input.\n * @attr readonly - Prevents edits while preserving normal display. Not a native range attribute.\n * @attr display - Controls the live value display: absent (none), `float`, `inline-start`, or\n * `inline-end`.\n * @attr value-text - Screen-reader value text, forwarded as `aria-valuetext` on the native input.\n * @attr orientation - Orientation, forwarded to `aria-orientation`: `horizontal` or `vertical`.\n *\n * @cssprop [--rc-thumb-radius=9px] - Half the thumb width; used to position the float value display.\n * @cssprop [--rc-slider-gap=var(--rc-control-gap)] - Gap between track and inline value display.\n * @cssprop [--rc-slider-control-size=var(--rc-control-block-size)] - Track hit-area block size.\n * @cssprop [--rc-slider-vertical-size=12.5rem] - Track length when `orientation=\"vertical\"`.\n * @cssprop [--rc-slider-track-size=0.1875rem] - Visual track thickness.\n * @cssprop [--rc-slider-track-background=CanvasText] - Unfilled track color.\n * @cssprop [--rc-slider-track-opacity=0.25] - Unfilled track opacity.\n * @cssprop [--rc-slider-track-radius=var(--rc-control-radius)] - Track border radius.\n * @cssprop [--rc-slider-progress-background=var(--rc-accent)] - Filled track color.\n * @cssprop [--rc-slider-value-color=var(--rc-text-disabled)] - Value display text color.\n * @cssprop [--rc-slider-float-value-block-offset=-1.4em] - Block-axis offset for horizontal float value display.\n * @cssprop [--rc-slider-float-value-inline-offset=calc(100% + 0.5rem)] - Inline-axis offset for vertical float value display.\n *\n * @csspart root - Root layout wrapper.\n * @csspart control - Track/input positioning wrapper.\n * @csspart track - Visual slider track.\n * @csspart progress - Filled progress segment.\n * @csspart value-display - Rendered value text.\n */\nexport class RCSlider extends LitElement {\n static override styles = css`\n :host {\n display: block;\n }\n\n .rc-slider-root {\n display: grid;\n gap: var(--rc-slider-gap, var(--rc-control-gap, 0.5rem));\n align-items: center;\n font-family: var(--rc-font-family, inherit);\n font-size: var(--rc-font-size, inherit);\n line-height: var(--rc-line-height, normal);\n }\n\n .rc-slider-root[data-display=\"inline-start\"] {\n grid-template-columns: auto minmax(0, 1fr);\n }\n\n .rc-slider-root[data-display=\"inline-end\"] {\n grid-template-columns: minmax(0, 1fr) auto;\n }\n\n .rc-slider-control {\n position: relative;\n display: block;\n min-width: 0;\n min-height: var(--rc-slider-control-size, var(--rc-control-block-size, 1.5rem));\n }\n\n .rc-slider-track,\n .rc-slider-progress {\n position: absolute;\n pointer-events: none;\n }\n\n .rc-slider-track {\n inset-inline: 0;\n inset-block: calc(50% - var(--rc-slider-track-size, 0.1875rem) / 2);\n block-size: var(--rc-slider-track-size, 0.1875rem);\n background: var(--rc-slider-track-background, CanvasText);\n opacity: var(--rc-slider-track-opacity, 0.25);\n border-radius: var(--rc-slider-track-radius, var(--rc-control-radius, 0));\n overflow: hidden;\n z-index: 0;\n }\n\n ::slotted([slot=\"track-background\"]) {\n position: absolute;\n inset: 0;\n pointer-events: none;\n }\n\n .rc-slider-progress {\n inset-block: 0;\n background: var(--rc-slider-progress-background, var(--rc-accent, Highlight));\n border-radius: inherit;\n z-index: 1;\n }\n\n ::slotted(input[type=\"range\"]) {\n position: absolute;\n inset: 0;\n inline-size: 100%;\n block-size: 100%;\n margin: 0;\n background: transparent;\n z-index: 2;\n }\n\n .rc-slider-value {\n font-variant-numeric: tabular-nums;\n white-space: nowrap;\n color: var(--rc-slider-value-color, var(--rc-text-disabled, GrayText));\n }\n\n .rc-slider-root[data-display=\"float\"] .rc-slider-value {\n position: absolute;\n inset-block-start: var(--rc-slider-float-value-block-offset, -1.4em);\n transform: translateX(-50%);\n pointer-events: none;\n z-index: 3;\n }\n\n :host([orientation=\"vertical\"]) {\n display: inline-block;\n }\n\n :host([orientation=\"vertical\"]) .rc-slider-control {\n inline-size: var(--rc-slider-control-size, var(--rc-control-block-size, 1.5rem));\n block-size: var(--rc-slider-vertical-size, 12.5rem);\n }\n\n :host([orientation=\"vertical\"]) .rc-slider-track {\n inset-block: 0;\n inset-inline: calc(50% - var(--rc-slider-track-size, 0.1875rem) / 2);\n inline-size: var(--rc-slider-track-size, 0.1875rem);\n block-size: auto;\n }\n\n :host([orientation=\"vertical\"]) .rc-slider-progress {\n inset-inline: 0;\n }\n\n :host([orientation=\"vertical\"]) ::slotted(input[type=\"range\"]) {\n writing-mode: vertical-lr;\n direction: rtl;\n }\n\n :host([orientation=\"vertical\"]) .rc-slider-root[data-display=\"float\"] .rc-slider-value {\n inset-block-start: auto;\n inset-inline-start: var(--rc-slider-float-value-inline-offset, calc(100% + 0.5rem));\n transform: translateY(50%);\n }\n `;\n\n /** Minimum slider value. */\n @property({ type: Number }) min = 0;\n\n /** Maximum slider value. */\n @property({ type: Number }) max = 100;\n\n /** Slider step. */\n @property({ type: Number }) step = 1;\n\n private _value: number | undefined;\n private _defaultValue: number | undefined;\n private _valueInitialized = false;\n\n /** Current slider value. */\n @property({ type: Number })\n get value(): number {\n return this._value ?? this._defaultValue ?? this._nativeInputValue;\n }\n set value(v: number) {\n const old = this._value;\n this._value = v;\n this._valueInitialized = true;\n this._applyValueToInput(v);\n this.requestUpdate(\"value\", old);\n }\n\n /** Initial uncontrolled slider value. Has no effect after the first user interaction or `value` write. */\n @property({ type: Number, attribute: \"default-value\" })\n get defaultValue(): number | undefined {\n return this._defaultValue;\n }\n set defaultValue(v: number | undefined) {\n const old = this._defaultValue;\n this._defaultValue = v;\n if (\n !this._valueInitialized &&\n this._value === undefined &&\n v !== undefined\n ) {\n this._applyValueToInput(v);\n this.requestUpdate(\"value\", undefined);\n }\n this.requestUpdate(\"defaultValue\", old);\n }\n\n /** Disable the underlying input. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /** Prevents edits while preserving normal display. Not a native range attribute. */\n @property({ type: Boolean, reflect: true }) readonly = false;\n\n /**\n * Controls the live value display.\n *\n * - Absent (default) — no value shown.\n * - `display` or `display=\"float\"` — floats above the thumb.\n * - `display=\"inline-start\"` — rendered before the track, inline in the grid.\n * - `display=\"inline-end\"` — rendered after the track, inline in the grid.\n */\n @property({ reflect: true, converter: displayConverter })\n display: DisplayValue = null;\n\n /** Screen-reader value text. When set, forwarded as `aria-valuetext` on the native input. */\n @property({ attribute: \"value-text\" }) valueText = \"\";\n\n /** Orientation; reflected as an attribute and forwarded to `aria-orientation`. */\n @property({ reflect: true }) orientation: \"horizontal\" | \"vertical\" =\n \"horizontal\";\n\n private _$nativeInput: HTMLInputElement | null = null;\n\n private readonly _nativeInputController = new NativeChildController<HTMLInputElement>(this, {\n selector: ':scope > input[type=\"range\"]',\n observe: true,\n onChange: ($input, $previous) => this._setupInput($input, $previous),\n onMissing: () => {\n if (import.meta.env.DEV) {\n warnMissingDirectChild(this, {\n selector: ':scope > input[type=\"range\"]',\n message: '[rc-slider] Requires a child <input type=\"range\"> element.',\n });\n }\n },\n });\n\n override disconnectedCallback(): void {\n this._unwireInput();\n super.disconnectedCallback();\n }\n\n override updated(): void {\n const $input = this._$nativeInput;\n if (!$input) return;\n\n $input.disabled = this.disabled;\n this._syncAriaAttributes($input);\n }\n\n override render() {\n const $input = this._$nativeInput;\n if (!$input) return nothing;\n\n const valueDisplay = html`\n <span\n part=\"value-display\"\n class=\"rc-slider-value\"\n style=${ifDefined(\n this.display === \"float\" ? this._floatStyle() : undefined,\n )}\n aria-hidden=\"true\"\n >\n <slot name=\"value-display\">${this._displayText}</slot>\n </span>\n `;\n\n return html`\n <div\n part=\"root\"\n class=\"rc-slider-root\"\n data-display=${this.display ?? nothing}\n data-orientation=${this.orientation}\n data-readonly=${this.readonly ? \"\" : nothing}\n data-disabled=${this.disabled ? \"\" : nothing}\n data-has-value-text=${this.valueText ? \"\" : nothing}\n >\n ${this.display === \"inline-start\" ? valueDisplay : nothing}\n\n <span part=\"control\" class=\"rc-slider-control\">\n <span part=\"track\" class=\"rc-slider-track\" aria-hidden=\"true\">\n <slot name=\"track-background\"></slot>\n <span\n part=\"progress\"\n class=\"rc-slider-progress\"\n style=${this._progressStyle()}\n ></span>\n </span>\n\n <slot @slotchange=${this._onDefaultSlotChange}></slot>\n ${this.display === \"float\" ? valueDisplay : nothing}\n </span>\n\n ${this.display === \"inline-end\" ? valueDisplay : nothing}\n </div>\n `;\n }\n\n private get _displayText(): string {\n return this.valueText || String(this.value);\n }\n\n private get _nativeInputValue(): number {\n const value = this._$nativeInput?.valueAsNumber;\n return value === undefined || isNaN(value) ? 0 : value;\n }\n\n private _setupInput($input: HTMLInputElement | null, $previous?: HTMLInputElement | null): void {\n if ($previous && $previous !== $input) {\n this._unwireInput($previous);\n }\n\n if (!$input) {\n this._$nativeInput = null;\n return;\n }\n\n // Mirror disabled state from the native input if not explicitly set on the host.\n // Pre-upgrade markup may carry <input disabled> before the component upgrades.\n if (!this.hasAttribute(\"disabled\") && $input.disabled) {\n this.disabled = true;\n }\n\n this._$nativeInput = $input;\n this._applyInitialValueToInput($input);\n this._wireInput($input);\n this.requestUpdate();\n }\n\n private _onDefaultSlotChange = (): void => {\n this._nativeInputController.sync();\n this.requestUpdate();\n };\n\n private _applyInitialValueToInput($input: HTMLInputElement): void {\n if (this._value !== undefined) {\n this._applyValueToInput(this._value);\n return;\n }\n\n if (this._defaultValue !== undefined) {\n this._applyValueToInput(this._defaultValue);\n return;\n }\n\n const value = $input.valueAsNumber;\n if (!isNaN(value)) {\n this._defaultValue = value;\n }\n }\n\n private _applyValueToInput(value: number): void {\n if (!this._$nativeInput) return;\n\n this._$nativeInput.value = String(value);\n }\n\n private _wireInput($input: HTMLInputElement): void {\n $input.addEventListener(\"input\", this._onInput);\n $input.addEventListener(\"change\", this._onChange);\n $input.addEventListener(\"keydown\", this._onKeydown);\n }\n\n private _unwireInput($input = this._$nativeInput): void {\n $input?.removeEventListener(\"input\", this._onInput);\n $input?.removeEventListener(\"change\", this._onChange);\n $input?.removeEventListener(\"keydown\", this._onKeydown);\n }\n\n private _syncAriaAttributes($input: HTMLInputElement): void {\n if (this.valueText) {\n $input.setAttribute(\"aria-valuetext\", this.valueText);\n } else {\n $input.removeAttribute(\"aria-valuetext\");\n }\n\n if (this.orientation === \"vertical\") {\n $input.setAttribute(\"aria-orientation\", \"vertical\");\n } else {\n $input.removeAttribute(\"aria-orientation\");\n }\n\n if (this.readonly) {\n $input.setAttribute(\"aria-readonly\", \"true\");\n } else {\n $input.removeAttribute(\"aria-readonly\");\n }\n }\n\n private readonly _onInput = (e: Event): void => {\n this._handleRangeEvent(e, \"rc-slider-input\");\n };\n\n private readonly _onChange = (e: Event): void => {\n this._handleRangeEvent(e, \"rc-slider-change\");\n };\n\n private _handleRangeEvent(\n e: Event,\n type: \"rc-slider-input\" | \"rc-slider-change\",\n ): void {\n const $input = e.currentTarget as HTMLInputElement;\n\n if (this.readonly) {\n $input.value = String(this.value);\n return;\n }\n\n this._commitInputValue($input);\n\n this.dispatchEvent(\n new CustomEvent<RCSliderValueEvent>(type, {\n bubbles: true,\n composed: true,\n detail: { value: this.value },\n }),\n );\n }\n\n private readonly _onKeydown = (e: KeyboardEvent): void => {\n if (this.disabled || this.readonly) return;\n if (e.key !== \"PageUp\" && e.key !== \"PageDown\") return;\n\n e.preventDefault();\n const $input = e.currentTarget as HTMLInputElement;\n\n if (e.key === \"PageUp\") $input.stepUp(10);\n else $input.stepDown(10);\n\n this._commitInputValue($input);\n\n this.dispatchEvent(\n new CustomEvent<RCSliderValueEvent>(\"rc-slider-input\", {\n bubbles: true,\n composed: true,\n detail: { value: this.value },\n }),\n );\n };\n\n private _commitInputValue($input: HTMLInputElement): void {\n const old = this.value;\n\n this._value = $input.valueAsNumber;\n this._valueInitialized = true;\n\n this.requestUpdate(\"value\", old);\n }\n\n private _progressStyle(): string {\n const $input = this._$nativeInput;\n if (!$input) return \"\";\n\n const min = parseAttr($input.min, 0);\n const max = parseAttr($input.max, 100);\n const pct = valueToPercent($input.valueAsNumber, min, max) * 100;\n\n if (this.orientation === \"vertical\") {\n return `bottom:0%;height:${pct.toFixed(3)}%`;\n }\n\n return `left:0%;width:${pct.toFixed(3)}%`;\n }\n\n private _floatStyle(): string {\n const $input = this._$nativeInput;\n if (!$input) return \"\";\n\n const min = parseAttr($input.min, 0);\n const max = parseAttr($input.max, 100);\n const pct = valueToPercent($input.valueAsNumber, min, max);\n const k = (1 - pct * 2).toFixed(4);\n\n if (this.orientation === \"vertical\") {\n return `bottom:calc(${(pct * 100).toFixed(3)}% + ${k} * var(--rc-thumb-radius, 9px))`;\n }\n\n return `left:calc(${(pct * 100).toFixed(3)}% + ${k} * var(--rc-thumb-radius, 9px))`;\n }\n}\n\nexport default RCSlider;\n"],"names":["displayConverter","v","parseAttr","s","defaultVal","n","_RCSlider","LitElement","NativeChildController","$input","$previous","e","old","nothing","valueDisplay","html","ifDefined","value","type","min","max","pct","valueToPercent","k","css","RCSlider","__decorateClass","property"],"mappings":";;;;;;;;;AA6BA,MAAMA,IAA4D;AAAA,EAChE,cAAcC,GAAgC;AAC5C,WAAIA,MAAM,OAAa,OACnBA,MAAM,MAAMA,MAAM,UAAgB,UAClCA,MAAM,iBAAuB,iBAC7BA,MAAM,eAAqB,eACxB;AAAA,EACT;AAAA,EACA,YAAYA,GAAgC;AAC1C,WAAOA;AAAA,EACT;AACF;AAOA,SAASC,EAAUC,GAAWC,GAA4B;AACxD,MAAID,MAAM,GAAI,QAAOC;AACrB,QAAMC,IAAI,WAAWF,CAAC;AACtB,SAAO,MAAME,CAAC,IAAID,IAAaC;AACjC;AAyDO,MAAMC,IAAN,MAAMA,UAAiBC,EAAW;AAAA,EAAlC,cAAA;AAAA,UAAA,GAAA,SAAA,GAqHuB,KAAA,MAAM,GAGN,KAAA,MAAM,KAGN,KAAA,OAAO,GAInC,KAAQ,oBAAoB,IAmCgB,KAAA,WAAW,IAGX,KAAA,WAAW,IAWvD,KAAA,UAAwB,MAGe,KAAA,YAAY,IAGtB,KAAA,cAC3B,cAEF,KAAQ,gBAAyC,MAEjD,KAAiB,yBAAyB,IAAIC,EAAwC,MAAM;AAAA,MAC1F,UAAU;AAAA,MACV,SAAS;AAAA,MACT,UAAU,CAACC,GAAQC,MAAc,KAAK,YAAYD,GAAQC,CAAS;AAAA,MACnE,WAAW,MAAM;AAAA,MAOjB;AAAA,IAAA,CACD,GA8FD,KAAQ,uBAAuB,MAAY;AACzC,WAAK,uBAAuB,KAAA,GAC5B,KAAK,cAAA;AAAA,IACP,GAyDA,KAAiB,WAAW,CAACC,MAAmB;AAC9C,WAAK,kBAAkBA,GAAG,iBAAiB;AAAA,IAC7C,GAEA,KAAiB,YAAY,CAACA,MAAmB;AAC/C,WAAK,kBAAkBA,GAAG,kBAAkB;AAAA,IAC9C,GAwBA,KAAiB,aAAa,CAACA,MAA2B;AAExD,UADI,KAAK,YAAY,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/K7CyB,EAgLX,WAAA,WAAA,CAAA;AAGuCC,EAAA;AAAA,EAAtCC,EAAS,EAAE,WAAW,aAAA,CAAc;AAAA,GAnL1BF,EAmL4B,WAAA,aAAA,CAAA;AAGVC,EAAA;AAAA,EAA5BC,EAAS,EAAE,SAAS,GAAA,CAAM;AAAA,GAtLhBF,EAsLkB,WAAA,eAAA,CAAA;"}
|
package/dist/rc-slider-define.js
CHANGED
package/dist/rc-slider.js
CHANGED
|
@@ -36,9 +36,23 @@ type DisplayValue = "float" | "inline-start" | "inline-end" | null;
|
|
|
36
36
|
* @fires rc-slider-input - Fires continuously while the value changes. Detail: `{ value }`.
|
|
37
37
|
* @fires rc-slider-change - Fires when the committed value changes (on release). Detail: `{ value }`.
|
|
38
38
|
*
|
|
39
|
+
* @attr min - Minimum slider value.
|
|
40
|
+
* @attr max - Maximum slider value.
|
|
41
|
+
* @attr step - Slider step.
|
|
42
|
+
* @attr value - Current slider value. Host writes are silent.
|
|
43
|
+
* @attr default-value - Initial uncontrolled slider value. Has no effect after the first user
|
|
44
|
+
* interaction or `value` write.
|
|
45
|
+
* @attr disabled - Disables the underlying input.
|
|
46
|
+
* @attr readonly - Prevents edits while preserving normal display. Not a native range attribute.
|
|
47
|
+
* @attr display - Controls the live value display: absent (none), `float`, `inline-start`, or
|
|
48
|
+
* `inline-end`.
|
|
49
|
+
* @attr value-text - Screen-reader value text, forwarded as `aria-valuetext` on the native input.
|
|
50
|
+
* @attr orientation - Orientation, forwarded to `aria-orientation`: `horizontal` or `vertical`.
|
|
51
|
+
*
|
|
39
52
|
* @cssprop [--rc-thumb-radius=9px] - Half the thumb width; used to position the float value display.
|
|
40
53
|
* @cssprop [--rc-slider-gap=var(--rc-control-gap)] - Gap between track and inline value display.
|
|
41
54
|
* @cssprop [--rc-slider-control-size=var(--rc-control-block-size)] - Track hit-area block size.
|
|
55
|
+
* @cssprop [--rc-slider-vertical-size=12.5rem] - Track length when `orientation="vertical"`.
|
|
42
56
|
* @cssprop [--rc-slider-track-size=0.1875rem] - Visual track thickness.
|
|
43
57
|
* @cssprop [--rc-slider-track-background=CanvasText] - Unfilled track color.
|
|
44
58
|
* @cssprop [--rc-slider-track-opacity=0.25] - Unfilled track opacity.
|
|
@@ -88,7 +102,7 @@ export declare class RCSlider extends LitElement {
|
|
|
88
102
|
valueText: string;
|
|
89
103
|
/** Orientation; reflected as an attribute and forwarded to `aria-orientation`. */
|
|
90
104
|
orientation: "horizontal" | "vertical";
|
|
91
|
-
private
|
|
105
|
+
private _$nativeInput;
|
|
92
106
|
private readonly _nativeInputController;
|
|
93
107
|
disconnectedCallback(): void;
|
|
94
108
|
updated(): void;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.4.1",
|
|
7
7
|
"description": "Single-thumb slider backed by a native <input type=\"range\"> with custom track and value display hooks.",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
@@ -57,9 +57,9 @@
|
|
|
57
57
|
"vitest-browser-lit": "^1.0.1"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@rcarls/rc-common": "
|
|
60
|
+
"@rcarls/rc-common": "0.4.1"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
63
|
"lit": "^3.0.0"
|
|
64
64
|
}
|
|
65
|
-
}
|
|
65
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rc-slider-CPApkY9I.js","sources":["../src/rc-slider.ts"],"sourcesContent":["import { LitElement, css, html, nothing } from \"lit\";\nimport type { ComplexAttributeConverter } from \"lit\";\nimport { property } from \"lit/decorators.js\";\nimport { ifDefined } from \"lit/directives/if-defined.js\";\nimport { NativeChildController, valueToPercent, warnMissingDirectChild } from \"@rcarls/rc-common\";\n\nexport interface RCSliderValueEvent {\n /** Current numeric slider value. */\n value: number;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"rc-slider\": RCSlider;\n }\n\n interface HTMLElementEventMap {\n \"rc-slider-input\": CustomEvent<RCSliderValueEvent>;\n \"rc-slider-change\": CustomEvent<RCSliderValueEvent>;\n }\n}\n\ntype DisplayValue = \"float\" | \"inline-start\" | \"inline-end\" | null;\n\n/**\n * Normalises the `display` attribute.\n * A bare boolean attribute (`display` with no value) maps to `'float'` so\n * the reflected attribute is always an explicit string, never an empty string.\n */\nconst displayConverter: ComplexAttributeConverter<DisplayValue> = {\n fromAttribute(v: string | null): DisplayValue {\n if (v === null) return null;\n if (v === \"\" || v === \"float\") return \"float\";\n if (v === \"inline-start\") return \"inline-start\";\n if (v === \"inline-end\") return \"inline-end\";\n return null;\n },\n toAttribute(v: DisplayValue): string | null {\n return v;\n },\n};\n\n/**\n * Returns the numeric value of a range input's `min`, `max`, or `step`\n * attribute string, falling back to `defaultVal` when the attribute is absent\n * (empty string) or not a valid number.\n */\nfunction parseAttr(s: string, defaultVal: number): number {\n if (s === \"\") return defaultVal;\n const n = parseFloat(s);\n return isNaN(n) ? defaultVal : n;\n}\n\n/**\n * Single-thumb slider backed by a native <input type=\"range\"> with custom track and value\n * display hooks, following the WAI-ARIA Slider pattern.\n *\n * Label association:\n * - Explicit `for`/`id`: `<label for=\"vol\">Volume</label><rc-slider><input id=\"vol\" …></rc-slider>`\n * - Direct `aria-label` on the input: `<input aria-label=\"Volume\" …>`\n *\n * These patterns all work without JavaScript. The component does not render a\n * label element itself — the consumer is responsible for accessible naming.\n *\n * Form participation is handled natively by the consumer-provided input's `name`\n * attribute; no `ElementInternals` setup is required.\n *\n * @see {@link https://richardcarls.github.io/rc-webcomponents/components/rc-slider rc-slider docs}\n * @see {@link https://www.w3.org/WAI/ARIA/apg/patterns/slider/ WAI-ARIA Slider pattern}\n *\n * @slot track-background - Optional decorative content rendered inside the track before the progress fill.\n * @slot value-display - Optional replacement for the rendered value text.\n *\n * @fires rc-slider-input - Fires continuously while the value changes. Detail: `{ value }`.\n * @fires rc-slider-change - Fires when the committed value changes (on release). Detail: `{ value }`.\n *\n * @cssprop [--rc-thumb-radius=9px] - Half the thumb width; used to position the float value display.\n * @cssprop [--rc-slider-gap=var(--rc-control-gap)] - Gap between track and inline value display.\n * @cssprop [--rc-slider-control-size=var(--rc-control-block-size)] - Track hit-area block size.\n * @cssprop [--rc-slider-track-size=0.1875rem] - Visual track thickness.\n * @cssprop [--rc-slider-track-background=CanvasText] - Unfilled track color.\n * @cssprop [--rc-slider-track-opacity=0.25] - Unfilled track opacity.\n * @cssprop [--rc-slider-track-radius=var(--rc-control-radius)] - Track border radius.\n * @cssprop [--rc-slider-progress-background=var(--rc-accent)] - Filled track color.\n * @cssprop [--rc-slider-value-color=var(--rc-text-disabled)] - Value display text color.\n * @cssprop [--rc-slider-float-value-block-offset=-1.4em] - Block-axis offset for horizontal float value display.\n * @cssprop [--rc-slider-float-value-inline-offset=calc(100% + 0.5rem)] - Inline-axis offset for vertical float value display.\n *\n * @csspart root - Root layout wrapper.\n * @csspart control - Track/input positioning wrapper.\n * @csspart track - Visual slider track.\n * @csspart progress - Filled progress segment.\n * @csspart value-display - Rendered value text.\n */\nexport class RCSlider extends LitElement {\n static override styles = css`\n :host {\n display: block;\n }\n\n .rc-slider-root {\n display: grid;\n gap: var(--rc-slider-gap, var(--rc-control-gap, 0.5rem));\n align-items: center;\n font-family: var(--rc-font-family, inherit);\n font-size: var(--rc-font-size, inherit);\n line-height: var(--rc-line-height, normal);\n }\n\n .rc-slider-root[data-display=\"inline-start\"] {\n grid-template-columns: auto minmax(0, 1fr);\n }\n\n .rc-slider-root[data-display=\"inline-end\"] {\n grid-template-columns: minmax(0, 1fr) auto;\n }\n\n .rc-slider-control {\n position: relative;\n display: block;\n min-width: 0;\n min-height: var(--rc-slider-control-size, var(--rc-control-block-size, 1.5rem));\n }\n\n .rc-slider-track,\n .rc-slider-progress {\n position: absolute;\n pointer-events: none;\n }\n\n .rc-slider-track {\n inset-inline: 0;\n inset-block: calc(50% - var(--rc-slider-track-size, 0.1875rem) / 2);\n block-size: var(--rc-slider-track-size, 0.1875rem);\n background: var(--rc-slider-track-background, CanvasText);\n opacity: var(--rc-slider-track-opacity, 0.25);\n border-radius: var(--rc-slider-track-radius, var(--rc-control-radius, 0));\n overflow: hidden;\n z-index: 0;\n }\n\n ::slotted([slot=\"track-background\"]) {\n position: absolute;\n inset: 0;\n pointer-events: none;\n }\n\n .rc-slider-progress {\n inset-block: 0;\n background: var(--rc-slider-progress-background, var(--rc-accent, Highlight));\n border-radius: inherit;\n z-index: 1;\n }\n\n ::slotted(input[type=\"range\"]) {\n position: absolute;\n inset: 0;\n inline-size: 100%;\n block-size: 100%;\n margin: 0;\n background: transparent;\n z-index: 2;\n }\n\n .rc-slider-value {\n font-variant-numeric: tabular-nums;\n white-space: nowrap;\n color: var(--rc-slider-value-color, var(--rc-text-disabled, GrayText));\n }\n\n .rc-slider-root[data-display=\"float\"] .rc-slider-value {\n position: absolute;\n inset-block-start: var(--rc-slider-float-value-block-offset, -1.4em);\n transform: translateX(-50%);\n pointer-events: none;\n z-index: 3;\n }\n\n :host([orientation=\"vertical\"]) {\n display: inline-block;\n }\n\n :host([orientation=\"vertical\"]) .rc-slider-control {\n inline-size: var(--rc-slider-control-size, var(--rc-control-block-size, 1.5rem));\n block-size: var(--rc-slider-vertical-size, 12.5rem);\n }\n\n :host([orientation=\"vertical\"]) .rc-slider-track {\n inset-block: 0;\n inset-inline: calc(50% - var(--rc-slider-track-size, 0.1875rem) / 2);\n inline-size: var(--rc-slider-track-size, 0.1875rem);\n block-size: auto;\n }\n\n :host([orientation=\"vertical\"]) .rc-slider-progress {\n inset-inline: 0;\n }\n\n :host([orientation=\"vertical\"]) ::slotted(input[type=\"range\"]) {\n writing-mode: vertical-lr;\n direction: rtl;\n }\n\n :host([orientation=\"vertical\"]) .rc-slider-root[data-display=\"float\"] .rc-slider-value {\n inset-block-start: auto;\n inset-inline-start: var(--rc-slider-float-value-inline-offset, calc(100% + 0.5rem));\n transform: translateY(50%);\n }\n `;\n\n /** Minimum slider value. */\n @property({ type: Number }) min = 0;\n\n /** Maximum slider value. */\n @property({ type: Number }) max = 100;\n\n /** Slider step. */\n @property({ type: Number }) step = 1;\n\n private _value: number | undefined;\n private _defaultValue: number | undefined;\n private _valueInitialized = false;\n\n /** Current slider value. */\n @property({ type: Number })\n get value(): number {\n return this._value ?? this._defaultValue ?? this._nativeInputValue;\n }\n set value(v: number) {\n const old = this._value;\n this._value = v;\n this._valueInitialized = true;\n this._applyValueToInput(v);\n this.requestUpdate(\"value\", old);\n }\n\n /** Initial uncontrolled slider value. Has no effect after the first user interaction or `value` write. */\n @property({ type: Number, attribute: \"default-value\" })\n get defaultValue(): number | undefined {\n return this._defaultValue;\n }\n set defaultValue(v: number | undefined) {\n const old = this._defaultValue;\n this._defaultValue = v;\n if (\n !this._valueInitialized &&\n this._value === undefined &&\n v !== undefined\n ) {\n this._applyValueToInput(v);\n this.requestUpdate(\"value\", undefined);\n }\n this.requestUpdate(\"defaultValue\", old);\n }\n\n /** Disable the underlying input. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /** Prevents edits while preserving normal display. Not a native range attribute. */\n @property({ type: Boolean, reflect: true }) readonly = false;\n\n /**\n * Controls the live value display.\n *\n * - Absent (default) — no value shown.\n * - `display` or `display=\"float\"` — floats above the thumb.\n * - `display=\"inline-start\"` — rendered before the track, inline in the grid.\n * - `display=\"inline-end\"` — rendered after the track, inline in the grid.\n */\n @property({ reflect: true, converter: displayConverter })\n display: DisplayValue = null;\n\n /** Screen-reader value text. When set, forwarded as `aria-valuetext` on the native input. */\n @property({ attribute: \"value-text\" }) valueText = \"\";\n\n /** Orientation; reflected as an attribute and forwarded to `aria-orientation`. */\n @property({ reflect: true }) orientation: \"horizontal\" | \"vertical\" =\n \"horizontal\";\n\n private _nativeInput: HTMLInputElement | null = null;\n\n private readonly _nativeInputController = new NativeChildController<HTMLInputElement>(this, {\n selector: ':scope > input[type=\"range\"]',\n observe: true,\n onChange: (input, previous) => this._setupInput(input, previous),\n onMissing: () => {\n if (import.meta.env.DEV) {\n warnMissingDirectChild(this, {\n selector: ':scope > input[type=\"range\"]',\n message: '[rc-slider] Requires a child <input type=\"range\"> element.',\n });\n }\n },\n });\n\n override disconnectedCallback(): void {\n this._unwireInput();\n super.disconnectedCallback();\n }\n\n override updated(): void {\n const input = this._nativeInput;\n if (!input) return;\n\n input.disabled = this.disabled;\n this._syncAriaAttributes(input);\n }\n\n override render() {\n const input = this._nativeInput;\n if (!input) return nothing;\n\n const valueDisplay = html`\n <span\n part=\"value-display\"\n class=\"rc-slider-value\"\n style=${ifDefined(\n this.display === \"float\" ? this._floatStyle() : undefined,\n )}\n aria-hidden=\"true\"\n >\n <slot name=\"value-display\">${this._displayText}</slot>\n </span>\n `;\n\n return html`\n <div\n part=\"root\"\n class=\"rc-slider-root\"\n data-display=${this.display ?? nothing}\n data-orientation=${this.orientation}\n data-readonly=${this.readonly ? \"\" : nothing}\n data-disabled=${this.disabled ? \"\" : nothing}\n data-has-value-text=${this.valueText ? \"\" : nothing}\n >\n ${this.display === \"inline-start\" ? valueDisplay : nothing}\n\n <span part=\"control\" class=\"rc-slider-control\">\n <span part=\"track\" class=\"rc-slider-track\" aria-hidden=\"true\">\n <slot name=\"track-background\"></slot>\n <span\n part=\"progress\"\n class=\"rc-slider-progress\"\n style=${this._progressStyle()}\n ></span>\n </span>\n\n <slot @slotchange=${this._onDefaultSlotChange}></slot>\n ${this.display === \"float\" ? valueDisplay : nothing}\n </span>\n\n ${this.display === \"inline-end\" ? valueDisplay : nothing}\n </div>\n `;\n }\n\n private get _displayText(): string {\n return this.valueText || String(this.value);\n }\n\n private get _nativeInputValue(): number {\n const value = this._nativeInput?.valueAsNumber;\n return value === undefined || isNaN(value) ? 0 : value;\n }\n\n private _setupInput(input: HTMLInputElement | null, previous?: HTMLInputElement | null): void {\n if (previous && previous !== input) {\n this._unwireInput(previous);\n }\n\n if (!input) {\n this._nativeInput = null;\n return;\n }\n\n // Mirror disabled state from the native input if not explicitly set on the host.\n // Pre-upgrade markup may carry <input disabled> before the component upgrades.\n if (!this.hasAttribute(\"disabled\") && input.disabled) {\n this.disabled = true;\n }\n\n this._nativeInput = input;\n this._applyInitialValueToInput(input);\n this._wireInput(input);\n this.requestUpdate();\n }\n\n private _onDefaultSlotChange = (): void => {\n this._nativeInputController.sync();\n this.requestUpdate();\n };\n\n private _applyInitialValueToInput(input: HTMLInputElement): void {\n if (this._value !== undefined) {\n this._applyValueToInput(this._value);\n return;\n }\n\n if (this._defaultValue !== undefined) {\n this._applyValueToInput(this._defaultValue);\n return;\n }\n\n const value = input.valueAsNumber;\n if (!isNaN(value)) {\n this._defaultValue = value;\n }\n }\n\n private _applyValueToInput(value: number): void {\n if (!this._nativeInput) return;\n\n this._nativeInput.value = String(value);\n }\n\n private _wireInput(input: HTMLInputElement): void {\n input.addEventListener(\"input\", this._onInput);\n input.addEventListener(\"change\", this._onChange);\n input.addEventListener(\"keydown\", this._onKeydown);\n }\n\n private _unwireInput(input = this._nativeInput): void {\n input?.removeEventListener(\"input\", this._onInput);\n input?.removeEventListener(\"change\", this._onChange);\n input?.removeEventListener(\"keydown\", this._onKeydown);\n }\n\n private _syncAriaAttributes(input: HTMLInputElement): void {\n if (this.valueText) {\n input.setAttribute(\"aria-valuetext\", this.valueText);\n } else {\n input.removeAttribute(\"aria-valuetext\");\n }\n\n if (this.orientation === \"vertical\") {\n input.setAttribute(\"aria-orientation\", \"vertical\");\n } else {\n input.removeAttribute(\"aria-orientation\");\n }\n\n if (this.readonly) {\n input.setAttribute(\"aria-readonly\", \"true\");\n } else {\n input.removeAttribute(\"aria-readonly\");\n }\n }\n\n private readonly _onInput = (e: Event): void => {\n this._handleRangeEvent(e, \"rc-slider-input\");\n };\n\n private readonly _onChange = (e: Event): void => {\n this._handleRangeEvent(e, \"rc-slider-change\");\n };\n\n private _handleRangeEvent(\n e: Event,\n type: \"rc-slider-input\" | \"rc-slider-change\",\n ): void {\n const input = e.currentTarget as HTMLInputElement;\n\n if (this.readonly) {\n input.value = String(this.value);\n return;\n }\n\n this._commitInputValue(input);\n\n this.dispatchEvent(\n new CustomEvent<RCSliderValueEvent>(type, {\n bubbles: true,\n composed: true,\n detail: { value: this.value },\n }),\n );\n }\n\n private readonly _onKeydown = (e: KeyboardEvent): void => {\n if (this.disabled || this.readonly) return;\n if (e.key !== \"PageUp\" && e.key !== \"PageDown\") return;\n\n e.preventDefault();\n const input = e.currentTarget as HTMLInputElement;\n\n if (e.key === \"PageUp\") input.stepUp(10);\n else input.stepDown(10);\n\n this._commitInputValue(input);\n\n this.dispatchEvent(\n new CustomEvent<RCSliderValueEvent>(\"rc-slider-input\", {\n bubbles: true,\n composed: true,\n detail: { value: this.value },\n }),\n );\n };\n\n private _commitInputValue(input: HTMLInputElement): void {\n const old = this.value;\n\n this._value = input.valueAsNumber;\n this._valueInitialized = true;\n\n this.requestUpdate(\"value\", old);\n }\n\n private _progressStyle(): string {\n const input = this._nativeInput;\n if (!input) return \"\";\n\n const min = parseAttr(input.min, 0);\n const max = parseAttr(input.max, 100);\n const pct = valueToPercent(input.valueAsNumber, min, max) * 100;\n\n if (this.orientation === \"vertical\") {\n return `bottom:0%;height:${pct.toFixed(3)}%`;\n }\n\n return `left:0%;width:${pct.toFixed(3)}%`;\n }\n\n private _floatStyle(): string {\n const input = this._nativeInput;\n if (!input) return \"\";\n\n const min = parseAttr(input.min, 0);\n const max = parseAttr(input.max, 100);\n const pct = valueToPercent(input.valueAsNumber, min, max);\n const k = (1 - pct * 2).toFixed(4);\n\n if (this.orientation === \"vertical\") {\n return `bottom:calc(${(pct * 100).toFixed(3)}% + ${k} * var(--rc-thumb-radius, 9px))`;\n }\n\n return `left:calc(${(pct * 100).toFixed(3)}% + ${k} * var(--rc-thumb-radius, 9px))`;\n }\n}\n\nexport default RCSlider;\n"],"names":["displayConverter","v","parseAttr","s","defaultVal","n","_RCSlider","LitElement","NativeChildController","input","previous","e","old","nothing","valueDisplay","html","ifDefined","value","type","min","max","pct","valueToPercent","k","css","RCSlider","__decorateClass","property"],"mappings":";;;;;;;;;AA6BA,MAAMA,IAA4D;AAAA,EAChE,cAAcC,GAAgC;AAC5C,WAAIA,MAAM,OAAa,OACnBA,MAAM,MAAMA,MAAM,UAAgB,UAClCA,MAAM,iBAAuB,iBAC7BA,MAAM,eAAqB,eACxB;AAAA,EACT;AAAA,EACA,YAAYA,GAAgC;AAC1C,WAAOA;AAAA,EACT;AACF;AAOA,SAASC,EAAUC,GAAWC,GAA4B;AACxD,MAAID,MAAM,GAAI,QAAOC;AACrB,QAAMC,IAAI,WAAWF,CAAC;AACtB,SAAO,MAAME,CAAC,IAAID,IAAaC;AACjC;AA2CO,MAAMC,IAAN,MAAMA,UAAiBC,EAAW;AAAA,EAAlC,cAAA;AAAA,UAAA,GAAA,SAAA,GAqHuB,KAAA,MAAM,GAGN,KAAA,MAAM,KAGN,KAAA,OAAO,GAInC,KAAQ,oBAAoB,IAmCgB,KAAA,WAAW,IAGX,KAAA,WAAW,IAWvD,KAAA,UAAwB,MAGe,KAAA,YAAY,IAGtB,KAAA,cAC3B,cAEF,KAAQ,eAAwC,MAEhD,KAAiB,yBAAyB,IAAIC,EAAwC,MAAM;AAAA,MAC1F,UAAU;AAAA,MACV,SAAS;AAAA,MACT,UAAU,CAACC,GAAOC,MAAa,KAAK,YAAYD,GAAOC,CAAQ;AAAA,MAC/D,WAAW,MAAM;AAAA,MAOjB;AAAA,IAAA,CACD,GA8FD,KAAQ,uBAAuB,MAAY;AACzC,WAAK,uBAAuB,KAAA,GAC5B,KAAK,cAAA;AAAA,IACP,GAyDA,KAAiB,WAAW,CAACC,MAAmB;AAC9C,WAAK,kBAAkBA,GAAG,iBAAiB;AAAA,IAC7C,GAEA,KAAiB,YAAY,CAACA,MAAmB;AAC/C,WAAK,kBAAkBA,GAAG,kBAAkB;AAAA,IAC9C,GAwBA,KAAiB,aAAa,CAACA,MAA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