@norges-domstoler/dds-components 0.0.0-dev-20230925154113 → 0.0.0-dev-20230927082608
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 +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +313 -354
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +221 -381
- package/dist/index.mjs.map +1 -0
- package/package.json +7 -7
package/dist/index.mjs
CHANGED
|
@@ -1,156 +1,8 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc3) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc3 = __getOwnPropDesc(from, key)) || desc3.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
18
|
-
|
|
19
|
-
// src/index.ts
|
|
20
|
-
var src_exports = {};
|
|
21
|
-
__export(src_exports, {
|
|
22
|
-
AppShell: () => AppShell2,
|
|
23
|
-
BackLink: () => BackLink,
|
|
24
|
-
Breadcrumb: () => Breadcrumb,
|
|
25
|
-
Breadcrumbs: () => Breadcrumbs,
|
|
26
|
-
Button: () => Button,
|
|
27
|
-
Card: () => Card,
|
|
28
|
-
CardAccordion: () => CardAccordion,
|
|
29
|
-
CardAccordionBody: () => CardAccordionBody,
|
|
30
|
-
CardAccordionHeader: () => CardAccordionHeader,
|
|
31
|
-
Checkbox: () => Checkbox,
|
|
32
|
-
CheckboxGroup: () => CheckboxGroup,
|
|
33
|
-
Chip: () => Chip,
|
|
34
|
-
ChipGroup: () => ChipGroup,
|
|
35
|
-
CollapsibleTable: () => CollapsibleTable2,
|
|
36
|
-
Container: () => Container,
|
|
37
|
-
Datepicker: () => Datepicker,
|
|
38
|
-
DescriptionList: () => DescriptionList,
|
|
39
|
-
DescriptionListDesc: () => DescriptionListDesc,
|
|
40
|
-
DescriptionListGroup: () => DescriptionListGroup,
|
|
41
|
-
DescriptionListTerm: () => DescriptionListTerm,
|
|
42
|
-
Divider: () => Divider,
|
|
43
|
-
Drawer: () => Drawer,
|
|
44
|
-
DrawerGroup: () => DrawerGroup,
|
|
45
|
-
EmptyContent: () => EmptyContent,
|
|
46
|
-
Feedback: () => Feedback,
|
|
47
|
-
FileUploader: () => FileUploader,
|
|
48
|
-
GlobalMessage: () => GlobalMessage,
|
|
49
|
-
Grid: () => Grid,
|
|
50
|
-
GridChild: () => GridChild,
|
|
51
|
-
HStack: () => HStack,
|
|
52
|
-
InlineEditInput: () => InlineEditInput,
|
|
53
|
-
InlineEditTextArea: () => InlineEditTextArea,
|
|
54
|
-
InputMessage: () => InputMessage,
|
|
55
|
-
InternalHeader: () => InternalHeader,
|
|
56
|
-
List: () => List3,
|
|
57
|
-
ListItem: () => ListItem3,
|
|
58
|
-
LocalMessage: () => LocalMessage,
|
|
59
|
-
Modal: () => Modal,
|
|
60
|
-
ModalActions: () => ModalActions,
|
|
61
|
-
ModalBody: () => ModalBody,
|
|
62
|
-
OverflowMenu: () => OverflowMenu,
|
|
63
|
-
OverflowMenuGroup: () => OverflowMenuGroup,
|
|
64
|
-
OverflowMenuList: () => OverflowMenuList,
|
|
65
|
-
Pagination: () => Pagination,
|
|
66
|
-
Popover: () => Popover,
|
|
67
|
-
PopoverGroup: () => PopoverGroup,
|
|
68
|
-
ProgressTracker: () => ProgressTracker,
|
|
69
|
-
RadioButton: () => RadioButton,
|
|
70
|
-
RadioButtonGroup: () => RadioButtonGroup2,
|
|
71
|
-
ScreenSize: () => ScreenSize,
|
|
72
|
-
ScrollableContainer: () => ScrollableContainer,
|
|
73
|
-
Scrollbar: () => Scrollbar,
|
|
74
|
-
Search: () => Search2,
|
|
75
|
-
Select: () => Select,
|
|
76
|
-
SkipToContent: () => SkipToContent,
|
|
77
|
-
Spinner: () => Spinner,
|
|
78
|
-
SplitButton: () => SplitButton,
|
|
79
|
-
StyledTextArea: () => StyledTextArea,
|
|
80
|
-
Tab: () => Tab,
|
|
81
|
-
TabList: () => TabList,
|
|
82
|
-
TabPanel: () => TabPanel,
|
|
83
|
-
TabPanels: () => TabPanels,
|
|
84
|
-
Table: () => Table2,
|
|
85
|
-
Tabs: () => Tabs,
|
|
86
|
-
Tag: () => Tag,
|
|
87
|
-
TextArea: () => TextArea,
|
|
88
|
-
TextInput: () => TextInput,
|
|
89
|
-
ToggleBar: () => ToggleBar,
|
|
90
|
-
ToggleButton: () => ToggleButton,
|
|
91
|
-
ToggleButtonGroup: () => ToggleButtonGroup,
|
|
92
|
-
ToggleRadio: () => ToggleRadio,
|
|
93
|
-
Tooltip: () => Tooltip,
|
|
94
|
-
VStack: () => VStack,
|
|
95
|
-
VisuallyHidden: () => VisuallyHidden,
|
|
96
|
-
createSelectOptions: () => createSelectOptions,
|
|
97
|
-
getBaseHTMLProps: () => getBaseHTMLProps,
|
|
98
|
-
getLiteralScreenSize: () => getLiteralScreenSize,
|
|
99
|
-
isGridColumn: () => isGridColumn,
|
|
100
|
-
isKeyboardEvent: () => isKeyboardEvent,
|
|
101
|
-
isRelativeGridColumn: () => isRelativeGridColumn,
|
|
102
|
-
scrollbarStyling: () => scrollbarStyling,
|
|
103
|
-
useCombinedRef: () => useCombinedRef,
|
|
104
|
-
useFloatPosition: () => useFloatPosition,
|
|
105
|
-
useFocusTrap: () => useFocusTrap,
|
|
106
|
-
useMountTransition: () => useMountTransition,
|
|
107
|
-
useOnClickOutside: () => useOnClickOutside,
|
|
108
|
-
useOnKeyDown: () => useOnKeyDown,
|
|
109
|
-
useReturnFocusOnBlur: () => useReturnFocusOnBlur,
|
|
110
|
-
useRoveFocus: () => useRoveFocus,
|
|
111
|
-
useScreenSize: () => useScreenSize
|
|
112
|
-
});
|
|
113
|
-
|
|
114
|
-
// src/dds-core.ts
|
|
115
|
-
import {
|
|
116
|
-
ScreenSize,
|
|
117
|
-
getLiteralScreenSize,
|
|
118
|
-
getBaseHTMLProps,
|
|
119
|
-
isKeyboardEvent,
|
|
120
|
-
useCombinedRef,
|
|
121
|
-
useFloatPosition,
|
|
122
|
-
useFocusTrap,
|
|
123
|
-
useMountTransition,
|
|
124
|
-
useOnClickOutside,
|
|
125
|
-
useOnKeyDown,
|
|
126
|
-
useReturnFocusOnBlur,
|
|
127
|
-
useRoveFocus,
|
|
128
|
-
useScreenSize
|
|
129
|
-
} from "@norges-domstoler/dds-core";
|
|
130
|
-
|
|
131
|
-
// src/dds-form.ts
|
|
132
|
-
var dds_form_exports = {};
|
|
133
|
-
__reExport(dds_form_exports, dds_form_star);
|
|
134
|
-
import * as dds_form_star from "@norges-domstoler/dds-form";
|
|
135
|
-
|
|
136
|
-
// src/index.ts
|
|
137
|
-
__reExport(src_exports, dds_form_exports);
|
|
138
|
-
|
|
139
|
-
// src/dds-icons.ts
|
|
140
|
-
var dds_icons_exports = {};
|
|
141
|
-
__reExport(dds_icons_exports, dds_icons_star);
|
|
142
|
-
import * as dds_icons_star from "@norges-domstoler/dds-icons";
|
|
143
|
-
|
|
144
1
|
// src/index.ts
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
__reExport(dds_typography_exports, dds_typography_star);
|
|
150
|
-
import * as dds_typography_star from "@norges-domstoler/dds-typography";
|
|
151
|
-
|
|
152
|
-
// src/index.ts
|
|
153
|
-
__reExport(src_exports, dds_typography_exports);
|
|
2
|
+
export * from "@norges-domstoler/dds-core";
|
|
3
|
+
export * from "@norges-domstoler/dds-form";
|
|
4
|
+
export * from "@norges-domstoler/dds-icons";
|
|
5
|
+
export * from "@norges-domstoler/dds-typography";
|
|
154
6
|
|
|
155
7
|
// src/components/AppShell/AppShell.tsx
|
|
156
8
|
import styled12 from "styled-components";
|
|
@@ -230,7 +82,7 @@ import styled11 from "styled-components";
|
|
|
230
82
|
import { forwardRef } from "react";
|
|
231
83
|
import styled, { css } from "styled-components";
|
|
232
84
|
import {
|
|
233
|
-
getBaseHTMLProps
|
|
85
|
+
getBaseHTMLProps
|
|
234
86
|
} from "@norges-domstoler/dds-core";
|
|
235
87
|
|
|
236
88
|
// src/components/Divider/Divider.tokens.tsx
|
|
@@ -268,7 +120,7 @@ var StyledDivider = styled.hr`
|
|
|
268
120
|
var Divider = forwardRef((props, ref) => {
|
|
269
121
|
const { color = "primary", id, className, htmlProps, ...rest } = props;
|
|
270
122
|
const lineProps = {
|
|
271
|
-
...
|
|
123
|
+
...getBaseHTMLProps(id, className, htmlProps, rest),
|
|
272
124
|
color
|
|
273
125
|
};
|
|
274
126
|
return /* @__PURE__ */ jsx(StyledDivider, { ref, ...lineProps });
|
|
@@ -455,7 +307,7 @@ var NavigationLogo = styled3.a`
|
|
|
455
307
|
// src/components/Button/Button.tsx
|
|
456
308
|
import { forwardRef as forwardRef2 } from "react";
|
|
457
309
|
import { Icon as Icon2 } from "@norges-domstoler/dds-icons";
|
|
458
|
-
import { getBaseHTMLProps as
|
|
310
|
+
import { getBaseHTMLProps as getBaseHTMLProps3 } from "@norges-domstoler/dds-core";
|
|
459
311
|
|
|
460
312
|
// src/components/Button/Button.tokens.tsx
|
|
461
313
|
import { ddsBaseTokens as ddsBaseTokens3 } from "@norges-domstoler/dds-design-tokens";
|
|
@@ -805,7 +657,7 @@ import styled4 from "styled-components";
|
|
|
805
657
|
import { getTextColor } from "@norges-domstoler/dds-core";
|
|
806
658
|
import { ddsBaseTokens as ddsBaseTokens4 } from "@norges-domstoler/dds-design-tokens";
|
|
807
659
|
import {
|
|
808
|
-
getBaseHTMLProps as
|
|
660
|
+
getBaseHTMLProps as getBaseHTMLProps2
|
|
809
661
|
} from "@norges-domstoler/dds-core";
|
|
810
662
|
import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
811
663
|
var StyledSpinner = styled4.svg`
|
|
@@ -866,7 +718,7 @@ function Spinner(props) {
|
|
|
866
718
|
const generatedId = useId();
|
|
867
719
|
const uniqueId = `${generatedId}-spinnerTitle`;
|
|
868
720
|
const spinnerProps = {
|
|
869
|
-
...
|
|
721
|
+
...getBaseHTMLProps2(id, className, htmlProps, rest),
|
|
870
722
|
outerAnimationDelay,
|
|
871
723
|
size
|
|
872
724
|
};
|
|
@@ -1075,7 +927,7 @@ var Button = forwardRef2(
|
|
|
1075
927
|
const hasLabel = !!label3;
|
|
1076
928
|
const hasIcon = !!icon12;
|
|
1077
929
|
const wrapperProps = {
|
|
1078
|
-
...
|
|
930
|
+
...getBaseHTMLProps3(id, className, htmlProps, rest),
|
|
1079
931
|
href,
|
|
1080
932
|
label: label3,
|
|
1081
933
|
as,
|
|
@@ -1149,7 +1001,7 @@ import {
|
|
|
1149
1001
|
} from "react";
|
|
1150
1002
|
import styled6 from "styled-components";
|
|
1151
1003
|
import {
|
|
1152
|
-
getBaseHTMLProps as
|
|
1004
|
+
getBaseHTMLProps as getBaseHTMLProps4
|
|
1153
1005
|
} from "@norges-domstoler/dds-core";
|
|
1154
1006
|
|
|
1155
1007
|
// src/components/ScrollableContainer/ScrollableContainer.tokens.tsx
|
|
@@ -1326,7 +1178,7 @@ var Scrollbar = (props) => {
|
|
|
1326
1178
|
return isScrollable ? /* @__PURE__ */ jsx7(
|
|
1327
1179
|
ScrollbarOuterWrapper,
|
|
1328
1180
|
{
|
|
1329
|
-
...
|
|
1181
|
+
...getBaseHTMLProps4(id, className, htmlProps, rest),
|
|
1330
1182
|
children: /* @__PURE__ */ jsxs4(ScrollbarElements, { children: [
|
|
1331
1183
|
/* @__PURE__ */ jsx7(Track, { ref: trackRef, onClick: handleTrackClick }),
|
|
1332
1184
|
/* @__PURE__ */ jsx7(
|
|
@@ -1350,7 +1202,7 @@ Scrollbar.displayName = "Scrollbar";
|
|
|
1350
1202
|
import { useRef as useRef2 } from "react";
|
|
1351
1203
|
import styled7 from "styled-components";
|
|
1352
1204
|
import {
|
|
1353
|
-
getBaseHTMLProps as
|
|
1205
|
+
getBaseHTMLProps as getBaseHTMLProps5
|
|
1354
1206
|
} from "@norges-domstoler/dds-core";
|
|
1355
1207
|
import {
|
|
1356
1208
|
focusVisibleTransitionValue as focusVisibleTransitionValue2,
|
|
@@ -1395,7 +1247,7 @@ var ScrollableContainer = (props) => {
|
|
|
1395
1247
|
return /* @__PURE__ */ jsxs5(
|
|
1396
1248
|
StyledScrollableContainer,
|
|
1397
1249
|
{
|
|
1398
|
-
...
|
|
1250
|
+
...getBaseHTMLProps5(id, className, htmlProps, rest),
|
|
1399
1251
|
children: [
|
|
1400
1252
|
/* @__PURE__ */ jsx8(Content, { height: contentHeight, ref, tabIndex: 0, children }),
|
|
1401
1253
|
/* @__PURE__ */ jsx8(Scrollbar, { contentRef: ref })
|
|
@@ -1438,11 +1290,11 @@ var scrollbarStyling = {
|
|
|
1438
1290
|
|
|
1439
1291
|
// src/components/OverflowMenu/OverflowMenu.tsx
|
|
1440
1292
|
import {
|
|
1441
|
-
useCombinedRef as
|
|
1442
|
-
useOnClickOutside
|
|
1443
|
-
useOnKeyDown
|
|
1444
|
-
useFloatPosition
|
|
1445
|
-
useRoveFocus
|
|
1293
|
+
useCombinedRef as useCombinedRef2,
|
|
1294
|
+
useOnClickOutside,
|
|
1295
|
+
useOnKeyDown,
|
|
1296
|
+
useFloatPosition,
|
|
1297
|
+
useRoveFocus
|
|
1446
1298
|
} from "@norges-domstoler/dds-core";
|
|
1447
1299
|
|
|
1448
1300
|
// src/components/OverflowMenu/OverflowMenuItem.tsx
|
|
@@ -1502,9 +1354,9 @@ var overflowMenuTokens = {
|
|
|
1502
1354
|
|
|
1503
1355
|
// src/components/OverflowMenu/OverflowMenuItem.tsx
|
|
1504
1356
|
import { Icon as Icon3 } from "@norges-domstoler/dds-icons";
|
|
1505
|
-
import { useCombinedRef
|
|
1357
|
+
import { useCombinedRef } from "@norges-domstoler/dds-core";
|
|
1506
1358
|
import {
|
|
1507
|
-
getBaseHTMLProps as
|
|
1359
|
+
getBaseHTMLProps as getBaseHTMLProps6
|
|
1508
1360
|
} from "@norges-domstoler/dds-core";
|
|
1509
1361
|
import { normalizeButton as normalizeButton2 } from "@norges-domstoler/dds-core";
|
|
1510
1362
|
import {
|
|
@@ -1577,7 +1429,7 @@ var OverflowMenuItem = forwardRef3((props, ref) => {
|
|
|
1577
1429
|
onClick = props.onClick;
|
|
1578
1430
|
}
|
|
1579
1431
|
const itemRef = useRef3(null);
|
|
1580
|
-
const combinedRef =
|
|
1432
|
+
const combinedRef = useCombinedRef(ref, itemRef);
|
|
1581
1433
|
useEffect2(() => {
|
|
1582
1434
|
var _a;
|
|
1583
1435
|
if (focus) {
|
|
@@ -1606,7 +1458,7 @@ var OverflowMenuItem = forwardRef3((props, ref) => {
|
|
|
1606
1458
|
};
|
|
1607
1459
|
const iconElement = icon12 && /* @__PURE__ */ jsx9(Icon3, { iconSize: "inherit", icon: icon12 });
|
|
1608
1460
|
if (!href && !onClick) {
|
|
1609
|
-
return /* @__PURE__ */ jsxs6(Span, { ...{ ...
|
|
1461
|
+
return /* @__PURE__ */ jsxs6(Span, { ...{ ...getBaseHTMLProps6(id, className, htmlProps, rest), ref }, children: [
|
|
1610
1462
|
/* @__PURE__ */ jsx9(IconWrapper, { children: iconElement }),
|
|
1611
1463
|
title3
|
|
1612
1464
|
] });
|
|
@@ -1615,7 +1467,7 @@ var OverflowMenuItem = forwardRef3((props, ref) => {
|
|
|
1615
1467
|
return /* @__PURE__ */ jsxs6(
|
|
1616
1468
|
Link,
|
|
1617
1469
|
{
|
|
1618
|
-
...
|
|
1470
|
+
...getBaseHTMLProps6(id, className, htmlProps, rest),
|
|
1619
1471
|
...linkProps,
|
|
1620
1472
|
as: "button",
|
|
1621
1473
|
ref: combinedRef,
|
|
@@ -1629,7 +1481,7 @@ var OverflowMenuItem = forwardRef3((props, ref) => {
|
|
|
1629
1481
|
return /* @__PURE__ */ jsxs6(
|
|
1630
1482
|
Link,
|
|
1631
1483
|
{
|
|
1632
|
-
...
|
|
1484
|
+
...getBaseHTMLProps6(id, className, htmlProps, rest),
|
|
1633
1485
|
...linkProps,
|
|
1634
1486
|
as: "a",
|
|
1635
1487
|
ref: combinedRef,
|
|
@@ -1643,7 +1495,7 @@ var OverflowMenuItem = forwardRef3((props, ref) => {
|
|
|
1643
1495
|
OverflowMenuItem.displayName = "OverflowMenuItem";
|
|
1644
1496
|
|
|
1645
1497
|
// src/components/OverflowMenu/OverflowMenu.tsx
|
|
1646
|
-
import { getBaseHTMLProps as
|
|
1498
|
+
import { getBaseHTMLProps as getBaseHTMLProps7 } from "@norges-domstoler/dds-core";
|
|
1647
1499
|
import { PersonIcon as PersonIcon2 } from "@norges-domstoler/dds-icons";
|
|
1648
1500
|
import { Fragment as Fragment2, jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1649
1501
|
var { container: container2, divider: divider3 } = overflowMenuTokens;
|
|
@@ -1694,15 +1546,15 @@ var OverflowMenu = forwardRef4(
|
|
|
1694
1546
|
htmlProps = {},
|
|
1695
1547
|
...rest
|
|
1696
1548
|
} = props;
|
|
1697
|
-
const { reference, floating, refs, styles } =
|
|
1549
|
+
const { reference, floating, refs, styles } = useFloatPosition(null, {
|
|
1698
1550
|
placement,
|
|
1699
1551
|
offset
|
|
1700
1552
|
});
|
|
1701
|
-
const combinedRef =
|
|
1553
|
+
const combinedRef = useCombinedRef2(ref, floating);
|
|
1702
1554
|
useEffect3(() => {
|
|
1703
1555
|
anchorRef ? reference(anchorRef.current) : reference(null);
|
|
1704
1556
|
}, [anchorRef]);
|
|
1705
|
-
|
|
1557
|
+
useOnClickOutside(
|
|
1706
1558
|
[(_a = refs == null ? void 0 : refs.floating) == null ? void 0 : _a.current, (_b = refs == null ? void 0 : refs.reference) == null ? void 0 : _b.current],
|
|
1707
1559
|
() => {
|
|
1708
1560
|
if (isOpen) {
|
|
@@ -1711,7 +1563,7 @@ var OverflowMenu = forwardRef4(
|
|
|
1711
1563
|
}
|
|
1712
1564
|
}
|
|
1713
1565
|
);
|
|
1714
|
-
|
|
1566
|
+
useOnKeyDown(["Esc", "Escape"], () => {
|
|
1715
1567
|
var _a2;
|
|
1716
1568
|
if (isOpen) {
|
|
1717
1569
|
onClose && onClose();
|
|
@@ -1719,7 +1571,7 @@ var OverflowMenu = forwardRef4(
|
|
|
1719
1571
|
anchorRef && ((_a2 = anchorRef.current) == null ? void 0 : _a2.focus());
|
|
1720
1572
|
}
|
|
1721
1573
|
});
|
|
1722
|
-
|
|
1574
|
+
useOnKeyDown(["Tab"], () => {
|
|
1723
1575
|
if (isOpen) {
|
|
1724
1576
|
onClose && onClose();
|
|
1725
1577
|
onToggle && onToggle();
|
|
@@ -1735,7 +1587,7 @@ var OverflowMenu = forwardRef4(
|
|
|
1735
1587
|
hasNavItems && interactiveItems.push(...navItems);
|
|
1736
1588
|
hasContextItems && interactiveItems.push(...items);
|
|
1737
1589
|
const hasInteractiveItems = interactiveItems.length > 0;
|
|
1738
|
-
const [focus, setFocus] =
|
|
1590
|
+
const [focus, setFocus] = useRoveFocus(
|
|
1739
1591
|
interactiveItems && interactiveItems.length,
|
|
1740
1592
|
!isOpen
|
|
1741
1593
|
);
|
|
@@ -1777,7 +1629,7 @@ var OverflowMenu = forwardRef4(
|
|
|
1777
1629
|
const { style = {}, ...restHTMLProps } = htmlProps;
|
|
1778
1630
|
const generatedId = useId2();
|
|
1779
1631
|
const containerProps = {
|
|
1780
|
-
...
|
|
1632
|
+
...getBaseHTMLProps7(id, className, restHTMLProps, rest),
|
|
1781
1633
|
ref: combinedRef,
|
|
1782
1634
|
id: id != null ? id : `${generatedId}-overflowMenu`,
|
|
1783
1635
|
isOpen,
|
|
@@ -2157,7 +2009,7 @@ AppShell2.NavItem = NavigationItem;
|
|
|
2157
2009
|
// src/components/SelectionControl/RadioButton/RadioButton.tsx
|
|
2158
2010
|
import { forwardRef as forwardRef5, useId as useId4 } from "react";
|
|
2159
2011
|
import {
|
|
2160
|
-
getBaseHTMLProps as
|
|
2012
|
+
getBaseHTMLProps as getBaseHTMLProps8,
|
|
2161
2013
|
joinClassNames
|
|
2162
2014
|
} from "@norges-domstoler/dds-core";
|
|
2163
2015
|
import { Typography } from "@norges-domstoler/dds-typography";
|
|
@@ -2491,7 +2343,7 @@ var RadioButton = forwardRef5(
|
|
|
2491
2343
|
if (ariaDescribedby)
|
|
2492
2344
|
describedByIds.push(ariaDescribedby);
|
|
2493
2345
|
const inputProps = {
|
|
2494
|
-
...
|
|
2346
|
+
...getBaseHTMLProps8(uniqueId, restHtmlProps, rest),
|
|
2495
2347
|
type: "radio",
|
|
2496
2348
|
name: name != null ? name : radioButtonGroup == null ? void 0 : radioButtonGroup.name,
|
|
2497
2349
|
disabled: disabled || readOnly || (radioButtonGroup == null ? void 0 : radioButtonGroup.disabled) || (radioButtonGroup == null ? void 0 : radioButtonGroup.readOnly),
|
|
@@ -2531,7 +2383,7 @@ import { Typography as Typography3 } from "@norges-domstoler/dds-typography";
|
|
|
2531
2383
|
import {
|
|
2532
2384
|
combineHandlers,
|
|
2533
2385
|
RequiredMarker,
|
|
2534
|
-
getBaseHTMLProps as
|
|
2386
|
+
getBaseHTMLProps as getBaseHTMLProps10
|
|
2535
2387
|
} from "@norges-domstoler/dds-core";
|
|
2536
2388
|
|
|
2537
2389
|
// src/components/InputMessage/InputMessage.tsx
|
|
@@ -2564,7 +2416,7 @@ var inputMessageTokens = {
|
|
|
2564
2416
|
import { Typography as Typography2 } from "@norges-domstoler/dds-typography";
|
|
2565
2417
|
import { forwardRef as forwardRef6 } from "react";
|
|
2566
2418
|
import {
|
|
2567
|
-
getBaseHTMLProps as
|
|
2419
|
+
getBaseHTMLProps as getBaseHTMLProps9
|
|
2568
2420
|
} from "@norges-domstoler/dds-core";
|
|
2569
2421
|
import { ErrorIcon } from "@norges-domstoler/dds-icons";
|
|
2570
2422
|
import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
@@ -2587,7 +2439,7 @@ var InputMessage = forwardRef6(
|
|
|
2587
2439
|
(props, ref) => {
|
|
2588
2440
|
const { message: message2, messageType, id, className, htmlProps, ...rest } = props;
|
|
2589
2441
|
const wrapperProps = {
|
|
2590
|
-
...
|
|
2442
|
+
...getBaseHTMLProps9(id, className, htmlProps, rest),
|
|
2591
2443
|
ref,
|
|
2592
2444
|
messageType
|
|
2593
2445
|
};
|
|
@@ -2669,7 +2521,7 @@ var RadioButtonGroupInner = (props, ref) => {
|
|
|
2669
2521
|
return /* @__PURE__ */ jsxs14(
|
|
2670
2522
|
OuterGroupContainer,
|
|
2671
2523
|
{
|
|
2672
|
-
...
|
|
2524
|
+
...getBaseHTMLProps10(
|
|
2673
2525
|
id,
|
|
2674
2526
|
className,
|
|
2675
2527
|
{ ...htmlProps, "aria-required": ariaRequired },
|
|
@@ -2713,7 +2565,7 @@ RadioButtonGroup2.displayName = "RadioButtonGroup";
|
|
|
2713
2565
|
// src/components/SelectionControl/Checkbox/Checkbox.tsx
|
|
2714
2566
|
import { forwardRef as forwardRef8, useId as useId6 } from "react";
|
|
2715
2567
|
import {
|
|
2716
|
-
getBaseHTMLProps as
|
|
2568
|
+
getBaseHTMLProps as getBaseHTMLProps11,
|
|
2717
2569
|
joinClassNames as joinClassNames2,
|
|
2718
2570
|
spaceSeparatedIdListGenerator
|
|
2719
2571
|
} from "@norges-domstoler/dds-core";
|
|
@@ -2763,7 +2615,7 @@ var Checkbox = forwardRef8(
|
|
|
2763
2615
|
style
|
|
2764
2616
|
};
|
|
2765
2617
|
const inputProps = {
|
|
2766
|
-
...
|
|
2618
|
+
...getBaseHTMLProps11(uniqueId, restHtmlProps, rest),
|
|
2767
2619
|
ref,
|
|
2768
2620
|
name,
|
|
2769
2621
|
indeterminate,
|
|
@@ -2800,7 +2652,7 @@ import { Typography as Typography5 } from "@norges-domstoler/dds-typography";
|
|
|
2800
2652
|
import {
|
|
2801
2653
|
derivativeIdGenerator,
|
|
2802
2654
|
RequiredMarker as RequiredMarker2,
|
|
2803
|
-
getBaseHTMLProps as
|
|
2655
|
+
getBaseHTMLProps as getBaseHTMLProps12
|
|
2804
2656
|
} from "@norges-domstoler/dds-core";
|
|
2805
2657
|
import { jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2806
2658
|
var CheckboxGroup = (props) => {
|
|
@@ -2833,7 +2685,7 @@ var CheckboxGroup = (props) => {
|
|
|
2833
2685
|
return /* @__PURE__ */ jsxs16(
|
|
2834
2686
|
OuterGroupContainer,
|
|
2835
2687
|
{
|
|
2836
|
-
...
|
|
2688
|
+
...getBaseHTMLProps12(
|
|
2837
2689
|
id,
|
|
2838
2690
|
className,
|
|
2839
2691
|
{ ...htmlProps, "aria-required": ariaRequired },
|
|
@@ -2953,7 +2805,7 @@ var getFormInputIconSize = (componentSize) => {
|
|
|
2953
2805
|
import { useId as useId8 } from "react";
|
|
2954
2806
|
import styled15 from "styled-components";
|
|
2955
2807
|
import {
|
|
2956
|
-
getBaseHTMLProps as
|
|
2808
|
+
getBaseHTMLProps as getBaseHTMLProps13
|
|
2957
2809
|
} from "@norges-domstoler/dds-core";
|
|
2958
2810
|
import { Typography as Typography6 } from "@norges-domstoler/dds-typography";
|
|
2959
2811
|
import { jsxs as jsxs17 } from "react/jsx-runtime";
|
|
@@ -2967,7 +2819,7 @@ function CharCounter(props) {
|
|
|
2967
2819
|
return /* @__PURE__ */ jsxs17(
|
|
2968
2820
|
Wrapper,
|
|
2969
2821
|
{
|
|
2970
|
-
...
|
|
2822
|
+
...getBaseHTMLProps13(uniqueId, className, htmlProps, rest),
|
|
2971
2823
|
forwardedAs: "div",
|
|
2972
2824
|
typographyType: "supportingStyleHelperText01",
|
|
2973
2825
|
"aria-label": `${current} av ${max} tegn skrevet`,
|
|
@@ -3863,7 +3715,7 @@ var globalMessageTokens = {
|
|
|
3863
3715
|
import { Icon as Icon8 } from "@norges-domstoler/dds-icons";
|
|
3864
3716
|
import { Typography as Typography7 } from "@norges-domstoler/dds-typography";
|
|
3865
3717
|
import {
|
|
3866
|
-
getBaseHTMLProps as
|
|
3718
|
+
getBaseHTMLProps as getBaseHTMLProps14
|
|
3867
3719
|
} from "@norges-domstoler/dds-core";
|
|
3868
3720
|
import { CloseIcon as CloseIcon2 } from "@norges-domstoler/dds-icons";
|
|
3869
3721
|
import { getFontStyling as getFontStyling4 } from "@norges-domstoler/dds-typography";
|
|
@@ -3912,7 +3764,7 @@ var GlobalMessage = forwardRef10(
|
|
|
3912
3764
|
} = props;
|
|
3913
3765
|
const [isClosed, setClosed] = useState6(false);
|
|
3914
3766
|
const containerProps = {
|
|
3915
|
-
...
|
|
3767
|
+
...getBaseHTMLProps14(id, className, htmlProps, rest),
|
|
3916
3768
|
ref,
|
|
3917
3769
|
purpose
|
|
3918
3770
|
};
|
|
@@ -4056,7 +3908,7 @@ import {
|
|
|
4056
3908
|
getFontStyling as getFontStyling5
|
|
4057
3909
|
} from "@norges-domstoler/dds-typography";
|
|
4058
3910
|
import {
|
|
4059
|
-
getBaseHTMLProps as
|
|
3911
|
+
getBaseHTMLProps as getBaseHTMLProps15,
|
|
4060
3912
|
selection as selection4
|
|
4061
3913
|
} from "@norges-domstoler/dds-core";
|
|
4062
3914
|
import { CloseIcon as CloseIcon3 } from "@norges-domstoler/dds-icons";
|
|
@@ -4131,7 +3983,7 @@ var LocalMessage = forwardRef11(
|
|
|
4131
3983
|
} = props;
|
|
4132
3984
|
const [isClosed, setClosed] = useState7(false);
|
|
4133
3985
|
const containerProps = {
|
|
4134
|
-
...
|
|
3986
|
+
...getBaseHTMLProps15(id, className, htmlProps, rest),
|
|
4135
3987
|
purpose,
|
|
4136
3988
|
width,
|
|
4137
3989
|
layout,
|
|
@@ -4173,7 +4025,7 @@ LocalMessage.displayName = "LocalMessage";
|
|
|
4173
4025
|
import {
|
|
4174
4026
|
derivativeIdGenerator as derivativeIdGenerator5,
|
|
4175
4027
|
spaceSeparatedIdListGenerator as spaceSeparatedIdListGenerator4,
|
|
4176
|
-
useCombinedRef as
|
|
4028
|
+
useCombinedRef as useCombinedRef3
|
|
4177
4029
|
} from "@norges-domstoler/dds-core";
|
|
4178
4030
|
import {
|
|
4179
4031
|
Input as BaseInput
|
|
@@ -4194,7 +4046,7 @@ import styled23, { css as css11 } from "styled-components";
|
|
|
4194
4046
|
// src/components/VisuallyHidden/VisuallyHidden.tsx
|
|
4195
4047
|
import styled21 from "styled-components";
|
|
4196
4048
|
import {
|
|
4197
|
-
getBaseHTMLProps as
|
|
4049
|
+
getBaseHTMLProps as getBaseHTMLProps16
|
|
4198
4050
|
} from "@norges-domstoler/dds-core";
|
|
4199
4051
|
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
4200
4052
|
var Wrapper2 = styled21.span`
|
|
@@ -4213,9 +4065,9 @@ var Wrapper2 = styled21.span`
|
|
|
4213
4065
|
var VisuallyHidden = (props) => {
|
|
4214
4066
|
const { children, id, className, htmlProps, as, ...rest } = props;
|
|
4215
4067
|
if (as === "div") {
|
|
4216
|
-
return /* @__PURE__ */ jsx25(Wrapper2, { ...
|
|
4068
|
+
return /* @__PURE__ */ jsx25(Wrapper2, { ...getBaseHTMLProps16(id, className, htmlProps, rest), as, children });
|
|
4217
4069
|
}
|
|
4218
|
-
return /* @__PURE__ */ jsx25(Wrapper2, { ...
|
|
4070
|
+
return /* @__PURE__ */ jsx25(Wrapper2, { ...getBaseHTMLProps16(id, className, htmlProps, rest), children });
|
|
4219
4071
|
};
|
|
4220
4072
|
VisuallyHidden.displayName = "VisuallyHidden";
|
|
4221
4073
|
|
|
@@ -4348,10 +4200,10 @@ import { Paper } from "@norges-domstoler/dds-core";
|
|
|
4348
4200
|
import { Typography as Typography9 } from "@norges-domstoler/dds-typography";
|
|
4349
4201
|
import { getFontStyling as getFontStyling6 } from "@norges-domstoler/dds-typography";
|
|
4350
4202
|
import {
|
|
4351
|
-
getBaseHTMLProps as
|
|
4203
|
+
getBaseHTMLProps as getBaseHTMLProps17
|
|
4352
4204
|
} from "@norges-domstoler/dds-core";
|
|
4353
4205
|
import { forwardRef as forwardRef12 } from "react";
|
|
4354
|
-
import { useRoveFocus as
|
|
4206
|
+
import { useRoveFocus as useRoveFocus2 } from "@norges-domstoler/dds-core";
|
|
4355
4207
|
import { visibilityTransition as visibilityTransition2 } from "@norges-domstoler/dds-core";
|
|
4356
4208
|
import { derivativeIdGenerator as derivativeIdGenerator4 } from "@norges-domstoler/dds-core";
|
|
4357
4209
|
import { jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
@@ -4396,7 +4248,7 @@ var SearchSuggestions = forwardRef12((props, ref) => {
|
|
|
4396
4248
|
searchId,
|
|
4397
4249
|
"suggestions-header"
|
|
4398
4250
|
);
|
|
4399
|
-
const [focus, setFocus] =
|
|
4251
|
+
const [focus, setFocus] = useRoveFocus2(
|
|
4400
4252
|
suggestions && suggestions.length,
|
|
4401
4253
|
!showSuggestions
|
|
4402
4254
|
);
|
|
@@ -4421,7 +4273,7 @@ var SearchSuggestions = forwardRef12((props, ref) => {
|
|
|
4421
4273
|
return /* @__PURE__ */ jsxs22(
|
|
4422
4274
|
SuggestionsContainer,
|
|
4423
4275
|
{
|
|
4424
|
-
...
|
|
4276
|
+
...getBaseHTMLProps17(id, className, htmlProps, rest),
|
|
4425
4277
|
ref,
|
|
4426
4278
|
isHidden,
|
|
4427
4279
|
"aria-hidden": isHidden,
|
|
@@ -4528,7 +4380,7 @@ var Search = forwardRef13(
|
|
|
4528
4380
|
);
|
|
4529
4381
|
const [hasValue, setHasValue] = useState8(!!value);
|
|
4530
4382
|
const context = useAutocompleteSearch();
|
|
4531
|
-
const combinedRef = context.inputRef ?
|
|
4383
|
+
const combinedRef = context.inputRef ? useCombinedRef3(context.inputRef, ref) : ref;
|
|
4532
4384
|
const handleChange = (e) => {
|
|
4533
4385
|
setHasValue(e.target.value !== "");
|
|
4534
4386
|
context.onValueChange && context.onValueChange(e);
|
|
@@ -4645,7 +4497,7 @@ import {
|
|
|
4645
4497
|
useRef as useRef6,
|
|
4646
4498
|
useState as useState9
|
|
4647
4499
|
} from "react";
|
|
4648
|
-
import { useOnClickOutside as
|
|
4500
|
+
import { useOnClickOutside as useOnClickOutside2, useOnKeyDown as useOnKeyDown2 } from "@norges-domstoler/dds-core";
|
|
4649
4501
|
import { searchFilter as searchFilter2 } from "@norges-domstoler/dds-core";
|
|
4650
4502
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
4651
4503
|
var SearchAutocompleteWrapper = (props) => {
|
|
@@ -4710,10 +4562,10 @@ var SearchAutocompleteWrapper = (props) => {
|
|
|
4710
4562
|
};
|
|
4711
4563
|
const inputRef = useRef6(null);
|
|
4712
4564
|
const suggestionsRef = useRef6(null);
|
|
4713
|
-
|
|
4565
|
+
useOnClickOutside2([inputRef.current, suggestionsRef.current], () => {
|
|
4714
4566
|
closeSuggestions();
|
|
4715
4567
|
});
|
|
4716
|
-
|
|
4568
|
+
useOnKeyDown2("Tab", () => closeSuggestions());
|
|
4717
4569
|
const contextProps = {
|
|
4718
4570
|
showSuggestions,
|
|
4719
4571
|
inputRef,
|
|
@@ -5061,7 +4913,7 @@ import { forwardRef as forwardRef20 } from "react";
|
|
|
5061
4913
|
import styled30, { css as css15 } from "styled-components";
|
|
5062
4914
|
import {
|
|
5063
4915
|
selection as selection6,
|
|
5064
|
-
getBaseHTMLProps as
|
|
4916
|
+
getBaseHTMLProps as getBaseHTMLProps18
|
|
5065
4917
|
} from "@norges-domstoler/dds-core";
|
|
5066
4918
|
|
|
5067
4919
|
// src/components/DescriptionList/DescriptionList.tokens.tsx
|
|
@@ -5154,7 +5006,7 @@ var DescriptionList = forwardRef20((props, ref) => {
|
|
|
5154
5006
|
...rest
|
|
5155
5007
|
} = props;
|
|
5156
5008
|
const dListProps = {
|
|
5157
|
-
...
|
|
5009
|
+
...getBaseHTMLProps18(id, className, htmlProps, rest),
|
|
5158
5010
|
appearance,
|
|
5159
5011
|
direction,
|
|
5160
5012
|
ref
|
|
@@ -5181,7 +5033,7 @@ DescriptionListTerm.displayName = "DescriptionListTerm";
|
|
|
5181
5033
|
import { forwardRef as forwardRef22 } from "react";
|
|
5182
5034
|
import styled32 from "styled-components";
|
|
5183
5035
|
import {
|
|
5184
|
-
getBaseHTMLProps as
|
|
5036
|
+
getBaseHTMLProps as getBaseHTMLProps19
|
|
5185
5037
|
} from "@norges-domstoler/dds-core";
|
|
5186
5038
|
import { Icon as Icon11 } from "@norges-domstoler/dds-icons";
|
|
5187
5039
|
import { jsx as jsx37, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
@@ -5195,7 +5047,7 @@ var DListDesc = styled32.dd`
|
|
|
5195
5047
|
var DescriptionListDesc = forwardRef22((props, ref) => {
|
|
5196
5048
|
const { children, icon: icon12, id, className, htmlProps, ...rest } = props;
|
|
5197
5049
|
const dListDescProps = {
|
|
5198
|
-
...
|
|
5050
|
+
...getBaseHTMLProps19(id, className, htmlProps, rest),
|
|
5199
5051
|
children,
|
|
5200
5052
|
ref
|
|
5201
5053
|
};
|
|
@@ -5211,7 +5063,7 @@ DescriptionListDesc.displayName = "DescriptionListDesc";
|
|
|
5211
5063
|
import { forwardRef as forwardRef23 } from "react";
|
|
5212
5064
|
import styled33 from "styled-components";
|
|
5213
5065
|
import {
|
|
5214
|
-
getBaseHTMLProps as
|
|
5066
|
+
getBaseHTMLProps as getBaseHTMLProps20
|
|
5215
5067
|
} from "@norges-domstoler/dds-core";
|
|
5216
5068
|
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
5217
5069
|
var DListGroup = styled33.div`
|
|
@@ -5231,7 +5083,7 @@ var DescriptionListGroup = forwardRef23((props, ref) => {
|
|
|
5231
5083
|
...rest
|
|
5232
5084
|
} = props;
|
|
5233
5085
|
const dListGroupProps = {
|
|
5234
|
-
...
|
|
5086
|
+
...getBaseHTMLProps20(id, className, htmlProps, rest),
|
|
5235
5087
|
children,
|
|
5236
5088
|
ref,
|
|
5237
5089
|
margin,
|
|
@@ -5572,7 +5424,7 @@ var breadcrumbTokens = {
|
|
|
5572
5424
|
import { Icon as Icon13, icons } from "@norges-domstoler/dds-icons";
|
|
5573
5425
|
import {
|
|
5574
5426
|
removeListStyling as removeListStyling2,
|
|
5575
|
-
getBaseHTMLProps as
|
|
5427
|
+
getBaseHTMLProps as getBaseHTMLProps21
|
|
5576
5428
|
} from "@norges-domstoler/dds-core";
|
|
5577
5429
|
import { getFontStyling as getFontStyling9 } from "@norges-domstoler/dds-typography";
|
|
5578
5430
|
import { jsx as jsx44, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
@@ -5608,7 +5460,7 @@ var Breadcrumbs = forwardRef28(
|
|
|
5608
5460
|
return /* @__PURE__ */ jsx44(
|
|
5609
5461
|
"nav",
|
|
5610
5462
|
{
|
|
5611
|
-
...
|
|
5463
|
+
...getBaseHTMLProps21(id, className, htmlProps, rest),
|
|
5612
5464
|
ref,
|
|
5613
5465
|
"aria-label": "br\xF8dsmulesti",
|
|
5614
5466
|
children: /* @__PURE__ */ jsx44(List, { children: breadcrumbChildren })
|
|
@@ -5690,7 +5542,7 @@ import {
|
|
|
5690
5542
|
ChevronLastIcon
|
|
5691
5543
|
} from "@norges-domstoler/dds-icons";
|
|
5692
5544
|
import {
|
|
5693
|
-
getBaseHTMLProps as
|
|
5545
|
+
getBaseHTMLProps as getBaseHTMLProps22
|
|
5694
5546
|
} from "@norges-domstoler/dds-core";
|
|
5695
5547
|
import { jsx as jsx45, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
5696
5548
|
var { outerContainer: outerContainer6, indicatorsContainer: indicatorsContainer2, truncationIcon: truncationIcon2, list: list6 } = paginationTokens;
|
|
@@ -5817,10 +5669,10 @@ var Pagination = forwardRef29(
|
|
|
5817
5669
|
}
|
|
5818
5670
|
);
|
|
5819
5671
|
const navProps = !withSelect && !withCounter && {
|
|
5820
|
-
...
|
|
5672
|
+
...getBaseHTMLProps22(id, className, htmlProps, rest)
|
|
5821
5673
|
};
|
|
5822
5674
|
const containerProps = {
|
|
5823
|
-
...
|
|
5675
|
+
...getBaseHTMLProps22(id, className, htmlProps, rest),
|
|
5824
5676
|
smallScreen
|
|
5825
5677
|
};
|
|
5826
5678
|
const isOnFirstPage = activePage === 1;
|
|
@@ -5923,7 +5775,7 @@ import {
|
|
|
5923
5775
|
getFontStyling as getFontStyling10
|
|
5924
5776
|
} from "@norges-domstoler/dds-typography";
|
|
5925
5777
|
import {
|
|
5926
|
-
getBaseHTMLProps as
|
|
5778
|
+
getBaseHTMLProps as getBaseHTMLProps23,
|
|
5927
5779
|
selection as selection7
|
|
5928
5780
|
} from "@norges-domstoler/dds-core";
|
|
5929
5781
|
|
|
@@ -6035,7 +5887,7 @@ var List3 = forwardRef30(
|
|
|
6035
5887
|
} = props;
|
|
6036
5888
|
const as = listType === "ordered" ? "ol" : "ul";
|
|
6037
5889
|
const listProps = {
|
|
6038
|
-
...
|
|
5890
|
+
...getBaseHTMLProps23(id, className, htmlProps, rest),
|
|
6039
5891
|
listType,
|
|
6040
5892
|
typographyType: typographyType7,
|
|
6041
5893
|
as,
|
|
@@ -6102,7 +5954,7 @@ var cardTokens = {
|
|
|
6102
5954
|
|
|
6103
5955
|
// src/components/Card/Card.tsx
|
|
6104
5956
|
import {
|
|
6105
|
-
getBaseHTMLProps as
|
|
5957
|
+
getBaseHTMLProps as getBaseHTMLProps24,
|
|
6106
5958
|
selection as selection8
|
|
6107
5959
|
} from "@norges-domstoler/dds-core";
|
|
6108
5960
|
import {
|
|
@@ -6161,7 +6013,7 @@ var Card = (props) => {
|
|
|
6161
6013
|
return /* @__PURE__ */ jsx48(
|
|
6162
6014
|
Container6,
|
|
6163
6015
|
{
|
|
6164
|
-
...
|
|
6016
|
+
...getBaseHTMLProps24(id, className, htmlProps, rest),
|
|
6165
6017
|
cardType,
|
|
6166
6018
|
color,
|
|
6167
6019
|
as: "a",
|
|
@@ -6175,7 +6027,7 @@ var Card = (props) => {
|
|
|
6175
6027
|
return /* @__PURE__ */ jsx48(
|
|
6176
6028
|
Container6,
|
|
6177
6029
|
{
|
|
6178
|
-
...
|
|
6030
|
+
...getBaseHTMLProps24(id, className, htmlProps, rest),
|
|
6179
6031
|
cardType,
|
|
6180
6032
|
color,
|
|
6181
6033
|
as: "div",
|
|
@@ -6199,7 +6051,7 @@ import {
|
|
|
6199
6051
|
} from "react";
|
|
6200
6052
|
import styled43 from "styled-components";
|
|
6201
6053
|
import {
|
|
6202
|
-
getBaseHTMLProps as
|
|
6054
|
+
getBaseHTMLProps as getBaseHTMLProps25
|
|
6203
6055
|
} from "@norges-domstoler/dds-core";
|
|
6204
6056
|
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
6205
6057
|
var Wrapper4 = styled43.div``;
|
|
@@ -6242,7 +6094,7 @@ var CardAccordion = forwardRef32(
|
|
|
6242
6094
|
}));
|
|
6243
6095
|
});
|
|
6244
6096
|
const wrapperProps = {
|
|
6245
|
-
...
|
|
6097
|
+
...getBaseHTMLProps25(id, className, htmlProps, rest),
|
|
6246
6098
|
ref
|
|
6247
6099
|
};
|
|
6248
6100
|
return /* @__PURE__ */ jsx49(Wrapper4, { ...wrapperProps, children: Children9 });
|
|
@@ -6293,7 +6145,7 @@ import {
|
|
|
6293
6145
|
normalizeButton as normalizeButton4,
|
|
6294
6146
|
removeButtonStyling as removeButtonStyling3,
|
|
6295
6147
|
AnimatedChevronUpDown as AnimatedChevronUpDown2,
|
|
6296
|
-
getBaseHTMLProps as
|
|
6148
|
+
getBaseHTMLProps as getBaseHTMLProps26
|
|
6297
6149
|
} from "@norges-domstoler/dds-core";
|
|
6298
6150
|
import {
|
|
6299
6151
|
getFontStyling as getFontStyling12
|
|
@@ -6373,7 +6225,7 @@ var CardAccordionHeader = forwardRef33((props, ref) => {
|
|
|
6373
6225
|
}
|
|
6374
6226
|
};
|
|
6375
6227
|
const headerWrapperProps = {
|
|
6376
|
-
...
|
|
6228
|
+
...getBaseHTMLProps26(id, className, htmlProps, rest),
|
|
6377
6229
|
"aria-expanded": isExpanded,
|
|
6378
6230
|
"aria-controls": bodyId,
|
|
6379
6231
|
ref,
|
|
@@ -6410,7 +6262,7 @@ import {
|
|
|
6410
6262
|
import styled45, { css as css22 } from "styled-components";
|
|
6411
6263
|
import {
|
|
6412
6264
|
useIsMounted,
|
|
6413
|
-
getBaseHTMLProps as
|
|
6265
|
+
getBaseHTMLProps as getBaseHTMLProps27
|
|
6414
6266
|
} from "@norges-domstoler/dds-core";
|
|
6415
6267
|
import { getFontStyling as getFontStyling13 } from "@norges-domstoler/dds-typography";
|
|
6416
6268
|
|
|
@@ -6484,7 +6336,7 @@ var CardAccordionBody = forwardRef34((props, ref) => {
|
|
|
6484
6336
|
}
|
|
6485
6337
|
}, [isMounted]);
|
|
6486
6338
|
const bodyProps = {
|
|
6487
|
-
...
|
|
6339
|
+
...getBaseHTMLProps27(id, className, htmlProps, rest),
|
|
6488
6340
|
ref,
|
|
6489
6341
|
isExpanded,
|
|
6490
6342
|
role: "region",
|
|
@@ -6698,7 +6550,7 @@ var InternalHeaderListItem = forwardRef36(({ children, ...rest }, ref) => {
|
|
|
6698
6550
|
});
|
|
6699
6551
|
|
|
6700
6552
|
// src/components/InternalHeader/InternalHeader.tsx
|
|
6701
|
-
import { getBaseHTMLProps as
|
|
6553
|
+
import { getBaseHTMLProps as getBaseHTMLProps28 } from "@norges-domstoler/dds-core";
|
|
6702
6554
|
import { MenuIcon as MenuIcon2, MoreVerticalIcon } from "@norges-domstoler/dds-icons";
|
|
6703
6555
|
import { jsx as jsx54, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
6704
6556
|
var InternalHeader = (props) => {
|
|
@@ -6746,7 +6598,7 @@ var InternalHeader = (props) => {
|
|
|
6746
6598
|
) }, index);
|
|
6747
6599
|
}) }) }) : null;
|
|
6748
6600
|
const hasContextMenu = hasContextMenuElements || !!userProps || hasNavInContextMenu;
|
|
6749
|
-
return /* @__PURE__ */ jsxs30(OuterContainer3, { ...
|
|
6601
|
+
return /* @__PURE__ */ jsxs30(OuterContainer3, { ...getBaseHTMLProps28(id, className, htmlProps, rest), children: [
|
|
6750
6602
|
/* @__PURE__ */ jsx54(BannerWrapper, { hasContextMenu, children: /* @__PURE__ */ jsxs30(BannerLeftWrapper, { children: [
|
|
6751
6603
|
/* @__PURE__ */ jsx54(LovisaWrapper, { children: /* @__PURE__ */ jsx54(Typography12, { typographyType: "bodySans02", bold: true, as: "span", children: applicationName }) }),
|
|
6752
6604
|
/* @__PURE__ */ jsx54(ApplicationNameWrapper, { children: /* @__PURE__ */ jsx54(Typography12, { typographyType: "bodySans02", as: "span", children: applicationDesc }) })
|
|
@@ -6972,7 +6824,7 @@ var getMax = (type, max) => {
|
|
|
6972
6824
|
import { forwardRef as forwardRef38 } from "react";
|
|
6973
6825
|
import styled50 from "styled-components";
|
|
6974
6826
|
import {
|
|
6975
|
-
getBaseHTMLProps as
|
|
6827
|
+
getBaseHTMLProps as getBaseHTMLProps29,
|
|
6976
6828
|
joinClassNames as joinClassNames3
|
|
6977
6829
|
} from "@norges-domstoler/dds-core";
|
|
6978
6830
|
import {
|
|
@@ -7069,7 +6921,7 @@ var SkipToContent = forwardRef38(
|
|
|
7069
6921
|
className: joinClassNames3(className, htmlPropsClassName),
|
|
7070
6922
|
style
|
|
7071
6923
|
};
|
|
7072
|
-
return /* @__PURE__ */ jsx56(Wrapper5, { ...wrapperProps, children: /* @__PURE__ */ jsx56(Link3, { ...
|
|
6924
|
+
return /* @__PURE__ */ jsx56(Wrapper5, { ...wrapperProps, children: /* @__PURE__ */ jsx56(Link3, { ...getBaseHTMLProps29(id, restHtmlProps, rest), ref, children: text }) });
|
|
7073
6925
|
}
|
|
7074
6926
|
);
|
|
7075
6927
|
SkipToContent.displayName = "SkipToContent";
|
|
@@ -7086,12 +6938,12 @@ import {
|
|
|
7086
6938
|
useState as useState17
|
|
7087
6939
|
} from "react";
|
|
7088
6940
|
import {
|
|
7089
|
-
useCombinedRef as
|
|
7090
|
-
useOnKeyDown as
|
|
7091
|
-
useFloatPosition as
|
|
6941
|
+
useCombinedRef as useCombinedRef4,
|
|
6942
|
+
useOnKeyDown as useOnKeyDown3,
|
|
6943
|
+
useFloatPosition as useFloatPosition2
|
|
7092
6944
|
} from "@norges-domstoler/dds-core";
|
|
7093
6945
|
import {
|
|
7094
|
-
getBaseHTMLProps as
|
|
6946
|
+
getBaseHTMLProps as getBaseHTMLProps30
|
|
7095
6947
|
} from "@norges-domstoler/dds-core";
|
|
7096
6948
|
import { combineHandlers as combineHandlers2 } from "@norges-domstoler/dds-core";
|
|
7097
6949
|
|
|
@@ -7167,11 +7019,11 @@ var Tooltip = forwardRef39(
|
|
|
7167
7019
|
const [open, setOpen] = useState17(false);
|
|
7168
7020
|
const [inView, setInView] = useState17(false);
|
|
7169
7021
|
const [arrowElement, setArrowElement] = useState17(null);
|
|
7170
|
-
const { reference, floating, styles } =
|
|
7022
|
+
const { reference, floating, styles } = useFloatPosition2(arrowElement, {
|
|
7171
7023
|
placement
|
|
7172
7024
|
});
|
|
7173
7025
|
const tooltipRef = useRef10(null);
|
|
7174
|
-
const combinedRef =
|
|
7026
|
+
const combinedRef = useCombinedRef4(ref, floating, tooltipRef);
|
|
7175
7027
|
const closeWhenNotInView = (entries) => {
|
|
7176
7028
|
const [entry] = entries;
|
|
7177
7029
|
entry.isIntersecting ? setInView(true) : setInView(false);
|
|
@@ -7209,7 +7061,7 @@ var Tooltip = forwardRef39(
|
|
|
7209
7061
|
clearTimeout(timer);
|
|
7210
7062
|
};
|
|
7211
7063
|
}, []);
|
|
7212
|
-
|
|
7064
|
+
useOnKeyDown3(["Escape", "Esc"], () => {
|
|
7213
7065
|
if (open)
|
|
7214
7066
|
setOpen(false);
|
|
7215
7067
|
});
|
|
@@ -7233,7 +7085,7 @@ var Tooltip = forwardRef39(
|
|
|
7233
7085
|
})
|
|
7234
7086
|
);
|
|
7235
7087
|
const containerProps = {
|
|
7236
|
-
...
|
|
7088
|
+
...getBaseHTMLProps30(id, className, htmlProps, rest),
|
|
7237
7089
|
style,
|
|
7238
7090
|
onMouseLeave: combineHandlers2(closeTooltip, onMouseLeave),
|
|
7239
7091
|
onMouseOver: combineHandlers2(openTooltip, onMouseOver)
|
|
@@ -7305,14 +7157,14 @@ var modalTokens = {
|
|
|
7305
7157
|
import { createPortal } from "react-dom";
|
|
7306
7158
|
import { Typography as Typography13 } from "@norges-domstoler/dds-typography";
|
|
7307
7159
|
import {
|
|
7308
|
-
useCombinedRef as
|
|
7309
|
-
useOnClickOutside as
|
|
7310
|
-
useOnKeyDown as
|
|
7160
|
+
useCombinedRef as useCombinedRef5,
|
|
7161
|
+
useOnClickOutside as useOnClickOutside3,
|
|
7162
|
+
useOnKeyDown as useOnKeyDown4,
|
|
7311
7163
|
Paper as Paper3,
|
|
7312
7164
|
selection as selection11,
|
|
7313
|
-
useMountTransition
|
|
7314
|
-
useFocusTrap
|
|
7315
|
-
getBaseHTMLProps as
|
|
7165
|
+
useMountTransition,
|
|
7166
|
+
useFocusTrap,
|
|
7167
|
+
getBaseHTMLProps as getBaseHTMLProps31
|
|
7316
7168
|
} from "@norges-domstoler/dds-core";
|
|
7317
7169
|
import { CloseIcon as CloseIcon4 } from "@norges-domstoler/dds-icons";
|
|
7318
7170
|
import { focusVisible as focusVisible7 } from "@norges-domstoler/dds-form";
|
|
@@ -7402,8 +7254,8 @@ var Modal = forwardRef40((props, ref) => {
|
|
|
7402
7254
|
const generatedId = useId15();
|
|
7403
7255
|
const modalId = id != null ? id : `${generatedId}-modal`;
|
|
7404
7256
|
const headerId = `${modalId}-header`;
|
|
7405
|
-
const modalRef =
|
|
7406
|
-
const combinedRef =
|
|
7257
|
+
const modalRef = useFocusTrap(isOpen);
|
|
7258
|
+
const combinedRef = useCombinedRef5(ref, modalRef);
|
|
7407
7259
|
const handleClose = () => {
|
|
7408
7260
|
var _a;
|
|
7409
7261
|
if (onClose && isOpen) {
|
|
@@ -7419,14 +7271,14 @@ var Modal = forwardRef40((props, ref) => {
|
|
|
7419
7271
|
}
|
|
7420
7272
|
return () => handleElementWithBackdropUnmount(document.body);
|
|
7421
7273
|
}, [isOpen]);
|
|
7422
|
-
|
|
7423
|
-
|
|
7424
|
-
const hasTransitionedIn =
|
|
7274
|
+
useOnClickOutside3(modalRef.current, () => handleClose());
|
|
7275
|
+
useOnKeyDown4(["Escape", "Esc"], () => handleClose());
|
|
7276
|
+
const hasTransitionedIn = useMountTransition(isOpen, 200);
|
|
7425
7277
|
const backdropProps = {
|
|
7426
7278
|
isOpen: hasTransitionedIn && isOpen
|
|
7427
7279
|
};
|
|
7428
7280
|
const containerProps = {
|
|
7429
|
-
...
|
|
7281
|
+
...getBaseHTMLProps31(id, className, htmlProps, rest),
|
|
7430
7282
|
ref: combinedRef,
|
|
7431
7283
|
role: "dialog",
|
|
7432
7284
|
"aria-modal": true,
|
|
@@ -7465,7 +7317,7 @@ Modal.displayName = "Modal";
|
|
|
7465
7317
|
import { forwardRef as forwardRef41 } from "react";
|
|
7466
7318
|
import styled54 from "styled-components";
|
|
7467
7319
|
import {
|
|
7468
|
-
getBaseHTMLProps as
|
|
7320
|
+
getBaseHTMLProps as getBaseHTMLProps32
|
|
7469
7321
|
} from "@norges-domstoler/dds-core";
|
|
7470
7322
|
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
7471
7323
|
var Container9 = styled54.div``;
|
|
@@ -7473,7 +7325,7 @@ var ModalBody = forwardRef41(
|
|
|
7473
7325
|
(props, ref) => {
|
|
7474
7326
|
const { children, scrollable, id, className, htmlProps, height, ...rest } = props;
|
|
7475
7327
|
const containerProps = {
|
|
7476
|
-
...
|
|
7328
|
+
...getBaseHTMLProps32(id, className, htmlProps, rest),
|
|
7477
7329
|
ref
|
|
7478
7330
|
};
|
|
7479
7331
|
return scrollable ? /* @__PURE__ */ jsx59(Container9, { ...containerProps, children: /* @__PURE__ */ jsx59(ScrollableContainer, { contentHeight: height, children }) }) : /* @__PURE__ */ jsx59(Container9, { ...containerProps, children });
|
|
@@ -7507,13 +7359,13 @@ import { createPortal as createPortal2 } from "react-dom";
|
|
|
7507
7359
|
import styled56, { css as css26 } from "styled-components";
|
|
7508
7360
|
import { Typography as Typography14 } from "@norges-domstoler/dds-typography";
|
|
7509
7361
|
import {
|
|
7510
|
-
useCombinedRef as
|
|
7511
|
-
useMountTransition as
|
|
7512
|
-
useOnClickOutside as
|
|
7513
|
-
useOnKeyDown as
|
|
7514
|
-
useFocusTrap as
|
|
7362
|
+
useCombinedRef as useCombinedRef6,
|
|
7363
|
+
useMountTransition as useMountTransition2,
|
|
7364
|
+
useOnClickOutside as useOnClickOutside4,
|
|
7365
|
+
useOnKeyDown as useOnKeyDown5,
|
|
7366
|
+
useFocusTrap as useFocusTrap2,
|
|
7515
7367
|
Paper as Paper4,
|
|
7516
|
-
getBaseHTMLProps as
|
|
7368
|
+
getBaseHTMLProps as getBaseHTMLProps33
|
|
7517
7369
|
} from "@norges-domstoler/dds-core";
|
|
7518
7370
|
import { CloseIcon as CloseIcon5 } from "@norges-domstoler/dds-icons";
|
|
7519
7371
|
|
|
@@ -7611,9 +7463,9 @@ var Drawer = forwardRef43((props, ref) => {
|
|
|
7611
7463
|
const uniqueId = id != null ? id : `${generatedId}-drawer`;
|
|
7612
7464
|
const hasHeader = !!header3;
|
|
7613
7465
|
const headerId = hasHeader ? `${uniqueId}-header` : void 0;
|
|
7614
|
-
const drawerRef =
|
|
7615
|
-
const combinedRef =
|
|
7616
|
-
|
|
7466
|
+
const drawerRef = useFocusTrap2(isOpen);
|
|
7467
|
+
const combinedRef = useCombinedRef6(ref, drawerRef);
|
|
7468
|
+
useOnKeyDown5(["Esc", "Escape"], () => {
|
|
7617
7469
|
var _a;
|
|
7618
7470
|
if (isOpen) {
|
|
7619
7471
|
triggerRef && ((_a = triggerRef.current) == null ? void 0 : _a.focus());
|
|
@@ -7623,10 +7475,10 @@ var Drawer = forwardRef43((props, ref) => {
|
|
|
7623
7475
|
const elements = [drawerRef.current];
|
|
7624
7476
|
if (triggerRef)
|
|
7625
7477
|
elements.push(triggerRef.current);
|
|
7626
|
-
|
|
7627
|
-
const hasTransitionedIn =
|
|
7478
|
+
useOnClickOutside4(elements, () => isOpen && onClose && onClose());
|
|
7479
|
+
const hasTransitionedIn = useMountTransition2(isOpen, 500);
|
|
7628
7480
|
const containerProps = {
|
|
7629
|
-
...
|
|
7481
|
+
...getBaseHTMLProps33(uniqueId, className, htmlProps, rest),
|
|
7630
7482
|
placement,
|
|
7631
7483
|
ref: combinedRef,
|
|
7632
7484
|
isOpen: hasTransitionedIn && isOpen,
|
|
@@ -7720,14 +7572,14 @@ import { forwardRef as forwardRef44, useEffect as useEffect13 } from "react";
|
|
|
7720
7572
|
import styled57, { css as css27 } from "styled-components";
|
|
7721
7573
|
import { visibilityTransition as visibilityTransition4 } from "@norges-domstoler/dds-core";
|
|
7722
7574
|
import {
|
|
7723
|
-
useCombinedRef as
|
|
7724
|
-
useFloatPosition as
|
|
7725
|
-
useReturnFocusOnBlur
|
|
7726
|
-
useMountTransition as
|
|
7727
|
-
useOnClickOutside as
|
|
7575
|
+
useCombinedRef as useCombinedRef7,
|
|
7576
|
+
useFloatPosition as useFloatPosition3,
|
|
7577
|
+
useReturnFocusOnBlur,
|
|
7578
|
+
useMountTransition as useMountTransition3,
|
|
7579
|
+
useOnClickOutside as useOnClickOutside5
|
|
7728
7580
|
} from "@norges-domstoler/dds-core";
|
|
7729
7581
|
import {
|
|
7730
|
-
getBaseHTMLProps as
|
|
7582
|
+
getBaseHTMLProps as getBaseHTMLProps34
|
|
7731
7583
|
} from "@norges-domstoler/dds-core";
|
|
7732
7584
|
import { Typography as Typography15 } from "@norges-domstoler/dds-typography";
|
|
7733
7585
|
|
|
@@ -7809,7 +7661,7 @@ var Popover = forwardRef44(
|
|
|
7809
7661
|
htmlProps = {},
|
|
7810
7662
|
...rest
|
|
7811
7663
|
} = props;
|
|
7812
|
-
const popoverRef =
|
|
7664
|
+
const popoverRef = useReturnFocusOnBlur(
|
|
7813
7665
|
isOpen,
|
|
7814
7666
|
() => {
|
|
7815
7667
|
onClose && onClose();
|
|
@@ -7817,11 +7669,11 @@ var Popover = forwardRef44(
|
|
|
7817
7669
|
},
|
|
7818
7670
|
anchorElement && anchorElement
|
|
7819
7671
|
);
|
|
7820
|
-
const { reference, floating, styles } =
|
|
7672
|
+
const { reference, floating, styles } = useFloatPosition3(null, {
|
|
7821
7673
|
placement,
|
|
7822
7674
|
offset
|
|
7823
7675
|
});
|
|
7824
|
-
const multiRef =
|
|
7676
|
+
const multiRef = useCombinedRef7(ref, popoverRef, floating);
|
|
7825
7677
|
useEffect13(() => {
|
|
7826
7678
|
anchorElement ? reference(anchorElement) : reference(null);
|
|
7827
7679
|
}, [anchorElement]);
|
|
@@ -7830,13 +7682,13 @@ var Popover = forwardRef44(
|
|
|
7830
7682
|
];
|
|
7831
7683
|
if (anchorElement)
|
|
7832
7684
|
elements.push(anchorElement);
|
|
7833
|
-
|
|
7685
|
+
useOnClickOutside5(elements, () => {
|
|
7834
7686
|
if (isOpen)
|
|
7835
7687
|
onClose && onClose();
|
|
7836
7688
|
});
|
|
7837
|
-
const hasTransitionedIn =
|
|
7689
|
+
const hasTransitionedIn = useMountTransition3(isOpen, 400);
|
|
7838
7690
|
const wrapperProps = {
|
|
7839
|
-
...
|
|
7691
|
+
...getBaseHTMLProps34(id, className, htmlProps, rest),
|
|
7840
7692
|
ref: multiRef,
|
|
7841
7693
|
isOpen,
|
|
7842
7694
|
hasTransitionedIn,
|
|
@@ -7872,7 +7724,7 @@ import {
|
|
|
7872
7724
|
useRef as useRef12,
|
|
7873
7725
|
useId as useId18
|
|
7874
7726
|
} from "react";
|
|
7875
|
-
import { useOnKeyDown as
|
|
7727
|
+
import { useOnKeyDown as useOnKeyDown6 } from "@norges-domstoler/dds-core";
|
|
7876
7728
|
import { Fragment as Fragment10, jsx as jsx63 } from "react/jsx-runtime";
|
|
7877
7729
|
var PopoverGroup = ({
|
|
7878
7730
|
isOpen = false,
|
|
@@ -7894,7 +7746,7 @@ var PopoverGroup = ({
|
|
|
7894
7746
|
};
|
|
7895
7747
|
const buttonRef = useRef12(null);
|
|
7896
7748
|
const popoverRef = useRef12(null);
|
|
7897
|
-
|
|
7749
|
+
useOnKeyDown6(["Esc", "Escape"], () => {
|
|
7898
7750
|
var _a;
|
|
7899
7751
|
if (open) {
|
|
7900
7752
|
setOpen(false);
|
|
@@ -7927,7 +7779,7 @@ PopoverGroup.displayName = "PopoverGroup";
|
|
|
7927
7779
|
import { forwardRef as forwardRef45, useId as useId19 } from "react";
|
|
7928
7780
|
import styled58, { css as css28 } from "styled-components";
|
|
7929
7781
|
import { Icon as Icon15 } from "@norges-domstoler/dds-icons";
|
|
7930
|
-
import { selection as selection12, getBaseHTMLProps as
|
|
7782
|
+
import { selection as selection12, getBaseHTMLProps as getBaseHTMLProps35 } from "@norges-domstoler/dds-core";
|
|
7931
7783
|
import { getFontStyling as getFontStyling17 } from "@norges-domstoler/dds-typography";
|
|
7932
7784
|
import {
|
|
7933
7785
|
focusVisibleTransitionValue as focusVisibleTransitionValue6,
|
|
@@ -8024,7 +7876,7 @@ var ToggleButton = forwardRef45(
|
|
|
8024
7876
|
const generatedId = useId19();
|
|
8025
7877
|
const uniqueId = id != null ? id : `${generatedId}-toggleButton`;
|
|
8026
7878
|
const inputProps = {
|
|
8027
|
-
...
|
|
7879
|
+
...getBaseHTMLProps35(uniqueId, className, htmlProps, rest),
|
|
8028
7880
|
ref,
|
|
8029
7881
|
type: "checkbox"
|
|
8030
7882
|
};
|
|
@@ -8047,7 +7899,7 @@ ToggleButton.displayName = "ToggleButton";
|
|
|
8047
7899
|
import { useId as useId20 } from "react";
|
|
8048
7900
|
import styled59, { css as css29 } from "styled-components";
|
|
8049
7901
|
import {
|
|
8050
|
-
getBaseHTMLProps as
|
|
7902
|
+
getBaseHTMLProps as getBaseHTMLProps36
|
|
8051
7903
|
} from "@norges-domstoler/dds-core";
|
|
8052
7904
|
import { Typography as Typography16 } from "@norges-domstoler/dds-typography";
|
|
8053
7905
|
import { jsx as jsx65, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
@@ -8081,7 +7933,7 @@ var ToggleButtonGroup = (props) => {
|
|
|
8081
7933
|
direction
|
|
8082
7934
|
};
|
|
8083
7935
|
const containerProps = {
|
|
8084
|
-
...
|
|
7936
|
+
...getBaseHTMLProps36(id, className, htmlProps, rest),
|
|
8085
7937
|
role: "group",
|
|
8086
7938
|
"aria-labelledby": label3 ? uniqueLabelId : void 0
|
|
8087
7939
|
};
|
|
@@ -8110,7 +7962,7 @@ import {
|
|
|
8110
7962
|
useState as useState20
|
|
8111
7963
|
} from "react";
|
|
8112
7964
|
import {
|
|
8113
|
-
getBaseHTMLProps as
|
|
7965
|
+
getBaseHTMLProps as getBaseHTMLProps37
|
|
8114
7966
|
} from "@norges-domstoler/dds-core";
|
|
8115
7967
|
|
|
8116
7968
|
// src/components/Tabs/Tabs.context.tsx
|
|
@@ -8162,7 +8014,7 @@ var Tabs = forwardRef46((props, ref) => {
|
|
|
8162
8014
|
}
|
|
8163
8015
|
}, [activeTab, thisActiveTab]);
|
|
8164
8016
|
const containerProps = {
|
|
8165
|
-
...
|
|
8017
|
+
...getBaseHTMLProps37(uniqueId, className, htmlProps, rest),
|
|
8166
8018
|
ref
|
|
8167
8019
|
};
|
|
8168
8020
|
return /* @__PURE__ */ jsx66(
|
|
@@ -8193,9 +8045,9 @@ import {
|
|
|
8193
8045
|
} from "react";
|
|
8194
8046
|
import styled61, { css as css31 } from "styled-components";
|
|
8195
8047
|
import {
|
|
8196
|
-
useCombinedRef as
|
|
8197
|
-
useOnKeyDown as
|
|
8198
|
-
getBaseHTMLProps as
|
|
8048
|
+
useCombinedRef as useCombinedRef8,
|
|
8049
|
+
useOnKeyDown as useOnKeyDown7,
|
|
8050
|
+
getBaseHTMLProps as getBaseHTMLProps38,
|
|
8199
8051
|
normalizeButton as normalizeButton5,
|
|
8200
8052
|
removeButtonStyling as removeButtonStyling4
|
|
8201
8053
|
} from "@norges-domstoler/dds-core";
|
|
@@ -8307,7 +8159,7 @@ var Tab = forwardRef47((props, ref) => {
|
|
|
8307
8159
|
...rest
|
|
8308
8160
|
} = props;
|
|
8309
8161
|
const itemRef = useRef14(null);
|
|
8310
|
-
const combinedRef =
|
|
8162
|
+
const combinedRef = useCombinedRef8(ref, itemRef);
|
|
8311
8163
|
const { tabPanelsRef, setHasTabFocus, tabContentDirection } = useTabsContext();
|
|
8312
8164
|
useEffect15(() => {
|
|
8313
8165
|
var _a;
|
|
@@ -8316,7 +8168,7 @@ var Tab = forwardRef47((props, ref) => {
|
|
|
8316
8168
|
setHasTabFocus(true);
|
|
8317
8169
|
}
|
|
8318
8170
|
}, [focus]);
|
|
8319
|
-
|
|
8171
|
+
useOnKeyDown7("Tab", () => {
|
|
8320
8172
|
var _a;
|
|
8321
8173
|
setHasTabFocus(false);
|
|
8322
8174
|
(_a = tabPanelsRef == null ? void 0 : tabPanelsRef.current) == null ? void 0 : _a.focus();
|
|
@@ -8335,7 +8187,7 @@ var Tab = forwardRef47((props, ref) => {
|
|
|
8335
8187
|
onKeyDown && onKeyDown(e);
|
|
8336
8188
|
};
|
|
8337
8189
|
const buttonProps = {
|
|
8338
|
-
...
|
|
8190
|
+
...getBaseHTMLProps38(id, className, htmlProps, rest),
|
|
8339
8191
|
ref: combinedRef,
|
|
8340
8192
|
"aria-selected": active,
|
|
8341
8193
|
role: "tab",
|
|
@@ -8361,10 +8213,10 @@ import {
|
|
|
8361
8213
|
} from "react";
|
|
8362
8214
|
import styled62 from "styled-components";
|
|
8363
8215
|
import {
|
|
8364
|
-
useCombinedRef as
|
|
8365
|
-
useOnClickOutside as
|
|
8366
|
-
useOnKeyDown as
|
|
8367
|
-
useRoveFocus as
|
|
8216
|
+
useCombinedRef as useCombinedRef9,
|
|
8217
|
+
useOnClickOutside as useOnClickOutside6,
|
|
8218
|
+
useOnKeyDown as useOnKeyDown8,
|
|
8219
|
+
useRoveFocus as useRoveFocus3
|
|
8368
8220
|
} from "@norges-domstoler/dds-core";
|
|
8369
8221
|
import {
|
|
8370
8222
|
focusVisibleTransitionValue as focusVisibleTransitionValue8,
|
|
@@ -8405,8 +8257,8 @@ var TabList = forwardRef48(
|
|
|
8405
8257
|
} = useTabsContext();
|
|
8406
8258
|
const uniqueId = id != null ? id : `${tabsId}-tablist`;
|
|
8407
8259
|
const childrenArray = Children4.toArray(children).length;
|
|
8408
|
-
const [focus, setFocus] =
|
|
8409
|
-
const combinedRef =
|
|
8260
|
+
const [focus, setFocus] = useRoveFocus3(childrenArray, !hasTabFocus, "row");
|
|
8261
|
+
const combinedRef = useCombinedRef9(ref, tabListRef);
|
|
8410
8262
|
const tabListChildren = Children4.map(children, (child, index) => {
|
|
8411
8263
|
return isValidElement7(child) && cloneElement7(child, {
|
|
8412
8264
|
id: `${tabsId}-tab-${index}`,
|
|
@@ -8418,12 +8270,12 @@ var TabList = forwardRef48(
|
|
|
8418
8270
|
onClick: () => handleTabChange(index)
|
|
8419
8271
|
});
|
|
8420
8272
|
});
|
|
8421
|
-
|
|
8273
|
+
useOnKeyDown8("Tab", () => {
|
|
8422
8274
|
var _a;
|
|
8423
8275
|
setHasTabFocus(false);
|
|
8424
8276
|
(_a = tabPanelsRef == null ? void 0 : tabPanelsRef.current) == null ? void 0 : _a.focus();
|
|
8425
8277
|
});
|
|
8426
|
-
|
|
8278
|
+
useOnClickOutside6((tabListRef == null ? void 0 : tabListRef.current) || null, () => {
|
|
8427
8279
|
setHasTabFocus(false);
|
|
8428
8280
|
});
|
|
8429
8281
|
const handleOnFocus = (event) => {
|
|
@@ -8448,7 +8300,7 @@ TabList.displayName = "TabList";
|
|
|
8448
8300
|
import { forwardRef as forwardRef49 } from "react";
|
|
8449
8301
|
import styled63, { css as css32 } from "styled-components";
|
|
8450
8302
|
import {
|
|
8451
|
-
getBaseHTMLProps as
|
|
8303
|
+
getBaseHTMLProps as getBaseHTMLProps39
|
|
8452
8304
|
} from "@norges-domstoler/dds-core";
|
|
8453
8305
|
import {
|
|
8454
8306
|
focusVisibleTransitionValue as focusVisibleTransitionValue9,
|
|
@@ -8472,7 +8324,7 @@ var Panel = styled63.div`
|
|
|
8472
8324
|
var TabPanel = forwardRef49(
|
|
8473
8325
|
({ active = false, children, id, className, htmlProps, ...rest }, ref) => {
|
|
8474
8326
|
const panelProps = {
|
|
8475
|
-
...
|
|
8327
|
+
...getBaseHTMLProps39(id, className, htmlProps, rest),
|
|
8476
8328
|
ref,
|
|
8477
8329
|
tabIndex: 0,
|
|
8478
8330
|
role: "tabpanel",
|
|
@@ -8490,12 +8342,12 @@ import {
|
|
|
8490
8342
|
cloneElement as cloneElement8,
|
|
8491
8343
|
isValidElement as isValidElement8
|
|
8492
8344
|
} from "react";
|
|
8493
|
-
import { useCombinedRef as
|
|
8345
|
+
import { useCombinedRef as useCombinedRef10 } from "@norges-domstoler/dds-core";
|
|
8494
8346
|
import { jsx as jsx70 } from "react/jsx-runtime";
|
|
8495
8347
|
var TabPanels = forwardRef50(
|
|
8496
8348
|
({ children, ...rest }, ref) => {
|
|
8497
8349
|
const { activeTab, tabsId, tabPanelsRef } = useTabsContext();
|
|
8498
|
-
const combinedRef =
|
|
8350
|
+
const combinedRef = useCombinedRef10(ref, tabPanelsRef);
|
|
8499
8351
|
const panelChildren = Children5.map(children, (child, index) => {
|
|
8500
8352
|
const active = index === activeTab;
|
|
8501
8353
|
return isValidElement8(child) && cloneElement8(child, {
|
|
@@ -8514,7 +8366,7 @@ TabPanels.displayName = "TabPanels";
|
|
|
8514
8366
|
import { forwardRef as forwardRef51 } from "react";
|
|
8515
8367
|
import styled64, { css as css33 } from "styled-components";
|
|
8516
8368
|
import {
|
|
8517
|
-
getBaseHTMLProps as
|
|
8369
|
+
getBaseHTMLProps as getBaseHTMLProps40
|
|
8518
8370
|
} from "@norges-domstoler/dds-core";
|
|
8519
8371
|
import {
|
|
8520
8372
|
TextOverflowEllipsisInner,
|
|
@@ -8572,7 +8424,7 @@ var Tag = forwardRef51((props, ref) => {
|
|
|
8572
8424
|
return /* @__PURE__ */ jsx71(
|
|
8573
8425
|
Wrapper7,
|
|
8574
8426
|
{
|
|
8575
|
-
...
|
|
8427
|
+
...getBaseHTMLProps40(id, className, htmlProps, rest),
|
|
8576
8428
|
ref,
|
|
8577
8429
|
purpose,
|
|
8578
8430
|
children: /* @__PURE__ */ jsx71(TextOverflowEllipsisInner, { children: text })
|
|
@@ -8585,7 +8437,7 @@ Tag.displayName = "Tag";
|
|
|
8585
8437
|
import { forwardRef as forwardRef52, useState as useState21 } from "react";
|
|
8586
8438
|
import styled65 from "styled-components";
|
|
8587
8439
|
import {
|
|
8588
|
-
getBaseHTMLProps as
|
|
8440
|
+
getBaseHTMLProps as getBaseHTMLProps41
|
|
8589
8441
|
} from "@norges-domstoler/dds-core";
|
|
8590
8442
|
import { CloseIcon as CloseIcon7 } from "@norges-domstoler/dds-icons";
|
|
8591
8443
|
import {
|
|
@@ -8638,7 +8490,7 @@ var Chip = forwardRef52((props, ref) => {
|
|
|
8638
8490
|
return isOpen ? /* @__PURE__ */ jsxs40(
|
|
8639
8491
|
Container15,
|
|
8640
8492
|
{
|
|
8641
|
-
...
|
|
8493
|
+
...getBaseHTMLProps41(id, className, restHTMLprops, rest),
|
|
8642
8494
|
ref,
|
|
8643
8495
|
as: "div",
|
|
8644
8496
|
children: [
|
|
@@ -8683,7 +8535,7 @@ ChipGroup.displayName = "ChipGroup";
|
|
|
8683
8535
|
import { useState as useState22, useId as useId22 } from "react";
|
|
8684
8536
|
import styled67, { css as css34 } from "styled-components";
|
|
8685
8537
|
import { selection as selection13 } from "@norges-domstoler/dds-core";
|
|
8686
|
-
import { getBaseHTMLProps as
|
|
8538
|
+
import { getBaseHTMLProps as getBaseHTMLProps42 } from "@norges-domstoler/dds-core";
|
|
8687
8539
|
import { combineHandlers as combineHandlers3 } from "@norges-domstoler/dds-core";
|
|
8688
8540
|
import { Typography as Typography17 } from "@norges-domstoler/dds-typography";
|
|
8689
8541
|
|
|
@@ -8854,7 +8706,7 @@ var ToggleBar = (props) => {
|
|
|
8854
8706
|
children: /* @__PURE__ */ jsxs41(
|
|
8855
8707
|
OuterContainer4,
|
|
8856
8708
|
{
|
|
8857
|
-
...
|
|
8709
|
+
...getBaseHTMLProps42(id, className, htmlProps, rest),
|
|
8858
8710
|
role: "radiogroup",
|
|
8859
8711
|
"aria-labelledby": labelId != null ? labelId : htmlProps == null ? void 0 : htmlProps["aria-labelledby"],
|
|
8860
8712
|
width,
|
|
@@ -8872,7 +8724,7 @@ ToggleBar.displayName = "ToggleBar";
|
|
|
8872
8724
|
// src/components/ToggleBar/ToggleRadio.tsx
|
|
8873
8725
|
import { forwardRef as forwardRef54, useId as useId23 } from "react";
|
|
8874
8726
|
import {
|
|
8875
|
-
getBaseHTMLProps as
|
|
8727
|
+
getBaseHTMLProps as getBaseHTMLProps43
|
|
8876
8728
|
} from "@norges-domstoler/dds-core";
|
|
8877
8729
|
import { Icon as Icon17 } from "@norges-domstoler/dds-icons";
|
|
8878
8730
|
|
|
@@ -8986,7 +8838,7 @@ var ToggleRadio = forwardRef54(
|
|
|
8986
8838
|
/* @__PURE__ */ jsx75(
|
|
8987
8839
|
HiddenInput5,
|
|
8988
8840
|
{
|
|
8989
|
-
...
|
|
8841
|
+
...getBaseHTMLProps43(uniqueId, className, htmlProps, rest),
|
|
8990
8842
|
type: "radio",
|
|
8991
8843
|
ref,
|
|
8992
8844
|
name: name != null ? name : group4.name,
|
|
@@ -9006,25 +8858,25 @@ ToggleRadio.displayName = "ToggleRadio";
|
|
|
9006
8858
|
|
|
9007
8859
|
// src/components/Grid/Grid.tsx
|
|
9008
8860
|
import styled69, { css as css36 } from "styled-components";
|
|
9009
|
-
import { useScreenSize
|
|
8861
|
+
import { useScreenSize } from "@norges-domstoler/dds-core";
|
|
9010
8862
|
import {
|
|
9011
|
-
getBaseHTMLProps as
|
|
8863
|
+
getBaseHTMLProps as getBaseHTMLProps44
|
|
9012
8864
|
} from "@norges-domstoler/dds-core";
|
|
9013
8865
|
|
|
9014
8866
|
// src/components/Grid/Grid.tokens.tsx
|
|
9015
8867
|
import { ddsBaseTokens as ddsBaseTokens36 } from "@norges-domstoler/dds-design-tokens";
|
|
9016
|
-
import { ScreenSize
|
|
8868
|
+
import { ScreenSize } from "@norges-domstoler/dds-core";
|
|
9017
8869
|
var { grid, spacing: spacing31 } = ddsBaseTokens36;
|
|
9018
8870
|
var allColumns = "1 / -1";
|
|
9019
8871
|
var halfWayColumn = {
|
|
9020
|
-
[
|
|
9021
|
-
[
|
|
9022
|
-
[
|
|
9023
|
-
[
|
|
9024
|
-
[
|
|
8872
|
+
[ScreenSize.XSmall]: grid.DdsGridXs0599Count / 2 + 1,
|
|
8873
|
+
[ScreenSize.Small]: grid.DdsGridSm600959Count / 2 + 1,
|
|
8874
|
+
[ScreenSize.Medium]: grid.DdsGridMd9601279Count / 2 + 1,
|
|
8875
|
+
[ScreenSize.Large]: grid.DdsGridLg12801919Count / 2 + 1,
|
|
8876
|
+
[ScreenSize.XLarge]: grid.DdsGridXl1920Count / 2 + 1
|
|
9025
8877
|
};
|
|
9026
8878
|
var gridTokens = {
|
|
9027
|
-
[
|
|
8879
|
+
[ScreenSize.XSmall]: {
|
|
9028
8880
|
grid: {
|
|
9029
8881
|
columns: grid.DdsGridXs0599Count,
|
|
9030
8882
|
columnGap: grid.DdsGridXs0599GutterSize,
|
|
@@ -9040,7 +8892,7 @@ var gridTokens = {
|
|
|
9040
8892
|
}
|
|
9041
8893
|
}
|
|
9042
8894
|
},
|
|
9043
|
-
[
|
|
8895
|
+
[ScreenSize.Small]: {
|
|
9044
8896
|
grid: {
|
|
9045
8897
|
columns: grid.DdsGridSm600959Count,
|
|
9046
8898
|
columnGap: grid.DdsGridSm600959GutterSize,
|
|
@@ -9049,14 +8901,14 @@ var gridTokens = {
|
|
|
9049
8901
|
},
|
|
9050
8902
|
columns: {
|
|
9051
8903
|
firstHalf: {
|
|
9052
|
-
gridColumn: `1 / ${halfWayColumn[
|
|
8904
|
+
gridColumn: `1 / ${halfWayColumn[ScreenSize.Small]}`
|
|
9053
8905
|
},
|
|
9054
8906
|
secondHalf: {
|
|
9055
|
-
gridColumn: `${halfWayColumn[
|
|
8907
|
+
gridColumn: `${halfWayColumn[ScreenSize.Small]} / -1`
|
|
9056
8908
|
}
|
|
9057
8909
|
}
|
|
9058
8910
|
},
|
|
9059
|
-
[
|
|
8911
|
+
[ScreenSize.Medium]: {
|
|
9060
8912
|
grid: {
|
|
9061
8913
|
columns: grid.DdsGridMd9601279Count,
|
|
9062
8914
|
columnGap: grid.DdsGridMd9601279GutterSize,
|
|
@@ -9065,14 +8917,14 @@ var gridTokens = {
|
|
|
9065
8917
|
},
|
|
9066
8918
|
columns: {
|
|
9067
8919
|
firstHalf: {
|
|
9068
|
-
gridColumn: `1 / ${halfWayColumn[
|
|
8920
|
+
gridColumn: `1 / ${halfWayColumn[ScreenSize.Medium]}`
|
|
9069
8921
|
},
|
|
9070
8922
|
secondHalf: {
|
|
9071
|
-
gridColumn: `${halfWayColumn[
|
|
8923
|
+
gridColumn: `${halfWayColumn[ScreenSize.Medium]} / -1`
|
|
9072
8924
|
}
|
|
9073
8925
|
}
|
|
9074
8926
|
},
|
|
9075
|
-
[
|
|
8927
|
+
[ScreenSize.Large]: {
|
|
9076
8928
|
grid: {
|
|
9077
8929
|
columns: grid.DdsGridLg12801919Count,
|
|
9078
8930
|
columnGap: grid.DdsGridLg12801919GutterSize,
|
|
@@ -9081,14 +8933,14 @@ var gridTokens = {
|
|
|
9081
8933
|
},
|
|
9082
8934
|
columns: {
|
|
9083
8935
|
firstHalf: {
|
|
9084
|
-
gridColumn: `1 / ${halfWayColumn[
|
|
8936
|
+
gridColumn: `1 / ${halfWayColumn[ScreenSize.Large]}`
|
|
9085
8937
|
},
|
|
9086
8938
|
secondHalf: {
|
|
9087
|
-
gridColumn: `${halfWayColumn[
|
|
8939
|
+
gridColumn: `${halfWayColumn[ScreenSize.Large]} / -1`
|
|
9088
8940
|
}
|
|
9089
8941
|
}
|
|
9090
8942
|
},
|
|
9091
|
-
[
|
|
8943
|
+
[ScreenSize.XLarge]: {
|
|
9092
8944
|
grid: {
|
|
9093
8945
|
columns: grid.DdsGridXl1920Count,
|
|
9094
8946
|
columnGap: grid.DdsGridXl1920GutterSize,
|
|
@@ -9097,10 +8949,10 @@ var gridTokens = {
|
|
|
9097
8949
|
},
|
|
9098
8950
|
columns: {
|
|
9099
8951
|
firstHalf: {
|
|
9100
|
-
gridColumn: `1 / ${halfWayColumn[
|
|
8952
|
+
gridColumn: `1 / ${halfWayColumn[ScreenSize.XLarge]}`
|
|
9101
8953
|
},
|
|
9102
8954
|
secondHalf: {
|
|
9103
|
-
gridColumn: `${halfWayColumn[
|
|
8955
|
+
gridColumn: `${halfWayColumn[ScreenSize.XLarge]} / -1`
|
|
9104
8956
|
}
|
|
9105
8957
|
}
|
|
9106
8958
|
}
|
|
@@ -9108,9 +8960,9 @@ var gridTokens = {
|
|
|
9108
8960
|
|
|
9109
8961
|
// src/components/Grid/Grid.context.tsx
|
|
9110
8962
|
import { useContext as useContext8, createContext as createContext6 } from "react";
|
|
9111
|
-
import { ScreenSize as
|
|
8963
|
+
import { ScreenSize as ScreenSize2 } from "@norges-domstoler/dds-core";
|
|
9112
8964
|
var GridContext = createContext6({
|
|
9113
|
-
screenSize:
|
|
8965
|
+
screenSize: ScreenSize2.Large
|
|
9114
8966
|
});
|
|
9115
8967
|
var useGridContext = () => {
|
|
9116
8968
|
return useContext8(GridContext);
|
|
@@ -9118,7 +8970,7 @@ var useGridContext = () => {
|
|
|
9118
8970
|
|
|
9119
8971
|
// src/components/Grid/Grid.tsx
|
|
9120
8972
|
import {
|
|
9121
|
-
getLiteralScreenSize
|
|
8973
|
+
getLiteralScreenSize
|
|
9122
8974
|
} from "@norges-domstoler/dds-core";
|
|
9123
8975
|
import { jsx as jsx76 } from "react/jsx-runtime";
|
|
9124
8976
|
var getHooksGridStyling = (screenSize, maxWidth, rowGap) => {
|
|
@@ -9128,8 +8980,8 @@ var getHooksGridStyling = (screenSize, maxWidth, rowGap) => {
|
|
|
9128
8980
|
columnGap: tokens2.columnGap,
|
|
9129
8981
|
marginLeft: tokens2.marginLeft,
|
|
9130
8982
|
marginRight: tokens2.marginRight,
|
|
9131
|
-
rowGap: rowGap && rowGap[
|
|
9132
|
-
maxWidth: maxWidth && maxWidth[
|
|
8983
|
+
rowGap: rowGap && rowGap[getLiteralScreenSize(screenSize)] ? rowGap[getLiteralScreenSize(screenSize)] : tokens2.columnGap,
|
|
8984
|
+
maxWidth: maxWidth && maxWidth[getLiteralScreenSize(screenSize)] && maxWidth[getLiteralScreenSize(screenSize)]
|
|
9133
8985
|
};
|
|
9134
8986
|
};
|
|
9135
8987
|
var StyledGrid = styled69.div`
|
|
@@ -9141,18 +8993,18 @@ var StyledGrid = styled69.div`
|
|
|
9141
8993
|
`;
|
|
9142
8994
|
var Grid = (props) => {
|
|
9143
8995
|
const { id, className, children, htmlProps, as, ...rest } = props;
|
|
9144
|
-
const screenSize =
|
|
8996
|
+
const screenSize = useScreenSize();
|
|
9145
8997
|
return /* @__PURE__ */ jsx76(GridContext.Provider, { value: { screenSize }, children: as === "div" ? /* @__PURE__ */ jsx76(
|
|
9146
8998
|
StyledGrid,
|
|
9147
8999
|
{
|
|
9148
|
-
...
|
|
9000
|
+
...getBaseHTMLProps44(id, className, htmlProps, rest),
|
|
9149
9001
|
screenSize,
|
|
9150
9002
|
children
|
|
9151
9003
|
}
|
|
9152
9004
|
) : /* @__PURE__ */ jsx76(
|
|
9153
9005
|
StyledGrid,
|
|
9154
9006
|
{
|
|
9155
|
-
...
|
|
9007
|
+
...getBaseHTMLProps44(id, className, htmlProps, rest),
|
|
9156
9008
|
screenSize,
|
|
9157
9009
|
as,
|
|
9158
9010
|
children
|
|
@@ -9164,10 +9016,10 @@ Grid.displayName = "Grid";
|
|
|
9164
9016
|
// src/components/Grid/GridChild.tsx
|
|
9165
9017
|
import styled70 from "styled-components";
|
|
9166
9018
|
import {
|
|
9167
|
-
getBaseHTMLProps as
|
|
9019
|
+
getBaseHTMLProps as getBaseHTMLProps45
|
|
9168
9020
|
} from "@norges-domstoler/dds-core";
|
|
9169
9021
|
import {
|
|
9170
|
-
getLiteralScreenSize as
|
|
9022
|
+
getLiteralScreenSize as getLiteralScreenSize2
|
|
9171
9023
|
} from "@norges-domstoler/dds-core";
|
|
9172
9024
|
import { jsx as jsx77 } from "react/jsx-runtime";
|
|
9173
9025
|
var isRelativeGridColumn = (type) => {
|
|
@@ -9177,7 +9029,7 @@ var isGridColumn = (type) => {
|
|
|
9177
9029
|
return type.xs !== void 0 || type.sm !== void 0 || type.md !== void 0 || type.lg !== void 0 || type.xl !== void 0;
|
|
9178
9030
|
};
|
|
9179
9031
|
var StyledGridChild = styled70.div`
|
|
9180
|
-
grid-column: ${({ screenSize, columnsOccupied }) => columnsOccupied === "all" ? "1 / -1" : isGridColumn(columnsOccupied) ? columnsOccupied[
|
|
9032
|
+
grid-column: ${({ screenSize, columnsOccupied }) => columnsOccupied === "all" ? "1 / -1" : isGridColumn(columnsOccupied) ? columnsOccupied[getLiteralScreenSize2(screenSize)] : isRelativeGridColumn(columnsOccupied) ? gridTokens[screenSize].columns[columnsOccupied].gridColumn : ""};
|
|
9181
9033
|
|
|
9182
9034
|
justify-self: ${({ justifySelf }) => justifySelf && justifySelf};
|
|
9183
9035
|
grid-row: ${({ gridRow }) => gridRow && gridRow};
|
|
@@ -9188,7 +9040,7 @@ var GridChild = (props) => {
|
|
|
9188
9040
|
return /* @__PURE__ */ jsx77(
|
|
9189
9041
|
StyledGridChild,
|
|
9190
9042
|
{
|
|
9191
|
-
...
|
|
9043
|
+
...getBaseHTMLProps45(id, className, htmlProps, rest),
|
|
9192
9044
|
screenSize,
|
|
9193
9045
|
children
|
|
9194
9046
|
}
|
|
@@ -9209,7 +9061,7 @@ import {
|
|
|
9209
9061
|
} from "react";
|
|
9210
9062
|
import styled72 from "styled-components";
|
|
9211
9063
|
import {
|
|
9212
|
-
getBaseHTMLProps as
|
|
9064
|
+
getBaseHTMLProps as getBaseHTMLProps46
|
|
9213
9065
|
} from "@norges-domstoler/dds-core";
|
|
9214
9066
|
|
|
9215
9067
|
// src/components/ProgressTracker/ProgressTracker.context.tsx
|
|
@@ -9508,7 +9360,7 @@ var ProgressTracker = (() => {
|
|
|
9508
9360
|
}
|
|
9509
9361
|
}, [activeStep, thisActiveStep]);
|
|
9510
9362
|
const containerProps = {
|
|
9511
|
-
...
|
|
9363
|
+
...getBaseHTMLProps46(id, className, htmlProps, rest),
|
|
9512
9364
|
ref
|
|
9513
9365
|
};
|
|
9514
9366
|
const steps = useMemo2(() => {
|
|
@@ -9560,7 +9412,7 @@ import {
|
|
|
9560
9412
|
cloneElement as cloneElement10,
|
|
9561
9413
|
isValidElement as isValidElement10
|
|
9562
9414
|
} from "react";
|
|
9563
|
-
import { useOnClickOutside as
|
|
9415
|
+
import { useOnClickOutside as useOnClickOutside7, useOnKeyDown as useOnKeyDown9 } from "@norges-domstoler/dds-core";
|
|
9564
9416
|
import { Fragment as Fragment12, jsx as jsx80 } from "react/jsx-runtime";
|
|
9565
9417
|
var InlineEdit = (props) => {
|
|
9566
9418
|
const {
|
|
@@ -9598,9 +9450,9 @@ var InlineEdit = (props) => {
|
|
|
9598
9450
|
document.activeElement.blur();
|
|
9599
9451
|
}
|
|
9600
9452
|
};
|
|
9601
|
-
|
|
9602
|
-
|
|
9603
|
-
|
|
9453
|
+
useOnKeyDown9(["Enter"], () => onExitHandler());
|
|
9454
|
+
useOnKeyDown9(["Escape"], () => onExitHandler());
|
|
9455
|
+
useOnClickOutside7(inputRef.current, () => onExitHandler());
|
|
9604
9456
|
const inputChild = Children8.only(
|
|
9605
9457
|
isValidElement10(children) && cloneElement10(children, {
|
|
9606
9458
|
onChange: onChangeHandler,
|
|
@@ -9616,7 +9468,7 @@ var InlineEdit = (props) => {
|
|
|
9616
9468
|
InlineEdit.displayName = "InlineEdit";
|
|
9617
9469
|
|
|
9618
9470
|
// src/components/InlineEdit/InlineEditTextArea.tsx
|
|
9619
|
-
import { useCombinedRef as
|
|
9471
|
+
import { useCombinedRef as useCombinedRef12 } from "@norges-domstoler/dds-core";
|
|
9620
9472
|
|
|
9621
9473
|
// src/components/InlineEdit/InlineTextArea.tsx
|
|
9622
9474
|
import { forwardRef as forwardRef56, useId as useId24, useRef as useRef15 } from "react";
|
|
@@ -9702,7 +9554,7 @@ var inlineEditVisuallyHidden = (id, emptiable) => /* @__PURE__ */ jsxs45(Visuall
|
|
|
9702
9554
|
] });
|
|
9703
9555
|
|
|
9704
9556
|
// src/components/InlineEdit/InlineTextArea.tsx
|
|
9705
|
-
import { useCombinedRef as
|
|
9557
|
+
import { useCombinedRef as useCombinedRef11 } from "@norges-domstoler/dds-core";
|
|
9706
9558
|
import {
|
|
9707
9559
|
OuterInputContainer as OuterInputContainer3,
|
|
9708
9560
|
InputContainer as InputContainer3
|
|
@@ -9726,7 +9578,7 @@ var InlineTextArea = forwardRef56((props, ref) => {
|
|
|
9726
9578
|
const errorMessageId = derivativeIdGenerator8(uniqueId, "errorMessage");
|
|
9727
9579
|
const descId = derivativeIdGenerator8(uniqueId, "desc");
|
|
9728
9580
|
const inputRef = useRef15(null);
|
|
9729
|
-
const combinedRef =
|
|
9581
|
+
const combinedRef = useCombinedRef11(ref, inputRef);
|
|
9730
9582
|
return /* @__PURE__ */ jsxs46(OuterInputContainer3, { width, children: [
|
|
9731
9583
|
/* @__PURE__ */ jsxs46(InputContainer3, { children: [
|
|
9732
9584
|
!isEditing && !hideIcon && /* @__PURE__ */ jsx81(
|
|
@@ -9768,7 +9620,7 @@ import { jsx as jsx82 } from "react/jsx-runtime";
|
|
|
9768
9620
|
var InlineEditTextArea = forwardRef57((props, ref) => {
|
|
9769
9621
|
const { onSetValue, emptiable, value, onFocus, onChange, onBlur, ...rest } = props;
|
|
9770
9622
|
const textareaRef = useRef16(null);
|
|
9771
|
-
const combinedRef =
|
|
9623
|
+
const combinedRef = useCombinedRef12(ref, textareaRef);
|
|
9772
9624
|
return /* @__PURE__ */ jsx82(
|
|
9773
9625
|
InlineEdit,
|
|
9774
9626
|
{
|
|
@@ -9786,7 +9638,7 @@ var InlineEditTextArea = forwardRef57((props, ref) => {
|
|
|
9786
9638
|
|
|
9787
9639
|
// src/components/InlineEdit/InlineEditInput.tsx
|
|
9788
9640
|
import { forwardRef as forwardRef59, useRef as useRef18 } from "react";
|
|
9789
|
-
import { useCombinedRef as
|
|
9641
|
+
import { useCombinedRef as useCombinedRef14 } from "@norges-domstoler/dds-core";
|
|
9790
9642
|
|
|
9791
9643
|
// src/components/InlineEdit/InlineInput.tsx
|
|
9792
9644
|
import { forwardRef as forwardRef58, useId as useId25, useRef as useRef17 } from "react";
|
|
@@ -9796,7 +9648,7 @@ import {
|
|
|
9796
9648
|
derivativeIdGenerator as derivativeIdGenerator9,
|
|
9797
9649
|
spaceSeparatedIdListGenerator as spaceSeparatedIdListGenerator8
|
|
9798
9650
|
} from "@norges-domstoler/dds-core";
|
|
9799
|
-
import { useCombinedRef as
|
|
9651
|
+
import { useCombinedRef as useCombinedRef13 } from "@norges-domstoler/dds-core";
|
|
9800
9652
|
import {
|
|
9801
9653
|
OuterInputContainer as OuterInputContainer4,
|
|
9802
9654
|
InputContainer as InputContainer4
|
|
@@ -9823,7 +9675,7 @@ var InlineInput = forwardRef58(
|
|
|
9823
9675
|
const errorMessageId = derivativeIdGenerator9(uniqueId, "errorMessage");
|
|
9824
9676
|
const descId = derivativeIdGenerator9(uniqueId, "desc");
|
|
9825
9677
|
const inputRef = useRef17(null);
|
|
9826
|
-
const combinedRef =
|
|
9678
|
+
const combinedRef = useCombinedRef13(ref, inputRef);
|
|
9827
9679
|
return /* @__PURE__ */ jsxs47(OuterInputContainer4, { width, children: [
|
|
9828
9680
|
/* @__PURE__ */ jsxs47(InputContainer4, { children: [
|
|
9829
9681
|
!isEditing && !hideIcon && /* @__PURE__ */ jsx83(
|
|
@@ -9866,7 +9718,7 @@ import { jsx as jsx84 } from "react/jsx-runtime";
|
|
|
9866
9718
|
var InlineEditInput = forwardRef59((props, ref) => {
|
|
9867
9719
|
const { onSetValue, emptiable, value, onFocus, onChange, onBlur, ...rest } = props;
|
|
9868
9720
|
const inputRef = useRef18(null);
|
|
9869
|
-
const combinedRef =
|
|
9721
|
+
const combinedRef = useCombinedRef14(ref, inputRef);
|
|
9870
9722
|
return /* @__PURE__ */ jsx84(
|
|
9871
9723
|
InlineEdit,
|
|
9872
9724
|
{
|
|
@@ -9892,7 +9744,7 @@ import {
|
|
|
9892
9744
|
} from "react";
|
|
9893
9745
|
import styled74 from "styled-components";
|
|
9894
9746
|
import {
|
|
9895
|
-
useCombinedRef as
|
|
9747
|
+
useCombinedRef as useCombinedRef15,
|
|
9896
9748
|
derivativeIdGenerator as derivativeIdGenerator10,
|
|
9897
9749
|
spaceSeparatedIdListGenerator as spaceSeparatedIdListGenerator9
|
|
9898
9750
|
} from "@norges-domstoler/dds-core";
|
|
@@ -9950,7 +9802,7 @@ var TextArea = forwardRef60(
|
|
|
9950
9802
|
const generatedId = useId26();
|
|
9951
9803
|
const uniqueId = id != null ? id : `${generatedId}-textArea`;
|
|
9952
9804
|
const textAreaRef = useRef19(null);
|
|
9953
|
-
const multiRef =
|
|
9805
|
+
const multiRef = useCombinedRef15(ref, textAreaRef);
|
|
9954
9806
|
const [text, setText] = useState25(
|
|
9955
9807
|
getDefaultText2(value, defaultValue)
|
|
9956
9808
|
);
|
|
@@ -10121,7 +9973,7 @@ var stackTokens = {
|
|
|
10121
9973
|
|
|
10122
9974
|
// src/components/Stack/Stack.tsx
|
|
10123
9975
|
import {
|
|
10124
|
-
getBaseHTMLProps as
|
|
9976
|
+
getBaseHTMLProps as getBaseHTMLProps47
|
|
10125
9977
|
} from "@norges-domstoler/dds-core";
|
|
10126
9978
|
import { jsx as jsx87 } from "react/jsx-runtime";
|
|
10127
9979
|
var Stack = styled76.div`
|
|
@@ -10148,7 +10000,7 @@ var HStack = forwardRef62(
|
|
|
10148
10000
|
{
|
|
10149
10001
|
direction: "horizontal",
|
|
10150
10002
|
ref,
|
|
10151
|
-
...
|
|
10003
|
+
...getBaseHTMLProps47(id, className, htmlProps, rest)
|
|
10152
10004
|
}
|
|
10153
10005
|
)
|
|
10154
10006
|
);
|
|
@@ -10159,7 +10011,7 @@ var VStack = forwardRef62(
|
|
|
10159
10011
|
{
|
|
10160
10012
|
direction: "vertical",
|
|
10161
10013
|
ref,
|
|
10162
|
-
...
|
|
10014
|
+
...getBaseHTMLProps47(id, className, htmlProps, rest)
|
|
10163
10015
|
}
|
|
10164
10016
|
)
|
|
10165
10017
|
);
|
|
@@ -11007,7 +10859,6 @@ export {
|
|
|
11007
10859
|
ProgressTracker,
|
|
11008
10860
|
RadioButton,
|
|
11009
10861
|
RadioButtonGroup2 as RadioButtonGroup,
|
|
11010
|
-
ScreenSize,
|
|
11011
10862
|
ScrollableContainer,
|
|
11012
10863
|
Scrollbar,
|
|
11013
10864
|
Search2 as Search,
|
|
@@ -11033,19 +10884,8 @@ export {
|
|
|
11033
10884
|
VStack,
|
|
11034
10885
|
VisuallyHidden,
|
|
11035
10886
|
createSelectOptions,
|
|
11036
|
-
getBaseHTMLProps,
|
|
11037
|
-
getLiteralScreenSize,
|
|
11038
10887
|
isGridColumn,
|
|
11039
|
-
isKeyboardEvent,
|
|
11040
10888
|
isRelativeGridColumn,
|
|
11041
|
-
scrollbarStyling
|
|
11042
|
-
useCombinedRef,
|
|
11043
|
-
useFloatPosition,
|
|
11044
|
-
useFocusTrap,
|
|
11045
|
-
useMountTransition,
|
|
11046
|
-
useOnClickOutside,
|
|
11047
|
-
useOnKeyDown,
|
|
11048
|
-
useReturnFocusOnBlur,
|
|
11049
|
-
useRoveFocus,
|
|
11050
|
-
useScreenSize
|
|
10889
|
+
scrollbarStyling
|
|
11051
10890
|
};
|
|
10891
|
+
//# sourceMappingURL=index.mjs.map
|