@norges-domstoler/dds-components 15.2.0 → 15.2.1
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 +8 -2
- package/dist/index.d.ts +8 -2
- package/dist/index.js +359 -396
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +383 -421
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
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,
|
|
@@ -2755,7 +2755,7 @@ import {
|
|
|
2755
2755
|
useState as useState2
|
|
2756
2756
|
} from "react";
|
|
2757
2757
|
var isKeyboardEvent = (e) => e.key !== void 0;
|
|
2758
|
-
function useRoveFocus(size2,
|
|
2758
|
+
function useRoveFocus(size2, active, direction = "column") {
|
|
2759
2759
|
const [currentFocusIndex, setCurrentFocusIndex] = useState2(-1);
|
|
2760
2760
|
const nextKey = direction === "row" ? "ArrowRight" : "ArrowDown";
|
|
2761
2761
|
const previousKey = direction === "row" ? "ArrowLeft" : "ArrowUp";
|
|
@@ -2763,31 +2763,30 @@ function useRoveFocus(size2, reset, direction = "column") {
|
|
|
2763
2763
|
(e) => {
|
|
2764
2764
|
if (!size2 || !isKeyboardEvent(e))
|
|
2765
2765
|
return;
|
|
2766
|
-
if (reset)
|
|
2767
|
-
setCurrentFocusIndex(-1);
|
|
2768
2766
|
if (e.key === nextKey) {
|
|
2769
2767
|
e.preventDefault();
|
|
2770
|
-
setCurrentFocusIndex(
|
|
2771
|
-
currentFocusIndex === size2 - 1 ? 0 : currentFocusIndex + 1
|
|
2772
|
-
);
|
|
2768
|
+
setCurrentFocusIndex((prev) => prev === size2 - 1 ? 0 : prev + 1);
|
|
2773
2769
|
} else if (e.key === previousKey) {
|
|
2774
2770
|
e.preventDefault();
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
}
|
|
2780
|
-
setCurrentFocusIndex(size2 - 1);
|
|
2771
|
+
setCurrentFocusIndex((prev) => {
|
|
2772
|
+
if (prev === -1 || prev === 0)
|
|
2773
|
+
return size2 - 1;
|
|
2774
|
+
return prev - 1;
|
|
2775
|
+
});
|
|
2781
2776
|
}
|
|
2782
2777
|
},
|
|
2783
|
-
[size2,
|
|
2778
|
+
[size2, setCurrentFocusIndex]
|
|
2784
2779
|
);
|
|
2785
2780
|
useEffect7(() => {
|
|
2781
|
+
if (!active) {
|
|
2782
|
+
setCurrentFocusIndex(-1);
|
|
2783
|
+
return;
|
|
2784
|
+
}
|
|
2786
2785
|
document.addEventListener("keydown", handleKeyDown, false);
|
|
2787
2786
|
return () => {
|
|
2788
2787
|
document.removeEventListener("keydown", handleKeyDown, false);
|
|
2789
2788
|
};
|
|
2790
|
-
}, [handleKeyDown]);
|
|
2789
|
+
}, [handleKeyDown, active]);
|
|
2791
2790
|
return [currentFocusIndex, setCurrentFocusIndex];
|
|
2792
2791
|
}
|
|
2793
2792
|
|
|
@@ -3026,7 +3025,7 @@ var ExternalNavItem = styled9(BaseLink)`
|
|
|
3026
3025
|
var NavigationItem = ({
|
|
3027
3026
|
as: _as,
|
|
3028
3027
|
active,
|
|
3029
|
-
icon:
|
|
3028
|
+
icon: icon11,
|
|
3030
3029
|
external,
|
|
3031
3030
|
children,
|
|
3032
3031
|
onClick: propOnClick,
|
|
@@ -3052,7 +3051,7 @@ var NavigationItem = ({
|
|
|
3052
3051
|
onClick,
|
|
3053
3052
|
className: [active ? "active" : "", rest.className].join(" "),
|
|
3054
3053
|
children: [
|
|
3055
|
-
/* @__PURE__ */ jsx163(IconContainer, { children:
|
|
3054
|
+
/* @__PURE__ */ jsx163(IconContainer, { children: icon11 && /* @__PURE__ */ jsx163(Icon, { icon: icon11 }) }),
|
|
3056
3055
|
/* @__PURE__ */ jsx163(TextContainer, { children }),
|
|
3057
3056
|
/* @__PURE__ */ jsx163(ChevronContainer, { children: /* @__PURE__ */ jsx163(Icon, { icon: ChevronRightIcon }) })
|
|
3058
3057
|
]
|
|
@@ -3906,7 +3905,7 @@ var Button = forwardRef9(
|
|
|
3906
3905
|
loading = false,
|
|
3907
3906
|
loadingTooltip = "Lagring p\xE5g\xE5r",
|
|
3908
3907
|
fullWidth = false,
|
|
3909
|
-
icon:
|
|
3908
|
+
icon: icon11,
|
|
3910
3909
|
onClick,
|
|
3911
3910
|
onFocus,
|
|
3912
3911
|
onBlur,
|
|
@@ -3917,7 +3916,7 @@ var Button = forwardRef9(
|
|
|
3917
3916
|
} = props;
|
|
3918
3917
|
const as = href ? "a" : "button";
|
|
3919
3918
|
const hasLabel = !!children || !!label3;
|
|
3920
|
-
const hasIcon = !!
|
|
3919
|
+
const hasIcon = !!icon11;
|
|
3921
3920
|
const wrapperProps = {
|
|
3922
3921
|
...getBaseHTMLProps(id, className, htmlProps, rest),
|
|
3923
3922
|
href,
|
|
@@ -3942,13 +3941,13 @@ var Button = forwardRef9(
|
|
|
3942
3941
|
onBlur
|
|
3943
3942
|
};
|
|
3944
3943
|
const isIconButton = !hasLabel && hasIcon;
|
|
3945
|
-
const iconElement =
|
|
3944
|
+
const iconElement = icon11 && /* @__PURE__ */ jsx172(
|
|
3946
3945
|
StyledIconWrapperSpan,
|
|
3947
3946
|
{
|
|
3948
3947
|
size: size2,
|
|
3949
3948
|
isHidden: hasIcon && loading,
|
|
3950
3949
|
justIcon: isIconButton,
|
|
3951
|
-
children: /* @__PURE__ */ jsx172(Icon, { icon:
|
|
3950
|
+
children: /* @__PURE__ */ jsx172(Icon, { icon: icon11, iconSize: "inherit" })
|
|
3952
3951
|
}
|
|
3953
3952
|
);
|
|
3954
3953
|
return /* @__PURE__ */ jsxs20(ButtonWrapper, { ...wrapperProps, "aria-disabled": loading, children: [
|
|
@@ -4030,7 +4029,6 @@ var overflowMenuTokens = {
|
|
|
4030
4029
|
// src/components/OverflowMenu/OverflowMenuItem.tsx
|
|
4031
4030
|
import {
|
|
4032
4031
|
forwardRef as forwardRef10,
|
|
4033
|
-
useCallback as useCallback4,
|
|
4034
4032
|
useEffect as useEffect9,
|
|
4035
4033
|
useRef as useRef5
|
|
4036
4034
|
} from "react";
|
|
@@ -4081,18 +4079,7 @@ var IconWrapper = styled15.span`
|
|
|
4081
4079
|
var isAnchorProps2 = (props) => props.href !== void 0;
|
|
4082
4080
|
var isButtonProps = (props) => props.href === void 0 && props.onClick !== void 0;
|
|
4083
4081
|
var OverflowMenuItem = forwardRef10((props, ref) => {
|
|
4084
|
-
const {
|
|
4085
|
-
title: title3,
|
|
4086
|
-
icon: icon12,
|
|
4087
|
-
focus,
|
|
4088
|
-
setFocus,
|
|
4089
|
-
index,
|
|
4090
|
-
id,
|
|
4091
|
-
className,
|
|
4092
|
-
htmlProps = {},
|
|
4093
|
-
...rest
|
|
4094
|
-
} = props;
|
|
4095
|
-
const { onKeyDown } = htmlProps;
|
|
4082
|
+
const { title: title3, icon: icon11, focus, id, className, htmlProps = {}, ...rest } = props;
|
|
4096
4083
|
let href;
|
|
4097
4084
|
let onClick;
|
|
4098
4085
|
if (isAnchorProps2(props)) {
|
|
@@ -4108,27 +4095,12 @@ var OverflowMenuItem = forwardRef10((props, ref) => {
|
|
|
4108
4095
|
(_a = itemRef.current) == null ? void 0 : _a.focus();
|
|
4109
4096
|
}
|
|
4110
4097
|
}, [focus]);
|
|
4111
|
-
const handleSelect = useCallback4(() => {
|
|
4112
|
-
if (setFocus && index) {
|
|
4113
|
-
setFocus(index);
|
|
4114
|
-
}
|
|
4115
|
-
}, [index, setFocus]);
|
|
4116
|
-
const handleOnClick = (e) => {
|
|
4117
|
-
handleSelect();
|
|
4118
|
-
onClick && onClick(e);
|
|
4119
|
-
};
|
|
4120
|
-
const handleOnKeyDown = (e) => {
|
|
4121
|
-
handleSelect();
|
|
4122
|
-
onKeyDown && onKeyDown(e);
|
|
4123
|
-
};
|
|
4124
4098
|
const linkProps = {
|
|
4125
4099
|
href,
|
|
4126
|
-
onClick: handleOnClick,
|
|
4127
|
-
onKeyDown: handleOnKeyDown,
|
|
4128
4100
|
role: "menuitem",
|
|
4129
4101
|
tabIndex: focus ? 0 : -1
|
|
4130
4102
|
};
|
|
4131
|
-
const iconElement =
|
|
4103
|
+
const iconElement = icon11 && /* @__PURE__ */ jsx173(Icon, { iconSize: "inherit", icon: icon11 });
|
|
4132
4104
|
if (!href && !onClick) {
|
|
4133
4105
|
return /* @__PURE__ */ jsxs21(Span, { ...{ ...getBaseHTMLProps(id, className, htmlProps, rest), ref }, children: [
|
|
4134
4106
|
/* @__PURE__ */ jsx173(IconWrapper, { children: iconElement }),
|
|
@@ -4214,7 +4186,7 @@ Divider.displayName = "Divider";
|
|
|
4214
4186
|
|
|
4215
4187
|
// src/components/ScrollableContainer/Scrollbar.tsx
|
|
4216
4188
|
import {
|
|
4217
|
-
useCallback as
|
|
4189
|
+
useCallback as useCallback4,
|
|
4218
4190
|
useEffect as useEffect10,
|
|
4219
4191
|
useRef as useRef6,
|
|
4220
4192
|
useState as useState5
|
|
@@ -4302,7 +4274,7 @@ var Scrollbar = (props) => {
|
|
|
4302
4274
|
Math.max(clientHeight / scrollHeight * trackSize, minThumbHeightPx)
|
|
4303
4275
|
);
|
|
4304
4276
|
}
|
|
4305
|
-
const handleTrackClick =
|
|
4277
|
+
const handleTrackClick = useCallback4(
|
|
4306
4278
|
(e) => {
|
|
4307
4279
|
if (contentRef == null ? void 0 : contentRef.current) {
|
|
4308
4280
|
const { current: trackCurrent } = trackRef;
|
|
@@ -4326,7 +4298,7 @@ var Scrollbar = (props) => {
|
|
|
4326
4298
|
},
|
|
4327
4299
|
[thumbHeight]
|
|
4328
4300
|
);
|
|
4329
|
-
const handleThumbPositioning =
|
|
4301
|
+
const handleThumbPositioning = useCallback4(() => {
|
|
4330
4302
|
if (!(contentRef == null ? void 0 : contentRef.current) || !trackRef.current || !thumbRef.current) {
|
|
4331
4303
|
return;
|
|
4332
4304
|
}
|
|
@@ -4352,18 +4324,18 @@ var Scrollbar = (props) => {
|
|
|
4352
4324
|
};
|
|
4353
4325
|
}
|
|
4354
4326
|
}, []);
|
|
4355
|
-
const handleThumbMousedown =
|
|
4327
|
+
const handleThumbMousedown = useCallback4((e) => {
|
|
4356
4328
|
setScrollStartPosition(e.clientY);
|
|
4357
4329
|
if (contentRef == null ? void 0 : contentRef.current)
|
|
4358
4330
|
setInitialScrollTop(contentRef.current.scrollTop);
|
|
4359
4331
|
setIsDragging(true);
|
|
4360
4332
|
}, []);
|
|
4361
|
-
const handleThumbMouseup =
|
|
4333
|
+
const handleThumbMouseup = useCallback4(() => {
|
|
4362
4334
|
if (isDragging) {
|
|
4363
4335
|
setIsDragging(false);
|
|
4364
4336
|
}
|
|
4365
4337
|
}, [isDragging]);
|
|
4366
|
-
const handleThumbMousemove =
|
|
4338
|
+
const handleThumbMousemove = useCallback4(
|
|
4367
4339
|
(e) => {
|
|
4368
4340
|
if (contentRef == null ? void 0 : contentRef.current) {
|
|
4369
4341
|
if (isDragging) {
|
|
@@ -4589,13 +4561,12 @@ var OverflowMenu = forwardRef12(
|
|
|
4589
4561
|
hasNavItems && interactiveItems.push(...navItems);
|
|
4590
4562
|
hasContextItems && interactiveItems.push(...items);
|
|
4591
4563
|
const hasInteractiveItems = interactiveItems.length > 0;
|
|
4592
|
-
const [focus
|
|
4564
|
+
const [focus] = useRoveFocus(interactiveItems == null ? void 0 : interactiveItems.length, isOpen);
|
|
4593
4565
|
const interactiveItemsList = hasInteractiveItems ? interactiveItems.map((item, index) => /* @__PURE__ */ jsx177("li", { children: /* @__PURE__ */ jsx177(
|
|
4594
4566
|
OverflowMenuItem,
|
|
4595
4567
|
{
|
|
4596
4568
|
index,
|
|
4597
4569
|
focus: focus === index && isOpen,
|
|
4598
|
-
setFocus,
|
|
4599
4570
|
icon: hasInteractiveUser && index === 0 ? PersonIcon : void 0,
|
|
4600
4571
|
...item,
|
|
4601
4572
|
onClick: (e) => {
|
|
@@ -5019,33 +4990,26 @@ import styled23 from "styled-components";
|
|
|
5019
4990
|
|
|
5020
4991
|
// src/components/BackLink/BackLink.tokens.tsx
|
|
5021
4992
|
import { ddsBaseTokens as ddsBaseTokens22 } from "@norges-domstoler/dds-design-tokens";
|
|
5022
|
-
var {
|
|
5023
|
-
var
|
|
5024
|
-
|
|
5025
|
-
};
|
|
5026
|
-
var nav = {
|
|
5027
|
-
gap: spacing10.SizesDdsSpacingX05
|
|
4993
|
+
var { spacing: spacing10 } = ddsBaseTokens22;
|
|
4994
|
+
var link3 = {
|
|
4995
|
+
gap: spacing10.SizesDdsSpacingX025
|
|
5028
4996
|
};
|
|
5029
4997
|
var backLinkTokens = {
|
|
5030
|
-
|
|
5031
|
-
nav
|
|
4998
|
+
link: link3
|
|
5032
4999
|
};
|
|
5033
5000
|
|
|
5034
5001
|
// src/components/BackLink/BackLink.tsx
|
|
5035
5002
|
import { jsx as jsx182, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
5036
|
-
var
|
|
5003
|
+
var StyledLink2 = styled23(Link)`
|
|
5037
5004
|
align-items: center;
|
|
5038
5005
|
display: flex;
|
|
5039
|
-
gap: ${backLinkTokens.
|
|
5040
|
-
`;
|
|
5041
|
-
var StyledIcon = styled23(Icon)`
|
|
5042
|
-
color: ${backLinkTokens.icon.color};
|
|
5006
|
+
gap: ${backLinkTokens.link.gap};
|
|
5043
5007
|
`;
|
|
5044
5008
|
var BackLink = forwardRef13((props, ref) => {
|
|
5045
|
-
return /* @__PURE__ */
|
|
5046
|
-
/* @__PURE__ */ jsx182(
|
|
5047
|
-
|
|
5048
|
-
] });
|
|
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
|
+
] }) });
|
|
5049
5013
|
});
|
|
5050
5014
|
BackLink.displayName = "BackLink";
|
|
5051
5015
|
|
|
@@ -5074,10 +5038,10 @@ import styled24 from "styled-components";
|
|
|
5074
5038
|
|
|
5075
5039
|
// src/components/Breadcrumbs/Breadcrumb.tokens.tsx
|
|
5076
5040
|
import { ddsBaseTokens as ddsBaseTokens23 } from "@norges-domstoler/dds-design-tokens";
|
|
5077
|
-
var { colors:
|
|
5041
|
+
var { colors: colors12, spacing: spacing11 } = ddsBaseTokens23;
|
|
5078
5042
|
var typographyType2 = "bodySans02";
|
|
5079
|
-
var
|
|
5080
|
-
color:
|
|
5043
|
+
var icon2 = {
|
|
5044
|
+
color: colors12.DdsColorInteractiveBase
|
|
5081
5045
|
};
|
|
5082
5046
|
var listItem = {
|
|
5083
5047
|
gap: spacing11.SizesDdsSpacingX05
|
|
@@ -5088,12 +5052,12 @@ var list = {
|
|
|
5088
5052
|
var breadcrumbTokens = {
|
|
5089
5053
|
list,
|
|
5090
5054
|
listItem,
|
|
5091
|
-
icon:
|
|
5055
|
+
icon: icon2
|
|
5092
5056
|
};
|
|
5093
5057
|
|
|
5094
5058
|
// src/components/Breadcrumbs/Breadcrumbs.tsx
|
|
5095
5059
|
import { jsx as jsx184, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
5096
|
-
var { icon:
|
|
5060
|
+
var { icon: icon3, list: list2, listItem: listItem2 } = breadcrumbTokens;
|
|
5097
5061
|
var List = styled24.ol`
|
|
5098
5062
|
${removeListStyling}
|
|
5099
5063
|
display: flex;
|
|
@@ -5109,8 +5073,8 @@ var ListItem = styled24.li`
|
|
|
5109
5073
|
${getFontStyling(typographyType2)}
|
|
5110
5074
|
`;
|
|
5111
5075
|
ListItem.displayName = "ListItem";
|
|
5112
|
-
var
|
|
5113
|
-
color: ${
|
|
5076
|
+
var StyledIcon = styled24(Icon)`
|
|
5077
|
+
color: ${icon3.color};
|
|
5114
5078
|
`;
|
|
5115
5079
|
var Breadcrumbs = forwardRef15(
|
|
5116
5080
|
(props, ref) => {
|
|
@@ -5118,7 +5082,7 @@ var Breadcrumbs = forwardRef15(
|
|
|
5118
5082
|
const childrenArray = Children2.toArray(children);
|
|
5119
5083
|
const breadcrumbChildren = childrenArray.map((item, index) => {
|
|
5120
5084
|
return /* @__PURE__ */ jsxs29(ListItem, { children: [
|
|
5121
|
-
index !== 0 && /* @__PURE__ */ jsx184(
|
|
5085
|
+
index !== 0 && /* @__PURE__ */ jsx184(StyledIcon, { icon: ChevronRightIcon }),
|
|
5122
5086
|
item
|
|
5123
5087
|
] }, `breadcrumb-${index}`);
|
|
5124
5088
|
});
|
|
@@ -5143,29 +5107,29 @@ import {
|
|
|
5143
5107
|
ddsBaseTokens as ddsBaseTokens24,
|
|
5144
5108
|
ddsReferenceTokens as ddsReferenceTokens4
|
|
5145
5109
|
} from "@norges-domstoler/dds-design-tokens";
|
|
5146
|
-
var { colors:
|
|
5110
|
+
var { colors: colors13, border: border8 } = ddsBaseTokens24;
|
|
5147
5111
|
var { textDefault: textDefault3 } = ddsReferenceTokens4;
|
|
5148
5112
|
var base2 = {
|
|
5149
5113
|
border: `${border8.BordersDdsBorderStyleLightStrokeWeight} solid`
|
|
5150
5114
|
};
|
|
5151
5115
|
var cardColors = {
|
|
5152
5116
|
filledLight: {
|
|
5153
|
-
backgroundColor:
|
|
5154
|
-
borderColor:
|
|
5117
|
+
backgroundColor: colors13.DdsColorPrimaryLightest,
|
|
5118
|
+
borderColor: colors13.DdsColorPrimaryLightest,
|
|
5155
5119
|
color: textDefault3.textColor
|
|
5156
5120
|
},
|
|
5157
5121
|
filledDark: {
|
|
5158
|
-
backgroundColor:
|
|
5159
|
-
borderColor:
|
|
5160
|
-
color:
|
|
5122
|
+
backgroundColor: colors13.DdsColorPrimaryBase,
|
|
5123
|
+
borderColor: colors13.DdsColorPrimaryBase,
|
|
5124
|
+
color: colors13.DdsColorNeutralsWhite
|
|
5161
5125
|
},
|
|
5162
5126
|
strokeDark: {
|
|
5163
|
-
backgroundColor:
|
|
5127
|
+
backgroundColor: colors13.DdsColorNeutralsWhite,
|
|
5164
5128
|
borderColor: border8.BordersDdsBorderStyleLightStroke,
|
|
5165
5129
|
color: textDefault3.textColor
|
|
5166
5130
|
},
|
|
5167
5131
|
strokeLight: {
|
|
5168
|
-
backgroundColor:
|
|
5132
|
+
backgroundColor: colors13.DdsColorNeutralsWhite,
|
|
5169
5133
|
borderColor: border8.BordersDdsBorderStyleLightStroke,
|
|
5170
5134
|
color: textDefault3.textColor
|
|
5171
5135
|
}
|
|
@@ -5254,7 +5218,7 @@ var Card = (props) => {
|
|
|
5254
5218
|
Card.displayName = "Card";
|
|
5255
5219
|
|
|
5256
5220
|
// src/components/Card/CardAccordion/CardAccordion.tsx
|
|
5257
|
-
import { forwardRef as forwardRef16, useCallback as
|
|
5221
|
+
import { forwardRef as forwardRef16, useCallback as useCallback5, useEffect as useEffect13, useId as useId4, useState as useState7 } from "react";
|
|
5258
5222
|
import styled26 from "styled-components";
|
|
5259
5223
|
|
|
5260
5224
|
// src/components/Card/CardAccordion/CardAccordionContext.tsx
|
|
@@ -5297,7 +5261,7 @@ var CardAccordion = forwardRef16(
|
|
|
5297
5261
|
useEffect13(() => {
|
|
5298
5262
|
setExpanded(isExpanded);
|
|
5299
5263
|
}, [isExpanded]);
|
|
5300
|
-
const toggleExpanded =
|
|
5264
|
+
const toggleExpanded = useCallback5(() => {
|
|
5301
5265
|
setExpanded((prevExpanded) => {
|
|
5302
5266
|
const newExpanded = !prevExpanded;
|
|
5303
5267
|
if (onChange) {
|
|
@@ -5573,13 +5537,13 @@ import styled29 from "styled-components";
|
|
|
5573
5537
|
|
|
5574
5538
|
// src/components/Chip/Chip.tokens.tsx
|
|
5575
5539
|
import { ddsBaseTokens as ddsBaseTokens26 } from "@norges-domstoler/dds-design-tokens";
|
|
5576
|
-
var { colors:
|
|
5540
|
+
var { colors: colors14, spacing: spacing13, borderRadius: borderRadius5 } = ddsBaseTokens26;
|
|
5577
5541
|
var typographyType3 = "bodySans01";
|
|
5578
5542
|
var container3 = {
|
|
5579
5543
|
gap: spacing13.SizesDdsSpacingX025,
|
|
5580
5544
|
padding: `${spacing13.SizesDdsSpacingX0125} ${spacing13.SizesDdsSpacingX025}`,
|
|
5581
|
-
backgroundColor:
|
|
5582
|
-
border: `1px solid ${
|
|
5545
|
+
backgroundColor: colors14.DdsColorNeutralsGray1,
|
|
5546
|
+
border: `1px solid ${colors14.DdsColorNeutralsGray3}`,
|
|
5583
5547
|
borderRadius: borderRadius5.RadiiDdsBorderRadius1Radius
|
|
5584
5548
|
};
|
|
5585
5549
|
var group = {
|
|
@@ -6105,7 +6069,7 @@ import styled35, { css as css14 } from "styled-components";
|
|
|
6105
6069
|
|
|
6106
6070
|
// src/components/date-inputs/DatePicker/DatePicker.tokens.ts
|
|
6107
6071
|
import { ddsBaseTokens as ddsBaseTokens28 } from "@norges-domstoler/dds-design-tokens";
|
|
6108
|
-
var { colors:
|
|
6072
|
+
var { colors: colors15 } = ddsBaseTokens28;
|
|
6109
6073
|
var segment = {
|
|
6110
6074
|
medium: {
|
|
6111
6075
|
font: {
|
|
@@ -6113,7 +6077,7 @@ var segment = {
|
|
|
6113
6077
|
},
|
|
6114
6078
|
placeholder: {
|
|
6115
6079
|
...ddsBaseTokens28.fontPackages.supportingStyle_placeholdertext_01.base,
|
|
6116
|
-
textColor:
|
|
6080
|
+
textColor: colors15.DdsColorNeutralsGray6
|
|
6117
6081
|
}
|
|
6118
6082
|
},
|
|
6119
6083
|
small: {
|
|
@@ -6122,7 +6086,7 @@ var segment = {
|
|
|
6122
6086
|
},
|
|
6123
6087
|
placeholder: {
|
|
6124
6088
|
...ddsBaseTokens28.fontPackages.supportingStyle_placeholdertext_02.base,
|
|
6125
|
-
textColor:
|
|
6089
|
+
textColor: colors15.DdsColorNeutralsGray6
|
|
6126
6090
|
}
|
|
6127
6091
|
},
|
|
6128
6092
|
tiny: {
|
|
@@ -6131,7 +6095,7 @@ var segment = {
|
|
|
6131
6095
|
},
|
|
6132
6096
|
placeholder: {
|
|
6133
6097
|
...ddsBaseTokens28.fontPackages.supportingStyle_placeholdertext_03.base,
|
|
6134
|
-
textColor:
|
|
6098
|
+
textColor: colors15.DdsColorNeutralsGray6
|
|
6135
6099
|
}
|
|
6136
6100
|
},
|
|
6137
6101
|
padding: {
|
|
@@ -6139,24 +6103,24 @@ var segment = {
|
|
|
6139
6103
|
y: "0"
|
|
6140
6104
|
},
|
|
6141
6105
|
focus: {
|
|
6142
|
-
textColor:
|
|
6143
|
-
backgroundColor:
|
|
6106
|
+
textColor: colors15.DdsColorNeutralsWhite,
|
|
6107
|
+
backgroundColor: colors15.DdsColorInteractiveBase
|
|
6144
6108
|
}
|
|
6145
6109
|
};
|
|
6146
6110
|
var calendarButton = {
|
|
6147
|
-
color:
|
|
6111
|
+
color: colors15.DdsColorNeutralsGray9,
|
|
6148
6112
|
disabled: {
|
|
6149
|
-
color:
|
|
6113
|
+
color: colors15.DdsColorNeutralsGray6
|
|
6150
6114
|
},
|
|
6151
6115
|
background: "transparent",
|
|
6152
6116
|
borderRadius: ddsBaseTokens28.borderRadius.RadiiDdsBorderRadius1Radius,
|
|
6153
6117
|
hover: {
|
|
6154
|
-
background:
|
|
6155
|
-
color:
|
|
6118
|
+
background: colors15.DdsColorInteractiveLightest,
|
|
6119
|
+
color: colors15.DdsColorInteractiveBase
|
|
6156
6120
|
},
|
|
6157
6121
|
active: {
|
|
6158
|
-
background:
|
|
6159
|
-
color:
|
|
6122
|
+
background: colors15.DdsColorInteractiveLighter,
|
|
6123
|
+
color: colors15.DdsColorInteractiveBase
|
|
6160
6124
|
},
|
|
6161
6125
|
medium: {
|
|
6162
6126
|
size: `calc(${ddsBaseTokens28.iconSizes.DdsIconsizeMedium} + ${ddsBaseTokens28.spacing.SizesDdsSpacingX05})`
|
|
@@ -6649,14 +6613,14 @@ import styled39, { css as css16 } from "styled-components";
|
|
|
6649
6613
|
|
|
6650
6614
|
// src/components/DescriptionList/DescriptionList.tokens.tsx
|
|
6651
6615
|
import { ddsBaseTokens as ddsBaseTokens29 } from "@norges-domstoler/dds-design-tokens";
|
|
6652
|
-
var { spacing: spacing14, colors:
|
|
6616
|
+
var { spacing: spacing14, colors: colors16 } = ddsBaseTokens29;
|
|
6653
6617
|
var term = {
|
|
6654
6618
|
appearance: {
|
|
6655
6619
|
small: {
|
|
6656
|
-
color:
|
|
6620
|
+
color: colors16.DdsColorNeutralsGray7
|
|
6657
6621
|
},
|
|
6658
6622
|
bold: {
|
|
6659
|
-
color:
|
|
6623
|
+
color: colors16.DdsColorNeutralsGray9
|
|
6660
6624
|
}
|
|
6661
6625
|
},
|
|
6662
6626
|
firstOfType: {
|
|
@@ -6666,7 +6630,7 @@ var term = {
|
|
|
6666
6630
|
var desc = {
|
|
6667
6631
|
base: {
|
|
6668
6632
|
gap: spacing14.SizesDdsSpacingX025,
|
|
6669
|
-
color:
|
|
6633
|
+
color: colors16.DdsColorNeutralsGray9
|
|
6670
6634
|
},
|
|
6671
6635
|
lastChild: {
|
|
6672
6636
|
marginBottom: spacing14.SizesDdsSpacingX1
|
|
@@ -6774,14 +6738,14 @@ var DListDesc = styled41.dd`
|
|
|
6774
6738
|
gap: ${descriptionListTokens.desc.base.gap};
|
|
6775
6739
|
`;
|
|
6776
6740
|
var DescriptionListDesc = forwardRef27((props, ref) => {
|
|
6777
|
-
const { children, icon:
|
|
6741
|
+
const { children, icon: icon11, id, className, htmlProps, ...rest } = props;
|
|
6778
6742
|
const dListDescProps = {
|
|
6779
6743
|
...getBaseHTMLProps(id, className, htmlProps, rest),
|
|
6780
6744
|
children,
|
|
6781
6745
|
ref
|
|
6782
6746
|
};
|
|
6783
6747
|
return /* @__PURE__ */ jsxs37(DListDesc, { ...dListDescProps, children: [
|
|
6784
|
-
|
|
6748
|
+
icon11 && /* @__PURE__ */ jsx204(Icon, { icon: icon11 }),
|
|
6785
6749
|
" ",
|
|
6786
6750
|
children
|
|
6787
6751
|
] });
|
|
@@ -7043,7 +7007,7 @@ DrawerGroup.displayName = "DrawerGroup";
|
|
|
7043
7007
|
import { ddsBaseTokens as ddsBaseTokens31 } from "@norges-domstoler/dds-design-tokens";
|
|
7044
7008
|
import styled44 from "styled-components";
|
|
7045
7009
|
import { jsx as jsx207, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
7046
|
-
var { colors:
|
|
7010
|
+
var { colors: colors17, spacing: spacing16 } = ddsBaseTokens31;
|
|
7047
7011
|
var StyledEmptyContent = styled44.div`
|
|
7048
7012
|
display: flex;
|
|
7049
7013
|
justify-content: center;
|
|
@@ -7051,7 +7015,7 @@ var StyledEmptyContent = styled44.div`
|
|
|
7051
7015
|
min-height: ${spacing16.SizesDdsSpacingX10};
|
|
7052
7016
|
height: 100%;
|
|
7053
7017
|
width: 100%;
|
|
7054
|
-
background-color: ${
|
|
7018
|
+
background-color: ${colors17.DdsColorNeutralsGray1};
|
|
7055
7019
|
padding: ${spacing16.SizesDdsSpacingX15};
|
|
7056
7020
|
`;
|
|
7057
7021
|
var StyledEmptyContentText = styled44.div`
|
|
@@ -7117,13 +7081,13 @@ function favStarTokens(size2, variant) {
|
|
|
7117
7081
|
import { useState as useState12 } from "react";
|
|
7118
7082
|
|
|
7119
7083
|
// src/hooks/useCallbackRef.ts
|
|
7120
|
-
import { useCallback as
|
|
7084
|
+
import { useCallback as useCallback6, useEffect as useEffect17, useRef as useRef19 } from "react";
|
|
7121
7085
|
function useCallbackRef(callback, deps = []) {
|
|
7122
7086
|
const callbackRef = useRef19(callback);
|
|
7123
7087
|
useEffect17(() => {
|
|
7124
7088
|
callbackRef.current = callback;
|
|
7125
7089
|
});
|
|
7126
|
-
return
|
|
7090
|
+
return useCallback6((...args) => {
|
|
7127
7091
|
var _a;
|
|
7128
7092
|
return (_a = callbackRef.current) == null ? void 0 : _a.call(callbackRef, ...args);
|
|
7129
7093
|
}, deps);
|
|
@@ -7153,7 +7117,7 @@ function useControllableState(props) {
|
|
|
7153
7117
|
// src/components/FavStar/FavStar.tsx
|
|
7154
7118
|
import { jsx as jsx208, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
7155
7119
|
var TRANSITION_SPEED = "0.2s";
|
|
7156
|
-
var
|
|
7120
|
+
var StyledIcon2 = styled45(Icon)`
|
|
7157
7121
|
color: currentColor;
|
|
7158
7122
|
position: absolute;
|
|
7159
7123
|
top: 0;
|
|
@@ -7199,7 +7163,7 @@ var Container5 = styled45.label`
|
|
|
7199
7163
|
}
|
|
7200
7164
|
|
|
7201
7165
|
&:active {
|
|
7202
|
-
${
|
|
7166
|
+
${StyledIcon2} {
|
|
7203
7167
|
transform: scale(0.75);
|
|
7204
7168
|
}
|
|
7205
7169
|
}
|
|
@@ -7255,9 +7219,9 @@ var FavStar = forwardRef30(
|
|
|
7255
7219
|
"aria-label": (_a = props["aria-label"]) != null ? _a : "Favoriser"
|
|
7256
7220
|
}
|
|
7257
7221
|
),
|
|
7258
|
-
/* @__PURE__ */ jsx208(
|
|
7222
|
+
/* @__PURE__ */ jsx208(StyledIcon2, { iconSize: size2, icon: StarIcon }),
|
|
7259
7223
|
/* @__PURE__ */ jsx208(
|
|
7260
|
-
|
|
7224
|
+
StyledIcon2,
|
|
7261
7225
|
{
|
|
7262
7226
|
iconSize: size2,
|
|
7263
7227
|
icon: StarFilledIcon,
|
|
@@ -7532,16 +7496,16 @@ import styled49 from "styled-components";
|
|
|
7532
7496
|
|
|
7533
7497
|
// src/components/Tooltip/Tooltip.tokens.tsx
|
|
7534
7498
|
import { ddsBaseTokens as ddsBaseTokens36 } from "@norges-domstoler/dds-design-tokens";
|
|
7535
|
-
var { colors:
|
|
7499
|
+
var { colors: colors18, spacing: spacing19 } = ddsBaseTokens36;
|
|
7536
7500
|
var wrapper = {
|
|
7537
7501
|
padding: `${spacing19.SizesDdsSpacingX075}`
|
|
7538
7502
|
};
|
|
7539
7503
|
var svgArrow = {
|
|
7540
7504
|
border: {
|
|
7541
|
-
fill:
|
|
7505
|
+
fill: colors18.DdsColorPrimaryLighter
|
|
7542
7506
|
},
|
|
7543
7507
|
background: {
|
|
7544
|
-
fill:
|
|
7508
|
+
fill: colors18.DdsColorNeutralsWhite
|
|
7545
7509
|
}
|
|
7546
7510
|
};
|
|
7547
7511
|
var tooltipTokens = {
|
|
@@ -7837,17 +7801,17 @@ import styled51 from "styled-components";
|
|
|
7837
7801
|
|
|
7838
7802
|
// src/components/FileUploader/FileUploader.tokens.tsx
|
|
7839
7803
|
import { ddsBaseTokens as ddsBaseTokens38 } from "@norges-domstoler/dds-design-tokens";
|
|
7840
|
-
var { colors:
|
|
7804
|
+
var { colors: colors19, spacing: spacing20 } = ddsBaseTokens38;
|
|
7841
7805
|
var rootTokens = {
|
|
7842
|
-
borderColor:
|
|
7843
|
-
borderColorError:
|
|
7806
|
+
borderColor: colors19.DdsColorNeutralsGray5,
|
|
7807
|
+
borderColorError: colors19.DdsColorDangerBase,
|
|
7844
7808
|
paddingLeftRightTop: spacing20.SizesDdsSpacingX15,
|
|
7845
7809
|
paddingBottom: spacing20.SizesDdsSpacingX2,
|
|
7846
7810
|
gap: spacing20.SizesDdsSpacingX1,
|
|
7847
|
-
backgroundColor:
|
|
7811
|
+
backgroundColor: colors19.DdsColorNeutralsWhite,
|
|
7848
7812
|
dragActive: {
|
|
7849
|
-
borderColor:
|
|
7850
|
-
backgroundColor:
|
|
7813
|
+
borderColor: colors19.DdsColorInteractiveBase,
|
|
7814
|
+
backgroundColor: colors19.DdsColorInteractiveLightest
|
|
7851
7815
|
}
|
|
7852
7816
|
};
|
|
7853
7817
|
var noZoneContainerTokens = {
|
|
@@ -7857,10 +7821,10 @@ var fileTokens = {
|
|
|
7857
7821
|
marginTop: spacing20.SizesDdsSpacingX05,
|
|
7858
7822
|
paddingLeftRight: spacing20.SizesDdsSpacingX05,
|
|
7859
7823
|
paddingTopBottom: spacing20.SizesDdsSpacingX1,
|
|
7860
|
-
backgroundColor:
|
|
7824
|
+
backgroundColor: colors19.DdsColorNeutralsGray1,
|
|
7861
7825
|
textToIconsGap: spacing20.SizesDdsSpacingX075,
|
|
7862
7826
|
invalid: {
|
|
7863
|
-
borderColor:
|
|
7827
|
+
borderColor: colors19.DdsColorDangerBase
|
|
7864
7828
|
}
|
|
7865
7829
|
};
|
|
7866
7830
|
var errorsTokens = {
|
|
@@ -7951,7 +7915,7 @@ var File = (props) => {
|
|
|
7951
7915
|
import {
|
|
7952
7916
|
fromEvent as getFilesFromEvent
|
|
7953
7917
|
} from "file-selector";
|
|
7954
|
-
import { useCallback as
|
|
7918
|
+
import { useCallback as useCallback7, useEffect as useEffect21, useMemo, useReducer, useRef as useRef22 } from "react";
|
|
7955
7919
|
|
|
7956
7920
|
// src/components/FileUploader/fileUploaderReducer.ts
|
|
7957
7921
|
var fileUploaderReducer = (state, action) => {
|
|
@@ -8075,12 +8039,12 @@ var useFileUploader = (props) => {
|
|
|
8075
8039
|
payload: calcRootErrors(stateFiles, maxFiles, errorMessage)
|
|
8076
8040
|
});
|
|
8077
8041
|
}, [dispatch, stateFiles, maxFiles, errorMessage]);
|
|
8078
|
-
const onRootFocus =
|
|
8042
|
+
const onRootFocus = useCallback7(
|
|
8079
8043
|
() => dispatch({ type: "focus" }),
|
|
8080
8044
|
[dispatch]
|
|
8081
8045
|
);
|
|
8082
|
-
const onRootBlur =
|
|
8083
|
-
const onRootDragEnter =
|
|
8046
|
+
const onRootBlur = useCallback7(() => dispatch({ type: "blur" }), [dispatch]);
|
|
8047
|
+
const onRootDragEnter = useCallback7(
|
|
8084
8048
|
async (evt) => {
|
|
8085
8049
|
preventDefaults(evt);
|
|
8086
8050
|
if (isEventWithFiles(evt)) {
|
|
@@ -8093,7 +8057,7 @@ var useFileUploader = (props) => {
|
|
|
8093
8057
|
},
|
|
8094
8058
|
[dispatch, accept, maxFiles]
|
|
8095
8059
|
);
|
|
8096
|
-
const onRootDragOver =
|
|
8060
|
+
const onRootDragOver = useCallback7((evt) => {
|
|
8097
8061
|
preventDefaults(evt);
|
|
8098
8062
|
const hasFiles = isEventWithFiles(evt);
|
|
8099
8063
|
if (hasFiles && evt.dataTransfer) {
|
|
@@ -8103,7 +8067,7 @@ var useFileUploader = (props) => {
|
|
|
8103
8067
|
}
|
|
8104
8068
|
}
|
|
8105
8069
|
}, []);
|
|
8106
|
-
const onRootDragLeave =
|
|
8070
|
+
const onRootDragLeave = useCallback7(
|
|
8107
8071
|
(evt) => {
|
|
8108
8072
|
preventDefaults(evt);
|
|
8109
8073
|
if (evt.currentTarget.contains(evt.relatedTarget))
|
|
@@ -8112,7 +8076,7 @@ var useFileUploader = (props) => {
|
|
|
8112
8076
|
},
|
|
8113
8077
|
[dispatch]
|
|
8114
8078
|
);
|
|
8115
|
-
const setFiles =
|
|
8079
|
+
const setFiles = useCallback7(
|
|
8116
8080
|
async (evt) => {
|
|
8117
8081
|
evt.preventDefault();
|
|
8118
8082
|
if (isEventWithFiles(evt)) {
|
|
@@ -8146,13 +8110,13 @@ var useFileUploader = (props) => {
|
|
|
8146
8110
|
dispatch
|
|
8147
8111
|
]
|
|
8148
8112
|
);
|
|
8149
|
-
const openFileDialog =
|
|
8113
|
+
const openFileDialog = useCallback7(() => {
|
|
8150
8114
|
if (inputRef.current) {
|
|
8151
8115
|
inputRef.current.value = "";
|
|
8152
8116
|
inputRef.current.click();
|
|
8153
8117
|
}
|
|
8154
8118
|
}, [inputRef]);
|
|
8155
|
-
const removeFile =
|
|
8119
|
+
const removeFile = useCallback7(
|
|
8156
8120
|
(file) => {
|
|
8157
8121
|
const newFiles = [...stateFiles];
|
|
8158
8122
|
newFiles.splice(stateFiles.indexOf(file), 1);
|
|
@@ -8166,7 +8130,7 @@ var useFileUploader = (props) => {
|
|
|
8166
8130
|
},
|
|
8167
8131
|
[stateFiles, isControlled, maxFiles, errorMessage, onChange, dispatch]
|
|
8168
8132
|
);
|
|
8169
|
-
const getRootProps =
|
|
8133
|
+
const getRootProps = useCallback7(
|
|
8170
8134
|
() => ({
|
|
8171
8135
|
onBlur: onRootBlur,
|
|
8172
8136
|
onFocus: onRootFocus,
|
|
@@ -8188,14 +8152,14 @@ var useFileUploader = (props) => {
|
|
|
8188
8152
|
disabled
|
|
8189
8153
|
]
|
|
8190
8154
|
);
|
|
8191
|
-
const getButtonProps =
|
|
8155
|
+
const getButtonProps = useCallback7(
|
|
8192
8156
|
() => ({
|
|
8193
8157
|
onClick: openFileDialog,
|
|
8194
8158
|
ref: buttonRef
|
|
8195
8159
|
}),
|
|
8196
8160
|
[openFileDialog, buttonRef]
|
|
8197
8161
|
);
|
|
8198
|
-
const getInputProps =
|
|
8162
|
+
const getInputProps = useCallback7(
|
|
8199
8163
|
() => ({
|
|
8200
8164
|
type: "file",
|
|
8201
8165
|
style: { display: "none" },
|
|
@@ -8375,22 +8339,22 @@ import styled55, { css as css21 } from "styled-components";
|
|
|
8375
8339
|
|
|
8376
8340
|
// src/components/GlobalMessage/GlobalMessage.tokens.tsx
|
|
8377
8341
|
import { ddsBaseTokens as ddsBaseTokens39 } from "@norges-domstoler/dds-design-tokens";
|
|
8378
|
-
var { colors:
|
|
8342
|
+
var { colors: colors20, spacing: spacing21 } = ddsBaseTokens39;
|
|
8379
8343
|
var typographyType4 = "bodySans02";
|
|
8380
8344
|
var container7 = {
|
|
8381
8345
|
borderBottom: "2px solid",
|
|
8382
8346
|
padding: `0 ${spacing21.SizesDdsSpacingX1}`,
|
|
8383
8347
|
info: {
|
|
8384
|
-
borderColor:
|
|
8385
|
-
backgroundColor:
|
|
8348
|
+
borderColor: colors20.DdsColorInfoLighter,
|
|
8349
|
+
backgroundColor: colors20.DdsColorInfoLightest
|
|
8386
8350
|
},
|
|
8387
8351
|
danger: {
|
|
8388
|
-
borderColor:
|
|
8389
|
-
backgroundColor:
|
|
8352
|
+
borderColor: colors20.DdsColorDangerLighter,
|
|
8353
|
+
backgroundColor: colors20.DdsColorDangerLightest
|
|
8390
8354
|
},
|
|
8391
8355
|
warning: {
|
|
8392
|
-
borderColor:
|
|
8393
|
-
backgroundColor:
|
|
8356
|
+
borderColor: colors20.DdsColorWarningLighter,
|
|
8357
|
+
backgroundColor: colors20.DdsColorWarningLightest
|
|
8394
8358
|
}
|
|
8395
8359
|
};
|
|
8396
8360
|
var contentContainer3 = {
|
|
@@ -8422,20 +8386,20 @@ var globalMessageTokens = {
|
|
|
8422
8386
|
icon: {
|
|
8423
8387
|
marginRight: `${spacing21.SizesDdsSpacingX075}`,
|
|
8424
8388
|
info: {
|
|
8425
|
-
color:
|
|
8389
|
+
color: colors20.DdsColorInfoDarkest
|
|
8426
8390
|
},
|
|
8427
8391
|
danger: {
|
|
8428
|
-
color:
|
|
8392
|
+
color: colors20.DdsColorDangerDarkest
|
|
8429
8393
|
},
|
|
8430
8394
|
warning: {
|
|
8431
|
-
color:
|
|
8395
|
+
color: colors20.DdsColorWarningDarkest
|
|
8432
8396
|
}
|
|
8433
8397
|
}
|
|
8434
8398
|
};
|
|
8435
8399
|
|
|
8436
8400
|
// src/components/GlobalMessage/GlobalMessage.tsx
|
|
8437
8401
|
import { jsx as jsx219, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
8438
|
-
var { container: container8, contentContainer: contentContainer4, icon:
|
|
8402
|
+
var { container: container8, contentContainer: contentContainer4, icon: icon4 } = globalMessageTokens;
|
|
8439
8403
|
var Container7 = styled55.div`
|
|
8440
8404
|
display: flex;
|
|
8441
8405
|
align-items: center;
|
|
@@ -8451,7 +8415,7 @@ var Container7 = styled55.div`
|
|
|
8451
8415
|
`}
|
|
8452
8416
|
`;
|
|
8453
8417
|
var MessageIconWrapper = styled55(Icon)`
|
|
8454
|
-
margin-right: ${
|
|
8418
|
+
margin-right: ${icon4.marginRight};
|
|
8455
8419
|
`;
|
|
8456
8420
|
var ControlsContainer = styled55.div`
|
|
8457
8421
|
display: flex;
|
|
@@ -8490,7 +8454,7 @@ var GlobalMessage = forwardRef34(
|
|
|
8490
8454
|
MessageIconWrapper,
|
|
8491
8455
|
{
|
|
8492
8456
|
icon: purposeVariants[purpose].icon,
|
|
8493
|
-
color:
|
|
8457
|
+
color: icon4[purpose].color
|
|
8494
8458
|
}
|
|
8495
8459
|
),
|
|
8496
8460
|
children != null ? children : /* @__PURE__ */ jsx219(Typography, { as: "span", children: message2 })
|
|
@@ -8784,7 +8748,7 @@ import styled58, { css as css23 } from "styled-components";
|
|
|
8784
8748
|
|
|
8785
8749
|
// src/components/InlineEdit/InlineEdit.tokens.ts
|
|
8786
8750
|
import { ddsBaseTokens as ddsBaseTokens41 } from "@norges-domstoler/dds-design-tokens";
|
|
8787
|
-
var { colors:
|
|
8751
|
+
var { colors: colors21, spacing: spacing23, fontPackages: fontPackages5 } = ddsBaseTokens41;
|
|
8788
8752
|
var inlineEdit = {
|
|
8789
8753
|
padding: spacing23.SizesDdsSpacingX025,
|
|
8790
8754
|
font: fontPackages5.body_sans_02.base,
|
|
@@ -8793,10 +8757,10 @@ var inlineEdit = {
|
|
|
8793
8757
|
paddingLeft: spacing23.SizesDdsSpacingX2
|
|
8794
8758
|
},
|
|
8795
8759
|
hover: {
|
|
8796
|
-
backgroundColor:
|
|
8760
|
+
backgroundColor: colors21.DdsColorInteractiveLightest
|
|
8797
8761
|
},
|
|
8798
8762
|
focus: {
|
|
8799
|
-
backgroundColor:
|
|
8763
|
+
backgroundColor: colors21.DdsColorNeutralsWhite
|
|
8800
8764
|
}
|
|
8801
8765
|
};
|
|
8802
8766
|
var iconWrapper = {
|
|
@@ -9027,9 +8991,9 @@ import styled59, { css as css24 } from "styled-components";
|
|
|
9027
8991
|
|
|
9028
8992
|
// src/components/InternalHeader/InternalHeader.tokens.tsx
|
|
9029
8993
|
import { ddsBaseTokens as ddsBaseTokens42 } from "@norges-domstoler/dds-design-tokens";
|
|
9030
|
-
var { border: border10, colors:
|
|
8994
|
+
var { border: border10, colors: colors22, spacing: spacing24 } = ddsBaseTokens42;
|
|
9031
8995
|
var bar = {
|
|
9032
|
-
backgroundColor:
|
|
8996
|
+
backgroundColor: colors22.DdsColorNeutralsWhite,
|
|
9033
8997
|
itemGap: spacing24.SizesDdsSpacingX15,
|
|
9034
8998
|
minHeight: "57px",
|
|
9035
8999
|
borderBottom: `${border10.BordersDdsBorderStyleLightStroke} solid ${border10.BordersDdsBorderStyleLightStrokeWeight}`,
|
|
@@ -9421,7 +9385,7 @@ import styled63, { css as css26 } from "styled-components";
|
|
|
9421
9385
|
|
|
9422
9386
|
// src/components/LocalMessage/LocalMessage.tokens.tsx
|
|
9423
9387
|
import { ddsBaseTokens as ddsBaseTokens45 } from "@norges-domstoler/dds-design-tokens";
|
|
9424
|
-
var { colors:
|
|
9388
|
+
var { colors: colors23, spacing: spacing26, borderRadius: borderRadius6, border: border11, outerShadow: outerShadow3 } = ddsBaseTokens45;
|
|
9425
9389
|
var container9 = {
|
|
9426
9390
|
base: {
|
|
9427
9391
|
boxShadow: outerShadow3.DdsShadow1Onlight,
|
|
@@ -9432,28 +9396,28 @@ var container9 = {
|
|
|
9432
9396
|
},
|
|
9433
9397
|
purpose: {
|
|
9434
9398
|
info: {
|
|
9435
|
-
borderColor:
|
|
9436
|
-
backgroundColor:
|
|
9399
|
+
borderColor: colors23.DdsColorInfoBase,
|
|
9400
|
+
backgroundColor: colors23.DdsColorInfoLightest
|
|
9437
9401
|
},
|
|
9438
9402
|
warning: {
|
|
9439
|
-
borderColor:
|
|
9440
|
-
backgroundColor:
|
|
9403
|
+
borderColor: colors23.DdsColorWarningBase,
|
|
9404
|
+
backgroundColor: colors23.DdsColorWarningLightest
|
|
9441
9405
|
},
|
|
9442
9406
|
danger: {
|
|
9443
|
-
borderColor:
|
|
9444
|
-
backgroundColor:
|
|
9407
|
+
borderColor: colors23.DdsColorDangerBase,
|
|
9408
|
+
backgroundColor: colors23.DdsColorDangerLightest
|
|
9445
9409
|
},
|
|
9446
9410
|
success: {
|
|
9447
|
-
borderColor:
|
|
9448
|
-
backgroundColor:
|
|
9411
|
+
borderColor: colors23.DdsColorSuccessBase,
|
|
9412
|
+
backgroundColor: colors23.DdsColorSuccessLightest
|
|
9449
9413
|
},
|
|
9450
9414
|
tips: {
|
|
9451
|
-
borderColor:
|
|
9452
|
-
backgroundColor:
|
|
9415
|
+
borderColor: colors23.DdsColorPrimaryBase,
|
|
9416
|
+
backgroundColor: colors23.DdsColorPrimaryLightest
|
|
9453
9417
|
},
|
|
9454
9418
|
confidential: {
|
|
9455
|
-
borderColor:
|
|
9456
|
-
backgroundColor:
|
|
9419
|
+
borderColor: colors23.DdsColorDangerBase,
|
|
9420
|
+
backgroundColor: colors23.DdsColorDangerLightest
|
|
9457
9421
|
}
|
|
9458
9422
|
}
|
|
9459
9423
|
};
|
|
@@ -9488,37 +9452,37 @@ var purposeVariants2 = {
|
|
|
9488
9452
|
closeButtonPurpose: "danger"
|
|
9489
9453
|
}
|
|
9490
9454
|
};
|
|
9491
|
-
var
|
|
9455
|
+
var icon5 = {
|
|
9492
9456
|
marginRight: `${spacing26.SizesDdsSpacingX075}`,
|
|
9493
9457
|
info: {
|
|
9494
|
-
color:
|
|
9458
|
+
color: colors23.DdsColorInfoDarkest
|
|
9495
9459
|
},
|
|
9496
9460
|
danger: {
|
|
9497
|
-
color:
|
|
9461
|
+
color: colors23.DdsColorDangerDarkest
|
|
9498
9462
|
},
|
|
9499
9463
|
warning: {
|
|
9500
|
-
color:
|
|
9464
|
+
color: colors23.DdsColorWarningDarkest
|
|
9501
9465
|
},
|
|
9502
9466
|
success: {
|
|
9503
|
-
color:
|
|
9467
|
+
color: colors23.DdsColorSuccessDarkest
|
|
9504
9468
|
},
|
|
9505
9469
|
tips: {
|
|
9506
|
-
color:
|
|
9470
|
+
color: colors23.DdsColorPrimaryDarkest
|
|
9507
9471
|
},
|
|
9508
9472
|
confidential: {
|
|
9509
|
-
color:
|
|
9473
|
+
color: colors23.DdsColorDangerDarkest
|
|
9510
9474
|
}
|
|
9511
9475
|
};
|
|
9512
9476
|
var localMessageTokens = {
|
|
9513
9477
|
container: container9,
|
|
9514
9478
|
content: content3,
|
|
9515
9479
|
purposeVariants: purposeVariants2,
|
|
9516
|
-
icon:
|
|
9480
|
+
icon: icon5
|
|
9517
9481
|
};
|
|
9518
9482
|
|
|
9519
9483
|
// src/components/LocalMessage/LocalMessage.tsx
|
|
9520
9484
|
import { Fragment as Fragment7, jsx as jsx231, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
9521
|
-
var { container: container10, content: content4, icon:
|
|
9485
|
+
var { container: container10, content: content4, icon: icon6, purposeVariants: purposeVariants3 } = localMessageTokens;
|
|
9522
9486
|
var Container8 = styled63.div.withConfig({
|
|
9523
9487
|
shouldForwardProp: (prop) => {
|
|
9524
9488
|
const styleOnlyProps = [
|
|
@@ -9613,7 +9577,7 @@ var LocalMessage = forwardRef42(
|
|
|
9613
9577
|
MessageIconWrapper2,
|
|
9614
9578
|
{
|
|
9615
9579
|
icon: purposeVariants3[purpose].icon,
|
|
9616
|
-
color:
|
|
9580
|
+
color: icon6[purpose].color
|
|
9617
9581
|
}
|
|
9618
9582
|
),
|
|
9619
9583
|
/* @__PURE__ */ jsx231(TextContainer2, { children: children != null ? children : /* @__PURE__ */ jsx231(Typography, { as: "span", children: message2 }) }),
|
|
@@ -9854,12 +9818,12 @@ import styled69, { css as css28 } from "styled-components";
|
|
|
9854
9818
|
|
|
9855
9819
|
// src/components/Pagination/Pagination.tokens.tsx
|
|
9856
9820
|
import { ddsBaseTokens as ddsBaseTokens48 } from "@norges-domstoler/dds-design-tokens";
|
|
9857
|
-
var { spacing: spacing28, colors:
|
|
9821
|
+
var { spacing: spacing28, colors: colors24 } = ddsBaseTokens48;
|
|
9858
9822
|
var list7 = {
|
|
9859
9823
|
gap: spacing28.SizesDdsSpacingX075
|
|
9860
9824
|
};
|
|
9861
9825
|
var truncationIcon = {
|
|
9862
|
-
color:
|
|
9826
|
+
color: colors24.DdsColorNeutralsGray7
|
|
9863
9827
|
};
|
|
9864
9828
|
var outerContainer3 = {
|
|
9865
9829
|
gap: spacing28.SizesDdsSpacingX075
|
|
@@ -9921,7 +9885,7 @@ import {
|
|
|
9921
9885
|
ddsBaseTokens as ddsBaseTokens49,
|
|
9922
9886
|
ddsReferenceTokens as ddsReferenceTokens6
|
|
9923
9887
|
} from "@norges-domstoler/dds-design-tokens";
|
|
9924
|
-
var { colors:
|
|
9888
|
+
var { colors: colors25, spacing: spacing29, borderRadius: borderRadius7, border: border12 } = ddsBaseTokens49;
|
|
9925
9889
|
var { textDefault: textDefault5 } = ddsReferenceTokens6;
|
|
9926
9890
|
var placeholderTypographyTypes = {
|
|
9927
9891
|
medium: "supportingStylePlaceholderText01",
|
|
@@ -9944,12 +9908,12 @@ var typographyTypes3 = {
|
|
|
9944
9908
|
var control = {
|
|
9945
9909
|
borderRadius: borderRadius7.RadiiDdsBorderRadius1Radius,
|
|
9946
9910
|
border: `${border12.BordersDdsBorderStyleLightStrokeWeight} solid`,
|
|
9947
|
-
borderColor:
|
|
9948
|
-
backgroundColor:
|
|
9949
|
-
color:
|
|
9911
|
+
borderColor: colors25.DdsColorNeutralsGray5,
|
|
9912
|
+
backgroundColor: colors25.DdsColorNeutralsWhite,
|
|
9913
|
+
color: colors25.DdsColorNeutralsGray9,
|
|
9950
9914
|
disabled: {
|
|
9951
|
-
backgroundColor:
|
|
9952
|
-
borderColor:
|
|
9915
|
+
backgroundColor: colors25.DdsColorNeutralsGray1,
|
|
9916
|
+
borderColor: colors25.DdsColorNeutralsGray5
|
|
9953
9917
|
},
|
|
9954
9918
|
readOnly: {
|
|
9955
9919
|
borderColor: "transparent",
|
|
@@ -9982,14 +9946,14 @@ var control = {
|
|
|
9982
9946
|
}
|
|
9983
9947
|
};
|
|
9984
9948
|
var placeholder = {
|
|
9985
|
-
color:
|
|
9949
|
+
color: colors25.DdsColorNeutralsGray6
|
|
9986
9950
|
};
|
|
9987
9951
|
var dropdownIndicator = {
|
|
9988
9952
|
base: {
|
|
9989
|
-
color:
|
|
9953
|
+
color: colors25.DdsColorNeutralsGray6
|
|
9990
9954
|
},
|
|
9991
9955
|
hover: {
|
|
9992
|
-
color:
|
|
9956
|
+
color: colors25.DdsColorInteractiveBase
|
|
9993
9957
|
},
|
|
9994
9958
|
readOnly: {
|
|
9995
9959
|
color: "transparent"
|
|
@@ -9997,23 +9961,23 @@ var dropdownIndicator = {
|
|
|
9997
9961
|
};
|
|
9998
9962
|
var clearIndicator = {
|
|
9999
9963
|
base: {
|
|
10000
|
-
color:
|
|
9964
|
+
color: colors25.DdsColorNeutralsGray6
|
|
10001
9965
|
},
|
|
10002
|
-
hover: { color:
|
|
9966
|
+
hover: { color: colors25.DdsColorInteractiveBase }
|
|
10003
9967
|
};
|
|
10004
9968
|
var loadingIndicator = {
|
|
10005
|
-
color:
|
|
9969
|
+
color: colors25.DdsColorNeutralsGray6
|
|
10006
9970
|
};
|
|
10007
9971
|
var menu = {
|
|
10008
9972
|
border: "1px solid",
|
|
10009
|
-
borderColor:
|
|
10010
|
-
backgroundColor:
|
|
9973
|
+
borderColor: colors25.DdsColorInteractiveBase,
|
|
9974
|
+
backgroundColor: colors25.DdsColorNeutralsWhite,
|
|
10011
9975
|
borderRadius: borderRadius7.RadiiDdsBorderRadius1Radius,
|
|
10012
9976
|
marginTop: spacing29.SizesDdsSpacingX025,
|
|
10013
9977
|
marginBottom: spacing29.SizesDdsSpacingX025
|
|
10014
9978
|
};
|
|
10015
9979
|
var groupHeading = {
|
|
10016
|
-
color:
|
|
9980
|
+
color: colors25.DdsColorNeutralsGray7,
|
|
10017
9981
|
padding: `${spacing29.SizesDdsSpacingX05} ${spacing29.SizesDdsSpacingX075} ${spacing29.SizesDdsSpacingX0125} ${spacing29.SizesDdsSpacingX075}`
|
|
10018
9982
|
};
|
|
10019
9983
|
var option = {
|
|
@@ -10021,44 +9985,44 @@ var option = {
|
|
|
10021
9985
|
color: textDefault5.textColor,
|
|
10022
9986
|
gap: spacing29.SizesDdsSpacingX05,
|
|
10023
9987
|
padding: `${spacing29.SizesDdsSpacingX075}`,
|
|
10024
|
-
backgroundColor:
|
|
9988
|
+
backgroundColor: colors25.DdsColorNeutralsWhite
|
|
10025
9989
|
},
|
|
10026
9990
|
hover: {
|
|
10027
9991
|
color: textDefault5.textColor,
|
|
10028
|
-
backgroundColor:
|
|
9992
|
+
backgroundColor: colors25.DdsColorInteractiveLightest
|
|
10029
9993
|
},
|
|
10030
9994
|
focus: {
|
|
10031
9995
|
color: textDefault5.textColor,
|
|
10032
|
-
backgroundColor:
|
|
9996
|
+
backgroundColor: colors25.DdsColorInteractiveLightest
|
|
10033
9997
|
},
|
|
10034
9998
|
selected: {
|
|
10035
9999
|
color: textDefault5.textColor,
|
|
10036
|
-
backgroundColor:
|
|
10000
|
+
backgroundColor: colors25.DdsColorNeutralsWhite
|
|
10037
10001
|
}
|
|
10038
10002
|
};
|
|
10039
10003
|
var noOptionsMessage = {
|
|
10040
10004
|
padding: `${spacing29.SizesDdsSpacingX05} ${spacing29.SizesDdsSpacingX1}`,
|
|
10041
|
-
color:
|
|
10005
|
+
color: colors25.DdsColorNeutralsGray6
|
|
10042
10006
|
};
|
|
10043
10007
|
var multiValue = {
|
|
10044
10008
|
borderRadius: borderRadius7.RadiiDdsBorderRadius1Radius,
|
|
10045
|
-
backgroundColor:
|
|
10009
|
+
backgroundColor: colors25.DdsColorNeutralsGray2
|
|
10046
10010
|
};
|
|
10047
10011
|
var multiValueLabel = {
|
|
10048
10012
|
padding: `0 ${spacing29.SizesDdsSpacingX025}`,
|
|
10049
|
-
color:
|
|
10013
|
+
color: colors25.DdsColorNeutralsGray9
|
|
10050
10014
|
};
|
|
10051
10015
|
var multiValueRemove = {
|
|
10052
10016
|
base: {
|
|
10053
|
-
color:
|
|
10017
|
+
color: colors25.DdsColorNeutralsGray9,
|
|
10054
10018
|
padding: `0 ${spacing29.SizesDdsSpacingX025}`,
|
|
10055
10019
|
borderTopRightRadius: borderRadius7.RadiiDdsBorderRadius1Radius,
|
|
10056
10020
|
borderBottomRightRadius: borderRadius7.RadiiDdsBorderRadius1Radius
|
|
10057
10021
|
},
|
|
10058
10022
|
hover: {
|
|
10059
|
-
color:
|
|
10060
|
-
backgroundColor:
|
|
10061
|
-
boxShadow: `inset 0 0 0 1px ${
|
|
10023
|
+
color: colors25.DdsColorNeutralsWhite,
|
|
10024
|
+
backgroundColor: colors25.DdsColorInteractiveBase,
|
|
10025
|
+
boxShadow: `inset 0 0 0 1px ${colors25.DdsColorNeutralsGray9}`
|
|
10062
10026
|
}
|
|
10063
10027
|
};
|
|
10064
10028
|
var valueContainer = {
|
|
@@ -10066,7 +10030,7 @@ var valueContainer = {
|
|
|
10066
10030
|
gap: spacing29.SizesDdsSpacingX025
|
|
10067
10031
|
}
|
|
10068
10032
|
};
|
|
10069
|
-
var
|
|
10033
|
+
var icon7 = {
|
|
10070
10034
|
marginRight: spacing29.SizesDdsSpacingX05
|
|
10071
10035
|
};
|
|
10072
10036
|
var selectTokens = {
|
|
@@ -10083,7 +10047,7 @@ var selectTokens = {
|
|
|
10083
10047
|
noOptionsMessage,
|
|
10084
10048
|
clearIndicator,
|
|
10085
10049
|
loadingIndicator,
|
|
10086
|
-
icon:
|
|
10050
|
+
icon: icon7
|
|
10087
10051
|
};
|
|
10088
10052
|
|
|
10089
10053
|
// src/components/Select/Select.styles.ts
|
|
@@ -10100,7 +10064,7 @@ var {
|
|
|
10100
10064
|
multiValueRemove: multiValueRemove2,
|
|
10101
10065
|
noOptionsMessage: noOptionsMessage2,
|
|
10102
10066
|
placeholder: placeholder2,
|
|
10103
|
-
icon:
|
|
10067
|
+
icon: icon8,
|
|
10104
10068
|
valueContainer: valueContainer2
|
|
10105
10069
|
} = selectTokens;
|
|
10106
10070
|
var prefix = "dds-select";
|
|
@@ -10181,8 +10145,8 @@ var InnerSingleValue = styled68.div`
|
|
|
10181
10145
|
box-sizing: border-box;
|
|
10182
10146
|
max-width: 100%;
|
|
10183
10147
|
`;
|
|
10184
|
-
var
|
|
10185
|
-
margin-right: ${
|
|
10148
|
+
var StyledIcon3 = styled68(Icon)`
|
|
10149
|
+
margin-right: ${icon8.marginRight};
|
|
10186
10150
|
`;
|
|
10187
10151
|
var getCustomStyles = (size2) => ({
|
|
10188
10152
|
control: () => ({
|
|
@@ -10377,8 +10341,8 @@ var DDSInput = (props, ariaInvalid, ariaDescribedby) => /* @__PURE__ */ jsx235(
|
|
|
10377
10341
|
"aria-describedby": ariaDescribedby
|
|
10378
10342
|
}
|
|
10379
10343
|
);
|
|
10380
|
-
var DDSControl = (props, componentSize,
|
|
10381
|
-
|
|
10344
|
+
var DDSControl = (props, componentSize, icon11) => /* @__PURE__ */ jsxs55(Control, { ...props, children: [
|
|
10345
|
+
icon11 && /* @__PURE__ */ jsx235(StyledIcon3, { icon: icon11, iconSize: getFormInputIconSize(componentSize) }),
|
|
10382
10346
|
props.children
|
|
10383
10347
|
] });
|
|
10384
10348
|
|
|
@@ -10399,7 +10363,7 @@ function SelectInner(props, ref) {
|
|
|
10399
10363
|
options,
|
|
10400
10364
|
isMulti,
|
|
10401
10365
|
value,
|
|
10402
|
-
icon:
|
|
10366
|
+
icon: icon11,
|
|
10403
10367
|
defaultValue,
|
|
10404
10368
|
width = defaultWidth4,
|
|
10405
10369
|
closeMenuOnSelect,
|
|
@@ -10463,7 +10427,7 @@ function SelectInner(props, ref) {
|
|
|
10463
10427
|
ClearIndicator: (props2) => DDSClearIndicator(props2, componentSize),
|
|
10464
10428
|
DropdownIndicator: (props2) => DDSDropdownIndicator(props2, componentSize),
|
|
10465
10429
|
MultiValueRemove: DDSMultiValueRemove,
|
|
10466
|
-
Control: (props2) => DDSControl(props2, componentSize,
|
|
10430
|
+
Control: (props2) => DDSControl(props2, componentSize, icon11)
|
|
10467
10431
|
},
|
|
10468
10432
|
"aria-invalid": hasErrorMessage ? true : void 0,
|
|
10469
10433
|
required,
|
|
@@ -10485,7 +10449,7 @@ var createSelectOptions = (...args) => args.map((v) => ({ label: v, value: v }))
|
|
|
10485
10449
|
// src/components/Pagination/Pagination.tsx
|
|
10486
10450
|
import { jsx as jsx237, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
10487
10451
|
var { outerContainer: outerContainer4, indicatorsContainer: indicatorsContainer2, truncationIcon: truncationIcon2, list: list8 } = paginationTokens;
|
|
10488
|
-
var
|
|
10452
|
+
var Nav = styled69.nav`
|
|
10489
10453
|
display: flex;
|
|
10490
10454
|
align-items: center;
|
|
10491
10455
|
`;
|
|
@@ -10618,12 +10582,12 @@ var Pagination = forwardRef47(
|
|
|
10618
10582
|
};
|
|
10619
10583
|
const isOnFirstPage = activePage === 1;
|
|
10620
10584
|
const isOnLastPage = activePage === pagesLength;
|
|
10621
|
-
const navigation2 = withPagination ? /* @__PURE__ */ jsx237(
|
|
10585
|
+
const navigation2 = withPagination ? /* @__PURE__ */ jsx237(Nav, { ref, "aria-label": "paginering", ...navProps, children: /* @__PURE__ */ jsxs57(List3, { children: [
|
|
10622
10586
|
/* @__PURE__ */ jsx237(ListItem3, { $isHidden: isOnFirstPage, "aria-hidden": isOnFirstPage, children: previousPageButton }),
|
|
10623
10587
|
listItems,
|
|
10624
10588
|
/* @__PURE__ */ jsx237(ListItem3, { $isHidden: isOnLastPage, "aria-hidden": isOnLastPage, children: nextPageButton })
|
|
10625
10589
|
] }) }) : null;
|
|
10626
|
-
const smallScreenNavigation = withPagination ? /* @__PURE__ */ jsx237(
|
|
10590
|
+
const smallScreenNavigation = withPagination ? /* @__PURE__ */ jsx237(Nav, { ref, "aria-label": "paginering", ...navProps, children: /* @__PURE__ */ jsxs57(List3, { children: [
|
|
10627
10591
|
/* @__PURE__ */ jsx237(ListItem3, { $isHidden: isOnFirstPage, "aria-hidden": isOnFirstPage, children: /* @__PURE__ */ jsx237(
|
|
10628
10592
|
Button,
|
|
10629
10593
|
{
|
|
@@ -10928,7 +10892,7 @@ var useProgressTrackerContext = () => useContext5(ProgressTrackerContext);
|
|
|
10928
10892
|
|
|
10929
10893
|
// src/components/ProgressTracker/ProgressTracker.tokens.tsx
|
|
10930
10894
|
import { ddsBaseTokens as ddsBaseTokens52 } from "@norges-domstoler/dds-design-tokens";
|
|
10931
|
-
var { colors:
|
|
10895
|
+
var { colors: colors26, spacing: spacing31 } = ddsBaseTokens52;
|
|
10932
10896
|
var typographyTypes4 = {
|
|
10933
10897
|
number: "bodySans01",
|
|
10934
10898
|
label: "bodySans03"
|
|
@@ -10940,7 +10904,7 @@ var itemContentWrapper = {
|
|
|
10940
10904
|
gap: spacing31.SizesDdsSpacingX05
|
|
10941
10905
|
};
|
|
10942
10906
|
var connector = {
|
|
10943
|
-
color:
|
|
10907
|
+
color: colors26.DdsColorNeutralsGray5,
|
|
10944
10908
|
height: "18px",
|
|
10945
10909
|
width: "1px"
|
|
10946
10910
|
};
|
|
@@ -10949,87 +10913,87 @@ var itemNumber = {
|
|
|
10949
10913
|
borderWidth: "2px",
|
|
10950
10914
|
iconSize: "small",
|
|
10951
10915
|
activeIncomplete: {
|
|
10952
|
-
borderColor:
|
|
10953
|
-
color:
|
|
10954
|
-
backgroundColor:
|
|
10916
|
+
borderColor: colors26.DdsColorInteractiveBase,
|
|
10917
|
+
color: colors26.DdsColorNeutralsWhite,
|
|
10918
|
+
backgroundColor: colors26.DdsColorInteractiveBase,
|
|
10955
10919
|
hover: {
|
|
10956
|
-
borderColor:
|
|
10957
|
-
color:
|
|
10958
|
-
backgroundColor:
|
|
10920
|
+
borderColor: colors26.DdsColorInteractiveBase,
|
|
10921
|
+
color: colors26.DdsColorNeutralsWhite,
|
|
10922
|
+
backgroundColor: colors26.DdsColorInteractiveBase
|
|
10959
10923
|
}
|
|
10960
10924
|
},
|
|
10961
10925
|
activeCompleted: {
|
|
10962
|
-
borderColor:
|
|
10963
|
-
color:
|
|
10964
|
-
backgroundColor:
|
|
10926
|
+
borderColor: colors26.DdsColorInteractiveBase,
|
|
10927
|
+
color: colors26.DdsColorNeutralsWhite,
|
|
10928
|
+
backgroundColor: colors26.DdsColorInteractiveBase,
|
|
10965
10929
|
hover: {
|
|
10966
|
-
borderColor:
|
|
10967
|
-
color:
|
|
10968
|
-
backgroundColor:
|
|
10930
|
+
borderColor: colors26.DdsColorInteractiveDark,
|
|
10931
|
+
color: colors26.DdsColorNeutralsWhite,
|
|
10932
|
+
backgroundColor: colors26.DdsColorInteractiveDark
|
|
10969
10933
|
}
|
|
10970
10934
|
},
|
|
10971
10935
|
inactiveCompleted: {
|
|
10972
|
-
borderColor:
|
|
10973
|
-
color:
|
|
10974
|
-
backgroundColor:
|
|
10936
|
+
borderColor: colors26.DdsColorInteractiveBase,
|
|
10937
|
+
color: colors26.DdsColorNeutralsWhite,
|
|
10938
|
+
backgroundColor: colors26.DdsColorInteractiveBase,
|
|
10975
10939
|
hover: {
|
|
10976
|
-
borderColor:
|
|
10977
|
-
color:
|
|
10978
|
-
backgroundColor:
|
|
10940
|
+
borderColor: colors26.DdsColorInteractiveDark,
|
|
10941
|
+
color: colors26.DdsColorNeutralsWhite,
|
|
10942
|
+
backgroundColor: colors26.DdsColorInteractiveDark
|
|
10979
10943
|
}
|
|
10980
10944
|
},
|
|
10981
10945
|
inactiveIncomplete: {
|
|
10982
|
-
borderColor:
|
|
10983
|
-
color:
|
|
10984
|
-
backgroundColor:
|
|
10946
|
+
borderColor: colors26.DdsColorInteractiveBase,
|
|
10947
|
+
color: colors26.DdsColorInteractiveBase,
|
|
10948
|
+
backgroundColor: colors26.DdsColorNeutralsWhite,
|
|
10985
10949
|
hover: {
|
|
10986
|
-
borderColor:
|
|
10987
|
-
color:
|
|
10988
|
-
backgroundColor:
|
|
10950
|
+
borderColor: colors26.DdsColorInteractiveBase,
|
|
10951
|
+
color: colors26.DdsColorInteractiveBase,
|
|
10952
|
+
backgroundColor: colors26.DdsColorInteractiveLightest
|
|
10989
10953
|
}
|
|
10990
10954
|
},
|
|
10991
10955
|
disabled: {
|
|
10992
|
-
borderColor:
|
|
10993
|
-
color:
|
|
10994
|
-
backgroundColor:
|
|
10956
|
+
borderColor: colors26.DdsColorNeutralsGray5,
|
|
10957
|
+
color: colors26.DdsColorNeutralsGray5,
|
|
10958
|
+
backgroundColor: colors26.DdsColorNeutralsWhite
|
|
10995
10959
|
}
|
|
10996
10960
|
};
|
|
10997
10961
|
var itemText = {
|
|
10998
10962
|
textDecoration: "underline",
|
|
10999
10963
|
activeCompleted: {
|
|
11000
|
-
color:
|
|
10964
|
+
color: colors26.DdsColorInteractiveBase,
|
|
11001
10965
|
textDecorationColor: "transparent",
|
|
11002
10966
|
hover: {
|
|
11003
|
-
color:
|
|
10967
|
+
color: colors26.DdsColorInteractiveBase,
|
|
11004
10968
|
textDecorationColor: "transparent"
|
|
11005
10969
|
}
|
|
11006
10970
|
},
|
|
11007
10971
|
activeIncomplete: {
|
|
11008
|
-
color:
|
|
10972
|
+
color: colors26.DdsColorInteractiveBase,
|
|
11009
10973
|
textDecorationColor: "transparent",
|
|
11010
10974
|
hover: {
|
|
11011
|
-
color:
|
|
10975
|
+
color: colors26.DdsColorInteractiveBase,
|
|
11012
10976
|
textDecorationColor: "transparent"
|
|
11013
10977
|
}
|
|
11014
10978
|
},
|
|
11015
10979
|
inactiveIncomplete: {
|
|
11016
|
-
color:
|
|
11017
|
-
textDecorationColor:
|
|
10980
|
+
color: colors26.DdsColorNeutralsGray7,
|
|
10981
|
+
textDecorationColor: colors26.DdsColorNeutralsGray7,
|
|
11018
10982
|
hover: {
|
|
11019
|
-
color:
|
|
11020
|
-
textDecorationColor:
|
|
10983
|
+
color: colors26.DdsColorInteractiveBase,
|
|
10984
|
+
textDecorationColor: colors26.DdsColorInteractiveBase
|
|
11021
10985
|
}
|
|
11022
10986
|
},
|
|
11023
10987
|
inactiveCompleted: {
|
|
11024
|
-
color:
|
|
11025
|
-
textDecorationColor:
|
|
10988
|
+
color: colors26.DdsColorNeutralsGray7,
|
|
10989
|
+
textDecorationColor: colors26.DdsColorNeutralsGray7,
|
|
11026
10990
|
hover: {
|
|
11027
|
-
color:
|
|
11028
|
-
textDecorationColor:
|
|
10991
|
+
color: colors26.DdsColorInteractiveBase,
|
|
10992
|
+
textDecorationColor: colors26.DdsColorInteractiveBase
|
|
11029
10993
|
}
|
|
11030
10994
|
},
|
|
11031
10995
|
disabled: {
|
|
11032
|
-
color:
|
|
10996
|
+
color: colors26.DdsColorNeutralsGray6,
|
|
11033
10997
|
textDecorationColor: "transparent"
|
|
11034
10998
|
}
|
|
11035
10999
|
};
|
|
@@ -11131,7 +11095,7 @@ var ProgressTrackerItem = (props) => {
|
|
|
11131
11095
|
index = 0,
|
|
11132
11096
|
completed = false,
|
|
11133
11097
|
disabled = false,
|
|
11134
|
-
icon:
|
|
11098
|
+
icon: icon11,
|
|
11135
11099
|
children
|
|
11136
11100
|
} = props;
|
|
11137
11101
|
const { activeStep, handleStepChange } = useProgressTrackerContext();
|
|
@@ -11143,11 +11107,11 @@ var ProgressTrackerItem = (props) => {
|
|
|
11143
11107
|
if (completed) {
|
|
11144
11108
|
return /* @__PURE__ */ jsx240(Icon, { icon: CheckIcon, iconSize: itemNumber2.iconSize });
|
|
11145
11109
|
}
|
|
11146
|
-
if (
|
|
11147
|
-
return /* @__PURE__ */ jsx240(Icon, { icon:
|
|
11110
|
+
if (icon11 !== void 0) {
|
|
11111
|
+
return /* @__PURE__ */ jsx240(Icon, { icon: icon11, iconSize: itemNumber2.iconSize });
|
|
11148
11112
|
}
|
|
11149
11113
|
return index + 1;
|
|
11150
|
-
}, [completed,
|
|
11114
|
+
}, [completed, icon11, index]);
|
|
11151
11115
|
return /* @__PURE__ */ jsx240(ItemWrapper, { "aria-current": active ? "step" : void 0, children: /* @__PURE__ */ jsxs59(
|
|
11152
11116
|
ItemContentWrapper,
|
|
11153
11117
|
{
|
|
@@ -11277,7 +11241,7 @@ import {
|
|
|
11277
11241
|
ddsBaseTokens as ddsBaseTokens53,
|
|
11278
11242
|
ddsReferenceTokens as ddsReferenceTokens7
|
|
11279
11243
|
} from "@norges-domstoler/dds-design-tokens";
|
|
11280
|
-
var { spacing: spacing32, iconSizes: iconSizes2, colors:
|
|
11244
|
+
var { spacing: spacing32, iconSizes: iconSizes2, colors: colors27 } = ddsBaseTokens53;
|
|
11281
11245
|
var { textDefault: textDefault6 } = ddsReferenceTokens7;
|
|
11282
11246
|
var typographyTypes5 = {
|
|
11283
11247
|
small: "bodySans01",
|
|
@@ -11339,8 +11303,8 @@ var clearButton = {
|
|
|
11339
11303
|
};
|
|
11340
11304
|
var suggestionsContainer = {
|
|
11341
11305
|
marginTop: spacing32.SizesDdsSpacingX025,
|
|
11342
|
-
border: `1px solid ${
|
|
11343
|
-
boxShadow: `0 0 0 1px ${
|
|
11306
|
+
border: `1px solid ${colors27.DdsColorInteractiveBase}`,
|
|
11307
|
+
boxShadow: `0 0 0 1px ${colors27.DdsColorInteractiveBase}`
|
|
11344
11308
|
};
|
|
11345
11309
|
var suggestionsHeader = {
|
|
11346
11310
|
paddingLeft: spacing32.SizesDdsSpacingX1
|
|
@@ -11426,7 +11390,7 @@ var SearchSuggestions = forwardRef50((props, ref) => {
|
|
|
11426
11390
|
searchId,
|
|
11427
11391
|
"suggestions-header"
|
|
11428
11392
|
);
|
|
11429
|
-
const [focus
|
|
11393
|
+
const [focus] = useRoveFocus(suggestions == null ? void 0 : suggestions.length, showSuggestions);
|
|
11430
11394
|
const suggestionsToRender = maxSuggestions ? suggestions == null ? void 0 : suggestions.slice(maxSuggestions) : suggestions;
|
|
11431
11395
|
const renderedSuggestions = /* @__PURE__ */ jsx242(SuggestionsList, { role: "listbox", "aria-labelledby": suggestionsHeaderId, children: suggestionsToRender.map((suggestion, index) => {
|
|
11432
11396
|
return /* @__PURE__ */ jsx242("li", { role: "option", children: /* @__PURE__ */ jsx242(
|
|
@@ -11434,7 +11398,6 @@ var SearchSuggestions = forwardRef50((props, ref) => {
|
|
|
11434
11398
|
{
|
|
11435
11399
|
index,
|
|
11436
11400
|
focus: focus === index && showSuggestions,
|
|
11437
|
-
setFocus,
|
|
11438
11401
|
"aria-label": `s\xF8k p\xE5 ${suggestion}`,
|
|
11439
11402
|
onClick: onSuggestionClick,
|
|
11440
11403
|
title: suggestion,
|
|
@@ -11778,13 +11741,13 @@ var selectionControlTypographyProps = {
|
|
|
11778
11741
|
};
|
|
11779
11742
|
|
|
11780
11743
|
// src/components/SelectionControl/SelectionControl.tokens.tsx
|
|
11781
|
-
var { colors:
|
|
11744
|
+
var { colors: colors28, spacing: spacing33, borderRadius: borderRadius8 } = ddsBaseTokens54;
|
|
11782
11745
|
var checkmark = {
|
|
11783
11746
|
checkbox: {
|
|
11784
|
-
borderColor:
|
|
11747
|
+
borderColor: colors28.DdsColorNeutralsWhite
|
|
11785
11748
|
},
|
|
11786
11749
|
radio: {
|
|
11787
|
-
backgroundColor:
|
|
11750
|
+
backgroundColor: colors28.DdsColorNeutralsWhite,
|
|
11788
11751
|
height: spacing33.SizesDdsSpacingX05,
|
|
11789
11752
|
width: spacing33.SizesDdsSpacingX05,
|
|
11790
11753
|
left: `calc(50% - ${spacing33.SizesDdsSpacingX05NumberPx / 2}px)`,
|
|
@@ -11794,20 +11757,20 @@ var checkmark = {
|
|
|
11794
11757
|
var selectionControl = {
|
|
11795
11758
|
base: {
|
|
11796
11759
|
border: "1px solid",
|
|
11797
|
-
borderColor:
|
|
11798
|
-
backgroundColor:
|
|
11760
|
+
borderColor: colors28.DdsColorNeutralsGray5,
|
|
11761
|
+
backgroundColor: colors28.DdsColorNeutralsWhite,
|
|
11799
11762
|
borderRadius: borderRadius8.RadiiDdsBorderRadius1Radius,
|
|
11800
11763
|
height: selectionControlSize,
|
|
11801
11764
|
width: selectionControlSize
|
|
11802
11765
|
},
|
|
11803
11766
|
hover: {
|
|
11804
11767
|
base: {
|
|
11805
|
-
backgroundColor:
|
|
11768
|
+
backgroundColor: colors28.DdsColorInteractiveLightest,
|
|
11806
11769
|
boxShadow: `inset 0 0 0 1px ${hoverInputfield.borderColor}`,
|
|
11807
11770
|
borderColor: hoverInputfield.borderColor
|
|
11808
11771
|
},
|
|
11809
11772
|
danger: {
|
|
11810
|
-
backgroundColor:
|
|
11773
|
+
backgroundColor: colors28.DdsColorDangerLightest,
|
|
11811
11774
|
boxShadow: `inset 0 0 0 1px ${dangerInputfield.borderColor}`,
|
|
11812
11775
|
borderColor: dangerInputfield.borderColor
|
|
11813
11776
|
}
|
|
@@ -11817,39 +11780,39 @@ var selectionControl = {
|
|
|
11817
11780
|
borderColor: dangerInputfield.borderColor
|
|
11818
11781
|
},
|
|
11819
11782
|
disabled: {
|
|
11820
|
-
borderColor:
|
|
11783
|
+
borderColor: colors28.DdsColorNeutralsGray5
|
|
11821
11784
|
},
|
|
11822
11785
|
readOnly: { backgroundColor: "transparent" },
|
|
11823
11786
|
checked: {
|
|
11824
11787
|
base: {
|
|
11825
|
-
borderColor:
|
|
11826
|
-
backgroundColor:
|
|
11788
|
+
borderColor: colors28.DdsColorInteractiveBase,
|
|
11789
|
+
backgroundColor: colors28.DdsColorInteractiveBase
|
|
11827
11790
|
},
|
|
11828
11791
|
hover: {
|
|
11829
|
-
backgroundColor:
|
|
11830
|
-
boxShadow: `inset 0 0 0 1px ${
|
|
11831
|
-
borderColor:
|
|
11792
|
+
backgroundColor: colors28.DdsColorInteractiveDark,
|
|
11793
|
+
boxShadow: `inset 0 0 0 1px ${colors28.DdsColorInteractiveDark}`,
|
|
11794
|
+
borderColor: colors28.DdsColorInteractiveDark
|
|
11832
11795
|
},
|
|
11833
11796
|
disabled: {
|
|
11834
|
-
borderColor:
|
|
11835
|
-
backgroundColor:
|
|
11797
|
+
borderColor: colors28.DdsColorNeutralsGray6,
|
|
11798
|
+
backgroundColor: colors28.DdsColorNeutralsGray6
|
|
11836
11799
|
},
|
|
11837
11800
|
readOnly: {
|
|
11838
|
-
borderColor:
|
|
11839
|
-
backgroundColor:
|
|
11801
|
+
borderColor: colors28.DdsColorNeutralsGray6,
|
|
11802
|
+
backgroundColor: colors28.DdsColorNeutralsGray6
|
|
11840
11803
|
}
|
|
11841
11804
|
},
|
|
11842
11805
|
checkbox: {
|
|
11843
11806
|
indeterminate: {
|
|
11844
|
-
borderColor:
|
|
11845
|
-
backgroundColor:
|
|
11807
|
+
borderColor: colors28.DdsColorInteractiveBase,
|
|
11808
|
+
backgroundColor: colors28.DdsColorInteractiveBase
|
|
11846
11809
|
}
|
|
11847
11810
|
}
|
|
11848
11811
|
};
|
|
11849
11812
|
var container13 = {
|
|
11850
|
-
color:
|
|
11813
|
+
color: colors28.DdsColorNeutralsGray9,
|
|
11851
11814
|
disabled: {
|
|
11852
|
-
color:
|
|
11815
|
+
color: colors28.DdsColorNeutralsGray6
|
|
11853
11816
|
},
|
|
11854
11817
|
withLabel: {
|
|
11855
11818
|
paddingLeft: `${selectionControlSizeNumberPx + spacing33.SizesDdsSpacingX05NumberPx}px`
|
|
@@ -12372,27 +12335,27 @@ import styled76 from "styled-components";
|
|
|
12372
12335
|
|
|
12373
12336
|
// src/components/SkipToContent/SkipToContent.tokens.tsx
|
|
12374
12337
|
import { ddsBaseTokens as ddsBaseTokens55 } from "@norges-domstoler/dds-design-tokens";
|
|
12375
|
-
var { colors:
|
|
12376
|
-
var
|
|
12338
|
+
var { colors: colors29, spacing: spacing34 } = ddsBaseTokens55;
|
|
12339
|
+
var link4 = {
|
|
12377
12340
|
base: {
|
|
12378
|
-
color:
|
|
12341
|
+
color: colors29.DdsColorNeutralsWhite
|
|
12379
12342
|
},
|
|
12380
12343
|
hover: {
|
|
12381
|
-
color:
|
|
12344
|
+
color: colors29.DdsColorNeutralsWhite
|
|
12382
12345
|
}
|
|
12383
12346
|
};
|
|
12384
12347
|
var wrapper5 = {
|
|
12385
|
-
backgroundColor:
|
|
12348
|
+
backgroundColor: colors29.DdsColorPrimaryBase,
|
|
12386
12349
|
padding: spacing34.SizesDdsSpacingX025
|
|
12387
12350
|
};
|
|
12388
12351
|
var skipToContentTokens = {
|
|
12389
|
-
link:
|
|
12352
|
+
link: link4,
|
|
12390
12353
|
wrapper: wrapper5
|
|
12391
12354
|
};
|
|
12392
12355
|
|
|
12393
12356
|
// src/components/SkipToContent/SkipToContent.tsx
|
|
12394
12357
|
import { jsx as jsx249 } from "react/jsx-runtime";
|
|
12395
|
-
var { wrapper: wrapper6, link:
|
|
12358
|
+
var { wrapper: wrapper6, link: link5 } = skipToContentTokens;
|
|
12396
12359
|
var Wrapper5 = styled76.div`
|
|
12397
12360
|
box-sizing: border-box;
|
|
12398
12361
|
position: absolute;
|
|
@@ -12422,7 +12385,7 @@ var Wrapper5 = styled76.div`
|
|
|
12422
12385
|
`;
|
|
12423
12386
|
var Link4 = styled76.a`
|
|
12424
12387
|
text-decoration: none;
|
|
12425
|
-
color: ${
|
|
12388
|
+
color: ${link5.base.color};
|
|
12426
12389
|
${getFontStyling(defaultTypographyType)}
|
|
12427
12390
|
|
|
12428
12391
|
@media (prefers-reduced-motion: no-preference) {
|
|
@@ -12432,7 +12395,7 @@ var Link4 = styled76.a`
|
|
|
12432
12395
|
${focusVisibleOnDark}
|
|
12433
12396
|
}
|
|
12434
12397
|
&:hover {
|
|
12435
|
-
color: ${
|
|
12398
|
+
color: ${link5.base.color};
|
|
12436
12399
|
}
|
|
12437
12400
|
`;
|
|
12438
12401
|
var SkipToContent = forwardRef55(
|
|
@@ -12614,33 +12577,33 @@ function useIsInTableHead() {
|
|
|
12614
12577
|
|
|
12615
12578
|
// src/components/Table/normal/Table.tokens.tsx
|
|
12616
12579
|
import { ddsBaseTokens as ddsBaseTokens57 } from "@norges-domstoler/dds-design-tokens";
|
|
12617
|
-
var { font: font2, colors:
|
|
12580
|
+
var { font: font2, colors: colors30, border: border13, spacing: spacing35, iconSizes: iconSizes3, borderRadius: borderRadius9 } = ddsBaseTokens57;
|
|
12618
12581
|
var row = {
|
|
12619
12582
|
body: {
|
|
12620
12583
|
odd: {
|
|
12621
|
-
backgroundColor:
|
|
12584
|
+
backgroundColor: colors30.DdsColorNeutralsWhite
|
|
12622
12585
|
},
|
|
12623
12586
|
even: {
|
|
12624
|
-
backgroundColor:
|
|
12587
|
+
backgroundColor: colors30.DdsColorNeutralsGray1
|
|
12625
12588
|
},
|
|
12626
|
-
hover: { backgroundColor:
|
|
12589
|
+
hover: { backgroundColor: colors30.DdsColorInteractiveLightest },
|
|
12627
12590
|
selected: {
|
|
12628
|
-
backgroundColor:
|
|
12591
|
+
backgroundColor: colors30.DdsColorInteractiveLightest
|
|
12629
12592
|
},
|
|
12630
12593
|
mode: {
|
|
12631
12594
|
sum: {
|
|
12632
|
-
borderTop: `${border13.BordersDdsBorderStyleLightStrokeWeight} solid ${
|
|
12633
|
-
borderBottom: `${border13.BordersDdsBorderStyleLightStrokeWeight} solid ${
|
|
12634
|
-
backgroundColor:
|
|
12595
|
+
borderTop: `${border13.BordersDdsBorderStyleLightStrokeWeight} solid ${colors30.DdsColorNeutralsGray4}`,
|
|
12596
|
+
borderBottom: `${border13.BordersDdsBorderStyleLightStrokeWeight} solid ${colors30.DdsColorNeutralsGray4}`,
|
|
12597
|
+
backgroundColor: colors30.DdsColorNeutralsWhite
|
|
12635
12598
|
}
|
|
12636
12599
|
},
|
|
12637
12600
|
withDividers: {
|
|
12638
|
-
borderBottom: `1px solid ${
|
|
12601
|
+
borderBottom: `1px solid ${colors30.DdsColorNeutralsGray4}`
|
|
12639
12602
|
}
|
|
12640
12603
|
},
|
|
12641
12604
|
head: {
|
|
12642
12605
|
extraCompact: {
|
|
12643
|
-
backgroundColor:
|
|
12606
|
+
backgroundColor: colors30.DdsColorNeutralsWhite,
|
|
12644
12607
|
fontSize: font2.DdsFontBodySans01FontSize
|
|
12645
12608
|
}
|
|
12646
12609
|
}
|
|
@@ -12658,7 +12621,7 @@ var cell2 = {
|
|
|
12658
12621
|
}
|
|
12659
12622
|
},
|
|
12660
12623
|
head: {
|
|
12661
|
-
backgroundColor:
|
|
12624
|
+
backgroundColor: colors30.DdsColorPrimaryLightest
|
|
12662
12625
|
},
|
|
12663
12626
|
sort: {
|
|
12664
12627
|
gap: spacing35.SizesDdsSpacingX05,
|
|
@@ -13223,7 +13186,7 @@ Tabs.displayName = "Tabs";
|
|
|
13223
13186
|
// src/components/Tabs/Tab.tsx
|
|
13224
13187
|
import {
|
|
13225
13188
|
forwardRef as forwardRef67,
|
|
13226
|
-
useCallback as
|
|
13189
|
+
useCallback as useCallback8,
|
|
13227
13190
|
useEffect as useEffect28,
|
|
13228
13191
|
useRef as useRef32
|
|
13229
13192
|
} from "react";
|
|
@@ -13231,14 +13194,14 @@ import styled89, { css as css39 } from "styled-components";
|
|
|
13231
13194
|
|
|
13232
13195
|
// src/components/Tabs/Tabs.tokens.tsx
|
|
13233
13196
|
import { ddsBaseTokens as ddsBaseTokens58 } from "@norges-domstoler/dds-design-tokens";
|
|
13234
|
-
var { border: border14, spacing: spacing36, colors:
|
|
13197
|
+
var { border: border14, spacing: spacing36, colors: colors31 } = ddsBaseTokens58;
|
|
13235
13198
|
var tabList = {
|
|
13236
13199
|
borderBottom: `${border14.BordersDdsBorderStyleLightStrokeWeight} solid ${border14.BordersDdsBorderStyleLightStroke}`
|
|
13237
13200
|
};
|
|
13238
13201
|
var tab = {
|
|
13239
13202
|
base: {
|
|
13240
13203
|
borderBottom: `${border14.BordersDdsBorderStyleLightStrokeWeight} solid transparent`,
|
|
13241
|
-
color:
|
|
13204
|
+
color: colors31.DdsColorNeutralsGray7,
|
|
13242
13205
|
padding: spacing36.SizesDdsSpacingX05
|
|
13243
13206
|
},
|
|
13244
13207
|
row: {
|
|
@@ -13248,15 +13211,15 @@ var tab = {
|
|
|
13248
13211
|
gap: spacing36.SizesDdsSpacingX025
|
|
13249
13212
|
},
|
|
13250
13213
|
active: {
|
|
13251
|
-
backgroundColor:
|
|
13252
|
-
color:
|
|
13253
|
-
boxShadow: `inset 0 -2px 0 0 ${
|
|
13254
|
-
borderColor:
|
|
13214
|
+
backgroundColor: colors31.DdsColorInteractiveLightest,
|
|
13215
|
+
color: colors31.DdsColorInteractiveDarkest,
|
|
13216
|
+
boxShadow: `inset 0 -2px 0 0 ${colors31.DdsColorInteractiveDarker}`,
|
|
13217
|
+
borderColor: colors31.DdsColorInteractiveDarker
|
|
13255
13218
|
},
|
|
13256
13219
|
hover: {
|
|
13257
|
-
color:
|
|
13258
|
-
boxShadow: `inset 0 -2px 0 0 ${
|
|
13259
|
-
borderColor:
|
|
13220
|
+
color: colors31.DdsColorInteractiveDarkest,
|
|
13221
|
+
boxShadow: `inset 0 -2px 0 0 ${colors31.DdsColorInteractiveDarker}`,
|
|
13222
|
+
borderColor: colors31.DdsColorInteractiveDarker
|
|
13260
13223
|
}
|
|
13261
13224
|
};
|
|
13262
13225
|
var panel = {
|
|
@@ -13360,7 +13323,7 @@ var Button2 = styled89.button`
|
|
|
13360
13323
|
var Tab = forwardRef67((props, ref) => {
|
|
13361
13324
|
const {
|
|
13362
13325
|
active = false,
|
|
13363
|
-
icon:
|
|
13326
|
+
icon: icon11,
|
|
13364
13327
|
children,
|
|
13365
13328
|
focus,
|
|
13366
13329
|
setFocus,
|
|
@@ -13376,20 +13339,14 @@ var Tab = forwardRef67((props, ref) => {
|
|
|
13376
13339
|
useSetTabWidth(index, width);
|
|
13377
13340
|
const itemRef = useRef32(null);
|
|
13378
13341
|
const combinedRef = useCombinedRef(ref, itemRef);
|
|
13379
|
-
const {
|
|
13342
|
+
const { tabContentDirection } = useTabsContext();
|
|
13380
13343
|
useEffect28(() => {
|
|
13381
13344
|
var _a;
|
|
13382
13345
|
if (focus) {
|
|
13383
13346
|
(_a = itemRef.current) == null ? void 0 : _a.focus();
|
|
13384
|
-
setHasTabFocus(true);
|
|
13385
13347
|
}
|
|
13386
13348
|
}, [focus]);
|
|
13387
|
-
|
|
13388
|
-
var _a;
|
|
13389
|
-
setHasTabFocus(false);
|
|
13390
|
-
(_a = tabPanelsRef == null ? void 0 : tabPanelsRef.current) == null ? void 0 : _a.focus();
|
|
13391
|
-
});
|
|
13392
|
-
const handleSelect = useCallback9(() => {
|
|
13349
|
+
const handleSelect = useCallback8(() => {
|
|
13393
13350
|
if (setFocus && index) {
|
|
13394
13351
|
setFocus(index);
|
|
13395
13352
|
}
|
|
@@ -13415,7 +13372,7 @@ var Tab = forwardRef67((props, ref) => {
|
|
|
13415
13372
|
onKeyDown: handleOnKeyDown,
|
|
13416
13373
|
tabIndex: focus ? 0 : -1,
|
|
13417
13374
|
children: [
|
|
13418
|
-
|
|
13375
|
+
icon11 && /* @__PURE__ */ jsx263(Icon, { icon: icon11, iconSize: "inherit" }),
|
|
13419
13376
|
/* @__PURE__ */ jsx263("span", { children })
|
|
13420
13377
|
]
|
|
13421
13378
|
}
|
|
@@ -13468,12 +13425,11 @@ var TabList = forwardRef68(
|
|
|
13468
13425
|
handleTabChange,
|
|
13469
13426
|
tabListRef,
|
|
13470
13427
|
hasTabFocus,
|
|
13471
|
-
tabPanelsRef,
|
|
13472
13428
|
setHasTabFocus
|
|
13473
13429
|
} = useTabsContext();
|
|
13474
13430
|
const uniqueId = id != null ? id : `${tabsId}-tablist`;
|
|
13475
13431
|
const childrenArray = Children7.toArray(children).length;
|
|
13476
|
-
const [focus, setFocus] = useRoveFocus(childrenArray,
|
|
13432
|
+
const [focus, setFocus] = useRoveFocus(childrenArray, hasTabFocus, "row");
|
|
13477
13433
|
const combinedRef = useCombinedRef(ref, tabListRef);
|
|
13478
13434
|
const tabListChildren = Children7.map(children, (child, index) => {
|
|
13479
13435
|
return isValidElement8(child) && cloneElement8(child, {
|
|
@@ -13487,28 +13443,34 @@ var TabList = forwardRef68(
|
|
|
13487
13443
|
});
|
|
13488
13444
|
});
|
|
13489
13445
|
const [widths, setWidths] = useState30([]);
|
|
13490
|
-
useOnKeyDown("Tab", () => {
|
|
13491
|
-
var _a;
|
|
13492
|
-
setHasTabFocus(false);
|
|
13493
|
-
(_a = tabPanelsRef == null ? void 0 : tabPanelsRef.current) == null ? void 0 : _a.focus();
|
|
13494
|
-
});
|
|
13495
|
-
useOnClickOutside((tabListRef == null ? void 0 : tabListRef.current) || null, () => {
|
|
13496
|
-
setHasTabFocus(false);
|
|
13497
|
-
});
|
|
13498
13446
|
const handleOnFocus = (event) => {
|
|
13499
13447
|
setHasTabFocus(true);
|
|
13500
13448
|
onFocus && onFocus(event);
|
|
13501
13449
|
};
|
|
13502
|
-
const
|
|
13503
|
-
|
|
13504
|
-
|
|
13505
|
-
|
|
13506
|
-
|
|
13507
|
-
|
|
13508
|
-
|
|
13509
|
-
|
|
13450
|
+
const handleOnBlur = (event) => {
|
|
13451
|
+
var _a;
|
|
13452
|
+
if ((tabListRef == null ? void 0 : tabListRef.current) === event.relatedTarget) {
|
|
13453
|
+
setFocus(-1);
|
|
13454
|
+
}
|
|
13455
|
+
if (!((_a = tabListRef == null ? void 0 : tabListRef.current) == null ? void 0 : _a.contains(event.relatedTarget))) {
|
|
13456
|
+
setHasTabFocus(false);
|
|
13457
|
+
}
|
|
13510
13458
|
};
|
|
13511
|
-
return /* @__PURE__ */ jsx264(TabWidthContextProvider, { onChangeWidths: setWidths, children: /* @__PURE__ */ jsx264(
|
|
13459
|
+
return /* @__PURE__ */ jsx264(TabWidthContextProvider, { onChangeWidths: setWidths, children: /* @__PURE__ */ jsx264(
|
|
13460
|
+
TabRow,
|
|
13461
|
+
{
|
|
13462
|
+
...rest,
|
|
13463
|
+
ref: combinedRef,
|
|
13464
|
+
role: "tablist",
|
|
13465
|
+
"aria-label": "Bruk venste og h\xF8yre piltast for \xE5 bla",
|
|
13466
|
+
id: uniqueId,
|
|
13467
|
+
tabIndex: 0,
|
|
13468
|
+
onFocus: handleOnFocus,
|
|
13469
|
+
onBlur: handleOnBlur,
|
|
13470
|
+
$gridTemplateColumns: widths.join(" "),
|
|
13471
|
+
children: tabListChildren
|
|
13472
|
+
}
|
|
13473
|
+
) });
|
|
13512
13474
|
}
|
|
13513
13475
|
);
|
|
13514
13476
|
TabList.displayName = "TabList";
|
|
@@ -13580,7 +13542,7 @@ import styled92, { css as css42 } from "styled-components";
|
|
|
13580
13542
|
|
|
13581
13543
|
// src/components/Tag/Tag.tokens.tsx
|
|
13582
13544
|
import { ddsBaseTokens as ddsBaseTokens59 } from "@norges-domstoler/dds-design-tokens";
|
|
13583
|
-
var { colors:
|
|
13545
|
+
var { colors: colors32, borderRadius: borderRadius10, spacing: spacing37 } = ddsBaseTokens59;
|
|
13584
13546
|
var typographyType5 = "bodySans01";
|
|
13585
13547
|
var wrapper7 = {
|
|
13586
13548
|
border: "1px solid",
|
|
@@ -13600,13 +13562,13 @@ var wrapper7 = {
|
|
|
13600
13562
|
default: {
|
|
13601
13563
|
icon: void 0,
|
|
13602
13564
|
base: {
|
|
13603
|
-
backgroundColor:
|
|
13604
|
-
borderColor:
|
|
13565
|
+
backgroundColor: colors32.DdsColorNeutralsGray1,
|
|
13566
|
+
borderColor: colors32.DdsColorNeutralsGray3,
|
|
13605
13567
|
icon: void 0
|
|
13606
13568
|
},
|
|
13607
13569
|
strong: {
|
|
13608
|
-
backgroundColor:
|
|
13609
|
-
borderColor:
|
|
13570
|
+
backgroundColor: colors32.DdsColorNeutralsGray3,
|
|
13571
|
+
borderColor: colors32.DdsColorNeutralsGray3,
|
|
13610
13572
|
icon: void 0
|
|
13611
13573
|
}
|
|
13612
13574
|
},
|
|
@@ -13615,14 +13577,14 @@ var wrapper7 = {
|
|
|
13615
13577
|
base: {
|
|
13616
13578
|
...localMessageTokens.container.purpose.success,
|
|
13617
13579
|
icon: {
|
|
13618
|
-
color:
|
|
13580
|
+
color: colors32.DdsColorSuccessDarkest
|
|
13619
13581
|
}
|
|
13620
13582
|
},
|
|
13621
13583
|
strong: {
|
|
13622
|
-
backgroundColor:
|
|
13623
|
-
borderColor:
|
|
13584
|
+
backgroundColor: colors32.DdsColorSuccessLight,
|
|
13585
|
+
borderColor: colors32.DdsColorSuccessLight,
|
|
13624
13586
|
icon: {
|
|
13625
|
-
color:
|
|
13587
|
+
color: colors32.DdsColorNeutralsGray9
|
|
13626
13588
|
}
|
|
13627
13589
|
}
|
|
13628
13590
|
},
|
|
@@ -13631,14 +13593,14 @@ var wrapper7 = {
|
|
|
13631
13593
|
base: {
|
|
13632
13594
|
...localMessageTokens.container.purpose.danger,
|
|
13633
13595
|
icon: {
|
|
13634
|
-
color:
|
|
13596
|
+
color: colors32.DdsColorDangerDarkest
|
|
13635
13597
|
}
|
|
13636
13598
|
},
|
|
13637
13599
|
strong: {
|
|
13638
|
-
backgroundColor:
|
|
13639
|
-
borderColor:
|
|
13600
|
+
backgroundColor: colors32.DdsColorDangerLight,
|
|
13601
|
+
borderColor: colors32.DdsColorDangerLight,
|
|
13640
13602
|
icon: {
|
|
13641
|
-
color:
|
|
13603
|
+
color: colors32.DdsColorNeutralsGray9
|
|
13642
13604
|
}
|
|
13643
13605
|
}
|
|
13644
13606
|
},
|
|
@@ -13647,14 +13609,14 @@ var wrapper7 = {
|
|
|
13647
13609
|
base: {
|
|
13648
13610
|
...localMessageTokens.container.purpose.warning,
|
|
13649
13611
|
icon: {
|
|
13650
|
-
color:
|
|
13612
|
+
color: colors32.DdsColorWarningDarkest
|
|
13651
13613
|
}
|
|
13652
13614
|
},
|
|
13653
13615
|
strong: {
|
|
13654
|
-
backgroundColor:
|
|
13655
|
-
borderColor:
|
|
13616
|
+
backgroundColor: colors32.DdsColorWarningLight,
|
|
13617
|
+
borderColor: colors32.DdsColorWarningLight,
|
|
13656
13618
|
icon: {
|
|
13657
|
-
color:
|
|
13619
|
+
color: colors32.DdsColorNeutralsGray9
|
|
13658
13620
|
}
|
|
13659
13621
|
}
|
|
13660
13622
|
},
|
|
@@ -13663,14 +13625,14 @@ var wrapper7 = {
|
|
|
13663
13625
|
base: {
|
|
13664
13626
|
...localMessageTokens.container.purpose.info,
|
|
13665
13627
|
icon: {
|
|
13666
|
-
color:
|
|
13628
|
+
color: colors32.DdsColorInfoDarkest
|
|
13667
13629
|
}
|
|
13668
13630
|
},
|
|
13669
13631
|
strong: {
|
|
13670
|
-
backgroundColor:
|
|
13671
|
-
borderColor:
|
|
13632
|
+
backgroundColor: colors32.DdsColorInfoLight,
|
|
13633
|
+
borderColor: colors32.DdsColorInfoLight,
|
|
13672
13634
|
icon: {
|
|
13673
|
-
color:
|
|
13635
|
+
color: colors32.DdsColorNeutralsGray9
|
|
13674
13636
|
}
|
|
13675
13637
|
}
|
|
13676
13638
|
}
|
|
@@ -13696,7 +13658,7 @@ var Wrapper7 = styled92(TextOverflowEllipsisWrapper)`
|
|
|
13696
13658
|
border-color: ${wrapper8.purpose[$purpose][$strong ? "strong" : "base"].borderColor};
|
|
13697
13659
|
`}
|
|
13698
13660
|
`;
|
|
13699
|
-
var
|
|
13661
|
+
var StyledIcon4 = styled92(Icon)`
|
|
13700
13662
|
color: ${({ $purpose, $strong }) => {
|
|
13701
13663
|
var _a;
|
|
13702
13664
|
return (_a = wrapper8.purpose[$purpose][$strong ? "strong" : "base"].icon) == null ? void 0 : _a.color;
|
|
@@ -13714,7 +13676,7 @@ var Tag = forwardRef71((props, ref) => {
|
|
|
13714
13676
|
withIcon,
|
|
13715
13677
|
...rest
|
|
13716
13678
|
} = props;
|
|
13717
|
-
const
|
|
13679
|
+
const icon11 = tagTokens.wrapper.purpose[purpose].icon;
|
|
13718
13680
|
return /* @__PURE__ */ jsxs71(
|
|
13719
13681
|
Wrapper7,
|
|
13720
13682
|
{
|
|
@@ -13722,14 +13684,14 @@ var Tag = forwardRef71((props, ref) => {
|
|
|
13722
13684
|
ref,
|
|
13723
13685
|
$purpose: purpose,
|
|
13724
13686
|
$strong: strong,
|
|
13725
|
-
$withIcon: Boolean(withIcon &&
|
|
13687
|
+
$withIcon: Boolean(withIcon && icon11),
|
|
13726
13688
|
children: [
|
|
13727
|
-
withIcon &&
|
|
13728
|
-
|
|
13689
|
+
withIcon && icon11 && /* @__PURE__ */ jsx267(
|
|
13690
|
+
StyledIcon4,
|
|
13729
13691
|
{
|
|
13730
13692
|
$purpose: purpose,
|
|
13731
13693
|
$strong: strong,
|
|
13732
|
-
icon:
|
|
13694
|
+
icon: icon11,
|
|
13733
13695
|
iconSize: tagTokens.wrapper.icon.size
|
|
13734
13696
|
}
|
|
13735
13697
|
),
|
|
@@ -13784,7 +13746,7 @@ import styled94, { css as css43 } from "styled-components";
|
|
|
13784
13746
|
|
|
13785
13747
|
// src/components/TextInput/TextInput.tokens.tsx
|
|
13786
13748
|
import { ddsBaseTokens as ddsBaseTokens60 } from "@norges-domstoler/dds-design-tokens";
|
|
13787
|
-
var { colors:
|
|
13749
|
+
var { colors: colors33, spacing: spacing38, iconSizes: iconSizes4 } = ddsBaseTokens60;
|
|
13788
13750
|
var input5 = {
|
|
13789
13751
|
withIcon: {
|
|
13790
13752
|
medium: {
|
|
@@ -13800,11 +13762,11 @@ var input5 = {
|
|
|
13800
13762
|
};
|
|
13801
13763
|
var affix = {
|
|
13802
13764
|
border: {
|
|
13803
|
-
color:
|
|
13765
|
+
color: colors33.DdsColorNeutralsGray5
|
|
13804
13766
|
}
|
|
13805
13767
|
};
|
|
13806
|
-
var
|
|
13807
|
-
color:
|
|
13768
|
+
var icon9 = {
|
|
13769
|
+
color: colors33.DdsColorNeutralsGray9,
|
|
13808
13770
|
sizes: {
|
|
13809
13771
|
medium: {
|
|
13810
13772
|
top: spacing38.SizesDdsSpacingX075,
|
|
@@ -13822,22 +13784,22 @@ var icon10 = {
|
|
|
13822
13784
|
};
|
|
13823
13785
|
var textInputTokens = {
|
|
13824
13786
|
input: input5,
|
|
13825
|
-
icon:
|
|
13787
|
+
icon: icon9,
|
|
13826
13788
|
affix
|
|
13827
13789
|
};
|
|
13828
13790
|
|
|
13829
13791
|
// src/components/TextInput/TextInput.styles.tsx
|
|
13830
13792
|
var { iconSizes: iconSizes5 } = ddsBaseTokens61;
|
|
13831
|
-
var { input: input6, icon:
|
|
13793
|
+
var { input: input6, icon: icon10 } = textInputTokens;
|
|
13832
13794
|
var MessageContainer2 = styled94.div`
|
|
13833
13795
|
display: flex;
|
|
13834
13796
|
justify-content: space-between;
|
|
13835
13797
|
`;
|
|
13836
|
-
var
|
|
13798
|
+
var StyledIcon5 = styled94(Icon)`
|
|
13837
13799
|
position: absolute;
|
|
13838
|
-
color: ${
|
|
13800
|
+
color: ${icon10.color};
|
|
13839
13801
|
${({ $size, iconSize }) => css43`
|
|
13840
|
-
left: ${
|
|
13802
|
+
left: ${icon10.sizes[$size].left};
|
|
13841
13803
|
${iconSize === "small" ? css43`
|
|
13842
13804
|
top: ${`calc(50% - ${iconSizes5.DdsIconsizeSmallNumberPx / 2}px)`};
|
|
13843
13805
|
` : css43`
|
|
@@ -13919,7 +13881,7 @@ var TextInput2 = forwardRef72(
|
|
|
13919
13881
|
defaultValue,
|
|
13920
13882
|
"aria-required": ariaRequired,
|
|
13921
13883
|
"aria-describedby": ariaDescribedby,
|
|
13922
|
-
icon:
|
|
13884
|
+
icon: icon11,
|
|
13923
13885
|
prefix: prefix2,
|
|
13924
13886
|
suffix,
|
|
13925
13887
|
...rest
|
|
@@ -13951,7 +13913,7 @@ var TextInput2 = forwardRef72(
|
|
|
13951
13913
|
const hasTip = !!tip;
|
|
13952
13914
|
const hasLabel = !!label3;
|
|
13953
13915
|
const hasMessage = hasErrorMessage || hasTip || !!maxLength;
|
|
13954
|
-
const hasIcon = !!
|
|
13916
|
+
const hasIcon = !!icon11;
|
|
13955
13917
|
const hasAffix = !!(prefix2 != null ? prefix2 : suffix);
|
|
13956
13918
|
const characterCounterId = derivativeIdGenerator(
|
|
13957
13919
|
uniqueId,
|
|
@@ -13989,9 +13951,9 @@ var TextInput2 = forwardRef72(
|
|
|
13989
13951
|
if (hasIcon) {
|
|
13990
13952
|
extendedInput = /* @__PURE__ */ jsxs73(InputContainer, { children: [
|
|
13991
13953
|
/* @__PURE__ */ jsx268(
|
|
13992
|
-
|
|
13954
|
+
StyledIcon5,
|
|
13993
13955
|
{
|
|
13994
|
-
icon:
|
|
13956
|
+
icon: icon11,
|
|
13995
13957
|
iconSize: getFormInputIconSize(componentSize),
|
|
13996
13958
|
$size: componentSize
|
|
13997
13959
|
}
|
|
@@ -14067,7 +14029,7 @@ var useToggleBarContext = () => useContext13(ToggleBarContext);
|
|
|
14067
14029
|
|
|
14068
14030
|
// src/components/ToggleBar/ToggleBar.tokens.tsx
|
|
14069
14031
|
import { ddsBaseTokens as ddsBaseTokens62 } from "@norges-domstoler/dds-design-tokens";
|
|
14070
|
-
var { colors:
|
|
14032
|
+
var { colors: colors34, spacing: spacing39, border: border15, borderRadius: borderRadius11, fontPackages: fontPackages6 } = ddsBaseTokens62;
|
|
14071
14033
|
var typographyTypes6 = {
|
|
14072
14034
|
large: "bodySans04",
|
|
14073
14035
|
medium: "bodySans02",
|
|
@@ -14095,17 +14057,17 @@ var outerContainer7 = {
|
|
|
14095
14057
|
};
|
|
14096
14058
|
var label = {
|
|
14097
14059
|
base: {
|
|
14098
|
-
borderColor:
|
|
14099
|
-
borderRight: `${border15.BordersDdsBorderStyleLightStrokeWeight} solid ${
|
|
14100
|
-
borderTop: `${border15.BordersDdsBorderStyleLightStrokeWeight} solid ${
|
|
14101
|
-
borderBottom: `${border15.BordersDdsBorderStyleLightStrokeWeight} solid ${
|
|
14060
|
+
borderColor: colors34.DdsColorNeutralsGray5,
|
|
14061
|
+
borderRight: `${border15.BordersDdsBorderStyleLightStrokeWeight} solid ${colors34.DdsColorNeutralsGray5}`,
|
|
14062
|
+
borderTop: `${border15.BordersDdsBorderStyleLightStrokeWeight} solid ${colors34.DdsColorNeutralsGray5}`,
|
|
14063
|
+
borderBottom: `${border15.BordersDdsBorderStyleLightStrokeWeight} solid ${colors34.DdsColorNeutralsGray5}`
|
|
14102
14064
|
},
|
|
14103
14065
|
hover: {
|
|
14104
|
-
color:
|
|
14105
|
-
borderColor:
|
|
14066
|
+
color: colors34.DdsColorInteractiveDark,
|
|
14067
|
+
borderColor: colors34.DdsColorInteractiveDark
|
|
14106
14068
|
},
|
|
14107
14069
|
firstChild: {
|
|
14108
|
-
borderLeft: `${border15.BordersDdsBorderStyleLightStrokeWeight} solid ${
|
|
14070
|
+
borderLeft: `${border15.BordersDdsBorderStyleLightStrokeWeight} solid ${colors34.DdsColorNeutralsGray5}`,
|
|
14109
14071
|
borderTopLeftRadius: borderRadius11.RadiiDdsBorderRadius1Radius,
|
|
14110
14072
|
borderBottomLeftRadius: borderRadius11.RadiiDdsBorderRadius1Radius
|
|
14111
14073
|
},
|
|
@@ -14115,12 +14077,12 @@ var label = {
|
|
|
14115
14077
|
}
|
|
14116
14078
|
};
|
|
14117
14079
|
var content7 = {
|
|
14118
|
-
base: { backgroundColor:
|
|
14080
|
+
base: { backgroundColor: colors34.DdsColorNeutralsGray1 },
|
|
14119
14081
|
active: {
|
|
14120
|
-
color:
|
|
14121
|
-
borderColor:
|
|
14122
|
-
backgroundColor:
|
|
14123
|
-
boxShadow: `inset 0 0 0 1px ${
|
|
14082
|
+
color: colors34.DdsColorInteractiveDarkest,
|
|
14083
|
+
borderColor: colors34.DdsColorInteractiveDarker,
|
|
14084
|
+
backgroundColor: colors34.DdsColorInteractiveLightest,
|
|
14085
|
+
boxShadow: `inset 0 0 0 1px ${colors34.DdsColorInteractiveDarker}`
|
|
14124
14086
|
},
|
|
14125
14087
|
size: {
|
|
14126
14088
|
tiny: {
|
|
@@ -14336,7 +14298,7 @@ var ToggleRadio = forwardRef73(
|
|
|
14336
14298
|
checked,
|
|
14337
14299
|
"aria-label": ariaLabel,
|
|
14338
14300
|
"aria-labelledby": ariaLabelledBy,
|
|
14339
|
-
icon:
|
|
14301
|
+
icon: icon11,
|
|
14340
14302
|
label: label3,
|
|
14341
14303
|
htmlProps,
|
|
14342
14304
|
className,
|
|
@@ -14365,8 +14327,8 @@ var ToggleRadio = forwardRef73(
|
|
|
14365
14327
|
"aria-labelledby": ariaLabelledBy
|
|
14366
14328
|
}
|
|
14367
14329
|
),
|
|
14368
|
-
/* @__PURE__ */ jsxs75(Content2, { $size: group4.size, $justIcon: !!
|
|
14369
|
-
|
|
14330
|
+
/* @__PURE__ */ jsxs75(Content2, { $size: group4.size, $justIcon: !!icon11 && !label3, children: [
|
|
14331
|
+
icon11 && /* @__PURE__ */ jsx270(Icon, { icon: icon11, iconSize: "inherit" }),
|
|
14370
14332
|
label3 && /* @__PURE__ */ jsx270("span", { children: label3 })
|
|
14371
14333
|
] })
|
|
14372
14334
|
] });
|
|
@@ -14380,21 +14342,21 @@ import styled98, { css as css47 } from "styled-components";
|
|
|
14380
14342
|
|
|
14381
14343
|
// src/components/ToggleButton/ToggleButton.tokens.tsx
|
|
14382
14344
|
import { ddsBaseTokens as ddsBaseTokens63 } from "@norges-domstoler/dds-design-tokens";
|
|
14383
|
-
var { colors:
|
|
14345
|
+
var { colors: colors35, spacing: spacing40 } = ddsBaseTokens63;
|
|
14384
14346
|
var { button: button2 } = buttonTokens;
|
|
14385
14347
|
var { selectionControl: selectionControl3 } = selectionControlTokens;
|
|
14386
14348
|
var typographyType6 = typographyTypes.small;
|
|
14387
14349
|
var toggleButton = {
|
|
14388
14350
|
border: button2.base.border,
|
|
14389
|
-
backgroundColor:
|
|
14390
|
-
color:
|
|
14351
|
+
backgroundColor: colors35.DdsColorNeutralsWhite,
|
|
14352
|
+
color: colors35.DdsColorNeutralsGray7,
|
|
14391
14353
|
gap: spacing40.SizesDdsSpacingX05,
|
|
14392
14354
|
borderRadius: button2.appearances.rounded.base.borderRadius,
|
|
14393
14355
|
padding: button2.sizes.small.text.padding,
|
|
14394
14356
|
hover: selectionControl3.hover.base,
|
|
14395
14357
|
checked: {
|
|
14396
14358
|
...selectionControl3.checked.base,
|
|
14397
|
-
color:
|
|
14359
|
+
color: colors35.DdsColorNeutralsWhite,
|
|
14398
14360
|
hover: selectionControl3.checked.hover
|
|
14399
14361
|
}
|
|
14400
14362
|
};
|
|
@@ -14466,7 +14428,7 @@ var Container16 = styled98.label`
|
|
|
14466
14428
|
}
|
|
14467
14429
|
`;
|
|
14468
14430
|
var ToggleButton = forwardRef74(
|
|
14469
|
-
({ id, label: label3, icon:
|
|
14431
|
+
({ id, label: label3, icon: icon11, className, htmlProps, ...rest }, ref) => {
|
|
14470
14432
|
const generatedId = useId26();
|
|
14471
14433
|
const uniqueId = id != null ? id : `${generatedId}-toggleButton`;
|
|
14472
14434
|
return /* @__PURE__ */ jsxs76(Container16, { htmlFor: uniqueId, children: [
|
|
@@ -14478,8 +14440,8 @@ var ToggleButton = forwardRef74(
|
|
|
14478
14440
|
type: "checkbox"
|
|
14479
14441
|
}
|
|
14480
14442
|
),
|
|
14481
|
-
/* @__PURE__ */ jsxs76(Content3, { $hasIcon: !!
|
|
14482
|
-
|
|
14443
|
+
/* @__PURE__ */ jsxs76(Content3, { $hasIcon: !!icon11, children: [
|
|
14444
|
+
icon11 && /* @__PURE__ */ jsx271(Icon, { icon: icon11, iconSize: "inherit" }),
|
|
14483
14445
|
" ",
|
|
14484
14446
|
label3
|
|
14485
14447
|
] })
|