@norges-domstoler/dds-components 13.11.2 → 13.11.3
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 +6 -46
- package/dist/index.d.ts +6 -46
- package/dist/index.js +462 -455
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +269 -271
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -6084,21 +6084,34 @@ var Card = (props) => {
|
|
|
6084
6084
|
Card.displayName = "Card";
|
|
6085
6085
|
|
|
6086
6086
|
// src/components/Card/CardAccordion/CardAccordion.tsx
|
|
6087
|
-
import {
|
|
6088
|
-
forwardRef as forwardRef32,
|
|
6089
|
-
useState as useState13,
|
|
6090
|
-
useEffect as useEffect8,
|
|
6091
|
-
Children as ReactChildren2,
|
|
6092
|
-
cloneElement as cloneElement3,
|
|
6093
|
-
isValidElement as isValidElement3,
|
|
6094
|
-
useId as useId12,
|
|
6095
|
-
useCallback as useCallback3
|
|
6096
|
-
} from "react";
|
|
6087
|
+
import { forwardRef as forwardRef32, useState as useState13, useEffect as useEffect8, useId as useId12, useCallback as useCallback3 } from "react";
|
|
6097
6088
|
import styled43 from "styled-components";
|
|
6098
6089
|
import {
|
|
6099
6090
|
getBaseHTMLProps as getBaseHTMLProps25
|
|
6100
6091
|
} from "@norges-domstoler/dds-core";
|
|
6092
|
+
|
|
6093
|
+
// src/components/Card/CardAccordion/CardAccordionContext.tsx
|
|
6094
|
+
import { createContext as createContext4, useContext as useContext6 } from "react";
|
|
6101
6095
|
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
6096
|
+
var CardAccordionContext = createContext4({});
|
|
6097
|
+
var CardAccordionContextProvider = ({
|
|
6098
|
+
children,
|
|
6099
|
+
...values
|
|
6100
|
+
}) => {
|
|
6101
|
+
return /* @__PURE__ */ jsx49(CardAccordionContext.Provider, { value: values, children });
|
|
6102
|
+
};
|
|
6103
|
+
var useCardAccordionContext = () => {
|
|
6104
|
+
const context = useContext6(CardAccordionContext);
|
|
6105
|
+
if (!context) {
|
|
6106
|
+
throw new Error(
|
|
6107
|
+
"useCardAccordionContext must be used within a CardAccordionContextProvider. Have you wrapped <CardAccordionHeader> and <CardAccordionBody> inside a <CardAccordion>?"
|
|
6108
|
+
);
|
|
6109
|
+
}
|
|
6110
|
+
return context;
|
|
6111
|
+
};
|
|
6112
|
+
|
|
6113
|
+
// src/components/Card/CardAccordion/CardAccordion.tsx
|
|
6114
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
6102
6115
|
var Wrapper4 = styled43.div``;
|
|
6103
6116
|
var CardAccordion = forwardRef32(
|
|
6104
6117
|
(props, ref) => {
|
|
@@ -6118,31 +6131,24 @@ var CardAccordion = forwardRef32(
|
|
|
6118
6131
|
setExpanded(isExpanded);
|
|
6119
6132
|
}, [isExpanded]);
|
|
6120
6133
|
const toggleExpanded = useCallback3(() => {
|
|
6121
|
-
|
|
6122
|
-
|
|
6123
|
-
|
|
6124
|
-
|
|
6125
|
-
|
|
6126
|
-
|
|
6127
|
-
|
|
6128
|
-
|
|
6129
|
-
|
|
6130
|
-
|
|
6134
|
+
setExpanded((prevExpanded) => {
|
|
6135
|
+
const newExpanded = !prevExpanded;
|
|
6136
|
+
if (onChange) {
|
|
6137
|
+
onChange(newExpanded);
|
|
6138
|
+
}
|
|
6139
|
+
return newExpanded;
|
|
6140
|
+
});
|
|
6141
|
+
}, [onChange]);
|
|
6142
|
+
return /* @__PURE__ */ jsx50(Wrapper4, { ...getBaseHTMLProps25(id, className, htmlProps, rest), ref, children: /* @__PURE__ */ jsx50(
|
|
6143
|
+
CardAccordionContextProvider,
|
|
6144
|
+
{
|
|
6145
|
+
headerId: `${accordionId}-header`,
|
|
6146
|
+
bodyId: `${accordionId}-body`,
|
|
6131
6147
|
isExpanded: expanded,
|
|
6132
6148
|
toggleExpanded,
|
|
6133
|
-
|
|
6134
|
-
|
|
6135
|
-
|
|
6136
|
-
isExpanded: expanded,
|
|
6137
|
-
id: bodyId,
|
|
6138
|
-
headerId
|
|
6139
|
-
}));
|
|
6140
|
-
});
|
|
6141
|
-
const wrapperProps = {
|
|
6142
|
-
...getBaseHTMLProps25(id, className, htmlProps, rest),
|
|
6143
|
-
ref
|
|
6144
|
-
};
|
|
6145
|
-
return /* @__PURE__ */ jsx49(Wrapper4, { ...wrapperProps, children: Children9 });
|
|
6149
|
+
children
|
|
6150
|
+
}
|
|
6151
|
+
) });
|
|
6146
6152
|
}
|
|
6147
6153
|
);
|
|
6148
6154
|
CardAccordion.displayName = "CardAccordion";
|
|
@@ -6151,7 +6157,7 @@ CardAccordion.displayName = "CardAccordion";
|
|
|
6151
6157
|
import { forwardRef as forwardRef33 } from "react";
|
|
6152
6158
|
import styled44, { css as css21 } from "styled-components";
|
|
6153
6159
|
|
|
6154
|
-
// src/components/Card/CardAccordion/CardAccordion.tokens.
|
|
6160
|
+
// src/components/Card/CardAccordion/CardAccordion.tokens.ts
|
|
6155
6161
|
import { ddsBaseTokens as ddsBaseTokens21 } from "@norges-domstoler/dds-design-tokens";
|
|
6156
6162
|
var { spacing: spacing18, border: border8, iconSizes: iconSizes5 } = ddsBaseTokens21;
|
|
6157
6163
|
var typographyTypes4 = {
|
|
@@ -6195,7 +6201,7 @@ import {
|
|
|
6195
6201
|
import {
|
|
6196
6202
|
getFontStyling as getFontStyling12
|
|
6197
6203
|
} from "@norges-domstoler/dds-typography";
|
|
6198
|
-
import { jsx as
|
|
6204
|
+
import { jsx as jsx51, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
6199
6205
|
var { header: header2, chevronWrapper: chevronWrapper2 } = cardAccordionTokens;
|
|
6200
6206
|
var ContentWrapper = styled44.div`
|
|
6201
6207
|
text-align: left;
|
|
@@ -6251,10 +6257,6 @@ var ChevronWrapper = styled44.span`
|
|
|
6251
6257
|
var CardAccordionHeader = forwardRef33((props, ref) => {
|
|
6252
6258
|
const {
|
|
6253
6259
|
children,
|
|
6254
|
-
isExpanded = false,
|
|
6255
|
-
toggleExpanded,
|
|
6256
|
-
bodyId,
|
|
6257
|
-
id,
|
|
6258
6260
|
className,
|
|
6259
6261
|
htmlProps,
|
|
6260
6262
|
padding,
|
|
@@ -6262,32 +6264,33 @@ var CardAccordionHeader = forwardRef33((props, ref) => {
|
|
|
6262
6264
|
bold,
|
|
6263
6265
|
...rest
|
|
6264
6266
|
} = props;
|
|
6265
|
-
const
|
|
6266
|
-
|
|
6267
|
-
|
|
6268
|
-
|
|
6269
|
-
|
|
6267
|
+
const {
|
|
6268
|
+
headerId: id,
|
|
6269
|
+
bodyId,
|
|
6270
|
+
toggleExpanded,
|
|
6271
|
+
isExpanded
|
|
6272
|
+
} = useCardAccordionContext();
|
|
6270
6273
|
const headerWrapperProps = {
|
|
6271
6274
|
...getBaseHTMLProps26(id, className, htmlProps, rest),
|
|
6272
6275
|
"aria-expanded": isExpanded,
|
|
6273
6276
|
"aria-controls": bodyId,
|
|
6274
6277
|
ref,
|
|
6275
|
-
onClick:
|
|
6278
|
+
onClick: toggleExpanded
|
|
6276
6279
|
};
|
|
6277
6280
|
const chevronProps = {
|
|
6278
6281
|
isUp: isExpanded,
|
|
6279
6282
|
width: cardAccordionTokens.chevron.width,
|
|
6280
6283
|
height: cardAccordionTokens.chevron.height
|
|
6281
6284
|
};
|
|
6282
|
-
return /* @__PURE__ */
|
|
6285
|
+
return /* @__PURE__ */ jsx51(HeaderWrapperButton, { ...headerWrapperProps, type: "button", children: /* @__PURE__ */ jsxs29(
|
|
6283
6286
|
HeaderContainer,
|
|
6284
6287
|
{
|
|
6285
6288
|
typographyType: typographyType7,
|
|
6286
6289
|
padding,
|
|
6287
6290
|
bold,
|
|
6288
6291
|
children: [
|
|
6289
|
-
/* @__PURE__ */
|
|
6290
|
-
/* @__PURE__ */
|
|
6292
|
+
/* @__PURE__ */ jsx51(ContentWrapper, { children }),
|
|
6293
|
+
/* @__PURE__ */ jsx51(ChevronWrapper, { children: /* @__PURE__ */ jsx51(AnimatedChevronUpDown2, { ...chevronProps }) })
|
|
6291
6294
|
]
|
|
6292
6295
|
}
|
|
6293
6296
|
) });
|
|
@@ -6326,7 +6329,7 @@ function useElementHeight(element3) {
|
|
|
6326
6329
|
}
|
|
6327
6330
|
|
|
6328
6331
|
// src/components/Card/CardAccordion/CardAccordionBody.tsx
|
|
6329
|
-
import { jsx as
|
|
6332
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
6330
6333
|
var expandingAnimation = css22`
|
|
6331
6334
|
@media (prefers-reduced-motion: no-preference) {
|
|
6332
6335
|
transition: height 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
@@ -6341,6 +6344,9 @@ var Body2 = styled45.div.withConfig({
|
|
|
6341
6344
|
return prop !== "animate" && prop !== "height" && prop !== "isExpanded";
|
|
6342
6345
|
}
|
|
6343
6346
|
})`
|
|
6347
|
+
${({ isExpanded }) => !isExpanded && css22`
|
|
6348
|
+
display: none;
|
|
6349
|
+
`}
|
|
6344
6350
|
@media (prefers-reduced-motion: no-preference) {
|
|
6345
6351
|
${({ animate }) => animate && expandingAnimation}
|
|
6346
6352
|
}
|
|
@@ -6368,17 +6374,8 @@ var BodyContainer = styled45.div.withConfig({
|
|
|
6368
6374
|
`;
|
|
6369
6375
|
var CardAccordionBody = forwardRef34((props, ref) => {
|
|
6370
6376
|
var _a;
|
|
6371
|
-
const {
|
|
6372
|
-
|
|
6373
|
-
isExpanded,
|
|
6374
|
-
headerId,
|
|
6375
|
-
id,
|
|
6376
|
-
className,
|
|
6377
|
-
htmlProps,
|
|
6378
|
-
padding,
|
|
6379
|
-
paddingTop,
|
|
6380
|
-
...rest
|
|
6381
|
-
} = props;
|
|
6377
|
+
const { children, className, htmlProps, padding, paddingTop, ...rest } = props;
|
|
6378
|
+
const { headerId, isExpanded, bodyId: id } = useCardAccordionContext();
|
|
6382
6379
|
const bodyRef = useRef8(null);
|
|
6383
6380
|
const [animate, setAnimate] = useState15(false);
|
|
6384
6381
|
const isMounted = useIsMounted();
|
|
@@ -6394,27 +6391,28 @@ var CardAccordionBody = forwardRef34((props, ref) => {
|
|
|
6394
6391
|
setAnimate(true);
|
|
6395
6392
|
}
|
|
6396
6393
|
}, [isMounted]);
|
|
6397
|
-
|
|
6398
|
-
...getBaseHTMLProps27(id, className, htmlProps, rest),
|
|
6399
|
-
ref,
|
|
6400
|
-
isExpanded,
|
|
6401
|
-
role: "region",
|
|
6402
|
-
height: (_a = height != null ? height : initialExpandedHeight) != null ? _a : 0
|
|
6403
|
-
};
|
|
6404
|
-
const bodyContainerProps = {
|
|
6405
|
-
ref: bodyRef,
|
|
6406
|
-
isExpanded,
|
|
6407
|
-
padding,
|
|
6408
|
-
paddingTop
|
|
6409
|
-
};
|
|
6410
|
-
return /* @__PURE__ */ jsx51(
|
|
6394
|
+
return /* @__PURE__ */ jsx52(
|
|
6411
6395
|
Body2,
|
|
6412
6396
|
{
|
|
6413
|
-
...
|
|
6397
|
+
...getBaseHTMLProps27(id, className, htmlProps, rest),
|
|
6398
|
+
ref,
|
|
6399
|
+
isExpanded,
|
|
6400
|
+
role: "region",
|
|
6401
|
+
height: (_a = height != null ? height : initialExpandedHeight) != null ? _a : 0,
|
|
6414
6402
|
animate,
|
|
6415
6403
|
"aria-labelledby": headerId,
|
|
6416
6404
|
"aria-hidden": !isExpanded,
|
|
6417
|
-
children: /* @__PURE__ */
|
|
6405
|
+
children: /* @__PURE__ */ jsx52(
|
|
6406
|
+
BodyContainer,
|
|
6407
|
+
{
|
|
6408
|
+
ref: bodyRef,
|
|
6409
|
+
isExpanded,
|
|
6410
|
+
padding,
|
|
6411
|
+
paddingTop,
|
|
6412
|
+
animate,
|
|
6413
|
+
children
|
|
6414
|
+
}
|
|
6415
|
+
)
|
|
6418
6416
|
}
|
|
6419
6417
|
);
|
|
6420
6418
|
});
|
|
@@ -6551,7 +6549,7 @@ import { forwardRef as forwardRef35 } from "react";
|
|
|
6551
6549
|
import styled47, { css as css24 } from "styled-components";
|
|
6552
6550
|
import { getFontStyling as getFontStyling14 } from "@norges-domstoler/dds-typography";
|
|
6553
6551
|
import { focusVisible as focusVisible6 } from "@norges-domstoler/dds-form";
|
|
6554
|
-
import { jsx as
|
|
6552
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
6555
6553
|
var { navLink: navLink2 } = internalHeaderTokens;
|
|
6556
6554
|
var Link2 = styled47.a.withConfig({
|
|
6557
6555
|
shouldForwardProp: (prop) => prop !== "isCurrent"
|
|
@@ -6592,13 +6590,13 @@ var NavigationItem2 = forwardRef35(({ title: title3, isCurrent, ...rest }, ref)
|
|
|
6592
6590
|
isCurrent,
|
|
6593
6591
|
...rest
|
|
6594
6592
|
};
|
|
6595
|
-
return /* @__PURE__ */
|
|
6593
|
+
return /* @__PURE__ */ jsx53(Link2, { ...linkProps, "aria-current": isCurrent ? "page" : void 0, children: title3 });
|
|
6596
6594
|
});
|
|
6597
6595
|
|
|
6598
6596
|
// src/components/InternalHeader/InternalHeaderListItem.tsx
|
|
6599
6597
|
import { forwardRef as forwardRef36 } from "react";
|
|
6600
6598
|
import styled48 from "styled-components";
|
|
6601
|
-
import { jsx as
|
|
6599
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
6602
6600
|
var Li = styled48.li`
|
|
6603
6601
|
box-sizing: border-box;
|
|
6604
6602
|
`;
|
|
@@ -6607,13 +6605,13 @@ var InternalHeaderListItem = forwardRef36(({ children, ...rest }, ref) => {
|
|
|
6607
6605
|
ref,
|
|
6608
6606
|
...rest
|
|
6609
6607
|
};
|
|
6610
|
-
return /* @__PURE__ */
|
|
6608
|
+
return /* @__PURE__ */ jsx54(Li, { ...props, children });
|
|
6611
6609
|
});
|
|
6612
6610
|
|
|
6613
6611
|
// src/components/InternalHeader/InternalHeader.tsx
|
|
6614
6612
|
import { getBaseHTMLProps as getBaseHTMLProps28 } from "@norges-domstoler/dds-core";
|
|
6615
6613
|
import { MenuIcon as MenuIcon2, MoreVerticalIcon } from "@norges-domstoler/dds-icons";
|
|
6616
|
-
import { jsx as
|
|
6614
|
+
import { jsx as jsx55, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
6617
6615
|
var InternalHeader = (props) => {
|
|
6618
6616
|
const {
|
|
6619
6617
|
applicationDesc,
|
|
@@ -6645,10 +6643,10 @@ var InternalHeader = (props) => {
|
|
|
6645
6643
|
const hasNavigationElements = !!navigationElements && navigationElements.length > 0;
|
|
6646
6644
|
const hasContextMenuElements = !!contextMenuElements && contextMenuElements.length > 0;
|
|
6647
6645
|
const hasNavInContextMenu = smallScreen && hasNavigationElements;
|
|
6648
|
-
const navigation4 = hasNavigationElements && !smallScreen ? /* @__PURE__ */
|
|
6646
|
+
const navigation4 = hasNavigationElements && !smallScreen ? /* @__PURE__ */ jsx55(Navigation2, { "aria-label": "sidenavigasjon", children: /* @__PURE__ */ jsx55(NavigationList, { children: navigationElements.map((item, index) => {
|
|
6649
6647
|
const { href, ...rest2 } = item;
|
|
6650
6648
|
const isCurrent = href === currentPage;
|
|
6651
|
-
return /* @__PURE__ */
|
|
6649
|
+
return /* @__PURE__ */ jsx55(InternalHeaderListItem, { children: /* @__PURE__ */ jsx55(
|
|
6652
6650
|
NavigationItem2,
|
|
6653
6651
|
{
|
|
6654
6652
|
href,
|
|
@@ -6660,13 +6658,13 @@ var InternalHeader = (props) => {
|
|
|
6660
6658
|
}) }) }) : null;
|
|
6661
6659
|
const hasContextMenu = hasContextMenuElements || !!userProps || hasNavInContextMenu;
|
|
6662
6660
|
return /* @__PURE__ */ jsxs30(OuterContainer3, { ...getBaseHTMLProps28(id, className, htmlProps, rest), children: [
|
|
6663
|
-
/* @__PURE__ */
|
|
6664
|
-
/* @__PURE__ */
|
|
6665
|
-
/* @__PURE__ */
|
|
6661
|
+
/* @__PURE__ */ jsx55(BannerWrapper, { $hasContextMenu: hasContextMenu, children: /* @__PURE__ */ jsxs30(BannerLeftWrapper, { children: [
|
|
6662
|
+
/* @__PURE__ */ jsx55(LovisaWrapper, { children: /* @__PURE__ */ jsx55(Typography12, { typographyType: "bodySans02", bold: true, as: "span", children: applicationName }) }),
|
|
6663
|
+
/* @__PURE__ */ jsx55(ApplicationNameWrapper, { children: /* @__PURE__ */ jsx55(Typography12, { typographyType: "bodySans02", as: "span", children: applicationDesc }) })
|
|
6666
6664
|
] }) }),
|
|
6667
6665
|
navigation4,
|
|
6668
6666
|
hasContextMenu && /* @__PURE__ */ jsxs30(ContextMenuGroup, { children: [
|
|
6669
|
-
/* @__PURE__ */
|
|
6667
|
+
/* @__PURE__ */ jsx55(
|
|
6670
6668
|
Button,
|
|
6671
6669
|
{
|
|
6672
6670
|
ref: buttonRef,
|
|
@@ -6679,7 +6677,7 @@ var InternalHeader = (props) => {
|
|
|
6679
6677
|
"aria-label": "\xE5pne meny"
|
|
6680
6678
|
}
|
|
6681
6679
|
),
|
|
6682
|
-
/* @__PURE__ */
|
|
6680
|
+
/* @__PURE__ */ jsx55(
|
|
6683
6681
|
StyledOverflowMenu,
|
|
6684
6682
|
{
|
|
6685
6683
|
isOpen: !contextMenuIsClosed,
|
|
@@ -6747,7 +6745,7 @@ var datepickerTokens = {
|
|
|
6747
6745
|
};
|
|
6748
6746
|
|
|
6749
6747
|
// src/components/Datepicker/Datepicker.tsx
|
|
6750
|
-
import { jsx as
|
|
6748
|
+
import { jsx as jsx56, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
6751
6749
|
var StyledInput2 = styled49(StatefulInput3)`
|
|
6752
6750
|
&::-webkit-calendar-picker-indicator {
|
|
6753
6751
|
background-image: ${`url('${calendar_today_default}')`};
|
|
@@ -6848,8 +6846,8 @@ var Datepicker = forwardRef37(
|
|
|
6848
6846
|
className
|
|
6849
6847
|
};
|
|
6850
6848
|
return /* @__PURE__ */ jsxs31(OuterInputContainer2, { ...outerinputContainerProps, children: [
|
|
6851
|
-
hasLabel && /* @__PURE__ */
|
|
6852
|
-
/* @__PURE__ */
|
|
6849
|
+
hasLabel && /* @__PURE__ */ jsx56(Label5, { htmlFor: uniqueId, showRequiredStyling: !!showRequiredStyling, children: label3 }),
|
|
6850
|
+
/* @__PURE__ */ jsx56(StyledInput2, { ...inputProps }),
|
|
6853
6851
|
renderInputMessage(tip, tipId, errorMessage, errorMessageId)
|
|
6854
6852
|
] });
|
|
6855
6853
|
}
|
|
@@ -6917,7 +6915,7 @@ var skipToContentTokens = {
|
|
|
6917
6915
|
};
|
|
6918
6916
|
|
|
6919
6917
|
// src/components/SkipToContent/SkipToContent.tsx
|
|
6920
|
-
import { jsx as
|
|
6918
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
6921
6919
|
var { wrapper: wrapper2, link: link4 } = skipToContentTokens;
|
|
6922
6920
|
var Wrapper5 = styled50.div`
|
|
6923
6921
|
box-sizing: border-box;
|
|
@@ -6976,13 +6974,13 @@ var SkipToContent = forwardRef38(
|
|
|
6976
6974
|
style,
|
|
6977
6975
|
...restHtmlProps
|
|
6978
6976
|
} = htmlProps;
|
|
6979
|
-
return /* @__PURE__ */
|
|
6977
|
+
return /* @__PURE__ */ jsx57(
|
|
6980
6978
|
Wrapper5,
|
|
6981
6979
|
{
|
|
6982
6980
|
$top: top,
|
|
6983
6981
|
className: cn3(className, htmlPropsClassName),
|
|
6984
6982
|
style,
|
|
6985
|
-
children: /* @__PURE__ */
|
|
6983
|
+
children: /* @__PURE__ */ jsx57(Link3, { ...getBaseHTMLProps29(id, restHtmlProps, rest), ref, children: text })
|
|
6986
6984
|
}
|
|
6987
6985
|
);
|
|
6988
6986
|
}
|
|
@@ -6991,10 +6989,10 @@ SkipToContent.displayName = "SkipToContent";
|
|
|
6991
6989
|
|
|
6992
6990
|
// src/components/Tooltip/Tooltip.tsx
|
|
6993
6991
|
import {
|
|
6994
|
-
Children as
|
|
6995
|
-
cloneElement as
|
|
6992
|
+
Children as ReactChildren2,
|
|
6993
|
+
cloneElement as cloneElement3,
|
|
6996
6994
|
forwardRef as forwardRef39,
|
|
6997
|
-
isValidElement as
|
|
6995
|
+
isValidElement as isValidElement3,
|
|
6998
6996
|
useEffect as useEffect11,
|
|
6999
6997
|
useId as useId14,
|
|
7000
6998
|
useRef as useRef10,
|
|
@@ -7059,7 +7057,7 @@ var TooltipWrapper = styled51(Paper2)`
|
|
|
7059
7057
|
`;
|
|
7060
7058
|
|
|
7061
7059
|
// src/components/Tooltip/Tooltip.tsx
|
|
7062
|
-
import { jsx as
|
|
7060
|
+
import { jsx as jsx58, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
7063
7061
|
var { svgArrow: svgArrow2 } = tooltipTokens;
|
|
7064
7062
|
var Tooltip = forwardRef39(
|
|
7065
7063
|
(props, ref) => {
|
|
@@ -7139,8 +7137,8 @@ var Tooltip = forwardRef39(
|
|
|
7139
7137
|
}
|
|
7140
7138
|
};
|
|
7141
7139
|
const anchorProps = children.props;
|
|
7142
|
-
const anchorElement =
|
|
7143
|
-
|
|
7140
|
+
const anchorElement = ReactChildren2.only(
|
|
7141
|
+
isValidElement3(children) && cloneElement3(children, {
|
|
7144
7142
|
ref: refs.setReference,
|
|
7145
7143
|
onFocus: combineHandlers2(openTooltip, anchorProps.onFocus),
|
|
7146
7144
|
onBlur: combineHandlers2(closeTooltip, anchorProps.onBlur),
|
|
@@ -7169,15 +7167,15 @@ var Tooltip = forwardRef39(
|
|
|
7169
7167
|
anchorElement,
|
|
7170
7168
|
/* @__PURE__ */ jsxs32(TooltipWrapper, { ...wrapperProps, elevation: 1, border: "light", children: [
|
|
7171
7169
|
text,
|
|
7172
|
-
/* @__PURE__ */
|
|
7173
|
-
/* @__PURE__ */
|
|
7170
|
+
/* @__PURE__ */ jsx58(ArrowWrapper, { ...arrowWrapperProps, children: /* @__PURE__ */ jsxs32(SvgArrow, { children: [
|
|
7171
|
+
/* @__PURE__ */ jsx58(
|
|
7174
7172
|
"path",
|
|
7175
7173
|
{
|
|
7176
7174
|
d: "M16.586 6.586L10 0h16.154a.373.373 0 00-.263.11l-6.477 6.476a2 2 0 01-2.828 0z",
|
|
7177
7175
|
fill: svgArrow2.background.fill
|
|
7178
7176
|
}
|
|
7179
7177
|
),
|
|
7180
|
-
/* @__PURE__ */
|
|
7178
|
+
/* @__PURE__ */ jsx58(
|
|
7181
7179
|
"path",
|
|
7182
7180
|
{
|
|
7183
7181
|
fillRule: "evenodd",
|
|
@@ -7281,7 +7279,7 @@ function handleElementWithBackdropUnmount(container16) {
|
|
|
7281
7279
|
}
|
|
7282
7280
|
|
|
7283
7281
|
// src/components/Modal/Modal.tsx
|
|
7284
|
-
import { jsx as
|
|
7282
|
+
import { jsx as jsx59, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
7285
7283
|
var { container: container10, contentContainer: contentContainer4 } = modalTokens;
|
|
7286
7284
|
var Container8 = styled53(Paper3)`
|
|
7287
7285
|
display: flex;
|
|
@@ -7344,7 +7342,7 @@ var Modal = forwardRef40((props, ref) => {
|
|
|
7344
7342
|
useOnKeyDown4(["Escape", "Esc"], () => handleClose());
|
|
7345
7343
|
const hasTransitionedIn = useMountTransition(isOpen, 200);
|
|
7346
7344
|
return isOpen || hasTransitionedIn ? createPortal(
|
|
7347
|
-
/* @__PURE__ */
|
|
7345
|
+
/* @__PURE__ */ jsx59(Backdrop, { isOpen: hasTransitionedIn && isOpen, children: /* @__PURE__ */ jsxs33(
|
|
7348
7346
|
Container8,
|
|
7349
7347
|
{
|
|
7350
7348
|
...getBaseHTMLProps31(id, className, htmlProps, rest),
|
|
@@ -7358,10 +7356,10 @@ var Modal = forwardRef40((props, ref) => {
|
|
|
7358
7356
|
elevation: 4,
|
|
7359
7357
|
children: [
|
|
7360
7358
|
/* @__PURE__ */ jsxs33(ContentContainer2, { children: [
|
|
7361
|
-
header3 && /* @__PURE__ */
|
|
7359
|
+
header3 && /* @__PURE__ */ jsx59(HeaderContainer2, { id: headerId, children: typeof header3 === "string" ? /* @__PURE__ */ jsx59(Typography13, { typographyType: "headingSans03", children: header3 }) : header3 }),
|
|
7362
7360
|
children
|
|
7363
7361
|
] }),
|
|
7364
|
-
onClose && /* @__PURE__ */
|
|
7362
|
+
onClose && /* @__PURE__ */ jsx59(
|
|
7365
7363
|
StyledButton2,
|
|
7366
7364
|
{
|
|
7367
7365
|
size: "small",
|
|
@@ -7386,7 +7384,7 @@ import styled54 from "styled-components";
|
|
|
7386
7384
|
import {
|
|
7387
7385
|
getBaseHTMLProps as getBaseHTMLProps32
|
|
7388
7386
|
} from "@norges-domstoler/dds-core";
|
|
7389
|
-
import { jsx as
|
|
7387
|
+
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
7390
7388
|
var Container9 = styled54.div``;
|
|
7391
7389
|
var ModalBody = forwardRef41(
|
|
7392
7390
|
(props, ref) => {
|
|
@@ -7395,7 +7393,7 @@ var ModalBody = forwardRef41(
|
|
|
7395
7393
|
...getBaseHTMLProps32(id, className, htmlProps, rest),
|
|
7396
7394
|
ref
|
|
7397
7395
|
};
|
|
7398
|
-
return scrollable ? /* @__PURE__ */
|
|
7396
|
+
return scrollable ? /* @__PURE__ */ jsx60(Container9, { ...containerProps, children: /* @__PURE__ */ jsx60(ScrollableContainer, { contentHeight: height, children }) }) : /* @__PURE__ */ jsx60(Container9, { ...containerProps, children });
|
|
7399
7397
|
}
|
|
7400
7398
|
);
|
|
7401
7399
|
ModalBody.displayName = "ModalBody";
|
|
@@ -7403,7 +7401,7 @@ ModalBody.displayName = "ModalBody";
|
|
|
7403
7401
|
// src/components/Modal/ModalActions.tsx
|
|
7404
7402
|
import { forwardRef as forwardRef42 } from "react";
|
|
7405
7403
|
import styled55 from "styled-components";
|
|
7406
|
-
import { jsx as
|
|
7404
|
+
import { jsx as jsx61 } from "react/jsx-runtime";
|
|
7407
7405
|
var Container10 = styled55.div`
|
|
7408
7406
|
display: flex;
|
|
7409
7407
|
flex-wrap: wrap;
|
|
@@ -7415,7 +7413,7 @@ var ModalActions = forwardRef42(
|
|
|
7415
7413
|
ref,
|
|
7416
7414
|
...rest
|
|
7417
7415
|
};
|
|
7418
|
-
return /* @__PURE__ */
|
|
7416
|
+
return /* @__PURE__ */ jsx61(Container10, { ...containerProps, children });
|
|
7419
7417
|
}
|
|
7420
7418
|
);
|
|
7421
7419
|
ModalActions.displayName = "ModalActions";
|
|
@@ -7455,7 +7453,7 @@ var drawerTokens = {
|
|
|
7455
7453
|
|
|
7456
7454
|
// src/components/Drawer/Drawer.tsx
|
|
7457
7455
|
import { focusVisible as focusVisible8 } from "@norges-domstoler/dds-form";
|
|
7458
|
-
import { jsx as
|
|
7456
|
+
import { jsx as jsx62, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
7459
7457
|
var { container: container12, contentContainer: contentContainer6 } = drawerTokens;
|
|
7460
7458
|
var getMaxWidth = (size) => {
|
|
7461
7459
|
if (size === "large")
|
|
@@ -7575,11 +7573,11 @@ var Drawer = forwardRef43((props, ref) => {
|
|
|
7575
7573
|
};
|
|
7576
7574
|
return isOpen || hasTransitionedIn ? createPortal2(
|
|
7577
7575
|
/* @__PURE__ */ jsxs34(Container11, { ...containerProps, elevation: 4, children: [
|
|
7578
|
-
/* @__PURE__ */
|
|
7579
|
-
hasHeader && /* @__PURE__ */
|
|
7576
|
+
/* @__PURE__ */ jsx62(ScrollableContainer, { children: /* @__PURE__ */ jsxs34(ContentContainer3, { children: [
|
|
7577
|
+
hasHeader && /* @__PURE__ */ jsx62(HeaderContainer3, { ...headerContainerProps, children: typeof header3 === "string" ? /* @__PURE__ */ jsx62(Typography14, { typographyType: "headingSans03", children: header3 }) : header3 }),
|
|
7580
7578
|
children
|
|
7581
7579
|
] }) }),
|
|
7582
|
-
/* @__PURE__ */
|
|
7580
|
+
/* @__PURE__ */ jsx62(
|
|
7583
7581
|
StyledButton3,
|
|
7584
7582
|
{
|
|
7585
7583
|
"data-testid": "drawer-close-btn",
|
|
@@ -7599,9 +7597,9 @@ Drawer.displayName = "Drawer";
|
|
|
7599
7597
|
|
|
7600
7598
|
// src/components/Drawer/DrawerGroup.tsx
|
|
7601
7599
|
import {
|
|
7602
|
-
Children as
|
|
7603
|
-
isValidElement as
|
|
7604
|
-
cloneElement as
|
|
7600
|
+
Children as ReactChildren3,
|
|
7601
|
+
isValidElement as isValidElement4,
|
|
7602
|
+
cloneElement as cloneElement4,
|
|
7605
7603
|
useState as useState18,
|
|
7606
7604
|
useRef as useRef11,
|
|
7607
7605
|
useId as useId17
|
|
@@ -7627,14 +7625,14 @@ var DrawerGroup = ({
|
|
|
7627
7625
|
close();
|
|
7628
7626
|
onClose && onClose();
|
|
7629
7627
|
};
|
|
7630
|
-
const Children9 =
|
|
7631
|
-
return
|
|
7628
|
+
const Children9 = ReactChildren3.map(children, (child, childIndex) => {
|
|
7629
|
+
return isValidElement4(child) && (childIndex === 0 ? cloneElement4(child, {
|
|
7632
7630
|
"aria-haspopup": "dialog",
|
|
7633
7631
|
"aria-controls": uniqueDrawerId,
|
|
7634
7632
|
"aria-expanded": !closed,
|
|
7635
7633
|
ref: buttonRef,
|
|
7636
7634
|
onClick: handleOpen
|
|
7637
|
-
}) :
|
|
7635
|
+
}) : cloneElement4(child, {
|
|
7638
7636
|
id: uniqueDrawerId,
|
|
7639
7637
|
triggerRef: buttonRef,
|
|
7640
7638
|
isOpen: !closed,
|
|
@@ -7695,7 +7693,7 @@ var popoverTokens = {
|
|
|
7695
7693
|
import { CloseIcon as CloseIcon6 } from "@norges-domstoler/dds-icons";
|
|
7696
7694
|
import { Paper as Paper5 } from "@norges-domstoler/dds-core";
|
|
7697
7695
|
import { focusVisible as focusVisible9 } from "@norges-domstoler/dds-form";
|
|
7698
|
-
import { jsx as
|
|
7696
|
+
import { jsx as jsx63, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
7699
7697
|
var { spacing: Spacing } = ddsBaseTokens30;
|
|
7700
7698
|
var { wrapper: wrapper6, content: content4, closeButton: closeButton2, title: title2 } = popoverTokens;
|
|
7701
7699
|
var Wrapper6 = styled57(Paper5)`
|
|
@@ -7784,8 +7782,8 @@ var Popover = forwardRef44(
|
|
|
7784
7782
|
elevation: 3,
|
|
7785
7783
|
border: "light",
|
|
7786
7784
|
children: [
|
|
7787
|
-
title3 && /* @__PURE__ */
|
|
7788
|
-
/* @__PURE__ */
|
|
7785
|
+
title3 && /* @__PURE__ */ jsx63(TitleContainer, { children: typeof title3 === "string" ? /* @__PURE__ */ jsx63(Typography15, { typographyType: "headingSans02", children: title3 }) : title3 }),
|
|
7786
|
+
/* @__PURE__ */ jsx63(
|
|
7789
7787
|
ContentContainer4,
|
|
7790
7788
|
{
|
|
7791
7789
|
$hasTitle: !!title3,
|
|
@@ -7793,7 +7791,7 @@ var Popover = forwardRef44(
|
|
|
7793
7791
|
children
|
|
7794
7792
|
}
|
|
7795
7793
|
),
|
|
7796
|
-
withCloseButton && /* @__PURE__ */
|
|
7794
|
+
withCloseButton && /* @__PURE__ */ jsx63(
|
|
7797
7795
|
StyledButton4,
|
|
7798
7796
|
{
|
|
7799
7797
|
icon: CloseIcon6,
|
|
@@ -7814,14 +7812,14 @@ Popover.displayName = "Popover";
|
|
|
7814
7812
|
// src/components/Popover/PopoverGroup.tsx
|
|
7815
7813
|
import {
|
|
7816
7814
|
useState as useState19,
|
|
7817
|
-
Children as
|
|
7818
|
-
cloneElement as
|
|
7819
|
-
isValidElement as
|
|
7815
|
+
Children as ReactChildren4,
|
|
7816
|
+
cloneElement as cloneElement5,
|
|
7817
|
+
isValidElement as isValidElement5,
|
|
7820
7818
|
useRef as useRef12,
|
|
7821
7819
|
useId as useId18
|
|
7822
7820
|
} from "react";
|
|
7823
7821
|
import { useOnKeyDown as useOnKeyDown6 } from "@norges-domstoler/dds-core";
|
|
7824
|
-
import { Fragment as Fragment10, jsx as
|
|
7822
|
+
import { Fragment as Fragment10, jsx as jsx64 } from "react/jsx-runtime";
|
|
7825
7823
|
var PopoverGroup = ({
|
|
7826
7824
|
isOpen = false,
|
|
7827
7825
|
onCloseButtonClick,
|
|
@@ -7850,14 +7848,14 @@ var PopoverGroup = ({
|
|
|
7850
7848
|
}
|
|
7851
7849
|
});
|
|
7852
7850
|
const handleClose = () => setOpen(false);
|
|
7853
|
-
const Children9 =
|
|
7854
|
-
return
|
|
7851
|
+
const Children9 = ReactChildren4.map(children, (child, childIndex) => {
|
|
7852
|
+
return isValidElement5(child) && (childIndex === 0 ? cloneElement5(child, {
|
|
7855
7853
|
"aria-haspopup": "dialog",
|
|
7856
7854
|
"aria-controls": uniquePopoverId,
|
|
7857
7855
|
"aria-expanded": open,
|
|
7858
7856
|
onClick: handleOnTriggerClick,
|
|
7859
7857
|
ref: buttonRef
|
|
7860
|
-
}) :
|
|
7858
|
+
}) : cloneElement5(child, {
|
|
7861
7859
|
isOpen: open,
|
|
7862
7860
|
"aria-hidden": !open,
|
|
7863
7861
|
id: uniquePopoverId,
|
|
@@ -7867,7 +7865,7 @@ var PopoverGroup = ({
|
|
|
7867
7865
|
onClose: handleClose
|
|
7868
7866
|
}));
|
|
7869
7867
|
});
|
|
7870
|
-
return /* @__PURE__ */
|
|
7868
|
+
return /* @__PURE__ */ jsx64(Fragment10, { children: Children9 });
|
|
7871
7869
|
};
|
|
7872
7870
|
PopoverGroup.displayName = "PopoverGroup";
|
|
7873
7871
|
|
|
@@ -7916,7 +7914,7 @@ var toggleButtonTokens = {
|
|
|
7916
7914
|
};
|
|
7917
7915
|
|
|
7918
7916
|
// src/components/ToggleButton/ToggleButton.tsx
|
|
7919
|
-
import { jsx as
|
|
7917
|
+
import { jsx as jsx65, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
7920
7918
|
var { toggleButton: toggleButton2 } = toggleButtonTokens;
|
|
7921
7919
|
var Content2 = styled58.span`
|
|
7922
7920
|
display: flex;
|
|
@@ -7975,7 +7973,7 @@ var ToggleButton = forwardRef45(
|
|
|
7975
7973
|
const generatedId = useId19();
|
|
7976
7974
|
const uniqueId = id != null ? id : `${generatedId}-toggleButton`;
|
|
7977
7975
|
return /* @__PURE__ */ jsxs37(Container12, { htmlFor: uniqueId, children: [
|
|
7978
|
-
/* @__PURE__ */
|
|
7976
|
+
/* @__PURE__ */ jsx65(
|
|
7979
7977
|
HiddenInput3,
|
|
7980
7978
|
{
|
|
7981
7979
|
...getBaseHTMLProps35(uniqueId, className, htmlProps, rest),
|
|
@@ -7984,7 +7982,7 @@ var ToggleButton = forwardRef45(
|
|
|
7984
7982
|
}
|
|
7985
7983
|
),
|
|
7986
7984
|
/* @__PURE__ */ jsxs37(Content2, { $hasIcon: !!icon12, children: [
|
|
7987
|
-
icon12 && /* @__PURE__ */
|
|
7985
|
+
icon12 && /* @__PURE__ */ jsx65(Icon15, { icon: icon12, iconSize: "inherit" }),
|
|
7988
7986
|
" ",
|
|
7989
7987
|
label3
|
|
7990
7988
|
] })
|
|
@@ -8000,7 +7998,7 @@ import {
|
|
|
8000
7998
|
getBaseHTMLProps as getBaseHTMLProps36
|
|
8001
7999
|
} from "@norges-domstoler/dds-core";
|
|
8002
8000
|
import { Typography as Typography16 } from "@norges-domstoler/dds-typography";
|
|
8003
|
-
import { jsx as
|
|
8001
|
+
import { jsx as jsx66, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
8004
8002
|
var Group = styled59.div`
|
|
8005
8003
|
gap: ${toggleButtonTokens.group.gap};
|
|
8006
8004
|
display: flex;
|
|
@@ -8036,7 +8034,7 @@ var ToggleButtonGroup = (props) => {
|
|
|
8036
8034
|
"aria-labelledby": label3 ? uniqueLabelId : void 0
|
|
8037
8035
|
};
|
|
8038
8036
|
return /* @__PURE__ */ jsxs38(Container13, { ...containerProps, children: [
|
|
8039
|
-
!!label3 && /* @__PURE__ */
|
|
8037
|
+
!!label3 && /* @__PURE__ */ jsx66(
|
|
8040
8038
|
Typography16,
|
|
8041
8039
|
{
|
|
8042
8040
|
as: "span",
|
|
@@ -8045,7 +8043,7 @@ var ToggleButtonGroup = (props) => {
|
|
|
8045
8043
|
children: label3
|
|
8046
8044
|
}
|
|
8047
8045
|
),
|
|
8048
|
-
/* @__PURE__ */
|
|
8046
|
+
/* @__PURE__ */ jsx66(Group, { ...groupProps, children })
|
|
8049
8047
|
] });
|
|
8050
8048
|
};
|
|
8051
8049
|
ToggleButtonGroup.displayName = "ToggleButtonGroup";
|
|
@@ -8064,8 +8062,8 @@ import {
|
|
|
8064
8062
|
} from "@norges-domstoler/dds-core";
|
|
8065
8063
|
|
|
8066
8064
|
// src/components/Tabs/Tabs.context.tsx
|
|
8067
|
-
import { createContext as
|
|
8068
|
-
var TabsContext =
|
|
8065
|
+
import { createContext as createContext5, useContext as useContext7 } from "react";
|
|
8066
|
+
var TabsContext = createContext5({
|
|
8069
8067
|
activeTab: 0,
|
|
8070
8068
|
tabsId: "",
|
|
8071
8069
|
handleTabChange: () => null,
|
|
@@ -8075,10 +8073,10 @@ var TabsContext = createContext4({
|
|
|
8075
8073
|
setHasTabFocus: () => null,
|
|
8076
8074
|
tabContentDirection: "row"
|
|
8077
8075
|
});
|
|
8078
|
-
var useTabsContext = () =>
|
|
8076
|
+
var useTabsContext = () => useContext7(TabsContext);
|
|
8079
8077
|
|
|
8080
8078
|
// src/components/Tabs/Tabs.tsx
|
|
8081
|
-
import { jsx as
|
|
8079
|
+
import { jsx as jsx67 } from "react/jsx-runtime";
|
|
8082
8080
|
var Container14 = styled60.div`
|
|
8083
8081
|
${({ $width }) => $width && css30`
|
|
8084
8082
|
width: ${$width};
|
|
@@ -8115,7 +8113,7 @@ var Tabs = forwardRef46((props, ref) => {
|
|
|
8115
8113
|
...getBaseHTMLProps37(uniqueId, className, htmlProps, rest),
|
|
8116
8114
|
ref
|
|
8117
8115
|
};
|
|
8118
|
-
return /* @__PURE__ */
|
|
8116
|
+
return /* @__PURE__ */ jsx67(
|
|
8119
8117
|
TabsContext.Provider,
|
|
8120
8118
|
{
|
|
8121
8119
|
value: {
|
|
@@ -8128,7 +8126,7 @@ var Tabs = forwardRef46((props, ref) => {
|
|
|
8128
8126
|
setHasTabFocus,
|
|
8129
8127
|
tabContentDirection
|
|
8130
8128
|
},
|
|
8131
|
-
children: /* @__PURE__ */
|
|
8129
|
+
children: /* @__PURE__ */ jsx67(Container14, { ...containerProps, $width: width, children })
|
|
8132
8130
|
}
|
|
8133
8131
|
);
|
|
8134
8132
|
});
|
|
@@ -8199,7 +8197,7 @@ var tabsTokens = {
|
|
|
8199
8197
|
};
|
|
8200
8198
|
|
|
8201
8199
|
// src/components/Tabs/Tab.tsx
|
|
8202
|
-
import { jsx as
|
|
8200
|
+
import { jsx as jsx68, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
8203
8201
|
var { tab: tab2 } = tabsTokens;
|
|
8204
8202
|
var Button2 = styled61.button`
|
|
8205
8203
|
${normalizeButton5}
|
|
@@ -8300,8 +8298,8 @@ var Tab = forwardRef47((props, ref) => {
|
|
|
8300
8298
|
onKeyDown: handleOnKeyDown,
|
|
8301
8299
|
tabIndex: focus ? 0 : -1,
|
|
8302
8300
|
children: [
|
|
8303
|
-
icon12 && /* @__PURE__ */
|
|
8304
|
-
/* @__PURE__ */
|
|
8301
|
+
icon12 && /* @__PURE__ */ jsx68(Icon16, { icon: icon12, iconSize: "inherit" }),
|
|
8302
|
+
/* @__PURE__ */ jsx68("span", { children })
|
|
8305
8303
|
]
|
|
8306
8304
|
}
|
|
8307
8305
|
);
|
|
@@ -8312,8 +8310,8 @@ Tab.displayName = "Tab";
|
|
|
8312
8310
|
import {
|
|
8313
8311
|
forwardRef as forwardRef48,
|
|
8314
8312
|
Children as Children4,
|
|
8315
|
-
isValidElement as
|
|
8316
|
-
cloneElement as
|
|
8313
|
+
isValidElement as isValidElement6,
|
|
8314
|
+
cloneElement as cloneElement6
|
|
8317
8315
|
} from "react";
|
|
8318
8316
|
import styled62 from "styled-components";
|
|
8319
8317
|
import {
|
|
@@ -8326,7 +8324,7 @@ import {
|
|
|
8326
8324
|
focusVisibleTransitionValue as focusVisibleTransitionValue8,
|
|
8327
8325
|
focusVisible as focusVisible12
|
|
8328
8326
|
} from "@norges-domstoler/dds-form";
|
|
8329
|
-
import { jsx as
|
|
8327
|
+
import { jsx as jsx69 } from "react/jsx-runtime";
|
|
8330
8328
|
var { tabList: tabList2 } = tabsTokens;
|
|
8331
8329
|
var TabRow = styled62.div`
|
|
8332
8330
|
border-bottom: ${tabList2.borderBottom};
|
|
@@ -8364,7 +8362,7 @@ var TabList = forwardRef48(
|
|
|
8364
8362
|
const [focus, setFocus] = useRoveFocus3(childrenArray, !hasTabFocus, "row");
|
|
8365
8363
|
const combinedRef = useCombinedRef9(ref, tabListRef);
|
|
8366
8364
|
const tabListChildren = Children4.map(children, (child, index) => {
|
|
8367
|
-
return
|
|
8365
|
+
return isValidElement6(child) && cloneElement6(child, {
|
|
8368
8366
|
id: `${tabsId}-tab-${index}`,
|
|
8369
8367
|
"aria-controls": `${tabsId}-panel-${index}`,
|
|
8370
8368
|
active: activeTab === index,
|
|
@@ -8395,7 +8393,7 @@ var TabList = forwardRef48(
|
|
|
8395
8393
|
tabIndex: 0,
|
|
8396
8394
|
onFocus: handleOnFocus
|
|
8397
8395
|
};
|
|
8398
|
-
return /* @__PURE__ */
|
|
8396
|
+
return /* @__PURE__ */ jsx69(TabRow, { ...tabListProps, children: tabListChildren });
|
|
8399
8397
|
}
|
|
8400
8398
|
);
|
|
8401
8399
|
TabList.displayName = "TabList";
|
|
@@ -8410,7 +8408,7 @@ import {
|
|
|
8410
8408
|
focusVisibleTransitionValue as focusVisibleTransitionValue9,
|
|
8411
8409
|
focusVisible as focusVisible13
|
|
8412
8410
|
} from "@norges-domstoler/dds-form";
|
|
8413
|
-
import { jsx as
|
|
8411
|
+
import { jsx as jsx70 } from "react/jsx-runtime";
|
|
8414
8412
|
var { panel: panel2 } = tabsTokens;
|
|
8415
8413
|
var Panel = styled63.div`
|
|
8416
8414
|
padding: ${panel2.padding};
|
|
@@ -8427,7 +8425,7 @@ var Panel = styled63.div`
|
|
|
8427
8425
|
`;
|
|
8428
8426
|
var TabPanel = forwardRef49(
|
|
8429
8427
|
({ active = false, children, id, className, htmlProps, ...rest }, ref) => {
|
|
8430
|
-
return /* @__PURE__ */
|
|
8428
|
+
return /* @__PURE__ */ jsx70(
|
|
8431
8429
|
Panel,
|
|
8432
8430
|
{
|
|
8433
8431
|
...getBaseHTMLProps39(id, className, htmlProps, rest),
|
|
@@ -8446,25 +8444,25 @@ TabPanel.displayName = "TabPanel";
|
|
|
8446
8444
|
import {
|
|
8447
8445
|
forwardRef as forwardRef50,
|
|
8448
8446
|
Children as Children5,
|
|
8449
|
-
cloneElement as
|
|
8450
|
-
isValidElement as
|
|
8447
|
+
cloneElement as cloneElement7,
|
|
8448
|
+
isValidElement as isValidElement7
|
|
8451
8449
|
} from "react";
|
|
8452
8450
|
import { useCombinedRef as useCombinedRef10 } from "@norges-domstoler/dds-core";
|
|
8453
|
-
import { jsx as
|
|
8451
|
+
import { jsx as jsx71 } from "react/jsx-runtime";
|
|
8454
8452
|
var TabPanels = forwardRef50(
|
|
8455
8453
|
({ children, ...rest }, ref) => {
|
|
8456
8454
|
const { activeTab, tabsId, tabPanelsRef } = useTabsContext();
|
|
8457
8455
|
const combinedRef = useCombinedRef10(ref, tabPanelsRef);
|
|
8458
8456
|
const panelChildren = Children5.map(children, (child, index) => {
|
|
8459
8457
|
const active = index === activeTab;
|
|
8460
|
-
return
|
|
8458
|
+
return isValidElement7(child) && cloneElement7(child, {
|
|
8461
8459
|
id: `${tabsId}-panel-${index}`,
|
|
8462
8460
|
"aria-labelledby": `${tabsId}-tab-${index}`,
|
|
8463
8461
|
active,
|
|
8464
8462
|
"aria-expanded": active
|
|
8465
8463
|
});
|
|
8466
8464
|
});
|
|
8467
|
-
return /* @__PURE__ */
|
|
8465
|
+
return /* @__PURE__ */ jsx71("div", { ref: combinedRef, ...rest, children: panelChildren });
|
|
8468
8466
|
}
|
|
8469
8467
|
);
|
|
8470
8468
|
TabPanels.displayName = "TabPanels";
|
|
@@ -8505,7 +8503,7 @@ var tagTokens = {
|
|
|
8505
8503
|
};
|
|
8506
8504
|
|
|
8507
8505
|
// src/components/Tag/Tag.tsx
|
|
8508
|
-
import { jsx as
|
|
8506
|
+
import { jsx as jsx72 } from "react/jsx-runtime";
|
|
8509
8507
|
var { wrapper: wrapper8 } = tagTokens;
|
|
8510
8508
|
var Wrapper7 = styled64(TextOverflowEllipsisWrapper)`
|
|
8511
8509
|
display: inline-flex;
|
|
@@ -8528,13 +8526,13 @@ var Tag = forwardRef51((props, ref) => {
|
|
|
8528
8526
|
htmlProps,
|
|
8529
8527
|
...rest
|
|
8530
8528
|
} = props;
|
|
8531
|
-
return /* @__PURE__ */
|
|
8529
|
+
return /* @__PURE__ */ jsx72(
|
|
8532
8530
|
Wrapper7,
|
|
8533
8531
|
{
|
|
8534
8532
|
...getBaseHTMLProps40(id, className, htmlProps, rest),
|
|
8535
8533
|
ref,
|
|
8536
8534
|
$purpose: purpose,
|
|
8537
|
-
children: /* @__PURE__ */
|
|
8535
|
+
children: /* @__PURE__ */ jsx72(TextOverflowEllipsisInner, { children: text })
|
|
8538
8536
|
}
|
|
8539
8537
|
);
|
|
8540
8538
|
});
|
|
@@ -8573,7 +8571,7 @@ var chipTokens = {
|
|
|
8573
8571
|
};
|
|
8574
8572
|
|
|
8575
8573
|
// src/components/Chip/Chip.tsx
|
|
8576
|
-
import { jsx as
|
|
8574
|
+
import { jsx as jsx73, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
8577
8575
|
var { container: container15 } = chipTokens;
|
|
8578
8576
|
var Container15 = styled65(TextOverflowEllipsisWrapper2)`
|
|
8579
8577
|
display: flex;
|
|
@@ -8601,8 +8599,8 @@ var Chip = forwardRef52((props, ref) => {
|
|
|
8601
8599
|
ref,
|
|
8602
8600
|
as: "div",
|
|
8603
8601
|
children: [
|
|
8604
|
-
/* @__PURE__ */
|
|
8605
|
-
/* @__PURE__ */
|
|
8602
|
+
/* @__PURE__ */ jsx73(TextOverflowEllipsisInner2, { children: text }),
|
|
8603
|
+
/* @__PURE__ */ jsx73(
|
|
8606
8604
|
Button,
|
|
8607
8605
|
{
|
|
8608
8606
|
size: "tiny",
|
|
@@ -8623,7 +8621,7 @@ Chip.displayName = "Chip";
|
|
|
8623
8621
|
import { forwardRef as forwardRef53, Children as Children6 } from "react";
|
|
8624
8622
|
import styled66 from "styled-components";
|
|
8625
8623
|
import { removeListStyling as removeListStyling3 } from "@norges-domstoler/dds-core";
|
|
8626
|
-
import { jsx as
|
|
8624
|
+
import { jsx as jsx74 } from "react/jsx-runtime";
|
|
8627
8625
|
var Group2 = styled66.ul`
|
|
8628
8626
|
${removeListStyling3}
|
|
8629
8627
|
display: flex;
|
|
@@ -8632,8 +8630,8 @@ var Group2 = styled66.ul`
|
|
|
8632
8630
|
var ChipGroup = forwardRef53(
|
|
8633
8631
|
({ children, ...rest }, ref) => {
|
|
8634
8632
|
const childrenArray = Children6.toArray(children);
|
|
8635
|
-
const groupChildren = childrenArray.map((item, index) => /* @__PURE__ */
|
|
8636
|
-
return /* @__PURE__ */
|
|
8633
|
+
const groupChildren = childrenArray.map((item, index) => /* @__PURE__ */ jsx74("li", { children: item }, `chip-${index}`));
|
|
8634
|
+
return /* @__PURE__ */ jsx74(Group2, { ...rest, ref, children: groupChildren });
|
|
8637
8635
|
}
|
|
8638
8636
|
);
|
|
8639
8637
|
ChipGroup.displayName = "ChipGroup";
|
|
@@ -8647,11 +8645,11 @@ import { combineHandlers as combineHandlers3 } from "@norges-domstoler/dds-core"
|
|
|
8647
8645
|
import { Typography as Typography17 } from "@norges-domstoler/dds-typography";
|
|
8648
8646
|
|
|
8649
8647
|
// src/components/ToggleBar/ToggleBar.context.tsx
|
|
8650
|
-
import { createContext as
|
|
8651
|
-
var ToggleBarContext =
|
|
8648
|
+
import { createContext as createContext6, useContext as useContext8 } from "react";
|
|
8649
|
+
var ToggleBarContext = createContext6({
|
|
8652
8650
|
size: "medium"
|
|
8653
8651
|
});
|
|
8654
|
-
var useToggleBarContext = () =>
|
|
8652
|
+
var useToggleBarContext = () => useContext8(ToggleBarContext);
|
|
8655
8653
|
|
|
8656
8654
|
// src/components/ToggleBar/ToggleBar.tokens.tsx
|
|
8657
8655
|
import { ddsBaseTokens as ddsBaseTokens35 } from "@norges-domstoler/dds-design-tokens";
|
|
@@ -8761,7 +8759,7 @@ var toggleBarTokens = {
|
|
|
8761
8759
|
};
|
|
8762
8760
|
|
|
8763
8761
|
// src/components/ToggleBar/ToggleBar.tsx
|
|
8764
|
-
import { jsx as
|
|
8762
|
+
import { jsx as jsx75, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
8765
8763
|
var OuterContainer4 = styled67.div`
|
|
8766
8764
|
display: flex;
|
|
8767
8765
|
flex-direction: column;
|
|
@@ -8801,7 +8799,7 @@ var ToggleBar = (props) => {
|
|
|
8801
8799
|
(e) => onChange && onChange(e, e.target.value)
|
|
8802
8800
|
);
|
|
8803
8801
|
const labelId = label3 && `${uniqueId}-label`;
|
|
8804
|
-
return /* @__PURE__ */
|
|
8802
|
+
return /* @__PURE__ */ jsx75(
|
|
8805
8803
|
ToggleBarContext.Provider,
|
|
8806
8804
|
{
|
|
8807
8805
|
value: {
|
|
@@ -8818,8 +8816,8 @@ var ToggleBar = (props) => {
|
|
|
8818
8816
|
"aria-labelledby": labelId != null ? labelId : htmlProps == null ? void 0 : htmlProps["aria-labelledby"],
|
|
8819
8817
|
$width: width,
|
|
8820
8818
|
children: [
|
|
8821
|
-
label3 && /* @__PURE__ */
|
|
8822
|
-
/* @__PURE__ */
|
|
8819
|
+
label3 && /* @__PURE__ */ jsx75(Typography17, { typographyType: "supportingStyleLabel01", id: labelId, children: label3 }),
|
|
8820
|
+
/* @__PURE__ */ jsx75(Bar2, { children })
|
|
8823
8821
|
]
|
|
8824
8822
|
}
|
|
8825
8823
|
)
|
|
@@ -8912,7 +8910,7 @@ var Label6 = styled68.label`
|
|
|
8912
8910
|
|
|
8913
8911
|
// src/components/ToggleBar/ToggleRadio.tsx
|
|
8914
8912
|
import { HiddenInput as HiddenInput5 } from "@norges-domstoler/dds-form";
|
|
8915
|
-
import { jsx as
|
|
8913
|
+
import { jsx as jsx76, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
8916
8914
|
var calculateChecked = (value, group4, checked) => {
|
|
8917
8915
|
if (typeof checked !== "undefined")
|
|
8918
8916
|
return checked;
|
|
@@ -8946,7 +8944,7 @@ var ToggleRadio = forwardRef54(
|
|
|
8946
8944
|
(group4 == null ? void 0 : group4.onChange) && group4.onChange(event);
|
|
8947
8945
|
};
|
|
8948
8946
|
return /* @__PURE__ */ jsxs42(Label6, { size: group4.size, htmlFor: uniqueId, children: [
|
|
8949
|
-
/* @__PURE__ */
|
|
8947
|
+
/* @__PURE__ */ jsx76(
|
|
8950
8948
|
HiddenInput5,
|
|
8951
8949
|
{
|
|
8952
8950
|
...getBaseHTMLProps43(uniqueId, className, htmlProps, rest),
|
|
@@ -8959,8 +8957,8 @@ var ToggleRadio = forwardRef54(
|
|
|
8959
8957
|
}
|
|
8960
8958
|
),
|
|
8961
8959
|
/* @__PURE__ */ jsxs42(Content3, { $size: group4.size, $justIcon: !!icon12 && !label3, children: [
|
|
8962
|
-
icon12 && /* @__PURE__ */
|
|
8963
|
-
label3 && /* @__PURE__ */
|
|
8960
|
+
icon12 && /* @__PURE__ */ jsx76(Icon17, { icon: icon12, iconSize: "inherit" }),
|
|
8961
|
+
label3 && /* @__PURE__ */ jsx76("span", { children: label3 })
|
|
8964
8962
|
] })
|
|
8965
8963
|
] });
|
|
8966
8964
|
}
|
|
@@ -9070,20 +9068,20 @@ var gridTokens = {
|
|
|
9070
9068
|
};
|
|
9071
9069
|
|
|
9072
9070
|
// src/components/Grid/Grid.context.tsx
|
|
9073
|
-
import { useContext as
|
|
9071
|
+
import { useContext as useContext9, createContext as createContext7 } from "react";
|
|
9074
9072
|
import { ScreenSize as ScreenSize2 } from "@norges-domstoler/dds-core";
|
|
9075
|
-
var GridContext =
|
|
9073
|
+
var GridContext = createContext7({
|
|
9076
9074
|
screenSize: ScreenSize2.Large
|
|
9077
9075
|
});
|
|
9078
9076
|
var useGridContext = () => {
|
|
9079
|
-
return
|
|
9077
|
+
return useContext9(GridContext);
|
|
9080
9078
|
};
|
|
9081
9079
|
|
|
9082
9080
|
// src/components/Grid/Grid.tsx
|
|
9083
9081
|
import {
|
|
9084
9082
|
getLiteralScreenSize
|
|
9085
9083
|
} from "@norges-domstoler/dds-core";
|
|
9086
|
-
import { jsx as
|
|
9084
|
+
import { jsx as jsx77 } from "react/jsx-runtime";
|
|
9087
9085
|
var getHooksGridStyling = (screenSize, maxWidth, rowGap) => {
|
|
9088
9086
|
const tokens2 = gridTokens[screenSize].grid;
|
|
9089
9087
|
return {
|
|
@@ -9114,14 +9112,14 @@ var StyledGrid = styled69.div.withConfig({
|
|
|
9114
9112
|
var Grid = (props) => {
|
|
9115
9113
|
const { id, className, children, htmlProps, as, ...rest } = props;
|
|
9116
9114
|
const screenSize = useScreenSize();
|
|
9117
|
-
return /* @__PURE__ */
|
|
9115
|
+
return /* @__PURE__ */ jsx77(GridContext.Provider, { value: { screenSize }, children: as === "div" ? /* @__PURE__ */ jsx77(
|
|
9118
9116
|
StyledGrid,
|
|
9119
9117
|
{
|
|
9120
9118
|
...getBaseHTMLProps44(id, className, htmlProps, rest),
|
|
9121
9119
|
screenSize,
|
|
9122
9120
|
children
|
|
9123
9121
|
}
|
|
9124
|
-
) : /* @__PURE__ */
|
|
9122
|
+
) : /* @__PURE__ */ jsx77(
|
|
9125
9123
|
StyledGrid,
|
|
9126
9124
|
{
|
|
9127
9125
|
...getBaseHTMLProps44(id, className, htmlProps, rest),
|
|
@@ -9141,7 +9139,7 @@ import {
|
|
|
9141
9139
|
import {
|
|
9142
9140
|
getLiteralScreenSize as getLiteralScreenSize2
|
|
9143
9141
|
} from "@norges-domstoler/dds-core";
|
|
9144
|
-
import { jsx as
|
|
9142
|
+
import { jsx as jsx78 } from "react/jsx-runtime";
|
|
9145
9143
|
var isRelativeGridColumn = (type) => {
|
|
9146
9144
|
return type === "all" || type === "firstHalf" || type === "secondHalf";
|
|
9147
9145
|
};
|
|
@@ -9167,7 +9165,7 @@ var StyledGridChild = styled70.div.withConfig({
|
|
|
9167
9165
|
var GridChild = (props) => {
|
|
9168
9166
|
const { id, className, htmlProps, children, ...rest } = props;
|
|
9169
9167
|
const { screenSize } = useGridContext();
|
|
9170
|
-
return /* @__PURE__ */
|
|
9168
|
+
return /* @__PURE__ */ jsx78(
|
|
9171
9169
|
StyledGridChild,
|
|
9172
9170
|
{
|
|
9173
9171
|
...getBaseHTMLProps45(id, className, htmlProps, rest),
|
|
@@ -9181,10 +9179,10 @@ GridChild.displayName = "GridChild";
|
|
|
9181
9179
|
// src/components/ProgressTracker/ProgressTracker.tsx
|
|
9182
9180
|
import {
|
|
9183
9181
|
Children as Children7,
|
|
9184
|
-
cloneElement as
|
|
9182
|
+
cloneElement as cloneElement8,
|
|
9185
9183
|
forwardRef as forwardRef55,
|
|
9186
9184
|
Fragment as Fragment11,
|
|
9187
|
-
isValidElement as
|
|
9185
|
+
isValidElement as isValidElement8,
|
|
9188
9186
|
useEffect as useEffect16,
|
|
9189
9187
|
useState as useState23,
|
|
9190
9188
|
useMemo as useMemo2
|
|
@@ -9195,13 +9193,13 @@ import {
|
|
|
9195
9193
|
} from "@norges-domstoler/dds-core";
|
|
9196
9194
|
|
|
9197
9195
|
// src/components/ProgressTracker/ProgressTracker.context.tsx
|
|
9198
|
-
import { createContext as
|
|
9199
|
-
var ProgressTrackerContext =
|
|
9196
|
+
import { createContext as createContext8, useContext as useContext10 } from "react";
|
|
9197
|
+
var ProgressTrackerContext = createContext8(
|
|
9200
9198
|
{
|
|
9201
9199
|
activeStep: 0
|
|
9202
9200
|
}
|
|
9203
9201
|
);
|
|
9204
|
-
var useProgressTrackerContext = () =>
|
|
9202
|
+
var useProgressTrackerContext = () => useContext10(ProgressTrackerContext);
|
|
9205
9203
|
|
|
9206
9204
|
// src/components/ProgressTracker/ProgressTracker.tokens.tsx
|
|
9207
9205
|
import { ddsBaseTokens as ddsBaseTokens37 } from "@norges-domstoler/dds-design-tokens";
|
|
@@ -9222,7 +9220,7 @@ var connector = {
|
|
|
9222
9220
|
width: "1px"
|
|
9223
9221
|
};
|
|
9224
9222
|
var itemNumber = {
|
|
9225
|
-
size: "
|
|
9223
|
+
size: "1.75rem",
|
|
9226
9224
|
borderWidth: "2px",
|
|
9227
9225
|
iconSize: "small",
|
|
9228
9226
|
active: {
|
|
@@ -9292,7 +9290,7 @@ import {
|
|
|
9292
9290
|
focusVisibleTransitionValue as focusVisibleTransitionValue11,
|
|
9293
9291
|
focusVisible as focusVisible15
|
|
9294
9292
|
} from "@norges-domstoler/dds-form";
|
|
9295
|
-
import { jsx as
|
|
9293
|
+
import { jsx as jsx79, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
9296
9294
|
var toItemState = (active, completed, disabled) => {
|
|
9297
9295
|
if (disabled) {
|
|
9298
9296
|
return "disabled";
|
|
@@ -9426,14 +9424,14 @@ var ProgressTrackerItem = (props) => {
|
|
|
9426
9424
|
};
|
|
9427
9425
|
const stepNumberContent = useMemo(() => {
|
|
9428
9426
|
if (completed) {
|
|
9429
|
-
return /* @__PURE__ */
|
|
9427
|
+
return /* @__PURE__ */ jsx79(Icon18, { icon: CheckIcon2, iconSize: itemNumber2.iconSize });
|
|
9430
9428
|
}
|
|
9431
9429
|
if (icon12 !== void 0) {
|
|
9432
|
-
return /* @__PURE__ */
|
|
9430
|
+
return /* @__PURE__ */ jsx79(Icon18, { icon: icon12, iconSize: itemNumber2.iconSize });
|
|
9433
9431
|
}
|
|
9434
9432
|
return index + 1;
|
|
9435
9433
|
}, [completed, icon12, index]);
|
|
9436
|
-
return /* @__PURE__ */
|
|
9434
|
+
return /* @__PURE__ */ jsx79(ItemWrapper, { "aria-current": active ? "step" : void 0, children: /* @__PURE__ */ jsxs43(
|
|
9437
9435
|
ItemContentWrapper,
|
|
9438
9436
|
{
|
|
9439
9437
|
...styleProps,
|
|
@@ -9441,9 +9439,9 @@ var ProgressTrackerItem = (props) => {
|
|
|
9441
9439
|
onClick: !disabled && handleStepChange ? () => handleStepChange(index) : void 0,
|
|
9442
9440
|
disabled,
|
|
9443
9441
|
children: [
|
|
9444
|
-
/* @__PURE__ */
|
|
9442
|
+
/* @__PURE__ */ jsx79(ItemNumber, { ...styleProps, "aria-hidden": true, children: stepNumberContent }),
|
|
9445
9443
|
/* @__PURE__ */ jsxs43(ItemText, { ...styleProps, children: [
|
|
9446
|
-
/* @__PURE__ */
|
|
9444
|
+
/* @__PURE__ */ jsx79(VisuallyHidden, { as: "span", children: getVisuallyHiddenText(active, completed, index) }),
|
|
9447
9445
|
children
|
|
9448
9446
|
] })
|
|
9449
9447
|
]
|
|
@@ -9453,7 +9451,7 @@ var ProgressTrackerItem = (props) => {
|
|
|
9453
9451
|
ProgressTrackerItem.displayName = "ProgressTracker.Item";
|
|
9454
9452
|
|
|
9455
9453
|
// src/components/ProgressTracker/ProgressTracker.tsx
|
|
9456
|
-
import { jsx as
|
|
9454
|
+
import { jsx as jsx80, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
9457
9455
|
var ItemsWrapper = styled72.ol`
|
|
9458
9456
|
display: flex;
|
|
9459
9457
|
flex-direction: column;
|
|
@@ -9502,14 +9500,14 @@ var ProgressTracker = (() => {
|
|
|
9502
9500
|
const itemsWithConnectorsBetween = intersperseItemsWithConnector(itemsWithIndex);
|
|
9503
9501
|
return itemsWithConnectorsBetween;
|
|
9504
9502
|
}, [children]);
|
|
9505
|
-
return /* @__PURE__ */
|
|
9503
|
+
return /* @__PURE__ */ jsx80(
|
|
9506
9504
|
ProgressTrackerContext.Provider,
|
|
9507
9505
|
{
|
|
9508
9506
|
value: {
|
|
9509
9507
|
activeStep: thisActiveStep,
|
|
9510
9508
|
handleStepChange: handleChange
|
|
9511
9509
|
},
|
|
9512
|
-
children: /* @__PURE__ */
|
|
9510
|
+
children: /* @__PURE__ */ jsx80("div", { role: "group", "aria-label": "progress", ...containerProps, children: /* @__PURE__ */ jsx80(ItemsWrapper, { children: steps }) })
|
|
9513
9511
|
}
|
|
9514
9512
|
);
|
|
9515
9513
|
});
|
|
@@ -9518,12 +9516,12 @@ var ProgressTracker = (() => {
|
|
|
9518
9516
|
return Res;
|
|
9519
9517
|
})();
|
|
9520
9518
|
function removeInvalidChildren(children) {
|
|
9521
|
-
return Children7.toArray(children).filter(
|
|
9519
|
+
return Children7.toArray(children).filter(isValidElement8);
|
|
9522
9520
|
}
|
|
9523
9521
|
function passIndexPropToProgressTrackerItem(children) {
|
|
9524
9522
|
return Children7.map(
|
|
9525
9523
|
children,
|
|
9526
|
-
(item, index) =>
|
|
9524
|
+
(item, index) => cloneElement8(item, {
|
|
9527
9525
|
...item.props,
|
|
9528
9526
|
index
|
|
9529
9527
|
})
|
|
@@ -9534,7 +9532,7 @@ var intersperseItemsWithConnector = (children) => Children7.map(children, (child
|
|
|
9534
9532
|
return child;
|
|
9535
9533
|
}
|
|
9536
9534
|
return /* @__PURE__ */ jsxs44(Fragment11, { children: [
|
|
9537
|
-
/* @__PURE__ */
|
|
9535
|
+
/* @__PURE__ */ jsx80(ProgressTrackerConnector, { "aria-hidden": true }),
|
|
9538
9536
|
child
|
|
9539
9537
|
] }, index);
|
|
9540
9538
|
});
|
|
@@ -9546,11 +9544,11 @@ import { forwardRef as forwardRef57, useRef as useRef16 } from "react";
|
|
|
9546
9544
|
import {
|
|
9547
9545
|
useState as useState24,
|
|
9548
9546
|
Children as Children8,
|
|
9549
|
-
cloneElement as
|
|
9550
|
-
isValidElement as
|
|
9547
|
+
cloneElement as cloneElement9,
|
|
9548
|
+
isValidElement as isValidElement9
|
|
9551
9549
|
} from "react";
|
|
9552
9550
|
import { useOnClickOutside as useOnClickOutside7, useOnKeyDown as useOnKeyDown9 } from "@norges-domstoler/dds-core";
|
|
9553
|
-
import { Fragment as Fragment12, jsx as
|
|
9551
|
+
import { Fragment as Fragment12, jsx as jsx81 } from "react/jsx-runtime";
|
|
9554
9552
|
var InlineEdit = (props) => {
|
|
9555
9553
|
const {
|
|
9556
9554
|
emptiable,
|
|
@@ -9591,7 +9589,7 @@ var InlineEdit = (props) => {
|
|
|
9591
9589
|
useOnKeyDown9(["Escape"], () => onExitHandler());
|
|
9592
9590
|
useOnClickOutside7(inputRef.current, () => onExitHandler());
|
|
9593
9591
|
const inputChild = Children8.only(
|
|
9594
|
-
|
|
9592
|
+
isValidElement9(children) && cloneElement9(children, {
|
|
9595
9593
|
onChange: onChangeHandler,
|
|
9596
9594
|
onBlur: onBlurHandler,
|
|
9597
9595
|
onFocus: onFocusHandler,
|
|
@@ -9600,7 +9598,7 @@ var InlineEdit = (props) => {
|
|
|
9600
9598
|
emptiable
|
|
9601
9599
|
})
|
|
9602
9600
|
);
|
|
9603
|
-
return /* @__PURE__ */
|
|
9601
|
+
return /* @__PURE__ */ jsx81(Fragment12, { children: inputChild });
|
|
9604
9602
|
};
|
|
9605
9603
|
InlineEdit.displayName = "InlineEdit";
|
|
9606
9604
|
|
|
@@ -9700,7 +9698,7 @@ import {
|
|
|
9700
9698
|
OuterInputContainer as OuterInputContainer3,
|
|
9701
9699
|
InputContainer as InputContainer3
|
|
9702
9700
|
} from "@norges-domstoler/dds-form";
|
|
9703
|
-
import { jsx as
|
|
9701
|
+
import { jsx as jsx82, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
9704
9702
|
var InlineTextArea = forwardRef56((props, ref) => {
|
|
9705
9703
|
const {
|
|
9706
9704
|
id,
|
|
@@ -9722,17 +9720,17 @@ var InlineTextArea = forwardRef56((props, ref) => {
|
|
|
9722
9720
|
const combinedRef = useCombinedRef11(ref, inputRef);
|
|
9723
9721
|
return /* @__PURE__ */ jsxs46(OuterInputContainer3, { width, children: [
|
|
9724
9722
|
/* @__PURE__ */ jsxs46(InputContainer3, { children: [
|
|
9725
|
-
!isEditing && !hideIcon && /* @__PURE__ */
|
|
9723
|
+
!isEditing && !hideIcon && /* @__PURE__ */ jsx82(
|
|
9726
9724
|
IconWrapper2,
|
|
9727
9725
|
{
|
|
9728
9726
|
onClick: () => {
|
|
9729
9727
|
var _a;
|
|
9730
9728
|
(_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
9731
9729
|
},
|
|
9732
|
-
children: /* @__PURE__ */
|
|
9730
|
+
children: /* @__PURE__ */ jsx82(Icon19, { icon: EditIcon, iconSize: "small" })
|
|
9733
9731
|
}
|
|
9734
9732
|
),
|
|
9735
|
-
/* @__PURE__ */
|
|
9733
|
+
/* @__PURE__ */ jsx82(
|
|
9736
9734
|
StyledInlineTextArea,
|
|
9737
9735
|
{
|
|
9738
9736
|
...rest,
|
|
@@ -9756,12 +9754,12 @@ var InlineTextArea = forwardRef56((props, ref) => {
|
|
|
9756
9754
|
InlineTextArea.displayName = "InlineTextArea";
|
|
9757
9755
|
|
|
9758
9756
|
// src/components/InlineEdit/InlineEditTextArea.tsx
|
|
9759
|
-
import { jsx as
|
|
9757
|
+
import { jsx as jsx83 } from "react/jsx-runtime";
|
|
9760
9758
|
var InlineEditTextArea = forwardRef57((props, ref) => {
|
|
9761
9759
|
const { onSetValue, emptiable, value, onFocus, onChange, onBlur, ...rest } = props;
|
|
9762
9760
|
const textareaRef = useRef16(null);
|
|
9763
9761
|
const combinedRef = useCombinedRef12(ref, textareaRef);
|
|
9764
|
-
return /* @__PURE__ */
|
|
9762
|
+
return /* @__PURE__ */ jsx83(
|
|
9765
9763
|
InlineEdit,
|
|
9766
9764
|
{
|
|
9767
9765
|
onSetValue,
|
|
@@ -9771,7 +9769,7 @@ var InlineEditTextArea = forwardRef57((props, ref) => {
|
|
|
9771
9769
|
onFocus,
|
|
9772
9770
|
onChange,
|
|
9773
9771
|
onBlur,
|
|
9774
|
-
children: /* @__PURE__ */
|
|
9772
|
+
children: /* @__PURE__ */ jsx83(InlineTextArea, { ref: combinedRef, ...rest })
|
|
9775
9773
|
}
|
|
9776
9774
|
);
|
|
9777
9775
|
});
|
|
@@ -9793,7 +9791,7 @@ import {
|
|
|
9793
9791
|
OuterInputContainer as OuterInputContainer4,
|
|
9794
9792
|
InputContainer as InputContainer4
|
|
9795
9793
|
} from "@norges-domstoler/dds-form";
|
|
9796
|
-
import { jsx as
|
|
9794
|
+
import { jsx as jsx84, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
9797
9795
|
var InlineInput = forwardRef58(
|
|
9798
9796
|
(props, ref) => {
|
|
9799
9797
|
const {
|
|
@@ -9818,17 +9816,17 @@ var InlineInput = forwardRef58(
|
|
|
9818
9816
|
const combinedRef = useCombinedRef13(ref, inputRef);
|
|
9819
9817
|
return /* @__PURE__ */ jsxs47(OuterInputContainer4, { width, children: [
|
|
9820
9818
|
/* @__PURE__ */ jsxs47(InputContainer4, { children: [
|
|
9821
|
-
!isEditing && !hideIcon && /* @__PURE__ */
|
|
9819
|
+
!isEditing && !hideIcon && /* @__PURE__ */ jsx84(
|
|
9822
9820
|
IconWrapper2,
|
|
9823
9821
|
{
|
|
9824
9822
|
onClick: () => {
|
|
9825
9823
|
var _a;
|
|
9826
9824
|
(_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
9827
9825
|
},
|
|
9828
|
-
children: /* @__PURE__ */
|
|
9826
|
+
children: /* @__PURE__ */ jsx84(Icon20, { icon: EditIcon2, iconSize: "small" })
|
|
9829
9827
|
}
|
|
9830
9828
|
),
|
|
9831
|
-
/* @__PURE__ */
|
|
9829
|
+
/* @__PURE__ */ jsx84(
|
|
9832
9830
|
StyledInlineInput,
|
|
9833
9831
|
{
|
|
9834
9832
|
...rest,
|
|
@@ -9854,12 +9852,12 @@ var InlineInput = forwardRef58(
|
|
|
9854
9852
|
InlineInput.displayName = "InlineInput";
|
|
9855
9853
|
|
|
9856
9854
|
// src/components/InlineEdit/InlineEditInput.tsx
|
|
9857
|
-
import { jsx as
|
|
9855
|
+
import { jsx as jsx85 } from "react/jsx-runtime";
|
|
9858
9856
|
var InlineEditInput = forwardRef59((props, ref) => {
|
|
9859
9857
|
const { onSetValue, emptiable, value, onFocus, onChange, onBlur, ...rest } = props;
|
|
9860
9858
|
const inputRef = useRef18(null);
|
|
9861
9859
|
const combinedRef = useCombinedRef14(ref, inputRef);
|
|
9862
|
-
return /* @__PURE__ */
|
|
9860
|
+
return /* @__PURE__ */ jsx85(
|
|
9863
9861
|
InlineEdit,
|
|
9864
9862
|
{
|
|
9865
9863
|
onSetValue,
|
|
@@ -9869,7 +9867,7 @@ var InlineEditInput = forwardRef59((props, ref) => {
|
|
|
9869
9867
|
onFocus,
|
|
9870
9868
|
onChange,
|
|
9871
9869
|
onBlur,
|
|
9872
|
-
children: /* @__PURE__ */
|
|
9870
|
+
children: /* @__PURE__ */ jsx85(InlineInput, { ...rest, ref: combinedRef })
|
|
9873
9871
|
}
|
|
9874
9872
|
);
|
|
9875
9873
|
});
|
|
@@ -9902,7 +9900,7 @@ var textAreaTokens = {
|
|
|
9902
9900
|
};
|
|
9903
9901
|
|
|
9904
9902
|
// src/components/TextArea/TextArea.tsx
|
|
9905
|
-
import { jsx as
|
|
9903
|
+
import { jsx as jsx86, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
9906
9904
|
var defaultWidth5 = "320px";
|
|
9907
9905
|
var { textarea: textarea2 } = textAreaTokens;
|
|
9908
9906
|
var StyledTextArea = styled74(StatefulInput5)`
|
|
@@ -9980,8 +9978,8 @@ var TextArea = forwardRef60(
|
|
|
9980
9978
|
...rest
|
|
9981
9979
|
};
|
|
9982
9980
|
return /* @__PURE__ */ jsxs48(OuterInputContainer5, { ...containerProps, children: [
|
|
9983
|
-
hasLabel && /* @__PURE__ */
|
|
9984
|
-
/* @__PURE__ */
|
|
9981
|
+
hasLabel && /* @__PURE__ */ jsx86(Label7, { showRequiredStyling, htmlFor: uniqueId, children: label3 }),
|
|
9982
|
+
/* @__PURE__ */ jsx86(StyledTextArea, { ...textAreaProps, as: "textarea" }),
|
|
9985
9983
|
renderInputMessage(tip, tipId, errorMessage, errorMessageId)
|
|
9986
9984
|
] });
|
|
9987
9985
|
}
|
|
@@ -10005,7 +10003,7 @@ var tokens = {
|
|
|
10005
10003
|
};
|
|
10006
10004
|
|
|
10007
10005
|
// src/components/SplitButton/SplitButton.tsx
|
|
10008
|
-
import { jsx as
|
|
10006
|
+
import { jsx as jsx87, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
10009
10007
|
var Container16 = styled75.div`
|
|
10010
10008
|
display: flex;
|
|
10011
10009
|
`;
|
|
@@ -10051,7 +10049,7 @@ var SplitButton = forwardRef61(
|
|
|
10051
10049
|
size
|
|
10052
10050
|
};
|
|
10053
10051
|
return /* @__PURE__ */ jsxs49(Container16, { ref, children: [
|
|
10054
|
-
/* @__PURE__ */
|
|
10052
|
+
/* @__PURE__ */ jsx87(
|
|
10055
10053
|
MainButton,
|
|
10056
10054
|
{
|
|
10057
10055
|
...buttonStyleProps,
|
|
@@ -10060,7 +10058,7 @@ var SplitButton = forwardRef61(
|
|
|
10060
10058
|
}
|
|
10061
10059
|
),
|
|
10062
10060
|
/* @__PURE__ */ jsxs49(OverflowMenuGroup, { onToggle: () => setIsOpen(!isOpen), children: [
|
|
10063
|
-
/* @__PURE__ */
|
|
10061
|
+
/* @__PURE__ */ jsx87(
|
|
10064
10062
|
OptionButton,
|
|
10065
10063
|
{
|
|
10066
10064
|
...buttonStyleProps,
|
|
@@ -10069,7 +10067,7 @@ var SplitButton = forwardRef61(
|
|
|
10069
10067
|
purpose
|
|
10070
10068
|
}
|
|
10071
10069
|
),
|
|
10072
|
-
/* @__PURE__ */
|
|
10070
|
+
/* @__PURE__ */ jsx87(OverflowMenu, { items: secondaryActions, placement: "bottom-end" })
|
|
10073
10071
|
] })
|
|
10074
10072
|
] });
|
|
10075
10073
|
}
|
|
@@ -10109,7 +10107,7 @@ var stackTokens = {
|
|
|
10109
10107
|
import {
|
|
10110
10108
|
getBaseHTMLProps as getBaseHTMLProps47
|
|
10111
10109
|
} from "@norges-domstoler/dds-core";
|
|
10112
|
-
import { jsx as
|
|
10110
|
+
import { jsx as jsx88 } from "react/jsx-runtime";
|
|
10113
10111
|
var Stack = styled76.div.withConfig({
|
|
10114
10112
|
shouldForwardProp: (prop) => {
|
|
10115
10113
|
const styleOnlyProps = [
|
|
@@ -10140,7 +10138,7 @@ Stack.defaultProps = {
|
|
|
10140
10138
|
justify: "flex-start"
|
|
10141
10139
|
};
|
|
10142
10140
|
var HStack = forwardRef62(
|
|
10143
|
-
({ id, className, htmlProps, ...rest }, ref) => /* @__PURE__ */
|
|
10141
|
+
({ id, className, htmlProps, ...rest }, ref) => /* @__PURE__ */ jsx88(
|
|
10144
10142
|
Stack,
|
|
10145
10143
|
{
|
|
10146
10144
|
direction: "horizontal",
|
|
@@ -10151,7 +10149,7 @@ var HStack = forwardRef62(
|
|
|
10151
10149
|
);
|
|
10152
10150
|
HStack.displayName = "HStack";
|
|
10153
10151
|
var VStack = forwardRef62(
|
|
10154
|
-
({ id, className, htmlProps, ...rest }, ref) => /* @__PURE__ */
|
|
10152
|
+
({ id, className, htmlProps, ...rest }, ref) => /* @__PURE__ */ jsx88(
|
|
10155
10153
|
Stack,
|
|
10156
10154
|
{
|
|
10157
10155
|
direction: "vertical",
|
|
@@ -10205,7 +10203,7 @@ var errorsTokens = {
|
|
|
10205
10203
|
};
|
|
10206
10204
|
|
|
10207
10205
|
// src/components/FileUploader/ErrorList.tsx
|
|
10208
|
-
import { jsx as
|
|
10206
|
+
import { jsx as jsx89 } from "react/jsx-runtime";
|
|
10209
10207
|
var MessageContainer2 = styled77.div`
|
|
10210
10208
|
display: flex;
|
|
10211
10209
|
flex-direction: column;
|
|
@@ -10216,8 +10214,8 @@ var ErrorList = (props) => {
|
|
|
10216
10214
|
if (errors.length < 1) {
|
|
10217
10215
|
return null;
|
|
10218
10216
|
}
|
|
10219
|
-
return /* @__PURE__ */
|
|
10220
|
-
return /* @__PURE__ */
|
|
10217
|
+
return /* @__PURE__ */ jsx89(MessageContainer2, { children: errors.map(({ id, message: message2 }) => {
|
|
10218
|
+
return /* @__PURE__ */ jsx89(
|
|
10221
10219
|
InputMessage,
|
|
10222
10220
|
{
|
|
10223
10221
|
id,
|
|
@@ -10236,7 +10234,7 @@ import {
|
|
|
10236
10234
|
derivativeIdGenerator as derivativeIdGenerator11,
|
|
10237
10235
|
spaceSeparatedIdListGenerator as spaceSeparatedIdListGenerator10
|
|
10238
10236
|
} from "@norges-domstoler/dds-core";
|
|
10239
|
-
import { jsx as
|
|
10237
|
+
import { jsx as jsx90, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
10240
10238
|
var FileWrapper = styled78.li``;
|
|
10241
10239
|
var FileNameWrapper = styled78.span`
|
|
10242
10240
|
word-break: break-all;
|
|
@@ -10264,8 +10262,8 @@ var File = (props) => {
|
|
|
10264
10262
|
}));
|
|
10265
10263
|
return /* @__PURE__ */ jsxs50(FileWrapper, { children: [
|
|
10266
10264
|
/* @__PURE__ */ jsxs50(FileElement, { ...props, children: [
|
|
10267
|
-
/* @__PURE__ */
|
|
10268
|
-
/* @__PURE__ */
|
|
10265
|
+
/* @__PURE__ */ jsx90(FileNameWrapper, { children: stateFile.file.name }),
|
|
10266
|
+
/* @__PURE__ */ jsx90(
|
|
10269
10267
|
RemoveFileButton,
|
|
10270
10268
|
{
|
|
10271
10269
|
size: "small",
|
|
@@ -10285,7 +10283,7 @@ var File = (props) => {
|
|
|
10285
10283
|
}
|
|
10286
10284
|
)
|
|
10287
10285
|
] }),
|
|
10288
|
-
/* @__PURE__ */
|
|
10286
|
+
/* @__PURE__ */ jsx90(ErrorList, { errors: errorsList })
|
|
10289
10287
|
] }, stateFile.file.name);
|
|
10290
10288
|
};
|
|
10291
10289
|
|
|
@@ -10564,7 +10562,7 @@ var useFileUploader = (props) => {
|
|
|
10564
10562
|
};
|
|
10565
10563
|
|
|
10566
10564
|
// src/components/FileUploader/FileUploader.tsx
|
|
10567
|
-
import { jsx as
|
|
10565
|
+
import { jsx as jsx91, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
10568
10566
|
var defaultWidth6 = "320px";
|
|
10569
10567
|
var Wrapper8 = styled79.div`
|
|
10570
10568
|
width: ${({ width }) => width ? width : defaultWidth6};
|
|
@@ -10624,7 +10622,7 @@ var FileUploader = (props) => {
|
|
|
10624
10622
|
const hasRootErrors = rootErrors.length > 0;
|
|
10625
10623
|
const showRequiredMarker = required;
|
|
10626
10624
|
const tipId = derivativeIdGenerator12(uniqueId, "tip");
|
|
10627
|
-
const fileListElements = stateFiles.map((stateFile, index) => /* @__PURE__ */
|
|
10625
|
+
const fileListElements = stateFiles.map((stateFile, index) => /* @__PURE__ */ jsx91(
|
|
10628
10626
|
File,
|
|
10629
10627
|
{
|
|
10630
10628
|
parentId: uniqueId,
|
|
@@ -10640,8 +10638,8 @@ var FileUploader = (props) => {
|
|
|
10640
10638
|
message: e
|
|
10641
10639
|
}));
|
|
10642
10640
|
return /* @__PURE__ */ jsxs51(Wrapper8, { width, children: [
|
|
10643
|
-
hasLabel && /* @__PURE__ */
|
|
10644
|
-
hasTip && /* @__PURE__ */
|
|
10641
|
+
hasLabel && /* @__PURE__ */ jsx91(Label8, { showRequiredStyling: showRequiredMarker, htmlFor: uniqueId, children: label3 }),
|
|
10642
|
+
hasTip && /* @__PURE__ */ jsx91(InputMessage, { id: tipId, message: tip, messageType: "tip" }),
|
|
10645
10643
|
/* @__PURE__ */ jsxs51(
|
|
10646
10644
|
Root,
|
|
10647
10645
|
{
|
|
@@ -10649,11 +10647,11 @@ var FileUploader = (props) => {
|
|
|
10649
10647
|
$isDragActive: isDragActive,
|
|
10650
10648
|
$hasRootErrors: hasRootErrors,
|
|
10651
10649
|
children: [
|
|
10652
|
-
/* @__PURE__ */
|
|
10650
|
+
/* @__PURE__ */ jsx91(FileUploaderInput, { ...getInputProps() }),
|
|
10653
10651
|
"Dra og slipp filer her eller",
|
|
10654
10652
|
" ",
|
|
10655
|
-
/* @__PURE__ */
|
|
10656
|
-
/* @__PURE__ */
|
|
10653
|
+
/* @__PURE__ */ jsx91(VisuallyHidden, { as: "span", children: "velg fil med p\xE5f\xF8lgende knapp" }),
|
|
10654
|
+
/* @__PURE__ */ jsx91(
|
|
10657
10655
|
Button,
|
|
10658
10656
|
{
|
|
10659
10657
|
...getButtonProps(),
|
|
@@ -10676,8 +10674,8 @@ var FileUploader = (props) => {
|
|
|
10676
10674
|
]
|
|
10677
10675
|
}
|
|
10678
10676
|
),
|
|
10679
|
-
/* @__PURE__ */
|
|
10680
|
-
/* @__PURE__ */
|
|
10677
|
+
/* @__PURE__ */ jsx91(ErrorList, { errors: rootErrorsList }),
|
|
10678
|
+
/* @__PURE__ */ jsx91(FileListElement, { children: fileListElements })
|
|
10681
10679
|
] });
|
|
10682
10680
|
};
|
|
10683
10681
|
FileUploader.displayName = "FileUploader";
|
|
@@ -10686,7 +10684,7 @@ FileUploader.displayName = "FileUploader";
|
|
|
10686
10684
|
import { ddsBaseTokens as ddsBaseTokens43 } from "@norges-domstoler/dds-design-tokens";
|
|
10687
10685
|
import styled80 from "styled-components";
|
|
10688
10686
|
import { Typography as Typography18 } from "@norges-domstoler/dds-typography";
|
|
10689
|
-
import { jsx as
|
|
10687
|
+
import { jsx as jsx92, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
10690
10688
|
var { colors: colors28, spacing: spacing37 } = ddsBaseTokens43;
|
|
10691
10689
|
var StyledEmptyContent = styled80.div`
|
|
10692
10690
|
display: flex;
|
|
@@ -10706,9 +10704,9 @@ var StyledEmptyContentText = styled80.div`
|
|
|
10706
10704
|
gap: ${spacing37.SizesDdsSpacingLayoutX1};
|
|
10707
10705
|
`;
|
|
10708
10706
|
function EmptyContent({ title: title3, message: message2, ...rest }) {
|
|
10709
|
-
return /* @__PURE__ */
|
|
10710
|
-
title3 && /* @__PURE__ */
|
|
10711
|
-
/* @__PURE__ */
|
|
10707
|
+
return /* @__PURE__ */ jsx92(StyledEmptyContent, { ...rest, children: /* @__PURE__ */ jsxs52(StyledEmptyContentText, { children: [
|
|
10708
|
+
title3 && /* @__PURE__ */ jsx92(Typography18, { typographyType: "headingSans02", children: title3 }),
|
|
10709
|
+
/* @__PURE__ */ jsx92(Typography18, { typographyType: "bodySans02", children: message2 })
|
|
10712
10710
|
] }) });
|
|
10713
10711
|
}
|
|
10714
10712
|
EmptyContent.displayName = "EmptyContent";
|
|
@@ -10734,7 +10732,7 @@ var backLinkTokens = {
|
|
|
10734
10732
|
};
|
|
10735
10733
|
|
|
10736
10734
|
// src/components/BackLink/BackLink.tsx
|
|
10737
|
-
import { jsx as
|
|
10735
|
+
import { jsx as jsx93, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
10738
10736
|
var Nav2 = styled81("nav")`
|
|
10739
10737
|
align-items: center;
|
|
10740
10738
|
display: flex;
|
|
@@ -10745,8 +10743,8 @@ var StyledIcon4 = styled81(Icon21)`
|
|
|
10745
10743
|
`;
|
|
10746
10744
|
var BackLink = forwardRef63((props, ref) => {
|
|
10747
10745
|
return /* @__PURE__ */ jsxs53(Nav2, { ref, children: [
|
|
10748
|
-
/* @__PURE__ */
|
|
10749
|
-
/* @__PURE__ */
|
|
10746
|
+
/* @__PURE__ */ jsx93(StyledIcon4, { icon: icons2.ArrowLeftIcon, iconSize: "small" }),
|
|
10747
|
+
/* @__PURE__ */ jsx93(Typography19, { typographyType: "a", href: props.href, children: props.label })
|
|
10750
10748
|
] });
|
|
10751
10749
|
});
|
|
10752
10750
|
BackLink.displayName = "BackLink";
|
|
@@ -10760,7 +10758,7 @@ import styled82, { css as css40 } from "styled-components";
|
|
|
10760
10758
|
import { ddsBaseTokens as ddsBaseTokens45 } from "@norges-domstoler/dds-design-tokens";
|
|
10761
10759
|
import { Thumbup, Thumbdown } from "@norges-domstoler/dds-icons";
|
|
10762
10760
|
import { Label as Label9 } from "@norges-domstoler/dds-typography";
|
|
10763
|
-
import { jsx as
|
|
10761
|
+
import { jsx as jsx94, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
10764
10762
|
var RatingContainer = styled82.div`
|
|
10765
10763
|
display: flex;
|
|
10766
10764
|
gap: ${ddsBaseTokens45.spacing.SizesDdsSpacingLocalX1};
|
|
@@ -10782,9 +10780,9 @@ var RatingComponent = ({
|
|
|
10782
10780
|
handleRatingChange
|
|
10783
10781
|
}) => {
|
|
10784
10782
|
return /* @__PURE__ */ jsxs54(RatingContainer, { $layout: layout, children: [
|
|
10785
|
-
/* @__PURE__ */
|
|
10786
|
-
loading ? /* @__PURE__ */
|
|
10787
|
-
/* @__PURE__ */
|
|
10783
|
+
/* @__PURE__ */ jsx94(Label9, { children: ratingLabel }),
|
|
10784
|
+
loading ? /* @__PURE__ */ jsx94(Spinner, { tooltip: "Laster opp tilbakemelding ..." }) : /* @__PURE__ */ jsxs54(HStack, { gap: "layout-x1", children: [
|
|
10785
|
+
/* @__PURE__ */ jsx94(Tooltip, { text: thumbUpTooltip, children: /* @__PURE__ */ jsx94(
|
|
10788
10786
|
RatingButton,
|
|
10789
10787
|
{
|
|
10790
10788
|
htmlProps: { "aria-label": thumbUpTooltip },
|
|
@@ -10794,7 +10792,7 @@ var RatingComponent = ({
|
|
|
10794
10792
|
size: "large"
|
|
10795
10793
|
}
|
|
10796
10794
|
) }),
|
|
10797
|
-
/* @__PURE__ */
|
|
10795
|
+
/* @__PURE__ */ jsx94(Tooltip, { text: thumbDownTooltip, children: /* @__PURE__ */ jsx94("div", { children: /* @__PURE__ */ jsx94(
|
|
10798
10796
|
RatingButton,
|
|
10799
10797
|
{
|
|
10800
10798
|
htmlProps: { "aria-label": thumbDownTooltip },
|
|
@@ -10817,7 +10815,7 @@ import {
|
|
|
10817
10815
|
Icon as Icon22
|
|
10818
10816
|
} from "@norges-domstoler/dds-icons";
|
|
10819
10817
|
import { Paragraph } from "@norges-domstoler/dds-typography";
|
|
10820
|
-
import { jsx as
|
|
10818
|
+
import { jsx as jsx95, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
10821
10819
|
var IconLabelSpan = styled83.span`
|
|
10822
10820
|
display: inline-flex;
|
|
10823
10821
|
align-items: center;
|
|
@@ -10835,7 +10833,7 @@ var CommentComponent = ({
|
|
|
10835
10833
|
}) => {
|
|
10836
10834
|
return /* @__PURE__ */ jsxs55(VStack, { gap: "layout-x1", children: [
|
|
10837
10835
|
/* @__PURE__ */ jsxs55(IconLabelSpan, { children: [
|
|
10838
|
-
/* @__PURE__ */
|
|
10836
|
+
/* @__PURE__ */ jsx95(
|
|
10839
10837
|
Icon22,
|
|
10840
10838
|
{
|
|
10841
10839
|
icon: rating === "positive" ? ThumbupFilled : ThumbdownFilled,
|
|
@@ -10847,7 +10845,7 @@ var CommentComponent = ({
|
|
|
10847
10845
|
" "
|
|
10848
10846
|
] })
|
|
10849
10847
|
] }),
|
|
10850
|
-
/* @__PURE__ */
|
|
10848
|
+
/* @__PURE__ */ jsx95(
|
|
10851
10849
|
TextArea,
|
|
10852
10850
|
{
|
|
10853
10851
|
value: feedbackText,
|
|
@@ -10856,7 +10854,7 @@ var CommentComponent = ({
|
|
|
10856
10854
|
tip: "Ikke send inn personopplysninger eller annen sensitiv informasjon"
|
|
10857
10855
|
}
|
|
10858
10856
|
),
|
|
10859
|
-
/* @__PURE__ */
|
|
10857
|
+
/* @__PURE__ */ jsx95(
|
|
10860
10858
|
Button,
|
|
10861
10859
|
{
|
|
10862
10860
|
purpose: "secondary",
|
|
@@ -10870,7 +10868,7 @@ var CommentComponent = ({
|
|
|
10870
10868
|
};
|
|
10871
10869
|
|
|
10872
10870
|
// src/components/Feedback/Feedback.tsx
|
|
10873
|
-
import { jsx as
|
|
10871
|
+
import { jsx as jsx96 } from "react/jsx-runtime";
|
|
10874
10872
|
var Feedback = ({
|
|
10875
10873
|
layout = "vertical",
|
|
10876
10874
|
ratingLabel = "Hva syns du om tjenesten?",
|
|
@@ -10915,7 +10913,7 @@ var Feedback = ({
|
|
|
10915
10913
|
isSubmittedProp === void 0 && setIsFeedbackSubmitted(true);
|
|
10916
10914
|
};
|
|
10917
10915
|
if (rating === null && !isFeedbackSubmitted) {
|
|
10918
|
-
return /* @__PURE__ */
|
|
10916
|
+
return /* @__PURE__ */ jsx96(
|
|
10919
10917
|
RatingComponent,
|
|
10920
10918
|
{
|
|
10921
10919
|
layout,
|
|
@@ -10928,7 +10926,7 @@ var Feedback = ({
|
|
|
10928
10926
|
);
|
|
10929
10927
|
}
|
|
10930
10928
|
if (!feedbackTextAreaExcluded && !isFeedbackSubmitted) {
|
|
10931
|
-
return /* @__PURE__ */
|
|
10929
|
+
return /* @__PURE__ */ jsx96(
|
|
10932
10930
|
CommentComponent,
|
|
10933
10931
|
{
|
|
10934
10932
|
rating,
|
|
@@ -10942,7 +10940,7 @@ var Feedback = ({
|
|
|
10942
10940
|
}
|
|
10943
10941
|
);
|
|
10944
10942
|
}
|
|
10945
|
-
return /* @__PURE__ */
|
|
10943
|
+
return /* @__PURE__ */ jsx96(Paragraph2, { children: submittedTitle });
|
|
10946
10944
|
};
|
|
10947
10945
|
export {
|
|
10948
10946
|
AppShell2 as AppShell,
|