carbon-react 158.37.0 → 158.38.0
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/esm/__internal__/checkable-input/__next__/checkable-input.component.d.ts +38 -0
- package/esm/__internal__/checkable-input/__next__/checkable-input.component.js +1 -0
- package/esm/__internal__/checkable-input/__next__/checkable-input.style.d.ts +17 -0
- package/esm/__internal__/checkable-input/__next__/checkable-input.style.js +1 -0
- package/esm/__internal__/checkable-input/hidden-checkable-input.style.d.ts +3 -1
- package/esm/__internal__/checkable-input/hidden-checkable-input.style.js +1 -1
- package/esm/__internal__/label/label.style.js +1 -1
- package/esm/components/radio-button/___internal___/radio-button-group.context.d.ts +15 -0
- package/esm/components/radio-button/___internal___/radio-button-group.context.js +1 -0
- package/esm/components/radio-button/___internal___/radio-button-svg.component.js +1 -0
- package/esm/components/radio-button/index.js +1 -1
- package/esm/components/radio-button/radio-button-group/radio-button-group.component.d.ts +72 -30
- package/esm/components/radio-button/radio-button-group/radio-button-group.component.js +1 -1
- package/esm/components/radio-button/radio-button-group/radio-button-group.style.d.ts +4 -4
- package/esm/components/radio-button/radio-button-group/radio-button-group.style.js +1 -1
- package/esm/components/radio-button/radio-button.component.d.ts +80 -13
- package/esm/components/radio-button/radio-button.component.js +1 -1
- package/esm/components/radio-button/radio-button.style.d.ts +6 -4
- package/esm/components/radio-button/radio-button.style.js +1 -1
- package/esm/index.js +1 -1
- package/lib/__internal__/checkable-input/__next__/checkable-input.component.d.ts +38 -0
- package/lib/__internal__/checkable-input/__next__/checkable-input.component.js +1 -0
- package/lib/__internal__/checkable-input/__next__/checkable-input.style.d.ts +17 -0
- package/lib/__internal__/checkable-input/__next__/checkable-input.style.js +1 -0
- package/lib/__internal__/checkable-input/hidden-checkable-input.style.d.ts +3 -1
- package/lib/__internal__/checkable-input/hidden-checkable-input.style.js +1 -1
- package/lib/__internal__/label/label.style.js +1 -1
- package/lib/components/radio-button/___internal___/radio-button-group.context.d.ts +15 -0
- package/lib/components/radio-button/___internal___/radio-button-group.context.js +1 -0
- package/lib/components/radio-button/___internal___/radio-button-svg.component.js +1 -0
- package/lib/components/radio-button/index.js +1 -1
- package/lib/components/radio-button/radio-button-group/radio-button-group.component.d.ts +72 -30
- package/lib/components/radio-button/radio-button-group/radio-button-group.component.js +1 -1
- package/lib/components/radio-button/radio-button-group/radio-button-group.style.d.ts +4 -4
- package/lib/components/radio-button/radio-button-group/radio-button-group.style.js +1 -1
- package/lib/components/radio-button/radio-button.component.d.ts +80 -13
- package/lib/components/radio-button/radio-button.component.js +1 -1
- package/lib/components/radio-button/radio-button.style.d.ts +6 -4
- package/lib/components/radio-button/radio-button.style.js +1 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
- package/esm/components/radio-button/radio-button-svg.component.js +0 -1
- package/lib/components/radio-button/radio-button-svg.component.js +0 -1
- /package/esm/components/radio-button/{radio-button-svg.component.d.ts → ___internal___/radio-button-svg.component.d.ts} +0 -0
- /package/lib/components/radio-button/{radio-button-svg.component.d.ts → ___internal___/radio-button-svg.component.d.ts} +0 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checkable Input Component
|
|
3
|
+
*
|
|
4
|
+
* @description Base component for Checkbox and RadioButton components.
|
|
5
|
+
* Do not add props that are specific to either Checkbox or RadioButton.
|
|
6
|
+
* Do not add props to the common interface that are not intended to be in the public interface of both components.
|
|
7
|
+
* Styles of any children should be handled in their respective component files.
|
|
8
|
+
*/
|
|
9
|
+
import React from "react";
|
|
10
|
+
import { CommonHiddenCheckableInputProps } from "../hidden-checkable-input.component";
|
|
11
|
+
export interface CommonCheckableInputProps extends Omit<CommonHiddenCheckableInputProps, "validationIconId"> {
|
|
12
|
+
/** Unique identifier for the input. Will use a randomly generated GUID if none is provided. */
|
|
13
|
+
id?: string;
|
|
14
|
+
/** Content of the label. */
|
|
15
|
+
label?: React.ReactNode;
|
|
16
|
+
/** Additional hint text rendered below the label. */
|
|
17
|
+
inputHint?: React.ReactNode;
|
|
18
|
+
/** If true, the component will be disabled. */
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
/** Content to be rendered below the input when checked, is not supported when inputs are inline. */
|
|
21
|
+
progressiveDisclosure?: React.ReactNode;
|
|
22
|
+
}
|
|
23
|
+
export interface CheckableInputProps extends CommonCheckableInputProps {
|
|
24
|
+
/** Element to be rendered as the visible input. */
|
|
25
|
+
children?: React.ReactNode;
|
|
26
|
+
/** HTML type attribute of the input. */
|
|
27
|
+
type: string;
|
|
28
|
+
/** Value passed to the input. */
|
|
29
|
+
value?: string;
|
|
30
|
+
/** Size of the component. */
|
|
31
|
+
size?: "small" | "medium" | "large";
|
|
32
|
+
/** Set error state - passed to Tabs context */
|
|
33
|
+
error?: boolean;
|
|
34
|
+
/** Set warning state - passed to Tabs context */
|
|
35
|
+
warning?: boolean;
|
|
36
|
+
}
|
|
37
|
+
declare const CheckableInput: React.ForwardRefExoticComponent<CheckableInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
38
|
+
export default CheckableInput;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsxs as e,Fragment as r,jsx as t}from"react/jsx-runtime";import n,{useRef as i,useContext as o,useLayoutEffect as c,useEffect as l}from"react";import{StyledCheckableInput as s,StyledCheckableInputWrapper as a,StyledAccordion as d,StyledLineContainer as u,StyledAccordionLine as m,StyledAccordionContent as p}from"./checkable-input.style.js";import f from"../hidden-checkable-input.component.js";import b from"../../utils/helpers/guid/index.js";import h from"../../label/label.component.js";import{HintText as g}from"../../hint-text/hint-text.component.js";import y from"../../../hooks/useMediaQuery/useMediaQuery.js";import{TabsContext as j}from"../../../components/tabs/__next__/tabs.context.js";import{TabContext as O}from"../../../components/tabs/__next__/tab.context.js";function v(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function x(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),n.forEach((function(r){v(e,r,t[r])}))}return e}const w=n.forwardRef(((n,v)=>{var{children:w,disabled:k,id:_,name:$,type:P,value:z,label:D,inputHint:S,checked:H,progressiveDisclosure:E,size:I="medium",error:B,warning:L}=n,M=function(e,r){if(null==e)return{};var t,n,i=function(e,r){if(null==e)return{};var t,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)t=o[n],r.indexOf(t)>=0||(i[t]=e[t]);return i}(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)t=o[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(n,["children","disabled","id","name","type","value","label","inputHint","checked","progressiveDisclosure","size","error","warning"]);const{current:Q}=i(_||b()),A=S?`${Q}-hint`:void 0,C=i(null),F=y("screen and (prefers-reduced-motion: no-preference)"),{scrollHeight:N}=C.current||{},R=H&&N?String(N):"0",{setErrors:W,setWarnings:q}=o(j),{tabId:G}=o(O),J=i(!1);return c((()=>(J.current=!0,()=>{J.current=!1})),[]),l((()=>(W&&W(Q,G||"",!!B),q&&q(Q,G||"",!!L),()=>{J.current||(W&&W(Q,G||"",!1),q&&q(Q,G||"",!1))})),[Q,W,q,B,L,G]),e(r,{children:[e(s,{$size:I,children:[e(a,{children:[t(f,x({id:Q,type:P,name:$,value:z,disabled:k,checked:H,ref:v,ariaDescribedBy:A},M)),w]}),D&&t(h,{htmlFor:Q,disabled:k,isLarge:"large"===I,children:D}),S&&t(g,{id:A,marginBottom:"0",isDisabled:k,isLarge:"large"===I,children:S})]}),E&&e(d,{"data-role":"progressive-disclosure-accordion",ref:C,$expanded:H,$contentHeight:R,$allowAnimation:F,children:[t(u,{$size:I,children:t(m,{$size:I})}),t(p,{children:E})]})]})}));w.displayName="CheckableInput";export{w as default};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const StyledCheckableInput: import("styled-components").StyledComponent<"div", any, {
|
|
2
|
+
$size: "small" | "medium" | "large";
|
|
3
|
+
}, never>;
|
|
4
|
+
export declare const StyledCheckableInputWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
|
+
interface StyledAccordionProps {
|
|
6
|
+
$expanded?: boolean;
|
|
7
|
+
$contentHeight?: string | number;
|
|
8
|
+
$allowAnimation?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const StyledAccordion: import("styled-components").StyledComponent<"div", any, StyledAccordionProps, never>;
|
|
11
|
+
interface StyledAccordionContentProps {
|
|
12
|
+
$size: "small" | "medium" | "large";
|
|
13
|
+
}
|
|
14
|
+
export declare const StyledLineContainer: import("styled-components").StyledComponent<"div", any, StyledAccordionContentProps, never>;
|
|
15
|
+
export declare const StyledAccordionLine: import("styled-components").StyledComponent<"div", any, StyledAccordionContentProps, never>;
|
|
16
|
+
export declare const StyledAccordionContent: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import i,{css as e}from"styled-components";import t,{StyledLabelContainer as a}from"../../label/label.style.js";import l from"../../hint-text/hint-text.style.js";const o={small:"var(--global-font-static-comp-regular-s)",medium:"var(--global-font-static-comp-regular-m)",large:"var(--global-font-static-comp-regular-l)"},n=i.div.withConfig({displayName:"checkable-input.style__StyledCheckableInput",componentId:"sc-8b8f7038-0"})(["display:grid;grid-template-columns:auto 1fr;grid-column-gap:var(--global-space-comp-s);","{padding:0;margin:0;}","{","}","{grid-area:2 / 2;}"],a,t,(({$size:i})=>i&&e(["font:",";"],o[i])),l),s=i.div.withConfig({displayName:"checkable-input.style__StyledCheckableInputWrapper",componentId:"sc-8b8f7038-1"})(["display:flex;align-items:center;min-height:var(--global-size-xs);"]),p=i.div.withConfig({displayName:"checkable-input.style__StyledAccordion",componentId:"sc-8b8f7038-2"})(["overflow-y:hidden;visibility:hidden;max-height:0;position:relative;display:grid;grid-template-columns:auto 1fr;grid-column-gap:var(--global-space-comp-s);"," ",""],(({$allowAnimation:i})=>i&&e(["transition:all 0.4s;"])),(({$expanded:i,$contentHeight:t})=>e(["",""],i&&e(["visibility:visible;max-height:","px;"],t)))),c={small:{top:"var(--global-space-comp-xs)",width:"var(--global-size-3-xs)"},medium:{top:"var(--global-space-comp-s)",width:"var(--global-size-xs)"},large:{top:"var(--global-space-comp-m)",width:"var(--global-size-s)"}},d="var(--global-space-comp-m)",r=i.div.withConfig({displayName:"checkable-input.style__StyledLineContainer",componentId:"sc-8b8f7038-3"})(["display:flex;justify-content:center;",""],(({$size:i})=>i&&e(["width:",";"],c[i].width))),m=i.div.withConfig({displayName:"checkable-input.style__StyledAccordionLine",componentId:"sc-8b8f7038-4"})(["position:absolute;width:2px;background-color:var(--input-typical-border-alt);border-radius:2px;",""],(({$size:i})=>i&&e(["top:",";height:calc( 100% - ("," + ",") );"],c[i].top,c[i].top,d))),g=i.div.withConfig({displayName:"checkable-input.style__StyledAccordionContent",componentId:"sc-8b8f7038-5"})(["padding:"," 0;"],d);export{p as StyledAccordion,g as StyledAccordionContent,m as StyledAccordionLine,n as StyledCheckableInput,s as StyledCheckableInputWrapper,r as StyledLineContainer};
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
declare const HiddenCheckableInputStyle: import("styled-components").StyledComponent<"input", any, {
|
|
1
|
+
declare const HiddenCheckableInputStyle: import("styled-components").StyledComponent<"input", any, {
|
|
2
|
+
disabled?: boolean;
|
|
3
|
+
}, never>;
|
|
2
4
|
export default HiddenCheckableInputStyle;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"styled-components";const
|
|
1
|
+
import e,{css as t}from"styled-components";const o=e.input.withConfig({displayName:"hidden-checkable-input.style__HiddenCheckableInputStyle",componentId:"sc-490a5f06-0"})(["cursor:pointer;opacity:0;margin:0;position:relative;z-index:2;",""],(({disabled:e})=>e&&t(["cursor:not-allowed;"])));export{o as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import i,{css as t}from"styled-components";const e=i.label.withConfig({displayName:"label.style__StyledLabel",componentId:"sc-
|
|
1
|
+
import i,{css as t}from"styled-components";const e=i.label.withConfig({displayName:"label.style__StyledLabel",componentId:"sc-16363be4-0"})([""," display:block;font-weight:var(--fontWeights500);&:hover{cursor:pointer;}"," "," ",""],(({isDarkBackground:i})=>t(["color:",";"],i?"var(--colorsUtilityYang100)":"var(--colorsUtilityYin090)")),(({isLarge:i})=>i&&t(["font-size:var(--fontSizes200);"])),(({isRequired:i})=>i&&t(['::after{content:"*";color:var(--colorsSemanticNegative500);font-weight:var(--fontWeights500);margin-left:var(--spacing050);}'])),(({disabled:i})=>i&&t(["color:var(--colorsUtilityYin030);&:hover{cursor:not-allowed;}"]))),o=i.div.withConfig({displayName:"label.style__StyledLabelContainer",componentId:"sc-16363be4-1"})(["display:flex;align-items:center;margin-bottom:8px;"," ",""],(({align:i})=>t(["justify-content:",";"],"right"!==i?"flex-start":"flex-end")),(({inline:i,pr:e,pl:o,width:a})=>i&&t(["box-sizing:border-box;margin-bottom:0;",";",";width:","%;"],e&&t(["padding-right:var(",");"],1===e?"--spacing100":"--spacing200"),o&&t(["padding-left:var(",");"],1===o?"--spacing100":"--spacing200"),a)));export{o as StyledLabelContainer,e as default};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface RadioButtonGroupContextType {
|
|
3
|
+
inline?: boolean;
|
|
4
|
+
error?: boolean;
|
|
5
|
+
warning?: boolean;
|
|
6
|
+
name?: string;
|
|
7
|
+
onBlur?: (ev: React.FocusEvent<HTMLInputElement>) => void;
|
|
8
|
+
onChange?: (ev: React.ChangeEvent<HTMLInputElement>) => void;
|
|
9
|
+
value?: string;
|
|
10
|
+
size: "small" | "medium" | "large";
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
required?: boolean;
|
|
13
|
+
}
|
|
14
|
+
declare const RadioButtonGroupProvider: React.Provider<RadioButtonGroupContextType | null>, useRadioButtonGroupContext: () => RadioButtonGroupContextType;
|
|
15
|
+
export { RadioButtonGroupProvider, useRadioButtonGroupContext };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"react";import t from"../../../__internal__/utils/createStrictContext/createStrictContext.js";const[e,o]=t({name:"RadioButtonGroupContext",errorMessage:"Carbon RadioButtonGroup: Context not found. Have you wrapped your Carbon subcomponents properly? See stack trace for more details.",defaultValue:{size:"medium"}});export{e as RadioButtonGroupProvider,o as useRadioButtonGroupContext};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import r from"react";import l from"../../../__internal__/checkable-input/checkable-input-svg-wrapper.style.js";const o=()=>e(l,{children:e("svg",{"data-role":"radio-svg",focusable:"false",viewBox:"0 0 15 15",children:e("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:e("circle",{className:"radio-button-check",fill:"#FFFFFF",cx:"7.5",cy:"7.5",r:"4"})})})});var t=r.memo(o,(()=>!0));export{t as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o
|
|
1
|
+
import{RadioButton as o}from"./radio-button.component.js";export{RadioButtonGroup}from"./radio-button-group/radio-button-group.component.js";export{o as RadioButton,o as default};
|
|
@@ -1,55 +1,97 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { MarginProps } from "styled-system";
|
|
3
3
|
import { TagProps } from "../../../__internal__/utils/helpers/tags/tags";
|
|
4
|
-
|
|
5
|
-
export interface RadioButtonGroupProps extends ValidationProps, MarginProps, TagProps {
|
|
4
|
+
export interface RadioButtonGroupProps extends MarginProps, TagProps {
|
|
6
5
|
/**
|
|
7
6
|
* Unique identifier for the component.
|
|
8
7
|
* Will use a randomly generated GUID if none is provided.
|
|
9
8
|
*/
|
|
10
9
|
id?: string;
|
|
11
|
-
/**
|
|
12
|
-
adaptiveLegendBreakpoint?: number;
|
|
13
|
-
/** Breakpoint for adaptive spacing (left margin changes to 0). Enables the adaptive behaviour when set */
|
|
14
|
-
adaptiveSpacingBreakpoint?: number;
|
|
15
|
-
/** The RadioButton objects to be rendered in the group */
|
|
10
|
+
/** The RadioButton objects to be rendered within the group. */
|
|
16
11
|
children: React.ReactNode;
|
|
17
|
-
/** When true,
|
|
12
|
+
/** When true, RadioButton children are inline. */
|
|
18
13
|
inline?: boolean;
|
|
19
|
-
/**
|
|
20
|
-
labelSpacing?: 1 | 2;
|
|
21
|
-
/** The content for the RadioButtonGroup Legend */
|
|
14
|
+
/** The content for the RadioButtonGroup legend. */
|
|
22
15
|
legend?: string;
|
|
16
|
+
/** Content for the hint text below the legend. */
|
|
17
|
+
legendHint?: string;
|
|
18
|
+
/** Alignment of the legend. */
|
|
19
|
+
legendAlign?: "left" | "right";
|
|
20
|
+
/** Specifies the name prop to be applied to each RadioButton in the group. */
|
|
21
|
+
name: string;
|
|
22
|
+
/** Value of the selected RadioButton child. */
|
|
23
|
+
value: string;
|
|
24
|
+
/** Callback fired when a RadioButton child is blurred. */
|
|
25
|
+
onBlur?: (ev: React.FocusEvent<HTMLInputElement>) => void;
|
|
26
|
+
/** Callback fired when a RadioButton child is selected. */
|
|
27
|
+
onChange: (ev: React.ChangeEvent<HTMLInputElement>) => void;
|
|
28
|
+
/** Flag to disable the RadioButtonGroup. */
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
/** Flag to configure RadioButtonGroup as mandatory. */
|
|
31
|
+
required?: boolean;
|
|
32
|
+
/** Size of the RadioButtonGroup. */
|
|
33
|
+
size?: "small" | "medium" | "large";
|
|
34
|
+
/** Error message to be displayed when validation fails. */
|
|
35
|
+
error?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Warning message to be displayed when validation warning occurs.
|
|
38
|
+
* @deprecated The `warning` state is deprecated and will be removed in a future release.
|
|
39
|
+
*/
|
|
40
|
+
warning?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Render the ValidationMessage above the RadioButtonGroup
|
|
43
|
+
* @deprecated The `validationMessagePositionTop` prop is deprecated and will be removed in a future release.
|
|
44
|
+
*/
|
|
45
|
+
validationMessagePositionTop?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Breakpoint for adaptive legend (inline labels change to top aligned). Enables the adaptive behaviour when set
|
|
48
|
+
* @deprecated The adaptive legend behaviour is no longer supported on this component.
|
|
49
|
+
*/
|
|
50
|
+
adaptiveLegendBreakpoint?: number;
|
|
51
|
+
/**
|
|
52
|
+
* Breakpoint for adaptive spacing (left margin changes to 0). Enables the adaptive behaviour when set
|
|
53
|
+
* @deprecated The adaptive spacing behaviour is no longer supported on this component.
|
|
54
|
+
*/
|
|
55
|
+
adaptiveSpacingBreakpoint?: number;
|
|
56
|
+
/**
|
|
57
|
+
* Spacing between labels and radio buttons, given number will be multiplied by base spacing unit (8)
|
|
58
|
+
* @deprecated Custom spacing for labels is no longer supported on this component.
|
|
59
|
+
*/
|
|
60
|
+
labelSpacing?: 1 | 2;
|
|
23
61
|
/**
|
|
24
62
|
* The content for the RadioButtonGroup hint text,
|
|
25
63
|
* will only be rendered when `validationRedesignOptIn` is true.
|
|
64
|
+
* @deprecated The `legendHelp` prop is deprecated and will be removed in a future release. Please use the `legendHint` prop instead.
|
|
26
65
|
*/
|
|
27
66
|
legendHelp?: string;
|
|
28
|
-
/**
|
|
29
|
-
|
|
30
|
-
|
|
67
|
+
/**
|
|
68
|
+
* When true, legend is placed in line with the RadioButtons
|
|
69
|
+
* @deprecated Inline legends are no longer supported on this component.
|
|
70
|
+
*/
|
|
31
71
|
legendInline?: boolean;
|
|
32
|
-
/**
|
|
72
|
+
/**
|
|
73
|
+
* Spacing between legend and field for inline legend, number multiplied by base spacing unit (8)
|
|
74
|
+
* @deprecated Custom spacing for legends is no longer supported on this component.
|
|
75
|
+
*/
|
|
33
76
|
legendSpacing?: 1 | 2;
|
|
34
|
-
/**
|
|
77
|
+
/**
|
|
78
|
+
* Percentage width of legend (only when legend is inline)
|
|
79
|
+
* @deprecated Inline legends are no longer supported on this component.
|
|
80
|
+
*/
|
|
35
81
|
legendWidth?: number;
|
|
36
|
-
/**
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
/** Callback fired when the user selects a RadioButton */
|
|
41
|
-
onChange: (ev: React.ChangeEvent<HTMLInputElement>) => void;
|
|
42
|
-
/** Flag to configure component as mandatory */
|
|
43
|
-
required?: boolean;
|
|
44
|
-
/** value of the selected RadioButton */
|
|
45
|
-
value: string;
|
|
46
|
-
/** [Legacy] Overrides the default tooltip position */
|
|
82
|
+
/**
|
|
83
|
+
* Overrides the default tooltip position
|
|
84
|
+
* @deprecated Tooltips are no longer supported on this component.
|
|
85
|
+
*/
|
|
47
86
|
tooltipPosition?: "top" | "bottom" | "left" | "right";
|
|
48
|
-
/**
|
|
49
|
-
|
|
87
|
+
/**
|
|
88
|
+
* [Legacy] Indicate additional information.
|
|
89
|
+
* @deprecated Information validation is no longer supported on this component.
|
|
90
|
+
*/
|
|
91
|
+
info?: string | boolean;
|
|
50
92
|
}
|
|
51
93
|
export declare const RadioButtonGroup: {
|
|
52
|
-
({ children, id, name, legend,
|
|
94
|
+
({ children, id, name, legend, legendHint, legendAlign, error, onBlur, onChange, value, inline, required, validationMessagePositionTop, size, disabled, adaptiveLegendBreakpoint, adaptiveSpacingBreakpoint, labelSpacing, legendHelp, legendInline, legendSpacing, legendWidth, tooltipPosition, warning, info, ...rest }: RadioButtonGroupProps): React.JSX.Element;
|
|
53
95
|
displayName: string;
|
|
54
96
|
};
|
|
55
97
|
export default RadioButtonGroup;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{useRef as n}from"react";import r from"../../../__internal__/utils/helpers/tags/tags.js";import t from"../../../__internal__/fieldset/__next__/fieldset.component.js";import"../../../style/utils/filter-styled-system-padding-props.js";import i from"../../../style/utils/filter-styled-system-margin-props.js";import{RadioButtonGroupProvider as o}from"../___internal___/radio-button-group.context.js";import l from"./radio-button-group.style.js";import a from"../../../__internal__/utils/helpers/guid/index.js";function s(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}const p=p=>{var{children:d,id:g,name:u,legend:c,legendHint:f,legendAlign:b,error:m,onBlur:y,onChange:O,value:j,inline:_=!1,required:v,validationMessagePositionTop:h=!0,size:P="medium",disabled:w,adaptiveLegendBreakpoint:S,adaptiveSpacingBreakpoint:B,labelSpacing:k,legendHelp:x,legendInline:z,legendSpacing:D,legendWidth:H,tooltipPosition:q,warning:A,info:C}=p,E=function(e,n){if(null==e)return{};var r,t,i=function(e,n){if(null==e)return{};var r,t,i={},o=Object.keys(e);for(t=0;t<o.length;t++)r=o[t],n.indexOf(r)>=0||(i[r]=e[r]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(t=0;t<o.length;t++)r=o[t],n.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(p,["children","id","name","legend","legendHint","legendAlign","error","onBlur","onChange","value","inline","required","validationMessagePositionTop","size","disabled","adaptiveLegendBreakpoint","adaptiveSpacingBreakpoint","labelSpacing","legendHelp","legendInline","legendSpacing","legendWidth","tooltipPosition","warning","info"]);const I=n(a()),M=g||I.current;return e(t,(T=function(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},t=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),t.forEach((function(n){s(e,n,r[n])}))}return e}({id:M,legend:c,legendHint:f||x,legendAlign:b,isDisabled:w,isRequired:v,error:m,warning:A,validationMessagePositionTop:h,size:P},r("radio-button-group",E),i(E)),L=null!=(L={children:e(o,{value:{error:!!m,warning:!!A,inline:_,onBlur:y,onChange:O,value:j,name:u,size:P,required:v,disabled:w},children:e(l,{"data-role":"radio-button-group-content",$inline:_,$size:P,children:d})})})?L:{},Object.getOwnPropertyDescriptors?Object.defineProperties(T,Object.getOwnPropertyDescriptors(L)):function(e){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(L)).forEach((function(e){Object.defineProperty(T,e,Object.getOwnPropertyDescriptor(L,e))})),T));var T,L};p.displayName="RadioButtonGroup";export{p as RadioButtonGroup,p as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
declare const StyledRadioButtonGroupContent: import("styled-components").StyledComponent<"div", any, {
|
|
2
|
+
$size: "small" | "medium" | "large";
|
|
3
|
+
$inline?: boolean;
|
|
4
4
|
}, never>;
|
|
5
|
-
export default
|
|
5
|
+
export default StyledRadioButtonGroupContent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import a,{css as o}from"styled-components";const l={small:{gap:"var(--global-space-comp-s)"},medium:{gap:"var(--global-space-comp-m)"},large:{gap:"var(--global-space-comp-l)"}},e=a.div.withConfig({displayName:"radio-button-group.style__StyledRadioButtonGroupContent",componentId:"sc-a23ec9a0-0"})(["",""],(({$size:a,$inline:e})=>o(["display:flex;flex-direction:column;gap:",";",""],l[a].gap,e&&o(["flex-direction:row;gap:var(--global-space-comp-l);"]))));export{e as default};
|
|
@@ -1,20 +1,87 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { MarginProps } from "styled-system";
|
|
3
|
-
import { CommonCheckableInputProps } from "../../__internal__/checkable-input";
|
|
4
2
|
import { TagProps } from "../../__internal__/utils/helpers/tags";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export interface RadioButtonProps extends Omit<CommonCheckableInputProps, "required">, MarginProps, TagProps {
|
|
9
|
-
/** Accepts a callback function which is triggered on click event */
|
|
3
|
+
import { CommonCheckableInputProps } from "../../__internal__/checkable-input/__next__/checkable-input.component";
|
|
4
|
+
export interface RadioButtonProps extends CommonCheckableInputProps, TagProps {
|
|
5
|
+
/** Callback fired when the RadioButton is clicked. */
|
|
10
6
|
onClick?: (ev: React.MouseEvent<HTMLInputElement>) => void;
|
|
11
|
-
/**
|
|
7
|
+
/** The value of the RadioButton. */
|
|
12
8
|
value: string;
|
|
13
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* Size of the RadioButton.
|
|
11
|
+
* @deprecated The `size` prop is deprecated and will be removed in a future release. Please set the size on the `RadioButtonGroup` component instead.
|
|
12
|
+
*/
|
|
13
|
+
size?: "small" | "large";
|
|
14
|
+
/**
|
|
15
|
+
* Overrides the default tooltip position
|
|
16
|
+
* @deprecated Tooltips are no longer supported on this component.
|
|
17
|
+
*/
|
|
14
18
|
tooltipPosition?: "top" | "bottom" | "left" | "right";
|
|
15
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* Aria label for rendered help component
|
|
21
|
+
* @deprecated Help tooltips are no longer supported on this component.
|
|
22
|
+
*/
|
|
16
23
|
helpAriaLabel?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Indicate that an error has occurred.
|
|
26
|
+
* @deprecated Error validation is no longer supported on this component. Please pass validation messages to the `RadioButtonGroup` component instead.
|
|
27
|
+
*/
|
|
28
|
+
error?: string | boolean;
|
|
29
|
+
/**
|
|
30
|
+
* [Legacy] Indicate additional information.
|
|
31
|
+
* @deprecated Information validation is no longer supported on this component.
|
|
32
|
+
*/
|
|
33
|
+
info?: string | boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Indicate that warning has occurred.
|
|
36
|
+
* @deprecated Warning validation is no longer supported on this component. Please pass validation messages to the `RadioButtonGroup` component instead.
|
|
37
|
+
*/
|
|
38
|
+
warning?: string | boolean;
|
|
39
|
+
/**
|
|
40
|
+
* If true the label switches position with the input
|
|
41
|
+
* @deprecated Reversed layout is no longer supported on this component.
|
|
42
|
+
*/
|
|
43
|
+
reverse?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Id of the validation icon
|
|
46
|
+
* @deprecated Validation icons with tooltips are no longer supported on this component.
|
|
47
|
+
*/
|
|
48
|
+
validationIconId?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Help content to be displayed under an input
|
|
51
|
+
* @deprecated The `fieldHelp` prop is deprecated and will be removed in a future release. Please use the `inputHint` prop instead.
|
|
52
|
+
*/
|
|
53
|
+
fieldHelp?: React.ReactNode;
|
|
54
|
+
/**
|
|
55
|
+
* Sets percentage-based input width
|
|
56
|
+
* @deprecated Custom input widths are no longer supported on this component.
|
|
57
|
+
*/
|
|
58
|
+
inputWidth?: React.ReactNode;
|
|
59
|
+
/**
|
|
60
|
+
* The content for the help tooltip, to appear next to the Label
|
|
61
|
+
* @deprecated The `labelHelp` prop is deprecated and will be removed in a future release. Please use the `inputHint` prop instead.
|
|
62
|
+
*/
|
|
63
|
+
labelHelp?: React.ReactNode;
|
|
64
|
+
/**
|
|
65
|
+
* Spacing between label and a field for inline label, given number will be multiplied by base spacing unit (8)
|
|
66
|
+
* @deprecated Custom spacing for labels is no longer supported on this component.
|
|
67
|
+
*/
|
|
68
|
+
labelSpacing?: 1 | 2;
|
|
69
|
+
/**
|
|
70
|
+
* Label width
|
|
71
|
+
* @deprecated Custom label widths are no longer supported on this component.
|
|
72
|
+
*/
|
|
73
|
+
labelWidth?: number;
|
|
74
|
+
/**
|
|
75
|
+
* When true, displays validation icon on label
|
|
76
|
+
* @deprecated Validation icons with tooltips are no longer supported on this component.
|
|
77
|
+
*/
|
|
78
|
+
validationOnLabel?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* If true, the FieldHelp will be displayed inline
|
|
81
|
+
* To be used with labelInline prop set to true
|
|
82
|
+
* @deprecated The `fieldHelpInline` prop is no longer supported on this component.
|
|
83
|
+
*/
|
|
84
|
+
fieldHelpInline?: boolean;
|
|
17
85
|
}
|
|
18
|
-
export declare const RadioButton: React.ForwardRefExoticComponent<RadioButtonProps &
|
|
19
|
-
|
|
20
|
-
export default _default;
|
|
86
|
+
export declare const RadioButton: React.ForwardRefExoticComponent<RadioButtonProps & React.RefAttributes<HTMLInputElement>>;
|
|
87
|
+
export default RadioButton;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import r,{useCallback as t}from"react";import n from"./___internal___/radio-button-svg.component.js";import o from"../../__internal__/utils/helpers/tags/tags.js";import i from"../../__internal__/checkable-input/__next__/checkable-input.component.js";import l from"./radio-button.style.js";import{useRadioButtonGroupContext as a}from"./___internal___/radio-button-group.context.js";function u(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function s(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),n.forEach((function(r){u(e,r,t[r])}))}return e}function c(e,r){return r=null!=r?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):function(e){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r.push.apply(r,t)}return r}(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})),e}const p=r.forwardRef(((r,u)=>{var{autoFocus:p,disabled:b,id:d,label:f,inputHint:m,name:O,onChange:g,onBlur:y,value:j,progressiveDisclosure:_,size:v,"data-element":h,"data-role":w,tooltipPosition:P,helpAriaLabel:H,error:D,info:S,warning:I,reverse:k,validationIconId:x,fieldHelp:z,inputWidth:B,labelHelp:C,labelSpacing:L,labelWidth:W,validationOnLabel:E,fieldHelpInline:F}=r,$=function(e,r){if(null==e)return{};var t,n,o=function(e,r){if(null==e)return{};var t,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)t=i[n],r.indexOf(t)>=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)t=i[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}(r,["autoFocus","disabled","id","label","inputHint","name","onChange","onBlur","value","progressiveDisclosure","size","data-element","data-role","tooltipPosition","helpAriaLabel","error","info","warning","reverse","validationIconId","fieldHelp","inputWidth","labelHelp","labelSpacing","labelWidth","validationOnLabel","fieldHelpInline"]);const{error:q,warning:A,inline:R,onBlur:N,onChange:G,value:J,name:K,size:M,disabled:Q,required:T}=a(),U=J===j,V=t((e=>{null==g||g(e),null==G||G(e)}),[g,G]),X=t((e=>{null==y||y(e),null==N||N(e)}),[y,N]);return e(l,c(s({$size:v||M,$error:q,$isDisabled:Q||b},o("radio-button",{"data-element":h,"data-role":w})),{children:e(i,c(s({type:"radio",id:d,name:O||K,value:j,label:f,inputHint:m||C||z,disabled:Q||b,required:T,checked:U,ref:u,autoFocus:p,onChange:V,onBlur:X,size:v||M,error:q,warning:A},!R&&{progressiveDisclosure:_},$),{children:e(n,{})}))}))}));p.displayName="RadioButton";export{p as RadioButton,p as default};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
interface RadioButtonStyleProps {
|
|
2
|
+
$isDisabled?: boolean;
|
|
3
|
+
$size: "small" | "medium" | "large";
|
|
4
|
+
$error?: boolean;
|
|
5
|
+
}
|
|
2
6
|
declare const RadioButtonStyle: import("styled-components").StyledComponent<"div", any, {
|
|
3
7
|
theme: object;
|
|
4
|
-
} &
|
|
5
|
-
inline?: boolean;
|
|
6
|
-
}, "theme">;
|
|
8
|
+
} & RadioButtonStyleProps, "theme">;
|
|
7
9
|
export default RadioButtonStyle;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import i,{css as e}from"styled-components";import{margin as r}from"styled-system";import t from"../../__internal__/checkable-input/hidden-checkable-input.style.js";import l from"../../__internal__/checkable-input/checkable-input-svg-wrapper.style.js";import o from"../../style/themes/apply-base-theme.js";import s from"../../style/utils/add-focus-styling.js";const a={small:{size:"var(--global-size-3-xs)"},medium:{size:"var(--global-size-xs)"},large:{size:"var(--global-size-s)"}},d=i.div.attrs(o).withConfig({displayName:"radio-button.style__RadioButtonStyle",componentId:"sc-bc8f46eb-0"})([""," ",";"],(({$isDisabled:i,$size:r,$error:o})=>e(["",",svg{border-radius:999px;}","{position:absolute;box-sizing:border-box;min-height:var(--global-size-xs);}",",",",svg{height:",";width:",";}svg{box-sizing:border-box;background-color:var(--input-typical-bg-default);border:1px solid var(--input-typical-border-default);","}",":checked + "," circle{fill:var(--input-typical-icon-active);}",":not([disabled]){&:focus + ",",&:hover + ","{","}}",""],l,t,t,l,a[r].size,a[r].size,!i&&o&&e(["border:2px solid var(--input-validation-border-error);"]),t,l,t,l,l,s(),i&&e(["svg{border:1px solid var(--input-typical-border-disabled);background-color:var(--input-typical-bg-disabled);}circle{fill:var(--input-typical-bg-disabled);}",":checked + "," circle{fill:var(--input-typical-icon-disabled);}"],t,l))),r);export{d as default};
|
package/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{Accordion}from"./components/accordion/accordion.component.js";export{AccordionGroup}from"./components/accordion/accordion-group/accordion-group.component.js";export{ActionPopover}from"./components/action-popover/action-popover.component.js";export{default as ActionPopoverMenu}from"./components/action-popover/action-popover-menu/action-popover-menu.component.js";export{ActionPopoverItem}from"./components/action-popover/action-popover-item/action-popover-item.component.js";export{ActionPopoverMenuButton}from"./components/action-popover/action-popover-menu-button/action-popover-menu-button.component.js";import"./components/action-popover/action-popover-divider/action-popover-divider.component.js";export{AdaptiveSidebar}from"./components/adaptive-sidebar/adaptive-sidebar.component.js";export{AdvancedColorPicker}from"./components/advanced-color-picker/advanced-color-picker.component.js";export{Alert}from"./components/alert/alert.component.js";export{default as AnchorNavigation}from"./components/anchor-navigation/anchor-navigation.component.js";export{default as AnchorNavigationItem}from"./components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.component.js";export{default as AnchorSectionDivider}from"./components/anchor-navigation/anchor-section-divider.component.js";export{Badge}from"./components/badge/badge.component.js";export{BatchSelection}from"./components/batch-selection/batch-selection.component.js";export{Box}from"./components/box/box.component.js";export{Breadcrumbs}from"./components/breadcrumbs/breadcrumbs.component.js";export{Crumb}from"./components/breadcrumbs/crumb/crumb.component.js";export{ButtonBar}from"./components/button-bar/button-bar.component.js";export{ButtonMinor}from"./components/button-minor/button-minor.component.js";export{ButtonToggle}from"./components/button-toggle/button-toggle.component.js";export{default as ButtonToggleGroup}from"./components/button-toggle/button-toggle-group/button-toggle-group.component.js";export{default as Button}from"./components/button/button.component.js";export{CarbonProvider}from"./components/carbon-provider/carbon-provider.component.js";export{default as Card}from"./components/card/card.component.js";export{default as CardColumn}from"./components/card/card-column/card-column.component.js";export{default as CardFooter}from"./components/card/card-footer/card-footer.component.js";export{default as CardRow}from"./components/card/card-row/card-row.component.js";export{CheckboxGroup}from"./components/checkbox/checkbox-group/checkbox-group.component.js";export{Checkbox}from"./components/checkbox/checkbox.component.js";export{Confirm}from"./components/confirm/confirm.component.js";export{Content}from"./components/content/content.component.js";export{DateRange}from"./components/date-range/date-range.component.js";export{DateInput}from"./components/date/date.component.js";export{Decimal}from"./components/decimal/decimal.component.js";export{default as Dl}from"./components/definition-list/dl.component.js";export{default as Dt}from"./components/definition-list/dt/dt.component.js";export{default as Dd}from"./components/definition-list/dd/dd.component.js";export{Detail}from"./components/detail/detail.component.js";export{Dialog}from"./components/dialog/dialog.component.js";export{DismissibleBox}from"./components/dismissible-box/dismissible-box.component.js";export{default as DraggableContainer}from"./components/draggable/draggable-container.component.js";export{default as DraggableItem}from"./components/draggable/draggable-item/draggable-item.component.js";export{Drawer}from"./components/drawer/drawer.component.js";export{DuellingPicklist}from"./components/duelling-picklist/duelling-picklist.component.js";export{default as PicklistDivider}from"./components/duelling-picklist/picklist-divider/picklist-divider.component.js";export{PicklistItem}from"./components/duelling-picklist/picklist-item/picklist-item.component.js";export{Picklist}from"./components/duelling-picklist/picklist/picklist.component.js";export{PicklistPlaceholder}from"./components/duelling-picklist/picklist-placeholder/picklist-placeholder.component.js";export{PicklistGroup}from"./components/duelling-picklist/picklist-group/picklist-group.component.js";export{Fieldset}from"./components/fieldset/fieldset.component.js";export{FileInput}from"./components/file-input/file-input.component.js";export{FlatTable}from"./components/flat-table/flat-table.component.js";export{FlatTableHead}from"./components/flat-table/flat-table-head/flat-table-head.component.js";export{FlatTableHeader}from"./components/flat-table/flat-table-header/flat-table-header.component.js";export{FlatTableBody}from"./components/flat-table/flat-table-body/flat-table-body.component.js";export{FlatTableRow}from"./components/flat-table/flat-table-row/flat-table-row.component.js";export{FlatTableRowHeader}from"./components/flat-table/flat-table-row-header/flat-table-row-header.component.js";export{FlatTableCell}from"./components/flat-table/flat-table-cell/flat-table-cell.component.js";export{FlatTableCheckbox}from"./components/flat-table/flat-table-checkbox/flat-table-checkbox.component.js";export{FlatTableBodyDraggable}from"./components/flat-table/flat-table-body-draggable/flat-table-body-draggable.component.js";export{Sort}from"./components/flat-table/sort/sort.component.js";export{Form}from"./components/form/form.component.js";export{default as RequiredFieldsIndicator}from"./components/form/required-fields-indicator/required-fields-indicator.component.js";export{default as GlobalHeader}from"./components/global-header/global-header.component.js";export{GridContainer}from"./components/grid/grid-container/grid-container.component.js";export{GridItem}from"./components/grid/grid-item/grid-item.component.js";export{GroupedCharacter}from"./components/grouped-character/grouped-character.component.js";export{Heading}from"./components/heading/heading.component.js";export{Help}from"./components/help/help.component.js";export{Hr}from"./components/hr/hr.component.js";export{I18nProvider}from"./components/i18n-provider/i18n-provider.component.js";export{default as IconButton}from"./components/icon-button/icon-button.component.js";export{default as Icon}from"./components/icon/icon.component.js";export{Image}from"./components/image/image.component.js";export{default as InlineInputs}from"./components/inline-inputs/inline-inputs.component.js";export{LinkPreview}from"./components/link-preview/link-preview.component.js";export{Link}from"./components/link/link.component.js";export{Loader}from"./components/loader/loader.component.js";export{LoaderBar}from"./components/loader-bar/loader-bar.component.js";export{LoaderSpinner}from"./components/loader-spinner/loader-spinner.component.js";export{default as LoaderStar}from"./components/loader-star/loader-star.component.js";export{Loader as NextLoader}from"./components/loader/__next__/loader.component.js";export{Menu}from"./components/menu/menu.component.js";export{MenuItem}from"./components/menu/menu-item/menu-item.component.js";export{default as MenuDivider}from"./components/menu/menu-divider/menu-divider.component.js";export{default as MenuSegmentTitle}from"./components/menu/menu-segment-title/menu-segment-title.component.js";export{MenuFullscreen}from"./components/menu/menu-full-screen/menu-full-screen.component.js";export{ScrollableBlock}from"./components/menu/scrollable-block/scrollable-block.component.js";export{Message}from"./components/message/message.component.js";export{default as Modal}from"./components/modal/index.js";export{MultiActionButton}from"./components/multi-action-button/multi-action-button.component.js";export{NavigationBar}from"./components/navigation-bar/navigation-bar.component.js";export{Note}from"./components/note/note.component.js";export{Number}from"./components/number/number.component.js";export{NumeralDate}from"./components/numeral-date/numeral-date.component.js";export{Pager}from"./components/pager/pager.component.js";export{default as Pages}from"./components/pages/pages.component.js";export{default as Page}from"./components/pages/page/page.component.js";export{Password}from"./components/password/password.component.js";export{Pill}from"./components/pill/pill.component.js";export{default as Pod}from"./components/pod/pod.component.js";export{PopoverContainer}from"./components/popover-container/popover-container.component.js";export{default as Portal}from"./components/portal/portal.js";export{Portrait}from"./components/portrait/portrait.component.js";export{Preview}from"./components/preview/preview.component.js";export{Profile}from"./components/profile/profile.component.js";export{default as ProgressTracker}from"./components/progress-tracker/progress-tracker.component.js";export{default as RadioButton}from"./components/radio-button/radio-button.component.js";export{RadioButtonGroup}from"./components/radio-button/radio-button-group/radio-button-group.component.js";export{Search}from"./components/search/search.component.js";export{default as Option}from"./components/select/option/option.component.js";export{default as OptionRow}from"./components/select/option-row/option-row.component.js";export{default as OptionGroupHeader}from"./components/select/option-group-header/option-group-header.component.js";export{SimpleSelect as Select}from"./components/select/simple-select/simple-select.component.js";export{FilterableSelect}from"./components/select/filterable-select/filterable-select.component.js";export{MultiSelect}from"./components/select/multi-select/multi-select.component.js";export{default as setupSelectMocks}from"./components/select/setup-select-mocks.js";export{SettingsRow}from"./components/settings-row/settings-row.component.js";export{Sidebar}from"./components/sidebar/sidebar.component.js";export{SimpleColorPicker}from"./components/simple-color-picker/simple-color-picker.component.js";export{SimpleColor}from"./components/simple-color-picker/simple-color/simple-color.component.js";export{SplitButton}from"./components/split-button/split-button.component.js";export{StepFlowTitle}from"./components/step-flow/step-flow-title/step-flow-title.component.js";export{StepFlow}from"./components/step-flow/step-flow.component.js";export{StepSequence}from"./components/step-sequence/step-sequence.component.js";export{StepSequenceItem}from"./components/step-sequence/step-sequence-item/step-sequence-item.component.js";export{Switch}from"./components/switch/switch.component.js";export{Tabs}from"./components/tabs/tabs.component.js";export{Tab}from"./components/tabs/tab/tab.component.js";export{TextEditor}from"./components/text-editor/text-editor.component.js";export{createEmpty,createFromHTML}from"./components/text-editor/__internal__/__utils__/helpers.js";import"react/jsx-runtime";import"@lexical/react/LexicalComposerContext";import"@lexical/react/LexicalTypeaheadMenuPlugin";import"lexical";import"react";import"react-dom";import"./components/text-editor/__internal__/__ui__/Mentions/constants.js";import"./components/text-editor/__internal__/__ui__/Mentions/mentions.style.js";import"./__internal__/i18n-context/index.js";export{OriginalTextarea as Textarea}from"./components/textarea/textarea.component.js";export{Textbox}from"./components/textbox/textbox.component.js";export{default as TileSelect}from"./components/tile-select/tile-select.component.js";export{TileSelectGroup}from"./components/tile-select/tile-select-group/tile-select-group.component.js";export{Tile}from"./components/tile/tile.component.js";export{default as TileContent}from"./components/tile/tile-content/tile-content.component.js";export{TileFooter}from"./components/tile/tile-footer/tile-footer.component.js";export{TileHeader}from"./components/tile/tile-header/tile-header.component.js";export{FlexTileContainer}from"./components/tile/flex-tile-container/flex-tile-container.component.js";export{FlexTileCell}from"./components/tile/flex-tile-cell/flex-tile-cell.component.js";export{FlexTileDivider}from"./components/tile/flex-tile-divider/flex-tile-divider.component.js";export{default as Time}from"./components/time/time.component.js";export{Toast}from"./components/toast/toast.component.js";export{Tooltip}from"./components/tooltip/tooltip.component.js";export{Typography}from"./components/typography/typography.component.js";export{List,ListItem}from"./components/typography/list.component.js";export{VerticalDivider}from"./components/vertical-divider/vertical-divider.component.js";export{VerticalMenu}from"./components/vertical-menu/vertical-menu.component.js";export{VerticalMenuItem}from"./components/vertical-menu/vertical-menu-item/vertical-menu-item.component.js";export{VerticalMenuFullScreen}from"./components/vertical-menu/vertical-menu-full-screen/vertical-menu-full-screen.component.js";export{VerticalMenuTrigger}from"./components/vertical-menu/vertical-menu-trigger/vertical-menu-trigger.component.js";import"./components/vertical-menu/responsive-vertical-menu/responsive-vertical-menu.style.js";import"react-transition-group";import"./hooks/__internal__/useScrollBlock/useScrollBlock.js";import"./__internal__/modal/modal-manager.js";import"./__internal__/modal/modal.style.js";import"./__internal__/modal/modal.context.js";export{default as useMediaQuery}from"./hooks/useMediaQuery/useMediaQuery.js";import"./components/carbon-provider/__internal__/top-modal.context.js";import"./components/vertical-menu/responsive-vertical-menu/responsive-vertical-menu-item/responsive-vertical-menu-item.style.js";import"./style/utils/filter-styled-system-padding-props.js";import"./components/vertical-menu/responsive-vertical-menu/responsive-vertical-menu-divider/responsive-vertical-menu-divider.style.js";export{default as useCharacterCount}from"./hooks/useCharacterCount/useCharacterCount.js";export{default as GlobalStyle}from"./style/global-style.js";export{MenuItemDivider as ActionPopoverDivider}from"./components/action-popover/action-popover.style.js";
|
|
1
|
+
export{Accordion}from"./components/accordion/accordion.component.js";export{AccordionGroup}from"./components/accordion/accordion-group/accordion-group.component.js";export{ActionPopover}from"./components/action-popover/action-popover.component.js";export{default as ActionPopoverMenu}from"./components/action-popover/action-popover-menu/action-popover-menu.component.js";export{ActionPopoverItem}from"./components/action-popover/action-popover-item/action-popover-item.component.js";export{ActionPopoverMenuButton}from"./components/action-popover/action-popover-menu-button/action-popover-menu-button.component.js";import"./components/action-popover/action-popover-divider/action-popover-divider.component.js";export{AdaptiveSidebar}from"./components/adaptive-sidebar/adaptive-sidebar.component.js";export{AdvancedColorPicker}from"./components/advanced-color-picker/advanced-color-picker.component.js";export{Alert}from"./components/alert/alert.component.js";export{default as AnchorNavigation}from"./components/anchor-navigation/anchor-navigation.component.js";export{default as AnchorNavigationItem}from"./components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.component.js";export{default as AnchorSectionDivider}from"./components/anchor-navigation/anchor-section-divider.component.js";export{Badge}from"./components/badge/badge.component.js";export{BatchSelection}from"./components/batch-selection/batch-selection.component.js";export{Box}from"./components/box/box.component.js";export{Breadcrumbs}from"./components/breadcrumbs/breadcrumbs.component.js";export{Crumb}from"./components/breadcrumbs/crumb/crumb.component.js";export{ButtonBar}from"./components/button-bar/button-bar.component.js";export{ButtonMinor}from"./components/button-minor/button-minor.component.js";export{ButtonToggle}from"./components/button-toggle/button-toggle.component.js";export{default as ButtonToggleGroup}from"./components/button-toggle/button-toggle-group/button-toggle-group.component.js";export{default as Button}from"./components/button/button.component.js";export{CarbonProvider}from"./components/carbon-provider/carbon-provider.component.js";export{default as Card}from"./components/card/card.component.js";export{default as CardColumn}from"./components/card/card-column/card-column.component.js";export{default as CardFooter}from"./components/card/card-footer/card-footer.component.js";export{default as CardRow}from"./components/card/card-row/card-row.component.js";export{CheckboxGroup}from"./components/checkbox/checkbox-group/checkbox-group.component.js";export{Checkbox}from"./components/checkbox/checkbox.component.js";export{Confirm}from"./components/confirm/confirm.component.js";export{Content}from"./components/content/content.component.js";export{DateRange}from"./components/date-range/date-range.component.js";export{DateInput}from"./components/date/date.component.js";export{Decimal}from"./components/decimal/decimal.component.js";export{default as Dl}from"./components/definition-list/dl.component.js";export{default as Dt}from"./components/definition-list/dt/dt.component.js";export{default as Dd}from"./components/definition-list/dd/dd.component.js";export{Detail}from"./components/detail/detail.component.js";export{Dialog}from"./components/dialog/dialog.component.js";export{DismissibleBox}from"./components/dismissible-box/dismissible-box.component.js";export{default as DraggableContainer}from"./components/draggable/draggable-container.component.js";export{default as DraggableItem}from"./components/draggable/draggable-item/draggable-item.component.js";export{Drawer}from"./components/drawer/drawer.component.js";export{DuellingPicklist}from"./components/duelling-picklist/duelling-picklist.component.js";export{default as PicklistDivider}from"./components/duelling-picklist/picklist-divider/picklist-divider.component.js";export{PicklistItem}from"./components/duelling-picklist/picklist-item/picklist-item.component.js";export{Picklist}from"./components/duelling-picklist/picklist/picklist.component.js";export{PicklistPlaceholder}from"./components/duelling-picklist/picklist-placeholder/picklist-placeholder.component.js";export{PicklistGroup}from"./components/duelling-picklist/picklist-group/picklist-group.component.js";export{Fieldset}from"./components/fieldset/fieldset.component.js";export{FileInput}from"./components/file-input/file-input.component.js";export{FlatTable}from"./components/flat-table/flat-table.component.js";export{FlatTableHead}from"./components/flat-table/flat-table-head/flat-table-head.component.js";export{FlatTableHeader}from"./components/flat-table/flat-table-header/flat-table-header.component.js";export{FlatTableBody}from"./components/flat-table/flat-table-body/flat-table-body.component.js";export{FlatTableRow}from"./components/flat-table/flat-table-row/flat-table-row.component.js";export{FlatTableRowHeader}from"./components/flat-table/flat-table-row-header/flat-table-row-header.component.js";export{FlatTableCell}from"./components/flat-table/flat-table-cell/flat-table-cell.component.js";export{FlatTableCheckbox}from"./components/flat-table/flat-table-checkbox/flat-table-checkbox.component.js";export{FlatTableBodyDraggable}from"./components/flat-table/flat-table-body-draggable/flat-table-body-draggable.component.js";export{Sort}from"./components/flat-table/sort/sort.component.js";export{Form}from"./components/form/form.component.js";export{default as RequiredFieldsIndicator}from"./components/form/required-fields-indicator/required-fields-indicator.component.js";export{default as GlobalHeader}from"./components/global-header/global-header.component.js";export{GridContainer}from"./components/grid/grid-container/grid-container.component.js";export{GridItem}from"./components/grid/grid-item/grid-item.component.js";export{GroupedCharacter}from"./components/grouped-character/grouped-character.component.js";export{Heading}from"./components/heading/heading.component.js";export{Help}from"./components/help/help.component.js";export{Hr}from"./components/hr/hr.component.js";export{I18nProvider}from"./components/i18n-provider/i18n-provider.component.js";export{default as IconButton}from"./components/icon-button/icon-button.component.js";export{default as Icon}from"./components/icon/icon.component.js";export{Image}from"./components/image/image.component.js";export{default as InlineInputs}from"./components/inline-inputs/inline-inputs.component.js";export{LinkPreview}from"./components/link-preview/link-preview.component.js";export{Link}from"./components/link/link.component.js";export{Loader}from"./components/loader/loader.component.js";export{LoaderBar}from"./components/loader-bar/loader-bar.component.js";export{LoaderSpinner}from"./components/loader-spinner/loader-spinner.component.js";export{default as LoaderStar}from"./components/loader-star/loader-star.component.js";export{Loader as NextLoader}from"./components/loader/__next__/loader.component.js";export{Menu}from"./components/menu/menu.component.js";export{MenuItem}from"./components/menu/menu-item/menu-item.component.js";export{default as MenuDivider}from"./components/menu/menu-divider/menu-divider.component.js";export{default as MenuSegmentTitle}from"./components/menu/menu-segment-title/menu-segment-title.component.js";export{MenuFullscreen}from"./components/menu/menu-full-screen/menu-full-screen.component.js";export{ScrollableBlock}from"./components/menu/scrollable-block/scrollable-block.component.js";export{Message}from"./components/message/message.component.js";export{default as Modal}from"./components/modal/index.js";export{MultiActionButton}from"./components/multi-action-button/multi-action-button.component.js";export{NavigationBar}from"./components/navigation-bar/navigation-bar.component.js";export{Note}from"./components/note/note.component.js";export{Number}from"./components/number/number.component.js";export{NumeralDate}from"./components/numeral-date/numeral-date.component.js";export{Pager}from"./components/pager/pager.component.js";export{default as Pages}from"./components/pages/pages.component.js";export{default as Page}from"./components/pages/page/page.component.js";export{Password}from"./components/password/password.component.js";export{Pill}from"./components/pill/pill.component.js";export{default as Pod}from"./components/pod/pod.component.js";export{PopoverContainer}from"./components/popover-container/popover-container.component.js";export{default as Portal}from"./components/portal/portal.js";export{Portrait}from"./components/portrait/portrait.component.js";export{Preview}from"./components/preview/preview.component.js";export{Profile}from"./components/profile/profile.component.js";export{default as ProgressTracker}from"./components/progress-tracker/progress-tracker.component.js";export{RadioButton}from"./components/radio-button/radio-button.component.js";export{RadioButtonGroup}from"./components/radio-button/radio-button-group/radio-button-group.component.js";export{Search}from"./components/search/search.component.js";export{default as Option}from"./components/select/option/option.component.js";export{default as OptionRow}from"./components/select/option-row/option-row.component.js";export{default as OptionGroupHeader}from"./components/select/option-group-header/option-group-header.component.js";export{SimpleSelect as Select}from"./components/select/simple-select/simple-select.component.js";export{FilterableSelect}from"./components/select/filterable-select/filterable-select.component.js";export{MultiSelect}from"./components/select/multi-select/multi-select.component.js";export{default as setupSelectMocks}from"./components/select/setup-select-mocks.js";export{SettingsRow}from"./components/settings-row/settings-row.component.js";export{Sidebar}from"./components/sidebar/sidebar.component.js";export{SimpleColorPicker}from"./components/simple-color-picker/simple-color-picker.component.js";export{SimpleColor}from"./components/simple-color-picker/simple-color/simple-color.component.js";export{SplitButton}from"./components/split-button/split-button.component.js";export{StepFlowTitle}from"./components/step-flow/step-flow-title/step-flow-title.component.js";export{StepFlow}from"./components/step-flow/step-flow.component.js";export{StepSequence}from"./components/step-sequence/step-sequence.component.js";export{StepSequenceItem}from"./components/step-sequence/step-sequence-item/step-sequence-item.component.js";export{Switch}from"./components/switch/switch.component.js";export{Tabs}from"./components/tabs/tabs.component.js";export{Tab}from"./components/tabs/tab/tab.component.js";export{TextEditor}from"./components/text-editor/text-editor.component.js";export{createEmpty,createFromHTML}from"./components/text-editor/__internal__/__utils__/helpers.js";import"react/jsx-runtime";import"@lexical/react/LexicalComposerContext";import"@lexical/react/LexicalTypeaheadMenuPlugin";import"lexical";import"react";import"react-dom";import"./components/text-editor/__internal__/__ui__/Mentions/constants.js";import"./components/text-editor/__internal__/__ui__/Mentions/mentions.style.js";import"./__internal__/i18n-context/index.js";export{OriginalTextarea as Textarea}from"./components/textarea/textarea.component.js";export{Textbox}from"./components/textbox/textbox.component.js";export{default as TileSelect}from"./components/tile-select/tile-select.component.js";export{TileSelectGroup}from"./components/tile-select/tile-select-group/tile-select-group.component.js";export{Tile}from"./components/tile/tile.component.js";export{default as TileContent}from"./components/tile/tile-content/tile-content.component.js";export{TileFooter}from"./components/tile/tile-footer/tile-footer.component.js";export{TileHeader}from"./components/tile/tile-header/tile-header.component.js";export{FlexTileContainer}from"./components/tile/flex-tile-container/flex-tile-container.component.js";export{FlexTileCell}from"./components/tile/flex-tile-cell/flex-tile-cell.component.js";export{FlexTileDivider}from"./components/tile/flex-tile-divider/flex-tile-divider.component.js";export{default as Time}from"./components/time/time.component.js";export{Toast}from"./components/toast/toast.component.js";export{Tooltip}from"./components/tooltip/tooltip.component.js";export{Typography}from"./components/typography/typography.component.js";export{List,ListItem}from"./components/typography/list.component.js";export{VerticalDivider}from"./components/vertical-divider/vertical-divider.component.js";export{VerticalMenu}from"./components/vertical-menu/vertical-menu.component.js";export{VerticalMenuItem}from"./components/vertical-menu/vertical-menu-item/vertical-menu-item.component.js";export{VerticalMenuFullScreen}from"./components/vertical-menu/vertical-menu-full-screen/vertical-menu-full-screen.component.js";export{VerticalMenuTrigger}from"./components/vertical-menu/vertical-menu-trigger/vertical-menu-trigger.component.js";import"./components/vertical-menu/responsive-vertical-menu/responsive-vertical-menu.style.js";import"react-transition-group";import"./hooks/__internal__/useScrollBlock/useScrollBlock.js";import"./__internal__/modal/modal-manager.js";import"./__internal__/modal/modal.style.js";import"./__internal__/modal/modal.context.js";export{default as useMediaQuery}from"./hooks/useMediaQuery/useMediaQuery.js";import"./components/carbon-provider/__internal__/top-modal.context.js";import"./components/vertical-menu/responsive-vertical-menu/responsive-vertical-menu-item/responsive-vertical-menu-item.style.js";import"./style/utils/filter-styled-system-padding-props.js";import"./components/vertical-menu/responsive-vertical-menu/responsive-vertical-menu-divider/responsive-vertical-menu-divider.style.js";export{default as useCharacterCount}from"./hooks/useCharacterCount/useCharacterCount.js";export{default as GlobalStyle}from"./style/global-style.js";export{MenuItemDivider as ActionPopoverDivider}from"./components/action-popover/action-popover.style.js";
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checkable Input Component
|
|
3
|
+
*
|
|
4
|
+
* @description Base component for Checkbox and RadioButton components.
|
|
5
|
+
* Do not add props that are specific to either Checkbox or RadioButton.
|
|
6
|
+
* Do not add props to the common interface that are not intended to be in the public interface of both components.
|
|
7
|
+
* Styles of any children should be handled in their respective component files.
|
|
8
|
+
*/
|
|
9
|
+
import React from "react";
|
|
10
|
+
import { CommonHiddenCheckableInputProps } from "../hidden-checkable-input.component";
|
|
11
|
+
export interface CommonCheckableInputProps extends Omit<CommonHiddenCheckableInputProps, "validationIconId"> {
|
|
12
|
+
/** Unique identifier for the input. Will use a randomly generated GUID if none is provided. */
|
|
13
|
+
id?: string;
|
|
14
|
+
/** Content of the label. */
|
|
15
|
+
label?: React.ReactNode;
|
|
16
|
+
/** Additional hint text rendered below the label. */
|
|
17
|
+
inputHint?: React.ReactNode;
|
|
18
|
+
/** If true, the component will be disabled. */
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
/** Content to be rendered below the input when checked, is not supported when inputs are inline. */
|
|
21
|
+
progressiveDisclosure?: React.ReactNode;
|
|
22
|
+
}
|
|
23
|
+
export interface CheckableInputProps extends CommonCheckableInputProps {
|
|
24
|
+
/** Element to be rendered as the visible input. */
|
|
25
|
+
children?: React.ReactNode;
|
|
26
|
+
/** HTML type attribute of the input. */
|
|
27
|
+
type: string;
|
|
28
|
+
/** Value passed to the input. */
|
|
29
|
+
value?: string;
|
|
30
|
+
/** Size of the component. */
|
|
31
|
+
size?: "small" | "medium" | "large";
|
|
32
|
+
/** Set error state - passed to Tabs context */
|
|
33
|
+
error?: boolean;
|
|
34
|
+
/** Set warning state - passed to Tabs context */
|
|
35
|
+
warning?: boolean;
|
|
36
|
+
}
|
|
37
|
+
declare const CheckableInput: React.ForwardRefExoticComponent<CheckableInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
38
|
+
export default CheckableInput;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),t=require("./checkable-input.style.js"),n=require("../hidden-checkable-input.component.js"),i=require("../../utils/helpers/guid/index.js"),s=require("../../label/label.component.js"),o=require("../../hint-text/hint-text.component.js"),l=require("../../../hooks/useMediaQuery/useMediaQuery.js"),c=require("../../../components/tabs/__next__/tabs.context.js"),u=require("../../../components/tabs/__next__/tab.context.js");function a(e){return e&&e.__esModule?e:{default:e}}function d(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function f(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),n.forEach((function(r){d(e,r,t[r])}))}return e}const b=a(r).default.forwardRef(((a,d)=>{var{children:b,disabled:p,id:h,name:y,type:j,value:x,label:g,inputHint:m,checked:O,progressiveDisclosure:v,size:_="medium",error:k,warning:S}=a,q=function(e,r){if(null==e)return{};var t,n,i=function(e,r){if(null==e)return{};var t,n,i={},s=Object.keys(e);for(n=0;n<s.length;n++)t=s[n],r.indexOf(t)>=0||(i[t]=e[t]);return i}(e,r);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)t=s[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(a,["children","disabled","id","name","type","value","label","inputHint","checked","progressiveDisclosure","size","error","warning"]);const{current:w}=r.useRef(h||i.default()),C=m?`${w}-hint`:void 0,P=r.useRef(null),$=l.default("screen and (prefers-reduced-motion: no-preference)"),{scrollHeight:z}=P.current||{},D=O&&z?String(z):"0",{setErrors:E,setWarnings:H}=r.useContext(c.TabsContext),{tabId:I}=r.useContext(u.TabContext),L=r.useRef(!1);return r.useLayoutEffect((()=>(L.current=!0,()=>{L.current=!1})),[]),r.useEffect((()=>(E&&E(w,I||"",!!k),H&&H(w,I||"",!!S),()=>{L.current||(E&&E(w,I||"",!1),H&&H(w,I||"",!1))})),[w,E,H,k,S,I]),e.jsxs(e.Fragment,{children:[e.jsxs(t.StyledCheckableInput,{$size:_,children:[e.jsxs(t.StyledCheckableInputWrapper,{children:[e.jsx(n.default,f({id:w,type:j,name:y,value:x,disabled:p,checked:O,ref:d,ariaDescribedBy:C},q)),b]}),g&&e.jsx(s.default,{htmlFor:w,disabled:p,isLarge:"large"===_,children:g}),m&&e.jsx(o.HintText,{id:C,marginBottom:"0",isDisabled:p,isLarge:"large"===_,children:m})]}),v&&e.jsxs(t.StyledAccordion,{"data-role":"progressive-disclosure-accordion",ref:P,$expanded:O,$contentHeight:D,$allowAnimation:$,children:[e.jsx(t.StyledLineContainer,{$size:_,children:e.jsx(t.StyledAccordionLine,{$size:_})}),e.jsx(t.StyledAccordionContent,{children:v})]})]})}));b.displayName="CheckableInput",exports.default=b;
|