@norges-domstoler/dds-components 21.14.0 → 21.16.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/dist/index.css +16 -16
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +54 -52
- package/dist/index.d.ts +54 -52
- package/dist/index.js +108 -45
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +134 -71
- package/dist/index.mjs.map +1 -1
- package/package.json +16 -16
package/dist/index.mjs
CHANGED
|
@@ -13,6 +13,7 @@ var typographyStyles_default = {
|
|
|
13
13
|
"a--nested__child": "typographyStyles_a--nested__child",
|
|
14
14
|
"a--margins": "typographyStyles_a--margins",
|
|
15
15
|
"a--external": "typographyStyles_a--external",
|
|
16
|
+
a__icon: "typographyStyles_a__icon",
|
|
16
17
|
"a--visited": "typographyStyles_a--visited",
|
|
17
18
|
"body-xsmall": "typographyStyles_body-xsmall",
|
|
18
19
|
"body-xsmall--margins": "typographyStyles_body-xsmall--margins",
|
|
@@ -3397,7 +3398,7 @@ var Label_default = {
|
|
|
3397
3398
|
};
|
|
3398
3399
|
|
|
3399
3400
|
// src/components/Typography/Label/Label.tsx
|
|
3400
|
-
import { jsx as jsx184, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
3401
|
+
import { Fragment, jsx as jsx184, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
3401
3402
|
var Label = ({
|
|
3402
3403
|
showRequiredStyling,
|
|
3403
3404
|
readOnly,
|
|
@@ -3405,32 +3406,50 @@ var Label = ({
|
|
|
3405
3406
|
className,
|
|
3406
3407
|
htmlProps,
|
|
3407
3408
|
children,
|
|
3409
|
+
afterLabelContent,
|
|
3408
3410
|
...rest
|
|
3409
3411
|
}) => {
|
|
3410
|
-
|
|
3412
|
+
const content = /* @__PURE__ */ jsxs21(Fragment, { children: [
|
|
3413
|
+
readOnly && /* @__PURE__ */ jsx184(
|
|
3414
|
+
Icon,
|
|
3415
|
+
{
|
|
3416
|
+
icon: LockIcon,
|
|
3417
|
+
iconSize: "small",
|
|
3418
|
+
className: Label_default["read-only__icon"]
|
|
3419
|
+
}
|
|
3420
|
+
),
|
|
3421
|
+
children,
|
|
3422
|
+
showRequiredStyling && /* @__PURE__ */ jsx184(RequiredMarker, {})
|
|
3423
|
+
] });
|
|
3424
|
+
const labelProps = {
|
|
3425
|
+
...getBaseHTMLProps(
|
|
3426
|
+
id,
|
|
3427
|
+
cn(className, readOnly && Label_default["read-only"]),
|
|
3428
|
+
htmlProps,
|
|
3429
|
+
rest
|
|
3430
|
+
)
|
|
3431
|
+
};
|
|
3432
|
+
const render = afterLabelContent ? /* @__PURE__ */ jsxs21(
|
|
3411
3433
|
Typography,
|
|
3412
3434
|
{
|
|
3413
|
-
...getBaseHTMLProps(
|
|
3414
|
-
id,
|
|
3415
|
-
cn(className, readOnly && Label_default["read-only"]),
|
|
3416
|
-
htmlProps,
|
|
3417
|
-
rest
|
|
3418
|
-
),
|
|
3419
3435
|
typographyType: "labelMedium",
|
|
3436
|
+
as: "div",
|
|
3437
|
+
withMargins: rest.withMargins,
|
|
3420
3438
|
children: [
|
|
3421
|
-
|
|
3422
|
-
|
|
3439
|
+
/* @__PURE__ */ jsx184(
|
|
3440
|
+
Typography,
|
|
3423
3441
|
{
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3442
|
+
...labelProps,
|
|
3443
|
+
typographyType: "labelMedium",
|
|
3444
|
+
withMargins: false,
|
|
3445
|
+
children: content
|
|
3427
3446
|
}
|
|
3428
3447
|
),
|
|
3429
|
-
|
|
3430
|
-
showRequiredStyling && /* @__PURE__ */ jsx184(RequiredMarker, {})
|
|
3448
|
+
afterLabelContent
|
|
3431
3449
|
]
|
|
3432
3450
|
}
|
|
3433
|
-
);
|
|
3451
|
+
) : /* @__PURE__ */ jsx184(Typography, { ...labelProps, typographyType: "labelMedium", children: content });
|
|
3452
|
+
return render;
|
|
3434
3453
|
};
|
|
3435
3454
|
Label.displayName = "Label";
|
|
3436
3455
|
|
|
@@ -3459,7 +3478,7 @@ import { jsx as jsx186, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
|
3459
3478
|
var Link = ({
|
|
3460
3479
|
id,
|
|
3461
3480
|
className,
|
|
3462
|
-
htmlProps
|
|
3481
|
+
htmlProps,
|
|
3463
3482
|
children,
|
|
3464
3483
|
typographyType,
|
|
3465
3484
|
withMargins,
|
|
@@ -3468,12 +3487,14 @@ var Link = ({
|
|
|
3468
3487
|
target,
|
|
3469
3488
|
style,
|
|
3470
3489
|
color,
|
|
3490
|
+
as: propAs,
|
|
3471
3491
|
...rest
|
|
3472
3492
|
}) => {
|
|
3473
|
-
const
|
|
3493
|
+
const as = propAs ? propAs : "a";
|
|
3474
3494
|
return /* @__PURE__ */ jsxs22(
|
|
3475
|
-
|
|
3495
|
+
ElementAs,
|
|
3476
3496
|
{
|
|
3497
|
+
as,
|
|
3477
3498
|
...getBaseHTMLProps(
|
|
3478
3499
|
id,
|
|
3479
3500
|
cn(
|
|
@@ -3486,14 +3507,13 @@ var Link = ({
|
|
|
3486
3507
|
focusable,
|
|
3487
3508
|
getColorCn(color)
|
|
3488
3509
|
),
|
|
3489
|
-
|
|
3510
|
+
htmlProps,
|
|
3490
3511
|
rest
|
|
3491
3512
|
),
|
|
3492
|
-
...rest,
|
|
3493
3513
|
rel: "noopener noreferer",
|
|
3494
3514
|
target: external ? "_blank" : target,
|
|
3495
3515
|
style: {
|
|
3496
|
-
...
|
|
3516
|
+
...htmlProps == null ? void 0 : htmlProps.style,
|
|
3497
3517
|
...style,
|
|
3498
3518
|
color: color && !isTextColor(color) ? getTextColor(color) : void 0
|
|
3499
3519
|
},
|
|
@@ -3634,12 +3654,28 @@ var BackLink_default = {
|
|
|
3634
3654
|
|
|
3635
3655
|
// src/components/BackLink/BackLink.tsx
|
|
3636
3656
|
import { jsx as jsx190, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
3637
|
-
var BackLink = ({ label, ref, ...rest }) => {
|
|
3657
|
+
var BackLink = ({ label, ref, as = "a", ...rest }) => {
|
|
3638
3658
|
const { t } = useTranslation();
|
|
3639
|
-
return /* @__PURE__ */ jsx190("nav", { ref, "aria-label": t(texts.goBack), children: /* @__PURE__ */ jsxs24(
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3659
|
+
return /* @__PURE__ */ jsx190("nav", { ref, "aria-label": t(texts.goBack), children: /* @__PURE__ */ jsxs24(
|
|
3660
|
+
ElementAs,
|
|
3661
|
+
{
|
|
3662
|
+
as,
|
|
3663
|
+
className: cn(typographyStyles_default.a, focusable),
|
|
3664
|
+
rel: "noopener noreferer",
|
|
3665
|
+
...rest,
|
|
3666
|
+
children: [
|
|
3667
|
+
/* @__PURE__ */ jsx190(
|
|
3668
|
+
Icon,
|
|
3669
|
+
{
|
|
3670
|
+
icon: ArrowLeftIcon,
|
|
3671
|
+
iconSize: "inherit",
|
|
3672
|
+
className: cn(typographyStyles_default.a__icon, BackLink_default.icon)
|
|
3673
|
+
}
|
|
3674
|
+
),
|
|
3675
|
+
label
|
|
3676
|
+
]
|
|
3677
|
+
}
|
|
3678
|
+
) });
|
|
3643
3679
|
};
|
|
3644
3680
|
BackLink.displayName = "BackLink";
|
|
3645
3681
|
var texts = createTexts({
|
|
@@ -3795,7 +3831,7 @@ function Spinner(props) {
|
|
|
3795
3831
|
Spinner.displayName = "Spinner";
|
|
3796
3832
|
|
|
3797
3833
|
// src/components/Button/Button.tsx
|
|
3798
|
-
import { Fragment, jsx as jsx193, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3834
|
+
import { Fragment as Fragment2, jsx as jsx193, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3799
3835
|
var Button = ({
|
|
3800
3836
|
children,
|
|
3801
3837
|
purpose = "primary",
|
|
@@ -3845,8 +3881,8 @@ var Button = ({
|
|
|
3845
3881
|
className: cn(Button_default.icon, loading && invisible)
|
|
3846
3882
|
}
|
|
3847
3883
|
);
|
|
3848
|
-
const content = /* @__PURE__ */ jsxs26(
|
|
3849
|
-
hasLabel && /* @__PURE__ */ jsxs26(
|
|
3884
|
+
const content = /* @__PURE__ */ jsxs26(Fragment2, { children: [
|
|
3885
|
+
hasLabel && /* @__PURE__ */ jsxs26(Fragment2, { children: [
|
|
3850
3886
|
iconPosition === "left" && iconElement,
|
|
3851
3887
|
/* @__PURE__ */ jsx193("span", { "aria-hidden": loading, className: cn(loading && invisible), children }),
|
|
3852
3888
|
iconPosition === "right" && iconElement
|
|
@@ -3868,10 +3904,10 @@ var Button = ({
|
|
|
3868
3904
|
{
|
|
3869
3905
|
ref,
|
|
3870
3906
|
...getBaseHTMLProps(id, buttonCn, htmlProps, rest),
|
|
3871
|
-
onClick
|
|
3907
|
+
onClick,
|
|
3872
3908
|
onFocus,
|
|
3873
3909
|
onBlur,
|
|
3874
|
-
|
|
3910
|
+
disabled: loading != null ? loading : rest.disabled,
|
|
3875
3911
|
children: content
|
|
3876
3912
|
}
|
|
3877
3913
|
);
|
|
@@ -4322,7 +4358,7 @@ var OverflowMenuGroup = ({
|
|
|
4322
4358
|
OverflowMenuGroup.displayName = "OverflowMenuGroup";
|
|
4323
4359
|
|
|
4324
4360
|
// src/components/Breadcrumbs/Breadcrumbs.tsx
|
|
4325
|
-
import { Fragment as
|
|
4361
|
+
import { Fragment as Fragment3, jsx as jsx204, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
4326
4362
|
var Breadcrumbs = ({
|
|
4327
4363
|
children,
|
|
4328
4364
|
smallScreenBreakpoint,
|
|
@@ -4369,7 +4405,7 @@ var Breadcrumbs = ({
|
|
|
4369
4405
|
return /* @__PURE__ */ jsx204(OverflowMenuSpan, { children: item.props.children }, index);
|
|
4370
4406
|
}
|
|
4371
4407
|
}) : [];
|
|
4372
|
-
const bChildrenSmallScreen = /* @__PURE__ */ jsxs30(
|
|
4408
|
+
const bChildrenSmallScreen = /* @__PURE__ */ jsxs30(Fragment3, { children: [
|
|
4373
4409
|
/* @__PURE__ */ jsx204(HStack, { ...responsiveLiProps, children: childrenArray[0] }),
|
|
4374
4410
|
bChildrenTruncated.length > 0 && /* @__PURE__ */ jsxs30(HStack, { ...responsiveLiProps, children: [
|
|
4375
4411
|
chevronIcon,
|
|
@@ -4903,7 +4939,7 @@ var InputMessage_default = {
|
|
|
4903
4939
|
};
|
|
4904
4940
|
|
|
4905
4941
|
// src/components/InputMessage/InputMessage.tsx
|
|
4906
|
-
import { Fragment as
|
|
4942
|
+
import { Fragment as Fragment4, jsx as jsx212, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
4907
4943
|
var InputMessage = ({
|
|
4908
4944
|
message,
|
|
4909
4945
|
messageType,
|
|
@@ -4938,7 +4974,7 @@ var InputMessage = ({
|
|
|
4938
4974
|
);
|
|
4939
4975
|
};
|
|
4940
4976
|
InputMessage.displayName = "InputMessage";
|
|
4941
|
-
var renderInputMessage = (tip, tipId, errorMessage, errorMessageId) => /* @__PURE__ */ jsxs34(
|
|
4977
|
+
var renderInputMessage = (tip, tipId, errorMessage, errorMessageId) => /* @__PURE__ */ jsxs34(Fragment4, { children: [
|
|
4942
4978
|
errorMessage && errorMessageId && /* @__PURE__ */ jsx212(
|
|
4943
4979
|
InputMessage,
|
|
4944
4980
|
{
|
|
@@ -5768,7 +5804,7 @@ import {
|
|
|
5768
5804
|
useRef as useRef12
|
|
5769
5805
|
} from "react";
|
|
5770
5806
|
import { createPortal } from "react-dom";
|
|
5771
|
-
import { Fragment as
|
|
5807
|
+
import { Fragment as Fragment5, jsx as jsx225, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
5772
5808
|
var CalendarPopoverContext = createContext9({
|
|
5773
5809
|
anchorRef: null,
|
|
5774
5810
|
closeButtonRef: null,
|
|
@@ -5848,7 +5884,7 @@ var CalendarPopoverContent = ({
|
|
|
5848
5884
|
border: "border-default",
|
|
5849
5885
|
padding: "x0.75"
|
|
5850
5886
|
};
|
|
5851
|
-
return /* @__PURE__ */ jsxs42(
|
|
5887
|
+
return /* @__PURE__ */ jsxs42(Fragment5, { children: [
|
|
5852
5888
|
portalTarget && hasBreakpoint && createPortal(
|
|
5853
5889
|
/* @__PURE__ */ jsx225(ShowHide, { showBelow: smallScreenBreakpoint, children: /* @__PURE__ */ jsx225(Backdrop, { zIndex: "modal", isMounted, children: /* @__PURE__ */ jsxs42(
|
|
5854
5890
|
Paper,
|
|
@@ -6430,6 +6466,7 @@ function DateInput({
|
|
|
6430
6466
|
width,
|
|
6431
6467
|
clearable,
|
|
6432
6468
|
ref,
|
|
6469
|
+
afterLabelContent,
|
|
6433
6470
|
...props
|
|
6434
6471
|
}) {
|
|
6435
6472
|
var _a;
|
|
@@ -6448,7 +6485,8 @@ function DateInput({
|
|
|
6448
6485
|
...labelProps,
|
|
6449
6486
|
label: props.label,
|
|
6450
6487
|
showRequiredStyling: required,
|
|
6451
|
-
readOnly
|
|
6488
|
+
readOnly,
|
|
6489
|
+
afterLabelContent
|
|
6452
6490
|
}),
|
|
6453
6491
|
/* @__PURE__ */ jsxs46(
|
|
6454
6492
|
Box,
|
|
@@ -6916,11 +6954,11 @@ var DetailListDesc = ({ className, ...rest }) => /* @__PURE__ */ jsx243("dd", {
|
|
|
6916
6954
|
DetailListDesc.displayName = "DetailListDesc";
|
|
6917
6955
|
|
|
6918
6956
|
// src/components/DetailList/DetailListRow.tsx
|
|
6919
|
-
import { Fragment as
|
|
6957
|
+
import { Fragment as Fragment6, jsx as jsx244, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
6920
6958
|
var DetailListRow = ({ className, ...rest }) => {
|
|
6921
6959
|
const { smallScreenBreakpoint: bp } = useDetailListContext();
|
|
6922
6960
|
const hasBp = !!bp;
|
|
6923
|
-
return /* @__PURE__ */ jsxs49(
|
|
6961
|
+
return /* @__PURE__ */ jsxs49(Fragment6, { children: [
|
|
6924
6962
|
/* @__PURE__ */ jsx244(
|
|
6925
6963
|
Box,
|
|
6926
6964
|
{
|
|
@@ -7966,7 +8004,7 @@ var FileUploader_default = {
|
|
|
7966
8004
|
};
|
|
7967
8005
|
|
|
7968
8006
|
// src/components/FileUploader/File.tsx
|
|
7969
|
-
import { Fragment as
|
|
8007
|
+
import { Fragment as Fragment7, jsx as jsx259, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
7970
8008
|
var File = (props) => {
|
|
7971
8009
|
const { t } = useTranslation();
|
|
7972
8010
|
const {
|
|
@@ -8006,7 +8044,7 @@ var File = (props) => {
|
|
|
8006
8044
|
children: stateFile.file.name
|
|
8007
8045
|
}
|
|
8008
8046
|
),
|
|
8009
|
-
!inactive && /* @__PURE__ */ jsxs58(
|
|
8047
|
+
!inactive && /* @__PURE__ */ jsxs58(Fragment7, { children: [
|
|
8010
8048
|
/* @__PURE__ */ jsx259(
|
|
8011
8049
|
Icon,
|
|
8012
8050
|
{
|
|
@@ -8385,6 +8423,7 @@ var FileUploader = (props) => {
|
|
|
8385
8423
|
errorMessage,
|
|
8386
8424
|
hideFileList,
|
|
8387
8425
|
className,
|
|
8426
|
+
afterLabelContent,
|
|
8388
8427
|
...rest
|
|
8389
8428
|
} = props;
|
|
8390
8429
|
const { t } = useTranslation();
|
|
@@ -8479,7 +8518,8 @@ var FileUploader = (props) => {
|
|
|
8479
8518
|
id: labelId,
|
|
8480
8519
|
showRequiredStyling: required,
|
|
8481
8520
|
htmlFor: inputId,
|
|
8482
|
-
readOnly
|
|
8521
|
+
readOnly,
|
|
8522
|
+
afterLabelContent
|
|
8483
8523
|
}),
|
|
8484
8524
|
hasTip && /* @__PURE__ */ jsx260(InputMessage, { id: tipId, message: tip, messageType: "tip" }),
|
|
8485
8525
|
inactive ? input : withDragAndDrop ? /* @__PURE__ */ jsxs59(
|
|
@@ -8719,6 +8759,8 @@ import { jsx as jsx270 } from "react/jsx-runtime";
|
|
|
8719
8759
|
var InlineButton = ({
|
|
8720
8760
|
className,
|
|
8721
8761
|
color,
|
|
8762
|
+
icon,
|
|
8763
|
+
children,
|
|
8722
8764
|
...rest
|
|
8723
8765
|
}) => /* @__PURE__ */ jsx270(
|
|
8724
8766
|
StylelessButton,
|
|
@@ -8730,7 +8772,8 @@ var InlineButton = ({
|
|
|
8730
8772
|
InlineButton_default.button,
|
|
8731
8773
|
getColorCn(color)
|
|
8732
8774
|
),
|
|
8733
|
-
...rest
|
|
8775
|
+
...rest,
|
|
8776
|
+
children: icon ? /* @__PURE__ */ jsx270(Icon, { icon, iconSize: "inherit" }) : children
|
|
8734
8777
|
}
|
|
8735
8778
|
);
|
|
8736
8779
|
|
|
@@ -8891,7 +8934,7 @@ function createClearChangeEvent(elementId) {
|
|
|
8891
8934
|
}
|
|
8892
8935
|
|
|
8893
8936
|
// src/components/InlineEdit/InlineField.tsx
|
|
8894
|
-
import { Fragment as
|
|
8937
|
+
import { Fragment as Fragment8, jsx as jsx272, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
8895
8938
|
function InlineField(props) {
|
|
8896
8939
|
const {
|
|
8897
8940
|
elementType,
|
|
@@ -8972,7 +9015,7 @@ function InlineField(props) {
|
|
|
8972
9015
|
}
|
|
8973
9016
|
);
|
|
8974
9017
|
case "select":
|
|
8975
|
-
return /* @__PURE__ */ jsxs62(
|
|
9018
|
+
return /* @__PURE__ */ jsxs62(Fragment8, { children: [
|
|
8976
9019
|
/* @__PURE__ */ jsx272(
|
|
8977
9020
|
"select",
|
|
8978
9021
|
{
|
|
@@ -9346,7 +9389,7 @@ var LocalMessage_default = {
|
|
|
9346
9389
|
};
|
|
9347
9390
|
|
|
9348
9391
|
// src/components/LocalMessage/LocalMessage.tsx
|
|
9349
|
-
import { Fragment as
|
|
9392
|
+
import { Fragment as Fragment9, jsx as jsx280, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
9350
9393
|
var icons2 = {
|
|
9351
9394
|
info: InfoIcon,
|
|
9352
9395
|
danger: ErrorIcon,
|
|
@@ -9370,7 +9413,7 @@ var LocalMessage = ({
|
|
|
9370
9413
|
const { t } = useTranslation();
|
|
9371
9414
|
const [isClosed, setClosed] = useState20(false);
|
|
9372
9415
|
if (isClosed) {
|
|
9373
|
-
return /* @__PURE__ */ jsx280(
|
|
9416
|
+
return /* @__PURE__ */ jsx280(Fragment9, {});
|
|
9374
9417
|
}
|
|
9375
9418
|
return /* @__PURE__ */ jsxs64(
|
|
9376
9419
|
Box,
|
|
@@ -9889,7 +9932,7 @@ var getCustomStyles = (size2, hasError, hasIcon, isReadOnly) => ({
|
|
|
9889
9932
|
cursor: "pointer",
|
|
9890
9933
|
display: "flex",
|
|
9891
9934
|
alignItems: "center",
|
|
9892
|
-
gap: "var(--dds-spacing-x0-
|
|
9935
|
+
gap: "var(--dds-spacing-x0-25)",
|
|
9893
9936
|
padding: "var(--dds-spacing-x0-75)",
|
|
9894
9937
|
backgroundColor: "var(--dds-color-surface-default)",
|
|
9895
9938
|
...typography.option[size2],
|
|
@@ -9957,10 +10000,9 @@ var getIndicatorIconSize = (componentSize) => {
|
|
|
9957
10000
|
}
|
|
9958
10001
|
};
|
|
9959
10002
|
var DDSOption = ({
|
|
9960
|
-
componentSize,
|
|
9961
10003
|
...props
|
|
9962
10004
|
}) => /* @__PURE__ */ jsxs66(Option, { ...props, children: [
|
|
9963
|
-
props.isSelected && /* @__PURE__ */ jsx284(Icon, { icon: CheckIcon, iconSize:
|
|
10005
|
+
props.isSelected && /* @__PURE__ */ jsx284(Icon, { icon: CheckIcon, iconSize: "small" }),
|
|
9964
10006
|
props.children
|
|
9965
10007
|
] });
|
|
9966
10008
|
var CustomOption = (props) => /* @__PURE__ */ jsx284(Option, { ...props, children: React.createElement(props.customElement, props) });
|
|
@@ -10077,6 +10119,7 @@ function Select({
|
|
|
10077
10119
|
openMenuOnClick,
|
|
10078
10120
|
ref,
|
|
10079
10121
|
instanceId,
|
|
10122
|
+
afterLabelContent,
|
|
10080
10123
|
...rest
|
|
10081
10124
|
}) {
|
|
10082
10125
|
const themeContext = useContext18(ThemeContext);
|
|
@@ -10151,7 +10194,7 @@ function Select({
|
|
|
10151
10194
|
if (customOptionElement) {
|
|
10152
10195
|
return /* @__PURE__ */ jsx285(CustomOption, { ...props, customElement: customOptionElement });
|
|
10153
10196
|
} else {
|
|
10154
|
-
return /* @__PURE__ */ jsx285(DDSOption, { ...props
|
|
10197
|
+
return /* @__PURE__ */ jsx285(DDSOption, { ...props });
|
|
10155
10198
|
}
|
|
10156
10199
|
},
|
|
10157
10200
|
[customOptionElement, componentSize]
|
|
@@ -10212,7 +10255,8 @@ function Select({
|
|
|
10212
10255
|
label,
|
|
10213
10256
|
htmlFor: uniqueId,
|
|
10214
10257
|
showRequiredStyling,
|
|
10215
|
-
readOnly
|
|
10258
|
+
readOnly,
|
|
10259
|
+
afterLabelContent
|
|
10216
10260
|
}),
|
|
10217
10261
|
/* @__PURE__ */ jsx285(ReactSelect, { ...reactSelectProps, ref }),
|
|
10218
10262
|
renderInputMessage(tip, tipId, errorMessage, errorMessageId)
|
|
@@ -10261,6 +10305,7 @@ var NativeSelect = ({
|
|
|
10261
10305
|
onKeyDown,
|
|
10262
10306
|
onMouseDown,
|
|
10263
10307
|
clearable,
|
|
10308
|
+
afterLabelContent,
|
|
10264
10309
|
onChange,
|
|
10265
10310
|
...rest
|
|
10266
10311
|
}) => {
|
|
@@ -10312,7 +10357,8 @@ var NativeSelect = ({
|
|
|
10312
10357
|
label,
|
|
10313
10358
|
htmlFor: uniqueId,
|
|
10314
10359
|
showRequiredStyling,
|
|
10315
|
-
readOnly
|
|
10360
|
+
readOnly,
|
|
10361
|
+
afterLabelContent
|
|
10316
10362
|
}),
|
|
10317
10363
|
/* @__PURE__ */ jsxs68(Box, { position: "relative", width: inputWidth, children: [
|
|
10318
10364
|
/* @__PURE__ */ jsx286(
|
|
@@ -10386,6 +10432,7 @@ var Pagination = ({
|
|
|
10386
10432
|
itemsAmount,
|
|
10387
10433
|
defaultItemsPerPage = 10,
|
|
10388
10434
|
defaultActivePage = 1,
|
|
10435
|
+
activePage: activePageProp,
|
|
10389
10436
|
withPagination = true,
|
|
10390
10437
|
withCounter,
|
|
10391
10438
|
withSelect,
|
|
@@ -10405,7 +10452,15 @@ var Pagination = ({
|
|
|
10405
10452
|
...rest
|
|
10406
10453
|
}) => {
|
|
10407
10454
|
const { t } = useTranslation();
|
|
10408
|
-
|
|
10455
|
+
if (withSelect && !selectOptions.some((o) => o.value === defaultItemsPerPage)) {
|
|
10456
|
+
console.warn(
|
|
10457
|
+
`[Pagination] defaultItemsPerPage prop value (${defaultItemsPerPage}) is not included in customOptions prop. Please add it to ensure it appears in the dropdown.`
|
|
10458
|
+
);
|
|
10459
|
+
}
|
|
10460
|
+
const [activePage, setActivePage] = useControllableState({
|
|
10461
|
+
value: activePageProp,
|
|
10462
|
+
defaultValue: defaultActivePage
|
|
10463
|
+
});
|
|
10409
10464
|
const [itemsPerPage, setItemsPerPage] = useState22(defaultItemsPerPage);
|
|
10410
10465
|
const pagesLength = Math.ceil(itemsAmount / itemsPerPage);
|
|
10411
10466
|
const items = PaginationGenerator(pagesLength, activePage);
|
|
@@ -10623,7 +10678,7 @@ var Pagination = ({
|
|
|
10623
10678
|
{
|
|
10624
10679
|
options: selectOptions,
|
|
10625
10680
|
isSearchable: false,
|
|
10626
|
-
width: "
|
|
10681
|
+
width: "90px",
|
|
10627
10682
|
defaultValue: {
|
|
10628
10683
|
label: itemsPerPage.toString(),
|
|
10629
10684
|
value: itemsPerPage
|
|
@@ -11166,6 +11221,7 @@ var PhoneInput = ({
|
|
|
11166
11221
|
"aria-required": ariaRequired,
|
|
11167
11222
|
"aria-describedby": ariaDescribedby,
|
|
11168
11223
|
groupLabel = "Landskode og telefonnummer",
|
|
11224
|
+
afterLabelContent,
|
|
11169
11225
|
ref,
|
|
11170
11226
|
...props
|
|
11171
11227
|
}) => {
|
|
@@ -11254,7 +11310,8 @@ var PhoneInput = ({
|
|
|
11254
11310
|
label,
|
|
11255
11311
|
htmlFor: phoneNumberId,
|
|
11256
11312
|
showRequiredStyling,
|
|
11257
|
-
readOnly
|
|
11313
|
+
readOnly,
|
|
11314
|
+
afterLabelContent
|
|
11258
11315
|
}),
|
|
11259
11316
|
/* @__PURE__ */ jsxs70(
|
|
11260
11317
|
Box,
|
|
@@ -11658,7 +11715,7 @@ var ProgressTracker_default = {
|
|
|
11658
11715
|
|
|
11659
11716
|
// src/components/ProgressTracker/ProgressTrackerItem.tsx
|
|
11660
11717
|
import { useMemo as useMemo2 } from "react";
|
|
11661
|
-
import { Fragment as
|
|
11718
|
+
import { Fragment as Fragment10, jsx as jsx291, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
11662
11719
|
var toItemState = (active, completed, disabled) => {
|
|
11663
11720
|
if (disabled) {
|
|
11664
11721
|
return "disabled";
|
|
@@ -11714,7 +11771,7 @@ var ProgressTrackerItem = (props) => {
|
|
|
11714
11771
|
if (active) return "text-action-resting";
|
|
11715
11772
|
}
|
|
11716
11773
|
const isInactiveLink = disabled || active;
|
|
11717
|
-
const stepContent = /* @__PURE__ */ jsxs72(
|
|
11774
|
+
const stepContent = /* @__PURE__ */ jsxs72(Fragment10, { children: [
|
|
11718
11775
|
/* @__PURE__ */ jsx291(
|
|
11719
11776
|
Box,
|
|
11720
11777
|
{
|
|
@@ -12133,7 +12190,7 @@ var texts22 = createTexts({
|
|
|
12133
12190
|
});
|
|
12134
12191
|
|
|
12135
12192
|
// src/components/Search/Search.tsx
|
|
12136
|
-
import { Fragment as
|
|
12193
|
+
import { Fragment as Fragment11, jsx as jsx296, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
12137
12194
|
var getIconSize2 = (size2) => {
|
|
12138
12195
|
switch (size2) {
|
|
12139
12196
|
case "large":
|
|
@@ -12256,7 +12313,7 @@ var Search = ({
|
|
|
12256
12313
|
)
|
|
12257
12314
|
}
|
|
12258
12315
|
),
|
|
12259
|
-
hasSuggestions && /* @__PURE__ */ jsxs75(
|
|
12316
|
+
hasSuggestions && /* @__PURE__ */ jsxs75(Fragment11, { children: [
|
|
12260
12317
|
/* @__PURE__ */ jsx296(
|
|
12261
12318
|
SearchSuggestions,
|
|
12262
12319
|
{
|
|
@@ -12554,7 +12611,7 @@ var texts24 = createTexts({
|
|
|
12554
12611
|
// src/components/Table/collapsible/CollapsibleRow.tsx
|
|
12555
12612
|
import {
|
|
12556
12613
|
Children as Children4,
|
|
12557
|
-
Fragment as
|
|
12614
|
+
Fragment as Fragment12,
|
|
12558
12615
|
cloneElement as cloneElement6,
|
|
12559
12616
|
isValidElement as isValidElement6,
|
|
12560
12617
|
useEffect as useEffect32,
|
|
@@ -12814,7 +12871,7 @@ Table2.Row = Row;
|
|
|
12814
12871
|
Table2.Foot = Foot;
|
|
12815
12872
|
|
|
12816
12873
|
// src/components/Table/collapsible/CollapsibleRow.tsx
|
|
12817
|
-
import { Fragment as
|
|
12874
|
+
import { Fragment as Fragment13, jsx as jsx309, jsxs as jsxs78 } from "react/jsx-runtime";
|
|
12818
12875
|
var CollapsibleRow = ({
|
|
12819
12876
|
type: _type,
|
|
12820
12877
|
className,
|
|
@@ -12857,7 +12914,7 @@ var CollapsibleRow = ({
|
|
|
12857
12914
|
const collapsedRenderedChildren = isCollapsed && collapsedHeaderValues.length > 0 ? collapsedChildren.map(function(child, index) {
|
|
12858
12915
|
const id = derivativeIdGenerator(prefix2, index.toString());
|
|
12859
12916
|
collapsibleIds.push(id);
|
|
12860
|
-
return /* @__PURE__ */ jsxs78(
|
|
12917
|
+
return /* @__PURE__ */ jsxs78(Fragment12, { children: [
|
|
12861
12918
|
/* @__PURE__ */ jsx309(DescriptionListTerm, { children: collapsedHeaderValues[index].content }),
|
|
12862
12919
|
isValidElement6(child) && cloneElement6(child, {
|
|
12863
12920
|
collapsibleProps: { isCollapsibleChild: true }
|
|
@@ -12870,7 +12927,7 @@ var CollapsibleRow = ({
|
|
|
12870
12927
|
});
|
|
12871
12928
|
const headerRow = () => {
|
|
12872
12929
|
if (type !== "head" || !isCollapsed) return null;
|
|
12873
|
-
return /* @__PURE__ */ jsx309(Row, { ref, ...rowProps(), children: /* @__PURE__ */ jsxs78(
|
|
12930
|
+
return /* @__PURE__ */ jsx309(Row, { ref, ...rowProps(), children: /* @__PURE__ */ jsxs78(Fragment13, { children: [
|
|
12874
12931
|
definingColumnCells,
|
|
12875
12932
|
/* @__PURE__ */ jsxs78(Table2.Cell, { type: "head", layout: "center", children: [
|
|
12876
12933
|
t(texts26.expand),
|
|
@@ -12902,9 +12959,9 @@ var CollapsibleRow = ({
|
|
|
12902
12959
|
) })
|
|
12903
12960
|
] });
|
|
12904
12961
|
};
|
|
12905
|
-
return isCollapsed && collapsedRenderedChildren && collapsedRenderedChildren.length > 0 ? /* @__PURE__ */ jsxs78(
|
|
12962
|
+
return isCollapsed && collapsedRenderedChildren && collapsedRenderedChildren.length > 0 ? /* @__PURE__ */ jsxs78(Fragment13, { children: [
|
|
12906
12963
|
headerRow(),
|
|
12907
|
-
type === "body" && /* @__PURE__ */ jsxs78(
|
|
12964
|
+
type === "body" && /* @__PURE__ */ jsxs78(Fragment13, { children: [
|
|
12908
12965
|
rowWithChevron(),
|
|
12909
12966
|
childrenCollapsed ? null : collapsedRows
|
|
12910
12967
|
] })
|
|
@@ -13437,6 +13494,7 @@ var TextInput_default = {
|
|
|
13437
13494
|
import { jsx as jsx319, jsxs as jsxs83 } from "react/jsx-runtime";
|
|
13438
13495
|
var TextInput = ({
|
|
13439
13496
|
label,
|
|
13497
|
+
afterLabelContent,
|
|
13440
13498
|
disabled,
|
|
13441
13499
|
readOnly,
|
|
13442
13500
|
errorMessage,
|
|
@@ -13614,7 +13672,13 @@ var TextInput = ({
|
|
|
13614
13672
|
),
|
|
13615
13673
|
style,
|
|
13616
13674
|
children: [
|
|
13617
|
-
renderLabel({
|
|
13675
|
+
renderLabel({
|
|
13676
|
+
label,
|
|
13677
|
+
htmlFor: uniqueId,
|
|
13678
|
+
showRequiredStyling,
|
|
13679
|
+
readOnly,
|
|
13680
|
+
afterLabelContent
|
|
13681
|
+
}),
|
|
13618
13682
|
extendedInput ? extendedInput : /* @__PURE__ */ jsx319(Box, { as: StatefulInput, width: inputWidth, ...generalInputProps }),
|
|
13619
13683
|
hasBottomContainer && /* @__PURE__ */ jsxs83(
|
|
13620
13684
|
Box,
|
|
@@ -13708,8 +13772,7 @@ var Toggle = ({
|
|
|
13708
13772
|
type: "checkbox",
|
|
13709
13773
|
checked,
|
|
13710
13774
|
onChange: (e) => setChecked(e.target.checked),
|
|
13711
|
-
disabled,
|
|
13712
|
-
"aria-disabled": isLoading,
|
|
13775
|
+
disabled: isLoading != null ? isLoading : disabled,
|
|
13713
13776
|
"aria-readonly": readOnly,
|
|
13714
13777
|
onKeyDown: readOnlyKeyDownHandler(
|
|
13715
13778
|
"selectionControl",
|