@vadem/ui 0.0.0-stage → 0.0.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/LICENSE-lucide.txt +43 -0
- package/README.md +19 -2
- package/fesm2022/vadem-ui-accordion.mjs +139 -0
- package/fesm2022/vadem-ui-accordion.mjs.map +1 -0
- package/fesm2022/vadem-ui-active-filters.mjs +355 -0
- package/fesm2022/vadem-ui-active-filters.mjs.map +1 -0
- package/fesm2022/vadem-ui-alert-dialog.mjs +433 -0
- package/fesm2022/vadem-ui-alert-dialog.mjs.map +1 -0
- package/fesm2022/vadem-ui-alert.mjs +266 -0
- package/fesm2022/vadem-ui-alert.mjs.map +1 -0
- package/fesm2022/vadem-ui-autocomplete.mjs +715 -0
- package/fesm2022/vadem-ui-autocomplete.mjs.map +1 -0
- package/fesm2022/vadem-ui-avatar.mjs +219 -0
- package/fesm2022/vadem-ui-avatar.mjs.map +1 -0
- package/fesm2022/vadem-ui-badge.mjs +86 -0
- package/fesm2022/vadem-ui-badge.mjs.map +1 -0
- package/fesm2022/vadem-ui-breadcrumbs.mjs +61 -0
- package/fesm2022/vadem-ui-breadcrumbs.mjs.map +1 -0
- package/fesm2022/vadem-ui-button.mjs +220 -0
- package/fesm2022/vadem-ui-button.mjs.map +1 -0
- package/fesm2022/vadem-ui-calendar.mjs +1314 -0
- package/fesm2022/vadem-ui-calendar.mjs.map +1 -0
- package/fesm2022/vadem-ui-card.mjs +271 -0
- package/fesm2022/vadem-ui-card.mjs.map +1 -0
- package/fesm2022/vadem-ui-character-count.mjs +269 -0
- package/fesm2022/vadem-ui-character-count.mjs.map +1 -0
- package/fesm2022/vadem-ui-chart.mjs +1984 -0
- package/fesm2022/vadem-ui-chart.mjs.map +1 -0
- package/fesm2022/vadem-ui-checkbox.mjs +67 -0
- package/fesm2022/vadem-ui-checkbox.mjs.map +1 -0
- package/fesm2022/vadem-ui-color-picker.mjs +815 -0
- package/fesm2022/vadem-ui-color-picker.mjs.map +1 -0
- package/fesm2022/vadem-ui-command.mjs +735 -0
- package/fesm2022/vadem-ui-command.mjs.map +1 -0
- package/fesm2022/vadem-ui-copy-button.mjs +375 -0
- package/fesm2022/vadem-ui-copy-button.mjs.map +1 -0
- package/fesm2022/vadem-ui-date-range-picker.mjs +1011 -0
- package/fesm2022/vadem-ui-date-range-picker.mjs.map +1 -0
- package/fesm2022/vadem-ui-description-list.mjs +59 -0
- package/fesm2022/vadem-ui-description-list.mjs.map +1 -0
- package/fesm2022/vadem-ui-dialog.mjs +587 -0
- package/fesm2022/vadem-ui-dialog.mjs.map +1 -0
- package/fesm2022/vadem-ui-dropzone.mjs +176 -0
- package/fesm2022/vadem-ui-dropzone.mjs.map +1 -0
- package/fesm2022/vadem-ui-editable-text.mjs +641 -0
- package/fesm2022/vadem-ui-editable-text.mjs.map +1 -0
- package/fesm2022/vadem-ui-empty-state.mjs +175 -0
- package/fesm2022/vadem-ui-empty-state.mjs.map +1 -0
- package/fesm2022/vadem-ui-expandable-text.mjs +244 -0
- package/fesm2022/vadem-ui-expandable-text.mjs.map +1 -0
- package/fesm2022/vadem-ui-field.mjs +583 -0
- package/fesm2022/vadem-ui-field.mjs.map +1 -0
- package/fesm2022/vadem-ui-file-preview.mjs +532 -0
- package/fesm2022/vadem-ui-file-preview.mjs.map +1 -0
- package/fesm2022/vadem-ui-file-size.mjs +83 -0
- package/fesm2022/vadem-ui-file-size.mjs.map +1 -0
- package/fesm2022/vadem-ui-form-error-summary.mjs +201 -0
- package/fesm2022/vadem-ui-form-error-summary.mjs.map +1 -0
- package/fesm2022/vadem-ui-icon.mjs +303 -0
- package/fesm2022/vadem-ui-icon.mjs.map +1 -0
- package/fesm2022/vadem-ui-input.mjs +120 -0
- package/fesm2022/vadem-ui-input.mjs.map +1 -0
- package/fesm2022/vadem-ui-kbd.mjs +286 -0
- package/fesm2022/vadem-ui-kbd.mjs.map +1 -0
- package/fesm2022/vadem-ui-keyboard.mjs +105 -0
- package/fesm2022/vadem-ui-keyboard.mjs.map +1 -0
- package/fesm2022/vadem-ui-locale.mjs +443 -0
- package/fesm2022/vadem-ui-locale.mjs.map +1 -0
- package/fesm2022/vadem-ui-menu.mjs +637 -0
- package/fesm2022/vadem-ui-menu.mjs.map +1 -0
- package/fesm2022/vadem-ui-navigation-list.mjs +130 -0
- package/fesm2022/vadem-ui-navigation-list.mjs.map +1 -0
- package/fesm2022/vadem-ui-number-input.mjs +264 -0
- package/fesm2022/vadem-ui-number-input.mjs.map +1 -0
- package/fesm2022/vadem-ui-otp-input.mjs +86 -0
- package/fesm2022/vadem-ui-otp-input.mjs.map +1 -0
- package/fesm2022/vadem-ui-pagination.mjs +353 -0
- package/fesm2022/vadem-ui-pagination.mjs.map +1 -0
- package/fesm2022/vadem-ui-password-input.mjs +213 -0
- package/fesm2022/vadem-ui-password-input.mjs.map +1 -0
- package/fesm2022/vadem-ui-popover.mjs +178 -0
- package/fesm2022/vadem-ui-popover.mjs.map +1 -0
- package/fesm2022/vadem-ui-progress.mjs +331 -0
- package/fesm2022/vadem-ui-progress.mjs.map +1 -0
- package/fesm2022/vadem-ui-radio.mjs +39 -0
- package/fesm2022/vadem-ui-radio.mjs.map +1 -0
- package/fesm2022/vadem-ui-range-slider.mjs +561 -0
- package/fesm2022/vadem-ui-range-slider.mjs.map +1 -0
- package/fesm2022/vadem-ui-rating.mjs +404 -0
- package/fesm2022/vadem-ui-rating.mjs.map +1 -0
- package/fesm2022/vadem-ui-relative-time.mjs +217 -0
- package/fesm2022/vadem-ui-relative-time.mjs.map +1 -0
- package/fesm2022/vadem-ui-reorder-list.mjs +601 -0
- package/fesm2022/vadem-ui-reorder-list.mjs.map +1 -0
- package/fesm2022/vadem-ui-scroll-area.mjs +65 -0
- package/fesm2022/vadem-ui-scroll-area.mjs.map +1 -0
- package/fesm2022/vadem-ui-search-input.mjs +307 -0
- package/fesm2022/vadem-ui-search-input.mjs.map +1 -0
- package/fesm2022/vadem-ui-segmented.mjs +297 -0
- package/fesm2022/vadem-ui-segmented.mjs.map +1 -0
- package/fesm2022/vadem-ui-select.mjs +1462 -0
- package/fesm2022/vadem-ui-select.mjs.map +1 -0
- package/fesm2022/vadem-ui-sidebar.mjs +493 -0
- package/fesm2022/vadem-ui-sidebar.mjs.map +1 -0
- package/fesm2022/vadem-ui-skeleton.mjs +106 -0
- package/fesm2022/vadem-ui-skeleton.mjs.map +1 -0
- package/fesm2022/vadem-ui-slider.mjs +60 -0
- package/fesm2022/vadem-ui-slider.mjs.map +1 -0
- package/fesm2022/vadem-ui-splitter.mjs +438 -0
- package/fesm2022/vadem-ui-splitter.mjs.map +1 -0
- package/fesm2022/vadem-ui-stat.mjs +369 -0
- package/fesm2022/vadem-ui-stat.mjs.map +1 -0
- package/fesm2022/vadem-ui-stepper.mjs +483 -0
- package/fesm2022/vadem-ui-stepper.mjs.map +1 -0
- package/fesm2022/vadem-ui-switch.mjs +45 -0
- package/fesm2022/vadem-ui-switch.mjs.map +1 -0
- package/fesm2022/vadem-ui-table.mjs +593 -0
- package/fesm2022/vadem-ui-table.mjs.map +1 -0
- package/fesm2022/vadem-ui-tabs.mjs +405 -0
- package/fesm2022/vadem-ui-tabs.mjs.map +1 -0
- package/fesm2022/vadem-ui-tag-input.mjs +685 -0
- package/fesm2022/vadem-ui-tag-input.mjs.map +1 -0
- package/fesm2022/vadem-ui-text-highlight.mjs +126 -0
- package/fesm2022/vadem-ui-text-highlight.mjs.map +1 -0
- package/fesm2022/vadem-ui-time-input.mjs +430 -0
- package/fesm2022/vadem-ui-time-input.mjs.map +1 -0
- package/fesm2022/vadem-ui-timeline.mjs +313 -0
- package/fesm2022/vadem-ui-timeline.mjs.map +1 -0
- package/fesm2022/vadem-ui-toast.mjs +397 -0
- package/fesm2022/vadem-ui-toast.mjs.map +1 -0
- package/fesm2022/vadem-ui-toolbar.mjs +396 -0
- package/fesm2022/vadem-ui-toolbar.mjs.map +1 -0
- package/fesm2022/vadem-ui-tooltip.mjs +218 -0
- package/fesm2022/vadem-ui-tooltip.mjs.map +1 -0
- package/fesm2022/vadem-ui-tree.mjs +551 -0
- package/fesm2022/vadem-ui-tree.mjs.map +1 -0
- package/fesm2022/vadem-ui-upload-list.mjs +408 -0
- package/fesm2022/vadem-ui-upload-list.mjs.map +1 -0
- package/fesm2022/vadem-ui.mjs +4 -0
- package/fesm2022/vadem-ui.mjs.map +1 -0
- package/fonts/jetbrains-mono/OFL.txt +93 -0
- package/fonts/jetbrains-mono/jetbrains-mono-cyrillic.woff2 +0 -0
- package/fonts/jetbrains-mono/jetbrains-mono-latin.woff2 +0 -0
- package/fonts/manrope/OFL.txt +93 -0
- package/fonts/manrope/manrope-cyrillic.woff2 +0 -0
- package/fonts/manrope/manrope-latin.woff2 +0 -0
- package/package.json +306 -3
- package/styles/base.css +160 -0
- package/styles/components/accordion.css +130 -0
- package/styles/components/active-filters.css +42 -0
- package/styles/components/alert-dialog.css +34 -0
- package/styles/components/alert.css +159 -0
- package/styles/components/autocomplete.css +97 -0
- package/styles/components/avatar.css +90 -0
- package/styles/components/badge.css +91 -0
- package/styles/components/breadcrumbs.css +94 -0
- package/styles/components/button.css +174 -0
- package/styles/components/calendar.css +186 -0
- package/styles/components/card.css +206 -0
- package/styles/components/character-count.css +41 -0
- package/styles/components/chart.css +308 -0
- package/styles/components/checkbox.css +115 -0
- package/styles/components/color-picker.css +158 -0
- package/styles/components/command.css +175 -0
- package/styles/components/copy-button.css +58 -0
- package/styles/components/date-range-picker.css +153 -0
- package/styles/components/description-list.css +69 -0
- package/styles/components/dialog.css +334 -0
- package/styles/components/dropzone.css +89 -0
- package/styles/components/editable-text.css +58 -0
- package/styles/components/empty-state.css +72 -0
- package/styles/components/expandable-text.css +24 -0
- package/styles/components/field.css +148 -0
- package/styles/components/file-preview.css +65 -0
- package/styles/components/form-error-summary.css +71 -0
- package/styles/components/icon.css +38 -0
- package/styles/components/index.css +80 -0
- package/styles/components/input.css +171 -0
- package/styles/components/kbd.css +42 -0
- package/styles/components/menu.css +168 -0
- package/styles/components/multi-select.css +156 -0
- package/styles/components/navigation-list.css +147 -0
- package/styles/components/number-input.css +33 -0
- package/styles/components/otp-input.css +26 -0
- package/styles/components/pagination.css +127 -0
- package/styles/components/password-input.css +20 -0
- package/styles/components/popover.css +93 -0
- package/styles/components/progress-ring.css +112 -0
- package/styles/components/progress.css +162 -0
- package/styles/components/radio.css +117 -0
- package/styles/components/range-slider.css +158 -0
- package/styles/components/rating.css +100 -0
- package/styles/components/reorder-list.css +143 -0
- package/styles/components/scroll-area.css +39 -0
- package/styles/components/search-input.css +25 -0
- package/styles/components/segmented.css +136 -0
- package/styles/components/select.css +257 -0
- package/styles/components/sidebar.css +105 -0
- package/styles/components/skeleton.css +83 -0
- package/styles/components/slider.css +132 -0
- package/styles/components/splitter.css +83 -0
- package/styles/components/stat.css +62 -0
- package/styles/components/stepper.css +236 -0
- package/styles/components/switch.css +107 -0
- package/styles/components/table.css +195 -0
- package/styles/components/tabs.css +198 -0
- package/styles/components/tag-input.css +138 -0
- package/styles/components/text-highlight.css +22 -0
- package/styles/components/time-input.css +96 -0
- package/styles/components/timeline.css +182 -0
- package/styles/components/toast.css +146 -0
- package/styles/components/toolbar.css +72 -0
- package/styles/components/tooltip.css +93 -0
- package/styles/components/tree.css +88 -0
- package/styles/components/upload-list.css +113 -0
- package/styles/fonts.css +67 -0
- package/styles/index.css +14 -0
- package/styles/reset.css +57 -0
- package/styles/tokens/primitives.css +364 -0
- package/styles/tokens/semantic.css +233 -0
- package/types/vadem-ui-accordion.d.ts +43 -0
- package/types/vadem-ui-active-filters.d.ts +73 -0
- package/types/vadem-ui-alert-dialog.d.ts +87 -0
- package/types/vadem-ui-alert.d.ts +64 -0
- package/types/vadem-ui-autocomplete.d.ts +156 -0
- package/types/vadem-ui-avatar.d.ts +59 -0
- package/types/vadem-ui-badge.d.ts +25 -0
- package/types/vadem-ui-breadcrumbs.d.ts +22 -0
- package/types/vadem-ui-button.d.ts +52 -0
- package/types/vadem-ui-calendar.d.ts +327 -0
- package/types/vadem-ui-card.d.ts +58 -0
- package/types/vadem-ui-character-count.d.ts +71 -0
- package/types/vadem-ui-chart.d.ts +452 -0
- package/types/vadem-ui-checkbox.d.ts +20 -0
- package/types/vadem-ui-color-picker.d.ts +171 -0
- package/types/vadem-ui-command.d.ts +145 -0
- package/types/vadem-ui-copy-button.d.ts +90 -0
- package/types/vadem-ui-date-range-picker.d.ts +216 -0
- package/types/vadem-ui-description-list.d.ts +15 -0
- package/types/vadem-ui-dialog.d.ts +174 -0
- package/types/vadem-ui-dropzone.d.ts +73 -0
- package/types/vadem-ui-editable-text.d.ts +141 -0
- package/types/vadem-ui-empty-state.d.ts +34 -0
- package/types/vadem-ui-expandable-text.d.ts +52 -0
- package/types/vadem-ui-field.d.ts +180 -0
- package/types/vadem-ui-file-preview.d.ts +108 -0
- package/types/vadem-ui-file-size.d.ts +18 -0
- package/types/vadem-ui-form-error-summary.d.ts +46 -0
- package/types/vadem-ui-icon.d.ts +152 -0
- package/types/vadem-ui-input.d.ts +31 -0
- package/types/vadem-ui-kbd.d.ts +66 -0
- package/types/vadem-ui-keyboard.d.ts +61 -0
- package/types/vadem-ui-locale.d.ts +241 -0
- package/types/vadem-ui-menu.d.ts +132 -0
- package/types/vadem-ui-navigation-list.d.ts +28 -0
- package/types/vadem-ui-number-input.d.ts +39 -0
- package/types/vadem-ui-otp-input.d.ts +15 -0
- package/types/vadem-ui-pagination.d.ts +96 -0
- package/types/vadem-ui-password-input.d.ts +36 -0
- package/types/vadem-ui-popover.d.ts +48 -0
- package/types/vadem-ui-progress.d.ts +95 -0
- package/types/vadem-ui-radio.d.ts +11 -0
- package/types/vadem-ui-range-slider.d.ts +136 -0
- package/types/vadem-ui-rating.d.ts +95 -0
- package/types/vadem-ui-relative-time.d.ts +58 -0
- package/types/vadem-ui-reorder-list.d.ts +120 -0
- package/types/vadem-ui-scroll-area.d.ts +13 -0
- package/types/vadem-ui-search-input.d.ts +58 -0
- package/types/vadem-ui-segmented.d.ts +76 -0
- package/types/vadem-ui-select.d.ts +303 -0
- package/types/vadem-ui-sidebar.d.ts +70 -0
- package/types/vadem-ui-skeleton.d.ts +28 -0
- package/types/vadem-ui-slider.d.ts +17 -0
- package/types/vadem-ui-splitter.d.ts +99 -0
- package/types/vadem-ui-stat.d.ts +101 -0
- package/types/vadem-ui-stepper.d.ts +108 -0
- package/types/vadem-ui-switch.d.ts +10 -0
- package/types/vadem-ui-table.d.ts +172 -0
- package/types/vadem-ui-tabs.d.ts +101 -0
- package/types/vadem-ui-tag-input.d.ts +170 -0
- package/types/vadem-ui-text-highlight.d.ts +27 -0
- package/types/vadem-ui-time-input.d.ts +47 -0
- package/types/vadem-ui-timeline.d.ts +54 -0
- package/types/vadem-ui-toast.d.ts +104 -0
- package/types/vadem-ui-toolbar.d.ts +80 -0
- package/types/vadem-ui-tooltip.d.ts +71 -0
- package/types/vadem-ui-tree.d.ts +123 -0
- package/types/vadem-ui-upload-list.d.ts +70 -0
- package/types/vadem-ui.d.ts +1 -0
|
@@ -0,0 +1,561 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, Injector, ViewEncapsulation, booleanAttribute, computed, inject, input, model, output, signal, viewChild } from "@angular/core";
|
|
3
|
+
import { NgControl } from "@angular/forms";
|
|
4
|
+
import { FormField } from "@angular/forms/signals";
|
|
5
|
+
import { VD_FIELD, vdNgControlState, vdUniqueId } from "@vadem/ui/field";
|
|
6
|
+
import { vdTexts } from "@vadem/ui/locale";
|
|
7
|
+
function vdRangeBounds(min, max, step) {
|
|
8
|
+
min = Number.isFinite(min) ? min : 0;
|
|
9
|
+
max = Number.isFinite(max) ? Math.max(min, max) : Math.max(min, 100);
|
|
10
|
+
step = Number.isFinite(step) && step > 0 ? step : 1;
|
|
11
|
+
const count = Math.floor((max - min) / step + 1e-9);
|
|
12
|
+
if (!Number.isFinite(count) || !Number.isFinite(max - min)) return {
|
|
13
|
+
min,
|
|
14
|
+
max: min,
|
|
15
|
+
step
|
|
16
|
+
};
|
|
17
|
+
return {
|
|
18
|
+
min,
|
|
19
|
+
max: Math.max(min, Math.min(max, Number((min + count * step).toPrecision(14)))),
|
|
20
|
+
step
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
function vdRangeSnap(value, bounds) {
|
|
24
|
+
const { min, max, step } = bounds;
|
|
25
|
+
return Math.min(max, Math.max(min, Number((min + Math.round((Math.min(max, Math.max(min, Number.isFinite(value) ? value : min)) - min) / step) * step).toPrecision(14))));
|
|
26
|
+
}
|
|
27
|
+
function vdRangeValue(value, bounds) {
|
|
28
|
+
const lower = vdRangeSnap(value?.[0] ?? bounds.min, bounds);
|
|
29
|
+
const upper = vdRangeSnap(value?.[1] ?? bounds.max, bounds);
|
|
30
|
+
return lower <= upper ? [lower, upper] : [upper, lower];
|
|
31
|
+
}
|
|
32
|
+
function vdRangeMove(value, index, next, bounds) {
|
|
33
|
+
const snapped = vdRangeSnap(next, bounds);
|
|
34
|
+
return index === 0 ? [Math.min(snapped, value[1]), value[1]] : [value[0], Math.max(snapped, value[0])];
|
|
35
|
+
}
|
|
36
|
+
function vdRangeKey(key, current, min, max, step, rtl) {
|
|
37
|
+
switch (key) {
|
|
38
|
+
case "Home": return min;
|
|
39
|
+
case "End": return max;
|
|
40
|
+
case "ArrowUp": return current + step;
|
|
41
|
+
case "ArrowDown": return current - step;
|
|
42
|
+
case "ArrowRight": return current + (rtl ? -step : step);
|
|
43
|
+
case "ArrowLeft": return current + (rtl ? step : -step);
|
|
44
|
+
case "PageUp": return current + step * 10;
|
|
45
|
+
case "PageDown": return current - step * 10;
|
|
46
|
+
default: return null;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
var VdRangeSlider = class VdRangeSlider {
|
|
50
|
+
value = model([25, 75], ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
51
|
+
minValue = input(0, ...ngDevMode ? [{ debugName: "minValue" }] : /* istanbul ignore next */ []);
|
|
52
|
+
maxValue = input(100, ...ngDevMode ? [{ debugName: "maxValue" }] : /* istanbul ignore next */ []);
|
|
53
|
+
step = input(1, ...ngDevMode ? [{ debugName: "step" }] : /* istanbul ignore next */ []);
|
|
54
|
+
label = input.required(...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
55
|
+
lowerLabel = input(...ngDevMode ? [void 0, { debugName: "lowerLabel" }] : /* istanbul ignore next */ []);
|
|
56
|
+
upperLabel = input(...ngDevMode ? [void 0, { debugName: "upperLabel" }] : /* istanbul ignore next */ []);
|
|
57
|
+
t = vdTexts("rangeSlider", {
|
|
58
|
+
lowerLabel: this.lowerLabel,
|
|
59
|
+
upperLabel: this.upperLabel
|
|
60
|
+
});
|
|
61
|
+
valueText = input(String, ...ngDevMode ? [{ debugName: "valueText" }] : /* istanbul ignore next */ []);
|
|
62
|
+
disabled = input(false, {
|
|
63
|
+
...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
|
|
64
|
+
transform: booleanAttribute
|
|
65
|
+
});
|
|
66
|
+
readonly = input(false, {
|
|
67
|
+
...ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {},
|
|
68
|
+
transform: booleanAttribute
|
|
69
|
+
});
|
|
70
|
+
invalid = input(false, {
|
|
71
|
+
...ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {},
|
|
72
|
+
transform: booleanAttribute
|
|
73
|
+
});
|
|
74
|
+
touched = input(false, {
|
|
75
|
+
...ngDevMode ? { debugName: "touched" } : /* istanbul ignore next */ {},
|
|
76
|
+
transform: booleanAttribute
|
|
77
|
+
});
|
|
78
|
+
required = input(false, {
|
|
79
|
+
...ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {},
|
|
80
|
+
transform: booleanAttribute
|
|
81
|
+
});
|
|
82
|
+
touch = output();
|
|
83
|
+
controlId = vdUniqueId("vd-range-slider");
|
|
84
|
+
labelId = this.controlId + "-group-label";
|
|
85
|
+
indices = [0, 1];
|
|
86
|
+
bounds = computed(() => vdRangeBounds(this.minValue(), this.maxValue(), this.step()), ...ngDevMode ? [{ debugName: "bounds" }] : /* istanbul ignore next */ []);
|
|
87
|
+
selected = computed(() => vdRangeValue(this.value(), this.bounds()), ...ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []);
|
|
88
|
+
dragging = signal(false, ...ngDevMode ? [{ debugName: "dragging" }] : /* istanbul ignore next */ []);
|
|
89
|
+
field = inject(VD_FIELD, { optional: true });
|
|
90
|
+
host = inject(ElementRef).nativeElement;
|
|
91
|
+
rail = viewChild.required("rail", ...ngDevMode ? [{ debugName: "rail" }] : /* istanbul ignore next */ []);
|
|
92
|
+
drag = null;
|
|
93
|
+
injector = inject(Injector);
|
|
94
|
+
destroyRef = inject(DestroyRef);
|
|
95
|
+
formBound = signal(false, ...ngDevMode ? [{ debugName: "formBound" }] : /* istanbul ignore next */ []);
|
|
96
|
+
ngSource = signal(null, ...ngDevMode ? [{ debugName: "ngSource" }] : /* istanbul ignore next */ []);
|
|
97
|
+
ngState = computed(() => this.ngSource()?.() ?? {
|
|
98
|
+
invalid: false,
|
|
99
|
+
touched: false,
|
|
100
|
+
disabled: false,
|
|
101
|
+
required: false
|
|
102
|
+
}, ...ngDevMode ? [{ debugName: "ngState" }] : /* istanbul ignore next */ []);
|
|
103
|
+
isDisabled = computed(() => this.disabled() || this.ngState().disabled, ...ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []);
|
|
104
|
+
locked = computed(() => this.isDisabled() || this.readonly(), ...ngDevMode ? [{ debugName: "locked" }] : /* istanbul ignore next */ []);
|
|
105
|
+
isRequired = computed(() => this.required() || this.ngState().required, ...ngDevMode ? [{ debugName: "isRequired" }] : /* istanbul ignore next */ []);
|
|
106
|
+
showInvalid = computed(() => this.invalid() && (!this.formBound() || this.touched()) || this.ngState().invalid && this.ngState().touched, ...ngDevMode ? [{ debugName: "showInvalid" }] : /* istanbul ignore next */ []);
|
|
107
|
+
constructor() {
|
|
108
|
+
const control = {
|
|
109
|
+
id: signal(this.controlId),
|
|
110
|
+
invalid: this.showInvalid,
|
|
111
|
+
required: this.isRequired,
|
|
112
|
+
disabled: this.isDisabled
|
|
113
|
+
};
|
|
114
|
+
this.field?.register(control);
|
|
115
|
+
this.destroyRef.onDestroy(() => this.field?.unregister(control));
|
|
116
|
+
}
|
|
117
|
+
ngOnInit() {
|
|
118
|
+
const ng = this.injector.get(NgControl, null, {
|
|
119
|
+
self: true,
|
|
120
|
+
optional: true
|
|
121
|
+
});
|
|
122
|
+
this.formBound.set(!!ng || !!this.injector.get(FormField, null, {
|
|
123
|
+
self: true,
|
|
124
|
+
optional: true
|
|
125
|
+
}));
|
|
126
|
+
this.ngSource.set(vdNgControlState(ng, this.destroyRef));
|
|
127
|
+
}
|
|
128
|
+
percent(index) {
|
|
129
|
+
const { min, max } = this.bounds();
|
|
130
|
+
return max > min ? (this.selected()[index] - min) / (max - min) * 100 : 0;
|
|
131
|
+
}
|
|
132
|
+
choose(index, next) {
|
|
133
|
+
if (this.locked()) return;
|
|
134
|
+
const current = this.selected();
|
|
135
|
+
const value = vdRangeMove(current, index, next, this.bounds());
|
|
136
|
+
if (current[0] !== value[0] || current[1] !== value[1]) this.value.set(value);
|
|
137
|
+
}
|
|
138
|
+
onKeydown(event, index) {
|
|
139
|
+
if (event.altKey || event.ctrlKey || event.metaKey || event.shiftKey) return;
|
|
140
|
+
const next = vdRangeKey(event.key, this.selected()[index], index === 0 ? this.bounds().min : this.selected()[0], index === 0 ? this.selected()[1] : this.bounds().max, this.bounds().step, this.host.matches(":dir(rtl)"));
|
|
141
|
+
if (next === null) return;
|
|
142
|
+
event.preventDefault();
|
|
143
|
+
this.choose(index, next);
|
|
144
|
+
}
|
|
145
|
+
pointerValue(event) {
|
|
146
|
+
const rect = this.rail().nativeElement.getBoundingClientRect();
|
|
147
|
+
const fraction = rect.width ? (event.clientX - rect.x) / rect.width : 0;
|
|
148
|
+
const position = this.host.matches(":dir(rtl)") ? 1 - fraction : fraction;
|
|
149
|
+
return this.bounds().min + position * (this.bounds().max - this.bounds().min);
|
|
150
|
+
}
|
|
151
|
+
onPointerDown(event) {
|
|
152
|
+
if (this.locked() || this.drag || !event.isPrimary || event.button !== 0) return;
|
|
153
|
+
const target = event.target.closest("[data-index]");
|
|
154
|
+
const next = this.pointerValue(event);
|
|
155
|
+
const index = target ? Number(target.dataset["index"]) : Math.abs(next - this.selected()[0]) < Math.abs(next - this.selected()[1]) ? 0 : 1;
|
|
156
|
+
event.preventDefault();
|
|
157
|
+
this.host.querySelectorAll("button")[index].focus();
|
|
158
|
+
this.rail().nativeElement.setPointerCapture(event.pointerId);
|
|
159
|
+
this.drag = {
|
|
160
|
+
pointer: event.pointerId,
|
|
161
|
+
index
|
|
162
|
+
};
|
|
163
|
+
this.dragging.set(true);
|
|
164
|
+
if (!target) this.choose(index, next);
|
|
165
|
+
}
|
|
166
|
+
onPointerMove(event) {
|
|
167
|
+
if (event.pointerId === this.drag?.pointer) this.choose(this.drag.index, this.pointerValue(event));
|
|
168
|
+
}
|
|
169
|
+
endDrag(event) {
|
|
170
|
+
if (event.pointerId !== this.drag?.pointer) return;
|
|
171
|
+
this.drag = null;
|
|
172
|
+
this.dragging.set(false);
|
|
173
|
+
const rail = this.rail().nativeElement;
|
|
174
|
+
if (rail.hasPointerCapture(event.pointerId)) rail.releasePointerCapture(event.pointerId);
|
|
175
|
+
}
|
|
176
|
+
onFocusOut(event) {
|
|
177
|
+
if (!event.relatedTarget || !this.host.contains(event.relatedTarget)) this.touch.emit();
|
|
178
|
+
}
|
|
179
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
180
|
+
minVersion: "12.0.0",
|
|
181
|
+
version: "22.2.1",
|
|
182
|
+
ngImport: i0,
|
|
183
|
+
type: VdRangeSlider,
|
|
184
|
+
deps: [],
|
|
185
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
186
|
+
});
|
|
187
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
188
|
+
minVersion: "17.0.0",
|
|
189
|
+
version: "22.2.1",
|
|
190
|
+
type: VdRangeSlider,
|
|
191
|
+
isStandalone: true,
|
|
192
|
+
selector: "vd-range-slider",
|
|
193
|
+
inputs: {
|
|
194
|
+
value: {
|
|
195
|
+
classPropertyName: "value",
|
|
196
|
+
publicName: "value",
|
|
197
|
+
isSignal: true,
|
|
198
|
+
isRequired: false,
|
|
199
|
+
transformFunction: null
|
|
200
|
+
},
|
|
201
|
+
minValue: {
|
|
202
|
+
classPropertyName: "minValue",
|
|
203
|
+
publicName: "minValue",
|
|
204
|
+
isSignal: true,
|
|
205
|
+
isRequired: false,
|
|
206
|
+
transformFunction: null
|
|
207
|
+
},
|
|
208
|
+
maxValue: {
|
|
209
|
+
classPropertyName: "maxValue",
|
|
210
|
+
publicName: "maxValue",
|
|
211
|
+
isSignal: true,
|
|
212
|
+
isRequired: false,
|
|
213
|
+
transformFunction: null
|
|
214
|
+
},
|
|
215
|
+
step: {
|
|
216
|
+
classPropertyName: "step",
|
|
217
|
+
publicName: "step",
|
|
218
|
+
isSignal: true,
|
|
219
|
+
isRequired: false,
|
|
220
|
+
transformFunction: null
|
|
221
|
+
},
|
|
222
|
+
label: {
|
|
223
|
+
classPropertyName: "label",
|
|
224
|
+
publicName: "label",
|
|
225
|
+
isSignal: true,
|
|
226
|
+
isRequired: true,
|
|
227
|
+
transformFunction: null
|
|
228
|
+
},
|
|
229
|
+
lowerLabel: {
|
|
230
|
+
classPropertyName: "lowerLabel",
|
|
231
|
+
publicName: "lowerLabel",
|
|
232
|
+
isSignal: true,
|
|
233
|
+
isRequired: false,
|
|
234
|
+
transformFunction: null
|
|
235
|
+
},
|
|
236
|
+
upperLabel: {
|
|
237
|
+
classPropertyName: "upperLabel",
|
|
238
|
+
publicName: "upperLabel",
|
|
239
|
+
isSignal: true,
|
|
240
|
+
isRequired: false,
|
|
241
|
+
transformFunction: null
|
|
242
|
+
},
|
|
243
|
+
valueText: {
|
|
244
|
+
classPropertyName: "valueText",
|
|
245
|
+
publicName: "valueText",
|
|
246
|
+
isSignal: true,
|
|
247
|
+
isRequired: false,
|
|
248
|
+
transformFunction: null
|
|
249
|
+
},
|
|
250
|
+
disabled: {
|
|
251
|
+
classPropertyName: "disabled",
|
|
252
|
+
publicName: "disabled",
|
|
253
|
+
isSignal: true,
|
|
254
|
+
isRequired: false,
|
|
255
|
+
transformFunction: null
|
|
256
|
+
},
|
|
257
|
+
readonly: {
|
|
258
|
+
classPropertyName: "readonly",
|
|
259
|
+
publicName: "readonly",
|
|
260
|
+
isSignal: true,
|
|
261
|
+
isRequired: false,
|
|
262
|
+
transformFunction: null
|
|
263
|
+
},
|
|
264
|
+
invalid: {
|
|
265
|
+
classPropertyName: "invalid",
|
|
266
|
+
publicName: "invalid",
|
|
267
|
+
isSignal: true,
|
|
268
|
+
isRequired: false,
|
|
269
|
+
transformFunction: null
|
|
270
|
+
},
|
|
271
|
+
touched: {
|
|
272
|
+
classPropertyName: "touched",
|
|
273
|
+
publicName: "touched",
|
|
274
|
+
isSignal: true,
|
|
275
|
+
isRequired: false,
|
|
276
|
+
transformFunction: null
|
|
277
|
+
},
|
|
278
|
+
required: {
|
|
279
|
+
classPropertyName: "required",
|
|
280
|
+
publicName: "required",
|
|
281
|
+
isSignal: true,
|
|
282
|
+
isRequired: false,
|
|
283
|
+
transformFunction: null
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
outputs: {
|
|
287
|
+
value: "valueChange",
|
|
288
|
+
touch: "touch"
|
|
289
|
+
},
|
|
290
|
+
host: {
|
|
291
|
+
listeners: { "focusout": "onFocusOut($event)" },
|
|
292
|
+
properties: {
|
|
293
|
+
"attr.data-invalid": "showInvalid() ? \"\" : null",
|
|
294
|
+
"attr.data-disabled": "isDisabled() ? \"\" : null",
|
|
295
|
+
"attr.data-readonly": "readonly() ? \"\" : null",
|
|
296
|
+
"attr.data-dragging": "dragging() ? \"\" : null"
|
|
297
|
+
},
|
|
298
|
+
classAttribute: "vd-range-slider"
|
|
299
|
+
},
|
|
300
|
+
viewQueries: [{
|
|
301
|
+
propertyName: "rail",
|
|
302
|
+
first: true,
|
|
303
|
+
predicate: ["rail"],
|
|
304
|
+
descendants: true,
|
|
305
|
+
isSignal: true
|
|
306
|
+
}],
|
|
307
|
+
ngImport: i0,
|
|
308
|
+
template: `
|
|
309
|
+
<div class="vd-range-slider__group" role="group" [attr.aria-labelledby]="labelId">
|
|
310
|
+
<p class="vd-field__label" [id]="labelId">{{ label() }}</p>
|
|
311
|
+
<div class="vd-range-slider__values">
|
|
312
|
+
@for (index of indices; track index) {
|
|
313
|
+
<span
|
|
314
|
+
><span [id]="controlId + '-label-' + index">{{
|
|
315
|
+
index === 0 ? t().lowerLabel : t().upperLabel
|
|
316
|
+
}}</span>
|
|
317
|
+
<span class="vd-range-slider__number">{{ valueText()(selected()[index]) }}</span></span
|
|
318
|
+
>
|
|
319
|
+
}
|
|
320
|
+
</div>
|
|
321
|
+
<div
|
|
322
|
+
#rail
|
|
323
|
+
class="vd-range-slider__rail"
|
|
324
|
+
[style.--vd-range-start]="percent(0) + '%'"
|
|
325
|
+
[style.--vd-range-end]="percent(1) + '%'"
|
|
326
|
+
(pointerdown)="onPointerDown($event)"
|
|
327
|
+
(pointermove)="onPointerMove($event)"
|
|
328
|
+
(pointerup)="endDrag($event)"
|
|
329
|
+
(pointercancel)="endDrag($event)"
|
|
330
|
+
(lostpointercapture)="endDrag($event)"
|
|
331
|
+
>
|
|
332
|
+
<span class="vd-range-slider__track" aria-hidden="true"></span>
|
|
333
|
+
<span class="vd-range-slider__fill" aria-hidden="true"></span>
|
|
334
|
+
@for (index of indices; track index) {
|
|
335
|
+
<button
|
|
336
|
+
type="button"
|
|
337
|
+
role="slider"
|
|
338
|
+
class="vd-range-slider__thumb"
|
|
339
|
+
[attr.data-index]="index"
|
|
340
|
+
[id]="index === 0 ? controlId : controlId + '-upper'"
|
|
341
|
+
[style.inset-inline-start]="percent(index) + '%'"
|
|
342
|
+
[attr.aria-labelledby]="labelId + ' ' + controlId + '-label-' + index"
|
|
343
|
+
[attr.aria-valuenow]="selected()[index]"
|
|
344
|
+
[attr.aria-valuemin]="index === 0 ? bounds().min : selected()[0]"
|
|
345
|
+
[attr.aria-valuemax]="index === 0 ? selected()[1] : bounds().max"
|
|
346
|
+
[attr.aria-valuetext]="valueText()(selected()[index])"
|
|
347
|
+
[attr.aria-describedby]="field?.describedBy() ?? null"
|
|
348
|
+
[attr.aria-invalid]="showInvalid() || null"
|
|
349
|
+
[attr.aria-disabled]="locked() || null"
|
|
350
|
+
[disabled]="isDisabled()"
|
|
351
|
+
(keydown)="onKeydown($event, index)"
|
|
352
|
+
>
|
|
353
|
+
<span class="vd-visually-hidden">{{
|
|
354
|
+
index === 0 ? t().lowerLabel : t().upperLabel
|
|
355
|
+
}}</span>
|
|
356
|
+
</button>
|
|
357
|
+
}
|
|
358
|
+
</div>
|
|
359
|
+
</div>
|
|
360
|
+
`,
|
|
361
|
+
isInline: true,
|
|
362
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
363
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
364
|
+
});
|
|
365
|
+
};
|
|
366
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
367
|
+
minVersion: "12.0.0",
|
|
368
|
+
version: "22.2.1",
|
|
369
|
+
ngImport: i0,
|
|
370
|
+
type: VdRangeSlider,
|
|
371
|
+
decorators: [{
|
|
372
|
+
type: Component,
|
|
373
|
+
args: [{
|
|
374
|
+
selector: "vd-range-slider",
|
|
375
|
+
template: `
|
|
376
|
+
<div class="vd-range-slider__group" role="group" [attr.aria-labelledby]="labelId">
|
|
377
|
+
<p class="vd-field__label" [id]="labelId">{{ label() }}</p>
|
|
378
|
+
<div class="vd-range-slider__values">
|
|
379
|
+
@for (index of indices; track index) {
|
|
380
|
+
<span
|
|
381
|
+
><span [id]="controlId + '-label-' + index">{{
|
|
382
|
+
index === 0 ? t().lowerLabel : t().upperLabel
|
|
383
|
+
}}</span>
|
|
384
|
+
<span class="vd-range-slider__number">{{ valueText()(selected()[index]) }}</span></span
|
|
385
|
+
>
|
|
386
|
+
}
|
|
387
|
+
</div>
|
|
388
|
+
<div
|
|
389
|
+
#rail
|
|
390
|
+
class="vd-range-slider__rail"
|
|
391
|
+
[style.--vd-range-start]="percent(0) + '%'"
|
|
392
|
+
[style.--vd-range-end]="percent(1) + '%'"
|
|
393
|
+
(pointerdown)="onPointerDown($event)"
|
|
394
|
+
(pointermove)="onPointerMove($event)"
|
|
395
|
+
(pointerup)="endDrag($event)"
|
|
396
|
+
(pointercancel)="endDrag($event)"
|
|
397
|
+
(lostpointercapture)="endDrag($event)"
|
|
398
|
+
>
|
|
399
|
+
<span class="vd-range-slider__track" aria-hidden="true"></span>
|
|
400
|
+
<span class="vd-range-slider__fill" aria-hidden="true"></span>
|
|
401
|
+
@for (index of indices; track index) {
|
|
402
|
+
<button
|
|
403
|
+
type="button"
|
|
404
|
+
role="slider"
|
|
405
|
+
class="vd-range-slider__thumb"
|
|
406
|
+
[attr.data-index]="index"
|
|
407
|
+
[id]="index === 0 ? controlId : controlId + '-upper'"
|
|
408
|
+
[style.inset-inline-start]="percent(index) + '%'"
|
|
409
|
+
[attr.aria-labelledby]="labelId + ' ' + controlId + '-label-' + index"
|
|
410
|
+
[attr.aria-valuenow]="selected()[index]"
|
|
411
|
+
[attr.aria-valuemin]="index === 0 ? bounds().min : selected()[0]"
|
|
412
|
+
[attr.aria-valuemax]="index === 0 ? selected()[1] : bounds().max"
|
|
413
|
+
[attr.aria-valuetext]="valueText()(selected()[index])"
|
|
414
|
+
[attr.aria-describedby]="field?.describedBy() ?? null"
|
|
415
|
+
[attr.aria-invalid]="showInvalid() || null"
|
|
416
|
+
[attr.aria-disabled]="locked() || null"
|
|
417
|
+
[disabled]="isDisabled()"
|
|
418
|
+
(keydown)="onKeydown($event, index)"
|
|
419
|
+
>
|
|
420
|
+
<span class="vd-visually-hidden">{{
|
|
421
|
+
index === 0 ? t().lowerLabel : t().upperLabel
|
|
422
|
+
}}</span>
|
|
423
|
+
</button>
|
|
424
|
+
}
|
|
425
|
+
</div>
|
|
426
|
+
</div>
|
|
427
|
+
`,
|
|
428
|
+
host: {
|
|
429
|
+
class: "vd-range-slider",
|
|
430
|
+
"[attr.data-invalid]": "showInvalid() ? \"\" : null",
|
|
431
|
+
"[attr.data-disabled]": "isDisabled() ? \"\" : null",
|
|
432
|
+
"[attr.data-readonly]": "readonly() ? \"\" : null",
|
|
433
|
+
"[attr.data-dragging]": "dragging() ? \"\" : null",
|
|
434
|
+
"(focusout)": "onFocusOut($event)"
|
|
435
|
+
},
|
|
436
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
437
|
+
encapsulation: ViewEncapsulation.None
|
|
438
|
+
}]
|
|
439
|
+
}],
|
|
440
|
+
ctorParameters: () => [],
|
|
441
|
+
propDecorators: {
|
|
442
|
+
value: [{
|
|
443
|
+
type: i0.Input,
|
|
444
|
+
args: [{
|
|
445
|
+
isSignal: true,
|
|
446
|
+
alias: "value",
|
|
447
|
+
required: false
|
|
448
|
+
}]
|
|
449
|
+
}, {
|
|
450
|
+
type: i0.Output,
|
|
451
|
+
args: ["valueChange"]
|
|
452
|
+
}],
|
|
453
|
+
minValue: [{
|
|
454
|
+
type: i0.Input,
|
|
455
|
+
args: [{
|
|
456
|
+
isSignal: true,
|
|
457
|
+
alias: "minValue",
|
|
458
|
+
required: false
|
|
459
|
+
}]
|
|
460
|
+
}],
|
|
461
|
+
maxValue: [{
|
|
462
|
+
type: i0.Input,
|
|
463
|
+
args: [{
|
|
464
|
+
isSignal: true,
|
|
465
|
+
alias: "maxValue",
|
|
466
|
+
required: false
|
|
467
|
+
}]
|
|
468
|
+
}],
|
|
469
|
+
step: [{
|
|
470
|
+
type: i0.Input,
|
|
471
|
+
args: [{
|
|
472
|
+
isSignal: true,
|
|
473
|
+
alias: "step",
|
|
474
|
+
required: false
|
|
475
|
+
}]
|
|
476
|
+
}],
|
|
477
|
+
label: [{
|
|
478
|
+
type: i0.Input,
|
|
479
|
+
args: [{
|
|
480
|
+
isSignal: true,
|
|
481
|
+
alias: "label",
|
|
482
|
+
required: true
|
|
483
|
+
}]
|
|
484
|
+
}],
|
|
485
|
+
lowerLabel: [{
|
|
486
|
+
type: i0.Input,
|
|
487
|
+
args: [{
|
|
488
|
+
isSignal: true,
|
|
489
|
+
alias: "lowerLabel",
|
|
490
|
+
required: false
|
|
491
|
+
}]
|
|
492
|
+
}],
|
|
493
|
+
upperLabel: [{
|
|
494
|
+
type: i0.Input,
|
|
495
|
+
args: [{
|
|
496
|
+
isSignal: true,
|
|
497
|
+
alias: "upperLabel",
|
|
498
|
+
required: false
|
|
499
|
+
}]
|
|
500
|
+
}],
|
|
501
|
+
valueText: [{
|
|
502
|
+
type: i0.Input,
|
|
503
|
+
args: [{
|
|
504
|
+
isSignal: true,
|
|
505
|
+
alias: "valueText",
|
|
506
|
+
required: false
|
|
507
|
+
}]
|
|
508
|
+
}],
|
|
509
|
+
disabled: [{
|
|
510
|
+
type: i0.Input,
|
|
511
|
+
args: [{
|
|
512
|
+
isSignal: true,
|
|
513
|
+
alias: "disabled",
|
|
514
|
+
required: false
|
|
515
|
+
}]
|
|
516
|
+
}],
|
|
517
|
+
readonly: [{
|
|
518
|
+
type: i0.Input,
|
|
519
|
+
args: [{
|
|
520
|
+
isSignal: true,
|
|
521
|
+
alias: "readonly",
|
|
522
|
+
required: false
|
|
523
|
+
}]
|
|
524
|
+
}],
|
|
525
|
+
invalid: [{
|
|
526
|
+
type: i0.Input,
|
|
527
|
+
args: [{
|
|
528
|
+
isSignal: true,
|
|
529
|
+
alias: "invalid",
|
|
530
|
+
required: false
|
|
531
|
+
}]
|
|
532
|
+
}],
|
|
533
|
+
touched: [{
|
|
534
|
+
type: i0.Input,
|
|
535
|
+
args: [{
|
|
536
|
+
isSignal: true,
|
|
537
|
+
alias: "touched",
|
|
538
|
+
required: false
|
|
539
|
+
}]
|
|
540
|
+
}],
|
|
541
|
+
required: [{
|
|
542
|
+
type: i0.Input,
|
|
543
|
+
args: [{
|
|
544
|
+
isSignal: true,
|
|
545
|
+
alias: "required",
|
|
546
|
+
required: false
|
|
547
|
+
}]
|
|
548
|
+
}],
|
|
549
|
+
touch: [{
|
|
550
|
+
type: i0.Output,
|
|
551
|
+
args: ["touch"]
|
|
552
|
+
}],
|
|
553
|
+
rail: [{
|
|
554
|
+
type: i0.ViewChild,
|
|
555
|
+
args: ["rail", { isSignal: true }]
|
|
556
|
+
}]
|
|
557
|
+
}
|
|
558
|
+
});
|
|
559
|
+
export { VdRangeSlider };
|
|
560
|
+
|
|
561
|
+
//# sourceMappingURL=vadem-ui-range-slider.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vadem-ui-range-slider.mjs","names":[],"sources":["../../../projects/ui/range-slider/src/core/range-slider.ts","../../../projects/ui/range-slider/src/range-slider.ts"],"sourcesContent":["export type VdRangeValue = readonly [number, number];\nexport interface VdRangeBounds {\n min: number;\n max: number;\n step: number;\n}\n\nexport function vdRangeBounds(min: number, max: number, step: number): VdRangeBounds {\n min = Number.isFinite(min) ? min : 0;\n max = Number.isFinite(max) ? Math.max(min, max) : Math.max(min, 100);\n step = Number.isFinite(step) && step > 0 ? step : 1;\n const count = Math.floor((max - min) / step + 1e-9);\n if (!Number.isFinite(count) || !Number.isFinite(max - min)) return { min, max: min, step };\n return {\n min,\n max: Math.max(min, Math.min(max, Number((min + count * step).toPrecision(14)))),\n step,\n };\n}\nexport function vdRangeSnap(value: number, bounds: VdRangeBounds): number {\n const { min, max, step } = bounds;\n const safe = Number.isFinite(value) ? value : min;\n const clamped = Math.min(max, Math.max(min, safe));\n return Math.min(\n max,\n Math.max(min, Number((min + Math.round((clamped - min) / step) * step).toPrecision(14))),\n );\n}\nexport function vdRangeValue(value: VdRangeValue | null, bounds: VdRangeBounds): VdRangeValue {\n const lower = vdRangeSnap(value?.[0] ?? bounds.min, bounds);\n const upper = vdRangeSnap(value?.[1] ?? bounds.max, bounds);\n return lower <= upper ? [lower, upper] : [upper, lower];\n}\nexport function vdRangeMove(\n value: VdRangeValue,\n index: 0 | 1,\n next: number,\n bounds: VdRangeBounds,\n): VdRangeValue {\n const snapped = vdRangeSnap(next, bounds);\n return index === 0\n ? [Math.min(snapped, value[1]), value[1]]\n : [value[0], Math.max(snapped, value[0])];\n}\nexport function vdRangeKey(\n key: string,\n current: number,\n min: number,\n max: number,\n step: number,\n rtl: boolean,\n): number | null {\n switch (key) {\n case 'Home':\n return min;\n case 'End':\n return max;\n case 'ArrowUp':\n return current + step;\n case 'ArrowDown':\n return current - step;\n case 'ArrowRight':\n return current + (rtl ? -step : step);\n case 'ArrowLeft':\n return current + (rtl ? step : -step);\n case 'PageUp':\n return current + step * 10;\n case 'PageDown':\n return current - step * 10;\n default:\n return null;\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n Injector,\n OnInit,\n Signal,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n inject,\n input,\n model,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport { FormField, FormValueControl } from '@angular/forms/signals';\nimport {\n VD_FIELD,\n VdFieldControl,\n VdNgControlState,\n vdNgControlState,\n vdUniqueId,\n} from '@vadem/ui/field';\nimport {\n VdRangeValue,\n vdRangeBounds,\n vdRangeValue,\n vdRangeMove,\n vdRangeKey,\n} from './core/range-slider';\nimport { vdTexts } from '@vadem/ui/locale';\n\n@Component({\n selector: 'vd-range-slider',\n template: `\n <div class=\"vd-range-slider__group\" role=\"group\" [attr.aria-labelledby]=\"labelId\">\n <p class=\"vd-field__label\" [id]=\"labelId\">{{ label() }}</p>\n <div class=\"vd-range-slider__values\">\n @for (index of indices; track index) {\n <span\n ><span [id]=\"controlId + '-label-' + index\">{{\n index === 0 ? t().lowerLabel : t().upperLabel\n }}</span>\n <span class=\"vd-range-slider__number\">{{ valueText()(selected()[index]) }}</span></span\n >\n }\n </div>\n <div\n #rail\n class=\"vd-range-slider__rail\"\n [style.--vd-range-start]=\"percent(0) + '%'\"\n [style.--vd-range-end]=\"percent(1) + '%'\"\n (pointerdown)=\"onPointerDown($event)\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerup)=\"endDrag($event)\"\n (pointercancel)=\"endDrag($event)\"\n (lostpointercapture)=\"endDrag($event)\"\n >\n <span class=\"vd-range-slider__track\" aria-hidden=\"true\"></span>\n <span class=\"vd-range-slider__fill\" aria-hidden=\"true\"></span>\n @for (index of indices; track index) {\n <button\n type=\"button\"\n role=\"slider\"\n class=\"vd-range-slider__thumb\"\n [attr.data-index]=\"index\"\n [id]=\"index === 0 ? controlId : controlId + '-upper'\"\n [style.inset-inline-start]=\"percent(index) + '%'\"\n [attr.aria-labelledby]=\"labelId + ' ' + controlId + '-label-' + index\"\n [attr.aria-valuenow]=\"selected()[index]\"\n [attr.aria-valuemin]=\"index === 0 ? bounds().min : selected()[0]\"\n [attr.aria-valuemax]=\"index === 0 ? selected()[1] : bounds().max\"\n [attr.aria-valuetext]=\"valueText()(selected()[index])\"\n [attr.aria-describedby]=\"field?.describedBy() ?? null\"\n [attr.aria-invalid]=\"showInvalid() || null\"\n [attr.aria-disabled]=\"locked() || null\"\n [disabled]=\"isDisabled()\"\n (keydown)=\"onKeydown($event, index)\"\n >\n <span class=\"vd-visually-hidden\">{{\n index === 0 ? t().lowerLabel : t().upperLabel\n }}</span>\n </button>\n }\n </div>\n </div>\n `,\n host: {\n class: 'vd-range-slider',\n '[attr.data-invalid]': 'showInvalid() ? \"\" : null',\n '[attr.data-disabled]': 'isDisabled() ? \"\" : null',\n '[attr.data-readonly]': 'readonly() ? \"\" : null',\n '[attr.data-dragging]': 'dragging() ? \"\" : null',\n '(focusout)': 'onFocusOut($event)',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class VdRangeSlider implements FormValueControl<VdRangeValue | null>, OnInit {\n readonly value = model<VdRangeValue | null>([25, 75]);\n readonly minValue = input(0);\n readonly maxValue = input(100);\n readonly step = input(1);\n readonly label = input.required<string>();\n readonly lowerLabel = input<string>();\n readonly upperLabel = input<string>();\n /** Text inputs resolved against the active VD_LOCALE. */\n protected readonly t = vdTexts('rangeSlider', {\n lowerLabel: this.lowerLabel,\n upperLabel: this.upperLabel,\n });\n readonly valueText = input<(value: number) => string>(String);\n readonly disabled = input(false, { transform: booleanAttribute });\n readonly readonly = input(false, { transform: booleanAttribute });\n readonly invalid = input(false, { transform: booleanAttribute });\n readonly touched = input(false, { transform: booleanAttribute });\n readonly required = input(false, { transform: booleanAttribute });\n readonly touch = output<void>();\n readonly controlId = vdUniqueId('vd-range-slider');\n protected readonly labelId = this.controlId + '-group-label';\n protected readonly indices = [0, 1] as const;\n protected readonly bounds = computed(() =>\n vdRangeBounds(this.minValue(), this.maxValue(), this.step()),\n );\n protected readonly selected = computed(() => vdRangeValue(this.value(), this.bounds()));\n protected readonly dragging = signal(false);\n protected readonly field = inject(VD_FIELD, { optional: true });\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n private readonly rail = viewChild.required<ElementRef<HTMLElement>>('rail');\n private drag: { pointer: number; index: 0 | 1 } | null = null;\n private readonly injector = inject(Injector);\n private readonly destroyRef = inject(DestroyRef);\n private readonly formBound = signal(false);\n private readonly ngSource = signal<Signal<VdNgControlState> | null>(null);\n private readonly ngState = computed(\n () =>\n this.ngSource()?.() ?? { invalid: false, touched: false, disabled: false, required: false },\n );\n protected readonly isDisabled = computed(() => this.disabled() || this.ngState().disabled);\n protected readonly locked = computed(() => this.isDisabled() || this.readonly());\n protected readonly isRequired = computed(() => this.required() || this.ngState().required);\n protected readonly showInvalid = computed(\n () =>\n (this.invalid() && (!this.formBound() || this.touched())) ||\n (this.ngState().invalid && this.ngState().touched),\n );\n\n constructor() {\n const control: VdFieldControl = {\n id: signal(this.controlId),\n invalid: this.showInvalid,\n required: this.isRequired,\n disabled: this.isDisabled,\n };\n this.field?.register(control);\n this.destroyRef.onDestroy(() => this.field?.unregister(control));\n }\n ngOnInit(): void {\n const ng = this.injector.get(NgControl, null, { self: true, optional: true });\n this.formBound.set(\n !!ng || !!this.injector.get(FormField, null, { self: true, optional: true }),\n );\n this.ngSource.set(vdNgControlState(ng, this.destroyRef));\n }\n\n protected percent(index: 0 | 1): number {\n const { min, max } = this.bounds();\n return max > min ? ((this.selected()[index] - min) / (max - min)) * 100 : 0;\n }\n private choose(index: 0 | 1, next: number): void {\n if (this.locked()) return;\n const current = this.selected();\n const value = vdRangeMove(current, index, next, this.bounds());\n if (current[0] !== value[0] || current[1] !== value[1]) this.value.set(value);\n }\n protected onKeydown(event: KeyboardEvent, index: 0 | 1): void {\n if (event.altKey || event.ctrlKey || event.metaKey || event.shiftKey) return;\n const next = vdRangeKey(\n event.key,\n this.selected()[index],\n index === 0 ? this.bounds().min : this.selected()[0],\n index === 0 ? this.selected()[1] : this.bounds().max,\n this.bounds().step,\n this.host.matches(':dir(rtl)'),\n );\n if (next === null) return;\n event.preventDefault();\n this.choose(index, next);\n }\n private pointerValue(event: PointerEvent): number {\n const rect = this.rail().nativeElement.getBoundingClientRect();\n const fraction = rect.width ? (event.clientX - rect.x) / rect.width : 0;\n const position = this.host.matches(':dir(rtl)') ? 1 - fraction : fraction;\n return this.bounds().min + position * (this.bounds().max - this.bounds().min);\n }\n protected onPointerDown(event: PointerEvent): void {\n if (this.locked() || this.drag || !event.isPrimary || event.button !== 0) return;\n const target = (event.target as HTMLElement).closest<HTMLButtonElement>('[data-index]');\n const next = this.pointerValue(event);\n const index: 0 | 1 = target\n ? (Number(target.dataset['index']) as 0 | 1)\n : Math.abs(next - this.selected()[0]) < Math.abs(next - this.selected()[1])\n ? 0\n : 1;\n event.preventDefault();\n this.host.querySelectorAll<HTMLButtonElement>('button')[index].focus();\n this.rail().nativeElement.setPointerCapture(event.pointerId);\n this.drag = { pointer: event.pointerId, index };\n this.dragging.set(true);\n // Pressing a thumb should not jump to the pointer's offset within its hit area.\n if (!target) this.choose(index, next);\n }\n protected onPointerMove(event: PointerEvent): void {\n if (event.pointerId === this.drag?.pointer)\n this.choose(this.drag.index, this.pointerValue(event));\n }\n protected endDrag(event: PointerEvent): void {\n if (event.pointerId !== this.drag?.pointer) return;\n this.drag = null;\n this.dragging.set(false);\n const rail = this.rail().nativeElement;\n if (rail.hasPointerCapture(event.pointerId)) rail.releasePointerCapture(event.pointerId);\n }\n protected onFocusOut(event: FocusEvent): void {\n if (!event.relatedTarget || !this.host.contains(event.relatedTarget as Node)) this.touch.emit();\n }\n}\n"],"mappings":";;;;;;AAOA,SAAgB,cAAc,KAAa,KAAa,MAAY;CAClE,MAAM,OAAO,SAAS,GAAG,IAAI,MAAM;CACnC,MAAM,OAAO,SAAS,GAAG,IAAI,KAAK,IAAI,KAAK,GAAG,IAAI,KAAK,IAAI,KAAK,GAAG;CACnE,OAAO,OAAO,SAAS,IAAI,KAAK,OAAO,IAAI,OAAO;CAClD,MAAM,QAAQ,KAAK,OAAO,MAAM,OAAO,OAAO,IAAI;CAClD,IAAI,CAAC,OAAO,SAAS,KAAK,KAAK,CAAC,OAAO,SAAS,MAAM,GAAG,GAAG,OAAO;EAAE;EAAK,KAAK;EAAK;CAAI;CACxF,OAAO;EACL;EACA,KAAK,KAAK,IAAI,KAAK,KAAK,IAAI,KAAK,QAAQ,MAAM,QAAQ,KAAA,CAAM,YAAY,EAAE,CAAC,CAAC,CAAC;EAC9E;CACD;AACH;AACA,SAAgB,YAAY,OAAe,QAAqB;CAC9D,MAAM,EAAE,KAAK,KAAK,SAAS;CAG3B,OAAO,KAAK,IACV,KACA,KAAK,IAAI,KAAK,QAAQ,MAAM,KAAK,OAHnB,KAAK,IAAI,KAAK,KAAK,IAAI,KAD1B,OAAO,SAAS,KAAK,IAAI,QAAQ,GACE,CAGN,IAAU,OAAO,IAAI,IAAI,KAAA,CAAM,YAAY,EAAE,CAAC,CAAC,CAAC;AAE5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