@molecule/app-ui-angular 1.0.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.
Files changed (75) hide show
  1. package/LICENSE +115 -0
  2. package/README.md +1591 -0
  3. package/dist/components/alert.component.d.ts +71 -0
  4. package/dist/components/alert.component.d.ts.map +1 -0
  5. package/dist/components/alert.component.js +222 -0
  6. package/dist/components/alert.component.js.map +1 -0
  7. package/dist/components/badge.component.d.ts +27 -0
  8. package/dist/components/badge.component.d.ts.map +1 -0
  9. package/dist/components/badge.component.js +78 -0
  10. package/dist/components/badge.component.js.map +1 -0
  11. package/dist/components/button.component.d.ts +38 -0
  12. package/dist/components/button.component.d.ts.map +1 -0
  13. package/dist/components/button.component.js +136 -0
  14. package/dist/components/button.component.js.map +1 -0
  15. package/dist/components/checkbox.component.d.ts +53 -0
  16. package/dist/components/checkbox.component.d.ts.map +1 -0
  17. package/dist/components/checkbox.component.js +165 -0
  18. package/dist/components/checkbox.component.js.map +1 -0
  19. package/dist/components/index.d.ts +18 -0
  20. package/dist/components/index.d.ts.map +1 -0
  21. package/dist/components/index.js +18 -0
  22. package/dist/components/index.js.map +1 -0
  23. package/dist/components/input.component.d.ts +87 -0
  24. package/dist/components/input.component.d.ts.map +1 -0
  25. package/dist/components/input.component.js +307 -0
  26. package/dist/components/input.component.js.map +1 -0
  27. package/dist/components/modal.component.d.ts +142 -0
  28. package/dist/components/modal.component.d.ts.map +1 -0
  29. package/dist/components/modal.component.js +375 -0
  30. package/dist/components/modal.component.js.map +1 -0
  31. package/dist/components/radio-group.component.d.ts +63 -0
  32. package/dist/components/radio-group.component.d.ts.map +1 -0
  33. package/dist/components/radio-group.component.js +207 -0
  34. package/dist/components/radio-group.component.js.map +1 -0
  35. package/dist/components/select.component.d.ts +72 -0
  36. package/dist/components/select.component.d.ts.map +1 -0
  37. package/dist/components/select.component.js +273 -0
  38. package/dist/components/select.component.js.map +1 -0
  39. package/dist/components/spinner.component.d.ts +36 -0
  40. package/dist/components/spinner.component.d.ts.map +1 -0
  41. package/dist/components/spinner.component.js +115 -0
  42. package/dist/components/spinner.component.js.map +1 -0
  43. package/dist/components/switch.component.d.ts +54 -0
  44. package/dist/components/switch.component.d.ts.map +1 -0
  45. package/dist/components/switch.component.js +147 -0
  46. package/dist/components/switch.component.js.map +1 -0
  47. package/dist/components/toast.component.d.ts +92 -0
  48. package/dist/components/toast.component.d.ts.map +1 -0
  49. package/dist/components/toast.component.js +298 -0
  50. package/dist/components/toast.component.js.map +1 -0
  51. package/dist/components/tooltip.component.d.ts +77 -0
  52. package/dist/components/tooltip.component.d.ts.map +1 -0
  53. package/dist/components/tooltip.component.js +315 -0
  54. package/dist/components/tooltip.component.js.map +1 -0
  55. package/dist/index.d.ts +59 -0
  56. package/dist/index.d.ts.map +1 -0
  57. package/dist/index.js +59 -0
  58. package/dist/index.js.map +1 -0
  59. package/dist/types.d.ts +7 -0
  60. package/dist/types.d.ts.map +1 -0
  61. package/dist/types.js +7 -0
  62. package/dist/types.js.map +1 -0
  63. package/dist/utilities/index.d.ts +8 -0
  64. package/dist/utilities/index.d.ts.map +1 -0
  65. package/dist/utilities/index.js +8 -0
  66. package/dist/utilities/index.js.map +1 -0
  67. package/dist/utilities/render-icon.d.ts +15 -0
  68. package/dist/utilities/render-icon.d.ts.map +1 -0
  69. package/dist/utilities/render-icon.js +44 -0
  70. package/dist/utilities/render-icon.js.map +1 -0
  71. package/dist/utilities/utilities.d.ts +12 -0
  72. package/dist/utilities/utilities.d.ts.map +1 -0
  73. package/dist/utilities/utilities.js +14 -0
  74. package/dist/utilities/utilities.js.map +1 -0
  75. package/package.json +54 -0
@@ -0,0 +1,115 @@
1
+ /**
2
+ * Angular Spinner UI component with UIClassMap-driven styling.
3
+ *
4
+ * @module
5
+ */
6
+ import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
7
+ import { t } from '@molecule/app-i18n';
8
+ import { getClassMap } from '@molecule/app-ui';
9
+ import * as i0 from "@angular/core";
10
+ function MoleculeSpinner_Conditional_1_Template(rf, ctx) { if (rf & 1) {
11
+ i0.ɵɵdomElementStart(0, "span");
12
+ i0.ɵɵtext(1);
13
+ i0.ɵɵdomElementEnd();
14
+ } if (rf & 2) {
15
+ const ctx_r0 = i0.ɵɵnextContext();
16
+ i0.ɵɵclassMap(ctx_r0.cm.srOnly);
17
+ i0.ɵɵadvance();
18
+ i0.ɵɵtextInterpolate(ctx_r0.label);
19
+ } }
20
+ /**
21
+ * Angular Spinner UI component with UIClassMap-driven styling.
22
+ */
23
+ /**
24
+ * Molecule Spinner class.
25
+ */
26
+ export class MoleculeSpinner {
27
+ size = 'md';
28
+ color;
29
+ label;
30
+ className;
31
+ style;
32
+ testId;
33
+ /**
34
+ * Retrieves the current UI class map.
35
+ * @returns The UIClassMap instance for styling.
36
+ */
37
+ get cm() {
38
+ return getClassMap();
39
+ }
40
+ /**
41
+ * Computes the accessible spinner label.
42
+ * @returns The localized aria-label for the spinner.
43
+ */
44
+ get spinnerLabel() {
45
+ return this.label || t('ui.spinner.loading', undefined, { defaultValue: 'Loading' });
46
+ }
47
+ /**
48
+ * Computes the combined CSS classes for the spinner element.
49
+ * @returns The spinner class name string.
50
+ */
51
+ get spinnerClasses() {
52
+ return this.cm.cn(this.cm.spinner({ size: this.size }), this.className);
53
+ }
54
+ /**
55
+ * Computes the merged inline styles including custom color.
56
+ * @returns The computed style object with optional custom border color.
57
+ */
58
+ get computedStyle() {
59
+ const base = { ...this.style };
60
+ if (this.color &&
61
+ typeof this.color === 'string' &&
62
+ !['primary', 'secondary', 'success', 'warning', 'error', 'info'].includes(this.color)) {
63
+ base['borderColor'] = this.color;
64
+ base['borderTopColor'] = 'transparent';
65
+ }
66
+ return base;
67
+ }
68
+ static ɵfac = function MoleculeSpinner_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MoleculeSpinner)(); };
69
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MoleculeSpinner, selectors: [["mol-spinner"]], inputs: { size: "size", color: "color", label: "label", className: "className", style: "style", testId: "testId" }, decls: 2, vars: 7, consts: [["role", "status"], [3, "class"]], template: function MoleculeSpinner_Template(rf, ctx) { if (rf & 1) {
70
+ i0.ɵɵdomElementStart(0, "div", 0);
71
+ i0.ɵɵconditionalCreate(1, MoleculeSpinner_Conditional_1_Template, 2, 3, "span", 1);
72
+ i0.ɵɵdomElementEnd();
73
+ } if (rf & 2) {
74
+ i0.ɵɵstyleMap(ctx.computedStyle);
75
+ i0.ɵɵclassMap(ctx.spinnerClasses);
76
+ i0.ɵɵattribute("aria-label", ctx.spinnerLabel)("data-testid", ctx.testId);
77
+ i0.ɵɵadvance();
78
+ i0.ɵɵconditional(ctx.label ? 1 : -1);
79
+ } }, encapsulation: 2 });
80
+ }
81
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MoleculeSpinner, [{
82
+ type: Component,
83
+ args: [{
84
+ selector: 'mol-spinner',
85
+ standalone: true,
86
+ changeDetection: ChangeDetectionStrategy.OnPush,
87
+ template: `
88
+ <div
89
+ role="status"
90
+ [attr.aria-label]="spinnerLabel"
91
+ [class]="spinnerClasses"
92
+ [style]="computedStyle"
93
+ [attr.data-testid]="testId"
94
+ >
95
+ @if (label) {
96
+ <span [class]="cm.srOnly">{{ label }}</span>
97
+ }
98
+ </div>
99
+ `,
100
+ }]
101
+ }], null, { size: [{
102
+ type: Input
103
+ }], color: [{
104
+ type: Input
105
+ }], label: [{
106
+ type: Input
107
+ }], className: [{
108
+ type: Input
109
+ }], style: [{
110
+ type: Input
111
+ }], testId: [{
112
+ type: Input
113
+ }] }); })();
114
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MoleculeSpinner, { className: "MoleculeSpinner", filePath: "components/spinner.component.ts", lineNumber: 37 }); })();
115
+ //# sourceMappingURL=spinner.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spinner.component.js","sourceRoot":"","sources":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AAC,EACrF,CAAC;YACD,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,KAAK,CAAA;YAChC,IAAI,CAAC,gBAAgB,CAAC,GAAG,aAAa,CAAA;QACxC,CAAC;QACD,OAAO,IAAI,CAAA;IACb,CAAC;yGA/CU,eAAe;6DAAf,eAAe;YAhBxB,iCAMC;YACC,kFAAa;YAGf,oBAAM;;YANJ,gCAAuB;YADvB,iCAAwB;;YAIxB,cAEC;YAFD,oCAEC;;;iFAOM,eAAe;cArB3B,SAAS;eAAC;gBACT,QAAQ,EAAE,aAAa;gBACvB,UAAU,EAAE,IAAI;gBAChB,eAAe,EAAE,uBAAuB,CAAC,MAAM;gBAC/C,QAAQ,EAAE;;;;;;;;;;;;GAYT;aACF;;kBAKE,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kFANK,eAAe"}
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Angular Switch UI component with UIClassMap-driven styling.
3
+ *
4
+ * @module
5
+ */
6
+ import { EventEmitter } from '@angular/core';
7
+ import type { ColorVariant, Size, UIClassMap } from '@molecule/app-ui';
8
+ import * as i0 from "@angular/core";
9
+ /**
10
+ * Angular Switch UI component with UIClassMap-driven styling.
11
+ */
12
+ export declare class MoleculeSwitch {
13
+ label?: string;
14
+ checked: boolean;
15
+ size: Size;
16
+ color?: ColorVariant;
17
+ className?: string;
18
+ style?: Record<string, string>;
19
+ testId?: string;
20
+ disabled: boolean;
21
+ checkedChange: EventEmitter<boolean>;
22
+ /**
23
+ * Retrieves the current UI class map.
24
+ * @returns The UIClassMap instance for styling.
25
+ */
26
+ get cm(): UIClassMap;
27
+ /**
28
+ * Computes the current checked/unchecked state string.
29
+ * @returns The state string, either "checked" or "unchecked".
30
+ */
31
+ get state(): string;
32
+ /**
33
+ * Computes the CSS classes for the switch wrapper label.
34
+ * @returns The wrapper class name string.
35
+ */
36
+ get wrapperClasses(): string;
37
+ /**
38
+ * Computes the combined CSS classes for the switch button.
39
+ * @returns The switch class name string.
40
+ */
41
+ get switchClasses(): string;
42
+ /**
43
+ * Computes the CSS classes for the switch thumb indicator.
44
+ * @returns The thumb class name string.
45
+ */
46
+ get thumbClasses(): string;
47
+ /**
48
+ * Handles the switch toggle action.
49
+ */
50
+ onToggle(): void;
51
+ static ɵfac: i0.ɵɵFactoryDeclaration<MoleculeSwitch, never>;
52
+ static ɵcmp: i0.ɵɵComponentDeclaration<MoleculeSwitch, "mol-switch", never, { "label": { "alias": "label"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; "size": { "alias": "size"; "required": false; }; "color": { "alias": "color"; "required": false; }; "className": { "alias": "className"; "required": false; }; "style": { "alias": "style"; "required": false; }; "testId": { "alias": "testId"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "checkedChange": "checkedChange"; }, never, never, true, never>;
53
+ }
54
+ //# sourceMappingURL=switch.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"switch.component.d.ts","sourceRoot":"","sources":["../../src/components/switch.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAsC,YAAY,EAAiB,MAAM,eAAe,CAAA;AAE/F,OAAO,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;;AAGtE;;GAEG;AACH,qBA4Ba,cAAc;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,UAAQ;IACf,IAAI,EAAE,IAAI,CAAO;IACjB,KAAK,CAAC,EAAE,YAAY,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,UAAQ;IAEf,aAAa,wBAA8B;IAErD;;;OAGG;IACH,IAAI,EAAE,IAAI,UAAU,CAEnB;IAED;;;OAGG;IACH,IAAI,KAAK,IAAI,MAAM,CAElB;IAED;;;OAGG;IACH,IAAI,cAAc,IAAI,MAAM,CAE3B;IAED;;;OAGG;IACH,IAAI,aAAa,IAAI,MAAM,CAE1B;IAED;;;OAGG;IACH,IAAI,YAAY,IAAI,MAAM,CAEzB;IAED;;OAEG;IACH,QAAQ,IAAI,IAAI;yCAvDL,cAAc;2CAAd,cAAc;CA4D1B"}
@@ -0,0 +1,147 @@
1
+ /**
2
+ * Angular Switch UI component with UIClassMap-driven styling.
3
+ *
4
+ * @module
5
+ */
6
+ import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';
7
+ import { getClassMap } from '@molecule/app-ui';
8
+ import * as i0 from "@angular/core";
9
+ function MoleculeSwitch_Conditional_3_Template(rf, ctx) { if (rf & 1) {
10
+ i0.ɵɵdomElementStart(0, "span");
11
+ i0.ɵɵtext(1);
12
+ i0.ɵɵdomElementEnd();
13
+ } if (rf & 2) {
14
+ const ctx_r0 = i0.ɵɵnextContext();
15
+ i0.ɵɵclassMap(ctx_r0.cm.controlText);
16
+ i0.ɵɵadvance();
17
+ i0.ɵɵtextInterpolate(ctx_r0.label);
18
+ } }
19
+ /**
20
+ * Angular Switch UI component with UIClassMap-driven styling.
21
+ */
22
+ /**
23
+ * Molecule Switch class.
24
+ */
25
+ export class MoleculeSwitch {
26
+ label;
27
+ checked = false;
28
+ size = 'md';
29
+ color;
30
+ className;
31
+ style;
32
+ testId;
33
+ disabled = false;
34
+ checkedChange = new EventEmitter();
35
+ /**
36
+ * Retrieves the current UI class map.
37
+ * @returns The UIClassMap instance for styling.
38
+ */
39
+ get cm() {
40
+ return getClassMap();
41
+ }
42
+ /**
43
+ * Computes the current checked/unchecked state string.
44
+ * @returns The state string, either "checked" or "unchecked".
45
+ */
46
+ get state() {
47
+ return this.checked ? 'checked' : 'unchecked';
48
+ }
49
+ /**
50
+ * Computes the CSS classes for the switch wrapper label.
51
+ * @returns The wrapper class name string.
52
+ */
53
+ get wrapperClasses() {
54
+ return this.cm.cn(this.cm.controlLabel, this.disabled && this.cm.controlDisabled);
55
+ }
56
+ /**
57
+ * Computes the combined CSS classes for the switch button.
58
+ * @returns The switch class name string.
59
+ */
60
+ get switchClasses() {
61
+ return this.cm.cn(this.cm.switchBase({ size: this.size }), this.className);
62
+ }
63
+ /**
64
+ * Computes the CSS classes for the switch thumb indicator.
65
+ * @returns The thumb class name string.
66
+ */
67
+ get thumbClasses() {
68
+ return this.cm.switchThumb({ size: this.size });
69
+ }
70
+ /**
71
+ * Handles the switch toggle action.
72
+ */
73
+ onToggle() {
74
+ if (!this.disabled) {
75
+ this.checkedChange.emit(!this.checked);
76
+ }
77
+ }
78
+ static ɵfac = function MoleculeSwitch_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MoleculeSwitch)(); };
79
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MoleculeSwitch, selectors: [["mol-switch"]], inputs: { label: "label", checked: "checked", size: "size", color: "color", className: "className", style: "style", testId: "testId", disabled: "disabled" }, outputs: { checkedChange: "checkedChange" }, decls: 4, vars: 14, consts: [["type", "button", "role", "switch", 3, "click", "disabled"], [3, "class"]], template: function MoleculeSwitch_Template(rf, ctx) { if (rf & 1) {
80
+ i0.ɵɵdomElementStart(0, "label")(1, "button", 0);
81
+ i0.ɵɵdomListener("click", function MoleculeSwitch_Template_button_click_1_listener() { return ctx.onToggle(); });
82
+ i0.ɵɵdomElement(2, "span");
83
+ i0.ɵɵdomElementEnd();
84
+ i0.ɵɵconditionalCreate(3, MoleculeSwitch_Conditional_3_Template, 2, 3, "span", 1);
85
+ i0.ɵɵdomElementEnd();
86
+ } if (rf & 2) {
87
+ i0.ɵɵclassMap(ctx.wrapperClasses);
88
+ i0.ɵɵadvance();
89
+ i0.ɵɵstyleMap(ctx.style);
90
+ i0.ɵɵclassMap(ctx.switchClasses);
91
+ i0.ɵɵdomProperty("disabled", ctx.disabled);
92
+ i0.ɵɵattribute("aria-checked", ctx.checked)("data-state", ctx.state)("data-testid", ctx.testId);
93
+ i0.ɵɵadvance();
94
+ i0.ɵɵclassMap(ctx.thumbClasses);
95
+ i0.ɵɵattribute("data-state", ctx.state);
96
+ i0.ɵɵadvance();
97
+ i0.ɵɵconditional(ctx.label ? 3 : -1);
98
+ } }, encapsulation: 2 });
99
+ }
100
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MoleculeSwitch, [{
101
+ type: Component,
102
+ args: [{
103
+ selector: 'mol-switch',
104
+ standalone: true,
105
+ changeDetection: ChangeDetectionStrategy.OnPush,
106
+ template: `
107
+ <label [class]="wrapperClasses">
108
+ <button
109
+ type="button"
110
+ role="switch"
111
+ [attr.aria-checked]="checked"
112
+ [disabled]="disabled"
113
+ [attr.data-state]="state"
114
+ [class]="switchClasses"
115
+ [style]="style"
116
+ [attr.data-testid]="testId"
117
+ (click)="onToggle()"
118
+ >
119
+ <span [attr.data-state]="state" [class]="thumbClasses"></span>
120
+ </button>
121
+ @if (label) {
122
+ <span [class]="cm.controlText">{{ label }}</span>
123
+ }
124
+ </label>
125
+ `,
126
+ }]
127
+ }], null, { label: [{
128
+ type: Input
129
+ }], checked: [{
130
+ type: Input
131
+ }], size: [{
132
+ type: Input
133
+ }], color: [{
134
+ type: Input
135
+ }], className: [{
136
+ type: Input
137
+ }], style: [{
138
+ type: Input
139
+ }], testId: [{
140
+ type: Input
141
+ }], disabled: [{
142
+ type: Input
143
+ }], checkedChange: [{
144
+ type: Output
145
+ }] }); })();
146
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MoleculeSwitch, { className: "MoleculeSwitch", filePath: "components/switch.component.ts", lineNumber: 43 }); })();
147
+ //# sourceMappingURL=switch.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"switch.component.js","sourceRoot":"","sources":["../../src/components/switch.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,uBAAuB,EAAE,SAAS,E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G;IACH,QAAQ;QACN,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACnB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QACxC,CAAC;IACH,CAAC;wGA3DU,cAAc;6DAAd,cAAc;YAtBrB,AADF,gCAAgC,gBAW7B;YADC,8FAAS,cAAU,IAAC;YAEpB,0BAA8D;YAChE,oBAAS;YACT,iFAAa;YAGf,oBAAQ;;YAjBD,iCAAwB;YAQ3B,cAAe;YAAf,wBAAe;YADf,gCAAuB;YAFvB,0CAAqB;;YAOW,cAAsB;YAAtB,+BAAsB;;YAExD,cAEC;YAFD,oCAEC;;;iFAOM,cAAc;cA5B1B,SAAS;eAAC;gBACT,QAAQ,EAAE,YAAY;gBACtB,UAAU,EAAE,IAAI;gBAChB,eAAe,EAAE,uBAAuB,CAAC,MAAM;gBAC/C,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;GAmBT;aACF;;kBAKE,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBAEL,MAAM;;kFAVI,cAAc"}
@@ -0,0 +1,92 @@
1
+ /**
2
+ * Angular Toast UI component with UIClassMap-driven styling.
3
+ *
4
+ * @module
5
+ */
6
+ import { EventEmitter, type OnDestroy, type OnInit } from '@angular/core';
7
+ import type { ColorVariant, UIClassMap } from '@molecule/app-ui';
8
+ import * as i0 from "@angular/core";
9
+ /**
10
+ * Angular Toast UI component with UIClassMap-driven styling.
11
+ */
12
+ export declare class MoleculeToast implements OnInit, OnDestroy {
13
+ title?: string;
14
+ description?: string;
15
+ status: ColorVariant;
16
+ duration: number;
17
+ dismissible: boolean;
18
+ closeLabel?: string;
19
+ position: 'top' | 'top-right' | 'top-left' | 'bottom' | 'bottom-right' | 'bottom-left';
20
+ className?: string;
21
+ style?: Record<string, string>;
22
+ testId?: string;
23
+ dismiss: EventEmitter<void>;
24
+ isVisible: boolean;
25
+ private timer?;
26
+ /**
27
+ * Retrieves the current UI class map.
28
+ * @returns The UIClassMap instance for styling.
29
+ */
30
+ get cm(): UIClassMap;
31
+ /**
32
+ * Computes the accessible close button label.
33
+ * @returns The localized aria-label for the close button.
34
+ */
35
+ get closeAriaLabel(): string;
36
+ /**
37
+ * Retrieves the CSS class for the toast title.
38
+ * @returns The title class name string.
39
+ */
40
+ get titleClass(): string;
41
+ /**
42
+ * Retrieves the CSS class for the toast description.
43
+ * @returns The description class name string.
44
+ */
45
+ get descriptionClass(): string;
46
+ /**
47
+ * Retrieves the CSS class for the close button.
48
+ * @returns The close button class name string.
49
+ */
50
+ get closeButtonClass(): string;
51
+ /**
52
+ * Determines the icon type based on the toast status.
53
+ * @returns The mapped icon type string.
54
+ */
55
+ get iconType(): string;
56
+ /**
57
+ * Determines whether the status icon should be shown.
58
+ * @returns True if the icon type is not default.
59
+ */
60
+ get showIcon(): boolean;
61
+ private statusIconMap;
62
+ /**
63
+ * Generates the SVG markup for the status icon.
64
+ * @returns The SVG string for the current status icon.
65
+ */
66
+ get statusIconSvg(): string;
67
+ /**
68
+ * Generates the SVG markup for the dismiss icon.
69
+ * @returns The SVG string for the dismiss button icon.
70
+ */
71
+ get dismissIconSvg(): string;
72
+ /**
73
+ * Computes the combined CSS classes for the toast container.
74
+ * @returns The toast class name string.
75
+ */
76
+ get toastClasses(): string;
77
+ /**
78
+ * Starts the auto-dismiss timer on component creation.
79
+ */
80
+ ngOnInit(): void;
81
+ /**
82
+ * Clears the auto-dismiss timer on component destruction.
83
+ */
84
+ ngOnDestroy(): void;
85
+ /**
86
+ * Handles the dismiss action by hiding the toast.
87
+ */
88
+ onDismiss(): void;
89
+ static ɵfac: i0.ɵɵFactoryDeclaration<MoleculeToast, never>;
90
+ static ɵcmp: i0.ɵɵComponentDeclaration<MoleculeToast, "mol-toast", never, { "title": { "alias": "title"; "required": false; }; "description": { "alias": "description"; "required": false; }; "status": { "alias": "status"; "required": false; }; "duration": { "alias": "duration"; "required": false; }; "dismissible": { "alias": "dismissible"; "required": false; }; "closeLabel": { "alias": "closeLabel"; "required": false; }; "position": { "alias": "position"; "required": false; }; "className": { "alias": "className"; "required": false; }; "style": { "alias": "style"; "required": false; }; "testId": { "alias": "testId"; "required": false; }; }, { "dismiss": "dismiss"; }, never, ["*"], true, never>;
91
+ }
92
+ //# sourceMappingURL=toast.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toast.component.d.ts","sourceRoot":"","sources":["../../src/components/toast.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAGL,YAAY,EAEZ,KAAK,SAAS,EACd,KAAK,MAAM,EAEZ,MAAM,eAAe,CAAA;AAItB,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;;AAehE;;GAEG;AACH,qBA+Ca,aAAc,YAAW,MAAM,EAAE,SAAS;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,EAAE,YAAY,CAAS;IAC7B,QAAQ,SAAO;IACf,WAAW,UAAO;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,KAAK,GAAG,WAAW,GAAG,UAAU,GAAG,QAAQ,GAAG,cAAc,GAAG,aAAa,CAC/E;IACP,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAA;IAEd,OAAO,qBAA2B;IAE5C,SAAS,UAAO;IAChB,OAAO,CAAC,KAAK,CAAC,CAA+B;IAE7C;;;OAGG;IACH,IAAI,EAAE,IAAI,UAAU,CAEnB;IAED;;;OAGG;IACH,IAAI,cAAc,IAAI,MAAM,CAE3B;IAED;;;OAGG;IACH,IAAI,UAAU,IAAI,MAAM,CAEvB;IAED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