@norges-domstoler/dds-components 0.0.0-dev-20240320145642 → 0.0.0-dev-20240320152903
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 +8 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -8665,7 +8665,10 @@ var FileUploader = (props) => {
|
|
|
8665
8665
|
const hasTip = tip !== void 0;
|
|
8666
8666
|
const hasRootErrors = rootErrors.length > 0;
|
|
8667
8667
|
const showRequiredMarker = required;
|
|
8668
|
+
const labelId = derivativeIdGenerator(uniqueId, "label");
|
|
8668
8669
|
const tipId = derivativeIdGenerator(uniqueId, "tip");
|
|
8670
|
+
const buttonId = derivativeIdGenerator(uniqueId, "button");
|
|
8671
|
+
const inputId = derivativeIdGenerator(uniqueId, "input");
|
|
8669
8672
|
const fileListElements = stateFiles.map((stateFile, index) => /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(
|
|
8670
8673
|
File,
|
|
8671
8674
|
{
|
|
@@ -8685,7 +8688,7 @@ var FileUploader = (props) => {
|
|
|
8685
8688
|
Button,
|
|
8686
8689
|
{
|
|
8687
8690
|
...getButtonProps(),
|
|
8688
|
-
id:
|
|
8691
|
+
id: buttonId,
|
|
8689
8692
|
size: "medium",
|
|
8690
8693
|
type: "button",
|
|
8691
8694
|
appearance: "filled",
|
|
@@ -8694,6 +8697,7 @@ var FileUploader = (props) => {
|
|
|
8694
8697
|
htmlProps: {
|
|
8695
8698
|
"aria-invalid": hasRootErrors ? true : void 0,
|
|
8696
8699
|
"aria-describedby": spaceSeparatedIdListGenerator([
|
|
8700
|
+
hasLabel ? labelId : void 0,
|
|
8697
8701
|
hasTip ? tipId : void 0,
|
|
8698
8702
|
...rootErrorsList.map((e) => e.id)
|
|
8699
8703
|
])
|
|
@@ -8701,8 +8705,8 @@ var FileUploader = (props) => {
|
|
|
8701
8705
|
children: "Velg fil"
|
|
8702
8706
|
}
|
|
8703
8707
|
);
|
|
8704
|
-
return /* @__PURE__ */ (0, import_jsx_runtime221.jsxs)(Wrapper3, { width, children: [
|
|
8705
|
-
hasLabel && /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(Label, {
|
|
8708
|
+
return /* @__PURE__ */ (0, import_jsx_runtime221.jsxs)(Wrapper3, { width, id: uniqueId, children: [
|
|
8709
|
+
hasLabel && /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(Label, { id: labelId, showRequiredStyling: showRequiredMarker, children: label3 }),
|
|
8706
8710
|
hasTip && /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(InputMessage, { id: tipId, message: tip, messageType: "tip" }),
|
|
8707
8711
|
withDragAndDrop ? /* @__PURE__ */ (0, import_jsx_runtime221.jsxs)(
|
|
8708
8712
|
Root,
|
|
@@ -8715,6 +8719,7 @@ var FileUploader = (props) => {
|
|
|
8715
8719
|
FileUploaderInput,
|
|
8716
8720
|
{
|
|
8717
8721
|
...getInputProps(),
|
|
8722
|
+
id: inputId,
|
|
8718
8723
|
"data-testid": "file-uploader-input"
|
|
8719
8724
|
}
|
|
8720
8725
|
),
|