@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.js CHANGED
@@ -1,10 +1,9 @@
1
1
  "use client";
2
- import require$$0, { createContext, use } from "react";
3
- import { CloudUpIcon, FileTextIcon, TrashIcon } from "@navikt/aksel-icons";
2
+ import require$$0, { createContext, use, useState, useId } from "react";
3
+ import { CloudUpIcon, FileTextIcon, TrashIcon, ChevronUpIcon, ChevronDownIcon, XMarkIcon, MenuHamburgerIcon } from "@navikt/aksel-icons";
4
4
  import { useDropzone } from "react-dropzone";
5
- import { Spinner, Button, ValidationMessage, Table, Link, Avatar, Search } from "@digdir/designsystemet-react";
6
- import { Alert, Avatar as Avatar2, 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, Dropdown, 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, Input, Label, Link as Link2, List, ListItem, ListOrdered, ListUnordered, Pagination, PaginationButton, PaginationItem, PaginationList, Paragraph, Popover, PopoverTrigger, PopoverTriggerContext, Radio, RovingFocusItem, RovingFocusRoot, Search as Search2, 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";
5
+ import { Spinner, Button, ValidationMessage, Table, Link, Heading, Dropdown } 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, 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";
8
7
  var jsxRuntime = { exports: {} };
9
8
  var reactJsxRuntime_production = {};
10
9
  var hasRequiredReactJsxRuntime_production;
@@ -957,6 +956,419 @@ function Header$1(t0) {
957
956
  }
958
957
  return t2;
959
958
  }
959
+ function HeaderTitleLogo(t0) {
960
+ const $ = compilerRuntimeExports.c(17);
961
+ let appName;
962
+ let className;
963
+ let logo;
964
+ let rest;
965
+ if ($[0] !== t0) {
966
+ ({
967
+ className,
968
+ logo,
969
+ appName,
970
+ ...rest
971
+ } = t0);
972
+ $[0] = t0;
973
+ $[1] = appName;
974
+ $[2] = className;
975
+ $[3] = logo;
976
+ $[4] = rest;
977
+ } else {
978
+ appName = $[1];
979
+ className = $[2];
980
+ logo = $[3];
981
+ rest = $[4];
982
+ }
983
+ let t1;
984
+ if ($[5] !== className) {
985
+ t1 = clsx(className);
986
+ $[5] = className;
987
+ $[6] = t1;
988
+ } else {
989
+ t1 = $[6];
990
+ }
991
+ let t2;
992
+ if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
993
+ t2 = clsx("at-header__title-logo");
994
+ $[7] = t2;
995
+ } else {
996
+ t2 = $[7];
997
+ }
998
+ let t3;
999
+ if ($[8] !== logo) {
1000
+ t3 = /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: t2, children: logo });
1001
+ $[8] = logo;
1002
+ $[9] = t3;
1003
+ } else {
1004
+ t3 = $[9];
1005
+ }
1006
+ let t4;
1007
+ if ($[10] !== appName) {
1008
+ t4 = /* @__PURE__ */ jsxRuntimeExports.jsx(Heading, { children: appName });
1009
+ $[10] = appName;
1010
+ $[11] = t4;
1011
+ } else {
1012
+ t4 = $[11];
1013
+ }
1014
+ let t5;
1015
+ if ($[12] !== rest || $[13] !== t1 || $[14] !== t3 || $[15] !== t4) {
1016
+ t5 = /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: t1, ...rest, children: [
1017
+ t3,
1018
+ t4
1019
+ ] });
1020
+ $[12] = rest;
1021
+ $[13] = t1;
1022
+ $[14] = t3;
1023
+ $[15] = t4;
1024
+ $[16] = t5;
1025
+ } else {
1026
+ t5 = $[16];
1027
+ }
1028
+ return t5;
1029
+ }
1030
+ function HeaderTitleLinks(t0) {
1031
+ const $ = compilerRuntimeExports.c(12);
1032
+ let className;
1033
+ let links;
1034
+ let rest;
1035
+ if ($[0] !== t0) {
1036
+ ({
1037
+ className,
1038
+ links,
1039
+ ...rest
1040
+ } = t0);
1041
+ $[0] = t0;
1042
+ $[1] = className;
1043
+ $[2] = links;
1044
+ $[3] = rest;
1045
+ } else {
1046
+ className = $[1];
1047
+ links = $[2];
1048
+ rest = $[3];
1049
+ }
1050
+ let t1;
1051
+ if ($[4] !== className) {
1052
+ t1 = clsx(className);
1053
+ $[4] = className;
1054
+ $[5] = t1;
1055
+ } else {
1056
+ t1 = $[5];
1057
+ }
1058
+ let t2;
1059
+ if ($[6] !== links) {
1060
+ t2 = links?.map(_temp);
1061
+ $[6] = links;
1062
+ $[7] = t2;
1063
+ } else {
1064
+ t2 = $[7];
1065
+ }
1066
+ let t3;
1067
+ if ($[8] !== rest || $[9] !== t1 || $[10] !== t2) {
1068
+ t3 = /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: t1, ...rest, children: t2 });
1069
+ $[8] = rest;
1070
+ $[9] = t1;
1071
+ $[10] = t2;
1072
+ $[11] = t3;
1073
+ } else {
1074
+ t3 = $[11];
1075
+ }
1076
+ return t3;
1077
+ }
1078
+ function _temp(link) {
1079
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Link, { href: link.href, className: clsx("at-header__title-link"), children: link.label }, link.href);
1080
+ }
1081
+ function HeaderTitleDropdown(t0) {
1082
+ const $ = compilerRuntimeExports.c(37);
1083
+ let className;
1084
+ let controls;
1085
+ let rest;
1086
+ let userName;
1087
+ if ($[0] !== t0) {
1088
+ ({
1089
+ className,
1090
+ controls,
1091
+ userName,
1092
+ ...rest
1093
+ } = t0);
1094
+ $[0] = t0;
1095
+ $[1] = className;
1096
+ $[2] = controls;
1097
+ $[3] = rest;
1098
+ $[4] = userName;
1099
+ } else {
1100
+ className = $[1];
1101
+ controls = $[2];
1102
+ rest = $[3];
1103
+ userName = $[4];
1104
+ }
1105
+ const [open, setOpen] = useState(false);
1106
+ const id = useId();
1107
+ let t1;
1108
+ if ($[5] !== className) {
1109
+ t1 = clsx(className);
1110
+ $[5] = className;
1111
+ $[6] = t1;
1112
+ } else {
1113
+ t1 = $[6];
1114
+ }
1115
+ let t2;
1116
+ if ($[7] !== open) {
1117
+ t2 = () => setOpen(!open);
1118
+ $[7] = open;
1119
+ $[8] = t2;
1120
+ } else {
1121
+ t2 = $[8];
1122
+ }
1123
+ let t3;
1124
+ if ($[9] !== open) {
1125
+ t3 = open ? /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronUpIcon, { "aria-hidden": true }) : /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronDownIcon, { "aria-hidden": true });
1126
+ $[9] = open;
1127
+ $[10] = t3;
1128
+ } else {
1129
+ t3 = $[10];
1130
+ }
1131
+ let t4;
1132
+ if ($[11] !== t3 || $[12] !== userName) {
1133
+ t4 = /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "at-header__title-dropdown-desktop", children: [
1134
+ userName,
1135
+ t3
1136
+ ] });
1137
+ $[11] = t3;
1138
+ $[12] = userName;
1139
+ $[13] = t4;
1140
+ } else {
1141
+ t4 = $[13];
1142
+ }
1143
+ let t5;
1144
+ if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
1145
+ t5 = /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "at-header__title-dropdown-text", children: "Meny" });
1146
+ $[14] = t5;
1147
+ } else {
1148
+ t5 = $[14];
1149
+ }
1150
+ let t6;
1151
+ if ($[15] !== open) {
1152
+ t6 = /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "at-header__title-dropdown-mobile", children: [
1153
+ t5,
1154
+ open ? /* @__PURE__ */ jsxRuntimeExports.jsx(XMarkIcon, { "aria-hidden": true }) : /* @__PURE__ */ jsxRuntimeExports.jsx(MenuHamburgerIcon, { "aria-hidden": true })
1155
+ ] });
1156
+ $[15] = open;
1157
+ $[16] = t6;
1158
+ } else {
1159
+ t6 = $[16];
1160
+ }
1161
+ let t7;
1162
+ if ($[17] !== t2 || $[18] !== t4 || $[19] !== t6) {
1163
+ t7 = /* @__PURE__ */ jsxRuntimeExports.jsxs(Dropdown.Trigger, { onClick: t2, variant: "tertiary", children: [
1164
+ t4,
1165
+ t6
1166
+ ] });
1167
+ $[17] = t2;
1168
+ $[18] = t4;
1169
+ $[19] = t6;
1170
+ $[20] = t7;
1171
+ } else {
1172
+ t7 = $[20];
1173
+ }
1174
+ let t8;
1175
+ if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
1176
+ t8 = () => setOpen(false);
1177
+ $[21] = t8;
1178
+ } else {
1179
+ t8 = $[21];
1180
+ }
1181
+ let t9;
1182
+ if ($[22] !== controls || $[23] !== id) {
1183
+ t9 = controls?.map((control, index) => /* @__PURE__ */ jsxRuntimeExports.jsx(Dropdown.Item, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx("at-header__title-dropdown-controls"), children: control }) }, id + "-control-" + index));
1184
+ $[22] = controls;
1185
+ $[23] = id;
1186
+ $[24] = t9;
1187
+ } else {
1188
+ t9 = $[24];
1189
+ }
1190
+ let t10;
1191
+ if ($[25] !== t9) {
1192
+ t10 = /* @__PURE__ */ jsxRuntimeExports.jsx(Dropdown.List, { children: t9 });
1193
+ $[25] = t9;
1194
+ $[26] = t10;
1195
+ } else {
1196
+ t10 = $[26];
1197
+ }
1198
+ let t11;
1199
+ if ($[27] !== open || $[28] !== t10) {
1200
+ t11 = /* @__PURE__ */ jsxRuntimeExports.jsx(Dropdown, { open, onClose: t8, children: t10 });
1201
+ $[27] = open;
1202
+ $[28] = t10;
1203
+ $[29] = t11;
1204
+ } else {
1205
+ t11 = $[29];
1206
+ }
1207
+ let t12;
1208
+ if ($[30] !== t11 || $[31] !== t7) {
1209
+ t12 = /* @__PURE__ */ jsxRuntimeExports.jsxs(Dropdown.TriggerContext, { children: [
1210
+ t7,
1211
+ t11
1212
+ ] });
1213
+ $[30] = t11;
1214
+ $[31] = t7;
1215
+ $[32] = t12;
1216
+ } else {
1217
+ t12 = $[32];
1218
+ }
1219
+ let t13;
1220
+ if ($[33] !== rest || $[34] !== t1 || $[35] !== t12) {
1221
+ t13 = /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: t1, ...rest, children: t12 });
1222
+ $[33] = rest;
1223
+ $[34] = t1;
1224
+ $[35] = t12;
1225
+ $[36] = t13;
1226
+ } else {
1227
+ t13 = $[36];
1228
+ }
1229
+ return t13;
1230
+ }
1231
+ function HeaderDefaultLogo(t0) {
1232
+ const $ = compilerRuntimeExports.c(23);
1233
+ const {
1234
+ width: t1,
1235
+ height: t2
1236
+ } = t0;
1237
+ const width = t1 === void 0 ? 48 : t1;
1238
+ const height = t2 === void 0 ? 40 : t2;
1239
+ let t10;
1240
+ let t11;
1241
+ let t12;
1242
+ let t13;
1243
+ let t14;
1244
+ let t15;
1245
+ let t16;
1246
+ let t17;
1247
+ let t18;
1248
+ let t19;
1249
+ let t20;
1250
+ let t21;
1251
+ let t22;
1252
+ let t3;
1253
+ let t4;
1254
+ let t5;
1255
+ let t6;
1256
+ let t7;
1257
+ let t8;
1258
+ let t9;
1259
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
1260
+ 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" });
1261
+ t4 = /* @__PURE__ */ jsxRuntimeExports.jsx("rect", { x: "16.7253", y: "20.4756", width: "2.08381", height: "0.108768", fill: "#085E55" });
1262
+ t5 = /* @__PURE__ */ jsxRuntimeExports.jsx("rect", { x: "34.2183", y: "6.36298", width: "2.08381", height: "0.108768", fill: "#085E55" });
1263
+ t6 = /* @__PURE__ */ jsxRuntimeExports.jsx("rect", { x: "7.67719", y: "13.5688", width: "2.82411", height: "0.108768", fill: "#085E55" });
1264
+ t7 = /* @__PURE__ */ jsxRuntimeExports.jsx("rect", { x: "6.27887", y: "12.8889", width: "2.82411", height: "0.108768", fill: "#085E55" });
1265
+ t8 = /* @__PURE__ */ jsxRuntimeExports.jsx("rect", { x: "37.3441", y: "15.7985", width: "2.82411", height: "0.108768", fill: "#085E55" });
1266
+ t9 = /* @__PURE__ */ jsxRuntimeExports.jsx("rect", { x: "36.1102", y: "16.4512", width: "2.82411", height: "0.108768", fill: "#085E55" });
1267
+ t10 = /* @__PURE__ */ jsxRuntimeExports.jsx("ellipse", { cx: "30.2138", cy: "10.6896", rx: "4.8805", ry: "4.84016", fill: "white" });
1268
+ 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" });
1269
+ t12 = /* @__PURE__ */ jsxRuntimeExports.jsx("rect", { y: "38.9753", width: "48", height: "0.29752", fill: "black" });
1270
+ 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" });
1271
+ 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" });
1272
+ 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" });
1273
+ 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" });
1274
+ 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" });
1275
+ 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" });
1276
+ 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" });
1277
+ 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" });
1278
+ t21 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M18.2147 37.8959H39.8588V38.8887H18.2147V37.8959Z", fill: "#085E55" });
1279
+ t22 = /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M26.1426 38.8138H39.8588L42.353 28.5516H28.6367L26.1426 38.8138Z", fill: "#085E55" });
1280
+ $[0] = t10;
1281
+ $[1] = t11;
1282
+ $[2] = t12;
1283
+ $[3] = t13;
1284
+ $[4] = t14;
1285
+ $[5] = t15;
1286
+ $[6] = t16;
1287
+ $[7] = t17;
1288
+ $[8] = t18;
1289
+ $[9] = t19;
1290
+ $[10] = t20;
1291
+ $[11] = t21;
1292
+ $[12] = t22;
1293
+ $[13] = t3;
1294
+ $[14] = t4;
1295
+ $[15] = t5;
1296
+ $[16] = t6;
1297
+ $[17] = t7;
1298
+ $[18] = t8;
1299
+ $[19] = t9;
1300
+ } else {
1301
+ t10 = $[0];
1302
+ t11 = $[1];
1303
+ t12 = $[2];
1304
+ t13 = $[3];
1305
+ t14 = $[4];
1306
+ t15 = $[5];
1307
+ t16 = $[6];
1308
+ t17 = $[7];
1309
+ t18 = $[8];
1310
+ t19 = $[9];
1311
+ t20 = $[10];
1312
+ t21 = $[11];
1313
+ t22 = $[12];
1314
+ t3 = $[13];
1315
+ t4 = $[14];
1316
+ t5 = $[15];
1317
+ t6 = $[16];
1318
+ t7 = $[17];
1319
+ t8 = $[18];
1320
+ t9 = $[19];
1321
+ }
1322
+ let t23;
1323
+ if ($[20] !== height || $[21] !== width) {
1324
+ t23 = /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { width, height, viewBox: "0 0 48 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
1325
+ t3,
1326
+ t4,
1327
+ t5,
1328
+ t6,
1329
+ t7,
1330
+ t8,
1331
+ t9,
1332
+ t10,
1333
+ t11,
1334
+ t12,
1335
+ t13,
1336
+ t14,
1337
+ t15,
1338
+ t16,
1339
+ t17,
1340
+ t18,
1341
+ t19,
1342
+ t20,
1343
+ t21,
1344
+ t22
1345
+ ] });
1346
+ $[20] = height;
1347
+ $[21] = width;
1348
+ $[22] = t23;
1349
+ } else {
1350
+ t23 = $[22];
1351
+ }
1352
+ return t23;
1353
+ }
1354
+ function HeaderTitle({
1355
+ className,
1356
+ logo = /* @__PURE__ */ jsxRuntimeExports.jsx(HeaderDefaultLogo, {}),
1357
+ appName,
1358
+ userName,
1359
+ links = [],
1360
+ controls = [],
1361
+ ...rest
1362
+ }) {
1363
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx("at-header__title-background", className), ...rest, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx("at-header__title"), children: [
1364
+ /* @__PURE__ */ jsxRuntimeExports.jsx(HeaderTitleLogo, { className: clsx("at-header__title-left"), logo, appName }),
1365
+ /* @__PURE__ */ jsxRuntimeExports.jsx(HeaderTitleLinks, { className: clsx("at-header__title-center"), links }),
1366
+ /* @__PURE__ */ jsxRuntimeExports.jsx(HeaderTitleDropdown, { className: clsx("at-header__title-right"), userName, controls })
1367
+ ] }) });
1368
+ }
1369
+ const Header = Object.assign(Header$1, {
1370
+ Title: HeaderTitle
1371
+ });
960
1372
  const LogoBlack = (t0) => {
961
1373
  const $ = compilerRuntimeExports.c(20);
962
1374
  const {
@@ -1226,314 +1638,6 @@ function LightDarkLogo(t0) {
1226
1638
  }
1227
1639
  return t4;
1228
1640
  }
1229
- function HeaderTitle(t0) {
1230
- const $ = compilerRuntimeExports.c(31);
1231
- let className;
1232
- let rest;
1233
- let t1;
1234
- let t2;
1235
- if ($[0] !== t0) {
1236
- ({
1237
- className,
1238
- fagsystemNavn: t1,
1239
- brukernavn: t2,
1240
- ...rest
1241
- } = t0);
1242
- $[0] = t0;
1243
- $[1] = className;
1244
- $[2] = rest;
1245
- $[3] = t1;
1246
- $[4] = t2;
1247
- } else {
1248
- className = $[1];
1249
- rest = $[2];
1250
- t1 = $[3];
1251
- t2 = $[4];
1252
- }
1253
- const fagsystemNavn = t1 === void 0 ? "Fagsystem" : t1;
1254
- const brukernavn = t2 === void 0 ? "Bruker Brukersen" : t2;
1255
- const getInitials = _temp;
1256
- let t3;
1257
- if ($[5] !== className) {
1258
- t3 = clsx("at-header__title-background", className);
1259
- $[5] = className;
1260
- $[6] = t3;
1261
- } else {
1262
- t3 = $[6];
1263
- }
1264
- let t4;
1265
- let t5;
1266
- let t6;
1267
- if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
1268
- t4 = clsx("at-header__title");
1269
- t5 = /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx("at-header__title-left"), children: /* @__PURE__ */ jsxRuntimeExports.jsx(LightDarkLogo, { width: "150px" }) });
1270
- t6 = clsx("at-header__title-center");
1271
- $[7] = t4;
1272
- $[8] = t5;
1273
- $[9] = t6;
1274
- } else {
1275
- t4 = $[7];
1276
- t5 = $[8];
1277
- t6 = $[9];
1278
- }
1279
- let t7;
1280
- if ($[10] !== fagsystemNavn) {
1281
- t7 = /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: t6, children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { children: fagsystemNavn }) });
1282
- $[10] = fagsystemNavn;
1283
- $[11] = t7;
1284
- } else {
1285
- t7 = $[11];
1286
- }
1287
- let t8;
1288
- if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
1289
- t8 = clsx("at-header__title-right");
1290
- $[12] = t8;
1291
- } else {
1292
- t8 = $[12];
1293
- }
1294
- let t9;
1295
- if ($[13] !== brukernavn) {
1296
- t9 = getInitials(brukernavn);
1297
- $[13] = brukernavn;
1298
- $[14] = t9;
1299
- } else {
1300
- t9 = $[14];
1301
- }
1302
- let t10;
1303
- if ($[15] !== brukernavn || $[16] !== t9) {
1304
- t10 = /* @__PURE__ */ jsxRuntimeExports.jsx(Avatar, { "aria-label": brukernavn, initials: t9, "data-size": "xs" });
1305
- $[15] = brukernavn;
1306
- $[16] = t9;
1307
- $[17] = t10;
1308
- } else {
1309
- t10 = $[17];
1310
- }
1311
- let t11;
1312
- if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
1313
- t11 = clsx("at-header__title-brukernavn");
1314
- $[18] = t11;
1315
- } else {
1316
- t11 = $[18];
1317
- }
1318
- let t12;
1319
- if ($[19] !== brukernavn) {
1320
- t12 = /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: t11, children: brukernavn });
1321
- $[19] = brukernavn;
1322
- $[20] = t12;
1323
- } else {
1324
- t12 = $[20];
1325
- }
1326
- let t13;
1327
- if ($[21] !== t10 || $[22] !== t12) {
1328
- t13 = /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: t8, children: [
1329
- t10,
1330
- t12
1331
- ] });
1332
- $[21] = t10;
1333
- $[22] = t12;
1334
- $[23] = t13;
1335
- } else {
1336
- t13 = $[23];
1337
- }
1338
- let t14;
1339
- if ($[24] !== t13 || $[25] !== t7) {
1340
- t14 = /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: t4, children: [
1341
- t5,
1342
- t7,
1343
- t13
1344
- ] });
1345
- $[24] = t13;
1346
- $[25] = t7;
1347
- $[26] = t14;
1348
- } else {
1349
- t14 = $[26];
1350
- }
1351
- let t15;
1352
- if ($[27] !== rest || $[28] !== t14 || $[29] !== t3) {
1353
- t15 = /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: t3, ...rest, children: t14 });
1354
- $[27] = rest;
1355
- $[28] = t14;
1356
- $[29] = t3;
1357
- $[30] = t15;
1358
- } else {
1359
- t15 = $[30];
1360
- }
1361
- return t15;
1362
- }
1363
- function _temp(name) {
1364
- if (!name) {
1365
- return "";
1366
- }
1367
- const names = name.split(" ");
1368
- if (names.length === 1) {
1369
- return names[0].charAt(0).toUpperCase();
1370
- }
1371
- return names[0].charAt(0).toUpperCase() + names.at(-1).charAt(0).toUpperCase();
1372
- }
1373
- function HeaderSearch(t0) {
1374
- const $ = compilerRuntimeExports.c(10);
1375
- let className;
1376
- let rest;
1377
- if ($[0] !== t0) {
1378
- ({
1379
- className,
1380
- ...rest
1381
- } = t0);
1382
- $[0] = t0;
1383
- $[1] = className;
1384
- $[2] = rest;
1385
- } else {
1386
- className = $[1];
1387
- rest = $[2];
1388
- }
1389
- let t1;
1390
- if ($[3] !== className) {
1391
- t1 = clsx("at-header__search-background", className);
1392
- $[3] = className;
1393
- $[4] = t1;
1394
- } else {
1395
- t1 = $[4];
1396
- }
1397
- let t2;
1398
- if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
1399
- t2 = clsx("at-header__search");
1400
- $[5] = t2;
1401
- } else {
1402
- t2 = $[5];
1403
- }
1404
- let t3;
1405
- if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
1406
- t3 = /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: t2, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Search, { children: [
1407
- /* @__PURE__ */ jsxRuntimeExports.jsx(Search.Input, { name: "placeholder", "aria-label": "Søk", className: "at-header__search-input" }),
1408
- /* @__PURE__ */ jsxRuntimeExports.jsx(Search.Clear, { className: "at-header__search-clear" }),
1409
- /* @__PURE__ */ jsxRuntimeExports.jsx(Search.Button, { className: "at-header__search-button" })
1410
- ] }) });
1411
- $[6] = t3;
1412
- } else {
1413
- t3 = $[6];
1414
- }
1415
- let t4;
1416
- if ($[7] !== rest || $[8] !== t1) {
1417
- t4 = /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: t1, ...rest, children: t3 });
1418
- $[7] = rest;
1419
- $[8] = t1;
1420
- $[9] = t4;
1421
- } else {
1422
- t4 = $[9];
1423
- }
1424
- return t4;
1425
- }
1426
- const HeaderLinksRoot = (t0) => {
1427
- const $ = compilerRuntimeExports.c(11);
1428
- let children;
1429
- let props;
1430
- if ($[0] !== t0) {
1431
- ({
1432
- children,
1433
- ...props
1434
- } = t0);
1435
- $[0] = t0;
1436
- $[1] = children;
1437
- $[2] = props;
1438
- } else {
1439
- children = $[1];
1440
- props = $[2];
1441
- }
1442
- let t1;
1443
- if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
1444
- t1 = clsx("at-header__links-root");
1445
- $[3] = t1;
1446
- } else {
1447
- t1 = $[3];
1448
- }
1449
- let t2;
1450
- let t3;
1451
- if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
1452
- 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" }) });
1453
- t3 = clsx("at-header__links");
1454
- $[4] = t2;
1455
- $[5] = t3;
1456
- } else {
1457
- t2 = $[4];
1458
- t3 = $[5];
1459
- }
1460
- let t4;
1461
- if ($[6] !== children) {
1462
- t4 = /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: t3, children });
1463
- $[6] = children;
1464
- $[7] = t4;
1465
- } else {
1466
- t4 = $[7];
1467
- }
1468
- let t5;
1469
- if ($[8] !== props || $[9] !== t4) {
1470
- t5 = /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: t1, ...props, children: [
1471
- t2,
1472
- t4
1473
- ] });
1474
- $[8] = props;
1475
- $[9] = t4;
1476
- $[10] = t5;
1477
- } else {
1478
- t5 = $[10];
1479
- }
1480
- return t5;
1481
- };
1482
- const HeaderLinkItem = (t0) => {
1483
- const $ = compilerRuntimeExports.c(12);
1484
- let children;
1485
- let className;
1486
- let props;
1487
- let t1;
1488
- if ($[0] !== t0) {
1489
- ({
1490
- asChild: t1,
1491
- className,
1492
- children,
1493
- ...props
1494
- } = t0);
1495
- $[0] = t0;
1496
- $[1] = children;
1497
- $[2] = className;
1498
- $[3] = props;
1499
- $[4] = t1;
1500
- } else {
1501
- children = $[1];
1502
- className = $[2];
1503
- props = $[3];
1504
- t1 = $[4];
1505
- }
1506
- const asChild = t1 === void 0 ? false : t1;
1507
- const Component = asChild ? Slot : "div";
1508
- let t2;
1509
- if ($[5] !== className) {
1510
- t2 = clsx("at-header__links-item", className);
1511
- $[5] = className;
1512
- $[6] = t2;
1513
- } else {
1514
- t2 = $[6];
1515
- }
1516
- let t3;
1517
- if ($[7] !== Component || $[8] !== children || $[9] !== props || $[10] !== t2) {
1518
- t3 = /* @__PURE__ */ jsxRuntimeExports.jsx(Component, { className: t2, ...props, children });
1519
- $[7] = Component;
1520
- $[8] = children;
1521
- $[9] = props;
1522
- $[10] = t2;
1523
- $[11] = t3;
1524
- } else {
1525
- t3 = $[11];
1526
- }
1527
- return t3;
1528
- };
1529
- const HeaderLinks = Object.assign(HeaderLinksRoot, {
1530
- Item: HeaderLinkItem
1531
- });
1532
- const Header = Object.assign(Header$1, {
1533
- Title: HeaderTitle,
1534
- Search: HeaderSearch,
1535
- Links: HeaderLinks
1536
- });
1537
1641
  const LogoGreen = (t0) => {
1538
1642
  const $ = compilerRuntimeExports.c(21);
1539
1643
  const {
@@ -1651,7 +1755,7 @@ const LogoGreen = (t0) => {
1651
1755
  };
1652
1756
  export {
1653
1757
  Alert,
1654
- Avatar2 as Avatar,
1758
+ Avatar,
1655
1759
  Badge,
1656
1760
  BadgePosition,
1657
1761
  Breadcrumbs,
@@ -1678,7 +1782,7 @@ export {
1678
1782
  DialogTrigger,
1679
1783
  DialogTriggerContext,
1680
1784
  Divider,
1681
- Dropdown,
1785
+ Dropdown2 as Dropdown,
1682
1786
  DropdownButton,
1683
1787
  DropdownHeading,
1684
1788
  DropdownItem,
@@ -1710,10 +1814,9 @@ export {
1710
1814
  FilePickerErrors,
1711
1815
  FilePickerFiles,
1712
1816
  Header,
1713
- HeaderLinks,
1714
- HeaderSearch,
1817
+ HeaderDefaultLogo,
1715
1818
  HeaderTitle,
1716
- Heading,
1819
+ Heading2 as Heading,
1717
1820
  Input,
1718
1821
  Label,
1719
1822
  LightDarkLogo,
@@ -1736,7 +1839,7 @@ export {
1736
1839
  Radio,
1737
1840
  RovingFocusItem,
1738
1841
  RovingFocusRoot,
1739
- Search2 as Search,
1842
+ Search,
1740
1843
  SearchButton,
1741
1844
  SearchClear,
1742
1845
  SearchInput,