@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,167 @@
|
|
|
1
|
+
import type { UIClassMap } from '@molecule/app-ui';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* Container component.
|
|
5
|
+
*
|
|
6
|
+
* Centers a max-width content column; rest props land on the host element.
|
|
7
|
+
*/
|
|
8
|
+
export declare class Container {
|
|
9
|
+
/** Maximum width preset. */
|
|
10
|
+
maxWidth: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'full' | string;
|
|
11
|
+
/** Whether the column is centered. */
|
|
12
|
+
centered: boolean;
|
|
13
|
+
/** Horizontal padding (accepted for React parity, not rendered). */
|
|
14
|
+
paddingX?: unknown;
|
|
15
|
+
/** Extra classes. */
|
|
16
|
+
className?: string;
|
|
17
|
+
/** Inline style object (React camelCase). */
|
|
18
|
+
style?: Record<string, unknown>;
|
|
19
|
+
/** `data-testid`. */
|
|
20
|
+
testId?: string;
|
|
21
|
+
/**
|
|
22
|
+
* The current class map.
|
|
23
|
+
* @returns The UIClassMap.
|
|
24
|
+
*/
|
|
25
|
+
cm(): UIClassMap;
|
|
26
|
+
/**
|
|
27
|
+
* Computes the container class list.
|
|
28
|
+
* @returns The class string.
|
|
29
|
+
*/
|
|
30
|
+
classes(): string;
|
|
31
|
+
/**
|
|
32
|
+
* Serializes the inline style.
|
|
33
|
+
* @returns The style attribute text.
|
|
34
|
+
*/
|
|
35
|
+
hostStyle(): string | null;
|
|
36
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Container, never>;
|
|
37
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<Container, "div[mol-container]", never, { "maxWidth": { "alias": "maxWidth"; "required": false; }; "centered": { "alias": "centered"; "required": false; }; "paddingX": { "alias": "paddingX"; "required": false; }; "className": { "alias": "className"; "required": false; }; "style": { "alias": "style"; "required": false; }; "testId": { "alias": "testId"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Flex container component.
|
|
41
|
+
*
|
|
42
|
+
* A numeric or non-preset string gap becomes an inline style.
|
|
43
|
+
*/
|
|
44
|
+
export declare class Flex {
|
|
45
|
+
/** Flex direction. */
|
|
46
|
+
direction: 'row' | 'column' | 'row-reverse' | 'column-reverse';
|
|
47
|
+
/** Main-axis justification. */
|
|
48
|
+
justify?: string;
|
|
49
|
+
/** Cross-axis alignment. */
|
|
50
|
+
align?: string;
|
|
51
|
+
/** Wrapping behavior. */
|
|
52
|
+
wrap?: string;
|
|
53
|
+
/** Gap (preset name, number in px, or any CSS value). */
|
|
54
|
+
gap?: number | string;
|
|
55
|
+
/** Extra classes. */
|
|
56
|
+
className?: string;
|
|
57
|
+
/** Inline style object (React camelCase). */
|
|
58
|
+
style?: Record<string, unknown>;
|
|
59
|
+
/** `data-testid`. */
|
|
60
|
+
testId?: string;
|
|
61
|
+
/**
|
|
62
|
+
* The current class map.
|
|
63
|
+
* @returns The UIClassMap.
|
|
64
|
+
*/
|
|
65
|
+
cm(): UIClassMap;
|
|
66
|
+
/**
|
|
67
|
+
* Computes the flex class list.
|
|
68
|
+
* @returns The class string.
|
|
69
|
+
*/
|
|
70
|
+
classes(): string;
|
|
71
|
+
/**
|
|
72
|
+
* Serializes the merged inline style (numeric or custom gaps inline).
|
|
73
|
+
* @returns The style attribute text.
|
|
74
|
+
*/
|
|
75
|
+
hostStyle(): string | null;
|
|
76
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Flex, never>;
|
|
77
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<Flex, "div[mol-flex]", never, { "direction": { "alias": "direction"; "required": false; }; "justify": { "alias": "justify"; "required": false; }; "align": { "alias": "align"; "required": false; }; "wrap": { "alias": "wrap"; "required": false; }; "gap": { "alias": "gap"; "required": false; }; "className": { "alias": "className"; "required": false; }; "style": { "alias": "style"; "required": false; }; "testId": { "alias": "testId"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Grid container component.
|
|
81
|
+
*
|
|
82
|
+
* Numeric `columns` maps to the class map; a string is a `grid-template-columns`
|
|
83
|
+
* value. `gap`/`columnGap`/`rowGap` follow the same preset-or-CSS rule as Flex.
|
|
84
|
+
*/
|
|
85
|
+
export declare class Grid {
|
|
86
|
+
/** Column count or `grid-template-columns` value. */
|
|
87
|
+
columns?: number | string;
|
|
88
|
+
/** `grid-template-rows` value. */
|
|
89
|
+
rows?: string;
|
|
90
|
+
/** Gap (preset name, number in px, or any CSS value). */
|
|
91
|
+
gap?: number | string;
|
|
92
|
+
/** Column gap. */
|
|
93
|
+
columnGap?: number | string;
|
|
94
|
+
/** Row gap. */
|
|
95
|
+
rowGap?: number | string;
|
|
96
|
+
/** Extra classes. */
|
|
97
|
+
className?: string;
|
|
98
|
+
/** Inline style object (React camelCase). */
|
|
99
|
+
style?: Record<string, unknown>;
|
|
100
|
+
/** `data-testid`. */
|
|
101
|
+
testId?: string;
|
|
102
|
+
/**
|
|
103
|
+
* The current class map.
|
|
104
|
+
* @returns The UIClassMap.
|
|
105
|
+
*/
|
|
106
|
+
cm(): UIClassMap;
|
|
107
|
+
/**
|
|
108
|
+
* Computes the grid class list.
|
|
109
|
+
* @returns The class string.
|
|
110
|
+
*/
|
|
111
|
+
classes(): string;
|
|
112
|
+
/**
|
|
113
|
+
* Serializes the merged inline style.
|
|
114
|
+
* @returns The style attribute text.
|
|
115
|
+
*/
|
|
116
|
+
hostStyle(): string | null;
|
|
117
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Grid, never>;
|
|
118
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<Grid, "div[mol-grid]", never, { "columns": { "alias": "columns"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "gap": { "alias": "gap"; "required": false; }; "columnGap": { "alias": "columnGap"; "required": false; }; "rowGap": { "alias": "rowGap"; "required": false; }; "className": { "alias": "className"; "required": false; }; "style": { "alias": "style"; "required": false; }; "testId": { "alias": "testId"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Spacer component.
|
|
122
|
+
*
|
|
123
|
+
* A preset size uses the class map; a number (px) or custom CSS value uses
|
|
124
|
+
* inline width/height.
|
|
125
|
+
*/
|
|
126
|
+
export declare class Spacer {
|
|
127
|
+
/** Spacer size (preset name, number in px, or CSS value). */
|
|
128
|
+
size: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | number | string;
|
|
129
|
+
/** Whether the spacer takes width instead of height. */
|
|
130
|
+
horizontal?: boolean;
|
|
131
|
+
/** Extra classes. */
|
|
132
|
+
className?: string;
|
|
133
|
+
/** Inline style object (React camelCase). */
|
|
134
|
+
style?: Record<string, unknown>;
|
|
135
|
+
/** `data-testid`. */
|
|
136
|
+
testId?: string;
|
|
137
|
+
/** Explicit `aria-hidden` (React stringifies booleans). */
|
|
138
|
+
ariaHidden?: boolean | string;
|
|
139
|
+
/**
|
|
140
|
+
* The `aria-hidden` attribute value (React renders `true` as `"true"`).
|
|
141
|
+
* @returns The attribute text or null.
|
|
142
|
+
*/
|
|
143
|
+
ariaHiddenAttr(): string | null;
|
|
144
|
+
/**
|
|
145
|
+
* The current class map.
|
|
146
|
+
* @returns The UIClassMap.
|
|
147
|
+
*/
|
|
148
|
+
cm(): UIClassMap;
|
|
149
|
+
/**
|
|
150
|
+
* Whether `size` is one of the class map's named sizes.
|
|
151
|
+
* @returns True for preset names.
|
|
152
|
+
*/
|
|
153
|
+
get isNamedSize(): boolean;
|
|
154
|
+
/**
|
|
155
|
+
* Computes the spacer class list.
|
|
156
|
+
* @returns The class string.
|
|
157
|
+
*/
|
|
158
|
+
classes(): string;
|
|
159
|
+
/**
|
|
160
|
+
* Serializes the merged inline style.
|
|
161
|
+
* @returns The style attribute text.
|
|
162
|
+
*/
|
|
163
|
+
hostStyle(): string | null;
|
|
164
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Spacer, never>;
|
|
165
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<Spacer, "div[mol-spacer]", never, { "size": { "alias": "size"; "required": false; }; "horizontal": { "alias": "horizontal"; "required": false; }; "className": { "alias": "className"; "required": false; }; "style": { "alias": "style"; "required": false; }; "testId": { "alias": "testId"; "required": false; }; "ariaHidden": { "alias": "aria-hidden"; "required": false; }; }, {}, never, never, true, never>;
|
|
166
|
+
}
|
|
167
|
+
//# sourceMappingURL=layout.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.component.d.ts","sourceRoot":"","sources":["../../src/components/layout.component.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;;AAmBlD;;;;GAIG;AACH,qBAWa,SAAS;IACpB,4BAA4B;IAC5B,QAAQ,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,CAAO;IACpE,sCAAsC;IACtC,QAAQ,UAAO;IACf,oEAAoE;IACpE,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,qBAAqB;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,6CAA6C;IAC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* @module
|
|
5
|
+
*/
|
|
6
|
+
import { Component } from '@angular/core';
|
|
7
|
+
import { getClassMap } from '@molecule/app-ui';
|
|
8
|
+
import { styleText } from '../utilities/style.js';
|
|
9
|
+
import * as i0 from "@angular/core";
|
|
10
|
+
const _c0 = ["*"];
|
|
11
|
+
/** Gap names the class map understands; anything else is a CSS value. */
|
|
12
|
+
const GAP_NAMES = ['none', 'xs', 'sm', 'md', 'lg', 'xl'];
|
|
13
|
+
/** Spacer size names the class map understands. */
|
|
14
|
+
const SPACER_SIZES = ['xs', 'sm', 'md', 'lg', 'xl'];
|
|
15
|
+
/** The class-map direction spellings for React's flex directions. */
|
|
16
|
+
const DIRECTION_MAP = {
|
|
17
|
+
row: 'row',
|
|
18
|
+
column: 'col',
|
|
19
|
+
'row-reverse': 'row-reverse',
|
|
20
|
+
'column-reverse': 'col-reverse',
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Container component.
|
|
24
|
+
*
|
|
25
|
+
* Centers a max-width content column; rest props land on the host element.
|
|
26
|
+
*/
|
|
27
|
+
export class Container {
|
|
28
|
+
/** Maximum width preset. */
|
|
29
|
+
maxWidth = 'lg';
|
|
30
|
+
/** Whether the column is centered. */
|
|
31
|
+
centered = true;
|
|
32
|
+
/** Horizontal padding (accepted for React parity, not rendered). */
|
|
33
|
+
paddingX;
|
|
34
|
+
/** Extra classes. */
|
|
35
|
+
className;
|
|
36
|
+
/** Inline style object (React camelCase). */
|
|
37
|
+
style;
|
|
38
|
+
/** `data-testid`. */
|
|
39
|
+
testId;
|
|
40
|
+
/**
|
|
41
|
+
* The current class map.
|
|
42
|
+
* @returns The UIClassMap.
|
|
43
|
+
*/
|
|
44
|
+
cm() {
|
|
45
|
+
return getClassMap();
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Computes the container class list.
|
|
49
|
+
* @returns The class string.
|
|
50
|
+
*/
|
|
51
|
+
classes() {
|
|
52
|
+
return this.cm().cn(this.cm().container({
|
|
53
|
+
size: this.maxWidth,
|
|
54
|
+
}), this.centered && this.cm().mxAuto, this.className);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Serializes the inline style.
|
|
58
|
+
* @returns The style attribute text.
|
|
59
|
+
*/
|
|
60
|
+
hostStyle() {
|
|
61
|
+
return styleText(this.style);
|
|
62
|
+
}
|
|
63
|
+
static ɵfac = function Container_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || Container)(); };
|
|
64
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Container, selectors: [["div", "mol-container", ""]], hostVars: 5, hostBindings: function Container_HostBindings(rf, ctx) { if (rf & 2) {
|
|
65
|
+
i0.ɵɵattribute("data-testid", ctx.testId);
|
|
66
|
+
i0.ɵɵstyleMap(ctx.hostStyle());
|
|
67
|
+
i0.ɵɵclassMap(ctx.classes());
|
|
68
|
+
} }, inputs: { maxWidth: "maxWidth", centered: "centered", paddingX: "paddingX", className: "className", style: "style", testId: "testId" }, ngContentSelectors: _c0, decls: 1, vars: 0, template: function Container_Template(rf, ctx) { if (rf & 1) {
|
|
69
|
+
i0.ɵɵprojectionDef();
|
|
70
|
+
i0.ɵɵprojection(0);
|
|
71
|
+
} }, encapsulation: 2 });
|
|
72
|
+
}
|
|
73
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(Container, [{
|
|
74
|
+
type: Component,
|
|
75
|
+
args: [{
|
|
76
|
+
selector: 'div[mol-container]',
|
|
77
|
+
standalone: true,
|
|
78
|
+
inputs: ['maxWidth', 'centered', 'paddingX', 'className', 'style', 'testId'],
|
|
79
|
+
host: {
|
|
80
|
+
'[class]': 'classes()',
|
|
81
|
+
'[style]': 'hostStyle()',
|
|
82
|
+
'[attr.data-testid]': 'testId',
|
|
83
|
+
},
|
|
84
|
+
template: `<ng-content></ng-content>`,
|
|
85
|
+
}]
|
|
86
|
+
}], null, null); })();
|
|
87
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(Container, { className: "Container", filePath: "components/layout.component.ts", lineNumber: 44 }); })();
|
|
88
|
+
/**
|
|
89
|
+
* Flex container component.
|
|
90
|
+
*
|
|
91
|
+
* A numeric or non-preset string gap becomes an inline style.
|
|
92
|
+
*/
|
|
93
|
+
export class Flex {
|
|
94
|
+
/** Flex direction. */
|
|
95
|
+
direction = 'row';
|
|
96
|
+
/** Main-axis justification. */
|
|
97
|
+
justify;
|
|
98
|
+
/** Cross-axis alignment. */
|
|
99
|
+
align;
|
|
100
|
+
/** Wrapping behavior. */
|
|
101
|
+
wrap;
|
|
102
|
+
/** Gap (preset name, number in px, or any CSS value). */
|
|
103
|
+
gap;
|
|
104
|
+
/** Extra classes. */
|
|
105
|
+
className;
|
|
106
|
+
/** Inline style object (React camelCase). */
|
|
107
|
+
style;
|
|
108
|
+
/** `data-testid`. */
|
|
109
|
+
testId;
|
|
110
|
+
/**
|
|
111
|
+
* The current class map.
|
|
112
|
+
* @returns The UIClassMap.
|
|
113
|
+
*/
|
|
114
|
+
cm() {
|
|
115
|
+
return getClassMap();
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Computes the flex class list.
|
|
119
|
+
* @returns The class string.
|
|
120
|
+
*/
|
|
121
|
+
classes() {
|
|
122
|
+
const cmGap = typeof this.gap === 'string' && GAP_NAMES.includes(this.gap)
|
|
123
|
+
? this.gap
|
|
124
|
+
: undefined;
|
|
125
|
+
return this.cm().cn(this.cm().flex({
|
|
126
|
+
direction: DIRECTION_MAP[this.direction] || 'row',
|
|
127
|
+
align: this.align,
|
|
128
|
+
justify: this.justify,
|
|
129
|
+
wrap: this.wrap,
|
|
130
|
+
gap: cmGap,
|
|
131
|
+
}), this.className);
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Serializes the merged inline style (numeric or custom gaps inline).
|
|
135
|
+
* @returns The style attribute text.
|
|
136
|
+
*/
|
|
137
|
+
hostStyle() {
|
|
138
|
+
const gapStyle = typeof this.gap === 'number'
|
|
139
|
+
? { gap: this.gap }
|
|
140
|
+
: typeof this.gap === 'string' && !GAP_NAMES.includes(this.gap)
|
|
141
|
+
? { gap: this.gap }
|
|
142
|
+
: undefined;
|
|
143
|
+
return styleText({ ...this.style, ...gapStyle });
|
|
144
|
+
}
|
|
145
|
+
static ɵfac = function Flex_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || Flex)(); };
|
|
146
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Flex, selectors: [["div", "mol-flex", ""]], hostVars: 5, hostBindings: function Flex_HostBindings(rf, ctx) { if (rf & 2) {
|
|
147
|
+
i0.ɵɵattribute("data-testid", ctx.testId);
|
|
148
|
+
i0.ɵɵstyleMap(ctx.hostStyle());
|
|
149
|
+
i0.ɵɵclassMap(ctx.classes());
|
|
150
|
+
} }, inputs: { direction: "direction", justify: "justify", align: "align", wrap: "wrap", gap: "gap", className: "className", style: "style", testId: "testId" }, ngContentSelectors: _c0, decls: 1, vars: 0, template: function Flex_Template(rf, ctx) { if (rf & 1) {
|
|
151
|
+
i0.ɵɵprojectionDef();
|
|
152
|
+
i0.ɵɵprojection(0);
|
|
153
|
+
} }, encapsulation: 2 });
|
|
154
|
+
}
|
|
155
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(Flex, [{
|
|
156
|
+
type: Component,
|
|
157
|
+
args: [{
|
|
158
|
+
selector: 'div[mol-flex]',
|
|
159
|
+
standalone: true,
|
|
160
|
+
inputs: ['direction', 'justify', 'align', 'wrap', 'gap', 'className', 'style', 'testId'],
|
|
161
|
+
host: {
|
|
162
|
+
'[class]': 'classes()',
|
|
163
|
+
'[style]': 'hostStyle()',
|
|
164
|
+
'[attr.data-testid]': 'testId',
|
|
165
|
+
},
|
|
166
|
+
template: `<ng-content></ng-content>`,
|
|
167
|
+
}]
|
|
168
|
+
}], null, null); })();
|
|
169
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(Flex, { className: "Flex", filePath: "components/layout.component.ts", lineNumber: 105 }); })();
|
|
170
|
+
/**
|
|
171
|
+
* Grid container component.
|
|
172
|
+
*
|
|
173
|
+
* Numeric `columns` maps to the class map; a string is a `grid-template-columns`
|
|
174
|
+
* value. `gap`/`columnGap`/`rowGap` follow the same preset-or-CSS rule as Flex.
|
|
175
|
+
*/
|
|
176
|
+
export class Grid {
|
|
177
|
+
/** Column count or `grid-template-columns` value. */
|
|
178
|
+
columns;
|
|
179
|
+
/** `grid-template-rows` value. */
|
|
180
|
+
rows;
|
|
181
|
+
/** Gap (preset name, number in px, or any CSS value). */
|
|
182
|
+
gap;
|
|
183
|
+
/** Column gap. */
|
|
184
|
+
columnGap;
|
|
185
|
+
/** Row gap. */
|
|
186
|
+
rowGap;
|
|
187
|
+
/** Extra classes. */
|
|
188
|
+
className;
|
|
189
|
+
/** Inline style object (React camelCase). */
|
|
190
|
+
style;
|
|
191
|
+
/** `data-testid`. */
|
|
192
|
+
testId;
|
|
193
|
+
/**
|
|
194
|
+
* The current class map.
|
|
195
|
+
* @returns The UIClassMap.
|
|
196
|
+
*/
|
|
197
|
+
cm() {
|
|
198
|
+
return getClassMap();
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Computes the grid class list.
|
|
202
|
+
* @returns The class string.
|
|
203
|
+
*/
|
|
204
|
+
classes() {
|
|
205
|
+
const cmGap = typeof this.gap === 'string' && GAP_NAMES.includes(this.gap)
|
|
206
|
+
? this.gap
|
|
207
|
+
: undefined;
|
|
208
|
+
return this.cm().cn(this.cm().grid({
|
|
209
|
+
cols: typeof this.columns === 'number' ? this.columns : undefined,
|
|
210
|
+
gap: cmGap,
|
|
211
|
+
}), this.className);
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Serializes the merged inline style.
|
|
215
|
+
* @returns The style attribute text.
|
|
216
|
+
*/
|
|
217
|
+
hostStyle() {
|
|
218
|
+
const gridStyle = {
|
|
219
|
+
...this.style,
|
|
220
|
+
gridTemplateColumns: typeof this.columns === 'string' ? this.columns : undefined,
|
|
221
|
+
gridTemplateRows: typeof this.rows === 'string' ? this.rows : undefined,
|
|
222
|
+
gap: typeof this.gap === 'number'
|
|
223
|
+
? this.gap
|
|
224
|
+
: typeof this.gap === 'string' && !GAP_NAMES.includes(this.gap)
|
|
225
|
+
? this.gap
|
|
226
|
+
: undefined,
|
|
227
|
+
columnGap: typeof this.columnGap === 'number'
|
|
228
|
+
? this.columnGap
|
|
229
|
+
: typeof this.columnGap === 'string'
|
|
230
|
+
? this.columnGap
|
|
231
|
+
: undefined,
|
|
232
|
+
rowGap: typeof this.rowGap === 'number'
|
|
233
|
+
? this.rowGap
|
|
234
|
+
: typeof this.rowGap === 'string'
|
|
235
|
+
? this.rowGap
|
|
236
|
+
: undefined,
|
|
237
|
+
};
|
|
238
|
+
return styleText(gridStyle);
|
|
239
|
+
}
|
|
240
|
+
static ɵfac = function Grid_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || Grid)(); };
|
|
241
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Grid, selectors: [["div", "mol-grid", ""]], hostVars: 5, hostBindings: function Grid_HostBindings(rf, ctx) { if (rf & 2) {
|
|
242
|
+
i0.ɵɵattribute("data-testid", ctx.testId);
|
|
243
|
+
i0.ɵɵstyleMap(ctx.hostStyle());
|
|
244
|
+
i0.ɵɵclassMap(ctx.classes());
|
|
245
|
+
} }, inputs: { columns: "columns", rows: "rows", gap: "gap", columnGap: "columnGap", rowGap: "rowGap", className: "className", style: "style", testId: "testId" }, ngContentSelectors: _c0, decls: 1, vars: 0, template: function Grid_Template(rf, ctx) { if (rf & 1) {
|
|
246
|
+
i0.ɵɵprojectionDef();
|
|
247
|
+
i0.ɵɵprojection(0);
|
|
248
|
+
} }, encapsulation: 2 });
|
|
249
|
+
}
|
|
250
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(Grid, [{
|
|
251
|
+
type: Component,
|
|
252
|
+
args: [{
|
|
253
|
+
selector: 'div[mol-grid]',
|
|
254
|
+
standalone: true,
|
|
255
|
+
inputs: ['columns', 'rows', 'gap', 'columnGap', 'rowGap', 'className', 'style', 'testId'],
|
|
256
|
+
host: {
|
|
257
|
+
'[class]': 'classes()',
|
|
258
|
+
'[style]': 'hostStyle()',
|
|
259
|
+
'[attr.data-testid]': 'testId',
|
|
260
|
+
},
|
|
261
|
+
template: `<ng-content></ng-content>`,
|
|
262
|
+
}]
|
|
263
|
+
}], null, null); })();
|
|
264
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(Grid, { className: "Grid", filePath: "components/layout.component.ts", lineNumber: 184 }); })();
|
|
265
|
+
/**
|
|
266
|
+
* Spacer component.
|
|
267
|
+
*
|
|
268
|
+
* A preset size uses the class map; a number (px) or custom CSS value uses
|
|
269
|
+
* inline width/height.
|
|
270
|
+
*/
|
|
271
|
+
export class Spacer {
|
|
272
|
+
/** Spacer size (preset name, number in px, or CSS value). */
|
|
273
|
+
size = 'md';
|
|
274
|
+
/** Whether the spacer takes width instead of height. */
|
|
275
|
+
horizontal;
|
|
276
|
+
/** Extra classes. */
|
|
277
|
+
className;
|
|
278
|
+
/** Inline style object (React camelCase). */
|
|
279
|
+
style;
|
|
280
|
+
/** `data-testid`. */
|
|
281
|
+
testId;
|
|
282
|
+
/** Explicit `aria-hidden` (React stringifies booleans). */
|
|
283
|
+
ariaHidden;
|
|
284
|
+
/**
|
|
285
|
+
* The `aria-hidden` attribute value (React renders `true` as `"true"`).
|
|
286
|
+
* @returns The attribute text or null.
|
|
287
|
+
*/
|
|
288
|
+
ariaHiddenAttr() {
|
|
289
|
+
if (this.ariaHidden === undefined)
|
|
290
|
+
return null;
|
|
291
|
+
return this.ariaHidden === true
|
|
292
|
+
? 'true'
|
|
293
|
+
: this.ariaHidden === false
|
|
294
|
+
? 'false'
|
|
295
|
+
: String(this.ariaHidden);
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* The current class map.
|
|
299
|
+
* @returns The UIClassMap.
|
|
300
|
+
*/
|
|
301
|
+
cm() {
|
|
302
|
+
return getClassMap();
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* Whether `size` is one of the class map's named sizes.
|
|
306
|
+
* @returns True for preset names.
|
|
307
|
+
*/
|
|
308
|
+
get isNamedSize() {
|
|
309
|
+
return typeof this.size === 'string' && SPACER_SIZES.includes(this.size);
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* Computes the spacer class list.
|
|
313
|
+
* @returns The class string.
|
|
314
|
+
*/
|
|
315
|
+
classes() {
|
|
316
|
+
return this.cm().cn(this.isNamedSize
|
|
317
|
+
? this.cm().spacer({
|
|
318
|
+
size: this.size,
|
|
319
|
+
horizontal: !!this.horizontal,
|
|
320
|
+
})
|
|
321
|
+
: this.horizontal
|
|
322
|
+
? this.cm().displayInlineBlock
|
|
323
|
+
: this.cm().displayBlock, this.className);
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* Serializes the merged inline style.
|
|
327
|
+
* @returns The style attribute text.
|
|
328
|
+
*/
|
|
329
|
+
hostStyle() {
|
|
330
|
+
const sizeStyle = typeof this.size === 'number'
|
|
331
|
+
? this.horizontal
|
|
332
|
+
? { width: this.size, height: '1px' }
|
|
333
|
+
: { height: this.size, width: '1px' }
|
|
334
|
+
: typeof this.size === 'string' && !this.isNamedSize
|
|
335
|
+
? this.horizontal
|
|
336
|
+
? { width: this.size }
|
|
337
|
+
: { height: this.size }
|
|
338
|
+
: undefined;
|
|
339
|
+
return styleText({ ...this.style, ...sizeStyle });
|
|
340
|
+
}
|
|
341
|
+
static ɵfac = function Spacer_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || Spacer)(); };
|
|
342
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Spacer, selectors: [["div", "mol-spacer", ""]], hostVars: 6, hostBindings: function Spacer_HostBindings(rf, ctx) { if (rf & 2) {
|
|
343
|
+
i0.ɵɵattribute("data-testid", ctx.testId)("aria-hidden", ctx.ariaHiddenAttr());
|
|
344
|
+
i0.ɵɵstyleMap(ctx.hostStyle());
|
|
345
|
+
i0.ɵɵclassMap(ctx.classes());
|
|
346
|
+
} }, inputs: { size: "size", horizontal: "horizontal", className: "className", style: "style", testId: "testId", ariaHidden: [0, "aria-hidden", "ariaHidden"] }, decls: 0, vars: 0, template: function Spacer_Template(rf, ctx) { }, encapsulation: 2 });
|
|
347
|
+
}
|
|
348
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(Spacer, [{
|
|
349
|
+
type: Component,
|
|
350
|
+
args: [{
|
|
351
|
+
selector: 'div[mol-spacer]',
|
|
352
|
+
standalone: true,
|
|
353
|
+
inputs: ['size', 'horizontal', 'className', 'style', 'testId', 'ariaHidden: aria-hidden'],
|
|
354
|
+
host: {
|
|
355
|
+
'[class]': 'classes()',
|
|
356
|
+
'[style]': 'hostStyle()',
|
|
357
|
+
'[attr.data-testid]': 'testId',
|
|
358
|
+
'[attr.aria-hidden]': 'ariaHiddenAttr()',
|
|
359
|
+
},
|
|
360
|
+
template: '',
|
|
361
|
+
}]
|
|
362
|
+
}], null, null); })();
|
|
363
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(Spacer, { className: "Spacer", filePath: "components/layout.component.ts", lineNumber: 278 }); })();
|
|
364
|
+
//# sourceMappingURL=layout.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.component.js","sourceRoot":"","sources":["../../src/components/layout.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAGzC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,OAAO,EAAE,SAAS,EAAE,MAAM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AC,IAAI,CAAC,WAAW;gBAClD,CAAC,CAAC,IAAI,CAAC,UAAU;oBACf,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,IAAI,EAAE;oBACtB,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,IAAI,EAAE;gBACzB,CAAC,CAAC,SAAS,CAAA;QACjB,OAAO,SAAS,CAAC,EAAE,GAAG,IAAI,CAAC,KAAK,EAAE,GAAG,SAAS,EAAE,CAAC,CAAA;IACnD,CAAC;gGA7EU,MAAM;6DAAN,MAAM;qEAAN,oBACN;YADM,cAAA,eACX,CADiB;YAAN,cAAA,aACb,CADmB;;;iFAAN,MAAM;cAZlB,SAAS;eAAC;gBACT,QAAQ,EAAE,iBAAiB;gBAC3B,UAAU,EAAE,IAAI;gBAChB,MAAM,EAAE,CAAC,MAAM,EAAE,YAAY,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,yBAAyB,CAAC;gBACzF,IAAI,EAAE;oBACJ,SAAS,EAAE,WAAW;oBACtB,SAAS,EAAE,aAAa;oBACxB,oBAAoB,EAAE,QAAQ;oBAC9B,oBAAoB,EAAE,kBAAkB;iBACzC;gBACD,QAAQ,EAAE,EAAE;aACb;;kFACY,MAAM"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LoadErrorBanner component (React parity): the shared "load failed" banner
|
|
3
|
+
* with a Retry button that owns its pending state.
|
|
4
|
+
*
|
|
5
|
+
* @module
|
|
6
|
+
*/
|
|
7
|
+
import { type AfterViewInit, type DoCheck, ElementRef, type OnDestroy } from '@angular/core';
|
|
8
|
+
import type { UIClassMap } from '@molecule/app-ui';
|
|
9
|
+
import * as i0 from "@angular/core";
|
|
10
|
+
/**
|
|
11
|
+
* LoadErrorBanner component.
|
|
12
|
+
*
|
|
13
|
+
* The host is the root `<div>` (`div[mol-load-error-banner]`); rest props
|
|
14
|
+
* (`className`, `data-*`, `aria-*`, `id`) land on it exactly as React spreads
|
|
15
|
+
* them. `message`, `detail` and `retryLabel` are node-valued props, projected
|
|
16
|
+
* as `[slot=message]` / `[slot=detail]` / `[slot=retryLabel]`. The detail
|
|
17
|
+
* paragraph and the retry row render only when React would render them.
|
|
18
|
+
*/
|
|
19
|
+
export declare class LoadErrorBanner implements AfterViewInit, DoCheck, OnDestroy {
|
|
20
|
+
/** The primary error line (node-valued prop). */
|
|
21
|
+
message?: unknown;
|
|
22
|
+
/** Secondary line under the message (node-valued prop). */
|
|
23
|
+
detail?: unknown;
|
|
24
|
+
/** Retry-button label (node-valued prop). */
|
|
25
|
+
retryLabel?: unknown;
|
|
26
|
+
/** `data-mol-id` for the retry button (default `load-error-retry`). */
|
|
27
|
+
retryMolId: string;
|
|
28
|
+
/** Called when Retry is clicked; a returned promise keeps the button pending. */
|
|
29
|
+
onRetry?: () => void | Promise<void>;
|
|
30
|
+
/** Extra classes for the root (React's rest `className`). */
|
|
31
|
+
className?: string;
|
|
32
|
+
/** Whether a retry is in flight. */
|
|
33
|
+
readonly pending: import("@angular/core").WritableSignal<boolean>;
|
|
34
|
+
/** The detail paragraph (always in the template; detached when unused). */
|
|
35
|
+
detailSlot?: ElementRef<HTMLParagraphElement>;
|
|
36
|
+
/** The retry row (always in the template; detached when no callback). */
|
|
37
|
+
retrySlot?: ElementRef<HTMLDivElement>;
|
|
38
|
+
/** The retry label capture point. */
|
|
39
|
+
retryLabelSlot?: ElementRef<HTMLSpanElement>;
|
|
40
|
+
/**
|
|
41
|
+
* Reactive translation, read in the injection context. Its `t` reads the
|
|
42
|
+
* locale, so the view re-renders the text on a locale switch (the static `t`
|
|
43
|
+
* does not).
|
|
44
|
+
*/
|
|
45
|
+
private readonly i18n;
|
|
46
|
+
private readonly sync;
|
|
47
|
+
private hasDetail;
|
|
48
|
+
/** Whether the projected retry label exists (a signal: it is read after view init). */
|
|
49
|
+
private readonly hasRetryLabel;
|
|
50
|
+
private detailParent;
|
|
51
|
+
private retryParent;
|
|
52
|
+
/**
|
|
53
|
+
* The current class map.
|
|
54
|
+
* @returns The UIClassMap.
|
|
55
|
+
*/
|
|
56
|
+
cm(): UIClassMap;
|
|
57
|
+
/**
|
|
58
|
+
* The detail paragraph classes.
|
|
59
|
+
* @returns The class string.
|
|
60
|
+
*/
|
|
61
|
+
detailClasses(): string;
|
|
62
|
+
/**
|
|
63
|
+
* The retry button classes (React renders `Button variant="outline" size="sm"`).
|
|
64
|
+
* @returns The class string.
|
|
65
|
+
*/
|
|
66
|
+
retryClasses(): string;
|
|
67
|
+
/**
|
|
68
|
+
* The retry button's text: the projected label, or the localized default.
|
|
69
|
+
* @returns The default text (empty while a projected label is shown).
|
|
70
|
+
*/
|
|
71
|
+
retryText(): string;
|
|
72
|
+
/**
|
|
73
|
+
* Runs the retry callback with React's pending semantics: disabled and
|
|
74
|
+
* "Retrying…" while the promise is unsettled; a rejection is not swallowed
|
|
75
|
+
* — the banner stays for the caller.
|
|
76
|
+
*/
|
|
77
|
+
handleRetry(): void;
|
|
78
|
+
/**
|
|
79
|
+
* Reads detail/label presence at view init (view queries resolve only then).
|
|
80
|
+
*/
|
|
81
|
+
ngAfterViewInit(): void;
|
|
82
|
+
/**
|
|
83
|
+
* Re-reconciles the conditional wrappers on later passes.
|
|
84
|
+
*/
|
|
85
|
+
ngDoCheck(): void;
|
|
86
|
+
/** Restores the retry-label capture span on unmount. */
|
|
87
|
+
ngOnDestroy(): void;
|
|
88
|
+
/** Moves the projected retry label onto the retry button (React: no wrapper). */
|
|
89
|
+
private showRetryLabel;
|
|
90
|
+
private visibleNodes;
|
|
91
|
+
private visibleFrom;
|
|
92
|
+
/**
|
|
93
|
+
* Shows one capture span's children inside a target element, parking any
|
|
94
|
+
* previously shown nodes back in their span.
|
|
95
|
+
*
|
|
96
|
+
* @param target - The element to show the nodes in.
|
|
97
|
+
* @param span - The capture span (null parks everything).
|
|
98
|
+
*/
|
|
99
|
+
private showNodes;
|
|
100
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LoadErrorBanner, never>;
|
|
101
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LoadErrorBanner, "div[mol-load-error-banner]", never, { "message": { "alias": "message"; "required": false; }; "detail": { "alias": "detail"; "required": false; }; "retryLabel": { "alias": "retryLabel"; "required": false; }; "retryMolId": { "alias": "retryMolId"; "required": false; }; "onRetry": { "alias": "onRetry"; "required": false; }; }, {}, never, ["[slot=message]", "[slot=detail]", "*", "[slot=retryLabel]"], true, never>;
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=load-error-banner.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"load-error-banner.component.d.ts","sourceRoot":"","sources":["../../src/components/load-error-banner.component.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,OAAO,EACZ,UAAU,EAEV,KAAK,SAAS,EAIf,MAAM,eAAe,CAAA;AAGtB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;;AAMlD;;;;;;;;GAQG;AACH,qBA+Ba,eAAgB,YAAW,aAAa,EAAE,OAAO,EAAE,SAAS;IACvE,iDAAiD;IACjD,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,2DAA2D;IAC3D,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,6CAA6C;IAC7C,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,uEAAuE;IACvE,UAAU,SAAqB;IAC/B,iFAAiF;IACjF,OAAO,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACpC,6DAA6D;IAC7D,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB,oCAAoC;IACpC,QAAQ,CAAC,OAAO,kDAAgB;IAEhC,2EAA2E;IAClD,UAAU,CAAC,EAAE,UAAU,CAAC,oBAAoB,CAAC,CAAA;IACtE,yEAAyE;IACjD,SAAS,CAAC,EAAE,UAAU,CAAC,cAAc,CAAC,CAAA;IAC9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