@norges-domstoler/dds-components 0.0.0-dev-20240314092010 → 0.0.0-dev-20240314100410
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.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +21 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +21 -14
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -2030,6 +2030,8 @@ type FileUploaderProps = {
|
|
|
2030
2030
|
width?: Property.Width<string>;
|
|
2031
2031
|
/**Om drag-and-drop zone skal vises. */
|
|
2032
2032
|
withDragAndDrop?: boolean;
|
|
2033
|
+
/**Om listen med opplastede filer skal skjules. Brukes kun hvis listen blir vist på egen måte. */
|
|
2034
|
+
hideFileList?: boolean;
|
|
2033
2035
|
} & Partial<FileUploaderHookProps>;
|
|
2034
2036
|
declare const FileUploader: {
|
|
2035
2037
|
(props: FileUploaderProps): react_jsx_runtime.JSX.Element;
|
package/dist/index.d.ts
CHANGED
|
@@ -2030,6 +2030,8 @@ type FileUploaderProps = {
|
|
|
2030
2030
|
width?: Property.Width<string>;
|
|
2031
2031
|
/**Om drag-and-drop zone skal vises. */
|
|
2032
2032
|
withDragAndDrop?: boolean;
|
|
2033
|
+
/**Om listen med opplastede filer skal skjules. Brukes kun hvis listen blir vist på egen måte. */
|
|
2034
|
+
hideFileList?: boolean;
|
|
2033
2035
|
} & Partial<FileUploaderHookProps>;
|
|
2034
2036
|
declare const FileUploader: {
|
|
2035
2037
|
(props: FileUploaderProps): react_jsx_runtime.JSX.Element;
|
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
|
)
|
|
@@ -8654,7 +8660,8 @@ var FileUploader = (props) => {
|
|
|
8654
8660
|
disabled,
|
|
8655
8661
|
onChange,
|
|
8656
8662
|
width,
|
|
8657
|
-
errorMessage
|
|
8663
|
+
errorMessage,
|
|
8664
|
+
hideFileList
|
|
8658
8665
|
} = props;
|
|
8659
8666
|
const generatedId = (0, import_react63.useId)();
|
|
8660
8667
|
const uniqueId = id != null ? id : `${generatedId}-fileUploader`;
|
|
@@ -8742,7 +8749,7 @@ var FileUploader = (props) => {
|
|
|
8742
8749
|
button3
|
|
8743
8750
|
] }),
|
|
8744
8751
|
/* @__PURE__ */ (0, import_jsx_runtime222.jsx)(ErrorList, { errors: rootErrorsList }),
|
|
8745
|
-
/* @__PURE__ */ (0, import_jsx_runtime222.jsx)(FileListElement, { children: fileListElements })
|
|
8752
|
+
!hideFileList && /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(FileListElement, { children: fileListElements })
|
|
8746
8753
|
] });
|
|
8747
8754
|
};
|
|
8748
8755
|
FileUploader.displayName = "FileUploader";
|