@nldd/design-system 0.13.1 → 0.13.2
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/NOTICES.md +18 -1
- package/README.md +32 -24
- package/custom-elements.json +1046 -6
- package/dist/components/actions/button-group/button-group.d.ts +22 -7
- package/dist/components/actions/button-group/button-group.d.ts.map +1 -1
- package/dist/components/actions/button-group/button-group.js +38 -19
- package/dist/components/actions/button-group/button-group.js.map +1 -1
- package/dist/components/actions/button-group/button-group.styles.d.ts.map +1 -1
- package/dist/components/actions/button-group/button-group.styles.js +43 -18
- package/dist/components/actions/button-group/button-group.styles.js.map +1 -1
- package/dist/components/actions/button-group/button-group.template.js +1 -1
- package/dist/components/actions/button-group/button-group.template.js.map +1 -1
- package/dist/components/actions/menu/menu.d.ts +14 -0
- package/dist/components/actions/menu/menu.d.ts.map +1 -1
- package/dist/components/actions/menu/menu.js +41 -0
- package/dist/components/actions/menu/menu.js.map +1 -1
- package/dist/components/components.js +2432 -97
- package/dist/components/content/avatar-group/avatar-group.styles.d.ts.map +1 -1
- package/dist/components/content/avatar-group/avatar-group.styles.js +12 -1
- package/dist/components/content/avatar-group/avatar-group.styles.js.map +1 -1
- package/dist/components/content/icon/icon-aliases.d.ts.map +1 -1
- package/dist/components/content/icon/icon-aliases.js +10 -5
- package/dist/components/content/icon/icon-aliases.js.map +1 -1
- package/dist/components/content/icon/icon-gallery-status.d.ts.map +1 -1
- package/dist/components/content/icon/icon-gallery-status.js +4 -0
- package/dist/components/content/icon/icon-gallery-status.js.map +1 -1
- package/dist/components/content/icon/icon-registry.d.ts.map +1 -1
- package/dist/components/content/icon/icon-registry.js +4 -2
- package/dist/components/content/icon/icon-registry.js.map +1 -1
- package/dist/components/content/text/text.d.ts +1 -1
- package/dist/components/content/text/text.js +1 -1
- package/dist/components/content/text/text.styles.d.ts.map +1 -1
- package/dist/components/content/text/text.styles.js +104 -1
- package/dist/components/content/text/text.styles.js.map +1 -1
- package/dist/components/content/token/token.styles.d.ts.map +1 -1
- package/dist/components/content/token/token.styles.js +2 -1
- package/dist/components/content/token/token.styles.js.map +1 -1
- package/dist/components/content/tooltip/tooltip.styles.js +7 -7
- package/dist/components/forms/form-field/form-field.d.ts +9 -5
- package/dist/components/forms/form-field/form-field.d.ts.map +1 -1
- package/dist/components/forms/form-field/form-field.js +17 -6
- package/dist/components/forms/form-field/form-field.js.map +1 -1
- package/dist/components/{icon-DZ1UXCzO.js → icon-DRpTWSIg.js} +12 -6
- package/dist/components/{icon-button-984CwkU1.js → icon-button-DUEmWlBD.js} +8 -8
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/inputs/file-field/file-field.d.ts +12 -0
- package/dist/components/inputs/file-field/file-field.d.ts.map +1 -1
- package/dist/components/inputs/file-field/file-field.i18n.d.ts +1 -0
- package/dist/components/inputs/file-field/file-field.i18n.d.ts.map +1 -1
- package/dist/components/inputs/file-field/file-field.i18n.js +1 -0
- package/dist/components/inputs/file-field/file-field.i18n.js.map +1 -1
- package/dist/components/inputs/file-field/file-field.js +28 -9
- package/dist/components/inputs/file-field/file-field.js.map +1 -1
- package/dist/components/inputs/file-field/file-field.styles.d.ts.map +1 -1
- package/dist/components/inputs/file-field/file-field.styles.js +91 -8
- package/dist/components/inputs/file-field/file-field.styles.js.map +1 -1
- package/dist/components/inputs/file-field/file-field.template.d.ts +1 -0
- package/dist/components/inputs/file-field/file-field.template.d.ts.map +1 -1
- package/dist/components/inputs/file-field/file-field.template.js +51 -21
- package/dist/components/inputs/file-field/file-field.template.js.map +1 -1
- package/dist/components/inputs/slider/slider.d.ts +161 -0
- package/dist/components/inputs/slider/slider.d.ts.map +1 -0
- package/dist/components/inputs/slider/slider.i18n.d.ts +6 -0
- package/dist/components/inputs/slider/slider.i18n.d.ts.map +1 -0
- package/dist/components/inputs/slider/slider.i18n.js +5 -0
- package/dist/components/inputs/slider/slider.i18n.js.map +1 -0
- package/dist/components/inputs/slider/slider.js +436 -0
- package/dist/components/inputs/slider/slider.js.map +1 -0
- package/dist/components/inputs/slider/slider.styles.d.ts +2 -0
- package/dist/components/inputs/slider/slider.styles.d.ts.map +1 -0
- package/dist/components/inputs/slider/slider.styles.js +360 -0
- package/dist/components/inputs/slider/slider.styles.js.map +1 -0
- package/dist/components/inputs/slider/slider.template.d.ts +5 -0
- package/dist/components/inputs/slider/slider.template.d.ts.map +1 -0
- package/dist/components/inputs/slider/slider.template.js +99 -0
- package/dist/components/inputs/slider/slider.template.js.map +1 -0
- package/dist/components/layout/task-board/task-board-column.d.ts +80 -0
- package/dist/components/layout/task-board/task-board-column.d.ts.map +1 -0
- package/dist/components/layout/task-board/task-board-column.js +207 -0
- package/dist/components/layout/task-board/task-board-column.js.map +1 -0
- package/dist/components/layout/task-board/task-board-column.template.d.ts +3 -0
- package/dist/components/layout/task-board/task-board-column.template.d.ts.map +1 -0
- package/dist/components/layout/task-board/task-board-column.template.js +45 -0
- package/dist/components/layout/task-board/task-board-column.template.js.map +1 -0
- package/dist/components/layout/task-board/task-board.d.ts +169 -0
- package/dist/components/layout/task-board/task-board.d.ts.map +1 -0
- package/dist/components/layout/task-board/task-board.i18n.d.ts +11 -0
- package/dist/components/layout/task-board/task-board.i18n.d.ts.map +1 -0
- package/dist/components/layout/task-board/task-board.i18n.js +10 -0
- package/dist/components/layout/task-board/task-board.i18n.js.map +1 -0
- package/dist/components/layout/task-board/task-board.js +701 -0
- package/dist/components/layout/task-board/task-board.js.map +1 -0
- package/dist/components/layout/task-board/task-board.styles.d.ts +3 -0
- package/dist/components/layout/task-board/task-board.styles.d.ts.map +1 -0
- package/dist/components/layout/task-board/task-board.styles.js +259 -0
- package/dist/components/layout/task-board/task-board.styles.js.map +1 -0
- package/dist/components/layout/task-board/task-board.template.d.ts +3 -0
- package/dist/components/layout/task-board/task-board.template.d.ts.map +1 -0
- package/dist/components/layout/task-board/task-board.template.js +25 -0
- package/dist/components/layout/task-board/task-board.template.js.map +1 -0
- package/dist/components/navigation/link/link.d.ts +5 -0
- package/dist/components/navigation/link/link.d.ts.map +1 -1
- package/dist/components/navigation/link/link.js +20 -1
- package/dist/components/navigation/link/link.js.map +1 -1
- package/dist/components/navigation/link/link.template.d.ts +1 -0
- package/dist/components/navigation/link/link.template.d.ts.map +1 -1
- package/dist/components/navigation/link/link.template.js +16 -14
- package/dist/components/navigation/link/link.template.js.map +1 -1
- package/dist/components/navigation/tab-bar/tab-bar.template.js +1 -1
- package/dist/css/{global-system-font.css → global-open-font.css} +2 -0
- package/dist/css/global.css +1 -0
- package/dist/css/inter-font.css +47 -0
- package/dist/css/jetbrains-mono-font.css +22 -0
- package/dist/css/rijksoverheid-fonts.css +4 -21
- package/dist/css/themes/bruin.css +1 -0
- package/dist/css/themes/donkerblauw.css +1 -0
- package/dist/css/themes/donkerbruin.css +1 -0
- package/dist/css/themes/donkergeel.css +1 -0
- package/dist/css/themes/donkergroen.css +1 -0
- package/dist/css/themes/geel.css +1 -0
- package/dist/css/themes/groen.css +1 -0
- package/dist/css/themes/hemelblauw.css +1 -0
- package/dist/css/themes/lichtblauw.css +1 -0
- package/dist/css/themes/mintgroen.css +1 -0
- package/dist/css/themes/mosgroen.css +1 -0
- package/dist/css/themes/oranje.css +1 -0
- package/dist/css/themes/paars.css +1 -0
- package/dist/css/themes/robijnrood.css +1 -0
- package/dist/css/themes/rood.css +1 -0
- package/dist/css/themes/roze.css +1 -0
- package/dist/css/themes/violet.css +1 -0
- package/dist/css/themes.css +17 -0
- package/dist/css/tokens.css +1 -0
- package/dist/css/variables.css +27 -5
- package/dist/fonts/Inter-Latin-Italic[wght].woff2 +0 -0
- package/dist/fonts/Inter-LatinExt-Italic[wght].woff2 +0 -0
- package/dist/fonts/Inter-LatinExt[wght].woff2 +0 -0
- package/dist/fonts/Inter-Latin[wght].woff2 +0 -0
- package/dist/nldd.min.js +1765 -804
- package/dist/translations/en-US.d.ts.map +1 -1
- package/dist/translations/en-US.js +10 -0
- package/dist/translations/en-US.js.map +1 -1
- package/dist/translations/nl.generated.d.ts +10 -0
- package/dist/translations/nl.generated.d.ts.map +1 -1
- package/dist/translations/nl.generated.js +4 -0
- package/dist/translations/nl.generated.js.map +1 -1
- package/dist/types/vue.d.ts +107 -3
- package/dist/utilities/tab-order.d.ts +11 -0
- package/dist/utilities/tab-order.d.ts.map +1 -0
- package/dist/utilities/tab-order.js +55 -0
- package/dist/utilities/tab-order.js.map +1 -0
- package/package.json +12 -3
|
@@ -0,0 +1,436 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Nederlandse Digitale Dienst Slider Component (Lit + TypeScript)
|
|
9
|
+
*
|
|
10
|
+
* A value picked along a track, by dragging its thumb, pressing the track or
|
|
11
|
+
* with the arrow keys. With `range` it picks a range instead, with a thumb for
|
|
12
|
+
* each end. The names follow Apple's: the track, the thumb, and the minimum
|
|
13
|
+
* track, the part filled up to the thumb, or between the thumbs of a range.
|
|
14
|
+
*
|
|
15
|
+
* A slider is for a value that may be roughly right, such as a filter ("a
|
|
16
|
+
* price between …"). For a value that has to be exact, an `nldd-number-field`
|
|
17
|
+
* is easier: a thumb is hard to put on one number, the more so with a hand
|
|
18
|
+
* that is not steady.
|
|
19
|
+
*
|
|
20
|
+
* It is built on native range inputs, so the keyboard (arrows, Page Up and
|
|
21
|
+
* Page Down, Home and End), touch, the form and a screen reader work as they do
|
|
22
|
+
* for any slider. A range is two of them over each other, each with its own
|
|
23
|
+
* name for a screen reader ("Prijs, minimum"), and a press on the track moves
|
|
24
|
+
* the nearer thumb there. The thumbs do not pass each other; where they lie
|
|
25
|
+
* on one value, the first move picks one, to the left the start one.
|
|
26
|
+
*
|
|
27
|
+
* The value shows in a tooltip above the thumb while the pointer is over the
|
|
28
|
+
* slider, while a thumb has keyboard focus and while it is dragged; with
|
|
29
|
+
* `tooltip-timing="never"` it does not, for a slider whose value already shows
|
|
30
|
+
* elsewhere. Where the
|
|
31
|
+
* two tooltips of a range would overlap, they show as one ("200 – 1.200").
|
|
32
|
+
* `formatValue` turns a number into the text of the tooltip and of what a
|
|
33
|
+
* screen reader hears, such as `(value) => \`€ ${value}\``; without it the
|
|
34
|
+
* number is written the Dutch way.
|
|
35
|
+
*
|
|
36
|
+
* `histogram` draws counts as bars above the track, such as how many results
|
|
37
|
+
* there are at each price, so the range can be chosen with the spread in view.
|
|
38
|
+
* Give one count per bucket: n counts split min to max into n equal buckets of
|
|
39
|
+
* (max - min) / n, the first count for the first bucket. Only the proportions
|
|
40
|
+
* matter (the highest count is the full height), a 0 is an empty bucket, and
|
|
41
|
+
* 20 to 40 buckets read best, whatever the `step`. A bar whose middle lies
|
|
42
|
+
* within the chosen value or range is colored. The bars are decoration for a
|
|
43
|
+
* screen reader: say what they show in the text around it.
|
|
44
|
+
*
|
|
45
|
+
* In a form a slider submits its value under `name`; a range submits both ends
|
|
46
|
+
* under it, the start first.
|
|
47
|
+
*
|
|
48
|
+
* @element nldd-slider
|
|
49
|
+
* @attr {string} size - Slider size: 'xs' | 'sm' | 'md' (default: 'md'), with the height of the other controls of that size. Set automatically by nldd-form-field.
|
|
50
|
+
* @attr {boolean} range - Picks a range, with a thumb for each end: `start-value` and `end-value` in place of `value`
|
|
51
|
+
* @attr {string} histogram - Counts drawn as bars above the track, one per bucket of (max - min) / n, comma- or space-separated; as a property, an array of numbers. The bars within the chosen value or range are colored.
|
|
52
|
+
* @attr {string} start-icon - Icon at the start of the track, such as a quiet speaker for a volume
|
|
53
|
+
* @attr {string} end-icon - Icon at the end of the track
|
|
54
|
+
* @attr {string} accessible-label - Accessible name; a range adds "minimum" and "maximum" to it for its thumbs. Set automatically by nldd-form-field.
|
|
55
|
+
* @attr {string} tooltip-timing - When the value shows above the thumb: 'instant' (the default: on hover, keyboard focus and while dragging) or 'never', for a slider whose value shows elsewhere, such as in fields above it
|
|
56
|
+
* @attr {boolean} invalid - Marks the control as invalid. Announced with aria-invalid; nothing is drawn for it.
|
|
57
|
+
* @attr {boolean} disabled - Disabled state
|
|
58
|
+
* @attr {string} name - Name for form submission
|
|
59
|
+
* @attr {number} value - The value (default: the middle between min and max)
|
|
60
|
+
* @attr {number} start-value - The start of a range (default: min)
|
|
61
|
+
* @attr {number} end-value - The end of a range (default: max)
|
|
62
|
+
* @attr {number} min - Smallest value (default: 0)
|
|
63
|
+
* @attr {number} max - Largest value (default: 100)
|
|
64
|
+
* @attr {number} step - Step between values (default: 1)
|
|
65
|
+
* @attr {object} translations - Override translation keys; unset keys fall back to Dutch
|
|
66
|
+
*
|
|
67
|
+
* @prop {(value: number) => string} formatValue - Turns a value into the text of its tooltip and of what a screen reader hears
|
|
68
|
+
*
|
|
69
|
+
* @fires input - While a thumb moves; detail: { value } or, with `range`, { startValue, endValue }
|
|
70
|
+
* @fires change - When a thumb is let go, or a key moved it; detail as for input
|
|
71
|
+
*/
|
|
72
|
+
import { LitElement } from 'lit';
|
|
73
|
+
import { customElement, property, queryAll, state } from 'lit/decorators.js';
|
|
74
|
+
import { FormAssociated } from '../../../utilities/form-associated-mixin.js';
|
|
75
|
+
import { DescribedBy } from '../../../utilities/described-by-mixin.js';
|
|
76
|
+
import { reflectNonDefault } from '../../../utilities/reflect-non-default.js';
|
|
77
|
+
import { translate } from '../../../utilities/translations.js';
|
|
78
|
+
import { nlddSliderTranslations } from './slider.i18n.js';
|
|
79
|
+
import { sliderStyles } from './slider.styles.js';
|
|
80
|
+
import { sliderTemplate } from './slider.template.js';
|
|
81
|
+
const NUMBER = new Intl.NumberFormat('nl-NL', { maximumFractionDigits: 6 });
|
|
82
|
+
let NLDDSlider = class NLDDSlider extends DescribedBy(FormAssociated(LitElement)) {
|
|
83
|
+
constructor() {
|
|
84
|
+
super(...arguments);
|
|
85
|
+
// Property order matches the story controls.
|
|
86
|
+
this.size = 'md';
|
|
87
|
+
this.range = false;
|
|
88
|
+
this.histogram = [];
|
|
89
|
+
this.startIcon = '';
|
|
90
|
+
this.endIcon = '';
|
|
91
|
+
this.accessibleLabel = '';
|
|
92
|
+
this.tooltipTiming = 'instant';
|
|
93
|
+
this.invalid = false;
|
|
94
|
+
this.disabled = false;
|
|
95
|
+
this.name = '';
|
|
96
|
+
this.value = undefined;
|
|
97
|
+
this.startValue = undefined;
|
|
98
|
+
this.endValue = undefined;
|
|
99
|
+
this.min = 0;
|
|
100
|
+
this.max = 100;
|
|
101
|
+
this.step = 1;
|
|
102
|
+
this.translations = {};
|
|
103
|
+
this.formatValue = null;
|
|
104
|
+
/** @internal While a thumb is pressed or dragged, so its tooltip shows. */
|
|
105
|
+
this._active = false;
|
|
106
|
+
this._initial = {};
|
|
107
|
+
/** Lays the tooltips out again when the slider or the window changes size. */
|
|
108
|
+
this._resizeObserver = null;
|
|
109
|
+
/** The thumb a press on the track of a range moves, until it is let go. */
|
|
110
|
+
this._trackThumb = null;
|
|
111
|
+
/** Where a press on two stacked thumbs began, until a move picks one. */
|
|
112
|
+
this._stackedPress = null;
|
|
113
|
+
/** @internal */
|
|
114
|
+
this._handlePointerDown = (event) => {
|
|
115
|
+
if (this.disabled || event.button !== 0)
|
|
116
|
+
return;
|
|
117
|
+
this._active = true;
|
|
118
|
+
window.addEventListener('pointerup', this._handlePointerUp, { once: true });
|
|
119
|
+
window.addEventListener('pointercancel', this._handlePointerUp, { once: true });
|
|
120
|
+
// In a range the inputs only take a press on their thumb, so a press on
|
|
121
|
+
// the track moves the nearer thumb there, and drags it from there. Two
|
|
122
|
+
// stacked thumbs take no press either: the first move picks one.
|
|
123
|
+
if (!this.range || event.target.matches('.slider__input'))
|
|
124
|
+
return;
|
|
125
|
+
window.addEventListener('pointermove', this._handleTrackMove);
|
|
126
|
+
event.preventDefault();
|
|
127
|
+
if (this._start === this._end && this._onThumb(event.clientX)) {
|
|
128
|
+
this._stackedPress = event.clientX;
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
const value = this._valueAt(event.clientX);
|
|
132
|
+
const thumb = Math.abs(value - this._start) < Math.abs(value - this._end) || (value < this._start)
|
|
133
|
+
? 'start'
|
|
134
|
+
: 'end';
|
|
135
|
+
this._grab(thumb);
|
|
136
|
+
this._set(thumb, value);
|
|
137
|
+
this._emit('input');
|
|
138
|
+
};
|
|
139
|
+
this._handleTrackMove = (event) => {
|
|
140
|
+
if (!this.isConnected)
|
|
141
|
+
return;
|
|
142
|
+
if (this._stackedPress !== null) {
|
|
143
|
+
const moved = event.clientX - this._stackedPress;
|
|
144
|
+
if (moved === 0)
|
|
145
|
+
return;
|
|
146
|
+
const rtl = getComputedStyle(this).direction === 'rtl';
|
|
147
|
+
this._grab((moved < 0) !== rtl ? 'start' : 'end');
|
|
148
|
+
this._stackedPress = null;
|
|
149
|
+
}
|
|
150
|
+
if (!this._trackThumb)
|
|
151
|
+
return;
|
|
152
|
+
this._set(this._trackThumb, this._valueAt(event.clientX));
|
|
153
|
+
this._emit('input');
|
|
154
|
+
};
|
|
155
|
+
this._handlePointerUp = () => {
|
|
156
|
+
this._active = false;
|
|
157
|
+
const thumb = this._trackThumb;
|
|
158
|
+
this._stopPress();
|
|
159
|
+
if (thumb)
|
|
160
|
+
this._emit('change');
|
|
161
|
+
};
|
|
162
|
+
// — Tooltips —————————————————————————————————————————————————————————————
|
|
163
|
+
/** Joins the two tooltips of a range where they would overlap, and keeps a
|
|
164
|
+
* tooltip inside the window at the ends of the track. */
|
|
165
|
+
this._layoutTooltips = () => {
|
|
166
|
+
const root = this.shadowRoot;
|
|
167
|
+
const slider = root?.querySelector('.slider');
|
|
168
|
+
if (!root || !slider)
|
|
169
|
+
return;
|
|
170
|
+
const tooltips = Array.from(root.querySelectorAll('.slider__tooltip'));
|
|
171
|
+
for (const tooltip of tooltips)
|
|
172
|
+
tooltip.style.removeProperty('--_slider-tooltip-shift');
|
|
173
|
+
if (this.range && tooltips.length) {
|
|
174
|
+
const [start, end] = root.querySelectorAll('.slider__tooltip--start, .slider__tooltip--end');
|
|
175
|
+
const a = start.getBoundingClientRect();
|
|
176
|
+
const b = end.getBoundingClientRect();
|
|
177
|
+
const overlap = a.right > b.left - 4 && b.right > a.left - 4;
|
|
178
|
+
// .slider is a static class, so a render never takes this one off.
|
|
179
|
+
slider.classList.toggle('is-merged', overlap);
|
|
180
|
+
}
|
|
181
|
+
const margin = 8;
|
|
182
|
+
for (const tooltip of tooltips) {
|
|
183
|
+
const rect = tooltip.getBoundingClientRect();
|
|
184
|
+
if (!rect.width)
|
|
185
|
+
continue;
|
|
186
|
+
const shift = rect.left < margin
|
|
187
|
+
? margin - rect.left
|
|
188
|
+
: rect.right > window.innerWidth - margin ? window.innerWidth - margin - rect.right : 0;
|
|
189
|
+
if (shift)
|
|
190
|
+
tooltip.style.setProperty('--_slider-tooltip-shift', `${shift}px`);
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
/** @internal */
|
|
195
|
+
_t(key) {
|
|
196
|
+
return translate(this.translations, nlddSliderTranslations, key);
|
|
197
|
+
}
|
|
198
|
+
// — Values ———————————————————————————————————————————————————————————————
|
|
199
|
+
/** @internal The value of a single slider, settled within min and max. */
|
|
200
|
+
get _value() {
|
|
201
|
+
return this._snap(this.value ?? (this.min + this.max) / 2);
|
|
202
|
+
}
|
|
203
|
+
/** @internal The start of a range. */
|
|
204
|
+
get _start() {
|
|
205
|
+
return Math.min(this._snap(this.startValue ?? this.min), this._end);
|
|
206
|
+
}
|
|
207
|
+
/** @internal The end of a range. */
|
|
208
|
+
get _end() {
|
|
209
|
+
return this._snap(this.endValue ?? this.max);
|
|
210
|
+
}
|
|
211
|
+
/** @internal Where a value sits along the track, from 0 to 1. */
|
|
212
|
+
_fraction(value) {
|
|
213
|
+
return this.max > this.min ? (value - this.min) / (this.max - this.min) : 0;
|
|
214
|
+
}
|
|
215
|
+
/** @internal A value as the tooltip and a screen reader say it. */
|
|
216
|
+
_format(value) {
|
|
217
|
+
return this.formatValue ? this.formatValue(value) : NUMBER.format(value);
|
|
218
|
+
}
|
|
219
|
+
/** @internal The name of a thumb for a screen reader. */
|
|
220
|
+
_label(thumb) {
|
|
221
|
+
if (thumb === 'value')
|
|
222
|
+
return this.accessibleLabel || undefined;
|
|
223
|
+
const end = this._t(thumb === 'start' ? 'components.slider.start-value-label' : 'components.slider.end-value-label');
|
|
224
|
+
return this.accessibleLabel ? `${this.accessibleLabel}, ${end.toLowerCase()}` : end;
|
|
225
|
+
}
|
|
226
|
+
/** Rounds to the nearest step and keeps it within min and max. */
|
|
227
|
+
_snap(value) {
|
|
228
|
+
const step = this.step > 0 ? this.step : 1;
|
|
229
|
+
const snapped = this.min + Math.round((value - this.min) / step) * step;
|
|
230
|
+
// Steps such as 0.1 add up to 0.30000000000000004 otherwise.
|
|
231
|
+
const decimals = (String(step).split('.')[1] ?? '').length;
|
|
232
|
+
return Math.max(this.min, Math.min(this.max, Number(snapped.toFixed(decimals))));
|
|
233
|
+
}
|
|
234
|
+
// — Form —————————————————————————————————————————————————————————————————
|
|
235
|
+
connectedCallback() {
|
|
236
|
+
super.connectedCallback();
|
|
237
|
+
if (!this.hasUpdated)
|
|
238
|
+
this._initial = { value: this.value, startValue: this.startValue, endValue: this.endValue };
|
|
239
|
+
this._resizeObserver = new ResizeObserver(this._layoutTooltips);
|
|
240
|
+
this._resizeObserver.observe(this);
|
|
241
|
+
window.addEventListener('resize', this._layoutTooltips);
|
|
242
|
+
}
|
|
243
|
+
disconnectedCallback() {
|
|
244
|
+
super.disconnectedCallback();
|
|
245
|
+
this._resizeObserver?.disconnect();
|
|
246
|
+
this._resizeObserver = null;
|
|
247
|
+
window.removeEventListener('resize', this._layoutTooltips);
|
|
248
|
+
// Taken out mid-press: the release never reaches it.
|
|
249
|
+
this._stopPress();
|
|
250
|
+
this._active = false;
|
|
251
|
+
}
|
|
252
|
+
formValue() {
|
|
253
|
+
if (!this.range)
|
|
254
|
+
return String(this._value);
|
|
255
|
+
if (!this.name)
|
|
256
|
+
return null;
|
|
257
|
+
const data = new FormData();
|
|
258
|
+
data.append(this.name, String(this._start));
|
|
259
|
+
data.append(this.name, String(this._end));
|
|
260
|
+
return data;
|
|
261
|
+
}
|
|
262
|
+
formResetCallback() {
|
|
263
|
+
this.value = this._initial.value;
|
|
264
|
+
this.startValue = this._initial.startValue;
|
|
265
|
+
this.endValue = this._initial.endValue;
|
|
266
|
+
}
|
|
267
|
+
formStateRestoreCallback(state) {
|
|
268
|
+
// A restored state that is not a number keeps the value as it was.
|
|
269
|
+
const number = (entry) => {
|
|
270
|
+
const value = parseFloat(String(entry));
|
|
271
|
+
return Number.isFinite(value) ? value : undefined;
|
|
272
|
+
};
|
|
273
|
+
if (typeof state === 'string')
|
|
274
|
+
this.value = number(state) ?? this.value;
|
|
275
|
+
if (state instanceof FormData && this.name) {
|
|
276
|
+
const [start, end] = state.getAll(this.name).map(number);
|
|
277
|
+
this.startValue = start ?? this.startValue;
|
|
278
|
+
this.endValue = end ?? this.endValue;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
updated(changed) {
|
|
282
|
+
super.updated?.(changed);
|
|
283
|
+
this._layoutTooltips();
|
|
284
|
+
}
|
|
285
|
+
/** Moves focus to the thumb (the start one of a range). */
|
|
286
|
+
focus(options) {
|
|
287
|
+
this._inputs?.[0]?.focus(options);
|
|
288
|
+
}
|
|
289
|
+
describedTarget() {
|
|
290
|
+
return this.shadowRoot?.querySelector('.slider__input') ?? null;
|
|
291
|
+
}
|
|
292
|
+
// — Events ———————————————————————————————————————————————————————————————
|
|
293
|
+
/** @internal */
|
|
294
|
+
_handleInput(event, thumb) {
|
|
295
|
+
// The native input event crosses the shadow root; the host fires its own.
|
|
296
|
+
event.stopPropagation();
|
|
297
|
+
this._set(thumb, parseFloat(event.target.value), event.target);
|
|
298
|
+
this._emit('input');
|
|
299
|
+
}
|
|
300
|
+
/** @internal */
|
|
301
|
+
_handleChange(event) {
|
|
302
|
+
event.stopPropagation();
|
|
303
|
+
this._emit('change');
|
|
304
|
+
}
|
|
305
|
+
/** Makes a thumb the one a press drags, and gives it focus. */
|
|
306
|
+
_grab(thumb) {
|
|
307
|
+
this._trackThumb = thumb;
|
|
308
|
+
this.shadowRoot?.querySelector(`.slider__input--${thumb}`)?.focus();
|
|
309
|
+
}
|
|
310
|
+
/** Ends a press: its listeners on the window, and the thumb it drags. */
|
|
311
|
+
_stopPress() {
|
|
312
|
+
window.removeEventListener('pointermove', this._handleTrackMove);
|
|
313
|
+
window.removeEventListener('pointerup', this._handlePointerUp);
|
|
314
|
+
window.removeEventListener('pointercancel', this._handlePointerUp);
|
|
315
|
+
this._trackThumb = null;
|
|
316
|
+
this._stackedPress = null;
|
|
317
|
+
}
|
|
318
|
+
/** The value under a point of the track, the way the native thumb places it. */
|
|
319
|
+
_valueAt(x) {
|
|
320
|
+
const control = this.shadowRoot.querySelector('.slider__control');
|
|
321
|
+
const rect = control.getBoundingClientRect();
|
|
322
|
+
const thumb = parseFloat(getComputedStyle(control).getPropertyValue('--_slider-thumb-size')) || 0;
|
|
323
|
+
let fraction = (x - rect.left - thumb / 2) / Math.max(1, rect.width - thumb);
|
|
324
|
+
if (getComputedStyle(this).direction === 'rtl')
|
|
325
|
+
fraction = 1 - fraction;
|
|
326
|
+
return this._snap(this.min + Math.max(0, Math.min(1, fraction)) * (this.max - this.min));
|
|
327
|
+
}
|
|
328
|
+
/** Whether a point lies on the pressable area of the stacked thumbs. */
|
|
329
|
+
_onThumb(x) {
|
|
330
|
+
const control = this.shadowRoot.querySelector('.slider__control');
|
|
331
|
+
const rect = control.getBoundingClientRect();
|
|
332
|
+
const style = getComputedStyle(control);
|
|
333
|
+
const thumb = parseFloat(style.getPropertyValue('--_slider-thumb-size')) || 0;
|
|
334
|
+
const hit = parseFloat(style.getPropertyValue('--_slider-thumb-hit-size')) || thumb;
|
|
335
|
+
let fraction = this._fraction(this._start);
|
|
336
|
+
if (getComputedStyle(this).direction === 'rtl')
|
|
337
|
+
fraction = 1 - fraction;
|
|
338
|
+
return Math.abs(x - (rect.left + thumb / 2 + (rect.width - thumb) * fraction)) <= hit / 2;
|
|
339
|
+
}
|
|
340
|
+
/** Sets a thumb, keeps the thumbs of a range from passing each other, and
|
|
341
|
+
* puts the native input back where the value landed. */
|
|
342
|
+
_set(thumb, raw, input) {
|
|
343
|
+
const value = this._snap(raw);
|
|
344
|
+
if (thumb === 'value')
|
|
345
|
+
this.value = value;
|
|
346
|
+
if (thumb === 'start')
|
|
347
|
+
this.startValue = Math.min(value, this._end);
|
|
348
|
+
if (thumb === 'end')
|
|
349
|
+
this.endValue = Math.max(value, this._start);
|
|
350
|
+
const settled = thumb === 'value' ? this.value : thumb === 'start' ? this.startValue : this.endValue;
|
|
351
|
+
if (input && parseFloat(input.value) !== settled)
|
|
352
|
+
input.value = String(settled);
|
|
353
|
+
this.commitFormValue();
|
|
354
|
+
}
|
|
355
|
+
_emit(type) {
|
|
356
|
+
const detail = this.range ? { startValue: this._start, endValue: this._end } : { value: this._value };
|
|
357
|
+
this.dispatchEvent(new CustomEvent(type, { detail, bubbles: true, composed: true }));
|
|
358
|
+
}
|
|
359
|
+
render() {
|
|
360
|
+
return sliderTemplate(this);
|
|
361
|
+
}
|
|
362
|
+
};
|
|
363
|
+
NLDDSlider.styles = sliderStyles;
|
|
364
|
+
/** Says this is the control an nldd-form-field is about, so the field can
|
|
365
|
+
* find it, name it and move focus into it. See nldd-form-field. */
|
|
366
|
+
NLDDSlider.isFormInput = true;
|
|
367
|
+
__decorate([
|
|
368
|
+
property({ reflect: true, converter: reflectNonDefault('md') })
|
|
369
|
+
], NLDDSlider.prototype, "size", void 0);
|
|
370
|
+
__decorate([
|
|
371
|
+
property({ type: Boolean, reflect: true })
|
|
372
|
+
], NLDDSlider.prototype, "range", void 0);
|
|
373
|
+
__decorate([
|
|
374
|
+
property({
|
|
375
|
+
converter: {
|
|
376
|
+
fromAttribute: (value) => (value ?? '').split(/[\s,]+/).filter(Boolean).map(Number).filter((n) => Number.isFinite(n)),
|
|
377
|
+
toAttribute: (value) => value.join(','),
|
|
378
|
+
},
|
|
379
|
+
})
|
|
380
|
+
], NLDDSlider.prototype, "histogram", void 0);
|
|
381
|
+
__decorate([
|
|
382
|
+
property({ type: String, attribute: 'start-icon' })
|
|
383
|
+
], NLDDSlider.prototype, "startIcon", void 0);
|
|
384
|
+
__decorate([
|
|
385
|
+
property({ type: String, attribute: 'end-icon' })
|
|
386
|
+
], NLDDSlider.prototype, "endIcon", void 0);
|
|
387
|
+
__decorate([
|
|
388
|
+
property({ type: String, attribute: 'accessible-label' })
|
|
389
|
+
], NLDDSlider.prototype, "accessibleLabel", void 0);
|
|
390
|
+
__decorate([
|
|
391
|
+
property({ reflect: true, attribute: 'tooltip-timing', converter: reflectNonDefault('instant') })
|
|
392
|
+
], NLDDSlider.prototype, "tooltipTiming", void 0);
|
|
393
|
+
__decorate([
|
|
394
|
+
property({ type: Boolean, reflect: true })
|
|
395
|
+
], NLDDSlider.prototype, "invalid", void 0);
|
|
396
|
+
__decorate([
|
|
397
|
+
property({ type: Boolean, reflect: true })
|
|
398
|
+
], NLDDSlider.prototype, "disabled", void 0);
|
|
399
|
+
__decorate([
|
|
400
|
+
property({ reflect: true, converter: reflectNonDefault('') })
|
|
401
|
+
], NLDDSlider.prototype, "name", void 0);
|
|
402
|
+
__decorate([
|
|
403
|
+
property({ type: Number })
|
|
404
|
+
], NLDDSlider.prototype, "value", void 0);
|
|
405
|
+
__decorate([
|
|
406
|
+
property({ type: Number, attribute: 'start-value' })
|
|
407
|
+
], NLDDSlider.prototype, "startValue", void 0);
|
|
408
|
+
__decorate([
|
|
409
|
+
property({ type: Number, attribute: 'end-value' })
|
|
410
|
+
], NLDDSlider.prototype, "endValue", void 0);
|
|
411
|
+
__decorate([
|
|
412
|
+
property({ type: Number })
|
|
413
|
+
], NLDDSlider.prototype, "min", void 0);
|
|
414
|
+
__decorate([
|
|
415
|
+
property({ type: Number })
|
|
416
|
+
], NLDDSlider.prototype, "max", void 0);
|
|
417
|
+
__decorate([
|
|
418
|
+
property({ type: Number })
|
|
419
|
+
], NLDDSlider.prototype, "step", void 0);
|
|
420
|
+
__decorate([
|
|
421
|
+
property({ type: Object })
|
|
422
|
+
], NLDDSlider.prototype, "translations", void 0);
|
|
423
|
+
__decorate([
|
|
424
|
+
property({ attribute: false })
|
|
425
|
+
], NLDDSlider.prototype, "formatValue", void 0);
|
|
426
|
+
__decorate([
|
|
427
|
+
state()
|
|
428
|
+
], NLDDSlider.prototype, "_active", void 0);
|
|
429
|
+
__decorate([
|
|
430
|
+
queryAll('.slider__input')
|
|
431
|
+
], NLDDSlider.prototype, "_inputs", void 0);
|
|
432
|
+
NLDDSlider = __decorate([
|
|
433
|
+
customElement('nldd-slider')
|
|
434
|
+
], NLDDSlider);
|
|
435
|
+
export { NLDDSlider };
|
|
436
|
+
//# sourceMappingURL=slider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slider.js","sourceRoot":"","sources":["../../../../src/components/inputs/slider/slider.ts"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgEG;AACH,OAAO,EAAE,UAAU,EAAuB,MAAM,KAAK,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAkB,MAAM,6CAA6C,CAAC;AAC7F,OAAO,EAA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