@arbeidstilsynet/design-react 0.4.0 → 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.cjs CHANGED
@@ -5,6 +5,7 @@ const require$$0 = require("react");
5
5
  const akselIcons = require("@navikt/aksel-icons");
6
6
  const reactDropzone = require("react-dropzone");
7
7
  const designsystemetReact = require("@digdir/designsystemet-react");
8
+ const reactSlot = require("@radix-ui/react-slot");
8
9
  var jsxRuntime = { exports: {} };
9
10
  var reactJsxRuntime_production = {};
10
11
  var hasRequiredReactJsxRuntime_production;
@@ -719,7 +720,7 @@ function FilePickerErrors(t0) {
719
720
  }
720
721
  let t2;
721
722
  if ($[5] !== errors) {
722
- t2 = errors.map(_temp$1);
723
+ t2 = errors.map(_temp$2);
723
724
  $[5] = errors;
724
725
  $[6] = t2;
725
726
  } else {
@@ -737,7 +738,7 @@ function FilePickerErrors(t0) {
737
738
  }
738
739
  return t3;
739
740
  }
740
- function _temp$1(error, index) {
741
+ function _temp$2(error, index) {
741
742
  return /* @__PURE__ */ jsxRuntimeExports.jsx(designsystemetReact.ValidationMessage, { children: error }, index);
742
743
  }
743
744
  function formatFileSize(bytes) {
@@ -957,278 +958,6 @@ function Header$1(t0) {
957
958
  }
958
959
  return t2;
959
960
  }
960
- function HeaderTitleLogo(t0) {
961
- const $ = compilerRuntimeExports.c(17);
962
- let appName;
963
- let className;
964
- let logo;
965
- let rest;
966
- if ($[0] !== t0) {
967
- ({
968
- className,
969
- logo,
970
- appName,
971
- ...rest
972
- } = t0);
973
- $[0] = t0;
974
- $[1] = appName;
975
- $[2] = className;
976
- $[3] = logo;
977
- $[4] = rest;
978
- } else {
979
- appName = $[1];
980
- className = $[2];
981
- logo = $[3];
982
- rest = $[4];
983
- }
984
- let t1;
985
- if ($[5] !== className) {
986
- t1 = clsx(className);
987
- $[5] = className;
988
- $[6] = t1;
989
- } else {
990
- t1 = $[6];
991
- }
992
- let t2;
993
- if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
994
- t2 = clsx("at-header__title-logo");
995
- $[7] = t2;
996
- } else {
997
- t2 = $[7];
998
- }
999
- let t3;
1000
- if ($[8] !== logo) {
1001
- t3 = /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: t2, children: logo });
1002
- $[8] = logo;
1003
- $[9] = t3;
1004
- } else {
1005
- t3 = $[9];
1006
- }
1007
- let t4;
1008
- if ($[10] !== appName) {
1009
- t4 = /* @__PURE__ */ jsxRuntimeExports.jsx(designsystemetReact.Heading, { children: appName });
1010
- $[10] = appName;
1011
- $[11] = t4;
1012
- } else {
1013
- t4 = $[11];
1014
- }
1015
- let t5;
1016
- if ($[12] !== rest || $[13] !== t1 || $[14] !== t3 || $[15] !== t4) {
1017
- t5 = /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: t1, ...rest, children: [
1018
- t3,
1019
- t4
1020
- ] });
1021
- $[12] = rest;
1022
- $[13] = t1;
1023
- $[14] = t3;
1024
- $[15] = t4;
1025
- $[16] = t5;
1026
- } else {
1027
- t5 = $[16];
1028
- }
1029
- return t5;
1030
- }
1031
- function HeaderTitleLinks(t0) {
1032
- const $ = compilerRuntimeExports.c(12);
1033
- let className;
1034
- let links;
1035
- let rest;
1036
- if ($[0] !== t0) {
1037
- ({
1038
- className,
1039
- links,
1040
- ...rest
1041
- } = t0);
1042
- $[0] = t0;
1043
- $[1] = className;
1044
- $[2] = links;
1045
- $[3] = rest;
1046
- } else {
1047
- className = $[1];
1048
- links = $[2];
1049
- rest = $[3];
1050
- }
1051
- let t1;
1052
- if ($[4] !== className) {
1053
- t1 = clsx(className);
1054
- $[4] = className;
1055
- $[5] = t1;
1056
- } else {
1057
- t1 = $[5];
1058
- }
1059
- let t2;
1060
- if ($[6] !== links) {
1061
- t2 = links?.map(_temp);
1062
- $[6] = links;
1063
- $[7] = t2;
1064
- } else {
1065
- t2 = $[7];
1066
- }
1067
- let t3;
1068
- if ($[8] !== rest || $[9] !== t1 || $[10] !== t2) {
1069
- t3 = /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: t1, ...rest, children: t2 });
1070
- $[8] = rest;
1071
- $[9] = t1;
1072
- $[10] = t2;
1073
- $[11] = t3;
1074
- } else {
1075
- t3 = $[11];
1076
- }
1077
- return t3;
1078
- }
1079
- function _temp(link) {
1080
- return /* @__PURE__ */ jsxRuntimeExports.jsx(designsystemetReact.Link, { href: link.href, className: clsx("at-header__title-link"), children: link.label }, link.href);
1081
- }
1082
- function HeaderTitleDropdown(t0) {
1083
- const $ = compilerRuntimeExports.c(37);
1084
- let className;
1085
- let controls;
1086
- let rest;
1087
- let userName;
1088
- if ($[0] !== t0) {
1089
- ({
1090
- className,
1091
- controls,
1092
- userName,
1093
- ...rest
1094
- } = t0);
1095
- $[0] = t0;
1096
- $[1] = className;
1097
- $[2] = controls;
1098
- $[3] = rest;
1099
- $[4] = userName;
1100
- } else {
1101
- className = $[1];
1102
- controls = $[2];
1103
- rest = $[3];
1104
- userName = $[4];
1105
- }
1106
- const [open, setOpen] = require$$0.useState(false);
1107
- const id = require$$0.useId();
1108
- let t1;
1109
- if ($[5] !== className) {
1110
- t1 = clsx(className);
1111
- $[5] = className;
1112
- $[6] = t1;
1113
- } else {
1114
- t1 = $[6];
1115
- }
1116
- let t2;
1117
- if ($[7] !== open) {
1118
- t2 = () => setOpen(!open);
1119
- $[7] = open;
1120
- $[8] = t2;
1121
- } else {
1122
- t2 = $[8];
1123
- }
1124
- let t3;
1125
- if ($[9] !== open) {
1126
- t3 = open ? /* @__PURE__ */ jsxRuntimeExports.jsx(akselIcons.ChevronUpIcon, { "aria-hidden": true }) : /* @__PURE__ */ jsxRuntimeExports.jsx(akselIcons.ChevronDownIcon, { "aria-hidden": true });
1127
- $[9] = open;
1128
- $[10] = t3;
1129
- } else {
1130
- t3 = $[10];
1131
- }
1132
- let t4;
1133
- if ($[11] !== t3 || $[12] !== userName) {
1134
- t4 = /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "at-header__title-dropdown-desktop", children: [
1135
- userName,
1136
- t3
1137
- ] });
1138
- $[11] = t3;
1139
- $[12] = userName;
1140
- $[13] = t4;
1141
- } else {
1142
- t4 = $[13];
1143
- }
1144
- let t5;
1145
- if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
1146
- t5 = /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "at-header__title-dropdown-text", children: "Meny" });
1147
- $[14] = t5;
1148
- } else {
1149
- t5 = $[14];
1150
- }
1151
- let t6;
1152
- if ($[15] !== open) {
1153
- t6 = /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "at-header__title-dropdown-mobile", children: [
1154
- t5,
1155
- open ? /* @__PURE__ */ jsxRuntimeExports.jsx(akselIcons.XMarkIcon, { "aria-hidden": true }) : /* @__PURE__ */ jsxRuntimeExports.jsx(akselIcons.MenuHamburgerIcon, { "aria-hidden": true })
1156
- ] });
1157
- $[15] = open;
1158
- $[16] = t6;
1159
- } else {
1160
- t6 = $[16];
1161
- }
1162
- let t7;
1163
- if ($[17] !== t2 || $[18] !== t4 || $[19] !== t6) {
1164
- t7 = /* @__PURE__ */ jsxRuntimeExports.jsxs(designsystemetReact.Dropdown.Trigger, { onClick: t2, variant: "tertiary", children: [
1165
- t4,
1166
- t6
1167
- ] });
1168
- $[17] = t2;
1169
- $[18] = t4;
1170
- $[19] = t6;
1171
- $[20] = t7;
1172
- } else {
1173
- t7 = $[20];
1174
- }
1175
- let t8;
1176
- if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
1177
- t8 = () => setOpen(false);
1178
- $[21] = t8;
1179
- } else {
1180
- t8 = $[21];
1181
- }
1182
- let t9;
1183
- if ($[22] !== controls || $[23] !== id) {
1184
- t9 = controls?.map((control, index) => /* @__PURE__ */ jsxRuntimeExports.jsx(designsystemetReact.Dropdown.Item, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx("at-header__title-dropdown-controls"), children: control }) }, id + "-control-" + index));
1185
- $[22] = controls;
1186
- $[23] = id;
1187
- $[24] = t9;
1188
- } else {
1189
- t9 = $[24];
1190
- }
1191
- let t10;
1192
- if ($[25] !== t9) {
1193
- t10 = /* @__PURE__ */ jsxRuntimeExports.jsx(designsystemetReact.Dropdown.List, { children: t9 });
1194
- $[25] = t9;
1195
- $[26] = t10;
1196
- } else {
1197
- t10 = $[26];
1198
- }
1199
- let t11;
1200
- if ($[27] !== open || $[28] !== t10) {
1201
- t11 = /* @__PURE__ */ jsxRuntimeExports.jsx(designsystemetReact.Dropdown, { open, onClose: t8, children: t10 });
1202
- $[27] = open;
1203
- $[28] = t10;
1204
- $[29] = t11;
1205
- } else {
1206
- t11 = $[29];
1207
- }
1208
- let t12;
1209
- if ($[30] !== t11 || $[31] !== t7) {
1210
- t12 = /* @__PURE__ */ jsxRuntimeExports.jsxs(designsystemetReact.Dropdown.TriggerContext, { children: [
1211
- t7,
1212
- t11
1213
- ] });
1214
- $[30] = t11;
1215
- $[31] = t7;
1216
- $[32] = t12;
1217
- } else {
1218
- t12 = $[32];
1219
- }
1220
- let t13;
1221
- if ($[33] !== rest || $[34] !== t1 || $[35] !== t12) {
1222
- t13 = /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: t1, ...rest, children: t12 });
1223
- $[33] = rest;
1224
- $[34] = t1;
1225
- $[35] = t12;
1226
- $[36] = t13;
1227
- } else {
1228
- t13 = $[36];
1229
- }
1230
- return t13;
1231
- }
1232
961
  function HeaderDefaultLogo(t0) {
1233
962
  const $ = compilerRuntimeExports.c(23);
1234
963
  const {
@@ -1352,6 +1081,422 @@ function HeaderDefaultLogo(t0) {
1352
1081
  }
1353
1082
  return t23;
1354
1083
  }
1084
+ const useIsomorphicLayoutEffect = typeof window !== "undefined" ? require$$0.useLayoutEffect : require$$0.useEffect;
1085
+ const IS_SERVER = typeof window === "undefined";
1086
+ function useMediaQuery(query, t0) {
1087
+ const $ = compilerRuntimeExports.c(17);
1088
+ let t1;
1089
+ if ($[0] !== t0) {
1090
+ t1 = {};
1091
+ $[0] = t0;
1092
+ $[1] = t1;
1093
+ } else {
1094
+ t1 = $[1];
1095
+ }
1096
+ const {
1097
+ defaultValue: t2,
1098
+ initializeWithValue: t3
1099
+ } = t1;
1100
+ const defaultValue = t2 === void 0 ? false : t2;
1101
+ const initializeWithValue = t3 === void 0 ? true : t3;
1102
+ let t4;
1103
+ if ($[2] !== defaultValue) {
1104
+ t4 = (query_0) => {
1105
+ if (IS_SERVER) {
1106
+ return defaultValue;
1107
+ }
1108
+ return window.matchMedia(query_0).matches;
1109
+ };
1110
+ $[2] = defaultValue;
1111
+ $[3] = t4;
1112
+ } else {
1113
+ t4 = $[3];
1114
+ }
1115
+ const getMatches = t4;
1116
+ let t5;
1117
+ if ($[4] !== defaultValue || $[5] !== getMatches || $[6] !== initializeWithValue || $[7] !== query) {
1118
+ t5 = () => {
1119
+ if (initializeWithValue) {
1120
+ return getMatches(query);
1121
+ }
1122
+ return defaultValue;
1123
+ };
1124
+ $[4] = defaultValue;
1125
+ $[5] = getMatches;
1126
+ $[6] = initializeWithValue;
1127
+ $[7] = query;
1128
+ $[8] = t5;
1129
+ } else {
1130
+ t5 = $[8];
1131
+ }
1132
+ const [matches, setMatches] = require$$0.useState(t5);
1133
+ let t6;
1134
+ if ($[9] !== getMatches || $[10] !== query) {
1135
+ t6 = function handleChange2() {
1136
+ setMatches(getMatches(query));
1137
+ };
1138
+ $[9] = getMatches;
1139
+ $[10] = query;
1140
+ $[11] = t6;
1141
+ } else {
1142
+ t6 = $[11];
1143
+ }
1144
+ const handleChange = t6;
1145
+ let t7;
1146
+ if ($[12] !== handleChange || $[13] !== query) {
1147
+ t7 = () => {
1148
+ const matchMedia = window.matchMedia(query);
1149
+ handleChange();
1150
+ if (matchMedia.addListener) {
1151
+ matchMedia.addListener(handleChange);
1152
+ } else {
1153
+ matchMedia.addEventListener("change", handleChange);
1154
+ }
1155
+ return () => {
1156
+ if (matchMedia.removeListener) {
1157
+ matchMedia.removeListener(handleChange);
1158
+ } else {
1159
+ matchMedia.removeEventListener("change", handleChange);
1160
+ }
1161
+ };
1162
+ };
1163
+ $[12] = handleChange;
1164
+ $[13] = query;
1165
+ $[14] = t7;
1166
+ } else {
1167
+ t7 = $[14];
1168
+ }
1169
+ let t8;
1170
+ if ($[15] !== query) {
1171
+ t8 = [query];
1172
+ $[15] = query;
1173
+ $[16] = t8;
1174
+ } else {
1175
+ t8 = $[16];
1176
+ }
1177
+ useIsomorphicLayoutEffect(t7, t8);
1178
+ return matches;
1179
+ }
1180
+ function HeaderTitleDropdown(t0) {
1181
+ const $ = compilerRuntimeExports.c(44);
1182
+ let children;
1183
+ let className;
1184
+ let controls;
1185
+ let links;
1186
+ let rest;
1187
+ let userName;
1188
+ if ($[0] !== t0) {
1189
+ ({
1190
+ className,
1191
+ controls,
1192
+ links,
1193
+ userName,
1194
+ children,
1195
+ ...rest
1196
+ } = t0);
1197
+ $[0] = t0;
1198
+ $[1] = children;
1199
+ $[2] = className;
1200
+ $[3] = controls;
1201
+ $[4] = links;
1202
+ $[5] = rest;
1203
+ $[6] = userName;
1204
+ } else {
1205
+ children = $[1];
1206
+ className = $[2];
1207
+ controls = $[3];
1208
+ links = $[4];
1209
+ rest = $[5];
1210
+ userName = $[6];
1211
+ }
1212
+ const [open, setOpen] = require$$0.useState(false);
1213
+ const id = require$$0.useId();
1214
+ const isMobile = useMediaQuery("(max-width: 768px)");
1215
+ let t1;
1216
+ if ($[7] !== className) {
1217
+ t1 = clsx(className);
1218
+ $[7] = className;
1219
+ $[8] = t1;
1220
+ } else {
1221
+ t1 = $[8];
1222
+ }
1223
+ let t2;
1224
+ if ($[9] !== open) {
1225
+ t2 = () => setOpen(!open);
1226
+ $[9] = open;
1227
+ $[10] = t2;
1228
+ } else {
1229
+ t2 = $[10];
1230
+ }
1231
+ const t3 = isMobile ? "primary" : "tertiary";
1232
+ let t4;
1233
+ if ($[11] !== isMobile || $[12] !== open || $[13] !== userName) {
1234
+ t4 = isMobile ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
1235
+ open ? /* @__PURE__ */ jsxRuntimeExports.jsx(akselIcons.XMarkIcon, { "aria-hidden": true }) : /* @__PURE__ */ jsxRuntimeExports.jsx(akselIcons.MenuHamburgerIcon, { "aria-hidden": true }),
1236
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "at-header__title-dropdown-text", children: "Meny" })
1237
+ ] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
1238
+ userName,
1239
+ open ? /* @__PURE__ */ jsxRuntimeExports.jsx(akselIcons.ChevronUpIcon, { "aria-hidden": true }) : /* @__PURE__ */ jsxRuntimeExports.jsx(akselIcons.ChevronDownIcon, { "aria-hidden": true })
1240
+ ] });
1241
+ $[11] = isMobile;
1242
+ $[12] = open;
1243
+ $[13] = userName;
1244
+ $[14] = t4;
1245
+ } else {
1246
+ t4 = $[14];
1247
+ }
1248
+ let t5;
1249
+ if ($[15] !== t2 || $[16] !== t3 || $[17] !== t4) {
1250
+ t5 = /* @__PURE__ */ jsxRuntimeExports.jsx(designsystemetReact.Dropdown.Trigger, { onClick: t2, "data-size": "sm", variant: t3, className: "at-header__title-dropdown-trigger", children: t4 });
1251
+ $[15] = t2;
1252
+ $[16] = t3;
1253
+ $[17] = t4;
1254
+ $[18] = t5;
1255
+ } else {
1256
+ t5 = $[18];
1257
+ }
1258
+ let t6;
1259
+ if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
1260
+ t6 = () => setOpen(false);
1261
+ $[19] = t6;
1262
+ } else {
1263
+ t6 = $[19];
1264
+ }
1265
+ let t7;
1266
+ if ($[20] !== children || $[21] !== links) {
1267
+ t7 = children ? require$$0.Children.map(children, _temp$1) : links?.map(_temp2$1);
1268
+ $[20] = children;
1269
+ $[21] = links;
1270
+ $[22] = t7;
1271
+ } else {
1272
+ t7 = $[22];
1273
+ }
1274
+ let t8;
1275
+ if ($[23] === Symbol.for("react.memo_cache_sentinel")) {
1276
+ t8 = /* @__PURE__ */ jsxRuntimeExports.jsx(designsystemetReact.Dropdown.Item, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx("at-header__title-dropdown-item-mobile at-header__title-dropdown-controls"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(designsystemetReact.Divider, {}) }) });
1277
+ $[23] = t8;
1278
+ } else {
1279
+ t8 = $[23];
1280
+ }
1281
+ let t9;
1282
+ if ($[24] !== controls || $[25] !== id) {
1283
+ t9 = controls?.map((control, index_0) => /* @__PURE__ */ jsxRuntimeExports.jsx(designsystemetReact.Dropdown.Item, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "at-header__title-dropdown-controls", children: control }) }, id + "-control-" + index_0));
1284
+ $[24] = controls;
1285
+ $[25] = id;
1286
+ $[26] = t9;
1287
+ } else {
1288
+ t9 = $[26];
1289
+ }
1290
+ let t10;
1291
+ if ($[27] !== t7 || $[28] !== t9) {
1292
+ t10 = /* @__PURE__ */ jsxRuntimeExports.jsxs(designsystemetReact.Dropdown.List, { children: [
1293
+ t7,
1294
+ t8,
1295
+ t9
1296
+ ] });
1297
+ $[27] = t7;
1298
+ $[28] = t9;
1299
+ $[29] = t10;
1300
+ } else {
1301
+ t10 = $[29];
1302
+ }
1303
+ let t11;
1304
+ if ($[30] === Symbol.for("react.memo_cache_sentinel")) {
1305
+ t11 = /* @__PURE__ */ jsxRuntimeExports.jsx(designsystemetReact.Dropdown.Item, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "at-header__title-dropdown-close-mobile", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(designsystemetReact.Button, { type: "button", variant: "secondary", onClick: () => setOpen(false), children: [
1306
+ /* @__PURE__ */ jsxRuntimeExports.jsx(akselIcons.XMarkIcon, { "aria-hidden": true }),
1307
+ "Lukk"
1308
+ ] }) }) });
1309
+ $[30] = t11;
1310
+ } else {
1311
+ t11 = $[30];
1312
+ }
1313
+ let t12;
1314
+ if ($[31] !== open || $[32] !== t10) {
1315
+ t12 = /* @__PURE__ */ jsxRuntimeExports.jsxs(designsystemetReact.Dropdown, { open, onClose: t6, placement: "bottom", className: "at-header__title-dropdown-content", children: [
1316
+ t10,
1317
+ t11
1318
+ ] });
1319
+ $[31] = open;
1320
+ $[32] = t10;
1321
+ $[33] = t12;
1322
+ } else {
1323
+ t12 = $[33];
1324
+ }
1325
+ let t13;
1326
+ if ($[34] !== t12 || $[35] !== t5) {
1327
+ t13 = /* @__PURE__ */ jsxRuntimeExports.jsxs(designsystemetReact.Dropdown.TriggerContext, { children: [
1328
+ t5,
1329
+ t12
1330
+ ] });
1331
+ $[34] = t12;
1332
+ $[35] = t5;
1333
+ $[36] = t13;
1334
+ } else {
1335
+ t13 = $[36];
1336
+ }
1337
+ let t14;
1338
+ if ($[37] !== open) {
1339
+ t14 = open ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { "aria-hidden": true, className: "at-header__title-dropdown-backdrop" }) : null;
1340
+ $[37] = open;
1341
+ $[38] = t14;
1342
+ } else {
1343
+ t14 = $[38];
1344
+ }
1345
+ let t15;
1346
+ if ($[39] !== rest || $[40] !== t1 || $[41] !== t13 || $[42] !== t14) {
1347
+ t15 = /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: t1, ...rest, children: [
1348
+ t13,
1349
+ t14
1350
+ ] });
1351
+ $[39] = rest;
1352
+ $[40] = t1;
1353
+ $[41] = t13;
1354
+ $[42] = t14;
1355
+ $[43] = t15;
1356
+ } else {
1357
+ t15 = $[43];
1358
+ }
1359
+ return t15;
1360
+ }
1361
+ function _temp2$1(link) {
1362
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(designsystemetReact.Dropdown.Item, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx("at-header__title-dropdown-controls", "at-header__title-dropdown-item-mobile"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(designsystemetReact.Link, { href: link.href, className: clsx("at-header__title-link"), children: link.label }) }) }, "nav-" + link.href);
1363
+ }
1364
+ function _temp$1(child, index) {
1365
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(designsystemetReact.Dropdown.Item, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx("at-header__title-dropdown-controls", "at-header__title-dropdown-item-mobile"), children: require$$0.isValidElement(child) ? /* @__PURE__ */ jsxRuntimeExports.jsx(reactSlot.Slot, { className: clsx("at-header__title-link", "ds-link"), children: child }) : child }) }, "nav-" + index);
1366
+ }
1367
+ function HeaderTitleLinks(t0) {
1368
+ const $ = compilerRuntimeExports.c(14);
1369
+ let children;
1370
+ let className;
1371
+ let links;
1372
+ let rest;
1373
+ if ($[0] !== t0) {
1374
+ ({
1375
+ className,
1376
+ links,
1377
+ children,
1378
+ ...rest
1379
+ } = t0);
1380
+ $[0] = t0;
1381
+ $[1] = children;
1382
+ $[2] = className;
1383
+ $[3] = links;
1384
+ $[4] = rest;
1385
+ } else {
1386
+ children = $[1];
1387
+ className = $[2];
1388
+ links = $[3];
1389
+ rest = $[4];
1390
+ }
1391
+ let t1;
1392
+ if ($[5] !== className) {
1393
+ t1 = clsx(className);
1394
+ $[5] = className;
1395
+ $[6] = t1;
1396
+ } else {
1397
+ t1 = $[6];
1398
+ }
1399
+ let t2;
1400
+ if ($[7] !== children || $[8] !== links) {
1401
+ t2 = children ? require$$0.Children.map(children, _temp) : links?.map(_temp2);
1402
+ $[7] = children;
1403
+ $[8] = links;
1404
+ $[9] = t2;
1405
+ } else {
1406
+ t2 = $[9];
1407
+ }
1408
+ let t3;
1409
+ if ($[10] !== rest || $[11] !== t1 || $[12] !== t2) {
1410
+ t3 = /* @__PURE__ */ jsxRuntimeExports.jsx("nav", { className: t1, ...rest, children: t2 });
1411
+ $[10] = rest;
1412
+ $[11] = t1;
1413
+ $[12] = t2;
1414
+ $[13] = t3;
1415
+ } else {
1416
+ t3 = $[13];
1417
+ }
1418
+ return t3;
1419
+ }
1420
+ function _temp2(link) {
1421
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(designsystemetReact.Link, { href: link.href, className: clsx("at-header__title-link"), children: link.label }, link.href);
1422
+ }
1423
+ function _temp(child) {
1424
+ if (require$$0.isValidElement(child)) {
1425
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(reactSlot.Slot, { className: clsx("at-header__title-link", "ds-link"), children: child });
1426
+ }
1427
+ return child;
1428
+ }
1429
+ function HeaderTitleLogo(t0) {
1430
+ const $ = compilerRuntimeExports.c(17);
1431
+ let appName;
1432
+ let className;
1433
+ let logo;
1434
+ let rest;
1435
+ if ($[0] !== t0) {
1436
+ ({
1437
+ className,
1438
+ logo,
1439
+ appName,
1440
+ ...rest
1441
+ } = t0);
1442
+ $[0] = t0;
1443
+ $[1] = appName;
1444
+ $[2] = className;
1445
+ $[3] = logo;
1446
+ $[4] = rest;
1447
+ } else {
1448
+ appName = $[1];
1449
+ className = $[2];
1450
+ logo = $[3];
1451
+ rest = $[4];
1452
+ }
1453
+ let t1;
1454
+ if ($[5] !== className) {
1455
+ t1 = clsx(className);
1456
+ $[5] = className;
1457
+ $[6] = t1;
1458
+ } else {
1459
+ t1 = $[6];
1460
+ }
1461
+ let t2;
1462
+ if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
1463
+ t2 = clsx("at-header__title-logo");
1464
+ $[7] = t2;
1465
+ } else {
1466
+ t2 = $[7];
1467
+ }
1468
+ let t3;
1469
+ if ($[8] !== logo) {
1470
+ t3 = /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: t2, children: logo });
1471
+ $[8] = logo;
1472
+ $[9] = t3;
1473
+ } else {
1474
+ t3 = $[9];
1475
+ }
1476
+ let t4;
1477
+ if ($[10] !== appName) {
1478
+ t4 = /* @__PURE__ */ jsxRuntimeExports.jsx(designsystemetReact.Heading, { children: appName });
1479
+ $[10] = appName;
1480
+ $[11] = t4;
1481
+ } else {
1482
+ t4 = $[11];
1483
+ }
1484
+ let t5;
1485
+ if ($[12] !== rest || $[13] !== t1 || $[14] !== t3 || $[15] !== t4) {
1486
+ t5 = /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: t1, ...rest, children: [
1487
+ t3,
1488
+ t4
1489
+ ] });
1490
+ $[12] = rest;
1491
+ $[13] = t1;
1492
+ $[14] = t3;
1493
+ $[15] = t4;
1494
+ $[16] = t5;
1495
+ } else {
1496
+ t5 = $[16];
1497
+ }
1498
+ return t5;
1499
+ }
1355
1500
  function HeaderTitle({
1356
1501
  className,
1357
1502
  logo = /* @__PURE__ */ jsxRuntimeExports.jsx(HeaderDefaultLogo, {}),
@@ -1359,12 +1504,13 @@ function HeaderTitle({
1359
1504
  userName,
1360
1505
  links = [],
1361
1506
  controls = [],
1507
+ children,
1362
1508
  ...rest
1363
1509
  }) {
1364
1510
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx("at-header__title-background", className), ...rest, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx("at-header__title"), children: [
1365
1511
  /* @__PURE__ */ jsxRuntimeExports.jsx(HeaderTitleLogo, { className: clsx("at-header__title-left"), logo, appName }),
1366
- /* @__PURE__ */ jsxRuntimeExports.jsx(HeaderTitleLinks, { className: clsx("at-header__title-center"), links }),
1367
- /* @__PURE__ */ jsxRuntimeExports.jsx(HeaderTitleDropdown, { className: clsx("at-header__title-right"), userName, controls })
1512
+ /* @__PURE__ */ jsxRuntimeExports.jsx(HeaderTitleLinks, { className: clsx("at-header__title-center"), links, children }),
1513
+ /* @__PURE__ */ jsxRuntimeExports.jsx(HeaderTitleDropdown, { className: clsx("at-header__title-right"), links, userName, controls, children })
1368
1514
  ] }) });
1369
1515
  }
1370
1516
  const Header = Object.assign(Header$1, {