@arbeidstilsynet/design-react 0.4.1 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,9 +1,10 @@
1
1
  "use client";
2
- import require$$0, { createContext, use, useState, useId } from "react";
2
+ import require$$0, { createContext, use, useLayoutEffect, useEffect, useState, useId, Children, isValidElement } from "react";
3
3
  import { CloudUpIcon, FileTextIcon, 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;
@@ -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() {
@@ -1079,8 +1080,105 @@ function HeaderDefaultLogo(t0) {
1079
1080
  }
1080
1081
  return t23;
1081
1082
  }
1083
+ const useIsomorphicLayoutEffect2 = typeof window !== "undefined" ? useLayoutEffect : useEffect;
1084
+ const IS_SERVER = typeof window === "undefined";
1085
+ function useMediaQuery2(query, t0) {
1086
+ const $ = compilerRuntimeExports.c(17);
1087
+ let t1;
1088
+ if ($[0] !== t0) {
1089
+ t1 = {};
1090
+ $[0] = t0;
1091
+ $[1] = t1;
1092
+ } else {
1093
+ t1 = $[1];
1094
+ }
1095
+ const {
1096
+ defaultValue: t2,
1097
+ initializeWithValue: t3
1098
+ } = t1;
1099
+ const defaultValue = t2 === void 0 ? false : t2;
1100
+ const initializeWithValue = t3 === void 0 ? true : t3;
1101
+ let t4;
1102
+ if ($[2] !== defaultValue) {
1103
+ t4 = (query_0) => {
1104
+ if (IS_SERVER) {
1105
+ return defaultValue;
1106
+ }
1107
+ return window.matchMedia(query_0).matches;
1108
+ };
1109
+ $[2] = defaultValue;
1110
+ $[3] = t4;
1111
+ } else {
1112
+ t4 = $[3];
1113
+ }
1114
+ const getMatches = t4;
1115
+ let t5;
1116
+ if ($[4] !== defaultValue || $[5] !== getMatches || $[6] !== initializeWithValue || $[7] !== query) {
1117
+ t5 = () => {
1118
+ if (initializeWithValue) {
1119
+ return getMatches(query);
1120
+ }
1121
+ return defaultValue;
1122
+ };
1123
+ $[4] = defaultValue;
1124
+ $[5] = getMatches;
1125
+ $[6] = initializeWithValue;
1126
+ $[7] = query;
1127
+ $[8] = t5;
1128
+ } else {
1129
+ t5 = $[8];
1130
+ }
1131
+ const [matches, setMatches] = useState(t5);
1132
+ let t6;
1133
+ if ($[9] !== getMatches || $[10] !== query) {
1134
+ t6 = function handleChange2() {
1135
+ setMatches(getMatches(query));
1136
+ };
1137
+ $[9] = getMatches;
1138
+ $[10] = query;
1139
+ $[11] = t6;
1140
+ } else {
1141
+ t6 = $[11];
1142
+ }
1143
+ const handleChange = t6;
1144
+ let t7;
1145
+ if ($[12] !== handleChange || $[13] !== query) {
1146
+ t7 = () => {
1147
+ const matchMedia = window.matchMedia(query);
1148
+ handleChange();
1149
+ if (matchMedia.addListener) {
1150
+ matchMedia.addListener(handleChange);
1151
+ } else {
1152
+ matchMedia.addEventListener("change", handleChange);
1153
+ }
1154
+ return () => {
1155
+ if (matchMedia.removeListener) {
1156
+ matchMedia.removeListener(handleChange);
1157
+ } else {
1158
+ matchMedia.removeEventListener("change", handleChange);
1159
+ }
1160
+ };
1161
+ };
1162
+ $[12] = handleChange;
1163
+ $[13] = query;
1164
+ $[14] = t7;
1165
+ } else {
1166
+ t7 = $[14];
1167
+ }
1168
+ let t8;
1169
+ if ($[15] !== query) {
1170
+ t8 = [query];
1171
+ $[15] = query;
1172
+ $[16] = t8;
1173
+ } else {
1174
+ t8 = $[16];
1175
+ }
1176
+ useIsomorphicLayoutEffect2(t7, t8);
1177
+ return matches;
1178
+ }
1082
1179
  function HeaderTitleDropdown(t0) {
1083
- const $ = compilerRuntimeExports.c(42);
1180
+ const $ = compilerRuntimeExports.c(44);
1181
+ let children;
1084
1182
  let className;
1085
1183
  let controls;
1086
1184
  let links;
@@ -1092,43 +1190,46 @@ function HeaderTitleDropdown(t0) {
1092
1190
  controls,
1093
1191
  links,
1094
1192
  userName,
1193
+ children,
1095
1194
  ...rest
1096
1195
  } = t0);
1097
1196
  $[0] = t0;
1098
- $[1] = className;
1099
- $[2] = controls;
1100
- $[3] = links;
1101
- $[4] = rest;
1102
- $[5] = userName;
1197
+ $[1] = children;
1198
+ $[2] = className;
1199
+ $[3] = controls;
1200
+ $[4] = links;
1201
+ $[5] = rest;
1202
+ $[6] = userName;
1103
1203
  } else {
1104
- className = $[1];
1105
- controls = $[2];
1106
- links = $[3];
1107
- rest = $[4];
1108
- userName = $[5];
1204
+ children = $[1];
1205
+ className = $[2];
1206
+ controls = $[3];
1207
+ links = $[4];
1208
+ rest = $[5];
1209
+ userName = $[6];
1109
1210
  }
1110
1211
  const [open, setOpen] = useState(false);
1111
1212
  const id = useId();
1112
- const isMobile = useMediaQuery("(max-width: 768px)");
1213
+ const isMobile = useMediaQuery2("(max-width: 768px)");
1113
1214
  let t1;
1114
- if ($[6] !== className) {
1215
+ if ($[7] !== className) {
1115
1216
  t1 = clsx(className);
1116
- $[6] = className;
1117
- $[7] = t1;
1217
+ $[7] = className;
1218
+ $[8] = t1;
1118
1219
  } else {
1119
- t1 = $[7];
1220
+ t1 = $[8];
1120
1221
  }
1121
1222
  let t2;
1122
- if ($[8] !== open) {
1223
+ if ($[9] !== open) {
1123
1224
  t2 = () => setOpen(!open);
1124
- $[8] = open;
1125
- $[9] = t2;
1225
+ $[9] = open;
1226
+ $[10] = t2;
1126
1227
  } else {
1127
- t2 = $[9];
1228
+ t2 = $[10];
1128
1229
  }
1129
1230
  const t3 = isMobile ? "primary" : "tertiary";
1130
1231
  let t4;
1131
- if ($[10] !== isMobile || $[11] !== open || $[12] !== userName) {
1232
+ if ($[11] !== isMobile || $[12] !== open || $[13] !== userName) {
1132
1233
  t4 = isMobile ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
1133
1234
  open ? /* @__PURE__ */ jsxRuntimeExports.jsx(XMarkIcon, { "aria-hidden": true }) : /* @__PURE__ */ jsxRuntimeExports.jsx(MenuHamburgerIcon, { "aria-hidden": true }),
1134
1235
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "at-header__title-dropdown-text", children: "Meny" })
@@ -1136,130 +1237,135 @@ function HeaderTitleDropdown(t0) {
1136
1237
  userName,
1137
1238
  open ? /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronUpIcon, { "aria-hidden": true }) : /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronDownIcon, { "aria-hidden": true })
1138
1239
  ] });
1139
- $[10] = isMobile;
1140
- $[11] = open;
1141
- $[12] = userName;
1142
- $[13] = t4;
1240
+ $[11] = isMobile;
1241
+ $[12] = open;
1242
+ $[13] = userName;
1243
+ $[14] = t4;
1143
1244
  } else {
1144
- t4 = $[13];
1245
+ t4 = $[14];
1145
1246
  }
1146
1247
  let t5;
1147
- if ($[14] !== t2 || $[15] !== t3 || $[16] !== t4) {
1248
+ if ($[15] !== t2 || $[16] !== t3 || $[17] !== t4) {
1148
1249
  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;
1250
+ $[15] = t2;
1251
+ $[16] = t3;
1252
+ $[17] = t4;
1253
+ $[18] = t5;
1153
1254
  } else {
1154
- t5 = $[17];
1255
+ t5 = $[18];
1155
1256
  }
1156
1257
  let t6;
1157
- if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
1258
+ if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
1158
1259
  t6 = () => setOpen(false);
1159
- $[18] = t6;
1260
+ $[19] = t6;
1160
1261
  } else {
1161
- t6 = $[18];
1262
+ t6 = $[19];
1162
1263
  }
1163
1264
  let t7;
1164
- if ($[19] !== links) {
1165
- t7 = links?.map(_temp$1);
1166
- $[19] = links;
1167
- $[20] = t7;
1265
+ if ($[20] !== children || $[21] !== links) {
1266
+ t7 = children ? Children.map(children, _temp$1) : links?.map(_temp2$1);
1267
+ $[20] = children;
1268
+ $[21] = links;
1269
+ $[22] = t7;
1168
1270
  } else {
1169
- t7 = $[20];
1271
+ t7 = $[22];
1170
1272
  }
1171
1273
  let t8;
1172
- if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
1274
+ if ($[23] === Symbol.for("react.memo_cache_sentinel")) {
1173
1275
  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;
1276
+ $[23] = t8;
1175
1277
  } else {
1176
- t8 = $[21];
1278
+ t8 = $[23];
1177
1279
  }
1178
1280
  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;
1281
+ if ($[24] !== controls || $[25] !== id) {
1282
+ 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));
1283
+ $[24] = controls;
1284
+ $[25] = id;
1285
+ $[26] = t9;
1184
1286
  } else {
1185
- t9 = $[24];
1287
+ t9 = $[26];
1186
1288
  }
1187
1289
  let t10;
1188
- if ($[25] !== t7 || $[26] !== t9) {
1290
+ if ($[27] !== t7 || $[28] !== t9) {
1189
1291
  t10 = /* @__PURE__ */ jsxRuntimeExports.jsxs(Dropdown.List, { children: [
1190
1292
  t7,
1191
1293
  t8,
1192
1294
  t9
1193
1295
  ] });
1194
- $[25] = t7;
1195
- $[26] = t9;
1196
- $[27] = t10;
1296
+ $[27] = t7;
1297
+ $[28] = t9;
1298
+ $[29] = t10;
1197
1299
  } else {
1198
- t10 = $[27];
1300
+ t10 = $[29];
1199
1301
  }
1200
1302
  let t11;
1201
- if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
1303
+ if ($[30] === Symbol.for("react.memo_cache_sentinel")) {
1202
1304
  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
1305
  /* @__PURE__ */ jsxRuntimeExports.jsx(XMarkIcon, { "aria-hidden": true }),
1204
1306
  "Lukk"
1205
1307
  ] }) }) });
1206
- $[28] = t11;
1308
+ $[30] = t11;
1207
1309
  } else {
1208
- t11 = $[28];
1310
+ t11 = $[30];
1209
1311
  }
1210
1312
  let t12;
1211
- if ($[29] !== open || $[30] !== t10) {
1313
+ if ($[31] !== open || $[32] !== t10) {
1212
1314
  t12 = /* @__PURE__ */ jsxRuntimeExports.jsxs(Dropdown, { open, onClose: t6, placement: "bottom", className: "at-header__title-dropdown-content", children: [
1213
1315
  t10,
1214
1316
  t11
1215
1317
  ] });
1216
- $[29] = open;
1217
- $[30] = t10;
1218
- $[31] = t12;
1318
+ $[31] = open;
1319
+ $[32] = t10;
1320
+ $[33] = t12;
1219
1321
  } else {
1220
- t12 = $[31];
1322
+ t12 = $[33];
1221
1323
  }
1222
1324
  let t13;
1223
- if ($[32] !== t12 || $[33] !== t5) {
1325
+ if ($[34] !== t12 || $[35] !== t5) {
1224
1326
  t13 = /* @__PURE__ */ jsxRuntimeExports.jsxs(Dropdown.TriggerContext, { children: [
1225
1327
  t5,
1226
1328
  t12
1227
1329
  ] });
1228
- $[32] = t12;
1229
- $[33] = t5;
1230
- $[34] = t13;
1330
+ $[34] = t12;
1331
+ $[35] = t5;
1332
+ $[36] = t13;
1231
1333
  } else {
1232
- t13 = $[34];
1334
+ t13 = $[36];
1233
1335
  }
1234
1336
  let t14;
1235
- if ($[35] !== open) {
1337
+ if ($[37] !== open) {
1236
1338
  t14 = open ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { "aria-hidden": true, className: "at-header__title-dropdown-backdrop" }) : null;
1237
- $[35] = open;
1238
- $[36] = t14;
1339
+ $[37] = open;
1340
+ $[38] = t14;
1239
1341
  } else {
1240
- t14 = $[36];
1342
+ t14 = $[38];
1241
1343
  }
1242
1344
  let t15;
1243
- if ($[37] !== rest || $[38] !== t1 || $[39] !== t13 || $[40] !== t14) {
1345
+ if ($[39] !== rest || $[40] !== t1 || $[41] !== t13 || $[42] !== t14) {
1244
1346
  t15 = /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: t1, ...rest, children: [
1245
1347
  t13,
1246
1348
  t14
1247
1349
  ] });
1248
- $[37] = rest;
1249
- $[38] = t1;
1250
- $[39] = t13;
1251
- $[40] = t14;
1252
- $[41] = t15;
1350
+ $[39] = rest;
1351
+ $[40] = t1;
1352
+ $[41] = t13;
1353
+ $[42] = t14;
1354
+ $[43] = t15;
1253
1355
  } else {
1254
- t15 = $[41];
1356
+ t15 = $[43];
1255
1357
  }
1256
1358
  return t15;
1257
1359
  }
1258
- function _temp$1(link) {
1360
+ function _temp2$1(link) {
1259
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: /* @__PURE__ */ jsxRuntimeExports.jsx(Link, { href: link.href, className: clsx("at-header__title-link"), children: link.label }) }) }, "nav-" + link.href);
1260
1362
  }
1363
+ function _temp$1(child, index) {
1364
+ 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);
1365
+ }
1261
1366
  function HeaderTitleLinks(t0) {
1262
- const $ = compilerRuntimeExports.c(12);
1367
+ const $ = compilerRuntimeExports.c(14);
1368
+ let children;
1263
1369
  let className;
1264
1370
  let links;
1265
1371
  let rest;
@@ -1267,48 +1373,58 @@ function HeaderTitleLinks(t0) {
1267
1373
  ({
1268
1374
  className,
1269
1375
  links,
1376
+ children,
1270
1377
  ...rest
1271
1378
  } = t0);
1272
1379
  $[0] = t0;
1273
- $[1] = className;
1274
- $[2] = links;
1275
- $[3] = rest;
1380
+ $[1] = children;
1381
+ $[2] = className;
1382
+ $[3] = links;
1383
+ $[4] = rest;
1276
1384
  } else {
1277
- className = $[1];
1278
- links = $[2];
1279
- rest = $[3];
1385
+ children = $[1];
1386
+ className = $[2];
1387
+ links = $[3];
1388
+ rest = $[4];
1280
1389
  }
1281
1390
  let t1;
1282
- if ($[4] !== className) {
1391
+ if ($[5] !== className) {
1283
1392
  t1 = clsx(className);
1284
- $[4] = className;
1285
- $[5] = t1;
1393
+ $[5] = className;
1394
+ $[6] = t1;
1286
1395
  } else {
1287
- t1 = $[5];
1396
+ t1 = $[6];
1288
1397
  }
1289
1398
  let t2;
1290
- if ($[6] !== links) {
1291
- t2 = links?.map(_temp);
1292
- $[6] = links;
1293
- $[7] = t2;
1399
+ if ($[7] !== children || $[8] !== links) {
1400
+ t2 = children ? Children.map(children, _temp) : links?.map(_temp2);
1401
+ $[7] = children;
1402
+ $[8] = links;
1403
+ $[9] = t2;
1294
1404
  } else {
1295
- t2 = $[7];
1405
+ t2 = $[9];
1296
1406
  }
1297
1407
  let t3;
1298
- if ($[8] !== rest || $[9] !== t1 || $[10] !== t2) {
1408
+ if ($[10] !== rest || $[11] !== t1 || $[12] !== t2) {
1299
1409
  t3 = /* @__PURE__ */ jsxRuntimeExports.jsx("nav", { className: t1, ...rest, children: t2 });
1300
- $[8] = rest;
1301
- $[9] = t1;
1302
- $[10] = t2;
1303
- $[11] = t3;
1410
+ $[10] = rest;
1411
+ $[11] = t1;
1412
+ $[12] = t2;
1413
+ $[13] = t3;
1304
1414
  } else {
1305
- t3 = $[11];
1415
+ t3 = $[13];
1306
1416
  }
1307
1417
  return t3;
1308
1418
  }
1309
- function _temp(link) {
1419
+ function _temp2(link) {
1310
1420
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Link, { href: link.href, className: clsx("at-header__title-link"), children: link.label }, link.href);
1311
1421
  }
1422
+ function _temp(child) {
1423
+ if (isValidElement(child)) {
1424
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Slot, { className: clsx("at-header__title-link", "ds-link"), children: child });
1425
+ }
1426
+ return child;
1427
+ }
1312
1428
  function HeaderTitleLogo(t0) {
1313
1429
  const $ = compilerRuntimeExports.c(17);
1314
1430
  let appName;
@@ -1387,12 +1503,13 @@ function HeaderTitle({
1387
1503
  userName,
1388
1504
  links = [],
1389
1505
  controls = [],
1506
+ children,
1390
1507
  ...rest
1391
1508
  }) {
1392
1509
  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
1510
  /* @__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 })
1511
+ /* @__PURE__ */ jsxRuntimeExports.jsx(HeaderTitleLinks, { className: clsx("at-header__title-center"), links, children }),
1512
+ /* @__PURE__ */ jsxRuntimeExports.jsx(HeaderTitleDropdown, { className: clsx("at-header__title-right"), links, userName, controls, children })
1396
1513
  ] }) });
1397
1514
  }
1398
1515
  const Header = Object.assign(Header$1, {
@@ -1901,7 +2018,7 @@ export {
1901
2018
  useCheckboxGroup,
1902
2019
  useDebounceCallback,
1903
2020
  useIsomorphicLayoutEffect,
1904
- useMediaQuery2 as useMediaQuery,
2021
+ useMediaQuery,
1905
2022
  usePagination,
1906
2023
  useRadioGroup,
1907
2024
  useSynchronizedAnimation