@cloudscape-design/components 3.0.1130 → 3.0.1132

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/internal/base-component/styles.scoped.css +1 -1
  2. package/internal/components/radio-button/index.d.ts +5 -0
  3. package/internal/components/radio-button/index.d.ts.map +1 -0
  4. package/{radio-group/radio-button.js → internal/components/radio-button/index.js} +10 -10
  5. package/internal/components/radio-button/index.js.map +1 -0
  6. package/internal/components/radio-button/interfaces.d.ts +126 -0
  7. package/internal/components/radio-button/interfaces.d.ts.map +1 -0
  8. package/internal/components/radio-button/interfaces.js +2 -0
  9. package/internal/components/radio-button/interfaces.js.map +1 -0
  10. package/internal/components/radio-button/styles.css.js +12 -0
  11. package/internal/components/radio-button/styles.scoped.css +211 -0
  12. package/internal/components/radio-button/styles.selectors.js +13 -0
  13. package/internal/components/radio-button/test-classes/styles.css.js +6 -0
  14. package/internal/components/radio-button/test-classes/styles.scoped.css +7 -0
  15. package/internal/components/radio-button/test-classes/styles.selectors.js +7 -0
  16. package/internal/environment.js +2 -2
  17. package/internal/environment.json +2 -2
  18. package/internal/manifest.json +1 -1
  19. package/package.json +1 -1
  20. package/radio-group/index.d.ts +1 -1
  21. package/radio-group/index.d.ts.map +1 -1
  22. package/radio-group/interfaces.d.ts +3 -50
  23. package/radio-group/interfaces.d.ts.map +1 -1
  24. package/radio-group/interfaces.js +2 -0
  25. package/radio-group/interfaces.js.map +1 -1
  26. package/radio-group/internal.d.ts +1 -1
  27. package/radio-group/internal.d.ts.map +1 -1
  28. package/radio-group/internal.js +10 -4
  29. package/radio-group/internal.js.map +1 -1
  30. package/radio-group/styles.css.js +3 -10
  31. package/radio-group/styles.scoped.css +3 -75
  32. package/radio-group/styles.selectors.js +3 -10
  33. package/radio-group/test-classes/styles.css.js +6 -0
  34. package/radio-group/test-classes/styles.scoped.css +7 -0
  35. package/radio-group/test-classes/styles.selectors.js +7 -0
  36. package/table/selection/selection-control.js +2 -2
  37. package/table/selection/selection-control.js.map +1 -1
  38. package/test-utils/dom/radio-group/index.js +4 -3
  39. package/test-utils/dom/radio-group/index.js.map +1 -1
  40. package/test-utils/dom/radio-group/radio-button.d.ts +1 -0
  41. package/test-utils/dom/radio-group/radio-button.js +2 -0
  42. package/test-utils/dom/radio-group/radio-button.js.map +1 -1
  43. package/test-utils/selectors/radio-group/index.js +4 -3
  44. package/test-utils/selectors/radio-group/index.js.map +1 -1
  45. package/test-utils/selectors/radio-group/radio-button.d.ts +1 -0
  46. package/test-utils/selectors/radio-group/radio-button.js +2 -0
  47. package/test-utils/selectors/radio-group/radio-button.js.map +1 -1
  48. package/tiles/tile.d.ts.map +1 -1
  49. package/tiles/tile.js +2 -2
  50. package/tiles/tile.js.map +1 -1
  51. package/tree-view/tree-item/styles.css.js +9 -9
  52. package/tree-view/tree-item/styles.scoped.css +16 -12
  53. package/tree-view/tree-item/styles.selectors.js +9 -9
  54. package/radio-group/radio-button.d.ts +0 -13
  55. package/radio-group/radio-button.d.ts.map +0 -1
  56. package/radio-group/radio-button.js.map +0 -1
@@ -2051,5 +2051,5 @@ body {
2051
2051
  }
2052
2052
  }
2053
2053
  :root {
2054
- --awsui-version-info-7af314dc: true;
2054
+ --awsui-version-info-a79c3a7f: true;
2055
2055
  }
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { InternalBaseComponentProps } from '../../hooks/use-base-component';
3
+ import { RadioButtonProps } from './interfaces';
4
+ declare const _default: React.ForwardRefExoticComponent<RadioButtonProps & InternalBaseComponentProps & React.RefAttributes<HTMLInputElement>>;
5
+ export default _default;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/radio-button/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAWtC,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;;AAKhD,wBAoFG"}
@@ -5,23 +5,23 @@ import clsx from 'clsx';
5
5
  import { useMergeRefs } from '@cloudscape-design/component-toolkit/internal';
6
6
  import { useSingleTabStopNavigation } from '@cloudscape-design/component-toolkit/internal';
7
7
  import { copyAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';
8
- import AbstractSwitch from '../internal/components/abstract-switch';
9
- import { fireNonCancelableEvent } from '../internal/events';
10
- import { getAbstractSwitchStyles, getInnerCircleStyle, getOuterCircleStyle } from './style';
8
+ import { getAbstractSwitchStyles, getInnerCircleStyle, getOuterCircleStyle } from '../../../radio-group/style';
9
+ import { getBaseProps } from '../../base-component';
10
+ import AbstractSwitch from '../../components/abstract-switch';
11
+ import { fireNonCancelableEvent } from '../../events';
11
12
  import styles from './styles.css.js';
12
- export default React.forwardRef(function RadioButton({ name, label, value, checked, description, disabled, controlId, onChange, readOnly, className, style, ...rest }, ref) {
13
+ import testUtilStyles from './test-classes/styles.css.js';
14
+ export default React.forwardRef(function RadioButton({ name, children, value, checked, description, disabled, controlId, onChange, readOnly, className, style, ...rest }, ref) {
13
15
  const radioButtonRef = useRef(null);
14
16
  const mergedRefs = useMergeRefs(radioButtonRef, ref);
15
17
  const { tabIndex } = useSingleTabStopNavigation(radioButtonRef);
16
- return (React.createElement(AbstractSwitch, { className: clsx(styles.radio, description && styles['radio--has-description'], className), controlClassName: styles['radio-control'], outlineClassName: styles.outline, label: label, description: description, disabled: disabled, readOnly: readOnly, controlId: controlId, style: getAbstractSwitchStyles(style, checked, disabled, readOnly), ...copyAnalyticsMetadataAttribute(rest), nativeControl: nativeControlProps => (React.createElement("input", { ...nativeControlProps, tabIndex: tabIndex, type: "radio", ref: mergedRefs, name: name, value: value, checked: checked, "aria-disabled": readOnly && !disabled ? 'true' : undefined,
18
+ const baseProps = getBaseProps(rest);
19
+ return (React.createElement(AbstractSwitch, { ...baseProps, className: clsx(testUtilStyles.root, className), controlClassName: styles['radio-control'], outlineClassName: styles.outline, label: children, description: description, disabled: disabled, readOnly: readOnly, controlId: controlId, style: getAbstractSwitchStyles(style, checked, disabled, readOnly), __internalRootRef: rest.__internalRootRef, ...copyAnalyticsMetadataAttribute(rest), nativeControl: nativeControlProps => (React.createElement("input", { ...nativeControlProps, tabIndex: tabIndex, type: "radio", ref: mergedRefs, name: name, value: value, checked: checked, "aria-disabled": readOnly && !disabled ? 'true' : undefined,
17
20
  // empty handler to suppress React controllability warning
18
21
  onChange: () => { } })), onClick: () => {
19
22
  var _a;
20
23
  (_a = radioButtonRef.current) === null || _a === void 0 ? void 0 : _a.focus();
21
- if (checked) {
22
- return;
23
- }
24
- fireNonCancelableEvent(onChange, { value });
24
+ fireNonCancelableEvent(onChange, { checked: !checked });
25
25
  }, styledControl: React.createElement("svg", { viewBox: "0 0 100 100", focusable: "false", "aria-hidden": "true" },
26
26
  React.createElement("circle", { className: clsx(styles['styled-circle-border'], {
27
27
  [styles['styled-circle-disabled']]: disabled,
@@ -33,4 +33,4 @@ export default React.forwardRef(function RadioButton({ name, label, value, check
33
33
  [styles['styled-circle-readonly']]: readOnly,
34
34
  }), strokeWidth: 30, cx: 50, cy: 50, r: 35, style: getInnerCircleStyle(style, checked, disabled, readOnly) })) }));
35
35
  });
36
- //# sourceMappingURL=radio-button.js.map
36
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/radio-button/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAC7E,OAAO,EAAE,0BAA0B,EAAE,MAAM,+CAA+C,CAAC;AAC3F,OAAO,EAAE,8BAA8B,EAAE,MAAM,kEAAkE,CAAC;AAElH,OA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,EAAE,QAAQ;iBAC7C,CAAC,EACF,WAAW,EAAE,EAAE,EACf,EAAE,EAAE,EAAE,EACN,EAAE,EAAE,EAAE,EACN,CAAC,EAAE,EAAE,EACL,KAAK,EAAE,mBAAmB,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,GAC9D,CACE,GAER,CACH,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { useMergeRefs } from '@cloudscape-design/component-toolkit/internal';\nimport { useSingleTabStopNavigation } from '@cloudscape-design/component-toolkit/internal';\nimport { copyAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { getAbstractSwitchStyles, getInnerCircleStyle, getOuterCircleStyle } from '../../../radio-group/style';\nimport { getBaseProps } from '../../base-component';\nimport AbstractSwitch from '../../components/abstract-switch';\nimport { fireNonCancelableEvent } from '../../events';\nimport { InternalBaseComponentProps } from '../../hooks/use-base-component';\nimport { RadioButtonProps } from './interfaces';\n\nimport styles from './styles.css.js';\nimport testUtilStyles from './test-classes/styles.css.js';\n\nexport default React.forwardRef(function RadioButton(\n {\n name,\n children,\n value,\n checked,\n description,\n disabled,\n controlId,\n onChange,\n readOnly,\n className,\n style,\n ...rest\n }: RadioButtonProps & InternalBaseComponentProps,\n ref: React.Ref<HTMLInputElement>\n) {\n const radioButtonRef = useRef<HTMLInputElement>(null);\n const mergedRefs = useMergeRefs(radioButtonRef, ref);\n\n const { tabIndex } = useSingleTabStopNavigation(radioButtonRef);\n const baseProps = getBaseProps(rest);\n\n return (\n <AbstractSwitch\n {...baseProps}\n className={clsx(testUtilStyles.root, className)}\n controlClassName={styles['radio-control']}\n outlineClassName={styles.outline}\n label={children}\n description={description}\n disabled={disabled}\n readOnly={readOnly}\n controlId={controlId}\n style={getAbstractSwitchStyles(style, checked, disabled, readOnly)}\n __internalRootRef={rest.__internalRootRef}\n {...copyAnalyticsMetadataAttribute(rest)}\n nativeControl={nativeControlProps => (\n <input\n {...nativeControlProps}\n tabIndex={tabIndex}\n type=\"radio\"\n ref={mergedRefs}\n name={name}\n value={value}\n checked={checked}\n aria-disabled={readOnly && !disabled ? 'true' : undefined}\n // empty handler to suppress React controllability warning\n onChange={() => {}}\n />\n )}\n onClick={() => {\n radioButtonRef.current?.focus();\n fireNonCancelableEvent(onChange, { checked: !checked });\n }}\n styledControl={\n <svg viewBox=\"0 0 100 100\" focusable=\"false\" aria-hidden=\"true\">\n <circle\n className={clsx(styles['styled-circle-border'], {\n [styles['styled-circle-disabled']]: disabled,\n [styles['styled-circle-readonly']]: readOnly,\n })}\n strokeWidth={6.25}\n cx={50}\n cy={50}\n r={46}\n style={getOuterCircleStyle(style, checked, disabled, readOnly)}\n />\n <circle\n className={clsx(styles['styled-circle-fill'], {\n [styles['styled-circle-disabled']]: disabled,\n [styles['styled-circle-checked']]: checked,\n [styles['styled-circle-readonly']]: readOnly,\n })}\n strokeWidth={30}\n cx={50}\n cy={50}\n r={35}\n style={getInnerCircleStyle(style, checked, disabled, readOnly)}\n />\n </svg>\n }\n />\n );\n});\n"]}
@@ -0,0 +1,126 @@
1
+ import React from 'react';
2
+ import { BaseComponentProps } from '../../base-component';
3
+ import { NonCancelableEventHandler } from '../../events';
4
+ /**
5
+ * @awsuiSystem core
6
+ */
7
+
8
+ export interface RadioButtonProps extends BaseComponentProps {
9
+ /**
10
+ * Specifies if the component is selected.
11
+ */
12
+ checked: boolean;
13
+ /**
14
+ * Specifies the ID of the native form element. You can use it to relate
15
+ * a label element's `for` attribute to this control.
16
+ */
17
+ controlId?: string;
18
+ /**
19
+ * Name of the group that the radio button belongs to.
20
+ */
21
+ name: string;
22
+ /**
23
+ * Description that appears below the label.
24
+ */
25
+ description?: React.ReactNode;
26
+ /**
27
+ * Specifies if the control is disabled, which prevents the
28
+ * user from modifying the value and prevents the value from
29
+ * being included in a form submission. A disabled control can't
30
+ * receive focus.
31
+ */
32
+ disabled?: boolean;
33
+ /**
34
+ * The control's label that's displayed next to the radio button. A state change occurs when a user clicks on it.
35
+ * @displayname label
36
+ */
37
+ children?: React.ReactNode;
38
+ /**
39
+ * Attributes to add to the native `input` element.
40
+ * Some attributes will be automatically combined with internal attribute values:
41
+ * - `className` will be appended.
42
+ * - Event handlers will be chained, unless the default is prevented.
43
+ *
44
+ * We do not support using this attribute to apply custom styling.
45
+ *
46
+ * @awsuiSystem core
47
+ */
48
+
49
+ /**
50
+ * Called when the user changes the component state. The event `detail` contains the current value for the `checked` property.
51
+ */
52
+ onChange?: NonCancelableEventHandler<RadioButtonProps.ChangeDetail>;
53
+ /**
54
+ * Specifies if the radio button is read-only, which prevents the
55
+ * user from modifying the value, but does not prevent the value from
56
+ * being included in a form submission. A read-only control is still focusable.
57
+ *
58
+ * This property should be set for either all or none of the radio buttons in a group.
59
+ */
60
+ readOnly?: boolean;
61
+ /**
62
+ * @awsuiSystem core
63
+ */
64
+
65
+ /**
66
+ * Sets the value attribute to the native control.
67
+ * If using native form submission, this value is sent to the server if the radio button is checked.
68
+ * It is never shown to the user by their user agent.
69
+ * For more details, see the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input/radio#value).
70
+ */
71
+ value?: string;
72
+ }
73
+ export declare namespace RadioButtonProps {
74
+ interface ChangeDetail {
75
+ checked: boolean;
76
+ }
77
+ interface Ref {
78
+ /**
79
+ * Sets input focus onto the UI control.
80
+ */
81
+ focus(): void;
82
+ }
83
+ interface Style {
84
+ input?: {
85
+ fill?: {
86
+ checked?: string;
87
+ default?: string;
88
+ disabled?: string;
89
+ readOnly?: string;
90
+ };
91
+ stroke?: {
92
+ default?: string;
93
+ disabled?: string;
94
+ readOnly?: string;
95
+ };
96
+ circle?: {
97
+ fill?: {
98
+ checked?: string;
99
+ disabled?: string;
100
+ readOnly?: string;
101
+ };
102
+ };
103
+ focusRing?: {
104
+ borderColor?: string;
105
+ borderRadius?: string;
106
+ borderWidth?: string;
107
+ };
108
+ };
109
+ label?: {
110
+ color?: {
111
+ checked?: string;
112
+ default?: string;
113
+ disabled?: string;
114
+ readOnly?: string;
115
+ };
116
+ };
117
+ description?: {
118
+ color?: {
119
+ checked?: string;
120
+ default?: string;
121
+ disabled?: string;
122
+ readOnly?: string;
123
+ };
124
+ };
125
+ }
126
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/radio-button/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AACzD;;GAEG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAEtE,MAAM,WAAW,gBAAiB,SAAQ,kBAAkB;IAC1D;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE9B;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B;;;;;;;;;OASG;IACH,qBAAqB,CAAC,EAAE,gBAAgB,CAAC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAEtF;;OAEG;IACH,QAAQ,CAAC,EAAE,yBAAyB,CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAC;IAEpE;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,KAAK,CAAC,EAAE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AC,EAAE,MAAM,CAAC;gBACjB,OAAO,CAAC,EAAE,MAAM,CAAC;gBACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;gBAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;aACnB,CAAC;SACH,CAAC;KACH;CACF"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=interfaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../../src/internal/components/radio-button/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { BaseComponentProps } from '../../base-component';\nimport { NonCancelableEventHandler } from '../../events';\n/**\n * @awsuiSystem core\n */\nimport { NativeAttributes } from '../../utils/with-native-attributes';\n\nexport interface RadioButtonProps extends BaseComponentProps {\n /**\n * Specifies if the component is selected.\n */\n checked: boolean;\n\n /**\n * Specifies the ID of the native form element. You can use it to relate\n * a label element's `for` attribute to this control.\n */\n controlId?: string;\n\n /**\n * Name of the group that the radio button belongs to.\n */\n name: string;\n\n /**\n * Description that appears below the label.\n */\n description?: React.ReactNode;\n\n /**\n * Specifies if the control is disabled, which prevents the\n * user from modifying the value and prevents the value from\n * being included in a form submission. A disabled control can't\n * receive focus.\n */\n disabled?: boolean;\n\n /**\n * The control's label that's displayed next to the radio button. A state change occurs when a user clicks on it.\n * @displayname label\n */\n children?: React.ReactNode;\n\n /**\n * Attributes to add to the native `input` element.\n * Some attributes will be automatically combined with internal attribute values:\n * - `className` will be appended.\n * - Event handlers will be chained, unless the default is prevented.\n *\n * We do not support using this attribute to apply custom styling.\n *\n * @awsuiSystem core\n */\n nativeInputAttributes?: NativeAttributes<React.InputHTMLAttributes<HTMLInputElement>>;\n\n /**\n * Called when the user changes the component state. The event `detail` contains the current value for the `checked` property.\n */\n onChange?: NonCancelableEventHandler<RadioButtonProps.ChangeDetail>;\n\n /**\n * Specifies if the radio button is read-only, which prevents the\n * user from modifying the value, but does not prevent the value from\n * being included in a form submission. A read-only control is still focusable.\n *\n * This property should be set for either all or none of the radio buttons in a group.\n */\n readOnly?: boolean;\n\n /**\n * @awsuiSystem core\n */\n style?: RadioButtonProps.Style;\n\n /**\n * Sets the value attribute to the native control.\n * If using native form submission, this value is sent to the server if the radio button is checked.\n * It is never shown to the user by their user agent.\n * For more details, see the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input/radio#value).\n */\n value?: string;\n}\n\nexport namespace RadioButtonProps {\n export interface ChangeDetail {\n checked: boolean;\n }\n\n export interface Ref {\n /**\n * Sets input focus onto the UI control.\n */\n focus(): void;\n }\n\n export interface Style {\n input?: {\n fill?: {\n checked?: string;\n default?: string;\n disabled?: string;\n readOnly?: string;\n };\n stroke?: {\n default?: string;\n disabled?: string;\n readOnly?: string;\n };\n circle?: {\n fill?: {\n checked?: string;\n disabled?: string;\n readOnly?: string;\n };\n };\n focusRing?: {\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n };\n };\n label?: {\n color?: {\n checked?: string;\n default?: string;\n disabled?: string;\n readOnly?: string;\n };\n };\n description?: {\n color?: {\n checked?: string;\n default?: string;\n disabled?: string;\n readOnly?: string;\n };\n };\n }\n}\n"]}
@@ -0,0 +1,12 @@
1
+
2
+ import './styles.scoped.css';
3
+ export default {
4
+ "radio-control": "awsui_radio-control_1v1hk_11np0_145",
5
+ "outline": "awsui_outline_1v1hk_11np0_153",
6
+ "styled-circle-border": "awsui_styled-circle-border_1v1hk_11np0_176",
7
+ "styled-circle-disabled": "awsui_styled-circle-disabled_1v1hk_11np0_180",
8
+ "styled-circle-readonly": "awsui_styled-circle-readonly_1v1hk_11np0_180",
9
+ "styled-circle-fill": "awsui_styled-circle-fill_1v1hk_11np0_185",
10
+ "styled-circle-checked": "awsui_styled-circle-checked_1v1hk_11np0_201"
11
+ };
12
+
@@ -0,0 +1,211 @@
1
+ /*
2
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ /*
6
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
7
+ SPDX-License-Identifier: Apache-2.0
8
+ */
9
+ /*
10
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
11
+ SPDX-License-Identifier: Apache-2.0
12
+ */
13
+ /*
14
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
15
+ SPDX-License-Identifier: Apache-2.0
16
+ */
17
+ /*
18
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
19
+ SPDX-License-Identifier: Apache-2.0
20
+ */
21
+ /*
22
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
23
+ SPDX-License-Identifier: Apache-2.0
24
+ */
25
+ /*
26
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
27
+ SPDX-License-Identifier: Apache-2.0
28
+ */
29
+ /*
30
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
31
+ SPDX-License-Identifier: Apache-2.0
32
+ */
33
+ /*
34
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
35
+ SPDX-License-Identifier: Apache-2.0
36
+ */
37
+ /*
38
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
39
+ SPDX-License-Identifier: Apache-2.0
40
+ */
41
+ /*
42
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
43
+ SPDX-License-Identifier: Apache-2.0
44
+ */
45
+ /*
46
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
47
+ SPDX-License-Identifier: Apache-2.0
48
+ */
49
+ /*
50
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
51
+ SPDX-License-Identifier: Apache-2.0
52
+ */
53
+ /*
54
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
55
+ SPDX-License-Identifier: Apache-2.0
56
+ */
57
+ /*
58
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
59
+ SPDX-License-Identifier: Apache-2.0
60
+ */
61
+ /*
62
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
63
+ SPDX-License-Identifier: Apache-2.0
64
+ */
65
+ /*
66
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
67
+ SPDX-License-Identifier: Apache-2.0
68
+ */
69
+ /*
70
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
71
+ SPDX-License-Identifier: Apache-2.0
72
+ */
73
+ /*
74
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
75
+ SPDX-License-Identifier: Apache-2.0
76
+ */
77
+ /*
78
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
79
+ SPDX-License-Identifier: Apache-2.0
80
+ */
81
+ /*
82
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
83
+ SPDX-License-Identifier: Apache-2.0
84
+ */
85
+ /*
86
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
87
+ SPDX-License-Identifier: Apache-2.0
88
+ */
89
+ /*
90
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
91
+ SPDX-License-Identifier: Apache-2.0
92
+ */
93
+ /*
94
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
95
+ SPDX-License-Identifier: Apache-2.0
96
+ */
97
+ /*
98
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
99
+ SPDX-License-Identifier: Apache-2.0
100
+ */
101
+ /*
102
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
103
+ SPDX-License-Identifier: Apache-2.0
104
+ */
105
+ /*
106
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
107
+ SPDX-License-Identifier: Apache-2.0
108
+ */
109
+ /*
110
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
111
+ SPDX-License-Identifier: Apache-2.0
112
+ */
113
+ /* stylelint-disable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
114
+ /* stylelint-enable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
115
+ /*
116
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
117
+ SPDX-License-Identifier: Apache-2.0
118
+ */
119
+ /*
120
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
121
+ SPDX-License-Identifier: Apache-2.0
122
+ */
123
+ /*
124
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
125
+ SPDX-License-Identifier: Apache-2.0
126
+ */
127
+ /*
128
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
129
+ SPDX-License-Identifier: Apache-2.0
130
+ */
131
+ /*
132
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
133
+ SPDX-License-Identifier: Apache-2.0
134
+ */
135
+ /*
136
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
137
+ SPDX-License-Identifier: Apache-2.0
138
+ */
139
+ /*
140
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
141
+ SPDX-License-Identifier: Apache-2.0
142
+ */
143
+ /* Style used for links in slots/components that are text heavy, to help links stand out among
144
+ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
145
+ .awsui_radio-control_1v1hk_11np0_145:not(#\9) {
146
+ margin-block-start: calc((var(--line-height-body-m-2mh3ke, 20px) - var(--size-control-adm93y, 16px)) / 2);
147
+ min-block-size: var(--size-control-adm93y, 16px);
148
+ min-inline-size: var(--size-control-adm93y, 16px);
149
+ block-size: var(--size-control-adm93y, 16px);
150
+ inline-size: var(--size-control-adm93y, 16px);
151
+ }
152
+
153
+ .awsui_outline_1v1hk_11np0_153:not(#\9) {
154
+ --awsui-style-focus-ring-box-shadow-d43v8n: 0 0 0 var(--awsui-style-focus-ring-border-width-d43v8n, 2px) var(--awsui-style-focus-ring-border-color-d43v8n, var(--color-border-item-focused-uk47pl, #006ce0));
155
+ position: relative;
156
+ }
157
+ .awsui_outline_1v1hk_11np0_153:not(#\9) {
158
+ outline: 2px dotted transparent;
159
+ outline-offset: calc(2px - 1px);
160
+ }
161
+ .awsui_outline_1v1hk_11np0_153:not(#\9)::before {
162
+ content: " ";
163
+ display: block;
164
+ position: absolute;
165
+ inset-inline-start: calc(-1 * 2px);
166
+ inset-block-start: calc(-1 * 2px);
167
+ inline-size: calc(100% + 2px + 2px);
168
+ block-size: calc(100% + 2px + 2px);
169
+ border-start-start-radius: var(--awsui-style-focus-ring-border-radius-d43v8n, var(--border-radius-control-circular-focus-ring-yjhscw, 4px));
170
+ border-start-end-radius: var(--awsui-style-focus-ring-border-radius-d43v8n, var(--border-radius-control-circular-focus-ring-yjhscw, 4px));
171
+ border-end-start-radius: var(--awsui-style-focus-ring-border-radius-d43v8n, var(--border-radius-control-circular-focus-ring-yjhscw, 4px));
172
+ border-end-end-radius: var(--awsui-style-focus-ring-border-radius-d43v8n, var(--border-radius-control-circular-focus-ring-yjhscw, 4px));
173
+ box-shadow: var(--awsui-style-focus-ring-box-shadow-d43v8n);
174
+ }
175
+
176
+ .awsui_styled-circle-border_1v1hk_11np0_176:not(#\9) {
177
+ stroke: var(--color-border-control-default-sh3548, #8c8c94);
178
+ fill: var(--color-background-control-default-4jb21l, #ffffff);
179
+ }
180
+ .awsui_styled-circle-border_1v1hk_11np0_176.awsui_styled-circle-disabled_1v1hk_11np0_180:not(#\9), .awsui_styled-circle-border_1v1hk_11np0_176.awsui_styled-circle-readonly_1v1hk_11np0_180:not(#\9) {
181
+ fill: var(--color-background-control-disabled-1f3718, #dedee3);
182
+ stroke: var(--color-background-control-disabled-1f3718, #dedee3);
183
+ }
184
+
185
+ .awsui_styled-circle-fill_1v1hk_11np0_185:not(#\9) {
186
+ stroke: var(--color-background-control-checked-ka7kc2, #006ce0);
187
+ fill: var(--color-foreground-control-default-eto4wy, #ffffff);
188
+ opacity: 0;
189
+ transition: opacity var(--motion-duration-transition-quick-mcm2y0, 90ms) var(--motion-easing-transition-quick-qxak3i, linear);
190
+ }
191
+ @media (prefers-reduced-motion: reduce) {
192
+ .awsui_styled-circle-fill_1v1hk_11np0_185:not(#\9) {
193
+ animation: none;
194
+ transition: none;
195
+ }
196
+ }
197
+ .awsui-motion-disabled .awsui_styled-circle-fill_1v1hk_11np0_185:not(#\9), .awsui-mode-entering .awsui_styled-circle-fill_1v1hk_11np0_185:not(#\9) {
198
+ animation: none;
199
+ transition: none;
200
+ }
201
+ .awsui_styled-circle-fill_1v1hk_11np0_185.awsui_styled-circle-checked_1v1hk_11np0_201:not(#\9) {
202
+ opacity: 1;
203
+ }
204
+ .awsui_styled-circle-fill_1v1hk_11np0_185.awsui_styled-circle-disabled_1v1hk_11np0_180:not(#\9) {
205
+ fill: var(--color-foreground-control-disabled-txi6cf, #ffffff);
206
+ stroke: var(--color-background-control-disabled-1f3718, #dedee3);
207
+ }
208
+ .awsui_styled-circle-fill_1v1hk_11np0_185.awsui_styled-circle-readonly_1v1hk_11np0_180:not(#\9) {
209
+ fill: var(--color-foreground-control-read-only-7ydvuj, #656871);
210
+ stroke: var(--color-background-control-disabled-1f3718, #dedee3);
211
+ }
@@ -0,0 +1,13 @@
1
+
2
+ // es-module interop with Babel and Typescript
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ module.exports.default = {
5
+ "radio-control": "awsui_radio-control_1v1hk_11np0_145",
6
+ "outline": "awsui_outline_1v1hk_11np0_153",
7
+ "styled-circle-border": "awsui_styled-circle-border_1v1hk_11np0_176",
8
+ "styled-circle-disabled": "awsui_styled-circle-disabled_1v1hk_11np0_180",
9
+ "styled-circle-readonly": "awsui_styled-circle-readonly_1v1hk_11np0_180",
10
+ "styled-circle-fill": "awsui_styled-circle-fill_1v1hk_11np0_185",
11
+ "styled-circle-checked": "awsui_styled-circle-checked_1v1hk_11np0_201"
12
+ };
13
+
@@ -0,0 +1,6 @@
1
+
2
+ import './styles.scoped.css';
3
+ export default {
4
+ "root": "awsui_root_15oj2_1q93l_5"
5
+ };
6
+
@@ -0,0 +1,7 @@
1
+ /*
2
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ .awsui_root_15oj2_1q93l_5:not(#\9) {
6
+ /*used in test-utils*/
7
+ }
@@ -0,0 +1,7 @@
1
+
2
+ // es-module interop with Babel and Typescript
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ module.exports.default = {
5
+ "root": "awsui_root_15oj2_1q93l_5"
6
+ };
7
+
@@ -1,6 +1,6 @@
1
1
  export var PACKAGE_SOURCE = "components";
2
- export var PACKAGE_VERSION = "3.0.0 (7af314dc)";
3
- export var GIT_SHA = "7af314dc";
2
+ export var PACKAGE_VERSION = "3.0.0 (a79c3a7f)";
3
+ export var GIT_SHA = "a79c3a7f";
4
4
  export var THEME = "open-source-visual-refresh";
5
5
  export var SYSTEM = "console";
6
6
  export var ALWAYS_VISUAL_REFRESH = true;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "PACKAGE_SOURCE": "components",
3
- "PACKAGE_VERSION": "3.0.0 (7af314dc)",
4
- "GIT_SHA": "7af314dc",
3
+ "PACKAGE_VERSION": "3.0.0 (a79c3a7f)",
4
+ "GIT_SHA": "a79c3a7f",
5
5
  "THEME": "open-source-visual-refresh",
6
6
  "SYSTEM": "console",
7
7
  "ALWAYS_VISUAL_REFRESH": true
@@ -1,3 +1,3 @@
1
1
  {
2
- "commit": "7af314dcbb63cb1af9aecf5664c2bf6c389670f4"
2
+ "commit": "a79c3a7fdaf575e7b4fe91341f038e5526da6af3"
3
3
  }
package/package.json CHANGED
@@ -154,7 +154,7 @@
154
154
  "./internal/base-component/index.js",
155
155
  "./internal/base-component/styles.css.js"
156
156
  ],
157
- "version": "3.0.1130",
157
+ "version": "3.0.1132",
158
158
  "repository": {
159
159
  "type": "git",
160
160
  "url": "https://github.com/cloudscape-design/components.git"
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  import { RadioGroupProps } from './interfaces';
3
3
  export { RadioGroupProps };
4
- declare const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<RadioGroupProps.Ref>>;
4
+ declare const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<import("../internal/components/radio-button/interfaces").RadioButtonProps.Ref>>;
5
5
  export default RadioGroup;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/radio-group/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAK/C,OAAO,EAAE,eAAe,EAAE,CAAC;AAE3B,QAAA,MAAM,UAAU,6FAmBd,CAAC;AAGH,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/radio-group/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAK/C,OAAO,EAAE,eAAe,EAAE,CAAC;AAE3B,QAAA,MAAM,UAAU,uJAmBd,CAAC;AAGH,eAAe,UAAU,CAAC"}
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
1
  import { BaseComponentProps } from '../internal/base-component';
2
+ import { RadioButtonProps } from '../internal/components/radio-button/interfaces';
3
3
  import { FormFieldControlProps } from '../internal/context/form-field-context';
4
4
  import { NonCancelableEventHandler } from '../internal/events';
5
5
  export interface RadioGroupProps extends BaseComponentProps, FormFieldControlProps {
@@ -66,53 +66,6 @@ export declare namespace RadioGroupProps {
66
66
  interface ChangeDetail {
67
67
  value: string;
68
68
  }
69
- interface Ref {
70
- /**
71
- * Sets input focus onto the UI control.
72
- */
73
- focus(): void;
74
- }
75
- interface Style {
76
- input?: {
77
- fill?: {
78
- checked?: string;
79
- default?: string;
80
- disabled?: string;
81
- readOnly?: string;
82
- };
83
- stroke?: {
84
- default?: string;
85
- disabled?: string;
86
- readOnly?: string;
87
- };
88
- circle?: {
89
- fill?: {
90
- checked?: string;
91
- disabled?: string;
92
- readOnly?: string;
93
- };
94
- };
95
- focusRing?: {
96
- borderColor?: string;
97
- borderRadius?: string;
98
- borderWidth?: string;
99
- };
100
- };
101
- label?: {
102
- color?: {
103
- checked?: string;
104
- default?: string;
105
- disabled?: string;
106
- readOnly?: string;
107
- };
108
- };
109
- description?: {
110
- color?: {
111
- checked?: string;
112
- default?: string;
113
- disabled?: string;
114
- readOnly?: string;
115
- };
116
- };
117
- }
69
+ type Ref = RadioButtonProps.Ref;
70
+ type Style = RadioButtonProps.Style;
118
71
  }
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/radio-group/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAC/E,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,MAAM,WAAW,eAAgB,SAAQ,kBAAkB,EAAE,qBAAqB;IAChF;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAErB;;;;;;;;;OASG;IACH,KAAK,CAAC,EAAE,aAAa,CAAC,eAAe,CAAC,qBAAqB,CAAC,CAAC;IAE7D;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,QAAQ,CAAC,EA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QAAQ,CAAC,EAAE,yBAAyB,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;IAEnE;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,KAAK,CAAC,EAAE,eAAe,CAAC,KAAK,CAAC;CAC/B;AAED,yBAAiB,eAAe,CAAC;IAC/B,UAAiB,qBAAqB;QACpC,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;QACvB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;QAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB;IAED,UAAiB,YAAY;QAC3B,KAAK,EAAE,MAAM,CAAC;KACf;IAED,KAAY,GAAG,GAAG,gBAAgB,CAAC,GAAG,CAAC;IAEvC,KAAY,KAAK,GAAG,gBAAgB,CAAC,KAAK,CAAC;CAC5C"}
@@ -1,2 +1,4 @@
1
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ // SPDX-License-Identifier: Apache-2.0
1
3
  export {};
2
4
  //# sourceMappingURL=interfaces.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/radio-group/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { BaseComponentProps } from '../internal/base-component';\nimport { FormFieldControlProps } from '../internal/context/form-field-context';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport interface RadioGroupProps extends BaseComponentProps, FormFieldControlProps {\n /**\n * Specify a custom name for the radio buttons. If not provided, the radio group generates a random name.\n */\n name?: string;\n\n /**\n * Sets the value of the selected radio button.\n * If you want to clear the selection, use `null`.\n */\n value: string | null;\n\n /**\n * Specifies an array of radio buttons to display. Each of these objects have the following properties:\n *\n * - `value` (string) - Sets the value of the radio button. Assigned to the radio group when a user selects the radio button.\n * - `label` (ReactNode) - Specifies a label for the radio button.\n * - `description` (ReactNode) - (Optional) Specifies descriptive text that appears below the label.\n * - `disabled` (boolean) - (Optional) Determines whether the radio button is disabled, which prevents the user from selecting it.\n * - `controlId` (string) - (Optional) Sets the ID of the internal input. You can use it to relate a label element's `for` attribute to this control.\n * In general it's not recommended to set this because the ID is automatically set by the radio group component.\n */\n items?: ReadonlyArray<RadioGroupProps.RadioButtonDefinition>;\n\n /**\n * Adds `aria-label` to the group. If you are using this form element within a form field,\n * don't set this property because the form field component automatically sets the correct labels to make the component accessible.\n */\n ariaLabel?: string;\n\n /**\n * Adds `aria-required` to the group.\n */\n ariaRequired?: boolean;\n\n /**\n * Adds `aria-controls` attribute to the radio group.\n * If the radio group controls any secondary content (for example, another form field), use this to provide an ID referring to the secondary content.\n */\n ariaControls?: string;\n\n /**\n * Called when the user selects a different radio button. The event `detail` contains the current `value`.\n */\n onChange?: NonCancelableEventHandler<RadioGroupProps.ChangeDetail>;\n\n /**\n * @deprecated Has no effect.\n */\n controlId?: string;\n\n /**\n * Specifies if the whole group is read-only, which prevents the\n * user from modifying the value, but does not prevent the value from\n * being included in a form submission. A read-only control is still focusable.\n */\n readOnly?: boolean;\n\n /**\n * @awsuiSystem core\n */\n style?: RadioGroupProps.Style;\n}\n\nexport namespace RadioGroupProps {\n export interface RadioButtonDefinition {\n value: string;\n label: React.ReactNode;\n description?: React.ReactNode;\n disabled?: boolean;\n controlId?: string;\n }\n\n export interface ChangeDetail {\n value: string;\n }\n\n export interface Ref {\n /**\n * Sets input focus onto the UI control.\n */\n focus(): void;\n }\n\n export interface Style {\n input?: {\n fill?: {\n checked?: string;\n default?: string;\n disabled?: string;\n readOnly?: string;\n };\n stroke?: {\n default?: string;\n disabled?: string;\n readOnly?: string;\n };\n circle?: {\n fill?: {\n checked?: string;\n disabled?: string;\n readOnly?: string;\n };\n };\n focusRing?: {\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n };\n };\n label?: {\n color?: {\n checked?: string;\n default?: string;\n disabled?: string;\n readOnly?: string;\n };\n };\n description?: {\n color?: {\n checked?: string;\n default?: string;\n disabled?: string;\n readOnly?: string;\n };\n };\n }\n}\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/radio-group/interfaces.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { BaseComponentProps } from '../internal/base-component';\nimport { RadioButtonProps } from '../internal/components/radio-button/interfaces';\nimport { FormFieldControlProps } from '../internal/context/form-field-context';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport interface RadioGroupProps extends BaseComponentProps, FormFieldControlProps {\n /**\n * Specify a custom name for the radio buttons. If not provided, the radio group generates a random name.\n */\n name?: string;\n\n /**\n * Sets the value of the selected radio button.\n * If you want to clear the selection, use `null`.\n */\n value: string | null;\n\n /**\n * Specifies an array of radio buttons to display. Each of these objects have the following properties:\n *\n * - `value` (string) - Sets the value of the radio button. Assigned to the radio group when a user selects the radio button.\n * - `label` (ReactNode) - Specifies a label for the radio button.\n * - `description` (ReactNode) - (Optional) Specifies descriptive text that appears below the label.\n * - `disabled` (boolean) - (Optional) Determines whether the radio button is disabled, which prevents the user from selecting it.\n * - `controlId` (string) - (Optional) Sets the ID of the internal input. You can use it to relate a label element's `for` attribute to this control.\n * In general it's not recommended to set this because the ID is automatically set by the radio group component.\n */\n items?: ReadonlyArray<RadioGroupProps.RadioButtonDefinition>;\n\n /**\n * Adds `aria-label` to the group. If you are using this form element within a form field,\n * don't set this property because the form field component automatically sets the correct labels to make the component accessible.\n */\n ariaLabel?: string;\n\n /**\n * Adds `aria-required` to the group.\n */\n ariaRequired?: boolean;\n\n /**\n * Adds `aria-controls` attribute to the radio group.\n * If the radio group controls any secondary content (for example, another form field), use this to provide an ID referring to the secondary content.\n */\n ariaControls?: string;\n\n /**\n * Called when the user selects a different radio button. The event `detail` contains the current `value`.\n */\n onChange?: NonCancelableEventHandler<RadioGroupProps.ChangeDetail>;\n\n /**\n * @deprecated Has no effect.\n */\n controlId?: string;\n\n /**\n * Specifies if the whole group is read-only, which prevents the\n * user from modifying the value, but does not prevent the value from\n * being included in a form submission. A read-only control is still focusable.\n */\n readOnly?: boolean;\n\n /**\n * @awsuiSystem core\n */\n style?: RadioGroupProps.Style;\n}\n\nexport namespace RadioGroupProps {\n export interface RadioButtonDefinition {\n value: string;\n label: React.ReactNode;\n description?: React.ReactNode;\n disabled?: boolean;\n controlId?: string;\n }\n\n export interface ChangeDetail {\n value: string;\n }\n\n export type Ref = RadioButtonProps.Ref;\n\n export type Style = RadioButtonProps.Style;\n}\n"]}