@aeris-ui/core 22.0.0-alpha.7 → 22.0.0-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/fesm2022/aeris-ui-core-accordion.mjs +646 -255
- package/fesm2022/aeris-ui-core-accordion.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-animate-on-scroll.mjs +284 -103
- package/fesm2022/aeris-ui-core-animate-on-scroll.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-auto-complete.mjs +1171 -428
- package/fesm2022/aeris-ui-core-auto-complete.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-auto-focus.mjs +111 -61
- package/fesm2022/aeris-ui-core-auto-focus.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-avatar.mjs +383 -101
- package/fesm2022/aeris-ui-core-avatar.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-badge.mjs +562 -115
- package/fesm2022/aeris-ui-core-badge.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-block-ui.mjs +205 -101
- package/fesm2022/aeris-ui-core-block-ui.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-breadcrumb.mjs +547 -177
- package/fesm2022/aeris-ui-core-breadcrumb.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-button-group.mjs +153 -38
- package/fesm2022/aeris-ui-core-button-group.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-button.mjs +730 -110
- package/fesm2022/aeris-ui-core-button.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-card.mjs +371 -101
- package/fesm2022/aeris-ui-core-card.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-carousel.mjs +690 -353
- package/fesm2022/aeris-ui-core-carousel.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-cascade-select.mjs +915 -423
- package/fesm2022/aeris-ui-core-cascade-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-chart.mjs +455 -258
- package/fesm2022/aeris-ui-core-chart.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-checkbox.mjs +432 -135
- package/fesm2022/aeris-ui-core-checkbox.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-chip.mjs +430 -117
- package/fesm2022/aeris-ui-core-chip.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-class-names.mjs +87 -65
- package/fesm2022/aeris-ui-core-class-names.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-color-picker.mjs +1313 -683
- package/fesm2022/aeris-ui-core-color-picker.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-compare.mjs +819 -310
- package/fesm2022/aeris-ui-core-compare.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-confirm-dialog.mjs +1392 -551
- package/fesm2022/aeris-ui-core-confirm-dialog.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-confirm-popup.mjs +1447 -744
- package/fesm2022/aeris-ui-core-confirm-popup.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-context-menu.mjs +900 -450
- package/fesm2022/aeris-ui-core-context-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-date-picker.mjs +1656 -863
- package/fesm2022/aeris-ui-core-date-picker.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-dialog.mjs +1066 -355
- package/fesm2022/aeris-ui-core-dialog.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-divider.mjs +204 -43
- package/fesm2022/aeris-ui-core-divider.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-drawer.mjs +1002 -326
- package/fesm2022/aeris-ui-core-drawer.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-dynamic-dialog.mjs +402 -249
- package/fesm2022/aeris-ui-core-dynamic-dialog.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-editor.mjs +934 -572
- package/fesm2022/aeris-ui-core-editor.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-file-upload.mjs +1339 -514
- package/fesm2022/aeris-ui-core-file-upload.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-filter-service.mjs +258 -301
- package/fesm2022/aeris-ui-core-filter-service.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-fluid.mjs +68 -21
- package/fesm2022/aeris-ui-core-fluid.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-focus-trap.mjs +206 -182
- package/fesm2022/aeris-ui-core-focus-trap.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-form-field.mjs +672 -170
- package/fesm2022/aeris-ui-core-form-field.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-galleria.mjs +1987 -797
- package/fesm2022/aeris-ui-core-galleria.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-glass.mjs +110 -33
- package/fesm2022/aeris-ui-core-glass.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-icon-field.mjs +426 -103
- package/fesm2022/aeris-ui-core-icon-field.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-inplace.mjs +452 -130
- package/fesm2022/aeris-ui-core-inplace.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-group.mjs +413 -112
- package/fesm2022/aeris-ui-core-input-group.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-mask.mjs +650 -248
- package/fesm2022/aeris-ui-core-input-mask.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-number.mjs +902 -334
- package/fesm2022/aeris-ui-core-input-number.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-otp.mjs +667 -253
- package/fesm2022/aeris-ui-core-input-otp.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-text.mjs +618 -152
- package/fesm2022/aeris-ui-core-input-text.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-key-filter.mjs +263 -201
- package/fesm2022/aeris-ui-core-key-filter.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-mega-menu.mjs +601 -388
- package/fesm2022/aeris-ui-core-mega-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-menu.mjs +1032 -495
- package/fesm2022/aeris-ui-core-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-menubar.mjs +960 -491
- package/fesm2022/aeris-ui-core-menubar.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-message.mjs +477 -145
- package/fesm2022/aeris-ui-core-message.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-meter-group.mjs +587 -196
- package/fesm2022/aeris-ui-core-meter-group.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-multi-select.mjs +1550 -552
- package/fesm2022/aeris-ui-core-multi-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-order-list.mjs +518 -202
- package/fesm2022/aeris-ui-core-order-list.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-organization-chart.mjs +455 -177
- package/fesm2022/aeris-ui-core-organization-chart.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-paginator.mjs +329 -127
- package/fesm2022/aeris-ui-core-paginator.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-panel.mjs +596 -196
- package/fesm2022/aeris-ui-core-panel.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-password.mjs +894 -247
- package/fesm2022/aeris-ui-core-password.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-pick-list.mjs +1280 -659
- package/fesm2022/aeris-ui-core-pick-list.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-popover.mjs +892 -386
- package/fesm2022/aeris-ui-core-popover.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-progress-bar.mjs +549 -176
- package/fesm2022/aeris-ui-core-progress-bar.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-progress-spinner.mjs +410 -133
- package/fesm2022/aeris-ui-core-progress-spinner.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-radio-button.mjs +386 -119
- package/fesm2022/aeris-ui-core-radio-button.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-rating.mjs +502 -225
- package/fesm2022/aeris-ui-core-rating.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-scroll-panel.mjs +457 -154
- package/fesm2022/aeris-ui-core-scroll-panel.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-scroll-top.mjs +204 -63
- package/fesm2022/aeris-ui-core-scroll-top.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-select.mjs +1794 -643
- package/fesm2022/aeris-ui-core-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-skeleton.mjs +149 -45
- package/fesm2022/aeris-ui-core-skeleton.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-slider.mjs +868 -404
- package/fesm2022/aeris-ui-core-slider.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-speed-dial.mjs +800 -329
- package/fesm2022/aeris-ui-core-speed-dial.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-split-button.mjs +918 -257
- package/fesm2022/aeris-ui-core-split-button.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-splitter.mjs +812 -352
- package/fesm2022/aeris-ui-core-splitter.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-stepper.mjs +697 -254
- package/fesm2022/aeris-ui-core-stepper.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-style-class.mjs +587 -342
- package/fesm2022/aeris-ui-core-style-class.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-table.mjs +1984 -865
- package/fesm2022/aeris-ui-core-table.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tabs.mjs +686 -324
- package/fesm2022/aeris-ui-core-tabs.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-textarea.mjs +846 -212
- package/fesm2022/aeris-ui-core-textarea.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-theme-builder.mjs +1258 -1413
- package/fesm2022/aeris-ui-core-theme-builder.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-theming.mjs +132 -147
- package/fesm2022/aeris-ui-core-theming.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tiered-menu.mjs +885 -465
- package/fesm2022/aeris-ui-core-tiered-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-timeline.mjs +407 -131
- package/fesm2022/aeris-ui-core-timeline.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-toast.mjs +855 -615
- package/fesm2022/aeris-ui-core-toast.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-toggle-switch.mjs +390 -127
- package/fesm2022/aeris-ui-core-toggle-switch.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-toolbar.mjs +458 -121
- package/fesm2022/aeris-ui-core-toolbar.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tooltip.mjs +623 -345
- package/fesm2022/aeris-ui-core-tooltip.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tree-select.mjs +1356 -601
- package/fesm2022/aeris-ui-core-tree-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tree-table.mjs +2001 -942
- package/fesm2022/aeris-ui-core-tree-table.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tree.mjs +1103 -658
- package/fesm2022/aeris-ui-core-tree.mjs.map +1 -1
- package/fesm2022/aeris-ui-core.mjs +861 -842
- package/fesm2022/aeris-ui-core.mjs.map +1 -1
- package/package.json +1 -1
- package/schematics/runtime/theme-builder/aeris-theme.js +28 -16
- package/schematics/runtime/theme-builder/aeris-theme.js.map +1 -1
- package/styles/_fallback-colors.scss +3 -3
- package/styles/_tokens.scss +5 -5
- package/styles/aeris.css +12 -16
- package/styles/controls.css +1 -1
- package/types/aeris-ui-core-accordion.d.ts +166 -93
- package/types/aeris-ui-core-animate-on-scroll.d.ts +71 -31
- package/types/aeris-ui-core-auto-complete.d.ts +326 -149
- package/types/aeris-ui-core-auto-focus.d.ts +24 -16
- package/types/aeris-ui-core-avatar.d.ts +112 -42
- package/types/aeris-ui-core-badge.d.ts +160 -47
- package/types/aeris-ui-core-block-ui.d.ts +47 -27
- package/types/aeris-ui-core-breadcrumb.d.ts +162 -92
- package/types/aeris-ui-core-button-group.d.ts +37 -16
- package/types/aeris-ui-core-button.d.ts +226 -64
- package/types/aeris-ui-core-card.d.ts +74 -37
- package/types/aeris-ui-core-carousel.d.ts +197 -117
- package/types/aeris-ui-core-cascade-select.d.ts +252 -131
- package/types/aeris-ui-core-chart.d.ts +134 -84
- package/types/aeris-ui-core-checkbox.d.ts +139 -55
- package/types/aeris-ui-core-chip.d.ts +116 -51
- package/types/aeris-ui-core-class-names.d.ts +22 -20
- package/types/aeris-ui-core-color-picker.d.ts +347 -150
- package/types/aeris-ui-core-compare.d.ts +224 -101
- package/types/aeris-ui-core-confirm-dialog.d.ts +441 -249
- package/types/aeris-ui-core-confirm-popup.d.ts +440 -268
- package/types/aeris-ui-core-context-menu.d.ts +262 -150
- package/types/aeris-ui-core-date-picker.d.ts +488 -226
- package/types/aeris-ui-core-dialog.d.ts +288 -121
- package/types/aeris-ui-core-divider.d.ts +58 -20
- package/types/aeris-ui-core-drawer.d.ts +273 -116
- package/types/aeris-ui-core-dynamic-dialog.d.ts +157 -140
- package/types/aeris-ui-core-editor.d.ts +243 -124
- package/types/aeris-ui-core-file-upload.d.ts +366 -197
- package/types/aeris-ui-core-filter-service.d.ts +48 -52
- package/types/aeris-ui-core-fluid.d.ts +12 -9
- package/types/aeris-ui-core-focus-trap.d.ts +39 -31
- package/types/aeris-ui-core-form-field.d.ts +158 -62
- package/types/aeris-ui-core-galleria.d.ts +589 -256
- package/types/aeris-ui-core-glass.d.ts +24 -11
- package/types/aeris-ui-core-icon-field.d.ts +94 -34
- package/types/aeris-ui-core-inplace.d.ts +123 -62
- package/types/aeris-ui-core-input-group.d.ts +84 -35
- package/types/aeris-ui-core-input-mask.d.ts +194 -71
- package/types/aeris-ui-core-input-number.d.ts +272 -90
- package/types/aeris-ui-core-input-otp.d.ts +190 -82
- package/types/aeris-ui-core-input-text.d.ts +185 -62
- package/types/aeris-ui-core-key-filter.d.ts +53 -39
- package/types/aeris-ui-core-mega-menu.d.ts +174 -123
- package/types/aeris-ui-core-menu.d.ts +275 -172
- package/types/aeris-ui-core-menubar.d.ts +272 -160
- package/types/aeris-ui-core-message.d.ts +132 -61
- package/types/aeris-ui-core-meter-group.d.ts +162 -90
- package/types/aeris-ui-core-multi-select.d.ts +435 -187
- package/types/aeris-ui-core-order-list.d.ts +143 -66
- package/types/aeris-ui-core-organization-chart.d.ts +132 -77
- package/types/aeris-ui-core-paginator.d.ts +92 -46
- package/types/aeris-ui-core-panel.d.ts +149 -78
- package/types/aeris-ui-core-password.d.ts +257 -108
- package/types/aeris-ui-core-pick-list.d.ts +373 -179
- package/types/aeris-ui-core-popover.d.ts +218 -107
- package/types/aeris-ui-core-progress-bar.d.ts +156 -73
- package/types/aeris-ui-core-progress-spinner.d.ts +110 -48
- package/types/aeris-ui-core-radio-button.d.ts +124 -51
- package/types/aeris-ui-core-rating.d.ts +149 -76
- package/types/aeris-ui-core-scroll-panel.d.ts +142 -64
- package/types/aeris-ui-core-scroll-top.d.ts +64 -29
- package/types/aeris-ui-core-select.d.ts +474 -226
- package/types/aeris-ui-core-skeleton.d.ts +39 -17
- package/types/aeris-ui-core-slider.d.ts +270 -116
- package/types/aeris-ui-core-speed-dial.d.ts +240 -112
- package/types/aeris-ui-core-split-button.d.ts +265 -115
- package/types/aeris-ui-core-splitter.d.ts +224 -106
- package/types/aeris-ui-core-stepper.d.ts +183 -91
- package/types/aeris-ui-core-style-class.d.ts +141 -71
- package/types/aeris-ui-core-table.d.ts +595 -308
- package/types/aeris-ui-core-tabs.d.ts +163 -90
- package/types/aeris-ui-core-textarea.d.ts +261 -81
- package/types/aeris-ui-core-theme-builder.d.ts +466 -451
- package/types/aeris-ui-core-theming.d.ts +42 -49
- package/types/aeris-ui-core-tiered-menu.d.ts +249 -147
- package/types/aeris-ui-core-timeline.d.ts +108 -71
- package/types/aeris-ui-core-toast.d.ts +219 -155
- package/types/aeris-ui-core-toggle-switch.d.ts +125 -52
- package/types/aeris-ui-core-toolbar.d.ts +98 -41
- package/types/aeris-ui-core-tooltip.d.ts +157 -92
- package/types/aeris-ui-core-tree-select.d.ts +359 -179
- package/types/aeris-ui-core-tree-table.d.ts +565 -290
- package/types/aeris-ui-core-tree.d.ts +269 -165
- package/types/aeris-ui-core.d.ts +161 -125
|
@@ -1,150 +1,336 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import { NG_VALUE_ACCESSOR } from
|
|
4
|
-
import { ɵaerisDisplayInvalid
|
|
5
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Component, booleanAttribute, computed, forwardRef, input, model, output, signal, viewChild } from "@angular/core";
|
|
3
|
+
import { NG_VALUE_ACCESSOR } from "@angular/forms";
|
|
4
|
+
import { ɵaerisDisplayInvalid } from "@aeris-ui/core";
|
|
6
5
|
let inputMaskId = 0;
|
|
7
|
-
class AerisInputMask {
|
|
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
|
-
|
|
6
|
+
var AerisInputMask = class AerisInputMask {
|
|
7
|
+
inputElement = viewChild("maskInput", ...ngDevMode ? [{ debugName: "inputElement" }] : /* istanbul ignore next */ []);
|
|
8
|
+
generatedId = `aeris-input-mask-${++inputMaskId}`;
|
|
9
|
+
formDisabled = signal(false, ...ngDevMode ? [{ debugName: "formDisabled" }] : /* istanbul ignore next */ []);
|
|
10
|
+
onChange = () => void 0;
|
|
11
|
+
onTouched = () => void 0;
|
|
12
|
+
value = model("", ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
13
|
+
mask = input.required(...ngDevMode ? [{ debugName: "mask" }] : /* istanbul ignore next */ []);
|
|
14
|
+
inputId = input("", ...ngDevMode ? [{ debugName: "inputId" }] : /* istanbul ignore next */ []);
|
|
15
|
+
name = input("", ...ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []);
|
|
16
|
+
placeholder = input("", ...ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []);
|
|
17
|
+
autocomplete = input("off", ...ngDevMode ? [{ debugName: "autocomplete" }] : /* istanbul ignore next */ []);
|
|
18
|
+
inputMode = input("text", ...ngDevMode ? [{ debugName: "inputMode" }] : /* istanbul ignore next */ []);
|
|
19
|
+
ariaLabel = input(...ngDevMode ? [void 0, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
20
|
+
ariaLabelledBy = input(...ngDevMode ? [void 0, { debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []);
|
|
21
|
+
ariaDescribedBy = input(...ngDevMode ? [void 0, { debugName: "ariaDescribedBy" }] : /* istanbul ignore next */ []);
|
|
22
|
+
slotChar = input("_", ...ngDevMode ? [{ debugName: "slotChar" }] : /* istanbul ignore next */ []);
|
|
23
|
+
showMask = input(false, {
|
|
24
|
+
...ngDevMode ? { debugName: "showMask" } : /* istanbul ignore next */ {},
|
|
25
|
+
transform: booleanAttribute
|
|
26
|
+
});
|
|
27
|
+
unmask = input(false, {
|
|
28
|
+
...ngDevMode ? { debugName: "unmask" } : /* istanbul ignore next */ {},
|
|
29
|
+
transform: booleanAttribute
|
|
30
|
+
});
|
|
31
|
+
autoClear = input(false, {
|
|
32
|
+
...ngDevMode ? { debugName: "autoClear" } : /* istanbul ignore next */ {},
|
|
33
|
+
transform: booleanAttribute
|
|
34
|
+
});
|
|
35
|
+
clearable = input(false, {
|
|
36
|
+
...ngDevMode ? { debugName: "clearable" } : /* istanbul ignore next */ {},
|
|
37
|
+
transform: booleanAttribute
|
|
38
|
+
});
|
|
39
|
+
clearButtonAriaLabel = input("Clear value", ...ngDevMode ? [{ debugName: "clearButtonAriaLabel" }] : /* istanbul ignore next */ []);
|
|
40
|
+
size = input("md", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
|
|
41
|
+
appearance = input("outline", ...ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []);
|
|
42
|
+
disabled = input(false, {
|
|
43
|
+
...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
|
|
44
|
+
transform: booleanAttribute
|
|
45
|
+
});
|
|
46
|
+
readonly = input(false, {
|
|
47
|
+
...ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {},
|
|
48
|
+
transform: booleanAttribute
|
|
49
|
+
});
|
|
50
|
+
required = input(false, {
|
|
51
|
+
...ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {},
|
|
52
|
+
transform: booleanAttribute
|
|
53
|
+
});
|
|
54
|
+
invalid = input(false, {
|
|
55
|
+
...ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {},
|
|
56
|
+
transform: booleanAttribute
|
|
57
|
+
});
|
|
58
|
+
touched = input(null, ...ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []);
|
|
59
|
+
displayInvalid = computed(() => ɵaerisDisplayInvalid(this.invalid(), this.touched()), ...ngDevMode ? [{ debugName: "displayInvalid" }] : /* istanbul ignore next */ []);
|
|
60
|
+
fluid = input(false, {
|
|
61
|
+
...ngDevMode ? { debugName: "fluid" } : /* istanbul ignore next */ {},
|
|
62
|
+
transform: booleanAttribute
|
|
63
|
+
});
|
|
64
|
+
completed = output();
|
|
65
|
+
focused = output();
|
|
66
|
+
blurred = output();
|
|
67
|
+
touch = output();
|
|
68
|
+
resolvedInputId = computed(() => this.inputId() || this.generatedId, ...ngDevMode ? [{ debugName: "resolvedInputId" }] : /* istanbul ignore next */ []);
|
|
69
|
+
effectiveDisabled = computed(() => this.disabled() || this.formDisabled(), ...ngDevMode ? [{ debugName: "effectiveDisabled" }] : /* istanbul ignore next */ []);
|
|
70
|
+
tokens = computed(() => parseMask(this.mask()), ...ngDevMode ? [{ debugName: "tokens" }] : /* istanbul ignore next */ []);
|
|
71
|
+
slotCount = computed(() => this.tokens().filter((token) => token.kind === "slot").length, ...ngDevMode ? [{ debugName: "slotCount" }] : /* istanbul ignore next */ []);
|
|
72
|
+
rawValue = computed(() => this.unmask() ? normalizeRaw(this.value(), this.tokens()) : extractRaw(this.value(), this.tokens()), ...ngDevMode ? [{ debugName: "rawValue" }] : /* istanbul ignore next */ []);
|
|
73
|
+
formattedValue = computed(() => formatRaw(this.rawValue(), this.tokens(), "", false), ...ngDevMode ? [{ debugName: "formattedValue" }] : /* istanbul ignore next */ []);
|
|
74
|
+
displayValue = computed(() => formatRaw(this.rawValue(), this.tokens(), this.slotChar(), this.showMask()), ...ngDevMode ? [{ debugName: "displayValue" }] : /* istanbul ignore next */ []);
|
|
75
|
+
effectivePlaceholder = computed(() => {
|
|
76
|
+
if (this.placeholder()) return this.placeholder();
|
|
77
|
+
return this.showMask() ? "" : maskPlaceholder(this.tokens(), this.slotChar());
|
|
78
|
+
}, ...ngDevMode ? [{ debugName: "effectivePlaceholder" }] : /* istanbul ignore next */ []);
|
|
79
|
+
complete = computed(() => this.rawValue().length === this.slotCount(), ...ngDevMode ? [{ debugName: "complete" }] : /* istanbul ignore next */ []);
|
|
80
|
+
showClearButton = computed(() => this.clearable() && this.rawValue().length > 0 && !this.effectiveDisabled() && !this.readonly(), ...ngDevMode ? [{ debugName: "showClearButton" }] : /* istanbul ignore next */ []);
|
|
81
|
+
writeValue(value) {
|
|
82
|
+
this.value.set(typeof value === "string" ? value : value == null ? "" : String(value));
|
|
83
|
+
}
|
|
84
|
+
registerOnChange(callback) {
|
|
85
|
+
this.onChange = callback;
|
|
86
|
+
}
|
|
87
|
+
registerOnTouched(callback) {
|
|
88
|
+
this.onTouched = callback;
|
|
89
|
+
}
|
|
90
|
+
setDisabledState(disabled) {
|
|
91
|
+
this.formDisabled.set(disabled);
|
|
92
|
+
}
|
|
93
|
+
focus(options) {
|
|
94
|
+
this.inputElement()?.nativeElement.focus(options);
|
|
95
|
+
}
|
|
96
|
+
reset() {
|
|
97
|
+
this.setValue("");
|
|
98
|
+
}
|
|
99
|
+
clear() {
|
|
100
|
+
if (this.effectiveDisabled() || this.readonly()) return;
|
|
101
|
+
this.setValue("");
|
|
102
|
+
this.focus();
|
|
103
|
+
}
|
|
104
|
+
handleInput(event) {
|
|
105
|
+
const inputElement = event.target;
|
|
106
|
+
const raw = extractRaw(inputElement.value, this.tokens());
|
|
107
|
+
this.commitRaw(raw);
|
|
108
|
+
inputElement.value = formatRaw(raw, this.tokens(), this.slotChar(), this.showMask());
|
|
109
|
+
queueMicrotask(() => inputElement.setSelectionRange(inputElement.value.length, inputElement.value.length));
|
|
110
|
+
}
|
|
111
|
+
handleBlur(event) {
|
|
112
|
+
if (this.autoClear() && !this.complete()) this.setValue("");
|
|
113
|
+
this.touch.emit();
|
|
114
|
+
this.onTouched();
|
|
115
|
+
this.blurred.emit(event);
|
|
116
|
+
}
|
|
117
|
+
commitRaw(raw) {
|
|
118
|
+
const nextValue = this.unmask() ? raw : formatRaw(raw, this.tokens(), "", false);
|
|
119
|
+
const wasComplete = this.complete();
|
|
120
|
+
this.setValue(nextValue);
|
|
121
|
+
if (!wasComplete && raw.length === this.slotCount()) this.completed.emit(nextValue);
|
|
122
|
+
}
|
|
123
|
+
setValue(value) {
|
|
124
|
+
if (this.value() === value) return;
|
|
125
|
+
this.value.set(value);
|
|
126
|
+
this.onChange(value);
|
|
127
|
+
}
|
|
128
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
129
|
+
minVersion: "12.0.0",
|
|
130
|
+
version: "22.2.1",
|
|
131
|
+
ngImport: i0,
|
|
132
|
+
type: AerisInputMask,
|
|
133
|
+
deps: [],
|
|
134
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
135
|
+
});
|
|
136
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
137
|
+
minVersion: "17.0.0",
|
|
138
|
+
version: "22.2.1",
|
|
139
|
+
type: AerisInputMask,
|
|
140
|
+
isStandalone: true,
|
|
141
|
+
selector: "aeris-input-mask",
|
|
142
|
+
inputs: {
|
|
143
|
+
value: {
|
|
144
|
+
classPropertyName: "value",
|
|
145
|
+
publicName: "value",
|
|
146
|
+
isSignal: true,
|
|
147
|
+
isRequired: false,
|
|
148
|
+
transformFunction: null
|
|
149
|
+
},
|
|
150
|
+
mask: {
|
|
151
|
+
classPropertyName: "mask",
|
|
152
|
+
publicName: "mask",
|
|
153
|
+
isSignal: true,
|
|
154
|
+
isRequired: true,
|
|
155
|
+
transformFunction: null
|
|
156
|
+
},
|
|
157
|
+
inputId: {
|
|
158
|
+
classPropertyName: "inputId",
|
|
159
|
+
publicName: "inputId",
|
|
160
|
+
isSignal: true,
|
|
161
|
+
isRequired: false,
|
|
162
|
+
transformFunction: null
|
|
163
|
+
},
|
|
164
|
+
name: {
|
|
165
|
+
classPropertyName: "name",
|
|
166
|
+
publicName: "name",
|
|
167
|
+
isSignal: true,
|
|
168
|
+
isRequired: false,
|
|
169
|
+
transformFunction: null
|
|
170
|
+
},
|
|
171
|
+
placeholder: {
|
|
172
|
+
classPropertyName: "placeholder",
|
|
173
|
+
publicName: "placeholder",
|
|
174
|
+
isSignal: true,
|
|
175
|
+
isRequired: false,
|
|
176
|
+
transformFunction: null
|
|
177
|
+
},
|
|
178
|
+
autocomplete: {
|
|
179
|
+
classPropertyName: "autocomplete",
|
|
180
|
+
publicName: "autocomplete",
|
|
181
|
+
isSignal: true,
|
|
182
|
+
isRequired: false,
|
|
183
|
+
transformFunction: null
|
|
184
|
+
},
|
|
185
|
+
inputMode: {
|
|
186
|
+
classPropertyName: "inputMode",
|
|
187
|
+
publicName: "inputMode",
|
|
188
|
+
isSignal: true,
|
|
189
|
+
isRequired: false,
|
|
190
|
+
transformFunction: null
|
|
191
|
+
},
|
|
192
|
+
ariaLabel: {
|
|
193
|
+
classPropertyName: "ariaLabel",
|
|
194
|
+
publicName: "ariaLabel",
|
|
195
|
+
isSignal: true,
|
|
196
|
+
isRequired: false,
|
|
197
|
+
transformFunction: null
|
|
198
|
+
},
|
|
199
|
+
ariaLabelledBy: {
|
|
200
|
+
classPropertyName: "ariaLabelledBy",
|
|
201
|
+
publicName: "ariaLabelledBy",
|
|
202
|
+
isSignal: true,
|
|
203
|
+
isRequired: false,
|
|
204
|
+
transformFunction: null
|
|
205
|
+
},
|
|
206
|
+
ariaDescribedBy: {
|
|
207
|
+
classPropertyName: "ariaDescribedBy",
|
|
208
|
+
publicName: "ariaDescribedBy",
|
|
209
|
+
isSignal: true,
|
|
210
|
+
isRequired: false,
|
|
211
|
+
transformFunction: null
|
|
212
|
+
},
|
|
213
|
+
slotChar: {
|
|
214
|
+
classPropertyName: "slotChar",
|
|
215
|
+
publicName: "slotChar",
|
|
216
|
+
isSignal: true,
|
|
217
|
+
isRequired: false,
|
|
218
|
+
transformFunction: null
|
|
219
|
+
},
|
|
220
|
+
showMask: {
|
|
221
|
+
classPropertyName: "showMask",
|
|
222
|
+
publicName: "showMask",
|
|
223
|
+
isSignal: true,
|
|
224
|
+
isRequired: false,
|
|
225
|
+
transformFunction: null
|
|
226
|
+
},
|
|
227
|
+
unmask: {
|
|
228
|
+
classPropertyName: "unmask",
|
|
229
|
+
publicName: "unmask",
|
|
230
|
+
isSignal: true,
|
|
231
|
+
isRequired: false,
|
|
232
|
+
transformFunction: null
|
|
233
|
+
},
|
|
234
|
+
autoClear: {
|
|
235
|
+
classPropertyName: "autoClear",
|
|
236
|
+
publicName: "autoClear",
|
|
237
|
+
isSignal: true,
|
|
238
|
+
isRequired: false,
|
|
239
|
+
transformFunction: null
|
|
240
|
+
},
|
|
241
|
+
clearable: {
|
|
242
|
+
classPropertyName: "clearable",
|
|
243
|
+
publicName: "clearable",
|
|
244
|
+
isSignal: true,
|
|
245
|
+
isRequired: false,
|
|
246
|
+
transformFunction: null
|
|
247
|
+
},
|
|
248
|
+
clearButtonAriaLabel: {
|
|
249
|
+
classPropertyName: "clearButtonAriaLabel",
|
|
250
|
+
publicName: "clearButtonAriaLabel",
|
|
251
|
+
isSignal: true,
|
|
252
|
+
isRequired: false,
|
|
253
|
+
transformFunction: null
|
|
254
|
+
},
|
|
255
|
+
size: {
|
|
256
|
+
classPropertyName: "size",
|
|
257
|
+
publicName: "size",
|
|
258
|
+
isSignal: true,
|
|
259
|
+
isRequired: false,
|
|
260
|
+
transformFunction: null
|
|
261
|
+
},
|
|
262
|
+
appearance: {
|
|
263
|
+
classPropertyName: "appearance",
|
|
264
|
+
publicName: "appearance",
|
|
265
|
+
isSignal: true,
|
|
266
|
+
isRequired: false,
|
|
267
|
+
transformFunction: null
|
|
268
|
+
},
|
|
269
|
+
disabled: {
|
|
270
|
+
classPropertyName: "disabled",
|
|
271
|
+
publicName: "disabled",
|
|
272
|
+
isSignal: true,
|
|
273
|
+
isRequired: false,
|
|
274
|
+
transformFunction: null
|
|
275
|
+
},
|
|
276
|
+
readonly: {
|
|
277
|
+
classPropertyName: "readonly",
|
|
278
|
+
publicName: "readonly",
|
|
279
|
+
isSignal: true,
|
|
280
|
+
isRequired: false,
|
|
281
|
+
transformFunction: null
|
|
282
|
+
},
|
|
283
|
+
required: {
|
|
284
|
+
classPropertyName: "required",
|
|
285
|
+
publicName: "required",
|
|
286
|
+
isSignal: true,
|
|
287
|
+
isRequired: false,
|
|
288
|
+
transformFunction: null
|
|
289
|
+
},
|
|
290
|
+
invalid: {
|
|
291
|
+
classPropertyName: "invalid",
|
|
292
|
+
publicName: "invalid",
|
|
293
|
+
isSignal: true,
|
|
294
|
+
isRequired: false,
|
|
295
|
+
transformFunction: null
|
|
296
|
+
},
|
|
297
|
+
touched: {
|
|
298
|
+
classPropertyName: "touched",
|
|
299
|
+
publicName: "touched",
|
|
300
|
+
isSignal: true,
|
|
301
|
+
isRequired: false,
|
|
302
|
+
transformFunction: null
|
|
303
|
+
},
|
|
304
|
+
fluid: {
|
|
305
|
+
classPropertyName: "fluid",
|
|
306
|
+
publicName: "fluid",
|
|
307
|
+
isSignal: true,
|
|
308
|
+
isRequired: false,
|
|
309
|
+
transformFunction: null
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
outputs: {
|
|
313
|
+
value: "valueChange",
|
|
314
|
+
completed: "completed",
|
|
315
|
+
focused: "focused",
|
|
316
|
+
blurred: "blurred",
|
|
317
|
+
touch: "touch"
|
|
318
|
+
},
|
|
319
|
+
host: { properties: { "attr.data-fluid": "fluid() || null" } },
|
|
320
|
+
providers: [{
|
|
321
|
+
provide: NG_VALUE_ACCESSOR,
|
|
322
|
+
useExisting: forwardRef(() => AerisInputMask),
|
|
323
|
+
multi: true
|
|
324
|
+
}],
|
|
325
|
+
viewQueries: [{
|
|
326
|
+
propertyName: "inputElement",
|
|
327
|
+
first: true,
|
|
328
|
+
predicate: ["maskInput"],
|
|
329
|
+
descendants: true,
|
|
330
|
+
isSignal: true
|
|
331
|
+
}],
|
|
332
|
+
ngImport: i0,
|
|
333
|
+
template: `
|
|
148
334
|
<span
|
|
149
335
|
class="aeris-input-mask"
|
|
150
336
|
[attr.data-size]="size()"
|
|
@@ -186,11 +372,21 @@ class AerisInputMask {
|
|
|
186
372
|
</button>
|
|
187
373
|
}
|
|
188
374
|
</span>
|
|
189
|
-
`,
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
375
|
+
`,
|
|
376
|
+
isInline: true,
|
|
377
|
+
styles: [":host{display:inline-block;max-width:100%;vertical-align:middle}:host([data-fluid]){width:100%}.aeris-input-mask{--_height: var(--aeris-control-height, 2.625rem);position:relative;display:block;max-width:100%}.aeris-input-mask__input{width:auto;max-width:100%;min-height:var(--_height);padding:0 .75rem;border:1px solid var(--aeris-border, #deddd7);border-radius:var(--aeris-radius-control, var(--aeris-radius-sm, .4375rem));outline:0;background:var(--aeris-surface, #fff);color:var(--aeris-text, #222222);font:inherit;font-size:.875rem;box-shadow:none;transition:border-color .15s,background-color .15s,box-shadow .15s}:host([data-fluid]) .aeris-input-mask__input{width:100%}.aeris-input-mask__input::placeholder{color:var(--aeris-text-2, #555555);opacity:.72}.aeris-input-mask__input:hover:not(:disabled):not(:read-only){border-color:var(--aeris-primary, #2c694b)}.aeris-input-mask__input:focus{border-color:var(--aeris-focus, #2c432c);box-shadow:0 0 0 3px color-mix(in srgb,var(--aeris-focus, #2c432c) 18%,transparent)}.aeris-input-mask[data-appearance=filled] .aeris-input-mask__input{border-color:transparent;background:var(--aeris-surface-2, #f2f0ec)}.aeris-input-mask[data-appearance=filled] .aeris-input-mask__input:focus{border-color:var(--aeris-focus, #2c432c);background:var(--aeris-surface, #fff)}.aeris-input-mask[data-invalid] .aeris-input-mask__input,.aeris-input-mask[data-invalid] .aeris-input-mask__input:hover,.aeris-input-mask__input:user-invalid,.aeris-input-mask__input:user-invalid:hover{border-color:var(--aeris-danger, #c81e2a)}.aeris-input-mask[data-invalid] .aeris-input-mask__input:focus,.aeris-input-mask__input:user-invalid:focus{box-shadow:0 0 0 3px color-mix(in srgb,var(--aeris-danger, #c81e2a) 18%,transparent)}.aeris-input-mask[data-disabled],.aeris-input-mask[data-readonly]{opacity:.54}.aeris-input-mask[data-disabled] .aeris-input-mask__input,.aeris-input-mask[data-readonly] .aeris-input-mask__input{background:var(--aeris-surface-2, #f2f0ec)}.aeris-input-mask[data-size=xs]{--_height: calc(var(--aeris-control-height, 2.625rem) - .875rem)}.aeris-input-mask[data-size=sm]{--_height: calc(var(--aeris-control-height, 2.625rem) - .5rem)}.aeris-input-mask[data-size=lg]{--_height: calc(var(--aeris-control-height, 2.625rem) + .5rem)}.aeris-input-mask[data-size=xs] .aeris-input-mask__input{padding-inline:.5625rem;font-size:.75rem}.aeris-input-mask[data-size=sm] .aeris-input-mask__input{padding-inline:.625rem;font-size:.8125rem}.aeris-input-mask[data-size=lg] .aeris-input-mask__input{padding-inline:.875rem;font-size:.9375rem}.aeris-input-mask:has(.aeris-input-mask__clear) .aeris-input-mask__input{padding-inline-end:2.625rem}.aeris-input-mask__clear{position:absolute;top:50%;right:.4375rem;width:1.5rem;height:1.5rem;display:grid;place-items:center;padding:0;border:0;border-radius:var(--aeris-radius-control, var(--aeris-radius-sm, .4375rem));background:transparent;color:var(--aeris-text-2, #555555);cursor:pointer;transform:translateY(-50%)}.aeris-input-mask__clear:hover,.aeris-input-mask__clear:focus-visible{background:var(--aeris-surface-2, #f2f0ec);color:var(--aeris-text, #222222)}.aeris-input-mask__clear:focus-visible{outline:2px solid var(--aeris-focus, #2c432c);outline-offset:1px}.aeris-input-mask__clear-mark{width:var(--aeris-icon-size, 1rem);height:var(--aeris-icon-size, 1rem);background:currentColor;-webkit-mask:var(--aeris-icon-close) center/100% 100% no-repeat;mask:var(--aeris-icon-close) center/100% 100% no-repeat}@media(prefers-reduced-motion:reduce){.aeris-input-mask__input{transition:none}}\n"]
|
|
378
|
+
});
|
|
379
|
+
};
|
|
380
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
381
|
+
minVersion: "12.0.0",
|
|
382
|
+
version: "22.2.1",
|
|
383
|
+
ngImport: i0,
|
|
384
|
+
type: AerisInputMask,
|
|
385
|
+
decorators: [{
|
|
386
|
+
type: Component,
|
|
387
|
+
args: [{
|
|
388
|
+
selector: "aeris-input-mask",
|
|
389
|
+
template: `
|
|
194
390
|
<span
|
|
195
391
|
class="aeris-input-mask"
|
|
196
392
|
[attr.data-size]="size()"
|
|
@@ -232,113 +428,319 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
|
|
|
232
428
|
</button>
|
|
233
429
|
}
|
|
234
430
|
</span>
|
|
235
|
-
`,
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
431
|
+
`,
|
|
432
|
+
providers: [{
|
|
433
|
+
provide: NG_VALUE_ACCESSOR,
|
|
434
|
+
useExisting: forwardRef(() => AerisInputMask),
|
|
435
|
+
multi: true
|
|
436
|
+
}],
|
|
437
|
+
host: { "[attr.data-fluid]": "fluid() || null" },
|
|
438
|
+
styles: [":host{display:inline-block;max-width:100%;vertical-align:middle}:host([data-fluid]){width:100%}.aeris-input-mask{--_height: var(--aeris-control-height, 2.625rem);position:relative;display:block;max-width:100%}.aeris-input-mask__input{width:auto;max-width:100%;min-height:var(--_height);padding:0 .75rem;border:1px solid var(--aeris-border, #deddd7);border-radius:var(--aeris-radius-control, var(--aeris-radius-sm, .4375rem));outline:0;background:var(--aeris-surface, #fff);color:var(--aeris-text, #222222);font:inherit;font-size:.875rem;box-shadow:none;transition:border-color .15s,background-color .15s,box-shadow .15s}:host([data-fluid]) .aeris-input-mask__input{width:100%}.aeris-input-mask__input::placeholder{color:var(--aeris-text-2, #555555);opacity:.72}.aeris-input-mask__input:hover:not(:disabled):not(:read-only){border-color:var(--aeris-primary, #2c694b)}.aeris-input-mask__input:focus{border-color:var(--aeris-focus, #2c432c);box-shadow:0 0 0 3px color-mix(in srgb,var(--aeris-focus, #2c432c) 18%,transparent)}.aeris-input-mask[data-appearance=filled] .aeris-input-mask__input{border-color:transparent;background:var(--aeris-surface-2, #f2f0ec)}.aeris-input-mask[data-appearance=filled] .aeris-input-mask__input:focus{border-color:var(--aeris-focus, #2c432c);background:var(--aeris-surface, #fff)}.aeris-input-mask[data-invalid] .aeris-input-mask__input,.aeris-input-mask[data-invalid] .aeris-input-mask__input:hover,.aeris-input-mask__input:user-invalid,.aeris-input-mask__input:user-invalid:hover{border-color:var(--aeris-danger, #c81e2a)}.aeris-input-mask[data-invalid] .aeris-input-mask__input:focus,.aeris-input-mask__input:user-invalid:focus{box-shadow:0 0 0 3px color-mix(in srgb,var(--aeris-danger, #c81e2a) 18%,transparent)}.aeris-input-mask[data-disabled],.aeris-input-mask[data-readonly]{opacity:.54}.aeris-input-mask[data-disabled] .aeris-input-mask__input,.aeris-input-mask[data-readonly] .aeris-input-mask__input{background:var(--aeris-surface-2, #f2f0ec)}.aeris-input-mask[data-size=xs]{--_height: calc(var(--aeris-control-height, 2.625rem) - .875rem)}.aeris-input-mask[data-size=sm]{--_height: calc(var(--aeris-control-height, 2.625rem) - .5rem)}.aeris-input-mask[data-size=lg]{--_height: calc(var(--aeris-control-height, 2.625rem) + .5rem)}.aeris-input-mask[data-size=xs] .aeris-input-mask__input{padding-inline:.5625rem;font-size:.75rem}.aeris-input-mask[data-size=sm] .aeris-input-mask__input{padding-inline:.625rem;font-size:.8125rem}.aeris-input-mask[data-size=lg] .aeris-input-mask__input{padding-inline:.875rem;font-size:.9375rem}.aeris-input-mask:has(.aeris-input-mask__clear) .aeris-input-mask__input{padding-inline-end:2.625rem}.aeris-input-mask__clear{position:absolute;top:50%;right:.4375rem;width:1.5rem;height:1.5rem;display:grid;place-items:center;padding:0;border:0;border-radius:var(--aeris-radius-control, var(--aeris-radius-sm, .4375rem));background:transparent;color:var(--aeris-text-2, #555555);cursor:pointer;transform:translateY(-50%)}.aeris-input-mask__clear:hover,.aeris-input-mask__clear:focus-visible{background:var(--aeris-surface-2, #f2f0ec);color:var(--aeris-text, #222222)}.aeris-input-mask__clear:focus-visible{outline:2px solid var(--aeris-focus, #2c432c);outline-offset:1px}.aeris-input-mask__clear-mark{width:var(--aeris-icon-size, 1rem);height:var(--aeris-icon-size, 1rem);background:currentColor;-webkit-mask:var(--aeris-icon-close) center/100% 100% no-repeat;mask:var(--aeris-icon-close) center/100% 100% no-repeat}@media(prefers-reduced-motion:reduce){.aeris-input-mask__input{transition:none}}\n"]
|
|
439
|
+
}]
|
|
440
|
+
}],
|
|
441
|
+
propDecorators: {
|
|
442
|
+
inputElement: [{
|
|
443
|
+
type: i0.ViewChild,
|
|
444
|
+
args: ["maskInput", { isSignal: true }]
|
|
445
|
+
}],
|
|
446
|
+
value: [{
|
|
447
|
+
type: i0.Input,
|
|
448
|
+
args: [{
|
|
449
|
+
isSignal: true,
|
|
450
|
+
alias: "value",
|
|
451
|
+
required: false
|
|
452
|
+
}]
|
|
453
|
+
}, {
|
|
454
|
+
type: i0.Output,
|
|
455
|
+
args: ["valueChange"]
|
|
456
|
+
}],
|
|
457
|
+
mask: [{
|
|
458
|
+
type: i0.Input,
|
|
459
|
+
args: [{
|
|
460
|
+
isSignal: true,
|
|
461
|
+
alias: "mask",
|
|
462
|
+
required: true
|
|
463
|
+
}]
|
|
464
|
+
}],
|
|
465
|
+
inputId: [{
|
|
466
|
+
type: i0.Input,
|
|
467
|
+
args: [{
|
|
468
|
+
isSignal: true,
|
|
469
|
+
alias: "inputId",
|
|
470
|
+
required: false
|
|
471
|
+
}]
|
|
472
|
+
}],
|
|
473
|
+
name: [{
|
|
474
|
+
type: i0.Input,
|
|
475
|
+
args: [{
|
|
476
|
+
isSignal: true,
|
|
477
|
+
alias: "name",
|
|
478
|
+
required: false
|
|
479
|
+
}]
|
|
480
|
+
}],
|
|
481
|
+
placeholder: [{
|
|
482
|
+
type: i0.Input,
|
|
483
|
+
args: [{
|
|
484
|
+
isSignal: true,
|
|
485
|
+
alias: "placeholder",
|
|
486
|
+
required: false
|
|
487
|
+
}]
|
|
488
|
+
}],
|
|
489
|
+
autocomplete: [{
|
|
490
|
+
type: i0.Input,
|
|
491
|
+
args: [{
|
|
492
|
+
isSignal: true,
|
|
493
|
+
alias: "autocomplete",
|
|
494
|
+
required: false
|
|
495
|
+
}]
|
|
496
|
+
}],
|
|
497
|
+
inputMode: [{
|
|
498
|
+
type: i0.Input,
|
|
499
|
+
args: [{
|
|
500
|
+
isSignal: true,
|
|
501
|
+
alias: "inputMode",
|
|
502
|
+
required: false
|
|
503
|
+
}]
|
|
504
|
+
}],
|
|
505
|
+
ariaLabel: [{
|
|
506
|
+
type: i0.Input,
|
|
507
|
+
args: [{
|
|
508
|
+
isSignal: true,
|
|
509
|
+
alias: "ariaLabel",
|
|
510
|
+
required: false
|
|
511
|
+
}]
|
|
512
|
+
}],
|
|
513
|
+
ariaLabelledBy: [{
|
|
514
|
+
type: i0.Input,
|
|
515
|
+
args: [{
|
|
516
|
+
isSignal: true,
|
|
517
|
+
alias: "ariaLabelledBy",
|
|
518
|
+
required: false
|
|
519
|
+
}]
|
|
520
|
+
}],
|
|
521
|
+
ariaDescribedBy: [{
|
|
522
|
+
type: i0.Input,
|
|
523
|
+
args: [{
|
|
524
|
+
isSignal: true,
|
|
525
|
+
alias: "ariaDescribedBy",
|
|
526
|
+
required: false
|
|
527
|
+
}]
|
|
528
|
+
}],
|
|
529
|
+
slotChar: [{
|
|
530
|
+
type: i0.Input,
|
|
531
|
+
args: [{
|
|
532
|
+
isSignal: true,
|
|
533
|
+
alias: "slotChar",
|
|
534
|
+
required: false
|
|
535
|
+
}]
|
|
536
|
+
}],
|
|
537
|
+
showMask: [{
|
|
538
|
+
type: i0.Input,
|
|
539
|
+
args: [{
|
|
540
|
+
isSignal: true,
|
|
541
|
+
alias: "showMask",
|
|
542
|
+
required: false
|
|
543
|
+
}]
|
|
544
|
+
}],
|
|
545
|
+
unmask: [{
|
|
546
|
+
type: i0.Input,
|
|
547
|
+
args: [{
|
|
548
|
+
isSignal: true,
|
|
549
|
+
alias: "unmask",
|
|
550
|
+
required: false
|
|
551
|
+
}]
|
|
552
|
+
}],
|
|
553
|
+
autoClear: [{
|
|
554
|
+
type: i0.Input,
|
|
555
|
+
args: [{
|
|
556
|
+
isSignal: true,
|
|
557
|
+
alias: "autoClear",
|
|
558
|
+
required: false
|
|
559
|
+
}]
|
|
560
|
+
}],
|
|
561
|
+
clearable: [{
|
|
562
|
+
type: i0.Input,
|
|
563
|
+
args: [{
|
|
564
|
+
isSignal: true,
|
|
565
|
+
alias: "clearable",
|
|
566
|
+
required: false
|
|
567
|
+
}]
|
|
568
|
+
}],
|
|
569
|
+
clearButtonAriaLabel: [{
|
|
570
|
+
type: i0.Input,
|
|
571
|
+
args: [{
|
|
572
|
+
isSignal: true,
|
|
573
|
+
alias: "clearButtonAriaLabel",
|
|
574
|
+
required: false
|
|
575
|
+
}]
|
|
576
|
+
}],
|
|
577
|
+
size: [{
|
|
578
|
+
type: i0.Input,
|
|
579
|
+
args: [{
|
|
580
|
+
isSignal: true,
|
|
581
|
+
alias: "size",
|
|
582
|
+
required: false
|
|
583
|
+
}]
|
|
584
|
+
}],
|
|
585
|
+
appearance: [{
|
|
586
|
+
type: i0.Input,
|
|
587
|
+
args: [{
|
|
588
|
+
isSignal: true,
|
|
589
|
+
alias: "appearance",
|
|
590
|
+
required: false
|
|
591
|
+
}]
|
|
592
|
+
}],
|
|
593
|
+
disabled: [{
|
|
594
|
+
type: i0.Input,
|
|
595
|
+
args: [{
|
|
596
|
+
isSignal: true,
|
|
597
|
+
alias: "disabled",
|
|
598
|
+
required: false
|
|
599
|
+
}]
|
|
600
|
+
}],
|
|
601
|
+
readonly: [{
|
|
602
|
+
type: i0.Input,
|
|
603
|
+
args: [{
|
|
604
|
+
isSignal: true,
|
|
605
|
+
alias: "readonly",
|
|
606
|
+
required: false
|
|
607
|
+
}]
|
|
608
|
+
}],
|
|
609
|
+
required: [{
|
|
610
|
+
type: i0.Input,
|
|
611
|
+
args: [{
|
|
612
|
+
isSignal: true,
|
|
613
|
+
alias: "required",
|
|
614
|
+
required: false
|
|
615
|
+
}]
|
|
616
|
+
}],
|
|
617
|
+
invalid: [{
|
|
618
|
+
type: i0.Input,
|
|
619
|
+
args: [{
|
|
620
|
+
isSignal: true,
|
|
621
|
+
alias: "invalid",
|
|
622
|
+
required: false
|
|
623
|
+
}]
|
|
624
|
+
}],
|
|
625
|
+
touched: [{
|
|
626
|
+
type: i0.Input,
|
|
627
|
+
args: [{
|
|
628
|
+
isSignal: true,
|
|
629
|
+
alias: "touched",
|
|
630
|
+
required: false
|
|
631
|
+
}]
|
|
632
|
+
}],
|
|
633
|
+
fluid: [{
|
|
634
|
+
type: i0.Input,
|
|
635
|
+
args: [{
|
|
636
|
+
isSignal: true,
|
|
637
|
+
alias: "fluid",
|
|
638
|
+
required: false
|
|
639
|
+
}]
|
|
640
|
+
}],
|
|
641
|
+
completed: [{
|
|
642
|
+
type: i0.Output,
|
|
643
|
+
args: ["completed"]
|
|
644
|
+
}],
|
|
645
|
+
focused: [{
|
|
646
|
+
type: i0.Output,
|
|
647
|
+
args: ["focused"]
|
|
648
|
+
}],
|
|
649
|
+
blurred: [{
|
|
650
|
+
type: i0.Output,
|
|
651
|
+
args: ["blurred"]
|
|
652
|
+
}],
|
|
653
|
+
touch: [{
|
|
654
|
+
type: i0.Output,
|
|
655
|
+
args: ["touch"]
|
|
656
|
+
}]
|
|
657
|
+
}
|
|
658
|
+
});
|
|
245
659
|
function parseMask(mask) {
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
660
|
+
const tokens = [];
|
|
661
|
+
let escaped = false;
|
|
662
|
+
for (const character of mask) if (escaped) {
|
|
663
|
+
tokens.push({
|
|
664
|
+
kind: "literal",
|
|
665
|
+
value: character
|
|
666
|
+
});
|
|
667
|
+
escaped = false;
|
|
668
|
+
} else if (character === "\\") escaped = true;
|
|
669
|
+
else if (character === "9" || character === "a" || character === "*") tokens.push({
|
|
670
|
+
kind: "slot",
|
|
671
|
+
symbol: character
|
|
672
|
+
});
|
|
673
|
+
else tokens.push({
|
|
674
|
+
kind: "literal",
|
|
675
|
+
value: character
|
|
676
|
+
});
|
|
677
|
+
if (escaped) tokens.push({
|
|
678
|
+
kind: "literal",
|
|
679
|
+
value: "\\"
|
|
680
|
+
});
|
|
681
|
+
return tokens;
|
|
266
682
|
}
|
|
267
683
|
function extractRaw(value, tokens) {
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
return raw;
|
|
684
|
+
const characters = Array.from(value);
|
|
685
|
+
let sourceIndex = 0;
|
|
686
|
+
let raw = "";
|
|
687
|
+
for (const token of tokens) {
|
|
688
|
+
if (token.kind === "literal") {
|
|
689
|
+
if (characters[sourceIndex] === token.value) sourceIndex += 1;
|
|
690
|
+
continue;
|
|
691
|
+
}
|
|
692
|
+
while (sourceIndex < characters.length) {
|
|
693
|
+
const character = characters[sourceIndex++];
|
|
694
|
+
if (matchesSlot(character, token.symbol)) {
|
|
695
|
+
raw += character;
|
|
696
|
+
break;
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
return raw;
|
|
286
701
|
}
|
|
287
702
|
function normalizeRaw(value, tokens) {
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
return raw;
|
|
703
|
+
let sourceIndex = 0;
|
|
704
|
+
let raw = "";
|
|
705
|
+
for (const token of tokens) {
|
|
706
|
+
if (token.kind === "literal") continue;
|
|
707
|
+
while (sourceIndex < value.length) {
|
|
708
|
+
const character = value[sourceIndex++];
|
|
709
|
+
if (matchesSlot(character, token.symbol)) {
|
|
710
|
+
raw += character;
|
|
711
|
+
break;
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
return raw;
|
|
302
716
|
}
|
|
303
717
|
function formatRaw(raw, tokens, slotChar, includeEmptySlots) {
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
}
|
|
322
|
-
else {
|
|
323
|
-
break;
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
return result;
|
|
718
|
+
let result = "";
|
|
719
|
+
let rawIndex = 0;
|
|
720
|
+
let hasValue = false;
|
|
721
|
+
for (const token of tokens) {
|
|
722
|
+
if (token.kind === "literal") {
|
|
723
|
+
if (hasValue || includeEmptySlots || rawIndex < raw.length) result += token.value;
|
|
724
|
+
continue;
|
|
725
|
+
}
|
|
726
|
+
const character = raw[rawIndex];
|
|
727
|
+
if (character && matchesSlot(character, token.symbol)) {
|
|
728
|
+
result += character;
|
|
729
|
+
rawIndex += 1;
|
|
730
|
+
hasValue = true;
|
|
731
|
+
} else if (includeEmptySlots) result += slotChar;
|
|
732
|
+
else break;
|
|
733
|
+
}
|
|
734
|
+
return result;
|
|
327
735
|
}
|
|
328
736
|
function maskPlaceholder(tokens, slotChar) {
|
|
329
|
-
|
|
737
|
+
return tokens.map((token) => token.kind === "literal" ? token.value : slotChar).join("");
|
|
330
738
|
}
|
|
331
739
|
function matchesSlot(character, symbol) {
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
return /\p{L}/u.test(character);
|
|
336
|
-
return /[\p{L}\p{Nd}]/u.test(character);
|
|
740
|
+
if (symbol === "9") return /\p{Nd}/u.test(character);
|
|
741
|
+
if (symbol === "a") return /\p{L}/u.test(character);
|
|
742
|
+
return /[\p{L}\p{Nd}]/u.test(character);
|
|
337
743
|
}
|
|
338
|
-
|
|
339
|
-
/**
|
|
340
|
-
* Generated bundle index. Do not edit.
|
|
341
|
-
*/
|
|
342
|
-
|
|
343
744
|
export { AerisInputMask };
|
|
344
|
-
|
|
745
|
+
|
|
746
|
+
//# sourceMappingURL=aeris-ui-core-input-mask.mjs.map
|