@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 @@
|
|
|
1
|
+
{"version":3,"file":"prompt-dialog.component.js","sourceRoot":"","sources":["../../src/components/prompt-dialog.component.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAEL,SAAS,EAGT,YAAY,EACZ,MAAM,EACN,MAAM,EACN,SAAS,GACV,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAEtD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;;;;;;;IAwClC,yBAAiC;IAAA,YAAiB;IAAA,iBAAI;;;IAAnD,yCAA6B;IAAC,cAAiB;IAAjB,wCAAiB;;AAtC5D;;;;;;;GAOG;AAmEH,MAAM,OAAO,YAAY;IACvB,kCAAkC;IAClC,IAAI,GAAG,KAAK,CAAA;IACZ,yCAAyC;IACzC,KAAK,CAAU;IACf,wCAAwC;IACxC,WAAW,CA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O,CAAC;gBAClB,IAAI,EAAE;oBACJ,oBAAoB,EAAE,EAAE;oBACxB,KAAK,EAAE,mBAAmB;iBAC3B;gBACD,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAyCR;aACH;;kBA+BE,MAAM;;kBAGN,SAAS;mBAAC,WAAW;;kBAErB,SAAS;mBAAC,KAAK;;kFAnCL,YAAY"}
|
|
@@ -1,63 +1,95 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* RadioGroup component (React parity).
|
|
3
3
|
*
|
|
4
4
|
* @module
|
|
5
5
|
*/
|
|
6
6
|
import { EventEmitter } from '@angular/core';
|
|
7
|
-
import type {
|
|
7
|
+
import type { UIClassMap } from '@molecule/app-ui';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
|
+
/** One radio option. */
|
|
10
|
+
export interface RadioOption {
|
|
11
|
+
/** The option's value. */
|
|
12
|
+
value: string;
|
|
13
|
+
/** The option's label (text). */
|
|
14
|
+
label?: unknown;
|
|
15
|
+
/** Whether this option is disabled. */
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
}
|
|
9
18
|
/**
|
|
10
|
-
*
|
|
19
|
+
* RadioGroup component.
|
|
20
|
+
*
|
|
21
|
+
* The host is the `role="radiogroup"` div React renders. Selecting an option
|
|
22
|
+
* emits that option's VALUE (not the DOM event) through the `change` output,
|
|
23
|
+
* exactly like React's per-option handler.
|
|
11
24
|
*/
|
|
12
|
-
export declare class
|
|
13
|
-
options
|
|
25
|
+
export declare class RadioGroup {
|
|
26
|
+
/** The options to render. */
|
|
27
|
+
options?: RadioOption[];
|
|
28
|
+
/** The selected option value. */
|
|
14
29
|
value?: string;
|
|
15
|
-
size
|
|
30
|
+
/** Group size (kept for prop parity). */
|
|
31
|
+
size?: unknown;
|
|
32
|
+
/** Group label. */
|
|
16
33
|
label?: string;
|
|
17
|
-
|
|
34
|
+
/** Native radio group name (defaults to a stable generated name). */
|
|
35
|
+
name?: string;
|
|
36
|
+
/** Layout direction. */
|
|
37
|
+
direction?: 'vertical' | 'horizontal';
|
|
38
|
+
/** Error message. */
|
|
18
39
|
error?: string;
|
|
40
|
+
/** Extra classes for the group root. */
|
|
19
41
|
className?: string;
|
|
20
|
-
style
|
|
42
|
+
/** Inline style object (React camelCase). */
|
|
43
|
+
style?: Record<string, unknown>;
|
|
44
|
+
/** `data-testid`. */
|
|
21
45
|
testId?: string;
|
|
22
|
-
|
|
23
|
-
|
|
46
|
+
/** Disables every option. */
|
|
47
|
+
disabled?: boolean;
|
|
24
48
|
/**
|
|
25
|
-
*
|
|
26
|
-
* @returns The UIClassMap
|
|
49
|
+
* The current class map.
|
|
50
|
+
* @returns The UIClassMap.
|
|
27
51
|
*/
|
|
28
|
-
|
|
52
|
+
cm(): UIClassMap;
|
|
29
53
|
/**
|
|
30
|
-
*
|
|
31
|
-
* @returns The
|
|
54
|
+
* The native radio group name.
|
|
55
|
+
* @returns The name value.
|
|
32
56
|
*/
|
|
33
|
-
|
|
57
|
+
groupName(): string;
|
|
34
58
|
/**
|
|
35
|
-
*
|
|
36
|
-
* @returns The
|
|
59
|
+
* The error paragraph id.
|
|
60
|
+
* @returns The id value.
|
|
37
61
|
*/
|
|
38
|
-
|
|
62
|
+
errorId(): string;
|
|
39
63
|
/**
|
|
40
|
-
*
|
|
41
|
-
* @returns The
|
|
64
|
+
* The accessible group label.
|
|
65
|
+
* @returns The label text.
|
|
42
66
|
*/
|
|
43
|
-
|
|
67
|
+
groupLabel(): string;
|
|
44
68
|
/**
|
|
45
|
-
*
|
|
46
|
-
* @returns The
|
|
69
|
+
* Serializes the inline style.
|
|
70
|
+
* @returns The style attribute text.
|
|
47
71
|
*/
|
|
48
|
-
|
|
72
|
+
hostStyle(): string | null;
|
|
49
73
|
/**
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
74
|
+
* Emits the selected option's value; the change event stops here so the
|
|
75
|
+
* host-level `change` output binding does not record it a second time. Every
|
|
76
|
+
* radio's checked state is then restored to the controlled `value` — checking
|
|
77
|
+
* one radio natively UNCHECKS the previously selected one, so restoring only
|
|
78
|
+
* the clicked input would leave the group with no selection at all.
|
|
79
|
+
*
|
|
80
|
+
* @param event - The native radio change event.
|
|
53
81
|
*/
|
|
54
|
-
|
|
82
|
+
select(event: Event): void;
|
|
83
|
+
/** Fires the selected option's value. */
|
|
84
|
+
readonly change: EventEmitter<string>;
|
|
55
85
|
/**
|
|
56
|
-
*
|
|
57
|
-
*
|
|
86
|
+
* Reactive translation, read in the injection context. Its `t` reads the
|
|
87
|
+
* locale, so the view re-renders the text on a locale switch (the static `t`
|
|
88
|
+
* does not).
|
|
58
89
|
*/
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
static
|
|
90
|
+
private readonly i18n;
|
|
91
|
+
private readonly host;
|
|
92
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RadioGroup, never>;
|
|
93
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RadioGroup, "div[mol-radio-group]", never, { "options": { "alias": "options"; "required": false; }; "value": { "alias": "value"; "required": false; }; "size": { "alias": "size"; "required": false; }; "label": { "alias": "label"; "required": false; }; "name": { "alias": "name"; "required": false; }; "direction": { "alias": "direction"; "required": false; }; "error": { "alias": "error"; "required": false; }; "className": { "alias": "className"; "required": false; }; "style": { "alias": "style"; "required": false; }; "testId": { "alias": "testId"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "change": "change"; }, never, never, true, never>;
|
|
62
94
|
}
|
|
63
95
|
//# sourceMappingURL=radio-group.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-group.component.d.ts","sourceRoot":"","sources":["../../src/components/radio-group.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"radio-group.component.d.ts","sourceRoot":"","sources":["../../src/components/radio-group.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AA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QAAQ,CAAC,MAAM,uBAA6B;IAEtD;;;;OAIG;IACH,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAmB;IAExC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAqB;yCA9F/B,UAAU;2CAAV,UAAU;CA+FtB"}
|
|
@@ -1,26 +1,31 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* RadioGroup component (React parity).
|
|
3
3
|
*
|
|
4
4
|
* @module
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
6
|
+
import { Component, ElementRef, EventEmitter, inject, Output } from '@angular/core';
|
|
7
|
+
import { useTranslation } from '@molecule/app-angular';
|
|
7
8
|
import { getClassMap } from '@molecule/app-ui';
|
|
9
|
+
import { styleText } from '../utilities/style.js';
|
|
8
10
|
import * as i0 from "@angular/core";
|
|
11
|
+
const _c0 = () => [];
|
|
12
|
+
const _c1 = () => ({ required: false });
|
|
13
|
+
const _c2 = a0 => ({ error: a0 });
|
|
9
14
|
const _forTrack0 = ($index, $item) => $item.value;
|
|
10
|
-
function
|
|
15
|
+
function RadioGroup_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
11
16
|
i0.ɵɵdomElementStart(0, "div");
|
|
12
17
|
i0.ɵɵtext(1);
|
|
13
18
|
i0.ɵɵdomElementEnd();
|
|
14
19
|
} if (rf & 2) {
|
|
15
20
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
16
|
-
i0.ɵɵclassMap(ctx_r0.
|
|
21
|
+
i0.ɵɵclassMap(ctx_r0.cm().cn(ctx_r0.cm().label(i0.ɵɵpureFunction0(3, _c1)), ctx_r0.cm().sp("mb", 2)));
|
|
17
22
|
i0.ɵɵadvance();
|
|
18
23
|
i0.ɵɵtextInterpolate(ctx_r0.label);
|
|
19
24
|
} }
|
|
20
|
-
function
|
|
25
|
+
function RadioGroup_For_3_Template(rf, ctx) { if (rf & 1) {
|
|
21
26
|
const _r2 = i0.ɵɵgetCurrentView();
|
|
22
|
-
i0.ɵɵdomElementStart(0, "label")(1, "input",
|
|
23
|
-
i0.ɵɵdomListener("change", function
|
|
27
|
+
i0.ɵɵdomElementStart(0, "label")(1, "input", 1);
|
|
28
|
+
i0.ɵɵdomListener("change", function RadioGroup_For_3_Template_input_change_1_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.select($event)); });
|
|
24
29
|
i0.ɵɵdomElementEnd();
|
|
25
30
|
i0.ɵɵdomElementStart(2, "span");
|
|
26
31
|
i0.ɵɵtext(3);
|
|
@@ -28,180 +33,196 @@ function MoleculeRadioGroup_For_4_Template(rf, ctx) { if (rf & 1) {
|
|
|
28
33
|
} if (rf & 2) {
|
|
29
34
|
const option_r3 = ctx.$implicit;
|
|
30
35
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
31
|
-
i0.ɵɵclassMap(ctx_r0.
|
|
36
|
+
i0.ɵɵclassMap(ctx_r0.cm().cn(ctx_r0.cm().controlLabel, (ctx_r0.disabled || option_r3.disabled) && ctx_r0.cm().controlDisabled));
|
|
32
37
|
i0.ɵɵadvance();
|
|
33
|
-
i0.ɵɵclassMap(ctx_r0.
|
|
34
|
-
i0.ɵɵdomProperty("
|
|
35
|
-
i0.ɵɵattribute("data-state", ctx_r0.value === option_r3.value ? "checked" : "unchecked");
|
|
38
|
+
i0.ɵɵclassMap(ctx_r0.cm().cn(ctx_r0.cm().radio(i0.ɵɵpureFunction1(12, _c2, !!ctx_r0.error)), ctx_r0.cm().cursorPointer));
|
|
39
|
+
i0.ɵɵdomProperty("disabled", ctx_r0.disabled || option_r3.disabled);
|
|
40
|
+
i0.ɵɵattribute("name", ctx_r0.groupName())("value", option_r3.value)("checked", ctx_r0.value === option_r3.value ? "" : null)("data-state", ctx_r0.value === option_r3.value ? "checked" : "unchecked");
|
|
36
41
|
i0.ɵɵadvance();
|
|
37
|
-
i0.ɵɵclassMap(ctx_r0.cm.controlText);
|
|
42
|
+
i0.ɵɵclassMap(ctx_r0.cm().controlText);
|
|
38
43
|
i0.ɵɵadvance();
|
|
39
44
|
i0.ɵɵtextInterpolate(option_r3.label);
|
|
40
45
|
} }
|
|
41
|
-
function
|
|
46
|
+
function RadioGroup_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
42
47
|
i0.ɵɵdomElementStart(0, "p");
|
|
43
48
|
i0.ɵɵtext(1);
|
|
44
49
|
i0.ɵɵdomElementEnd();
|
|
45
50
|
} if (rf & 2) {
|
|
46
51
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
47
|
-
i0.ɵɵclassMap(ctx_r0.
|
|
52
|
+
i0.ɵɵclassMap(ctx_r0.cm().cn(ctx_r0.cm().formError, ctx_r0.cm().sp("mt", 1)));
|
|
53
|
+
i0.ɵɵattribute("id", ctx_r0.errorId());
|
|
48
54
|
i0.ɵɵadvance();
|
|
49
55
|
i0.ɵɵtextInterpolate(ctx_r0.error);
|
|
50
56
|
} }
|
|
51
57
|
/**
|
|
52
|
-
*
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
*
|
|
58
|
+
* RadioGroup component.
|
|
59
|
+
*
|
|
60
|
+
* The host is the `role="radiogroup"` div React renders. Selecting an option
|
|
61
|
+
* emits that option's VALUE (not the DOM event) through the `change` output,
|
|
62
|
+
* exactly like React's per-option handler.
|
|
56
63
|
*/
|
|
57
|
-
export class
|
|
58
|
-
options
|
|
64
|
+
export class RadioGroup {
|
|
65
|
+
/** The options to render. */
|
|
66
|
+
options;
|
|
67
|
+
/** The selected option value. */
|
|
59
68
|
value;
|
|
69
|
+
/** Group size (kept for prop parity). */
|
|
60
70
|
size;
|
|
71
|
+
/** Group label. */
|
|
61
72
|
label;
|
|
62
|
-
|
|
73
|
+
/** Native radio group name (defaults to a stable generated name). */
|
|
74
|
+
name;
|
|
75
|
+
/** Layout direction. */
|
|
76
|
+
direction;
|
|
77
|
+
/** Error message. */
|
|
63
78
|
error;
|
|
79
|
+
/** Extra classes for the group root. */
|
|
64
80
|
className;
|
|
81
|
+
/** Inline style object (React camelCase). */
|
|
65
82
|
style;
|
|
83
|
+
/** `data-testid`. */
|
|
66
84
|
testId;
|
|
67
|
-
|
|
68
|
-
|
|
85
|
+
/** Disables every option. */
|
|
86
|
+
disabled;
|
|
69
87
|
/**
|
|
70
|
-
*
|
|
71
|
-
* @returns The UIClassMap
|
|
88
|
+
* The current class map.
|
|
89
|
+
* @returns The UIClassMap.
|
|
72
90
|
*/
|
|
73
|
-
|
|
91
|
+
cm() {
|
|
74
92
|
return getClassMap();
|
|
75
93
|
}
|
|
76
94
|
/**
|
|
77
|
-
*
|
|
78
|
-
* @returns The
|
|
95
|
+
* The native radio group name.
|
|
96
|
+
* @returns The name value.
|
|
79
97
|
*/
|
|
80
|
-
|
|
81
|
-
return this.
|
|
98
|
+
groupName() {
|
|
99
|
+
return this.name || 'r0';
|
|
82
100
|
}
|
|
83
101
|
/**
|
|
84
|
-
*
|
|
85
|
-
* @returns The
|
|
102
|
+
* The error paragraph id.
|
|
103
|
+
* @returns The id value.
|
|
86
104
|
*/
|
|
87
|
-
|
|
88
|
-
return this.
|
|
105
|
+
errorId() {
|
|
106
|
+
return `${this.groupName()}-error`;
|
|
89
107
|
}
|
|
90
108
|
/**
|
|
91
|
-
*
|
|
92
|
-
* @returns The
|
|
109
|
+
* The accessible group label.
|
|
110
|
+
* @returns The label text.
|
|
93
111
|
*/
|
|
94
|
-
|
|
95
|
-
return this.
|
|
112
|
+
groupLabel() {
|
|
113
|
+
return (this.label ?? this.i18n.t('ui.radioGroup.label', undefined, { defaultValue: 'Radio group' }));
|
|
96
114
|
}
|
|
97
115
|
/**
|
|
98
|
-
*
|
|
99
|
-
* @returns The
|
|
116
|
+
* Serializes the inline style.
|
|
117
|
+
* @returns The style attribute text.
|
|
100
118
|
*/
|
|
101
|
-
|
|
102
|
-
return
|
|
119
|
+
hostStyle() {
|
|
120
|
+
return styleText(this.style);
|
|
103
121
|
}
|
|
104
122
|
/**
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
123
|
+
* Emits the selected option's value; the change event stops here so the
|
|
124
|
+
* host-level `change` output binding does not record it a second time. Every
|
|
125
|
+
* radio's checked state is then restored to the controlled `value` — checking
|
|
126
|
+
* one radio natively UNCHECKS the previously selected one, so restoring only
|
|
127
|
+
* the clicked input would leave the group with no selection at all.
|
|
128
|
+
*
|
|
129
|
+
* @param event - The native radio change event.
|
|
108
130
|
*/
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
131
|
+
select(event) {
|
|
132
|
+
event.stopPropagation();
|
|
133
|
+
this.change.emit(event.target.value);
|
|
134
|
+
// React always controls radios (checked={value === option.value}); restore.
|
|
135
|
+
const radios = this.host.nativeElement.querySelectorAll('input[type="radio"]');
|
|
136
|
+
for (const radio of Array.from(radios))
|
|
137
|
+
radio.checked = this.value === radio.value;
|
|
112
138
|
}
|
|
139
|
+
/** Fires the selected option's value. */
|
|
140
|
+
change = new EventEmitter();
|
|
113
141
|
/**
|
|
114
|
-
*
|
|
115
|
-
*
|
|
142
|
+
* Reactive translation, read in the injection context. Its `t` reads the
|
|
143
|
+
* locale, so the view re-renders the text on a locale switch (the static `t`
|
|
144
|
+
* does not).
|
|
116
145
|
*/
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}
|
|
120
|
-
static
|
|
121
|
-
|
|
122
|
-
i0.ɵɵ
|
|
123
|
-
i0.ɵɵ
|
|
124
|
-
|
|
125
|
-
i0.ɵɵ
|
|
126
|
-
i0.ɵɵ
|
|
127
|
-
i0.ɵɵ
|
|
146
|
+
i18n = useTranslation();
|
|
147
|
+
host = inject(ElementRef);
|
|
148
|
+
static ɵfac = function RadioGroup_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || RadioGroup)(); };
|
|
149
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: RadioGroup, selectors: [["div", "mol-radio-group", ""]], hostVars: 9, hostBindings: function RadioGroup_HostBindings(rf, ctx) { if (rf & 2) {
|
|
150
|
+
i0.ɵɵattribute("data-testid", ctx.testId)("role", "radiogroup")("aria-label", ctx.groupLabel())("aria-invalid", ctx.error ? "true" : null)("aria-describedby", ctx.error ? ctx.errorId() : null);
|
|
151
|
+
i0.ɵɵstyleMap(ctx.hostStyle());
|
|
152
|
+
i0.ɵɵclassMap(ctx.className);
|
|
153
|
+
} }, inputs: { options: "options", value: "value", size: "size", label: "label", name: "name", direction: "direction", error: "error", className: "className", style: "style", testId: "testId", disabled: "disabled" }, outputs: { change: "change" }, decls: 5, vars: 5, consts: [[3, "class"], ["type", "radio", 3, "change", "disabled"]], template: function RadioGroup_Template(rf, ctx) { if (rf & 1) {
|
|
154
|
+
i0.ɵɵconditionalCreate(0, RadioGroup_Conditional_0_Template, 2, 4, "div", 0);
|
|
155
|
+
i0.ɵɵdomElementStart(1, "div");
|
|
156
|
+
i0.ɵɵrepeaterCreate(2, RadioGroup_For_3_Template, 4, 14, "label", 0, _forTrack0);
|
|
128
157
|
i0.ɵɵdomElementEnd();
|
|
158
|
+
i0.ɵɵconditionalCreate(4, RadioGroup_Conditional_4_Template, 2, 4, "p", 0);
|
|
129
159
|
} if (rf & 2) {
|
|
130
|
-
i0.ɵɵ
|
|
131
|
-
i0.ɵɵclassMap(ctx.className);
|
|
132
|
-
i0.ɵɵattribute("data-testid", ctx.testId)("aria-label", ctx.label);
|
|
133
|
-
i0.ɵɵadvance();
|
|
134
|
-
i0.ɵɵconditional(ctx.label ? 1 : -1);
|
|
160
|
+
i0.ɵɵconditional(ctx.label ? 0 : -1);
|
|
135
161
|
i0.ɵɵadvance();
|
|
136
|
-
i0.ɵɵclassMap(ctx.
|
|
162
|
+
i0.ɵɵclassMap(ctx.cm().radioGroupLayout(ctx.direction ?? "vertical"));
|
|
137
163
|
i0.ɵɵadvance();
|
|
138
|
-
i0.ɵɵrepeater(ctx.options);
|
|
164
|
+
i0.ɵɵrepeater(ctx.options ?? i0.ɵɵpureFunction0(4, _c0));
|
|
139
165
|
i0.ɵɵadvance(2);
|
|
140
|
-
i0.ɵɵconditional(ctx.error ?
|
|
166
|
+
i0.ɵɵconditional(ctx.error ? 4 : -1);
|
|
141
167
|
} }, encapsulation: 2 });
|
|
142
168
|
}
|
|
143
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(
|
|
169
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(RadioGroup, [{
|
|
144
170
|
type: Component,
|
|
145
171
|
args: [{
|
|
146
|
-
selector: 'mol-radio-group',
|
|
172
|
+
selector: 'div[mol-radio-group]',
|
|
147
173
|
standalone: true,
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
174
|
+
inputs: [
|
|
175
|
+
'options',
|
|
176
|
+
'value',
|
|
177
|
+
'size',
|
|
178
|
+
'label',
|
|
179
|
+
'name',
|
|
180
|
+
'direction',
|
|
181
|
+
'error',
|
|
182
|
+
'className',
|
|
183
|
+
'style',
|
|
184
|
+
'testId',
|
|
185
|
+
'disabled',
|
|
186
|
+
],
|
|
187
|
+
host: {
|
|
188
|
+
'[class]': 'className',
|
|
189
|
+
'[style]': 'hostStyle()',
|
|
190
|
+
'[attr.data-testid]': 'testId',
|
|
191
|
+
'[attr.role]': '"radiogroup"',
|
|
192
|
+
'[attr.aria-label]': 'groupLabel()',
|
|
193
|
+
'[attr.aria-invalid]': 'error ? "true" : null',
|
|
194
|
+
'[attr.aria-describedby]': 'error ? errorId() : null',
|
|
195
|
+
},
|
|
196
|
+
template: `@if (label) {
|
|
197
|
+
<div [class]="cm().cn(cm().label({ required: false }), cm().sp('mb', 2))">{{ label }}</div>
|
|
198
|
+
}
|
|
199
|
+
<div [class]="cm().radioGroupLayout(direction ?? 'vertical')">
|
|
200
|
+
@for (option of options ?? []; track option.value) {
|
|
201
|
+
<label
|
|
202
|
+
[class]="
|
|
203
|
+
cm().cn(cm().controlLabel, (disabled || option.disabled) && cm().controlDisabled)
|
|
204
|
+
"
|
|
205
|
+
>
|
|
206
|
+
<input
|
|
207
|
+
type="radio"
|
|
208
|
+
[attr.name]="groupName()"
|
|
209
|
+
[attr.value]="option.value"
|
|
210
|
+
[attr.checked]="value === option.value ? '' : null"
|
|
211
|
+
[disabled]="disabled || option.disabled"
|
|
212
|
+
(change)="select($event)"
|
|
213
|
+
[attr.data-state]="value === option.value ? 'checked' : 'unchecked'"
|
|
214
|
+
[class]="cm().cn(cm().radio({ error: !!error }), cm().cursorPointer)"
|
|
215
|
+
/>
|
|
216
|
+
<span [class]="cm().controlText">{{ option.label }}</span>
|
|
217
|
+
</label>
|
|
179
218
|
}
|
|
180
219
|
</div>
|
|
181
|
-
|
|
220
|
+
@if (error) {
|
|
221
|
+
<p [attr.id]="errorId()" [class]="cm().cn(cm().formError, cm().sp('mt', 1))">{{ error }}</p>
|
|
222
|
+
}`,
|
|
182
223
|
}]
|
|
183
|
-
}], null, {
|
|
184
|
-
type: Input
|
|
185
|
-
}], value: [{
|
|
186
|
-
type: Input
|
|
187
|
-
}], size: [{
|
|
188
|
-
type: Input
|
|
189
|
-
}], label: [{
|
|
190
|
-
type: Input
|
|
191
|
-
}], direction: [{
|
|
192
|
-
type: Input
|
|
193
|
-
}], error: [{
|
|
194
|
-
type: Input
|
|
195
|
-
}], className: [{
|
|
196
|
-
type: Input
|
|
197
|
-
}], style: [{
|
|
198
|
-
type: Input
|
|
199
|
-
}], testId: [{
|
|
200
|
-
type: Input
|
|
201
|
-
}], disabled: [{
|
|
202
|
-
type: Input
|
|
203
|
-
}], valueChange: [{
|
|
224
|
+
}], null, { change: [{
|
|
204
225
|
type: Output
|
|
205
226
|
}] }); })();
|
|
206
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(
|
|
227
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(RadioGroup, { className: "RadioGroup", filePath: "components/radio-group.component.ts", lineNumber: 85 }); })();
|
|
207
228
|
//# sourceMappingURL=radio-group.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-group.component.js","sourceRoot":"","sources":["../../src/components/radio-group.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"radio-group.component.js","sourceRoot":"","sources":["../../src/components/radio-group.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAEnF,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAEtD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;;;;;;;IA6C3C,8BAA0E;IAAA,YAAW;IAAA,oBAAM;;;IAAtF,qGAAoE;IAAC,cAAW;IAAX,kCAAW;;;;IASjF,AALF,gCAIC,eAUG;IAHA,gLAAU,qBAAc,KAAC;IAN3B,oBASE;IACF,+BAAiC;IAAA,YAAkB;IACrD,AADqD,oBAAO,EACpD;;;;IAfN,+HAEC;IAUC,cAAqE;IAArE,wHAAqE;IAHrE,mEAAwC;;IAKpC,cAA0B;IAA1B,sCAA0B;IAAC,cAAkB;IAAlB,qCAAkB;;;IAKvD,4BAA6E;IAAA,YAAW;IAAA,oBAAI;;;IA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