@helsenorge/designsystem-react 14.10.0 → 14.11.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.
Files changed (139) hide show
  1. package/lib/BabyMobileMedium.js +1 -1
  2. package/lib/CHANGELOG.md +10 -0
  3. package/lib/Checkbox.js +25 -48
  4. package/lib/Checkbox.js.map +1 -1
  5. package/lib/CheckboxMarker.js +60 -0
  6. package/lib/CheckboxMarker.js.map +1 -0
  7. package/lib/ChildMedium.js +1 -1
  8. package/lib/EyeContactMedium.js +79 -0
  9. package/lib/EyeContactMedium.js.map +1 -0
  10. package/lib/FacialRecognitionFingerprintMedium.js +1 -1
  11. package/lib/FormGroup.js +5 -5
  12. package/lib/FormGroup.js.map +1 -1
  13. package/lib/GiveBabyFoodMedium.js +1 -1
  14. package/lib/Illustration.js +1 -1
  15. package/lib/IllustrationNames.js +4 -0
  16. package/lib/IllustrationNames.js.map +1 -1
  17. package/lib/LazyIllustration.js +5 -1
  18. package/lib/LazyIllustration.js.map +1 -1
  19. package/lib/Radio.js +73 -0
  20. package/lib/Radio.js.map +1 -0
  21. package/lib/RadioButton.js +95 -3
  22. package/lib/RadioButton.js.map +1 -1
  23. package/lib/RadioButton2.js +3 -73
  24. package/lib/RadioButton2.js.map +1 -1
  25. package/lib/RadioMarker.js +37 -0
  26. package/lib/RadioMarker.js.map +1 -0
  27. package/lib/ReadLettersMedium.js +1 -1
  28. package/lib/SkinToSkinMedium.js +106 -0
  29. package/lib/SkinToSkinMedium.js.map +1 -0
  30. package/lib/StorkMedium.js +1 -1
  31. package/lib/StrollerMedium.js +1 -1
  32. package/lib/Support2Medium.js +1 -1
  33. package/lib/TableBody.js +1 -1
  34. package/lib/TableHead.js +1 -1
  35. package/lib/TableRow.js +1 -1
  36. package/lib/ThinkingMedium.js +1 -1
  37. package/lib/VisualCheckbox.js +77 -0
  38. package/lib/VisualCheckbox.js.map +1 -0
  39. package/lib/VisualRadio.js +77 -0
  40. package/lib/VisualRadio.js.map +1 -0
  41. package/lib/components/Checkbox/CheckboxMarker/CheckboxMarker.d.ts +20 -0
  42. package/lib/components/Checkbox/CheckboxMarker/styles.module.scss +309 -0
  43. package/lib/components/Checkbox/CheckboxMarker/styles.module.scss.d.ts +25 -0
  44. package/lib/components/Checkbox/styles.module.scss +9 -269
  45. package/lib/components/Checkbox/styles.module.scss.d.ts +1 -17
  46. package/lib/components/Illustration/index.js +1 -1
  47. package/lib/components/Illustrations/BabyMobile.js +1 -1
  48. package/lib/components/Illustrations/Child.js +1 -1
  49. package/lib/components/Illustrations/Doctor.js +1 -1
  50. package/lib/components/Illustrations/EyeContact.d.ts +8 -0
  51. package/lib/components/Illustrations/EyeContact.js +16 -0
  52. package/lib/components/Illustrations/EyeContact.js.map +1 -0
  53. package/lib/components/Illustrations/EyeContactMedium.d.ts +3 -0
  54. package/lib/components/Illustrations/EyeContactMedium.js +2 -0
  55. package/lib/components/Illustrations/FacialRecognitionFingerprint.js +1 -1
  56. package/lib/components/Illustrations/GiveBabyFood.js +1 -1
  57. package/lib/components/Illustrations/HealthcarePersonnel.js +1 -1
  58. package/lib/components/Illustrations/IllustrationNames.d.ts +1 -1
  59. package/lib/components/Illustrations/ReadLetters.js +1 -1
  60. package/lib/components/Illustrations/SkinToSkin.d.ts +8 -0
  61. package/lib/components/Illustrations/SkinToSkin.js +16 -0
  62. package/lib/components/Illustrations/SkinToSkin.js.map +1 -0
  63. package/lib/components/Illustrations/SkinToSkinMedium.d.ts +3 -0
  64. package/lib/components/Illustrations/SkinToSkinMedium.js +2 -0
  65. package/lib/components/Illustrations/Stork.js +1 -1
  66. package/lib/components/Illustrations/Stroller.js +1 -1
  67. package/lib/components/Illustrations/Support2.js +1 -1
  68. package/lib/components/Illustrations/Thinking.js +1 -1
  69. package/lib/components/Panel/index.js +1 -1
  70. package/lib/components/PanelList/index.js +1 -1
  71. package/lib/components/RadioButton/RadioMarker/RadioMarker.d.ts +20 -0
  72. package/lib/components/RadioButton/RadioMarker/styles.module.scss +259 -0
  73. package/lib/components/RadioButton/RadioMarker/styles.module.scss.d.ts +24 -0
  74. package/lib/components/RadioButton/index.d.ts +0 -1
  75. package/lib/components/RadioButton/index.js +3 -3
  76. package/lib/components/RadioButton/styles.module.scss +11 -273
  77. package/lib/components/RadioButton/styles.module.scss.d.ts +1 -9
  78. package/lib/components/Table/index.js +1 -1
  79. package/lib/components/Validation/index.js +1 -1
  80. package/lib/components/VisualCheckboxCloud/Checkbox/styles.module.scss +5 -128
  81. package/lib/components/VisualCheckboxCloud/styles.module.scss +2 -9
  82. package/lib/components/VisualCheckboxGroup/VisualCheckbox/VisualCheckbox.d.ts +26 -0
  83. package/lib/components/VisualCheckboxGroup/VisualCheckbox/VisualContent.d.ts +10 -0
  84. package/lib/components/VisualCheckboxGroup/VisualCheckbox/index.d.ts +3 -0
  85. package/lib/components/VisualCheckboxGroup/VisualCheckbox/index.js +5 -0
  86. package/lib/components/VisualCheckboxGroup/VisualCheckbox/index.js.map +1 -0
  87. package/lib/components/VisualCheckboxGroup/VisualCheckbox/styles.module.scss +7 -0
  88. package/lib/components/VisualCheckboxGroup/VisualCheckbox/styles.module.scss.d.ts +18 -0
  89. package/lib/components/VisualCheckboxGroup/VisualCheckboxGroup.d.ts +33 -0
  90. package/lib/components/VisualCheckboxGroup/index.d.ts +3 -0
  91. package/lib/components/VisualCheckboxGroup/index.js +43 -0
  92. package/lib/components/VisualCheckboxGroup/index.js.map +1 -0
  93. package/lib/components/VisualCheckboxGroup/styles.module.scss +6 -0
  94. package/lib/components/VisualCheckboxGroup/styles.module.scss.d.ts +10 -0
  95. package/lib/components/{VisualRadioButtonCloud/RadioButton/RadioButton.d.ts → VisualRadioCloud/Radio/Radio.d.ts} +3 -3
  96. package/lib/components/VisualRadioCloud/Radio/index.d.ts +3 -0
  97. package/lib/components/VisualRadioCloud/Radio/index.js +5 -0
  98. package/lib/components/VisualRadioCloud/Radio/index.js.map +1 -0
  99. package/lib/components/VisualRadioCloud/Radio/styles.module.scss +7 -0
  100. package/lib/components/VisualRadioCloud/Radio/styles.module.scss.d.ts +15 -0
  101. package/lib/components/{VisualRadioButtonCloud/VisualRadioButtonCloud.d.ts → VisualRadioCloud/VisualRadioCloud.d.ts} +8 -8
  102. package/lib/components/VisualRadioCloud/index.d.ts +3 -0
  103. package/lib/components/{VisualRadioButtonCloud → VisualRadioCloud}/index.js +7 -7
  104. package/lib/components/VisualRadioCloud/index.js.map +1 -0
  105. package/lib/components/VisualRadioCloud/styles.module.scss +6 -0
  106. package/lib/components/{VisualRadioButtonCloud → VisualRadioCloud}/styles.module.scss.d.ts +1 -1
  107. package/lib/components/VisualRadioGroup/VisualRadio/VisualContent.d.ts +10 -0
  108. package/lib/components/VisualRadioGroup/VisualRadio/VisualRadio.d.ts +26 -0
  109. package/lib/components/VisualRadioGroup/VisualRadio/index.d.ts +3 -0
  110. package/lib/components/VisualRadioGroup/VisualRadio/index.js +5 -0
  111. package/lib/components/VisualRadioGroup/VisualRadio/index.js.map +1 -0
  112. package/lib/components/VisualRadioGroup/VisualRadio/styles.module.scss +7 -0
  113. package/lib/components/VisualRadioGroup/VisualRadio/styles.module.scss.d.ts +18 -0
  114. package/lib/components/VisualRadioGroup/VisualRadioGroup.d.ts +39 -0
  115. package/lib/components/VisualRadioGroup/index.d.ts +3 -0
  116. package/lib/components/VisualRadioGroup/index.js +63 -0
  117. package/lib/components/VisualRadioGroup/index.js.map +1 -0
  118. package/lib/components/VisualRadioGroup/styles.module.scss +6 -0
  119. package/lib/components/VisualRadioGroup/styles.module.scss.d.ts +10 -0
  120. package/lib/scss/_visual-form.scss +345 -0
  121. package/lib/utils3.js +10 -98
  122. package/lib/utils3.js.map +1 -1
  123. package/lib/utils4.js +28 -11
  124. package/lib/utils4.js.map +1 -1
  125. package/lib/utils5.js +58 -28
  126. package/lib/utils5.js.map +1 -1
  127. package/package.json +115 -1
  128. package/scss/_visual-form.scss +345 -0
  129. package/lib/components/RadioButton/utils.d.ts +0 -2
  130. package/lib/components/VisualRadioButtonCloud/RadioButton/index.d.ts +0 -3
  131. package/lib/components/VisualRadioButtonCloud/RadioButton/index.js +0 -5
  132. package/lib/components/VisualRadioButtonCloud/RadioButton/index.js.map +0 -1
  133. package/lib/components/VisualRadioButtonCloud/RadioButton/styles.module.scss +0 -133
  134. package/lib/components/VisualRadioButtonCloud/RadioButton/styles.module.scss.d.ts +0 -15
  135. package/lib/components/VisualRadioButtonCloud/index.d.ts +0 -3
  136. package/lib/components/VisualRadioButtonCloud/index.js.map +0 -1
  137. package/lib/components/VisualRadioButtonCloud/styles.module.scss +0 -13
  138. package/lib/utils6.js +0 -60
  139. package/lib/utils6.js.map +0 -1
@@ -0,0 +1,43 @@
1
+ import { t as isComponent } from "../../component.js";
2
+ import { t as useIsMobileBreakpoint } from "../../useIsMobileBreakpoint.js";
3
+ import { t as useIdWithFallback } from "../../useIdWithFallback.js";
4
+ import { t as ErrorWrapper_default } from "../../ErrorWrapper.js";
5
+ import { t as VisualCheckbox_default } from "../../VisualCheckbox.js";
6
+ import classNames from "classnames";
7
+ import React from "react";
8
+ import { jsx } from "react/jsx-runtime";
9
+ import styles from "./styles.module.scss";
10
+ const VisualCheckboxGroup = (props) => {
11
+ const { children, name, variant = "rectangle", mobileLineVariantLimit, error, errorTextId: errorTextIdProp, renderError = true, errorMessageRef, className, errorWrapperClassName, testId, errorWrapperTestId } = props;
12
+ const errorTextId = useIdWithFallback(errorTextIdProp);
13
+ const isMobile = useIsMobileBreakpoint();
14
+ const visualCheckboxCount = React.Children.toArray(children).filter((child) => isComponent(child, VisualCheckbox_default)).length;
15
+ const effectiveVariant = isMobile && mobileLineVariantLimit !== void 0 && visualCheckboxCount > mobileLineVariantLimit ? "line" : variant;
16
+ const mapChild = (child) => {
17
+ if (isComponent(child, VisualCheckbox_default)) return React.cloneElement(child, {
18
+ name: child.props.name ?? name,
19
+ variant: child.props.variant ?? effectiveVariant,
20
+ error: !!error || child.props.error,
21
+ errorTextId: child.props.errorTextId ?? errorTextId
22
+ });
23
+ return child;
24
+ };
25
+ return /* @__PURE__ */ jsx(ErrorWrapper_default, {
26
+ className: classNames(errorWrapperClassName, className),
27
+ errorText: error,
28
+ errorTextId,
29
+ renderError,
30
+ errorMessageRef,
31
+ testId: errorWrapperTestId,
32
+ children: /* @__PURE__ */ jsx("div", {
33
+ className: classNames(styles["visual-checkbox-group"], { [styles["visual-checkbox-group--variant-line"]]: effectiveVariant === "line" }),
34
+ "data-testid": testId,
35
+ children: React.Children.map(children, mapChild)
36
+ })
37
+ });
38
+ };
39
+ VisualCheckboxGroup.VisualCheckbox = VisualCheckbox_default;
40
+ var VisualCheckboxGroup_default = VisualCheckboxGroup;
41
+ export { VisualCheckboxGroup, VisualCheckboxGroup_default as default };
42
+
43
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["VisualCheckboxGroup: VisualCheckboxGroupComponent","effectiveVariant: VisualCheckboxVariant | undefined"],"sources":["../../../src/components/VisualCheckboxGroup/VisualCheckboxGroup.tsx","../../../src/components/VisualCheckboxGroup/index.ts"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport type { VisualCheckboxProps, VisualCheckboxVariant } from './VisualCheckbox/VisualCheckbox';\n\nimport VisualCheckbox from './VisualCheckbox/VisualCheckbox';\nimport { useIdWithFallback } from '../../hooks/useIdWithFallback';\nimport { useIsMobileBreakpoint } from '../../hooks/useIsMobileBreakpoint';\nimport { isComponent } from '../../utils/component';\nimport ErrorWrapper from '../ErrorWrapper';\n\nimport styles from './styles.module.scss';\n\nexport interface VisualCheckboxGroupProps {\n /** Items in the group. Should be VisualCheckboxGroup.VisualCheckbox elements. */\n children?: React.ReactNode;\n /** Name shared by all child VisualCheckbox elements (overridable per child) */\n name?: string;\n /** Variant applied to all child VisualCheckbox elements (overridable per child). */\n variant?: VisualCheckboxVariant;\n /** When set and the number of VisualCheckbox children exceeds this limit on the mobile breakpoint, the variant is forced to `line`. */\n mobileLineVariantLimit?: number;\n /** Error message shown above the group */\n error?: string;\n /** Error text id (auto-generated if omitted) */\n errorTextId?: string;\n /** Renders the error component (Default: true) */\n renderError?: boolean;\n /** Ref passed to the error message element */\n errorMessageRef?: React.Ref<HTMLDivElement | null>;\n /** Adds custom classes to the root element. */\n className?: string;\n /** Adds custom classes to the errorWrapper */\n errorWrapperClassName?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Sets the data-testid attribute for the error wrapper */\n errorWrapperTestId?: string;\n}\n\ninterface VisualCheckboxGroupComponent extends React.FC<VisualCheckboxGroupProps> {\n VisualCheckbox: typeof VisualCheckbox;\n}\n\nexport const VisualCheckboxGroup: VisualCheckboxGroupComponent = props => {\n const {\n children,\n name,\n variant = 'rectangle',\n mobileLineVariantLimit,\n error,\n errorTextId: errorTextIdProp,\n renderError = true,\n errorMessageRef,\n className,\n errorWrapperClassName,\n testId,\n errorWrapperTestId,\n } = props;\n\n const errorTextId = useIdWithFallback(errorTextIdProp);\n const isMobile = useIsMobileBreakpoint();\n\n const visualCheckboxCount = React.Children.toArray(children).filter(child =>\n isComponent<VisualCheckboxProps>(child, VisualCheckbox)\n ).length;\n\n const effectiveVariant: VisualCheckboxVariant | undefined =\n isMobile && mobileLineVariantLimit !== undefined && visualCheckboxCount > mobileLineVariantLimit ? 'line' : variant;\n\n const mapChild = (child: React.ReactNode): React.ReactNode => {\n if (isComponent<VisualCheckboxProps>(child, VisualCheckbox)) {\n return React.cloneElement(child, {\n name: child.props.name ?? name,\n variant: child.props.variant ?? effectiveVariant,\n error: !!error || child.props.error,\n errorTextId: child.props.errorTextId ?? errorTextId,\n });\n }\n return child;\n };\n\n return (\n <ErrorWrapper\n className={classNames(errorWrapperClassName, className)}\n errorText={error}\n errorTextId={errorTextId}\n renderError={renderError}\n errorMessageRef={errorMessageRef}\n testId={errorWrapperTestId}\n >\n <div\n className={classNames(styles['visual-checkbox-group'], {\n [styles['visual-checkbox-group--variant-line']]: effectiveVariant === 'line',\n })}\n data-testid={testId}\n >\n {React.Children.map(children, mapChild)}\n </div>\n </ErrorWrapper>\n );\n};\n\nVisualCheckboxGroup.VisualCheckbox = VisualCheckbox;\n\nexport default VisualCheckboxGroup;\n","import VisualCheckboxGroup from './VisualCheckboxGroup';\nexport * from './VisualCheckboxGroup';\nexport default VisualCheckboxGroup;\n"],"mappings":";;;;;;;;;AA6CA,MAAaA,uBAAoD,UAAS;CACxE,MAAM,EACJ,UACA,MACA,UAAU,aACV,wBACA,OACA,aAAa,iBACb,cAAc,MACd,iBACA,WACA,uBACA,QACA,uBACE;CAEJ,MAAM,cAAc,kBAAkB,gBAAgB;CACtD,MAAM,WAAW,uBAAuB;CAExC,MAAM,sBAAsB,MAAM,SAAS,QAAQ,SAAS,CAAC,QAAO,UAClE,YAAiC,OAAO,uBAAe,CACxD,CAAC;CAEF,MAAMC,mBACJ,YAAY,2BAA2B,KAAA,KAAa,sBAAsB,yBAAyB,SAAS;CAE9G,MAAM,YAAY,UAA4C;AAC5D,MAAI,YAAiC,OAAO,uBAAe,CACzD,QAAO,MAAM,aAAa,OAAO;GAC/B,MAAM,MAAM,MAAM,QAAQ;GAC1B,SAAS,MAAM,MAAM,WAAW;GAChC,OAAO,CAAC,CAAC,SAAS,MAAM,MAAM;GAC9B,aAAa,MAAM,MAAM,eAAe;GACzC,CAAC;AAEJ,SAAO;;AAGT,QACE,oBAAC,sBAAA;EACC,WAAW,WAAW,uBAAuB,UAAU;EACvD,WAAW;EACE;EACA;EACI;EACjB,QAAQ;YAER,oBAAC,OAAA;GACC,WAAW,WAAW,OAAO,0BAA0B,GACpD,OAAO,yCAAyC,qBAAqB,QACvE,CAAC;GACF,eAAa;aAEZ,MAAM,SAAS,IAAI,UAAU,SAAS;IACnC;GACO;;AAInB,oBAAoB,iBAAiB;ACtGrC,IAAA,8BDwGe"}
@@ -0,0 +1,6 @@
1
+ @use '../../scss/visual-form' as visual-form;
2
+ @import '../../scss/supernova/styles/spacers.css';
3
+
4
+ .visual-checkbox-group {
5
+ @include visual-form.visual-form-group;
6
+ }
@@ -0,0 +1,10 @@
1
+ export type Styles = {
2
+ 'visual-checkbox-group': string;
3
+ 'visual-checkbox-group--variant-line': string;
4
+ };
5
+
6
+ export type ClassNames = keyof Styles;
7
+
8
+ declare const styles: Styles;
9
+
10
+ export default styles;
@@ -1,5 +1,5 @@
1
1
  import { ErrorWrapperClassNameProps } from '../../ErrorWrapper';
2
- export interface RadioButtonProps extends ErrorWrapperClassNameProps, Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'id' | 'className' | 'children' | 'size' | 'value'> {
2
+ export interface RadioProps extends ErrorWrapperClassNameProps, Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'id' | 'className' | 'children' | 'size' | 'value'> {
3
3
  /** Adds custom classes to the root element. */
4
4
  className?: string;
5
5
  /** Label text shown inside the pill. */
@@ -19,5 +19,5 @@ export interface RadioButtonProps extends ErrorWrapperClassNameProps, Omit<React
19
19
  /** Ref forwarded to the underlying input element. */
20
20
  ref?: React.Ref<HTMLInputElement | null>;
21
21
  }
22
- declare const RadioButton: React.FC<RadioButtonProps>;
23
- export default RadioButton;
22
+ declare const Radio: React.FC<RadioProps>;
23
+ export default Radio;
@@ -0,0 +1,3 @@
1
+ import { default as Radio } from './Radio';
2
+ export * from './Radio';
3
+ export default Radio;
@@ -0,0 +1,5 @@
1
+ import { t as Radio_default$1 } from "../../../Radio.js";
2
+ var Radio_default = Radio_default$1;
3
+ export { Radio_default as default };
4
+
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/VisualRadioCloud/Radio/index.ts"],"sourcesContent":["import Radio from './Radio';\nexport * from './Radio';\nexport default Radio;\n"],"mappings":";AAEA,IAAA,gBAAe"}
@@ -0,0 +1,7 @@
1
+ @use '../../../scss/visual-form' as visual-form;
2
+ @import '../../../scss/supernova/styles/colors.css';
3
+ @import '../../../scss/supernova/styles/spacers.css';
4
+
5
+ .visual-radio {
6
+ @include visual-form.visual-form-pill;
7
+ }
@@ -0,0 +1,15 @@
1
+ export type Styles = {
2
+ 'visual-radio': string;
3
+ 'visual-radio__icon': string;
4
+ 'visual-radio__input': string;
5
+ 'visual-radio__label': string;
6
+ 'visual-radio__pill': string;
7
+ 'visual-radio--checked': string;
8
+ 'visual-radio--invalid': string;
9
+ };
10
+
11
+ export type ClassNames = keyof Styles;
12
+
13
+ declare const styles: Styles;
14
+
15
+ export default styles;
@@ -1,9 +1,9 @@
1
1
  import { default as React } from 'react';
2
- import { default as RadioButton } from './RadioButton/RadioButton';
3
- export interface VisualRadioButtonCloudProps {
4
- /** Items in the cloud. Should be VisualRadioButtonCloud.RadioButton elements. */
2
+ import { default as Radio } from './Radio/Radio';
3
+ export interface VisualRadioCloudProps {
4
+ /** Items in the cloud. Should be VisualRadioCloud.Radio elements. */
5
5
  children?: React.ReactNode;
6
- /** Name shared by all child RadioButton elements (overridable per child). Required for native form grouping. */
6
+ /** Name shared by all child Radio elements (overridable per child). Required for native form grouping. */
7
7
  name?: string;
8
8
  /** Selected value (controlled). */
9
9
  value?: string;
@@ -32,8 +32,8 @@ export interface VisualRadioButtonCloudProps {
32
32
  /** Id of element labelling the radiogroup (e.g. an external Title/legend). */
33
33
  'aria-labelledby'?: string;
34
34
  }
35
- interface VisualRadioButtonCloudComponent extends React.FC<VisualRadioButtonCloudProps> {
36
- RadioButton: typeof RadioButton;
35
+ interface VisualRadioCloudComponent extends React.FC<VisualRadioCloudProps> {
36
+ Radio: typeof Radio;
37
37
  }
38
- export declare const VisualRadioButtonCloud: VisualRadioButtonCloudComponent;
39
- export default VisualRadioButtonCloud;
38
+ export declare const VisualRadioCloud: VisualRadioCloudComponent;
39
+ export default VisualRadioCloud;
@@ -0,0 +1,3 @@
1
+ import { default as VisualRadioCloud } from './VisualRadioCloud';
2
+ export * from './VisualRadioCloud';
3
+ export default VisualRadioCloud;
@@ -1,12 +1,12 @@
1
1
  import { t as isComponent } from "../../component.js";
2
2
  import { t as useIdWithFallback } from "../../useIdWithFallback.js";
3
3
  import { t as ErrorWrapper_default } from "../../ErrorWrapper.js";
4
- import { t as RadioButton_default } from "../../RadioButton2.js";
4
+ import { t as Radio_default } from "../../Radio.js";
5
5
  import classNames from "classnames";
6
6
  import React, { useState } from "react";
7
7
  import { jsx } from "react/jsx-runtime";
8
8
  import styles from "./styles.module.scss";
9
- const VisualRadioButtonCloud = (props) => {
9
+ const VisualRadioCloud = (props) => {
10
10
  const { children, name, value, defaultValue, onChange, error, errorTextId: errorTextIdProp, renderError = true, errorMessageRef, className, errorWrapperClassName, testId, errorWrapperTestId, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy } = props;
11
11
  const errorTextId = useIdWithFallback(errorTextIdProp);
12
12
  const [selectedValue, setSelectedValue] = useState(value ?? defaultValue);
@@ -16,7 +16,7 @@ const VisualRadioButtonCloud = (props) => {
16
16
  if (value !== void 0 && value !== selectedValue) setSelectedValue(value);
17
17
  }
18
18
  const mapChild = (child) => {
19
- if (isComponent(child, RadioButton_default)) {
19
+ if (isComponent(child, Radio_default)) {
20
20
  const isSelected = selectedValue !== void 0 && child.props.value === selectedValue;
21
21
  return React.cloneElement(child, {
22
22
  name: child.props.name ?? name,
@@ -45,14 +45,14 @@ const VisualRadioButtonCloud = (props) => {
45
45
  "aria-labelledby": ariaLabelledBy,
46
46
  "aria-invalid": error ? true : void 0,
47
47
  "aria-describedby": error ? errorTextId : void 0,
48
- className: styles["visual-radio-button-cloud"],
48
+ className: styles["visual-radio-cloud"],
49
49
  "data-testid": testId,
50
50
  children: React.Children.map(children, mapChild)
51
51
  })
52
52
  });
53
53
  };
54
- VisualRadioButtonCloud.RadioButton = RadioButton_default;
55
- var VisualRadioButtonCloud_default = VisualRadioButtonCloud;
56
- export { VisualRadioButtonCloud, VisualRadioButtonCloud_default as default };
54
+ VisualRadioCloud.Radio = Radio_default;
55
+ var VisualRadioCloud_default = VisualRadioCloud;
56
+ export { VisualRadioCloud, VisualRadioCloud_default as default };
57
57
 
58
58
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["VisualRadioCloud: VisualRadioCloudComponent"],"sources":["../../../src/components/VisualRadioCloud/VisualRadioCloud.tsx","../../../src/components/VisualRadioCloud/index.ts"],"sourcesContent":["import React, { useState } from 'react';\n\nimport classNames from 'classnames';\n\nimport type { RadioProps } from './Radio/Radio';\n\nimport Radio from './Radio/Radio';\nimport { useIdWithFallback } from '../../hooks/useIdWithFallback';\nimport { isComponent } from '../../utils/component';\nimport ErrorWrapper from '../ErrorWrapper';\n\nimport styles from './styles.module.scss';\n\nexport interface VisualRadioCloudProps {\n /** Items in the cloud. Should be VisualRadioCloud.Radio elements. */\n children?: React.ReactNode;\n /** Name shared by all child Radio elements (overridable per child). Required for native form grouping. */\n name?: string;\n /** Selected value (controlled). */\n value?: string;\n /** Initial selected value (uncontrolled). */\n defaultValue?: string;\n /** Called when the selected value changes. */\n onChange?: (event: React.ChangeEvent<HTMLInputElement>, value: string) => void;\n /** Error message shown above the cloud */\n error?: string;\n /** Error text id (auto-generated if omitted) */\n errorTextId?: string;\n /** Renders the error component (Default: true) */\n renderError?: boolean;\n /** Ref passed to the error message element */\n errorMessageRef?: React.Ref<HTMLDivElement | null>;\n /** Adds custom classes to the root element. */\n className?: string;\n /** Adds custom classes to the errorWrapper */\n errorWrapperClassName?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Sets the data-testid attribute for the error wrapper */\n errorWrapperTestId?: string;\n /** Accessible label for the radiogroup. Use this or `aria-labelledby` when no external `<legend>` labels the group. */\n 'aria-label'?: string;\n /** Id of element labelling the radiogroup (e.g. an external Title/legend). */\n 'aria-labelledby'?: string;\n}\n\ninterface VisualRadioCloudComponent extends React.FC<VisualRadioCloudProps> {\n Radio: typeof Radio;\n}\n\nexport const VisualRadioCloud: VisualRadioCloudComponent = props => {\n const {\n children,\n name,\n value,\n defaultValue,\n onChange,\n error,\n errorTextId: errorTextIdProp,\n renderError = true,\n errorMessageRef,\n className,\n errorWrapperClassName,\n testId,\n errorWrapperTestId,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n } = props;\n\n const errorTextId = useIdWithFallback(errorTextIdProp);\n const [selectedValue, setSelectedValue] = useState<string | undefined>(value ?? defaultValue);\n const [prevValue, setPrevValue] = useState<string | undefined>(value);\n if (prevValue !== value) {\n setPrevValue(value);\n if (value !== undefined && value !== selectedValue) {\n setSelectedValue(value);\n }\n }\n\n const mapChild = (child: React.ReactNode): React.ReactNode => {\n if (isComponent<RadioProps>(child, Radio)) {\n const isSelected = selectedValue !== undefined && child.props.value === selectedValue;\n return React.cloneElement(child, {\n name: child.props.name ?? name,\n checked: isSelected,\n error: !!error || child.props.error,\n errorTextId: child.props.errorTextId ?? errorTextId,\n onChange: (e: React.ChangeEvent<HTMLInputElement>) => {\n setSelectedValue(child.props.value);\n child.props.onChange?.(e);\n onChange?.(e, child.props.value);\n },\n });\n }\n return child;\n };\n\n return (\n <ErrorWrapper\n className={classNames(errorWrapperClassName, className)}\n errorText={error}\n errorTextId={errorTextId}\n renderError={renderError}\n errorMessageRef={errorMessageRef}\n testId={errorWrapperTestId}\n >\n <div\n role=\"radiogroup\"\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-invalid={error ? true : undefined}\n aria-describedby={error ? errorTextId : undefined}\n className={styles['visual-radio-cloud']}\n data-testid={testId}\n >\n {React.Children.map(children, mapChild)}\n </div>\n </ErrorWrapper>\n );\n};\n\nVisualRadioCloud.Radio = Radio;\n\nexport default VisualRadioCloud;\n","import VisualRadioCloud from './VisualRadioCloud';\nexport * from './VisualRadioCloud';\nexport default VisualRadioCloud;\n"],"mappings":";;;;;;;;AAkDA,MAAaA,oBAA8C,UAAS;CAClE,MAAM,EACJ,UACA,MACA,OACA,cACA,UACA,OACA,aAAa,iBACb,cAAc,MACd,iBACA,WACA,uBACA,QACA,oBACA,cAAc,WACd,mBAAmB,mBACjB;CAEJ,MAAM,cAAc,kBAAkB,gBAAgB;CACtD,MAAM,CAAC,eAAe,oBAAoB,SAA6B,SAAS,aAAa;CAC7F,MAAM,CAAC,WAAW,gBAAgB,SAA6B,MAAM;AACrE,KAAI,cAAc,OAAO;AACvB,eAAa,MAAM;AACnB,MAAI,UAAU,KAAA,KAAa,UAAU,cACnC,kBAAiB,MAAM;;CAI3B,MAAM,YAAY,UAA4C;AAC5D,MAAI,YAAwB,OAAO,cAAM,EAAE;GACzC,MAAM,aAAa,kBAAkB,KAAA,KAAa,MAAM,MAAM,UAAU;AACxE,UAAO,MAAM,aAAa,OAAO;IAC/B,MAAM,MAAM,MAAM,QAAQ;IAC1B,SAAS;IACT,OAAO,CAAC,CAAC,SAAS,MAAM,MAAM;IAC9B,aAAa,MAAM,MAAM,eAAe;IACxC,WAAW,MAA2C;AACpD,sBAAiB,MAAM,MAAM,MAAM;AACnC,WAAM,MAAM,WAAW,EAAE;AACzB,gBAAW,GAAG,MAAM,MAAM,MAAM;;IAEnC,CAAC;;AAEJ,SAAO;;AAGT,QACE,oBAAC,sBAAA;EACC,WAAW,WAAW,uBAAuB,UAAU;EACvD,WAAW;EACE;EACA;EACI;EACjB,QAAQ;YAER,oBAAC,OAAA;GACC,MAAK;GACL,cAAY;GACZ,mBAAiB;GACjB,gBAAc,QAAQ,OAAO,KAAA;GAC7B,oBAAkB,QAAQ,cAAc,KAAA;GACxC,WAAW,OAAO;GAClB,eAAa;aAEZ,MAAM,SAAS,IAAI,UAAU,SAAS;IACnC;GACO;;AAInB,iBAAiB,QAAQ;ACvHzB,IAAA,2BDyHe"}
@@ -0,0 +1,6 @@
1
+ @use '../../scss/visual-form' as visual-form;
2
+ @import '../../scss/supernova/styles/spacers.css';
3
+
4
+ .visual-radio-cloud {
5
+ @include visual-form.visual-form-cloud;
6
+ }
@@ -1,5 +1,5 @@
1
1
  export type Styles = {
2
- 'visual-radio-button-cloud': string;
2
+ 'visual-radio-cloud': string;
3
3
  };
4
4
 
5
5
  export type ClassNames = keyof Styles;
@@ -0,0 +1,10 @@
1
+ export interface VisualContentProps {
2
+ /** Content rendered inside the circular area – typically an <img> or illustration component. */
3
+ children: React.ReactNode;
4
+ /** Adds custom classes to the root element. */
5
+ className?: string;
6
+ /** Sets the data-testid attribute. */
7
+ testId?: string;
8
+ }
9
+ export declare const VisualContent: React.FC<VisualContentProps>;
10
+ export default VisualContent;
@@ -0,0 +1,26 @@
1
+ import { ErrorWrapperClassNameProps } from '../../ErrorWrapper';
2
+ export type VisualRadioVariant = 'line' | 'rectangle';
3
+ export interface VisualRadioProps extends ErrorWrapperClassNameProps, Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'id' | 'className' | 'children' | 'size'> {
4
+ /** Adds custom classes to the root element. */
5
+ className?: string;
6
+ /** Label rendered inside the radio frame. */
7
+ children: string;
8
+ /** Content rendered inside the circular visual slot. */
9
+ visualContent?: React.ReactNode;
10
+ /** Layout variant. `line` is a thin horizontal pill, `rectangle` is a vertical card. */
11
+ variant?: VisualRadioVariant;
12
+ /** input id of the underlying radio */
13
+ inputId?: string;
14
+ /** Activates error styling. Can be true while errorText is empty (e.g. when used in a FormGroup). */
15
+ error?: boolean;
16
+ /** Error text to show above the component. */
17
+ errorText?: string;
18
+ /** Error text id */
19
+ errorTextId?: string;
20
+ /** Sets the data-testid attribute. */
21
+ testId?: string;
22
+ /** Ref forwarded to the underlying input element. */
23
+ ref?: React.Ref<HTMLInputElement | null>;
24
+ }
25
+ declare const VisualRadio: React.FC<VisualRadioProps>;
26
+ export default VisualRadio;
@@ -0,0 +1,3 @@
1
+ import { default as VisualRadio } from './VisualRadio';
2
+ export * from './VisualRadio';
3
+ export default VisualRadio;
@@ -0,0 +1,5 @@
1
+ import { t as VisualRadio_default$1 } from "../../../VisualRadio.js";
2
+ var VisualRadio_default = VisualRadio_default$1;
3
+ export { VisualRadio_default as default };
4
+
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/VisualRadioGroup/VisualRadio/index.ts"],"sourcesContent":["import VisualRadio from './VisualRadio';\nexport * from './VisualRadio';\nexport default VisualRadio;\n"],"mappings":";AAEA,IAAA,sBAAe"}
@@ -0,0 +1,7 @@
1
+ @use '../../../scss/visual-form' as visual-form;
2
+ @import '../../../scss/supernova/styles/colors.css';
3
+ @import '../../../scss/supernova/styles/spacers.css';
4
+
5
+ .visual-radio {
6
+ @include visual-form.visual-form-card;
7
+ }
@@ -0,0 +1,18 @@
1
+ export type Styles = {
2
+ 'visual-radio': string;
3
+ 'visual-radio__frame': string;
4
+ 'visual-radio__icon': string;
5
+ 'visual-radio__input': string;
6
+ 'visual-radio__label': string;
7
+ 'visual-radio__visual-content': string;
8
+ 'visual-radio--checked': string;
9
+ 'visual-radio--invalid': string;
10
+ 'visual-radio--variant-line': string;
11
+ 'visual-radio--variant-rectangle': string;
12
+ };
13
+
14
+ export type ClassNames = keyof Styles;
15
+
16
+ declare const styles: Styles;
17
+
18
+ export default styles;
@@ -0,0 +1,39 @@
1
+ import { default as React } from 'react';
2
+ import { VisualRadioVariant, default as VisualRadio } from './VisualRadio/VisualRadio';
3
+ export interface VisualRadioGroupProps {
4
+ /** Items in the group. Should be VisualRadioGroup.VisualRadio elements. */
5
+ children?: React.ReactNode;
6
+ /** Name shared by all child VisualRadio elements (overridable per child). Auto-generated if omitted. */
7
+ name?: string;
8
+ /** Selected value (controlled). */
9
+ value?: string;
10
+ /** Initial selected value (uncontrolled). */
11
+ defaultValue?: string;
12
+ /** Called when the selected value changes. */
13
+ onChange?: (event: React.ChangeEvent<HTMLInputElement>, value: string) => void;
14
+ /** Variant applied to all child VisualRadio elements (overridable per child). */
15
+ variant?: VisualRadioVariant;
16
+ /** When set and the number of VisualRadio children exceeds this limit on the mobile breakpoint, the variant is forced to `line`. */
17
+ mobileLineVariantLimit?: number;
18
+ /** Error message shown above the group */
19
+ error?: string;
20
+ /** Error text id (auto-generated if omitted) */
21
+ errorTextId?: string;
22
+ /** Renders the error component (Default: true) */
23
+ renderError?: boolean;
24
+ /** Ref passed to the error message element */
25
+ errorMessageRef?: React.Ref<HTMLDivElement | null>;
26
+ /** Adds custom classes to the root element. */
27
+ className?: string;
28
+ /** Adds custom classes to the errorWrapper */
29
+ errorWrapperClassName?: string;
30
+ /** Sets the data-testid attribute. */
31
+ testId?: string;
32
+ /** Sets the data-testid attribute for the error wrapper */
33
+ errorWrapperTestId?: string;
34
+ }
35
+ interface VisualRadioGroupComponent extends React.FC<VisualRadioGroupProps> {
36
+ VisualRadio: typeof VisualRadio;
37
+ }
38
+ export declare const VisualRadioGroup: VisualRadioGroupComponent;
39
+ export default VisualRadioGroup;
@@ -0,0 +1,3 @@
1
+ import { default as VisualRadioGroup } from './VisualRadioGroup';
2
+ export * from './VisualRadioGroup';
3
+ export default VisualRadioGroup;
@@ -0,0 +1,63 @@
1
+ import { t as isComponent } from "../../component.js";
2
+ import { t as useIsMobileBreakpoint } from "../../useIsMobileBreakpoint.js";
3
+ import { t as useIdWithFallback } from "../../useIdWithFallback.js";
4
+ import { t as ErrorWrapper_default } from "../../ErrorWrapper.js";
5
+ import { t as VisualRadio_default } from "../../VisualRadio.js";
6
+ import classNames from "classnames";
7
+ import React from "react";
8
+ import { jsx } from "react/jsx-runtime";
9
+ import styles from "./styles.module.scss";
10
+ const VisualRadioGroup = (props) => {
11
+ const { children, name: nameProp, value, defaultValue, onChange, variant = "rectangle", mobileLineVariantLimit, error, errorTextId: errorTextIdProp, renderError = true, errorMessageRef, className, errorWrapperClassName, testId, errorWrapperTestId } = props;
12
+ const errorTextId = useIdWithFallback(errorTextIdProp);
13
+ const name = useIdWithFallback(nameProp);
14
+ const isMobile = useIsMobileBreakpoint();
15
+ const radioChildren = React.Children.toArray(children).filter((child) => isComponent(child, VisualRadio_default));
16
+ const initialSelected = value ?? defaultValue ?? radioChildren.find((child) => child.props.defaultChecked || child.props.checked)?.props.value?.toString();
17
+ const [selectedValue, setSelectedValue] = React.useState(initialSelected);
18
+ const [prevValue, setPrevValue] = React.useState(value);
19
+ if (prevValue !== value) {
20
+ setPrevValue(value);
21
+ if (value !== void 0 && value !== selectedValue) setSelectedValue(value);
22
+ }
23
+ const effectiveVariant = isMobile && mobileLineVariantLimit !== void 0 && radioChildren.length > mobileLineVariantLimit ? "line" : variant;
24
+ const mapChild = (child) => {
25
+ if (isComponent(child, VisualRadio_default)) {
26
+ const childValue = child.props.value?.toString();
27
+ const isSelected = selectedValue !== void 0 && childValue !== void 0 && childValue === selectedValue;
28
+ const childOnChange = child.props.onChange;
29
+ return React.cloneElement(child, {
30
+ name: child.props.name ?? name,
31
+ variant: child.props.variant ?? effectiveVariant,
32
+ error: !!error || child.props.error,
33
+ errorTextId: child.props.errorTextId ?? errorTextId,
34
+ checked: isSelected,
35
+ onChange: (e) => {
36
+ if (childValue !== void 0) setSelectedValue(childValue);
37
+ childOnChange?.(e);
38
+ if (childValue !== void 0) onChange?.(e, childValue);
39
+ }
40
+ });
41
+ }
42
+ return child;
43
+ };
44
+ return /* @__PURE__ */ jsx(ErrorWrapper_default, {
45
+ className: classNames(errorWrapperClassName, className),
46
+ errorText: error,
47
+ errorTextId,
48
+ renderError,
49
+ errorMessageRef,
50
+ testId: errorWrapperTestId,
51
+ children: /* @__PURE__ */ jsx("div", {
52
+ className: classNames(styles["visual-radio-group"], { [styles["visual-radio-group--variant-line"]]: effectiveVariant === "line" }),
53
+ "data-testid": testId,
54
+ role: "radiogroup",
55
+ children: React.Children.map(children, mapChild)
56
+ })
57
+ });
58
+ };
59
+ VisualRadioGroup.VisualRadio = VisualRadio_default;
60
+ var VisualRadioGroup_default = VisualRadioGroup;
61
+ export { VisualRadioGroup, VisualRadioGroup_default as default };
62
+
63
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["VisualRadioGroup: VisualRadioGroupComponent","effectiveVariant: VisualRadioVariant | undefined"],"sources":["../../../src/components/VisualRadioGroup/VisualRadioGroup.tsx","../../../src/components/VisualRadioGroup/index.ts"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport type { VisualRadioProps, VisualRadioVariant } from './VisualRadio/VisualRadio';\n\nimport VisualRadio from './VisualRadio/VisualRadio';\nimport { useIdWithFallback } from '../../hooks/useIdWithFallback';\nimport { useIsMobileBreakpoint } from '../../hooks/useIsMobileBreakpoint';\nimport { isComponent } from '../../utils/component';\nimport ErrorWrapper from '../ErrorWrapper';\n\nimport styles from './styles.module.scss';\n\nexport interface VisualRadioGroupProps {\n /** Items in the group. Should be VisualRadioGroup.VisualRadio elements. */\n children?: React.ReactNode;\n /** Name shared by all child VisualRadio elements (overridable per child). Auto-generated if omitted. */\n name?: string;\n /** Selected value (controlled). */\n value?: string;\n /** Initial selected value (uncontrolled). */\n defaultValue?: string;\n /** Called when the selected value changes. */\n onChange?: (event: React.ChangeEvent<HTMLInputElement>, value: string) => void;\n /** Variant applied to all child VisualRadio elements (overridable per child). */\n variant?: VisualRadioVariant;\n /** When set and the number of VisualRadio children exceeds this limit on the mobile breakpoint, the variant is forced to `line`. */\n mobileLineVariantLimit?: number;\n /** Error message shown above the group */\n error?: string;\n /** Error text id (auto-generated if omitted) */\n errorTextId?: string;\n /** Renders the error component (Default: true) */\n renderError?: boolean;\n /** Ref passed to the error message element */\n errorMessageRef?: React.Ref<HTMLDivElement | null>;\n /** Adds custom classes to the root element. */\n className?: string;\n /** Adds custom classes to the errorWrapper */\n errorWrapperClassName?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Sets the data-testid attribute for the error wrapper */\n errorWrapperTestId?: string;\n}\n\ninterface VisualRadioGroupComponent extends React.FC<VisualRadioGroupProps> {\n VisualRadio: typeof VisualRadio;\n}\n\nexport const VisualRadioGroup: VisualRadioGroupComponent = props => {\n const {\n children,\n name: nameProp,\n value,\n defaultValue,\n onChange,\n variant = 'rectangle',\n mobileLineVariantLimit,\n error,\n errorTextId: errorTextIdProp,\n renderError = true,\n errorMessageRef,\n className,\n errorWrapperClassName,\n testId,\n errorWrapperTestId,\n } = props;\n\n const errorTextId = useIdWithFallback(errorTextIdProp);\n const name = useIdWithFallback(nameProp);\n const isMobile = useIsMobileBreakpoint();\n\n const childArray = React.Children.toArray(children);\n const radioChildren = childArray.filter((child): child is React.ReactElement<VisualRadioProps> =>\n isComponent<VisualRadioProps>(child, VisualRadio)\n );\n\n const initialSelected =\n value ?? defaultValue ?? radioChildren.find(child => child.props.defaultChecked || child.props.checked)?.props.value?.toString();\n\n const [selectedValue, setSelectedValue] = React.useState<string | undefined>(initialSelected);\n const [prevValue, setPrevValue] = React.useState<string | undefined>(value);\n if (prevValue !== value) {\n setPrevValue(value);\n if (value !== undefined && value !== selectedValue) {\n setSelectedValue(value);\n }\n }\n\n const effectiveVariant: VisualRadioVariant | undefined =\n isMobile && mobileLineVariantLimit !== undefined && radioChildren.length > mobileLineVariantLimit ? 'line' : variant;\n\n const mapChild = (child: React.ReactNode): React.ReactNode => {\n if (isComponent<VisualRadioProps>(child, VisualRadio)) {\n const childValue = child.props.value?.toString();\n const isSelected = selectedValue !== undefined && childValue !== undefined && childValue === selectedValue;\n const childOnChange = child.props.onChange;\n\n return React.cloneElement(child, {\n name: child.props.name ?? name,\n variant: child.props.variant ?? effectiveVariant,\n error: !!error || child.props.error,\n errorTextId: child.props.errorTextId ?? errorTextId,\n checked: isSelected,\n onChange: (e: React.ChangeEvent<HTMLInputElement>): void => {\n if (childValue !== undefined) {\n setSelectedValue(childValue);\n }\n childOnChange?.(e);\n if (childValue !== undefined) {\n onChange?.(e, childValue);\n }\n },\n });\n }\n return child;\n };\n\n return (\n <ErrorWrapper\n className={classNames(errorWrapperClassName, className)}\n errorText={error}\n errorTextId={errorTextId}\n renderError={renderError}\n errorMessageRef={errorMessageRef}\n testId={errorWrapperTestId}\n >\n <div\n className={classNames(styles['visual-radio-group'], {\n [styles['visual-radio-group--variant-line']]: effectiveVariant === 'line',\n })}\n data-testid={testId}\n role={'radiogroup'}\n >\n {React.Children.map(children, mapChild)}\n </div>\n </ErrorWrapper>\n );\n};\n\nVisualRadioGroup.VisualRadio = VisualRadio;\n\nexport default VisualRadioGroup;\n","import VisualRadioGroup from './VisualRadioGroup';\nexport * from './VisualRadioGroup';\nexport default VisualRadioGroup;\n"],"mappings":";;;;;;;;;AAmDA,MAAaA,oBAA8C,UAAS;CAClE,MAAM,EACJ,UACA,MAAM,UACN,OACA,cACA,UACA,UAAU,aACV,wBACA,OACA,aAAa,iBACb,cAAc,MACd,iBACA,WACA,uBACA,QACA,uBACE;CAEJ,MAAM,cAAc,kBAAkB,gBAAgB;CACtD,MAAM,OAAO,kBAAkB,SAAS;CACxC,MAAM,WAAW,uBAAuB;CAGxC,MAAM,gBADa,MAAM,SAAS,QAAQ,SAAS,CAClB,QAAQ,UACvC,YAA8B,OAAO,oBAAY,CAClD;CAED,MAAM,kBACJ,SAAS,gBAAgB,cAAc,MAAK,UAAS,MAAM,MAAM,kBAAkB,MAAM,MAAM,QAAQ,EAAE,MAAM,OAAO,UAAU;CAElI,MAAM,CAAC,eAAe,oBAAoB,MAAM,SAA6B,gBAAgB;CAC7F,MAAM,CAAC,WAAW,gBAAgB,MAAM,SAA6B,MAAM;AAC3E,KAAI,cAAc,OAAO;AACvB,eAAa,MAAM;AACnB,MAAI,UAAU,KAAA,KAAa,UAAU,cACnC,kBAAiB,MAAM;;CAI3B,MAAMC,mBACJ,YAAY,2BAA2B,KAAA,KAAa,cAAc,SAAS,yBAAyB,SAAS;CAE/G,MAAM,YAAY,UAA4C;AAC5D,MAAI,YAA8B,OAAO,oBAAY,EAAE;GACrD,MAAM,aAAa,MAAM,MAAM,OAAO,UAAU;GAChD,MAAM,aAAa,kBAAkB,KAAA,KAAa,eAAe,KAAA,KAAa,eAAe;GAC7F,MAAM,gBAAgB,MAAM,MAAM;AAElC,UAAO,MAAM,aAAa,OAAO;IAC/B,MAAM,MAAM,MAAM,QAAQ;IAC1B,SAAS,MAAM,MAAM,WAAW;IAChC,OAAO,CAAC,CAAC,SAAS,MAAM,MAAM;IAC9B,aAAa,MAAM,MAAM,eAAe;IACxC,SAAS;IACT,WAAW,MAAiD;AAC1D,SAAI,eAAe,KAAA,EACjB,kBAAiB,WAAW;AAE9B,qBAAgB,EAAE;AAClB,SAAI,eAAe,KAAA,EACjB,YAAW,GAAG,WAAW;;IAG9B,CAAC;;AAEJ,SAAO;;AAGT,QACE,oBAAC,sBAAA;EACC,WAAW,WAAW,uBAAuB,UAAU;EACvD,WAAW;EACE;EACA;EACI;EACjB,QAAQ;YAER,oBAAC,OAAA;GACC,WAAW,WAAW,OAAO,uBAAuB,GACjD,OAAO,sCAAsC,qBAAqB,QACpE,CAAC;GACF,eAAa;GACb,MAAM;aAEL,MAAM,SAAS,IAAI,UAAU,SAAS;IACnC;GACO;;AAInB,iBAAiB,cAAc;AC5I/B,IAAA,2BD8Ie"}
@@ -0,0 +1,6 @@
1
+ @use '../../scss/visual-form' as visual-form;
2
+ @import '../../scss/supernova/styles/spacers.css';
3
+
4
+ .visual-radio-group {
5
+ @include visual-form.visual-form-group;
6
+ }
@@ -0,0 +1,10 @@
1
+ export type Styles = {
2
+ 'visual-radio-group': string;
3
+ 'visual-radio-group--variant-line': string;
4
+ };
5
+
6
+ export type ClassNames = keyof Styles;
7
+
8
+ declare const styles: Styles;
9
+
10
+ export default styles;