@rcarls/rc-range-slider 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +109 -0
- package/README.md +8 -0
- package/dist/custom-elements.json +83 -13
- package/dist/rc-range-slider-C_WJWoq9.js +449 -0
- package/dist/rc-range-slider-C_WJWoq9.js.map +1 -0
- package/dist/rc-range-slider-define.js +3 -1
- package/dist/rc-range-slider-define.js.map +1 -1
- package/dist/rc-range-slider.js +3 -2
- package/dist/types/packages/rc-range-slider/src/rc-range-slider.d.ts +51 -7
- package/package.json +2 -2
- package/dist/rc-range-slider-saGA_DoJ.js +0 -610
- package/dist/rc-range-slider-saGA_DoJ.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,114 @@
|
|
|
1
1
|
# @rcarls/rc-range-slider
|
|
2
2
|
|
|
3
|
+
## 0.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 54d9ead: Localize every component's built-in text. Button names, role
|
|
8
|
+
descriptions, announcements, and default labels now resolve per key from
|
|
9
|
+
the element's `messages` property, then from text registered with
|
|
10
|
+
`registerMessages(locale, catalog)` in `@rcarls/rc-common`, then from the
|
|
11
|
+
English defaults. The locale is the element's own `lang`, else
|
|
12
|
+
`<html lang>`; an ancestor's `lang` is ignored, because it usually marks
|
|
13
|
+
content rather than the interface. Components re-render when that locale
|
|
14
|
+
changes or new text is registered. `RcMessageCatalog` types the catalog,
|
|
15
|
+
and each package adds its scope to it.
|
|
16
|
+
|
|
17
|
+
Numbers a component formats as text follow the same locale:
|
|
18
|
+
`rc-progress`'s default percentage and `rc-splitter`'s `aria-valuetext`
|
|
19
|
+
use `Intl.NumberFormat`. `TypeaheadController` matches prefixes with an
|
|
20
|
+
`Intl.Collator`, so case and accents are ignored the way the locale
|
|
21
|
+
ignores them, and takes a `locale` option. `ItemsCollectionController`'s
|
|
22
|
+
`setCreateOption(text, label?)` takes the option's visible text from its
|
|
23
|
+
caller.
|
|
24
|
+
|
|
25
|
+
`rc-transfer-list`'s direction arrows are now decorative: screen readers
|
|
26
|
+
read only the action name, and the arrows turn over in RTL.
|
|
27
|
+
|
|
28
|
+
**Breaking:** chrome-text properties are replaced by `messages`. Migrate:
|
|
29
|
+
|
|
30
|
+
- `rc-search-bar` `clear-label` / `clearLabel` → `messages.clear`
|
|
31
|
+
- `rc-adaptive-menu` `overflow-label` / `overflowLabel` → `messages.overflow`
|
|
32
|
+
- `rc-chip-group` `show-all-label` / `showAllLabel` and `show-less-label` /
|
|
33
|
+
`showLessLabel` → `messages.showAll` and `messages.showLess`
|
|
34
|
+
- `rc-select` and `rc-combobox` `dialog-confirm-label` /
|
|
35
|
+
`dialogConfirmLabel` and `dialog-cancel-label` / `dialogCancelLabel` →
|
|
36
|
+
`messages.done` and `messages.cancel`
|
|
37
|
+
- `rc-editor-toolbar` `label` → `messages.toolbar`
|
|
38
|
+
|
|
39
|
+
Per-instance names stay attributes, but now default to `undefined` and fall
|
|
40
|
+
back to a message: `label` on `rc-adaptive-menu`, `rc-chip-group`,
|
|
41
|
+
`rc-menubar`, and `rc-splitter`; `available-label` and `selected-label`
|
|
42
|
+
on `rc-transfer-list`; `low-label` and `high-label` on `rc-range-slider`.
|
|
43
|
+
Read the resolved name from the rendered `aria-label` instead of the
|
|
44
|
+
property.
|
|
45
|
+
|
|
46
|
+
- c590dd9: Run a horizontal range slider along the inline axis, like the native range
|
|
47
|
+
input it enhances. In RTL the range grows from the right, pointer positions
|
|
48
|
+
are measured from the right edge, and ArrowLeft raises a thumb's value, as
|
|
49
|
+
the APG describes. In vertical text the slider runs from the inline start
|
|
50
|
+
(the top, or the bottom in RTL), its thumbs report
|
|
51
|
+
`aria-orientation="vertical"`, and the arrow keys move a thumb the way it
|
|
52
|
+
moves on screen, with Right always raising and Left lowering, as a native
|
|
53
|
+
range input does in Chromium. Thumbs are centered with logical margins, and
|
|
54
|
+
the floating value is centered correctly in every writing mode.
|
|
55
|
+
|
|
56
|
+
`orientation="vertical"` now follows the block axis instead of forcing a
|
|
57
|
+
physical bottom-to-top track. Its ARIA orientation, pointer mapping, arrow
|
|
58
|
+
keys, range fill, thumbs, and floating values all turn with the writing mode.
|
|
59
|
+
|
|
60
|
+
### Patch Changes
|
|
61
|
+
|
|
62
|
+
- 5c006de: Ship component CSS minified. Package builds now run the CSS in Lit `css` styles
|
|
63
|
+
and light-DOM structural styles through Lightning CSS, removing comments and
|
|
64
|
+
whitespace while keeping source maps that resolve to each template. Rendered
|
|
65
|
+
styles are unchanged.
|
|
66
|
+
|
|
67
|
+
`@rcarls/rc-common` adds `cssText`, an identity tag that marks a plain CSS
|
|
68
|
+
string for minification. `rc-chip`, `rc-disclosure`, and `rc-accordion` now
|
|
69
|
+
depend on `@rcarls/rc-common` for it.
|
|
70
|
+
|
|
71
|
+
- b764a3c: Observe interface locale changes through containing shadow roots and the host's own document.
|
|
72
|
+
An explicit empty `lang` now means an unknown locale rather than falling back to `<html lang>`.
|
|
73
|
+
Typeahead compares complete grapheme prefixes, including decomposed accents and collation
|
|
74
|
+
expansions. Default interpolating messages format numeric positions in the interface locale
|
|
75
|
+
while translation callbacks continue to receive numbers and can accept an optional locale.
|
|
76
|
+
Default messages isolate consumer text whose direction is unknown. Textarea content direction
|
|
77
|
+
uses the native LTR fallback for neutral `dir="auto"` content, recognizes Arabic Letter Mark and
|
|
78
|
+
isolate controls, and reruns plugins when the native textarea's `lang` or `dir` changes.
|
|
79
|
+
- Updated dependencies [e3dfa59]
|
|
80
|
+
- Updated dependencies [50d5610]
|
|
81
|
+
- Updated dependencies [9ee769c]
|
|
82
|
+
- Updated dependencies [1179f24]
|
|
83
|
+
- Updated dependencies [595fe37]
|
|
84
|
+
- Updated dependencies [38cd00c]
|
|
85
|
+
- Updated dependencies [5c006de]
|
|
86
|
+
- Updated dependencies [a6553ff]
|
|
87
|
+
- Updated dependencies [2205478]
|
|
88
|
+
- Updated dependencies [4341311]
|
|
89
|
+
- Updated dependencies [899bb5e]
|
|
90
|
+
- Updated dependencies [25fcfe0]
|
|
91
|
+
- Updated dependencies [51f6403]
|
|
92
|
+
- Updated dependencies [9caca6b]
|
|
93
|
+
- Updated dependencies [b764a3c]
|
|
94
|
+
- Updated dependencies [54d9ead]
|
|
95
|
+
- Updated dependencies [b9175e9]
|
|
96
|
+
- Updated dependencies [c8b762b]
|
|
97
|
+
- Updated dependencies [55e1e7f]
|
|
98
|
+
- Updated dependencies [f1ca82d]
|
|
99
|
+
- Updated dependencies [b87f27b]
|
|
100
|
+
- Updated dependencies [32ebead]
|
|
101
|
+
- Updated dependencies [bfefedd]
|
|
102
|
+
- Updated dependencies [c130173]
|
|
103
|
+
- Updated dependencies [11680b6]
|
|
104
|
+
- Updated dependencies [223d36c]
|
|
105
|
+
- Updated dependencies [7b91a44]
|
|
106
|
+
- Updated dependencies [aa04ead]
|
|
107
|
+
- Updated dependencies [ac65b5b]
|
|
108
|
+
- Updated dependencies [afcfef8]
|
|
109
|
+
- Updated dependencies [11ef1ad]
|
|
110
|
+
- @rcarls/rc-common@0.7.0
|
|
111
|
+
|
|
3
112
|
## 0.6.0
|
|
4
113
|
|
|
5
114
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -48,3 +48,11 @@ Consumers can decorate the track with a real named slot:
|
|
|
48
48
|
Visual thumb styling belongs to CSS parts, not native input pseudo-elements,
|
|
49
49
|
because the upgraded interaction surface is custom shadow DOM. The fallback
|
|
50
50
|
inputs remain ordinary native range controls before the component upgrades.
|
|
51
|
+
|
|
52
|
+
## Localization
|
|
53
|
+
|
|
54
|
+
Built-in text follows the element's own `lang`, else `<html lang>`, and never an
|
|
55
|
+
ancestor's `lang`, which usually marks content. Override it per element with the
|
|
56
|
+
`messages` property, or for every instance with `registerMessages()` from
|
|
57
|
+
`@rcarls/rc-common` under `rc-range-slider`. Keys: `low`, `high`. They name a thumb only when neither its input nor `low-label`/`high-label` does. See the
|
|
58
|
+
[rc-common Localization section](https://github.com/richardcarls/rc-webcomponents/tree/develop/packages/rc-common#localization).
|
|
@@ -44,9 +44,16 @@
|
|
|
44
44
|
"kind": "javascript-module",
|
|
45
45
|
"path": "src/rc-range-slider.ts",
|
|
46
46
|
"declarations": [
|
|
47
|
+
{
|
|
48
|
+
"kind": "variable",
|
|
49
|
+
"name": "DEFAULT_RANGE_SLIDER_MESSAGES",
|
|
50
|
+
"type": {
|
|
51
|
+
"text": "Readonly<RCRangeSliderMessages>"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
47
54
|
{
|
|
48
55
|
"kind": "class",
|
|
49
|
-
"description": "Two-thumb range slider backed by native range inputs for min/max values, following the\nWAI-ARIA Multi-Thumb Slider pattern.\n\nConsumers provide two direct child `<input type=\"range\">` elements. Before\nupgrade, those inputs are the usable progressive-enhancement fallback. After\nupgrade, the inputs remain in light DOM as hidden form reflectors while the\nshadow thumbs become the focusable, accessible interaction surface.\n\nForm participation is handled natively by each input's `name` attribute
|
|
56
|
+
"description": "Two-thumb range slider backed by native range inputs for min/max values, following the\nWAI-ARIA Multi-Thumb Slider pattern.\n\nConsumers provide two direct child `<input type=\"range\">` elements. Before\nupgrade, those inputs are the usable progressive-enhancement fallback. After\nupgrade, the inputs remain in light DOM as hidden form reflectors while the\nshadow thumbs become the focusable, accessible interaction surface.\n\nForm participation is handled natively by each input's `name` attribute.\n\nBuilt-in text (the default thumb names) follows the element's own `lang`, else\n`<html lang>`: per element through `messages`, or for every instance\nthrough `registerMessages()` from `@rcarls/rc-common` under `rc-range-slider`.",
|
|
50
57
|
"name": "RCRangeSlider",
|
|
51
58
|
"cssProperties": [
|
|
52
59
|
{
|
|
@@ -298,24 +305,37 @@
|
|
|
298
305
|
"attribute": "readonly",
|
|
299
306
|
"reflects": true
|
|
300
307
|
},
|
|
308
|
+
{
|
|
309
|
+
"kind": "field",
|
|
310
|
+
"name": "messages",
|
|
311
|
+
"type": {
|
|
312
|
+
"text": "Partial<RCRangeSliderMessages> | undefined"
|
|
313
|
+
},
|
|
314
|
+
"description": "Built-in text overrides; unset keys fall back to registered text, then English."
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
"kind": "field",
|
|
318
|
+
"name": "_messages",
|
|
319
|
+
"privacy": "private",
|
|
320
|
+
"readonly": true,
|
|
321
|
+
"default": "new MessagesController( this, 'rc-range-slider', DEFAULT_RANGE_SLIDER_MESSAGES, { overrides: () => this.messages, }, )"
|
|
322
|
+
},
|
|
301
323
|
{
|
|
302
324
|
"kind": "field",
|
|
303
325
|
"name": "lowLabel",
|
|
304
326
|
"type": {
|
|
305
|
-
"text": "string"
|
|
327
|
+
"text": "string | undefined"
|
|
306
328
|
},
|
|
307
|
-
"
|
|
308
|
-
"description": "Accessible label for the low (min) thumb when the input does not provide one.",
|
|
329
|
+
"description": "Accessible label for the low (min) thumb when the input does not provide one.\nDefaults to the `low` message.",
|
|
309
330
|
"attribute": "low-label"
|
|
310
331
|
},
|
|
311
332
|
{
|
|
312
333
|
"kind": "field",
|
|
313
334
|
"name": "highLabel",
|
|
314
335
|
"type": {
|
|
315
|
-
"text": "string"
|
|
336
|
+
"text": "string | undefined"
|
|
316
337
|
},
|
|
317
|
-
"
|
|
318
|
-
"description": "Accessible label for the high (max) thumb when the input does not provide one.",
|
|
338
|
+
"description": "Accessible label for the high (max) thumb when the input does not provide one.\nDefaults to the `high` message.",
|
|
319
339
|
"attribute": "high-label"
|
|
320
340
|
},
|
|
321
341
|
{
|
|
@@ -360,6 +380,14 @@
|
|
|
360
380
|
"attribute": "orientation",
|
|
361
381
|
"reflects": true
|
|
362
382
|
},
|
|
383
|
+
{
|
|
384
|
+
"kind": "field",
|
|
385
|
+
"name": "_flow",
|
|
386
|
+
"privacy": "protected",
|
|
387
|
+
"readonly": true,
|
|
388
|
+
"default": "new FlowController(this)",
|
|
389
|
+
"description": "Keeps the thumbs' aria-orientation on the orientation actually rendered."
|
|
390
|
+
},
|
|
363
391
|
{
|
|
364
392
|
"kind": "field",
|
|
365
393
|
"name": "_lowValue",
|
|
@@ -872,6 +900,42 @@
|
|
|
872
900
|
}
|
|
873
901
|
]
|
|
874
902
|
},
|
|
903
|
+
{
|
|
904
|
+
"kind": "method",
|
|
905
|
+
"name": "_axisFraction",
|
|
906
|
+
"privacy": "private",
|
|
907
|
+
"return": {
|
|
908
|
+
"type": {
|
|
909
|
+
"text": "number"
|
|
910
|
+
}
|
|
911
|
+
},
|
|
912
|
+
"parameters": [
|
|
913
|
+
{
|
|
914
|
+
"name": "e",
|
|
915
|
+
"type": {
|
|
916
|
+
"text": "PointerEvent"
|
|
917
|
+
}
|
|
918
|
+
},
|
|
919
|
+
{
|
|
920
|
+
"name": "rect",
|
|
921
|
+
"type": {
|
|
922
|
+
"text": "DOMRect"
|
|
923
|
+
}
|
|
924
|
+
}
|
|
925
|
+
],
|
|
926
|
+
"description": "How far along the layout axis a pointer is, 0 at its logical start.\nHorizontal layout uses the inline axis; vertical layout uses block."
|
|
927
|
+
},
|
|
928
|
+
{
|
|
929
|
+
"kind": "method",
|
|
930
|
+
"name": "_valueKeys",
|
|
931
|
+
"privacy": "private",
|
|
932
|
+
"return": {
|
|
933
|
+
"type": {
|
|
934
|
+
"text": "{ increase: readonly string[]; decrease: readonly string[] }"
|
|
935
|
+
}
|
|
936
|
+
},
|
|
937
|
+
"description": "The arrow keys that raise and lower the value, matching a native range\ninput. The keys along the rendered track move the thumb the way it moves\non screen. The cross-axis keys keep the native range convention: Up or\nRight raises the value."
|
|
938
|
+
},
|
|
875
939
|
{
|
|
876
940
|
"kind": "method",
|
|
877
941
|
"name": "_normalizeValue",
|
|
@@ -1054,21 +1118,19 @@
|
|
|
1054
1118
|
"fieldName": "readonly"
|
|
1055
1119
|
},
|
|
1056
1120
|
{
|
|
1057
|
-
"description": "Accessible label for the low (min) thumb when the input does not provide one.",
|
|
1121
|
+
"description": "Accessible label for the low (min) thumb when the input does not provide one.\nDefaults to the `low` message.",
|
|
1058
1122
|
"name": "low-label",
|
|
1059
1123
|
"type": {
|
|
1060
|
-
"text": "string"
|
|
1124
|
+
"text": "string | undefined"
|
|
1061
1125
|
},
|
|
1062
|
-
"default": "'Minimum'",
|
|
1063
1126
|
"fieldName": "lowLabel"
|
|
1064
1127
|
},
|
|
1065
1128
|
{
|
|
1066
|
-
"description": "Accessible label for the high (max) thumb when the input does not provide one.",
|
|
1129
|
+
"description": "Accessible label for the high (max) thumb when the input does not provide one.\nDefaults to the `high` message.",
|
|
1067
1130
|
"name": "high-label",
|
|
1068
1131
|
"type": {
|
|
1069
|
-
"text": "string"
|
|
1132
|
+
"text": "string | undefined"
|
|
1070
1133
|
},
|
|
1071
|
-
"default": "'Maximum'",
|
|
1072
1134
|
"fieldName": "highLabel"
|
|
1073
1135
|
},
|
|
1074
1136
|
{
|
|
@@ -1117,6 +1179,14 @@
|
|
|
1117
1179
|
}
|
|
1118
1180
|
],
|
|
1119
1181
|
"exports": [
|
|
1182
|
+
{
|
|
1183
|
+
"kind": "js",
|
|
1184
|
+
"name": "DEFAULT_RANGE_SLIDER_MESSAGES",
|
|
1185
|
+
"declaration": {
|
|
1186
|
+
"name": "DEFAULT_RANGE_SLIDER_MESSAGES",
|
|
1187
|
+
"module": "src/rc-range-slider.ts"
|
|
1188
|
+
}
|
|
1189
|
+
},
|
|
1120
1190
|
{
|
|
1121
1191
|
"kind": "js",
|
|
1122
1192
|
"name": "RCRangeSlider",
|