@ojiepermana/angular 22.1.13 → 22.2.0
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 +8 -6
- package/SUPPORT.md +3 -3
- package/chart/README.md +1 -1
- package/component/README.md +2 -2
- package/component/calendar/README.md +3 -15
- package/component/drawer/README.md +1 -2
- package/fesm2022/ojiepermana-angular-chart-area.mjs +352 -137
- package/fesm2022/ojiepermana-angular-chart-bar.mjs +744 -524
- package/fesm2022/ojiepermana-angular-chart-core.mjs +1140 -1344
- package/fesm2022/ojiepermana-angular-chart-line.mjs +393 -147
- package/fesm2022/ojiepermana-angular-chart-pie.mjs +408 -179
- package/fesm2022/ojiepermana-angular-chart-primitives.mjs +1262 -920
- package/fesm2022/ojiepermana-angular-chart-radar.mjs +473 -205
- package/fesm2022/ojiepermana-angular-chart-radial.mjs +425 -182
- package/fesm2022/ojiepermana-angular-chart-scatter.mjs +386 -210
- package/fesm2022/ojiepermana-angular-chart.mjs +3 -19
- package/fesm2022/ojiepermana-angular-component-accordion.mjs +485 -243
- package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs +963 -325
- package/fesm2022/ojiepermana-angular-component-alert.mjs +266 -103
- package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs +80 -35
- package/fesm2022/ojiepermana-angular-component-avatar.mjs +402 -135
- package/fesm2022/ojiepermana-angular-component-badge.mjs +109 -59
- package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs +410 -142
- package/fesm2022/ojiepermana-angular-component-button-group.mjs +249 -96
- package/fesm2022/ojiepermana-angular-component-button.mjs +153 -75
- package/fesm2022/ojiepermana-angular-component-calendar.mjs +531 -418
- package/fesm2022/ojiepermana-angular-component-card.mjs +457 -171
- package/fesm2022/ojiepermana-angular-component-carousel.mjs +642 -272
- package/fesm2022/ojiepermana-angular-component-checkbox.mjs +312 -108
- package/fesm2022/ojiepermana-angular-component-collapsible.mjs +299 -115
- package/fesm2022/ojiepermana-angular-component-combobox.mjs +396 -183
- package/fesm2022/ojiepermana-angular-component-command.mjs +807 -347
- package/fesm2022/ojiepermana-angular-component-composer.mjs +807 -330
- package/fesm2022/ojiepermana-angular-component-context-menu.mjs +196 -161
- package/fesm2022/ojiepermana-angular-component-date-picker.mjs +650 -338
- package/fesm2022/ojiepermana-angular-component-dialog.mjs +710 -316
- package/fesm2022/ojiepermana-angular-component-drawer.mjs +2 -5
- package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs +1212 -646
- package/fesm2022/ojiepermana-angular-component-editor.mjs +987 -502
- package/fesm2022/ojiepermana-angular-component-empty.mjs +350 -137
- package/fesm2022/ojiepermana-angular-component-form.mjs +813 -434
- package/fesm2022/ojiepermana-angular-component-hover-card.mjs +486 -277
- package/fesm2022/ojiepermana-angular-component-icon.mjs +241 -140
- package/fesm2022/ojiepermana-angular-component-input-group.mjs +449 -176
- package/fesm2022/ojiepermana-angular-component-input-otp.mjs +891 -488
- package/fesm2022/ojiepermana-angular-component-input.mjs +86 -55
- package/fesm2022/ojiepermana-angular-component-item.mjs +713 -261
- package/fesm2022/ojiepermana-angular-component-kanban.mjs +714 -216
- package/fesm2022/ojiepermana-angular-component-kbd.mjs +124 -52
- package/fesm2022/ojiepermana-angular-component-label.mjs +82 -31
- package/fesm2022/ojiepermana-angular-component-menubar.mjs +479 -329
- package/fesm2022/ojiepermana-angular-component-native-select.mjs +167 -65
- package/fesm2022/ojiepermana-angular-component-navigation-menu.mjs +683 -380
- package/fesm2022/ojiepermana-angular-component-pagination.mjs +277 -94
- package/fesm2022/ojiepermana-angular-component-pillbox.mjs +1283 -607
- package/fesm2022/ojiepermana-angular-component-popover.mjs +291 -204
- package/fesm2022/ojiepermana-angular-component-progress.mjs +176 -53
- package/fesm2022/ojiepermana-angular-component-radio.mjs +449 -142
- package/fesm2022/ojiepermana-angular-component-resizable.mjs +659 -453
- package/fesm2022/ojiepermana-angular-component-scroll-area.mjs +117 -39
- package/fesm2022/ojiepermana-angular-component-segmented-control.mjs +351 -172
- package/fesm2022/ojiepermana-angular-component-select.mjs +475 -345
- package/fesm2022/ojiepermana-angular-component-separator.mjs +102 -35
- package/fesm2022/ojiepermana-angular-component-sheet.mjs +797 -347
- package/fesm2022/ojiepermana-angular-component-skeleton.mjs +62 -29
- package/fesm2022/ojiepermana-angular-component-slider.mjs +592 -376
- package/fesm2022/ojiepermana-angular-component-spinner.mjs +135 -38
- package/fesm2022/ojiepermana-angular-component-switch.mjs +315 -103
- package/fesm2022/ojiepermana-angular-component-table.mjs +440 -153
- package/fesm2022/ojiepermana-angular-component-tabs.mjs +590 -317
- package/fesm2022/ojiepermana-angular-component-textarea.mjs +85 -50
- package/fesm2022/ojiepermana-angular-component-timeline.mjs +609 -231
- package/fesm2022/ojiepermana-angular-component-toast.mjs +229 -243
- package/fesm2022/ojiepermana-angular-component-toggle-group.mjs +573 -288
- package/fesm2022/ojiepermana-angular-component-toggle.mjs +187 -78
- package/fesm2022/ojiepermana-angular-component-tooltip.mjs +798 -517
- package/fesm2022/ojiepermana-angular-component-utils-core.mjs +159 -292
- package/fesm2022/ojiepermana-angular-component-utils-overlay.mjs +46 -58
- package/fesm2022/ojiepermana-angular-component-utils-scale.mjs +76 -38
- package/fesm2022/ojiepermana-angular-component-utils.mjs +2 -8
- package/fesm2022/ojiepermana-angular-component.mjs +0 -10
- package/fesm2022/ojiepermana-angular-navigation-core.mjs +13 -23
- package/fesm2022/ojiepermana-angular-navigation-icon.mjs +35 -24
- package/fesm2022/ojiepermana-angular-navigation-navigation-badge-count.component-BKCeWzml.mjs +129 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-dockbar-menu.component-DFEJK2jD.mjs +811 -0
- package/fesm2022/{ojiepermana-angular-navigation-navigation-entry-grid.component-Cd-jh6tg.mjs → ojiepermana-angular-navigation-navigation-entry-grid.component-mpK9Ar08.mjs} +387 -183
- package/fesm2022/ojiepermana-angular-navigation-navigation-flyout-menu.component-BPgH7FJk.mjs +650 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-horizontal.component-DMpYcD9t.mjs +662 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-item.component-Basp5SIk.mjs +1228 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-list.component-YUzHI9Pj.mjs +311 -0
- package/fesm2022/ojiepermana-angular-navigation-service.mjs +542 -724
- package/fesm2022/ojiepermana-angular-navigation-types.mjs +27 -56
- package/fesm2022/ojiepermana-angular-navigation.mjs +3052 -4
- package/fesm2022/ojiepermana-angular-sdk.mjs +91 -201
- package/fesm2022/ojiepermana-angular-theme-component-settings.mjs +1115 -737
- package/fesm2022/ojiepermana-angular-theme-layout-services.mjs +245 -328
- package/fesm2022/ojiepermana-angular-theme-layout-types.mjs +35 -38
- package/fesm2022/ojiepermana-angular-theme-layout-wrapper.mjs +1719 -552
- package/fesm2022/ojiepermana-angular-theme-layout.mjs +847 -491
- package/fesm2022/ojiepermana-angular-theme-page-core.mjs +288 -358
- package/fesm2022/ojiepermana-angular-theme-page-filter.mjs +362 -224
- package/fesm2022/ojiepermana-angular-theme-page-overview.mjs +88 -0
- package/fesm2022/ojiepermana-angular-theme-page-root.mjs +576 -254
- package/fesm2022/ojiepermana-angular-theme-page-side.mjs +317 -177
- package/fesm2022/ojiepermana-angular-theme-page-slots.mjs +256 -112
- package/fesm2022/ojiepermana-angular-theme-page.mjs +7 -12
- package/fesm2022/ojiepermana-angular-theme-shell-services.mjs +215 -326
- package/fesm2022/ojiepermana-angular-theme-shell-types.mjs +68 -129
- package/fesm2022/ojiepermana-angular-theme-shell.mjs +907 -378
- package/fesm2022/ojiepermana-angular-theme-styles.mjs +521 -720
- package/fesm2022/ojiepermana-angular-theme.mjs +0 -10
- package/fesm2022/ojiepermana-angular.mjs +5 -24
- package/navigation/README.md +1 -1
- package/package.json +16 -12
- package/sdk/README.md +1 -1
- package/sdk/src/writer/index.js +2 -2
- package/theme/README.md +1 -1
- package/theme/layout/README.md +2 -4
- package/theme/page/README.md +50 -0
- package/theme/styles/README.md +10 -10
- package/theme/styles/css/base/prefers-dark.css +1 -1
- package/theme/styles/css/base/status.css +1 -1
- package/theme/styles/css/color/amber.css +1 -1
- package/theme/styles/css/color/blue.css +1 -1
- package/theme/styles/css/color/cyan.css +1 -1
- package/theme/styles/css/color/emerald.css +1 -1
- package/theme/styles/css/color/fuchsia.css +1 -1
- package/theme/styles/css/color/green.css +1 -1
- package/theme/styles/css/color/indigo.css +1 -1
- package/theme/styles/css/color/lime.css +1 -1
- package/theme/styles/css/color/orange.css +1 -1
- package/theme/styles/css/color/pink.css +1 -1
- package/theme/styles/css/color/purple.css +1 -1
- package/theme/styles/css/color/red.css +1 -1
- package/theme/styles/css/color/rose.css +1 -1
- package/theme/styles/css/color/sky.css +1 -1
- package/theme/styles/css/color/teal.css +1 -1
- package/theme/styles/css/color/violet.css +1 -1
- package/theme/styles/css/color/yellow.css +1 -1
- package/theme/styles/css/neutral/gray.css +1 -1
- package/theme/styles/css/neutral/mauve.css +1 -1
- package/theme/styles/css/neutral/mist.css +1 -1
- package/theme/styles/css/neutral/neutral.css +1 -1
- package/theme/styles/css/neutral/olive.css +1 -1
- package/theme/styles/css/neutral/slate.css +1 -1
- package/theme/styles/css/neutral/stone.css +1 -1
- package/theme/styles/css/neutral/taupe.css +1 -1
- package/theme/styles/css/neutral/zinc.css +1 -1
- package/types/ojiepermana-angular-chart-area.d.ts +126 -63
- package/types/ojiepermana-angular-chart-bar.d.ts +244 -154
- package/types/ojiepermana-angular-chart-core.d.ts +409 -398
- package/types/ojiepermana-angular-chart-line.d.ts +141 -68
- package/types/ojiepermana-angular-chart-pie.d.ts +192 -121
- package/types/ojiepermana-angular-chart-primitives.d.ts +283 -214
- package/types/ojiepermana-angular-chart-radar.d.ts +189 -108
- package/types/ojiepermana-angular-chart-radial.d.ts +177 -106
- package/types/ojiepermana-angular-chart-scatter.d.ts +166 -110
- package/types/ojiepermana-angular-chart.d.ts +3 -2
- package/types/ojiepermana-angular-component-accordion.d.ts +135 -81
- package/types/ojiepermana-angular-component-alert-dialog.d.ts +271 -123
- package/types/ojiepermana-angular-component-alert.d.ts +69 -39
- package/types/ojiepermana-angular-component-aspect-ratio.d.ts +20 -12
- package/types/ojiepermana-angular-component-avatar.d.ts +103 -49
- package/types/ojiepermana-angular-component-badge.d.ts +36 -24
- package/types/ojiepermana-angular-component-breadcrumb.d.ts +79 -40
- package/types/ojiepermana-angular-component-button-group.d.ts +48 -24
- package/types/ojiepermana-angular-component-button.d.ts +44 -27
- package/types/ojiepermana-angular-component-calendar.d.ts +145 -107
- package/types/ojiepermana-angular-component-card.d.ts +112 -63
- package/types/ojiepermana-angular-component-carousel.d.ts +150 -81
- package/types/ojiepermana-angular-component-checkbox.d.ts +96 -38
- package/types/ojiepermana-angular-component-collapsible.d.ts +65 -39
- package/types/ojiepermana-angular-component-combobox.d.ts +100 -55
- package/types/ojiepermana-angular-component-command.d.ts +206 -121
- package/types/ojiepermana-angular-component-composer.d.ts +184 -84
- package/types/ojiepermana-angular-component-context-menu.d.ts +51 -41
- package/types/ojiepermana-angular-component-date-picker.d.ts +199 -109
- package/types/ojiepermana-angular-component-dialog.d.ts +200 -105
- package/types/ojiepermana-angular-component-drawer.d.ts +2 -1
- package/types/ojiepermana-angular-component-dropdown-menu.d.ts +324 -202
- package/types/ojiepermana-angular-component-editor.d.ts +215 -117
- package/types/ojiepermana-angular-component-empty.d.ts +80 -45
- package/types/ojiepermana-angular-component-form.d.ts +185 -121
- package/types/ojiepermana-angular-component-hover-card.d.ts +130 -72
- package/types/ojiepermana-angular-component-icon.d.ts +87 -57
- package/types/ojiepermana-angular-component-input-group.d.ts +93 -46
- package/types/ojiepermana-angular-component-input-otp.d.ts +243 -150
- package/types/ojiepermana-angular-component-input.d.ts +27 -17
- package/types/ojiepermana-angular-component-item.d.ts +160 -84
- package/types/ojiepermana-angular-component-kanban.d.ts +157 -62
- package/types/ojiepermana-angular-component-kbd.d.ts +24 -15
- package/types/ojiepermana-angular-component-label.d.ts +19 -11
- package/types/ojiepermana-angular-component-menubar.d.ts +120 -90
- package/types/ojiepermana-angular-component-native-select.d.ts +37 -24
- package/types/ojiepermana-angular-component-navigation-menu.d.ts +157 -98
- package/types/ojiepermana-angular-component-pagination.d.ts +78 -28
- package/types/ojiepermana-angular-component-pillbox.d.ts +361 -204
- package/types/ojiepermana-angular-component-popover.d.ts +94 -64
- package/types/ojiepermana-angular-component-progress.d.ts +45 -17
- package/types/ojiepermana-angular-component-radio.d.ts +129 -53
- package/types/ojiepermana-angular-component-resizable.d.ts +160 -112
- package/types/ojiepermana-angular-component-scroll-area.d.ts +33 -15
- package/types/ojiepermana-angular-component-segmented-control.d.ts +94 -50
- package/types/ojiepermana-angular-component-select.d.ts +94 -77
- package/types/ojiepermana-angular-component-separator.d.ts +26 -14
- package/types/ojiepermana-angular-component-sheet.d.ts +226 -116
- package/types/ojiepermana-angular-component-skeleton.d.ts +13 -10
- package/types/ojiepermana-angular-component-slider.d.ts +140 -75
- package/types/ojiepermana-angular-component-spinner.d.ts +31 -13
- package/types/ojiepermana-angular-component-switch.d.ts +97 -40
- package/types/ojiepermana-angular-component-table.d.ts +102 -50
- package/types/ojiepermana-angular-component-tabs.d.ts +174 -115
- package/types/ojiepermana-angular-component-textarea.d.ts +27 -17
- package/types/ojiepermana-angular-component-timeline.d.ts +141 -59
- package/types/ojiepermana-angular-component-toast.d.ts +51 -55
- package/types/ojiepermana-angular-component-toggle-group.d.ts +159 -88
- package/types/ojiepermana-angular-component-toggle.d.ts +47 -25
- package/types/ojiepermana-angular-component-tooltip.d.ts +222 -132
- package/types/ojiepermana-angular-component-utils-core.d.ts +81 -90
- package/types/ojiepermana-angular-component-utils-overlay.d.ts +7 -11
- package/types/ojiepermana-angular-component-utils-scale.d.ts +20 -12
- package/types/ojiepermana-angular-component-utils.d.ts +2 -2
- package/types/ojiepermana-angular-component.d.ts +1 -2
- package/types/ojiepermana-angular-navigation-core.d.ts +46 -50
- package/types/ojiepermana-angular-navigation-icon.d.ts +9 -12
- package/types/ojiepermana-angular-navigation-service.d.ts +112 -115
- package/types/ojiepermana-angular-navigation-types.d.ts +121 -125
- package/types/ojiepermana-angular-navigation.d.ts +663 -374
- package/types/ojiepermana-angular-sdk.d.ts +69 -71
- package/types/ojiepermana-angular-theme-component-settings.d.ts +115 -83
- package/types/ojiepermana-angular-theme-layout-services.d.ts +119 -124
- package/types/ojiepermana-angular-theme-layout-types.d.ts +27 -31
- package/types/ojiepermana-angular-theme-layout-wrapper.d.ts +399 -187
- package/types/ojiepermana-angular-theme-layout.d.ts +201 -112
- package/types/ojiepermana-angular-theme-page-core.d.ts +136 -142
- package/types/ojiepermana-angular-theme-page-filter.d.ts +112 -62
- package/types/ojiepermana-angular-theme-page-overview.d.ts +28 -0
- package/types/ojiepermana-angular-theme-page-root.d.ts +172 -88
- package/types/ojiepermana-angular-theme-page-side.d.ts +89 -49
- package/types/ojiepermana-angular-theme-page-slots.d.ts +58 -37
- package/types/ojiepermana-angular-theme-page.d.ts +7 -5
- package/types/ojiepermana-angular-theme-shell-services.d.ts +119 -125
- package/types/ojiepermana-angular-theme-shell-types.d.ts +38 -41
- package/types/ojiepermana-angular-theme-shell.d.ts +139 -61
- package/types/ojiepermana-angular-theme-styles.d.ts +184 -196
- package/types/ojiepermana-angular-theme.d.ts +1 -2
- package/types/ojiepermana-angular.d.ts +5 -5
- package/fesm2022/ojiepermana-angular-navigation-navigation-badge-count.component-CDBxQ8rk.mjs +0 -91
- package/fesm2022/ojiepermana-angular-navigation-navigation-dockbar-menu.component-DBQHdvGa.mjs +0 -512
- package/fesm2022/ojiepermana-angular-navigation-navigation-flyout-menu.component-BCGvhoYj.mjs +0 -404
- package/fesm2022/ojiepermana-angular-navigation-navigation-horizontal.component-Dk_03e-6.mjs +0 -466
- package/fesm2022/ojiepermana-angular-navigation-ojiepermana-angular-navigation-DNKU6viC.mjs +0 -2642
|
@@ -1,44 +1,125 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import { Directive,
|
|
3
|
-
import {
|
|
4
|
-
import { FormFieldContext } from
|
|
5
|
-
import { cn, injectUniqueId } from
|
|
6
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Component, Directive, ElementRef, Injector, booleanAttribute, computed, contentChildren, forwardRef, inject, input, linkedSignal, numberAttribute, output, signal, viewChild } from "@angular/core";
|
|
3
|
+
import { NG_VALUE_ACCESSOR, NgControl } from "@angular/forms";
|
|
4
|
+
import { FormFieldContext } from "@ojiepermana/angular/component/form";
|
|
5
|
+
import { cn, injectUniqueId } from "@ojiepermana/angular/component/utils/core";
|
|
7
6
|
const REGEXP_ONLY_DIGITS = /^[0-9]$/;
|
|
8
7
|
const REGEXP_ONLY_DIGITS_AND_CHARS = /^[A-Za-z0-9]$/;
|
|
9
|
-
class InputOtpContextBase {
|
|
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
|
-
class
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
8
|
+
var InputOtpContextBase = class InputOtpContextBase {
|
|
9
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
10
|
+
minVersion: "12.0.0",
|
|
11
|
+
version: "22.2.0",
|
|
12
|
+
ngImport: i0,
|
|
13
|
+
type: InputOtpContextBase,
|
|
14
|
+
deps: [],
|
|
15
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
16
|
+
});
|
|
17
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
18
|
+
minVersion: "14.0.0",
|
|
19
|
+
version: "22.2.0",
|
|
20
|
+
type: InputOtpContextBase,
|
|
21
|
+
isStandalone: true,
|
|
22
|
+
ngImport: i0
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
26
|
+
minVersion: "12.0.0",
|
|
27
|
+
version: "22.2.0",
|
|
28
|
+
ngImport: i0,
|
|
29
|
+
type: InputOtpContextBase,
|
|
30
|
+
decorators: [{ type: Directive }]
|
|
31
|
+
});
|
|
32
|
+
var InputOtpGroupComponent = class InputOtpGroupComponent {
|
|
33
|
+
class = input("", ...ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []);
|
|
34
|
+
classes = computed(() => cn("flex items-center overflow-hidden rounded-md border border-input bg-background shadow-sm", this.class()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
|
|
35
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
36
|
+
minVersion: "12.0.0",
|
|
37
|
+
version: "22.2.0",
|
|
38
|
+
ngImport: i0,
|
|
39
|
+
type: InputOtpGroupComponent,
|
|
40
|
+
deps: [],
|
|
41
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
42
|
+
});
|
|
43
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
44
|
+
minVersion: "17.1.0",
|
|
45
|
+
version: "22.2.0",
|
|
46
|
+
type: InputOtpGroupComponent,
|
|
47
|
+
isStandalone: true,
|
|
48
|
+
selector: "InputOtpGroup",
|
|
49
|
+
inputs: { class: {
|
|
50
|
+
classPropertyName: "class",
|
|
51
|
+
publicName: "class",
|
|
52
|
+
isSignal: true,
|
|
53
|
+
isRequired: false,
|
|
54
|
+
transformFunction: null
|
|
55
|
+
} },
|
|
56
|
+
host: { properties: {
|
|
57
|
+
"class": "classes()",
|
|
58
|
+
"attr.data-slot": "\"input-otp-group\""
|
|
59
|
+
} },
|
|
60
|
+
ngImport: i0,
|
|
61
|
+
template: `<ng-content />`,
|
|
62
|
+
isInline: true
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
66
|
+
minVersion: "12.0.0",
|
|
67
|
+
version: "22.2.0",
|
|
68
|
+
ngImport: i0,
|
|
69
|
+
type: InputOtpGroupComponent,
|
|
70
|
+
decorators: [{
|
|
71
|
+
type: Component,
|
|
72
|
+
args: [{
|
|
73
|
+
selector: "InputOtpGroup",
|
|
74
|
+
host: {
|
|
75
|
+
"[class]": "classes()",
|
|
76
|
+
"[attr.data-slot]": "\"input-otp-group\""
|
|
77
|
+
},
|
|
78
|
+
template: `<ng-content />`
|
|
79
|
+
}]
|
|
80
|
+
}],
|
|
81
|
+
propDecorators: { class: [{
|
|
82
|
+
type: i0.Input,
|
|
83
|
+
args: [{
|
|
84
|
+
isSignal: true,
|
|
85
|
+
alias: "class",
|
|
86
|
+
required: false
|
|
87
|
+
}]
|
|
88
|
+
}] }
|
|
89
|
+
});
|
|
90
|
+
var InputOtpSeparatorComponent = class InputOtpSeparatorComponent {
|
|
91
|
+
class = input("", ...ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []);
|
|
92
|
+
classes = computed(() => cn("inline-flex h-control-10 w-6 items-center justify-center text-muted-foreground [&>svg]:h-4 [&>svg]:w-4", this.class()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
|
|
93
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
94
|
+
minVersion: "12.0.0",
|
|
95
|
+
version: "22.2.0",
|
|
96
|
+
ngImport: i0,
|
|
97
|
+
type: InputOtpSeparatorComponent,
|
|
98
|
+
deps: [],
|
|
99
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
100
|
+
});
|
|
101
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
102
|
+
minVersion: "17.1.0",
|
|
103
|
+
version: "22.2.0",
|
|
104
|
+
type: InputOtpSeparatorComponent,
|
|
105
|
+
isStandalone: true,
|
|
106
|
+
selector: "InputOtpSeparator",
|
|
107
|
+
inputs: { class: {
|
|
108
|
+
classPropertyName: "class",
|
|
109
|
+
publicName: "class",
|
|
110
|
+
isSignal: true,
|
|
111
|
+
isRequired: false,
|
|
112
|
+
transformFunction: null
|
|
113
|
+
} },
|
|
114
|
+
host: {
|
|
115
|
+
attributes: { "aria-hidden": "true" },
|
|
116
|
+
properties: {
|
|
117
|
+
"class": "classes()",
|
|
118
|
+
"attr.data-slot": "\"input-otp-separator\""
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
ngImport: i0,
|
|
122
|
+
template: `
|
|
42
123
|
<svg
|
|
43
124
|
viewBox="0 0 24 24"
|
|
44
125
|
fill="none"
|
|
@@ -49,18 +130,25 @@ class InputOtpSeparatorComponent {
|
|
|
49
130
|
>
|
|
50
131
|
<path d="M5 12h14" />
|
|
51
132
|
</svg>
|
|
52
|
-
`,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
133
|
+
`,
|
|
134
|
+
isInline: true
|
|
135
|
+
});
|
|
136
|
+
};
|
|
137
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
138
|
+
minVersion: "12.0.0",
|
|
139
|
+
version: "22.2.0",
|
|
140
|
+
ngImport: i0,
|
|
141
|
+
type: InputOtpSeparatorComponent,
|
|
142
|
+
decorators: [{
|
|
143
|
+
type: Component,
|
|
144
|
+
args: [{
|
|
145
|
+
selector: "InputOtpSeparator",
|
|
146
|
+
host: {
|
|
147
|
+
"[class]": "classes()",
|
|
148
|
+
"[attr.data-slot]": "\"input-otp-separator\"",
|
|
149
|
+
"aria-hidden": "true"
|
|
150
|
+
},
|
|
151
|
+
template: `
|
|
64
152
|
<svg
|
|
65
153
|
viewBox="0 0 24 24"
|
|
66
154
|
fill="none"
|
|
@@ -71,85 +159,123 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
71
159
|
>
|
|
72
160
|
<path d="M5 12h14" />
|
|
73
161
|
</svg>
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
class
|
|
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
|
-
|
|
162
|
+
`
|
|
163
|
+
}]
|
|
164
|
+
}],
|
|
165
|
+
propDecorators: { class: [{
|
|
166
|
+
type: i0.Input,
|
|
167
|
+
args: [{
|
|
168
|
+
isSignal: true,
|
|
169
|
+
alias: "class",
|
|
170
|
+
required: false
|
|
171
|
+
}]
|
|
172
|
+
}] }
|
|
173
|
+
});
|
|
174
|
+
var InputOtpSlotComponent = class InputOtpSlotComponent {
|
|
175
|
+
ctx = inject(InputOtpContextBase);
|
|
176
|
+
index = input(0, {
|
|
177
|
+
...ngDevMode ? { debugName: "index" } : /* istanbul ignore next */ {},
|
|
178
|
+
transform: numberAttribute
|
|
179
|
+
});
|
|
180
|
+
class = input("", ...ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []);
|
|
181
|
+
invalid = input(false, {
|
|
182
|
+
...ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {},
|
|
183
|
+
alias: "aria-invalid",
|
|
184
|
+
transform: booleanAttribute
|
|
185
|
+
});
|
|
186
|
+
inputRef = viewChild.required("inputRef", ...ngDevMode ? [{ debugName: "inputRef" }] : /* istanbul ignore next */ []);
|
|
187
|
+
maxLength = computed(() => this.ctx.maxLength(), ...ngDevMode ? [{ debugName: "maxLength" }] : /* istanbul ignore next */ []);
|
|
188
|
+
character = computed(() => this.ctx.slotValue(this.index()), ...ngDevMode ? [{ debugName: "character" }] : /* istanbul ignore next */ []);
|
|
189
|
+
active = computed(() => this.ctx.isActive(this.index()), ...ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []);
|
|
190
|
+
filled = computed(() => this.character() !== "", ...ngDevMode ? [{ debugName: "filled" }] : /* istanbul ignore next */ []);
|
|
191
|
+
disabled = computed(() => this.ctx.isDisabled(), ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
|
|
192
|
+
required = computed(() => this.ctx.isRequired(), ...ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []);
|
|
193
|
+
inputId = computed(() => this.ctx.slotId(this.index()), ...ngDevMode ? [{ debugName: "inputId" }] : /* istanbul ignore next */ []);
|
|
194
|
+
inputMode = computed(() => this.ctx.slotInputMode(), ...ngDevMode ? [{ debugName: "inputMode" }] : /* istanbul ignore next */ []);
|
|
195
|
+
autocomplete = computed(() => this.ctx.slotAutocomplete(this.index()), ...ngDevMode ? [{ debugName: "autocomplete" }] : /* istanbul ignore next */ []);
|
|
196
|
+
ariaLabel = computed(() => this.ctx.slotAriaLabel(this.index()), ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
197
|
+
ariaLabelledBy = computed(() => this.ctx.slotAriaLabelledBy(this.index()), ...ngDevMode ? [{ debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []);
|
|
198
|
+
ariaDescribedBy = computed(() => this.ctx.slotAriaDescribedBy(), ...ngDevMode ? [{ debugName: "ariaDescribedBy" }] : /* istanbul ignore next */ []);
|
|
199
|
+
effectiveInvalid = computed(() => this.invalid() || this.ctx.isInvalid(), ...ngDevMode ? [{ debugName: "effectiveInvalid" }] : /* istanbul ignore next */ []);
|
|
200
|
+
classes = computed(() => cn("relative flex h-control-10 w-control-10 items-center justify-center border-r border-border text-sm font-medium transition-[background-color,box-shadow,opacity] last:border-r-0", this.active() && !this.effectiveInvalid() && "z-10 ring-1 ring-inset ring-ring", this.effectiveInvalid() && "bg-destructive/5 text-destructive ring-1 ring-inset ring-destructive/50", this.disabled() && "opacity-50", this.class()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
|
|
201
|
+
focus(select = true) {
|
|
202
|
+
const input = this.inputRef().nativeElement;
|
|
203
|
+
input.focus();
|
|
204
|
+
if (select) input.select();
|
|
205
|
+
}
|
|
206
|
+
handleFocus() {
|
|
207
|
+
this.ctx.handleSlotFocus(this.index());
|
|
208
|
+
this.inputRef().nativeElement.select();
|
|
209
|
+
}
|
|
210
|
+
handleInput(event) {
|
|
211
|
+
const target = event.target;
|
|
212
|
+
this.ctx.handleSlotInput(this.index(), target.value);
|
|
213
|
+
this.syncElementValue(target);
|
|
214
|
+
}
|
|
215
|
+
syncElementValue(target) {
|
|
216
|
+
const character = this.character();
|
|
217
|
+
if (target.value !== character) target.value = character;
|
|
218
|
+
}
|
|
219
|
+
handleKeydown(event) {
|
|
220
|
+
this.ctx.handleSlotKeydown(this.index(), event);
|
|
221
|
+
}
|
|
222
|
+
handlePaste(event) {
|
|
223
|
+
this.ctx.handleSlotPaste(this.index(), event);
|
|
224
|
+
}
|
|
225
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
226
|
+
minVersion: "12.0.0",
|
|
227
|
+
version: "22.2.0",
|
|
228
|
+
ngImport: i0,
|
|
229
|
+
type: InputOtpSlotComponent,
|
|
230
|
+
deps: [],
|
|
231
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
232
|
+
});
|
|
233
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
234
|
+
minVersion: "17.2.0",
|
|
235
|
+
version: "22.2.0",
|
|
236
|
+
type: InputOtpSlotComponent,
|
|
237
|
+
isStandalone: true,
|
|
238
|
+
selector: "InputOtpSlot",
|
|
239
|
+
inputs: {
|
|
240
|
+
index: {
|
|
241
|
+
classPropertyName: "index",
|
|
242
|
+
publicName: "index",
|
|
243
|
+
isSignal: true,
|
|
244
|
+
isRequired: false,
|
|
245
|
+
transformFunction: null
|
|
246
|
+
},
|
|
247
|
+
class: {
|
|
248
|
+
classPropertyName: "class",
|
|
249
|
+
publicName: "class",
|
|
250
|
+
isSignal: true,
|
|
251
|
+
isRequired: false,
|
|
252
|
+
transformFunction: null
|
|
253
|
+
},
|
|
254
|
+
invalid: {
|
|
255
|
+
classPropertyName: "invalid",
|
|
256
|
+
publicName: "aria-invalid",
|
|
257
|
+
isSignal: true,
|
|
258
|
+
isRequired: false,
|
|
259
|
+
transformFunction: null
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
host: { properties: {
|
|
263
|
+
"class": "classes()",
|
|
264
|
+
"attr.data-slot": "\"input-otp-slot\"",
|
|
265
|
+
"attr.data-active": "active() ? \"\" : null",
|
|
266
|
+
"attr.data-filled": "filled() ? \"\" : null",
|
|
267
|
+
"attr.data-disabled": "disabled() ? \"\" : null",
|
|
268
|
+
"attr.data-invalid": "effectiveInvalid() ? \"\" : null"
|
|
269
|
+
} },
|
|
270
|
+
viewQueries: [{
|
|
271
|
+
propertyName: "inputRef",
|
|
272
|
+
first: true,
|
|
273
|
+
predicate: ["inputRef"],
|
|
274
|
+
descendants: true,
|
|
275
|
+
isSignal: true
|
|
276
|
+
}],
|
|
277
|
+
ngImport: i0,
|
|
278
|
+
template: `
|
|
153
279
|
<input
|
|
154
280
|
#inputRef
|
|
155
281
|
class="h-full w-full border-0 bg-transparent px-0 text-center text-inherit font-inherit outline-none disabled:cursor-not-allowed"
|
|
@@ -172,21 +298,28 @@ class InputOtpSlotComponent {
|
|
|
172
298
|
(keydown)="handleKeydown($event)"
|
|
173
299
|
(paste)="handlePaste($event)"
|
|
174
300
|
/>
|
|
175
|
-
`,
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
301
|
+
`,
|
|
302
|
+
isInline: true
|
|
303
|
+
});
|
|
304
|
+
};
|
|
305
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
306
|
+
minVersion: "12.0.0",
|
|
307
|
+
version: "22.2.0",
|
|
308
|
+
ngImport: i0,
|
|
309
|
+
type: InputOtpSlotComponent,
|
|
310
|
+
decorators: [{
|
|
311
|
+
type: Component,
|
|
312
|
+
args: [{
|
|
313
|
+
selector: "InputOtpSlot",
|
|
314
|
+
host: {
|
|
315
|
+
"[class]": "classes()",
|
|
316
|
+
"[attr.data-slot]": "\"input-otp-slot\"",
|
|
317
|
+
"[attr.data-active]": "active() ? \"\" : null",
|
|
318
|
+
"[attr.data-filled]": "filled() ? \"\" : null",
|
|
319
|
+
"[attr.data-disabled]": "disabled() ? \"\" : null",
|
|
320
|
+
"[attr.data-invalid]": "effectiveInvalid() ? \"\" : null"
|
|
321
|
+
},
|
|
322
|
+
template: `
|
|
190
323
|
<input
|
|
191
324
|
#inputRef
|
|
192
325
|
class="h-full w-full border-0 bg-transparent px-0 text-center text-inherit font-inherit outline-none disabled:cursor-not-allowed"
|
|
@@ -209,346 +342,616 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
209
342
|
(keydown)="handleKeydown($event)"
|
|
210
343
|
(paste)="handlePaste($event)"
|
|
211
344
|
/>
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
345
|
+
`
|
|
346
|
+
}]
|
|
347
|
+
}],
|
|
348
|
+
propDecorators: {
|
|
349
|
+
index: [{
|
|
350
|
+
type: i0.Input,
|
|
351
|
+
args: [{
|
|
352
|
+
isSignal: true,
|
|
353
|
+
alias: "index",
|
|
354
|
+
required: false
|
|
355
|
+
}]
|
|
356
|
+
}],
|
|
357
|
+
class: [{
|
|
358
|
+
type: i0.Input,
|
|
359
|
+
args: [{
|
|
360
|
+
isSignal: true,
|
|
361
|
+
alias: "class",
|
|
362
|
+
required: false
|
|
363
|
+
}]
|
|
364
|
+
}],
|
|
365
|
+
invalid: [{
|
|
366
|
+
type: i0.Input,
|
|
367
|
+
args: [{
|
|
368
|
+
isSignal: true,
|
|
369
|
+
alias: "aria-invalid",
|
|
370
|
+
required: false
|
|
371
|
+
}]
|
|
372
|
+
}],
|
|
373
|
+
inputRef: [{
|
|
374
|
+
type: i0.ViewChild,
|
|
375
|
+
args: ["inputRef", { isSignal: true }]
|
|
376
|
+
}]
|
|
377
|
+
}
|
|
378
|
+
});
|
|
379
|
+
var InputOtpComponent = class InputOtpComponent extends InputOtpContextBase {
|
|
380
|
+
host = inject(ElementRef);
|
|
381
|
+
injector = inject(Injector);
|
|
382
|
+
formFieldContext = inject(FormFieldContext, { optional: true });
|
|
383
|
+
maxLengthInput = input(6, {
|
|
384
|
+
...ngDevMode ? { debugName: "maxLengthInput" } : /* istanbul ignore next */ {},
|
|
385
|
+
alias: "maxLength",
|
|
386
|
+
transform: numberAttribute
|
|
387
|
+
});
|
|
388
|
+
value = input(void 0, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
389
|
+
pattern = input(null, ...ngDevMode ? [{ debugName: "pattern" }] : /* istanbul ignore next */ []);
|
|
390
|
+
id = input(null, {
|
|
391
|
+
...ngDevMode ? { debugName: "id" } : /* istanbul ignore next */ {},
|
|
392
|
+
alias: "id"
|
|
393
|
+
});
|
|
394
|
+
ariaLabel = input(null, {
|
|
395
|
+
...ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {},
|
|
396
|
+
alias: "aria-label"
|
|
397
|
+
});
|
|
398
|
+
ariaLabelledby = input(null, {
|
|
399
|
+
...ngDevMode ? { debugName: "ariaLabelledby" } : /* istanbul ignore next */ {},
|
|
400
|
+
alias: "aria-labelledby"
|
|
401
|
+
});
|
|
402
|
+
ariaDescribedby = input(null, {
|
|
403
|
+
...ngDevMode ? { debugName: "ariaDescribedby" } : /* istanbul ignore next */ {},
|
|
404
|
+
alias: "aria-describedby"
|
|
405
|
+
});
|
|
406
|
+
inputMode = input("numeric", {
|
|
407
|
+
...ngDevMode ? { debugName: "inputMode" } : /* istanbul ignore next */ {},
|
|
408
|
+
alias: "inputmode"
|
|
409
|
+
});
|
|
410
|
+
autocomplete = input("one-time-code", {
|
|
411
|
+
...ngDevMode ? { debugName: "autocomplete" } : /* istanbul ignore next */ {},
|
|
412
|
+
alias: "autocomplete"
|
|
413
|
+
});
|
|
414
|
+
required = input(false, {
|
|
415
|
+
...ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {},
|
|
416
|
+
transform: booleanAttribute
|
|
417
|
+
});
|
|
418
|
+
disabledInput = input(false, {
|
|
419
|
+
...ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {},
|
|
420
|
+
alias: "disabled",
|
|
421
|
+
transform: booleanAttribute
|
|
422
|
+
});
|
|
423
|
+
invalidInput = input(false, {
|
|
424
|
+
...ngDevMode ? { debugName: "invalidInput" } : /* istanbul ignore next */ {},
|
|
425
|
+
alias: "aria-invalid",
|
|
426
|
+
transform: booleanAttribute
|
|
427
|
+
});
|
|
428
|
+
class = input("", ...ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []);
|
|
429
|
+
valueChange = output();
|
|
430
|
+
generatedId = injectUniqueId("InputOtp");
|
|
431
|
+
internalValue = linkedSignal(() => this.normalizeValue(this.value() ?? ""), {
|
|
432
|
+
debugName: "InputOtp.internalValue",
|
|
433
|
+
set: (value, rawSet) => rawSet(this.normalizeValue(value))
|
|
434
|
+
});
|
|
435
|
+
disabledState = signal(false, ...ngDevMode ? [{ debugName: "disabledState" }] : /* istanbul ignore next */ []);
|
|
436
|
+
activeIndex = signal(0, ...ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []);
|
|
437
|
+
slots = contentChildren(InputOtpSlotComponent, {
|
|
438
|
+
...ngDevMode ? { debugName: "slots" } : /* istanbul ignore next */ {},
|
|
439
|
+
descendants: true
|
|
440
|
+
});
|
|
441
|
+
compiledPattern = computed(() => {
|
|
442
|
+
const pattern = this.pattern();
|
|
443
|
+
if (!pattern) return [];
|
|
444
|
+
if (pattern instanceof RegExp) return [pattern];
|
|
445
|
+
if (typeof pattern !== "string") return pattern;
|
|
446
|
+
try {
|
|
447
|
+
return [new RegExp(pattern)];
|
|
448
|
+
} catch {
|
|
449
|
+
return [];
|
|
450
|
+
}
|
|
451
|
+
}, ...ngDevMode ? [{ debugName: "compiledPattern" }] : /* istanbul ignore next */ []);
|
|
452
|
+
classes = computed(() => cn("inline-flex flex-wrap items-center gap-2", this.class()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
|
|
453
|
+
disabled = computed(() => this.disabledInput() || this.disabledState(), ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
|
|
454
|
+
displayValue = computed(() => this.internalValue(), ...ngDevMode ? [{ debugName: "displayValue" }] : /* istanbul ignore next */ []);
|
|
455
|
+
ngControl = null;
|
|
456
|
+
onChange = () => {};
|
|
457
|
+
onTouched = () => {};
|
|
458
|
+
ngOnInit() {
|
|
459
|
+
this.ngControl = this.injector.get(NgControl, null, {
|
|
460
|
+
optional: true,
|
|
461
|
+
self: true
|
|
462
|
+
});
|
|
463
|
+
this.publishControl();
|
|
464
|
+
}
|
|
465
|
+
ngAfterViewInit() {
|
|
466
|
+
this.publishControl();
|
|
467
|
+
}
|
|
468
|
+
maxLength() {
|
|
469
|
+
return Math.max(1, this.maxLengthInput());
|
|
470
|
+
}
|
|
471
|
+
slotId(index) {
|
|
472
|
+
const baseId = this.id() ?? this.formFieldContext?.controlId ?? this.generatedId;
|
|
473
|
+
return index === 0 ? baseId : `${baseId}-${index + 1}`;
|
|
474
|
+
}
|
|
475
|
+
slotValue(index) {
|
|
476
|
+
return this.toCharArray()[index] ?? "";
|
|
477
|
+
}
|
|
478
|
+
slotAriaLabel(index) {
|
|
479
|
+
return `${this.ariaLabel() ?? "One-time password"} character ${index + 1} of ${this.maxLength()}`;
|
|
480
|
+
}
|
|
481
|
+
slotAriaLabelledBy(index) {
|
|
482
|
+
return index === 0 ? this.ariaLabelledby() : null;
|
|
483
|
+
}
|
|
484
|
+
slotAriaDescribedBy() {
|
|
485
|
+
return this.describedBy();
|
|
486
|
+
}
|
|
487
|
+
slotInputMode() {
|
|
488
|
+
return this.inputMode();
|
|
489
|
+
}
|
|
490
|
+
slotAutocomplete(index) {
|
|
491
|
+
return index === 0 ? this.autocomplete() : "off";
|
|
492
|
+
}
|
|
493
|
+
isDisabled() {
|
|
494
|
+
return this.disabled();
|
|
495
|
+
}
|
|
496
|
+
isRequired() {
|
|
497
|
+
return this.required();
|
|
498
|
+
}
|
|
499
|
+
isInvalid() {
|
|
500
|
+
return this.invalidInput() || this.formFieldContext?.invalid() || false;
|
|
501
|
+
}
|
|
502
|
+
isActive(index) {
|
|
503
|
+
return this.activeIndex() === index;
|
|
504
|
+
}
|
|
505
|
+
handleSlotFocus(index) {
|
|
506
|
+
this.activeIndex.set(index);
|
|
507
|
+
}
|
|
508
|
+
handleSlotInput(index, value) {
|
|
509
|
+
if (this.disabled()) return;
|
|
510
|
+
const accepted = this.filterCharacters(value);
|
|
511
|
+
if (accepted.length === 0) return;
|
|
512
|
+
if (accepted.length > 1) {
|
|
513
|
+
this.applyFragment(index, accepted);
|
|
514
|
+
return;
|
|
515
|
+
}
|
|
516
|
+
const next = this.replaceAt(index, accepted[0]);
|
|
517
|
+
this.commitValue(next);
|
|
518
|
+
this.focusSlot(Math.min(index + 1, this.maxLength() - 1));
|
|
519
|
+
}
|
|
520
|
+
handleSlotKeydown(index, event) {
|
|
521
|
+
if (this.disabled()) return;
|
|
522
|
+
const isRtl = this.isRtl();
|
|
523
|
+
switch (event.key) {
|
|
524
|
+
case "ArrowLeft":
|
|
525
|
+
event.preventDefault();
|
|
526
|
+
this.focusSlot(Math.max(0, index + (isRtl ? 1 : -1)));
|
|
527
|
+
return;
|
|
528
|
+
case "ArrowRight":
|
|
529
|
+
event.preventDefault();
|
|
530
|
+
this.focusSlot(Math.min(this.maxLength() - 1, index + (isRtl ? -1 : 1)));
|
|
531
|
+
return;
|
|
532
|
+
case "Home":
|
|
533
|
+
event.preventDefault();
|
|
534
|
+
this.focusSlot(0);
|
|
535
|
+
return;
|
|
536
|
+
case "End":
|
|
537
|
+
event.preventDefault();
|
|
538
|
+
this.focusSlot(this.maxLength() - 1);
|
|
539
|
+
return;
|
|
540
|
+
case "Backspace": {
|
|
541
|
+
event.preventDefault();
|
|
542
|
+
const deleteIndex = this.slotValue(index) === "" ? index - 1 : index;
|
|
543
|
+
if (deleteIndex < 0) return;
|
|
544
|
+
this.commitValue(this.removeAt(deleteIndex));
|
|
545
|
+
this.focusSlot(Math.max(0, deleteIndex));
|
|
546
|
+
return;
|
|
547
|
+
}
|
|
548
|
+
case "Delete":
|
|
549
|
+
event.preventDefault();
|
|
550
|
+
this.commitValue(this.removeAt(index));
|
|
551
|
+
this.focusSlot(index);
|
|
552
|
+
return;
|
|
553
|
+
default: return;
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
handleSlotPaste(index, event) {
|
|
557
|
+
if (this.disabled()) return;
|
|
558
|
+
const pasted = event.clipboardData?.getData("text") ?? "";
|
|
559
|
+
const accepted = this.filterCharacters(pasted);
|
|
560
|
+
if (accepted.length === 0) return;
|
|
561
|
+
event.preventDefault();
|
|
562
|
+
this.applyFragment(index, accepted);
|
|
563
|
+
}
|
|
564
|
+
focus() {
|
|
565
|
+
const index = Math.min(this.displayValue().length, this.maxLength() - 1);
|
|
566
|
+
this.focusSlot(Math.max(index, 0));
|
|
567
|
+
}
|
|
568
|
+
writeValue(value) {
|
|
569
|
+
this.internalValue.set(typeof value === "string" ? value : "");
|
|
570
|
+
}
|
|
571
|
+
registerOnChange(fn) {
|
|
572
|
+
this.onChange = fn;
|
|
573
|
+
}
|
|
574
|
+
registerOnTouched(fn) {
|
|
575
|
+
this.onTouched = fn;
|
|
576
|
+
}
|
|
577
|
+
setDisabledState(disabled) {
|
|
578
|
+
this.disabledState.set(disabled);
|
|
579
|
+
}
|
|
580
|
+
describedBy() {
|
|
581
|
+
const rawIds = [this.ariaDescribedby(), this.formFieldContext?.describedBy() ?? null].filter((value) => !!value);
|
|
582
|
+
const ids = [...new Set(rawIds.flatMap((value) => value.split(/\s+/)).filter(Boolean))];
|
|
583
|
+
return ids.length > 0 ? ids.join(" ") : null;
|
|
584
|
+
}
|
|
585
|
+
handleFocusOut(event) {
|
|
586
|
+
const nextTarget = event.relatedTarget;
|
|
587
|
+
if (!(nextTarget instanceof Node) || !this.host.nativeElement.contains(nextTarget)) this.onTouched();
|
|
588
|
+
}
|
|
589
|
+
publishControl() {
|
|
590
|
+
const context = this.formFieldContext;
|
|
591
|
+
if (!context) return;
|
|
592
|
+
const control = this.ngControl?.control ?? null;
|
|
593
|
+
if (control !== context.control()) context.control.set(control);
|
|
594
|
+
}
|
|
595
|
+
commitValue(value) {
|
|
596
|
+
this.internalValue.set(value);
|
|
597
|
+
const nextValue = this.internalValue();
|
|
598
|
+
this.onChange(nextValue);
|
|
599
|
+
this.valueChange.emit(nextValue);
|
|
600
|
+
}
|
|
601
|
+
replaceAt(index, character) {
|
|
602
|
+
const chars = this.toCharArray();
|
|
603
|
+
chars[index] = character;
|
|
604
|
+
return this.serialize(chars);
|
|
605
|
+
}
|
|
606
|
+
removeAt(index) {
|
|
607
|
+
const chars = this.toCharArray();
|
|
608
|
+
if (index < 0 || index >= chars.length) return this.displayValue();
|
|
609
|
+
chars.splice(index, 1);
|
|
610
|
+
chars.push("");
|
|
611
|
+
return this.serialize(chars);
|
|
612
|
+
}
|
|
613
|
+
applyFragment(index, characters) {
|
|
614
|
+
const chars = this.toCharArray();
|
|
615
|
+
let cursor = index;
|
|
616
|
+
for (const character of characters) {
|
|
617
|
+
if (cursor >= chars.length) break;
|
|
618
|
+
chars[cursor] = character;
|
|
619
|
+
cursor += 1;
|
|
620
|
+
}
|
|
621
|
+
this.commitValue(this.serialize(chars));
|
|
622
|
+
this.focusSlot(Math.min(cursor, this.maxLength() - 1));
|
|
623
|
+
}
|
|
624
|
+
focusSlot(index) {
|
|
625
|
+
const slot = this.slots().find((candidate) => candidate.index() === index);
|
|
626
|
+
if (!slot) return;
|
|
627
|
+
this.activeIndex.set(index);
|
|
628
|
+
slot.focus();
|
|
629
|
+
}
|
|
630
|
+
toCharArray() {
|
|
631
|
+
const chars = Array.from({ length: this.maxLength() }, () => "");
|
|
632
|
+
for (const [index, character] of Array.from(this.displayValue()).entries()) {
|
|
633
|
+
if (index >= chars.length) break;
|
|
634
|
+
chars[index] = character;
|
|
635
|
+
}
|
|
636
|
+
return chars;
|
|
637
|
+
}
|
|
638
|
+
serialize(chars) {
|
|
639
|
+
let lastFilledIndex = -1;
|
|
640
|
+
for (let index = chars.length - 1; index >= 0; index -= 1) if (chars[index] !== "") {
|
|
641
|
+
lastFilledIndex = index;
|
|
642
|
+
break;
|
|
643
|
+
}
|
|
644
|
+
return lastFilledIndex === -1 ? "" : chars.slice(0, lastFilledIndex + 1).join("");
|
|
645
|
+
}
|
|
646
|
+
normalizeValue(value) {
|
|
647
|
+
return this.filterCharacters(value).slice(0, this.maxLength()).join("");
|
|
648
|
+
}
|
|
649
|
+
filterCharacters(value) {
|
|
650
|
+
return Array.from(value).filter((character) => this.acceptsCharacter(character));
|
|
651
|
+
}
|
|
652
|
+
acceptsCharacter(character) {
|
|
653
|
+
return this.compiledPattern().every((pattern) => {
|
|
654
|
+
pattern.lastIndex = 0;
|
|
655
|
+
return pattern.test(character);
|
|
656
|
+
});
|
|
657
|
+
}
|
|
658
|
+
isRtl() {
|
|
659
|
+
return getComputedStyle(this.host.nativeElement).direction === "rtl";
|
|
660
|
+
}
|
|
661
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
662
|
+
minVersion: "12.0.0",
|
|
663
|
+
version: "22.2.0",
|
|
664
|
+
ngImport: i0,
|
|
665
|
+
type: InputOtpComponent,
|
|
666
|
+
deps: null,
|
|
667
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
668
|
+
});
|
|
669
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
670
|
+
minVersion: "17.2.0",
|
|
671
|
+
version: "22.2.0",
|
|
672
|
+
type: InputOtpComponent,
|
|
673
|
+
isStandalone: true,
|
|
674
|
+
selector: "InputOtp",
|
|
675
|
+
inputs: {
|
|
676
|
+
maxLengthInput: {
|
|
677
|
+
classPropertyName: "maxLengthInput",
|
|
678
|
+
publicName: "maxLength",
|
|
679
|
+
isSignal: true,
|
|
680
|
+
isRequired: false,
|
|
681
|
+
transformFunction: null
|
|
682
|
+
},
|
|
683
|
+
value: {
|
|
684
|
+
classPropertyName: "value",
|
|
685
|
+
publicName: "value",
|
|
686
|
+
isSignal: true,
|
|
687
|
+
isRequired: false,
|
|
688
|
+
transformFunction: null
|
|
689
|
+
},
|
|
690
|
+
pattern: {
|
|
691
|
+
classPropertyName: "pattern",
|
|
692
|
+
publicName: "pattern",
|
|
693
|
+
isSignal: true,
|
|
694
|
+
isRequired: false,
|
|
695
|
+
transformFunction: null
|
|
696
|
+
},
|
|
697
|
+
id: {
|
|
698
|
+
classPropertyName: "id",
|
|
699
|
+
publicName: "id",
|
|
700
|
+
isSignal: true,
|
|
701
|
+
isRequired: false,
|
|
702
|
+
transformFunction: null
|
|
703
|
+
},
|
|
704
|
+
ariaLabel: {
|
|
705
|
+
classPropertyName: "ariaLabel",
|
|
706
|
+
publicName: "aria-label",
|
|
707
|
+
isSignal: true,
|
|
708
|
+
isRequired: false,
|
|
709
|
+
transformFunction: null
|
|
710
|
+
},
|
|
711
|
+
ariaLabelledby: {
|
|
712
|
+
classPropertyName: "ariaLabelledby",
|
|
713
|
+
publicName: "aria-labelledby",
|
|
714
|
+
isSignal: true,
|
|
715
|
+
isRequired: false,
|
|
716
|
+
transformFunction: null
|
|
717
|
+
},
|
|
718
|
+
ariaDescribedby: {
|
|
719
|
+
classPropertyName: "ariaDescribedby",
|
|
720
|
+
publicName: "aria-describedby",
|
|
721
|
+
isSignal: true,
|
|
722
|
+
isRequired: false,
|
|
723
|
+
transformFunction: null
|
|
724
|
+
},
|
|
725
|
+
inputMode: {
|
|
726
|
+
classPropertyName: "inputMode",
|
|
727
|
+
publicName: "inputmode",
|
|
728
|
+
isSignal: true,
|
|
729
|
+
isRequired: false,
|
|
730
|
+
transformFunction: null
|
|
731
|
+
},
|
|
732
|
+
autocomplete: {
|
|
733
|
+
classPropertyName: "autocomplete",
|
|
734
|
+
publicName: "autocomplete",
|
|
735
|
+
isSignal: true,
|
|
736
|
+
isRequired: false,
|
|
737
|
+
transformFunction: null
|
|
738
|
+
},
|
|
739
|
+
required: {
|
|
740
|
+
classPropertyName: "required",
|
|
741
|
+
publicName: "required",
|
|
742
|
+
isSignal: true,
|
|
743
|
+
isRequired: false,
|
|
744
|
+
transformFunction: null
|
|
745
|
+
},
|
|
746
|
+
disabledInput: {
|
|
747
|
+
classPropertyName: "disabledInput",
|
|
748
|
+
publicName: "disabled",
|
|
749
|
+
isSignal: true,
|
|
750
|
+
isRequired: false,
|
|
751
|
+
transformFunction: null
|
|
752
|
+
},
|
|
753
|
+
invalidInput: {
|
|
754
|
+
classPropertyName: "invalidInput",
|
|
755
|
+
publicName: "aria-invalid",
|
|
756
|
+
isSignal: true,
|
|
757
|
+
isRequired: false,
|
|
758
|
+
transformFunction: null
|
|
759
|
+
},
|
|
760
|
+
class: {
|
|
761
|
+
classPropertyName: "class",
|
|
762
|
+
publicName: "class",
|
|
763
|
+
isSignal: true,
|
|
764
|
+
isRequired: false,
|
|
765
|
+
transformFunction: null
|
|
766
|
+
}
|
|
767
|
+
},
|
|
768
|
+
outputs: { valueChange: "valueChange" },
|
|
769
|
+
host: {
|
|
770
|
+
listeners: { "focusout": "handleFocusOut($event)" },
|
|
771
|
+
properties: {
|
|
772
|
+
"class": "classes()",
|
|
773
|
+
"attr.id": "null",
|
|
774
|
+
"attr.role": "\"group\"",
|
|
775
|
+
"attr.data-slot": "\"input-otp\"",
|
|
776
|
+
"attr.data-disabled": "disabled() ? \"\" : null",
|
|
777
|
+
"attr.data-invalid": "isInvalid() ? \"\" : null",
|
|
778
|
+
"attr.aria-label": "ariaLabel()",
|
|
779
|
+
"attr.aria-labelledby": "ariaLabelledby()",
|
|
780
|
+
"attr.aria-describedby": "describedBy()",
|
|
781
|
+
"attr.aria-disabled": "disabled() ? \"true\" : null",
|
|
782
|
+
"attr.aria-invalid": "isInvalid() ? \"true\" : null"
|
|
783
|
+
}
|
|
784
|
+
},
|
|
785
|
+
providers: [{
|
|
786
|
+
provide: NG_VALUE_ACCESSOR,
|
|
787
|
+
useExisting: forwardRef(() => InputOtpComponent),
|
|
788
|
+
multi: true
|
|
789
|
+
}, {
|
|
790
|
+
provide: InputOtpContextBase,
|
|
791
|
+
useExisting: forwardRef(() => InputOtpComponent)
|
|
792
|
+
}],
|
|
793
|
+
queries: [{
|
|
794
|
+
propertyName: "slots",
|
|
795
|
+
predicate: InputOtpSlotComponent,
|
|
796
|
+
descendants: true,
|
|
797
|
+
isSignal: true
|
|
798
|
+
}],
|
|
799
|
+
usesInheritance: true,
|
|
800
|
+
ngImport: i0,
|
|
801
|
+
template: `<ng-content />`,
|
|
802
|
+
isInline: true
|
|
803
|
+
});
|
|
804
|
+
};
|
|
805
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
806
|
+
minVersion: "12.0.0",
|
|
807
|
+
version: "22.2.0",
|
|
808
|
+
ngImport: i0,
|
|
809
|
+
type: InputOtpComponent,
|
|
810
|
+
decorators: [{
|
|
811
|
+
type: Component,
|
|
812
|
+
args: [{
|
|
813
|
+
selector: "InputOtp",
|
|
814
|
+
providers: [{
|
|
815
|
+
provide: NG_VALUE_ACCESSOR,
|
|
816
|
+
useExisting: forwardRef(() => InputOtpComponent),
|
|
817
|
+
multi: true
|
|
818
|
+
}, {
|
|
819
|
+
provide: InputOtpContextBase,
|
|
820
|
+
useExisting: forwardRef(() => InputOtpComponent)
|
|
821
|
+
}],
|
|
822
|
+
host: {
|
|
823
|
+
"[class]": "classes()",
|
|
824
|
+
"[attr.id]": "null",
|
|
825
|
+
"[attr.role]": "\"group\"",
|
|
826
|
+
"[attr.data-slot]": "\"input-otp\"",
|
|
827
|
+
"[attr.data-disabled]": "disabled() ? \"\" : null",
|
|
828
|
+
"[attr.data-invalid]": "isInvalid() ? \"\" : null",
|
|
829
|
+
"[attr.aria-label]": "ariaLabel()",
|
|
830
|
+
"[attr.aria-labelledby]": "ariaLabelledby()",
|
|
831
|
+
"[attr.aria-describedby]": "describedBy()",
|
|
832
|
+
"[attr.aria-disabled]": "disabled() ? \"true\" : null",
|
|
833
|
+
"[attr.aria-invalid]": "isInvalid() ? \"true\" : null",
|
|
834
|
+
"(focusout)": "handleFocusOut($event)"
|
|
835
|
+
},
|
|
836
|
+
template: `<ng-content />`
|
|
837
|
+
}]
|
|
838
|
+
}],
|
|
839
|
+
propDecorators: {
|
|
840
|
+
maxLengthInput: [{
|
|
841
|
+
type: i0.Input,
|
|
842
|
+
args: [{
|
|
843
|
+
isSignal: true,
|
|
844
|
+
alias: "maxLength",
|
|
845
|
+
required: false
|
|
846
|
+
}]
|
|
847
|
+
}],
|
|
848
|
+
value: [{
|
|
849
|
+
type: i0.Input,
|
|
850
|
+
args: [{
|
|
851
|
+
isSignal: true,
|
|
852
|
+
alias: "value",
|
|
853
|
+
required: false
|
|
854
|
+
}]
|
|
855
|
+
}],
|
|
856
|
+
pattern: [{
|
|
857
|
+
type: i0.Input,
|
|
858
|
+
args: [{
|
|
859
|
+
isSignal: true,
|
|
860
|
+
alias: "pattern",
|
|
861
|
+
required: false
|
|
862
|
+
}]
|
|
863
|
+
}],
|
|
864
|
+
id: [{
|
|
865
|
+
type: i0.Input,
|
|
866
|
+
args: [{
|
|
867
|
+
isSignal: true,
|
|
868
|
+
alias: "id",
|
|
869
|
+
required: false
|
|
870
|
+
}]
|
|
871
|
+
}],
|
|
872
|
+
ariaLabel: [{
|
|
873
|
+
type: i0.Input,
|
|
874
|
+
args: [{
|
|
875
|
+
isSignal: true,
|
|
876
|
+
alias: "aria-label",
|
|
877
|
+
required: false
|
|
878
|
+
}]
|
|
879
|
+
}],
|
|
880
|
+
ariaLabelledby: [{
|
|
881
|
+
type: i0.Input,
|
|
882
|
+
args: [{
|
|
883
|
+
isSignal: true,
|
|
884
|
+
alias: "aria-labelledby",
|
|
885
|
+
required: false
|
|
886
|
+
}]
|
|
887
|
+
}],
|
|
888
|
+
ariaDescribedby: [{
|
|
889
|
+
type: i0.Input,
|
|
890
|
+
args: [{
|
|
891
|
+
isSignal: true,
|
|
892
|
+
alias: "aria-describedby",
|
|
893
|
+
required: false
|
|
894
|
+
}]
|
|
895
|
+
}],
|
|
896
|
+
inputMode: [{
|
|
897
|
+
type: i0.Input,
|
|
898
|
+
args: [{
|
|
899
|
+
isSignal: true,
|
|
900
|
+
alias: "inputmode",
|
|
901
|
+
required: false
|
|
902
|
+
}]
|
|
903
|
+
}],
|
|
904
|
+
autocomplete: [{
|
|
905
|
+
type: i0.Input,
|
|
906
|
+
args: [{
|
|
907
|
+
isSignal: true,
|
|
908
|
+
alias: "autocomplete",
|
|
909
|
+
required: false
|
|
910
|
+
}]
|
|
911
|
+
}],
|
|
912
|
+
required: [{
|
|
913
|
+
type: i0.Input,
|
|
914
|
+
args: [{
|
|
915
|
+
isSignal: true,
|
|
916
|
+
alias: "required",
|
|
917
|
+
required: false
|
|
918
|
+
}]
|
|
919
|
+
}],
|
|
920
|
+
disabledInput: [{
|
|
921
|
+
type: i0.Input,
|
|
922
|
+
args: [{
|
|
923
|
+
isSignal: true,
|
|
924
|
+
alias: "disabled",
|
|
925
|
+
required: false
|
|
926
|
+
}]
|
|
927
|
+
}],
|
|
928
|
+
invalidInput: [{
|
|
929
|
+
type: i0.Input,
|
|
930
|
+
args: [{
|
|
931
|
+
isSignal: true,
|
|
932
|
+
alias: "aria-invalid",
|
|
933
|
+
required: false
|
|
934
|
+
}]
|
|
935
|
+
}],
|
|
936
|
+
class: [{
|
|
937
|
+
type: i0.Input,
|
|
938
|
+
args: [{
|
|
939
|
+
isSignal: true,
|
|
940
|
+
alias: "class",
|
|
941
|
+
required: false
|
|
942
|
+
}]
|
|
943
|
+
}],
|
|
944
|
+
valueChange: [{
|
|
945
|
+
type: i0.Output,
|
|
946
|
+
args: ["valueChange"]
|
|
947
|
+
}],
|
|
948
|
+
slots: [{
|
|
949
|
+
type: i0.ContentChildren,
|
|
950
|
+
args: [i0.forwardRef(() => InputOtpSlotComponent), {
|
|
951
|
+
descendants: true,
|
|
952
|
+
isSignal: true
|
|
953
|
+
}]
|
|
954
|
+
}]
|
|
955
|
+
}
|
|
956
|
+
});
|
|
957
|
+
export { InputOtpComponent, InputOtpGroupComponent, InputOtpSeparatorComponent, InputOtpSlotComponent, REGEXP_ONLY_DIGITS, REGEXP_ONLY_DIGITS_AND_CHARS };
|