@norges-domstoler/dds-components 0.0.0-dev-20240223152935 → 0.0.0-dev-20240227092921
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 +20 -2
- package/dist/index.d.ts +20 -2
- package/dist/index.js +360 -331
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +396 -367
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1130,14 +1130,14 @@ function Icon(props) {
|
|
|
1130
1130
|
id,
|
|
1131
1131
|
iconSize = "medium",
|
|
1132
1132
|
color = "currentcolor",
|
|
1133
|
-
icon:
|
|
1133
|
+
icon: icon11,
|
|
1134
1134
|
className,
|
|
1135
1135
|
htmlProps = {},
|
|
1136
1136
|
...rest
|
|
1137
1137
|
} = props;
|
|
1138
1138
|
const { title: title3, "aria-hidden": ariaHidden = true } = htmlProps;
|
|
1139
1139
|
const size2 = getSize(iconSize);
|
|
1140
|
-
return
|
|
1140
|
+
return icon11({
|
|
1141
1141
|
...getBaseHTMLProps(id, className, htmlProps, rest),
|
|
1142
1142
|
title: title3,
|
|
1143
1143
|
height: size2,
|
|
@@ -3025,7 +3025,7 @@ var ExternalNavItem = styled9(BaseLink)`
|
|
|
3025
3025
|
var NavigationItem = ({
|
|
3026
3026
|
as: _as,
|
|
3027
3027
|
active,
|
|
3028
|
-
icon:
|
|
3028
|
+
icon: icon11,
|
|
3029
3029
|
external,
|
|
3030
3030
|
children,
|
|
3031
3031
|
onClick: propOnClick,
|
|
@@ -3051,7 +3051,7 @@ var NavigationItem = ({
|
|
|
3051
3051
|
onClick,
|
|
3052
3052
|
className: [active ? "active" : "", rest.className].join(" "),
|
|
3053
3053
|
children: [
|
|
3054
|
-
/* @__PURE__ */ jsx163(IconContainer, { children:
|
|
3054
|
+
/* @__PURE__ */ jsx163(IconContainer, { children: icon11 && /* @__PURE__ */ jsx163(Icon, { icon: icon11 }) }),
|
|
3055
3055
|
/* @__PURE__ */ jsx163(TextContainer, { children }),
|
|
3056
3056
|
/* @__PURE__ */ jsx163(ChevronContainer, { children: /* @__PURE__ */ jsx163(Icon, { icon: ChevronRightIcon }) })
|
|
3057
3057
|
]
|
|
@@ -3905,7 +3905,7 @@ var Button = forwardRef9(
|
|
|
3905
3905
|
loading = false,
|
|
3906
3906
|
loadingTooltip = "Lagring p\xE5g\xE5r",
|
|
3907
3907
|
fullWidth = false,
|
|
3908
|
-
icon:
|
|
3908
|
+
icon: icon11,
|
|
3909
3909
|
onClick,
|
|
3910
3910
|
onFocus,
|
|
3911
3911
|
onBlur,
|
|
@@ -3916,7 +3916,7 @@ var Button = forwardRef9(
|
|
|
3916
3916
|
} = props;
|
|
3917
3917
|
const as = href ? "a" : "button";
|
|
3918
3918
|
const hasLabel = !!children || !!label3;
|
|
3919
|
-
const hasIcon = !!
|
|
3919
|
+
const hasIcon = !!icon11;
|
|
3920
3920
|
const wrapperProps = {
|
|
3921
3921
|
...getBaseHTMLProps(id, className, htmlProps, rest),
|
|
3922
3922
|
href,
|
|
@@ -3941,13 +3941,13 @@ var Button = forwardRef9(
|
|
|
3941
3941
|
onBlur
|
|
3942
3942
|
};
|
|
3943
3943
|
const isIconButton = !hasLabel && hasIcon;
|
|
3944
|
-
const iconElement =
|
|
3944
|
+
const iconElement = icon11 && /* @__PURE__ */ jsx172(
|
|
3945
3945
|
StyledIconWrapperSpan,
|
|
3946
3946
|
{
|
|
3947
3947
|
size: size2,
|
|
3948
3948
|
isHidden: hasIcon && loading,
|
|
3949
3949
|
justIcon: isIconButton,
|
|
3950
|
-
children: /* @__PURE__ */ jsx172(Icon, { icon:
|
|
3950
|
+
children: /* @__PURE__ */ jsx172(Icon, { icon: icon11, iconSize: "inherit" })
|
|
3951
3951
|
}
|
|
3952
3952
|
);
|
|
3953
3953
|
return /* @__PURE__ */ jsxs20(ButtonWrapper, { ...wrapperProps, "aria-disabled": loading, children: [
|
|
@@ -4079,7 +4079,7 @@ var IconWrapper = styled15.span`
|
|
|
4079
4079
|
var isAnchorProps2 = (props) => props.href !== void 0;
|
|
4080
4080
|
var isButtonProps = (props) => props.href === void 0 && props.onClick !== void 0;
|
|
4081
4081
|
var OverflowMenuItem = forwardRef10((props, ref) => {
|
|
4082
|
-
const { title: title3, icon:
|
|
4082
|
+
const { title: title3, icon: icon11, focus, id, className, htmlProps = {}, ...rest } = props;
|
|
4083
4083
|
let href;
|
|
4084
4084
|
let onClick;
|
|
4085
4085
|
if (isAnchorProps2(props)) {
|
|
@@ -4100,7 +4100,7 @@ var OverflowMenuItem = forwardRef10((props, ref) => {
|
|
|
4100
4100
|
role: "menuitem",
|
|
4101
4101
|
tabIndex: focus ? 0 : -1
|
|
4102
4102
|
};
|
|
4103
|
-
const iconElement =
|
|
4103
|
+
const iconElement = icon11 && /* @__PURE__ */ jsx173(Icon, { iconSize: "inherit", icon: icon11 });
|
|
4104
4104
|
if (!href && !onClick) {
|
|
4105
4105
|
return /* @__PURE__ */ jsxs21(Span, { ...{ ...getBaseHTMLProps(id, className, htmlProps, rest), ref }, children: [
|
|
4106
4106
|
/* @__PURE__ */ jsx173(IconWrapper, { children: iconElement }),
|
|
@@ -4990,33 +4990,26 @@ import styled23 from "styled-components";
|
|
|
4990
4990
|
|
|
4991
4991
|
// src/components/BackLink/BackLink.tokens.tsx
|
|
4992
4992
|
import { ddsBaseTokens as ddsBaseTokens22 } from "@norges-domstoler/dds-design-tokens";
|
|
4993
|
-
var {
|
|
4994
|
-
var
|
|
4995
|
-
|
|
4996
|
-
};
|
|
4997
|
-
var nav = {
|
|
4998
|
-
gap: spacing10.SizesDdsSpacingX05
|
|
4993
|
+
var { spacing: spacing10 } = ddsBaseTokens22;
|
|
4994
|
+
var link3 = {
|
|
4995
|
+
gap: spacing10.SizesDdsSpacingX025
|
|
4999
4996
|
};
|
|
5000
4997
|
var backLinkTokens = {
|
|
5001
|
-
|
|
5002
|
-
nav
|
|
4998
|
+
link: link3
|
|
5003
4999
|
};
|
|
5004
5000
|
|
|
5005
5001
|
// src/components/BackLink/BackLink.tsx
|
|
5006
5002
|
import { jsx as jsx182, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
5007
|
-
var
|
|
5003
|
+
var StyledLink2 = styled23(Link)`
|
|
5008
5004
|
align-items: center;
|
|
5009
5005
|
display: flex;
|
|
5010
|
-
gap: ${backLinkTokens.
|
|
5011
|
-
`;
|
|
5012
|
-
var StyledIcon = styled23(Icon)`
|
|
5013
|
-
color: ${backLinkTokens.icon.color};
|
|
5006
|
+
gap: ${backLinkTokens.link.gap};
|
|
5014
5007
|
`;
|
|
5015
5008
|
var BackLink = forwardRef13((props, ref) => {
|
|
5016
|
-
return /* @__PURE__ */
|
|
5017
|
-
/* @__PURE__ */ jsx182(
|
|
5018
|
-
|
|
5019
|
-
] });
|
|
5009
|
+
return /* @__PURE__ */ jsx182("nav", { ref, "aria-label": "g\xE5 tilbake", children: /* @__PURE__ */ jsxs28(StyledLink2, { href: props.href, children: [
|
|
5010
|
+
/* @__PURE__ */ jsx182(Icon, { icon: ArrowLeftIcon, iconSize: "small" }),
|
|
5011
|
+
props.label
|
|
5012
|
+
] }) });
|
|
5020
5013
|
});
|
|
5021
5014
|
BackLink.displayName = "BackLink";
|
|
5022
5015
|
|
|
@@ -5040,18 +5033,21 @@ var Breadcrumb = forwardRef14(
|
|
|
5040
5033
|
Breadcrumb.displayName = "Breadcrumb";
|
|
5041
5034
|
|
|
5042
5035
|
// src/components/Breadcrumbs/Breadcrumbs.tsx
|
|
5043
|
-
import { Children as Children2, forwardRef as forwardRef15 } from "react";
|
|
5036
|
+
import { Children as Children2, forwardRef as forwardRef15, isValidElement as isValidElement2 } from "react";
|
|
5044
5037
|
import styled24 from "styled-components";
|
|
5045
5038
|
|
|
5046
5039
|
// src/components/Breadcrumbs/Breadcrumb.tokens.tsx
|
|
5047
5040
|
import { ddsBaseTokens as ddsBaseTokens23 } from "@norges-domstoler/dds-design-tokens";
|
|
5048
|
-
var { colors:
|
|
5041
|
+
var { colors: colors12, spacing: spacing11 } = ddsBaseTokens23;
|
|
5049
5042
|
var typographyType2 = "bodySans02";
|
|
5050
|
-
var
|
|
5051
|
-
color:
|
|
5043
|
+
var icon2 = {
|
|
5044
|
+
color: colors12.DdsColorInteractiveBase
|
|
5052
5045
|
};
|
|
5053
5046
|
var listItem = {
|
|
5054
|
-
gap: spacing11.SizesDdsSpacingX05
|
|
5047
|
+
gap: spacing11.SizesDdsSpacingX05,
|
|
5048
|
+
notSmallScreen: {
|
|
5049
|
+
padding: `${spacing11.SizesDdsSpacingX0125} 0`
|
|
5050
|
+
}
|
|
5055
5051
|
};
|
|
5056
5052
|
var list = {
|
|
5057
5053
|
gap: spacing11.SizesDdsSpacingX05
|
|
@@ -5059,12 +5055,12 @@ var list = {
|
|
|
5059
5055
|
var breadcrumbTokens = {
|
|
5060
5056
|
list,
|
|
5061
5057
|
listItem,
|
|
5062
|
-
icon:
|
|
5058
|
+
icon: icon2
|
|
5063
5059
|
};
|
|
5064
5060
|
|
|
5065
5061
|
// src/components/Breadcrumbs/Breadcrumbs.tsx
|
|
5066
|
-
import { jsx as jsx184, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
5067
|
-
var { icon:
|
|
5062
|
+
import { Fragment as Fragment5, jsx as jsx184, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
5063
|
+
var { icon: icon3, list: list2, listItem: listItem2 } = breadcrumbTokens;
|
|
5068
5064
|
var List = styled24.ol`
|
|
5069
5065
|
${removeListStyling}
|
|
5070
5066
|
display: flex;
|
|
@@ -5073,33 +5069,66 @@ var List = styled24.ol`
|
|
|
5073
5069
|
gap: ${list2.gap};
|
|
5074
5070
|
`;
|
|
5075
5071
|
List.displayName = "List";
|
|
5076
|
-
var ListItem = styled24.li
|
|
5072
|
+
var ListItem = styled24.li.withConfig({
|
|
5073
|
+
shouldForwardProp: (prop) => prop !== "smallScreen"
|
|
5074
|
+
})`
|
|
5077
5075
|
align-items: center;
|
|
5078
5076
|
display: flex;
|
|
5079
5077
|
gap: ${listItem2.gap};
|
|
5080
5078
|
${getFontStyling(typographyType2)}
|
|
5079
|
+
padding: ${({ smallScreen }) => smallScreen ? "0" : listItem2.notSmallScreen.padding};
|
|
5081
5080
|
`;
|
|
5082
5081
|
ListItem.displayName = "ListItem";
|
|
5083
|
-
var
|
|
5084
|
-
color: ${
|
|
5082
|
+
var StyledIcon = styled24(Icon)`
|
|
5083
|
+
color: ${icon3.color};
|
|
5085
5084
|
`;
|
|
5086
5085
|
var Breadcrumbs = forwardRef15(
|
|
5087
5086
|
(props, ref) => {
|
|
5088
|
-
const { children, id, className, htmlProps, ...rest } = props;
|
|
5087
|
+
const { children, smallScreen, id, className, htmlProps, ...rest } = props;
|
|
5088
|
+
const chevronIcon = /* @__PURE__ */ jsx184(StyledIcon, { iconSize: "inherit", icon: ChevronRightIcon });
|
|
5089
5089
|
const childrenArray = Children2.toArray(children);
|
|
5090
5090
|
const breadcrumbChildren = childrenArray.map((item, index) => {
|
|
5091
|
-
return /* @__PURE__ */ jsxs29(ListItem, { children: [
|
|
5092
|
-
index !== 0 &&
|
|
5091
|
+
return /* @__PURE__ */ jsxs29(ListItem, { smallScreen, children: [
|
|
5092
|
+
index !== 0 && chevronIcon,
|
|
5093
5093
|
item
|
|
5094
5094
|
] }, `breadcrumb-${index}`);
|
|
5095
5095
|
});
|
|
5096
|
+
const breadcrumbChildrenTruncated = childrenArray.length > 2 ? childrenArray.slice(1, childrenArray.length - 1).map((item) => {
|
|
5097
|
+
if (isValidElement2(item))
|
|
5098
|
+
return {
|
|
5099
|
+
title: item.props.children,
|
|
5100
|
+
href: item.props.href
|
|
5101
|
+
};
|
|
5102
|
+
}).filter((item) => item) : [];
|
|
5103
|
+
const breadcrumbChildrenSmallScreen = /* @__PURE__ */ jsxs29(Fragment5, { children: [
|
|
5104
|
+
/* @__PURE__ */ jsx184(ListItem, { smallScreen, children: childrenArray[0] }),
|
|
5105
|
+
breadcrumbChildrenTruncated.length > 0 && /* @__PURE__ */ jsxs29(ListItem, { smallScreen, children: [
|
|
5106
|
+
chevronIcon,
|
|
5107
|
+
/* @__PURE__ */ jsxs29(OverflowMenuGroup, { children: [
|
|
5108
|
+
/* @__PURE__ */ jsx184(
|
|
5109
|
+
Button,
|
|
5110
|
+
{
|
|
5111
|
+
size: "tiny",
|
|
5112
|
+
icon: MoreHorizontalIcon,
|
|
5113
|
+
appearance: "borderless",
|
|
5114
|
+
"aria-label": `Vis br\xF8dsmulesti br\xF8dsmule 2 ${breadcrumbChildrenTruncated.length > 1 && `til ${breadcrumbChildren.length - 1}`}`
|
|
5115
|
+
}
|
|
5116
|
+
),
|
|
5117
|
+
/* @__PURE__ */ jsx184(OverflowMenu, { items: breadcrumbChildrenTruncated })
|
|
5118
|
+
] })
|
|
5119
|
+
] }),
|
|
5120
|
+
/* @__PURE__ */ jsxs29(ListItem, { smallScreen, children: [
|
|
5121
|
+
chevronIcon,
|
|
5122
|
+
childrenArray[childrenArray.length - 1]
|
|
5123
|
+
] })
|
|
5124
|
+
] });
|
|
5096
5125
|
return /* @__PURE__ */ jsx184(
|
|
5097
5126
|
"nav",
|
|
5098
5127
|
{
|
|
5099
5128
|
...getBaseHTMLProps(id, className, htmlProps, rest),
|
|
5100
5129
|
ref,
|
|
5101
5130
|
"aria-label": "br\xF8dsmulesti",
|
|
5102
|
-
children: /* @__PURE__ */ jsx184(List, { children: breadcrumbChildren })
|
|
5131
|
+
children: /* @__PURE__ */ jsx184(List, { children: smallScreen ? breadcrumbChildrenSmallScreen : breadcrumbChildren })
|
|
5103
5132
|
}
|
|
5104
5133
|
);
|
|
5105
5134
|
}
|
|
@@ -5114,29 +5143,29 @@ import {
|
|
|
5114
5143
|
ddsBaseTokens as ddsBaseTokens24,
|
|
5115
5144
|
ddsReferenceTokens as ddsReferenceTokens4
|
|
5116
5145
|
} from "@norges-domstoler/dds-design-tokens";
|
|
5117
|
-
var { colors:
|
|
5146
|
+
var { colors: colors13, border: border8 } = ddsBaseTokens24;
|
|
5118
5147
|
var { textDefault: textDefault3 } = ddsReferenceTokens4;
|
|
5119
5148
|
var base2 = {
|
|
5120
5149
|
border: `${border8.BordersDdsBorderStyleLightStrokeWeight} solid`
|
|
5121
5150
|
};
|
|
5122
5151
|
var cardColors = {
|
|
5123
5152
|
filledLight: {
|
|
5124
|
-
backgroundColor:
|
|
5125
|
-
borderColor:
|
|
5153
|
+
backgroundColor: colors13.DdsColorPrimaryLightest,
|
|
5154
|
+
borderColor: colors13.DdsColorPrimaryLightest,
|
|
5126
5155
|
color: textDefault3.textColor
|
|
5127
5156
|
},
|
|
5128
5157
|
filledDark: {
|
|
5129
|
-
backgroundColor:
|
|
5130
|
-
borderColor:
|
|
5131
|
-
color:
|
|
5158
|
+
backgroundColor: colors13.DdsColorPrimaryBase,
|
|
5159
|
+
borderColor: colors13.DdsColorPrimaryBase,
|
|
5160
|
+
color: colors13.DdsColorNeutralsWhite
|
|
5132
5161
|
},
|
|
5133
5162
|
strokeDark: {
|
|
5134
|
-
backgroundColor:
|
|
5163
|
+
backgroundColor: colors13.DdsColorNeutralsWhite,
|
|
5135
5164
|
borderColor: border8.BordersDdsBorderStyleLightStroke,
|
|
5136
5165
|
color: textDefault3.textColor
|
|
5137
5166
|
},
|
|
5138
5167
|
strokeLight: {
|
|
5139
|
-
backgroundColor:
|
|
5168
|
+
backgroundColor: colors13.DdsColorNeutralsWhite,
|
|
5140
5169
|
borderColor: border8.BordersDdsBorderStyleLightStroke,
|
|
5141
5170
|
color: textDefault3.textColor
|
|
5142
5171
|
}
|
|
@@ -5544,13 +5573,13 @@ import styled29 from "styled-components";
|
|
|
5544
5573
|
|
|
5545
5574
|
// src/components/Chip/Chip.tokens.tsx
|
|
5546
5575
|
import { ddsBaseTokens as ddsBaseTokens26 } from "@norges-domstoler/dds-design-tokens";
|
|
5547
|
-
var { colors:
|
|
5576
|
+
var { colors: colors14, spacing: spacing13, borderRadius: borderRadius5 } = ddsBaseTokens26;
|
|
5548
5577
|
var typographyType3 = "bodySans01";
|
|
5549
5578
|
var container3 = {
|
|
5550
5579
|
gap: spacing13.SizesDdsSpacingX025,
|
|
5551
5580
|
padding: `${spacing13.SizesDdsSpacingX0125} ${spacing13.SizesDdsSpacingX025}`,
|
|
5552
|
-
backgroundColor:
|
|
5553
|
-
border: `1px solid ${
|
|
5581
|
+
backgroundColor: colors14.DdsColorNeutralsGray1,
|
|
5582
|
+
border: `1px solid ${colors14.DdsColorNeutralsGray3}`,
|
|
5554
5583
|
borderRadius: borderRadius5.RadiiDdsBorderRadius1Radius
|
|
5555
5584
|
};
|
|
5556
5585
|
var group = {
|
|
@@ -6076,7 +6105,7 @@ import styled35, { css as css14 } from "styled-components";
|
|
|
6076
6105
|
|
|
6077
6106
|
// src/components/date-inputs/DatePicker/DatePicker.tokens.ts
|
|
6078
6107
|
import { ddsBaseTokens as ddsBaseTokens28 } from "@norges-domstoler/dds-design-tokens";
|
|
6079
|
-
var { colors:
|
|
6108
|
+
var { colors: colors15 } = ddsBaseTokens28;
|
|
6080
6109
|
var segment = {
|
|
6081
6110
|
medium: {
|
|
6082
6111
|
font: {
|
|
@@ -6084,7 +6113,7 @@ var segment = {
|
|
|
6084
6113
|
},
|
|
6085
6114
|
placeholder: {
|
|
6086
6115
|
...ddsBaseTokens28.fontPackages.supportingStyle_placeholdertext_01.base,
|
|
6087
|
-
textColor:
|
|
6116
|
+
textColor: colors15.DdsColorNeutralsGray6
|
|
6088
6117
|
}
|
|
6089
6118
|
},
|
|
6090
6119
|
small: {
|
|
@@ -6093,7 +6122,7 @@ var segment = {
|
|
|
6093
6122
|
},
|
|
6094
6123
|
placeholder: {
|
|
6095
6124
|
...ddsBaseTokens28.fontPackages.supportingStyle_placeholdertext_02.base,
|
|
6096
|
-
textColor:
|
|
6125
|
+
textColor: colors15.DdsColorNeutralsGray6
|
|
6097
6126
|
}
|
|
6098
6127
|
},
|
|
6099
6128
|
tiny: {
|
|
@@ -6102,7 +6131,7 @@ var segment = {
|
|
|
6102
6131
|
},
|
|
6103
6132
|
placeholder: {
|
|
6104
6133
|
...ddsBaseTokens28.fontPackages.supportingStyle_placeholdertext_03.base,
|
|
6105
|
-
textColor:
|
|
6134
|
+
textColor: colors15.DdsColorNeutralsGray6
|
|
6106
6135
|
}
|
|
6107
6136
|
},
|
|
6108
6137
|
padding: {
|
|
@@ -6110,24 +6139,24 @@ var segment = {
|
|
|
6110
6139
|
y: "0"
|
|
6111
6140
|
},
|
|
6112
6141
|
focus: {
|
|
6113
|
-
textColor:
|
|
6114
|
-
backgroundColor:
|
|
6142
|
+
textColor: colors15.DdsColorNeutralsWhite,
|
|
6143
|
+
backgroundColor: colors15.DdsColorInteractiveBase
|
|
6115
6144
|
}
|
|
6116
6145
|
};
|
|
6117
6146
|
var calendarButton = {
|
|
6118
|
-
color:
|
|
6147
|
+
color: colors15.DdsColorNeutralsGray9,
|
|
6119
6148
|
disabled: {
|
|
6120
|
-
color:
|
|
6149
|
+
color: colors15.DdsColorNeutralsGray6
|
|
6121
6150
|
},
|
|
6122
6151
|
background: "transparent",
|
|
6123
6152
|
borderRadius: ddsBaseTokens28.borderRadius.RadiiDdsBorderRadius1Radius,
|
|
6124
6153
|
hover: {
|
|
6125
|
-
background:
|
|
6126
|
-
color:
|
|
6154
|
+
background: colors15.DdsColorInteractiveLightest,
|
|
6155
|
+
color: colors15.DdsColorInteractiveBase
|
|
6127
6156
|
},
|
|
6128
6157
|
active: {
|
|
6129
|
-
background:
|
|
6130
|
-
color:
|
|
6158
|
+
background: colors15.DdsColorInteractiveLighter,
|
|
6159
|
+
color: colors15.DdsColorInteractiveBase
|
|
6131
6160
|
},
|
|
6132
6161
|
medium: {
|
|
6133
6162
|
size: `calc(${ddsBaseTokens28.iconSizes.DdsIconsizeMedium} + ${ddsBaseTokens28.spacing.SizesDdsSpacingX05})`
|
|
@@ -6620,14 +6649,14 @@ import styled39, { css as css16 } from "styled-components";
|
|
|
6620
6649
|
|
|
6621
6650
|
// src/components/DescriptionList/DescriptionList.tokens.tsx
|
|
6622
6651
|
import { ddsBaseTokens as ddsBaseTokens29 } from "@norges-domstoler/dds-design-tokens";
|
|
6623
|
-
var { spacing: spacing14, colors:
|
|
6652
|
+
var { spacing: spacing14, colors: colors16 } = ddsBaseTokens29;
|
|
6624
6653
|
var term = {
|
|
6625
6654
|
appearance: {
|
|
6626
6655
|
small: {
|
|
6627
|
-
color:
|
|
6656
|
+
color: colors16.DdsColorNeutralsGray7
|
|
6628
6657
|
},
|
|
6629
6658
|
bold: {
|
|
6630
|
-
color:
|
|
6659
|
+
color: colors16.DdsColorNeutralsGray9
|
|
6631
6660
|
}
|
|
6632
6661
|
},
|
|
6633
6662
|
firstOfType: {
|
|
@@ -6637,7 +6666,7 @@ var term = {
|
|
|
6637
6666
|
var desc = {
|
|
6638
6667
|
base: {
|
|
6639
6668
|
gap: spacing14.SizesDdsSpacingX025,
|
|
6640
|
-
color:
|
|
6669
|
+
color: colors16.DdsColorNeutralsGray9
|
|
6641
6670
|
},
|
|
6642
6671
|
lastChild: {
|
|
6643
6672
|
marginBottom: spacing14.SizesDdsSpacingX1
|
|
@@ -6745,14 +6774,14 @@ var DListDesc = styled41.dd`
|
|
|
6745
6774
|
gap: ${descriptionListTokens.desc.base.gap};
|
|
6746
6775
|
`;
|
|
6747
6776
|
var DescriptionListDesc = forwardRef27((props, ref) => {
|
|
6748
|
-
const { children, icon:
|
|
6777
|
+
const { children, icon: icon11, id, className, htmlProps, ...rest } = props;
|
|
6749
6778
|
const dListDescProps = {
|
|
6750
6779
|
...getBaseHTMLProps(id, className, htmlProps, rest),
|
|
6751
6780
|
children,
|
|
6752
6781
|
ref
|
|
6753
6782
|
};
|
|
6754
6783
|
return /* @__PURE__ */ jsxs37(DListDesc, { ...dListDescProps, children: [
|
|
6755
|
-
|
|
6784
|
+
icon11 && /* @__PURE__ */ jsx204(Icon, { icon: icon11 }),
|
|
6756
6785
|
" ",
|
|
6757
6786
|
children
|
|
6758
6787
|
] });
|
|
@@ -6962,12 +6991,12 @@ Drawer.displayName = "Drawer";
|
|
|
6962
6991
|
import {
|
|
6963
6992
|
Children as ReactChildren2,
|
|
6964
6993
|
cloneElement as cloneElement2,
|
|
6965
|
-
isValidElement as
|
|
6994
|
+
isValidElement as isValidElement3,
|
|
6966
6995
|
useId as useId6,
|
|
6967
6996
|
useRef as useRef18,
|
|
6968
6997
|
useState as useState11
|
|
6969
6998
|
} from "react";
|
|
6970
|
-
import { Fragment as
|
|
6999
|
+
import { Fragment as Fragment6, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
6971
7000
|
var DrawerGroup = ({
|
|
6972
7001
|
children,
|
|
6973
7002
|
drawerId,
|
|
@@ -6989,7 +7018,7 @@ var DrawerGroup = ({
|
|
|
6989
7018
|
onClose && onClose();
|
|
6990
7019
|
};
|
|
6991
7020
|
const Children9 = ReactChildren2.map(children, (child, childIndex) => {
|
|
6992
|
-
return
|
|
7021
|
+
return isValidElement3(child) && (childIndex === 0 ? cloneElement2(child, {
|
|
6993
7022
|
"aria-haspopup": "dialog",
|
|
6994
7023
|
"aria-controls": uniqueDrawerId,
|
|
6995
7024
|
"aria-expanded": !closed,
|
|
@@ -7002,7 +7031,7 @@ var DrawerGroup = ({
|
|
|
7002
7031
|
onClose: handleClose
|
|
7003
7032
|
}));
|
|
7004
7033
|
});
|
|
7005
|
-
return /* @__PURE__ */ jsxs39(
|
|
7034
|
+
return /* @__PURE__ */ jsxs39(Fragment6, { children: [
|
|
7006
7035
|
" ",
|
|
7007
7036
|
Children9,
|
|
7008
7037
|
" "
|
|
@@ -7014,7 +7043,7 @@ DrawerGroup.displayName = "DrawerGroup";
|
|
|
7014
7043
|
import { ddsBaseTokens as ddsBaseTokens31 } from "@norges-domstoler/dds-design-tokens";
|
|
7015
7044
|
import styled44 from "styled-components";
|
|
7016
7045
|
import { jsx as jsx207, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
7017
|
-
var { colors:
|
|
7046
|
+
var { colors: colors17, spacing: spacing16 } = ddsBaseTokens31;
|
|
7018
7047
|
var StyledEmptyContent = styled44.div`
|
|
7019
7048
|
display: flex;
|
|
7020
7049
|
justify-content: center;
|
|
@@ -7022,7 +7051,7 @@ var StyledEmptyContent = styled44.div`
|
|
|
7022
7051
|
min-height: ${spacing16.SizesDdsSpacingX10};
|
|
7023
7052
|
height: 100%;
|
|
7024
7053
|
width: 100%;
|
|
7025
|
-
background-color: ${
|
|
7054
|
+
background-color: ${colors17.DdsColorNeutralsGray1};
|
|
7026
7055
|
padding: ${spacing16.SizesDdsSpacingX15};
|
|
7027
7056
|
`;
|
|
7028
7057
|
var StyledEmptyContentText = styled44.div`
|
|
@@ -7124,7 +7153,7 @@ function useControllableState(props) {
|
|
|
7124
7153
|
// src/components/FavStar/FavStar.tsx
|
|
7125
7154
|
import { jsx as jsx208, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
7126
7155
|
var TRANSITION_SPEED = "0.2s";
|
|
7127
|
-
var
|
|
7156
|
+
var StyledIcon2 = styled45(Icon)`
|
|
7128
7157
|
color: currentColor;
|
|
7129
7158
|
position: absolute;
|
|
7130
7159
|
top: 0;
|
|
@@ -7170,7 +7199,7 @@ var Container5 = styled45.label`
|
|
|
7170
7199
|
}
|
|
7171
7200
|
|
|
7172
7201
|
&:active {
|
|
7173
|
-
${
|
|
7202
|
+
${StyledIcon2} {
|
|
7174
7203
|
transform: scale(0.75);
|
|
7175
7204
|
}
|
|
7176
7205
|
}
|
|
@@ -7226,9 +7255,9 @@ var FavStar = forwardRef30(
|
|
|
7226
7255
|
"aria-label": (_a = props["aria-label"]) != null ? _a : "Favoriser"
|
|
7227
7256
|
}
|
|
7228
7257
|
),
|
|
7229
|
-
/* @__PURE__ */ jsx208(
|
|
7258
|
+
/* @__PURE__ */ jsx208(StyledIcon2, { iconSize: size2, icon: StarIcon }),
|
|
7230
7259
|
/* @__PURE__ */ jsx208(
|
|
7231
|
-
|
|
7260
|
+
StyledIcon2,
|
|
7232
7261
|
{
|
|
7233
7262
|
iconSize: size2,
|
|
7234
7263
|
icon: StarFilledIcon,
|
|
@@ -7491,7 +7520,7 @@ import {
|
|
|
7491
7520
|
Children as ReactChildren3,
|
|
7492
7521
|
cloneElement as cloneElement3,
|
|
7493
7522
|
forwardRef as forwardRef33,
|
|
7494
|
-
isValidElement as
|
|
7523
|
+
isValidElement as isValidElement4,
|
|
7495
7524
|
useEffect as useEffect19,
|
|
7496
7525
|
useId as useId9,
|
|
7497
7526
|
useRef as useRef21,
|
|
@@ -7503,16 +7532,16 @@ import styled49 from "styled-components";
|
|
|
7503
7532
|
|
|
7504
7533
|
// src/components/Tooltip/Tooltip.tokens.tsx
|
|
7505
7534
|
import { ddsBaseTokens as ddsBaseTokens36 } from "@norges-domstoler/dds-design-tokens";
|
|
7506
|
-
var { colors:
|
|
7535
|
+
var { colors: colors18, spacing: spacing19 } = ddsBaseTokens36;
|
|
7507
7536
|
var wrapper = {
|
|
7508
7537
|
padding: `${spacing19.SizesDdsSpacingX075}`
|
|
7509
7538
|
};
|
|
7510
7539
|
var svgArrow = {
|
|
7511
7540
|
border: {
|
|
7512
|
-
fill:
|
|
7541
|
+
fill: colors18.DdsColorPrimaryLighter
|
|
7513
7542
|
},
|
|
7514
7543
|
background: {
|
|
7515
|
-
fill:
|
|
7544
|
+
fill: colors18.DdsColorNeutralsWhite
|
|
7516
7545
|
}
|
|
7517
7546
|
};
|
|
7518
7547
|
var tooltipTokens = {
|
|
@@ -7621,7 +7650,7 @@ var Tooltip = forwardRef33(
|
|
|
7621
7650
|
};
|
|
7622
7651
|
const anchorProps = children.props;
|
|
7623
7652
|
const anchorElement = ReactChildren3.only(
|
|
7624
|
-
|
|
7653
|
+
isValidElement4(children) && cloneElement3(children, {
|
|
7625
7654
|
ref: refs.setReference,
|
|
7626
7655
|
onFocus: combineHandlers(openTooltip, anchorProps.onFocus),
|
|
7627
7656
|
onBlur: combineHandlers(closeTooltip, anchorProps.onBlur),
|
|
@@ -7808,17 +7837,17 @@ import styled51 from "styled-components";
|
|
|
7808
7837
|
|
|
7809
7838
|
// src/components/FileUploader/FileUploader.tokens.tsx
|
|
7810
7839
|
import { ddsBaseTokens as ddsBaseTokens38 } from "@norges-domstoler/dds-design-tokens";
|
|
7811
|
-
var { colors:
|
|
7840
|
+
var { colors: colors19, spacing: spacing20 } = ddsBaseTokens38;
|
|
7812
7841
|
var rootTokens = {
|
|
7813
|
-
borderColor:
|
|
7814
|
-
borderColorError:
|
|
7842
|
+
borderColor: colors19.DdsColorNeutralsGray5,
|
|
7843
|
+
borderColorError: colors19.DdsColorDangerBase,
|
|
7815
7844
|
paddingLeftRightTop: spacing20.SizesDdsSpacingX15,
|
|
7816
7845
|
paddingBottom: spacing20.SizesDdsSpacingX2,
|
|
7817
7846
|
gap: spacing20.SizesDdsSpacingX1,
|
|
7818
|
-
backgroundColor:
|
|
7847
|
+
backgroundColor: colors19.DdsColorNeutralsWhite,
|
|
7819
7848
|
dragActive: {
|
|
7820
|
-
borderColor:
|
|
7821
|
-
backgroundColor:
|
|
7849
|
+
borderColor: colors19.DdsColorInteractiveBase,
|
|
7850
|
+
backgroundColor: colors19.DdsColorInteractiveLightest
|
|
7822
7851
|
}
|
|
7823
7852
|
};
|
|
7824
7853
|
var noZoneContainerTokens = {
|
|
@@ -7828,10 +7857,10 @@ var fileTokens = {
|
|
|
7828
7857
|
marginTop: spacing20.SizesDdsSpacingX05,
|
|
7829
7858
|
paddingLeftRight: spacing20.SizesDdsSpacingX05,
|
|
7830
7859
|
paddingTopBottom: spacing20.SizesDdsSpacingX1,
|
|
7831
|
-
backgroundColor:
|
|
7860
|
+
backgroundColor: colors19.DdsColorNeutralsGray1,
|
|
7832
7861
|
textToIconsGap: spacing20.SizesDdsSpacingX075,
|
|
7833
7862
|
invalid: {
|
|
7834
|
-
borderColor:
|
|
7863
|
+
borderColor: colors19.DdsColorDangerBase
|
|
7835
7864
|
}
|
|
7836
7865
|
};
|
|
7837
7866
|
var errorsTokens = {
|
|
@@ -8346,22 +8375,22 @@ import styled55, { css as css21 } from "styled-components";
|
|
|
8346
8375
|
|
|
8347
8376
|
// src/components/GlobalMessage/GlobalMessage.tokens.tsx
|
|
8348
8377
|
import { ddsBaseTokens as ddsBaseTokens39 } from "@norges-domstoler/dds-design-tokens";
|
|
8349
|
-
var { colors:
|
|
8378
|
+
var { colors: colors20, spacing: spacing21 } = ddsBaseTokens39;
|
|
8350
8379
|
var typographyType4 = "bodySans02";
|
|
8351
8380
|
var container7 = {
|
|
8352
8381
|
borderBottom: "2px solid",
|
|
8353
8382
|
padding: `0 ${spacing21.SizesDdsSpacingX1}`,
|
|
8354
8383
|
info: {
|
|
8355
|
-
borderColor:
|
|
8356
|
-
backgroundColor:
|
|
8384
|
+
borderColor: colors20.DdsColorInfoLighter,
|
|
8385
|
+
backgroundColor: colors20.DdsColorInfoLightest
|
|
8357
8386
|
},
|
|
8358
8387
|
danger: {
|
|
8359
|
-
borderColor:
|
|
8360
|
-
backgroundColor:
|
|
8388
|
+
borderColor: colors20.DdsColorDangerLighter,
|
|
8389
|
+
backgroundColor: colors20.DdsColorDangerLightest
|
|
8361
8390
|
},
|
|
8362
8391
|
warning: {
|
|
8363
|
-
borderColor:
|
|
8364
|
-
backgroundColor:
|
|
8392
|
+
borderColor: colors20.DdsColorWarningLighter,
|
|
8393
|
+
backgroundColor: colors20.DdsColorWarningLightest
|
|
8365
8394
|
}
|
|
8366
8395
|
};
|
|
8367
8396
|
var contentContainer3 = {
|
|
@@ -8393,20 +8422,20 @@ var globalMessageTokens = {
|
|
|
8393
8422
|
icon: {
|
|
8394
8423
|
marginRight: `${spacing21.SizesDdsSpacingX075}`,
|
|
8395
8424
|
info: {
|
|
8396
|
-
color:
|
|
8425
|
+
color: colors20.DdsColorInfoDarkest
|
|
8397
8426
|
},
|
|
8398
8427
|
danger: {
|
|
8399
|
-
color:
|
|
8428
|
+
color: colors20.DdsColorDangerDarkest
|
|
8400
8429
|
},
|
|
8401
8430
|
warning: {
|
|
8402
|
-
color:
|
|
8431
|
+
color: colors20.DdsColorWarningDarkest
|
|
8403
8432
|
}
|
|
8404
8433
|
}
|
|
8405
8434
|
};
|
|
8406
8435
|
|
|
8407
8436
|
// src/components/GlobalMessage/GlobalMessage.tsx
|
|
8408
8437
|
import { jsx as jsx219, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
8409
|
-
var { container: container8, contentContainer: contentContainer4, icon:
|
|
8438
|
+
var { container: container8, contentContainer: contentContainer4, icon: icon4 } = globalMessageTokens;
|
|
8410
8439
|
var Container7 = styled55.div`
|
|
8411
8440
|
display: flex;
|
|
8412
8441
|
align-items: center;
|
|
@@ -8422,7 +8451,7 @@ var Container7 = styled55.div`
|
|
|
8422
8451
|
`}
|
|
8423
8452
|
`;
|
|
8424
8453
|
var MessageIconWrapper = styled55(Icon)`
|
|
8425
|
-
margin-right: ${
|
|
8454
|
+
margin-right: ${icon4.marginRight};
|
|
8426
8455
|
`;
|
|
8427
8456
|
var ControlsContainer = styled55.div`
|
|
8428
8457
|
display: flex;
|
|
@@ -8461,7 +8490,7 @@ var GlobalMessage = forwardRef34(
|
|
|
8461
8490
|
MessageIconWrapper,
|
|
8462
8491
|
{
|
|
8463
8492
|
icon: purposeVariants[purpose].icon,
|
|
8464
|
-
color:
|
|
8493
|
+
color: icon4[purpose].color
|
|
8465
8494
|
}
|
|
8466
8495
|
),
|
|
8467
8496
|
children != null ? children : /* @__PURE__ */ jsx219(Typography, { as: "span", children: message2 })
|
|
@@ -8690,10 +8719,10 @@ import { forwardRef as forwardRef36, useRef as useRef24 } from "react";
|
|
|
8690
8719
|
import {
|
|
8691
8720
|
Children as Children4,
|
|
8692
8721
|
cloneElement as cloneElement4,
|
|
8693
|
-
isValidElement as
|
|
8722
|
+
isValidElement as isValidElement5,
|
|
8694
8723
|
useState as useState17
|
|
8695
8724
|
} from "react";
|
|
8696
|
-
import { Fragment as
|
|
8725
|
+
import { Fragment as Fragment7, jsx as jsx222 } from "react/jsx-runtime";
|
|
8697
8726
|
var InlineEdit = (props) => {
|
|
8698
8727
|
const {
|
|
8699
8728
|
emptiable,
|
|
@@ -8734,7 +8763,7 @@ var InlineEdit = (props) => {
|
|
|
8734
8763
|
useOnKeyDown(["Escape"], () => onExitHandler());
|
|
8735
8764
|
useOnClickOutside(inputRef.current, () => onExitHandler());
|
|
8736
8765
|
const inputChild = Children4.only(
|
|
8737
|
-
|
|
8766
|
+
isValidElement5(children) && cloneElement4(children, {
|
|
8738
8767
|
onChange: onChangeHandler,
|
|
8739
8768
|
onBlur: onBlurHandler,
|
|
8740
8769
|
onFocus: onFocusHandler,
|
|
@@ -8743,7 +8772,7 @@ var InlineEdit = (props) => {
|
|
|
8743
8772
|
emptiable
|
|
8744
8773
|
})
|
|
8745
8774
|
);
|
|
8746
|
-
return /* @__PURE__ */ jsx222(
|
|
8775
|
+
return /* @__PURE__ */ jsx222(Fragment7, { children: inputChild });
|
|
8747
8776
|
};
|
|
8748
8777
|
InlineEdit.displayName = "InlineEdit";
|
|
8749
8778
|
|
|
@@ -8755,7 +8784,7 @@ import styled58, { css as css23 } from "styled-components";
|
|
|
8755
8784
|
|
|
8756
8785
|
// src/components/InlineEdit/InlineEdit.tokens.ts
|
|
8757
8786
|
import { ddsBaseTokens as ddsBaseTokens41 } from "@norges-domstoler/dds-design-tokens";
|
|
8758
|
-
var { colors:
|
|
8787
|
+
var { colors: colors21, spacing: spacing23, fontPackages: fontPackages5 } = ddsBaseTokens41;
|
|
8759
8788
|
var inlineEdit = {
|
|
8760
8789
|
padding: spacing23.SizesDdsSpacingX025,
|
|
8761
8790
|
font: fontPackages5.body_sans_02.base,
|
|
@@ -8764,10 +8793,10 @@ var inlineEdit = {
|
|
|
8764
8793
|
paddingLeft: spacing23.SizesDdsSpacingX2
|
|
8765
8794
|
},
|
|
8766
8795
|
hover: {
|
|
8767
|
-
backgroundColor:
|
|
8796
|
+
backgroundColor: colors21.DdsColorInteractiveLightest
|
|
8768
8797
|
},
|
|
8769
8798
|
focus: {
|
|
8770
|
-
backgroundColor:
|
|
8799
|
+
backgroundColor: colors21.DdsColorNeutralsWhite
|
|
8771
8800
|
}
|
|
8772
8801
|
};
|
|
8773
8802
|
var iconWrapper = {
|
|
@@ -8998,9 +9027,9 @@ import styled59, { css as css24 } from "styled-components";
|
|
|
8998
9027
|
|
|
8999
9028
|
// src/components/InternalHeader/InternalHeader.tokens.tsx
|
|
9000
9029
|
import { ddsBaseTokens as ddsBaseTokens42 } from "@norges-domstoler/dds-design-tokens";
|
|
9001
|
-
var { border: border10, colors:
|
|
9030
|
+
var { border: border10, colors: colors22, spacing: spacing24 } = ddsBaseTokens42;
|
|
9002
9031
|
var bar = {
|
|
9003
|
-
backgroundColor:
|
|
9032
|
+
backgroundColor: colors22.DdsColorNeutralsWhite,
|
|
9004
9033
|
itemGap: spacing24.SizesDdsSpacingX15,
|
|
9005
9034
|
minHeight: "57px",
|
|
9006
9035
|
borderBottom: `${border10.BordersDdsBorderStyleLightStroke} solid ${border10.BordersDdsBorderStyleLightStrokeWeight}`,
|
|
@@ -9392,7 +9421,7 @@ import styled63, { css as css26 } from "styled-components";
|
|
|
9392
9421
|
|
|
9393
9422
|
// src/components/LocalMessage/LocalMessage.tokens.tsx
|
|
9394
9423
|
import { ddsBaseTokens as ddsBaseTokens45 } from "@norges-domstoler/dds-design-tokens";
|
|
9395
|
-
var { colors:
|
|
9424
|
+
var { colors: colors23, spacing: spacing26, borderRadius: borderRadius6, border: border11, outerShadow: outerShadow3 } = ddsBaseTokens45;
|
|
9396
9425
|
var container9 = {
|
|
9397
9426
|
base: {
|
|
9398
9427
|
boxShadow: outerShadow3.DdsShadow1Onlight,
|
|
@@ -9403,28 +9432,28 @@ var container9 = {
|
|
|
9403
9432
|
},
|
|
9404
9433
|
purpose: {
|
|
9405
9434
|
info: {
|
|
9406
|
-
borderColor:
|
|
9407
|
-
backgroundColor:
|
|
9435
|
+
borderColor: colors23.DdsColorInfoBase,
|
|
9436
|
+
backgroundColor: colors23.DdsColorInfoLightest
|
|
9408
9437
|
},
|
|
9409
9438
|
warning: {
|
|
9410
|
-
borderColor:
|
|
9411
|
-
backgroundColor:
|
|
9439
|
+
borderColor: colors23.DdsColorWarningBase,
|
|
9440
|
+
backgroundColor: colors23.DdsColorWarningLightest
|
|
9412
9441
|
},
|
|
9413
9442
|
danger: {
|
|
9414
|
-
borderColor:
|
|
9415
|
-
backgroundColor:
|
|
9443
|
+
borderColor: colors23.DdsColorDangerBase,
|
|
9444
|
+
backgroundColor: colors23.DdsColorDangerLightest
|
|
9416
9445
|
},
|
|
9417
9446
|
success: {
|
|
9418
|
-
borderColor:
|
|
9419
|
-
backgroundColor:
|
|
9447
|
+
borderColor: colors23.DdsColorSuccessBase,
|
|
9448
|
+
backgroundColor: colors23.DdsColorSuccessLightest
|
|
9420
9449
|
},
|
|
9421
9450
|
tips: {
|
|
9422
|
-
borderColor:
|
|
9423
|
-
backgroundColor:
|
|
9451
|
+
borderColor: colors23.DdsColorPrimaryBase,
|
|
9452
|
+
backgroundColor: colors23.DdsColorPrimaryLightest
|
|
9424
9453
|
},
|
|
9425
9454
|
confidential: {
|
|
9426
|
-
borderColor:
|
|
9427
|
-
backgroundColor:
|
|
9455
|
+
borderColor: colors23.DdsColorDangerBase,
|
|
9456
|
+
backgroundColor: colors23.DdsColorDangerLightest
|
|
9428
9457
|
}
|
|
9429
9458
|
}
|
|
9430
9459
|
};
|
|
@@ -9459,37 +9488,37 @@ var purposeVariants2 = {
|
|
|
9459
9488
|
closeButtonPurpose: "danger"
|
|
9460
9489
|
}
|
|
9461
9490
|
};
|
|
9462
|
-
var
|
|
9491
|
+
var icon5 = {
|
|
9463
9492
|
marginRight: `${spacing26.SizesDdsSpacingX075}`,
|
|
9464
9493
|
info: {
|
|
9465
|
-
color:
|
|
9494
|
+
color: colors23.DdsColorInfoDarkest
|
|
9466
9495
|
},
|
|
9467
9496
|
danger: {
|
|
9468
|
-
color:
|
|
9497
|
+
color: colors23.DdsColorDangerDarkest
|
|
9469
9498
|
},
|
|
9470
9499
|
warning: {
|
|
9471
|
-
color:
|
|
9500
|
+
color: colors23.DdsColorWarningDarkest
|
|
9472
9501
|
},
|
|
9473
9502
|
success: {
|
|
9474
|
-
color:
|
|
9503
|
+
color: colors23.DdsColorSuccessDarkest
|
|
9475
9504
|
},
|
|
9476
9505
|
tips: {
|
|
9477
|
-
color:
|
|
9506
|
+
color: colors23.DdsColorPrimaryDarkest
|
|
9478
9507
|
},
|
|
9479
9508
|
confidential: {
|
|
9480
|
-
color:
|
|
9509
|
+
color: colors23.DdsColorDangerDarkest
|
|
9481
9510
|
}
|
|
9482
9511
|
};
|
|
9483
9512
|
var localMessageTokens = {
|
|
9484
9513
|
container: container9,
|
|
9485
9514
|
content: content3,
|
|
9486
9515
|
purposeVariants: purposeVariants2,
|
|
9487
|
-
icon:
|
|
9516
|
+
icon: icon5
|
|
9488
9517
|
};
|
|
9489
9518
|
|
|
9490
9519
|
// src/components/LocalMessage/LocalMessage.tsx
|
|
9491
|
-
import { Fragment as
|
|
9492
|
-
var { container: container10, content: content4, icon:
|
|
9520
|
+
import { Fragment as Fragment8, jsx as jsx231, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
9521
|
+
var { container: container10, content: content4, icon: icon6, purposeVariants: purposeVariants3 } = localMessageTokens;
|
|
9493
9522
|
var Container8 = styled63.div.withConfig({
|
|
9494
9523
|
shouldForwardProp: (prop) => {
|
|
9495
9524
|
const styleOnlyProps = [
|
|
@@ -9577,14 +9606,14 @@ var LocalMessage = forwardRef42(
|
|
|
9577
9606
|
ref
|
|
9578
9607
|
};
|
|
9579
9608
|
if (isClosed) {
|
|
9580
|
-
return /* @__PURE__ */ jsx231(
|
|
9609
|
+
return /* @__PURE__ */ jsx231(Fragment8, {});
|
|
9581
9610
|
}
|
|
9582
9611
|
return /* @__PURE__ */ jsxs53(Container8, { ...containerProps, children: [
|
|
9583
9612
|
/* @__PURE__ */ jsx231(
|
|
9584
9613
|
MessageIconWrapper2,
|
|
9585
9614
|
{
|
|
9586
9615
|
icon: purposeVariants3[purpose].icon,
|
|
9587
|
-
color:
|
|
9616
|
+
color: icon6[purpose].color
|
|
9588
9617
|
}
|
|
9589
9618
|
),
|
|
9590
9619
|
/* @__PURE__ */ jsx231(TextContainer2, { children: children != null ? children : /* @__PURE__ */ jsx231(Typography, { as: "span", children: message2 }) }),
|
|
@@ -9825,12 +9854,12 @@ import styled69, { css as css28 } from "styled-components";
|
|
|
9825
9854
|
|
|
9826
9855
|
// src/components/Pagination/Pagination.tokens.tsx
|
|
9827
9856
|
import { ddsBaseTokens as ddsBaseTokens48 } from "@norges-domstoler/dds-design-tokens";
|
|
9828
|
-
var { spacing: spacing28, colors:
|
|
9857
|
+
var { spacing: spacing28, colors: colors24 } = ddsBaseTokens48;
|
|
9829
9858
|
var list7 = {
|
|
9830
9859
|
gap: spacing28.SizesDdsSpacingX075
|
|
9831
9860
|
};
|
|
9832
9861
|
var truncationIcon = {
|
|
9833
|
-
color:
|
|
9862
|
+
color: colors24.DdsColorNeutralsGray7
|
|
9834
9863
|
};
|
|
9835
9864
|
var outerContainer3 = {
|
|
9836
9865
|
gap: spacing28.SizesDdsSpacingX075
|
|
@@ -9892,7 +9921,7 @@ import {
|
|
|
9892
9921
|
ddsBaseTokens as ddsBaseTokens49,
|
|
9893
9922
|
ddsReferenceTokens as ddsReferenceTokens6
|
|
9894
9923
|
} from "@norges-domstoler/dds-design-tokens";
|
|
9895
|
-
var { colors:
|
|
9924
|
+
var { colors: colors25, spacing: spacing29, borderRadius: borderRadius7, border: border12 } = ddsBaseTokens49;
|
|
9896
9925
|
var { textDefault: textDefault5 } = ddsReferenceTokens6;
|
|
9897
9926
|
var placeholderTypographyTypes = {
|
|
9898
9927
|
medium: "supportingStylePlaceholderText01",
|
|
@@ -9915,12 +9944,12 @@ var typographyTypes3 = {
|
|
|
9915
9944
|
var control = {
|
|
9916
9945
|
borderRadius: borderRadius7.RadiiDdsBorderRadius1Radius,
|
|
9917
9946
|
border: `${border12.BordersDdsBorderStyleLightStrokeWeight} solid`,
|
|
9918
|
-
borderColor:
|
|
9919
|
-
backgroundColor:
|
|
9920
|
-
color:
|
|
9947
|
+
borderColor: colors25.DdsColorNeutralsGray5,
|
|
9948
|
+
backgroundColor: colors25.DdsColorNeutralsWhite,
|
|
9949
|
+
color: colors25.DdsColorNeutralsGray9,
|
|
9921
9950
|
disabled: {
|
|
9922
|
-
backgroundColor:
|
|
9923
|
-
borderColor:
|
|
9951
|
+
backgroundColor: colors25.DdsColorNeutralsGray1,
|
|
9952
|
+
borderColor: colors25.DdsColorNeutralsGray5
|
|
9924
9953
|
},
|
|
9925
9954
|
readOnly: {
|
|
9926
9955
|
borderColor: "transparent",
|
|
@@ -9953,14 +9982,14 @@ var control = {
|
|
|
9953
9982
|
}
|
|
9954
9983
|
};
|
|
9955
9984
|
var placeholder = {
|
|
9956
|
-
color:
|
|
9985
|
+
color: colors25.DdsColorNeutralsGray6
|
|
9957
9986
|
};
|
|
9958
9987
|
var dropdownIndicator = {
|
|
9959
9988
|
base: {
|
|
9960
|
-
color:
|
|
9989
|
+
color: colors25.DdsColorNeutralsGray6
|
|
9961
9990
|
},
|
|
9962
9991
|
hover: {
|
|
9963
|
-
color:
|
|
9992
|
+
color: colors25.DdsColorInteractiveBase
|
|
9964
9993
|
},
|
|
9965
9994
|
readOnly: {
|
|
9966
9995
|
color: "transparent"
|
|
@@ -9968,23 +9997,23 @@ var dropdownIndicator = {
|
|
|
9968
9997
|
};
|
|
9969
9998
|
var clearIndicator = {
|
|
9970
9999
|
base: {
|
|
9971
|
-
color:
|
|
10000
|
+
color: colors25.DdsColorNeutralsGray6
|
|
9972
10001
|
},
|
|
9973
|
-
hover: { color:
|
|
10002
|
+
hover: { color: colors25.DdsColorInteractiveBase }
|
|
9974
10003
|
};
|
|
9975
10004
|
var loadingIndicator = {
|
|
9976
|
-
color:
|
|
10005
|
+
color: colors25.DdsColorNeutralsGray6
|
|
9977
10006
|
};
|
|
9978
10007
|
var menu = {
|
|
9979
10008
|
border: "1px solid",
|
|
9980
|
-
borderColor:
|
|
9981
|
-
backgroundColor:
|
|
10009
|
+
borderColor: colors25.DdsColorInteractiveBase,
|
|
10010
|
+
backgroundColor: colors25.DdsColorNeutralsWhite,
|
|
9982
10011
|
borderRadius: borderRadius7.RadiiDdsBorderRadius1Radius,
|
|
9983
10012
|
marginTop: spacing29.SizesDdsSpacingX025,
|
|
9984
10013
|
marginBottom: spacing29.SizesDdsSpacingX025
|
|
9985
10014
|
};
|
|
9986
10015
|
var groupHeading = {
|
|
9987
|
-
color:
|
|
10016
|
+
color: colors25.DdsColorNeutralsGray7,
|
|
9988
10017
|
padding: `${spacing29.SizesDdsSpacingX05} ${spacing29.SizesDdsSpacingX075} ${spacing29.SizesDdsSpacingX0125} ${spacing29.SizesDdsSpacingX075}`
|
|
9989
10018
|
};
|
|
9990
10019
|
var option = {
|
|
@@ -9992,44 +10021,44 @@ var option = {
|
|
|
9992
10021
|
color: textDefault5.textColor,
|
|
9993
10022
|
gap: spacing29.SizesDdsSpacingX05,
|
|
9994
10023
|
padding: `${spacing29.SizesDdsSpacingX075}`,
|
|
9995
|
-
backgroundColor:
|
|
10024
|
+
backgroundColor: colors25.DdsColorNeutralsWhite
|
|
9996
10025
|
},
|
|
9997
10026
|
hover: {
|
|
9998
10027
|
color: textDefault5.textColor,
|
|
9999
|
-
backgroundColor:
|
|
10028
|
+
backgroundColor: colors25.DdsColorInteractiveLightest
|
|
10000
10029
|
},
|
|
10001
10030
|
focus: {
|
|
10002
10031
|
color: textDefault5.textColor,
|
|
10003
|
-
backgroundColor:
|
|
10032
|
+
backgroundColor: colors25.DdsColorInteractiveLightest
|
|
10004
10033
|
},
|
|
10005
10034
|
selected: {
|
|
10006
10035
|
color: textDefault5.textColor,
|
|
10007
|
-
backgroundColor:
|
|
10036
|
+
backgroundColor: colors25.DdsColorNeutralsWhite
|
|
10008
10037
|
}
|
|
10009
10038
|
};
|
|
10010
10039
|
var noOptionsMessage = {
|
|
10011
10040
|
padding: `${spacing29.SizesDdsSpacingX05} ${spacing29.SizesDdsSpacingX1}`,
|
|
10012
|
-
color:
|
|
10041
|
+
color: colors25.DdsColorNeutralsGray6
|
|
10013
10042
|
};
|
|
10014
10043
|
var multiValue = {
|
|
10015
10044
|
borderRadius: borderRadius7.RadiiDdsBorderRadius1Radius,
|
|
10016
|
-
backgroundColor:
|
|
10045
|
+
backgroundColor: colors25.DdsColorNeutralsGray2
|
|
10017
10046
|
};
|
|
10018
10047
|
var multiValueLabel = {
|
|
10019
10048
|
padding: `0 ${spacing29.SizesDdsSpacingX025}`,
|
|
10020
|
-
color:
|
|
10049
|
+
color: colors25.DdsColorNeutralsGray9
|
|
10021
10050
|
};
|
|
10022
10051
|
var multiValueRemove = {
|
|
10023
10052
|
base: {
|
|
10024
|
-
color:
|
|
10053
|
+
color: colors25.DdsColorNeutralsGray9,
|
|
10025
10054
|
padding: `0 ${spacing29.SizesDdsSpacingX025}`,
|
|
10026
10055
|
borderTopRightRadius: borderRadius7.RadiiDdsBorderRadius1Radius,
|
|
10027
10056
|
borderBottomRightRadius: borderRadius7.RadiiDdsBorderRadius1Radius
|
|
10028
10057
|
},
|
|
10029
10058
|
hover: {
|
|
10030
|
-
color:
|
|
10031
|
-
backgroundColor:
|
|
10032
|
-
boxShadow: `inset 0 0 0 1px ${
|
|
10059
|
+
color: colors25.DdsColorNeutralsWhite,
|
|
10060
|
+
backgroundColor: colors25.DdsColorInteractiveBase,
|
|
10061
|
+
boxShadow: `inset 0 0 0 1px ${colors25.DdsColorNeutralsGray9}`
|
|
10033
10062
|
}
|
|
10034
10063
|
};
|
|
10035
10064
|
var valueContainer = {
|
|
@@ -10037,7 +10066,7 @@ var valueContainer = {
|
|
|
10037
10066
|
gap: spacing29.SizesDdsSpacingX025
|
|
10038
10067
|
}
|
|
10039
10068
|
};
|
|
10040
|
-
var
|
|
10069
|
+
var icon7 = {
|
|
10041
10070
|
marginRight: spacing29.SizesDdsSpacingX05
|
|
10042
10071
|
};
|
|
10043
10072
|
var selectTokens = {
|
|
@@ -10054,7 +10083,7 @@ var selectTokens = {
|
|
|
10054
10083
|
noOptionsMessage,
|
|
10055
10084
|
clearIndicator,
|
|
10056
10085
|
loadingIndicator,
|
|
10057
|
-
icon:
|
|
10086
|
+
icon: icon7
|
|
10058
10087
|
};
|
|
10059
10088
|
|
|
10060
10089
|
// src/components/Select/Select.styles.ts
|
|
@@ -10071,7 +10100,7 @@ var {
|
|
|
10071
10100
|
multiValueRemove: multiValueRemove2,
|
|
10072
10101
|
noOptionsMessage: noOptionsMessage2,
|
|
10073
10102
|
placeholder: placeholder2,
|
|
10074
|
-
icon:
|
|
10103
|
+
icon: icon8,
|
|
10075
10104
|
valueContainer: valueContainer2
|
|
10076
10105
|
} = selectTokens;
|
|
10077
10106
|
var prefix = "dds-select";
|
|
@@ -10152,8 +10181,8 @@ var InnerSingleValue = styled68.div`
|
|
|
10152
10181
|
box-sizing: border-box;
|
|
10153
10182
|
max-width: 100%;
|
|
10154
10183
|
`;
|
|
10155
|
-
var
|
|
10156
|
-
margin-right: ${
|
|
10184
|
+
var StyledIcon3 = styled68(Icon)`
|
|
10185
|
+
margin-right: ${icon8.marginRight};
|
|
10157
10186
|
`;
|
|
10158
10187
|
var getCustomStyles = (size2) => ({
|
|
10159
10188
|
control: () => ({
|
|
@@ -10348,8 +10377,8 @@ var DDSInput = (props, ariaInvalid, ariaDescribedby) => /* @__PURE__ */ jsx235(
|
|
|
10348
10377
|
"aria-describedby": ariaDescribedby
|
|
10349
10378
|
}
|
|
10350
10379
|
);
|
|
10351
|
-
var DDSControl = (props, componentSize,
|
|
10352
|
-
|
|
10380
|
+
var DDSControl = (props, componentSize, icon11) => /* @__PURE__ */ jsxs55(Control, { ...props, children: [
|
|
10381
|
+
icon11 && /* @__PURE__ */ jsx235(StyledIcon3, { icon: icon11, iconSize: getFormInputIconSize(componentSize) }),
|
|
10353
10382
|
props.children
|
|
10354
10383
|
] });
|
|
10355
10384
|
|
|
@@ -10370,7 +10399,7 @@ function SelectInner(props, ref) {
|
|
|
10370
10399
|
options,
|
|
10371
10400
|
isMulti,
|
|
10372
10401
|
value,
|
|
10373
|
-
icon:
|
|
10402
|
+
icon: icon11,
|
|
10374
10403
|
defaultValue,
|
|
10375
10404
|
width = defaultWidth4,
|
|
10376
10405
|
closeMenuOnSelect,
|
|
@@ -10434,7 +10463,7 @@ function SelectInner(props, ref) {
|
|
|
10434
10463
|
ClearIndicator: (props2) => DDSClearIndicator(props2, componentSize),
|
|
10435
10464
|
DropdownIndicator: (props2) => DDSDropdownIndicator(props2, componentSize),
|
|
10436
10465
|
MultiValueRemove: DDSMultiValueRemove,
|
|
10437
|
-
Control: (props2) => DDSControl(props2, componentSize,
|
|
10466
|
+
Control: (props2) => DDSControl(props2, componentSize, icon11)
|
|
10438
10467
|
},
|
|
10439
10468
|
"aria-invalid": hasErrorMessage ? true : void 0,
|
|
10440
10469
|
required,
|
|
@@ -10456,7 +10485,7 @@ var createSelectOptions = (...args) => args.map((v) => ({ label: v, value: v }))
|
|
|
10456
10485
|
// src/components/Pagination/Pagination.tsx
|
|
10457
10486
|
import { jsx as jsx237, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
10458
10487
|
var { outerContainer: outerContainer4, indicatorsContainer: indicatorsContainer2, truncationIcon: truncationIcon2, list: list8 } = paginationTokens;
|
|
10459
|
-
var
|
|
10488
|
+
var Nav = styled69.nav`
|
|
10460
10489
|
display: flex;
|
|
10461
10490
|
align-items: center;
|
|
10462
10491
|
`;
|
|
@@ -10589,12 +10618,12 @@ var Pagination = forwardRef47(
|
|
|
10589
10618
|
};
|
|
10590
10619
|
const isOnFirstPage = activePage === 1;
|
|
10591
10620
|
const isOnLastPage = activePage === pagesLength;
|
|
10592
|
-
const navigation2 = withPagination ? /* @__PURE__ */ jsx237(
|
|
10621
|
+
const navigation2 = withPagination ? /* @__PURE__ */ jsx237(Nav, { ref, "aria-label": "paginering", ...navProps, children: /* @__PURE__ */ jsxs57(List3, { children: [
|
|
10593
10622
|
/* @__PURE__ */ jsx237(ListItem3, { $isHidden: isOnFirstPage, "aria-hidden": isOnFirstPage, children: previousPageButton }),
|
|
10594
10623
|
listItems,
|
|
10595
10624
|
/* @__PURE__ */ jsx237(ListItem3, { $isHidden: isOnLastPage, "aria-hidden": isOnLastPage, children: nextPageButton })
|
|
10596
10625
|
] }) }) : null;
|
|
10597
|
-
const smallScreenNavigation = withPagination ? /* @__PURE__ */ jsx237(
|
|
10626
|
+
const smallScreenNavigation = withPagination ? /* @__PURE__ */ jsx237(Nav, { ref, "aria-label": "paginering", ...navProps, children: /* @__PURE__ */ jsxs57(List3, { children: [
|
|
10598
10627
|
/* @__PURE__ */ jsx237(ListItem3, { $isHidden: isOnFirstPage, "aria-hidden": isOnFirstPage, children: /* @__PURE__ */ jsx237(
|
|
10599
10628
|
Button,
|
|
10600
10629
|
{
|
|
@@ -10820,12 +10849,12 @@ Popover.displayName = "Popover";
|
|
|
10820
10849
|
import {
|
|
10821
10850
|
Children as ReactChildren4,
|
|
10822
10851
|
cloneElement as cloneElement5,
|
|
10823
|
-
isValidElement as
|
|
10852
|
+
isValidElement as isValidElement6,
|
|
10824
10853
|
useId as useId15,
|
|
10825
10854
|
useRef as useRef28,
|
|
10826
10855
|
useState as useState21
|
|
10827
10856
|
} from "react";
|
|
10828
|
-
import { Fragment as
|
|
10857
|
+
import { Fragment as Fragment9, jsx as jsx239 } from "react/jsx-runtime";
|
|
10829
10858
|
var PopoverGroup = ({
|
|
10830
10859
|
isOpen = false,
|
|
10831
10860
|
onCloseButtonClick,
|
|
@@ -10855,7 +10884,7 @@ var PopoverGroup = ({
|
|
|
10855
10884
|
});
|
|
10856
10885
|
const handleClose = () => setOpen(false);
|
|
10857
10886
|
const Children9 = ReactChildren4.map(children, (child, childIndex) => {
|
|
10858
|
-
return
|
|
10887
|
+
return isValidElement6(child) && (childIndex === 0 ? cloneElement5(child, {
|
|
10859
10888
|
"aria-haspopup": "dialog",
|
|
10860
10889
|
"aria-controls": uniquePopoverId,
|
|
10861
10890
|
"aria-expanded": open,
|
|
@@ -10871,17 +10900,17 @@ var PopoverGroup = ({
|
|
|
10871
10900
|
onClose: handleClose
|
|
10872
10901
|
}));
|
|
10873
10902
|
});
|
|
10874
|
-
return /* @__PURE__ */ jsx239(
|
|
10903
|
+
return /* @__PURE__ */ jsx239(Fragment9, { children: Children9 });
|
|
10875
10904
|
};
|
|
10876
10905
|
PopoverGroup.displayName = "PopoverGroup";
|
|
10877
10906
|
|
|
10878
10907
|
// src/components/ProgressTracker/ProgressTracker.tsx
|
|
10879
10908
|
import {
|
|
10880
10909
|
Children as Children5,
|
|
10881
|
-
Fragment as
|
|
10910
|
+
Fragment as Fragment10,
|
|
10882
10911
|
cloneElement as cloneElement6,
|
|
10883
10912
|
forwardRef as forwardRef49,
|
|
10884
|
-
isValidElement as
|
|
10913
|
+
isValidElement as isValidElement7,
|
|
10885
10914
|
useEffect as useEffect23,
|
|
10886
10915
|
useMemo as useMemo3,
|
|
10887
10916
|
useState as useState22
|
|
@@ -10899,7 +10928,7 @@ var useProgressTrackerContext = () => useContext5(ProgressTrackerContext);
|
|
|
10899
10928
|
|
|
10900
10929
|
// src/components/ProgressTracker/ProgressTracker.tokens.tsx
|
|
10901
10930
|
import { ddsBaseTokens as ddsBaseTokens52 } from "@norges-domstoler/dds-design-tokens";
|
|
10902
|
-
var { colors:
|
|
10931
|
+
var { colors: colors26, spacing: spacing31 } = ddsBaseTokens52;
|
|
10903
10932
|
var typographyTypes4 = {
|
|
10904
10933
|
number: "bodySans01",
|
|
10905
10934
|
label: "bodySans03"
|
|
@@ -10911,7 +10940,7 @@ var itemContentWrapper = {
|
|
|
10911
10940
|
gap: spacing31.SizesDdsSpacingX05
|
|
10912
10941
|
};
|
|
10913
10942
|
var connector = {
|
|
10914
|
-
color:
|
|
10943
|
+
color: colors26.DdsColorNeutralsGray5,
|
|
10915
10944
|
height: "18px",
|
|
10916
10945
|
width: "1px"
|
|
10917
10946
|
};
|
|
@@ -10920,87 +10949,87 @@ var itemNumber = {
|
|
|
10920
10949
|
borderWidth: "2px",
|
|
10921
10950
|
iconSize: "small",
|
|
10922
10951
|
activeIncomplete: {
|
|
10923
|
-
borderColor:
|
|
10924
|
-
color:
|
|
10925
|
-
backgroundColor:
|
|
10952
|
+
borderColor: colors26.DdsColorInteractiveBase,
|
|
10953
|
+
color: colors26.DdsColorNeutralsWhite,
|
|
10954
|
+
backgroundColor: colors26.DdsColorInteractiveBase,
|
|
10926
10955
|
hover: {
|
|
10927
|
-
borderColor:
|
|
10928
|
-
color:
|
|
10929
|
-
backgroundColor:
|
|
10956
|
+
borderColor: colors26.DdsColorInteractiveBase,
|
|
10957
|
+
color: colors26.DdsColorNeutralsWhite,
|
|
10958
|
+
backgroundColor: colors26.DdsColorInteractiveBase
|
|
10930
10959
|
}
|
|
10931
10960
|
},
|
|
10932
10961
|
activeCompleted: {
|
|
10933
|
-
borderColor:
|
|
10934
|
-
color:
|
|
10935
|
-
backgroundColor:
|
|
10962
|
+
borderColor: colors26.DdsColorInteractiveBase,
|
|
10963
|
+
color: colors26.DdsColorNeutralsWhite,
|
|
10964
|
+
backgroundColor: colors26.DdsColorInteractiveBase,
|
|
10936
10965
|
hover: {
|
|
10937
|
-
borderColor:
|
|
10938
|
-
color:
|
|
10939
|
-
backgroundColor:
|
|
10966
|
+
borderColor: colors26.DdsColorInteractiveDark,
|
|
10967
|
+
color: colors26.DdsColorNeutralsWhite,
|
|
10968
|
+
backgroundColor: colors26.DdsColorInteractiveDark
|
|
10940
10969
|
}
|
|
10941
10970
|
},
|
|
10942
10971
|
inactiveCompleted: {
|
|
10943
|
-
borderColor:
|
|
10944
|
-
color:
|
|
10945
|
-
backgroundColor:
|
|
10972
|
+
borderColor: colors26.DdsColorInteractiveBase,
|
|
10973
|
+
color: colors26.DdsColorNeutralsWhite,
|
|
10974
|
+
backgroundColor: colors26.DdsColorInteractiveBase,
|
|
10946
10975
|
hover: {
|
|
10947
|
-
borderColor:
|
|
10948
|
-
color:
|
|
10949
|
-
backgroundColor:
|
|
10976
|
+
borderColor: colors26.DdsColorInteractiveDark,
|
|
10977
|
+
color: colors26.DdsColorNeutralsWhite,
|
|
10978
|
+
backgroundColor: colors26.DdsColorInteractiveDark
|
|
10950
10979
|
}
|
|
10951
10980
|
},
|
|
10952
10981
|
inactiveIncomplete: {
|
|
10953
|
-
borderColor:
|
|
10954
|
-
color:
|
|
10955
|
-
backgroundColor:
|
|
10982
|
+
borderColor: colors26.DdsColorInteractiveBase,
|
|
10983
|
+
color: colors26.DdsColorInteractiveBase,
|
|
10984
|
+
backgroundColor: colors26.DdsColorNeutralsWhite,
|
|
10956
10985
|
hover: {
|
|
10957
|
-
borderColor:
|
|
10958
|
-
color:
|
|
10959
|
-
backgroundColor:
|
|
10986
|
+
borderColor: colors26.DdsColorInteractiveBase,
|
|
10987
|
+
color: colors26.DdsColorInteractiveBase,
|
|
10988
|
+
backgroundColor: colors26.DdsColorInteractiveLightest
|
|
10960
10989
|
}
|
|
10961
10990
|
},
|
|
10962
10991
|
disabled: {
|
|
10963
|
-
borderColor:
|
|
10964
|
-
color:
|
|
10965
|
-
backgroundColor:
|
|
10992
|
+
borderColor: colors26.DdsColorNeutralsGray5,
|
|
10993
|
+
color: colors26.DdsColorNeutralsGray5,
|
|
10994
|
+
backgroundColor: colors26.DdsColorNeutralsWhite
|
|
10966
10995
|
}
|
|
10967
10996
|
};
|
|
10968
10997
|
var itemText = {
|
|
10969
10998
|
textDecoration: "underline",
|
|
10970
10999
|
activeCompleted: {
|
|
10971
|
-
color:
|
|
11000
|
+
color: colors26.DdsColorInteractiveBase,
|
|
10972
11001
|
textDecorationColor: "transparent",
|
|
10973
11002
|
hover: {
|
|
10974
|
-
color:
|
|
11003
|
+
color: colors26.DdsColorInteractiveBase,
|
|
10975
11004
|
textDecorationColor: "transparent"
|
|
10976
11005
|
}
|
|
10977
11006
|
},
|
|
10978
11007
|
activeIncomplete: {
|
|
10979
|
-
color:
|
|
11008
|
+
color: colors26.DdsColorInteractiveBase,
|
|
10980
11009
|
textDecorationColor: "transparent",
|
|
10981
11010
|
hover: {
|
|
10982
|
-
color:
|
|
11011
|
+
color: colors26.DdsColorInteractiveBase,
|
|
10983
11012
|
textDecorationColor: "transparent"
|
|
10984
11013
|
}
|
|
10985
11014
|
},
|
|
10986
11015
|
inactiveIncomplete: {
|
|
10987
|
-
color:
|
|
10988
|
-
textDecorationColor:
|
|
11016
|
+
color: colors26.DdsColorNeutralsGray7,
|
|
11017
|
+
textDecorationColor: colors26.DdsColorNeutralsGray7,
|
|
10989
11018
|
hover: {
|
|
10990
|
-
color:
|
|
10991
|
-
textDecorationColor:
|
|
11019
|
+
color: colors26.DdsColorInteractiveBase,
|
|
11020
|
+
textDecorationColor: colors26.DdsColorInteractiveBase
|
|
10992
11021
|
}
|
|
10993
11022
|
},
|
|
10994
11023
|
inactiveCompleted: {
|
|
10995
|
-
color:
|
|
10996
|
-
textDecorationColor:
|
|
11024
|
+
color: colors26.DdsColorNeutralsGray7,
|
|
11025
|
+
textDecorationColor: colors26.DdsColorNeutralsGray7,
|
|
10997
11026
|
hover: {
|
|
10998
|
-
color:
|
|
10999
|
-
textDecorationColor:
|
|
11027
|
+
color: colors26.DdsColorInteractiveBase,
|
|
11028
|
+
textDecorationColor: colors26.DdsColorInteractiveBase
|
|
11000
11029
|
}
|
|
11001
11030
|
},
|
|
11002
11031
|
disabled: {
|
|
11003
|
-
color:
|
|
11032
|
+
color: colors26.DdsColorNeutralsGray6,
|
|
11004
11033
|
textDecorationColor: "transparent"
|
|
11005
11034
|
}
|
|
11006
11035
|
};
|
|
@@ -11102,7 +11131,7 @@ var ProgressTrackerItem = (props) => {
|
|
|
11102
11131
|
index = 0,
|
|
11103
11132
|
completed = false,
|
|
11104
11133
|
disabled = false,
|
|
11105
|
-
icon:
|
|
11134
|
+
icon: icon11,
|
|
11106
11135
|
children
|
|
11107
11136
|
} = props;
|
|
11108
11137
|
const { activeStep, handleStepChange } = useProgressTrackerContext();
|
|
@@ -11114,11 +11143,11 @@ var ProgressTrackerItem = (props) => {
|
|
|
11114
11143
|
if (completed) {
|
|
11115
11144
|
return /* @__PURE__ */ jsx240(Icon, { icon: CheckIcon, iconSize: itemNumber2.iconSize });
|
|
11116
11145
|
}
|
|
11117
|
-
if (
|
|
11118
|
-
return /* @__PURE__ */ jsx240(Icon, { icon:
|
|
11146
|
+
if (icon11 !== void 0) {
|
|
11147
|
+
return /* @__PURE__ */ jsx240(Icon, { icon: icon11, iconSize: itemNumber2.iconSize });
|
|
11119
11148
|
}
|
|
11120
11149
|
return index + 1;
|
|
11121
|
-
}, [completed,
|
|
11150
|
+
}, [completed, icon11, index]);
|
|
11122
11151
|
return /* @__PURE__ */ jsx240(ItemWrapper, { "aria-current": active ? "step" : void 0, children: /* @__PURE__ */ jsxs59(
|
|
11123
11152
|
ItemContentWrapper,
|
|
11124
11153
|
{
|
|
@@ -11204,7 +11233,7 @@ var ProgressTracker = (() => {
|
|
|
11204
11233
|
return Res;
|
|
11205
11234
|
})();
|
|
11206
11235
|
function removeInvalidChildren(children) {
|
|
11207
|
-
return Children5.toArray(children).filter(
|
|
11236
|
+
return Children5.toArray(children).filter(isValidElement7);
|
|
11208
11237
|
}
|
|
11209
11238
|
function passIndexPropToProgressTrackerItem(children) {
|
|
11210
11239
|
return Children5.map(
|
|
@@ -11219,7 +11248,7 @@ var intersperseItemsWithConnector = (children) => Children5.map(children, (child
|
|
|
11219
11248
|
if (index === 0) {
|
|
11220
11249
|
return child;
|
|
11221
11250
|
}
|
|
11222
|
-
return /* @__PURE__ */ jsxs60(
|
|
11251
|
+
return /* @__PURE__ */ jsxs60(Fragment10, { children: [
|
|
11223
11252
|
/* @__PURE__ */ jsx241(ProgressTrackerConnector, { "aria-hidden": true }),
|
|
11224
11253
|
child
|
|
11225
11254
|
] }, index);
|
|
@@ -11248,7 +11277,7 @@ import {
|
|
|
11248
11277
|
ddsBaseTokens as ddsBaseTokens53,
|
|
11249
11278
|
ddsReferenceTokens as ddsReferenceTokens7
|
|
11250
11279
|
} from "@norges-domstoler/dds-design-tokens";
|
|
11251
|
-
var { spacing: spacing32, iconSizes: iconSizes2, colors:
|
|
11280
|
+
var { spacing: spacing32, iconSizes: iconSizes2, colors: colors27 } = ddsBaseTokens53;
|
|
11252
11281
|
var { textDefault: textDefault6 } = ddsReferenceTokens7;
|
|
11253
11282
|
var typographyTypes5 = {
|
|
11254
11283
|
small: "bodySans01",
|
|
@@ -11310,8 +11339,8 @@ var clearButton = {
|
|
|
11310
11339
|
};
|
|
11311
11340
|
var suggestionsContainer = {
|
|
11312
11341
|
marginTop: spacing32.SizesDdsSpacingX025,
|
|
11313
|
-
border: `1px solid ${
|
|
11314
|
-
boxShadow: `0 0 0 1px ${
|
|
11342
|
+
border: `1px solid ${colors27.DdsColorInteractiveBase}`,
|
|
11343
|
+
boxShadow: `0 0 0 1px ${colors27.DdsColorInteractiveBase}`
|
|
11315
11344
|
};
|
|
11316
11345
|
var suggestionsHeader = {
|
|
11317
11346
|
paddingLeft: spacing32.SizesDdsSpacingX1
|
|
@@ -11440,7 +11469,7 @@ var SearchSuggestions = forwardRef50((props, ref) => {
|
|
|
11440
11469
|
SearchSuggestions.displayName = "SearchSuggestions";
|
|
11441
11470
|
|
|
11442
11471
|
// src/components/Search/Search.tsx
|
|
11443
|
-
import { Fragment as
|
|
11472
|
+
import { Fragment as Fragment11, jsx as jsx243, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
11444
11473
|
var { input: input4, outerContainer: outerContainer6, horisontalContainer: horisontalContainer2, searchIcon: searchIcon2, clearButton: clearButton2 } = searchTokens;
|
|
11445
11474
|
var getIconSize = (size2) => {
|
|
11446
11475
|
switch (size2) {
|
|
@@ -11585,7 +11614,7 @@ var Search = forwardRef51(
|
|
|
11585
11614
|
role: hasSuggestions ? "combobox" : void 0
|
|
11586
11615
|
}
|
|
11587
11616
|
),
|
|
11588
|
-
hasSuggestions && /* @__PURE__ */ jsxs62(
|
|
11617
|
+
hasSuggestions && /* @__PURE__ */ jsxs62(Fragment11, { children: [
|
|
11589
11618
|
/* @__PURE__ */ jsx243(
|
|
11590
11619
|
SearchSuggestions,
|
|
11591
11620
|
{
|
|
@@ -11748,13 +11777,13 @@ var selectionControlTypographyProps = {
|
|
|
11748
11777
|
};
|
|
11749
11778
|
|
|
11750
11779
|
// src/components/SelectionControl/SelectionControl.tokens.tsx
|
|
11751
|
-
var { colors:
|
|
11780
|
+
var { colors: colors28, spacing: spacing33, borderRadius: borderRadius8 } = ddsBaseTokens54;
|
|
11752
11781
|
var checkmark = {
|
|
11753
11782
|
checkbox: {
|
|
11754
|
-
borderColor:
|
|
11783
|
+
borderColor: colors28.DdsColorNeutralsWhite
|
|
11755
11784
|
},
|
|
11756
11785
|
radio: {
|
|
11757
|
-
backgroundColor:
|
|
11786
|
+
backgroundColor: colors28.DdsColorNeutralsWhite,
|
|
11758
11787
|
height: spacing33.SizesDdsSpacingX05,
|
|
11759
11788
|
width: spacing33.SizesDdsSpacingX05,
|
|
11760
11789
|
left: `calc(50% - ${spacing33.SizesDdsSpacingX05NumberPx / 2}px)`,
|
|
@@ -11764,20 +11793,20 @@ var checkmark = {
|
|
|
11764
11793
|
var selectionControl = {
|
|
11765
11794
|
base: {
|
|
11766
11795
|
border: "1px solid",
|
|
11767
|
-
borderColor:
|
|
11768
|
-
backgroundColor:
|
|
11796
|
+
borderColor: colors28.DdsColorNeutralsGray5,
|
|
11797
|
+
backgroundColor: colors28.DdsColorNeutralsWhite,
|
|
11769
11798
|
borderRadius: borderRadius8.RadiiDdsBorderRadius1Radius,
|
|
11770
11799
|
height: selectionControlSize,
|
|
11771
11800
|
width: selectionControlSize
|
|
11772
11801
|
},
|
|
11773
11802
|
hover: {
|
|
11774
11803
|
base: {
|
|
11775
|
-
backgroundColor:
|
|
11804
|
+
backgroundColor: colors28.DdsColorInteractiveLightest,
|
|
11776
11805
|
boxShadow: `inset 0 0 0 1px ${hoverInputfield.borderColor}`,
|
|
11777
11806
|
borderColor: hoverInputfield.borderColor
|
|
11778
11807
|
},
|
|
11779
11808
|
danger: {
|
|
11780
|
-
backgroundColor:
|
|
11809
|
+
backgroundColor: colors28.DdsColorDangerLightest,
|
|
11781
11810
|
boxShadow: `inset 0 0 0 1px ${dangerInputfield.borderColor}`,
|
|
11782
11811
|
borderColor: dangerInputfield.borderColor
|
|
11783
11812
|
}
|
|
@@ -11787,39 +11816,39 @@ var selectionControl = {
|
|
|
11787
11816
|
borderColor: dangerInputfield.borderColor
|
|
11788
11817
|
},
|
|
11789
11818
|
disabled: {
|
|
11790
|
-
borderColor:
|
|
11819
|
+
borderColor: colors28.DdsColorNeutralsGray5
|
|
11791
11820
|
},
|
|
11792
11821
|
readOnly: { backgroundColor: "transparent" },
|
|
11793
11822
|
checked: {
|
|
11794
11823
|
base: {
|
|
11795
|
-
borderColor:
|
|
11796
|
-
backgroundColor:
|
|
11824
|
+
borderColor: colors28.DdsColorInteractiveBase,
|
|
11825
|
+
backgroundColor: colors28.DdsColorInteractiveBase
|
|
11797
11826
|
},
|
|
11798
11827
|
hover: {
|
|
11799
|
-
backgroundColor:
|
|
11800
|
-
boxShadow: `inset 0 0 0 1px ${
|
|
11801
|
-
borderColor:
|
|
11828
|
+
backgroundColor: colors28.DdsColorInteractiveDark,
|
|
11829
|
+
boxShadow: `inset 0 0 0 1px ${colors28.DdsColorInteractiveDark}`,
|
|
11830
|
+
borderColor: colors28.DdsColorInteractiveDark
|
|
11802
11831
|
},
|
|
11803
11832
|
disabled: {
|
|
11804
|
-
borderColor:
|
|
11805
|
-
backgroundColor:
|
|
11833
|
+
borderColor: colors28.DdsColorNeutralsGray6,
|
|
11834
|
+
backgroundColor: colors28.DdsColorNeutralsGray6
|
|
11806
11835
|
},
|
|
11807
11836
|
readOnly: {
|
|
11808
|
-
borderColor:
|
|
11809
|
-
backgroundColor:
|
|
11837
|
+
borderColor: colors28.DdsColorNeutralsGray6,
|
|
11838
|
+
backgroundColor: colors28.DdsColorNeutralsGray6
|
|
11810
11839
|
}
|
|
11811
11840
|
},
|
|
11812
11841
|
checkbox: {
|
|
11813
11842
|
indeterminate: {
|
|
11814
|
-
borderColor:
|
|
11815
|
-
backgroundColor:
|
|
11843
|
+
borderColor: colors28.DdsColorInteractiveBase,
|
|
11844
|
+
backgroundColor: colors28.DdsColorInteractiveBase
|
|
11816
11845
|
}
|
|
11817
11846
|
}
|
|
11818
11847
|
};
|
|
11819
11848
|
var container13 = {
|
|
11820
|
-
color:
|
|
11849
|
+
color: colors28.DdsColorNeutralsGray9,
|
|
11821
11850
|
disabled: {
|
|
11822
|
-
color:
|
|
11851
|
+
color: colors28.DdsColorNeutralsGray6
|
|
11823
11852
|
},
|
|
11824
11853
|
withLabel: {
|
|
11825
11854
|
paddingLeft: `${selectionControlSizeNumberPx + spacing33.SizesDdsSpacingX05NumberPx}px`
|
|
@@ -12342,27 +12371,27 @@ import styled76 from "styled-components";
|
|
|
12342
12371
|
|
|
12343
12372
|
// src/components/SkipToContent/SkipToContent.tokens.tsx
|
|
12344
12373
|
import { ddsBaseTokens as ddsBaseTokens55 } from "@norges-domstoler/dds-design-tokens";
|
|
12345
|
-
var { colors:
|
|
12346
|
-
var
|
|
12374
|
+
var { colors: colors29, spacing: spacing34 } = ddsBaseTokens55;
|
|
12375
|
+
var link4 = {
|
|
12347
12376
|
base: {
|
|
12348
|
-
color:
|
|
12377
|
+
color: colors29.DdsColorNeutralsWhite
|
|
12349
12378
|
},
|
|
12350
12379
|
hover: {
|
|
12351
|
-
color:
|
|
12380
|
+
color: colors29.DdsColorNeutralsWhite
|
|
12352
12381
|
}
|
|
12353
12382
|
};
|
|
12354
12383
|
var wrapper5 = {
|
|
12355
|
-
backgroundColor:
|
|
12384
|
+
backgroundColor: colors29.DdsColorPrimaryBase,
|
|
12356
12385
|
padding: spacing34.SizesDdsSpacingX025
|
|
12357
12386
|
};
|
|
12358
12387
|
var skipToContentTokens = {
|
|
12359
|
-
link:
|
|
12388
|
+
link: link4,
|
|
12360
12389
|
wrapper: wrapper5
|
|
12361
12390
|
};
|
|
12362
12391
|
|
|
12363
12392
|
// src/components/SkipToContent/SkipToContent.tsx
|
|
12364
12393
|
import { jsx as jsx249 } from "react/jsx-runtime";
|
|
12365
|
-
var { wrapper: wrapper6, link:
|
|
12394
|
+
var { wrapper: wrapper6, link: link5 } = skipToContentTokens;
|
|
12366
12395
|
var Wrapper5 = styled76.div`
|
|
12367
12396
|
box-sizing: border-box;
|
|
12368
12397
|
position: absolute;
|
|
@@ -12392,7 +12421,7 @@ var Wrapper5 = styled76.div`
|
|
|
12392
12421
|
`;
|
|
12393
12422
|
var Link4 = styled76.a`
|
|
12394
12423
|
text-decoration: none;
|
|
12395
|
-
color: ${
|
|
12424
|
+
color: ${link5.base.color};
|
|
12396
12425
|
${getFontStyling(defaultTypographyType)}
|
|
12397
12426
|
|
|
12398
12427
|
@media (prefers-reduced-motion: no-preference) {
|
|
@@ -12402,7 +12431,7 @@ var Link4 = styled76.a`
|
|
|
12402
12431
|
${focusVisibleOnDark}
|
|
12403
12432
|
}
|
|
12404
12433
|
&:hover {
|
|
12405
|
-
color: ${
|
|
12434
|
+
color: ${link5.base.color};
|
|
12406
12435
|
}
|
|
12407
12436
|
`;
|
|
12408
12437
|
var SkipToContent = forwardRef55(
|
|
@@ -12523,10 +12552,10 @@ SplitButton.displayName = "SplitButton";
|
|
|
12523
12552
|
// src/components/Table/collapsible/CollapsibleRow.tsx
|
|
12524
12553
|
import {
|
|
12525
12554
|
Children as Children6,
|
|
12526
|
-
Fragment as
|
|
12555
|
+
Fragment as Fragment12,
|
|
12527
12556
|
cloneElement as cloneElement7,
|
|
12528
12557
|
forwardRef as forwardRef64,
|
|
12529
|
-
isValidElement as
|
|
12558
|
+
isValidElement as isValidElement8,
|
|
12530
12559
|
useEffect as useEffect26,
|
|
12531
12560
|
useState as useState28
|
|
12532
12561
|
} from "react";
|
|
@@ -12584,33 +12613,33 @@ function useIsInTableHead() {
|
|
|
12584
12613
|
|
|
12585
12614
|
// src/components/Table/normal/Table.tokens.tsx
|
|
12586
12615
|
import { ddsBaseTokens as ddsBaseTokens57 } from "@norges-domstoler/dds-design-tokens";
|
|
12587
|
-
var { font: font2, colors:
|
|
12616
|
+
var { font: font2, colors: colors30, border: border13, spacing: spacing35, iconSizes: iconSizes3, borderRadius: borderRadius9 } = ddsBaseTokens57;
|
|
12588
12617
|
var row = {
|
|
12589
12618
|
body: {
|
|
12590
12619
|
odd: {
|
|
12591
|
-
backgroundColor:
|
|
12620
|
+
backgroundColor: colors30.DdsColorNeutralsWhite
|
|
12592
12621
|
},
|
|
12593
12622
|
even: {
|
|
12594
|
-
backgroundColor:
|
|
12623
|
+
backgroundColor: colors30.DdsColorNeutralsGray1
|
|
12595
12624
|
},
|
|
12596
|
-
hover: { backgroundColor:
|
|
12625
|
+
hover: { backgroundColor: colors30.DdsColorInteractiveLightest },
|
|
12597
12626
|
selected: {
|
|
12598
|
-
backgroundColor:
|
|
12627
|
+
backgroundColor: colors30.DdsColorInteractiveLightest
|
|
12599
12628
|
},
|
|
12600
12629
|
mode: {
|
|
12601
12630
|
sum: {
|
|
12602
|
-
borderTop: `${border13.BordersDdsBorderStyleLightStrokeWeight} solid ${
|
|
12603
|
-
borderBottom: `${border13.BordersDdsBorderStyleLightStrokeWeight} solid ${
|
|
12604
|
-
backgroundColor:
|
|
12631
|
+
borderTop: `${border13.BordersDdsBorderStyleLightStrokeWeight} solid ${colors30.DdsColorNeutralsGray4}`,
|
|
12632
|
+
borderBottom: `${border13.BordersDdsBorderStyleLightStrokeWeight} solid ${colors30.DdsColorNeutralsGray4}`,
|
|
12633
|
+
backgroundColor: colors30.DdsColorNeutralsWhite
|
|
12605
12634
|
}
|
|
12606
12635
|
},
|
|
12607
12636
|
withDividers: {
|
|
12608
|
-
borderBottom: `1px solid ${
|
|
12637
|
+
borderBottom: `1px solid ${colors30.DdsColorNeutralsGray4}`
|
|
12609
12638
|
}
|
|
12610
12639
|
},
|
|
12611
12640
|
head: {
|
|
12612
12641
|
extraCompact: {
|
|
12613
|
-
backgroundColor:
|
|
12642
|
+
backgroundColor: colors30.DdsColorNeutralsWhite,
|
|
12614
12643
|
fontSize: font2.DdsFontBodySans01FontSize
|
|
12615
12644
|
}
|
|
12616
12645
|
}
|
|
@@ -12628,7 +12657,7 @@ var cell2 = {
|
|
|
12628
12657
|
}
|
|
12629
12658
|
},
|
|
12630
12659
|
head: {
|
|
12631
|
-
backgroundColor:
|
|
12660
|
+
backgroundColor: colors30.DdsColorPrimaryLightest
|
|
12632
12661
|
},
|
|
12633
12662
|
sort: {
|
|
12634
12663
|
gap: spacing35.SizesDdsSpacingX05,
|
|
@@ -12954,7 +12983,7 @@ Table2.Row = Row;
|
|
|
12954
12983
|
Table2.Foot = Foot;
|
|
12955
12984
|
|
|
12956
12985
|
// src/components/Table/collapsible/CollapsibleRow.tsx
|
|
12957
|
-
import { Fragment as
|
|
12986
|
+
import { Fragment as Fragment13, jsx as jsx259, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
12958
12987
|
var { collapseButton: collapseButton2 } = tableTokens;
|
|
12959
12988
|
var CollapseButton = styled86.button`
|
|
12960
12989
|
${removeButtonStyling}
|
|
@@ -13004,9 +13033,9 @@ var CollapsibleRow = forwardRef64(
|
|
|
13004
13033
|
const collapsedRenderedChildren = isCollapsed && collapsedHeaderValues.length > 0 ? collapsedChildren.map(function(child, index) {
|
|
13005
13034
|
const id = derivativeIdGenerator(prefix2, index.toString());
|
|
13006
13035
|
collapsibleIds.push(id);
|
|
13007
|
-
return /* @__PURE__ */ jsxs69(
|
|
13036
|
+
return /* @__PURE__ */ jsxs69(Fragment12, { children: [
|
|
13008
13037
|
/* @__PURE__ */ jsx259(DescriptionListTerm, { children: collapsedHeaderValues[index].content }),
|
|
13009
|
-
|
|
13038
|
+
isValidElement8(child) && cloneElement7(child, {
|
|
13010
13039
|
collapsibleProps: { isCollapsibleChild: true }
|
|
13011
13040
|
})
|
|
13012
13041
|
] }, `DL-${index}`);
|
|
@@ -13018,7 +13047,7 @@ var CollapsibleRow = forwardRef64(
|
|
|
13018
13047
|
const headerRow = () => {
|
|
13019
13048
|
if (type !== "head" || !isCollapsed)
|
|
13020
13049
|
return null;
|
|
13021
|
-
return /* @__PURE__ */ jsx259(StyledRow, { ref, type, ...rowProps, children: /* @__PURE__ */ jsxs69(
|
|
13050
|
+
return /* @__PURE__ */ jsx259(StyledRow, { ref, type, ...rowProps, children: /* @__PURE__ */ jsxs69(Fragment13, { children: [
|
|
13022
13051
|
definingColumnCells,
|
|
13023
13052
|
/* @__PURE__ */ jsxs69(Table2.Cell, { type: "head", layout: "center", children: [
|
|
13024
13053
|
"Utvid",
|
|
@@ -13059,9 +13088,9 @@ var CollapsibleRow = forwardRef64(
|
|
|
13059
13088
|
}
|
|
13060
13089
|
);
|
|
13061
13090
|
};
|
|
13062
|
-
return isCollapsed && collapsedRenderedChildren && collapsedRenderedChildren.length > 0 ? /* @__PURE__ */ jsxs69(
|
|
13091
|
+
return isCollapsed && collapsedRenderedChildren && collapsedRenderedChildren.length > 0 ? /* @__PURE__ */ jsxs69(Fragment13, { children: [
|
|
13063
13092
|
headerRow(),
|
|
13064
|
-
type === "body" && /* @__PURE__ */ jsxs69(
|
|
13093
|
+
type === "body" && /* @__PURE__ */ jsxs69(Fragment13, { children: [
|
|
13065
13094
|
rowWithChevron(),
|
|
13066
13095
|
childrenCollapsed ? null : collapsedRows
|
|
13067
13096
|
] })
|
|
@@ -13201,14 +13230,14 @@ import styled89, { css as css39 } from "styled-components";
|
|
|
13201
13230
|
|
|
13202
13231
|
// src/components/Tabs/Tabs.tokens.tsx
|
|
13203
13232
|
import { ddsBaseTokens as ddsBaseTokens58 } from "@norges-domstoler/dds-design-tokens";
|
|
13204
|
-
var { border: border14, spacing: spacing36, colors:
|
|
13233
|
+
var { border: border14, spacing: spacing36, colors: colors31 } = ddsBaseTokens58;
|
|
13205
13234
|
var tabList = {
|
|
13206
13235
|
borderBottom: `${border14.BordersDdsBorderStyleLightStrokeWeight} solid ${border14.BordersDdsBorderStyleLightStroke}`
|
|
13207
13236
|
};
|
|
13208
13237
|
var tab = {
|
|
13209
13238
|
base: {
|
|
13210
13239
|
borderBottom: `${border14.BordersDdsBorderStyleLightStrokeWeight} solid transparent`,
|
|
13211
|
-
color:
|
|
13240
|
+
color: colors31.DdsColorNeutralsGray7,
|
|
13212
13241
|
padding: spacing36.SizesDdsSpacingX05
|
|
13213
13242
|
},
|
|
13214
13243
|
row: {
|
|
@@ -13218,15 +13247,15 @@ var tab = {
|
|
|
13218
13247
|
gap: spacing36.SizesDdsSpacingX025
|
|
13219
13248
|
},
|
|
13220
13249
|
active: {
|
|
13221
|
-
backgroundColor:
|
|
13222
|
-
color:
|
|
13223
|
-
boxShadow: `inset 0 -2px 0 0 ${
|
|
13224
|
-
borderColor:
|
|
13250
|
+
backgroundColor: colors31.DdsColorInteractiveLightest,
|
|
13251
|
+
color: colors31.DdsColorInteractiveDarkest,
|
|
13252
|
+
boxShadow: `inset 0 -2px 0 0 ${colors31.DdsColorInteractiveDarker}`,
|
|
13253
|
+
borderColor: colors31.DdsColorInteractiveDarker
|
|
13225
13254
|
},
|
|
13226
13255
|
hover: {
|
|
13227
|
-
color:
|
|
13228
|
-
boxShadow: `inset 0 -2px 0 0 ${
|
|
13229
|
-
borderColor:
|
|
13256
|
+
color: colors31.DdsColorInteractiveDarkest,
|
|
13257
|
+
boxShadow: `inset 0 -2px 0 0 ${colors31.DdsColorInteractiveDarker}`,
|
|
13258
|
+
borderColor: colors31.DdsColorInteractiveDarker
|
|
13230
13259
|
}
|
|
13231
13260
|
};
|
|
13232
13261
|
var panel = {
|
|
@@ -13330,7 +13359,7 @@ var Button2 = styled89.button`
|
|
|
13330
13359
|
var Tab = forwardRef67((props, ref) => {
|
|
13331
13360
|
const {
|
|
13332
13361
|
active = false,
|
|
13333
|
-
icon:
|
|
13362
|
+
icon: icon11,
|
|
13334
13363
|
children,
|
|
13335
13364
|
focus,
|
|
13336
13365
|
setFocus,
|
|
@@ -13379,7 +13408,7 @@ var Tab = forwardRef67((props, ref) => {
|
|
|
13379
13408
|
onKeyDown: handleOnKeyDown,
|
|
13380
13409
|
tabIndex: focus ? 0 : -1,
|
|
13381
13410
|
children: [
|
|
13382
|
-
|
|
13411
|
+
icon11 && /* @__PURE__ */ jsx263(Icon, { icon: icon11, iconSize: "inherit" }),
|
|
13383
13412
|
/* @__PURE__ */ jsx263("span", { children })
|
|
13384
13413
|
]
|
|
13385
13414
|
}
|
|
@@ -13392,7 +13421,7 @@ import {
|
|
|
13392
13421
|
Children as Children7,
|
|
13393
13422
|
cloneElement as cloneElement8,
|
|
13394
13423
|
forwardRef as forwardRef68,
|
|
13395
|
-
isValidElement as
|
|
13424
|
+
isValidElement as isValidElement9,
|
|
13396
13425
|
useState as useState30
|
|
13397
13426
|
} from "react";
|
|
13398
13427
|
import styled90, { css as css40 } from "styled-components";
|
|
@@ -13439,7 +13468,7 @@ var TabList = forwardRef68(
|
|
|
13439
13468
|
const [focus, setFocus] = useRoveFocus(childrenArray, hasTabFocus, "row");
|
|
13440
13469
|
const combinedRef = useCombinedRef(ref, tabListRef);
|
|
13441
13470
|
const tabListChildren = Children7.map(children, (child, index) => {
|
|
13442
|
-
return
|
|
13471
|
+
return isValidElement9(child) && cloneElement8(child, {
|
|
13443
13472
|
id: `${tabsId}-tab-${index}`,
|
|
13444
13473
|
"aria-controls": `${tabsId}-panel-${index}`,
|
|
13445
13474
|
active: activeTab === index,
|
|
@@ -13522,7 +13551,7 @@ import {
|
|
|
13522
13551
|
Children as Children8,
|
|
13523
13552
|
cloneElement as cloneElement9,
|
|
13524
13553
|
forwardRef as forwardRef70,
|
|
13525
|
-
isValidElement as
|
|
13554
|
+
isValidElement as isValidElement10
|
|
13526
13555
|
} from "react";
|
|
13527
13556
|
import { jsx as jsx266 } from "react/jsx-runtime";
|
|
13528
13557
|
var TabPanels = forwardRef70(
|
|
@@ -13531,7 +13560,7 @@ var TabPanels = forwardRef70(
|
|
|
13531
13560
|
const combinedRef = useCombinedRef(ref, tabPanelsRef);
|
|
13532
13561
|
const panelChildren = Children8.map(children, (child, index) => {
|
|
13533
13562
|
const active = index === activeTab;
|
|
13534
|
-
return
|
|
13563
|
+
return isValidElement10(child) && cloneElement9(child, {
|
|
13535
13564
|
id: `${tabsId}-panel-${index}`,
|
|
13536
13565
|
"aria-labelledby": `${tabsId}-tab-${index}`,
|
|
13537
13566
|
active,
|
|
@@ -13549,7 +13578,7 @@ import styled92, { css as css42 } from "styled-components";
|
|
|
13549
13578
|
|
|
13550
13579
|
// src/components/Tag/Tag.tokens.tsx
|
|
13551
13580
|
import { ddsBaseTokens as ddsBaseTokens59 } from "@norges-domstoler/dds-design-tokens";
|
|
13552
|
-
var { colors:
|
|
13581
|
+
var { colors: colors32, borderRadius: borderRadius10, spacing: spacing37 } = ddsBaseTokens59;
|
|
13553
13582
|
var typographyType5 = "bodySans01";
|
|
13554
13583
|
var wrapper7 = {
|
|
13555
13584
|
border: "1px solid",
|
|
@@ -13569,13 +13598,13 @@ var wrapper7 = {
|
|
|
13569
13598
|
default: {
|
|
13570
13599
|
icon: void 0,
|
|
13571
13600
|
base: {
|
|
13572
|
-
backgroundColor:
|
|
13573
|
-
borderColor:
|
|
13601
|
+
backgroundColor: colors32.DdsColorNeutralsGray1,
|
|
13602
|
+
borderColor: colors32.DdsColorNeutralsGray3,
|
|
13574
13603
|
icon: void 0
|
|
13575
13604
|
},
|
|
13576
13605
|
strong: {
|
|
13577
|
-
backgroundColor:
|
|
13578
|
-
borderColor:
|
|
13606
|
+
backgroundColor: colors32.DdsColorNeutralsGray3,
|
|
13607
|
+
borderColor: colors32.DdsColorNeutralsGray3,
|
|
13579
13608
|
icon: void 0
|
|
13580
13609
|
}
|
|
13581
13610
|
},
|
|
@@ -13584,14 +13613,14 @@ var wrapper7 = {
|
|
|
13584
13613
|
base: {
|
|
13585
13614
|
...localMessageTokens.container.purpose.success,
|
|
13586
13615
|
icon: {
|
|
13587
|
-
color:
|
|
13616
|
+
color: colors32.DdsColorSuccessDarkest
|
|
13588
13617
|
}
|
|
13589
13618
|
},
|
|
13590
13619
|
strong: {
|
|
13591
|
-
backgroundColor:
|
|
13592
|
-
borderColor:
|
|
13620
|
+
backgroundColor: colors32.DdsColorSuccessLight,
|
|
13621
|
+
borderColor: colors32.DdsColorSuccessLight,
|
|
13593
13622
|
icon: {
|
|
13594
|
-
color:
|
|
13623
|
+
color: colors32.DdsColorNeutralsGray9
|
|
13595
13624
|
}
|
|
13596
13625
|
}
|
|
13597
13626
|
},
|
|
@@ -13600,14 +13629,14 @@ var wrapper7 = {
|
|
|
13600
13629
|
base: {
|
|
13601
13630
|
...localMessageTokens.container.purpose.danger,
|
|
13602
13631
|
icon: {
|
|
13603
|
-
color:
|
|
13632
|
+
color: colors32.DdsColorDangerDarkest
|
|
13604
13633
|
}
|
|
13605
13634
|
},
|
|
13606
13635
|
strong: {
|
|
13607
|
-
backgroundColor:
|
|
13608
|
-
borderColor:
|
|
13636
|
+
backgroundColor: colors32.DdsColorDangerLight,
|
|
13637
|
+
borderColor: colors32.DdsColorDangerLight,
|
|
13609
13638
|
icon: {
|
|
13610
|
-
color:
|
|
13639
|
+
color: colors32.DdsColorNeutralsGray9
|
|
13611
13640
|
}
|
|
13612
13641
|
}
|
|
13613
13642
|
},
|
|
@@ -13616,14 +13645,14 @@ var wrapper7 = {
|
|
|
13616
13645
|
base: {
|
|
13617
13646
|
...localMessageTokens.container.purpose.warning,
|
|
13618
13647
|
icon: {
|
|
13619
|
-
color:
|
|
13648
|
+
color: colors32.DdsColorWarningDarkest
|
|
13620
13649
|
}
|
|
13621
13650
|
},
|
|
13622
13651
|
strong: {
|
|
13623
|
-
backgroundColor:
|
|
13624
|
-
borderColor:
|
|
13652
|
+
backgroundColor: colors32.DdsColorWarningLight,
|
|
13653
|
+
borderColor: colors32.DdsColorWarningLight,
|
|
13625
13654
|
icon: {
|
|
13626
|
-
color:
|
|
13655
|
+
color: colors32.DdsColorNeutralsGray9
|
|
13627
13656
|
}
|
|
13628
13657
|
}
|
|
13629
13658
|
},
|
|
@@ -13632,14 +13661,14 @@ var wrapper7 = {
|
|
|
13632
13661
|
base: {
|
|
13633
13662
|
...localMessageTokens.container.purpose.info,
|
|
13634
13663
|
icon: {
|
|
13635
|
-
color:
|
|
13664
|
+
color: colors32.DdsColorInfoDarkest
|
|
13636
13665
|
}
|
|
13637
13666
|
},
|
|
13638
13667
|
strong: {
|
|
13639
|
-
backgroundColor:
|
|
13640
|
-
borderColor:
|
|
13668
|
+
backgroundColor: colors32.DdsColorInfoLight,
|
|
13669
|
+
borderColor: colors32.DdsColorInfoLight,
|
|
13641
13670
|
icon: {
|
|
13642
|
-
color:
|
|
13671
|
+
color: colors32.DdsColorNeutralsGray9
|
|
13643
13672
|
}
|
|
13644
13673
|
}
|
|
13645
13674
|
}
|
|
@@ -13665,7 +13694,7 @@ var Wrapper7 = styled92(TextOverflowEllipsisWrapper)`
|
|
|
13665
13694
|
border-color: ${wrapper8.purpose[$purpose][$strong ? "strong" : "base"].borderColor};
|
|
13666
13695
|
`}
|
|
13667
13696
|
`;
|
|
13668
|
-
var
|
|
13697
|
+
var StyledIcon4 = styled92(Icon)`
|
|
13669
13698
|
color: ${({ $purpose, $strong }) => {
|
|
13670
13699
|
var _a;
|
|
13671
13700
|
return (_a = wrapper8.purpose[$purpose][$strong ? "strong" : "base"].icon) == null ? void 0 : _a.color;
|
|
@@ -13683,7 +13712,7 @@ var Tag = forwardRef71((props, ref) => {
|
|
|
13683
13712
|
withIcon,
|
|
13684
13713
|
...rest
|
|
13685
13714
|
} = props;
|
|
13686
|
-
const
|
|
13715
|
+
const icon11 = tagTokens.wrapper.purpose[purpose].icon;
|
|
13687
13716
|
return /* @__PURE__ */ jsxs71(
|
|
13688
13717
|
Wrapper7,
|
|
13689
13718
|
{
|
|
@@ -13691,14 +13720,14 @@ var Tag = forwardRef71((props, ref) => {
|
|
|
13691
13720
|
ref,
|
|
13692
13721
|
$purpose: purpose,
|
|
13693
13722
|
$strong: strong,
|
|
13694
|
-
$withIcon: Boolean(withIcon &&
|
|
13723
|
+
$withIcon: Boolean(withIcon && icon11),
|
|
13695
13724
|
children: [
|
|
13696
|
-
withIcon &&
|
|
13697
|
-
|
|
13725
|
+
withIcon && icon11 && /* @__PURE__ */ jsx267(
|
|
13726
|
+
StyledIcon4,
|
|
13698
13727
|
{
|
|
13699
13728
|
$purpose: purpose,
|
|
13700
13729
|
$strong: strong,
|
|
13701
|
-
icon:
|
|
13730
|
+
icon: icon11,
|
|
13702
13731
|
iconSize: tagTokens.wrapper.icon.size
|
|
13703
13732
|
}
|
|
13704
13733
|
),
|
|
@@ -13753,7 +13782,7 @@ import styled94, { css as css43 } from "styled-components";
|
|
|
13753
13782
|
|
|
13754
13783
|
// src/components/TextInput/TextInput.tokens.tsx
|
|
13755
13784
|
import { ddsBaseTokens as ddsBaseTokens60 } from "@norges-domstoler/dds-design-tokens";
|
|
13756
|
-
var { colors:
|
|
13785
|
+
var { colors: colors33, spacing: spacing38, iconSizes: iconSizes4 } = ddsBaseTokens60;
|
|
13757
13786
|
var input5 = {
|
|
13758
13787
|
withIcon: {
|
|
13759
13788
|
medium: {
|
|
@@ -13769,11 +13798,11 @@ var input5 = {
|
|
|
13769
13798
|
};
|
|
13770
13799
|
var affix = {
|
|
13771
13800
|
border: {
|
|
13772
|
-
color:
|
|
13801
|
+
color: colors33.DdsColorNeutralsGray5
|
|
13773
13802
|
}
|
|
13774
13803
|
};
|
|
13775
|
-
var
|
|
13776
|
-
color:
|
|
13804
|
+
var icon9 = {
|
|
13805
|
+
color: colors33.DdsColorNeutralsGray9,
|
|
13777
13806
|
sizes: {
|
|
13778
13807
|
medium: {
|
|
13779
13808
|
top: spacing38.SizesDdsSpacingX075,
|
|
@@ -13791,22 +13820,22 @@ var icon10 = {
|
|
|
13791
13820
|
};
|
|
13792
13821
|
var textInputTokens = {
|
|
13793
13822
|
input: input5,
|
|
13794
|
-
icon:
|
|
13823
|
+
icon: icon9,
|
|
13795
13824
|
affix
|
|
13796
13825
|
};
|
|
13797
13826
|
|
|
13798
13827
|
// src/components/TextInput/TextInput.styles.tsx
|
|
13799
13828
|
var { iconSizes: iconSizes5 } = ddsBaseTokens61;
|
|
13800
|
-
var { input: input6, icon:
|
|
13829
|
+
var { input: input6, icon: icon10 } = textInputTokens;
|
|
13801
13830
|
var MessageContainer2 = styled94.div`
|
|
13802
13831
|
display: flex;
|
|
13803
13832
|
justify-content: space-between;
|
|
13804
13833
|
`;
|
|
13805
|
-
var
|
|
13834
|
+
var StyledIcon5 = styled94(Icon)`
|
|
13806
13835
|
position: absolute;
|
|
13807
|
-
color: ${
|
|
13836
|
+
color: ${icon10.color};
|
|
13808
13837
|
${({ $size, iconSize }) => css43`
|
|
13809
|
-
left: ${
|
|
13838
|
+
left: ${icon10.sizes[$size].left};
|
|
13810
13839
|
${iconSize === "small" ? css43`
|
|
13811
13840
|
top: ${`calc(50% - ${iconSizes5.DdsIconsizeSmallNumberPx / 2}px)`};
|
|
13812
13841
|
` : css43`
|
|
@@ -13888,7 +13917,7 @@ var TextInput2 = forwardRef72(
|
|
|
13888
13917
|
defaultValue,
|
|
13889
13918
|
"aria-required": ariaRequired,
|
|
13890
13919
|
"aria-describedby": ariaDescribedby,
|
|
13891
|
-
icon:
|
|
13920
|
+
icon: icon11,
|
|
13892
13921
|
prefix: prefix2,
|
|
13893
13922
|
suffix,
|
|
13894
13923
|
...rest
|
|
@@ -13920,7 +13949,7 @@ var TextInput2 = forwardRef72(
|
|
|
13920
13949
|
const hasTip = !!tip;
|
|
13921
13950
|
const hasLabel = !!label3;
|
|
13922
13951
|
const hasMessage = hasErrorMessage || hasTip || !!maxLength;
|
|
13923
|
-
const hasIcon = !!
|
|
13952
|
+
const hasIcon = !!icon11;
|
|
13924
13953
|
const hasAffix = !!(prefix2 != null ? prefix2 : suffix);
|
|
13925
13954
|
const characterCounterId = derivativeIdGenerator(
|
|
13926
13955
|
uniqueId,
|
|
@@ -13958,9 +13987,9 @@ var TextInput2 = forwardRef72(
|
|
|
13958
13987
|
if (hasIcon) {
|
|
13959
13988
|
extendedInput = /* @__PURE__ */ jsxs73(InputContainer, { children: [
|
|
13960
13989
|
/* @__PURE__ */ jsx268(
|
|
13961
|
-
|
|
13990
|
+
StyledIcon5,
|
|
13962
13991
|
{
|
|
13963
|
-
icon:
|
|
13992
|
+
icon: icon11,
|
|
13964
13993
|
iconSize: getFormInputIconSize(componentSize),
|
|
13965
13994
|
$size: componentSize
|
|
13966
13995
|
}
|
|
@@ -14036,7 +14065,7 @@ var useToggleBarContext = () => useContext13(ToggleBarContext);
|
|
|
14036
14065
|
|
|
14037
14066
|
// src/components/ToggleBar/ToggleBar.tokens.tsx
|
|
14038
14067
|
import { ddsBaseTokens as ddsBaseTokens62 } from "@norges-domstoler/dds-design-tokens";
|
|
14039
|
-
var { colors:
|
|
14068
|
+
var { colors: colors34, spacing: spacing39, border: border15, borderRadius: borderRadius11, fontPackages: fontPackages6 } = ddsBaseTokens62;
|
|
14040
14069
|
var typographyTypes6 = {
|
|
14041
14070
|
large: "bodySans04",
|
|
14042
14071
|
medium: "bodySans02",
|
|
@@ -14064,17 +14093,17 @@ var outerContainer7 = {
|
|
|
14064
14093
|
};
|
|
14065
14094
|
var label = {
|
|
14066
14095
|
base: {
|
|
14067
|
-
borderColor:
|
|
14068
|
-
borderRight: `${border15.BordersDdsBorderStyleLightStrokeWeight} solid ${
|
|
14069
|
-
borderTop: `${border15.BordersDdsBorderStyleLightStrokeWeight} solid ${
|
|
14070
|
-
borderBottom: `${border15.BordersDdsBorderStyleLightStrokeWeight} solid ${
|
|
14096
|
+
borderColor: colors34.DdsColorNeutralsGray5,
|
|
14097
|
+
borderRight: `${border15.BordersDdsBorderStyleLightStrokeWeight} solid ${colors34.DdsColorNeutralsGray5}`,
|
|
14098
|
+
borderTop: `${border15.BordersDdsBorderStyleLightStrokeWeight} solid ${colors34.DdsColorNeutralsGray5}`,
|
|
14099
|
+
borderBottom: `${border15.BordersDdsBorderStyleLightStrokeWeight} solid ${colors34.DdsColorNeutralsGray5}`
|
|
14071
14100
|
},
|
|
14072
14101
|
hover: {
|
|
14073
|
-
color:
|
|
14074
|
-
borderColor:
|
|
14102
|
+
color: colors34.DdsColorInteractiveDark,
|
|
14103
|
+
borderColor: colors34.DdsColorInteractiveDark
|
|
14075
14104
|
},
|
|
14076
14105
|
firstChild: {
|
|
14077
|
-
borderLeft: `${border15.BordersDdsBorderStyleLightStrokeWeight} solid ${
|
|
14106
|
+
borderLeft: `${border15.BordersDdsBorderStyleLightStrokeWeight} solid ${colors34.DdsColorNeutralsGray5}`,
|
|
14078
14107
|
borderTopLeftRadius: borderRadius11.RadiiDdsBorderRadius1Radius,
|
|
14079
14108
|
borderBottomLeftRadius: borderRadius11.RadiiDdsBorderRadius1Radius
|
|
14080
14109
|
},
|
|
@@ -14084,12 +14113,12 @@ var label = {
|
|
|
14084
14113
|
}
|
|
14085
14114
|
};
|
|
14086
14115
|
var content7 = {
|
|
14087
|
-
base: { backgroundColor:
|
|
14116
|
+
base: { backgroundColor: colors34.DdsColorNeutralsGray1 },
|
|
14088
14117
|
active: {
|
|
14089
|
-
color:
|
|
14090
|
-
borderColor:
|
|
14091
|
-
backgroundColor:
|
|
14092
|
-
boxShadow: `inset 0 0 0 1px ${
|
|
14118
|
+
color: colors34.DdsColorInteractiveDarkest,
|
|
14119
|
+
borderColor: colors34.DdsColorInteractiveDarker,
|
|
14120
|
+
backgroundColor: colors34.DdsColorInteractiveLightest,
|
|
14121
|
+
boxShadow: `inset 0 0 0 1px ${colors34.DdsColorInteractiveDarker}`
|
|
14093
14122
|
},
|
|
14094
14123
|
size: {
|
|
14095
14124
|
tiny: {
|
|
@@ -14305,7 +14334,7 @@ var ToggleRadio = forwardRef73(
|
|
|
14305
14334
|
checked,
|
|
14306
14335
|
"aria-label": ariaLabel,
|
|
14307
14336
|
"aria-labelledby": ariaLabelledBy,
|
|
14308
|
-
icon:
|
|
14337
|
+
icon: icon11,
|
|
14309
14338
|
label: label3,
|
|
14310
14339
|
htmlProps,
|
|
14311
14340
|
className,
|
|
@@ -14334,8 +14363,8 @@ var ToggleRadio = forwardRef73(
|
|
|
14334
14363
|
"aria-labelledby": ariaLabelledBy
|
|
14335
14364
|
}
|
|
14336
14365
|
),
|
|
14337
|
-
/* @__PURE__ */ jsxs75(Content2, { $size: group4.size, $justIcon: !!
|
|
14338
|
-
|
|
14366
|
+
/* @__PURE__ */ jsxs75(Content2, { $size: group4.size, $justIcon: !!icon11 && !label3, children: [
|
|
14367
|
+
icon11 && /* @__PURE__ */ jsx270(Icon, { icon: icon11, iconSize: "inherit" }),
|
|
14339
14368
|
label3 && /* @__PURE__ */ jsx270("span", { children: label3 })
|
|
14340
14369
|
] })
|
|
14341
14370
|
] });
|
|
@@ -14349,21 +14378,21 @@ import styled98, { css as css47 } from "styled-components";
|
|
|
14349
14378
|
|
|
14350
14379
|
// src/components/ToggleButton/ToggleButton.tokens.tsx
|
|
14351
14380
|
import { ddsBaseTokens as ddsBaseTokens63 } from "@norges-domstoler/dds-design-tokens";
|
|
14352
|
-
var { colors:
|
|
14381
|
+
var { colors: colors35, spacing: spacing40 } = ddsBaseTokens63;
|
|
14353
14382
|
var { button: button2 } = buttonTokens;
|
|
14354
14383
|
var { selectionControl: selectionControl3 } = selectionControlTokens;
|
|
14355
14384
|
var typographyType6 = typographyTypes.small;
|
|
14356
14385
|
var toggleButton = {
|
|
14357
14386
|
border: button2.base.border,
|
|
14358
|
-
backgroundColor:
|
|
14359
|
-
color:
|
|
14387
|
+
backgroundColor: colors35.DdsColorNeutralsWhite,
|
|
14388
|
+
color: colors35.DdsColorNeutralsGray7,
|
|
14360
14389
|
gap: spacing40.SizesDdsSpacingX05,
|
|
14361
14390
|
borderRadius: button2.appearances.rounded.base.borderRadius,
|
|
14362
14391
|
padding: button2.sizes.small.text.padding,
|
|
14363
14392
|
hover: selectionControl3.hover.base,
|
|
14364
14393
|
checked: {
|
|
14365
14394
|
...selectionControl3.checked.base,
|
|
14366
|
-
color:
|
|
14395
|
+
color: colors35.DdsColorNeutralsWhite,
|
|
14367
14396
|
hover: selectionControl3.checked.hover
|
|
14368
14397
|
}
|
|
14369
14398
|
};
|
|
@@ -14435,7 +14464,7 @@ var Container16 = styled98.label`
|
|
|
14435
14464
|
}
|
|
14436
14465
|
`;
|
|
14437
14466
|
var ToggleButton = forwardRef74(
|
|
14438
|
-
({ id, label: label3, icon:
|
|
14467
|
+
({ id, label: label3, icon: icon11, className, htmlProps, ...rest }, ref) => {
|
|
14439
14468
|
const generatedId = useId26();
|
|
14440
14469
|
const uniqueId = id != null ? id : `${generatedId}-toggleButton`;
|
|
14441
14470
|
return /* @__PURE__ */ jsxs76(Container16, { htmlFor: uniqueId, children: [
|
|
@@ -14447,8 +14476,8 @@ var ToggleButton = forwardRef74(
|
|
|
14447
14476
|
type: "checkbox"
|
|
14448
14477
|
}
|
|
14449
14478
|
),
|
|
14450
|
-
/* @__PURE__ */ jsxs76(Content3, { $hasIcon: !!
|
|
14451
|
-
|
|
14479
|
+
/* @__PURE__ */ jsxs76(Content3, { $hasIcon: !!icon11, children: [
|
|
14480
|
+
icon11 && /* @__PURE__ */ jsx271(Icon, { icon: icon11, iconSize: "inherit" }),
|
|
14452
14481
|
" ",
|
|
14453
14482
|
label3
|
|
14454
14483
|
] })
|