carbon-react 111.12.4 → 111.12.5

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 (35) hide show
  1. package/esm/__internal__/radio-button-mapper/index.d.ts +2 -2
  2. package/esm/__internal__/radio-button-mapper/radio-button-mapper.component.d.ts +29 -0
  3. package/esm/__internal__/radio-button-mapper/radio-button-mapper.component.js +20 -26
  4. package/esm/components/checkbox/checkbox.style.d.ts +1 -1
  5. package/esm/components/radio-button/index.d.ts +4 -6
  6. package/esm/components/radio-button/index.js +2 -2
  7. package/esm/components/radio-button/radio-button-group.component.d.ts +42 -0
  8. package/esm/components/radio-button/radio-button-group.component.js +181 -67
  9. package/esm/components/radio-button/radio-button-group.style.d.ts +5 -0
  10. package/esm/components/radio-button/radio-button-svg.component.d.ts +3 -0
  11. package/esm/components/radio-button/radio-button-svg.component.js +1 -0
  12. package/esm/components/radio-button/radio-button.component.d.ts +28 -0
  13. package/esm/components/radio-button/radio-button.component.js +529 -107
  14. package/esm/components/radio-button/radio-button.style.d.ts +5 -0
  15. package/lib/__internal__/radio-button-mapper/index.d.ts +2 -2
  16. package/lib/__internal__/radio-button-mapper/radio-button-mapper.component.d.ts +29 -0
  17. package/lib/__internal__/radio-button-mapper/radio-button-mapper.component.js +20 -26
  18. package/lib/components/checkbox/checkbox.style.d.ts +1 -1
  19. package/lib/components/radio-button/index.d.ts +4 -6
  20. package/lib/components/radio-button/index.js +1 -11
  21. package/lib/components/radio-button/radio-button-group.component.d.ts +42 -0
  22. package/lib/components/radio-button/radio-button-group.component.js +182 -70
  23. package/lib/components/radio-button/radio-button-group.style.d.ts +5 -0
  24. package/lib/components/radio-button/radio-button-svg.component.d.ts +3 -0
  25. package/lib/components/radio-button/radio-button-svg.component.js +2 -0
  26. package/lib/components/radio-button/radio-button.component.d.ts +28 -0
  27. package/lib/components/radio-button/radio-button.component.js +530 -109
  28. package/lib/components/radio-button/radio-button.style.d.ts +5 -0
  29. package/package.json +1 -1
  30. package/esm/__internal__/radio-button-mapper/radio-button-mapper.d.ts +0 -20
  31. package/esm/components/radio-button/radio-button-group.d.ts +0 -42
  32. package/esm/components/radio-button/radio-button.d.ts +0 -30
  33. package/lib/__internal__/radio-button-mapper/radio-button-mapper.d.ts +0 -20
  34. package/lib/components/radio-button/radio-button-group.d.ts +0 -42
  35. package/lib/components/radio-button/radio-button.d.ts +0 -30
@@ -0,0 +1,5 @@
1
+ import { RadioButtonProps } from "./radio-button.component";
2
+ declare const RadioButtonStyle: import("styled-components").StyledComponent<"div", any, import("../checkbox/checkbox.style").StyledCheckboxProps & Pick<RadioButtonProps, "disabled" | "size" | "reverse" | "fieldHelpInline"> & {
3
+ inline?: boolean | undefined;
4
+ }, never>;
5
+ export default RadioButtonStyle;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-react",
3
- "version": "111.12.4",
3
+ "version": "111.12.5",
4
4
  "description": "A library of reusable React components for easily building user interfaces.",
5
5
  "files": [
6
6
  "lib",
@@ -1,20 +0,0 @@
1
- import React from "react";
2
-
3
- export interface RadioButtonMapperProps {
4
- /** The RadioButton objects to be rendered in the group */
5
- children?: React.ReactNode;
6
- /** Specifies the name prop to be applied to each button in the group */
7
- name: string;
8
- /** Callback fired when each RadioButton is blurred */
9
- onBlur?: (ev: React.FocusEvent<HTMLInputElement>) => void;
10
- /** Callback fired when the user selects a RadioButton */
11
- onChange?: (ev: React.ChangeEvent<HTMLInputElement>) => void;
12
- /** Callback fired on key down */
13
- onKeyDown?: (ev: React.KeyboardEvent<HTMLInputElement>) => void;
14
- /** Value of the selected RadioButton */
15
- value?: string;
16
- }
17
-
18
- declare function RadioButtonMapper(props?: RadioButtonMapperProps): JSX.Element;
19
-
20
- export default RadioButtonMapper;
@@ -1,42 +0,0 @@
1
- import * as React from "react";
2
- import { MarginProps } from "styled-system";
3
- import { ValidationProps } from "../../__internal__/validations";
4
-
5
- export interface RadioButtonGroupProps extends ValidationProps, MarginProps {
6
- /** Breakpoint for adaptive legend (inline labels change to top aligned). Enables the adaptive behaviour when set */
7
- adaptiveLegendBreakpoint?: number;
8
- /** Breakpoint for adaptive spacing (left margin changes to 0). Enables the adaptive behaviour when set */
9
- adaptiveSpacingBreakpoint?: number;
10
- /** The RadioButton objects to be rendered in the group */
11
- children: React.ReactNode;
12
- /** When true, RadioButtons are in line */
13
- inline?: boolean;
14
- /** Spacing between labels and radio buttons, given number will be multiplied by base spacing unit (8) */
15
- labelSpacing?: 1 | 2;
16
- /** The content for the RadioGroup Legend */
17
- legend?: string;
18
- /** Text alignment of legend when inline */
19
- legendAlign?: "left" | "right";
20
- /** When true, legend is placed in line with the radiobuttons */
21
- legendInline?: boolean;
22
- /** Spacing between legend and field for inline legend, number multiplied by base spacing unit (8) */
23
- legendSpacing?: 1 | 2;
24
- /** Percentage width of legend (only when legend is inline) */
25
- legendWidth?: number;
26
- /** Specifies the name prop to be applied to each button in the group */
27
- name: string;
28
- /** Callback fired when each RadioButton is blurred */
29
- onBlur?: (ev: React.FocusEvent<HTMLInputElement>) => void;
30
- /** Callback fired when the user selects a RadioButton */
31
- onChange?: (ev: React.ChangeEvent<HTMLInputElement>) => void;
32
- /** Flag to configure component as mandatory */
33
- required?: boolean;
34
- /** value of the selected RadioButton */
35
- value?: string;
36
- /** Overrides the default tooltip position */
37
- tooltipPosition?: "top" | "bottom" | "left" | "right";
38
- }
39
-
40
- declare function RadioButtonGroup(props: RadioButtonGroupProps): JSX.Element;
41
-
42
- export default RadioButtonGroup;
@@ -1,30 +0,0 @@
1
- import { MarginProps } from "styled-system";
2
- import { CommonCheckableInputProps } from "../../__internal__/checkable-input";
3
-
4
- export interface RadioButtonProps
5
- extends CommonCheckableInputProps,
6
- MarginProps {
7
- /** Identifier used for testing purposes, applied to the root element of the component. */
8
- "data-component"?: string;
9
- /** Identifier used for testing purposes, applied to the root element of the component. */
10
- "data-element"?: string;
11
- /** Identifier used for testing purposes, applied to the root element of the component. */
12
- "data-role"?: string;
13
- /** When true, sets the component in line (for RadioButtonGroup) */
14
- inline?: boolean;
15
- /** Text alignment of the label */
16
- labelAlign?: "left" | "right";
17
- /** the value of the Radio Button, passed on form submit */
18
- value: string;
19
- /** Overrides the default tooltip position */
20
- tooltipPosition?: "top" | "bottom" | "left" | "right";
21
- /** Aria label for rendered help component */
22
- helpAriaLabel?: string;
23
- }
24
-
25
- declare function RadioButton(
26
- props: RadioButtonProps & React.RefAttributes<HTMLInputElement>
27
- ): JSX.Element;
28
-
29
- export { RadioButton as PrivateRadioButton };
30
- export default RadioButton;
@@ -1,20 +0,0 @@
1
- import React from "react";
2
-
3
- export interface RadioButtonMapperProps {
4
- /** The RadioButton objects to be rendered in the group */
5
- children?: React.ReactNode;
6
- /** Specifies the name prop to be applied to each button in the group */
7
- name: string;
8
- /** Callback fired when each RadioButton is blurred */
9
- onBlur?: (ev: React.FocusEvent<HTMLInputElement>) => void;
10
- /** Callback fired when the user selects a RadioButton */
11
- onChange?: (ev: React.ChangeEvent<HTMLInputElement>) => void;
12
- /** Callback fired on key down */
13
- onKeyDown?: (ev: React.KeyboardEvent<HTMLInputElement>) => void;
14
- /** Value of the selected RadioButton */
15
- value?: string;
16
- }
17
-
18
- declare function RadioButtonMapper(props?: RadioButtonMapperProps): JSX.Element;
19
-
20
- export default RadioButtonMapper;
@@ -1,42 +0,0 @@
1
- import * as React from "react";
2
- import { MarginProps } from "styled-system";
3
- import { ValidationProps } from "../../__internal__/validations";
4
-
5
- export interface RadioButtonGroupProps extends ValidationProps, MarginProps {
6
- /** Breakpoint for adaptive legend (inline labels change to top aligned). Enables the adaptive behaviour when set */
7
- adaptiveLegendBreakpoint?: number;
8
- /** Breakpoint for adaptive spacing (left margin changes to 0). Enables the adaptive behaviour when set */
9
- adaptiveSpacingBreakpoint?: number;
10
- /** The RadioButton objects to be rendered in the group */
11
- children: React.ReactNode;
12
- /** When true, RadioButtons are in line */
13
- inline?: boolean;
14
- /** Spacing between labels and radio buttons, given number will be multiplied by base spacing unit (8) */
15
- labelSpacing?: 1 | 2;
16
- /** The content for the RadioGroup Legend */
17
- legend?: string;
18
- /** Text alignment of legend when inline */
19
- legendAlign?: "left" | "right";
20
- /** When true, legend is placed in line with the radiobuttons */
21
- legendInline?: boolean;
22
- /** Spacing between legend and field for inline legend, number multiplied by base spacing unit (8) */
23
- legendSpacing?: 1 | 2;
24
- /** Percentage width of legend (only when legend is inline) */
25
- legendWidth?: number;
26
- /** Specifies the name prop to be applied to each button in the group */
27
- name: string;
28
- /** Callback fired when each RadioButton is blurred */
29
- onBlur?: (ev: React.FocusEvent<HTMLInputElement>) => void;
30
- /** Callback fired when the user selects a RadioButton */
31
- onChange?: (ev: React.ChangeEvent<HTMLInputElement>) => void;
32
- /** Flag to configure component as mandatory */
33
- required?: boolean;
34
- /** value of the selected RadioButton */
35
- value?: string;
36
- /** Overrides the default tooltip position */
37
- tooltipPosition?: "top" | "bottom" | "left" | "right";
38
- }
39
-
40
- declare function RadioButtonGroup(props: RadioButtonGroupProps): JSX.Element;
41
-
42
- export default RadioButtonGroup;
@@ -1,30 +0,0 @@
1
- import { MarginProps } from "styled-system";
2
- import { CommonCheckableInputProps } from "../../__internal__/checkable-input";
3
-
4
- export interface RadioButtonProps
5
- extends CommonCheckableInputProps,
6
- MarginProps {
7
- /** Identifier used for testing purposes, applied to the root element of the component. */
8
- "data-component"?: string;
9
- /** Identifier used for testing purposes, applied to the root element of the component. */
10
- "data-element"?: string;
11
- /** Identifier used for testing purposes, applied to the root element of the component. */
12
- "data-role"?: string;
13
- /** When true, sets the component in line (for RadioButtonGroup) */
14
- inline?: boolean;
15
- /** Text alignment of the label */
16
- labelAlign?: "left" | "right";
17
- /** the value of the Radio Button, passed on form submit */
18
- value: string;
19
- /** Overrides the default tooltip position */
20
- tooltipPosition?: "top" | "bottom" | "left" | "right";
21
- /** Aria label for rendered help component */
22
- helpAriaLabel?: string;
23
- }
24
-
25
- declare function RadioButton(
26
- props: RadioButtonProps & React.RefAttributes<HTMLInputElement>
27
- ): JSX.Element;
28
-
29
- export { RadioButton as PrivateRadioButton };
30
- export default RadioButton;