@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,258 +1,508 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import { NG_VALUE_ACCESSOR } from
|
|
4
|
-
import { BaseFormField,
|
|
5
|
-
import { UiField } from
|
|
6
|
-
import { UiIcon } from
|
|
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
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Component, booleanAttribute, computed, forwardRef, input, numberAttribute, output, signal, viewChild } from "@angular/core";
|
|
3
|
+
import { NG_VALUE_ACCESSOR } from "@angular/forms";
|
|
4
|
+
import { BaseFormField, UiBrowserFill, hasFocus } from "@4sh/ui-kit/forms";
|
|
5
|
+
import { UiField } from "@4sh/ui-kit/forms/ui-field";
|
|
6
|
+
import { UiIcon } from "@4sh/ui-kit/base/ui-icon";
|
|
7
|
+
var UiInputNumber = class UiInputNumber extends BaseFormField {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
this.placeholder = input(...ngDevMode ? [void 0, { debugName: "placeholder" }] : /* istanbul ignore next */ []);
|
|
11
|
+
this.min = input(void 0, {
|
|
12
|
+
...ngDevMode ? { debugName: "min" } : /* istanbul ignore next */ {},
|
|
13
|
+
transform: numberAttribute
|
|
14
|
+
});
|
|
15
|
+
this.max = input(void 0, {
|
|
16
|
+
...ngDevMode ? { debugName: "max" } : /* istanbul ignore next */ {},
|
|
17
|
+
transform: numberAttribute
|
|
18
|
+
});
|
|
19
|
+
this.step = input(1, {
|
|
20
|
+
...ngDevMode ? { debugName: "step" } : /* istanbul ignore next */ {},
|
|
21
|
+
transform: numberAttribute
|
|
22
|
+
});
|
|
23
|
+
this.allowDecimals = input(true, {
|
|
24
|
+
...ngDevMode ? { debugName: "allowDecimals" } : /* istanbul ignore next */ {},
|
|
25
|
+
transform: booleanAttribute
|
|
26
|
+
});
|
|
27
|
+
this.unit = input(...ngDevMode ? [void 0, { debugName: "unit" }] : /* istanbul ignore next */ []);
|
|
28
|
+
this.showButtons = input(true, {
|
|
29
|
+
...ngDevMode ? { debugName: "showButtons" } : /* istanbul ignore next */ {},
|
|
30
|
+
transform: booleanAttribute
|
|
31
|
+
});
|
|
32
|
+
this.incrementAriaLabel = input("Augmenter", ...ngDevMode ? [{ debugName: "incrementAriaLabel" }] : /* istanbul ignore next */ []);
|
|
33
|
+
this.decrementAriaLabel = input("Diminuer", ...ngDevMode ? [{ debugName: "decrementAriaLabel" }] : /* istanbul ignore next */ []);
|
|
34
|
+
this.locale = input(...ngDevMode ? [void 0, { debugName: "locale" }] : /* istanbul ignore next */ []);
|
|
35
|
+
this.currency = input(...ngDevMode ? [void 0, { debugName: "currency" }] : /* istanbul ignore next */ []);
|
|
36
|
+
this.useGrouping = input(true, {
|
|
37
|
+
...ngDevMode ? { debugName: "useGrouping" } : /* istanbul ignore next */ {},
|
|
38
|
+
transform: booleanAttribute
|
|
39
|
+
});
|
|
40
|
+
this.minFractionDigits = input(void 0, {
|
|
41
|
+
...ngDevMode ? { debugName: "minFractionDigits" } : /* istanbul ignore next */ {},
|
|
42
|
+
transform: numberAttribute
|
|
43
|
+
});
|
|
44
|
+
this.maxFractionDigits = input(void 0, {
|
|
45
|
+
...ngDevMode ? { debugName: "maxFractionDigits" } : /* istanbul ignore next */ {},
|
|
46
|
+
transform: numberAttribute
|
|
47
|
+
});
|
|
48
|
+
this.valueChange = output();
|
|
49
|
+
this.inputFocus = output();
|
|
50
|
+
this.inputBlur = output();
|
|
51
|
+
this.inputEl = viewChild.required("inputEl", ...ngDevMode ? [{ debugName: "inputEl" }] : /* istanbul ignore next */ []);
|
|
52
|
+
this.text = signal("", ...ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []);
|
|
53
|
+
this.isFilled = computed(() => this.text() !== "", ...ngDevMode ? [{ debugName: "isFilled" }] : /* istanbul ignore next */ []);
|
|
54
|
+
this.effectivePlaceholder = computed(() => this.hasFloatLabel() ? "" : this.placeholder() ?? "", ...ngDevMode ? [{ debugName: "effectivePlaceholder" }] : /* istanbul ignore next */ []);
|
|
55
|
+
this.displayUnit = computed(() => this.currency() ? null : this.unit() ?? null, ...ngDevMode ? [{ debugName: "displayUnit" }] : /* istanbul ignore next */ []);
|
|
56
|
+
this.unitSmall = computed(() => this.size() === "small", ...ngDevMode ? [{ debugName: "unitSmall" }] : /* istanbul ignore next */ []);
|
|
57
|
+
this.atMax = computed(() => {
|
|
58
|
+
const v = this.modelValue();
|
|
59
|
+
const max = this.max();
|
|
60
|
+
return v != null && max != null && v >= max;
|
|
61
|
+
}, ...ngDevMode ? [{ debugName: "atMax" }] : /* istanbul ignore next */ []);
|
|
62
|
+
this.atMin = computed(() => {
|
|
63
|
+
const v = this.modelValue();
|
|
64
|
+
const min = this.min();
|
|
65
|
+
return v != null && min != null && v <= min;
|
|
66
|
+
}, ...ngDevMode ? [{ debugName: "atMin" }] : /* istanbul ignore next */ []);
|
|
67
|
+
this.ariaValueMin = computed(() => Number.isFinite(this.min()) ? this.min() : null, ...ngDevMode ? [{ debugName: "ariaValueMin" }] : /* istanbul ignore next */ []);
|
|
68
|
+
this.ariaValueMax = computed(() => Number.isFinite(this.max()) ? this.max() : null, ...ngDevMode ? [{ debugName: "ariaValueMax" }] : /* istanbul ignore next */ []);
|
|
69
|
+
this.separators = computed(() => {
|
|
70
|
+
const parts = new Intl.NumberFormat(this.locale()).formatToParts(11111.1);
|
|
71
|
+
return {
|
|
72
|
+
group: parts.find((p) => p.type === "group")?.value ?? "",
|
|
73
|
+
decimal: parts.find((p) => p.type === "decimal")?.value ?? "."
|
|
74
|
+
};
|
|
75
|
+
}, ...ngDevMode ? [{ debugName: "separators" }] : /* istanbul ignore next */ []);
|
|
76
|
+
}
|
|
77
|
+
writeValue(value) {
|
|
78
|
+
this.modelValue.set(value ?? void 0);
|
|
79
|
+
this.text.set(value === null || value === void 0 ? "" : this.format(value));
|
|
80
|
+
}
|
|
81
|
+
focus(options) {
|
|
82
|
+
this.inputEl().nativeElement.focus(options);
|
|
83
|
+
}
|
|
84
|
+
onFocus(event) {
|
|
85
|
+
const v = this.modelValue();
|
|
86
|
+
if (v != null) this.text.set(this.editable(v));
|
|
87
|
+
this.inputFocus.emit(event);
|
|
88
|
+
}
|
|
89
|
+
onInput() {
|
|
90
|
+
const el = this.inputEl().nativeElement;
|
|
91
|
+
const raw = el.value;
|
|
92
|
+
const filled = !hasFocus(el);
|
|
93
|
+
this.text.set(raw);
|
|
94
|
+
this.commit(this.parse(raw), { reformat: filled });
|
|
95
|
+
if (filled) el.value = this.text();
|
|
96
|
+
}
|
|
97
|
+
onBrowserFill() {
|
|
98
|
+
if (this.inputEl().nativeElement.value !== this.text()) this.onInput();
|
|
99
|
+
}
|
|
100
|
+
onBlur(event) {
|
|
101
|
+
this.commit(this.clamp(this.modelValue() ?? null), { reformat: true });
|
|
102
|
+
this.emitTouch();
|
|
103
|
+
this.inputBlur.emit(event);
|
|
104
|
+
}
|
|
105
|
+
onKeydown(event) {
|
|
106
|
+
if (event.key === "ArrowUp") {
|
|
107
|
+
event.preventDefault();
|
|
108
|
+
this.stepBy(1);
|
|
109
|
+
} else if (event.key === "ArrowDown") {
|
|
110
|
+
event.preventDefault();
|
|
111
|
+
this.stepBy(-1);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
stepBy(direction) {
|
|
115
|
+
if (this.isDisabled() || this.readonly()) return;
|
|
116
|
+
const base = this.modelValue() ?? 0;
|
|
117
|
+
const next = this.clamp(base + direction * this.step());
|
|
118
|
+
this.commit(next, { reformat: !this.isFocused() });
|
|
119
|
+
if (this.isFocused()) this.text.set(next === null ? "" : this.editable(next));
|
|
120
|
+
this.inputEl().nativeElement.focus();
|
|
121
|
+
}
|
|
122
|
+
isFocused() {
|
|
123
|
+
return hasFocus(this.inputEl().nativeElement);
|
|
124
|
+
}
|
|
125
|
+
commit(value, opts) {
|
|
126
|
+
this.modelValue.set(value ?? void 0);
|
|
127
|
+
if (opts.reformat) this.text.set(value === null ? "" : this.format(value));
|
|
128
|
+
this.emitChange(value);
|
|
129
|
+
this.valueChange.emit(value);
|
|
130
|
+
}
|
|
131
|
+
parse(raw) {
|
|
132
|
+
const { group, decimal } = this.separators();
|
|
133
|
+
let s = raw.trim();
|
|
134
|
+
if (group) s = s.split(group).join("");
|
|
135
|
+
s = s.replace(/\s/g, "").replace(decimal, ".").replace(/[^0-9.-]/g, "");
|
|
136
|
+
if (s === "" || s === "-" || s === "." || s === "-.") return null;
|
|
137
|
+
const n = Number(s);
|
|
138
|
+
if (Number.isNaN(n)) return null;
|
|
139
|
+
return this.allowDecimals() ? n : Math.trunc(n);
|
|
140
|
+
}
|
|
141
|
+
clamp(value) {
|
|
142
|
+
if (value === null) return null;
|
|
143
|
+
const min = this.min();
|
|
144
|
+
const max = this.max();
|
|
145
|
+
let v = value;
|
|
146
|
+
if (min != null && v < min) v = min;
|
|
147
|
+
if (max != null && v > max) v = max;
|
|
148
|
+
return v;
|
|
149
|
+
}
|
|
150
|
+
editable(value) {
|
|
151
|
+
return new Intl.NumberFormat(this.locale(), {
|
|
152
|
+
useGrouping: false,
|
|
153
|
+
maximumFractionDigits: 20
|
|
154
|
+
}).format(value);
|
|
155
|
+
}
|
|
156
|
+
format(value) {
|
|
157
|
+
const options = { useGrouping: this.useGrouping() };
|
|
158
|
+
if (this.currency()) {
|
|
159
|
+
options.style = "currency";
|
|
160
|
+
options.currency = this.currency();
|
|
161
|
+
}
|
|
162
|
+
if (this.minFractionDigits() != null) options.minimumFractionDigits = this.minFractionDigits();
|
|
163
|
+
if (this.maxFractionDigits() != null) options.maximumFractionDigits = this.maxFractionDigits();
|
|
164
|
+
return new Intl.NumberFormat(this.locale(), options).format(value);
|
|
165
|
+
}
|
|
166
|
+
static {
|
|
167
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
168
|
+
minVersion: "12.0.0",
|
|
169
|
+
version: "22.3.0",
|
|
170
|
+
ngImport: i0,
|
|
171
|
+
type: UiInputNumber,
|
|
172
|
+
deps: null,
|
|
173
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
static {
|
|
177
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
178
|
+
minVersion: "17.0.0",
|
|
179
|
+
version: "22.3.0",
|
|
180
|
+
type: UiInputNumber,
|
|
181
|
+
isStandalone: true,
|
|
182
|
+
selector: "ui-input-number",
|
|
183
|
+
inputs: {
|
|
184
|
+
placeholder: {
|
|
185
|
+
classPropertyName: "placeholder",
|
|
186
|
+
publicName: "placeholder",
|
|
187
|
+
isSignal: true,
|
|
188
|
+
isRequired: false,
|
|
189
|
+
transformFunction: null
|
|
190
|
+
},
|
|
191
|
+
min: {
|
|
192
|
+
classPropertyName: "min",
|
|
193
|
+
publicName: "min",
|
|
194
|
+
isSignal: true,
|
|
195
|
+
isRequired: false,
|
|
196
|
+
transformFunction: null
|
|
197
|
+
},
|
|
198
|
+
max: {
|
|
199
|
+
classPropertyName: "max",
|
|
200
|
+
publicName: "max",
|
|
201
|
+
isSignal: true,
|
|
202
|
+
isRequired: false,
|
|
203
|
+
transformFunction: null
|
|
204
|
+
},
|
|
205
|
+
step: {
|
|
206
|
+
classPropertyName: "step",
|
|
207
|
+
publicName: "step",
|
|
208
|
+
isSignal: true,
|
|
209
|
+
isRequired: false,
|
|
210
|
+
transformFunction: null
|
|
211
|
+
},
|
|
212
|
+
allowDecimals: {
|
|
213
|
+
classPropertyName: "allowDecimals",
|
|
214
|
+
publicName: "allowDecimals",
|
|
215
|
+
isSignal: true,
|
|
216
|
+
isRequired: false,
|
|
217
|
+
transformFunction: null
|
|
218
|
+
},
|
|
219
|
+
unit: {
|
|
220
|
+
classPropertyName: "unit",
|
|
221
|
+
publicName: "unit",
|
|
222
|
+
isSignal: true,
|
|
223
|
+
isRequired: false,
|
|
224
|
+
transformFunction: null
|
|
225
|
+
},
|
|
226
|
+
showButtons: {
|
|
227
|
+
classPropertyName: "showButtons",
|
|
228
|
+
publicName: "showButtons",
|
|
229
|
+
isSignal: true,
|
|
230
|
+
isRequired: false,
|
|
231
|
+
transformFunction: null
|
|
232
|
+
},
|
|
233
|
+
incrementAriaLabel: {
|
|
234
|
+
classPropertyName: "incrementAriaLabel",
|
|
235
|
+
publicName: "incrementAriaLabel",
|
|
236
|
+
isSignal: true,
|
|
237
|
+
isRequired: false,
|
|
238
|
+
transformFunction: null
|
|
239
|
+
},
|
|
240
|
+
decrementAriaLabel: {
|
|
241
|
+
classPropertyName: "decrementAriaLabel",
|
|
242
|
+
publicName: "decrementAriaLabel",
|
|
243
|
+
isSignal: true,
|
|
244
|
+
isRequired: false,
|
|
245
|
+
transformFunction: null
|
|
246
|
+
},
|
|
247
|
+
locale: {
|
|
248
|
+
classPropertyName: "locale",
|
|
249
|
+
publicName: "locale",
|
|
250
|
+
isSignal: true,
|
|
251
|
+
isRequired: false,
|
|
252
|
+
transformFunction: null
|
|
253
|
+
},
|
|
254
|
+
currency: {
|
|
255
|
+
classPropertyName: "currency",
|
|
256
|
+
publicName: "currency",
|
|
257
|
+
isSignal: true,
|
|
258
|
+
isRequired: false,
|
|
259
|
+
transformFunction: null
|
|
260
|
+
},
|
|
261
|
+
useGrouping: {
|
|
262
|
+
classPropertyName: "useGrouping",
|
|
263
|
+
publicName: "useGrouping",
|
|
264
|
+
isSignal: true,
|
|
265
|
+
isRequired: false,
|
|
266
|
+
transformFunction: null
|
|
267
|
+
},
|
|
268
|
+
minFractionDigits: {
|
|
269
|
+
classPropertyName: "minFractionDigits",
|
|
270
|
+
publicName: "minFractionDigits",
|
|
271
|
+
isSignal: true,
|
|
272
|
+
isRequired: false,
|
|
273
|
+
transformFunction: null
|
|
274
|
+
},
|
|
275
|
+
maxFractionDigits: {
|
|
276
|
+
classPropertyName: "maxFractionDigits",
|
|
277
|
+
publicName: "maxFractionDigits",
|
|
278
|
+
isSignal: true,
|
|
279
|
+
isRequired: false,
|
|
280
|
+
transformFunction: null
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
outputs: {
|
|
284
|
+
valueChange: "valueChange",
|
|
285
|
+
inputFocus: "inputFocus",
|
|
286
|
+
inputBlur: "inputBlur"
|
|
287
|
+
},
|
|
288
|
+
providers: [{
|
|
289
|
+
provide: NG_VALUE_ACCESSOR,
|
|
290
|
+
useExisting: forwardRef(() => UiInputNumber),
|
|
291
|
+
multi: true
|
|
292
|
+
}],
|
|
293
|
+
viewQueries: [{
|
|
294
|
+
propertyName: "inputEl",
|
|
295
|
+
first: true,
|
|
296
|
+
predicate: ["inputEl"],
|
|
297
|
+
descendants: true,
|
|
298
|
+
isSignal: true
|
|
299
|
+
}],
|
|
300
|
+
usesInheritance: true,
|
|
301
|
+
ngImport: i0,
|
|
302
|
+
template: "<ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [floatLabel]=\"floatLabel()\"\n [filled]=\"isFilled()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n [showMessageIcon]=\"showMessageIcon()\"\n [messageIcon]=\"messageIcon()\"\n>\n <input\n #inputEl\n uiBrowserFill\n class=\"ui-input-number-native\"\n [class._small]=\"size() === 'small'\"\n type=\"text\"\n inputmode=\"decimal\"\n [id]=\"resolvedId()\"\n [value]=\"text()\"\n [placeholder]=\"effectivePlaceholder()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [attr.name]=\"name() || null\"\n [attr.tabindex]=\"tabindex()\"\n [attr.aria-label]=\"label() ? null : ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-describedby]=\"displayMessage() ? messageId() : null\"\n [attr.aria-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n role=\"spinbutton\"\n [attr.aria-valuenow]=\"modelValue() ?? null\"\n [attr.aria-valuemin]=\"ariaValueMin()\"\n [attr.aria-valuemax]=\"ariaValueMax()\"\n (input)=\"onInput()\"\n (browserFill)=\"onBrowserFill()\"\n (keydown)=\"onKeydown($event)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n />\n\n @if (displayUnit(); as u) {\n <span\n uiFieldSuffix\n class=\"ui-input-number-unit\"\n [class._small]=\"unitSmall()\"\n [class._disabled]=\"isDisabled()\"\n >{{ u }}</span\n >\n }\n\n @if (showButtons()) {\n <span uiFieldSuffix class=\"ui-input-number-spinner\">\n <button\n type=\"button\"\n tabindex=\"-1\"\n [attr.aria-label]=\"incrementAriaLabel()\"\n [disabled]=\"isDisabled() || readonly() || atMax()\"\n (click)=\"stepBy(1)\"\n >\n <ui-icon name=\"angle-up\" size=\"sm\" />\n </button>\n <button\n type=\"button\"\n tabindex=\"-1\"\n [attr.aria-label]=\"decrementAriaLabel()\"\n [disabled]=\"isDisabled() || readonly() || atMin()\"\n (click)=\"stepBy(-1)\"\n >\n <ui-icon name=\"angle-down\" size=\"sm\" />\n </button>\n </span>\n }\n</ui-field>\n",
|
|
303
|
+
styles: ["@keyframes ui-browser-fill{0%{opacity:1}}.ui-browser-fill:-webkit-autofill{animation:ui-browser-fill 0s}.ui-input-number-native{flex:1 1 auto;align-self:stretch;min-width:0;margin:0;padding:0;border:none;border-radius:inherit;background:transparent;outline:none;font-family:var(--ui-form-field-font-family, var(--fontfamily-base));font-size:var(--size-typography-text-default);color:var(--ui-form-field-color, var(--form-high-content-default))}.ui-input-number-native:first-child{padding-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-input-number-native:last-child{padding-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-input-number-native{padding-block-start:calc(0px + var(--_field-inset-block-start, 0px))}.ui-input-number-native::placeholder{color:var(--ui-form-field-placeholder-color, var(--form-low-content-default));opacity:1}.ui-input-number-native:disabled{cursor:not-allowed;color:var(--ui-form-field-color-disabled, var(--form-high-content-disabled))}.ui-input-number-native._small{font-size:var(--ui-input-number-font-size-small, var(--size-typography-text-md))}.ui-input-number-unit{flex-shrink:0;color:var(--ui-form-field-affix-color, var(--form-low-content-default))}.ui-input-number-unit:first-child{margin-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-input-number-unit:last-child{margin-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-input-number-unit._disabled{color:var(--ui-form-field-affix-color-disabled, var(--form-high-content-disabled))}.ui-input-number-unit{font-family:var(--ui-input-number-font-family, var(--fontfamily-base));font-size:var(--ui-input-number-unit-font-size, var(--size-typography-text-default));white-space:nowrap;-webkit-user-select:none;user-select:none}.ui-input-number-unit._small{font-size:var(--ui-input-number-font-size-small, var(--size-typography-text-md))}.ui-input-number-spinner{display:flex;flex-direction:column;align-self:stretch;flex-shrink:0;width:var(--ui-input-number-spinner-width, 1.875rem);border-left:var(--ui-control-stroke-width, var(--stroke-default)) solid var(--ui-form-field-spinner-stroke, var(--form-high-stroke-default))}.ui-input-number-spinner button{display:flex;flex:1 1 50%;align-items:center;justify-content:center;min-height:0;padding:0;border:none;background:none;line-height:0;color:var(--ui-form-field-spinner-color, var(--form-low-content-default));cursor:pointer;transition: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))),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-input-number-spinner button:hover:not(:disabled){color:var(--ui-form-field-spinner-color-hover, var(--form-high-content-hover));background-color:var(--ui-form-field-spinner-surface-hover, var(--form-high-surface-hover))}.ui-input-number-spinner button:disabled{cursor:not-allowed;color:var(--ui-form-field-spinner-color-disabled, var(--form-high-content-disabled))}.ui-input-number-spinner button+button{border-top:var(--ui-control-stroke-width, var(--stroke-default)) solid var(--ui-form-field-spinner-stroke, var(--form-high-stroke-default))}\n"],
|
|
304
|
+
dependencies: [
|
|
305
|
+
{
|
|
306
|
+
kind: "component",
|
|
307
|
+
type: UiField,
|
|
308
|
+
selector: "ui-field",
|
|
309
|
+
inputs: [
|
|
310
|
+
"label",
|
|
311
|
+
"for",
|
|
312
|
+
"required",
|
|
313
|
+
"size",
|
|
314
|
+
"level",
|
|
315
|
+
"floatLabel",
|
|
316
|
+
"filled",
|
|
317
|
+
"disabled",
|
|
318
|
+
"readonly",
|
|
319
|
+
"multiline",
|
|
320
|
+
"autoHeight",
|
|
321
|
+
"message",
|
|
322
|
+
"messageId",
|
|
323
|
+
"showMessageIcon",
|
|
324
|
+
"messageIcon",
|
|
325
|
+
"hasFooter",
|
|
326
|
+
"hasPrefix"
|
|
327
|
+
]
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
kind: "component",
|
|
331
|
+
type: UiIcon,
|
|
332
|
+
selector: "ui-icon",
|
|
333
|
+
inputs: [
|
|
334
|
+
"name",
|
|
335
|
+
"size",
|
|
336
|
+
"type",
|
|
337
|
+
"family",
|
|
338
|
+
"decorative",
|
|
339
|
+
"ariaLabel"
|
|
340
|
+
]
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
kind: "directive",
|
|
344
|
+
type: UiBrowserFill,
|
|
345
|
+
selector: "[uiBrowserFill]",
|
|
346
|
+
outputs: ["browserFill"]
|
|
347
|
+
}
|
|
348
|
+
]
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
};
|
|
352
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
353
|
+
minVersion: "12.0.0",
|
|
354
|
+
version: "22.3.0",
|
|
355
|
+
ngImport: i0,
|
|
356
|
+
type: UiInputNumber,
|
|
357
|
+
decorators: [{
|
|
358
|
+
type: Component,
|
|
359
|
+
args: [{
|
|
360
|
+
selector: "ui-input-number",
|
|
361
|
+
imports: [
|
|
362
|
+
UiField,
|
|
363
|
+
UiIcon,
|
|
364
|
+
UiBrowserFill
|
|
365
|
+
],
|
|
366
|
+
providers: [{
|
|
367
|
+
provide: NG_VALUE_ACCESSOR,
|
|
368
|
+
useExisting: forwardRef(() => UiInputNumber),
|
|
369
|
+
multi: true
|
|
370
|
+
}],
|
|
371
|
+
template: "<ui-field\n [label]=\"label()\"\n [for]=\"resolvedId()\"\n [required]=\"required()\"\n [size]=\"size()\"\n [level]=\"effectiveLevel()\"\n [floatLabel]=\"floatLabel()\"\n [filled]=\"isFilled()\"\n [disabled]=\"isDisabled()\"\n [readonly]=\"readonly()\"\n [message]=\"displayMessage()\"\n [messageId]=\"messageId()\"\n [showMessageIcon]=\"showMessageIcon()\"\n [messageIcon]=\"messageIcon()\"\n>\n <input\n #inputEl\n uiBrowserFill\n class=\"ui-input-number-native\"\n [class._small]=\"size() === 'small'\"\n type=\"text\"\n inputmode=\"decimal\"\n [id]=\"resolvedId()\"\n [value]=\"text()\"\n [placeholder]=\"effectivePlaceholder()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [attr.name]=\"name() || null\"\n [attr.tabindex]=\"tabindex()\"\n [attr.aria-label]=\"label() ? null : ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.aria-describedby]=\"displayMessage() ? messageId() : null\"\n [attr.aria-invalid]=\"effectiveLevel() === 'error' ? 'true' : null\"\n role=\"spinbutton\"\n [attr.aria-valuenow]=\"modelValue() ?? null\"\n [attr.aria-valuemin]=\"ariaValueMin()\"\n [attr.aria-valuemax]=\"ariaValueMax()\"\n (input)=\"onInput()\"\n (browserFill)=\"onBrowserFill()\"\n (keydown)=\"onKeydown($event)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n />\n\n @if (displayUnit(); as u) {\n <span\n uiFieldSuffix\n class=\"ui-input-number-unit\"\n [class._small]=\"unitSmall()\"\n [class._disabled]=\"isDisabled()\"\n >{{ u }}</span\n >\n }\n\n @if (showButtons()) {\n <span uiFieldSuffix class=\"ui-input-number-spinner\">\n <button\n type=\"button\"\n tabindex=\"-1\"\n [attr.aria-label]=\"incrementAriaLabel()\"\n [disabled]=\"isDisabled() || readonly() || atMax()\"\n (click)=\"stepBy(1)\"\n >\n <ui-icon name=\"angle-up\" size=\"sm\" />\n </button>\n <button\n type=\"button\"\n tabindex=\"-1\"\n [attr.aria-label]=\"decrementAriaLabel()\"\n [disabled]=\"isDisabled() || readonly() || atMin()\"\n (click)=\"stepBy(-1)\"\n >\n <ui-icon name=\"angle-down\" size=\"sm\" />\n </button>\n </span>\n }\n</ui-field>\n",
|
|
372
|
+
styles: ["@keyframes ui-browser-fill{0%{opacity:1}}.ui-browser-fill:-webkit-autofill{animation:ui-browser-fill 0s}.ui-input-number-native{flex:1 1 auto;align-self:stretch;min-width:0;margin:0;padding:0;border:none;border-radius:inherit;background:transparent;outline:none;font-family:var(--ui-form-field-font-family, var(--fontfamily-base));font-size:var(--size-typography-text-default);color:var(--ui-form-field-color, var(--form-high-content-default))}.ui-input-number-native:first-child{padding-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-input-number-native:last-child{padding-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-input-number-native{padding-block-start:calc(0px + var(--_field-inset-block-start, 0px))}.ui-input-number-native::placeholder{color:var(--ui-form-field-placeholder-color, var(--form-low-content-default));opacity:1}.ui-input-number-native:disabled{cursor:not-allowed;color:var(--ui-form-field-color-disabled, var(--form-high-content-disabled))}.ui-input-number-native._small{font-size:var(--ui-input-number-font-size-small, var(--size-typography-text-md))}.ui-input-number-unit{flex-shrink:0;color:var(--ui-form-field-affix-color, var(--form-low-content-default))}.ui-input-number-unit:first-child{margin-inline-start:var(--_field-inset-inline-start, var(--ui-form-field-padding-x, var(--units-md)))}.ui-input-number-unit:last-child{margin-inline-end:var(--_field-inset-inline-end, var(--ui-form-field-padding-x, var(--units-md)))}.ui-input-number-unit._disabled{color:var(--ui-form-field-affix-color-disabled, var(--form-high-content-disabled))}.ui-input-number-unit{font-family:var(--ui-input-number-font-family, var(--fontfamily-base));font-size:var(--ui-input-number-unit-font-size, var(--size-typography-text-default));white-space:nowrap;-webkit-user-select:none;user-select:none}.ui-input-number-unit._small{font-size:var(--ui-input-number-font-size-small, var(--size-typography-text-md))}.ui-input-number-spinner{display:flex;flex-direction:column;align-self:stretch;flex-shrink:0;width:var(--ui-input-number-spinner-width, 1.875rem);border-left:var(--ui-control-stroke-width, var(--stroke-default)) solid var(--ui-form-field-spinner-stroke, var(--form-high-stroke-default))}.ui-input-number-spinner button{display:flex;flex:1 1 50%;align-items:center;justify-content:center;min-height:0;padding:0;border:none;background:none;line-height:0;color:var(--ui-form-field-spinner-color, var(--form-low-content-default));cursor:pointer;transition: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))),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-input-number-spinner button:hover:not(:disabled){color:var(--ui-form-field-spinner-color-hover, var(--form-high-content-hover));background-color:var(--ui-form-field-spinner-surface-hover, var(--form-high-surface-hover))}.ui-input-number-spinner button:disabled{cursor:not-allowed;color:var(--ui-form-field-spinner-color-disabled, var(--form-high-content-disabled))}.ui-input-number-spinner button+button{border-top:var(--ui-control-stroke-width, var(--stroke-default)) solid var(--ui-form-field-spinner-stroke, var(--form-high-stroke-default))}\n"]
|
|
373
|
+
}]
|
|
374
|
+
}],
|
|
375
|
+
propDecorators: {
|
|
376
|
+
placeholder: [{
|
|
377
|
+
type: i0.Input,
|
|
378
|
+
args: [{
|
|
379
|
+
isSignal: true,
|
|
380
|
+
alias: "placeholder",
|
|
381
|
+
required: false
|
|
382
|
+
}]
|
|
383
|
+
}],
|
|
384
|
+
min: [{
|
|
385
|
+
type: i0.Input,
|
|
386
|
+
args: [{
|
|
387
|
+
isSignal: true,
|
|
388
|
+
alias: "min",
|
|
389
|
+
required: false
|
|
390
|
+
}]
|
|
391
|
+
}],
|
|
392
|
+
max: [{
|
|
393
|
+
type: i0.Input,
|
|
394
|
+
args: [{
|
|
395
|
+
isSignal: true,
|
|
396
|
+
alias: "max",
|
|
397
|
+
required: false
|
|
398
|
+
}]
|
|
399
|
+
}],
|
|
400
|
+
step: [{
|
|
401
|
+
type: i0.Input,
|
|
402
|
+
args: [{
|
|
403
|
+
isSignal: true,
|
|
404
|
+
alias: "step",
|
|
405
|
+
required: false
|
|
406
|
+
}]
|
|
407
|
+
}],
|
|
408
|
+
allowDecimals: [{
|
|
409
|
+
type: i0.Input,
|
|
410
|
+
args: [{
|
|
411
|
+
isSignal: true,
|
|
412
|
+
alias: "allowDecimals",
|
|
413
|
+
required: false
|
|
414
|
+
}]
|
|
415
|
+
}],
|
|
416
|
+
unit: [{
|
|
417
|
+
type: i0.Input,
|
|
418
|
+
args: [{
|
|
419
|
+
isSignal: true,
|
|
420
|
+
alias: "unit",
|
|
421
|
+
required: false
|
|
422
|
+
}]
|
|
423
|
+
}],
|
|
424
|
+
showButtons: [{
|
|
425
|
+
type: i0.Input,
|
|
426
|
+
args: [{
|
|
427
|
+
isSignal: true,
|
|
428
|
+
alias: "showButtons",
|
|
429
|
+
required: false
|
|
430
|
+
}]
|
|
431
|
+
}],
|
|
432
|
+
incrementAriaLabel: [{
|
|
433
|
+
type: i0.Input,
|
|
434
|
+
args: [{
|
|
435
|
+
isSignal: true,
|
|
436
|
+
alias: "incrementAriaLabel",
|
|
437
|
+
required: false
|
|
438
|
+
}]
|
|
439
|
+
}],
|
|
440
|
+
decrementAriaLabel: [{
|
|
441
|
+
type: i0.Input,
|
|
442
|
+
args: [{
|
|
443
|
+
isSignal: true,
|
|
444
|
+
alias: "decrementAriaLabel",
|
|
445
|
+
required: false
|
|
446
|
+
}]
|
|
447
|
+
}],
|
|
448
|
+
locale: [{
|
|
449
|
+
type: i0.Input,
|
|
450
|
+
args: [{
|
|
451
|
+
isSignal: true,
|
|
452
|
+
alias: "locale",
|
|
453
|
+
required: false
|
|
454
|
+
}]
|
|
455
|
+
}],
|
|
456
|
+
currency: [{
|
|
457
|
+
type: i0.Input,
|
|
458
|
+
args: [{
|
|
459
|
+
isSignal: true,
|
|
460
|
+
alias: "currency",
|
|
461
|
+
required: false
|
|
462
|
+
}]
|
|
463
|
+
}],
|
|
464
|
+
useGrouping: [{
|
|
465
|
+
type: i0.Input,
|
|
466
|
+
args: [{
|
|
467
|
+
isSignal: true,
|
|
468
|
+
alias: "useGrouping",
|
|
469
|
+
required: false
|
|
470
|
+
}]
|
|
471
|
+
}],
|
|
472
|
+
minFractionDigits: [{
|
|
473
|
+
type: i0.Input,
|
|
474
|
+
args: [{
|
|
475
|
+
isSignal: true,
|
|
476
|
+
alias: "minFractionDigits",
|
|
477
|
+
required: false
|
|
478
|
+
}]
|
|
479
|
+
}],
|
|
480
|
+
maxFractionDigits: [{
|
|
481
|
+
type: i0.Input,
|
|
482
|
+
args: [{
|
|
483
|
+
isSignal: true,
|
|
484
|
+
alias: "maxFractionDigits",
|
|
485
|
+
required: false
|
|
486
|
+
}]
|
|
487
|
+
}],
|
|
488
|
+
valueChange: [{
|
|
489
|
+
type: i0.Output,
|
|
490
|
+
args: ["valueChange"]
|
|
491
|
+
}],
|
|
492
|
+
inputFocus: [{
|
|
493
|
+
type: i0.Output,
|
|
494
|
+
args: ["inputFocus"]
|
|
495
|
+
}],
|
|
496
|
+
inputBlur: [{
|
|
497
|
+
type: i0.Output,
|
|
498
|
+
args: ["inputBlur"]
|
|
499
|
+
}],
|
|
500
|
+
inputEl: [{
|
|
501
|
+
type: i0.ViewChild,
|
|
502
|
+
args: ["inputEl", { isSignal: true }]
|
|
503
|
+
}]
|
|
504
|
+
}
|
|
505
|
+
});
|
|
257
506
|
export { UiInputNumber };
|
|
258
|
-
|
|
507
|
+
|
|
508
|
+
//# sourceMappingURL=4sh-ui-kit-forms-ui-input-number.mjs.map
|