@aeris-ui/core 22.0.0-alpha.1 → 22.0.0-alpha.10
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/README.md +200 -191
- package/fesm2022/aeris-ui-core-accordion.mjs +646 -255
- package/fesm2022/aeris-ui-core-accordion.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-animate-on-scroll.mjs +284 -103
- package/fesm2022/aeris-ui-core-animate-on-scroll.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-auto-complete.mjs +1228 -446
- package/fesm2022/aeris-ui-core-auto-complete.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-auto-focus.mjs +111 -61
- package/fesm2022/aeris-ui-core-auto-focus.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-avatar.mjs +383 -101
- package/fesm2022/aeris-ui-core-avatar.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-badge.mjs +562 -115
- package/fesm2022/aeris-ui-core-badge.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-block-ui.mjs +209 -101
- package/fesm2022/aeris-ui-core-block-ui.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-breadcrumb.mjs +581 -189
- package/fesm2022/aeris-ui-core-breadcrumb.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-button-group.mjs +153 -38
- package/fesm2022/aeris-ui-core-button-group.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-button.mjs +741 -139
- package/fesm2022/aeris-ui-core-button.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-card.mjs +371 -101
- package/fesm2022/aeris-ui-core-card.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-carousel.mjs +773 -369
- package/fesm2022/aeris-ui-core-carousel.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-cascade-select.mjs +1171 -521
- package/fesm2022/aeris-ui-core-cascade-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-chart.mjs +455 -258
- package/fesm2022/aeris-ui-core-chart.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-checkbox.mjs +440 -140
- package/fesm2022/aeris-ui-core-checkbox.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-chip.mjs +430 -117
- package/fesm2022/aeris-ui-core-chip.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-class-names.mjs +87 -65
- package/fesm2022/aeris-ui-core-class-names.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-code-block.mjs +637 -0
- package/fesm2022/aeris-ui-core-code-block.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-color-picker.mjs +1340 -700
- package/fesm2022/aeris-ui-core-color-picker.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-compare.mjs +823 -318
- package/fesm2022/aeris-ui-core-compare.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-confirm-dialog.mjs +1404 -555
- package/fesm2022/aeris-ui-core-confirm-dialog.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-confirm-popup.mjs +1471 -740
- package/fesm2022/aeris-ui-core-confirm-popup.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-context-menu.mjs +918 -443
- package/fesm2022/aeris-ui-core-context-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-date-picker.mjs +1942 -1123
- package/fesm2022/aeris-ui-core-date-picker.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-dialog.mjs +1079 -346
- package/fesm2022/aeris-ui-core-dialog.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-divider.mjs +204 -43
- package/fesm2022/aeris-ui-core-divider.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-drawer.mjs +1015 -322
- package/fesm2022/aeris-ui-core-drawer.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-dynamic-dialog.mjs +410 -254
- package/fesm2022/aeris-ui-core-dynamic-dialog.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-editor.mjs +967 -587
- package/fesm2022/aeris-ui-core-editor.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-file-upload.mjs +1379 -522
- package/fesm2022/aeris-ui-core-file-upload.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-filter-service.mjs +258 -301
- package/fesm2022/aeris-ui-core-filter-service.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-fluid.mjs +68 -21
- package/fesm2022/aeris-ui-core-fluid.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-focus-trap.mjs +206 -182
- package/fesm2022/aeris-ui-core-focus-trap.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-form-field.mjs +688 -0
- package/fesm2022/aeris-ui-core-form-field.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-galleria.mjs +2446 -1117
- package/fesm2022/aeris-ui-core-galleria.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-glass.mjs +110 -33
- package/fesm2022/aeris-ui-core-glass.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-icon-field.mjs +426 -98
- package/fesm2022/aeris-ui-core-icon-field.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-inplace.mjs +452 -130
- package/fesm2022/aeris-ui-core-inplace.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-group.mjs +413 -107
- package/fesm2022/aeris-ui-core-input-group.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-mask.mjs +658 -255
- package/fesm2022/aeris-ui-core-input-mask.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-number.mjs +926 -291
- package/fesm2022/aeris-ui-core-input-number.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-otp.mjs +678 -264
- package/fesm2022/aeris-ui-core-input-otp.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-text.mjs +625 -158
- package/fesm2022/aeris-ui-core-input-text.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-key-filter.mjs +263 -201
- package/fesm2022/aeris-ui-core-key-filter.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-mega-menu.mjs +613 -382
- package/fesm2022/aeris-ui-core-mega-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-menu.mjs +1062 -472
- package/fesm2022/aeris-ui-core-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-menubar.mjs +994 -393
- package/fesm2022/aeris-ui-core-menubar.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-message.mjs +477 -145
- package/fesm2022/aeris-ui-core-message.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-meter-group.mjs +623 -230
- package/fesm2022/aeris-ui-core-meter-group.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-multi-select.mjs +1598 -561
- package/fesm2022/aeris-ui-core-multi-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-order-list.mjs +592 -220
- package/fesm2022/aeris-ui-core-order-list.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-organization-chart.mjs +485 -199
- package/fesm2022/aeris-ui-core-organization-chart.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-paginator.mjs +428 -123
- package/fesm2022/aeris-ui-core-paginator.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-panel.mjs +596 -196
- package/fesm2022/aeris-ui-core-panel.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-password.mjs +925 -249
- package/fesm2022/aeris-ui-core-password.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-pick-list.mjs +1280 -659
- package/fesm2022/aeris-ui-core-pick-list.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-popover.mjs +912 -375
- package/fesm2022/aeris-ui-core-popover.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-progress-bar.mjs +549 -176
- package/fesm2022/aeris-ui-core-progress-bar.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-progress-spinner.mjs +410 -133
- package/fesm2022/aeris-ui-core-progress-spinner.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-radio-button.mjs +394 -124
- package/fesm2022/aeris-ui-core-radio-button.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-rating.mjs +506 -231
- package/fesm2022/aeris-ui-core-rating.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-scroll-panel.mjs +457 -154
- package/fesm2022/aeris-ui-core-scroll-panel.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-scroll-top.mjs +226 -63
- package/fesm2022/aeris-ui-core-scroll-top.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-select.mjs +1845 -648
- package/fesm2022/aeris-ui-core-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-skeleton.mjs +149 -45
- package/fesm2022/aeris-ui-core-skeleton.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-slider.mjs +884 -430
- package/fesm2022/aeris-ui-core-slider.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-speed-dial.mjs +861 -337
- package/fesm2022/aeris-ui-core-speed-dial.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-split-button.mjs +955 -266
- package/fesm2022/aeris-ui-core-split-button.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-splitter.mjs +812 -352
- package/fesm2022/aeris-ui-core-splitter.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-stepper.mjs +697 -254
- package/fesm2022/aeris-ui-core-stepper.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-style-class.mjs +587 -342
- package/fesm2022/aeris-ui-core-style-class.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-table.mjs +2034 -869
- package/fesm2022/aeris-ui-core-table.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tabs.mjs +789 -279
- package/fesm2022/aeris-ui-core-tabs.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-textarea.mjs +856 -219
- package/fesm2022/aeris-ui-core-textarea.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-theme-builder.mjs +1284 -1399
- package/fesm2022/aeris-ui-core-theme-builder.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-theming.mjs +132 -144
- package/fesm2022/aeris-ui-core-theming.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tiered-menu.mjs +909 -441
- package/fesm2022/aeris-ui-core-tiered-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-timeline.mjs +407 -131
- package/fesm2022/aeris-ui-core-timeline.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-toast.mjs +1076 -384
- package/fesm2022/aeris-ui-core-toast.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-toggle-switch.mjs +398 -132
- package/fesm2022/aeris-ui-core-toggle-switch.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-toolbar.mjs +458 -121
- package/fesm2022/aeris-ui-core-toolbar.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tooltip.mjs +625 -330
- package/fesm2022/aeris-ui-core-tooltip.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tree-select.mjs +1453 -621
- package/fesm2022/aeris-ui-core-tree-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tree-table.mjs +2019 -940
- package/fesm2022/aeris-ui-core-tree-table.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tree.mjs +1107 -658
- package/fesm2022/aeris-ui-core-tree.mjs.map +1 -1
- package/fesm2022/aeris-ui-core.mjs +985 -316
- package/fesm2022/aeris-ui-core.mjs.map +1 -1
- package/package.json +20 -8
- package/schematics/ng-add/schema.json +1 -1
- package/schematics/runtime/schematics/ng-add/options.js +4 -4
- package/schematics/runtime/schematics/ng-add/options.js.map +1 -1
- package/schematics/runtime/schematics/ng-add/workspace.js +1 -1
- package/schematics/runtime/schematics/ng-add/workspace.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-contrast.js +6 -17
- package/schematics/runtime/theme-builder/aeris-contrast.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-foundation.js +10 -4
- package/schematics/runtime/theme-builder/aeris-foundation.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-semantic-tones.js +28 -5
- package/schematics/runtime/theme-builder/aeris-semantic-tones.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-theme-generator.js +2 -2
- package/schematics/runtime/theme-builder/aeris-theme-generator.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-theme-resolver.js +22 -8
- package/schematics/runtime/theme-builder/aeris-theme-resolver.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-theme-tokens.js +12 -4
- package/schematics/runtime/theme-builder/aeris-theme-tokens.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-theme-validation.js +7 -1
- package/schematics/runtime/theme-builder/aeris-theme-validation.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-theme.js +49 -33
- package/schematics/runtime/theme-builder/aeris-theme.js.map +1 -1
- package/styles/_fallback-colors.scss +10 -0
- package/styles/_mobile.scss +16 -0
- package/styles/_tokens.scss +5 -5
- package/styles/aeris.css +412 -125
- package/styles/controls.css +61 -29
- package/tools/aeris-theme.mjs +2 -2
- package/tools/aeris-theme.schema.json +5 -2
- package/types/aeris-ui-core-accordion.d.ts +167 -93
- package/types/aeris-ui-core-animate-on-scroll.d.ts +72 -31
- package/types/aeris-ui-core-auto-complete.d.ts +327 -140
- package/types/aeris-ui-core-auto-focus.d.ts +24 -16
- package/types/aeris-ui-core-avatar.d.ts +112 -42
- package/types/aeris-ui-core-badge.d.ts +160 -46
- package/types/aeris-ui-core-block-ui.d.ts +47 -27
- package/types/aeris-ui-core-breadcrumb.d.ts +163 -92
- package/types/aeris-ui-core-button-group.d.ts +37 -16
- package/types/aeris-ui-core-button.d.ts +226 -67
- package/types/aeris-ui-core-card.d.ts +74 -37
- package/types/aeris-ui-core-carousel.d.ts +201 -117
- package/types/aeris-ui-core-cascade-select.d.ts +257 -123
- package/types/aeris-ui-core-chart.d.ts +134 -84
- package/types/aeris-ui-core-checkbox.d.ts +139 -54
- package/types/aeris-ui-core-chip.d.ts +116 -51
- package/types/aeris-ui-core-class-names.d.ts +22 -20
- package/types/aeris-ui-core-code-block.d.ts +188 -0
- package/types/aeris-ui-core-color-picker.d.ts +348 -143
- package/types/aeris-ui-core-compare.d.ts +224 -102
- package/types/aeris-ui-core-confirm-dialog.d.ts +442 -245
- package/types/aeris-ui-core-confirm-popup.d.ts +442 -263
- package/types/aeris-ui-core-context-menu.d.ts +264 -146
- package/types/aeris-ui-core-date-picker.d.ts +489 -217
- package/types/aeris-ui-core-dialog.d.ts +288 -117
- package/types/aeris-ui-core-divider.d.ts +58 -20
- package/types/aeris-ui-core-drawer.d.ts +273 -112
- package/types/aeris-ui-core-dynamic-dialog.d.ts +158 -137
- package/types/aeris-ui-core-editor.d.ts +250 -123
- package/types/aeris-ui-core-file-upload.d.ts +367 -197
- package/types/aeris-ui-core-filter-service.d.ts +48 -52
- package/types/aeris-ui-core-fluid.d.ts +12 -9
- package/types/aeris-ui-core-focus-trap.d.ts +39 -31
- package/types/aeris-ui-core-form-field.d.ts +163 -0
- package/types/aeris-ui-core-galleria.d.ts +588 -256
- package/types/aeris-ui-core-glass.d.ts +24 -11
- package/types/aeris-ui-core-icon-field.d.ts +94 -32
- package/types/aeris-ui-core-inplace.d.ts +123 -62
- package/types/aeris-ui-core-input-group.d.ts +84 -33
- package/types/aeris-ui-core-input-mask.d.ts +194 -69
- package/types/aeris-ui-core-input-number.d.ts +272 -87
- package/types/aeris-ui-core-input-otp.d.ts +191 -81
- package/types/aeris-ui-core-input-text.d.ts +185 -60
- package/types/aeris-ui-core-key-filter.d.ts +53 -39
- package/types/aeris-ui-core-mega-menu.d.ts +175 -121
- package/types/aeris-ui-core-menu.d.ts +277 -168
- package/types/aeris-ui-core-menubar.d.ts +273 -135
- package/types/aeris-ui-core-message.d.ts +132 -60
- package/types/aeris-ui-core-meter-group.d.ts +163 -90
- package/types/aeris-ui-core-multi-select.d.ts +439 -180
- package/types/aeris-ui-core-order-list.d.ts +144 -66
- package/types/aeris-ui-core-organization-chart.d.ts +133 -77
- package/types/aeris-ui-core-paginator.d.ts +93 -38
- package/types/aeris-ui-core-panel.d.ts +149 -78
- package/types/aeris-ui-core-password.d.ts +258 -102
- package/types/aeris-ui-core-pick-list.d.ts +374 -179
- package/types/aeris-ui-core-popover.d.ts +219 -105
- package/types/aeris-ui-core-progress-bar.d.ts +157 -73
- package/types/aeris-ui-core-progress-spinner.d.ts +110 -48
- package/types/aeris-ui-core-radio-button.d.ts +124 -50
- package/types/aeris-ui-core-rating.d.ts +149 -76
- package/types/aeris-ui-core-scroll-panel.d.ts +142 -64
- package/types/aeris-ui-core-scroll-top.d.ts +66 -29
- package/types/aeris-ui-core-select.d.ts +475 -217
- package/types/aeris-ui-core-skeleton.d.ts +39 -17
- package/types/aeris-ui-core-slider.d.ts +270 -115
- package/types/aeris-ui-core-speed-dial.d.ts +241 -111
- package/types/aeris-ui-core-split-button.d.ts +267 -113
- package/types/aeris-ui-core-splitter.d.ts +225 -106
- package/types/aeris-ui-core-stepper.d.ts +184 -91
- package/types/aeris-ui-core-style-class.d.ts +141 -71
- package/types/aeris-ui-core-table.d.ts +596 -304
- package/types/aeris-ui-core-tabs.d.ts +181 -76
- package/types/aeris-ui-core-textarea.d.ts +261 -78
- package/types/aeris-ui-core-theme-builder.d.ts +472 -450
- package/types/aeris-ui-core-theming.d.ts +42 -45
- package/types/aeris-ui-core-tiered-menu.d.ts +251 -142
- package/types/aeris-ui-core-timeline.d.ts +109 -71
- package/types/aeris-ui-core-toast.d.ts +225 -115
- package/types/aeris-ui-core-toggle-switch.d.ts +125 -51
- package/types/aeris-ui-core-toolbar.d.ts +98 -41
- package/types/aeris-ui-core-tooltip.d.ts +157 -88
- package/types/aeris-ui-core-tree-select.d.ts +364 -171
- package/types/aeris-ui-core-tree-table.d.ts +566 -286
- package/types/aeris-ui-core-tree.d.ts +270 -165
- package/types/aeris-ui-core.d.ts +197 -72
|
@@ -1,397 +1,576 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import { NG_VALUE_ACCESSOR } from
|
|
4
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Component, booleanAttribute, computed, forwardRef, input, model, numberAttribute, output, signal, viewChildren } from "@angular/core";
|
|
3
|
+
import { NG_VALUE_ACCESSOR } from "@angular/forms";
|
|
4
|
+
import { ɵaerisDisplayInvalid } from "@aeris-ui/core";
|
|
5
5
|
function sliderPrecision(step) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
return text.includes('.') ? text.split('.')[1]?.length ?? 0 : 0;
|
|
6
|
+
const text = String(step);
|
|
7
|
+
if (text.includes("e-")) return Number(text.split("e-")[1] ?? 0);
|
|
8
|
+
return text.includes(".") ? text.split(".")[1]?.length ?? 0 : 0;
|
|
10
9
|
}
|
|
11
10
|
function clampSliderValue(value, min, max) {
|
|
12
|
-
|
|
11
|
+
return Math.min(max, Math.max(min, value));
|
|
13
12
|
}
|
|
14
13
|
function alignSliderValue(value, min, max, step) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
const safeStep = step > 0 ? step : 1;
|
|
15
|
+
const aligned = min + Math.round((value - min) / safeStep) * safeStep;
|
|
16
|
+
return Number(clampSliderValue(aligned, min, max).toFixed(sliderPrecision(safeStep)));
|
|
18
17
|
}
|
|
19
18
|
function sliderPercentage(value, min, max) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
return ((clampSliderValue(value, min, max) - min) / (max - min)) * 100;
|
|
19
|
+
if (max <= min) return 0;
|
|
20
|
+
return (clampSliderValue(value, min, max) - min) / (max - min) * 100;
|
|
23
21
|
}
|
|
24
22
|
function normalizeSliderRange(value, min, max, step, minRange) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
return [lower, expandedUpper];
|
|
33
|
-
return [alignSliderValue(upper - gap, min, max, step), upper];
|
|
23
|
+
const lower = alignSliderValue(Math.min(value[0], value[1]), min, max, step);
|
|
24
|
+
const upper = alignSliderValue(Math.max(value[0], value[1]), min, max, step);
|
|
25
|
+
const gap = Math.max(0, minRange);
|
|
26
|
+
if (upper - lower >= gap) return [lower, upper];
|
|
27
|
+
const expandedUpper = alignSliderValue(lower + gap, min, max, step);
|
|
28
|
+
if (expandedUpper - lower >= gap) return [lower, expandedUpper];
|
|
29
|
+
return [alignSliderValue(upper - gap, min, max, step), upper];
|
|
34
30
|
}
|
|
35
|
-
|
|
36
31
|
let sliderId = 0;
|
|
37
|
-
class AerisSlider {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
32
|
+
var AerisSlider = class AerisSlider {
|
|
33
|
+
value = model(0, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
34
|
+
range = input(false, {
|
|
35
|
+
...ngDevMode ? { debugName: "range" } : /* istanbul ignore next */ {},
|
|
36
|
+
transform: booleanAttribute
|
|
37
|
+
});
|
|
38
|
+
min = input(0, {
|
|
39
|
+
...ngDevMode ? { debugName: "min" } : /* istanbul ignore next */ {},
|
|
40
|
+
transform: numberAttribute
|
|
41
|
+
});
|
|
42
|
+
max = input(100, {
|
|
43
|
+
...ngDevMode ? { debugName: "max" } : /* istanbul ignore next */ {},
|
|
44
|
+
transform: numberAttribute
|
|
45
|
+
});
|
|
46
|
+
step = input(1, {
|
|
47
|
+
...ngDevMode ? { debugName: "step" } : /* istanbul ignore next */ {},
|
|
48
|
+
transform: numberAttribute
|
|
49
|
+
});
|
|
50
|
+
minRange = input(0, {
|
|
51
|
+
...ngDevMode ? { debugName: "minRange" } : /* istanbul ignore next */ {},
|
|
52
|
+
transform: numberAttribute
|
|
53
|
+
});
|
|
54
|
+
pageStep = input(void 0, {
|
|
55
|
+
...ngDevMode ? { debugName: "pageStep" } : /* istanbul ignore next */ {},
|
|
56
|
+
transform: optionalNumber
|
|
57
|
+
});
|
|
58
|
+
orientation = input("horizontal", ...ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []);
|
|
59
|
+
reversed = input(false, {
|
|
60
|
+
...ngDevMode ? { debugName: "reversed" } : /* istanbul ignore next */ {},
|
|
61
|
+
transform: booleanAttribute
|
|
62
|
+
});
|
|
63
|
+
size = input("md", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
|
|
64
|
+
name = input("", ...ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []);
|
|
65
|
+
inputId = input("", ...ngDevMode ? [{ debugName: "inputId" }] : /* istanbul ignore next */ []);
|
|
66
|
+
ariaLabel = input("Value", ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
67
|
+
ariaLabelledBy = input("", ...ngDevMode ? [{ debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []);
|
|
68
|
+
ariaDescribedBy = input("", ...ngDevMode ? [{ debugName: "ariaDescribedBy" }] : /* istanbul ignore next */ []);
|
|
69
|
+
lowerAriaLabel = input("Minimum value", ...ngDevMode ? [{ debugName: "lowerAriaLabel" }] : /* istanbul ignore next */ []);
|
|
70
|
+
upperAriaLabel = input("Maximum value", ...ngDevMode ? [{ debugName: "upperAriaLabel" }] : /* istanbul ignore next */ []);
|
|
71
|
+
lowerAriaLabelledby = input("", ...ngDevMode ? [{ debugName: "lowerAriaLabelledby" }] : /* istanbul ignore next */ []);
|
|
72
|
+
upperAriaLabelledby = input("", ...ngDevMode ? [{ debugName: "upperAriaLabelledby" }] : /* istanbul ignore next */ []);
|
|
73
|
+
valueText = input(null, ...ngDevMode ? [{ debugName: "valueText" }] : /* istanbul ignore next */ []);
|
|
74
|
+
showValue = input(false, {
|
|
75
|
+
...ngDevMode ? { debugName: "showValue" } : /* istanbul ignore next */ {},
|
|
76
|
+
transform: booleanAttribute
|
|
77
|
+
});
|
|
78
|
+
showTooltip = input(false, {
|
|
79
|
+
...ngDevMode ? { debugName: "showTooltip" } : /* istanbul ignore next */ {},
|
|
80
|
+
transform: booleanAttribute
|
|
81
|
+
});
|
|
82
|
+
showTicks = input(false, {
|
|
83
|
+
...ngDevMode ? { debugName: "showTicks" } : /* istanbul ignore next */ {},
|
|
84
|
+
transform: booleanAttribute
|
|
85
|
+
});
|
|
86
|
+
maxTicks = input(101, {
|
|
87
|
+
...ngDevMode ? { debugName: "maxTicks" } : /* istanbul ignore next */ {},
|
|
88
|
+
transform: numberAttribute
|
|
89
|
+
});
|
|
90
|
+
showMinMax = input(false, {
|
|
91
|
+
...ngDevMode ? { debugName: "showMinMax" } : /* istanbul ignore next */ {},
|
|
92
|
+
transform: booleanAttribute
|
|
93
|
+
});
|
|
94
|
+
disabled = input(false, {
|
|
95
|
+
...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
|
|
96
|
+
transform: booleanAttribute
|
|
97
|
+
});
|
|
98
|
+
readonly = input(false, {
|
|
99
|
+
...ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {},
|
|
100
|
+
transform: booleanAttribute
|
|
101
|
+
});
|
|
102
|
+
invalid = input(false, {
|
|
103
|
+
...ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {},
|
|
104
|
+
transform: booleanAttribute
|
|
105
|
+
});
|
|
106
|
+
touched = input(null, ...ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []);
|
|
107
|
+
displayInvalid = computed(() => ɵaerisDisplayInvalid(this.invalid(), this.touched()), ...ngDevMode ? [{ debugName: "displayInvalid" }] : /* istanbul ignore next */ []);
|
|
108
|
+
fluid = input(false, {
|
|
109
|
+
...ngDevMode ? { debugName: "fluid" } : /* istanbul ignore next */ {},
|
|
110
|
+
transform: booleanAttribute
|
|
111
|
+
});
|
|
112
|
+
sliding = output();
|
|
113
|
+
changed = output();
|
|
114
|
+
focused = output();
|
|
115
|
+
blurred = output();
|
|
116
|
+
touch = output();
|
|
117
|
+
formDisabled = signal(false, ...ngDevMode ? [{ debugName: "formDisabled" }] : /* istanbul ignore next */ []);
|
|
118
|
+
activeThumb = signal(null, ...ngDevMode ? [{ debugName: "activeThumb" }] : /* istanbul ignore next */ []);
|
|
119
|
+
effectiveDisabled = computed(() => this.disabled() || this.formDisabled(), ...ngDevMode ? [{ debugName: "effectiveDisabled" }] : /* istanbul ignore next */ []);
|
|
120
|
+
effectiveStep = computed(() => this.step() > 0 ? this.step() : 1, ...ngDevMode ? [{ debugName: "effectiveStep" }] : /* istanbul ignore next */ []);
|
|
121
|
+
effectiveMinRange = computed(() => Math.min(this.normalizedMax() - this.normalizedMin(), Math.max(0, this.minRange())), ...ngDevMode ? [{ debugName: "effectiveMinRange" }] : /* istanbul ignore next */ []);
|
|
122
|
+
normalizedValue = computed(() => {
|
|
123
|
+
const min = this.normalizedMin();
|
|
124
|
+
const max = this.normalizedMax();
|
|
125
|
+
if (this.range()) {
|
|
126
|
+
const current = this.value();
|
|
127
|
+
return normalizeSliderRange(Array.isArray(current) ? [Number(current[0]), Number(current[1])] : [min, Number(current)], min, max, this.effectiveStep(), this.effectiveMinRange());
|
|
128
|
+
}
|
|
129
|
+
const current = this.value();
|
|
130
|
+
return alignSliderValue(Array.isArray(current) ? Number(current[0]) : Number(current), min, max, this.effectiveStep());
|
|
131
|
+
}, ...ngDevMode ? [{ debugName: "normalizedValue" }] : /* istanbul ignore next */ []);
|
|
132
|
+
singleValue = computed(() => {
|
|
133
|
+
const value = this.normalizedValue();
|
|
134
|
+
return Array.isArray(value) ? value[0] : value;
|
|
135
|
+
}, ...ngDevMode ? [{ debugName: "singleValue" }] : /* istanbul ignore next */ []);
|
|
136
|
+
lowerValue = computed(() => {
|
|
137
|
+
const value = this.normalizedValue();
|
|
138
|
+
return Array.isArray(value) ? value[0] : this.normalizedMin();
|
|
139
|
+
}, ...ngDevMode ? [{ debugName: "lowerValue" }] : /* istanbul ignore next */ []);
|
|
140
|
+
upperValue = computed(() => {
|
|
141
|
+
const value = this.normalizedValue();
|
|
142
|
+
return Array.isArray(value) ? value[1] : this.singleValue();
|
|
143
|
+
}, ...ngDevMode ? [{ debugName: "upperValue" }] : /* istanbul ignore next */ []);
|
|
144
|
+
startPercentage = computed(() => {
|
|
145
|
+
const percentage = this.range() ? this.percentage(this.lowerValue()) : 0;
|
|
146
|
+
return this.reversed() ? 100 - this.endBasePercentage() : percentage;
|
|
147
|
+
}, ...ngDevMode ? [{ debugName: "startPercentage" }] : /* istanbul ignore next */ []);
|
|
148
|
+
endPercentage = computed(() => {
|
|
149
|
+
const percentage = this.endBasePercentage();
|
|
150
|
+
return this.reversed() ? 100 - (this.range() ? this.percentage(this.lowerValue()) : 0) : percentage;
|
|
151
|
+
}, ...ngDevMode ? [{ debugName: "endPercentage" }] : /* istanbul ignore next */ []);
|
|
152
|
+
singlePercentage = computed(() => this.visualPercentage(this.singleValue()), ...ngDevMode ? [{ debugName: "singlePercentage" }] : /* istanbul ignore next */ []);
|
|
153
|
+
lowerPercentage = computed(() => this.visualPercentage(this.lowerValue()), ...ngDevMode ? [{ debugName: "lowerPercentage" }] : /* istanbul ignore next */ []);
|
|
154
|
+
upperPercentage = computed(() => this.visualPercentage(this.upperValue()), ...ngDevMode ? [{ debugName: "upperPercentage" }] : /* istanbul ignore next */ []);
|
|
155
|
+
formattedSingleValue = computed(() => this.formatValue(this.singleValue()), ...ngDevMode ? [{ debugName: "formattedSingleValue" }] : /* istanbul ignore next */ []);
|
|
156
|
+
formattedLowerValue = computed(() => this.formatValue(this.lowerValue()), ...ngDevMode ? [{ debugName: "formattedLowerValue" }] : /* istanbul ignore next */ []);
|
|
157
|
+
formattedUpperValue = computed(() => this.formatValue(this.upperValue()), ...ngDevMode ? [{ debugName: "formattedUpperValue" }] : /* istanbul ignore next */ []);
|
|
158
|
+
serializedValue = computed(() => this.range() ? `${this.lowerValue()},${this.upperValue()}` : String(this.singleValue()), ...ngDevMode ? [{ debugName: "serializedValue" }] : /* istanbul ignore next */ []);
|
|
159
|
+
ticks = computed(() => {
|
|
160
|
+
const count = Math.floor((this.normalizedMax() - this.normalizedMin()) / this.effectiveStep()) + 1;
|
|
161
|
+
if (!this.showTicks() || count > Math.max(2, this.maxTicks())) return [];
|
|
162
|
+
return Array.from({ length: count }, (_, index) => {
|
|
163
|
+
const value = alignSliderValue(this.normalizedMin() + index * this.effectiveStep(), this.normalizedMin(), this.normalizedMax(), this.effectiveStep());
|
|
164
|
+
return {
|
|
165
|
+
value,
|
|
166
|
+
percentage: this.visualPercentage(value),
|
|
167
|
+
active: this.range() ? value >= this.lowerValue() && value <= this.upperValue() : value <= this.singleValue()
|
|
168
|
+
};
|
|
169
|
+
});
|
|
170
|
+
}, ...ngDevMode ? [{ debugName: "ticks" }] : /* istanbul ignore next */ []);
|
|
171
|
+
generatedId = `aeris-slider-${++sliderId}`;
|
|
172
|
+
singleThumbId = computed(() => this.inputId() || this.generatedId, ...ngDevMode ? [{ debugName: "singleThumbId" }] : /* istanbul ignore next */ []);
|
|
173
|
+
lowerThumbId = computed(() => `${this.inputId() || this.generatedId}-lower`, ...ngDevMode ? [{ debugName: "lowerThumbId" }] : /* istanbul ignore next */ []);
|
|
174
|
+
upperThumbId = computed(() => `${this.inputId() || this.generatedId}-upper`, ...ngDevMode ? [{ debugName: "upperThumbId" }] : /* istanbul ignore next */ []);
|
|
175
|
+
thumbButtons = viewChildren("thumbButton", ...ngDevMode ? [{ debugName: "thumbButtons" }] : /* istanbul ignore next */ []);
|
|
176
|
+
dragThumb = null;
|
|
177
|
+
dragChanged = false;
|
|
178
|
+
onChange = () => void 0;
|
|
179
|
+
onTouched = () => void 0;
|
|
180
|
+
writeValue(value) {
|
|
181
|
+
this.value.set(this.coerceValue(value));
|
|
182
|
+
}
|
|
183
|
+
registerOnChange(callback) {
|
|
184
|
+
this.onChange = callback;
|
|
185
|
+
}
|
|
186
|
+
registerOnTouched(callback) {
|
|
187
|
+
this.onTouched = callback;
|
|
188
|
+
}
|
|
189
|
+
setDisabledState(disabled) {
|
|
190
|
+
this.formDisabled.set(disabled);
|
|
191
|
+
}
|
|
192
|
+
focus(thumb = this.range() ? "lower" : "single") {
|
|
193
|
+
this.focusThumb(thumb);
|
|
194
|
+
}
|
|
195
|
+
reset() {
|
|
196
|
+
this.setValue(this.range() ? [this.normalizedMin(), this.normalizedMax()] : this.normalizedMin());
|
|
197
|
+
}
|
|
198
|
+
formatValue(value) {
|
|
199
|
+
return this.valueText()?.(value) ?? String(value);
|
|
200
|
+
}
|
|
201
|
+
handleTrackPointerDown(event) {
|
|
202
|
+
if (this.effectiveDisabled() || this.readonly() || event.button !== 0) return;
|
|
203
|
+
event.preventDefault();
|
|
204
|
+
const track = event.currentTarget;
|
|
205
|
+
track.setPointerCapture(event.pointerId);
|
|
206
|
+
const value = this.pointerValue(event, track);
|
|
207
|
+
this.dragThumb = this.closestThumb(value);
|
|
208
|
+
this.dragChanged = false;
|
|
209
|
+
this.activeThumb.set(this.dragThumb);
|
|
210
|
+
this.updateThumb(this.dragThumb, value, event, true);
|
|
211
|
+
this.focusThumb(this.dragThumb);
|
|
212
|
+
}
|
|
213
|
+
handleTrackPointerMove(event) {
|
|
214
|
+
if (!this.dragThumb) return;
|
|
215
|
+
const track = event.currentTarget;
|
|
216
|
+
this.updateThumb(this.dragThumb, this.pointerValue(event, track), event, true);
|
|
217
|
+
}
|
|
218
|
+
handleTrackPointerUp(event) {
|
|
219
|
+
if (!this.dragThumb) return;
|
|
220
|
+
const thumb = this.dragThumb;
|
|
221
|
+
this.dragThumb = null;
|
|
222
|
+
this.activeThumb.set(null);
|
|
223
|
+
if (this.dragChanged) this.changed.emit({
|
|
224
|
+
originalEvent: event,
|
|
225
|
+
value: this.normalizedValue(),
|
|
226
|
+
thumb
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
handleThumbKeydown(event, thumb) {
|
|
230
|
+
if (this.effectiveDisabled() || this.readonly()) return;
|
|
231
|
+
const direction = this.keyDirection(event.key);
|
|
232
|
+
let next = null;
|
|
233
|
+
const current = this.thumbValue(thumb);
|
|
234
|
+
if (direction !== null) next = current + direction * this.effectiveStep();
|
|
235
|
+
else if (event.key === "PageUp") next = current + this.resolvedPageStep();
|
|
236
|
+
else if (event.key === "PageDown") next = current - this.resolvedPageStep();
|
|
237
|
+
else if (event.key === "Home") next = thumb === "upper" ? this.lowerValue() + this.effectiveMinRange() : this.normalizedMin();
|
|
238
|
+
else if (event.key === "End") next = thumb === "lower" ? this.upperValue() - this.effectiveMinRange() : this.normalizedMax();
|
|
239
|
+
if (next === null) return;
|
|
240
|
+
event.preventDefault();
|
|
241
|
+
if (this.updateThumb(thumb, next, event, true)) this.changed.emit({
|
|
242
|
+
originalEvent: event,
|
|
243
|
+
value: this.normalizedValue(),
|
|
244
|
+
thumb
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
handleBlur(event) {
|
|
248
|
+
this.onTouched();
|
|
249
|
+
this.touch.emit();
|
|
250
|
+
this.blurred.emit(event);
|
|
251
|
+
}
|
|
252
|
+
updateThumb(thumb, rawValue, event, emitInput) {
|
|
253
|
+
const aligned = alignSliderValue(rawValue, this.normalizedMin(), this.normalizedMax(), this.effectiveStep());
|
|
254
|
+
let next;
|
|
255
|
+
if (!this.range() || thumb === "single") next = aligned;
|
|
256
|
+
else if (thumb === "lower") next = [Math.min(aligned, this.upperValue() - this.effectiveMinRange()), this.upperValue()];
|
|
257
|
+
else next = [this.lowerValue(), Math.max(aligned, this.lowerValue() + this.effectiveMinRange())];
|
|
258
|
+
if (!!sameSliderValue(this.normalizedValue(), next)) return false;
|
|
259
|
+
this.setValue(next);
|
|
260
|
+
this.dragChanged = true;
|
|
261
|
+
if (emitInput) this.sliding.emit({
|
|
262
|
+
originalEvent: event,
|
|
263
|
+
value: next,
|
|
264
|
+
thumb
|
|
265
|
+
});
|
|
266
|
+
return true;
|
|
267
|
+
}
|
|
268
|
+
setValue(value) {
|
|
269
|
+
this.value.set(value);
|
|
270
|
+
this.onChange(value);
|
|
271
|
+
}
|
|
272
|
+
closestThumb(value) {
|
|
273
|
+
if (!this.range()) return "single";
|
|
274
|
+
return Math.abs(value - this.lowerValue()) <= Math.abs(value - this.upperValue()) ? "lower" : "upper";
|
|
275
|
+
}
|
|
276
|
+
pointerValue(event, track) {
|
|
277
|
+
const rect = track.getBoundingClientRect();
|
|
278
|
+
const ratio = this.orientation() === "vertical" ? 1 - (event.clientY - rect.top) / Math.max(1, rect.height) : (event.clientX - rect.left) / Math.max(1, rect.width);
|
|
279
|
+
const normalizedRatio = this.reversed() ? 1 - ratio : ratio;
|
|
280
|
+
return this.normalizedMin() + Math.min(1, Math.max(0, normalizedRatio)) * (this.normalizedMax() - this.normalizedMin());
|
|
281
|
+
}
|
|
282
|
+
keyDirection(key) {
|
|
283
|
+
if (key === "ArrowRight" || key === "ArrowUp") return this.reversed() ? -1 : 1;
|
|
284
|
+
if (key === "ArrowLeft" || key === "ArrowDown") return this.reversed() ? 1 : -1;
|
|
285
|
+
return null;
|
|
286
|
+
}
|
|
287
|
+
resolvedPageStep() {
|
|
288
|
+
return this.pageStep() ?? Math.max(this.effectiveStep(), (this.normalizedMax() - this.normalizedMin()) / 10);
|
|
289
|
+
}
|
|
290
|
+
normalizedMin() {
|
|
291
|
+
return Math.min(this.min(), this.max());
|
|
292
|
+
}
|
|
293
|
+
normalizedMax() {
|
|
294
|
+
return Math.max(this.min(), this.max());
|
|
295
|
+
}
|
|
296
|
+
endBasePercentage() {
|
|
297
|
+
return this.percentage(this.range() ? this.upperValue() : this.singleValue());
|
|
298
|
+
}
|
|
299
|
+
percentage(value) {
|
|
300
|
+
return sliderPercentage(value, this.normalizedMin(), this.normalizedMax());
|
|
301
|
+
}
|
|
302
|
+
visualPercentage(value) {
|
|
303
|
+
const percentage = this.percentage(value);
|
|
304
|
+
return this.reversed() ? 100 - percentage : percentage;
|
|
305
|
+
}
|
|
306
|
+
thumbValue(thumb) {
|
|
307
|
+
if (thumb === "lower") return this.lowerValue();
|
|
308
|
+
if (thumb === "upper") return this.upperValue();
|
|
309
|
+
return this.singleValue();
|
|
310
|
+
}
|
|
311
|
+
focusThumb(thumb) {
|
|
312
|
+
const id = thumb === "lower" ? this.lowerThumbId() : thumb === "upper" ? this.upperThumbId() : this.singleThumbId();
|
|
313
|
+
this.thumbButtons().find((button) => button.nativeElement.id === id)?.nativeElement.focus();
|
|
314
|
+
}
|
|
315
|
+
coerceValue(value) {
|
|
316
|
+
if (this.range()) {
|
|
317
|
+
if (Array.isArray(value) && value.length >= 2) return normalizeSliderRange([Number(value[0]), Number(value[1])], this.normalizedMin(), this.normalizedMax(), this.effectiveStep(), this.effectiveMinRange());
|
|
318
|
+
return [this.normalizedMin(), this.normalizedMax()];
|
|
319
|
+
}
|
|
320
|
+
return alignSliderValue(typeof value === "number" && Number.isFinite(value) ? value : this.normalizedMin(), this.normalizedMin(), this.normalizedMax(), this.effectiveStep());
|
|
321
|
+
}
|
|
322
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
323
|
+
minVersion: "12.0.0",
|
|
324
|
+
version: "22.2.2",
|
|
325
|
+
ngImport: i0,
|
|
326
|
+
type: AerisSlider,
|
|
327
|
+
deps: [],
|
|
328
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
329
|
+
});
|
|
330
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
331
|
+
minVersion: "17.0.0",
|
|
332
|
+
version: "22.2.2",
|
|
333
|
+
type: AerisSlider,
|
|
334
|
+
isStandalone: true,
|
|
335
|
+
selector: "aeris-slider",
|
|
336
|
+
inputs: {
|
|
337
|
+
value: {
|
|
338
|
+
classPropertyName: "value",
|
|
339
|
+
publicName: "value",
|
|
340
|
+
isSignal: true,
|
|
341
|
+
isRequired: false,
|
|
342
|
+
transformFunction: null
|
|
343
|
+
},
|
|
344
|
+
range: {
|
|
345
|
+
classPropertyName: "range",
|
|
346
|
+
publicName: "range",
|
|
347
|
+
isSignal: true,
|
|
348
|
+
isRequired: false,
|
|
349
|
+
transformFunction: null
|
|
350
|
+
},
|
|
351
|
+
min: {
|
|
352
|
+
classPropertyName: "min",
|
|
353
|
+
publicName: "min",
|
|
354
|
+
isSignal: true,
|
|
355
|
+
isRequired: false,
|
|
356
|
+
transformFunction: null
|
|
357
|
+
},
|
|
358
|
+
max: {
|
|
359
|
+
classPropertyName: "max",
|
|
360
|
+
publicName: "max",
|
|
361
|
+
isSignal: true,
|
|
362
|
+
isRequired: false,
|
|
363
|
+
transformFunction: null
|
|
364
|
+
},
|
|
365
|
+
step: {
|
|
366
|
+
classPropertyName: "step",
|
|
367
|
+
publicName: "step",
|
|
368
|
+
isSignal: true,
|
|
369
|
+
isRequired: false,
|
|
370
|
+
transformFunction: null
|
|
371
|
+
},
|
|
372
|
+
minRange: {
|
|
373
|
+
classPropertyName: "minRange",
|
|
374
|
+
publicName: "minRange",
|
|
375
|
+
isSignal: true,
|
|
376
|
+
isRequired: false,
|
|
377
|
+
transformFunction: null
|
|
378
|
+
},
|
|
379
|
+
pageStep: {
|
|
380
|
+
classPropertyName: "pageStep",
|
|
381
|
+
publicName: "pageStep",
|
|
382
|
+
isSignal: true,
|
|
383
|
+
isRequired: false,
|
|
384
|
+
transformFunction: null
|
|
385
|
+
},
|
|
386
|
+
orientation: {
|
|
387
|
+
classPropertyName: "orientation",
|
|
388
|
+
publicName: "orientation",
|
|
389
|
+
isSignal: true,
|
|
390
|
+
isRequired: false,
|
|
391
|
+
transformFunction: null
|
|
392
|
+
},
|
|
393
|
+
reversed: {
|
|
394
|
+
classPropertyName: "reversed",
|
|
395
|
+
publicName: "reversed",
|
|
396
|
+
isSignal: true,
|
|
397
|
+
isRequired: false,
|
|
398
|
+
transformFunction: null
|
|
399
|
+
},
|
|
400
|
+
size: {
|
|
401
|
+
classPropertyName: "size",
|
|
402
|
+
publicName: "size",
|
|
403
|
+
isSignal: true,
|
|
404
|
+
isRequired: false,
|
|
405
|
+
transformFunction: null
|
|
406
|
+
},
|
|
407
|
+
name: {
|
|
408
|
+
classPropertyName: "name",
|
|
409
|
+
publicName: "name",
|
|
410
|
+
isSignal: true,
|
|
411
|
+
isRequired: false,
|
|
412
|
+
transformFunction: null
|
|
413
|
+
},
|
|
414
|
+
inputId: {
|
|
415
|
+
classPropertyName: "inputId",
|
|
416
|
+
publicName: "inputId",
|
|
417
|
+
isSignal: true,
|
|
418
|
+
isRequired: false,
|
|
419
|
+
transformFunction: null
|
|
420
|
+
},
|
|
421
|
+
ariaLabel: {
|
|
422
|
+
classPropertyName: "ariaLabel",
|
|
423
|
+
publicName: "ariaLabel",
|
|
424
|
+
isSignal: true,
|
|
425
|
+
isRequired: false,
|
|
426
|
+
transformFunction: null
|
|
427
|
+
},
|
|
428
|
+
ariaLabelledBy: {
|
|
429
|
+
classPropertyName: "ariaLabelledBy",
|
|
430
|
+
publicName: "ariaLabelledBy",
|
|
431
|
+
isSignal: true,
|
|
432
|
+
isRequired: false,
|
|
433
|
+
transformFunction: null
|
|
434
|
+
},
|
|
435
|
+
ariaDescribedBy: {
|
|
436
|
+
classPropertyName: "ariaDescribedBy",
|
|
437
|
+
publicName: "ariaDescribedBy",
|
|
438
|
+
isSignal: true,
|
|
439
|
+
isRequired: false,
|
|
440
|
+
transformFunction: null
|
|
441
|
+
},
|
|
442
|
+
lowerAriaLabel: {
|
|
443
|
+
classPropertyName: "lowerAriaLabel",
|
|
444
|
+
publicName: "lowerAriaLabel",
|
|
445
|
+
isSignal: true,
|
|
446
|
+
isRequired: false,
|
|
447
|
+
transformFunction: null
|
|
448
|
+
},
|
|
449
|
+
upperAriaLabel: {
|
|
450
|
+
classPropertyName: "upperAriaLabel",
|
|
451
|
+
publicName: "upperAriaLabel",
|
|
452
|
+
isSignal: true,
|
|
453
|
+
isRequired: false,
|
|
454
|
+
transformFunction: null
|
|
455
|
+
},
|
|
456
|
+
lowerAriaLabelledby: {
|
|
457
|
+
classPropertyName: "lowerAriaLabelledby",
|
|
458
|
+
publicName: "lowerAriaLabelledby",
|
|
459
|
+
isSignal: true,
|
|
460
|
+
isRequired: false,
|
|
461
|
+
transformFunction: null
|
|
462
|
+
},
|
|
463
|
+
upperAriaLabelledby: {
|
|
464
|
+
classPropertyName: "upperAriaLabelledby",
|
|
465
|
+
publicName: "upperAriaLabelledby",
|
|
466
|
+
isSignal: true,
|
|
467
|
+
isRequired: false,
|
|
468
|
+
transformFunction: null
|
|
469
|
+
},
|
|
470
|
+
valueText: {
|
|
471
|
+
classPropertyName: "valueText",
|
|
472
|
+
publicName: "valueText",
|
|
473
|
+
isSignal: true,
|
|
474
|
+
isRequired: false,
|
|
475
|
+
transformFunction: null
|
|
476
|
+
},
|
|
477
|
+
showValue: {
|
|
478
|
+
classPropertyName: "showValue",
|
|
479
|
+
publicName: "showValue",
|
|
480
|
+
isSignal: true,
|
|
481
|
+
isRequired: false,
|
|
482
|
+
transformFunction: null
|
|
483
|
+
},
|
|
484
|
+
showTooltip: {
|
|
485
|
+
classPropertyName: "showTooltip",
|
|
486
|
+
publicName: "showTooltip",
|
|
487
|
+
isSignal: true,
|
|
488
|
+
isRequired: false,
|
|
489
|
+
transformFunction: null
|
|
490
|
+
},
|
|
491
|
+
showTicks: {
|
|
492
|
+
classPropertyName: "showTicks",
|
|
493
|
+
publicName: "showTicks",
|
|
494
|
+
isSignal: true,
|
|
495
|
+
isRequired: false,
|
|
496
|
+
transformFunction: null
|
|
497
|
+
},
|
|
498
|
+
maxTicks: {
|
|
499
|
+
classPropertyName: "maxTicks",
|
|
500
|
+
publicName: "maxTicks",
|
|
501
|
+
isSignal: true,
|
|
502
|
+
isRequired: false,
|
|
503
|
+
transformFunction: null
|
|
504
|
+
},
|
|
505
|
+
showMinMax: {
|
|
506
|
+
classPropertyName: "showMinMax",
|
|
507
|
+
publicName: "showMinMax",
|
|
508
|
+
isSignal: true,
|
|
509
|
+
isRequired: false,
|
|
510
|
+
transformFunction: null
|
|
511
|
+
},
|
|
512
|
+
disabled: {
|
|
513
|
+
classPropertyName: "disabled",
|
|
514
|
+
publicName: "disabled",
|
|
515
|
+
isSignal: true,
|
|
516
|
+
isRequired: false,
|
|
517
|
+
transformFunction: null
|
|
518
|
+
},
|
|
519
|
+
readonly: {
|
|
520
|
+
classPropertyName: "readonly",
|
|
521
|
+
publicName: "readonly",
|
|
522
|
+
isSignal: true,
|
|
523
|
+
isRequired: false,
|
|
524
|
+
transformFunction: null
|
|
525
|
+
},
|
|
526
|
+
invalid: {
|
|
527
|
+
classPropertyName: "invalid",
|
|
528
|
+
publicName: "invalid",
|
|
529
|
+
isSignal: true,
|
|
530
|
+
isRequired: false,
|
|
531
|
+
transformFunction: null
|
|
532
|
+
},
|
|
533
|
+
touched: {
|
|
534
|
+
classPropertyName: "touched",
|
|
535
|
+
publicName: "touched",
|
|
536
|
+
isSignal: true,
|
|
537
|
+
isRequired: false,
|
|
538
|
+
transformFunction: null
|
|
539
|
+
},
|
|
540
|
+
fluid: {
|
|
541
|
+
classPropertyName: "fluid",
|
|
542
|
+
publicName: "fluid",
|
|
543
|
+
isSignal: true,
|
|
544
|
+
isRequired: false,
|
|
545
|
+
transformFunction: null
|
|
546
|
+
}
|
|
547
|
+
},
|
|
548
|
+
outputs: {
|
|
549
|
+
value: "valueChange",
|
|
550
|
+
sliding: "sliding",
|
|
551
|
+
changed: "changed",
|
|
552
|
+
focused: "focused",
|
|
553
|
+
blurred: "blurred",
|
|
554
|
+
touch: "touch"
|
|
555
|
+
},
|
|
556
|
+
host: { properties: {
|
|
557
|
+
"attr.data-orientation": "orientation()",
|
|
558
|
+
"attr.data-fluid": "fluid() || null",
|
|
559
|
+
"attr.data-disabled": "effectiveDisabled() || null"
|
|
560
|
+
} },
|
|
561
|
+
providers: [{
|
|
562
|
+
provide: NG_VALUE_ACCESSOR,
|
|
563
|
+
useExisting: forwardRef(() => AerisSlider),
|
|
564
|
+
multi: true
|
|
565
|
+
}],
|
|
566
|
+
viewQueries: [{
|
|
567
|
+
propertyName: "thumbButtons",
|
|
568
|
+
predicate: ["thumbButton"],
|
|
569
|
+
descendants: true,
|
|
570
|
+
isSignal: true
|
|
571
|
+
}],
|
|
572
|
+
ngImport: i0,
|
|
573
|
+
template: `
|
|
395
574
|
<div
|
|
396
575
|
class="aeris-slider"
|
|
397
576
|
[attr.data-size]="size()"
|
|
@@ -400,7 +579,7 @@ class AerisSlider {
|
|
|
400
579
|
[attr.data-reversed]="reversed() || null"
|
|
401
580
|
[attr.data-disabled]="effectiveDisabled() || null"
|
|
402
581
|
[attr.data-readonly]="readonly() || null"
|
|
403
|
-
[attr.data-invalid]="
|
|
582
|
+
[attr.data-invalid]="displayInvalid() || null"
|
|
404
583
|
[style.--aeris-slider-start]="startPercentage() + '%'"
|
|
405
584
|
[style.--aeris-slider-end]="endPercentage() + '%'"
|
|
406
585
|
[style.--aeris-slider-single]="singlePercentage() + '%'"
|
|
@@ -452,13 +631,13 @@ class AerisSlider {
|
|
|
452
631
|
[id]="lowerThumbId()"
|
|
453
632
|
[attr.aria-label]="lowerAriaLabel()"
|
|
454
633
|
[attr.aria-labelledby]="lowerAriaLabelledby() || null"
|
|
455
|
-
[attr.aria-describedby]="
|
|
634
|
+
[attr.aria-describedby]="ariaDescribedBy() || null"
|
|
456
635
|
[attr.aria-valuemin]="min()"
|
|
457
636
|
[attr.aria-valuemax]="upperValue() - effectiveMinRange()"
|
|
458
637
|
[attr.aria-valuenow]="lowerValue()"
|
|
459
638
|
[attr.aria-valuetext]="formattedLowerValue()"
|
|
460
639
|
[attr.aria-orientation]="orientation()"
|
|
461
|
-
[attr.aria-invalid]="
|
|
640
|
+
[attr.aria-invalid]="displayInvalid() || null"
|
|
462
641
|
[attr.aria-readonly]="readonly() || null"
|
|
463
642
|
[disabled]="effectiveDisabled()"
|
|
464
643
|
[attr.data-active]="activeThumb() === 'lower' || null"
|
|
@@ -480,13 +659,13 @@ class AerisSlider {
|
|
|
480
659
|
[id]="upperThumbId()"
|
|
481
660
|
[attr.aria-label]="upperAriaLabel()"
|
|
482
661
|
[attr.aria-labelledby]="upperAriaLabelledby() || null"
|
|
483
|
-
[attr.aria-describedby]="
|
|
662
|
+
[attr.aria-describedby]="ariaDescribedBy() || null"
|
|
484
663
|
[attr.aria-valuemin]="lowerValue() + effectiveMinRange()"
|
|
485
664
|
[attr.aria-valuemax]="max()"
|
|
486
665
|
[attr.aria-valuenow]="upperValue()"
|
|
487
666
|
[attr.aria-valuetext]="formattedUpperValue()"
|
|
488
667
|
[attr.aria-orientation]="orientation()"
|
|
489
|
-
[attr.aria-invalid]="
|
|
668
|
+
[attr.aria-invalid]="displayInvalid() || null"
|
|
490
669
|
[attr.aria-readonly]="readonly() || null"
|
|
491
670
|
[disabled]="effectiveDisabled()"
|
|
492
671
|
[attr.data-active]="activeThumb() === 'upper' || null"
|
|
@@ -508,14 +687,14 @@ class AerisSlider {
|
|
|
508
687
|
role="slider"
|
|
509
688
|
[id]="singleThumbId()"
|
|
510
689
|
[attr.aria-label]="ariaLabel()"
|
|
511
|
-
[attr.aria-labelledby]="
|
|
512
|
-
[attr.aria-describedby]="
|
|
690
|
+
[attr.aria-labelledby]="ariaLabelledBy() || null"
|
|
691
|
+
[attr.aria-describedby]="ariaDescribedBy() || null"
|
|
513
692
|
[attr.aria-valuemin]="min()"
|
|
514
693
|
[attr.aria-valuemax]="max()"
|
|
515
694
|
[attr.aria-valuenow]="singleValue()"
|
|
516
695
|
[attr.aria-valuetext]="formattedSingleValue()"
|
|
517
696
|
[attr.aria-orientation]="orientation()"
|
|
518
|
-
[attr.aria-invalid]="
|
|
697
|
+
[attr.aria-invalid]="displayInvalid() || null"
|
|
519
698
|
[attr.aria-readonly]="readonly() || null"
|
|
520
699
|
[disabled]="effectiveDisabled()"
|
|
521
700
|
[attr.data-active]="activeThumb() === 'single' || null"
|
|
@@ -539,11 +718,21 @@ class AerisSlider {
|
|
|
539
718
|
</div>
|
|
540
719
|
}
|
|
541
720
|
</div>
|
|
542
|
-
`,
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
721
|
+
`,
|
|
722
|
+
isInline: true,
|
|
723
|
+
styles: [":host{display:inline-block;width:18rem;max-width:100%;color:var(--aeris-slider-text, var(--aeris-text, #111111));font:inherit}:host([data-fluid]){width:100%}:host([data-orientation=vertical]){width:auto;height:14rem}.aeris-slider{--_thumb-size: 1.125rem;--_track-size: .375rem;width:100%;display:grid;gap:.5rem}.aeris-slider[data-size=xs]{--_thumb-size: .875rem;--_track-size: .25rem}.aeris-slider[data-size=sm]{--_thumb-size: 1rem;--_track-size: .3125rem}.aeris-slider[data-size=lg]{--_thumb-size: 1.375rem;--_track-size: .5rem}.aeris-slider[data-orientation=vertical]{height:100%;grid-template-columns:auto minmax(0,1fr) auto;align-items:stretch}.aeris-slider__track{position:relative;min-width:0;min-height:calc(var(--_thumb-size) + .5rem);cursor:pointer;touch-action:none}.aeris-slider[data-orientation=vertical] .aeris-slider__track{width:calc(var(--_thumb-size) + .5rem);min-height:0;height:100%}.aeris-slider__rail,.aeris-slider__fill{position:absolute;top:50%;right:0;left:0;height:var(--_track-size);border-radius:var(--aeris-radius-pill, 999px);transform:translateY(-50%)}.aeris-slider__rail{background:var(--aeris-slider-rail-background, var(--aeris-surface-3, #e5e5df))}.aeris-slider__fill{right:calc(100% - var(--aeris-slider-end));left:var(--aeris-slider-start);background:var(--aeris-slider-fill-background, var(--aeris-primary, #111111))}.aeris-slider[data-orientation=vertical] .aeris-slider__rail,.aeris-slider[data-orientation=vertical] .aeris-slider__fill{inset:0 auto 0 50%;width:var(--_track-size);height:auto;transform:translate(-50%)}.aeris-slider[data-orientation=vertical] .aeris-slider__fill{top:calc(100% - var(--aeris-slider-end));bottom:var(--aeris-slider-start)}.aeris-slider__thumb{position:absolute;z-index:2;top:50%;width:var(--_thumb-size);height:var(--_thumb-size);padding:0;border:2px solid var(--aeris-slider-thumb-border, var(--aeris-primary, #111111));border-radius:50%;background:var(--aeris-slider-thumb-background, var(--aeris-surface, #fff));color:var(--aeris-text, #111111);transform:translate(-50%,-50%);cursor:grab;transition:border-color var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease),box-shadow var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease),transform var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease)}.aeris-slider__thumb--single{left:var(--aeris-slider-single)}.aeris-slider__thumb--lower{left:var(--aeris-slider-lower)}.aeris-slider__thumb--upper{left:var(--aeris-slider-upper)}.aeris-slider[data-orientation=vertical] .aeris-slider__thumb{left:50%;bottom:auto}.aeris-slider[data-orientation=vertical] .aeris-slider__thumb--single{top:calc(100% - var(--aeris-slider-single))}.aeris-slider[data-orientation=vertical] .aeris-slider__thumb--lower{top:calc(100% - var(--aeris-slider-lower))}.aeris-slider[data-orientation=vertical] .aeris-slider__thumb--upper{top:calc(100% - var(--aeris-slider-upper))}.aeris-slider__thumb[data-active]{border-color:var(--aeris-slider-thumb-hover, var(--aeris-focus, #111111));box-shadow:0 0 0 .3125rem color-mix(in srgb,var(--aeris-primary, #111111) 16%,transparent)}@media(hover:hover){.aeris-slider__thumb:hover:not(:disabled){border-color:var(--aeris-slider-thumb-hover, var(--aeris-focus, #111111));box-shadow:0 0 0 .3125rem color-mix(in srgb,var(--aeris-primary, #111111) 16%,transparent)}}.aeris-slider__thumb:focus-visible{z-index:3;outline:0;box-shadow:0 0 0 .1875rem var(--aeris-surface, #fff),0 0 0 .375rem var(--aeris-slider-focus, var(--aeris-focus, #111111))}.aeris-slider__thumb:active,.aeris-slider__thumb[data-active]{transform:translate(-50%,-50%) scale(1.08);cursor:grabbing}.aeris-slider__tooltip{position:absolute;bottom:calc(100% + .5rem);left:50%;min-width:1.75rem;padding:.25rem .4rem;border-radius:var(--aeris-radius-sm, .4375rem);background:var(--aeris-slider-tooltip-background, var(--aeris-text, #111111));color:var(--aeris-slider-tooltip-text, var(--aeris-surface, #fff));font-size:var(--aeris-font-size-xs, .6875rem);line-height:1.2;opacity:0;transform:translate(-50%) translateY(.2rem);transition:opacity var(--aeris-motion-fast, .1s) var(--aeris-ease-standard, ease),transform var(--aeris-motion-fast, .1s) var(--aeris-ease-standard, ease);pointer-events:none;white-space:nowrap}.aeris-slider__thumb:focus-visible .aeris-slider__tooltip,.aeris-slider__thumb[data-active] .aeris-slider__tooltip{opacity:1;transform:translate(-50%) translateY(0)}@media(hover:hover){.aeris-slider__thumb:hover .aeris-slider__tooltip{opacity:1;transform:translate(-50%) translateY(0)}}.aeris-slider[data-orientation=vertical] .aeris-slider__tooltip{top:50%;bottom:auto;left:calc(100% + .5rem);transform:translateY(-50%) translate(-.2rem)}.aeris-slider[data-orientation=vertical] .aeris-slider__thumb:focus-visible .aeris-slider__tooltip,.aeris-slider[data-orientation=vertical] .aeris-slider__thumb[data-active] .aeris-slider__tooltip{transform:translateY(-50%) translate(0)}@media(hover:hover){.aeris-slider[data-orientation=vertical] .aeris-slider__thumb:hover .aeris-slider__tooltip{transform:translateY(-50%) translate(0)}}.aeris-slider__ticks{position:absolute;inset:0;pointer-events:none}.aeris-slider__ticks span{position:absolute;top:50%;left:var(--aeris-slider-tick-position);width:.25rem;height:.25rem;border-radius:50%;background:var(--aeris-slider-tick, var(--aeris-border, #efefef));transform:translate(-50%,-50%)}.aeris-slider__ticks span[data-active]{background:var(--aeris-slider-active-tick, var(--aeris-surface, #fff))}.aeris-slider[data-orientation=vertical] .aeris-slider__ticks span{top:calc(100% - var(--aeris-slider-tick-position));bottom:auto;left:50%}.aeris-slider__values,.aeris-slider__limits{display:flex;justify-content:space-between;gap:1rem;color:var(--aeris-text-2, #454545);font-size:var(--aeris-font-size-sm, .75rem);font-variant-numeric:tabular-nums}.aeris-slider__values{color:var(--aeris-text, #111111);font-weight:var(--aeris-font-weight-bold, 700)}.aeris-slider:not([data-range]) .aeris-slider__values{justify-content:flex-end}.aeris-slider[data-orientation=vertical] .aeris-slider__values,.aeris-slider[data-orientation=vertical] .aeris-slider__limits{flex-direction:column-reverse;align-items:center}.aeris-slider[data-disabled],.aeris-slider[data-readonly]{opacity:var(--aeris-disabled-opacity, .52)}.aeris-slider[data-disabled] .aeris-slider__track,.aeris-slider[data-readonly] .aeris-slider__track,.aeris-slider__thumb:disabled{cursor:not-allowed}.aeris-slider[data-invalid] .aeris-slider__fill{background:var(--aeris-danger, #c81e2a)}.aeris-slider[data-invalid] .aeris-slider__thumb{border-color:var(--aeris-danger, #c81e2a)}@media(prefers-reduced-motion:reduce){.aeris-slider__thumb,.aeris-slider__tooltip{transition:none}}\n"]
|
|
724
|
+
});
|
|
725
|
+
};
|
|
726
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
727
|
+
minVersion: "12.0.0",
|
|
728
|
+
version: "22.2.2",
|
|
729
|
+
ngImport: i0,
|
|
730
|
+
type: AerisSlider,
|
|
731
|
+
decorators: [{
|
|
732
|
+
type: Component,
|
|
733
|
+
args: [{
|
|
734
|
+
selector: "aeris-slider",
|
|
735
|
+
template: `
|
|
547
736
|
<div
|
|
548
737
|
class="aeris-slider"
|
|
549
738
|
[attr.data-size]="size()"
|
|
@@ -552,7 +741,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
552
741
|
[attr.data-reversed]="reversed() || null"
|
|
553
742
|
[attr.data-disabled]="effectiveDisabled() || null"
|
|
554
743
|
[attr.data-readonly]="readonly() || null"
|
|
555
|
-
[attr.data-invalid]="
|
|
744
|
+
[attr.data-invalid]="displayInvalid() || null"
|
|
556
745
|
[style.--aeris-slider-start]="startPercentage() + '%'"
|
|
557
746
|
[style.--aeris-slider-end]="endPercentage() + '%'"
|
|
558
747
|
[style.--aeris-slider-single]="singlePercentage() + '%'"
|
|
@@ -604,13 +793,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
604
793
|
[id]="lowerThumbId()"
|
|
605
794
|
[attr.aria-label]="lowerAriaLabel()"
|
|
606
795
|
[attr.aria-labelledby]="lowerAriaLabelledby() || null"
|
|
607
|
-
[attr.aria-describedby]="
|
|
796
|
+
[attr.aria-describedby]="ariaDescribedBy() || null"
|
|
608
797
|
[attr.aria-valuemin]="min()"
|
|
609
798
|
[attr.aria-valuemax]="upperValue() - effectiveMinRange()"
|
|
610
799
|
[attr.aria-valuenow]="lowerValue()"
|
|
611
800
|
[attr.aria-valuetext]="formattedLowerValue()"
|
|
612
801
|
[attr.aria-orientation]="orientation()"
|
|
613
|
-
[attr.aria-invalid]="
|
|
802
|
+
[attr.aria-invalid]="displayInvalid() || null"
|
|
614
803
|
[attr.aria-readonly]="readonly() || null"
|
|
615
804
|
[disabled]="effectiveDisabled()"
|
|
616
805
|
[attr.data-active]="activeThumb() === 'lower' || null"
|
|
@@ -632,13 +821,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
632
821
|
[id]="upperThumbId()"
|
|
633
822
|
[attr.aria-label]="upperAriaLabel()"
|
|
634
823
|
[attr.aria-labelledby]="upperAriaLabelledby() || null"
|
|
635
|
-
[attr.aria-describedby]="
|
|
824
|
+
[attr.aria-describedby]="ariaDescribedBy() || null"
|
|
636
825
|
[attr.aria-valuemin]="lowerValue() + effectiveMinRange()"
|
|
637
826
|
[attr.aria-valuemax]="max()"
|
|
638
827
|
[attr.aria-valuenow]="upperValue()"
|
|
639
828
|
[attr.aria-valuetext]="formattedUpperValue()"
|
|
640
829
|
[attr.aria-orientation]="orientation()"
|
|
641
|
-
[attr.aria-invalid]="
|
|
830
|
+
[attr.aria-invalid]="displayInvalid() || null"
|
|
642
831
|
[attr.aria-readonly]="readonly() || null"
|
|
643
832
|
[disabled]="effectiveDisabled()"
|
|
644
833
|
[attr.data-active]="activeThumb() === 'upper' || null"
|
|
@@ -660,14 +849,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
660
849
|
role="slider"
|
|
661
850
|
[id]="singleThumbId()"
|
|
662
851
|
[attr.aria-label]="ariaLabel()"
|
|
663
|
-
[attr.aria-labelledby]="
|
|
664
|
-
[attr.aria-describedby]="
|
|
852
|
+
[attr.aria-labelledby]="ariaLabelledBy() || null"
|
|
853
|
+
[attr.aria-describedby]="ariaDescribedBy() || null"
|
|
665
854
|
[attr.aria-valuemin]="min()"
|
|
666
855
|
[attr.aria-valuemax]="max()"
|
|
667
856
|
[attr.aria-valuenow]="singleValue()"
|
|
668
857
|
[attr.aria-valuetext]="formattedSingleValue()"
|
|
669
858
|
[attr.aria-orientation]="orientation()"
|
|
670
|
-
[attr.aria-invalid]="
|
|
859
|
+
[attr.aria-invalid]="displayInvalid() || null"
|
|
671
860
|
[attr.aria-readonly]="readonly() || null"
|
|
672
861
|
[disabled]="effectiveDisabled()"
|
|
673
862
|
[attr.data-active]="activeThumb() === 'single' || null"
|
|
@@ -691,34 +880,299 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
691
880
|
</div>
|
|
692
881
|
}
|
|
693
882
|
</div>
|
|
694
|
-
`,
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
883
|
+
`,
|
|
884
|
+
providers: [{
|
|
885
|
+
provide: NG_VALUE_ACCESSOR,
|
|
886
|
+
useExisting: forwardRef(() => AerisSlider),
|
|
887
|
+
multi: true
|
|
888
|
+
}],
|
|
889
|
+
host: {
|
|
890
|
+
"[attr.data-orientation]": "orientation()",
|
|
891
|
+
"[attr.data-fluid]": "fluid() || null",
|
|
892
|
+
"[attr.data-disabled]": "effectiveDisabled() || null"
|
|
893
|
+
},
|
|
894
|
+
styles: [":host{display:inline-block;width:18rem;max-width:100%;color:var(--aeris-slider-text, var(--aeris-text, #111111));font:inherit}:host([data-fluid]){width:100%}:host([data-orientation=vertical]){width:auto;height:14rem}.aeris-slider{--_thumb-size: 1.125rem;--_track-size: .375rem;width:100%;display:grid;gap:.5rem}.aeris-slider[data-size=xs]{--_thumb-size: .875rem;--_track-size: .25rem}.aeris-slider[data-size=sm]{--_thumb-size: 1rem;--_track-size: .3125rem}.aeris-slider[data-size=lg]{--_thumb-size: 1.375rem;--_track-size: .5rem}.aeris-slider[data-orientation=vertical]{height:100%;grid-template-columns:auto minmax(0,1fr) auto;align-items:stretch}.aeris-slider__track{position:relative;min-width:0;min-height:calc(var(--_thumb-size) + .5rem);cursor:pointer;touch-action:none}.aeris-slider[data-orientation=vertical] .aeris-slider__track{width:calc(var(--_thumb-size) + .5rem);min-height:0;height:100%}.aeris-slider__rail,.aeris-slider__fill{position:absolute;top:50%;right:0;left:0;height:var(--_track-size);border-radius:var(--aeris-radius-pill, 999px);transform:translateY(-50%)}.aeris-slider__rail{background:var(--aeris-slider-rail-background, var(--aeris-surface-3, #e5e5df))}.aeris-slider__fill{right:calc(100% - var(--aeris-slider-end));left:var(--aeris-slider-start);background:var(--aeris-slider-fill-background, var(--aeris-primary, #111111))}.aeris-slider[data-orientation=vertical] .aeris-slider__rail,.aeris-slider[data-orientation=vertical] .aeris-slider__fill{inset:0 auto 0 50%;width:var(--_track-size);height:auto;transform:translate(-50%)}.aeris-slider[data-orientation=vertical] .aeris-slider__fill{top:calc(100% - var(--aeris-slider-end));bottom:var(--aeris-slider-start)}.aeris-slider__thumb{position:absolute;z-index:2;top:50%;width:var(--_thumb-size);height:var(--_thumb-size);padding:0;border:2px solid var(--aeris-slider-thumb-border, var(--aeris-primary, #111111));border-radius:50%;background:var(--aeris-slider-thumb-background, var(--aeris-surface, #fff));color:var(--aeris-text, #111111);transform:translate(-50%,-50%);cursor:grab;transition:border-color var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease),box-shadow var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease),transform var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease)}.aeris-slider__thumb--single{left:var(--aeris-slider-single)}.aeris-slider__thumb--lower{left:var(--aeris-slider-lower)}.aeris-slider__thumb--upper{left:var(--aeris-slider-upper)}.aeris-slider[data-orientation=vertical] .aeris-slider__thumb{left:50%;bottom:auto}.aeris-slider[data-orientation=vertical] .aeris-slider__thumb--single{top:calc(100% - var(--aeris-slider-single))}.aeris-slider[data-orientation=vertical] .aeris-slider__thumb--lower{top:calc(100% - var(--aeris-slider-lower))}.aeris-slider[data-orientation=vertical] .aeris-slider__thumb--upper{top:calc(100% - var(--aeris-slider-upper))}.aeris-slider__thumb[data-active]{border-color:var(--aeris-slider-thumb-hover, var(--aeris-focus, #111111));box-shadow:0 0 0 .3125rem color-mix(in srgb,var(--aeris-primary, #111111) 16%,transparent)}@media(hover:hover){.aeris-slider__thumb:hover:not(:disabled){border-color:var(--aeris-slider-thumb-hover, var(--aeris-focus, #111111));box-shadow:0 0 0 .3125rem color-mix(in srgb,var(--aeris-primary, #111111) 16%,transparent)}}.aeris-slider__thumb:focus-visible{z-index:3;outline:0;box-shadow:0 0 0 .1875rem var(--aeris-surface, #fff),0 0 0 .375rem var(--aeris-slider-focus, var(--aeris-focus, #111111))}.aeris-slider__thumb:active,.aeris-slider__thumb[data-active]{transform:translate(-50%,-50%) scale(1.08);cursor:grabbing}.aeris-slider__tooltip{position:absolute;bottom:calc(100% + .5rem);left:50%;min-width:1.75rem;padding:.25rem .4rem;border-radius:var(--aeris-radius-sm, .4375rem);background:var(--aeris-slider-tooltip-background, var(--aeris-text, #111111));color:var(--aeris-slider-tooltip-text, var(--aeris-surface, #fff));font-size:var(--aeris-font-size-xs, .6875rem);line-height:1.2;opacity:0;transform:translate(-50%) translateY(.2rem);transition:opacity var(--aeris-motion-fast, .1s) var(--aeris-ease-standard, ease),transform var(--aeris-motion-fast, .1s) var(--aeris-ease-standard, ease);pointer-events:none;white-space:nowrap}.aeris-slider__thumb:focus-visible .aeris-slider__tooltip,.aeris-slider__thumb[data-active] .aeris-slider__tooltip{opacity:1;transform:translate(-50%) translateY(0)}@media(hover:hover){.aeris-slider__thumb:hover .aeris-slider__tooltip{opacity:1;transform:translate(-50%) translateY(0)}}.aeris-slider[data-orientation=vertical] .aeris-slider__tooltip{top:50%;bottom:auto;left:calc(100% + .5rem);transform:translateY(-50%) translate(-.2rem)}.aeris-slider[data-orientation=vertical] .aeris-slider__thumb:focus-visible .aeris-slider__tooltip,.aeris-slider[data-orientation=vertical] .aeris-slider__thumb[data-active] .aeris-slider__tooltip{transform:translateY(-50%) translate(0)}@media(hover:hover){.aeris-slider[data-orientation=vertical] .aeris-slider__thumb:hover .aeris-slider__tooltip{transform:translateY(-50%) translate(0)}}.aeris-slider__ticks{position:absolute;inset:0;pointer-events:none}.aeris-slider__ticks span{position:absolute;top:50%;left:var(--aeris-slider-tick-position);width:.25rem;height:.25rem;border-radius:50%;background:var(--aeris-slider-tick, var(--aeris-border, #efefef));transform:translate(-50%,-50%)}.aeris-slider__ticks span[data-active]{background:var(--aeris-slider-active-tick, var(--aeris-surface, #fff))}.aeris-slider[data-orientation=vertical] .aeris-slider__ticks span{top:calc(100% - var(--aeris-slider-tick-position));bottom:auto;left:50%}.aeris-slider__values,.aeris-slider__limits{display:flex;justify-content:space-between;gap:1rem;color:var(--aeris-text-2, #454545);font-size:var(--aeris-font-size-sm, .75rem);font-variant-numeric:tabular-nums}.aeris-slider__values{color:var(--aeris-text, #111111);font-weight:var(--aeris-font-weight-bold, 700)}.aeris-slider:not([data-range]) .aeris-slider__values{justify-content:flex-end}.aeris-slider[data-orientation=vertical] .aeris-slider__values,.aeris-slider[data-orientation=vertical] .aeris-slider__limits{flex-direction:column-reverse;align-items:center}.aeris-slider[data-disabled],.aeris-slider[data-readonly]{opacity:var(--aeris-disabled-opacity, .52)}.aeris-slider[data-disabled] .aeris-slider__track,.aeris-slider[data-readonly] .aeris-slider__track,.aeris-slider__thumb:disabled{cursor:not-allowed}.aeris-slider[data-invalid] .aeris-slider__fill{background:var(--aeris-danger, #c81e2a)}.aeris-slider[data-invalid] .aeris-slider__thumb{border-color:var(--aeris-danger, #c81e2a)}@media(prefers-reduced-motion:reduce){.aeris-slider__thumb,.aeris-slider__tooltip{transition:none}}\n"]
|
|
895
|
+
}]
|
|
896
|
+
}],
|
|
897
|
+
propDecorators: {
|
|
898
|
+
value: [{
|
|
899
|
+
type: i0.Input,
|
|
900
|
+
args: [{
|
|
901
|
+
isSignal: true,
|
|
902
|
+
alias: "value",
|
|
903
|
+
required: false
|
|
904
|
+
}]
|
|
905
|
+
}, {
|
|
906
|
+
type: i0.Output,
|
|
907
|
+
args: ["valueChange"]
|
|
908
|
+
}],
|
|
909
|
+
range: [{
|
|
910
|
+
type: i0.Input,
|
|
911
|
+
args: [{
|
|
912
|
+
isSignal: true,
|
|
913
|
+
alias: "range",
|
|
914
|
+
required: false
|
|
915
|
+
}]
|
|
916
|
+
}],
|
|
917
|
+
min: [{
|
|
918
|
+
type: i0.Input,
|
|
919
|
+
args: [{
|
|
920
|
+
isSignal: true,
|
|
921
|
+
alias: "min",
|
|
922
|
+
required: false
|
|
923
|
+
}]
|
|
924
|
+
}],
|
|
925
|
+
max: [{
|
|
926
|
+
type: i0.Input,
|
|
927
|
+
args: [{
|
|
928
|
+
isSignal: true,
|
|
929
|
+
alias: "max",
|
|
930
|
+
required: false
|
|
931
|
+
}]
|
|
932
|
+
}],
|
|
933
|
+
step: [{
|
|
934
|
+
type: i0.Input,
|
|
935
|
+
args: [{
|
|
936
|
+
isSignal: true,
|
|
937
|
+
alias: "step",
|
|
938
|
+
required: false
|
|
939
|
+
}]
|
|
940
|
+
}],
|
|
941
|
+
minRange: [{
|
|
942
|
+
type: i0.Input,
|
|
943
|
+
args: [{
|
|
944
|
+
isSignal: true,
|
|
945
|
+
alias: "minRange",
|
|
946
|
+
required: false
|
|
947
|
+
}]
|
|
948
|
+
}],
|
|
949
|
+
pageStep: [{
|
|
950
|
+
type: i0.Input,
|
|
951
|
+
args: [{
|
|
952
|
+
isSignal: true,
|
|
953
|
+
alias: "pageStep",
|
|
954
|
+
required: false
|
|
955
|
+
}]
|
|
956
|
+
}],
|
|
957
|
+
orientation: [{
|
|
958
|
+
type: i0.Input,
|
|
959
|
+
args: [{
|
|
960
|
+
isSignal: true,
|
|
961
|
+
alias: "orientation",
|
|
962
|
+
required: false
|
|
963
|
+
}]
|
|
964
|
+
}],
|
|
965
|
+
reversed: [{
|
|
966
|
+
type: i0.Input,
|
|
967
|
+
args: [{
|
|
968
|
+
isSignal: true,
|
|
969
|
+
alias: "reversed",
|
|
970
|
+
required: false
|
|
971
|
+
}]
|
|
972
|
+
}],
|
|
973
|
+
size: [{
|
|
974
|
+
type: i0.Input,
|
|
975
|
+
args: [{
|
|
976
|
+
isSignal: true,
|
|
977
|
+
alias: "size",
|
|
978
|
+
required: false
|
|
979
|
+
}]
|
|
980
|
+
}],
|
|
981
|
+
name: [{
|
|
982
|
+
type: i0.Input,
|
|
983
|
+
args: [{
|
|
984
|
+
isSignal: true,
|
|
985
|
+
alias: "name",
|
|
986
|
+
required: false
|
|
987
|
+
}]
|
|
988
|
+
}],
|
|
989
|
+
inputId: [{
|
|
990
|
+
type: i0.Input,
|
|
991
|
+
args: [{
|
|
992
|
+
isSignal: true,
|
|
993
|
+
alias: "inputId",
|
|
994
|
+
required: false
|
|
995
|
+
}]
|
|
996
|
+
}],
|
|
997
|
+
ariaLabel: [{
|
|
998
|
+
type: i0.Input,
|
|
999
|
+
args: [{
|
|
1000
|
+
isSignal: true,
|
|
1001
|
+
alias: "ariaLabel",
|
|
1002
|
+
required: false
|
|
1003
|
+
}]
|
|
1004
|
+
}],
|
|
1005
|
+
ariaLabelledBy: [{
|
|
1006
|
+
type: i0.Input,
|
|
1007
|
+
args: [{
|
|
1008
|
+
isSignal: true,
|
|
1009
|
+
alias: "ariaLabelledBy",
|
|
1010
|
+
required: false
|
|
1011
|
+
}]
|
|
1012
|
+
}],
|
|
1013
|
+
ariaDescribedBy: [{
|
|
1014
|
+
type: i0.Input,
|
|
1015
|
+
args: [{
|
|
1016
|
+
isSignal: true,
|
|
1017
|
+
alias: "ariaDescribedBy",
|
|
1018
|
+
required: false
|
|
1019
|
+
}]
|
|
1020
|
+
}],
|
|
1021
|
+
lowerAriaLabel: [{
|
|
1022
|
+
type: i0.Input,
|
|
1023
|
+
args: [{
|
|
1024
|
+
isSignal: true,
|
|
1025
|
+
alias: "lowerAriaLabel",
|
|
1026
|
+
required: false
|
|
1027
|
+
}]
|
|
1028
|
+
}],
|
|
1029
|
+
upperAriaLabel: [{
|
|
1030
|
+
type: i0.Input,
|
|
1031
|
+
args: [{
|
|
1032
|
+
isSignal: true,
|
|
1033
|
+
alias: "upperAriaLabel",
|
|
1034
|
+
required: false
|
|
1035
|
+
}]
|
|
1036
|
+
}],
|
|
1037
|
+
lowerAriaLabelledby: [{
|
|
1038
|
+
type: i0.Input,
|
|
1039
|
+
args: [{
|
|
1040
|
+
isSignal: true,
|
|
1041
|
+
alias: "lowerAriaLabelledby",
|
|
1042
|
+
required: false
|
|
1043
|
+
}]
|
|
1044
|
+
}],
|
|
1045
|
+
upperAriaLabelledby: [{
|
|
1046
|
+
type: i0.Input,
|
|
1047
|
+
args: [{
|
|
1048
|
+
isSignal: true,
|
|
1049
|
+
alias: "upperAriaLabelledby",
|
|
1050
|
+
required: false
|
|
1051
|
+
}]
|
|
1052
|
+
}],
|
|
1053
|
+
valueText: [{
|
|
1054
|
+
type: i0.Input,
|
|
1055
|
+
args: [{
|
|
1056
|
+
isSignal: true,
|
|
1057
|
+
alias: "valueText",
|
|
1058
|
+
required: false
|
|
1059
|
+
}]
|
|
1060
|
+
}],
|
|
1061
|
+
showValue: [{
|
|
1062
|
+
type: i0.Input,
|
|
1063
|
+
args: [{
|
|
1064
|
+
isSignal: true,
|
|
1065
|
+
alias: "showValue",
|
|
1066
|
+
required: false
|
|
1067
|
+
}]
|
|
1068
|
+
}],
|
|
1069
|
+
showTooltip: [{
|
|
1070
|
+
type: i0.Input,
|
|
1071
|
+
args: [{
|
|
1072
|
+
isSignal: true,
|
|
1073
|
+
alias: "showTooltip",
|
|
1074
|
+
required: false
|
|
1075
|
+
}]
|
|
1076
|
+
}],
|
|
1077
|
+
showTicks: [{
|
|
1078
|
+
type: i0.Input,
|
|
1079
|
+
args: [{
|
|
1080
|
+
isSignal: true,
|
|
1081
|
+
alias: "showTicks",
|
|
1082
|
+
required: false
|
|
1083
|
+
}]
|
|
1084
|
+
}],
|
|
1085
|
+
maxTicks: [{
|
|
1086
|
+
type: i0.Input,
|
|
1087
|
+
args: [{
|
|
1088
|
+
isSignal: true,
|
|
1089
|
+
alias: "maxTicks",
|
|
1090
|
+
required: false
|
|
1091
|
+
}]
|
|
1092
|
+
}],
|
|
1093
|
+
showMinMax: [{
|
|
1094
|
+
type: i0.Input,
|
|
1095
|
+
args: [{
|
|
1096
|
+
isSignal: true,
|
|
1097
|
+
alias: "showMinMax",
|
|
1098
|
+
required: false
|
|
1099
|
+
}]
|
|
1100
|
+
}],
|
|
1101
|
+
disabled: [{
|
|
1102
|
+
type: i0.Input,
|
|
1103
|
+
args: [{
|
|
1104
|
+
isSignal: true,
|
|
1105
|
+
alias: "disabled",
|
|
1106
|
+
required: false
|
|
1107
|
+
}]
|
|
1108
|
+
}],
|
|
1109
|
+
readonly: [{
|
|
1110
|
+
type: i0.Input,
|
|
1111
|
+
args: [{
|
|
1112
|
+
isSignal: true,
|
|
1113
|
+
alias: "readonly",
|
|
1114
|
+
required: false
|
|
1115
|
+
}]
|
|
1116
|
+
}],
|
|
1117
|
+
invalid: [{
|
|
1118
|
+
type: i0.Input,
|
|
1119
|
+
args: [{
|
|
1120
|
+
isSignal: true,
|
|
1121
|
+
alias: "invalid",
|
|
1122
|
+
required: false
|
|
1123
|
+
}]
|
|
1124
|
+
}],
|
|
1125
|
+
touched: [{
|
|
1126
|
+
type: i0.Input,
|
|
1127
|
+
args: [{
|
|
1128
|
+
isSignal: true,
|
|
1129
|
+
alias: "touched",
|
|
1130
|
+
required: false
|
|
1131
|
+
}]
|
|
1132
|
+
}],
|
|
1133
|
+
fluid: [{
|
|
1134
|
+
type: i0.Input,
|
|
1135
|
+
args: [{
|
|
1136
|
+
isSignal: true,
|
|
1137
|
+
alias: "fluid",
|
|
1138
|
+
required: false
|
|
1139
|
+
}]
|
|
1140
|
+
}],
|
|
1141
|
+
sliding: [{
|
|
1142
|
+
type: i0.Output,
|
|
1143
|
+
args: ["sliding"]
|
|
1144
|
+
}],
|
|
1145
|
+
changed: [{
|
|
1146
|
+
type: i0.Output,
|
|
1147
|
+
args: ["changed"]
|
|
1148
|
+
}],
|
|
1149
|
+
focused: [{
|
|
1150
|
+
type: i0.Output,
|
|
1151
|
+
args: ["focused"]
|
|
1152
|
+
}],
|
|
1153
|
+
blurred: [{
|
|
1154
|
+
type: i0.Output,
|
|
1155
|
+
args: ["blurred"]
|
|
1156
|
+
}],
|
|
1157
|
+
touch: [{
|
|
1158
|
+
type: i0.Output,
|
|
1159
|
+
args: ["touch"]
|
|
1160
|
+
}],
|
|
1161
|
+
thumbButtons: [{
|
|
1162
|
+
type: i0.ViewChildren,
|
|
1163
|
+
args: ["thumbButton", { isSignal: true }]
|
|
1164
|
+
}]
|
|
1165
|
+
}
|
|
1166
|
+
});
|
|
706
1167
|
function optionalNumber(value) {
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
return Number.isFinite(number) ? number : undefined;
|
|
1168
|
+
if (value === void 0 || value === null || value === "") return void 0;
|
|
1169
|
+
const number = Number(value);
|
|
1170
|
+
return Number.isFinite(number) ? number : void 0;
|
|
711
1171
|
}
|
|
712
1172
|
function sameSliderValue(left, right) {
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
}
|
|
716
|
-
return left === right;
|
|
1173
|
+
if (Array.isArray(left) && Array.isArray(right)) return left[0] === right[0] && left[1] === right[1];
|
|
1174
|
+
return left === right;
|
|
717
1175
|
}
|
|
718
|
-
|
|
719
|
-
/**
|
|
720
|
-
* Generated bundle index. Do not edit.
|
|
721
|
-
*/
|
|
722
|
-
|
|
723
1176
|
export { AerisSlider };
|
|
724
|
-
|
|
1177
|
+
|
|
1178
|
+
//# sourceMappingURL=aeris-ui-core-slider.mjs.map
|