@molecule/app-ui-angular 1.0.6 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11740 -1143
- package/dist/components/accordion.component.d.ts +114 -0
- package/dist/components/accordion.component.d.ts.map +1 -0
- package/dist/components/accordion.component.js +286 -0
- package/dist/components/accordion.component.js.map +1 -0
- package/dist/components/alert.component.d.ts +81 -37
- package/dist/components/alert.component.d.ts.map +1 -1
- package/dist/components/alert.component.js +232 -146
- package/dist/components/alert.component.js.map +1 -1
- package/dist/components/auth-guard.component.d.ts +94 -0
- package/dist/components/auth-guard.component.d.ts.map +1 -0
- package/dist/components/auth-guard.component.js +212 -0
- package/dist/components/auth-guard.component.js.map +1 -0
- package/dist/components/avatar.component.d.ts +97 -0
- package/dist/components/avatar.component.d.ts.map +1 -0
- package/dist/components/avatar.component.js +216 -0
- package/dist/components/avatar.component.js.map +1 -0
- package/dist/components/badge.component.d.ts +27 -12
- package/dist/components/badge.component.d.ts.map +1 -1
- package/dist/components/badge.component.js +47 -47
- package/dist/components/badge.component.js.map +1 -1
- package/dist/components/button.component.d.ts +96 -14
- package/dist/components/button.component.d.ts.map +1 -1
- package/dist/components/button.component.js +232 -87
- package/dist/components/button.component.js.map +1 -1
- package/dist/components/card.component.d.ts +135 -0
- package/dist/components/card.component.d.ts.map +1 -0
- package/dist/components/card.component.js +291 -0
- package/dist/components/card.component.js.map +1 -0
- package/dist/components/checkbox.component.d.ts +102 -29
- package/dist/components/checkbox.component.d.ts.map +1 -1
- package/dist/components/checkbox.component.js +222 -113
- package/dist/components/checkbox.component.js.map +1 -1
- package/dist/components/confirm-button.component.d.ts +130 -0
- package/dist/components/confirm-button.component.d.ts.map +1 -0
- package/dist/components/confirm-button.component.js +322 -0
- package/dist/components/confirm-button.component.js.map +1 -0
- package/dist/components/confirm-dialog.component.d.ts +60 -0
- package/dist/components/confirm-dialog.component.d.ts.map +1 -0
- package/dist/components/confirm-dialog.component.js +152 -0
- package/dist/components/confirm-dialog.component.js.map +1 -0
- package/dist/components/dropdown.component.d.ts +313 -0
- package/dist/components/dropdown.component.d.ts.map +1 -0
- package/dist/components/dropdown.component.js +919 -0
- package/dist/components/dropdown.component.js.map +1 -0
- package/dist/components/empty-state.component.d.ts +73 -0
- package/dist/components/empty-state.component.d.ts.map +1 -0
- package/dist/components/empty-state.component.js +180 -0
- package/dist/components/empty-state.component.js.map +1 -0
- package/dist/components/floating-input.component.d.ts +86 -0
- package/dist/components/floating-input.component.d.ts.map +1 -0
- package/dist/components/floating-input.component.js +167 -0
- package/dist/components/floating-input.component.js.map +1 -0
- package/dist/components/form-field.component.d.ts +111 -0
- package/dist/components/form-field.component.d.ts.map +1 -0
- package/dist/components/form-field.component.js +300 -0
- package/dist/components/form-field.component.js.map +1 -0
- package/dist/components/form.component.d.ts +77 -0
- package/dist/components/form.component.d.ts.map +1 -0
- package/dist/components/form.component.js +222 -0
- package/dist/components/form.component.js.map +1 -0
- package/dist/components/icon.component.d.ts +85 -0
- package/dist/components/icon.component.d.ts.map +1 -0
- package/dist/components/icon.component.js +187 -0
- package/dist/components/icon.component.js.map +1 -0
- package/dist/components/index.d.ts +49 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +49 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/input.component.d.ts +157 -54
- package/dist/components/input.component.d.ts.map +1 -1
- package/dist/components/input.component.js +437 -222
- package/dist/components/input.component.js.map +1 -1
- package/dist/components/label.component.d.ts +29 -0
- package/dist/components/label.component.d.ts.map +1 -0
- package/dist/components/label.component.js +60 -0
- package/dist/components/label.component.js.map +1 -0
- package/dist/components/language-picker.component.d.ts +124 -0
- package/dist/components/language-picker.component.d.ts.map +1 -0
- package/dist/components/language-picker.component.js +305 -0
- package/dist/components/language-picker.component.js.map +1 -0
- package/dist/components/layout.component.d.ts +167 -0
- package/dist/components/layout.component.d.ts.map +1 -0
- package/dist/components/layout.component.js +364 -0
- package/dist/components/layout.component.js.map +1 -0
- package/dist/components/load-error-banner.component.d.ts +103 -0
- package/dist/components/load-error-banner.component.d.ts.map +1 -0
- package/dist/components/load-error-banner.component.js +263 -0
- package/dist/components/load-error-banner.component.js.map +1 -0
- package/dist/components/modal.component.d.ts +125 -95
- package/dist/components/modal.component.d.ts.map +1 -1
- package/dist/components/modal.component.js +458 -271
- package/dist/components/modal.component.js.map +1 -1
- package/dist/components/molecule/alert.component.d.ts +77 -0
- package/dist/components/molecule/alert.component.d.ts.map +1 -0
- package/dist/components/molecule/alert.component.js +229 -0
- package/dist/components/molecule/alert.component.js.map +1 -0
- package/dist/components/molecule/badge.component.d.ts +27 -0
- package/dist/components/molecule/badge.component.d.ts.map +1 -0
- package/dist/components/molecule/badge.component.js +79 -0
- package/dist/components/molecule/badge.component.js.map +1 -0
- package/dist/components/molecule/button.component.d.ts +38 -0
- package/dist/components/molecule/button.component.d.ts.map +1 -0
- package/dist/components/molecule/button.component.js +137 -0
- package/dist/components/molecule/button.component.js.map +1 -0
- package/dist/components/molecule/checkbox.component.d.ts +53 -0
- package/dist/components/molecule/checkbox.component.d.ts.map +1 -0
- package/dist/components/molecule/checkbox.component.js +166 -0
- package/dist/components/molecule/checkbox.component.js.map +1 -0
- package/dist/components/molecule/index.d.ts +18 -0
- package/dist/components/molecule/index.d.ts.map +1 -0
- package/dist/components/molecule/index.js +18 -0
- package/dist/components/molecule/index.js.map +1 -0
- package/dist/components/molecule/input.component.d.ts +93 -0
- package/dist/components/molecule/input.component.d.ts.map +1 -0
- package/dist/components/molecule/input.component.js +314 -0
- package/dist/components/molecule/input.component.js.map +1 -0
- package/dist/components/molecule/modal.component.d.ts +148 -0
- package/dist/components/molecule/modal.component.d.ts.map +1 -0
- package/dist/components/molecule/modal.component.js +382 -0
- package/dist/components/molecule/modal.component.js.map +1 -0
- package/dist/components/molecule/radio-group.component.d.ts +63 -0
- package/dist/components/molecule/radio-group.component.d.ts.map +1 -0
- package/dist/components/molecule/radio-group.component.js +208 -0
- package/dist/components/molecule/radio-group.component.js.map +1 -0
- package/dist/components/molecule/select.component.d.ts +72 -0
- package/dist/components/molecule/select.component.d.ts.map +1 -0
- package/dist/components/molecule/select.component.js +274 -0
- package/dist/components/molecule/select.component.js.map +1 -0
- package/dist/components/molecule/spinner.component.d.ts +42 -0
- package/dist/components/molecule/spinner.component.d.ts.map +1 -0
- package/dist/components/molecule/spinner.component.js +122 -0
- package/dist/components/molecule/spinner.component.js.map +1 -0
- package/dist/components/molecule/switch.component.d.ts +54 -0
- package/dist/components/molecule/switch.component.d.ts.map +1 -0
- package/dist/components/molecule/switch.component.js +148 -0
- package/dist/components/molecule/switch.component.js.map +1 -0
- package/dist/components/molecule/toast.component.d.ts +98 -0
- package/dist/components/molecule/toast.component.d.ts.map +1 -0
- package/dist/components/molecule/toast.component.js +305 -0
- package/dist/components/molecule/toast.component.js.map +1 -0
- package/dist/components/molecule/tooltip.component.d.ts +77 -0
- package/dist/components/molecule/tooltip.component.d.ts.map +1 -0
- package/dist/components/molecule/tooltip.component.js +316 -0
- package/dist/components/molecule/tooltip.component.js.map +1 -0
- package/dist/components/optimistic-toggle-button.component.d.ts +125 -0
- package/dist/components/optimistic-toggle-button.component.d.ts.map +1 -0
- package/dist/components/optimistic-toggle-button.component.js +296 -0
- package/dist/components/optimistic-toggle-button.component.js.map +1 -0
- package/dist/components/page-header.component.d.ts +77 -0
- package/dist/components/page-header.component.d.ts.map +1 -0
- package/dist/components/page-header.component.js +225 -0
- package/dist/components/page-header.component.js.map +1 -0
- package/dist/components/page-shell.component.d.ts +101 -0
- package/dist/components/page-shell.component.d.ts.map +1 -0
- package/dist/components/page-shell.component.js +221 -0
- package/dist/components/page-shell.component.js.map +1 -0
- package/dist/components/pagination.component.d.ts +137 -0
- package/dist/components/pagination.component.d.ts.map +1 -0
- package/dist/components/pagination.component.js +419 -0
- package/dist/components/pagination.component.js.map +1 -0
- package/dist/components/panel-close.component.d.ts +43 -0
- package/dist/components/panel-close.component.d.ts.map +1 -0
- package/dist/components/panel-close.component.js +75 -0
- package/dist/components/panel-close.component.js.map +1 -0
- package/dist/components/progress.component.d.ts +84 -0
- package/dist/components/progress.component.d.ts.map +1 -0
- package/dist/components/progress.component.js +219 -0
- package/dist/components/progress.component.js.map +1 -0
- package/dist/components/prompt-dialog.component.d.ts +121 -0
- package/dist/components/prompt-dialog.component.d.ts.map +1 -0
- package/dist/components/prompt-dialog.component.js +332 -0
- package/dist/components/prompt-dialog.component.js.map +1 -0
- package/dist/components/radio-group.component.d.ts +66 -34
- package/dist/components/radio-group.component.d.ts.map +1 -1
- package/dist/components/radio-group.component.js +146 -125
- package/dist/components/radio-group.component.js.map +1 -1
- package/dist/components/responsive-app-shell.component.d.ts +408 -0
- package/dist/components/responsive-app-shell.component.d.ts.map +1 -0
- package/dist/components/responsive-app-shell.component.js +1144 -0
- package/dist/components/responsive-app-shell.component.js.map +1 -0
- package/dist/components/select.component.d.ts +135 -38
- package/dist/components/select.component.d.ts.map +1 -1
- package/dist/components/select.component.js +373 -181
- package/dist/components/select.component.js.map +1 -1
- package/dist/components/separator.component.d.ts +39 -0
- package/dist/components/separator.component.d.ts.map +1 -0
- package/dist/components/separator.component.js +73 -0
- package/dist/components/separator.component.js.map +1 -0
- package/dist/components/sidebar-user-card.component.d.ts +106 -0
- package/dist/components/sidebar-user-card.component.d.ts.map +1 -0
- package/dist/components/sidebar-user-card.component.js +277 -0
- package/dist/components/sidebar-user-card.component.js.map +1 -0
- package/dist/components/skeleton.component.d.ts +100 -0
- package/dist/components/skeleton.component.d.ts.map +1 -0
- package/dist/components/skeleton.component.js +214 -0
- package/dist/components/skeleton.component.js.map +1 -0
- package/dist/components/spinner.component.d.ts +36 -19
- package/dist/components/spinner.component.d.ts.map +1 -1
- package/dist/components/spinner.component.js +69 -71
- package/dist/components/spinner.component.js.map +1 -1
- package/dist/components/switch.component.d.ts +72 -29
- package/dist/components/switch.component.d.ts.map +1 -1
- package/dist/components/switch.component.js +163 -91
- package/dist/components/switch.component.js.map +1 -1
- package/dist/components/table.component.d.ts +193 -0
- package/dist/components/table.component.d.ts.map +1 -0
- package/dist/components/table.component.js +550 -0
- package/dist/components/table.component.js.map +1 -0
- package/dist/components/tabs.component.d.ts +140 -0
- package/dist/components/tabs.component.d.ts.map +1 -0
- package/dist/components/tabs.component.js +390 -0
- package/dist/components/tabs.component.js.map +1 -0
- package/dist/components/template-outlet.directive.d.ts +50 -0
- package/dist/components/template-outlet.directive.d.ts.map +1 -0
- package/dist/components/template-outlet.directive.js +81 -0
- package/dist/components/template-outlet.directive.js.map +1 -0
- package/dist/components/textarea.component.d.ts +151 -0
- package/dist/components/textarea.component.d.ts.map +1 -0
- package/dist/components/textarea.component.js +340 -0
- package/dist/components/textarea.component.js.map +1 -0
- package/dist/components/theme-toggle.component.d.ts +58 -0
- package/dist/components/theme-toggle.component.d.ts.map +1 -0
- package/dist/components/theme-toggle.component.js +124 -0
- package/dist/components/theme-toggle.component.js.map +1 -0
- package/dist/components/toast.component.d.ts +237 -49
- package/dist/components/toast.component.d.ts.map +1 -1
- package/dist/components/toast.component.js +636 -201
- package/dist/components/toast.component.js.map +1 -1
- package/dist/components/tooltip.component.d.ts +95 -45
- package/dist/components/tooltip.component.d.ts.map +1 -1
- package/dist/components/tooltip.component.js +372 -221
- package/dist/components/tooltip.component.js.map +1 -1
- package/dist/components/user-menu-popover.component.d.ts +283 -0
- package/dist/components/user-menu-popover.component.d.ts.map +1 -0
- package/dist/components/user-menu-popover.component.js +646 -0
- package/dist/components/user-menu-popover.component.js.map +1 -0
- package/dist/components/user-menu.component.d.ts +95 -0
- package/dist/components/user-menu.component.d.ts.map +1 -0
- package/dist/components/user-menu.component.js +218 -0
- package/dist/components/user-menu.component.js.map +1 -0
- package/dist/hooks/index.d.ts +7 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +7 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/use-is-desktop.d.ts +22 -0
- package/dist/hooks/use-is-desktop.d.ts.map +1 -0
- package/dist/hooks/use-is-desktop.js +37 -0
- package/dist/hooks/use-is-desktop.js.map +1 -0
- package/dist/index.d.ts +32 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +32 -17
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/utilities/dom-context.d.ts +42 -0
- package/dist/utilities/dom-context.d.ts.map +1 -0
- package/dist/utilities/dom-context.js +66 -0
- package/dist/utilities/dom-context.js.map +1 -0
- package/dist/utilities/focus.d.ts +32 -0
- package/dist/utilities/focus.d.ts.map +1 -0
- package/dist/utilities/focus.js +47 -0
- package/dist/utilities/focus.js.map +1 -0
- package/dist/utilities/form-field-context.d.ts +34 -0
- package/dist/utilities/form-field-context.d.ts.map +1 -0
- package/dist/utilities/form-field-context.js +28 -0
- package/dist/utilities/form-field-context.js.map +1 -0
- package/dist/utilities/form-submit-error.d.ts +17 -0
- package/dist/utilities/form-submit-error.d.ts.map +1 -0
- package/dist/utilities/form-submit-error.js +42 -0
- package/dist/utilities/form-submit-error.js.map +1 -0
- package/dist/utilities/icon-markup.d.ts +17 -0
- package/dist/utilities/icon-markup.d.ts.map +1 -0
- package/dist/utilities/icon-markup.js +46 -0
- package/dist/utilities/icon-markup.js.map +1 -0
- package/dist/utilities/ids.d.ts +15 -0
- package/dist/utilities/ids.d.ts.map +1 -0
- package/dist/utilities/ids.js +19 -0
- package/dist/utilities/ids.js.map +1 -0
- package/dist/utilities/index.d.ts +11 -0
- package/dist/utilities/index.d.ts.map +1 -1
- package/dist/utilities/index.js +11 -0
- package/dist/utilities/index.js.map +1 -1
- package/dist/utilities/initials.d.ts +13 -0
- package/dist/utilities/initials.d.ts.map +1 -0
- package/dist/utilities/initials.js +23 -0
- package/dist/utilities/initials.js.map +1 -0
- package/dist/utilities/node-value.d.ts +31 -0
- package/dist/utilities/node-value.d.ts.map +1 -0
- package/dist/utilities/node-value.js +37 -0
- package/dist/utilities/node-value.js.map +1 -0
- package/dist/utilities/optimistic-value.d.ts +81 -0
- package/dist/utilities/optimistic-value.d.ts.map +1 -0
- package/dist/utilities/optimistic-value.js +154 -0
- package/dist/utilities/optimistic-value.js.map +1 -0
- package/dist/utilities/render-icon.d.ts +77 -7
- package/dist/utilities/render-icon.d.ts.map +1 -1
- package/dist/utilities/render-icon.js +123 -33
- package/dist/utilities/render-icon.js.map +1 -1
- package/dist/utilities/rest-attrs.d.ts +21 -0
- package/dist/utilities/rest-attrs.d.ts.map +1 -0
- package/dist/utilities/rest-attrs.js +37 -0
- package/dist/utilities/rest-attrs.js.map +1 -0
- package/dist/utilities/style.d.ts +23 -0
- package/dist/utilities/style.d.ts.map +1 -0
- package/dist/utilities/style.js +86 -0
- package/dist/utilities/style.js.map +1 -0
- package/package.json +6 -4
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Angular Input UI component with UIClassMap-driven styling.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';
|
|
7
|
+
import { useTranslation } from '@molecule/app-angular';
|
|
8
|
+
import { getClassMap } from '@molecule/app-ui';
|
|
9
|
+
import { getIconSvg } from '../../utilities/icon-markup.js';
|
|
10
|
+
import * as i0 from "@angular/core";
|
|
11
|
+
function MoleculeInput_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
12
|
+
i0.ɵɵdomElementStart(0, "label");
|
|
13
|
+
i0.ɵɵtext(1);
|
|
14
|
+
i0.ɵɵdomElementEnd();
|
|
15
|
+
} if (rf & 2) {
|
|
16
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
17
|
+
i0.ɵɵclassMap(ctx_r0.labelClasses);
|
|
18
|
+
i0.ɵɵattribute("for", ctx_r0.inputId);
|
|
19
|
+
i0.ɵɵadvance();
|
|
20
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r0.label, " ");
|
|
21
|
+
} }
|
|
22
|
+
function MoleculeInput_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
23
|
+
const _r2 = i0.ɵɵgetCurrentView();
|
|
24
|
+
i0.ɵɵdomElementStart(0, "div")(1, "button", 3);
|
|
25
|
+
i0.ɵɵdomListener("click", function MoleculeInput_Conditional_4_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.handleClear.emit()); });
|
|
26
|
+
i0.ɵɵdomElement(2, "span", 4);
|
|
27
|
+
i0.ɵɵdomElementEnd()();
|
|
28
|
+
} if (rf & 2) {
|
|
29
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
30
|
+
i0.ɵɵclassMap(ctx_r0.cm.inputClearButton);
|
|
31
|
+
i0.ɵɵadvance();
|
|
32
|
+
i0.ɵɵclassMap(ctx_r0.cm.inputClearButton);
|
|
33
|
+
i0.ɵɵattribute("aria-label", ctx_r0.clearAriaLabel);
|
|
34
|
+
i0.ɵɵadvance();
|
|
35
|
+
i0.ɵɵdomProperty("innerHTML", ctx_r0.clearIconSvg, i0.ɵɵsanitizeHtml);
|
|
36
|
+
} }
|
|
37
|
+
function MoleculeInput_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
38
|
+
i0.ɵɵdomElementStart(0, "p", 5);
|
|
39
|
+
i0.ɵɵtext(1);
|
|
40
|
+
i0.ɵɵdomElementEnd();
|
|
41
|
+
} if (rf & 2) {
|
|
42
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
43
|
+
i0.ɵɵclassMap(ctx_r0.formErrorClass);
|
|
44
|
+
i0.ɵɵdomProperty("id", ctx_r0.inputId + "-error");
|
|
45
|
+
i0.ɵɵadvance();
|
|
46
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r0.error, " ");
|
|
47
|
+
} }
|
|
48
|
+
function MoleculeInput_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
49
|
+
i0.ɵɵdomElementStart(0, "p", 5);
|
|
50
|
+
i0.ɵɵtext(1);
|
|
51
|
+
i0.ɵɵdomElementEnd();
|
|
52
|
+
} if (rf & 2) {
|
|
53
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
54
|
+
i0.ɵɵclassMap(ctx_r0.formHintClass);
|
|
55
|
+
i0.ɵɵdomProperty("id", ctx_r0.inputId + "-hint");
|
|
56
|
+
i0.ɵɵadvance();
|
|
57
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r0.hint, " ");
|
|
58
|
+
} }
|
|
59
|
+
/**
|
|
60
|
+
* Angular Input UI component with UIClassMap-driven styling.
|
|
61
|
+
*/
|
|
62
|
+
/**
|
|
63
|
+
* Molecule Input class.
|
|
64
|
+
* @deprecated Use the React-named component `Input` instead.
|
|
65
|
+
*/
|
|
66
|
+
export class MoleculeInput {
|
|
67
|
+
type = 'text';
|
|
68
|
+
size = 'md';
|
|
69
|
+
label;
|
|
70
|
+
error;
|
|
71
|
+
hint;
|
|
72
|
+
clearable = false;
|
|
73
|
+
clearLabel;
|
|
74
|
+
className;
|
|
75
|
+
style;
|
|
76
|
+
testId;
|
|
77
|
+
disabled = false;
|
|
78
|
+
required = false;
|
|
79
|
+
readOnly = false;
|
|
80
|
+
value;
|
|
81
|
+
placeholder;
|
|
82
|
+
name;
|
|
83
|
+
id;
|
|
84
|
+
maxLength;
|
|
85
|
+
minLength;
|
|
86
|
+
pattern;
|
|
87
|
+
autoComplete;
|
|
88
|
+
handleInput = new EventEmitter();
|
|
89
|
+
handleChange = new EventEmitter();
|
|
90
|
+
handleFocus = new EventEmitter();
|
|
91
|
+
handleBlur = new EventEmitter();
|
|
92
|
+
handleClear = new EventEmitter();
|
|
93
|
+
/**
|
|
94
|
+
* Reactive translation, read in the injection context. Its `t` reads the
|
|
95
|
+
* locale, so the view re-renders the text on a locale switch (the static `t`
|
|
96
|
+
* does not).
|
|
97
|
+
*/
|
|
98
|
+
i18n = useTranslation();
|
|
99
|
+
/**
|
|
100
|
+
* Retrieves the current UI class map.
|
|
101
|
+
* @returns The UIClassMap instance for styling.
|
|
102
|
+
*/
|
|
103
|
+
get cm() {
|
|
104
|
+
return getClassMap();
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Computes the accessible clear button label.
|
|
108
|
+
* @returns The localized aria-label for the clear button.
|
|
109
|
+
*/
|
|
110
|
+
get clearAriaLabel() {
|
|
111
|
+
return this.clearLabel || this.i18n.t('ui.input.clear', undefined, { defaultValue: 'Clear' });
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Retrieves the CSS class for form error messages.
|
|
115
|
+
* @returns The form error class name string.
|
|
116
|
+
*/
|
|
117
|
+
get formErrorClass() {
|
|
118
|
+
return this.cm.formError;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Retrieves the CSS class for form hint messages.
|
|
122
|
+
* @returns The form hint class name string.
|
|
123
|
+
*/
|
|
124
|
+
get formHintClass() {
|
|
125
|
+
return this.cm.formHint;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Resolves the input element ID.
|
|
129
|
+
* @returns The resolved ID from the id or name input.
|
|
130
|
+
*/
|
|
131
|
+
get inputId() {
|
|
132
|
+
return this.id || this.name || '';
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Computes the aria-describedby attribute value.
|
|
136
|
+
* @returns The ID of the describing element, or null if none.
|
|
137
|
+
*/
|
|
138
|
+
get ariaDescribedBy() {
|
|
139
|
+
if (this.error)
|
|
140
|
+
return `${this.inputId}-error`;
|
|
141
|
+
if (this.hint)
|
|
142
|
+
return `${this.inputId}-hint`;
|
|
143
|
+
return null;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Computes the CSS classes for the input label.
|
|
147
|
+
* @returns The label class name string.
|
|
148
|
+
*/
|
|
149
|
+
get labelClasses() {
|
|
150
|
+
return this.cm.cn(this.cm.label({ required: this.required }), this.cm.labelBlock);
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Computes the combined CSS classes for the input element.
|
|
154
|
+
* @returns The input class name string.
|
|
155
|
+
*/
|
|
156
|
+
get inputClasses() {
|
|
157
|
+
return this.cm.cn(this.cm.input({ error: !!this.error, size: this.size }), this.clearable && this.cm.inputPadRight, this.className);
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Generates the SVG markup for the clear button icon.
|
|
161
|
+
* @returns The SVG string for the clear icon.
|
|
162
|
+
*/
|
|
163
|
+
get clearIconSvg() {
|
|
164
|
+
return getIconSvg('x-mark', this.cm.iconSm);
|
|
165
|
+
}
|
|
166
|
+
static ɵfac = function MoleculeInput_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MoleculeInput)(); };
|
|
167
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MoleculeInput, selectors: [["mol-input"]], inputs: { type: "type", size: "size", label: "label", error: "error", hint: "hint", clearable: "clearable", clearLabel: "clearLabel", className: "className", style: "style", testId: "testId", disabled: "disabled", required: "required", readOnly: "readOnly", value: "value", placeholder: "placeholder", name: "name", id: "id", maxLength: "maxLength", minLength: "minLength", pattern: "pattern", autoComplete: "autoComplete" }, outputs: { handleInput: "handleInput", handleChange: "handleChange", handleFocus: "handleFocus", handleBlur: "handleBlur", handleClear: "handleClear" }, decls: 7, vars: 27, consts: [[3, "class"], [3, "input", "change", "focus", "blur", "type", "id", "name", "value", "placeholder", "disabled", "required", "readOnly"], [3, "id", "class"], ["type", "button", 3, "click"], [3, "innerHTML"], [3, "id"]], template: function MoleculeInput_Template(rf, ctx) { if (rf & 1) {
|
|
168
|
+
i0.ɵɵdomElementStart(0, "div");
|
|
169
|
+
i0.ɵɵconditionalCreate(1, MoleculeInput_Conditional_1_Template, 2, 4, "label", 0);
|
|
170
|
+
i0.ɵɵdomElementStart(2, "div")(3, "input", 1);
|
|
171
|
+
i0.ɵɵdomListener("input", function MoleculeInput_Template_input_input_3_listener($event) { return ctx.handleInput.emit($event); })("change", function MoleculeInput_Template_input_change_3_listener($event) { return ctx.handleChange.emit($event); })("focus", function MoleculeInput_Template_input_focus_3_listener($event) { return ctx.handleFocus.emit($event); })("blur", function MoleculeInput_Template_input_blur_3_listener($event) { return ctx.handleBlur.emit($event); });
|
|
172
|
+
i0.ɵɵdomElementEnd();
|
|
173
|
+
i0.ɵɵconditionalCreate(4, MoleculeInput_Conditional_4_Template, 3, 6, "div", 0);
|
|
174
|
+
i0.ɵɵdomElementEnd();
|
|
175
|
+
i0.ɵɵconditionalCreate(5, MoleculeInput_Conditional_5_Template, 2, 4, "p", 2);
|
|
176
|
+
i0.ɵɵconditionalCreate(6, MoleculeInput_Conditional_6_Template, 2, 4, "p", 2);
|
|
177
|
+
i0.ɵɵdomElementEnd();
|
|
178
|
+
} if (rf & 2) {
|
|
179
|
+
i0.ɵɵclassMap(ctx.cm.inputWrapper);
|
|
180
|
+
i0.ɵɵadvance();
|
|
181
|
+
i0.ɵɵconditional(ctx.label ? 1 : -1);
|
|
182
|
+
i0.ɵɵadvance();
|
|
183
|
+
i0.ɵɵclassMap(ctx.cm.inputInner);
|
|
184
|
+
i0.ɵɵadvance();
|
|
185
|
+
i0.ɵɵstyleMap(ctx.style);
|
|
186
|
+
i0.ɵɵclassMap(ctx.inputClasses);
|
|
187
|
+
i0.ɵɵdomProperty("type", ctx.type)("id", ctx.inputId)("name", ctx.name)("value", ctx.value)("placeholder", ctx.placeholder)("disabled", ctx.disabled)("required", ctx.required)("readOnly", ctx.readOnly);
|
|
188
|
+
i0.ɵɵattribute("aria-invalid", !!ctx.error)("aria-describedby", ctx.ariaDescribedBy)("data-testid", ctx.testId)("maxlength", ctx.maxLength)("minlength", ctx.minLength)("pattern", ctx.pattern)("autocomplete", ctx.autoComplete);
|
|
189
|
+
i0.ɵɵadvance();
|
|
190
|
+
i0.ɵɵconditional(ctx.clearable && ctx.value ? 4 : -1);
|
|
191
|
+
i0.ɵɵadvance();
|
|
192
|
+
i0.ɵɵconditional(ctx.error ? 5 : -1);
|
|
193
|
+
i0.ɵɵadvance();
|
|
194
|
+
i0.ɵɵconditional(ctx.hint && !ctx.error ? 6 : -1);
|
|
195
|
+
} }, encapsulation: 2 });
|
|
196
|
+
}
|
|
197
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MoleculeInput, [{
|
|
198
|
+
type: Component,
|
|
199
|
+
args: [{
|
|
200
|
+
selector: 'mol-input',
|
|
201
|
+
standalone: true,
|
|
202
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
203
|
+
template: `
|
|
204
|
+
<div [class]="cm.inputWrapper">
|
|
205
|
+
@if (label) {
|
|
206
|
+
<label [attr.for]="inputId" [class]="labelClasses">
|
|
207
|
+
{{ label }}
|
|
208
|
+
</label>
|
|
209
|
+
}
|
|
210
|
+
<div [class]="cm.inputInner">
|
|
211
|
+
<input
|
|
212
|
+
[type]="type"
|
|
213
|
+
[id]="inputId"
|
|
214
|
+
[name]="name"
|
|
215
|
+
[value]="value"
|
|
216
|
+
[placeholder]="placeholder"
|
|
217
|
+
[disabled]="disabled"
|
|
218
|
+
[required]="required"
|
|
219
|
+
[readOnly]="readOnly"
|
|
220
|
+
[attr.aria-invalid]="!!error"
|
|
221
|
+
[attr.aria-describedby]="ariaDescribedBy"
|
|
222
|
+
[class]="inputClasses"
|
|
223
|
+
[style]="style"
|
|
224
|
+
[attr.data-testid]="testId"
|
|
225
|
+
[attr.maxlength]="maxLength"
|
|
226
|
+
[attr.minlength]="minLength"
|
|
227
|
+
[attr.pattern]="pattern"
|
|
228
|
+
[attr.autocomplete]="autoComplete"
|
|
229
|
+
(input)="handleInput.emit($event)"
|
|
230
|
+
(change)="handleChange.emit($event)"
|
|
231
|
+
(focus)="handleFocus.emit($event)"
|
|
232
|
+
(blur)="handleBlur.emit($event)"
|
|
233
|
+
/>
|
|
234
|
+
@if (clearable && value) {
|
|
235
|
+
<div [class]="cm.inputClearButton">
|
|
236
|
+
<button
|
|
237
|
+
type="button"
|
|
238
|
+
(click)="handleClear.emit()"
|
|
239
|
+
[class]="cm.inputClearButton"
|
|
240
|
+
[attr.aria-label]="clearAriaLabel"
|
|
241
|
+
>
|
|
242
|
+
<span [innerHTML]="clearIconSvg"></span>
|
|
243
|
+
</button>
|
|
244
|
+
</div>
|
|
245
|
+
}
|
|
246
|
+
</div>
|
|
247
|
+
@if (error) {
|
|
248
|
+
<p [id]="inputId + '-error'" [class]="formErrorClass">
|
|
249
|
+
{{ error }}
|
|
250
|
+
</p>
|
|
251
|
+
}
|
|
252
|
+
@if (hint && !error) {
|
|
253
|
+
<p [id]="inputId + '-hint'" [class]="formHintClass">
|
|
254
|
+
{{ hint }}
|
|
255
|
+
</p>
|
|
256
|
+
}
|
|
257
|
+
</div>
|
|
258
|
+
`,
|
|
259
|
+
}]
|
|
260
|
+
}], null, { type: [{
|
|
261
|
+
type: Input
|
|
262
|
+
}], size: [{
|
|
263
|
+
type: Input
|
|
264
|
+
}], label: [{
|
|
265
|
+
type: Input
|
|
266
|
+
}], error: [{
|
|
267
|
+
type: Input
|
|
268
|
+
}], hint: [{
|
|
269
|
+
type: Input
|
|
270
|
+
}], clearable: [{
|
|
271
|
+
type: Input
|
|
272
|
+
}], clearLabel: [{
|
|
273
|
+
type: Input
|
|
274
|
+
}], className: [{
|
|
275
|
+
type: Input
|
|
276
|
+
}], style: [{
|
|
277
|
+
type: Input
|
|
278
|
+
}], testId: [{
|
|
279
|
+
type: Input
|
|
280
|
+
}], disabled: [{
|
|
281
|
+
type: Input
|
|
282
|
+
}], required: [{
|
|
283
|
+
type: Input
|
|
284
|
+
}], readOnly: [{
|
|
285
|
+
type: Input
|
|
286
|
+
}], value: [{
|
|
287
|
+
type: Input
|
|
288
|
+
}], placeholder: [{
|
|
289
|
+
type: Input
|
|
290
|
+
}], name: [{
|
|
291
|
+
type: Input
|
|
292
|
+
}], id: [{
|
|
293
|
+
type: Input
|
|
294
|
+
}], maxLength: [{
|
|
295
|
+
type: Input
|
|
296
|
+
}], minLength: [{
|
|
297
|
+
type: Input
|
|
298
|
+
}], pattern: [{
|
|
299
|
+
type: Input
|
|
300
|
+
}], autoComplete: [{
|
|
301
|
+
type: Input
|
|
302
|
+
}], handleInput: [{
|
|
303
|
+
type: Output
|
|
304
|
+
}], handleChange: [{
|
|
305
|
+
type: Output
|
|
306
|
+
}], handleFocus: [{
|
|
307
|
+
type: Output
|
|
308
|
+
}], handleBlur: [{
|
|
309
|
+
type: Output
|
|
310
|
+
}], handleClear: [{
|
|
311
|
+
type: Output
|
|
312
|
+
}] }); })();
|
|
313
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MoleculeInput, { className: "MoleculeInput", filePath: "components/molecule/input.component.ts", lineNumber: 83 }); })();
|
|
314
|
+
//# sourceMappingURL=input.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input.component.js","sourceRoot":"","sources":["../../../src/components/molecule/input.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,uBAAuB,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAE/F,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAEtD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAA;;;IAYnD,gCAAmD;IACjD,YACF;IAAA,oBAAQ;;;IAFoB,kCAAsB;;IAChD,cACF;IADE,6CACF;;;;IA4BI,AADF,8BAAmC,gBAMhC;IAHC,oLAAS,yBAAkB,KAAC;IAI5B,6BAAwC;IAE5C,AADE,oBAAS,EACL;;;IATD,yCAA6B;IAI9B,cAA6B;IAA7B,yCAA6B;;IAGvB,cAA0B;IAA1B,qEAA0B;;;IAMtC,+BAAsD;IACpD,YACF;IAAA,oBAAI;;;IAFyB,oCAAwB;IAAlD,i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ACxB,6BAAyB,IAAC,kFAC3B,4BAAwB,IAAC,gFAC1B,2BAAuB,IAAC;YArBlC,oBAsBE;YACF,+EAA0B;YAY5B,oBAAM;YACN,6EAAa;YAKb,6EAAsB;YAKxB,oBAAM;;YArDD,kCAAyB;YAC5B,cAIC;YAJD,oCAIC;YACI,cAAuB;YAAvB,gCAAuB;YAaxB,cAAe;YAAf,wBAAe;YADf,+BAAsB;YAHtB,AADA,AADA,AADA,AADA,AADA,AADA,AADA,kCAAa,mBACC,kBACD,oBACE,gCACY,0BACN,0BACA,0BACA;;YAevB,cAWC;YAXD,qDAWC;YAEH,cAIC;YAJD,oCAIC;YACD,cAIC;YAJD,iDAIC;;;iFAQM,aAAa;cAjEzB,SAAS;eAAC;gBACT,QAAQ,EAAE,WAAW;gBACrB,UAAU,EAAE,IAAI;gBAChB,eAAe,EAAE,uBAAuB,CAAC,MAAM;gBAC/C,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDT;aACF;;kBAME,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBAEL,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kFA3BI,aAAa"}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Angular Modal UI component with UIClassMap-driven styling.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
import { EventEmitter, type OnChanges, type OnDestroy, type OnInit, type SimpleChanges } from '@angular/core';
|
|
7
|
+
import { type SafeHtml } from '@angular/platform-browser';
|
|
8
|
+
import type { ModalSize, UIClassMap } from '@molecule/app-ui';
|
|
9
|
+
import * as i0 from "@angular/core";
|
|
10
|
+
/**
|
|
11
|
+
* Get the inline style for the modal centering wrapper. `dialogWrapper` has
|
|
12
|
+
* no dedicated ClassMap resolver option (it's a fixed token, not a
|
|
13
|
+
* `{ centered }`-parameterized one), so a top-anchored (non-centered) layout
|
|
14
|
+
* is expressed via the one inline-style exception the workspace styling rule
|
|
15
|
+
* allows for values ClassMap genuinely cannot express.
|
|
16
|
+
*
|
|
17
|
+
* A standalone function (rather than a class member) so it's unit-testable
|
|
18
|
+
* without constructing `MoleculeModal` — the class can't be `new`'d outside
|
|
19
|
+
* an Angular injection context (`sanitizer = inject(DomSanitizer)` runs at
|
|
20
|
+
* field-initializer time).
|
|
21
|
+
* @param centered - Whether the modal is vertically centered.
|
|
22
|
+
* @returns An inline style object, or `undefined` when centered.
|
|
23
|
+
*/
|
|
24
|
+
export declare function getModalWrapperStyle(centered: boolean): Record<string, string> | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Angular Modal UI component with UIClassMap-driven styling.
|
|
27
|
+
*
|
|
28
|
+
* `centered` (default `true`) vertically centers the dialog; `centered:
|
|
29
|
+
* false` top-anchors it instead, via `getModalWrapperStyle()`.
|
|
30
|
+
*/
|
|
31
|
+
export declare class MoleculeModal implements OnInit, OnDestroy, OnChanges {
|
|
32
|
+
open: boolean;
|
|
33
|
+
title?: string;
|
|
34
|
+
size: ModalSize;
|
|
35
|
+
showCloseButton: boolean;
|
|
36
|
+
closeLabel?: string;
|
|
37
|
+
closeOnOverlayClick: boolean;
|
|
38
|
+
closeOnEscape: boolean;
|
|
39
|
+
centered: boolean;
|
|
40
|
+
preventScroll: boolean;
|
|
41
|
+
hasFooter: boolean;
|
|
42
|
+
className?: string;
|
|
43
|
+
style?: Record<string, string>;
|
|
44
|
+
testId?: string;
|
|
45
|
+
close: EventEmitter<void>;
|
|
46
|
+
/**
|
|
47
|
+
* Reactive translation, read in the injection context. Its `t` reads the
|
|
48
|
+
* locale, so the view re-renders the text on a locale switch (the static `t`
|
|
49
|
+
* does not).
|
|
50
|
+
*/
|
|
51
|
+
private readonly i18n;
|
|
52
|
+
/**
|
|
53
|
+
* Retrieves the current UI class map.
|
|
54
|
+
* @returns The UIClassMap instance for styling.
|
|
55
|
+
*/
|
|
56
|
+
get cm(): UIClassMap;
|
|
57
|
+
/**
|
|
58
|
+
* Computes the accessible close button label.
|
|
59
|
+
* @returns The localized aria-label for the close button.
|
|
60
|
+
*/
|
|
61
|
+
get closeAriaLabel(): string;
|
|
62
|
+
private boundEscapeHandler;
|
|
63
|
+
/**
|
|
64
|
+
* Retrieves the CSS class for the modal wrapper.
|
|
65
|
+
* @returns The wrapper class name string.
|
|
66
|
+
*/
|
|
67
|
+
get wrapperClass(): string;
|
|
68
|
+
/**
|
|
69
|
+
* Retrieves the inline style for the modal centering wrapper.
|
|
70
|
+
* @returns An inline style object, or `undefined` when centered.
|
|
71
|
+
*/
|
|
72
|
+
get wrapperStyle(): Record<string, string> | undefined;
|
|
73
|
+
/**
|
|
74
|
+
* Retrieves the CSS class for the modal body.
|
|
75
|
+
* @returns The body class name string.
|
|
76
|
+
*/
|
|
77
|
+
get bodyClass(): string;
|
|
78
|
+
/**
|
|
79
|
+
* Retrieves the CSS class for the modal overlay.
|
|
80
|
+
* @returns The overlay class name string.
|
|
81
|
+
*/
|
|
82
|
+
get overlayClass(): string;
|
|
83
|
+
/**
|
|
84
|
+
* Retrieves the CSS class for the modal header.
|
|
85
|
+
* @returns The header class name string.
|
|
86
|
+
*/
|
|
87
|
+
get headerClass(): string;
|
|
88
|
+
/**
|
|
89
|
+
* Retrieves the CSS class for the modal footer.
|
|
90
|
+
* @returns The footer class name string.
|
|
91
|
+
*/
|
|
92
|
+
get footerClass(): string;
|
|
93
|
+
/**
|
|
94
|
+
* Retrieves the CSS class for the modal title.
|
|
95
|
+
* @returns The title class name string.
|
|
96
|
+
*/
|
|
97
|
+
get titleClass(): string;
|
|
98
|
+
/**
|
|
99
|
+
* Retrieves the CSS class for the close button.
|
|
100
|
+
* @returns The close button class name string.
|
|
101
|
+
*/
|
|
102
|
+
get closeClass(): string;
|
|
103
|
+
private sanitizer;
|
|
104
|
+
/**
|
|
105
|
+
* Generates the SVG markup for the close button icon.
|
|
106
|
+
* @returns The sanitized SVG for the close icon.
|
|
107
|
+
*/
|
|
108
|
+
get closeIconSvg(): SafeHtml;
|
|
109
|
+
/**
|
|
110
|
+
* Computes the combined CSS classes for the modal content.
|
|
111
|
+
* @returns The modal content class name string.
|
|
112
|
+
*/
|
|
113
|
+
get contentClasses(): string;
|
|
114
|
+
/**
|
|
115
|
+
* Initializes event listeners on component creation.
|
|
116
|
+
*/
|
|
117
|
+
ngOnInit(): void;
|
|
118
|
+
/**
|
|
119
|
+
* Handles input property changes.
|
|
120
|
+
* @param changes - The changed input properties.
|
|
121
|
+
*/
|
|
122
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
123
|
+
/**
|
|
124
|
+
* Cleans up event listeners and body scroll on component destruction.
|
|
125
|
+
*/
|
|
126
|
+
ngOnDestroy(): void;
|
|
127
|
+
/**
|
|
128
|
+
* Adds or removes the keyboard escape listener based on open state.
|
|
129
|
+
*/
|
|
130
|
+
private updateListeners;
|
|
131
|
+
/**
|
|
132
|
+
* Updates the document body overflow based on open state.
|
|
133
|
+
*/
|
|
134
|
+
private updateBodyScroll;
|
|
135
|
+
/**
|
|
136
|
+
* Handles escape key press to close the modal.
|
|
137
|
+
* @param e - The keyboard event.
|
|
138
|
+
*/
|
|
139
|
+
private handleEscape;
|
|
140
|
+
/**
|
|
141
|
+
* Handles overlay click to close the modal.
|
|
142
|
+
* @param event - The mouse event from the overlay click.
|
|
143
|
+
*/
|
|
144
|
+
onOverlayClick(event: MouseEvent): void;
|
|
145
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MoleculeModal, never>;
|
|
146
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MoleculeModal, "mol-modal", never, { "open": { "alias": "open"; "required": false; }; "title": { "alias": "title"; "required": false; }; "size": { "alias": "size"; "required": false; }; "showCloseButton": { "alias": "showCloseButton"; "required": false; }; "closeLabel": { "alias": "closeLabel"; "required": false; }; "closeOnOverlayClick": { "alias": "closeOnOverlayClick"; "required": false; }; "closeOnEscape": { "alias": "closeOnEscape"; "required": false; }; "centered": { "alias": "centered"; "required": false; }; "preventScroll": { "alias": "preventScroll"; "required": false; }; "hasFooter": { "alias": "hasFooter"; "required": false; }; "className": { "alias": "className"; "required": false; }; "style": { "alias": "style"; "required": false; }; "testId": { "alias": "testId"; "required": false; }; }, { "close": "close"; }, never, ["*", "[modal-footer]"], true, never>;
|
|
147
|
+
}
|
|
148
|
+
//# sourceMappingURL=modal.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modal.component.d.ts","sourceRoot":"","sources":["../../../src/components/molecule/modal.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAGL,YAAY,EAGZ,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,MAAM,EAEX,KAAK,aAAa,EACnB,MAAM,eAAe,CAAA;AACtB,OAAO,EAAgB,KAAK,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AAGvE,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;;AAK7D;;;;;;;;;;;;;GAaG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAE1F;AAED;;;;;GAKG;AACH,qBA2Da,aAAc,YAAW,MAAM,EAAE,SAAS,EAAE,SAAS;IACvD,IAAI,UAAQ;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,SAAS,CAAO;IACtB,eAAe,UAAO;IACtB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,m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