@norges-domstoler/dds-components 0.0.0-dev-20240314092010 → 0.0.0-dev-20240314094855
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/dist/index.js +18 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -12
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1409,9 +1409,11 @@ var message = {
|
|
|
1409
1409
|
},
|
|
1410
1410
|
error: {
|
|
1411
1411
|
padding: `${spacing4.SizesDdsSpacingX025} ${spacing4.SizesDdsSpacingX05}`,
|
|
1412
|
-
color: colors6.DdsColorDangerBase,
|
|
1413
1412
|
backgroundColor: colors6.DdsColorDangerLightest,
|
|
1414
|
-
gap: spacing4.
|
|
1413
|
+
gap: spacing4.SizesDdsSpacingX025,
|
|
1414
|
+
icon: {
|
|
1415
|
+
color: colors6.DdsColorDangerDark
|
|
1416
|
+
}
|
|
1415
1417
|
}
|
|
1416
1418
|
};
|
|
1417
1419
|
var icon = {
|
|
@@ -2916,12 +2918,11 @@ var InputMessageWrapper = import_styled_components10.default.div.withConfig({
|
|
|
2916
2918
|
width: fit-content;
|
|
2917
2919
|
word-break: break-word;
|
|
2918
2920
|
max-width: 100%;
|
|
2919
|
-
${({ messageType }) => messageType === "error"
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
` : ""}
|
|
2921
|
+
${({ messageType }) => messageType === "error" && import_styled_components10.css`
|
|
2922
|
+
background-color: ${inputMessageTokens.message.error.backgroundColor};
|
|
2923
|
+
padding: ${inputMessageTokens.message.error.padding};
|
|
2924
|
+
gap: ${inputMessageTokens.message.error.gap};
|
|
2925
|
+
`}
|
|
2925
2926
|
svg {
|
|
2926
2927
|
margin-top: ${inputMessageTokens.icon.marginTop};
|
|
2927
2928
|
}
|
|
@@ -2936,14 +2937,19 @@ var InputMessage = (0, import_react3.forwardRef)(
|
|
|
2936
2937
|
};
|
|
2937
2938
|
const isError = messageType === "error";
|
|
2938
2939
|
return /* @__PURE__ */ (0, import_jsx_runtime162.jsxs)(InputMessageWrapper, { ...wrapperProps, children: [
|
|
2939
|
-
isError && /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(
|
|
2940
|
+
isError && /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(
|
|
2941
|
+
Icon,
|
|
2942
|
+
{
|
|
2943
|
+
icon: ErrorIcon,
|
|
2944
|
+
iconSize: "small",
|
|
2945
|
+
color: inputMessageTokens.message.error.icon.color
|
|
2946
|
+
}
|
|
2947
|
+
),
|
|
2940
2948
|
/* @__PURE__ */ (0, import_jsx_runtime162.jsx)(
|
|
2941
2949
|
Typography,
|
|
2942
2950
|
{
|
|
2943
|
-
typographyType: isError ? "
|
|
2951
|
+
typographyType: isError ? "bodySans01" : "supportingStyleHelperText01",
|
|
2944
2952
|
as: "span",
|
|
2945
|
-
bold: isError ? true : void 0,
|
|
2946
|
-
color: isError ? inputMessageTokens.message.error.color : void 0,
|
|
2947
2953
|
children: message2
|
|
2948
2954
|
}
|
|
2949
2955
|
)
|