@arbeidstilsynet/design-react 0.3.10 → 0.4.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.cjs CHANGED
@@ -5,7 +5,6 @@ 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");
9
8
  var jsxRuntime = { exports: {} };
10
9
  var reactJsxRuntime_production = {};
11
10
  var hasRequiredReactJsxRuntime_production;
@@ -958,6 +957,419 @@ function Header$1(t0) {
958
957
  }
959
958
  return t2;
960
959
  }
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
+ function HeaderDefaultLogo(t0) {
1233
+ const $ = compilerRuntimeExports.c(23);
1234
+ const {
1235
+ width: t1,
1236
+ height: t2
1237
+ } = t0;
1238
+ const width = t1 === void 0 ? 48 : t1;
1239
+ const height = t2 === void 0 ? 40 : t2;
1240
+ let t10;
1241
+ let t11;
1242
+ let t12;
1243
+ let t13;
1244
+ let t14;
1245
+ let t15;
1246
+ let t16;
1247
+ let t17;
1248
+ let t18;
1249
+ let t19;
1250
+ let t20;
1251
+ let t21;
1252
+ let t22;
1253
+ let t3;
1254
+ let t4;
1255
+ let t5;
1256
+ let t6;
1257
+ let t7;
1258
+ let t8;
1259
+ let t9;
1260
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
1261
+ t3 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M39.6146 39.0748C44.2288 34.9752 47.1325 29.0195 47.1325 22.3899C47.1325 10.0245 37.0294 6.10352e-05 24.567 6.10352e-05C12.1047 6.10352e-05 2.00159 10.0245 2.00159 22.3899C2.00159 29.0189 4.90531 34.9752 9.51947 39.0748H39.6146Z", fill: "#B3E5DF" });
1262
+ t4 = /* @__PURE__ */ jsxRuntimeExports.jsx("rect", { x: "16.7253", y: "20.4756", width: "2.08381", height: "0.108768", fill: "#085E55" });
1263
+ t5 = /* @__PURE__ */ jsxRuntimeExports.jsx("rect", { x: "34.2183", y: "6.36298", width: "2.08381", height: "0.108768", fill: "#085E55" });
1264
+ t6 = /* @__PURE__ */ jsxRuntimeExports.jsx("rect", { x: "7.67719", y: "13.5688", width: "2.82411", height: "0.108768", fill: "#085E55" });
1265
+ t7 = /* @__PURE__ */ jsxRuntimeExports.jsx("rect", { x: "6.27887", y: "12.8889", width: "2.82411", height: "0.108768", fill: "#085E55" });
1266
+ t8 = /* @__PURE__ */ jsxRuntimeExports.jsx("rect", { x: "37.3441", y: "15.7985", width: "2.82411", height: "0.108768", fill: "#085E55" });
1267
+ t9 = /* @__PURE__ */ jsxRuntimeExports.jsx("rect", { x: "36.1102", y: "16.4512", width: "2.82411", height: "0.108768", fill: "#085E55" });
1268
+ t10 = /* @__PURE__ */ jsxRuntimeExports.jsx("ellipse", { cx: "30.2138", cy: "10.6896", rx: "4.8805", ry: "4.84016", fill: "white" });
1269
+ t11 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M27.5607 7.28931C27.6145 7.24779 27.692 7.25736 27.7339 7.31068L30.3616 10.6573L30.5837 13.631C30.5887 13.6983 30.5377 13.757 30.4697 13.762C30.4018 13.767 30.3426 13.7164 30.3376 13.649L30.121 10.7492L27.5392 7.46104C27.4973 7.40772 27.5069 7.33083 27.5607 7.28931Z", fill: "black" });
1270
+ t12 = /* @__PURE__ */ jsxRuntimeExports.jsx("rect", { y: "38.9753", width: "48", height: "0.29752", fill: "black" });
1271
+ t13 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M19.1388 13.5608C19.1388 12.6441 18.3894 11.9009 17.465 11.9009H15.8471C14.9227 11.9009 14.1733 12.6441 14.1733 13.5608V22.7458H19.1388V13.5608Z", fill: "#FFE9B4" });
1272
+ t14 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M19.1388 13.4778C19.1388 12.6069 18.4269 11.9009 17.5487 11.9009H15.8471C14.9227 11.9009 14.1733 12.6441 14.1733 13.5608V15.0547H17.5487C18.4269 15.0547 19.1388 14.3487 19.1388 13.4778Z", fill: "black" });
1273
+ t15 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M14.1733 13.9482H13.5038C12.5794 13.9482 11.8301 14.6914 11.8301 15.6082V22.7459H14.1733V13.9482Z", fill: "black" });
1274
+ t16 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M11.8301 17.1574H11.7185C10.7941 17.1574 10.0447 17.9006 10.0447 18.8174V23.0225H11.8301V17.1574Z", fill: "black" });
1275
+ t17 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M9.48675 38.8454L9.56881 37.6655L8.70715 24.1285C8.64853 23.2105 9.39296 22.4363 10.3308 22.4392L13.4228 22.4507H16.4384H18.247L21.9193 22.4421C22.948 22.4421 23.7657 23.2882 23.7071 24.2954L22.0248 38.8857L21.7904 38.8771L9.48675 38.8454Z", fill: "#11C1B0" });
1276
+ t18 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M21.7639 23.7544C22.7926 23.4493 23.3905 22.7212 23.6865 23.7371L26.6525 32.8337L36.758 36.4597C37.2298 36.6295 37.4584 37.159 37.2504 37.608C37.0774 37.9878 36.6466 38.1893 36.2363 38.0799L24.0734 34.9029L20.3219 25.3141C19.9556 24.2954 20.7088 24.0623 21.7609 23.7515L21.7639 23.7544Z", fill: "#11C1B0" });
1277
+ t19 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M12.693 23.8752L15.1402 33.205L25.4597 37.0756C25.9433 37.2569 26.166 37.8037 25.9491 38.2613C25.7645 38.6498 25.3219 38.8483 24.9028 38.7332L12.4644 35.2943L8.91224 25.0033L12.693 23.8752Z", fill: "#11C1B0" });
1278
+ t20 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M22.9831 36.1431L25.4626 37.0727C25.9462 37.254 26.1689 37.8007 25.9521 38.2583C25.7674 38.6468 25.3249 38.8454 24.9058 38.7303L22.0013 37.9302L22.9831 36.1431Z", fill: "#FFE9B4" });
1279
+ t21 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M18.2147 37.8959H39.8588V38.8887H18.2147V37.8959Z", fill: "#085E55" });
1280
+ t22 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M26.1426 38.8138H39.8588L42.353 28.5516H28.6367L26.1426 38.8138Z", fill: "#085E55" });
1281
+ $[0] = t10;
1282
+ $[1] = t11;
1283
+ $[2] = t12;
1284
+ $[3] = t13;
1285
+ $[4] = t14;
1286
+ $[5] = t15;
1287
+ $[6] = t16;
1288
+ $[7] = t17;
1289
+ $[8] = t18;
1290
+ $[9] = t19;
1291
+ $[10] = t20;
1292
+ $[11] = t21;
1293
+ $[12] = t22;
1294
+ $[13] = t3;
1295
+ $[14] = t4;
1296
+ $[15] = t5;
1297
+ $[16] = t6;
1298
+ $[17] = t7;
1299
+ $[18] = t8;
1300
+ $[19] = t9;
1301
+ } else {
1302
+ t10 = $[0];
1303
+ t11 = $[1];
1304
+ t12 = $[2];
1305
+ t13 = $[3];
1306
+ t14 = $[4];
1307
+ t15 = $[5];
1308
+ t16 = $[6];
1309
+ t17 = $[7];
1310
+ t18 = $[8];
1311
+ t19 = $[9];
1312
+ t20 = $[10];
1313
+ t21 = $[11];
1314
+ t22 = $[12];
1315
+ t3 = $[13];
1316
+ t4 = $[14];
1317
+ t5 = $[15];
1318
+ t6 = $[16];
1319
+ t7 = $[17];
1320
+ t8 = $[18];
1321
+ t9 = $[19];
1322
+ }
1323
+ let t23;
1324
+ if ($[20] !== height || $[21] !== width) {
1325
+ t23 = /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { width, height, viewBox: "0 0 48 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
1326
+ t3,
1327
+ t4,
1328
+ t5,
1329
+ t6,
1330
+ t7,
1331
+ t8,
1332
+ t9,
1333
+ t10,
1334
+ t11,
1335
+ t12,
1336
+ t13,
1337
+ t14,
1338
+ t15,
1339
+ t16,
1340
+ t17,
1341
+ t18,
1342
+ t19,
1343
+ t20,
1344
+ t21,
1345
+ t22
1346
+ ] });
1347
+ $[20] = height;
1348
+ $[21] = width;
1349
+ $[22] = t23;
1350
+ } else {
1351
+ t23 = $[22];
1352
+ }
1353
+ return t23;
1354
+ }
1355
+ function HeaderTitle({
1356
+ className,
1357
+ logo = /* @__PURE__ */ jsxRuntimeExports.jsx(HeaderDefaultLogo, {}),
1358
+ appName,
1359
+ userName,
1360
+ links = [],
1361
+ controls = [],
1362
+ ...rest
1363
+ }) {
1364
+ 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
+ /* @__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 })
1368
+ ] }) });
1369
+ }
1370
+ const Header = Object.assign(Header$1, {
1371
+ Title: HeaderTitle
1372
+ });
961
1373
  const LogoBlack = (t0) => {
962
1374
  const $ = compilerRuntimeExports.c(20);
963
1375
  const {
@@ -1227,314 +1639,6 @@ function LightDarkLogo(t0) {
1227
1639
  }
1228
1640
  return t4;
1229
1641
  }
1230
- function HeaderTitle(t0) {
1231
- const $ = compilerRuntimeExports.c(31);
1232
- let className;
1233
- let rest;
1234
- let t1;
1235
- let t2;
1236
- if ($[0] !== t0) {
1237
- ({
1238
- className,
1239
- fagsystemNavn: t1,
1240
- brukernavn: t2,
1241
- ...rest
1242
- } = t0);
1243
- $[0] = t0;
1244
- $[1] = className;
1245
- $[2] = rest;
1246
- $[3] = t1;
1247
- $[4] = t2;
1248
- } else {
1249
- className = $[1];
1250
- rest = $[2];
1251
- t1 = $[3];
1252
- t2 = $[4];
1253
- }
1254
- const fagsystemNavn = t1 === void 0 ? "Fagsystem" : t1;
1255
- const brukernavn = t2 === void 0 ? "Bruker Brukersen" : t2;
1256
- const getInitials = _temp;
1257
- let t3;
1258
- if ($[5] !== className) {
1259
- t3 = clsx("at-header__title-background", className);
1260
- $[5] = className;
1261
- $[6] = t3;
1262
- } else {
1263
- t3 = $[6];
1264
- }
1265
- let t4;
1266
- let t5;
1267
- let t6;
1268
- if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
1269
- t4 = clsx("at-header__title");
1270
- t5 = /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx("at-header__title-left"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(LightDarkLogo, { width: "150px" }) });
1271
- t6 = clsx("at-header__title-center");
1272
- $[7] = t4;
1273
- $[8] = t5;
1274
- $[9] = t6;
1275
- } else {
1276
- t4 = $[7];
1277
- t5 = $[8];
1278
- t6 = $[9];
1279
- }
1280
- let t7;
1281
- if ($[10] !== fagsystemNavn) {
1282
- t7 = /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: t6, children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { children: fagsystemNavn }) });
1283
- $[10] = fagsystemNavn;
1284
- $[11] = t7;
1285
- } else {
1286
- t7 = $[11];
1287
- }
1288
- let t8;
1289
- if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
1290
- t8 = clsx("at-header__title-right");
1291
- $[12] = t8;
1292
- } else {
1293
- t8 = $[12];
1294
- }
1295
- let t9;
1296
- if ($[13] !== brukernavn) {
1297
- t9 = getInitials(brukernavn);
1298
- $[13] = brukernavn;
1299
- $[14] = t9;
1300
- } else {
1301
- t9 = $[14];
1302
- }
1303
- let t10;
1304
- if ($[15] !== brukernavn || $[16] !== t9) {
1305
- t10 = /* @__PURE__ */ jsxRuntimeExports.jsx(designsystemetReact.Avatar, { "aria-label": brukernavn, initials: t9, "data-size": "xs" });
1306
- $[15] = brukernavn;
1307
- $[16] = t9;
1308
- $[17] = t10;
1309
- } else {
1310
- t10 = $[17];
1311
- }
1312
- let t11;
1313
- if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
1314
- t11 = clsx("at-header__title-brukernavn");
1315
- $[18] = t11;
1316
- } else {
1317
- t11 = $[18];
1318
- }
1319
- let t12;
1320
- if ($[19] !== brukernavn) {
1321
- t12 = /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: t11, children: brukernavn });
1322
- $[19] = brukernavn;
1323
- $[20] = t12;
1324
- } else {
1325
- t12 = $[20];
1326
- }
1327
- let t13;
1328
- if ($[21] !== t10 || $[22] !== t12) {
1329
- t13 = /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: t8, children: [
1330
- t10,
1331
- t12
1332
- ] });
1333
- $[21] = t10;
1334
- $[22] = t12;
1335
- $[23] = t13;
1336
- } else {
1337
- t13 = $[23];
1338
- }
1339
- let t14;
1340
- if ($[24] !== t13 || $[25] !== t7) {
1341
- t14 = /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: t4, children: [
1342
- t5,
1343
- t7,
1344
- t13
1345
- ] });
1346
- $[24] = t13;
1347
- $[25] = t7;
1348
- $[26] = t14;
1349
- } else {
1350
- t14 = $[26];
1351
- }
1352
- let t15;
1353
- if ($[27] !== rest || $[28] !== t14 || $[29] !== t3) {
1354
- t15 = /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: t3, ...rest, children: t14 });
1355
- $[27] = rest;
1356
- $[28] = t14;
1357
- $[29] = t3;
1358
- $[30] = t15;
1359
- } else {
1360
- t15 = $[30];
1361
- }
1362
- return t15;
1363
- }
1364
- function _temp(name) {
1365
- if (!name) {
1366
- return "";
1367
- }
1368
- const names = name.split(" ");
1369
- if (names.length === 1) {
1370
- return names[0].charAt(0).toUpperCase();
1371
- }
1372
- return names[0].charAt(0).toUpperCase() + names.at(-1).charAt(0).toUpperCase();
1373
- }
1374
- function HeaderSearch(t0) {
1375
- const $ = compilerRuntimeExports.c(10);
1376
- let className;
1377
- let rest;
1378
- if ($[0] !== t0) {
1379
- ({
1380
- className,
1381
- ...rest
1382
- } = t0);
1383
- $[0] = t0;
1384
- $[1] = className;
1385
- $[2] = rest;
1386
- } else {
1387
- className = $[1];
1388
- rest = $[2];
1389
- }
1390
- let t1;
1391
- if ($[3] !== className) {
1392
- t1 = clsx("at-header__search-background", className);
1393
- $[3] = className;
1394
- $[4] = t1;
1395
- } else {
1396
- t1 = $[4];
1397
- }
1398
- let t2;
1399
- if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
1400
- t2 = clsx("at-header__search");
1401
- $[5] = t2;
1402
- } else {
1403
- t2 = $[5];
1404
- }
1405
- let t3;
1406
- if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
1407
- t3 = /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: t2, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(designsystemetReact.Search, { children: [
1408
- /* @__PURE__ */ jsxRuntimeExports.jsx(designsystemetReact.Search.Input, { name: "placeholder", "aria-label": "Søk", className: "at-header__search-input" }),
1409
- /* @__PURE__ */ jsxRuntimeExports.jsx(designsystemetReact.Search.Clear, { className: "at-header__search-clear" }),
1410
- /* @__PURE__ */ jsxRuntimeExports.jsx(designsystemetReact.Search.Button, { className: "at-header__search-button" })
1411
- ] }) });
1412
- $[6] = t3;
1413
- } else {
1414
- t3 = $[6];
1415
- }
1416
- let t4;
1417
- if ($[7] !== rest || $[8] !== t1) {
1418
- t4 = /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: t1, ...rest, children: t3 });
1419
- $[7] = rest;
1420
- $[8] = t1;
1421
- $[9] = t4;
1422
- } else {
1423
- t4 = $[9];
1424
- }
1425
- return t4;
1426
- }
1427
- const HeaderLinksRoot = (t0) => {
1428
- const $ = compilerRuntimeExports.c(11);
1429
- let children;
1430
- let props;
1431
- if ($[0] !== t0) {
1432
- ({
1433
- children,
1434
- ...props
1435
- } = t0);
1436
- $[0] = t0;
1437
- $[1] = children;
1438
- $[2] = props;
1439
- } else {
1440
- children = $[1];
1441
- props = $[2];
1442
- }
1443
- let t1;
1444
- if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
1445
- t1 = clsx("at-header__links-root");
1446
- $[3] = t1;
1447
- } else {
1448
- t1 = $[3];
1449
- }
1450
- let t2;
1451
- let t3;
1452
- if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
1453
- t2 = /* @__PURE__ */ jsxRuntimeExports.jsx("label", { className: "hamburger-menu", htmlFor: "hamburger-checkbox", "aria-label": "Toggle navigation", children: /* @__PURE__ */ jsxRuntimeExports.jsx("input", { id: "hamburger-checkbox", type: "checkbox" }) });
1454
- t3 = clsx("at-header__links");
1455
- $[4] = t2;
1456
- $[5] = t3;
1457
- } else {
1458
- t2 = $[4];
1459
- t3 = $[5];
1460
- }
1461
- let t4;
1462
- if ($[6] !== children) {
1463
- t4 = /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: t3, children });
1464
- $[6] = children;
1465
- $[7] = t4;
1466
- } else {
1467
- t4 = $[7];
1468
- }
1469
- let t5;
1470
- if ($[8] !== props || $[9] !== t4) {
1471
- t5 = /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: t1, ...props, children: [
1472
- t2,
1473
- t4
1474
- ] });
1475
- $[8] = props;
1476
- $[9] = t4;
1477
- $[10] = t5;
1478
- } else {
1479
- t5 = $[10];
1480
- }
1481
- return t5;
1482
- };
1483
- const HeaderLinkItem = (t0) => {
1484
- const $ = compilerRuntimeExports.c(12);
1485
- let children;
1486
- let className;
1487
- let props;
1488
- let t1;
1489
- if ($[0] !== t0) {
1490
- ({
1491
- asChild: t1,
1492
- className,
1493
- children,
1494
- ...props
1495
- } = t0);
1496
- $[0] = t0;
1497
- $[1] = children;
1498
- $[2] = className;
1499
- $[3] = props;
1500
- $[4] = t1;
1501
- } else {
1502
- children = $[1];
1503
- className = $[2];
1504
- props = $[3];
1505
- t1 = $[4];
1506
- }
1507
- const asChild = t1 === void 0 ? false : t1;
1508
- const Component = asChild ? reactSlot.Slot : "div";
1509
- let t2;
1510
- if ($[5] !== className) {
1511
- t2 = clsx("at-header__links-item", className);
1512
- $[5] = className;
1513
- $[6] = t2;
1514
- } else {
1515
- t2 = $[6];
1516
- }
1517
- let t3;
1518
- if ($[7] !== Component || $[8] !== children || $[9] !== props || $[10] !== t2) {
1519
- t3 = /* @__PURE__ */ jsxRuntimeExports.jsx(Component, { className: t2, ...props, children });
1520
- $[7] = Component;
1521
- $[8] = children;
1522
- $[9] = props;
1523
- $[10] = t2;
1524
- $[11] = t3;
1525
- } else {
1526
- t3 = $[11];
1527
- }
1528
- return t3;
1529
- };
1530
- const HeaderLinks = Object.assign(HeaderLinksRoot, {
1531
- Item: HeaderLinkItem
1532
- });
1533
- const Header = Object.assign(Header$1, {
1534
- Title: HeaderTitle,
1535
- Search: HeaderSearch,
1536
- Links: HeaderLinks
1537
- });
1538
1642
  const LogoGreen = (t0) => {
1539
1643
  const $ = compilerRuntimeExports.c(21);
1540
1644
  const {
@@ -2096,8 +2200,7 @@ exports.FilePickerDropzone = FilePickerDropzone;
2096
2200
  exports.FilePickerErrors = FilePickerErrors;
2097
2201
  exports.FilePickerFiles = FilePickerFiles;
2098
2202
  exports.Header = Header;
2099
- exports.HeaderLinks = HeaderLinks;
2100
- exports.HeaderSearch = HeaderSearch;
2203
+ exports.HeaderDefaultLogo = HeaderDefaultLogo;
2101
2204
  exports.HeaderTitle = HeaderTitle;
2102
2205
  exports.LightDarkLogo = LightDarkLogo;
2103
2206
  exports.LogoBlack = LogoBlack;