@arbeidstilsynet/design-react 0.4.1 → 0.5.0

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.js CHANGED
@@ -1,9 +1,10 @@
1
1
  "use client";
2
- import require$$0, { createContext, use, useState, useId } from "react";
3
- import { CloudUpIcon, FileTextIcon, TrashIcon, XMarkIcon, MenuHamburgerIcon, ChevronUpIcon, ChevronDownIcon } from "@navikt/aksel-icons";
2
+ import require$$0, { createContext, use, useLayoutEffect, useEffect, useState, useId, Children, isValidElement } from "react";
3
+ import { CloudUpIcon, TrashIcon, XMarkIcon, MenuHamburgerIcon, ChevronUpIcon, ChevronDownIcon } from "@navikt/aksel-icons";
4
4
  import { useDropzone } from "react-dropzone";
5
- import { Spinner, Button, ValidationMessage, Table, Link, useMediaQuery, Dropdown, Divider, Heading } from "@digdir/designsystemet-react";
6
- import { Alert, Avatar, Badge, BadgePosition, Breadcrumbs, BreadcrumbsItem, BreadcrumbsLink, BreadcrumbsList, Button as Button2, Card, CardBlock, Checkbox, Chip, ChipButton, ChipCheckbox, ChipRadio, ChipRemovable, Combobox, ComboboxEmpty, ComboboxOption, Details, DetailsContent, DetailsSummary, Dialog, DialogBlock, DialogTrigger, DialogTriggerContext, Divider as Divider2, Dropdown as Dropdown2, DropdownButton, DropdownHeading, DropdownItem, DropdownList, DropdownTrigger, DropdownTriggerContext, EXPERIMENTAL_Suggestion, EXPERIMENTAL_SuggestionClear, EXPERIMENTAL_SuggestionEmpty, EXPERIMENTAL_SuggestionInput, EXPERIMENTAL_SuggestionList, EXPERIMENTAL_SuggestionOption, ErrorSummary, ErrorSummaryHeading, ErrorSummaryItem, ErrorSummaryLink, ErrorSummaryList, Field, FieldAffix, FieldAffixes, FieldCounter, FieldDescription, Fieldset, FieldsetDescription, FieldsetLegend, Heading as Heading2, Input, Label, Link as Link2, List, ListItem, ListOrdered, ListUnordered, Pagination, PaginationButton, PaginationItem, PaginationList, Paragraph, Popover, PopoverTrigger, PopoverTriggerContext, Radio, RovingFocusItem, RovingFocusRoot, Search, SearchButton, SearchClear, SearchInput, Select, SelectOptgroup, SelectOption, Skeleton, SkipLink, Spinner as Spinner2, Switch, Table as Table2, TableBody, TableCell, TableFoot, TableHead, TableHeaderCell, TableRow, Tabs, TabsList, TabsPanel, TabsTab, Tag, Textarea, Textfield, ToggleGroup, ToggleGroupItem, Tooltip, ValidationMessage as ValidationMessage2, omit, useCheckboxGroup, useDebounceCallback, useIsomorphicLayoutEffect, useMediaQuery as useMediaQuery2, usePagination, useRadioGroup, useSynchronizedAnimation } from "@digdir/designsystemet-react";
5
+ import { Spinner, Button, ValidationMessage, Table, Link, Dropdown, Divider, Heading } from "@digdir/designsystemet-react";
6
+ import { Alert, Avatar, Badge, BadgePosition, Breadcrumbs, BreadcrumbsItem, BreadcrumbsLink, BreadcrumbsList, Button as Button2, Card, CardBlock, Checkbox, Chip, ChipButton, ChipCheckbox, ChipRadio, ChipRemovable, Combobox, ComboboxEmpty, ComboboxOption, Details, DetailsContent, DetailsSummary, Dialog, DialogBlock, DialogTrigger, DialogTriggerContext, Divider as Divider2, Dropdown as Dropdown2, DropdownButton, DropdownHeading, DropdownItem, DropdownList, DropdownTrigger, DropdownTriggerContext, EXPERIMENTAL_Suggestion, EXPERIMENTAL_SuggestionClear, EXPERIMENTAL_SuggestionEmpty, EXPERIMENTAL_SuggestionInput, EXPERIMENTAL_SuggestionList, EXPERIMENTAL_SuggestionOption, ErrorSummary, ErrorSummaryHeading, ErrorSummaryItem, ErrorSummaryLink, ErrorSummaryList, Field, FieldAffix, FieldAffixes, FieldCounter, FieldDescription, Fieldset, FieldsetDescription, FieldsetLegend, Heading as Heading2, Input, Label, Link as Link2, List, ListItem, ListOrdered, ListUnordered, Pagination, PaginationButton, PaginationItem, PaginationList, Paragraph, Popover, PopoverTrigger, PopoverTriggerContext, Radio, RovingFocusItem, RovingFocusRoot, Search, SearchButton, SearchClear, SearchInput, Select, SelectOptgroup, SelectOption, Skeleton, SkipLink, Spinner as Spinner2, Switch, Table as Table2, TableBody, TableCell, TableFoot, TableHead, TableHeaderCell, TableRow, Tabs, TabsList, TabsPanel, TabsTab, Tag, Textarea, Textfield, ToggleGroup, ToggleGroupItem, Tooltip, ValidationMessage as ValidationMessage2, omit, useCheckboxGroup, useDebounceCallback, useIsomorphicLayoutEffect, useMediaQuery, usePagination, useRadioGroup, useSynchronizedAnimation } from "@digdir/designsystemet-react";
7
+ import { Slot } from "@radix-ui/react-slot";
7
8
  var jsxRuntime = { exports: {} };
8
9
  var reactJsxRuntime_production = {};
9
10
  var hasRequiredReactJsxRuntime_production;
@@ -39,7 +40,7 @@ var hasRequiredReactJsxRuntime_development;
39
40
  function requireReactJsxRuntime_development() {
40
41
  if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development;
41
42
  hasRequiredReactJsxRuntime_development = 1;
42
- "production" !== process.env.NODE_ENV && function() {
43
+ "production" !== process.env.NODE_ENV && (function() {
43
44
  function getComponentNameFromType(type) {
44
45
  if (null == type) return null;
45
46
  if ("function" === typeof type)
@@ -244,9 +245,9 @@ function requireReactJsxRuntime_development() {
244
245
  );
245
246
  }
246
247
  function validateChildKeys(node) {
247
- isValidElement(node) ? node._store && (node._store.validated = 1) : "object" === typeof node && null !== node && node.$$typeof === REACT_LAZY_TYPE && ("fulfilled" === node._payload.status ? isValidElement(node._payload.value) && node._payload.value._store && (node._payload.value._store.validated = 1) : node._store && (node._store.validated = 1));
248
+ isValidElement2(node) ? node._store && (node._store.validated = 1) : "object" === typeof node && null !== node && node.$$typeof === REACT_LAZY_TYPE && ("fulfilled" === node._payload.status ? isValidElement2(node._payload.value) && node._payload.value._store && (node._payload.value._store.validated = 1) : node._store && (node._store.validated = 1));
248
249
  }
249
- function isValidElement(object) {
250
+ function isValidElement2(object) {
250
251
  return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
251
252
  }
252
253
  var React = require$$0, REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() {
@@ -288,7 +289,7 @@ function requireReactJsxRuntime_development() {
288
289
  trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
289
290
  );
290
291
  };
291
- }();
292
+ })();
292
293
  return reactJsxRuntime_development;
293
294
  }
294
295
  var hasRequiredJsxRuntime;
@@ -320,7 +321,7 @@ var hasRequiredReactCompilerRuntime_development;
320
321
  function requireReactCompilerRuntime_development() {
321
322
  if (hasRequiredReactCompilerRuntime_development) return reactCompilerRuntime_development;
322
323
  hasRequiredReactCompilerRuntime_development = 1;
323
- "production" !== process.env.NODE_ENV && function() {
324
+ "production" !== process.env.NODE_ENV && (function() {
324
325
  var ReactSharedInternals = require$$0.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
325
326
  reactCompilerRuntime_development.c = function(size) {
326
327
  var dispatcher = ReactSharedInternals.H;
@@ -329,7 +330,7 @@ function requireReactCompilerRuntime_development() {
329
330
  );
330
331
  return dispatcher.useMemoCache(size);
331
332
  };
332
- }();
333
+ })();
333
334
  return reactCompilerRuntime_development;
334
335
  }
335
336
  var hasRequiredCompilerRuntime;
@@ -855,13 +856,10 @@ function FilePickerFiles(t0) {
855
856
  } = t122;
856
857
  const size = formatFileSize(file.size);
857
858
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(Table.Row, { "data-error": hasError, children: [
858
- /* @__PURE__ */ jsxRuntimeExports.jsx(Table.Cell, { title: file.name, className: "at-filepicker-files-file__name", "data-color": "info", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Link, { href: disabled ? void 0 : URL.createObjectURL(file), target: "_blank", rel: "noreferrer", "aria-disabled": disabled, children: [
859
- /* @__PURE__ */ jsxRuntimeExports.jsx(FileTextIcon, { "aria-hidden": "true", fontSize: "1.5em" }),
860
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "at-filepicker-files-file__text", children: file.name })
861
- ] }) }),
859
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Table.Cell, { title: file.name, className: "at-filepicker-files-file__name", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Link, { href: disabled ? void 0 : URL.createObjectURL(file), target: "_blank", rel: "noreferrer", "aria-disabled": disabled, children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "at-filepicker-files-file__text", children: file.name }) }) }),
862
860
  /* @__PURE__ */ jsxRuntimeExports.jsx(Table.Cell, { title: size, children: size }),
863
- /* @__PURE__ */ jsxRuntimeExports.jsx(Table.Cell, { "data-color": "danger", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Button, { variant: "tertiary", "data-size": "sm", disabled, "aria-label": `Remove ${file.name}`, onClick: () => onRemove(id), children: [
864
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "at-filepicker-files-file__remove-text", children: removeButtonLabel }),
861
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Table.Cell, { "data-color": "danger", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Button, { variant: "tertiary", disabled, "aria-label": `Remove ${file.name}`, onClick: () => onRemove(id), className: "at-filepicker-files-file__button", children: [
862
+ removeButtonLabel,
865
863
  /* @__PURE__ */ jsxRuntimeExports.jsx(TrashIcon, { "aria-hidden": true })
866
864
  ] }) })
867
865
  ] }, id);
@@ -892,7 +890,7 @@ function FilePickerFiles(t0) {
892
890
  }
893
891
  let t12;
894
892
  if ($[33] !== rest || $[34] !== t11 || $[35] !== t4 || $[36] !== t9) {
895
- t12 = /* @__PURE__ */ jsxRuntimeExports.jsxs(Table, { className: t4, ...rest, children: [
893
+ t12 = /* @__PURE__ */ jsxRuntimeExports.jsxs(Table, { "data-color": "neutral", className: t4, ...rest, children: [
896
894
  t9,
897
895
  t11
898
896
  ] });
@@ -1079,8 +1077,105 @@ function HeaderDefaultLogo(t0) {
1079
1077
  }
1080
1078
  return t23;
1081
1079
  }
1080
+ const useIsomorphicLayoutEffect2 = typeof window !== "undefined" ? useLayoutEffect : useEffect;
1081
+ const IS_SERVER = typeof window === "undefined";
1082
+ function useMediaQuery2(query, t0) {
1083
+ const $ = compilerRuntimeExports.c(17);
1084
+ let t1;
1085
+ if ($[0] !== t0) {
1086
+ t1 = {};
1087
+ $[0] = t0;
1088
+ $[1] = t1;
1089
+ } else {
1090
+ t1 = $[1];
1091
+ }
1092
+ const {
1093
+ defaultValue: t2,
1094
+ initializeWithValue: t3
1095
+ } = t1;
1096
+ const defaultValue = t2 === void 0 ? false : t2;
1097
+ const initializeWithValue = t3 === void 0 ? true : t3;
1098
+ let t4;
1099
+ if ($[2] !== defaultValue) {
1100
+ t4 = (query_0) => {
1101
+ if (IS_SERVER) {
1102
+ return defaultValue;
1103
+ }
1104
+ return window.matchMedia(query_0).matches;
1105
+ };
1106
+ $[2] = defaultValue;
1107
+ $[3] = t4;
1108
+ } else {
1109
+ t4 = $[3];
1110
+ }
1111
+ const getMatches = t4;
1112
+ let t5;
1113
+ if ($[4] !== defaultValue || $[5] !== getMatches || $[6] !== initializeWithValue || $[7] !== query) {
1114
+ t5 = () => {
1115
+ if (initializeWithValue) {
1116
+ return getMatches(query);
1117
+ }
1118
+ return defaultValue;
1119
+ };
1120
+ $[4] = defaultValue;
1121
+ $[5] = getMatches;
1122
+ $[6] = initializeWithValue;
1123
+ $[7] = query;
1124
+ $[8] = t5;
1125
+ } else {
1126
+ t5 = $[8];
1127
+ }
1128
+ const [matches, setMatches] = useState(t5);
1129
+ let t6;
1130
+ if ($[9] !== getMatches || $[10] !== query) {
1131
+ t6 = function handleChange2() {
1132
+ setMatches(getMatches(query));
1133
+ };
1134
+ $[9] = getMatches;
1135
+ $[10] = query;
1136
+ $[11] = t6;
1137
+ } else {
1138
+ t6 = $[11];
1139
+ }
1140
+ const handleChange = t6;
1141
+ let t7;
1142
+ if ($[12] !== handleChange || $[13] !== query) {
1143
+ t7 = () => {
1144
+ const matchMedia = window.matchMedia(query);
1145
+ handleChange();
1146
+ if (matchMedia.addListener) {
1147
+ matchMedia.addListener(handleChange);
1148
+ } else {
1149
+ matchMedia.addEventListener("change", handleChange);
1150
+ }
1151
+ return () => {
1152
+ if (matchMedia.removeListener) {
1153
+ matchMedia.removeListener(handleChange);
1154
+ } else {
1155
+ matchMedia.removeEventListener("change", handleChange);
1156
+ }
1157
+ };
1158
+ };
1159
+ $[12] = handleChange;
1160
+ $[13] = query;
1161
+ $[14] = t7;
1162
+ } else {
1163
+ t7 = $[14];
1164
+ }
1165
+ let t8;
1166
+ if ($[15] !== query) {
1167
+ t8 = [query];
1168
+ $[15] = query;
1169
+ $[16] = t8;
1170
+ } else {
1171
+ t8 = $[16];
1172
+ }
1173
+ useIsomorphicLayoutEffect2(t7, t8);
1174
+ return matches;
1175
+ }
1082
1176
  function HeaderTitleDropdown(t0) {
1083
- const $ = compilerRuntimeExports.c(42);
1177
+ const $ = compilerRuntimeExports.c(44);
1178
+ let children;
1084
1179
  let className;
1085
1180
  let controls;
1086
1181
  let links;
@@ -1092,43 +1187,46 @@ function HeaderTitleDropdown(t0) {
1092
1187
  controls,
1093
1188
  links,
1094
1189
  userName,
1190
+ children,
1095
1191
  ...rest
1096
1192
  } = t0);
1097
1193
  $[0] = t0;
1098
- $[1] = className;
1099
- $[2] = controls;
1100
- $[3] = links;
1101
- $[4] = rest;
1102
- $[5] = userName;
1194
+ $[1] = children;
1195
+ $[2] = className;
1196
+ $[3] = controls;
1197
+ $[4] = links;
1198
+ $[5] = rest;
1199
+ $[6] = userName;
1103
1200
  } else {
1104
- className = $[1];
1105
- controls = $[2];
1106
- links = $[3];
1107
- rest = $[4];
1108
- userName = $[5];
1201
+ children = $[1];
1202
+ className = $[2];
1203
+ controls = $[3];
1204
+ links = $[4];
1205
+ rest = $[5];
1206
+ userName = $[6];
1109
1207
  }
1110
1208
  const [open, setOpen] = useState(false);
1111
1209
  const id = useId();
1112
- const isMobile = useMediaQuery("(max-width: 768px)");
1210
+ const isMobile = useMediaQuery2("(max-width: 768px)");
1113
1211
  let t1;
1114
- if ($[6] !== className) {
1212
+ if ($[7] !== className) {
1115
1213
  t1 = clsx(className);
1116
- $[6] = className;
1117
- $[7] = t1;
1214
+ $[7] = className;
1215
+ $[8] = t1;
1118
1216
  } else {
1119
- t1 = $[7];
1217
+ t1 = $[8];
1120
1218
  }
1121
1219
  let t2;
1122
- if ($[8] !== open) {
1220
+ if ($[9] !== open) {
1123
1221
  t2 = () => setOpen(!open);
1124
- $[8] = open;
1125
- $[9] = t2;
1222
+ $[9] = open;
1223
+ $[10] = t2;
1126
1224
  } else {
1127
- t2 = $[9];
1225
+ t2 = $[10];
1128
1226
  }
1129
1227
  const t3 = isMobile ? "primary" : "tertiary";
1130
1228
  let t4;
1131
- if ($[10] !== isMobile || $[11] !== open || $[12] !== userName) {
1229
+ if ($[11] !== isMobile || $[12] !== open || $[13] !== userName) {
1132
1230
  t4 = isMobile ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
1133
1231
  open ? /* @__PURE__ */ jsxRuntimeExports.jsx(XMarkIcon, { "aria-hidden": true }) : /* @__PURE__ */ jsxRuntimeExports.jsx(MenuHamburgerIcon, { "aria-hidden": true }),
1134
1232
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "at-header__title-dropdown-text", children: "Meny" })
@@ -1136,130 +1234,135 @@ function HeaderTitleDropdown(t0) {
1136
1234
  userName,
1137
1235
  open ? /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronUpIcon, { "aria-hidden": true }) : /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronDownIcon, { "aria-hidden": true })
1138
1236
  ] });
1139
- $[10] = isMobile;
1140
- $[11] = open;
1141
- $[12] = userName;
1142
- $[13] = t4;
1237
+ $[11] = isMobile;
1238
+ $[12] = open;
1239
+ $[13] = userName;
1240
+ $[14] = t4;
1143
1241
  } else {
1144
- t4 = $[13];
1242
+ t4 = $[14];
1145
1243
  }
1146
1244
  let t5;
1147
- if ($[14] !== t2 || $[15] !== t3 || $[16] !== t4) {
1245
+ if ($[15] !== t2 || $[16] !== t3 || $[17] !== t4) {
1148
1246
  t5 = /* @__PURE__ */ jsxRuntimeExports.jsx(Dropdown.Trigger, { onClick: t2, "data-size": "sm", variant: t3, className: "at-header__title-dropdown-trigger", children: t4 });
1149
- $[14] = t2;
1150
- $[15] = t3;
1151
- $[16] = t4;
1152
- $[17] = t5;
1247
+ $[15] = t2;
1248
+ $[16] = t3;
1249
+ $[17] = t4;
1250
+ $[18] = t5;
1153
1251
  } else {
1154
- t5 = $[17];
1252
+ t5 = $[18];
1155
1253
  }
1156
1254
  let t6;
1157
- if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
1255
+ if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
1158
1256
  t6 = () => setOpen(false);
1159
- $[18] = t6;
1257
+ $[19] = t6;
1160
1258
  } else {
1161
- t6 = $[18];
1259
+ t6 = $[19];
1162
1260
  }
1163
1261
  let t7;
1164
- if ($[19] !== links) {
1165
- t7 = links?.map(_temp$1);
1166
- $[19] = links;
1167
- $[20] = t7;
1262
+ if ($[20] !== children || $[21] !== links) {
1263
+ t7 = children ? Children.map(children, _temp$1) : links?.map(_temp2$1);
1264
+ $[20] = children;
1265
+ $[21] = links;
1266
+ $[22] = t7;
1168
1267
  } else {
1169
- t7 = $[20];
1268
+ t7 = $[22];
1170
1269
  }
1171
1270
  let t8;
1172
- if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
1271
+ if ($[23] === Symbol.for("react.memo_cache_sentinel")) {
1173
1272
  t8 = /* @__PURE__ */ jsxRuntimeExports.jsx(Dropdown.Item, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx("at-header__title-dropdown-item-mobile at-header__title-dropdown-controls"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(Divider, {}) }) });
1174
- $[21] = t8;
1273
+ $[23] = t8;
1175
1274
  } else {
1176
- t8 = $[21];
1275
+ t8 = $[23];
1177
1276
  }
1178
1277
  let t9;
1179
- if ($[22] !== controls || $[23] !== id) {
1180
- t9 = controls?.map((control, index) => /* @__PURE__ */ jsxRuntimeExports.jsx(Dropdown.Item, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "at-header__title-dropdown-controls", children: control }) }, id + "-control-" + index));
1181
- $[22] = controls;
1182
- $[23] = id;
1183
- $[24] = t9;
1278
+ if ($[24] !== controls || $[25] !== id) {
1279
+ t9 = controls?.map((control, index_0) => /* @__PURE__ */ jsxRuntimeExports.jsx(Dropdown.Item, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "at-header__title-dropdown-controls", children: control }) }, id + "-control-" + index_0));
1280
+ $[24] = controls;
1281
+ $[25] = id;
1282
+ $[26] = t9;
1184
1283
  } else {
1185
- t9 = $[24];
1284
+ t9 = $[26];
1186
1285
  }
1187
1286
  let t10;
1188
- if ($[25] !== t7 || $[26] !== t9) {
1287
+ if ($[27] !== t7 || $[28] !== t9) {
1189
1288
  t10 = /* @__PURE__ */ jsxRuntimeExports.jsxs(Dropdown.List, { children: [
1190
1289
  t7,
1191
1290
  t8,
1192
1291
  t9
1193
1292
  ] });
1194
- $[25] = t7;
1195
- $[26] = t9;
1196
- $[27] = t10;
1293
+ $[27] = t7;
1294
+ $[28] = t9;
1295
+ $[29] = t10;
1197
1296
  } else {
1198
- t10 = $[27];
1297
+ t10 = $[29];
1199
1298
  }
1200
1299
  let t11;
1201
- if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
1300
+ if ($[30] === Symbol.for("react.memo_cache_sentinel")) {
1202
1301
  t11 = /* @__PURE__ */ jsxRuntimeExports.jsx(Dropdown.Item, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "at-header__title-dropdown-close-mobile", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Button, { type: "button", variant: "secondary", onClick: () => setOpen(false), children: [
1203
1302
  /* @__PURE__ */ jsxRuntimeExports.jsx(XMarkIcon, { "aria-hidden": true }),
1204
1303
  "Lukk"
1205
1304
  ] }) }) });
1206
- $[28] = t11;
1305
+ $[30] = t11;
1207
1306
  } else {
1208
- t11 = $[28];
1307
+ t11 = $[30];
1209
1308
  }
1210
1309
  let t12;
1211
- if ($[29] !== open || $[30] !== t10) {
1310
+ if ($[31] !== open || $[32] !== t10) {
1212
1311
  t12 = /* @__PURE__ */ jsxRuntimeExports.jsxs(Dropdown, { open, onClose: t6, placement: "bottom", className: "at-header__title-dropdown-content", children: [
1213
1312
  t10,
1214
1313
  t11
1215
1314
  ] });
1216
- $[29] = open;
1217
- $[30] = t10;
1218
- $[31] = t12;
1315
+ $[31] = open;
1316
+ $[32] = t10;
1317
+ $[33] = t12;
1219
1318
  } else {
1220
- t12 = $[31];
1319
+ t12 = $[33];
1221
1320
  }
1222
1321
  let t13;
1223
- if ($[32] !== t12 || $[33] !== t5) {
1322
+ if ($[34] !== t12 || $[35] !== t5) {
1224
1323
  t13 = /* @__PURE__ */ jsxRuntimeExports.jsxs(Dropdown.TriggerContext, { children: [
1225
1324
  t5,
1226
1325
  t12
1227
1326
  ] });
1228
- $[32] = t12;
1229
- $[33] = t5;
1230
- $[34] = t13;
1327
+ $[34] = t12;
1328
+ $[35] = t5;
1329
+ $[36] = t13;
1231
1330
  } else {
1232
- t13 = $[34];
1331
+ t13 = $[36];
1233
1332
  }
1234
1333
  let t14;
1235
- if ($[35] !== open) {
1334
+ if ($[37] !== open) {
1236
1335
  t14 = open ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { "aria-hidden": true, className: "at-header__title-dropdown-backdrop" }) : null;
1237
- $[35] = open;
1238
- $[36] = t14;
1336
+ $[37] = open;
1337
+ $[38] = t14;
1239
1338
  } else {
1240
- t14 = $[36];
1339
+ t14 = $[38];
1241
1340
  }
1242
1341
  let t15;
1243
- if ($[37] !== rest || $[38] !== t1 || $[39] !== t13 || $[40] !== t14) {
1342
+ if ($[39] !== rest || $[40] !== t1 || $[41] !== t13 || $[42] !== t14) {
1244
1343
  t15 = /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: t1, ...rest, children: [
1245
1344
  t13,
1246
1345
  t14
1247
1346
  ] });
1248
- $[37] = rest;
1249
- $[38] = t1;
1250
- $[39] = t13;
1251
- $[40] = t14;
1252
- $[41] = t15;
1347
+ $[39] = rest;
1348
+ $[40] = t1;
1349
+ $[41] = t13;
1350
+ $[42] = t14;
1351
+ $[43] = t15;
1253
1352
  } else {
1254
- t15 = $[41];
1353
+ t15 = $[43];
1255
1354
  }
1256
1355
  return t15;
1257
1356
  }
1258
- function _temp$1(link) {
1357
+ function _temp2$1(link) {
1259
1358
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Dropdown.Item, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx("at-header__title-dropdown-controls", "at-header__title-dropdown-item-mobile"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(Link, { href: link.href, className: clsx("at-header__title-link"), children: link.label }) }) }, "nav-" + link.href);
1260
1359
  }
1360
+ function _temp$1(child, index) {
1361
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Dropdown.Item, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx("at-header__title-dropdown-controls", "at-header__title-dropdown-item-mobile"), children: isValidElement(child) ? /* @__PURE__ */ jsxRuntimeExports.jsx(Slot, { className: clsx("at-header__title-link", "ds-link"), children: child }) : child }) }, "nav-" + index);
1362
+ }
1261
1363
  function HeaderTitleLinks(t0) {
1262
- const $ = compilerRuntimeExports.c(12);
1364
+ const $ = compilerRuntimeExports.c(14);
1365
+ let children;
1263
1366
  let className;
1264
1367
  let links;
1265
1368
  let rest;
@@ -1267,48 +1370,58 @@ function HeaderTitleLinks(t0) {
1267
1370
  ({
1268
1371
  className,
1269
1372
  links,
1373
+ children,
1270
1374
  ...rest
1271
1375
  } = t0);
1272
1376
  $[0] = t0;
1273
- $[1] = className;
1274
- $[2] = links;
1275
- $[3] = rest;
1377
+ $[1] = children;
1378
+ $[2] = className;
1379
+ $[3] = links;
1380
+ $[4] = rest;
1276
1381
  } else {
1277
- className = $[1];
1278
- links = $[2];
1279
- rest = $[3];
1382
+ children = $[1];
1383
+ className = $[2];
1384
+ links = $[3];
1385
+ rest = $[4];
1280
1386
  }
1281
1387
  let t1;
1282
- if ($[4] !== className) {
1388
+ if ($[5] !== className) {
1283
1389
  t1 = clsx(className);
1284
- $[4] = className;
1285
- $[5] = t1;
1390
+ $[5] = className;
1391
+ $[6] = t1;
1286
1392
  } else {
1287
- t1 = $[5];
1393
+ t1 = $[6];
1288
1394
  }
1289
1395
  let t2;
1290
- if ($[6] !== links) {
1291
- t2 = links?.map(_temp);
1292
- $[6] = links;
1293
- $[7] = t2;
1396
+ if ($[7] !== children || $[8] !== links) {
1397
+ t2 = children ? Children.map(children, _temp) : links?.map(_temp2);
1398
+ $[7] = children;
1399
+ $[8] = links;
1400
+ $[9] = t2;
1294
1401
  } else {
1295
- t2 = $[7];
1402
+ t2 = $[9];
1296
1403
  }
1297
1404
  let t3;
1298
- if ($[8] !== rest || $[9] !== t1 || $[10] !== t2) {
1405
+ if ($[10] !== rest || $[11] !== t1 || $[12] !== t2) {
1299
1406
  t3 = /* @__PURE__ */ jsxRuntimeExports.jsx("nav", { className: t1, ...rest, children: t2 });
1300
- $[8] = rest;
1301
- $[9] = t1;
1302
- $[10] = t2;
1303
- $[11] = t3;
1407
+ $[10] = rest;
1408
+ $[11] = t1;
1409
+ $[12] = t2;
1410
+ $[13] = t3;
1304
1411
  } else {
1305
- t3 = $[11];
1412
+ t3 = $[13];
1306
1413
  }
1307
1414
  return t3;
1308
1415
  }
1309
- function _temp(link) {
1416
+ function _temp2(link) {
1310
1417
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Link, { href: link.href, className: clsx("at-header__title-link"), children: link.label }, link.href);
1311
1418
  }
1419
+ function _temp(child) {
1420
+ if (isValidElement(child)) {
1421
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Slot, { className: clsx("at-header__title-link", "ds-link"), children: child });
1422
+ }
1423
+ return child;
1424
+ }
1312
1425
  function HeaderTitleLogo(t0) {
1313
1426
  const $ = compilerRuntimeExports.c(17);
1314
1427
  let appName;
@@ -1387,12 +1500,13 @@ function HeaderTitle({
1387
1500
  userName,
1388
1501
  links = [],
1389
1502
  controls = [],
1503
+ children,
1390
1504
  ...rest
1391
1505
  }) {
1392
1506
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx("at-header__title-background", className), ...rest, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx("at-header__title"), children: [
1393
1507
  /* @__PURE__ */ jsxRuntimeExports.jsx(HeaderTitleLogo, { className: clsx("at-header__title-left"), logo, appName }),
1394
- /* @__PURE__ */ jsxRuntimeExports.jsx(HeaderTitleLinks, { className: clsx("at-header__title-center"), links }),
1395
- /* @__PURE__ */ jsxRuntimeExports.jsx(HeaderTitleDropdown, { className: clsx("at-header__title-right"), links, userName, controls })
1508
+ /* @__PURE__ */ jsxRuntimeExports.jsx(HeaderTitleLinks, { className: clsx("at-header__title-center"), links, children }),
1509
+ /* @__PURE__ */ jsxRuntimeExports.jsx(HeaderTitleDropdown, { className: clsx("at-header__title-right"), links, userName, controls, children })
1396
1510
  ] }) });
1397
1511
  }
1398
1512
  const Header = Object.assign(Header$1, {
@@ -1901,7 +2015,7 @@ export {
1901
2015
  useCheckboxGroup,
1902
2016
  useDebounceCallback,
1903
2017
  useIsomorphicLayoutEffect,
1904
- useMediaQuery2 as useMediaQuery,
2018
+ useMediaQuery,
1905
2019
  usePagination,
1906
2020
  useRadioGroup,
1907
2021
  useSynchronizedAnimation