@norges-domstoler/dds-components 13.10.1 → 13.10.2
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 +78 -78
- package/dist/index.d.ts +78 -78
- package/dist/index.js +576 -467
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +576 -467
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -8
package/dist/index.mjs
CHANGED
|
@@ -294,7 +294,9 @@ var fontPackage = (small) => {
|
|
|
294
294
|
}
|
|
295
295
|
return navTokens2.logoAndVersion.logo;
|
|
296
296
|
};
|
|
297
|
-
var NavigationLogo = styled3.a
|
|
297
|
+
var NavigationLogo = styled3.a.withConfig({
|
|
298
|
+
shouldForwardProp: (prop) => prop !== "small"
|
|
299
|
+
})`
|
|
298
300
|
font-size: ${({ small }) => fontPackage(small).fontSize};
|
|
299
301
|
font-style: ${({ small }) => fontPackage(small).fontStyle};
|
|
300
302
|
font-family: ${({ small }) => fontPackage(small).fontFamily};
|
|
@@ -662,11 +664,11 @@ import {
|
|
|
662
664
|
import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
663
665
|
var StyledSpinner = styled4.svg`
|
|
664
666
|
display: block;
|
|
665
|
-
width: ${({ size }) => size};
|
|
666
|
-
height: ${({ size }) => size};
|
|
667
|
+
width: ${({ $size }) => $size};
|
|
668
|
+
height: ${({ $size }) => $size};
|
|
667
669
|
stroke-dasharray: 90, 150;
|
|
668
670
|
animation: rotate 1.5s linear infinite;
|
|
669
|
-
animation-delay: ${({ outerAnimationDelay }) => outerAnimationDelay}ms;
|
|
671
|
+
animation-delay: ${({ $outerAnimationDelay }) => $outerAnimationDelay}ms;
|
|
670
672
|
|
|
671
673
|
@media (prefers-reduced-motion: no-preference) {
|
|
672
674
|
animation: rotate 2s linear infinite;
|
|
@@ -679,12 +681,12 @@ var StyledSpinner = styled4.svg`
|
|
|
679
681
|
}
|
|
680
682
|
`;
|
|
681
683
|
var Circle = styled4.circle`
|
|
682
|
-
stroke: ${({ color }) => color && getTextColor(color)};
|
|
684
|
+
stroke: ${({ $color }) => $color && getTextColor($color)};
|
|
683
685
|
stroke-linecap: round;
|
|
684
686
|
|
|
685
687
|
@media (prefers-reduced-motion: no-preference) {
|
|
686
688
|
animation: dash 1.5s ease-in-out infinite;
|
|
687
|
-
animation-delay: ${({ innerAnimationDelay }) => innerAnimationDelay}ms;
|
|
689
|
+
animation-delay: ${({ $innerAnimationDelay }) => $innerAnimationDelay}ms;
|
|
688
690
|
|
|
689
691
|
@keyframes dash {
|
|
690
692
|
0% {
|
|
@@ -719,12 +721,8 @@ function Spinner(props) {
|
|
|
719
721
|
const uniqueId = `${generatedId}-spinnerTitle`;
|
|
720
722
|
const spinnerProps = {
|
|
721
723
|
...getBaseHTMLProps2(id, className, htmlProps, rest),
|
|
722
|
-
outerAnimationDelay,
|
|
723
|
-
size
|
|
724
|
-
};
|
|
725
|
-
const circleProps = {
|
|
726
|
-
innerAnimationDelay,
|
|
727
|
-
color
|
|
724
|
+
$outerAnimationDelay: outerAnimationDelay,
|
|
725
|
+
$size: size
|
|
728
726
|
};
|
|
729
727
|
return /* @__PURE__ */ jsxs2(
|
|
730
728
|
StyledSpinner,
|
|
@@ -738,7 +736,8 @@ function Spinner(props) {
|
|
|
738
736
|
/* @__PURE__ */ jsx5(
|
|
739
737
|
Circle,
|
|
740
738
|
{
|
|
741
|
-
|
|
739
|
+
$innerAnimationDelay: innerAnimationDelay,
|
|
740
|
+
$color: color,
|
|
742
741
|
cx: "25",
|
|
743
742
|
cy: "25",
|
|
744
743
|
r: "20",
|
|
@@ -811,7 +810,21 @@ var getAppearanceAndPurposeStyling = (appearance, purpose) => {
|
|
|
811
810
|
`;
|
|
812
811
|
}
|
|
813
812
|
};
|
|
814
|
-
var ButtonWrapper = styled5.button
|
|
813
|
+
var ButtonWrapper = styled5.button.withConfig({
|
|
814
|
+
shouldForwardProp: (prop) => {
|
|
815
|
+
const styleOnlyProps = [
|
|
816
|
+
"appearance",
|
|
817
|
+
"purpose",
|
|
818
|
+
"size",
|
|
819
|
+
"fullWidth",
|
|
820
|
+
"hasIcon",
|
|
821
|
+
"hasLabel",
|
|
822
|
+
"isLoading",
|
|
823
|
+
"iconPosition"
|
|
824
|
+
];
|
|
825
|
+
return !styleOnlyProps.some((styleProp) => styleProp === prop);
|
|
826
|
+
}
|
|
827
|
+
})`
|
|
815
828
|
${normalizeButton}
|
|
816
829
|
border: ${base.border};
|
|
817
830
|
user-select: text;
|
|
@@ -866,10 +879,10 @@ var ButtonWrapper = styled5.button`
|
|
|
866
879
|
${({ fullWidth, hasIcon, hasLabel, isLoading, iconPosition }) => fullWidth && (!hasIcon || !hasLabel || isLoading ? css2`
|
|
867
880
|
justify-content: center;
|
|
868
881
|
` : hasIcon && hasLabel && iconPosition === "left" ? css2`
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
882
|
+
justify-content: left;
|
|
883
|
+
` : css2`
|
|
884
|
+
justify-content: space-between;
|
|
885
|
+
`)}
|
|
873
886
|
|
|
874
887
|
&:focus-visible, &.focus-visible {
|
|
875
888
|
${focusVisible}
|
|
@@ -879,7 +892,18 @@ var ButtonWrapper = styled5.button`
|
|
|
879
892
|
${selection}
|
|
880
893
|
}
|
|
881
894
|
`;
|
|
882
|
-
var StyledIconWrapperSpan = styled5.span
|
|
895
|
+
var StyledIconWrapperSpan = styled5.span.withConfig({
|
|
896
|
+
shouldForwardProp: (prop) => {
|
|
897
|
+
const styleOnlyProps = [
|
|
898
|
+
"iconPosition",
|
|
899
|
+
"size",
|
|
900
|
+
"absolutePosition",
|
|
901
|
+
"isHidden",
|
|
902
|
+
"justIcon"
|
|
903
|
+
];
|
|
904
|
+
return !styleOnlyProps.some((styleProp) => styleProp === prop);
|
|
905
|
+
}
|
|
906
|
+
})`
|
|
883
907
|
display: flex;
|
|
884
908
|
align-items: center;
|
|
885
909
|
justify-content: center;
|
|
@@ -894,7 +918,9 @@ var StyledIconWrapperSpan = styled5.span`
|
|
|
894
918
|
width: ${sizes2[size].justIcon.wrapper.width};
|
|
895
919
|
`}
|
|
896
920
|
`;
|
|
897
|
-
var Label = styled5.span
|
|
921
|
+
var Label = styled5.span.withConfig({
|
|
922
|
+
shouldForwardProp: (prop) => prop !== "isHidden"
|
|
923
|
+
})`
|
|
898
924
|
${({ isHidden }) => isHidden && css2`
|
|
899
925
|
visibility: hidden;
|
|
900
926
|
`}
|
|
@@ -1222,7 +1248,7 @@ var StyledScrollableContainer = styled7.div`
|
|
|
1222
1248
|
padding: ${outerContainer2.padding};
|
|
1223
1249
|
`;
|
|
1224
1250
|
var Content = styled7.div`
|
|
1225
|
-
height: ${({ height }) => height};
|
|
1251
|
+
height: ${({ $height }) => $height};
|
|
1226
1252
|
overflow: auto;
|
|
1227
1253
|
scrollbar-width: none;
|
|
1228
1254
|
::-webkit-scrollbar {
|
|
@@ -1253,7 +1279,7 @@ var ScrollableContainer = (props) => {
|
|
|
1253
1279
|
{
|
|
1254
1280
|
...getBaseHTMLProps5(id, className, htmlProps, rest),
|
|
1255
1281
|
children: [
|
|
1256
|
-
/* @__PURE__ */ jsx8(Content, { height: contentHeight, ref, tabIndex: 0, children }),
|
|
1282
|
+
/* @__PURE__ */ jsx8(Content, { $height: contentHeight, ref, tabIndex: 0, children }),
|
|
1257
1283
|
/* @__PURE__ */ jsx8(Scrollbar, { contentRef: ref })
|
|
1258
1284
|
]
|
|
1259
1285
|
}
|
|
@@ -1509,7 +1535,7 @@ var Container = styled9.div`
|
|
|
1509
1535
|
overflow-y: auto;
|
|
1510
1536
|
min-width: 180px;
|
|
1511
1537
|
max-width: 300px;
|
|
1512
|
-
${({ isOpen }) => visibilityTransition(isOpen)}
|
|
1538
|
+
${({ $isOpen }) => visibilityTransition($isOpen)}
|
|
1513
1539
|
border: ${container2.border};
|
|
1514
1540
|
background-color: ${container2.backgroundColor};
|
|
1515
1541
|
border-radius: ${container2.borderRadius};
|
|
@@ -1633,7 +1659,7 @@ var OverflowMenu = forwardRef4(
|
|
|
1633
1659
|
...getBaseHTMLProps7(id, className, restHTMLProps, rest),
|
|
1634
1660
|
ref: combinedRef,
|
|
1635
1661
|
id: id != null ? id : `${generatedId}-overflowMenu`,
|
|
1636
|
-
isOpen,
|
|
1662
|
+
$isOpen: isOpen,
|
|
1637
1663
|
style: { ...style, ...styles.floating },
|
|
1638
1664
|
"aria-hidden": !isOpen,
|
|
1639
1665
|
role: "menu"
|
|
@@ -1736,7 +1762,9 @@ var IconButtonText = styled10.span`
|
|
|
1736
1762
|
display: none; // Ikke vis tekst på mobil
|
|
1737
1763
|
width: 0;
|
|
1738
1764
|
`;
|
|
1739
|
-
var Bar = styled10.div
|
|
1765
|
+
var Bar = styled10.div.withConfig({
|
|
1766
|
+
shouldForwardProp: (prop) => prop !== "environmentBannerActive"
|
|
1767
|
+
})`
|
|
1740
1768
|
display: flex;
|
|
1741
1769
|
align-items: center;
|
|
1742
1770
|
justify-content: space-between;
|
|
@@ -1821,7 +1849,9 @@ var TopBar = ({
|
|
|
1821
1849
|
import { ENVIRONMENT_BANNER_HEIGHT as ENVIRONMENT_BANNER_HEIGHT2 } from "@norges-domstoler/development-utils";
|
|
1822
1850
|
import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1823
1851
|
var { navigation: navTokens4 } = appShellTokens;
|
|
1824
|
-
var Sidebar = styled11.div
|
|
1852
|
+
var Sidebar = styled11.div.withConfig({
|
|
1853
|
+
shouldForwardProp: (prop) => prop !== "isOpen" && prop !== "environmentBannerActive"
|
|
1854
|
+
})`
|
|
1825
1855
|
display: flex;
|
|
1826
1856
|
flex-direction: column;
|
|
1827
1857
|
height: calc(100vh - ${navTokens4.topBar.height});
|
|
@@ -1967,7 +1997,9 @@ var AppShellContainer = styled12.div`
|
|
|
1967
1997
|
flex-direction: row;
|
|
1968
1998
|
}
|
|
1969
1999
|
`;
|
|
1970
|
-
var MainContent = styled12.main
|
|
2000
|
+
var MainContent = styled12.main.withConfig({
|
|
2001
|
+
shouldForwardProp: (prop) => prop !== "environmentBannerActive"
|
|
2002
|
+
})`
|
|
1971
2003
|
min-height: calc(100vh - ${appShellTokens.navigation.topBar.height});
|
|
1972
2004
|
margin-top: ${({ environmentBannerActive }) => environmentBannerActive ? `calc(${ENVIRONMENT_BANNER_HEIGHT3} + ${appShellTokens.navigation.topBar.height})` : appShellTokens.navigation.topBar.height};
|
|
1973
2005
|
@media (min-width: ${appShellTokens.navigation.mobile.breakpoint}) {
|
|
@@ -2156,7 +2188,7 @@ var CustomSelectionControl = styled13.span`
|
|
|
2156
2188
|
border-radius: ${selectionControl2.base.borderRadius};
|
|
2157
2189
|
height: ${selectionControl2.base.height};
|
|
2158
2190
|
width: ${selectionControl2.base.width};
|
|
2159
|
-
${({ controlType }) => controlType === "radio" && css4`
|
|
2191
|
+
${({ $controlType }) => $controlType === "radio" && css4`
|
|
2160
2192
|
border-radius: 50%;
|
|
2161
2193
|
`}
|
|
2162
2194
|
&:after {
|
|
@@ -2173,7 +2205,7 @@ var Container2 = styled13.label`
|
|
|
2173
2205
|
user-select: none;
|
|
2174
2206
|
width: fit-content;
|
|
2175
2207
|
color: ${container4.color};
|
|
2176
|
-
${({ hasLabel }) => hasLabel ? css4`
|
|
2208
|
+
${({ $hasLabel }) => $hasLabel ? css4`
|
|
2177
2209
|
padding-left: ${container4.withLabel.paddingLeft};
|
|
2178
2210
|
` : css4`
|
|
2179
2211
|
padding: ${container4.noLabel.padding};
|
|
@@ -2219,7 +2251,7 @@ var Container2 = styled13.label`
|
|
|
2219
2251
|
border-color: ${selectionControl2.checked.hover.borderColor};
|
|
2220
2252
|
}
|
|
2221
2253
|
|
|
2222
|
-
${({ error }) => error && css4`
|
|
2254
|
+
${({ $error }) => $error && css4`
|
|
2223
2255
|
&:hover input:enabled ~ ${CustomSelectionControl} {
|
|
2224
2256
|
background-color: ${selectionControl2.hover.danger.backgroundColor};
|
|
2225
2257
|
box-shadow: ${selectionControl2.hover.danger.boxShadow};
|
|
@@ -2257,7 +2289,7 @@ var Container2 = styled13.label`
|
|
|
2257
2289
|
cursor: not-allowed;
|
|
2258
2290
|
color: ${container4.disabled.color};
|
|
2259
2291
|
`}
|
|
2260
|
-
${({ controlType }) => controlType === "checkbox" ? css4`
|
|
2292
|
+
${({ $controlType }) => $controlType === "checkbox" ? css4`
|
|
2261
2293
|
${CustomSelectionControl}:after {
|
|
2262
2294
|
border: solid ${checkmark2.checkbox.borderColor};
|
|
2263
2295
|
|
|
@@ -2294,9 +2326,9 @@ var OuterGroupContainer = styled13.div`
|
|
|
2294
2326
|
`;
|
|
2295
2327
|
var GroupContainer = styled13.div`
|
|
2296
2328
|
display: flex;
|
|
2297
|
-
${({ direction }) => css4`
|
|
2298
|
-
flex-direction: ${direction};
|
|
2299
|
-
gap: ${groupContainer2[direction].gap};
|
|
2329
|
+
${({ $direction }) => css4`
|
|
2330
|
+
flex-direction: ${$direction};
|
|
2331
|
+
gap: ${groupContainer2[$direction].gap};
|
|
2300
2332
|
`}
|
|
2301
2333
|
`;
|
|
2302
2334
|
|
|
@@ -2360,21 +2392,24 @@ var RadioButton = forwardRef5(
|
|
|
2360
2392
|
"aria-describedby": describedByIds.length > 0 ? describedByIds.join(" ") : void 0,
|
|
2361
2393
|
"aria-invalid": error || (radioButtonGroup == null ? void 0 : radioButtonGroup.error) ? true : void 0
|
|
2362
2394
|
};
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2395
|
+
return /* @__PURE__ */ jsxs11(
|
|
2396
|
+
Container2,
|
|
2397
|
+
{
|
|
2398
|
+
$error: error || (radioButtonGroup == null ? void 0 : radioButtonGroup.error),
|
|
2399
|
+
disabled: disabled || (radioButtonGroup == null ? void 0 : radioButtonGroup.disabled),
|
|
2400
|
+
$readOnly: readOnly || (radioButtonGroup == null ? void 0 : radioButtonGroup.readOnly),
|
|
2401
|
+
style,
|
|
2402
|
+
className: joinClassNames(className, htmlPropsClassName),
|
|
2403
|
+
$hasLabel: hasLabel,
|
|
2404
|
+
htmlFor: uniqueId,
|
|
2405
|
+
$controlType: "radio",
|
|
2406
|
+
children: [
|
|
2407
|
+
/* @__PURE__ */ jsx15(HiddenInput, { ...inputProps, ref }),
|
|
2408
|
+
/* @__PURE__ */ jsx15(CustomSelectionControl, { $controlType: "radio" }),
|
|
2409
|
+
/* @__PURE__ */ jsx15(Typography, { as: "span", children: children != null ? children : label3 })
|
|
2410
|
+
]
|
|
2411
|
+
}
|
|
2412
|
+
);
|
|
2378
2413
|
}
|
|
2379
2414
|
);
|
|
2380
2415
|
RadioButton.displayName = "RadioButton";
|
|
@@ -2426,7 +2461,9 @@ import {
|
|
|
2426
2461
|
} from "@norges-domstoler/dds-core";
|
|
2427
2462
|
import { ErrorIcon } from "@norges-domstoler/dds-icons";
|
|
2428
2463
|
import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2429
|
-
var InputMessageWrapper = styled14.div
|
|
2464
|
+
var InputMessageWrapper = styled14.div.withConfig({
|
|
2465
|
+
shouldForwardProp: (prop) => prop !== "messageType"
|
|
2466
|
+
})`
|
|
2430
2467
|
display: flex;
|
|
2431
2468
|
width: fit-content;
|
|
2432
2469
|
word-break: break-word;
|
|
@@ -2553,7 +2590,7 @@ var RadioButtonGroupInner = (props, ref) => {
|
|
|
2553
2590
|
GroupContainer,
|
|
2554
2591
|
{
|
|
2555
2592
|
role: "radiogroup",
|
|
2556
|
-
direction,
|
|
2593
|
+
$direction: direction,
|
|
2557
2594
|
"aria-labelledby": uniqueGroupId,
|
|
2558
2595
|
"aria-describedby": tipId,
|
|
2559
2596
|
"aria-errormessage": errorMessageId,
|
|
@@ -2611,43 +2648,42 @@ var Checkbox = forwardRef8(
|
|
|
2611
2648
|
className: htmlPropsClassName,
|
|
2612
2649
|
...restHtmlProps
|
|
2613
2650
|
} = htmlProps;
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
"
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
] });
|
|
2651
|
+
return /* @__PURE__ */ jsxs15(
|
|
2652
|
+
Container2,
|
|
2653
|
+
{
|
|
2654
|
+
$error: error || (checkboxGroup == null ? void 0 : checkboxGroup.error),
|
|
2655
|
+
disabled,
|
|
2656
|
+
htmlFor: uniqueId,
|
|
2657
|
+
$hasLabel: hasLabel,
|
|
2658
|
+
$controlType: "checkbox",
|
|
2659
|
+
className: joinClassNames2(className, htmlPropsClassName),
|
|
2660
|
+
style,
|
|
2661
|
+
children: [
|
|
2662
|
+
/* @__PURE__ */ jsx19(
|
|
2663
|
+
HiddenInput2,
|
|
2664
|
+
{
|
|
2665
|
+
...getBaseHTMLProps11(uniqueId, restHtmlProps, rest),
|
|
2666
|
+
ref,
|
|
2667
|
+
name,
|
|
2668
|
+
disabled,
|
|
2669
|
+
"aria-describedby": spaceSeparatedIdListGenerator([
|
|
2670
|
+
checkboxGroup == null ? void 0 : checkboxGroup.tipId,
|
|
2671
|
+
checkboxGroup == null ? void 0 : checkboxGroup.errorMessageId,
|
|
2672
|
+
ariaDescribedby
|
|
2673
|
+
]),
|
|
2674
|
+
"aria-invalid": error || (checkboxGroup == null ? void 0 : checkboxGroup.error) ? true : void 0,
|
|
2675
|
+
"aria-labelledby": checkboxGroup == null ? void 0 : checkboxGroup.uniqueGroupId,
|
|
2676
|
+
"aria-checked": indeterminate ? "mixed" : void 0,
|
|
2677
|
+
"aria-readonly": readOnly,
|
|
2678
|
+
type: "checkbox",
|
|
2679
|
+
"data-indeterminate": indeterminate
|
|
2680
|
+
}
|
|
2681
|
+
),
|
|
2682
|
+
/* @__PURE__ */ jsx19(CustomSelectionControl, { $controlType: "checkbox" }),
|
|
2683
|
+
hasLabel && /* @__PURE__ */ jsx19(Typography4, { color: "inherit", as: "span", typographyType: "bodySans02", children: label3 })
|
|
2684
|
+
]
|
|
2685
|
+
}
|
|
2686
|
+
);
|
|
2651
2687
|
}
|
|
2652
2688
|
);
|
|
2653
2689
|
Checkbox.displayName = "Checkbox";
|
|
@@ -2718,7 +2754,7 @@ var CheckboxGroup = (props) => {
|
|
|
2718
2754
|
role: "group",
|
|
2719
2755
|
"aria-labelledby": uniqueGroupId,
|
|
2720
2756
|
"aria-describedby": tip ? tipId : void 0,
|
|
2721
|
-
direction,
|
|
2757
|
+
$direction: direction,
|
|
2722
2758
|
children
|
|
2723
2759
|
}
|
|
2724
2760
|
) }),
|
|
@@ -2855,8 +2891,8 @@ var MessageContainer = styled16.div`
|
|
|
2855
2891
|
var StyledIcon = styled16(Icon5)`
|
|
2856
2892
|
position: absolute;
|
|
2857
2893
|
color: ${icon3.color};
|
|
2858
|
-
${({ size, iconSize }) => css6`
|
|
2859
|
-
left: ${icon3.sizes[size].left};
|
|
2894
|
+
${({ $size, iconSize }) => css6`
|
|
2895
|
+
left: ${icon3.sizes[$size].left};
|
|
2860
2896
|
${iconSize === "small" ? css6`
|
|
2861
2897
|
top: ${`calc(50% - ${iconSizes2.DdsIconsizeSmallNumberPx / 2}px)`};
|
|
2862
2898
|
` : css6`
|
|
@@ -2866,7 +2902,7 @@ var StyledIcon = styled16(Icon5)`
|
|
|
2866
2902
|
z-index: 1;
|
|
2867
2903
|
`;
|
|
2868
2904
|
var StyledInput = styled16(StatefulInput)`
|
|
2869
|
-
${({ componentSize, hasIcon }) => hasIcon && componentSize && css6`
|
|
2905
|
+
${({ componentSize, $hasIcon }) => $hasIcon && componentSize && css6`
|
|
2870
2906
|
padding-left: ${input2.withIcon[componentSize].paddingLeft};
|
|
2871
2907
|
`}
|
|
2872
2908
|
`;
|
|
@@ -2980,7 +3016,6 @@ var TextInput = forwardRef9(
|
|
|
2980
3016
|
const errorMessageId = derivativeIdGenerator2(uniqueId, "errorMessage");
|
|
2981
3017
|
const generalInputProps = {
|
|
2982
3018
|
id: uniqueId,
|
|
2983
|
-
errorMessage,
|
|
2984
3019
|
hasErrorMessage,
|
|
2985
3020
|
required,
|
|
2986
3021
|
disabled,
|
|
@@ -3013,7 +3048,7 @@ var TextInput = forwardRef9(
|
|
|
3013
3048
|
{
|
|
3014
3049
|
icon: icon12,
|
|
3015
3050
|
iconSize: getFormInputIconSize(componentSize),
|
|
3016
|
-
size: componentSize
|
|
3051
|
+
$size: componentSize
|
|
3017
3052
|
}
|
|
3018
3053
|
),
|
|
3019
3054
|
/* @__PURE__ */ jsx21(
|
|
@@ -3023,7 +3058,7 @@ var TextInput = forwardRef9(
|
|
|
3023
3058
|
onChange: onChangeHandler,
|
|
3024
3059
|
type,
|
|
3025
3060
|
componentSize,
|
|
3026
|
-
hasIcon,
|
|
3061
|
+
$hasIcon: hasIcon,
|
|
3027
3062
|
...generalInputProps
|
|
3028
3063
|
}
|
|
3029
3064
|
)
|
|
@@ -3297,30 +3332,30 @@ function getContainerControlPadding(componentSize, isMulti) {
|
|
|
3297
3332
|
}
|
|
3298
3333
|
var Container3 = styled18.div`
|
|
3299
3334
|
margin: 0;
|
|
3300
|
-
width: ${({ width }) => width};
|
|
3335
|
+
width: ${({ $width }) => $width};
|
|
3301
3336
|
position: relative;
|
|
3302
3337
|
|
|
3303
3338
|
*::selection {
|
|
3304
3339
|
${selection3}
|
|
3305
3340
|
}
|
|
3306
3341
|
|
|
3307
|
-
${({ componentSize, isMulti }) => css8`
|
|
3342
|
+
${({ $componentSize, $isMulti }) => css8`
|
|
3308
3343
|
.${prefix}__control {
|
|
3309
|
-
padding: ${getContainerControlPadding(componentSize, isMulti)};
|
|
3310
|
-
${getFontStyling3(typographyTypes2.control[componentSize], true)}
|
|
3344
|
+
padding: ${getContainerControlPadding($componentSize, $isMulti)};
|
|
3345
|
+
${getFontStyling3(typographyTypes2.control[$componentSize], true)}
|
|
3311
3346
|
}
|
|
3312
3347
|
.${prefix}__option {
|
|
3313
|
-
${getFontStyling3(typographyTypes2.option[componentSize], true)}
|
|
3348
|
+
${getFontStyling3(typographyTypes2.option[$componentSize], true)}
|
|
3314
3349
|
}
|
|
3315
3350
|
.${prefix}__placeholder {
|
|
3316
|
-
${getFontStyling3(typographyTypes2.placeholder[componentSize])}
|
|
3351
|
+
${getFontStyling3(typographyTypes2.placeholder[$componentSize])}
|
|
3317
3352
|
}
|
|
3318
3353
|
.${prefix}__menu-notice--no-options {
|
|
3319
|
-
${getFontStyling3(typographyTypes2.noOptionsMessage[componentSize])}
|
|
3354
|
+
${getFontStyling3(typographyTypes2.noOptionsMessage[$componentSize])}
|
|
3320
3355
|
}
|
|
3321
3356
|
`}
|
|
3322
3357
|
|
|
3323
|
-
${({ errorMessage }) => errorMessage && css8`
|
|
3358
|
+
${({ $errorMessage }) => $errorMessage && css8`
|
|
3324
3359
|
.${prefix}__control {
|
|
3325
3360
|
${dangerInputfield2}
|
|
3326
3361
|
}
|
|
@@ -3339,7 +3374,7 @@ var Container3 = styled18.div`
|
|
|
3339
3374
|
color: ${dropdownIndicator2.hover.color};
|
|
3340
3375
|
}
|
|
3341
3376
|
|
|
3342
|
-
${({ isDisabled, readOnly }) => readOnly ? css8`
|
|
3377
|
+
${({ $isDisabled, $readOnly }) => $readOnly ? css8`
|
|
3343
3378
|
.${prefix}__control {
|
|
3344
3379
|
border-color: ${control2.readOnly.borderColor};
|
|
3345
3380
|
background-color: ${control2.readOnly.backgroundColor};
|
|
@@ -3349,16 +3384,16 @@ var Container3 = styled18.div`
|
|
|
3349
3384
|
.${prefix}__dropdown-indicator {
|
|
3350
3385
|
color: ${dropdownIndicator2.readOnly.color};
|
|
3351
3386
|
}
|
|
3352
|
-
` : isDisabled ? css8`
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3387
|
+
` : $isDisabled ? css8`
|
|
3388
|
+
cursor: not-allowed;
|
|
3389
|
+
.${prefix}__control {
|
|
3390
|
+
border-color: ${control2.disabled.borderColor};
|
|
3391
|
+
background-color: ${control2.disabled.backgroundColor};
|
|
3392
|
+
}
|
|
3393
|
+
&:hover .${prefix}__dropdown-indicator {
|
|
3394
|
+
color: ${dropdownIndicator2.base.color};
|
|
3395
|
+
}
|
|
3396
|
+
` : ""}
|
|
3362
3397
|
`;
|
|
3363
3398
|
var InnerSingleValue = styled18.div`
|
|
3364
3399
|
overflow: hidden;
|
|
@@ -3597,12 +3632,12 @@ var SelectInner = (props, ref) => {
|
|
|
3597
3632
|
const tipId = derivativeIdGenerator3(uniqueId, "tip");
|
|
3598
3633
|
const errorMessageId = derivativeIdGenerator3(uniqueId, "errorMessage");
|
|
3599
3634
|
const containerProps = {
|
|
3600
|
-
width,
|
|
3601
|
-
componentSize,
|
|
3602
|
-
errorMessage,
|
|
3603
|
-
isDisabled,
|
|
3604
|
-
readOnly,
|
|
3605
|
-
isMulti,
|
|
3635
|
+
$width: width,
|
|
3636
|
+
$componentSize: componentSize,
|
|
3637
|
+
$errorMessage: errorMessage,
|
|
3638
|
+
$isDisabled: isDisabled,
|
|
3639
|
+
$readOnly: readOnly,
|
|
3640
|
+
$isMulti: isMulti,
|
|
3606
3641
|
className,
|
|
3607
3642
|
style
|
|
3608
3643
|
};
|
|
@@ -3739,10 +3774,10 @@ var Container4 = styled19.div`
|
|
|
3739
3774
|
padding: ${container6.padding};
|
|
3740
3775
|
border-bottom: ${container6.borderBottom};
|
|
3741
3776
|
${getFontStyling4(typographyType2, true)}
|
|
3742
|
-
${({ purpose }) =>
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3777
|
+
${({ $purpose }) => css9`
|
|
3778
|
+
border-color: ${container6[$purpose].borderColor};
|
|
3779
|
+
background-color: ${container6[$purpose].backgroundColor};
|
|
3780
|
+
`}
|
|
3746
3781
|
`;
|
|
3747
3782
|
var MessageIconWrapper = styled19(Icon8)`
|
|
3748
3783
|
margin-right: ${icon6.marginRight};
|
|
@@ -3756,7 +3791,7 @@ var ContentContainer = styled19.div`
|
|
|
3756
3791
|
align-items: center;
|
|
3757
3792
|
padding-top: ${contentContainer2.paddingTop};
|
|
3758
3793
|
padding-bottom: ${contentContainer2.paddingBottom};
|
|
3759
|
-
padding-right: ${({ closable }) => closable ? contentContainer2.withClosable.paddingRight : contentContainer2.paddingRight};
|
|
3794
|
+
padding-right: ${({ $closable }) => $closable ? contentContainer2.withClosable.paddingRight : contentContainer2.paddingRight};
|
|
3760
3795
|
`;
|
|
3761
3796
|
var GlobalMessage = forwardRef10(
|
|
3762
3797
|
(props, ref) => {
|
|
@@ -3772,37 +3807,40 @@ var GlobalMessage = forwardRef10(
|
|
|
3772
3807
|
...rest
|
|
3773
3808
|
} = props;
|
|
3774
3809
|
const [isClosed, setClosed] = useState6(false);
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3810
|
+
return !isClosed ? /* @__PURE__ */ jsxs20(
|
|
3811
|
+
Container4,
|
|
3812
|
+
{
|
|
3813
|
+
ref,
|
|
3814
|
+
$purpose: purpose,
|
|
3815
|
+
...getBaseHTMLProps14(id, className, htmlProps, rest),
|
|
3816
|
+
children: [
|
|
3817
|
+
/* @__PURE__ */ jsxs20(ContentContainer, { $closable: closable, children: [
|
|
3818
|
+
/* @__PURE__ */ jsx23(
|
|
3819
|
+
MessageIconWrapper,
|
|
3820
|
+
{
|
|
3821
|
+
icon: purposeVariants[purpose].icon,
|
|
3822
|
+
color: icon6[purpose].color
|
|
3823
|
+
}
|
|
3824
|
+
),
|
|
3825
|
+
children != null ? children : /* @__PURE__ */ jsx23(Typography7, { as: "span", children: message2 })
|
|
3826
|
+
] }),
|
|
3827
|
+
/* @__PURE__ */ jsx23(ControlsContainer, { children: closable && /* @__PURE__ */ jsx23(
|
|
3828
|
+
Button,
|
|
3829
|
+
{
|
|
3830
|
+
icon: CloseIcon2,
|
|
3831
|
+
purpose: purposeVariants[purpose].closeButtonPurpose,
|
|
3832
|
+
appearance: "borderless",
|
|
3833
|
+
onClick: () => {
|
|
3834
|
+
setClosed(true);
|
|
3835
|
+
onClose && onClose();
|
|
3836
|
+
},
|
|
3837
|
+
size: "small",
|
|
3838
|
+
"aria-label": "Lukk melding"
|
|
3839
|
+
}
|
|
3840
|
+
) })
|
|
3841
|
+
]
|
|
3842
|
+
}
|
|
3843
|
+
) : null;
|
|
3806
3844
|
}
|
|
3807
3845
|
);
|
|
3808
3846
|
GlobalMessage.displayName = "GlobalMessage";
|
|
@@ -3924,7 +3962,17 @@ import { CloseIcon as CloseIcon3 } from "@norges-domstoler/dds-icons";
|
|
|
3924
3962
|
import { Fragment as Fragment5, jsx as jsx24, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
3925
3963
|
var defaultWidth3 = "400px";
|
|
3926
3964
|
var { container: container8, icon: icon8, purposeVariants: purposeVariants3 } = localMessageTokens;
|
|
3927
|
-
var Container5 = styled20.div
|
|
3965
|
+
var Container5 = styled20.div.withConfig({
|
|
3966
|
+
shouldForwardProp: (prop) => {
|
|
3967
|
+
const styleOnlyProps = [
|
|
3968
|
+
"layout",
|
|
3969
|
+
"closable",
|
|
3970
|
+
"purpose",
|
|
3971
|
+
"width"
|
|
3972
|
+
];
|
|
3973
|
+
return !styleOnlyProps.some((styleProp) => styleProp === prop);
|
|
3974
|
+
}
|
|
3975
|
+
})`
|
|
3928
3976
|
box-sizing: border-box;
|
|
3929
3977
|
display: grid;
|
|
3930
3978
|
grid-template-areas: ${({ layout, closable }) => getGridTemplateAreas(layout, closable)};
|
|
@@ -4218,7 +4266,7 @@ import { derivativeIdGenerator as derivativeIdGenerator4 } from "@norges-domstol
|
|
|
4218
4266
|
import { jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
4219
4267
|
var { suggestionsContainer: suggestionsContainer2, suggestionsHeader: suggestionsHeader2 } = searchTokens;
|
|
4220
4268
|
var SuggestionsContainer = styled22(Paper)`
|
|
4221
|
-
${({ isHidden }) => visibilityTransition2(
|
|
4269
|
+
${({ $isHidden }) => visibilityTransition2(!$isHidden)};
|
|
4222
4270
|
position: absolute;
|
|
4223
4271
|
top: 100%;
|
|
4224
4272
|
width: 100%;
|
|
@@ -4232,7 +4280,7 @@ var SuggestionsContainer = styled22(Paper)`
|
|
|
4232
4280
|
${scrollbarStyling.webkit}
|
|
4233
4281
|
`;
|
|
4234
4282
|
var MenuItem = styled22(OverflowMenuItem)`
|
|
4235
|
-
${({ size }) => size && getFontStyling6(typographyTypes3[size])}
|
|
4283
|
+
${({ $size }) => $size && getFontStyling6(typographyTypes3[$size])}
|
|
4236
4284
|
`;
|
|
4237
4285
|
var SuggestionsList = styled22.ul`
|
|
4238
4286
|
${removeListStyling}
|
|
@@ -4271,7 +4319,7 @@ var SearchSuggestions = forwardRef12((props, ref) => {
|
|
|
4271
4319
|
title: suggestion,
|
|
4272
4320
|
"aria-setsize": suggestionsToRender.length,
|
|
4273
4321
|
"aria-posinset": index,
|
|
4274
|
-
size: componentSize
|
|
4322
|
+
$size: componentSize
|
|
4275
4323
|
}
|
|
4276
4324
|
) }, index);
|
|
4277
4325
|
}) });
|
|
@@ -4281,7 +4329,7 @@ var SearchSuggestions = forwardRef12((props, ref) => {
|
|
|
4281
4329
|
{
|
|
4282
4330
|
...getBaseHTMLProps17(id, className, htmlProps, rest),
|
|
4283
4331
|
ref,
|
|
4284
|
-
isHidden,
|
|
4332
|
+
$isHidden: isHidden,
|
|
4285
4333
|
"aria-hidden": isHidden,
|
|
4286
4334
|
children: [
|
|
4287
4335
|
/* @__PURE__ */ jsx26(
|
|
@@ -4322,19 +4370,19 @@ var Input2 = styled23(BaseInput)`
|
|
|
4322
4370
|
}
|
|
4323
4371
|
padding-right: ${input4.base.paddingRight};
|
|
4324
4372
|
|
|
4325
|
-
${({ componentSize }) => css11`
|
|
4326
|
-
padding-top: ${input4.sizes[componentSize].paddingTop};
|
|
4327
|
-
padding-bottom: ${input4.sizes[componentSize].paddingBottom};
|
|
4328
|
-
padding-left: ${input4.sizes[componentSize].paddingLeft};
|
|
4329
|
-
${getFontStyling7(typographyTypes3[componentSize])}
|
|
4373
|
+
${({ $componentSize }) => css11`
|
|
4374
|
+
padding-top: ${input4.sizes[$componentSize].paddingTop};
|
|
4375
|
+
padding-bottom: ${input4.sizes[$componentSize].paddingBottom};
|
|
4376
|
+
padding-left: ${input4.sizes[$componentSize].paddingLeft};
|
|
4377
|
+
${getFontStyling7(typographyTypes3[$componentSize])}
|
|
4330
4378
|
`}
|
|
4331
4379
|
`;
|
|
4332
4380
|
var StyledSearchIcon = styled23(Icon10)`
|
|
4333
4381
|
position: absolute;
|
|
4334
4382
|
left: ${searchIcon2.base.left};
|
|
4335
4383
|
color: ${searchIcon2.base.color};
|
|
4336
|
-
${({ size }) => css11`
|
|
4337
|
-
top: ${searchTokens.searchIcon[size].top};
|
|
4384
|
+
${({ $size }) => css11`
|
|
4385
|
+
top: ${searchTokens.searchIcon[$size].top};
|
|
4338
4386
|
`}
|
|
4339
4387
|
z-index: 1;
|
|
4340
4388
|
`;
|
|
@@ -4350,7 +4398,7 @@ var OuterContainer = styled23.div`
|
|
|
4350
4398
|
gap: ${outerContainer4.gap};
|
|
4351
4399
|
`;
|
|
4352
4400
|
var HorisontalContainer = styled23.div`
|
|
4353
|
-
${(props) => props
|
|
4401
|
+
${(props) => props.$hasSearchButton && css11`
|
|
4354
4402
|
display: grid;
|
|
4355
4403
|
grid-template-columns: 1fr auto;
|
|
4356
4404
|
gap: ${horisontalContainer2.gap};
|
|
@@ -4397,26 +4445,6 @@ var Search = forwardRef13(
|
|
|
4397
4445
|
const emptyChangeEvent = createEmptyChangeEvent(uniqueId);
|
|
4398
4446
|
handleChange(emptyChangeEvent);
|
|
4399
4447
|
};
|
|
4400
|
-
const containerProps = {
|
|
4401
|
-
className,
|
|
4402
|
-
style
|
|
4403
|
-
};
|
|
4404
|
-
const inputProps = {
|
|
4405
|
-
...rest,
|
|
4406
|
-
ref: combinedRef,
|
|
4407
|
-
componentSize,
|
|
4408
|
-
name,
|
|
4409
|
-
type: "search",
|
|
4410
|
-
id: uniqueId,
|
|
4411
|
-
"aria-describedby": spaceSeparatedIdListGenerator4([
|
|
4412
|
-
tip ? tipId : void 0,
|
|
4413
|
-
context.suggestions ? suggestionsDescriptionId : void 0,
|
|
4414
|
-
ariaDescribedby
|
|
4415
|
-
]),
|
|
4416
|
-
value: (_a = context.inputValue) != null ? _a : value,
|
|
4417
|
-
onChange: handleChange,
|
|
4418
|
-
autoComplete: "off"
|
|
4419
|
-
};
|
|
4420
4448
|
const {
|
|
4421
4449
|
label: buttonLabel,
|
|
4422
4450
|
onClick,
|
|
@@ -4430,22 +4458,36 @@ var Search = forwardRef13(
|
|
|
4430
4458
|
/* @__PURE__ */ jsxs23(
|
|
4431
4459
|
HorisontalContainer,
|
|
4432
4460
|
{
|
|
4433
|
-
hasSearchButton: showSearchButton,
|
|
4434
|
-
|
|
4461
|
+
$hasSearchButton: showSearchButton,
|
|
4462
|
+
className,
|
|
4463
|
+
style,
|
|
4435
4464
|
children: [
|
|
4436
4465
|
/* @__PURE__ */ jsxs23(InputContainer2, { children: [
|
|
4437
4466
|
/* @__PURE__ */ jsx27(
|
|
4438
4467
|
StyledSearchIcon,
|
|
4439
4468
|
{
|
|
4440
4469
|
icon: SearchIcon,
|
|
4441
|
-
size: componentSize,
|
|
4470
|
+
$size: componentSize,
|
|
4442
4471
|
iconSize: getIconSize(componentSize)
|
|
4443
4472
|
}
|
|
4444
4473
|
),
|
|
4445
4474
|
/* @__PURE__ */ jsx27(
|
|
4446
4475
|
Input2,
|
|
4447
4476
|
{
|
|
4448
|
-
...
|
|
4477
|
+
...rest,
|
|
4478
|
+
ref: combinedRef,
|
|
4479
|
+
$componentSize: componentSize,
|
|
4480
|
+
name,
|
|
4481
|
+
type: "search",
|
|
4482
|
+
id: uniqueId,
|
|
4483
|
+
"aria-describedby": spaceSeparatedIdListGenerator4([
|
|
4484
|
+
tip ? tipId : void 0,
|
|
4485
|
+
context.suggestions ? suggestionsDescriptionId : void 0,
|
|
4486
|
+
ariaDescribedby
|
|
4487
|
+
]),
|
|
4488
|
+
value: (_a = context.inputValue) != null ? _a : value,
|
|
4489
|
+
onChange: handleChange,
|
|
4490
|
+
autoComplete: "off",
|
|
4449
4491
|
"aria-autocomplete": hasSuggestions ? "list" : void 0,
|
|
4450
4492
|
"aria-controls": hasSuggestions ? suggestionsId : void 0,
|
|
4451
4493
|
"aria-expanded": context.showSuggestions,
|
|
@@ -4679,13 +4721,13 @@ var StyledTable = styled24.table`
|
|
|
4679
4721
|
}
|
|
4680
4722
|
${scrollbarStyling.webkit}
|
|
4681
4723
|
${scrollbarStyling.firefox}
|
|
4682
|
-
${({ density }) => css12`
|
|
4724
|
+
${({ $density }) => css12`
|
|
4683
4725
|
td,
|
|
4684
4726
|
th {
|
|
4685
|
-
padding: ${cell2.density[density].padding};
|
|
4727
|
+
padding: ${cell2.density[$density].padding};
|
|
4686
4728
|
}
|
|
4687
4729
|
`}
|
|
4688
|
-
${({ density }) => density === "extraCompact" && css12`
|
|
4730
|
+
${({ $density }) => $density === "extraCompact" && css12`
|
|
4689
4731
|
th {
|
|
4690
4732
|
background-color: ${row2.head.extraCompact.backgroundColor};
|
|
4691
4733
|
font-size: ${row2.head.extraCompact.fontSize};
|
|
@@ -4699,7 +4741,7 @@ var StyledTable = styled24.table`
|
|
|
4699
4741
|
}
|
|
4700
4742
|
}
|
|
4701
4743
|
`}
|
|
4702
|
-
${({ stickyHeader }) => stickyHeader && css12`
|
|
4744
|
+
${({ $stickyHeader }) => $stickyHeader && css12`
|
|
4703
4745
|
tr[type='head'] {
|
|
4704
4746
|
th[type='head'] {
|
|
4705
4747
|
position: sticky;
|
|
@@ -4708,20 +4750,25 @@ var StyledTable = styled24.table`
|
|
|
4708
4750
|
}
|
|
4709
4751
|
}
|
|
4710
4752
|
`}
|
|
4711
|
-
${({ withDividers }) => withDividers && css12`
|
|
4753
|
+
${({ $withDividers }) => $withDividers && css12`
|
|
4712
4754
|
tr[type='body'] {
|
|
4713
4755
|
border-bottom: ${row2.body.withDividers.borderBottom};
|
|
4714
4756
|
}
|
|
4715
4757
|
`}
|
|
4716
4758
|
`;
|
|
4717
4759
|
var Table = forwardRef14(
|
|
4718
|
-
({ density = "normal", children, ...rest }, ref) => {
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4760
|
+
({ density = "normal", stickyHeader, withDividers, children, ...rest }, ref) => {
|
|
4761
|
+
return /* @__PURE__ */ jsx29(
|
|
4762
|
+
StyledTable,
|
|
4763
|
+
{
|
|
4764
|
+
...rest,
|
|
4765
|
+
ref,
|
|
4766
|
+
$density: density,
|
|
4767
|
+
$stickyHeader: stickyHeader,
|
|
4768
|
+
$withDividers: withDividers,
|
|
4769
|
+
children
|
|
4770
|
+
}
|
|
4771
|
+
);
|
|
4725
4772
|
}
|
|
4726
4773
|
);
|
|
4727
4774
|
Table.displayName = "Table";
|
|
@@ -4757,12 +4804,6 @@ var CollapsibleTable = forwardRef15((props, ref) => {
|
|
|
4757
4804
|
definingColumnIndex = [0],
|
|
4758
4805
|
...rest
|
|
4759
4806
|
} = props;
|
|
4760
|
-
const tableProps = {
|
|
4761
|
-
ref,
|
|
4762
|
-
density,
|
|
4763
|
-
isCollapsed,
|
|
4764
|
-
...rest
|
|
4765
|
-
};
|
|
4766
4807
|
return /* @__PURE__ */ jsx30(
|
|
4767
4808
|
CollapsibleTableContext.Provider,
|
|
4768
4809
|
{
|
|
@@ -4771,7 +4812,7 @@ var CollapsibleTable = forwardRef15((props, ref) => {
|
|
|
4771
4812
|
headerValues,
|
|
4772
4813
|
definingColumnIndex
|
|
4773
4814
|
},
|
|
4774
|
-
children: /* @__PURE__ */ jsx30(StyledTable2, { ...
|
|
4815
|
+
children: /* @__PURE__ */ jsx30(StyledTable2, { ref, density, ...rest, children })
|
|
4775
4816
|
}
|
|
4776
4817
|
);
|
|
4777
4818
|
});
|
|
@@ -4784,10 +4825,7 @@ import { jsx as jsx31 } from "react/jsx-runtime";
|
|
|
4784
4825
|
var StyledHead = styled26.thead``;
|
|
4785
4826
|
var Head = forwardRef16(
|
|
4786
4827
|
({ children, ...rest }, ref) => {
|
|
4787
|
-
|
|
4788
|
-
...rest
|
|
4789
|
-
};
|
|
4790
|
-
return /* @__PURE__ */ jsx31(StyledHead, { ref, ...headProps, children });
|
|
4828
|
+
return /* @__PURE__ */ jsx31(StyledHead, { ref, ...rest, children });
|
|
4791
4829
|
}
|
|
4792
4830
|
);
|
|
4793
4831
|
Head.displayName = "Table.Head";
|
|
@@ -4814,10 +4852,7 @@ import { jsx as jsx33 } from "react/jsx-runtime";
|
|
|
4814
4852
|
var StyledFoot = styled28.tfoot``;
|
|
4815
4853
|
var Foot = forwardRef18(
|
|
4816
4854
|
({ children, ...rest }, ref) => {
|
|
4817
|
-
|
|
4818
|
-
...rest
|
|
4819
|
-
};
|
|
4820
|
-
return /* @__PURE__ */ jsx33(StyledFoot, { ref, ...footProps, children });
|
|
4855
|
+
return /* @__PURE__ */ jsx33(StyledFoot, { ref, ...rest, children });
|
|
4821
4856
|
}
|
|
4822
4857
|
);
|
|
4823
4858
|
Foot.displayName = "Table.Foot";
|
|
@@ -4860,7 +4895,7 @@ var StyledRow = styled29.tr`
|
|
|
4860
4895
|
font-weight: 600;
|
|
4861
4896
|
text-align: left;
|
|
4862
4897
|
`}
|
|
4863
|
-
${({ type, mode, selected, hoverable }) => type === "body" && css14`
|
|
4898
|
+
${({ type, $mode: mode, $selected: selected, $hoverable: hoverable }) => type === "body" && css14`
|
|
4864
4899
|
&:nth-of-type(even) {
|
|
4865
4900
|
background-color: ${row3.body.even.backgroundColor};
|
|
4866
4901
|
${bodyRowStyles(mode, selected)}
|
|
@@ -4885,13 +4920,19 @@ var StyledRow = styled29.tr`
|
|
|
4885
4920
|
// src/components/Table/Row.tsx
|
|
4886
4921
|
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
4887
4922
|
var Row = forwardRef19(
|
|
4888
|
-
({ type = "body", mode = "normal", children, ...rest }, ref) => {
|
|
4889
|
-
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4923
|
+
({ type = "body", mode = "normal", hoverable, selected, children, ...rest }, ref) => {
|
|
4924
|
+
return /* @__PURE__ */ jsx34(
|
|
4925
|
+
StyledRow,
|
|
4926
|
+
{
|
|
4927
|
+
type,
|
|
4928
|
+
$mode: mode,
|
|
4929
|
+
$hoverable: hoverable,
|
|
4930
|
+
$selected: selected,
|
|
4931
|
+
ref,
|
|
4932
|
+
...rest,
|
|
4933
|
+
children
|
|
4934
|
+
}
|
|
4935
|
+
);
|
|
4895
4936
|
}
|
|
4896
4937
|
);
|
|
4897
4938
|
Row.displayName = "Table.Row";
|
|
@@ -4974,7 +5015,9 @@ var descriptionListTokens = {
|
|
|
4974
5015
|
// src/components/DescriptionList/DescriptionList.tsx
|
|
4975
5016
|
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
4976
5017
|
var { term: term2, desc: desc2, list: list2 } = descriptionListTokens;
|
|
4977
|
-
var DList = styled30.dl
|
|
5018
|
+
var DList = styled30.dl.withConfig({
|
|
5019
|
+
shouldForwardProp: (prop) => prop !== "appearance" && prop !== "direction"
|
|
5020
|
+
})`
|
|
4978
5021
|
margin: 0;
|
|
4979
5022
|
*::selection {
|
|
4980
5023
|
${selection6}
|
|
@@ -5131,14 +5174,14 @@ var getLayoutStyle = (layout) => {
|
|
|
5131
5174
|
}
|
|
5132
5175
|
};
|
|
5133
5176
|
var StyledCell = styled34.td`
|
|
5134
|
-
${({ type }) => type === "head" && css16`
|
|
5177
|
+
${({ $type: type }) => type === "head" && css16`
|
|
5135
5178
|
background-color: ${cell3.head.backgroundColor};
|
|
5136
5179
|
`}
|
|
5137
5180
|
`;
|
|
5138
5181
|
var InnerCell = styled34.div`
|
|
5139
5182
|
display: flex;
|
|
5140
5183
|
align-items: center;
|
|
5141
|
-
${({ layout }) => getLayoutStyle(layout)}
|
|
5184
|
+
${({ $layout: layout }) => getLayoutStyle(layout)}
|
|
5142
5185
|
`;
|
|
5143
5186
|
var getTableCellType = (type) => {
|
|
5144
5187
|
switch (type) {
|
|
@@ -5153,15 +5196,7 @@ var Cell = forwardRef24(
|
|
|
5153
5196
|
({ children, type = "data", layout = "left", collapsibleProps, ...rest }, ref) => {
|
|
5154
5197
|
const as = getTableCellType(type);
|
|
5155
5198
|
const { isCollapsibleChild } = collapsibleProps != null ? collapsibleProps : {};
|
|
5156
|
-
|
|
5157
|
-
as,
|
|
5158
|
-
type,
|
|
5159
|
-
...rest
|
|
5160
|
-
};
|
|
5161
|
-
const innerCellProps = {
|
|
5162
|
-
layout
|
|
5163
|
-
};
|
|
5164
|
-
return isCollapsibleChild ? /* @__PURE__ */ jsx39(DescriptionListDesc, { children }) : /* @__PURE__ */ jsx39(StyledCell, { ref, ...cellProps, children: /* @__PURE__ */ jsx39(InnerCell, { ...innerCellProps, children }) });
|
|
5199
|
+
return isCollapsibleChild ? /* @__PURE__ */ jsx39(DescriptionListDesc, { children }) : /* @__PURE__ */ jsx39(StyledCell, { as, ref, $type: type, ...rest, children: /* @__PURE__ */ jsx39(InnerCell, { $layout: layout, children }) });
|
|
5165
5200
|
}
|
|
5166
5201
|
);
|
|
5167
5202
|
Cell.displayName = "Table.Cell";
|
|
@@ -5190,10 +5225,12 @@ var DescriptionListCell = styled35(Cell)`
|
|
|
5190
5225
|
}
|
|
5191
5226
|
`;
|
|
5192
5227
|
var CollapsibleRow = forwardRef25(
|
|
5193
|
-
({ type = "body", mode = "normal", children, ...rest }, ref) => {
|
|
5228
|
+
({ type = "body", mode = "normal", selected, hoverable, children, ...rest }, ref) => {
|
|
5194
5229
|
const rowProps = {
|
|
5195
|
-
type,
|
|
5196
|
-
mode,
|
|
5230
|
+
$type: type,
|
|
5231
|
+
$mode: mode,
|
|
5232
|
+
$selected: selected,
|
|
5233
|
+
$hoverable: hoverable,
|
|
5197
5234
|
...rest
|
|
5198
5235
|
};
|
|
5199
5236
|
const { isCollapsed, headerValues, definingColumnIndex } = useCollapsibleTableContext();
|
|
@@ -5220,14 +5257,14 @@ var CollapsibleRow = forwardRef25(
|
|
|
5220
5257
|
})
|
|
5221
5258
|
] }, `DL-${index}`);
|
|
5222
5259
|
}) : null;
|
|
5223
|
-
const collapsedRows = collapsedRenderedChildren && collapsedRenderedChildren.length > 0 ? /* @__PURE__ */ jsx40(StyledRow, { type
|
|
5260
|
+
const collapsedRows = collapsedRenderedChildren && collapsedRenderedChildren.length > 0 ? /* @__PURE__ */ jsx40(StyledRow, { type, children: /* @__PURE__ */ jsx40(DescriptionListCell, { colSpan: definingColumnIndex.length + 1, children: /* @__PURE__ */ jsx40(DescriptionList, { children: collapsedRenderedChildren }) }) }) : null;
|
|
5224
5261
|
const definingColumnCells = childrenArray.slice().filter((column, index) => definingColumnIndex.indexOf(index) > -1).sort((a, b) => {
|
|
5225
5262
|
return definingColumnIndex.indexOf(childrenArray.indexOf(a)) - definingColumnIndex.indexOf(childrenArray.indexOf(b));
|
|
5226
5263
|
});
|
|
5227
5264
|
const headerRow = () => {
|
|
5228
5265
|
if (type !== "head" || !isCollapsed)
|
|
5229
5266
|
return null;
|
|
5230
|
-
return /* @__PURE__ */ jsx40(StyledRow, { ref, ...rowProps, children: /* @__PURE__ */ jsxs25(Fragment8, { children: [
|
|
5267
|
+
return /* @__PURE__ */ jsx40(StyledRow, { ref, type, ...rowProps, children: /* @__PURE__ */ jsxs25(Fragment8, { children: [
|
|
5231
5268
|
definingColumnCells,
|
|
5232
5269
|
/* @__PURE__ */ jsxs25(Table2.Cell, { type: "head", layout: "center", children: [
|
|
5233
5270
|
"Utvid",
|
|
@@ -5243,6 +5280,7 @@ var CollapsibleRow = forwardRef25(
|
|
|
5243
5280
|
StyledRow,
|
|
5244
5281
|
{
|
|
5245
5282
|
ref,
|
|
5283
|
+
type,
|
|
5246
5284
|
...rowProps,
|
|
5247
5285
|
"data-isopencollapsibleheader": !childrenCollapsed && true,
|
|
5248
5286
|
children: [
|
|
@@ -5273,7 +5311,7 @@ var CollapsibleRow = forwardRef25(
|
|
|
5273
5311
|
rowWithChevron(),
|
|
5274
5312
|
childrenCollapsed ? null : collapsedRows
|
|
5275
5313
|
] })
|
|
5276
|
-
] }) : /* @__PURE__ */ jsx40(StyledRow, { ref, ...rowProps, children });
|
|
5314
|
+
] }) : /* @__PURE__ */ jsx40(StyledRow, { ref, type, ...rowProps, children });
|
|
5277
5315
|
}
|
|
5278
5316
|
);
|
|
5279
5317
|
CollapsibleRow.displayName = "CollapsibleTable.Row";
|
|
@@ -5341,7 +5379,7 @@ import { useEffect as useEffect7, useRef as useRef7, useState as useState11 } fr
|
|
|
5341
5379
|
import styled37, { css as css17 } from "styled-components";
|
|
5342
5380
|
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
5343
5381
|
var Wrapper3 = styled37.div`
|
|
5344
|
-
${({ overflowX }) => overflowX && css17`
|
|
5382
|
+
${({ $overflowX }) => $overflowX && css17`
|
|
5345
5383
|
overflow-x: auto;
|
|
5346
5384
|
`}
|
|
5347
5385
|
${scrollbarStyling.webkit}
|
|
@@ -5368,12 +5406,7 @@ var TableWrapper = ({ children, ...rest }) => {
|
|
|
5368
5406
|
window.addEventListener("resize", handleResize);
|
|
5369
5407
|
return () => window.removeEventListener("resize", handleResize);
|
|
5370
5408
|
});
|
|
5371
|
-
|
|
5372
|
-
ref: wrapperRef,
|
|
5373
|
-
overflowX,
|
|
5374
|
-
...rest
|
|
5375
|
-
};
|
|
5376
|
-
return /* @__PURE__ */ jsx42(Wrapper3, { ...wrapperProps, children });
|
|
5409
|
+
return /* @__PURE__ */ jsx42(Wrapper3, { $overflowX: overflowX, ref: wrapperRef, ...rest, children });
|
|
5377
5410
|
};
|
|
5378
5411
|
TableWrapper.displayName = "Table.Wrapper";
|
|
5379
5412
|
|
|
@@ -5570,14 +5603,14 @@ var List2 = styled39.ol`
|
|
|
5570
5603
|
var ListItem2 = styled39.li`
|
|
5571
5604
|
display: inline-grid;
|
|
5572
5605
|
align-content: center;
|
|
5573
|
-
${({ isHidden }) => isHidden && css18`
|
|
5606
|
+
${({ $isHidden }) => $isHidden && css18`
|
|
5574
5607
|
visibility: hidden;
|
|
5575
5608
|
`}
|
|
5576
5609
|
`;
|
|
5577
5610
|
var OuterContainer2 = styled39.div`
|
|
5578
5611
|
display: flex;
|
|
5579
5612
|
gap: ${outerContainer6.gap};
|
|
5580
|
-
${({ smallScreen }) => smallScreen ? css18`
|
|
5613
|
+
${({ $smallScreen }) => $smallScreen ? css18`
|
|
5581
5614
|
flex-direction: column;
|
|
5582
5615
|
align-items: center;
|
|
5583
5616
|
` : css18`
|
|
@@ -5685,17 +5718,17 @@ var Pagination = forwardRef29(
|
|
|
5685
5718
|
};
|
|
5686
5719
|
const containerProps = {
|
|
5687
5720
|
...getBaseHTMLProps22(id, className, htmlProps, rest),
|
|
5688
|
-
smallScreen
|
|
5721
|
+
$smallScreen: smallScreen
|
|
5689
5722
|
};
|
|
5690
5723
|
const isOnFirstPage = activePage === 1;
|
|
5691
5724
|
const isOnLastPage = activePage === pagesLength;
|
|
5692
5725
|
const navigation4 = withPagination ? /* @__PURE__ */ jsx45(Nav, { ref, "aria-label": "paginering", ...navProps, children: /* @__PURE__ */ jsxs28(List2, { children: [
|
|
5693
|
-
/* @__PURE__ */ jsx45(ListItem2, { isHidden: isOnFirstPage, "aria-hidden": isOnFirstPage, children: previousPageButton }),
|
|
5726
|
+
/* @__PURE__ */ jsx45(ListItem2, { $isHidden: isOnFirstPage, "aria-hidden": isOnFirstPage, children: previousPageButton }),
|
|
5694
5727
|
listItems,
|
|
5695
|
-
/* @__PURE__ */ jsx45(ListItem2, { isHidden: isOnLastPage, "aria-hidden": isOnLastPage, children: nextPageButton })
|
|
5728
|
+
/* @__PURE__ */ jsx45(ListItem2, { $isHidden: isOnLastPage, "aria-hidden": isOnLastPage, children: nextPageButton })
|
|
5696
5729
|
] }) }) : null;
|
|
5697
5730
|
const smallScreenNavigation = withPagination ? /* @__PURE__ */ jsx45(Nav, { ref, "aria-label": "paginering", ...navProps, children: /* @__PURE__ */ jsxs28(List2, { children: [
|
|
5698
|
-
/* @__PURE__ */ jsx45(ListItem2, { isHidden: isOnFirstPage, "aria-hidden": isOnFirstPage, children: /* @__PURE__ */ jsx45(
|
|
5731
|
+
/* @__PURE__ */ jsx45(ListItem2, { $isHidden: isOnFirstPage, "aria-hidden": isOnFirstPage, children: /* @__PURE__ */ jsx45(
|
|
5699
5732
|
Button,
|
|
5700
5733
|
{
|
|
5701
5734
|
purpose: "secondary",
|
|
@@ -5708,7 +5741,7 @@ var Pagination = forwardRef29(
|
|
|
5708
5741
|
"aria-label": "G\xE5 til f\xF8rste siden"
|
|
5709
5742
|
}
|
|
5710
5743
|
) }),
|
|
5711
|
-
/* @__PURE__ */ jsx45(ListItem2, { isHidden: isOnFirstPage, "aria-hidden": isOnFirstPage, children: previousPageButton }),
|
|
5744
|
+
/* @__PURE__ */ jsx45(ListItem2, { $isHidden: isOnFirstPage, "aria-hidden": isOnFirstPage, children: previousPageButton }),
|
|
5712
5745
|
/* @__PURE__ */ jsx45(ListItem2, { children: /* @__PURE__ */ jsx45(
|
|
5713
5746
|
Button,
|
|
5714
5747
|
{
|
|
@@ -5719,8 +5752,8 @@ var Pagination = forwardRef29(
|
|
|
5719
5752
|
children: activePage
|
|
5720
5753
|
}
|
|
5721
5754
|
) }),
|
|
5722
|
-
/* @__PURE__ */ jsx45(ListItem2, { isHidden: isOnLastPage, "aria-hidden": isOnLastPage, children: nextPageButton }),
|
|
5723
|
-
/* @__PURE__ */ jsx45(ListItem2, { isHidden: isOnLastPage, "aria-hidden": isOnLastPage, children: /* @__PURE__ */ jsx45(
|
|
5755
|
+
/* @__PURE__ */ jsx45(ListItem2, { $isHidden: isOnLastPage, "aria-hidden": isOnLastPage, children: nextPageButton }),
|
|
5756
|
+
/* @__PURE__ */ jsx45(ListItem2, { $isHidden: isOnLastPage, "aria-hidden": isOnLastPage, children: /* @__PURE__ */ jsx45(
|
|
5724
5757
|
Button,
|
|
5725
5758
|
{
|
|
5726
5759
|
purpose: "secondary",
|
|
@@ -5842,13 +5875,13 @@ var StyledList = styled40.ul`
|
|
|
5842
5875
|
${selection7}
|
|
5843
5876
|
}
|
|
5844
5877
|
|
|
5845
|
-
${({ typographyType
|
|
5878
|
+
${({ $typographyType }) => $typographyType === "inherit" ? css19`
|
|
5846
5879
|
font: inherit;
|
|
5847
5880
|
` : css19`
|
|
5848
|
-
${getFontStyling10(
|
|
5881
|
+
${getFontStyling10($typographyType)}
|
|
5849
5882
|
`}
|
|
5850
5883
|
|
|
5851
|
-
${({ listType }) => listType === "unordered" ? css19`
|
|
5884
|
+
${({ $listType }) => $listType === "unordered" ? css19`
|
|
5852
5885
|
padding-left: ${list8.ul.paddingLeft};
|
|
5853
5886
|
list-style: none;
|
|
5854
5887
|
li {
|
|
@@ -5895,14 +5928,17 @@ var List3 = forwardRef30(
|
|
|
5895
5928
|
...rest
|
|
5896
5929
|
} = props;
|
|
5897
5930
|
const as = listType === "ordered" ? "ol" : "ul";
|
|
5898
|
-
|
|
5899
|
-
|
|
5900
|
-
|
|
5901
|
-
|
|
5902
|
-
|
|
5903
|
-
|
|
5904
|
-
|
|
5905
|
-
|
|
5931
|
+
return /* @__PURE__ */ jsx46(
|
|
5932
|
+
StyledList,
|
|
5933
|
+
{
|
|
5934
|
+
...getBaseHTMLProps23(id, className, htmlProps, rest),
|
|
5935
|
+
as,
|
|
5936
|
+
ref,
|
|
5937
|
+
$listType: listType,
|
|
5938
|
+
$typographyType: typographyType7,
|
|
5939
|
+
children
|
|
5940
|
+
}
|
|
5941
|
+
);
|
|
5906
5942
|
}
|
|
5907
5943
|
);
|
|
5908
5944
|
List3.displayName = "List";
|
|
@@ -5975,7 +6011,9 @@ import {
|
|
|
5975
6011
|
focusVisibleWithBorder
|
|
5976
6012
|
} from "@norges-domstoler/dds-form";
|
|
5977
6013
|
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
5978
|
-
var Container6 = styled42.div
|
|
6014
|
+
var Container6 = styled42.div.withConfig({
|
|
6015
|
+
shouldForwardProp: (prop) => prop !== "color" && prop !== "cardType"
|
|
6016
|
+
})`
|
|
5979
6017
|
border: ${cardTokens.base.border};
|
|
5980
6018
|
${getFontStyling11(defaultTypographyType3)};
|
|
5981
6019
|
&::selection,
|
|
@@ -6001,12 +6039,12 @@ var Container6 = styled42.div`
|
|
|
6001
6039
|
${focusVisibleWithBorder}
|
|
6002
6040
|
}
|
|
6003
6041
|
` : cardType === "expandable" ? css20`
|
|
6004
|
-
|
|
6005
|
-
|
|
6006
|
-
|
|
6007
|
-
|
|
6008
|
-
|
|
6009
|
-
|
|
6042
|
+
width: 100%;
|
|
6043
|
+
box-sizing: border-box;
|
|
6044
|
+
&:not(:first-of-type) {
|
|
6045
|
+
border-top: none;
|
|
6046
|
+
}
|
|
6047
|
+
` : ""}
|
|
6010
6048
|
`;
|
|
6011
6049
|
var Card = (props) => {
|
|
6012
6050
|
const {
|
|
@@ -6170,7 +6208,9 @@ function getTypographyType(props) {
|
|
|
6170
6208
|
const { typographyType: typographyType7 } = props;
|
|
6171
6209
|
return typographyType7 != null ? typographyType7 : typographyTypes4.header;
|
|
6172
6210
|
}
|
|
6173
|
-
var HeaderContainer = styled44.div
|
|
6211
|
+
var HeaderContainer = styled44.div.withConfig({
|
|
6212
|
+
shouldForwardProp: (prop) => prop !== "padding" && prop !== "typographyType" && prop !== "bold"
|
|
6213
|
+
})`
|
|
6174
6214
|
display: flex;
|
|
6175
6215
|
justify-content: space-between;
|
|
6176
6216
|
align-items: center;
|
|
@@ -6300,7 +6340,11 @@ function getPadding(props) {
|
|
|
6300
6340
|
const { padding } = props;
|
|
6301
6341
|
return padding != null ? padding : cardAccordionTokens.body.padding;
|
|
6302
6342
|
}
|
|
6303
|
-
var Body2 = styled45.div
|
|
6343
|
+
var Body2 = styled45.div.withConfig({
|
|
6344
|
+
shouldForwardProp: (prop) => {
|
|
6345
|
+
return prop !== "animate" && prop !== "height" && prop !== "isExpanded";
|
|
6346
|
+
}
|
|
6347
|
+
})`
|
|
6304
6348
|
@media (prefers-reduced-motion: no-preference) {
|
|
6305
6349
|
${({ animate }) => animate && expandingAnimation}
|
|
6306
6350
|
}
|
|
@@ -6308,7 +6352,18 @@ var Body2 = styled45.div`
|
|
|
6308
6352
|
height: ${({ height, isExpanded }) => isExpanded ? height : 0}px;
|
|
6309
6353
|
overflow: hidden;
|
|
6310
6354
|
`;
|
|
6311
|
-
var BodyContainer = styled45.div
|
|
6355
|
+
var BodyContainer = styled45.div.withConfig({
|
|
6356
|
+
shouldForwardProp: (prop) => {
|
|
6357
|
+
const styleOnlyProps = [
|
|
6358
|
+
"isExpanded",
|
|
6359
|
+
"maxHeight",
|
|
6360
|
+
"animate",
|
|
6361
|
+
"paddingTop",
|
|
6362
|
+
"padding"
|
|
6363
|
+
];
|
|
6364
|
+
return !styleOnlyProps.some((styleProp) => styleProp === prop);
|
|
6365
|
+
}
|
|
6366
|
+
})`
|
|
6312
6367
|
padding: ${getPadding};
|
|
6313
6368
|
|
|
6314
6369
|
${({ paddingTop }) => paddingTop && css22`
|
|
@@ -6457,7 +6512,7 @@ var BannerWrapper = styled46.div`
|
|
|
6457
6512
|
align-items: center;
|
|
6458
6513
|
border-bottom: ${banner2.borderBottom};
|
|
6459
6514
|
padding-right: ${banner2.paddingRight};
|
|
6460
|
-
${({ hasContextMenu }) => hasContextMenu && css23`
|
|
6515
|
+
${({ $hasContextMenu }) => $hasContextMenu && css23`
|
|
6461
6516
|
padding-right: ${banner2.hasContextMenu.paddingRight};
|
|
6462
6517
|
`}
|
|
6463
6518
|
`;
|
|
@@ -6502,7 +6557,9 @@ import { getFontStyling as getFontStyling14 } from "@norges-domstoler/dds-typogr
|
|
|
6502
6557
|
import { focusVisible as focusVisible6 } from "@norges-domstoler/dds-form";
|
|
6503
6558
|
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
6504
6559
|
var { navLink: navLink2 } = internalHeaderTokens;
|
|
6505
|
-
var Link2 = styled47.a
|
|
6560
|
+
var Link2 = styled47.a.withConfig({
|
|
6561
|
+
shouldForwardProp: (prop) => prop !== "isCurrent"
|
|
6562
|
+
})`
|
|
6506
6563
|
display: flex;
|
|
6507
6564
|
align-items: center;
|
|
6508
6565
|
height: 100%;
|
|
@@ -6607,7 +6664,7 @@ var InternalHeader = (props) => {
|
|
|
6607
6664
|
}) }) }) : null;
|
|
6608
6665
|
const hasContextMenu = hasContextMenuElements || !!userProps || hasNavInContextMenu;
|
|
6609
6666
|
return /* @__PURE__ */ jsxs30(OuterContainer3, { ...getBaseHTMLProps28(id, className, htmlProps, rest), children: [
|
|
6610
|
-
/* @__PURE__ */ jsx54(BannerWrapper, { hasContextMenu, children: /* @__PURE__ */ jsxs30(BannerLeftWrapper, { children: [
|
|
6667
|
+
/* @__PURE__ */ jsx54(BannerWrapper, { $hasContextMenu: hasContextMenu, children: /* @__PURE__ */ jsxs30(BannerLeftWrapper, { children: [
|
|
6611
6668
|
/* @__PURE__ */ jsx54(LovisaWrapper, { children: /* @__PURE__ */ jsx54(Typography12, { typographyType: "bodySans02", bold: true, as: "span", children: applicationName }) }),
|
|
6612
6669
|
/* @__PURE__ */ jsx54(ApplicationNameWrapper, { children: /* @__PURE__ */ jsx54(Typography12, { typographyType: "bodySans02", as: "span", children: applicationDesc }) })
|
|
6613
6670
|
] }) }),
|
|
@@ -6869,7 +6926,7 @@ var { wrapper: wrapper2, link: link4 } = skipToContentTokens;
|
|
|
6869
6926
|
var Wrapper5 = styled50.div`
|
|
6870
6927
|
box-sizing: border-box;
|
|
6871
6928
|
position: absolute;
|
|
6872
|
-
top: ${({ top }) => top};
|
|
6929
|
+
top: ${({ $top: top }) => top};
|
|
6873
6930
|
text-align: center;
|
|
6874
6931
|
overflow: hidden;
|
|
6875
6932
|
clip: rect(1px, 1px, 1px, 1px);
|
|
@@ -6923,12 +6980,15 @@ var SkipToContent = forwardRef38(
|
|
|
6923
6980
|
style,
|
|
6924
6981
|
...restHtmlProps
|
|
6925
6982
|
} = htmlProps;
|
|
6926
|
-
|
|
6927
|
-
|
|
6928
|
-
|
|
6929
|
-
|
|
6930
|
-
|
|
6931
|
-
|
|
6983
|
+
return /* @__PURE__ */ jsx56(
|
|
6984
|
+
Wrapper5,
|
|
6985
|
+
{
|
|
6986
|
+
$top: top,
|
|
6987
|
+
className: joinClassNames3(className, htmlPropsClassName),
|
|
6988
|
+
style,
|
|
6989
|
+
children: /* @__PURE__ */ jsx56(Link3, { ...getBaseHTMLProps29(id, restHtmlProps, rest), ref, children: text })
|
|
6990
|
+
}
|
|
6991
|
+
);
|
|
6932
6992
|
}
|
|
6933
6993
|
);
|
|
6934
6994
|
SkipToContent.displayName = "SkipToContent";
|
|
@@ -7180,7 +7240,9 @@ import { focusVisible as focusVisible7 } from "@norges-domstoler/dds-form";
|
|
|
7180
7240
|
import styled52 from "styled-components";
|
|
7181
7241
|
import { ddsBaseTokens as ddsBaseTokens27 } from "@norges-domstoler/dds-design-tokens";
|
|
7182
7242
|
import { changeRGBAAlpha } from "@norges-domstoler/dds-core";
|
|
7183
|
-
var Backdrop = styled52.div
|
|
7243
|
+
var Backdrop = styled52.div.withConfig({
|
|
7244
|
+
shouldForwardProp: (prop) => prop !== "isOpen"
|
|
7245
|
+
})`
|
|
7184
7246
|
position: fixed;
|
|
7185
7247
|
display: flex;
|
|
7186
7248
|
align-items: center;
|
|
@@ -7212,10 +7274,13 @@ function handleElementWithBackdropMount(container16) {
|
|
|
7212
7274
|
}
|
|
7213
7275
|
}
|
|
7214
7276
|
function handleElementWithBackdropUnmount(container16) {
|
|
7215
|
-
const scrollY = parseInt(document.body.style.top)
|
|
7277
|
+
const scrollY = parseInt(document.body.style.top);
|
|
7216
7278
|
container16.style.removeProperty("overflow-y");
|
|
7217
7279
|
container16.style.removeProperty("position");
|
|
7218
7280
|
container16.style.removeProperty("top");
|
|
7281
|
+
if (isNaN(scrollY)) {
|
|
7282
|
+
return;
|
|
7283
|
+
}
|
|
7219
7284
|
window.scrollTo(0, scrollY * -1);
|
|
7220
7285
|
}
|
|
7221
7286
|
|
|
@@ -7281,40 +7346,38 @@ var Modal = forwardRef40((props, ref) => {
|
|
|
7281
7346
|
useOnClickOutside3(modalRef.current, () => handleClose());
|
|
7282
7347
|
useOnKeyDown4(["Escape", "Esc"], () => handleClose());
|
|
7283
7348
|
const hasTransitionedIn = useMountTransition(isOpen, 200);
|
|
7284
|
-
const backdropProps = {
|
|
7285
|
-
isOpen: hasTransitionedIn && isOpen
|
|
7286
|
-
};
|
|
7287
|
-
const containerProps = {
|
|
7288
|
-
...getBaseHTMLProps31(id, className, htmlProps, rest),
|
|
7289
|
-
ref: combinedRef,
|
|
7290
|
-
role: "dialog",
|
|
7291
|
-
"aria-modal": true,
|
|
7292
|
-
"aria-hidden": !isOpen,
|
|
7293
|
-
tabIndex: -1,
|
|
7294
|
-
"aria-labelledby": headerId,
|
|
7295
|
-
id: modalId
|
|
7296
|
-
};
|
|
7297
|
-
const headerContainerProps = {
|
|
7298
|
-
id: headerId
|
|
7299
|
-
};
|
|
7300
7349
|
return isOpen || hasTransitionedIn ? createPortal(
|
|
7301
|
-
/* @__PURE__ */ jsx58(Backdrop, {
|
|
7302
|
-
|
|
7303
|
-
|
|
7304
|
-
|
|
7305
|
-
|
|
7306
|
-
|
|
7307
|
-
|
|
7308
|
-
|
|
7309
|
-
|
|
7310
|
-
|
|
7311
|
-
|
|
7312
|
-
|
|
7313
|
-
|
|
7314
|
-
|
|
7315
|
-
|
|
7316
|
-
|
|
7317
|
-
|
|
7350
|
+
/* @__PURE__ */ jsx58(Backdrop, { isOpen: hasTransitionedIn && isOpen, children: /* @__PURE__ */ jsxs33(
|
|
7351
|
+
Container8,
|
|
7352
|
+
{
|
|
7353
|
+
...getBaseHTMLProps31(id, className, htmlProps, rest),
|
|
7354
|
+
ref: combinedRef,
|
|
7355
|
+
role: "dialog",
|
|
7356
|
+
"aria-modal": true,
|
|
7357
|
+
"aria-hidden": !isOpen,
|
|
7358
|
+
tabIndex: -1,
|
|
7359
|
+
"aria-labelledby": headerId,
|
|
7360
|
+
id: modalId,
|
|
7361
|
+
elevation: 4,
|
|
7362
|
+
children: [
|
|
7363
|
+
/* @__PURE__ */ jsxs33(ContentContainer2, { children: [
|
|
7364
|
+
header3 && /* @__PURE__ */ jsx58(HeaderContainer2, { id: headerId, children: typeof header3 === "string" ? /* @__PURE__ */ jsx58(Typography13, { typographyType: "headingSans03", children: header3 }) : header3 }),
|
|
7365
|
+
children
|
|
7366
|
+
] }),
|
|
7367
|
+
onClose && /* @__PURE__ */ jsx58(
|
|
7368
|
+
StyledButton2,
|
|
7369
|
+
{
|
|
7370
|
+
size: "small",
|
|
7371
|
+
appearance: "borderless",
|
|
7372
|
+
purpose: "secondary",
|
|
7373
|
+
icon: CloseIcon4,
|
|
7374
|
+
onClick: handleClose,
|
|
7375
|
+
"aria-label": "Lukk dialog"
|
|
7376
|
+
}
|
|
7377
|
+
)
|
|
7378
|
+
]
|
|
7379
|
+
}
|
|
7380
|
+
) }),
|
|
7318
7381
|
parentElement
|
|
7319
7382
|
) : null;
|
|
7320
7383
|
});
|
|
@@ -7405,7 +7468,17 @@ var getMaxWidth = (size) => {
|
|
|
7405
7468
|
else
|
|
7406
7469
|
return "400px";
|
|
7407
7470
|
};
|
|
7408
|
-
var Container11 = styled56(Paper4)
|
|
7471
|
+
var Container11 = styled56(Paper4).withConfig({
|
|
7472
|
+
shouldForwardProp: (prop) => {
|
|
7473
|
+
const styleOnlyProps = [
|
|
7474
|
+
"placement",
|
|
7475
|
+
"isOpen",
|
|
7476
|
+
"widthProps",
|
|
7477
|
+
"size"
|
|
7478
|
+
];
|
|
7479
|
+
return !styleOnlyProps.some((styleProp) => styleProp === prop);
|
|
7480
|
+
}
|
|
7481
|
+
})`
|
|
7409
7482
|
position: fixed;
|
|
7410
7483
|
top: 0;
|
|
7411
7484
|
height: 100%;
|
|
@@ -7430,9 +7503,9 @@ var Container11 = styled56(Paper4)`
|
|
|
7430
7503
|
left: 0;
|
|
7431
7504
|
transform: ${isOpen ? "translate(0px)" : "translateX(-100%)"};
|
|
7432
7505
|
` : placement === "right" ? css26`
|
|
7433
|
-
|
|
7434
|
-
|
|
7435
|
-
|
|
7506
|
+
right: 0;
|
|
7507
|
+
transform: ${isOpen ? "translate(0px)" : "translateX(100%)"};
|
|
7508
|
+
` : ""}
|
|
7436
7509
|
|
|
7437
7510
|
@media (prefers-reduced-motion: no-preference) {
|
|
7438
7511
|
transition: transform 0.5s;
|
|
@@ -7626,7 +7699,7 @@ var { spacing: Spacing } = ddsBaseTokens30;
|
|
|
7626
7699
|
var { wrapper: wrapper6, content: content4, closeButton: closeButton2, title: title2 } = popoverTokens;
|
|
7627
7700
|
var Wrapper6 = styled57(Paper5)`
|
|
7628
7701
|
opacity: 0;
|
|
7629
|
-
${({ hasTransitionedIn, isOpen }) => hasTransitionedIn && visibilityTransition4(hasTransitionedIn && isOpen)}
|
|
7702
|
+
${({ $hasTransitionedIn, $isOpen }) => $hasTransitionedIn && visibilityTransition4($hasTransitionedIn && $isOpen)}
|
|
7630
7703
|
position: absolute;
|
|
7631
7704
|
width: fit-content;
|
|
7632
7705
|
z-index: 100;
|
|
@@ -7635,20 +7708,20 @@ var Wrapper6 = styled57(Paper5)`
|
|
|
7635
7708
|
&:focus-visible {
|
|
7636
7709
|
${focusVisible9}
|
|
7637
7710
|
}
|
|
7638
|
-
${({ sizeProps }) => sizeProps && css27`
|
|
7639
|
-
width: ${sizeProps.width};
|
|
7640
|
-
height: ${sizeProps.height};
|
|
7641
|
-
min-width: ${sizeProps.minWidth};
|
|
7642
|
-
min-height: ${sizeProps.minHeight};
|
|
7643
|
-
max-width: ${sizeProps.maxWidth};
|
|
7644
|
-
max-height: ${sizeProps.maxHeight};
|
|
7711
|
+
${({ $sizeProps }) => $sizeProps && css27`
|
|
7712
|
+
width: ${$sizeProps.width};
|
|
7713
|
+
height: ${$sizeProps.height};
|
|
7714
|
+
min-width: ${$sizeProps.minWidth};
|
|
7715
|
+
min-height: ${$sizeProps.minHeight};
|
|
7716
|
+
max-width: ${$sizeProps.maxWidth};
|
|
7717
|
+
max-height: ${$sizeProps.maxHeight};
|
|
7645
7718
|
`}
|
|
7646
7719
|
`;
|
|
7647
7720
|
var TitleContainer = styled57.div`
|
|
7648
7721
|
margin-right: ${title2.marginRight};
|
|
7649
7722
|
`;
|
|
7650
7723
|
var ContentContainer4 = styled57.div`
|
|
7651
|
-
${({ withCloseButton, hasTitle }) => withCloseButton &&
|
|
7724
|
+
${({ $withCloseButton, $hasTitle }) => $withCloseButton && !$hasTitle && css27`
|
|
7652
7725
|
margin-top: ${content4.noTitle.marginTop};
|
|
7653
7726
|
`}
|
|
7654
7727
|
`;
|
|
@@ -7699,30 +7772,42 @@ var Popover = forwardRef44(
|
|
|
7699
7772
|
onClose && onClose();
|
|
7700
7773
|
});
|
|
7701
7774
|
const hasTransitionedIn = useMountTransition3(isOpen, 400);
|
|
7702
|
-
|
|
7703
|
-
|
|
7704
|
-
|
|
7705
|
-
|
|
7706
|
-
|
|
7707
|
-
|
|
7708
|
-
|
|
7709
|
-
|
|
7710
|
-
|
|
7711
|
-
|
|
7712
|
-
|
|
7713
|
-
|
|
7714
|
-
|
|
7715
|
-
|
|
7716
|
-
|
|
7717
|
-
|
|
7718
|
-
|
|
7719
|
-
|
|
7720
|
-
|
|
7721
|
-
|
|
7722
|
-
|
|
7723
|
-
|
|
7724
|
-
|
|
7725
|
-
|
|
7775
|
+
return isOpen || hasTransitionedIn ? /* @__PURE__ */ jsxs36(
|
|
7776
|
+
Wrapper6,
|
|
7777
|
+
{
|
|
7778
|
+
...getBaseHTMLProps34(id, className, htmlProps, rest),
|
|
7779
|
+
ref: multiRef,
|
|
7780
|
+
$isOpen: isOpen,
|
|
7781
|
+
$hasTransitionedIn: hasTransitionedIn,
|
|
7782
|
+
tabIndex: -1,
|
|
7783
|
+
style: { ...htmlProps.style, ...styles.floating },
|
|
7784
|
+
role: "dialog",
|
|
7785
|
+
elevation: 3,
|
|
7786
|
+
border: "light",
|
|
7787
|
+
children: [
|
|
7788
|
+
title3 && /* @__PURE__ */ jsx62(TitleContainer, { children: typeof title3 === "string" ? /* @__PURE__ */ jsx62(Typography15, { typographyType: "headingSans02", children: title3 }) : title3 }),
|
|
7789
|
+
/* @__PURE__ */ jsx62(
|
|
7790
|
+
ContentContainer4,
|
|
7791
|
+
{
|
|
7792
|
+
$hasTitle: !!title3,
|
|
7793
|
+
$withCloseButton: withCloseButton,
|
|
7794
|
+
children
|
|
7795
|
+
}
|
|
7796
|
+
),
|
|
7797
|
+
withCloseButton && /* @__PURE__ */ jsx62(
|
|
7798
|
+
StyledButton4,
|
|
7799
|
+
{
|
|
7800
|
+
icon: CloseIcon6,
|
|
7801
|
+
appearance: "borderless",
|
|
7802
|
+
purpose: "secondary",
|
|
7803
|
+
size: "small",
|
|
7804
|
+
onClick: onCloseButtonClick,
|
|
7805
|
+
"aria-label": "Lukk"
|
|
7806
|
+
}
|
|
7807
|
+
)
|
|
7808
|
+
]
|
|
7809
|
+
}
|
|
7810
|
+
) : null;
|
|
7726
7811
|
}
|
|
7727
7812
|
);
|
|
7728
7813
|
Popover.displayName = "Popover";
|
|
@@ -7856,7 +7941,7 @@ var Content2 = styled58.span`
|
|
|
7856
7941
|
${focusVisibleTransitionValue6};
|
|
7857
7942
|
}
|
|
7858
7943
|
|
|
7859
|
-
${({ hasIcon }) => hasIcon && css28`
|
|
7944
|
+
${({ $hasIcon }) => $hasIcon && css28`
|
|
7860
7945
|
gap: ${toggleButton2.gap};
|
|
7861
7946
|
`}
|
|
7862
7947
|
|
|
@@ -7890,17 +7975,16 @@ var ToggleButton = forwardRef45(
|
|
|
7890
7975
|
({ id, label: label3, icon: icon12, className, htmlProps, ...rest }, ref) => {
|
|
7891
7976
|
const generatedId = useId19();
|
|
7892
7977
|
const uniqueId = id != null ? id : `${generatedId}-toggleButton`;
|
|
7893
|
-
|
|
7894
|
-
|
|
7895
|
-
|
|
7896
|
-
|
|
7897
|
-
|
|
7898
|
-
|
|
7899
|
-
|
|
7900
|
-
|
|
7901
|
-
|
|
7902
|
-
/* @__PURE__ */
|
|
7903
|
-
/* @__PURE__ */ jsxs37(Content2, { hasIcon: !!icon12, children: [
|
|
7978
|
+
return /* @__PURE__ */ jsxs37(Container12, { htmlFor: uniqueId, children: [
|
|
7979
|
+
/* @__PURE__ */ jsx64(
|
|
7980
|
+
HiddenInput3,
|
|
7981
|
+
{
|
|
7982
|
+
...getBaseHTMLProps35(uniqueId, className, htmlProps, rest),
|
|
7983
|
+
ref,
|
|
7984
|
+
type: "checkbox"
|
|
7985
|
+
}
|
|
7986
|
+
),
|
|
7987
|
+
/* @__PURE__ */ jsxs37(Content2, { $hasIcon: !!icon12, children: [
|
|
7904
7988
|
icon12 && /* @__PURE__ */ jsx64(Icon15, { icon: icon12, iconSize: "inherit" }),
|
|
7905
7989
|
" ",
|
|
7906
7990
|
label3
|
|
@@ -7997,8 +8081,8 @@ var useTabsContext = () => useContext6(TabsContext);
|
|
|
7997
8081
|
// src/components/Tabs/Tabs.tsx
|
|
7998
8082
|
import { jsx as jsx66 } from "react/jsx-runtime";
|
|
7999
8083
|
var Container14 = styled60.div`
|
|
8000
|
-
${({ width }) => width && css30`
|
|
8001
|
-
width: ${width};
|
|
8084
|
+
${({ $width }) => $width && css30`
|
|
8085
|
+
width: ${$width};
|
|
8002
8086
|
`};
|
|
8003
8087
|
`;
|
|
8004
8088
|
var Tabs = forwardRef46((props, ref) => {
|
|
@@ -8045,7 +8129,7 @@ var Tabs = forwardRef46((props, ref) => {
|
|
|
8045
8129
|
setHasTabFocus,
|
|
8046
8130
|
tabContentDirection
|
|
8047
8131
|
},
|
|
8048
|
-
children: /* @__PURE__ */ jsx66(Container14, { ...containerProps, width, children })
|
|
8132
|
+
children: /* @__PURE__ */ jsx66(Container14, { ...containerProps, $width: width, children })
|
|
8049
8133
|
}
|
|
8050
8134
|
);
|
|
8051
8135
|
});
|
|
@@ -8138,12 +8222,12 @@ var Button2 = styled61.button`
|
|
|
8138
8222
|
${focusVisibleTransitionValue7};
|
|
8139
8223
|
}
|
|
8140
8224
|
|
|
8141
|
-
${({ direction }) => css31`
|
|
8142
|
-
flex-direction: ${direction};
|
|
8143
|
-
gap: ${tab2[direction].gap};
|
|
8225
|
+
${({ $direction }) => css31`
|
|
8226
|
+
flex-direction: ${$direction};
|
|
8227
|
+
gap: ${tab2[$direction].gap};
|
|
8144
8228
|
`};
|
|
8145
8229
|
|
|
8146
|
-
${({ active }) => active && css31`
|
|
8230
|
+
${({ $active }) => $active && css31`
|
|
8147
8231
|
background-color: ${tab2.active.backgroundColor};
|
|
8148
8232
|
border-color: ${tab2.active.borderColor};
|
|
8149
8233
|
color: ${tab2.active.color};
|
|
@@ -8204,21 +8288,24 @@ var Tab = forwardRef47((props, ref) => {
|
|
|
8204
8288
|
handleSelect();
|
|
8205
8289
|
onKeyDown && onKeyDown(e);
|
|
8206
8290
|
};
|
|
8207
|
-
|
|
8208
|
-
|
|
8209
|
-
|
|
8210
|
-
|
|
8211
|
-
|
|
8212
|
-
|
|
8213
|
-
|
|
8214
|
-
|
|
8215
|
-
|
|
8216
|
-
|
|
8217
|
-
|
|
8218
|
-
|
|
8219
|
-
|
|
8220
|
-
|
|
8221
|
-
|
|
8291
|
+
return /* @__PURE__ */ jsxs39(
|
|
8292
|
+
Button2,
|
|
8293
|
+
{
|
|
8294
|
+
...getBaseHTMLProps38(id, className, htmlProps, rest),
|
|
8295
|
+
ref: combinedRef,
|
|
8296
|
+
"aria-selected": active,
|
|
8297
|
+
role: "tab",
|
|
8298
|
+
$active: active,
|
|
8299
|
+
$direction: tabContentDirection,
|
|
8300
|
+
onClick: handleOnClick,
|
|
8301
|
+
onKeyDown: handleOnKeyDown,
|
|
8302
|
+
tabIndex: focus ? 0 : -1,
|
|
8303
|
+
children: [
|
|
8304
|
+
icon12 && /* @__PURE__ */ jsx67(Icon16, { icon: icon12, iconSize: "inherit" }),
|
|
8305
|
+
/* @__PURE__ */ jsx67("span", { children })
|
|
8306
|
+
]
|
|
8307
|
+
}
|
|
8308
|
+
);
|
|
8222
8309
|
});
|
|
8223
8310
|
Tab.displayName = "Tab";
|
|
8224
8311
|
|
|
@@ -8332,7 +8419,7 @@ var Panel = styled63.div`
|
|
|
8332
8419
|
transition: ${focusVisibleTransitionValue9};
|
|
8333
8420
|
}
|
|
8334
8421
|
|
|
8335
|
-
${({ active }) =>
|
|
8422
|
+
${({ $active }) => !$active && css32`
|
|
8336
8423
|
display: none;
|
|
8337
8424
|
`}
|
|
8338
8425
|
&:focus-visible {
|
|
@@ -8341,14 +8428,17 @@ var Panel = styled63.div`
|
|
|
8341
8428
|
`;
|
|
8342
8429
|
var TabPanel = forwardRef49(
|
|
8343
8430
|
({ active = false, children, id, className, htmlProps, ...rest }, ref) => {
|
|
8344
|
-
|
|
8345
|
-
|
|
8346
|
-
|
|
8347
|
-
|
|
8348
|
-
|
|
8349
|
-
|
|
8350
|
-
|
|
8351
|
-
|
|
8431
|
+
return /* @__PURE__ */ jsx69(
|
|
8432
|
+
Panel,
|
|
8433
|
+
{
|
|
8434
|
+
...getBaseHTMLProps39(id, className, htmlProps, rest),
|
|
8435
|
+
ref,
|
|
8436
|
+
tabIndex: 0,
|
|
8437
|
+
role: "tabpanel",
|
|
8438
|
+
$active: active,
|
|
8439
|
+
children
|
|
8440
|
+
}
|
|
8441
|
+
);
|
|
8352
8442
|
}
|
|
8353
8443
|
);
|
|
8354
8444
|
TabPanel.displayName = "TabPanel";
|
|
@@ -8425,9 +8515,9 @@ var Wrapper7 = styled64(TextOverflowEllipsisWrapper)`
|
|
|
8425
8515
|
border-radius: ${wrapper8.borderRadius};
|
|
8426
8516
|
padding: ${wrapper8.padding};
|
|
8427
8517
|
${getFontStyling19(typographyType5)}
|
|
8428
|
-
${({ purpose }) => css33`
|
|
8429
|
-
background-color: ${wrapper8.purpose[purpose].backgroundColor};
|
|
8430
|
-
border-color: ${wrapper8.purpose[purpose].borderColor};
|
|
8518
|
+
${({ $purpose }) => css33`
|
|
8519
|
+
background-color: ${wrapper8.purpose[$purpose].backgroundColor};
|
|
8520
|
+
border-color: ${wrapper8.purpose[$purpose].borderColor};
|
|
8431
8521
|
`}
|
|
8432
8522
|
`;
|
|
8433
8523
|
var Tag = forwardRef51((props, ref) => {
|
|
@@ -8444,7 +8534,7 @@ var Tag = forwardRef51((props, ref) => {
|
|
|
8444
8534
|
{
|
|
8445
8535
|
...getBaseHTMLProps40(id, className, htmlProps, rest),
|
|
8446
8536
|
ref,
|
|
8447
|
-
purpose,
|
|
8537
|
+
$purpose: purpose,
|
|
8448
8538
|
children: /* @__PURE__ */ jsx71(TextOverflowEllipsisInner, { children: text })
|
|
8449
8539
|
}
|
|
8450
8540
|
);
|
|
@@ -8681,8 +8771,8 @@ var OuterContainer4 = styled67.div`
|
|
|
8681
8771
|
*::selection {
|
|
8682
8772
|
${selection13}
|
|
8683
8773
|
}
|
|
8684
|
-
${({ width }) => width && css34`
|
|
8685
|
-
width: ${width};
|
|
8774
|
+
${({ $width }) => $width && css34`
|
|
8775
|
+
width: ${$width};
|
|
8686
8776
|
`}
|
|
8687
8777
|
`;
|
|
8688
8778
|
var Bar2 = styled67.div`
|
|
@@ -8727,7 +8817,7 @@ var ToggleBar = (props) => {
|
|
|
8727
8817
|
...getBaseHTMLProps42(id, className, htmlProps, rest),
|
|
8728
8818
|
role: "radiogroup",
|
|
8729
8819
|
"aria-labelledby": labelId != null ? labelId : htmlProps == null ? void 0 : htmlProps["aria-labelledby"],
|
|
8730
|
-
width,
|
|
8820
|
+
$width: width,
|
|
8731
8821
|
children: [
|
|
8732
8822
|
label3 && /* @__PURE__ */ jsx74(Typography17, { typographyType: "supportingStyleLabel01", id: labelId, children: label3 }),
|
|
8733
8823
|
/* @__PURE__ */ jsx74(Bar2, { children })
|
|
@@ -8773,14 +8863,14 @@ var Content3 = styled68.span`
|
|
|
8773
8863
|
}
|
|
8774
8864
|
background-color: ${content6.base.backgroundColor};
|
|
8775
8865
|
|
|
8776
|
-
${({ size, justIcon }) => css35`
|
|
8777
|
-
${justIcon ? css35`
|
|
8778
|
-
font-size: ${content6.size[size].justIcon.fontSize};
|
|
8779
|
-
padding: ${content6.size[size].justIcon.padding};
|
|
8866
|
+
${({ $size, $justIcon }) => css35`
|
|
8867
|
+
${$justIcon ? css35`
|
|
8868
|
+
font-size: ${content6.size[$size].justIcon.fontSize};
|
|
8869
|
+
padding: ${content6.size[$size].justIcon.padding};
|
|
8780
8870
|
` : css35`
|
|
8781
|
-
gap: ${content6.size[size].withText.gap};
|
|
8782
|
-
padding: ${content6.size[size].withText.padding};
|
|
8783
|
-
${getFontStyling21(typographyTypes6[size])}
|
|
8871
|
+
gap: ${content6.size[$size].withText.gap};
|
|
8872
|
+
padding: ${content6.size[$size].withText.padding};
|
|
8873
|
+
${getFontStyling21(typographyTypes6[$size])}
|
|
8784
8874
|
`}
|
|
8785
8875
|
`}
|
|
8786
8876
|
`;
|
|
@@ -8869,7 +8959,7 @@ var ToggleRadio = forwardRef54(
|
|
|
8869
8959
|
checked: calculateChecked(value, group4, checked)
|
|
8870
8960
|
}
|
|
8871
8961
|
),
|
|
8872
|
-
/* @__PURE__ */ jsxs42(Content3, { size: group4.size, justIcon: !!icon12 && !label3, children: [
|
|
8962
|
+
/* @__PURE__ */ jsxs42(Content3, { $size: group4.size, $justIcon: !!icon12 && !label3, children: [
|
|
8873
8963
|
icon12 && /* @__PURE__ */ jsx75(Icon17, { icon: icon12, iconSize: "inherit" }),
|
|
8874
8964
|
label3 && /* @__PURE__ */ jsx75("span", { children: label3 })
|
|
8875
8965
|
] })
|
|
@@ -9006,7 +9096,16 @@ var getHooksGridStyling = (screenSize, maxWidth, rowGap) => {
|
|
|
9006
9096
|
maxWidth: maxWidth && maxWidth[getLiteralScreenSize(screenSize)] && maxWidth[getLiteralScreenSize(screenSize)]
|
|
9007
9097
|
};
|
|
9008
9098
|
};
|
|
9009
|
-
var StyledGrid = styled69.div
|
|
9099
|
+
var StyledGrid = styled69.div.withConfig({
|
|
9100
|
+
shouldForwardProp: (prop) => {
|
|
9101
|
+
const styleOnlyProps = [
|
|
9102
|
+
"maxWidth",
|
|
9103
|
+
"rowGap",
|
|
9104
|
+
"screenSize"
|
|
9105
|
+
];
|
|
9106
|
+
return !styleOnlyProps.some((styleProp) => styleProp === prop);
|
|
9107
|
+
}
|
|
9108
|
+
})`
|
|
9010
9109
|
display: grid;
|
|
9011
9110
|
${({ maxWidth }) => css36`
|
|
9012
9111
|
max-width: ${maxWidth};
|
|
@@ -9050,7 +9149,17 @@ var isRelativeGridColumn = (type) => {
|
|
|
9050
9149
|
var isGridColumn = (type) => {
|
|
9051
9150
|
return type.xs !== void 0 || type.sm !== void 0 || type.md !== void 0 || type.lg !== void 0 || type.xl !== void 0;
|
|
9052
9151
|
};
|
|
9053
|
-
var StyledGridChild = styled70.div
|
|
9152
|
+
var StyledGridChild = styled70.div.withConfig({
|
|
9153
|
+
shouldForwardProp: (prop) => {
|
|
9154
|
+
const styleOnlyProps = [
|
|
9155
|
+
"columnsOccupied",
|
|
9156
|
+
"justifySelf",
|
|
9157
|
+
"gridRow",
|
|
9158
|
+
"screenSize"
|
|
9159
|
+
];
|
|
9160
|
+
return !styleOnlyProps.some((styleProp) => styleProp === prop);
|
|
9161
|
+
}
|
|
9162
|
+
})`
|
|
9054
9163
|
grid-column: ${({ screenSize, columnsOccupied }) => columnsOccupied === "all" ? "1 / -1" : isGridColumn(columnsOccupied) ? columnsOccupied[getLiteralScreenSize2(screenSize)] : isRelativeGridColumn(columnsOccupied) ? gridTokens[screenSize].columns[columnsOccupied].gridColumn : ""};
|
|
9055
9164
|
|
|
9056
9165
|
justify-self: ${({ justifySelf }) => justifySelf && justifySelf};
|
|
@@ -9218,7 +9327,7 @@ var ItemNumber = styled71.div`
|
|
|
9218
9327
|
${getFontStyling22(typographyTypes7.number)}
|
|
9219
9328
|
font-weight: 600;
|
|
9220
9329
|
|
|
9221
|
-
${({ state }) => {
|
|
9330
|
+
${({ $state: state }) => {
|
|
9222
9331
|
switch (state) {
|
|
9223
9332
|
case "activeIncomplete":
|
|
9224
9333
|
return css37`
|
|
@@ -9259,7 +9368,7 @@ var ItemText = styled71.div`
|
|
|
9259
9368
|
text-decoration: ${itemText2.textDecoration};
|
|
9260
9369
|
transition: text-decoration-color 0.2s;
|
|
9261
9370
|
|
|
9262
|
-
${({ state }) => {
|
|
9371
|
+
${({ $state: state }) => {
|
|
9263
9372
|
switch (state) {
|
|
9264
9373
|
case "activeCompleted":
|
|
9265
9374
|
case "activeIncomplete":
|
|
@@ -9298,7 +9407,7 @@ var ItemContentWrapper = styled71.button`
|
|
|
9298
9407
|
${focusVisible15}
|
|
9299
9408
|
}
|
|
9300
9409
|
|
|
9301
|
-
${({ state }) => state !== "disabled" && css37`
|
|
9410
|
+
${({ $state: state }) => state !== "disabled" && css37`
|
|
9302
9411
|
cursor: pointer;
|
|
9303
9412
|
`}
|
|
9304
9413
|
`;
|
|
@@ -9314,7 +9423,7 @@ var ProgressTrackerItem = (props) => {
|
|
|
9314
9423
|
const { activeStep, handleStepChange } = useProgressTrackerContext();
|
|
9315
9424
|
const active = activeStep === index;
|
|
9316
9425
|
const styleProps = {
|
|
9317
|
-
state: toItemState(active, completed, disabled)
|
|
9426
|
+
$state: toItemState(active, completed, disabled)
|
|
9318
9427
|
};
|
|
9319
9428
|
const stepNumberContent = useMemo(() => {
|
|
9320
9429
|
if (completed) {
|
|
@@ -9541,7 +9650,9 @@ var inlineEditTokens = {
|
|
|
9541
9650
|
import { StatefulInput as StatefulInput4 } from "@norges-domstoler/dds-form";
|
|
9542
9651
|
var { inlineEdit: inlineEdit2, iconWrapper: iconWrapper2 } = inlineEditTokens;
|
|
9543
9652
|
var defaultWidth4 = "140px";
|
|
9544
|
-
var StyledInlineInput = styled73(StatefulInput4)
|
|
9653
|
+
var StyledInlineInput = styled73(StatefulInput4).withConfig({
|
|
9654
|
+
shouldForwardProp: (prop) => prop !== "isEditing" && prop !== "hideIcon"
|
|
9655
|
+
})`
|
|
9545
9656
|
border-color: transparent;
|
|
9546
9657
|
background-color: ${inlineEdit2.backgroundColor};
|
|
9547
9658
|
padding: ${inlineEdit2.padding};
|
|
@@ -10000,7 +10111,18 @@ import {
|
|
|
10000
10111
|
getBaseHTMLProps as getBaseHTMLProps47
|
|
10001
10112
|
} from "@norges-domstoler/dds-core";
|
|
10002
10113
|
import { jsx as jsx87 } from "react/jsx-runtime";
|
|
10003
|
-
var Stack = styled76.div
|
|
10114
|
+
var Stack = styled76.div.withConfig({
|
|
10115
|
+
shouldForwardProp: (prop) => {
|
|
10116
|
+
const styleOnlyProps = [
|
|
10117
|
+
"align",
|
|
10118
|
+
"direction",
|
|
10119
|
+
"gap",
|
|
10120
|
+
"justify",
|
|
10121
|
+
"padding"
|
|
10122
|
+
];
|
|
10123
|
+
return !styleOnlyProps.some((p) => p === prop);
|
|
10124
|
+
}
|
|
10125
|
+
})`
|
|
10004
10126
|
display: flex;
|
|
10005
10127
|
flex-direction: ${({ direction }) => direction === "horizontal" ? "row" : "column"};
|
|
10006
10128
|
align-items: ${(props) => props.align};
|
|
@@ -10450,14 +10572,14 @@ var Wrapper8 = styled79.div`
|
|
|
10450
10572
|
`;
|
|
10451
10573
|
var Root = styled79.div`
|
|
10452
10574
|
box-sizing: border-box;
|
|
10453
|
-
border-width: ${({ hasRootErrors }) => hasRootErrors ? "2px" : "1px"};
|
|
10575
|
+
border-width: ${({ $hasRootErrors: hasRootErrors }) => hasRootErrors ? "2px" : "1px"};
|
|
10454
10576
|
border-style: dashed;
|
|
10455
|
-
border-color: ${({ isDragActive, hasRootErrors }) => isDragActive ? rootTokens.dragActive.borderColor : hasRootErrors ? rootTokens.borderColorError : rootTokens.borderColor};
|
|
10456
|
-
padding: ${({ hasRootErrors }) => hasRootErrors ? `calc(${rootTokens.paddingLeftRightTop} - 1px) calc(${rootTokens.paddingLeftRightTop} - 1px) ${rootTokens.paddingBottom}` : `${rootTokens.paddingLeftRightTop} ${rootTokens.paddingLeftRightTop} ${rootTokens.paddingBottom}`};
|
|
10577
|
+
border-color: ${({ $isDragActive, $hasRootErrors }) => $isDragActive ? rootTokens.dragActive.borderColor : $hasRootErrors ? rootTokens.borderColorError : rootTokens.borderColor};
|
|
10578
|
+
padding: ${({ $hasRootErrors }) => $hasRootErrors ? `calc(${rootTokens.paddingLeftRightTop} - 1px) calc(${rootTokens.paddingLeftRightTop} - 1px) ${rootTokens.paddingBottom}` : `${rootTokens.paddingLeftRightTop} ${rootTokens.paddingLeftRightTop} ${rootTokens.paddingBottom}`};
|
|
10457
10579
|
display: flex;
|
|
10458
10580
|
flex-direction: column;
|
|
10459
10581
|
gap: ${rootTokens.gap};
|
|
10460
|
-
background-color: ${({ isDragActive }) => isDragActive ? rootTokens.dragActive.backgroundColor : rootTokens.backgroundColor};
|
|
10582
|
+
background-color: ${({ $isDragActive }) => $isDragActive ? rootTokens.dragActive.backgroundColor : rootTokens.backgroundColor};
|
|
10461
10583
|
`;
|
|
10462
10584
|
var FileUploaderInput = styled79.input``;
|
|
10463
10585
|
var FileListElement = styled79.ul`
|
|
@@ -10525,8 +10647,8 @@ var FileUploader = (props) => {
|
|
|
10525
10647
|
Root,
|
|
10526
10648
|
{
|
|
10527
10649
|
...getRootProps(),
|
|
10528
|
-
isDragActive,
|
|
10529
|
-
hasRootErrors,
|
|
10650
|
+
$isDragActive: isDragActive,
|
|
10651
|
+
$hasRootErrors: hasRootErrors,
|
|
10530
10652
|
children: [
|
|
10531
10653
|
/* @__PURE__ */ jsx90(FileUploaderInput, { ...getInputProps() }),
|
|
10532
10654
|
"Dra og slipp filer her eller",
|
|
@@ -10635,35 +10757,22 @@ import { useEffect as useEffect19, useState as useState27 } from "react";
|
|
|
10635
10757
|
import { Paragraph as Paragraph2 } from "@norges-domstoler/dds-typography";
|
|
10636
10758
|
|
|
10637
10759
|
// src/components/Feedback/RatingComponent.tsx
|
|
10638
|
-
import styled83, { css as css41 } from "styled-components";
|
|
10639
|
-
import { ddsBaseTokens as ddsBaseTokens46 } from "@norges-domstoler/dds-design-tokens";
|
|
10640
|
-
import { Thumbup, Thumbdown } from "@norges-domstoler/dds-icons";
|
|
10641
|
-
import { Label as Label9 } from "@norges-domstoler/dds-typography";
|
|
10642
|
-
|
|
10643
|
-
// src/components/Feedback/FlexContainer.tsx
|
|
10644
10760
|
import styled82, { css as css40 } from "styled-components";
|
|
10645
10761
|
import { ddsBaseTokens as ddsBaseTokens45 } from "@norges-domstoler/dds-design-tokens";
|
|
10646
|
-
|
|
10647
|
-
|
|
10648
|
-
${({ flexDirection }) => css40`
|
|
10649
|
-
flex-direction: ${flexDirection};
|
|
10650
|
-
gap: ${ddsBaseTokens45.spacing.SizesDdsSpacingLocalX1};
|
|
10651
|
-
`};
|
|
10652
|
-
`;
|
|
10653
|
-
|
|
10654
|
-
// src/components/Feedback/RatingComponent.tsx
|
|
10762
|
+
import { Thumbup, Thumbdown } from "@norges-domstoler/dds-icons";
|
|
10763
|
+
import { Label as Label9 } from "@norges-domstoler/dds-typography";
|
|
10655
10764
|
import { jsx as jsx93, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
10656
|
-
var RatingContainer =
|
|
10765
|
+
var RatingContainer = styled82.div`
|
|
10657
10766
|
display: flex;
|
|
10658
|
-
gap: ${
|
|
10659
|
-
${({ layout }) =>
|
|
10660
|
-
flex-direction: ${layout === "horizontal" ? "row" : "column"};
|
|
10661
|
-
align-items: ${layout === "horizontal" ? "center" : "start"};
|
|
10767
|
+
gap: ${ddsBaseTokens45.spacing.SizesDdsSpacingLocalX1};
|
|
10768
|
+
${({ $layout }) => css40`
|
|
10769
|
+
flex-direction: ${$layout === "horizontal" ? "row" : "column"};
|
|
10770
|
+
align-items: ${$layout === "horizontal" ? "center" : "start"};
|
|
10662
10771
|
`}
|
|
10663
10772
|
`;
|
|
10664
|
-
var RatingButton =
|
|
10773
|
+
var RatingButton = styled82(Button)`
|
|
10665
10774
|
padding: 0px;
|
|
10666
|
-
color: ${
|
|
10775
|
+
color: ${ddsBaseTokens45.colors.DdsColorNeutralsGray7};
|
|
10667
10776
|
`;
|
|
10668
10777
|
var RatingComponent = ({
|
|
10669
10778
|
layout,
|
|
@@ -10673,9 +10782,9 @@ var RatingComponent = ({
|
|
|
10673
10782
|
thumbDownTooltip,
|
|
10674
10783
|
handleRatingChange
|
|
10675
10784
|
}) => {
|
|
10676
|
-
return /* @__PURE__ */ jsxs54(RatingContainer, { layout, children: [
|
|
10785
|
+
return /* @__PURE__ */ jsxs54(RatingContainer, { $layout: layout, children: [
|
|
10677
10786
|
/* @__PURE__ */ jsx93(Label9, { children: ratingLabel }),
|
|
10678
|
-
loading ? /* @__PURE__ */ jsx93(Spinner, { tooltip: "Laster opp tilbakemelding ..." }) : /* @__PURE__ */ jsxs54(
|
|
10787
|
+
loading ? /* @__PURE__ */ jsx93(Spinner, { tooltip: "Laster opp tilbakemelding ..." }) : /* @__PURE__ */ jsxs54(HStack, { gap: "layout-x1", children: [
|
|
10679
10788
|
/* @__PURE__ */ jsx93(Tooltip, { text: thumbUpTooltip, children: /* @__PURE__ */ jsx93(
|
|
10680
10789
|
RatingButton,
|
|
10681
10790
|
{
|
|
@@ -10701,8 +10810,8 @@ var RatingComponent = ({
|
|
|
10701
10810
|
};
|
|
10702
10811
|
|
|
10703
10812
|
// src/components/Feedback/CommentComponent.tsx
|
|
10704
|
-
import
|
|
10705
|
-
import { ddsBaseTokens as
|
|
10813
|
+
import styled83 from "styled-components";
|
|
10814
|
+
import { ddsBaseTokens as ddsBaseTokens46 } from "@norges-domstoler/dds-design-tokens";
|
|
10706
10815
|
import {
|
|
10707
10816
|
ThumbupFilled,
|
|
10708
10817
|
ThumbdownFilled,
|
|
@@ -10710,10 +10819,10 @@ import {
|
|
|
10710
10819
|
} from "@norges-domstoler/dds-icons";
|
|
10711
10820
|
import { Paragraph } from "@norges-domstoler/dds-typography";
|
|
10712
10821
|
import { jsx as jsx94, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
10713
|
-
var IconLabelSpan =
|
|
10822
|
+
var IconLabelSpan = styled83.span`
|
|
10714
10823
|
display: inline-flex;
|
|
10715
10824
|
align-items: center;
|
|
10716
|
-
gap: ${
|
|
10825
|
+
gap: ${ddsBaseTokens46.spacing.SizesDdsSpacingLocalX05};
|
|
10717
10826
|
`;
|
|
10718
10827
|
var CommentComponent = ({
|
|
10719
10828
|
rating,
|
|
@@ -10725,13 +10834,13 @@ var CommentComponent = ({
|
|
|
10725
10834
|
handleSubmit,
|
|
10726
10835
|
handleFeedbackTextChange
|
|
10727
10836
|
}) => {
|
|
10728
|
-
return /* @__PURE__ */ jsxs55(
|
|
10837
|
+
return /* @__PURE__ */ jsxs55(VStack, { gap: "layout-x1", children: [
|
|
10729
10838
|
/* @__PURE__ */ jsxs55(IconLabelSpan, { children: [
|
|
10730
10839
|
/* @__PURE__ */ jsx94(
|
|
10731
10840
|
Icon22,
|
|
10732
10841
|
{
|
|
10733
10842
|
icon: rating === "positive" ? ThumbupFilled : ThumbdownFilled,
|
|
10734
|
-
color:
|
|
10843
|
+
color: ddsBaseTokens46.colors.DdsColorInteractiveBase
|
|
10735
10844
|
}
|
|
10736
10845
|
),
|
|
10737
10846
|
/* @__PURE__ */ jsxs55(Paragraph, { children: [
|