@molecule/app-ui-angular 1.0.5 → 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 +11742 -1145
- 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 +10 -5
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Angular Select UI component with UIClassMap-driven styling.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
import { EventEmitter } from '@angular/core';
|
|
7
|
+
import type { SelectOption, Size, UIClassMap } from '@molecule/app-ui';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
/**
|
|
10
|
+
* Angular Select UI component with UIClassMap-driven styling.
|
|
11
|
+
*/
|
|
12
|
+
export declare class MoleculeSelect {
|
|
13
|
+
options: SelectOption<string>[];
|
|
14
|
+
value?: string;
|
|
15
|
+
size: Size;
|
|
16
|
+
label?: string;
|
|
17
|
+
placeholder?: string;
|
|
18
|
+
error?: string;
|
|
19
|
+
hint?: string;
|
|
20
|
+
clearable: boolean;
|
|
21
|
+
className?: string;
|
|
22
|
+
testId?: string;
|
|
23
|
+
disabled: boolean;
|
|
24
|
+
required: boolean;
|
|
25
|
+
name?: string;
|
|
26
|
+
id?: string;
|
|
27
|
+
valueChange: EventEmitter<string>;
|
|
28
|
+
handleChange: EventEmitter<Event>;
|
|
29
|
+
/**
|
|
30
|
+
* Retrieves the current UI class map.
|
|
31
|
+
* @returns The UIClassMap instance for styling.
|
|
32
|
+
*/
|
|
33
|
+
get cm(): UIClassMap;
|
|
34
|
+
/**
|
|
35
|
+
* Retrieves the CSS class for form error messages.
|
|
36
|
+
* @returns The form error class name string.
|
|
37
|
+
*/
|
|
38
|
+
get formErrorClass(): string;
|
|
39
|
+
/**
|
|
40
|
+
* Retrieves the CSS class for form hint messages.
|
|
41
|
+
* @returns The form hint class name string.
|
|
42
|
+
*/
|
|
43
|
+
get formHintClass(): string;
|
|
44
|
+
/**
|
|
45
|
+
* Resolves the select element ID.
|
|
46
|
+
* @returns The resolved ID from the id or name input.
|
|
47
|
+
*/
|
|
48
|
+
get selectId(): string;
|
|
49
|
+
/**
|
|
50
|
+
* Computes the aria-describedby attribute value.
|
|
51
|
+
* @returns The ID of the describing element, or null if none.
|
|
52
|
+
*/
|
|
53
|
+
get ariaDescribedBy(): string | null;
|
|
54
|
+
/**
|
|
55
|
+
* Computes the CSS classes for the select label.
|
|
56
|
+
* @returns The label class name string.
|
|
57
|
+
*/
|
|
58
|
+
get labelClasses(): string;
|
|
59
|
+
/**
|
|
60
|
+
* Computes the combined CSS classes for the select element.
|
|
61
|
+
* @returns The select class name string.
|
|
62
|
+
*/
|
|
63
|
+
get selectClasses(): string;
|
|
64
|
+
/**
|
|
65
|
+
* Handles select value change events.
|
|
66
|
+
* @param event - The change event from the select element.
|
|
67
|
+
*/
|
|
68
|
+
onSelectChange(event: Event): void;
|
|
69
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MoleculeSelect, never>;
|
|
70
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MoleculeSelect, "mol-select", never, { "options": { "alias": "options"; "required": false; }; "value": { "alias": "value"; "required": false; }; "size": { "alias": "size"; "required": false; }; "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "error": { "alias": "error"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "className": { "alias": "className"; "required": false; }; "testId": { "alias": "testId"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "required": { "alias": "required"; "required": false; }; "name": { "alias": "name"; "required": false; }; "id": { "alias": "id"; "required": false; }; }, { "valueChange": "valueChange"; "handleChange": "handleChange"; }, never, never, true, never>;
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=select.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select.component.d.ts","sourceRoot":"","sources":["../../../src/components/molecule/select.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,qBAsDa,cAAc;IAChB,OAAO,EAAE,YAAY,CAAC,MAAM,CAAC,EAAE,CAAK;IACpC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,IAAI,CAAO;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,UAAQ;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,UAAQ;IAChB,QAAQ,UAAQ;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,EAAE,CAAC,EAAE,MAAM,CAAA;IAEV,WAAW,uBAA6B;IACxC,YAAY,sBAA4B;IAElD;;;OAGG;IACH,IAAI,EAAE,IAAI,UAAU,CAEnB;IAED;;;OAGG;IACH,IAAI,cAAc,IAAI,MAAM,CAE3B;IAED;;;OAGG;IACH,IAAI,aAAa,IAAI,MAAM,CAE1B;IAED;;;OAGG;IACH,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED;;;OAGG;IACH,IAAI,eAAe,IAAI,MAAM,GAAG,IAAI,CAInC;IAED;;;OAGG;IACH,IAAI,YAAY,IAAI,MAAM,CAEzB;IAED;;;OAGG;IACH,IAAI,aAAa,IAAI,MAAM,CAM1B;IAED;;;OAGG;IACH,cAAc,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;yCArFvB,cAAc;2CAAd,cAAc;CA0F1B"}
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Angular Select 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
|
+
const _forTrack0 = ($index, $item) => $item.value;
|
|
10
|
+
function MoleculeSelect_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
11
|
+
i0.ɵɵdomElementStart(0, "label");
|
|
12
|
+
i0.ɵɵtext(1);
|
|
13
|
+
i0.ɵɵdomElementEnd();
|
|
14
|
+
} if (rf & 2) {
|
|
15
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
16
|
+
i0.ɵɵclassMap(ctx_r0.labelClasses);
|
|
17
|
+
i0.ɵɵattribute("for", ctx_r0.selectId);
|
|
18
|
+
i0.ɵɵadvance();
|
|
19
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r0.label, " ");
|
|
20
|
+
} }
|
|
21
|
+
function MoleculeSelect_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
22
|
+
i0.ɵɵdomElementStart(0, "option", 2);
|
|
23
|
+
i0.ɵɵtext(1);
|
|
24
|
+
i0.ɵɵdomElementEnd();
|
|
25
|
+
} if (rf & 2) {
|
|
26
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
27
|
+
i0.ɵɵadvance();
|
|
28
|
+
i0.ɵɵtextInterpolate(ctx_r0.placeholder);
|
|
29
|
+
} }
|
|
30
|
+
function MoleculeSelect_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
31
|
+
i0.ɵɵdomElementStart(0, "option", 3);
|
|
32
|
+
i0.ɵɵtext(1, "--");
|
|
33
|
+
i0.ɵɵdomElementEnd();
|
|
34
|
+
} }
|
|
35
|
+
function MoleculeSelect_For_7_Template(rf, ctx) { if (rf & 1) {
|
|
36
|
+
i0.ɵɵdomElementStart(0, "option", 4);
|
|
37
|
+
i0.ɵɵtext(1);
|
|
38
|
+
i0.ɵɵdomElementEnd();
|
|
39
|
+
} if (rf & 2) {
|
|
40
|
+
const option_r2 = ctx.$implicit;
|
|
41
|
+
i0.ɵɵdomProperty("value", option_r2.value)("disabled", option_r2.disabled);
|
|
42
|
+
i0.ɵɵadvance();
|
|
43
|
+
i0.ɵɵtextInterpolate1(" ", option_r2.label, " ");
|
|
44
|
+
} }
|
|
45
|
+
function MoleculeSelect_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
46
|
+
i0.ɵɵdomElementStart(0, "p", 6);
|
|
47
|
+
i0.ɵɵtext(1);
|
|
48
|
+
i0.ɵɵdomElementEnd();
|
|
49
|
+
} if (rf & 2) {
|
|
50
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
51
|
+
i0.ɵɵclassMap(ctx_r0.formErrorClass);
|
|
52
|
+
i0.ɵɵdomProperty("id", ctx_r0.selectId + "-error");
|
|
53
|
+
i0.ɵɵadvance();
|
|
54
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r0.error, " ");
|
|
55
|
+
} }
|
|
56
|
+
function MoleculeSelect_Conditional_9_Template(rf, ctx) { if (rf & 1) {
|
|
57
|
+
i0.ɵɵdomElementStart(0, "p", 6);
|
|
58
|
+
i0.ɵɵtext(1);
|
|
59
|
+
i0.ɵɵdomElementEnd();
|
|
60
|
+
} if (rf & 2) {
|
|
61
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
62
|
+
i0.ɵɵclassMap(ctx_r0.formHintClass);
|
|
63
|
+
i0.ɵɵdomProperty("id", ctx_r0.selectId + "-hint");
|
|
64
|
+
i0.ɵɵadvance();
|
|
65
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r0.hint, " ");
|
|
66
|
+
} }
|
|
67
|
+
/**
|
|
68
|
+
* Angular Select UI component with UIClassMap-driven styling.
|
|
69
|
+
*/
|
|
70
|
+
/**
|
|
71
|
+
* Molecule Select class.
|
|
72
|
+
* @deprecated Use the React-named component `Select` instead.
|
|
73
|
+
*/
|
|
74
|
+
export class MoleculeSelect {
|
|
75
|
+
options = [];
|
|
76
|
+
value;
|
|
77
|
+
size = 'md';
|
|
78
|
+
label;
|
|
79
|
+
placeholder;
|
|
80
|
+
error;
|
|
81
|
+
hint;
|
|
82
|
+
clearable = false;
|
|
83
|
+
className;
|
|
84
|
+
testId;
|
|
85
|
+
disabled = false;
|
|
86
|
+
required = false;
|
|
87
|
+
name;
|
|
88
|
+
id;
|
|
89
|
+
valueChange = new EventEmitter();
|
|
90
|
+
handleChange = new EventEmitter();
|
|
91
|
+
/**
|
|
92
|
+
* Retrieves the current UI class map.
|
|
93
|
+
* @returns The UIClassMap instance for styling.
|
|
94
|
+
*/
|
|
95
|
+
get cm() {
|
|
96
|
+
return getClassMap();
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Retrieves the CSS class for form error messages.
|
|
100
|
+
* @returns The form error class name string.
|
|
101
|
+
*/
|
|
102
|
+
get formErrorClass() {
|
|
103
|
+
return this.cm.formError;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Retrieves the CSS class for form hint messages.
|
|
107
|
+
* @returns The form hint class name string.
|
|
108
|
+
*/
|
|
109
|
+
get formHintClass() {
|
|
110
|
+
return this.cm.formHint;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Resolves the select element ID.
|
|
114
|
+
* @returns The resolved ID from the id or name input.
|
|
115
|
+
*/
|
|
116
|
+
get selectId() {
|
|
117
|
+
return this.id || this.name || '';
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Computes the aria-describedby attribute value.
|
|
121
|
+
* @returns The ID of the describing element, or null if none.
|
|
122
|
+
*/
|
|
123
|
+
get ariaDescribedBy() {
|
|
124
|
+
if (this.error)
|
|
125
|
+
return `${this.selectId}-error`;
|
|
126
|
+
if (this.hint)
|
|
127
|
+
return `${this.selectId}-hint`;
|
|
128
|
+
return null;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Computes the CSS classes for the select label.
|
|
132
|
+
* @returns The label class name string.
|
|
133
|
+
*/
|
|
134
|
+
get labelClasses() {
|
|
135
|
+
return this.cm.cn(this.cm.label({ required: this.required }), this.cm.labelBlock);
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Computes the combined CSS classes for the select element.
|
|
139
|
+
* @returns The select class name string.
|
|
140
|
+
*/
|
|
141
|
+
get selectClasses() {
|
|
142
|
+
return this.cm.cn(this.cm.select({ error: !!this.error, size: this.size }), this.cm.selectNative, this.className);
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Handles select value change events.
|
|
146
|
+
* @param event - The change event from the select element.
|
|
147
|
+
*/
|
|
148
|
+
onSelectChange(event) {
|
|
149
|
+
const target = event.target;
|
|
150
|
+
this.handleChange.emit(event);
|
|
151
|
+
this.valueChange.emit(target.value);
|
|
152
|
+
}
|
|
153
|
+
static ɵfac = function MoleculeSelect_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MoleculeSelect)(); };
|
|
154
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MoleculeSelect, selectors: [["mol-select"]], inputs: { options: "options", value: "value", size: "size", label: "label", placeholder: "placeholder", error: "error", hint: "hint", clearable: "clearable", className: "className", testId: "testId", disabled: "disabled", required: "required", name: "name", id: "id" }, outputs: { valueChange: "valueChange", handleChange: "handleChange" }, decls: 10, vars: 19, consts: [[3, "class"], [3, "change", "id", "name", "value", "disabled", "required"], ["value", "", "disabled", ""], ["value", ""], [3, "value", "disabled"], [3, "id", "class"], [3, "id"]], template: function MoleculeSelect_Template(rf, ctx) { if (rf & 1) {
|
|
155
|
+
i0.ɵɵdomElementStart(0, "div");
|
|
156
|
+
i0.ɵɵconditionalCreate(1, MoleculeSelect_Conditional_1_Template, 2, 4, "label", 0);
|
|
157
|
+
i0.ɵɵdomElementStart(2, "div")(3, "select", 1);
|
|
158
|
+
i0.ɵɵdomListener("change", function MoleculeSelect_Template_select_change_3_listener($event) { return ctx.onSelectChange($event); });
|
|
159
|
+
i0.ɵɵconditionalCreate(4, MoleculeSelect_Conditional_4_Template, 2, 1, "option", 2);
|
|
160
|
+
i0.ɵɵconditionalCreate(5, MoleculeSelect_Conditional_5_Template, 2, 0, "option", 3);
|
|
161
|
+
i0.ɵɵrepeaterCreate(6, MoleculeSelect_For_7_Template, 2, 3, "option", 4, _forTrack0);
|
|
162
|
+
i0.ɵɵdomElementEnd()();
|
|
163
|
+
i0.ɵɵconditionalCreate(8, MoleculeSelect_Conditional_8_Template, 2, 4, "p", 5);
|
|
164
|
+
i0.ɵɵconditionalCreate(9, MoleculeSelect_Conditional_9_Template, 2, 4, "p", 5);
|
|
165
|
+
i0.ɵɵdomElementEnd();
|
|
166
|
+
} if (rf & 2) {
|
|
167
|
+
i0.ɵɵclassMap(ctx.cm.inputWrapper);
|
|
168
|
+
i0.ɵɵadvance();
|
|
169
|
+
i0.ɵɵconditional(ctx.label ? 1 : -1);
|
|
170
|
+
i0.ɵɵadvance();
|
|
171
|
+
i0.ɵɵclassMap(ctx.cm.inputInner);
|
|
172
|
+
i0.ɵɵadvance();
|
|
173
|
+
i0.ɵɵclassMap(ctx.selectClasses);
|
|
174
|
+
i0.ɵɵdomProperty("id", ctx.selectId)("name", ctx.name)("value", ctx.value)("disabled", ctx.disabled)("required", ctx.required);
|
|
175
|
+
i0.ɵɵattribute("aria-invalid", !!ctx.error)("aria-describedby", ctx.ariaDescribedBy)("data-testid", ctx.testId);
|
|
176
|
+
i0.ɵɵadvance();
|
|
177
|
+
i0.ɵɵconditional(ctx.placeholder ? 4 : -1);
|
|
178
|
+
i0.ɵɵadvance();
|
|
179
|
+
i0.ɵɵconditional(ctx.clearable ? 5 : -1);
|
|
180
|
+
i0.ɵɵadvance();
|
|
181
|
+
i0.ɵɵrepeater(ctx.options);
|
|
182
|
+
i0.ɵɵadvance(2);
|
|
183
|
+
i0.ɵɵconditional(ctx.error ? 8 : -1);
|
|
184
|
+
i0.ɵɵadvance();
|
|
185
|
+
i0.ɵɵconditional(ctx.hint && !ctx.error ? 9 : -1);
|
|
186
|
+
} }, encapsulation: 2 });
|
|
187
|
+
}
|
|
188
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MoleculeSelect, [{
|
|
189
|
+
type: Component,
|
|
190
|
+
args: [{
|
|
191
|
+
selector: 'mol-select',
|
|
192
|
+
standalone: true,
|
|
193
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
194
|
+
template: `
|
|
195
|
+
<div [class]="cm.inputWrapper">
|
|
196
|
+
@if (label) {
|
|
197
|
+
<label [attr.for]="selectId" [class]="labelClasses">
|
|
198
|
+
{{ label }}
|
|
199
|
+
</label>
|
|
200
|
+
}
|
|
201
|
+
<div [class]="cm.inputInner">
|
|
202
|
+
<select
|
|
203
|
+
[id]="selectId"
|
|
204
|
+
[name]="name"
|
|
205
|
+
[value]="value"
|
|
206
|
+
[disabled]="disabled"
|
|
207
|
+
[required]="required"
|
|
208
|
+
[attr.aria-invalid]="!!error"
|
|
209
|
+
[attr.aria-describedby]="ariaDescribedBy"
|
|
210
|
+
[class]="selectClasses"
|
|
211
|
+
[attr.data-testid]="testId"
|
|
212
|
+
(change)="onSelectChange($event)"
|
|
213
|
+
>
|
|
214
|
+
@if (placeholder) {
|
|
215
|
+
<option value="" disabled>{{ placeholder }}</option>
|
|
216
|
+
}
|
|
217
|
+
@if (clearable) {
|
|
218
|
+
<option value="">--</option>
|
|
219
|
+
}
|
|
220
|
+
@for (option of options; track option.value) {
|
|
221
|
+
<option [value]="option.value" [disabled]="option.disabled">
|
|
222
|
+
{{ option.label }}
|
|
223
|
+
</option>
|
|
224
|
+
}
|
|
225
|
+
</select>
|
|
226
|
+
</div>
|
|
227
|
+
@if (error) {
|
|
228
|
+
<p [id]="selectId + '-error'" [class]="formErrorClass">
|
|
229
|
+
{{ error }}
|
|
230
|
+
</p>
|
|
231
|
+
}
|
|
232
|
+
@if (hint && !error) {
|
|
233
|
+
<p [id]="selectId + '-hint'" [class]="formHintClass">
|
|
234
|
+
{{ hint }}
|
|
235
|
+
</p>
|
|
236
|
+
}
|
|
237
|
+
</div>
|
|
238
|
+
`,
|
|
239
|
+
}]
|
|
240
|
+
}], null, { options: [{
|
|
241
|
+
type: Input
|
|
242
|
+
}], value: [{
|
|
243
|
+
type: Input
|
|
244
|
+
}], size: [{
|
|
245
|
+
type: Input
|
|
246
|
+
}], label: [{
|
|
247
|
+
type: Input
|
|
248
|
+
}], placeholder: [{
|
|
249
|
+
type: Input
|
|
250
|
+
}], error: [{
|
|
251
|
+
type: Input
|
|
252
|
+
}], hint: [{
|
|
253
|
+
type: Input
|
|
254
|
+
}], clearable: [{
|
|
255
|
+
type: Input
|
|
256
|
+
}], className: [{
|
|
257
|
+
type: Input
|
|
258
|
+
}], testId: [{
|
|
259
|
+
type: Input
|
|
260
|
+
}], disabled: [{
|
|
261
|
+
type: Input
|
|
262
|
+
}], required: [{
|
|
263
|
+
type: Input
|
|
264
|
+
}], name: [{
|
|
265
|
+
type: Input
|
|
266
|
+
}], id: [{
|
|
267
|
+
type: Input
|
|
268
|
+
}], valueChange: [{
|
|
269
|
+
type: Output
|
|
270
|
+
}], handleChange: [{
|
|
271
|
+
type: Output
|
|
272
|
+
}] }); })();
|
|
273
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MoleculeSelect, { className: "MoleculeSelect", filePath: "components/molecule/select.component.ts", lineNumber: 69 }); })();
|
|
274
|
+
//# sourceMappingURL=select.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select.component.js","sourceRoot":"","sources":["../../../src/components/molecule/select.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,uBAAuB,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAG/F,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;;;;IAYtC,gCAAoD;IAClD,YACF;IAAA,oBAAQ;;;IAFqB,kCAAsB;;IACjD,cACF;IADE,6CACF;;;IAgBI,oCAA0B;IAAA,YAAiB;IAAA,oBAAS;;;IAA1B,cAAiB;IAAjB,wCAAiB;;;IAG3C,oCAAiB;IAAA,kBAAE;IAAA,oBAAS;;;IAG5B,oCAA4D;IAC1D,YACF;IAAA,oBAAS;;;IAFsB,AAAvB,0CAAsB,gCAA6B;IACzD,cACF;IADE,gDACF;;;IAKJ,+BAAuD;IACrD,YACF;IAAA,oBAAI;;;IAF0B,oCAAwB;IAAnD,kDAA0B;IAC3B,cACF;IADE,6CACF;;;IAGA,+BAAqD;IACnD,YACF;IAAA,oBAAI;;;IAFyB,mCAAuB;IAAjD,iDAAyB;IAC1B,cACF;IADE,4CACF;;AAhDR;;GAEG;AAmDH;;;GAGG;AACH,MAAM,OAAO,cAAc;IAChB,OAAO,GAA2B,EAAE,CAAA;IACpC,KAAK,CAAS;IACd,IAAI,GAAS,IAAI,CAAA;IACjB,KAAK,CAAS;IACd,WAAW,CAAS;IACpB,KAAK,CAAS;IACd,IAAI,CAAS;IACb,SAAS,GAAG,KAAK,CAAA;IACjB,SAAS,CAAS;IAClB,MAAM,CAAS;IACf,QAAQ,GAAG,KAAK,CAAA;IAChB,QAAQ,GAAG,KAAK,CAAA;IAChB,IAAI,CAAS;IACb,EAAE,CA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
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* Angular Spinner UI component with UIClassMap-driven styling.
|
|
5
|
+
*/
|
|
6
|
+
export declare class MoleculeSpinner {
|
|
7
|
+
size: Size;
|
|
8
|
+
color?: ColorVariant | string;
|
|
9
|
+
label?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
style?: Record<string, string>;
|
|
12
|
+
testId?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Reactive translation, read in the injection context. Its `t` reads the
|
|
15
|
+
* locale, so the view re-renders the text on a locale switch (the static `t`
|
|
16
|
+
* does not).
|
|
17
|
+
*/
|
|
18
|
+
private readonly i18n;
|
|
19
|
+
/**
|
|
20
|
+
* Retrieves the current UI class map.
|
|
21
|
+
* @returns The UIClassMap instance for styling.
|
|
22
|
+
*/
|
|
23
|
+
get cm(): UIClassMap;
|
|
24
|
+
/**
|
|
25
|
+
* Computes the accessible spinner label.
|
|
26
|
+
* @returns The localized aria-label for the spinner.
|
|
27
|
+
*/
|
|
28
|
+
get spinnerLabel(): string;
|
|
29
|
+
/**
|
|
30
|
+
* Computes the combined CSS classes for the spinner element.
|
|
31
|
+
* @returns The spinner class name string.
|
|
32
|
+
*/
|
|
33
|
+
get spinnerClasses(): string;
|
|
34
|
+
/**
|
|
35
|
+
* Computes the merged inline styles including custom color.
|
|
36
|
+
* @returns The computed style object with optional custom border color.
|
|
37
|
+
*/
|
|
38
|
+
get computedStyle(): Record<string, string>;
|
|
39
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MoleculeSpinner, never>;
|
|
40
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MoleculeSpinner, "mol-spinner", never, { "size": { "alias": "size"; "required": false; }; "color": { "alias": "color"; "required": false; }; "label": { "alias": "label"; "required": false; }; "className": { "alias": "className"; "required": false; }; "style": { "alias": "style"; "required": false; }; "testId": { "alias": "testId"; "required": false; }; }, {}, never, never, true, never>;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=spinner.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spinner.component.d.ts","sourceRoot":"","sources":["../../../src/components/molecule/spinner.component.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;;AAGtE;;GAEG;AACH,qBAsBa,eAAe;IACjB,IAAI,EAAE,IAAI,CAAO;IACjB,KAAK,CAAC,EAAE,YAAY,GAAG,MAAM,CAAA;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAA;IAExB;;;;OAIG;IACH,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAmB;IAExC;;;OAGG;IACH,IAAI,EAAE,IAAI,UAAU,CAEnB;IAED;;;OAGG;IACH,IAAI,YAAY,IAAI,MAAM,CAEzB;IAED;;;OAGG;IACH,IAAI,cAAc,IAAI,MAAM,CAE3B;IAED;;;OAGG;IACH,IAAI,aAAa,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAW1C;yCAtDU,eAAe;2CAAf,eAAe;CAuD3B"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Angular Spinner UI component with UIClassMap-driven styling.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
|
7
|
+
import { useTranslation } from '@molecule/app-angular';
|
|
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
|
+
* @deprecated Use the React-named component `Spinner` instead.
|
|
26
|
+
*/
|
|
27
|
+
export class MoleculeSpinner {
|
|
28
|
+
size = 'md';
|
|
29
|
+
color;
|
|
30
|
+
label;
|
|
31
|
+
className;
|
|
32
|
+
style;
|
|
33
|
+
testId;
|
|
34
|
+
/**
|
|
35
|
+
* Reactive translation, read in the injection context. Its `t` reads the
|
|
36
|
+
* locale, so the view re-renders the text on a locale switch (the static `t`
|
|
37
|
+
* does not).
|
|
38
|
+
*/
|
|
39
|
+
i18n = useTranslation();
|
|
40
|
+
/**
|
|
41
|
+
* Retrieves the current UI class map.
|
|
42
|
+
* @returns The UIClassMap instance for styling.
|
|
43
|
+
*/
|
|
44
|
+
get cm() {
|
|
45
|
+
return getClassMap();
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Computes the accessible spinner label.
|
|
49
|
+
* @returns The localized aria-label for the spinner.
|
|
50
|
+
*/
|
|
51
|
+
get spinnerLabel() {
|
|
52
|
+
return this.label || this.i18n.t('ui.spinner.loading', undefined, { defaultValue: 'Loading' });
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Computes the combined CSS classes for the spinner element.
|
|
56
|
+
* @returns The spinner class name string.
|
|
57
|
+
*/
|
|
58
|
+
get spinnerClasses() {
|
|
59
|
+
return this.cm.cn(this.cm.spinner({ size: this.size }), this.className);
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Computes the merged inline styles including custom color.
|
|
63
|
+
* @returns The computed style object with optional custom border color.
|
|
64
|
+
*/
|
|
65
|
+
get computedStyle() {
|
|
66
|
+
const base = { ...this.style };
|
|
67
|
+
if (this.color &&
|
|
68
|
+
typeof this.color === 'string' &&
|
|
69
|
+
!['primary', 'secondary', 'success', 'warning', 'error', 'info'].includes(this.color)) {
|
|
70
|
+
base['borderColor'] = this.color;
|
|
71
|
+
base['borderTopColor'] = 'transparent';
|
|
72
|
+
}
|
|
73
|
+
return base;
|
|
74
|
+
}
|
|
75
|
+
static ɵfac = function MoleculeSpinner_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MoleculeSpinner)(); };
|
|
76
|
+
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) {
|
|
77
|
+
i0.ɵɵdomElementStart(0, "div", 0);
|
|
78
|
+
i0.ɵɵconditionalCreate(1, MoleculeSpinner_Conditional_1_Template, 2, 3, "span", 1);
|
|
79
|
+
i0.ɵɵdomElementEnd();
|
|
80
|
+
} if (rf & 2) {
|
|
81
|
+
i0.ɵɵstyleMap(ctx.computedStyle);
|
|
82
|
+
i0.ɵɵclassMap(ctx.spinnerClasses);
|
|
83
|
+
i0.ɵɵattribute("aria-label", ctx.spinnerLabel)("data-testid", ctx.testId);
|
|
84
|
+
i0.ɵɵadvance();
|
|
85
|
+
i0.ɵɵconditional(ctx.label ? 1 : -1);
|
|
86
|
+
} }, encapsulation: 2 });
|
|
87
|
+
}
|
|
88
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MoleculeSpinner, [{
|
|
89
|
+
type: Component,
|
|
90
|
+
args: [{
|
|
91
|
+
selector: 'mol-spinner',
|
|
92
|
+
standalone: true,
|
|
93
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
94
|
+
template: `
|
|
95
|
+
<div
|
|
96
|
+
role="status"
|
|
97
|
+
[attr.aria-label]="spinnerLabel"
|
|
98
|
+
[class]="spinnerClasses"
|
|
99
|
+
[style]="computedStyle"
|
|
100
|
+
[attr.data-testid]="testId"
|
|
101
|
+
>
|
|
102
|
+
@if (label) {
|
|
103
|
+
<span [class]="cm.srOnly">{{ label }}</span>
|
|
104
|
+
}
|
|
105
|
+
</div>
|
|
106
|
+
`,
|
|
107
|
+
}]
|
|
108
|
+
}], null, { size: [{
|
|
109
|
+
type: Input
|
|
110
|
+
}], color: [{
|
|
111
|
+
type: Input
|
|
112
|
+
}], label: [{
|
|
113
|
+
type: Input
|
|
114
|
+
}], className: [{
|
|
115
|
+
type: Input
|
|
116
|
+
}], style: [{
|
|
117
|
+
type: Input
|
|
118
|
+
}], testId: [{
|
|
119
|
+
type: Input
|
|
120
|
+
}] }); })();
|
|
121
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MoleculeSpinner, { className: "MoleculeSpinner", filePath: "components/molecule/spinner.component.ts", lineNumber: 38 }); })();
|
|
122
|
+
//# sourceMappingURL=spinner.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spinner.component.js","sourceRoot":"","sources":["../../../src/components/molecule/spinner.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,uBAAuB,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAEzE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAEtD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;;;IAkBtC,+BAA0B;IAAA,YAAW;IAAA,oBAAO;;;IAAtC,+BAAmB;IAAC,cAAW;IAAX,kCAAW;;AAhB7C;;GAEG;AAmBH;;;GAGG;AACH,MA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cAEC;YAFD,oCAEC;;;iFAQM,eAAe;cAtB3B,SAAS;eAAC;gBACT,QAAQ,EAAE,aAAa;gBACvB,UAAU,EAAE,IAAI;gBAChB,eAAe,EAAE,uBAAuB,CAAC,MAAM;gBAC/C,QAAQ,EAAE;;;;;;;;;;;;GAYT;aACF;;kBAME,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/molecule/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,qBA6Ba,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"}
|