@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.
- package/lib/BabyMobileMedium.js +1 -1
- package/lib/CHANGELOG.md +10 -0
- package/lib/Checkbox.js +25 -48
- package/lib/Checkbox.js.map +1 -1
- package/lib/CheckboxMarker.js +60 -0
- package/lib/CheckboxMarker.js.map +1 -0
- package/lib/ChildMedium.js +1 -1
- package/lib/EyeContactMedium.js +79 -0
- package/lib/EyeContactMedium.js.map +1 -0
- package/lib/FacialRecognitionFingerprintMedium.js +1 -1
- package/lib/FormGroup.js +5 -5
- package/lib/FormGroup.js.map +1 -1
- package/lib/GiveBabyFoodMedium.js +1 -1
- package/lib/Illustration.js +1 -1
- package/lib/IllustrationNames.js +4 -0
- package/lib/IllustrationNames.js.map +1 -1
- package/lib/LazyIllustration.js +5 -1
- package/lib/LazyIllustration.js.map +1 -1
- package/lib/Radio.js +73 -0
- package/lib/Radio.js.map +1 -0
- package/lib/RadioButton.js +95 -3
- package/lib/RadioButton.js.map +1 -1
- package/lib/RadioButton2.js +3 -73
- package/lib/RadioButton2.js.map +1 -1
- package/lib/RadioMarker.js +37 -0
- package/lib/RadioMarker.js.map +1 -0
- package/lib/ReadLettersMedium.js +1 -1
- package/lib/SkinToSkinMedium.js +106 -0
- package/lib/SkinToSkinMedium.js.map +1 -0
- package/lib/StorkMedium.js +1 -1
- package/lib/StrollerMedium.js +1 -1
- package/lib/Support2Medium.js +1 -1
- package/lib/TableBody.js +1 -1
- package/lib/TableHead.js +1 -1
- package/lib/TableRow.js +1 -1
- package/lib/ThinkingMedium.js +1 -1
- package/lib/VisualCheckbox.js +77 -0
- package/lib/VisualCheckbox.js.map +1 -0
- package/lib/VisualRadio.js +77 -0
- package/lib/VisualRadio.js.map +1 -0
- package/lib/components/Checkbox/CheckboxMarker/CheckboxMarker.d.ts +20 -0
- package/lib/components/Checkbox/CheckboxMarker/styles.module.scss +309 -0
- package/lib/components/Checkbox/CheckboxMarker/styles.module.scss.d.ts +25 -0
- package/lib/components/Checkbox/styles.module.scss +9 -269
- package/lib/components/Checkbox/styles.module.scss.d.ts +1 -17
- package/lib/components/Illustration/index.js +1 -1
- package/lib/components/Illustrations/BabyMobile.js +1 -1
- package/lib/components/Illustrations/Child.js +1 -1
- package/lib/components/Illustrations/Doctor.js +1 -1
- package/lib/components/Illustrations/EyeContact.d.ts +8 -0
- package/lib/components/Illustrations/EyeContact.js +16 -0
- package/lib/components/Illustrations/EyeContact.js.map +1 -0
- package/lib/components/Illustrations/EyeContactMedium.d.ts +3 -0
- package/lib/components/Illustrations/EyeContactMedium.js +2 -0
- package/lib/components/Illustrations/FacialRecognitionFingerprint.js +1 -1
- package/lib/components/Illustrations/GiveBabyFood.js +1 -1
- package/lib/components/Illustrations/HealthcarePersonnel.js +1 -1
- package/lib/components/Illustrations/IllustrationNames.d.ts +1 -1
- package/lib/components/Illustrations/ReadLetters.js +1 -1
- package/lib/components/Illustrations/SkinToSkin.d.ts +8 -0
- package/lib/components/Illustrations/SkinToSkin.js +16 -0
- package/lib/components/Illustrations/SkinToSkin.js.map +1 -0
- package/lib/components/Illustrations/SkinToSkinMedium.d.ts +3 -0
- package/lib/components/Illustrations/SkinToSkinMedium.js +2 -0
- package/lib/components/Illustrations/Stork.js +1 -1
- package/lib/components/Illustrations/Stroller.js +1 -1
- package/lib/components/Illustrations/Support2.js +1 -1
- package/lib/components/Illustrations/Thinking.js +1 -1
- package/lib/components/Panel/index.js +1 -1
- package/lib/components/PanelList/index.js +1 -1
- package/lib/components/RadioButton/RadioMarker/RadioMarker.d.ts +20 -0
- package/lib/components/RadioButton/RadioMarker/styles.module.scss +259 -0
- package/lib/components/RadioButton/RadioMarker/styles.module.scss.d.ts +24 -0
- package/lib/components/RadioButton/index.d.ts +0 -1
- package/lib/components/RadioButton/index.js +3 -3
- package/lib/components/RadioButton/styles.module.scss +11 -273
- package/lib/components/RadioButton/styles.module.scss.d.ts +1 -9
- package/lib/components/Table/index.js +1 -1
- package/lib/components/Validation/index.js +1 -1
- package/lib/components/VisualCheckboxCloud/Checkbox/styles.module.scss +5 -128
- package/lib/components/VisualCheckboxCloud/styles.module.scss +2 -9
- package/lib/components/VisualCheckboxGroup/VisualCheckbox/VisualCheckbox.d.ts +26 -0
- package/lib/components/VisualCheckboxGroup/VisualCheckbox/VisualContent.d.ts +10 -0
- package/lib/components/VisualCheckboxGroup/VisualCheckbox/index.d.ts +3 -0
- package/lib/components/VisualCheckboxGroup/VisualCheckbox/index.js +5 -0
- package/lib/components/VisualCheckboxGroup/VisualCheckbox/index.js.map +1 -0
- package/lib/components/VisualCheckboxGroup/VisualCheckbox/styles.module.scss +7 -0
- package/lib/components/VisualCheckboxGroup/VisualCheckbox/styles.module.scss.d.ts +18 -0
- package/lib/components/VisualCheckboxGroup/VisualCheckboxGroup.d.ts +33 -0
- package/lib/components/VisualCheckboxGroup/index.d.ts +3 -0
- package/lib/components/VisualCheckboxGroup/index.js +43 -0
- package/lib/components/VisualCheckboxGroup/index.js.map +1 -0
- package/lib/components/VisualCheckboxGroup/styles.module.scss +6 -0
- package/lib/components/VisualCheckboxGroup/styles.module.scss.d.ts +10 -0
- package/lib/components/{VisualRadioButtonCloud/RadioButton/RadioButton.d.ts → VisualRadioCloud/Radio/Radio.d.ts} +3 -3
- package/lib/components/VisualRadioCloud/Radio/index.d.ts +3 -0
- package/lib/components/VisualRadioCloud/Radio/index.js +5 -0
- package/lib/components/VisualRadioCloud/Radio/index.js.map +1 -0
- package/lib/components/VisualRadioCloud/Radio/styles.module.scss +7 -0
- package/lib/components/VisualRadioCloud/Radio/styles.module.scss.d.ts +15 -0
- package/lib/components/{VisualRadioButtonCloud/VisualRadioButtonCloud.d.ts → VisualRadioCloud/VisualRadioCloud.d.ts} +8 -8
- package/lib/components/VisualRadioCloud/index.d.ts +3 -0
- package/lib/components/{VisualRadioButtonCloud → VisualRadioCloud}/index.js +7 -7
- package/lib/components/VisualRadioCloud/index.js.map +1 -0
- package/lib/components/VisualRadioCloud/styles.module.scss +6 -0
- package/lib/components/{VisualRadioButtonCloud → VisualRadioCloud}/styles.module.scss.d.ts +1 -1
- package/lib/components/VisualRadioGroup/VisualRadio/VisualContent.d.ts +10 -0
- package/lib/components/VisualRadioGroup/VisualRadio/VisualRadio.d.ts +26 -0
- package/lib/components/VisualRadioGroup/VisualRadio/index.d.ts +3 -0
- package/lib/components/VisualRadioGroup/VisualRadio/index.js +5 -0
- package/lib/components/VisualRadioGroup/VisualRadio/index.js.map +1 -0
- package/lib/components/VisualRadioGroup/VisualRadio/styles.module.scss +7 -0
- package/lib/components/VisualRadioGroup/VisualRadio/styles.module.scss.d.ts +18 -0
- package/lib/components/VisualRadioGroup/VisualRadioGroup.d.ts +39 -0
- package/lib/components/VisualRadioGroup/index.d.ts +3 -0
- package/lib/components/VisualRadioGroup/index.js +63 -0
- package/lib/components/VisualRadioGroup/index.js.map +1 -0
- package/lib/components/VisualRadioGroup/styles.module.scss +6 -0
- package/lib/components/VisualRadioGroup/styles.module.scss.d.ts +10 -0
- package/lib/scss/_visual-form.scss +345 -0
- package/lib/utils3.js +10 -98
- package/lib/utils3.js.map +1 -1
- package/lib/utils4.js +28 -11
- package/lib/utils4.js.map +1 -1
- package/lib/utils5.js +58 -28
- package/lib/utils5.js.map +1 -1
- package/package.json +115 -1
- package/scss/_visual-form.scss +345 -0
- package/lib/components/RadioButton/utils.d.ts +0 -2
- package/lib/components/VisualRadioButtonCloud/RadioButton/index.d.ts +0 -3
- package/lib/components/VisualRadioButtonCloud/RadioButton/index.js +0 -5
- package/lib/components/VisualRadioButtonCloud/RadioButton/index.js.map +0 -1
- package/lib/components/VisualRadioButtonCloud/RadioButton/styles.module.scss +0 -133
- package/lib/components/VisualRadioButtonCloud/RadioButton/styles.module.scss.d.ts +0 -15
- package/lib/components/VisualRadioButtonCloud/index.d.ts +0 -3
- package/lib/components/VisualRadioButtonCloud/index.js.map +0 -1
- package/lib/components/VisualRadioButtonCloud/styles.module.scss +0 -13
- package/lib/utils6.js +0 -60
- package/lib/utils6.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as getIllustration } from "../../
|
|
1
|
+
import { n as getIllustration } from "../../utils3.js";
|
|
2
2
|
import { t as DoctorMedium_default } from "../../DoctorMedium.js";
|
|
3
3
|
import { t as DoctorSmall_default } from "../../DoctorSmall.js";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { n as getIllustration } from "../../utils3.js";
|
|
2
|
+
import { t as EyeContactMedium_default } from "../../EyeContactMedium.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
var EyeContact = ({ size = 512, color, ...rest }) => {
|
|
5
|
+
return getIllustration({
|
|
6
|
+
size,
|
|
7
|
+
medium: /* @__PURE__ */ jsx(EyeContactMedium_default, {
|
|
8
|
+
color,
|
|
9
|
+
...rest
|
|
10
|
+
})
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var EyeContact_default = EyeContact;
|
|
14
|
+
export { EyeContact_default as default };
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=EyeContact.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EyeContact.js","names":["EyeContact: React.FC<SvgIllustrationProps>"],"sources":["../../../src/components/Illustrations/EyeContact.tsx"],"sourcesContent":["import type { SvgIllustrationProps } from '../Illustration';\n\nimport EyeContactMedium from './EyeContactMedium';\nimport { getIllustration } from '../Illustration/utils';\n\nexport interface Palette {\n skin: string;\n mother: string;\n baby: string;\n}\n\nconst EyeContact: React.FC<SvgIllustrationProps> = ({ size = 512, color, ...rest }) => {\n const medium = <EyeContactMedium color={color} {...rest} />;\n\n return getIllustration({ size, medium });\n};\n\nexport default EyeContact;\n"],"mappings":";;;AAWA,IAAMA,cAA8C,EAAE,OAAO,KAAK,OAAO,GAAG,WAAW;AAGrF,QAAO,gBAAgB;EAAE;EAAM,QAFhB,oBAAC,0BAAA;GAAwB;GAAO,GAAI;IAAQ;EAEpB,CAAC;;AAG1C,IAAA,qBAAe"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as getIllustration } from "../../
|
|
1
|
+
import { n as getIllustration } from "../../utils3.js";
|
|
2
2
|
import { t as FacialRecognitionFingerprintMedium_default } from "../../FacialRecognitionFingerprintMedium.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
var FacialRecognitionFingerprint = ({ size = 512, color, ...rest }) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as getIllustration } from "../../
|
|
1
|
+
import { n as getIllustration } from "../../utils3.js";
|
|
2
2
|
import { t as GiveBabyFoodMedium_default } from "../../GiveBabyFoodMedium.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
var GiveBabyFood = ({ size = 512, color, ...rest }) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as getIllustration } from "../../
|
|
1
|
+
import { n as getIllustration } from "../../utils3.js";
|
|
2
2
|
import { t as HealthcarePersonnelMedium_default } from "../../HealthcarePersonnelMedium.js";
|
|
3
3
|
import { t as HealthcarePersonnelSmall_default } from "../../HealthcarePersonnelSmall.js";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** AUTO-GENERATED - DO NOT CHANGE MANUALLY **/
|
|
2
|
-
export declare const IllustrationList: readonly ["BabyMobile", "Child", "Doctor", "FacialRecognitionFingerprint", "GiveBabyFood", "HealthcarePersonnel", "ReadLetters", "Stork", "Stroller", "Support2", "Thinking"];
|
|
2
|
+
export declare const IllustrationList: readonly ["BabyMobile", "Child", "Doctor", "EyeContact", "FacialRecognitionFingerprint", "GiveBabyFood", "HealthcarePersonnel", "ReadLetters", "SkinToSkin", "Stork", "Stroller", "Support2", "Thinking"];
|
|
3
3
|
export interface IllustrationSize {
|
|
4
4
|
small?: string;
|
|
5
5
|
medium?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as getIllustration } from "../../
|
|
1
|
+
import { n as getIllustration } from "../../utils3.js";
|
|
2
2
|
import { t as ReadLettersMedium_default } from "../../ReadLettersMedium.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
var ReadLetters = ({ size = 512, color, ...rest }) => {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { n as getIllustration } from "../../utils3.js";
|
|
2
|
+
import { t as SkinToSkinMedium_default } from "../../SkinToSkinMedium.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
var SkinToSkin = ({ size = 512, color, ...rest }) => {
|
|
5
|
+
return getIllustration({
|
|
6
|
+
size,
|
|
7
|
+
medium: /* @__PURE__ */ jsx(SkinToSkinMedium_default, {
|
|
8
|
+
color,
|
|
9
|
+
...rest
|
|
10
|
+
})
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var SkinToSkin_default = SkinToSkin;
|
|
14
|
+
export { SkinToSkin_default as default };
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=SkinToSkin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SkinToSkin.js","names":["SkinToSkin: React.FC<SvgIllustrationProps>"],"sources":["../../../src/components/Illustrations/SkinToSkin.tsx"],"sourcesContent":["import type { SvgIllustrationProps } from '../Illustration';\n\nimport SkinToSkinMedium from './SkinToSkinMedium';\nimport { getIllustration } from '../Illustration/utils';\n\nexport interface Palette {\n hair: string;\n skin: string;\n clothes: string;\n}\n\nconst SkinToSkin: React.FC<SvgIllustrationProps> = ({ size = 512, color, ...rest }) => {\n const medium = <SkinToSkinMedium color={color} {...rest} />;\n\n return getIllustration({ size, medium });\n};\n\nexport default SkinToSkin;\n"],"mappings":";;;AAWA,IAAMA,cAA8C,EAAE,OAAO,KAAK,OAAO,GAAG,WAAW;AAGrF,QAAO,gBAAgB;EAAE;EAAM,QAFhB,oBAAC,0BAAA;GAAwB;GAAO,GAAI;IAAQ;EAEpB,CAAC;;AAG1C,IAAA,qBAAe"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as getIllustration } from "../../
|
|
1
|
+
import { n as getIllustration } from "../../utils3.js";
|
|
2
2
|
import { t as StorkMedium_default } from "../../StorkMedium.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
var Stork = ({ size = 512, color, ...rest }) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as getIllustration } from "../../
|
|
1
|
+
import { n as getIllustration } from "../../utils3.js";
|
|
2
2
|
import { t as StrollerMedium_default } from "../../StrollerMedium.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
var Stroller = ({ size = 512, color, ...rest }) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as getIllustration } from "../../
|
|
1
|
+
import { n as getIllustration } from "../../utils3.js";
|
|
2
2
|
import { t as Support2Medium_default } from "../../Support2Medium.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
var Support2 = ({ size = 512, color, ...rest }) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as getIllustration } from "../../
|
|
1
|
+
import { n as getIllustration } from "../../utils3.js";
|
|
2
2
|
import { t as ThinkingMedium_default } from "../../ThinkingMedium.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
var Thinking = ({ size = 512, color, ...rest }) => {
|
|
@@ -8,7 +8,7 @@ import { t as ChevronUp_default } from "../../ChevronUp.js";
|
|
|
8
8
|
import { t as Highlighter_default } from "../../Highlighter.js";
|
|
9
9
|
import { t as useExpand } from "../../useExpand.js";
|
|
10
10
|
import { t as ChevronRight_default } from "../../ChevronRight.js";
|
|
11
|
-
import { a as PanelVariant, i as PanelStatus, n as PanelLayout, r as PanelStacking, t as PanelListContext } from "../../
|
|
11
|
+
import { a as PanelVariant, i as PanelStatus, n as PanelLayout, r as PanelStacking, t as PanelListContext } from "../../utils4.js";
|
|
12
12
|
import { t as PanelTitle_default } from "../../PanelTitle.js";
|
|
13
13
|
import classNames from "classnames";
|
|
14
14
|
import React from "react";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as AnalyticsId } from "../../constants2.js";
|
|
2
|
-
import { a as PanelVariant, t as PanelListContext } from "../../
|
|
2
|
+
import { a as PanelVariant, t as PanelListContext } from "../../utils4.js";
|
|
3
3
|
import classNames from "classnames";
|
|
4
4
|
import React from "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { FormOnColor, FormSize } from '../../../constants';
|
|
2
|
+
export interface RadioMarkerProps {
|
|
3
|
+
/** Whether the radio is checked. Controls the inner dot visibility. */
|
|
4
|
+
checked?: boolean;
|
|
5
|
+
/** Disables the visual state of the marker. */
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
/** Activates error styling. */
|
|
8
|
+
error?: boolean;
|
|
9
|
+
/** Background context the marker is rendered on. */
|
|
10
|
+
onColor?: keyof typeof FormOnColor;
|
|
11
|
+
/** Size variant of the marker. */
|
|
12
|
+
size?: keyof typeof FormSize;
|
|
13
|
+
/** Adds custom classes to the marker wrapper. */
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Does not render an <input>; consumers render this on their end.
|
|
18
|
+
*/
|
|
19
|
+
export declare const RadioMarker: React.FC<RadioMarkerProps>;
|
|
20
|
+
export default RadioMarker;
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
@use '../../../scss/spacers' as spacers;
|
|
2
|
+
@use '../../../scss/palette' as palette;
|
|
3
|
+
@use 'sass:meta';
|
|
4
|
+
@use 'sass:string';
|
|
5
|
+
|
|
6
|
+
@mixin dashed-border() {
|
|
7
|
+
box-shadow: none;
|
|
8
|
+
position: relative;
|
|
9
|
+
|
|
10
|
+
&::after {
|
|
11
|
+
position: absolute;
|
|
12
|
+
content: '';
|
|
13
|
+
|
|
14
|
+
$encoded-color: string.slice(meta.inspect(palette.$neutral600), 2);
|
|
15
|
+
|
|
16
|
+
// Variabler for å lettere styre dashen i background-imaget under
|
|
17
|
+
$stroke: 4;
|
|
18
|
+
$dash: 0.2;
|
|
19
|
+
$gap: 7;
|
|
20
|
+
$scale: 1;
|
|
21
|
+
$stroke-scaled: $stroke * $scale;
|
|
22
|
+
$dash-scaled: $dash * $scale;
|
|
23
|
+
$gap-scaled: $gap * $scale;
|
|
24
|
+
|
|
25
|
+
border-radius: 100px;
|
|
26
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25'%3E%3Crect width='100%25' height='100%25' fill='none' rx='100' ry='100' stroke='%23#{$encoded-color}' stroke-width='#{$stroke-scaled}' stroke-dasharray='#{$dash-scaled},#{$gap-scaled}' stroke-linecap='square'/%3E%3C/svg%3E");
|
|
27
|
+
background-repeat: no-repeat;
|
|
28
|
+
width: 28px;
|
|
29
|
+
height: 28px;
|
|
30
|
+
inset: -2px;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.radio {
|
|
35
|
+
&__marker {
|
|
36
|
+
display: flex;
|
|
37
|
+
justify-content: center;
|
|
38
|
+
align-items: center;
|
|
39
|
+
border-radius: 10rem;
|
|
40
|
+
height: 1.5rem;
|
|
41
|
+
width: 1.5rem;
|
|
42
|
+
min-height: 1.5rem;
|
|
43
|
+
min-width: 1.5rem;
|
|
44
|
+
color: palette.$neutral700;
|
|
45
|
+
box-shadow: 0 0 0 spacers.getSpacer(4xs);
|
|
46
|
+
|
|
47
|
+
// Vi overstyrer farger satt ved high-contrast mode i nettleser/os
|
|
48
|
+
@media (forced-colors: active) {
|
|
49
|
+
forced-color-adjust: none;
|
|
50
|
+
background-color: transparent !important;
|
|
51
|
+
color: #fff !important;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&--on-blueberry {
|
|
55
|
+
color: palette.$blueberry500;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&--on-dark {
|
|
59
|
+
color: palette.$neutral200;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&--invalid {
|
|
63
|
+
color: palette.$cherry600;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&__regular {
|
|
67
|
+
&--checked {
|
|
68
|
+
color: palette.$blueberry500;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&--checked--invalid {
|
|
72
|
+
color: palette.$cherry600;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&--checked--on-dark {
|
|
76
|
+
color: palette.$blueberry200;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&--checked--disabled {
|
|
80
|
+
color: palette.$neutral600;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&__large {
|
|
85
|
+
&--checked {
|
|
86
|
+
color: palette.$blueberry100;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&--checked--invalid {
|
|
90
|
+
color: palette.$cherry500;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&--checked--disabled {
|
|
94
|
+
color: palette.$neutral600;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&--disabled,
|
|
99
|
+
&--disabled#{&}--invalid,
|
|
100
|
+
&--disabled#{&}--on-dark {
|
|
101
|
+
@include dashed-border;
|
|
102
|
+
|
|
103
|
+
background-color: transparent;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// Focus styles when an input inside the wrapping label is focus-visible
|
|
107
|
+
label:has(:focus-visible) &#{&} {
|
|
108
|
+
box-shadow: 0 0 0 spacers.getSpacer(3xs);
|
|
109
|
+
color: palette.$black;
|
|
110
|
+
|
|
111
|
+
&--on-dark {
|
|
112
|
+
color: palette.$white;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
&__regular--checked {
|
|
116
|
+
color: palette.$black;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
&__regular--checked--on-dark {
|
|
120
|
+
color: palette.$white;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
&__large--checked {
|
|
124
|
+
color: palette.$white;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
&__large--checked--invalid {
|
|
128
|
+
color: palette.$black;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// Hover styles via wrapping label
|
|
133
|
+
label:hover &,
|
|
134
|
+
label:active & {
|
|
135
|
+
box-shadow: 0 0 0 spacers.getSpacer(3xs);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
label:hover &--on-white,
|
|
139
|
+
label:hover &--on-grey {
|
|
140
|
+
background-color: palette.$neutral100;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
label:active &--on-white,
|
|
144
|
+
label:active &--on-grey {
|
|
145
|
+
background-color: palette.$blueberry100;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
label:hover &--on-blueberry {
|
|
149
|
+
background-color: palette.$blueberry100;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
label:active &--on-blueberry {
|
|
153
|
+
background-color: palette.$blueberry200;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
label:hover &--on-invalid {
|
|
157
|
+
background-color: palette.$cherry100;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
label:active &--on-invalid {
|
|
161
|
+
background-color: palette.$cherry200;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
label:hover &--on-dark {
|
|
165
|
+
background-color: palette.$inverted-hover-old;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
label:hover &__regular--checked {
|
|
169
|
+
background-color: palette.$blueberry50;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
label:active &__regular--checked {
|
|
173
|
+
background-color: palette.$blueberry100;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
label:hover &__regular--checked--invalid {
|
|
177
|
+
background-color: palette.$cherry100;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
label:active &__regular--checked--invalid {
|
|
181
|
+
background-color: palette.$cherry200;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
label:hover &__regular--checked--on-dark {
|
|
185
|
+
background-color: palette.$inverted-hover-old;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
label:hover &__large--checked {
|
|
189
|
+
background-color: unset;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
label:hover &__large--checked--invalid {
|
|
193
|
+
background-color: transparent;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
label:hover &--disabled,
|
|
197
|
+
label:hover &--disabled#{&}--invalid,
|
|
198
|
+
label:hover &--disabled#{&}--on-dark {
|
|
199
|
+
box-shadow: none;
|
|
200
|
+
background-color: transparent;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
&__marker-dot {
|
|
205
|
+
display: block;
|
|
206
|
+
background-color: palette.$blueberry500;
|
|
207
|
+
width: 0.875rem;
|
|
208
|
+
height: 0.875rem;
|
|
209
|
+
border-radius: 10rem;
|
|
210
|
+
|
|
211
|
+
// Vi overstyrer farger satt ved high-contrast mode i nettleser/os
|
|
212
|
+
@media (forced-colors: active) {
|
|
213
|
+
forced-color-adjust: none;
|
|
214
|
+
background-color: #fff !important;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
// Dot color follows the marker state (so the focus ring can turn black
|
|
219
|
+
// without recoloring the dot).
|
|
220
|
+
&__marker--on-dark &__marker-dot {
|
|
221
|
+
background-color: palette.$blueberry200;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
&__marker--invalid &__marker-dot {
|
|
225
|
+
background-color: palette.$cherry600;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
&__marker--disabled &__marker-dot {
|
|
229
|
+
background-color: palette.$neutral600;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
&__marker__large--checked &__marker-dot {
|
|
233
|
+
background-color: palette.$blueberry100;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
&__marker__large--checked--invalid &__marker-dot {
|
|
237
|
+
background-color: palette.$cherry500;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
label:active &__marker-dot {
|
|
241
|
+
background-color: palette.$blueberry800;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
label:active &__marker--on-dark &__marker-dot {
|
|
245
|
+
background-color: palette.$blueberry300;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
label:active &__marker--invalid &__marker-dot {
|
|
249
|
+
background-color: palette.$cherry800;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
label:active &__marker__large--checked &__marker-dot {
|
|
253
|
+
background-color: palette.$blueberry200;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
label:active &__marker__large--checked--invalid &__marker-dot {
|
|
257
|
+
background-color: palette.$cherry700;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type Styles = {
|
|
2
|
+
radio__marker: string;
|
|
3
|
+
'radio__marker__large--checked': string;
|
|
4
|
+
'radio__marker__large--checked--disabled': string;
|
|
5
|
+
'radio__marker__large--checked--invalid': string;
|
|
6
|
+
'radio__marker__regular--checked': string;
|
|
7
|
+
'radio__marker__regular--checked--disabled': string;
|
|
8
|
+
'radio__marker__regular--checked--invalid': string;
|
|
9
|
+
'radio__marker__regular--checked--on-dark': string;
|
|
10
|
+
'radio__marker--disabled': string;
|
|
11
|
+
'radio__marker--invalid': string;
|
|
12
|
+
'radio__marker--on-blueberry': string;
|
|
13
|
+
'radio__marker--on-dark': string;
|
|
14
|
+
'radio__marker--on-grey': string;
|
|
15
|
+
'radio__marker--on-invalid': string;
|
|
16
|
+
'radio__marker--on-white': string;
|
|
17
|
+
'radio__marker-dot': string;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export type ClassNames = keyof Styles;
|
|
21
|
+
|
|
22
|
+
declare const styles: Styles;
|
|
23
|
+
|
|
24
|
+
export default styles;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as RadioButton_default } from "../../
|
|
3
|
-
export { RadioButton, RadioButton_default as default
|
|
1
|
+
import { t as RadioButton } from "../../RadioButton.js";
|
|
2
|
+
import { t as RadioButton_default } from "../../RadioButton2.js";
|
|
3
|
+
export { RadioButton, RadioButton_default as default };
|