@norges-domstoler/dds-components 13.8.7 → 13.9.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/README.md +4 -2
- package/dist/index.d.mts +9 -2
- package/dist/index.d.ts +9 -2
- package/dist/index.js +13 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -20
- package/dist/index.mjs.map +1 -1
- package/package.json +12 -21
package/dist/index.mjs
CHANGED
|
@@ -905,6 +905,7 @@ var Button = forwardRef2(
|
|
|
905
905
|
(props, ref) => {
|
|
906
906
|
const {
|
|
907
907
|
label: label3,
|
|
908
|
+
children,
|
|
908
909
|
purpose = "primary",
|
|
909
910
|
size = "medium",
|
|
910
911
|
iconPosition = "left",
|
|
@@ -924,12 +925,11 @@ var Button = forwardRef2(
|
|
|
924
925
|
...rest
|
|
925
926
|
} = props;
|
|
926
927
|
const as = href ? "a" : "button";
|
|
927
|
-
const hasLabel = !!label3;
|
|
928
|
+
const hasLabel = !!children || !!label3;
|
|
928
929
|
const hasIcon = !!icon12;
|
|
929
930
|
const wrapperProps = {
|
|
930
931
|
...getBaseHTMLProps3(id, className, htmlProps, rest),
|
|
931
932
|
href,
|
|
932
|
-
label: label3,
|
|
933
933
|
as,
|
|
934
934
|
rel: href ? "noreferrer noopener" : void 0,
|
|
935
935
|
target: href && target ? target : void 0,
|
|
@@ -963,7 +963,7 @@ var Button = forwardRef2(
|
|
|
963
963
|
return /* @__PURE__ */ jsxs3(ButtonWrapper, { ...wrapperProps, "aria-disabled": loading, children: [
|
|
964
964
|
!isIconButton && /* @__PURE__ */ jsxs3(Fragment, { children: [
|
|
965
965
|
iconPosition === "left" && iconElement,
|
|
966
|
-
/* @__PURE__ */ jsx6(Label, { isHidden: loading, "aria-hidden": loading, children: label3 }),
|
|
966
|
+
/* @__PURE__ */ jsx6(Label, { isHidden: loading, "aria-hidden": loading, children: children != null ? children : label3 }),
|
|
967
967
|
iconPosition === "right" && iconElement
|
|
968
968
|
] }),
|
|
969
969
|
isIconButton && iconElement,
|
|
@@ -4476,9 +4476,9 @@ var Search = forwardRef13(
|
|
|
4476
4476
|
Button,
|
|
4477
4477
|
{
|
|
4478
4478
|
size: componentSize,
|
|
4479
|
-
label: buttonLabel || "S\xF8k",
|
|
4480
4479
|
onClick,
|
|
4481
|
-
...otherButtonProps
|
|
4480
|
+
...otherButtonProps,
|
|
4481
|
+
children: buttonLabel || "S\xF8k"
|
|
4482
4482
|
}
|
|
4483
4483
|
)
|
|
4484
4484
|
]
|
|
@@ -5625,14 +5625,14 @@ var Pagination = forwardRef29(
|
|
|
5625
5625
|
return /* @__PURE__ */ jsx45(ListItem2, { children: item !== "truncator" ? /* @__PURE__ */ jsx45(
|
|
5626
5626
|
Button,
|
|
5627
5627
|
{
|
|
5628
|
-
label: item.toString(),
|
|
5629
5628
|
purpose: isActive ? "primary" : "secondary",
|
|
5630
5629
|
appearance: isActive ? "filled" : "ghost",
|
|
5631
5630
|
size: "small",
|
|
5632
5631
|
onClick: (event) => {
|
|
5633
5632
|
onPageChange(event, item);
|
|
5634
5633
|
},
|
|
5635
|
-
"aria-label": isActive ? `N\xE5v\xE6rende side (side ${item})` : `G\xE5 til side ${item}
|
|
5634
|
+
"aria-label": isActive ? `N\xE5v\xE6rende side (side ${item})` : `G\xE5 til side ${item}`,
|
|
5635
|
+
children: item
|
|
5636
5636
|
}
|
|
5637
5637
|
) : /* @__PURE__ */ jsx45(
|
|
5638
5638
|
Icon14,
|
|
@@ -5700,11 +5700,11 @@ var Pagination = forwardRef29(
|
|
|
5700
5700
|
/* @__PURE__ */ jsx45(ListItem2, { children: /* @__PURE__ */ jsx45(
|
|
5701
5701
|
Button,
|
|
5702
5702
|
{
|
|
5703
|
-
label: activePage.toString(),
|
|
5704
5703
|
size: "small",
|
|
5705
5704
|
onClick: (event) => {
|
|
5706
5705
|
onPageChange(event, activePage);
|
|
5707
|
-
}
|
|
5706
|
+
},
|
|
5707
|
+
children: activePage
|
|
5708
5708
|
}
|
|
5709
5709
|
) }),
|
|
5710
5710
|
/* @__PURE__ */ jsx45(ListItem2, { isHidden: isOnLastPage, "aria-hidden": isOnLastPage, children: nextPageButton }),
|
|
@@ -9731,13 +9731,7 @@ var InlineEditInput = forwardRef59((props, ref) => {
|
|
|
9731
9731
|
});
|
|
9732
9732
|
|
|
9733
9733
|
// src/components/TextArea/TextArea.tsx
|
|
9734
|
-
import {
|
|
9735
|
-
forwardRef as forwardRef60,
|
|
9736
|
-
useEffect as useEffect17,
|
|
9737
|
-
useId as useId26,
|
|
9738
|
-
useRef as useRef19,
|
|
9739
|
-
useState as useState25
|
|
9740
|
-
} from "react";
|
|
9734
|
+
import { forwardRef as forwardRef60, useEffect as useEffect17, useId as useId26, useRef as useRef19, useState as useState25 } from "react";
|
|
9741
9735
|
import styled74 from "styled-components";
|
|
9742
9736
|
import {
|
|
9743
9737
|
useCombinedRef as useCombinedRef15,
|
|
@@ -10510,7 +10504,6 @@ var FileUploader = (props) => {
|
|
|
10510
10504
|
type: "button",
|
|
10511
10505
|
appearance: "filled",
|
|
10512
10506
|
purpose: "secondary",
|
|
10513
|
-
label: "Velg fil",
|
|
10514
10507
|
icon: UploadIcon,
|
|
10515
10508
|
htmlProps: {
|
|
10516
10509
|
"aria-invalid": hasRootErrors ? true : void 0,
|
|
@@ -10518,7 +10511,8 @@ var FileUploader = (props) => {
|
|
|
10518
10511
|
hasTip ? tipId : void 0,
|
|
10519
10512
|
...rootErrorsList.map((e) => e.id)
|
|
10520
10513
|
])
|
|
10521
|
-
}
|
|
10514
|
+
},
|
|
10515
|
+
children: "Velg fil"
|
|
10522
10516
|
}
|
|
10523
10517
|
)
|
|
10524
10518
|
]
|
|
@@ -10720,11 +10714,11 @@ var CommentComponent = ({
|
|
|
10720
10714
|
/* @__PURE__ */ jsx94(
|
|
10721
10715
|
Button,
|
|
10722
10716
|
{
|
|
10723
|
-
label: "Send inn",
|
|
10724
10717
|
purpose: "secondary",
|
|
10725
10718
|
size: "small",
|
|
10726
10719
|
onClick: handleSubmit,
|
|
10727
|
-
loading
|
|
10720
|
+
loading,
|
|
10721
|
+
children: "Send inn"
|
|
10728
10722
|
}
|
|
10729
10723
|
)
|
|
10730
10724
|
] });
|