@arbeidstilsynet/design-react 0.4.0 → 0.4.1
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 +304 -275
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +309 -280
- package/dist/index.js.map +1 -1
- package/dist/src/components/header/headerTitleDropdown.d.ts +3 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -719,7 +719,7 @@ function FilePickerErrors(t0) {
|
|
|
719
719
|
}
|
|
720
720
|
let t2;
|
|
721
721
|
if ($[5] !== errors) {
|
|
722
|
-
t2 = errors.map(_temp$
|
|
722
|
+
t2 = errors.map(_temp$2);
|
|
723
723
|
$[5] = errors;
|
|
724
724
|
$[6] = t2;
|
|
725
725
|
} else {
|
|
@@ -737,7 +737,7 @@ function FilePickerErrors(t0) {
|
|
|
737
737
|
}
|
|
738
738
|
return t3;
|
|
739
739
|
}
|
|
740
|
-
function _temp$
|
|
740
|
+
function _temp$2(error, index) {
|
|
741
741
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(designsystemetReact.ValidationMessage, { children: error }, index);
|
|
742
742
|
}
|
|
743
743
|
function formatFileSize(bytes) {
|
|
@@ -957,278 +957,6 @@ function Header$1(t0) {
|
|
|
957
957
|
}
|
|
958
958
|
return t2;
|
|
959
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
960
|
function HeaderDefaultLogo(t0) {
|
|
1233
961
|
const $ = compilerRuntimeExports.c(23);
|
|
1234
962
|
const {
|
|
@@ -1352,6 +1080,307 @@ function HeaderDefaultLogo(t0) {
|
|
|
1352
1080
|
}
|
|
1353
1081
|
return t23;
|
|
1354
1082
|
}
|
|
1083
|
+
function HeaderTitleDropdown(t0) {
|
|
1084
|
+
const $ = compilerRuntimeExports.c(42);
|
|
1085
|
+
let className;
|
|
1086
|
+
let controls;
|
|
1087
|
+
let links;
|
|
1088
|
+
let rest;
|
|
1089
|
+
let userName;
|
|
1090
|
+
if ($[0] !== t0) {
|
|
1091
|
+
({
|
|
1092
|
+
className,
|
|
1093
|
+
controls,
|
|
1094
|
+
links,
|
|
1095
|
+
userName,
|
|
1096
|
+
...rest
|
|
1097
|
+
} = t0);
|
|
1098
|
+
$[0] = t0;
|
|
1099
|
+
$[1] = className;
|
|
1100
|
+
$[2] = controls;
|
|
1101
|
+
$[3] = links;
|
|
1102
|
+
$[4] = rest;
|
|
1103
|
+
$[5] = userName;
|
|
1104
|
+
} else {
|
|
1105
|
+
className = $[1];
|
|
1106
|
+
controls = $[2];
|
|
1107
|
+
links = $[3];
|
|
1108
|
+
rest = $[4];
|
|
1109
|
+
userName = $[5];
|
|
1110
|
+
}
|
|
1111
|
+
const [open, setOpen] = require$$0.useState(false);
|
|
1112
|
+
const id = require$$0.useId();
|
|
1113
|
+
const isMobile = designsystemetReact.useMediaQuery("(max-width: 768px)");
|
|
1114
|
+
let t1;
|
|
1115
|
+
if ($[6] !== className) {
|
|
1116
|
+
t1 = clsx(className);
|
|
1117
|
+
$[6] = className;
|
|
1118
|
+
$[7] = t1;
|
|
1119
|
+
} else {
|
|
1120
|
+
t1 = $[7];
|
|
1121
|
+
}
|
|
1122
|
+
let t2;
|
|
1123
|
+
if ($[8] !== open) {
|
|
1124
|
+
t2 = () => setOpen(!open);
|
|
1125
|
+
$[8] = open;
|
|
1126
|
+
$[9] = t2;
|
|
1127
|
+
} else {
|
|
1128
|
+
t2 = $[9];
|
|
1129
|
+
}
|
|
1130
|
+
const t3 = isMobile ? "primary" : "tertiary";
|
|
1131
|
+
let t4;
|
|
1132
|
+
if ($[10] !== isMobile || $[11] !== open || $[12] !== userName) {
|
|
1133
|
+
t4 = isMobile ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
1134
|
+
open ? /* @__PURE__ */ jsxRuntimeExports.jsx(akselIcons.XMarkIcon, { "aria-hidden": true }) : /* @__PURE__ */ jsxRuntimeExports.jsx(akselIcons.MenuHamburgerIcon, { "aria-hidden": true }),
|
|
1135
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "at-header__title-dropdown-text", children: "Meny" })
|
|
1136
|
+
] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
1137
|
+
userName,
|
|
1138
|
+
open ? /* @__PURE__ */ jsxRuntimeExports.jsx(akselIcons.ChevronUpIcon, { "aria-hidden": true }) : /* @__PURE__ */ jsxRuntimeExports.jsx(akselIcons.ChevronDownIcon, { "aria-hidden": true })
|
|
1139
|
+
] });
|
|
1140
|
+
$[10] = isMobile;
|
|
1141
|
+
$[11] = open;
|
|
1142
|
+
$[12] = userName;
|
|
1143
|
+
$[13] = t4;
|
|
1144
|
+
} else {
|
|
1145
|
+
t4 = $[13];
|
|
1146
|
+
}
|
|
1147
|
+
let t5;
|
|
1148
|
+
if ($[14] !== t2 || $[15] !== t3 || $[16] !== t4) {
|
|
1149
|
+
t5 = /* @__PURE__ */ jsxRuntimeExports.jsx(designsystemetReact.Dropdown.Trigger, { onClick: t2, "data-size": "sm", variant: t3, className: "at-header__title-dropdown-trigger", children: t4 });
|
|
1150
|
+
$[14] = t2;
|
|
1151
|
+
$[15] = t3;
|
|
1152
|
+
$[16] = t4;
|
|
1153
|
+
$[17] = t5;
|
|
1154
|
+
} else {
|
|
1155
|
+
t5 = $[17];
|
|
1156
|
+
}
|
|
1157
|
+
let t6;
|
|
1158
|
+
if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1159
|
+
t6 = () => setOpen(false);
|
|
1160
|
+
$[18] = t6;
|
|
1161
|
+
} else {
|
|
1162
|
+
t6 = $[18];
|
|
1163
|
+
}
|
|
1164
|
+
let t7;
|
|
1165
|
+
if ($[19] !== links) {
|
|
1166
|
+
t7 = links?.map(_temp$1);
|
|
1167
|
+
$[19] = links;
|
|
1168
|
+
$[20] = t7;
|
|
1169
|
+
} else {
|
|
1170
|
+
t7 = $[20];
|
|
1171
|
+
}
|
|
1172
|
+
let t8;
|
|
1173
|
+
if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1174
|
+
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, {}) }) });
|
|
1175
|
+
$[21] = t8;
|
|
1176
|
+
} else {
|
|
1177
|
+
t8 = $[21];
|
|
1178
|
+
}
|
|
1179
|
+
let t9;
|
|
1180
|
+
if ($[22] !== controls || $[23] !== id) {
|
|
1181
|
+
t9 = controls?.map((control, index) => /* @__PURE__ */ jsxRuntimeExports.jsx(designsystemetReact.Dropdown.Item, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "at-header__title-dropdown-controls", children: control }) }, id + "-control-" + index));
|
|
1182
|
+
$[22] = controls;
|
|
1183
|
+
$[23] = id;
|
|
1184
|
+
$[24] = t9;
|
|
1185
|
+
} else {
|
|
1186
|
+
t9 = $[24];
|
|
1187
|
+
}
|
|
1188
|
+
let t10;
|
|
1189
|
+
if ($[25] !== t7 || $[26] !== t9) {
|
|
1190
|
+
t10 = /* @__PURE__ */ jsxRuntimeExports.jsxs(designsystemetReact.Dropdown.List, { children: [
|
|
1191
|
+
t7,
|
|
1192
|
+
t8,
|
|
1193
|
+
t9
|
|
1194
|
+
] });
|
|
1195
|
+
$[25] = t7;
|
|
1196
|
+
$[26] = t9;
|
|
1197
|
+
$[27] = t10;
|
|
1198
|
+
} else {
|
|
1199
|
+
t10 = $[27];
|
|
1200
|
+
}
|
|
1201
|
+
let t11;
|
|
1202
|
+
if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1203
|
+
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: [
|
|
1204
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(akselIcons.XMarkIcon, { "aria-hidden": true }),
|
|
1205
|
+
"Lukk"
|
|
1206
|
+
] }) }) });
|
|
1207
|
+
$[28] = t11;
|
|
1208
|
+
} else {
|
|
1209
|
+
t11 = $[28];
|
|
1210
|
+
}
|
|
1211
|
+
let t12;
|
|
1212
|
+
if ($[29] !== open || $[30] !== t10) {
|
|
1213
|
+
t12 = /* @__PURE__ */ jsxRuntimeExports.jsxs(designsystemetReact.Dropdown, { open, onClose: t6, placement: "bottom", className: "at-header__title-dropdown-content", children: [
|
|
1214
|
+
t10,
|
|
1215
|
+
t11
|
|
1216
|
+
] });
|
|
1217
|
+
$[29] = open;
|
|
1218
|
+
$[30] = t10;
|
|
1219
|
+
$[31] = t12;
|
|
1220
|
+
} else {
|
|
1221
|
+
t12 = $[31];
|
|
1222
|
+
}
|
|
1223
|
+
let t13;
|
|
1224
|
+
if ($[32] !== t12 || $[33] !== t5) {
|
|
1225
|
+
t13 = /* @__PURE__ */ jsxRuntimeExports.jsxs(designsystemetReact.Dropdown.TriggerContext, { children: [
|
|
1226
|
+
t5,
|
|
1227
|
+
t12
|
|
1228
|
+
] });
|
|
1229
|
+
$[32] = t12;
|
|
1230
|
+
$[33] = t5;
|
|
1231
|
+
$[34] = t13;
|
|
1232
|
+
} else {
|
|
1233
|
+
t13 = $[34];
|
|
1234
|
+
}
|
|
1235
|
+
let t14;
|
|
1236
|
+
if ($[35] !== open) {
|
|
1237
|
+
t14 = open ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { "aria-hidden": true, className: "at-header__title-dropdown-backdrop" }) : null;
|
|
1238
|
+
$[35] = open;
|
|
1239
|
+
$[36] = t14;
|
|
1240
|
+
} else {
|
|
1241
|
+
t14 = $[36];
|
|
1242
|
+
}
|
|
1243
|
+
let t15;
|
|
1244
|
+
if ($[37] !== rest || $[38] !== t1 || $[39] !== t13 || $[40] !== t14) {
|
|
1245
|
+
t15 = /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: t1, ...rest, children: [
|
|
1246
|
+
t13,
|
|
1247
|
+
t14
|
|
1248
|
+
] });
|
|
1249
|
+
$[37] = rest;
|
|
1250
|
+
$[38] = t1;
|
|
1251
|
+
$[39] = t13;
|
|
1252
|
+
$[40] = t14;
|
|
1253
|
+
$[41] = t15;
|
|
1254
|
+
} else {
|
|
1255
|
+
t15 = $[41];
|
|
1256
|
+
}
|
|
1257
|
+
return t15;
|
|
1258
|
+
}
|
|
1259
|
+
function _temp$1(link) {
|
|
1260
|
+
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);
|
|
1261
|
+
}
|
|
1262
|
+
function HeaderTitleLinks(t0) {
|
|
1263
|
+
const $ = compilerRuntimeExports.c(12);
|
|
1264
|
+
let className;
|
|
1265
|
+
let links;
|
|
1266
|
+
let rest;
|
|
1267
|
+
if ($[0] !== t0) {
|
|
1268
|
+
({
|
|
1269
|
+
className,
|
|
1270
|
+
links,
|
|
1271
|
+
...rest
|
|
1272
|
+
} = t0);
|
|
1273
|
+
$[0] = t0;
|
|
1274
|
+
$[1] = className;
|
|
1275
|
+
$[2] = links;
|
|
1276
|
+
$[3] = rest;
|
|
1277
|
+
} else {
|
|
1278
|
+
className = $[1];
|
|
1279
|
+
links = $[2];
|
|
1280
|
+
rest = $[3];
|
|
1281
|
+
}
|
|
1282
|
+
let t1;
|
|
1283
|
+
if ($[4] !== className) {
|
|
1284
|
+
t1 = clsx(className);
|
|
1285
|
+
$[4] = className;
|
|
1286
|
+
$[5] = t1;
|
|
1287
|
+
} else {
|
|
1288
|
+
t1 = $[5];
|
|
1289
|
+
}
|
|
1290
|
+
let t2;
|
|
1291
|
+
if ($[6] !== links) {
|
|
1292
|
+
t2 = links?.map(_temp);
|
|
1293
|
+
$[6] = links;
|
|
1294
|
+
$[7] = t2;
|
|
1295
|
+
} else {
|
|
1296
|
+
t2 = $[7];
|
|
1297
|
+
}
|
|
1298
|
+
let t3;
|
|
1299
|
+
if ($[8] !== rest || $[9] !== t1 || $[10] !== t2) {
|
|
1300
|
+
t3 = /* @__PURE__ */ jsxRuntimeExports.jsx("nav", { className: t1, ...rest, children: t2 });
|
|
1301
|
+
$[8] = rest;
|
|
1302
|
+
$[9] = t1;
|
|
1303
|
+
$[10] = t2;
|
|
1304
|
+
$[11] = t3;
|
|
1305
|
+
} else {
|
|
1306
|
+
t3 = $[11];
|
|
1307
|
+
}
|
|
1308
|
+
return t3;
|
|
1309
|
+
}
|
|
1310
|
+
function _temp(link) {
|
|
1311
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(designsystemetReact.Link, { href: link.href, className: clsx("at-header__title-link"), children: link.label }, link.href);
|
|
1312
|
+
}
|
|
1313
|
+
function HeaderTitleLogo(t0) {
|
|
1314
|
+
const $ = compilerRuntimeExports.c(17);
|
|
1315
|
+
let appName;
|
|
1316
|
+
let className;
|
|
1317
|
+
let logo;
|
|
1318
|
+
let rest;
|
|
1319
|
+
if ($[0] !== t0) {
|
|
1320
|
+
({
|
|
1321
|
+
className,
|
|
1322
|
+
logo,
|
|
1323
|
+
appName,
|
|
1324
|
+
...rest
|
|
1325
|
+
} = t0);
|
|
1326
|
+
$[0] = t0;
|
|
1327
|
+
$[1] = appName;
|
|
1328
|
+
$[2] = className;
|
|
1329
|
+
$[3] = logo;
|
|
1330
|
+
$[4] = rest;
|
|
1331
|
+
} else {
|
|
1332
|
+
appName = $[1];
|
|
1333
|
+
className = $[2];
|
|
1334
|
+
logo = $[3];
|
|
1335
|
+
rest = $[4];
|
|
1336
|
+
}
|
|
1337
|
+
let t1;
|
|
1338
|
+
if ($[5] !== className) {
|
|
1339
|
+
t1 = clsx(className);
|
|
1340
|
+
$[5] = className;
|
|
1341
|
+
$[6] = t1;
|
|
1342
|
+
} else {
|
|
1343
|
+
t1 = $[6];
|
|
1344
|
+
}
|
|
1345
|
+
let t2;
|
|
1346
|
+
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1347
|
+
t2 = clsx("at-header__title-logo");
|
|
1348
|
+
$[7] = t2;
|
|
1349
|
+
} else {
|
|
1350
|
+
t2 = $[7];
|
|
1351
|
+
}
|
|
1352
|
+
let t3;
|
|
1353
|
+
if ($[8] !== logo) {
|
|
1354
|
+
t3 = /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: t2, children: logo });
|
|
1355
|
+
$[8] = logo;
|
|
1356
|
+
$[9] = t3;
|
|
1357
|
+
} else {
|
|
1358
|
+
t3 = $[9];
|
|
1359
|
+
}
|
|
1360
|
+
let t4;
|
|
1361
|
+
if ($[10] !== appName) {
|
|
1362
|
+
t4 = /* @__PURE__ */ jsxRuntimeExports.jsx(designsystemetReact.Heading, { children: appName });
|
|
1363
|
+
$[10] = appName;
|
|
1364
|
+
$[11] = t4;
|
|
1365
|
+
} else {
|
|
1366
|
+
t4 = $[11];
|
|
1367
|
+
}
|
|
1368
|
+
let t5;
|
|
1369
|
+
if ($[12] !== rest || $[13] !== t1 || $[14] !== t3 || $[15] !== t4) {
|
|
1370
|
+
t5 = /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: t1, ...rest, children: [
|
|
1371
|
+
t3,
|
|
1372
|
+
t4
|
|
1373
|
+
] });
|
|
1374
|
+
$[12] = rest;
|
|
1375
|
+
$[13] = t1;
|
|
1376
|
+
$[14] = t3;
|
|
1377
|
+
$[15] = t4;
|
|
1378
|
+
$[16] = t5;
|
|
1379
|
+
} else {
|
|
1380
|
+
t5 = $[16];
|
|
1381
|
+
}
|
|
1382
|
+
return t5;
|
|
1383
|
+
}
|
|
1355
1384
|
function HeaderTitle({
|
|
1356
1385
|
className,
|
|
1357
1386
|
logo = /* @__PURE__ */ jsxRuntimeExports.jsx(HeaderDefaultLogo, {}),
|
|
@@ -1364,7 +1393,7 @@ function HeaderTitle({
|
|
|
1364
1393
|
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
1394
|
/* @__PURE__ */ jsxRuntimeExports.jsx(HeaderTitleLogo, { className: clsx("at-header__title-left"), logo, appName }),
|
|
1366
1395
|
/* @__PURE__ */ jsxRuntimeExports.jsx(HeaderTitleLinks, { className: clsx("at-header__title-center"), links }),
|
|
1367
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(HeaderTitleDropdown, { className: clsx("at-header__title-right"), userName, controls })
|
|
1396
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(HeaderTitleDropdown, { className: clsx("at-header__title-right"), links, userName, controls })
|
|
1368
1397
|
] }) });
|
|
1369
1398
|
}
|
|
1370
1399
|
const Header = Object.assign(Header$1, {
|