@4sh/ui-kit 0.16.0 → 0.17.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/README.fr.md +10 -10
- package/README.md +10 -10
- package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs +542 -150
- package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-actions-ui-button.mjs +622 -248
- package/fesm2022/4sh-ui-kit-actions-ui-button.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-actions-ui-link.mjs +385 -152
- package/fesm2022/4sh-ui-kit-actions-ui-link.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs +748 -433
- package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-base-ui-icon.mjs +227 -135
- package/fesm2022/4sh-ui-kit-base-ui-icon.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-base-ui-image.mjs +1200 -633
- package/fesm2022/4sh-ui-kit-base-ui-image.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs +1675 -1000
- package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs +243 -117
- package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs +2294 -2048
- package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs +1058 -1113
- package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-field-sign.mjs +1108 -0
- package/fesm2022/4sh-ui-kit-forms-ui-field-sign.mjs.map +1 -0
- package/fesm2022/4sh-ui-kit-forms-ui-field.mjs +397 -141
- package/fesm2022/4sh-ui-kit-forms-ui-field.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs +1529 -583
- package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-date.mjs +383 -224
- package/fesm2022/4sh-ui-kit-forms-ui-input-date.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs +345 -177
- package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs +280 -138
- package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs +507 -257
- package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs +401 -312
- package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs +1277 -697
- package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input.mjs +467 -199
- package/fesm2022/4sh-ui-kit-forms-ui-input.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs +394 -270
- package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-label.mjs +140 -60
- package/fesm2022/4sh-ui-kit-forms-ui-label.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs +386 -167
- package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs +150 -87
- package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs +345 -180
- package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs +582 -392
- package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-select.mjs +1552 -888
- package/fesm2022/4sh-ui-kit-forms-ui-select.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs +485 -338
- package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs +503 -311
- package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs +271 -137
- package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs +457 -214
- package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs +711 -371
- package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs +235 -121
- package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms.mjs +721 -638
- package/fesm2022/4sh-ui-kit-forms.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs +546 -242
- package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs +335 -157
- package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-avatar-group.mjs +53 -33
- package/fesm2022/4sh-ui-kit-informative-ui-avatar-group.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs +218 -121
- package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs +192 -100
- package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs +456 -204
- package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs +314 -147
- package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs +179 -82
- package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs +268 -123
- package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs +391 -146
- package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs +158 -76
- package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-skeleton.mjs +159 -80
- package/fesm2022/4sh-ui-kit-informative-ui-skeleton.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs +295 -131
- package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs +211 -83
- package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs +784 -414
- package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs +822 -476
- package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-bottom-sheet.mjs +1014 -599
- package/fesm2022/4sh-ui-kit-layout-ui-bottom-sheet.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-card.mjs +403 -189
- package/fesm2022/4sh-ui-kit-layout-ui-card.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs +707 -272
- package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs +1146 -568
- package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs +519 -308
- package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-motion.mjs +252 -150
- package/fesm2022/4sh-ui-kit-motion.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs +793 -341
- package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs +351 -194
- package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs +511 -220
- package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs +910 -548
- package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs +1128 -555
- package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs +915 -470
- package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs +931 -474
- package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-overlay.mjs +26 -109
- package/fesm2022/4sh-ui-kit-overlay.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-ripple.mjs +329 -290
- package/fesm2022/4sh-ui-kit-ripple.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs +709 -248
- package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-table-ui-table.mjs +2633 -1370
- package/fesm2022/4sh-ui-kit-table-ui-table.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-theming.mjs +112 -113
- package/fesm2022/4sh-ui-kit-theming.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-types.mjs +0 -12
- package/fesm2022/4sh-ui-kit.mjs +3 -15
- package/fesm2022/4sh-ui-kit.mjs.map +1 -1
- package/mcp/data/component-api.json +299 -2
- package/mcp/data/text-search-docs.json +149 -9
- package/mcp/data/ui-config.json +378 -1
- package/mcp/index.js +8190 -2876
- package/mcp/package.json +1 -1
- package/package.json +5 -1
- package/styles/component-vars.scss +22 -1
- package/types/4sh-ui-kit-actions-ui-button-split.d.ts +198 -87
- package/types/4sh-ui-kit-actions-ui-button.d.ts +240 -116
- package/types/4sh-ui-kit-actions-ui-link.d.ts +136 -67
- package/types/4sh-ui-kit-actions-ui-speed-dial.d.ts +287 -180
- package/types/4sh-ui-kit-base-ui-icon.d.ts +92 -58
- package/types/4sh-ui-kit-base-ui-image.d.ts +406 -205
- package/types/4sh-ui-kit-forms-ui-autocomplete.d.ts +573 -376
- package/types/4sh-ui-kit-forms-ui-checkbox.d.ts +77 -42
- package/types/4sh-ui-kit-forms-ui-datepicker.d.ts +953 -700
- package/types/4sh-ui-kit-forms-ui-editor.d.ts +374 -340
- package/types/4sh-ui-kit-forms-ui-field-sign.d.ts +325 -0
- package/types/4sh-ui-kit-forms-ui-field.d.ts +150 -64
- package/types/4sh-ui-kit-forms-ui-file-upload.d.ts +583 -241
- package/types/4sh-ui-kit-forms-ui-input-date.d.ts +152 -103
- package/types/4sh-ui-kit-forms-ui-input-group.d.ts +109 -63
- package/types/4sh-ui-kit-forms-ui-input-mask.d.ts +93 -59
- package/types/4sh-ui-kit-forms-ui-input-number.d.ts +171 -96
- package/types/4sh-ui-kit-forms-ui-input-otp.d.ts +137 -104
- package/types/4sh-ui-kit-forms-ui-input-tags.d.ts +469 -309
- package/types/4sh-ui-kit-forms-ui-input.d.ts +198 -118
- package/types/4sh-ui-kit-forms-ui-knob.d.ts +132 -80
- package/types/4sh-ui-kit-forms-ui-label.d.ts +47 -22
- package/types/4sh-ui-kit-forms-ui-nudger.d.ts +134 -67
- package/types/4sh-ui-kit-forms-ui-radio.d.ts +48 -33
- package/types/4sh-ui-kit-forms-ui-rating.d.ts +120 -86
- package/types/4sh-ui-kit-forms-ui-segment-control.d.ts +221 -147
- package/types/4sh-ui-kit-forms-ui-select.d.ts +561 -357
- package/types/4sh-ui-kit-forms-ui-slider.d.ts +156 -105
- package/types/4sh-ui-kit-forms-ui-swatch-picker.d.ts +133 -97
- package/types/4sh-ui-kit-forms-ui-textarea.d.ts +90 -56
- package/types/4sh-ui-kit-forms-ui-toggle-block.d.ts +158 -94
- package/types/4sh-ui-kit-forms-ui-toggle-button.d.ts +314 -178
- package/types/4sh-ui-kit-forms-ui-toggle.d.ts +88 -54
- package/types/4sh-ui-kit-forms.d.ts +275 -194
- package/types/4sh-ui-kit-informative-ui-accordion.d.ts +162 -92
- package/types/4sh-ui-kit-informative-ui-alert.d.ts +128 -62
- package/types/4sh-ui-kit-informative-ui-avatar-group.d.ts +8 -8
- package/types/4sh-ui-kit-informative-ui-avatar.d.ts +81 -44
- package/types/4sh-ui-kit-informative-ui-badge.d.ts +71 -41
- package/types/4sh-ui-kit-informative-ui-chip.d.ts +194 -99
- package/types/4sh-ui-kit-informative-ui-empty-state.d.ts +105 -65
- package/types/4sh-ui-kit-informative-ui-helper.d.ts +64 -34
- package/types/4sh-ui-kit-informative-ui-progress-bar.d.ts +120 -65
- package/types/4sh-ui-kit-informative-ui-read-only.d.ts +147 -67
- package/types/4sh-ui-kit-informative-ui-separator.d.ts +65 -35
- package/types/4sh-ui-kit-informative-ui-skeleton.d.ts +62 -32
- package/types/4sh-ui-kit-informative-ui-spinner.d.ts +111 -50
- package/types/4sh-ui-kit-informative-ui-tag.d.ts +77 -37
- package/types/4sh-ui-kit-informative-ui-toast.d.ts +300 -180
- package/types/4sh-ui-kit-informative-ui-tooltip.d.ts +269 -141
- package/types/4sh-ui-kit-layout-ui-bottom-sheet.d.ts +360 -221
- package/types/4sh-ui-kit-layout-ui-card.d.ts +119 -79
- package/types/4sh-ui-kit-layout-ui-drawer.d.ts +244 -120
- package/types/4sh-ui-kit-layout-ui-modal.d.ts +409 -222
- package/types/4sh-ui-kit-layout-ui-popover.d.ts +149 -91
- package/types/4sh-ui-kit-motion.d.ts +117 -67
- package/types/4sh-ui-kit-navigation-ui-bottom-tab-bar.d.ts +279 -145
- package/types/4sh-ui-kit-navigation-ui-breadcrumb.d.ts +134 -96
- package/types/4sh-ui-kit-navigation-ui-context-menu.d.ts +148 -89
- package/types/4sh-ui-kit-navigation-ui-menu.d.ts +282 -201
- package/types/4sh-ui-kit-navigation-ui-sidebar.d.ts +425 -261
- package/types/4sh-ui-kit-navigation-ui-stepper.d.ts +279 -183
- package/types/4sh-ui-kit-navigation-ui-tabs.d.ts +275 -173
- package/types/4sh-ui-kit-overlay.d.ts +6 -6
- package/types/4sh-ui-kit-ripple.d.ts +99 -74
- package/types/4sh-ui-kit-table-ui-paginator.d.ts +237 -133
- package/types/4sh-ui-kit-table-ui-table.d.ts +769 -470
- package/types/4sh-ui-kit-theming.d.ts +27 -29
- package/types/4sh-ui-kit-types.d.ts +6 -5
- package/types/4sh-ui-kit.d.ts +4 -3
- package/fesm2022/4sh-ui-kit-types.mjs.map +0 -1
|
@@ -1,339 +1,486 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import { NG_VALUE_ACCESSOR } from
|
|
4
|
-
import { BaseFieldControl, warnMissingAccessibleName } from
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Component, booleanAttribute, computed, effect, forwardRef, input, isDevMode, numberAttribute, output, signal, viewChild, viewChildren } from "@angular/core";
|
|
3
|
+
import { NG_VALUE_ACCESSOR } from "@angular/forms";
|
|
4
|
+
import { BaseFieldControl, warnMissingAccessibleName } from "@4sh/ui-kit/forms";
|
|
5
|
+
var UiSlider = class UiSlider extends BaseFieldControl {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.min = input(0, {
|
|
9
|
+
...ngDevMode ? { debugName: "min" } : /* istanbul ignore next */ {},
|
|
10
|
+
transform: numberAttribute
|
|
11
|
+
});
|
|
12
|
+
this.max = input(100, {
|
|
13
|
+
...ngDevMode ? { debugName: "max" } : /* istanbul ignore next */ {},
|
|
14
|
+
transform: numberAttribute
|
|
15
|
+
});
|
|
16
|
+
this.step = input(1, {
|
|
17
|
+
...ngDevMode ? { debugName: "step" } : /* istanbul ignore next */ {},
|
|
18
|
+
transform: numberAttribute
|
|
19
|
+
});
|
|
20
|
+
this.range = input(false, {
|
|
21
|
+
...ngDevMode ? { debugName: "range" } : /* istanbul ignore next */ {},
|
|
22
|
+
transform: booleanAttribute
|
|
23
|
+
});
|
|
24
|
+
this.minStepsBetweenHandles = input(0, {
|
|
25
|
+
...ngDevMode ? { debugName: "minStepsBetweenHandles" } : /* istanbul ignore next */ {},
|
|
26
|
+
transform: numberAttribute
|
|
27
|
+
});
|
|
28
|
+
this.marks = input(false, {
|
|
29
|
+
...ngDevMode ? { debugName: "marks" } : /* istanbul ignore next */ {},
|
|
30
|
+
transform: booleanAttribute
|
|
31
|
+
});
|
|
32
|
+
this.orientation = input("horizontal", ...ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []);
|
|
33
|
+
this.ariaLabelStart = input(...ngDevMode ? [void 0, { debugName: "ariaLabelStart" }] : /* istanbul ignore next */ []);
|
|
34
|
+
this.ariaLabelEnd = input(...ngDevMode ? [void 0, { debugName: "ariaLabelEnd" }] : /* istanbul ignore next */ []);
|
|
35
|
+
this.sliderChange = output();
|
|
36
|
+
this.slideEnd = output();
|
|
37
|
+
this.sliderFocus = output();
|
|
38
|
+
this.sliderBlur = output();
|
|
39
|
+
this.root = viewChild.required("root", ...ngDevMode ? [{ debugName: "root" }] : /* istanbul ignore next */ []);
|
|
40
|
+
this.handleEls = viewChildren("handle", ...ngDevMode ? [{ debugName: "handleEls" }] : /* istanbul ignore next */ []);
|
|
41
|
+
this.modelValue = signal(0, ...ngDevMode ? [{ debugName: "modelValue" }] : /* istanbul ignore next */ []);
|
|
42
|
+
this.activeHandle = signal(null, ...ngDevMode ? [{ debugName: "activeHandle" }] : /* istanbul ignore next */ []);
|
|
43
|
+
this.rangeValues = computed(() => {
|
|
44
|
+
const v = this.modelValue();
|
|
45
|
+
if (Array.isArray(v)) return [v[0] ?? this.min(), v[1] ?? this.max()];
|
|
46
|
+
return [this.min(), this.max()];
|
|
47
|
+
}, ...ngDevMode ? [{ debugName: "rangeValues" }] : /* istanbul ignore next */ []);
|
|
48
|
+
this.singleValue = computed(() => {
|
|
49
|
+
const v = this.modelValue();
|
|
50
|
+
if (typeof v === "number") return v;
|
|
51
|
+
return Array.isArray(v) ? v[0] ?? this.min() : this.min();
|
|
52
|
+
}, ...ngDevMode ? [{ debugName: "singleValue" }] : /* istanbul ignore next */ []);
|
|
53
|
+
this.handles = computed(() => {
|
|
54
|
+
if (this.range()) {
|
|
55
|
+
const [a, b] = this.rangeValues();
|
|
56
|
+
return [{
|
|
57
|
+
index: 0,
|
|
58
|
+
value: a,
|
|
59
|
+
percent: this.toPercent(a)
|
|
60
|
+
}, {
|
|
61
|
+
index: 1,
|
|
62
|
+
value: b,
|
|
63
|
+
percent: this.toPercent(b)
|
|
64
|
+
}];
|
|
65
|
+
}
|
|
66
|
+
const v = this.singleValue();
|
|
67
|
+
return [{
|
|
68
|
+
index: 0,
|
|
69
|
+
value: v,
|
|
70
|
+
percent: this.toPercent(v)
|
|
71
|
+
}];
|
|
72
|
+
}, ...ngDevMode ? [{ debugName: "handles" }] : /* istanbul ignore next */ []);
|
|
73
|
+
this.fill = computed(() => {
|
|
74
|
+
if (this.range()) {
|
|
75
|
+
const [a, b] = this.handles().map((h) => h.percent);
|
|
76
|
+
return {
|
|
77
|
+
start: Math.min(a, b),
|
|
78
|
+
size: Math.abs(b - a)
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
return {
|
|
82
|
+
start: 0,
|
|
83
|
+
size: this.handles()[0].percent
|
|
84
|
+
};
|
|
85
|
+
}, ...ngDevMode ? [{ debugName: "fill" }] : /* istanbul ignore next */ []);
|
|
86
|
+
this.markList = computed(() => {
|
|
87
|
+
if (!this.marks()) return [];
|
|
88
|
+
const step = this.stepSize();
|
|
89
|
+
const min = this.min();
|
|
90
|
+
const max = this.max();
|
|
91
|
+
const count = Math.floor((max - min) / step);
|
|
92
|
+
if (count < 1 || count > 100) return [];
|
|
93
|
+
const [lo, hi] = this.range() ? this.rangeValues() : [min, this.singleValue()];
|
|
94
|
+
return Array.from({ length: count + 1 }, (_, i) => {
|
|
95
|
+
const value = this.round(min + i * step);
|
|
96
|
+
return {
|
|
97
|
+
value,
|
|
98
|
+
percent: this.toPercent(value),
|
|
99
|
+
active: value >= lo && value <= hi
|
|
100
|
+
};
|
|
101
|
+
});
|
|
102
|
+
}, ...ngDevMode ? [{ debugName: "markList" }] : /* istanbul ignore next */ []);
|
|
103
|
+
this.classes = computed(() => {
|
|
104
|
+
const c = ["ui-slider"];
|
|
105
|
+
if (this.orientation() === "vertical") c.push("_vertical");
|
|
106
|
+
if (this.range()) c.push("_range");
|
|
107
|
+
if (this.isDisabled()) c.push("_disabled");
|
|
108
|
+
if (this.readonly()) c.push("_readonly");
|
|
109
|
+
if (this.isInvalid()) c.push("_invalid");
|
|
110
|
+
return c.join(" ");
|
|
111
|
+
}, ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
|
|
112
|
+
if (isDevMode()) effect(() => {
|
|
113
|
+
if (!this.ariaLabel() && !this.ariaLabelledBy()) warnMissingAccessibleName("ui-slider", "No accessible name: provide `ariaLabel` (or `ariaLabelledBy`).");
|
|
114
|
+
if (this.range() && !this.ariaLabelStart() && !this.ariaLabelEnd() && !this.ariaLabelledBy()) warnMissingAccessibleName("ui-slider", "Range mode: set `ariaLabelStart`/`ariaLabelEnd` so each handle has a distinct name.");
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
writeValue(value) {
|
|
118
|
+
if (this.range()) this.modelValue.set(Array.isArray(value) ? value : [this.min(), this.max()]);
|
|
119
|
+
else this.modelValue.set(typeof value === "number" ? value : this.min());
|
|
120
|
+
}
|
|
121
|
+
uidPrefix() {
|
|
122
|
+
return "ui-slider";
|
|
123
|
+
}
|
|
124
|
+
focus(options) {
|
|
125
|
+
this.handleEls()[0]?.nativeElement.focus(options);
|
|
126
|
+
}
|
|
127
|
+
onPointerDown(event) {
|
|
128
|
+
if (this.isDisabled() || this.readonly()) return;
|
|
129
|
+
const value = this.valueFromPointer(event);
|
|
130
|
+
const index = this.range() ? this.nearestHandle(value) : 0;
|
|
131
|
+
this.activeHandle.set(index);
|
|
132
|
+
this.root().nativeElement.setPointerCapture(event.pointerId);
|
|
133
|
+
this.updateValue(index, value);
|
|
134
|
+
this.handleEls()[index]?.nativeElement.focus();
|
|
135
|
+
event.preventDefault();
|
|
136
|
+
}
|
|
137
|
+
onPointerMove(event) {
|
|
138
|
+
const index = this.activeHandle();
|
|
139
|
+
if (index === null) return;
|
|
140
|
+
this.updateValue(index, this.valueFromPointer(event));
|
|
141
|
+
}
|
|
142
|
+
onPointerUp(event) {
|
|
143
|
+
if (this.activeHandle() === null) return;
|
|
144
|
+
this.activeHandle.set(null);
|
|
145
|
+
this.root().nativeElement.releasePointerCapture?.(event.pointerId);
|
|
146
|
+
this.slideEnd.emit(this.modelValue());
|
|
147
|
+
}
|
|
148
|
+
onKeyDown(event, index) {
|
|
149
|
+
if (this.isDisabled() || this.readonly()) return;
|
|
150
|
+
const step = this.stepSize();
|
|
151
|
+
const current = this.range() ? this.rangeValues()[index] : this.singleValue();
|
|
152
|
+
let next;
|
|
153
|
+
switch (event.key) {
|
|
154
|
+
case "ArrowLeft":
|
|
155
|
+
case "ArrowDown":
|
|
156
|
+
next = current - step;
|
|
157
|
+
break;
|
|
158
|
+
case "ArrowRight":
|
|
159
|
+
case "ArrowUp":
|
|
160
|
+
next = current + step;
|
|
161
|
+
break;
|
|
162
|
+
case "PageDown":
|
|
163
|
+
next = current - step * 10;
|
|
164
|
+
break;
|
|
165
|
+
case "PageUp":
|
|
166
|
+
next = current + step * 10;
|
|
167
|
+
break;
|
|
168
|
+
case "Home":
|
|
169
|
+
next = this.min();
|
|
170
|
+
break;
|
|
171
|
+
case "End":
|
|
172
|
+
next = this.max();
|
|
173
|
+
break;
|
|
174
|
+
default: return;
|
|
175
|
+
}
|
|
176
|
+
event.preventDefault();
|
|
177
|
+
this.updateValue(index, next);
|
|
178
|
+
}
|
|
179
|
+
onFocus(event) {
|
|
180
|
+
this.sliderFocus.emit(event);
|
|
181
|
+
}
|
|
182
|
+
onBlur(event) {
|
|
183
|
+
this.emitTouch();
|
|
184
|
+
this.sliderBlur.emit(event);
|
|
185
|
+
}
|
|
186
|
+
stepSize() {
|
|
187
|
+
const s = this.step();
|
|
188
|
+
return s > 0 ? s : 1;
|
|
189
|
+
}
|
|
190
|
+
toPercent(value) {
|
|
191
|
+
const min = this.min();
|
|
192
|
+
const span = this.max() - min;
|
|
193
|
+
if (span <= 0) return 0;
|
|
194
|
+
return Math.min(100, Math.max(0, (value - min) / span * 100));
|
|
195
|
+
}
|
|
196
|
+
valueFromPointer(event) {
|
|
197
|
+
const rect = this.root().nativeElement.getBoundingClientRect();
|
|
198
|
+
const ratio = this.orientation() === "horizontal" ? (event.clientX - rect.left) / rect.width : (rect.bottom - event.clientY) / rect.height;
|
|
199
|
+
const clamped = Math.min(1, Math.max(0, ratio));
|
|
200
|
+
return this.min() + clamped * (this.max() - this.min());
|
|
201
|
+
}
|
|
202
|
+
nearestHandle(value) {
|
|
203
|
+
const [a, b] = this.rangeValues();
|
|
204
|
+
return Math.abs(value - a) <= Math.abs(value - b) ? 0 : 1;
|
|
205
|
+
}
|
|
206
|
+
handleAriaLabel(index) {
|
|
207
|
+
if (!this.range()) return this.ariaLabel();
|
|
208
|
+
return (index === 0 ? this.ariaLabelStart() : this.ariaLabelEnd()) ?? this.ariaLabel();
|
|
209
|
+
}
|
|
210
|
+
snap(value) {
|
|
211
|
+
const step = this.stepSize();
|
|
212
|
+
const min = this.min();
|
|
213
|
+
return this.round(min + Math.round((value - min) / step) * step);
|
|
214
|
+
}
|
|
215
|
+
round(value) {
|
|
216
|
+
const step = this.stepSize();
|
|
217
|
+
const decimals = Number.isInteger(step) ? 0 : step.toString().split(".")[1]?.length ?? 0;
|
|
218
|
+
return decimals > 0 ? +value.toFixed(decimals) : Math.round(value);
|
|
219
|
+
}
|
|
220
|
+
clamp(value) {
|
|
221
|
+
return Math.min(this.max(), Math.max(this.min(), value));
|
|
222
|
+
}
|
|
223
|
+
updateValue(index, raw) {
|
|
224
|
+
if (this.isDisabled() || this.readonly()) return;
|
|
225
|
+
let value = this.clamp(this.snap(raw));
|
|
226
|
+
if (this.range()) {
|
|
227
|
+
const values = [...this.rangeValues()];
|
|
228
|
+
const gap = this.minStepsBetweenHandles() * this.stepSize();
|
|
229
|
+
if (index === 0) value = Math.min(value, values[1] - gap);
|
|
230
|
+
else value = Math.max(value, values[0] + gap);
|
|
231
|
+
value = this.clamp(value);
|
|
232
|
+
if (values[index] === value) return;
|
|
233
|
+
values[index] = value;
|
|
234
|
+
this.commit(values);
|
|
235
|
+
} else {
|
|
236
|
+
if (this.singleValue() === value) return;
|
|
237
|
+
this.commit(value);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
commit(value) {
|
|
241
|
+
this.modelValue.set(value);
|
|
242
|
+
this.emitChange(value);
|
|
243
|
+
this.sliderChange.emit(value);
|
|
244
|
+
}
|
|
245
|
+
static {
|
|
246
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
247
|
+
minVersion: "12.0.0",
|
|
248
|
+
version: "22.3.0",
|
|
249
|
+
ngImport: i0,
|
|
250
|
+
type: UiSlider,
|
|
251
|
+
deps: [],
|
|
252
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
static {
|
|
256
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
257
|
+
minVersion: "17.0.0",
|
|
258
|
+
version: "22.3.0",
|
|
259
|
+
type: UiSlider,
|
|
260
|
+
isStandalone: true,
|
|
261
|
+
selector: "ui-slider",
|
|
262
|
+
inputs: {
|
|
263
|
+
min: {
|
|
264
|
+
classPropertyName: "min",
|
|
265
|
+
publicName: "min",
|
|
266
|
+
isSignal: true,
|
|
267
|
+
isRequired: false,
|
|
268
|
+
transformFunction: null
|
|
269
|
+
},
|
|
270
|
+
max: {
|
|
271
|
+
classPropertyName: "max",
|
|
272
|
+
publicName: "max",
|
|
273
|
+
isSignal: true,
|
|
274
|
+
isRequired: false,
|
|
275
|
+
transformFunction: null
|
|
276
|
+
},
|
|
277
|
+
step: {
|
|
278
|
+
classPropertyName: "step",
|
|
279
|
+
publicName: "step",
|
|
280
|
+
isSignal: true,
|
|
281
|
+
isRequired: false,
|
|
282
|
+
transformFunction: null
|
|
283
|
+
},
|
|
284
|
+
range: {
|
|
285
|
+
classPropertyName: "range",
|
|
286
|
+
publicName: "range",
|
|
287
|
+
isSignal: true,
|
|
288
|
+
isRequired: false,
|
|
289
|
+
transformFunction: null
|
|
290
|
+
},
|
|
291
|
+
minStepsBetweenHandles: {
|
|
292
|
+
classPropertyName: "minStepsBetweenHandles",
|
|
293
|
+
publicName: "minStepsBetweenHandles",
|
|
294
|
+
isSignal: true,
|
|
295
|
+
isRequired: false,
|
|
296
|
+
transformFunction: null
|
|
297
|
+
},
|
|
298
|
+
marks: {
|
|
299
|
+
classPropertyName: "marks",
|
|
300
|
+
publicName: "marks",
|
|
301
|
+
isSignal: true,
|
|
302
|
+
isRequired: false,
|
|
303
|
+
transformFunction: null
|
|
304
|
+
},
|
|
305
|
+
orientation: {
|
|
306
|
+
classPropertyName: "orientation",
|
|
307
|
+
publicName: "orientation",
|
|
308
|
+
isSignal: true,
|
|
309
|
+
isRequired: false,
|
|
310
|
+
transformFunction: null
|
|
311
|
+
},
|
|
312
|
+
ariaLabelStart: {
|
|
313
|
+
classPropertyName: "ariaLabelStart",
|
|
314
|
+
publicName: "ariaLabelStart",
|
|
315
|
+
isSignal: true,
|
|
316
|
+
isRequired: false,
|
|
317
|
+
transformFunction: null
|
|
318
|
+
},
|
|
319
|
+
ariaLabelEnd: {
|
|
320
|
+
classPropertyName: "ariaLabelEnd",
|
|
321
|
+
publicName: "ariaLabelEnd",
|
|
322
|
+
isSignal: true,
|
|
323
|
+
isRequired: false,
|
|
324
|
+
transformFunction: null
|
|
325
|
+
}
|
|
326
|
+
},
|
|
327
|
+
outputs: {
|
|
328
|
+
sliderChange: "sliderChange",
|
|
329
|
+
slideEnd: "slideEnd",
|
|
330
|
+
sliderFocus: "sliderFocus",
|
|
331
|
+
sliderBlur: "sliderBlur"
|
|
332
|
+
},
|
|
333
|
+
host: { properties: {
|
|
334
|
+
"style.display": "orientation() === 'vertical' ? 'inline-block' : 'block'",
|
|
335
|
+
"style.width": "orientation() === 'vertical' ? null : '100%'"
|
|
336
|
+
} },
|
|
337
|
+
providers: [{
|
|
338
|
+
provide: NG_VALUE_ACCESSOR,
|
|
339
|
+
useExisting: forwardRef(() => UiSlider),
|
|
340
|
+
multi: true
|
|
341
|
+
}],
|
|
342
|
+
viewQueries: [{
|
|
343
|
+
propertyName: "root",
|
|
344
|
+
first: true,
|
|
345
|
+
predicate: ["root"],
|
|
346
|
+
descendants: true,
|
|
347
|
+
isSignal: true
|
|
348
|
+
}, {
|
|
349
|
+
propertyName: "handleEls",
|
|
350
|
+
predicate: ["handle"],
|
|
351
|
+
descendants: true,
|
|
352
|
+
isSignal: true
|
|
353
|
+
}],
|
|
354
|
+
usesInheritance: true,
|
|
355
|
+
ngImport: i0,
|
|
356
|
+
template: "<div\n #root\n [class]=\"classes()\"\n (pointerdown)=\"onPointerDown($event)\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerup)=\"onPointerUp($event)\"\n (pointercancel)=\"onPointerUp($event)\"\n>\n <!-- Rail + filled portion -->\n <div class=\"ui-slider-track\">\n <div\n class=\"ui-slider-range\"\n [style.inset-inline-start]=\"orientation() === 'horizontal' ? fill().start + '%' : null\"\n [style.width]=\"orientation() === 'horizontal' ? fill().size + '%' : null\"\n [style.bottom]=\"orientation() === 'vertical' ? fill().start + '%' : null\"\n [style.height]=\"orientation() === 'vertical' ? fill().size + '%' : null\"\n ></div>\n </div>\n\n <!-- Step ticks (decorative) -->\n @if (markList().length) {\n <div class=\"ui-slider-marks\" aria-hidden=\"true\">\n @for (mark of markList(); track mark.value) {\n <span\n class=\"ui-slider-mark\"\n [class._active]=\"mark.active\"\n [style.inset-inline-start]=\"orientation() === 'horizontal' ? mark.percent + '%' : null\"\n [style.bottom]=\"orientation() === 'vertical' ? mark.percent + '%' : null\"\n ></span>\n }\n </div>\n }\n\n <!-- Handles (WAI-ARIA slider pattern) -->\n @for (handle of handles(); track handle.index) {\n <div\n #handle\n class=\"ui-slider-handle\"\n role=\"slider\"\n [attr.id]=\"handle.index === 0 ? resolvedId() : null\"\n [attr.tabindex]=\"isDisabled() ? -1 : (tabindex() ?? 0)\"\n [attr.aria-valuemin]=\"min()\"\n [attr.aria-valuemax]=\"max()\"\n [attr.aria-valuenow]=\"handle.value\"\n [attr.aria-orientation]=\"orientation()\"\n [attr.aria-label]=\"handleAriaLabel(handle.index)\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-disabled]=\"isDisabled() ? true : null\"\n [attr.aria-readonly]=\"readonly() ? true : null\"\n [style.inset-inline-start]=\"orientation() === 'horizontal' ? handle.percent + '%' : null\"\n [style.bottom]=\"orientation() === 'vertical' ? handle.percent + '%' : null\"\n (keydown)=\"onKeyDown($event, handle.index)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n ></div>\n }\n</div>\n",
|
|
357
|
+
styles: [".ui-slider{position:relative;display:flex;align-items:center;width:100%;min-height:var(--ui-slider-handle-size, 1.375rem);touch-action:none;cursor:pointer;-webkit-user-select:none;user-select:none}.ui-slider-track{position:relative;width:100%;height:var(--ui-slider-thickness, .5rem);border-radius:var(--ui-slider-track-radius, var(--radius-full));background-color:var(--ui-slider-track-surface, var(--global-background-muted))}.ui-slider-range{position:absolute;top:0;height:100%;border-radius:var(--ui-slider-track-radius, var(--radius-full));background-color:var(--ui-slider-range-surface, var(--actions-high-surface-default));transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-slider-handle{position:absolute;top:50%;width:var(--ui-slider-handle-size, 1.375rem);height:var(--ui-slider-handle-size, 1.375rem);transform:translate(-50%,-50%);box-sizing:border-box;border:var(--ui-slider-handle-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid var(--ui-slider-handle-stroke, var(--actions-high-stroke-default));border-radius:var(--ui-slider-handle-radius, var(--radius-full));background-color:var(--ui-slider-handle-surface, var(--actions-high-surface-default));cursor:grab;transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),border-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-slider-handle:hover{background-color:var(--ui-slider-handle-surface-hover, var(--actions-high-surface-hover))}.ui-slider-handle:focus-visible{outline:none;border-color:var(--ui-slider-handle-stroke-focus, var(--actions-high-stroke-focused));box-shadow:0 0 0 var(--ui-slider-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--ui-slider-handle-stroke-focus, var(--actions-high-stroke-focused))}.ui-slider-handle:active{background-color:var(--ui-slider-handle-surface-pressed, var(--actions-high-surface-pressed));cursor:grabbing}.ui-slider-marks{position:absolute;inset:0;pointer-events:none}.ui-slider-mark{position:absolute;top:50%;width:var(--ui-slider-mark-size, .375rem);height:var(--ui-slider-mark-size, .375rem);transform:translate(-50%,-50%);border-radius:var(--ui-slider-mark-radius, var(--radius-full));background-color:var(--ui-slider-mark-surface, var(--informative-defaulthigh-surface-default))}.ui-slider-mark._active{background-color:var(--ui-slider-mark-surface-active, var(--actions-high-content-default))}.ui-slider._vertical{flex-direction:column;width:auto;min-width:var(--ui-slider-handle-size, 1.375rem);height:var(--ui-slider-length, 12rem);min-height:0}.ui-slider._vertical .ui-slider-track{width:var(--ui-slider-thickness, .5rem);height:100%}.ui-slider._vertical .ui-slider-range{top:auto;bottom:0;width:100%;height:auto}.ui-slider._vertical .ui-slider-handle,.ui-slider._vertical .ui-slider-mark{top:auto;left:50%;transform:translate(-50%,50%)}.ui-slider._disabled{cursor:not-allowed}.ui-slider._disabled .ui-slider-range{background-color:var(--ui-slider-range-surface-disabled, var(--actions-high-surface-disabled))}.ui-slider._disabled .ui-slider-handle{cursor:not-allowed;background-color:var(--ui-slider-handle-surface-disabled, var(--actions-high-surface-disabled))}.ui-slider._disabled .ui-slider-handle:hover{background-color:var(--ui-slider-handle-surface-disabled, var(--actions-high-surface-disabled))}.ui-slider._readonly,.ui-slider._readonly .ui-slider-handle{cursor:default}.ui-slider._invalid .ui-slider-range{background-color:var(--ui-slider-range-surface-invalid, var(--form-error-content-default))}.ui-slider._invalid .ui-slider-handle{background-color:var(--ui-slider-handle-surface-invalid, var(--form-error-content-default))}.ui-slider._invalid .ui-slider-handle:hover{background-color:var(--ui-slider-handle-surface-hover-invalid, var(--form-error-content-hover))}.ui-slider._invalid .ui-slider-handle:focus-visible{border-color:var(--ui-slider-handle-stroke-focus-invalid, var(--form-error-stroke-focused));box-shadow:0 0 0 var(--ui-slider-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--ui-slider-handle-stroke-focus-invalid, var(--form-error-stroke-focused))}\n"]
|
|
358
|
+
});
|
|
359
|
+
}
|
|
360
|
+
};
|
|
361
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
362
|
+
minVersion: "12.0.0",
|
|
363
|
+
version: "22.3.0",
|
|
364
|
+
ngImport: i0,
|
|
365
|
+
type: UiSlider,
|
|
366
|
+
decorators: [{
|
|
367
|
+
type: Component,
|
|
368
|
+
args: [{
|
|
369
|
+
selector: "ui-slider",
|
|
370
|
+
standalone: true,
|
|
371
|
+
host: {
|
|
372
|
+
"[style.display]": "orientation() === 'vertical' ? 'inline-block' : 'block'",
|
|
373
|
+
"[style.width]": "orientation() === 'vertical' ? null : '100%'"
|
|
374
|
+
},
|
|
375
|
+
providers: [{
|
|
376
|
+
provide: NG_VALUE_ACCESSOR,
|
|
377
|
+
useExisting: forwardRef(() => UiSlider),
|
|
378
|
+
multi: true
|
|
379
|
+
}],
|
|
380
|
+
template: "<div\n #root\n [class]=\"classes()\"\n (pointerdown)=\"onPointerDown($event)\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerup)=\"onPointerUp($event)\"\n (pointercancel)=\"onPointerUp($event)\"\n>\n <!-- Rail + filled portion -->\n <div class=\"ui-slider-track\">\n <div\n class=\"ui-slider-range\"\n [style.inset-inline-start]=\"orientation() === 'horizontal' ? fill().start + '%' : null\"\n [style.width]=\"orientation() === 'horizontal' ? fill().size + '%' : null\"\n [style.bottom]=\"orientation() === 'vertical' ? fill().start + '%' : null\"\n [style.height]=\"orientation() === 'vertical' ? fill().size + '%' : null\"\n ></div>\n </div>\n\n <!-- Step ticks (decorative) -->\n @if (markList().length) {\n <div class=\"ui-slider-marks\" aria-hidden=\"true\">\n @for (mark of markList(); track mark.value) {\n <span\n class=\"ui-slider-mark\"\n [class._active]=\"mark.active\"\n [style.inset-inline-start]=\"orientation() === 'horizontal' ? mark.percent + '%' : null\"\n [style.bottom]=\"orientation() === 'vertical' ? mark.percent + '%' : null\"\n ></span>\n }\n </div>\n }\n\n <!-- Handles (WAI-ARIA slider pattern) -->\n @for (handle of handles(); track handle.index) {\n <div\n #handle\n class=\"ui-slider-handle\"\n role=\"slider\"\n [attr.id]=\"handle.index === 0 ? resolvedId() : null\"\n [attr.tabindex]=\"isDisabled() ? -1 : (tabindex() ?? 0)\"\n [attr.aria-valuemin]=\"min()\"\n [attr.aria-valuemax]=\"max()\"\n [attr.aria-valuenow]=\"handle.value\"\n [attr.aria-orientation]=\"orientation()\"\n [attr.aria-label]=\"handleAriaLabel(handle.index)\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-disabled]=\"isDisabled() ? true : null\"\n [attr.aria-readonly]=\"readonly() ? true : null\"\n [style.inset-inline-start]=\"orientation() === 'horizontal' ? handle.percent + '%' : null\"\n [style.bottom]=\"orientation() === 'vertical' ? handle.percent + '%' : null\"\n (keydown)=\"onKeyDown($event, handle.index)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n ></div>\n }\n</div>\n",
|
|
381
|
+
styles: [".ui-slider{position:relative;display:flex;align-items:center;width:100%;min-height:var(--ui-slider-handle-size, 1.375rem);touch-action:none;cursor:pointer;-webkit-user-select:none;user-select:none}.ui-slider-track{position:relative;width:100%;height:var(--ui-slider-thickness, .5rem);border-radius:var(--ui-slider-track-radius, var(--radius-full));background-color:var(--ui-slider-track-surface, var(--global-background-muted))}.ui-slider-range{position:absolute;top:0;height:100%;border-radius:var(--ui-slider-track-radius, var(--radius-full));background-color:var(--ui-slider-range-surface, var(--actions-high-surface-default));transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-slider-handle{position:absolute;top:50%;width:var(--ui-slider-handle-size, 1.375rem);height:var(--ui-slider-handle-size, 1.375rem);transform:translate(-50%,-50%);box-sizing:border-box;border:var(--ui-slider-handle-stroke-width, var(--ui-control-stroke-width, var(--stroke-default))) solid var(--ui-slider-handle-stroke, var(--actions-high-stroke-default));border-radius:var(--ui-slider-handle-radius, var(--radius-full));background-color:var(--ui-slider-handle-surface, var(--actions-high-surface-default));cursor:grab;transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),border-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-slider-handle:hover{background-color:var(--ui-slider-handle-surface-hover, var(--actions-high-surface-hover))}.ui-slider-handle:focus-visible{outline:none;border-color:var(--ui-slider-handle-stroke-focus, var(--actions-high-stroke-focused));box-shadow:0 0 0 var(--ui-slider-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--ui-slider-handle-stroke-focus, var(--actions-high-stroke-focused))}.ui-slider-handle:active{background-color:var(--ui-slider-handle-surface-pressed, var(--actions-high-surface-pressed));cursor:grabbing}.ui-slider-marks{position:absolute;inset:0;pointer-events:none}.ui-slider-mark{position:absolute;top:50%;width:var(--ui-slider-mark-size, .375rem);height:var(--ui-slider-mark-size, .375rem);transform:translate(-50%,-50%);border-radius:var(--ui-slider-mark-radius, var(--radius-full));background-color:var(--ui-slider-mark-surface, var(--informative-defaulthigh-surface-default))}.ui-slider-mark._active{background-color:var(--ui-slider-mark-surface-active, var(--actions-high-content-default))}.ui-slider._vertical{flex-direction:column;width:auto;min-width:var(--ui-slider-handle-size, 1.375rem);height:var(--ui-slider-length, 12rem);min-height:0}.ui-slider._vertical .ui-slider-track{width:var(--ui-slider-thickness, .5rem);height:100%}.ui-slider._vertical .ui-slider-range{top:auto;bottom:0;width:100%;height:auto}.ui-slider._vertical .ui-slider-handle,.ui-slider._vertical .ui-slider-mark{top:auto;left:50%;transform:translate(-50%,50%)}.ui-slider._disabled{cursor:not-allowed}.ui-slider._disabled .ui-slider-range{background-color:var(--ui-slider-range-surface-disabled, var(--actions-high-surface-disabled))}.ui-slider._disabled .ui-slider-handle{cursor:not-allowed;background-color:var(--ui-slider-handle-surface-disabled, var(--actions-high-surface-disabled))}.ui-slider._disabled .ui-slider-handle:hover{background-color:var(--ui-slider-handle-surface-disabled, var(--actions-high-surface-disabled))}.ui-slider._readonly,.ui-slider._readonly .ui-slider-handle{cursor:default}.ui-slider._invalid .ui-slider-range{background-color:var(--ui-slider-range-surface-invalid, var(--form-error-content-default))}.ui-slider._invalid .ui-slider-handle{background-color:var(--ui-slider-handle-surface-invalid, var(--form-error-content-default))}.ui-slider._invalid .ui-slider-handle:hover{background-color:var(--ui-slider-handle-surface-hover-invalid, var(--form-error-content-hover))}.ui-slider._invalid .ui-slider-handle:focus-visible{border-color:var(--ui-slider-handle-stroke-focus-invalid, var(--form-error-stroke-focused));box-shadow:0 0 0 var(--ui-slider-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--ui-slider-handle-stroke-focus-invalid, var(--form-error-stroke-focused))}\n"]
|
|
382
|
+
}]
|
|
383
|
+
}],
|
|
384
|
+
ctorParameters: () => [],
|
|
385
|
+
propDecorators: {
|
|
386
|
+
min: [{
|
|
387
|
+
type: i0.Input,
|
|
388
|
+
args: [{
|
|
389
|
+
isSignal: true,
|
|
390
|
+
alias: "min",
|
|
391
|
+
required: false
|
|
392
|
+
}]
|
|
393
|
+
}],
|
|
394
|
+
max: [{
|
|
395
|
+
type: i0.Input,
|
|
396
|
+
args: [{
|
|
397
|
+
isSignal: true,
|
|
398
|
+
alias: "max",
|
|
399
|
+
required: false
|
|
400
|
+
}]
|
|
401
|
+
}],
|
|
402
|
+
step: [{
|
|
403
|
+
type: i0.Input,
|
|
404
|
+
args: [{
|
|
405
|
+
isSignal: true,
|
|
406
|
+
alias: "step",
|
|
407
|
+
required: false
|
|
408
|
+
}]
|
|
409
|
+
}],
|
|
410
|
+
range: [{
|
|
411
|
+
type: i0.Input,
|
|
412
|
+
args: [{
|
|
413
|
+
isSignal: true,
|
|
414
|
+
alias: "range",
|
|
415
|
+
required: false
|
|
416
|
+
}]
|
|
417
|
+
}],
|
|
418
|
+
minStepsBetweenHandles: [{
|
|
419
|
+
type: i0.Input,
|
|
420
|
+
args: [{
|
|
421
|
+
isSignal: true,
|
|
422
|
+
alias: "minStepsBetweenHandles",
|
|
423
|
+
required: false
|
|
424
|
+
}]
|
|
425
|
+
}],
|
|
426
|
+
marks: [{
|
|
427
|
+
type: i0.Input,
|
|
428
|
+
args: [{
|
|
429
|
+
isSignal: true,
|
|
430
|
+
alias: "marks",
|
|
431
|
+
required: false
|
|
432
|
+
}]
|
|
433
|
+
}],
|
|
434
|
+
orientation: [{
|
|
435
|
+
type: i0.Input,
|
|
436
|
+
args: [{
|
|
437
|
+
isSignal: true,
|
|
438
|
+
alias: "orientation",
|
|
439
|
+
required: false
|
|
440
|
+
}]
|
|
441
|
+
}],
|
|
442
|
+
ariaLabelStart: [{
|
|
443
|
+
type: i0.Input,
|
|
444
|
+
args: [{
|
|
445
|
+
isSignal: true,
|
|
446
|
+
alias: "ariaLabelStart",
|
|
447
|
+
required: false
|
|
448
|
+
}]
|
|
449
|
+
}],
|
|
450
|
+
ariaLabelEnd: [{
|
|
451
|
+
type: i0.Input,
|
|
452
|
+
args: [{
|
|
453
|
+
isSignal: true,
|
|
454
|
+
alias: "ariaLabelEnd",
|
|
455
|
+
required: false
|
|
456
|
+
}]
|
|
457
|
+
}],
|
|
458
|
+
sliderChange: [{
|
|
459
|
+
type: i0.Output,
|
|
460
|
+
args: ["sliderChange"]
|
|
461
|
+
}],
|
|
462
|
+
slideEnd: [{
|
|
463
|
+
type: i0.Output,
|
|
464
|
+
args: ["slideEnd"]
|
|
465
|
+
}],
|
|
466
|
+
sliderFocus: [{
|
|
467
|
+
type: i0.Output,
|
|
468
|
+
args: ["sliderFocus"]
|
|
469
|
+
}],
|
|
470
|
+
sliderBlur: [{
|
|
471
|
+
type: i0.Output,
|
|
472
|
+
args: ["sliderBlur"]
|
|
473
|
+
}],
|
|
474
|
+
root: [{
|
|
475
|
+
type: i0.ViewChild,
|
|
476
|
+
args: ["root", { isSignal: true }]
|
|
477
|
+
}],
|
|
478
|
+
handleEls: [{
|
|
479
|
+
type: i0.ViewChildren,
|
|
480
|
+
args: ["handle", { isSignal: true }]
|
|
481
|
+
}]
|
|
482
|
+
}
|
|
483
|
+
});
|
|
338
484
|
export { UiSlider };
|
|
339
|
-
|
|
485
|
+
|
|
486
|
+
//# sourceMappingURL=4sh-ui-kit-forms-ui-slider.mjs.map
|