@molecule/app-ui-angular 1.0.6 → 1.1.2
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 +11710 -1117
- 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 +97 -29
- package/dist/components/checkbox.component.d.ts.map +1 -1
- package/dist/components/checkbox.component.js +222 -117
- 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/controlled-checked.directive.d.ts +45 -0
- package/dist/components/controlled-checked.directive.d.ts.map +1 -0
- package/dist/components/controlled-checked.directive.js +74 -0
- package/dist/components/controlled-checked.directive.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 +157 -134
- 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 +168 -95
- package/dist/components/switch.component.js.map +1 -1
- package/dist/components/table.component.d.ts +193 -0
- package/dist/components/table.component.d.ts.map +1 -0
- package/dist/components/table.component.js +550 -0
- package/dist/components/table.component.js.map +1 -0
- package/dist/components/tabs.component.d.ts +140 -0
- package/dist/components/tabs.component.d.ts.map +1 -0
- package/dist/components/tabs.component.js +390 -0
- package/dist/components/tabs.component.js.map +1 -0
- package/dist/components/template-outlet.directive.d.ts +50 -0
- package/dist/components/template-outlet.directive.d.ts.map +1 -0
- package/dist/components/template-outlet.directive.js +81 -0
- package/dist/components/template-outlet.directive.js.map +1 -0
- package/dist/components/textarea.component.d.ts +151 -0
- package/dist/components/textarea.component.d.ts.map +1 -0
- package/dist/components/textarea.component.js +340 -0
- package/dist/components/textarea.component.js.map +1 -0
- package/dist/components/theme-toggle.component.d.ts +58 -0
- package/dist/components/theme-toggle.component.d.ts.map +1 -0
- package/dist/components/theme-toggle.component.js +124 -0
- package/dist/components/theme-toggle.component.js.map +1 -0
- package/dist/components/toast.component.d.ts +237 -49
- package/dist/components/toast.component.d.ts.map +1 -1
- package/dist/components/toast.component.js +636 -201
- package/dist/components/toast.component.js.map +1 -1
- package/dist/components/tooltip.component.d.ts +95 -45
- package/dist/components/tooltip.component.d.ts.map +1 -1
- package/dist/components/tooltip.component.js +372 -221
- package/dist/components/tooltip.component.js.map +1 -1
- package/dist/components/user-menu-popover.component.d.ts +283 -0
- package/dist/components/user-menu-popover.component.d.ts.map +1 -0
- package/dist/components/user-menu-popover.component.js +646 -0
- package/dist/components/user-menu-popover.component.js.map +1 -0
- package/dist/components/user-menu.component.d.ts +95 -0
- package/dist/components/user-menu.component.d.ts.map +1 -0
- package/dist/components/user-menu.component.js +218 -0
- package/dist/components/user-menu.component.js.map +1 -0
- package/dist/hooks/index.d.ts +7 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +7 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/use-is-desktop.d.ts +22 -0
- package/dist/hooks/use-is-desktop.d.ts.map +1 -0
- package/dist/hooks/use-is-desktop.js +37 -0
- package/dist/hooks/use-is-desktop.js.map +1 -0
- package/dist/index.d.ts +32 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +32 -17
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/utilities/dom-context.d.ts +42 -0
- package/dist/utilities/dom-context.d.ts.map +1 -0
- package/dist/utilities/dom-context.js +66 -0
- package/dist/utilities/dom-context.js.map +1 -0
- package/dist/utilities/focus.d.ts +32 -0
- package/dist/utilities/focus.d.ts.map +1 -0
- package/dist/utilities/focus.js +47 -0
- package/dist/utilities/focus.js.map +1 -0
- package/dist/utilities/form-field-context.d.ts +34 -0
- package/dist/utilities/form-field-context.d.ts.map +1 -0
- package/dist/utilities/form-field-context.js +28 -0
- package/dist/utilities/form-field-context.js.map +1 -0
- package/dist/utilities/form-submit-error.d.ts +17 -0
- package/dist/utilities/form-submit-error.d.ts.map +1 -0
- package/dist/utilities/form-submit-error.js +42 -0
- package/dist/utilities/form-submit-error.js.map +1 -0
- package/dist/utilities/icon-markup.d.ts +17 -0
- package/dist/utilities/icon-markup.d.ts.map +1 -0
- package/dist/utilities/icon-markup.js +46 -0
- package/dist/utilities/icon-markup.js.map +1 -0
- package/dist/utilities/ids.d.ts +15 -0
- package/dist/utilities/ids.d.ts.map +1 -0
- package/dist/utilities/ids.js +19 -0
- package/dist/utilities/ids.js.map +1 -0
- package/dist/utilities/index.d.ts +11 -0
- package/dist/utilities/index.d.ts.map +1 -1
- package/dist/utilities/index.js +11 -0
- package/dist/utilities/index.js.map +1 -1
- package/dist/utilities/initials.d.ts +13 -0
- package/dist/utilities/initials.d.ts.map +1 -0
- package/dist/utilities/initials.js +23 -0
- package/dist/utilities/initials.js.map +1 -0
- package/dist/utilities/node-value.d.ts +31 -0
- package/dist/utilities/node-value.d.ts.map +1 -0
- package/dist/utilities/node-value.js +37 -0
- package/dist/utilities/node-value.js.map +1 -0
- package/dist/utilities/optimistic-value.d.ts +81 -0
- package/dist/utilities/optimistic-value.d.ts.map +1 -0
- package/dist/utilities/optimistic-value.js +154 -0
- package/dist/utilities/optimistic-value.js.map +1 -0
- package/dist/utilities/render-icon.d.ts +77 -7
- package/dist/utilities/render-icon.d.ts.map +1 -1
- package/dist/utilities/render-icon.js +123 -33
- package/dist/utilities/render-icon.js.map +1 -1
- package/dist/utilities/rest-attrs.d.ts +21 -0
- package/dist/utilities/rest-attrs.d.ts.map +1 -0
- package/dist/utilities/rest-attrs.js +37 -0
- package/dist/utilities/rest-attrs.js.map +1 -0
- package/dist/utilities/style.d.ts +23 -0
- package/dist/utilities/style.d.ts.map +1 -0
- package/dist/utilities/style.js +86 -0
- package/dist/utilities/style.js.map +1 -0
- package/package.json +6 -4
|
@@ -0,0 +1 @@
|
|
|
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;;;;;;;GAO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;oBACb,cAAc;oBACd,UAAU;oBACV,cAAc;oBACd,aAAa;oBACb,aAAa;oBACb,YAAY;oBACZ,cAAc;oBACd,aAAa;iBACd;gBACD,OAAO,EAAE,CAAC,OAAO,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;AAEH,OAAO,EAAyB,YAAY,EAAkB,MAAM,eAAe,CAAA;AAGnF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;;AAMlD,wBAAwB;AACxB,MAAM,WAAW,WAAW;IAC1B,0BAA0B;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,iCAAiC;IACjC,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,uCAAuC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED;;;;;;GAMG;AACH,qBAsDa,UAAU;IACrB,6BAA6B;IAC7B,OAAO,CAAC,EAAE,WAAW,EAAE,CAAA;IACvB,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,yCAAyC;IACzC,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,mBAAmB;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,qEAAqE;IACrE,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,wBAAwB;IACxB,SAAS,CAAC,EAAE,UAAU,GAAG,YAAY,CAAA;IACrC,qBAAqB;IACrB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,wCAAwC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,6CAA6C;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC/B,qBAAqB;IACrB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,6BAA6B;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;OAGG;IACH,EAAE,IAAI,UAAU;IAIhB;;;OAGG;IACH,SAAS,IAAI,MAAM;IAInB;;;OAGG;IACH,OAAO,IAAI,MAAM;IAIjB;;;OAGG;IACH,UAAU,IAAI,MAAM;IAMpB;;;OAGG;IACH,SAAS,IAAI,MAAM,GAAG,IAAI;IAI1B;;;;;;;;OAQG;IACH,MAAM,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAS1B,yCAAyC;IAC/B,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,207 +1,230 @@
|
|
|
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';
|
|
10
|
+
import { MolControlledChecked } from './controlled-checked.directive.js';
|
|
8
11
|
import * as i0 from "@angular/core";
|
|
12
|
+
const _c0 = () => [];
|
|
13
|
+
const _c1 = () => ({ required: false });
|
|
14
|
+
const _c2 = a0 => ({ error: a0 });
|
|
9
15
|
const _forTrack0 = ($index, $item) => $item.value;
|
|
10
|
-
function
|
|
11
|
-
i0.ɵɵ
|
|
16
|
+
function RadioGroup_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
17
|
+
i0.ɵɵelementStart(0, "div");
|
|
12
18
|
i0.ɵɵtext(1);
|
|
13
|
-
i0.ɵɵ
|
|
19
|
+
i0.ɵɵelementEnd();
|
|
14
20
|
} if (rf & 2) {
|
|
15
21
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
16
|
-
i0.ɵɵclassMap(ctx_r0.
|
|
22
|
+
i0.ɵɵclassMap(ctx_r0.cm().cn(ctx_r0.cm().label(i0.ɵɵpureFunction0(3, _c1)), ctx_r0.cm().sp("mb", 2)));
|
|
17
23
|
i0.ɵɵadvance();
|
|
18
24
|
i0.ɵɵtextInterpolate(ctx_r0.label);
|
|
19
25
|
} }
|
|
20
|
-
function
|
|
26
|
+
function RadioGroup_For_3_Template(rf, ctx) { if (rf & 1) {
|
|
21
27
|
const _r2 = i0.ɵɵgetCurrentView();
|
|
22
|
-
i0.ɵɵ
|
|
23
|
-
i0.ɵɵ
|
|
24
|
-
i0.ɵɵ
|
|
25
|
-
i0.ɵɵ
|
|
28
|
+
i0.ɵɵelementStart(0, "label")(1, "input", 1);
|
|
29
|
+
i0.ɵɵlistener("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)); });
|
|
30
|
+
i0.ɵɵelementEnd();
|
|
31
|
+
i0.ɵɵelementStart(2, "span");
|
|
26
32
|
i0.ɵɵtext(3);
|
|
27
|
-
i0.ɵɵ
|
|
33
|
+
i0.ɵɵelementEnd()();
|
|
28
34
|
} if (rf & 2) {
|
|
29
35
|
const option_r3 = ctx.$implicit;
|
|
30
36
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
31
|
-
i0.ɵɵclassMap(ctx_r0.
|
|
37
|
+
i0.ɵɵclassMap(ctx_r0.cm().cn(ctx_r0.cm().controlLabel, (ctx_r0.disabled || option_r3.disabled) && ctx_r0.cm().controlDisabled));
|
|
32
38
|
i0.ɵɵadvance();
|
|
33
|
-
i0.ɵɵclassMap(ctx_r0.
|
|
34
|
-
i0.ɵɵ
|
|
35
|
-
i0.ɵɵattribute("data-state", ctx_r0.value === option_r3.value ? "checked" : "unchecked");
|
|
39
|
+
i0.ɵɵclassMap(ctx_r0.cm().cn(ctx_r0.cm().radio(i0.ɵɵpureFunction1(12, _c2, !!ctx_r0.error)), ctx_r0.cm().cursorPointer));
|
|
40
|
+
i0.ɵɵproperty("molChecked", ctx_r0.value === option_r3.value)("disabled", ctx_r0.disabled || option_r3.disabled);
|
|
41
|
+
i0.ɵɵattribute("name", ctx_r0.groupName())("value", option_r3.value)("data-state", ctx_r0.value === option_r3.value ? "checked" : "unchecked");
|
|
36
42
|
i0.ɵɵadvance();
|
|
37
|
-
i0.ɵɵclassMap(ctx_r0.cm.controlText);
|
|
43
|
+
i0.ɵɵclassMap(ctx_r0.cm().controlText);
|
|
38
44
|
i0.ɵɵadvance();
|
|
39
45
|
i0.ɵɵtextInterpolate(option_r3.label);
|
|
40
46
|
} }
|
|
41
|
-
function
|
|
42
|
-
i0.ɵɵ
|
|
47
|
+
function RadioGroup_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
48
|
+
i0.ɵɵelementStart(0, "p");
|
|
43
49
|
i0.ɵɵtext(1);
|
|
44
|
-
i0.ɵɵ
|
|
50
|
+
i0.ɵɵelementEnd();
|
|
45
51
|
} if (rf & 2) {
|
|
46
52
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
47
|
-
i0.ɵɵclassMap(ctx_r0.
|
|
53
|
+
i0.ɵɵclassMap(ctx_r0.cm().cn(ctx_r0.cm().formError, ctx_r0.cm().sp("mt", 1)));
|
|
54
|
+
i0.ɵɵattribute("id", ctx_r0.errorId());
|
|
48
55
|
i0.ɵɵadvance();
|
|
49
56
|
i0.ɵɵtextInterpolate(ctx_r0.error);
|
|
50
57
|
} }
|
|
51
58
|
/**
|
|
52
|
-
*
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
*
|
|
59
|
+
* RadioGroup component.
|
|
60
|
+
*
|
|
61
|
+
* The host is the `role="radiogroup"` div React renders. Selecting an option
|
|
62
|
+
* emits that option's VALUE (not the DOM event) through the `change` output,
|
|
63
|
+
* exactly like React's per-option handler.
|
|
56
64
|
*/
|
|
57
|
-
export class
|
|
58
|
-
options
|
|
65
|
+
export class RadioGroup {
|
|
66
|
+
/** The options to render. */
|
|
67
|
+
options;
|
|
68
|
+
/** The selected option value. */
|
|
59
69
|
value;
|
|
70
|
+
/** Group size (kept for prop parity). */
|
|
60
71
|
size;
|
|
72
|
+
/** Group label. */
|
|
61
73
|
label;
|
|
62
|
-
|
|
74
|
+
/** Native radio group name (defaults to a stable generated name). */
|
|
75
|
+
name;
|
|
76
|
+
/** Layout direction. */
|
|
77
|
+
direction;
|
|
78
|
+
/** Error message. */
|
|
63
79
|
error;
|
|
80
|
+
/** Extra classes for the group root. */
|
|
64
81
|
className;
|
|
82
|
+
/** Inline style object (React camelCase). */
|
|
65
83
|
style;
|
|
84
|
+
/** `data-testid`. */
|
|
66
85
|
testId;
|
|
67
|
-
|
|
68
|
-
|
|
86
|
+
/** Disables every option. */
|
|
87
|
+
disabled;
|
|
69
88
|
/**
|
|
70
|
-
*
|
|
71
|
-
* @returns The UIClassMap
|
|
89
|
+
* The current class map.
|
|
90
|
+
* @returns The UIClassMap.
|
|
72
91
|
*/
|
|
73
|
-
|
|
92
|
+
cm() {
|
|
74
93
|
return getClassMap();
|
|
75
94
|
}
|
|
76
95
|
/**
|
|
77
|
-
*
|
|
78
|
-
* @returns The
|
|
96
|
+
* The native radio group name.
|
|
97
|
+
* @returns The name value.
|
|
79
98
|
*/
|
|
80
|
-
|
|
81
|
-
return this.
|
|
99
|
+
groupName() {
|
|
100
|
+
return this.name || 'r0';
|
|
82
101
|
}
|
|
83
102
|
/**
|
|
84
|
-
*
|
|
85
|
-
* @returns The
|
|
103
|
+
* The error paragraph id.
|
|
104
|
+
* @returns The id value.
|
|
86
105
|
*/
|
|
87
|
-
|
|
88
|
-
return this.
|
|
106
|
+
errorId() {
|
|
107
|
+
return `${this.groupName()}-error`;
|
|
89
108
|
}
|
|
90
109
|
/**
|
|
91
|
-
*
|
|
92
|
-
* @returns The
|
|
110
|
+
* The accessible group label.
|
|
111
|
+
* @returns The label text.
|
|
93
112
|
*/
|
|
94
|
-
|
|
95
|
-
return this.
|
|
113
|
+
groupLabel() {
|
|
114
|
+
return (this.label ?? this.i18n.t('ui.radioGroup.label', undefined, { defaultValue: 'Radio group' }));
|
|
96
115
|
}
|
|
97
116
|
/**
|
|
98
|
-
*
|
|
99
|
-
* @returns The
|
|
117
|
+
* Serializes the inline style.
|
|
118
|
+
* @returns The style attribute text.
|
|
100
119
|
*/
|
|
101
|
-
|
|
102
|
-
return
|
|
120
|
+
hostStyle() {
|
|
121
|
+
return styleText(this.style);
|
|
103
122
|
}
|
|
104
123
|
/**
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
124
|
+
* Emits the selected option's value; the change event stops here so the
|
|
125
|
+
* host-level `change` output binding does not record it a second time. Every
|
|
126
|
+
* radio's checked state is then restored to the controlled `value` — checking
|
|
127
|
+
* one radio natively UNCHECKS the previously selected one, so restoring only
|
|
128
|
+
* the clicked input would leave the group with no selection at all.
|
|
129
|
+
*
|
|
130
|
+
* @param event - The native radio change event.
|
|
108
131
|
*/
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
132
|
+
select(event) {
|
|
133
|
+
event.stopPropagation();
|
|
134
|
+
this.change.emit(event.target.value);
|
|
135
|
+
// React always controls radios (checked={value === option.value}); restore.
|
|
136
|
+
const radios = this.host.nativeElement.querySelectorAll('input[type="radio"]');
|
|
137
|
+
for (const radio of Array.from(radios))
|
|
138
|
+
radio.checked = this.value === radio.value;
|
|
112
139
|
}
|
|
140
|
+
/** Fires the selected option's value. */
|
|
141
|
+
change = new EventEmitter();
|
|
113
142
|
/**
|
|
114
|
-
*
|
|
115
|
-
*
|
|
143
|
+
* Reactive translation, read in the injection context. Its `t` reads the
|
|
144
|
+
* locale, so the view re-renders the text on a locale switch (the static `t`
|
|
145
|
+
* does not).
|
|
116
146
|
*/
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}
|
|
120
|
-
static
|
|
121
|
-
|
|
122
|
-
i0.ɵɵ
|
|
123
|
-
i0.ɵɵconditionalCreate(1, MoleculeRadioGroup_Conditional_1_Template, 2, 3, "div", 1);
|
|
124
|
-
i0.ɵɵdomElementStart(2, "div");
|
|
125
|
-
i0.ɵɵrepeaterCreate(3, MoleculeRadioGroup_For_4_Template, 4, 12, "label", 1, _forTrack0);
|
|
126
|
-
i0.ɵɵdomElementEnd();
|
|
127
|
-
i0.ɵɵconditionalCreate(5, MoleculeRadioGroup_Conditional_5_Template, 2, 3, "p", 1);
|
|
128
|
-
i0.ɵɵdomElementEnd();
|
|
129
|
-
} if (rf & 2) {
|
|
130
|
-
i0.ɵɵstyleMap(ctx.style);
|
|
147
|
+
i18n = useTranslation();
|
|
148
|
+
host = inject(ElementRef);
|
|
149
|
+
static ɵfac = function RadioGroup_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || RadioGroup)(); };
|
|
150
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: RadioGroup, selectors: [["div", "mol-radio-group", ""]], hostVars: 9, hostBindings: function RadioGroup_HostBindings(rf, ctx) { if (rf & 2) {
|
|
151
|
+
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);
|
|
152
|
+
i0.ɵɵstyleMap(ctx.hostStyle());
|
|
131
153
|
i0.ɵɵclassMap(ctx.className);
|
|
132
|
-
|
|
133
|
-
i0.ɵɵ
|
|
134
|
-
i0.ɵɵ
|
|
154
|
+
} }, 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", "molChecked", "disabled"]], template: function RadioGroup_Template(rf, ctx) { if (rf & 1) {
|
|
155
|
+
i0.ɵɵconditionalCreate(0, RadioGroup_Conditional_0_Template, 2, 4, "div", 0);
|
|
156
|
+
i0.ɵɵelementStart(1, "div");
|
|
157
|
+
i0.ɵɵrepeaterCreate(2, RadioGroup_For_3_Template, 4, 14, "label", 0, _forTrack0);
|
|
158
|
+
i0.ɵɵelementEnd();
|
|
159
|
+
i0.ɵɵconditionalCreate(4, RadioGroup_Conditional_4_Template, 2, 4, "p", 0);
|
|
160
|
+
} if (rf & 2) {
|
|
161
|
+
i0.ɵɵconditional(ctx.label ? 0 : -1);
|
|
135
162
|
i0.ɵɵadvance();
|
|
136
|
-
i0.ɵɵclassMap(ctx.
|
|
163
|
+
i0.ɵɵclassMap(ctx.cm().radioGroupLayout(ctx.direction ?? "vertical"));
|
|
137
164
|
i0.ɵɵadvance();
|
|
138
|
-
i0.ɵɵrepeater(ctx.options);
|
|
165
|
+
i0.ɵɵrepeater(ctx.options ?? i0.ɵɵpureFunction0(4, _c0));
|
|
139
166
|
i0.ɵɵadvance(2);
|
|
140
|
-
i0.ɵɵconditional(ctx.error ?
|
|
141
|
-
} }, encapsulation: 2 });
|
|
167
|
+
i0.ɵɵconditional(ctx.error ? 4 : -1);
|
|
168
|
+
} }, dependencies: [MolControlledChecked], encapsulation: 2 });
|
|
142
169
|
}
|
|
143
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(
|
|
170
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(RadioGroup, [{
|
|
144
171
|
type: Component,
|
|
145
172
|
args: [{
|
|
146
|
-
selector: 'mol-radio-group',
|
|
173
|
+
selector: 'div[mol-radio-group]',
|
|
147
174
|
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
|
-
|
|
175
|
+
imports: [MolControlledChecked],
|
|
176
|
+
inputs: [
|
|
177
|
+
'options',
|
|
178
|
+
'value',
|
|
179
|
+
'size',
|
|
180
|
+
'label',
|
|
181
|
+
'name',
|
|
182
|
+
'direction',
|
|
183
|
+
'error',
|
|
184
|
+
'className',
|
|
185
|
+
'style',
|
|
186
|
+
'testId',
|
|
187
|
+
'disabled',
|
|
188
|
+
],
|
|
189
|
+
host: {
|
|
190
|
+
'[class]': 'className',
|
|
191
|
+
'[style]': 'hostStyle()',
|
|
192
|
+
'[attr.data-testid]': 'testId',
|
|
193
|
+
'[attr.role]': '"radiogroup"',
|
|
194
|
+
'[attr.aria-label]': 'groupLabel()',
|
|
195
|
+
'[attr.aria-invalid]': 'error ? "true" : null',
|
|
196
|
+
'[attr.aria-describedby]': 'error ? errorId() : null',
|
|
197
|
+
},
|
|
198
|
+
template: `@if (label) {
|
|
199
|
+
<div [class]="cm().cn(cm().label({ required: false }), cm().sp('mb', 2))">{{ label }}</div>
|
|
200
|
+
}
|
|
201
|
+
<div [class]="cm().radioGroupLayout(direction ?? 'vertical')">
|
|
202
|
+
@for (option of options ?? []; track option.value) {
|
|
203
|
+
<label
|
|
204
|
+
[class]="
|
|
205
|
+
cm().cn(cm().controlLabel, (disabled || option.disabled) && cm().controlDisabled)
|
|
206
|
+
"
|
|
207
|
+
>
|
|
208
|
+
<input
|
|
209
|
+
type="radio"
|
|
210
|
+
[attr.name]="groupName()"
|
|
211
|
+
[attr.value]="option.value"
|
|
212
|
+
[molChecked]="value === option.value"
|
|
213
|
+
[disabled]="disabled || option.disabled"
|
|
214
|
+
(change)="select($event)"
|
|
215
|
+
[attr.data-state]="value === option.value ? 'checked' : 'unchecked'"
|
|
216
|
+
[class]="cm().cn(cm().radio({ error: !!error }), cm().cursorPointer)"
|
|
217
|
+
/>
|
|
218
|
+
<span [class]="cm().controlText">{{ option.label }}</span>
|
|
219
|
+
</label>
|
|
179
220
|
}
|
|
180
221
|
</div>
|
|
181
|
-
|
|
222
|
+
@if (error) {
|
|
223
|
+
<p [attr.id]="errorId()" [class]="cm().cn(cm().formError, cm().sp('mt', 1))">{{ error }}</p>
|
|
224
|
+
}`,
|
|
182
225
|
}]
|
|
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: [{
|
|
226
|
+
}], null, { change: [{
|
|
204
227
|
type: Output
|
|
205
228
|
}] }); })();
|
|
206
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(
|
|
229
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(RadioGroup, { className: "RadioGroup", filePath: "components/radio-group.component.ts", lineNumber: 87 }); })();
|
|
207
230
|
//# 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,OA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