@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.mjs
CHANGED
|
@@ -8427,7 +8427,10 @@ var FileUploader = (props) => {
|
|
|
8427
8427
|
const hasTip = tip !== void 0;
|
|
8428
8428
|
const hasRootErrors = rootErrors.length > 0;
|
|
8429
8429
|
const showRequiredMarker = required;
|
|
8430
|
+
const labelId = derivativeIdGenerator(uniqueId, "label");
|
|
8430
8431
|
const tipId = derivativeIdGenerator(uniqueId, "tip");
|
|
8432
|
+
const buttonId = derivativeIdGenerator(uniqueId, "button");
|
|
8433
|
+
const inputId = derivativeIdGenerator(uniqueId, "input");
|
|
8431
8434
|
const fileListElements = stateFiles.map((stateFile, index) => /* @__PURE__ */ jsx220(
|
|
8432
8435
|
File,
|
|
8433
8436
|
{
|
|
@@ -8447,7 +8450,7 @@ var FileUploader = (props) => {
|
|
|
8447
8450
|
Button,
|
|
8448
8451
|
{
|
|
8449
8452
|
...getButtonProps(),
|
|
8450
|
-
id:
|
|
8453
|
+
id: buttonId,
|
|
8451
8454
|
size: "medium",
|
|
8452
8455
|
type: "button",
|
|
8453
8456
|
appearance: "filled",
|
|
@@ -8456,6 +8459,7 @@ var FileUploader = (props) => {
|
|
|
8456
8459
|
htmlProps: {
|
|
8457
8460
|
"aria-invalid": hasRootErrors ? true : void 0,
|
|
8458
8461
|
"aria-describedby": spaceSeparatedIdListGenerator([
|
|
8462
|
+
hasLabel ? labelId : void 0,
|
|
8459
8463
|
hasTip ? tipId : void 0,
|
|
8460
8464
|
...rootErrorsList.map((e) => e.id)
|
|
8461
8465
|
])
|
|
@@ -8463,8 +8467,8 @@ var FileUploader = (props) => {
|
|
|
8463
8467
|
children: "Velg fil"
|
|
8464
8468
|
}
|
|
8465
8469
|
);
|
|
8466
|
-
return /* @__PURE__ */ jsxs50(Wrapper3, { width, children: [
|
|
8467
|
-
hasLabel && /* @__PURE__ */ jsx220(Label, {
|
|
8470
|
+
return /* @__PURE__ */ jsxs50(Wrapper3, { width, id: uniqueId, children: [
|
|
8471
|
+
hasLabel && /* @__PURE__ */ jsx220(Label, { id: labelId, showRequiredStyling: showRequiredMarker, children: label3 }),
|
|
8468
8472
|
hasTip && /* @__PURE__ */ jsx220(InputMessage, { id: tipId, message: tip, messageType: "tip" }),
|
|
8469
8473
|
withDragAndDrop ? /* @__PURE__ */ jsxs50(
|
|
8470
8474
|
Root,
|
|
@@ -8477,6 +8481,7 @@ var FileUploader = (props) => {
|
|
|
8477
8481
|
FileUploaderInput,
|
|
8478
8482
|
{
|
|
8479
8483
|
...getInputProps(),
|
|
8484
|
+
id: inputId,
|
|
8480
8485
|
"data-testid": "file-uploader-input"
|
|
8481
8486
|
}
|
|
8482
8487
|
),
|