@vadem/ui 0.0.0-stage → 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE-lucide.txt +43 -0
- package/README.md +19 -2
- package/fesm2022/vadem-ui-accordion.mjs +139 -0
- package/fesm2022/vadem-ui-accordion.mjs.map +1 -0
- package/fesm2022/vadem-ui-active-filters.mjs +355 -0
- package/fesm2022/vadem-ui-active-filters.mjs.map +1 -0
- package/fesm2022/vadem-ui-alert-dialog.mjs +433 -0
- package/fesm2022/vadem-ui-alert-dialog.mjs.map +1 -0
- package/fesm2022/vadem-ui-alert.mjs +266 -0
- package/fesm2022/vadem-ui-alert.mjs.map +1 -0
- package/fesm2022/vadem-ui-autocomplete.mjs +715 -0
- package/fesm2022/vadem-ui-autocomplete.mjs.map +1 -0
- package/fesm2022/vadem-ui-avatar.mjs +219 -0
- package/fesm2022/vadem-ui-avatar.mjs.map +1 -0
- package/fesm2022/vadem-ui-badge.mjs +86 -0
- package/fesm2022/vadem-ui-badge.mjs.map +1 -0
- package/fesm2022/vadem-ui-breadcrumbs.mjs +61 -0
- package/fesm2022/vadem-ui-breadcrumbs.mjs.map +1 -0
- package/fesm2022/vadem-ui-button.mjs +220 -0
- package/fesm2022/vadem-ui-button.mjs.map +1 -0
- package/fesm2022/vadem-ui-calendar.mjs +1314 -0
- package/fesm2022/vadem-ui-calendar.mjs.map +1 -0
- package/fesm2022/vadem-ui-card.mjs +271 -0
- package/fesm2022/vadem-ui-card.mjs.map +1 -0
- package/fesm2022/vadem-ui-character-count.mjs +269 -0
- package/fesm2022/vadem-ui-character-count.mjs.map +1 -0
- package/fesm2022/vadem-ui-chart.mjs +1984 -0
- package/fesm2022/vadem-ui-chart.mjs.map +1 -0
- package/fesm2022/vadem-ui-checkbox.mjs +67 -0
- package/fesm2022/vadem-ui-checkbox.mjs.map +1 -0
- package/fesm2022/vadem-ui-color-picker.mjs +815 -0
- package/fesm2022/vadem-ui-color-picker.mjs.map +1 -0
- package/fesm2022/vadem-ui-command.mjs +735 -0
- package/fesm2022/vadem-ui-command.mjs.map +1 -0
- package/fesm2022/vadem-ui-copy-button.mjs +375 -0
- package/fesm2022/vadem-ui-copy-button.mjs.map +1 -0
- package/fesm2022/vadem-ui-date-range-picker.mjs +1011 -0
- package/fesm2022/vadem-ui-date-range-picker.mjs.map +1 -0
- package/fesm2022/vadem-ui-description-list.mjs +59 -0
- package/fesm2022/vadem-ui-description-list.mjs.map +1 -0
- package/fesm2022/vadem-ui-dialog.mjs +587 -0
- package/fesm2022/vadem-ui-dialog.mjs.map +1 -0
- package/fesm2022/vadem-ui-dropzone.mjs +176 -0
- package/fesm2022/vadem-ui-dropzone.mjs.map +1 -0
- package/fesm2022/vadem-ui-editable-text.mjs +641 -0
- package/fesm2022/vadem-ui-editable-text.mjs.map +1 -0
- package/fesm2022/vadem-ui-empty-state.mjs +175 -0
- package/fesm2022/vadem-ui-empty-state.mjs.map +1 -0
- package/fesm2022/vadem-ui-expandable-text.mjs +244 -0
- package/fesm2022/vadem-ui-expandable-text.mjs.map +1 -0
- package/fesm2022/vadem-ui-field.mjs +583 -0
- package/fesm2022/vadem-ui-field.mjs.map +1 -0
- package/fesm2022/vadem-ui-file-preview.mjs +532 -0
- package/fesm2022/vadem-ui-file-preview.mjs.map +1 -0
- package/fesm2022/vadem-ui-file-size.mjs +83 -0
- package/fesm2022/vadem-ui-file-size.mjs.map +1 -0
- package/fesm2022/vadem-ui-form-error-summary.mjs +201 -0
- package/fesm2022/vadem-ui-form-error-summary.mjs.map +1 -0
- package/fesm2022/vadem-ui-icon.mjs +303 -0
- package/fesm2022/vadem-ui-icon.mjs.map +1 -0
- package/fesm2022/vadem-ui-input.mjs +120 -0
- package/fesm2022/vadem-ui-input.mjs.map +1 -0
- package/fesm2022/vadem-ui-kbd.mjs +286 -0
- package/fesm2022/vadem-ui-kbd.mjs.map +1 -0
- package/fesm2022/vadem-ui-keyboard.mjs +105 -0
- package/fesm2022/vadem-ui-keyboard.mjs.map +1 -0
- package/fesm2022/vadem-ui-locale.mjs +443 -0
- package/fesm2022/vadem-ui-locale.mjs.map +1 -0
- package/fesm2022/vadem-ui-menu.mjs +637 -0
- package/fesm2022/vadem-ui-menu.mjs.map +1 -0
- package/fesm2022/vadem-ui-navigation-list.mjs +130 -0
- package/fesm2022/vadem-ui-navigation-list.mjs.map +1 -0
- package/fesm2022/vadem-ui-number-input.mjs +264 -0
- package/fesm2022/vadem-ui-number-input.mjs.map +1 -0
- package/fesm2022/vadem-ui-otp-input.mjs +86 -0
- package/fesm2022/vadem-ui-otp-input.mjs.map +1 -0
- package/fesm2022/vadem-ui-pagination.mjs +353 -0
- package/fesm2022/vadem-ui-pagination.mjs.map +1 -0
- package/fesm2022/vadem-ui-password-input.mjs +213 -0
- package/fesm2022/vadem-ui-password-input.mjs.map +1 -0
- package/fesm2022/vadem-ui-popover.mjs +178 -0
- package/fesm2022/vadem-ui-popover.mjs.map +1 -0
- package/fesm2022/vadem-ui-progress.mjs +331 -0
- package/fesm2022/vadem-ui-progress.mjs.map +1 -0
- package/fesm2022/vadem-ui-radio.mjs +39 -0
- package/fesm2022/vadem-ui-radio.mjs.map +1 -0
- package/fesm2022/vadem-ui-range-slider.mjs +561 -0
- package/fesm2022/vadem-ui-range-slider.mjs.map +1 -0
- package/fesm2022/vadem-ui-rating.mjs +404 -0
- package/fesm2022/vadem-ui-rating.mjs.map +1 -0
- package/fesm2022/vadem-ui-relative-time.mjs +217 -0
- package/fesm2022/vadem-ui-relative-time.mjs.map +1 -0
- package/fesm2022/vadem-ui-reorder-list.mjs +601 -0
- package/fesm2022/vadem-ui-reorder-list.mjs.map +1 -0
- package/fesm2022/vadem-ui-scroll-area.mjs +65 -0
- package/fesm2022/vadem-ui-scroll-area.mjs.map +1 -0
- package/fesm2022/vadem-ui-search-input.mjs +307 -0
- package/fesm2022/vadem-ui-search-input.mjs.map +1 -0
- package/fesm2022/vadem-ui-segmented.mjs +297 -0
- package/fesm2022/vadem-ui-segmented.mjs.map +1 -0
- package/fesm2022/vadem-ui-select.mjs +1462 -0
- package/fesm2022/vadem-ui-select.mjs.map +1 -0
- package/fesm2022/vadem-ui-sidebar.mjs +493 -0
- package/fesm2022/vadem-ui-sidebar.mjs.map +1 -0
- package/fesm2022/vadem-ui-skeleton.mjs +106 -0
- package/fesm2022/vadem-ui-skeleton.mjs.map +1 -0
- package/fesm2022/vadem-ui-slider.mjs +60 -0
- package/fesm2022/vadem-ui-slider.mjs.map +1 -0
- package/fesm2022/vadem-ui-splitter.mjs +438 -0
- package/fesm2022/vadem-ui-splitter.mjs.map +1 -0
- package/fesm2022/vadem-ui-stat.mjs +369 -0
- package/fesm2022/vadem-ui-stat.mjs.map +1 -0
- package/fesm2022/vadem-ui-stepper.mjs +483 -0
- package/fesm2022/vadem-ui-stepper.mjs.map +1 -0
- package/fesm2022/vadem-ui-switch.mjs +45 -0
- package/fesm2022/vadem-ui-switch.mjs.map +1 -0
- package/fesm2022/vadem-ui-table.mjs +593 -0
- package/fesm2022/vadem-ui-table.mjs.map +1 -0
- package/fesm2022/vadem-ui-tabs.mjs +405 -0
- package/fesm2022/vadem-ui-tabs.mjs.map +1 -0
- package/fesm2022/vadem-ui-tag-input.mjs +685 -0
- package/fesm2022/vadem-ui-tag-input.mjs.map +1 -0
- package/fesm2022/vadem-ui-text-highlight.mjs +126 -0
- package/fesm2022/vadem-ui-text-highlight.mjs.map +1 -0
- package/fesm2022/vadem-ui-time-input.mjs +430 -0
- package/fesm2022/vadem-ui-time-input.mjs.map +1 -0
- package/fesm2022/vadem-ui-timeline.mjs +313 -0
- package/fesm2022/vadem-ui-timeline.mjs.map +1 -0
- package/fesm2022/vadem-ui-toast.mjs +397 -0
- package/fesm2022/vadem-ui-toast.mjs.map +1 -0
- package/fesm2022/vadem-ui-toolbar.mjs +396 -0
- package/fesm2022/vadem-ui-toolbar.mjs.map +1 -0
- package/fesm2022/vadem-ui-tooltip.mjs +218 -0
- package/fesm2022/vadem-ui-tooltip.mjs.map +1 -0
- package/fesm2022/vadem-ui-tree.mjs +551 -0
- package/fesm2022/vadem-ui-tree.mjs.map +1 -0
- package/fesm2022/vadem-ui-upload-list.mjs +408 -0
- package/fesm2022/vadem-ui-upload-list.mjs.map +1 -0
- package/fesm2022/vadem-ui.mjs +4 -0
- package/fesm2022/vadem-ui.mjs.map +1 -0
- package/fonts/jetbrains-mono/OFL.txt +93 -0
- package/fonts/jetbrains-mono/jetbrains-mono-cyrillic.woff2 +0 -0
- package/fonts/jetbrains-mono/jetbrains-mono-latin.woff2 +0 -0
- package/fonts/manrope/OFL.txt +93 -0
- package/fonts/manrope/manrope-cyrillic.woff2 +0 -0
- package/fonts/manrope/manrope-latin.woff2 +0 -0
- package/package.json +306 -3
- package/styles/base.css +160 -0
- package/styles/components/accordion.css +130 -0
- package/styles/components/active-filters.css +42 -0
- package/styles/components/alert-dialog.css +34 -0
- package/styles/components/alert.css +159 -0
- package/styles/components/autocomplete.css +97 -0
- package/styles/components/avatar.css +90 -0
- package/styles/components/badge.css +91 -0
- package/styles/components/breadcrumbs.css +94 -0
- package/styles/components/button.css +174 -0
- package/styles/components/calendar.css +186 -0
- package/styles/components/card.css +206 -0
- package/styles/components/character-count.css +41 -0
- package/styles/components/chart.css +308 -0
- package/styles/components/checkbox.css +115 -0
- package/styles/components/color-picker.css +158 -0
- package/styles/components/command.css +175 -0
- package/styles/components/copy-button.css +58 -0
- package/styles/components/date-range-picker.css +153 -0
- package/styles/components/description-list.css +69 -0
- package/styles/components/dialog.css +334 -0
- package/styles/components/dropzone.css +89 -0
- package/styles/components/editable-text.css +58 -0
- package/styles/components/empty-state.css +72 -0
- package/styles/components/expandable-text.css +24 -0
- package/styles/components/field.css +148 -0
- package/styles/components/file-preview.css +65 -0
- package/styles/components/form-error-summary.css +71 -0
- package/styles/components/icon.css +38 -0
- package/styles/components/index.css +80 -0
- package/styles/components/input.css +171 -0
- package/styles/components/kbd.css +42 -0
- package/styles/components/menu.css +168 -0
- package/styles/components/multi-select.css +156 -0
- package/styles/components/navigation-list.css +147 -0
- package/styles/components/number-input.css +33 -0
- package/styles/components/otp-input.css +26 -0
- package/styles/components/pagination.css +127 -0
- package/styles/components/password-input.css +20 -0
- package/styles/components/popover.css +93 -0
- package/styles/components/progress-ring.css +112 -0
- package/styles/components/progress.css +162 -0
- package/styles/components/radio.css +117 -0
- package/styles/components/range-slider.css +158 -0
- package/styles/components/rating.css +100 -0
- package/styles/components/reorder-list.css +143 -0
- package/styles/components/scroll-area.css +39 -0
- package/styles/components/search-input.css +25 -0
- package/styles/components/segmented.css +136 -0
- package/styles/components/select.css +257 -0
- package/styles/components/sidebar.css +105 -0
- package/styles/components/skeleton.css +83 -0
- package/styles/components/slider.css +132 -0
- package/styles/components/splitter.css +83 -0
- package/styles/components/stat.css +62 -0
- package/styles/components/stepper.css +236 -0
- package/styles/components/switch.css +107 -0
- package/styles/components/table.css +195 -0
- package/styles/components/tabs.css +198 -0
- package/styles/components/tag-input.css +138 -0
- package/styles/components/text-highlight.css +22 -0
- package/styles/components/time-input.css +96 -0
- package/styles/components/timeline.css +182 -0
- package/styles/components/toast.css +146 -0
- package/styles/components/toolbar.css +72 -0
- package/styles/components/tooltip.css +93 -0
- package/styles/components/tree.css +88 -0
- package/styles/components/upload-list.css +113 -0
- package/styles/fonts.css +67 -0
- package/styles/index.css +14 -0
- package/styles/reset.css +57 -0
- package/styles/tokens/primitives.css +364 -0
- package/styles/tokens/semantic.css +233 -0
- package/types/vadem-ui-accordion.d.ts +43 -0
- package/types/vadem-ui-active-filters.d.ts +73 -0
- package/types/vadem-ui-alert-dialog.d.ts +87 -0
- package/types/vadem-ui-alert.d.ts +64 -0
- package/types/vadem-ui-autocomplete.d.ts +156 -0
- package/types/vadem-ui-avatar.d.ts +59 -0
- package/types/vadem-ui-badge.d.ts +25 -0
- package/types/vadem-ui-breadcrumbs.d.ts +22 -0
- package/types/vadem-ui-button.d.ts +52 -0
- package/types/vadem-ui-calendar.d.ts +327 -0
- package/types/vadem-ui-card.d.ts +58 -0
- package/types/vadem-ui-character-count.d.ts +71 -0
- package/types/vadem-ui-chart.d.ts +452 -0
- package/types/vadem-ui-checkbox.d.ts +20 -0
- package/types/vadem-ui-color-picker.d.ts +171 -0
- package/types/vadem-ui-command.d.ts +145 -0
- package/types/vadem-ui-copy-button.d.ts +90 -0
- package/types/vadem-ui-date-range-picker.d.ts +216 -0
- package/types/vadem-ui-description-list.d.ts +15 -0
- package/types/vadem-ui-dialog.d.ts +174 -0
- package/types/vadem-ui-dropzone.d.ts +73 -0
- package/types/vadem-ui-editable-text.d.ts +141 -0
- package/types/vadem-ui-empty-state.d.ts +34 -0
- package/types/vadem-ui-expandable-text.d.ts +52 -0
- package/types/vadem-ui-field.d.ts +180 -0
- package/types/vadem-ui-file-preview.d.ts +108 -0
- package/types/vadem-ui-file-size.d.ts +18 -0
- package/types/vadem-ui-form-error-summary.d.ts +46 -0
- package/types/vadem-ui-icon.d.ts +152 -0
- package/types/vadem-ui-input.d.ts +31 -0
- package/types/vadem-ui-kbd.d.ts +66 -0
- package/types/vadem-ui-keyboard.d.ts +61 -0
- package/types/vadem-ui-locale.d.ts +241 -0
- package/types/vadem-ui-menu.d.ts +132 -0
- package/types/vadem-ui-navigation-list.d.ts +28 -0
- package/types/vadem-ui-number-input.d.ts +39 -0
- package/types/vadem-ui-otp-input.d.ts +15 -0
- package/types/vadem-ui-pagination.d.ts +96 -0
- package/types/vadem-ui-password-input.d.ts +36 -0
- package/types/vadem-ui-popover.d.ts +48 -0
- package/types/vadem-ui-progress.d.ts +95 -0
- package/types/vadem-ui-radio.d.ts +11 -0
- package/types/vadem-ui-range-slider.d.ts +136 -0
- package/types/vadem-ui-rating.d.ts +95 -0
- package/types/vadem-ui-relative-time.d.ts +58 -0
- package/types/vadem-ui-reorder-list.d.ts +120 -0
- package/types/vadem-ui-scroll-area.d.ts +13 -0
- package/types/vadem-ui-search-input.d.ts +58 -0
- package/types/vadem-ui-segmented.d.ts +76 -0
- package/types/vadem-ui-select.d.ts +303 -0
- package/types/vadem-ui-sidebar.d.ts +70 -0
- package/types/vadem-ui-skeleton.d.ts +28 -0
- package/types/vadem-ui-slider.d.ts +17 -0
- package/types/vadem-ui-splitter.d.ts +99 -0
- package/types/vadem-ui-stat.d.ts +101 -0
- package/types/vadem-ui-stepper.d.ts +108 -0
- package/types/vadem-ui-switch.d.ts +10 -0
- package/types/vadem-ui-table.d.ts +172 -0
- package/types/vadem-ui-tabs.d.ts +101 -0
- package/types/vadem-ui-tag-input.d.ts +170 -0
- package/types/vadem-ui-text-highlight.d.ts +27 -0
- package/types/vadem-ui-time-input.d.ts +47 -0
- package/types/vadem-ui-timeline.d.ts +54 -0
- package/types/vadem-ui-toast.d.ts +104 -0
- package/types/vadem-ui-toolbar.d.ts +80 -0
- package/types/vadem-ui-tooltip.d.ts +71 -0
- package/types/vadem-ui-tree.d.ts +123 -0
- package/types/vadem-ui-upload-list.d.ts +70 -0
- package/types/vadem-ui.d.ts +1 -0
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Directive, input } from "@angular/core";
|
|
3
|
+
import { vdTexts } from "@vadem/ui/locale";
|
|
4
|
+
var VdNavigationList = class VdNavigationList {
|
|
5
|
+
label = input(...ngDevMode ? [void 0, { debugName: "label" }] : /* istanbul ignore next */ []);
|
|
6
|
+
t = vdTexts("navigationList", { label: this.label });
|
|
7
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
8
|
+
minVersion: "12.0.0",
|
|
9
|
+
version: "22.2.1",
|
|
10
|
+
ngImport: i0,
|
|
11
|
+
type: VdNavigationList,
|
|
12
|
+
deps: [],
|
|
13
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
14
|
+
});
|
|
15
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
16
|
+
minVersion: "17.1.0",
|
|
17
|
+
version: "22.2.1",
|
|
18
|
+
type: VdNavigationList,
|
|
19
|
+
isStandalone: true,
|
|
20
|
+
selector: "nav[vdNavigationList]",
|
|
21
|
+
inputs: { label: {
|
|
22
|
+
classPropertyName: "label",
|
|
23
|
+
publicName: "label",
|
|
24
|
+
isSignal: true,
|
|
25
|
+
isRequired: false,
|
|
26
|
+
transformFunction: null
|
|
27
|
+
} },
|
|
28
|
+
host: {
|
|
29
|
+
properties: { "attr.aria-label": "t().label" },
|
|
30
|
+
classAttribute: "vd-navigation-list"
|
|
31
|
+
},
|
|
32
|
+
ngImport: i0
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
36
|
+
minVersion: "12.0.0",
|
|
37
|
+
version: "22.2.1",
|
|
38
|
+
ngImport: i0,
|
|
39
|
+
type: VdNavigationList,
|
|
40
|
+
decorators: [{
|
|
41
|
+
type: Directive,
|
|
42
|
+
args: [{
|
|
43
|
+
selector: "nav[vdNavigationList]",
|
|
44
|
+
host: {
|
|
45
|
+
class: "vd-navigation-list",
|
|
46
|
+
"[attr.aria-label]": "t().label"
|
|
47
|
+
}
|
|
48
|
+
}]
|
|
49
|
+
}],
|
|
50
|
+
propDecorators: { label: [{
|
|
51
|
+
type: i0.Input,
|
|
52
|
+
args: [{
|
|
53
|
+
isSignal: true,
|
|
54
|
+
alias: "label",
|
|
55
|
+
required: false
|
|
56
|
+
}]
|
|
57
|
+
}] }
|
|
58
|
+
});
|
|
59
|
+
var VdNavigationLink = class VdNavigationLink {
|
|
60
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
61
|
+
minVersion: "12.0.0",
|
|
62
|
+
version: "22.2.1",
|
|
63
|
+
ngImport: i0,
|
|
64
|
+
type: VdNavigationLink,
|
|
65
|
+
deps: [],
|
|
66
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
67
|
+
});
|
|
68
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
69
|
+
minVersion: "14.0.0",
|
|
70
|
+
version: "22.2.1",
|
|
71
|
+
type: VdNavigationLink,
|
|
72
|
+
isStandalone: true,
|
|
73
|
+
selector: "a[vdNavigationLink]",
|
|
74
|
+
host: { classAttribute: "vd-navigation-link" },
|
|
75
|
+
ngImport: i0
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
79
|
+
minVersion: "12.0.0",
|
|
80
|
+
version: "22.2.1",
|
|
81
|
+
ngImport: i0,
|
|
82
|
+
type: VdNavigationLink,
|
|
83
|
+
decorators: [{
|
|
84
|
+
type: Directive,
|
|
85
|
+
args: [{
|
|
86
|
+
selector: "a[vdNavigationLink]",
|
|
87
|
+
host: { class: "vd-navigation-link" }
|
|
88
|
+
}]
|
|
89
|
+
}]
|
|
90
|
+
});
|
|
91
|
+
var VdNavigationLabel = class VdNavigationLabel {
|
|
92
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
93
|
+
minVersion: "12.0.0",
|
|
94
|
+
version: "22.2.1",
|
|
95
|
+
ngImport: i0,
|
|
96
|
+
type: VdNavigationLabel,
|
|
97
|
+
deps: [],
|
|
98
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
99
|
+
});
|
|
100
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
101
|
+
minVersion: "14.0.0",
|
|
102
|
+
version: "22.2.1",
|
|
103
|
+
type: VdNavigationLabel,
|
|
104
|
+
isStandalone: true,
|
|
105
|
+
selector: "[vdNavigationLabel]",
|
|
106
|
+
host: { classAttribute: "vd-navigation-label" },
|
|
107
|
+
ngImport: i0
|
|
108
|
+
});
|
|
109
|
+
};
|
|
110
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
111
|
+
minVersion: "12.0.0",
|
|
112
|
+
version: "22.2.1",
|
|
113
|
+
ngImport: i0,
|
|
114
|
+
type: VdNavigationLabel,
|
|
115
|
+
decorators: [{
|
|
116
|
+
type: Directive,
|
|
117
|
+
args: [{
|
|
118
|
+
selector: "[vdNavigationLabel]",
|
|
119
|
+
host: { class: "vd-navigation-label" }
|
|
120
|
+
}]
|
|
121
|
+
}]
|
|
122
|
+
});
|
|
123
|
+
const VD_NAVIGATION_LIST = [
|
|
124
|
+
VdNavigationList,
|
|
125
|
+
VdNavigationLink,
|
|
126
|
+
VdNavigationLabel
|
|
127
|
+
];
|
|
128
|
+
export { VD_NAVIGATION_LIST, VdNavigationLabel, VdNavigationLink, VdNavigationList };
|
|
129
|
+
|
|
130
|
+
//# sourceMappingURL=vadem-ui-navigation-list.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vadem-ui-navigation-list.mjs","names":[],"sources":["../../../projects/ui/navigation-list/src/navigation-list.ts"],"sourcesContent":["import { Directive, input } from '@angular/core';\nimport { vdTexts } from '@vadem/ui/locale';\n\n/** Native navigation landmark; applications supply groups, links and current state. */\n@Directive({\n selector: 'nav[vdNavigationList]',\n host: { class: 'vd-navigation-list', '[attr.aria-label]': 't().label' },\n})\nexport class VdNavigationList {\n readonly label = input<string>();\n /** Text inputs resolved against the active VD_LOCALE. */\n protected readonly t = vdTexts('navigationList', { label: this.label });\n}\n\n/** Keeps href, router integration, keyboard and modified-click behavior native. */\n@Directive({ selector: 'a[vdNavigationLink]', host: { class: 'vd-navigation-link' } })\nexport class VdNavigationLink {}\n\n/** Preserves the consumer's heading level and section labelling. */\n@Directive({ selector: '[vdNavigationLabel]', host: { class: 'vd-navigation-label' } })\nexport class VdNavigationLabel {}\n\nexport const VD_NAVIGATION_LIST = [VdNavigationList, VdNavigationLink, VdNavigationLabel] as const;\n"],"mappings":";;;AAQA,IAAa,mBAAb,MAAa,iBAAgB;CAClB,QAAQ,MAAe,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAEb,IAAI,QAAQ,kBAAkB,EAAE,OAAO,KAAK,MAAK,CAAE;CAH3D,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAgB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AA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAiB,cAAA;EAAA,UAAA;EAAA,MAAA,EAAA,gBAAA,sBAAA;EAAA,UAAA;CAAA,CAAA;;AAAjB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAiB,YAAA,CAAA;EAD7B,MAAA;EAAU,MAAA,CAAA;GAAE,UAAU;GAAuB,MAAM,EAAE,OAAO,sBAAqB;EAAE,CAAE;;;AAGtF,MAAa,qBAAqB;CAAC;CAAkB;CAAkB;AAAiB"}
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, Directive, ElementRef, ViewEncapsulation, afterEveryRender, computed, contentChild, inject, input, signal } from "@angular/core";
|
|
3
|
+
import { VdIcon } from "@vadem/ui/icon";
|
|
4
|
+
import { VdInput } from "@vadem/ui/input";
|
|
5
|
+
import { vdTexts } from "@vadem/ui/locale";
|
|
6
|
+
function vdNumberStepValue(input, direction) {
|
|
7
|
+
if (input.type !== "number" || input.disabled || input.readOnly || input.validity.badInput) return null;
|
|
8
|
+
const probe = input.cloneNode();
|
|
9
|
+
probe.value = input.value;
|
|
10
|
+
try {
|
|
11
|
+
if (direction === 1) probe.stepUp();
|
|
12
|
+
else probe.stepDown();
|
|
13
|
+
} catch {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
if (probe.value === input.value || !Number.isFinite(probe.valueAsNumber)) return null;
|
|
17
|
+
if (Number.isFinite(input.valueAsNumber) && (probe.valueAsNumber - input.valueAsNumber) * direction <= 0) return null;
|
|
18
|
+
return probe.value;
|
|
19
|
+
}
|
|
20
|
+
var VdNumberInput = class VdNumberInput extends VdInput {
|
|
21
|
+
el = inject(ElementRef).nativeElement;
|
|
22
|
+
snapshot = signal(null, ...ngDevMode ? [{ debugName: "snapshot" }] : /* istanbul ignore next */ []);
|
|
23
|
+
locked = computed(() => {
|
|
24
|
+
this.snapshot();
|
|
25
|
+
return this.snapshot() === null || this.el.disabled || this.el.readOnly;
|
|
26
|
+
}, ...ngDevMode ? [{ debugName: "locked" }] : /* istanbul ignore next */ []);
|
|
27
|
+
canDecrease = computed(() => this.snapshot() !== null && vdNumberStepValue(this.el, -1) !== null, ...ngDevMode ? [{ debugName: "canDecrease" }] : /* istanbul ignore next */ []);
|
|
28
|
+
canIncrease = computed(() => this.snapshot() !== null && vdNumberStepValue(this.el, 1) !== null, ...ngDevMode ? [{ debugName: "canIncrease" }] : /* istanbul ignore next */ []);
|
|
29
|
+
constructor() {
|
|
30
|
+
super();
|
|
31
|
+
afterEveryRender(() => this.refresh());
|
|
32
|
+
}
|
|
33
|
+
refresh() {
|
|
34
|
+
this.snapshot.set(JSON.stringify([
|
|
35
|
+
this.el.type,
|
|
36
|
+
this.el.value,
|
|
37
|
+
this.el.getAttribute("value"),
|
|
38
|
+
this.el.min,
|
|
39
|
+
this.el.max,
|
|
40
|
+
this.el.step,
|
|
41
|
+
this.el.disabled,
|
|
42
|
+
this.el.readOnly,
|
|
43
|
+
this.el.validity.badInput
|
|
44
|
+
]));
|
|
45
|
+
}
|
|
46
|
+
step(direction) {
|
|
47
|
+
const value = vdNumberStepValue(this.el, direction);
|
|
48
|
+
if (value === null) return;
|
|
49
|
+
this.el.value = value;
|
|
50
|
+
this.refresh();
|
|
51
|
+
this.el.dispatchEvent(new Event("input", { bubbles: true }));
|
|
52
|
+
this.el.dispatchEvent(new Event("change", { bubbles: true }));
|
|
53
|
+
}
|
|
54
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
55
|
+
minVersion: "12.0.0",
|
|
56
|
+
version: "22.2.1",
|
|
57
|
+
ngImport: i0,
|
|
58
|
+
type: VdNumberInput,
|
|
59
|
+
deps: [],
|
|
60
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
61
|
+
});
|
|
62
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
63
|
+
minVersion: "14.0.0",
|
|
64
|
+
version: "22.2.1",
|
|
65
|
+
type: VdNumberInput,
|
|
66
|
+
isStandalone: true,
|
|
67
|
+
selector: "input[type=number][vdNumberInput]",
|
|
68
|
+
host: {
|
|
69
|
+
listeners: {
|
|
70
|
+
"input": "refresh()",
|
|
71
|
+
"change": "refresh()"
|
|
72
|
+
},
|
|
73
|
+
classAttribute: "vd-number-input__input"
|
|
74
|
+
},
|
|
75
|
+
exportAs: ["vdNumberInput"],
|
|
76
|
+
usesInheritance: true,
|
|
77
|
+
ngImport: i0
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
81
|
+
minVersion: "12.0.0",
|
|
82
|
+
version: "22.2.1",
|
|
83
|
+
ngImport: i0,
|
|
84
|
+
type: VdNumberInput,
|
|
85
|
+
decorators: [{
|
|
86
|
+
type: Directive,
|
|
87
|
+
args: [{
|
|
88
|
+
selector: "input[type=number][vdNumberInput]",
|
|
89
|
+
exportAs: "vdNumberInput",
|
|
90
|
+
host: {
|
|
91
|
+
class: "vd-number-input__input",
|
|
92
|
+
"(input)": "refresh()",
|
|
93
|
+
"(change)": "refresh()"
|
|
94
|
+
}
|
|
95
|
+
}]
|
|
96
|
+
}],
|
|
97
|
+
ctorParameters: () => []
|
|
98
|
+
});
|
|
99
|
+
var VdNumberInputGroup = class VdNumberInputGroup {
|
|
100
|
+
decreaseLabel = input(...ngDevMode ? [void 0, { debugName: "decreaseLabel" }] : /* istanbul ignore next */ []);
|
|
101
|
+
increaseLabel = input(...ngDevMode ? [void 0, { debugName: "increaseLabel" }] : /* istanbul ignore next */ []);
|
|
102
|
+
t = vdTexts("numberInput", {
|
|
103
|
+
decreaseLabel: this.decreaseLabel,
|
|
104
|
+
increaseLabel: this.increaseLabel
|
|
105
|
+
});
|
|
106
|
+
control = contentChild(VdNumberInput, ...ngDevMode ? [{ debugName: "control" }] : /* istanbul ignore next */ []);
|
|
107
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
108
|
+
minVersion: "12.0.0",
|
|
109
|
+
version: "22.2.1",
|
|
110
|
+
ngImport: i0,
|
|
111
|
+
type: VdNumberInputGroup,
|
|
112
|
+
deps: [],
|
|
113
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
114
|
+
});
|
|
115
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
116
|
+
minVersion: "17.2.0",
|
|
117
|
+
version: "22.2.1",
|
|
118
|
+
type: VdNumberInputGroup,
|
|
119
|
+
isStandalone: true,
|
|
120
|
+
selector: "vd-number-input",
|
|
121
|
+
inputs: {
|
|
122
|
+
decreaseLabel: {
|
|
123
|
+
classPropertyName: "decreaseLabel",
|
|
124
|
+
publicName: "decreaseLabel",
|
|
125
|
+
isSignal: true,
|
|
126
|
+
isRequired: false,
|
|
127
|
+
transformFunction: null
|
|
128
|
+
},
|
|
129
|
+
increaseLabel: {
|
|
130
|
+
classPropertyName: "increaseLabel",
|
|
131
|
+
publicName: "increaseLabel",
|
|
132
|
+
isSignal: true,
|
|
133
|
+
isRequired: false,
|
|
134
|
+
transformFunction: null
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
host: { classAttribute: "vd-input-group vd-number-input" },
|
|
138
|
+
queries: [{
|
|
139
|
+
propertyName: "control",
|
|
140
|
+
first: true,
|
|
141
|
+
predicate: VdNumberInput,
|
|
142
|
+
descendants: true,
|
|
143
|
+
isSignal: true
|
|
144
|
+
}],
|
|
145
|
+
ngImport: i0,
|
|
146
|
+
template: `
|
|
147
|
+
<button
|
|
148
|
+
class="vd-button"
|
|
149
|
+
data-icon-only
|
|
150
|
+
type="button"
|
|
151
|
+
data-variant="ghost"
|
|
152
|
+
slot="start"
|
|
153
|
+
[attr.data-size]="control()?.size() ?? 'md'"
|
|
154
|
+
[attr.aria-label]="t().decreaseLabel"
|
|
155
|
+
[attr.aria-controls]="control()?.id() ?? null"
|
|
156
|
+
[disabled]="control()?.locked() ?? true"
|
|
157
|
+
[attr.aria-disabled]="control()?.canDecrease() ? null : 'true'"
|
|
158
|
+
(click)="control()?.step(-1)"
|
|
159
|
+
>
|
|
160
|
+
<vd-icon name="minus" />
|
|
161
|
+
</button>
|
|
162
|
+
<ng-content select="input[vdNumberInput]" />
|
|
163
|
+
<button
|
|
164
|
+
class="vd-button"
|
|
165
|
+
data-icon-only
|
|
166
|
+
type="button"
|
|
167
|
+
data-variant="ghost"
|
|
168
|
+
slot="end"
|
|
169
|
+
[attr.data-size]="control()?.size() ?? 'md'"
|
|
170
|
+
[attr.aria-label]="t().increaseLabel"
|
|
171
|
+
[attr.aria-controls]="control()?.id() ?? null"
|
|
172
|
+
[disabled]="control()?.locked() ?? true"
|
|
173
|
+
[attr.aria-disabled]="control()?.canIncrease() ? null : 'true'"
|
|
174
|
+
(click)="control()?.step(1)"
|
|
175
|
+
>
|
|
176
|
+
<vd-icon name="plus" />
|
|
177
|
+
</button>
|
|
178
|
+
`,
|
|
179
|
+
isInline: true,
|
|
180
|
+
dependencies: [{
|
|
181
|
+
kind: "component",
|
|
182
|
+
type: VdIcon,
|
|
183
|
+
selector: "vd-icon",
|
|
184
|
+
inputs: ["name", "label"]
|
|
185
|
+
}],
|
|
186
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
187
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
188
|
+
});
|
|
189
|
+
};
|
|
190
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
191
|
+
minVersion: "12.0.0",
|
|
192
|
+
version: "22.2.1",
|
|
193
|
+
ngImport: i0,
|
|
194
|
+
type: VdNumberInputGroup,
|
|
195
|
+
decorators: [{
|
|
196
|
+
type: Component,
|
|
197
|
+
args: [{
|
|
198
|
+
selector: "vd-number-input",
|
|
199
|
+
imports: [VdIcon],
|
|
200
|
+
template: `
|
|
201
|
+
<button
|
|
202
|
+
class="vd-button"
|
|
203
|
+
data-icon-only
|
|
204
|
+
type="button"
|
|
205
|
+
data-variant="ghost"
|
|
206
|
+
slot="start"
|
|
207
|
+
[attr.data-size]="control()?.size() ?? 'md'"
|
|
208
|
+
[attr.aria-label]="t().decreaseLabel"
|
|
209
|
+
[attr.aria-controls]="control()?.id() ?? null"
|
|
210
|
+
[disabled]="control()?.locked() ?? true"
|
|
211
|
+
[attr.aria-disabled]="control()?.canDecrease() ? null : 'true'"
|
|
212
|
+
(click)="control()?.step(-1)"
|
|
213
|
+
>
|
|
214
|
+
<vd-icon name="minus" />
|
|
215
|
+
</button>
|
|
216
|
+
<ng-content select="input[vdNumberInput]" />
|
|
217
|
+
<button
|
|
218
|
+
class="vd-button"
|
|
219
|
+
data-icon-only
|
|
220
|
+
type="button"
|
|
221
|
+
data-variant="ghost"
|
|
222
|
+
slot="end"
|
|
223
|
+
[attr.data-size]="control()?.size() ?? 'md'"
|
|
224
|
+
[attr.aria-label]="t().increaseLabel"
|
|
225
|
+
[attr.aria-controls]="control()?.id() ?? null"
|
|
226
|
+
[disabled]="control()?.locked() ?? true"
|
|
227
|
+
[attr.aria-disabled]="control()?.canIncrease() ? null : 'true'"
|
|
228
|
+
(click)="control()?.step(1)"
|
|
229
|
+
>
|
|
230
|
+
<vd-icon name="plus" />
|
|
231
|
+
</button>
|
|
232
|
+
`,
|
|
233
|
+
host: { class: "vd-input-group vd-number-input" },
|
|
234
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
235
|
+
encapsulation: ViewEncapsulation.None
|
|
236
|
+
}]
|
|
237
|
+
}],
|
|
238
|
+
propDecorators: {
|
|
239
|
+
decreaseLabel: [{
|
|
240
|
+
type: i0.Input,
|
|
241
|
+
args: [{
|
|
242
|
+
isSignal: true,
|
|
243
|
+
alias: "decreaseLabel",
|
|
244
|
+
required: false
|
|
245
|
+
}]
|
|
246
|
+
}],
|
|
247
|
+
increaseLabel: [{
|
|
248
|
+
type: i0.Input,
|
|
249
|
+
args: [{
|
|
250
|
+
isSignal: true,
|
|
251
|
+
alias: "increaseLabel",
|
|
252
|
+
required: false
|
|
253
|
+
}]
|
|
254
|
+
}],
|
|
255
|
+
control: [{
|
|
256
|
+
type: i0.ContentChild,
|
|
257
|
+
args: [i0.forwardRef(() => VdNumberInput), { isSignal: true }]
|
|
258
|
+
}]
|
|
259
|
+
}
|
|
260
|
+
});
|
|
261
|
+
const VD_NUMBER_INPUT = [VdNumberInputGroup, VdNumberInput];
|
|
262
|
+
export { VD_NUMBER_INPUT, VdNumberInput, VdNumberInputGroup };
|
|
263
|
+
|
|
264
|
+
//# sourceMappingURL=vadem-ui-number-input.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vadem-ui-number-input.mjs","names":[],"sources":["../../../projects/ui/number-input/src/core/number-input.ts","../../../projects/ui/number-input/src/number-input.ts"],"sourcesContent":["/** Probe native decimal alignment/bounds without mutating the real form field. */\nexport function vdNumberStepValue(input: HTMLInputElement, direction: -1 | 1): string | null {\n if (input.type !== 'number' || input.disabled || input.readOnly || input.validity.badInput)\n return null;\n const probe = input.cloneNode() as HTMLInputElement;\n probe.value = input.value;\n try {\n if (direction === 1) probe.stepUp();\n else probe.stepDown();\n } catch {\n // Native stepping is unavailable for step=\"any\".\n return null;\n }\n if (probe.value === input.value || !Number.isFinite(probe.valueAsNumber)) return null;\n if (\n Number.isFinite(input.valueAsNumber) &&\n (probe.valueAsNumber - input.valueAsNumber) * direction <= 0\n )\n return null;\n return probe.value;\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n ElementRef,\n ViewEncapsulation,\n afterEveryRender,\n computed,\n contentChild,\n inject,\n input,\n signal,\n} from '@angular/core';\nimport { VdIcon } from '@vadem/ui/icon';\nimport { VdInput } from '@vadem/ui/input';\nimport { vdNumberStepValue } from './core/number-input';\nimport { vdTexts } from '@vadem/ui/locale';\n\n/** Numeric native Input: the platform/forms accessor remains the source of value. */\n@Directive({\n selector: 'input[type=number][vdNumberInput]',\n exportAs: 'vdNumberInput',\n host: { class: 'vd-number-input__input', '(input)': 'refresh()', '(change)': 'refresh()' },\n})\nexport class VdNumberInput extends VdInput {\n private readonly el: HTMLInputElement = inject(ElementRef).nativeElement;\n private readonly snapshot = signal<string | null>(null);\n readonly locked = computed(() => {\n this.snapshot();\n return this.snapshot() === null || this.el.disabled || this.el.readOnly;\n });\n readonly canDecrease = computed(\n () => this.snapshot() !== null && vdNumberStepValue(this.el, -1) !== null,\n );\n readonly canIncrease = computed(\n () => this.snapshot() !== null && vdNumberStepValue(this.el, 1) !== null,\n );\n\n constructor() {\n super();\n // Browser-only. Equality of the serialized snapshot prevents render feedback loops.\n afterEveryRender(() => this.refresh());\n }\n\n refresh(): void {\n this.snapshot.set(\n JSON.stringify([\n this.el.type,\n this.el.value,\n this.el.getAttribute('value'),\n this.el.min,\n this.el.max,\n this.el.step,\n this.el.disabled,\n this.el.readOnly,\n this.el.validity.badInput,\n ]),\n );\n }\n\n step(direction: -1 | 1): void {\n const value = vdNumberStepValue(this.el, direction);\n if (value === null) return;\n this.el.value = value;\n this.refresh();\n this.el.dispatchEvent(new Event('input', { bubbles: true }));\n this.el.dispatchEvent(new Event('change', { bubbles: true }));\n }\n}\n\n@Component({\n selector: 'vd-number-input',\n imports: [VdIcon],\n template: `\n <button\n class=\"vd-button\"\n data-icon-only\n type=\"button\"\n data-variant=\"ghost\"\n slot=\"start\"\n [attr.data-size]=\"control()?.size() ?? 'md'\"\n [attr.aria-label]=\"t().decreaseLabel\"\n [attr.aria-controls]=\"control()?.id() ?? null\"\n [disabled]=\"control()?.locked() ?? true\"\n [attr.aria-disabled]=\"control()?.canDecrease() ? null : 'true'\"\n (click)=\"control()?.step(-1)\"\n >\n <vd-icon name=\"minus\" />\n </button>\n <ng-content select=\"input[vdNumberInput]\" />\n <button\n class=\"vd-button\"\n data-icon-only\n type=\"button\"\n data-variant=\"ghost\"\n slot=\"end\"\n [attr.data-size]=\"control()?.size() ?? 'md'\"\n [attr.aria-label]=\"t().increaseLabel\"\n [attr.aria-controls]=\"control()?.id() ?? null\"\n [disabled]=\"control()?.locked() ?? true\"\n [attr.aria-disabled]=\"control()?.canIncrease() ? null : 'true'\"\n (click)=\"control()?.step(1)\"\n >\n <vd-icon name=\"plus\" />\n </button>\n `,\n host: { class: 'vd-input-group vd-number-input' },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class VdNumberInputGroup {\n readonly decreaseLabel = input<string>();\n readonly increaseLabel = input<string>();\n /** Text inputs resolved against the active VD_LOCALE. */\n protected readonly t = vdTexts('numberInput', {\n decreaseLabel: this.decreaseLabel,\n increaseLabel: this.increaseLabel,\n });\n protected readonly control = contentChild(VdNumberInput);\n}\n\nexport const VD_NUMBER_INPUT = [VdNumberInputGroup, VdNumberInput] as const;\n"],"mappings":";;;;;AACA,SAAgB,kBAAkB,OAAyB,WAAiB;CAC1E,IAAI,MAAM,SAAS,YAAY,MAAM,YAAY,MAAM,YAAY,MAAM,SAAS,UAChF,OAAO;CACT,MAAM,QAAQ,MAAM,UAAS;CAC7B,MAAM,QAAQ,MAAM;CACpB,IAAI;EACF,IAAI,cAAc,GAAG,MAAM,OAAM;OAC5B,MAAM,SAAQ;CACrB,QAAQ;EAEN,OAAO;CACT;CACA,IAAI,MAAM,UAAU,MAAM,SAAS,CAAC,OAAO,SAAS,MAAM,aAAa,GAAG,OAAO;CACjF,IACE,OAAO,SAAS,MAAM,aAAa,MAClC,MAAM,gBAAgB,MAAM,iBAAiB,aAAa,GAE3D,OAAO;CACT,OAAO,MAAM;AACf;ACIA,IAAa,gBAAb,MAAa,sBAAsB,QAAO;CACvB,KAAuB,OAAO,UAAU,CAAC,CAAC;CAC1C,WAAW,OAAsB,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAC9C,SAAS,eAAc;EAC9B,KAAK,SAAQ;EACb,OAAO,KAAK,SAAQ,MAAO,QAAQ,KAAK,GAAG,YAAY,KAAK,GAAG;CACjE,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,SAAA,CAAA,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A;GAAA,MAAA;GAAA,MAjCS;GAAM,UAAA;GAAA,QAAA,CAAA,QAAA,OAAA;EAAA,CAAA;EAAA,iBAAA,GAAA,wBAAA;EAAA,eAAA,GAAA,kBAAA;CAAA,CAAA;;AAsCL,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAkB,YAAA,CAAA;EAxC9B,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,SAAS,CAAC,MAAM;GAChB,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCV,MAAM,EAAE,OAAO,iCAAgC;GAC/C,iBAAiB,wBAAwB;GACzC,eAAe,kBAAkB;EAClC,CAAA;CAS2C,CAAA;CAAA,gBAAA;EAAA,eAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,eAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,SAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBAAA,aAAa,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA;AAGzD,MAAa,kBAAkB,CAAC,oBAAoB,aAAa"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Directive, computed, input, numberAttribute } from "@angular/core";
|
|
3
|
+
import { VdInput } from "@vadem/ui/input";
|
|
4
|
+
var VdOtpInput = class VdOtpInput extends VdInput {
|
|
5
|
+
length = input(6, {
|
|
6
|
+
...ngDevMode ? { debugName: "length" } : /* istanbul ignore next */ {},
|
|
7
|
+
transform: numberAttribute
|
|
8
|
+
});
|
|
9
|
+
codeLength = computed(() => {
|
|
10
|
+
const length = this.length();
|
|
11
|
+
return Number.isFinite(length) ? Math.min(12, Math.max(1, Math.trunc(length))) : 6;
|
|
12
|
+
}, ...ngDevMode ? [{ debugName: "codeLength" }] : /* istanbul ignore next */ []);
|
|
13
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
14
|
+
minVersion: "12.0.0",
|
|
15
|
+
version: "22.2.1",
|
|
16
|
+
ngImport: i0,
|
|
17
|
+
type: VdOtpInput,
|
|
18
|
+
deps: null,
|
|
19
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
20
|
+
});
|
|
21
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
22
|
+
minVersion: "17.1.0",
|
|
23
|
+
version: "22.2.1",
|
|
24
|
+
type: VdOtpInput,
|
|
25
|
+
isStandalone: true,
|
|
26
|
+
selector: "input[vdOtpInput]",
|
|
27
|
+
inputs: { length: {
|
|
28
|
+
classPropertyName: "length",
|
|
29
|
+
publicName: "length",
|
|
30
|
+
isSignal: true,
|
|
31
|
+
isRequired: false,
|
|
32
|
+
transformFunction: null
|
|
33
|
+
} },
|
|
34
|
+
host: {
|
|
35
|
+
attributes: {
|
|
36
|
+
"type": "text",
|
|
37
|
+
"inputmode": "numeric",
|
|
38
|
+
"autocomplete": "one-time-code",
|
|
39
|
+
"spellcheck": "false",
|
|
40
|
+
"dir": "ltr"
|
|
41
|
+
},
|
|
42
|
+
properties: {
|
|
43
|
+
"attr.maxlength": "codeLength()",
|
|
44
|
+
"attr.pattern": "\"[0-9]{\" + codeLength() + \"}\"",
|
|
45
|
+
"style.--vd-otp-input-length": "codeLength()"
|
|
46
|
+
},
|
|
47
|
+
classAttribute: "vd-otp-input"
|
|
48
|
+
},
|
|
49
|
+
usesInheritance: true,
|
|
50
|
+
ngImport: i0
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
54
|
+
minVersion: "12.0.0",
|
|
55
|
+
version: "22.2.1",
|
|
56
|
+
ngImport: i0,
|
|
57
|
+
type: VdOtpInput,
|
|
58
|
+
decorators: [{
|
|
59
|
+
type: Directive,
|
|
60
|
+
args: [{
|
|
61
|
+
selector: "input[vdOtpInput]",
|
|
62
|
+
host: {
|
|
63
|
+
class: "vd-otp-input",
|
|
64
|
+
type: "text",
|
|
65
|
+
inputmode: "numeric",
|
|
66
|
+
autocomplete: "one-time-code",
|
|
67
|
+
spellcheck: "false",
|
|
68
|
+
dir: "ltr",
|
|
69
|
+
"[attr.maxlength]": "codeLength()",
|
|
70
|
+
"[attr.pattern]": "\"[0-9]{\" + codeLength() + \"}\"",
|
|
71
|
+
"[style.--vd-otp-input-length]": "codeLength()"
|
|
72
|
+
}
|
|
73
|
+
}]
|
|
74
|
+
}],
|
|
75
|
+
propDecorators: { length: [{
|
|
76
|
+
type: i0.Input,
|
|
77
|
+
args: [{
|
|
78
|
+
isSignal: true,
|
|
79
|
+
alias: "length",
|
|
80
|
+
required: false
|
|
81
|
+
}]
|
|
82
|
+
}] }
|
|
83
|
+
});
|
|
84
|
+
export { VdOtpInput };
|
|
85
|
+
|
|
86
|
+
//# sourceMappingURL=vadem-ui-otp-input.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vadem-ui-otp-input.mjs","names":[],"sources":["../../../projects/ui/otp-input/src/otp-input.ts"],"sourcesContent":["import { computed, Directive, input, numberAttribute } from '@angular/core';\nimport { VdInput } from '@vadem/ui/input';\n\n/** One native code field: editing, clipboard, autofill and value accessors remain native. */\n@Directive({\n selector: 'input[vdOtpInput]',\n host: {\n class: 'vd-otp-input',\n type: 'text',\n inputmode: 'numeric',\n autocomplete: 'one-time-code',\n spellcheck: 'false',\n dir: 'ltr',\n '[attr.maxlength]': 'codeLength()',\n '[attr.pattern]': '\"[0-9]{\" + codeLength() + \"}\"',\n '[style.--vd-otp-input-length]': 'codeLength()',\n },\n})\nexport class VdOtpInput extends VdInput {\n readonly length = input(6, { transform: numberAttribute });\n protected readonly codeLength = computed(() => {\n const length = this.length();\n return Number.isFin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