@altinn/altinn-components 0.41.5 → 0.41.7

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.
Files changed (33) hide show
  1. package/dist/assets/MenuItemBase.css +1 -1
  2. package/dist/assets/MenuItemLabel.css +1 -1
  3. package/dist/assets/MenuOption.css +1 -1
  4. package/dist/components/Account/AccountList.js +20 -32
  5. package/dist/components/Account/AccountMenu.js +28 -27
  6. package/dist/components/Avatar/AvatarGroup.js +12 -12
  7. package/dist/components/Header/Header.js +20 -20
  8. package/dist/components/Header/HeaderLogo.js +15 -12
  9. package/dist/components/List/ListItemBase.js +35 -33
  10. package/dist/components/Menu/MenuBase.js +17 -15
  11. package/dist/components/Menu/MenuItemBase.js +38 -38
  12. package/dist/components/Menu/MenuItemLabel.js +30 -30
  13. package/dist/components/Menu/MenuOption.js +28 -28
  14. package/dist/components/Settings/SettingsItem.js +13 -15
  15. package/dist/components/Settings/SettingsItemBase.js +29 -28
  16. package/dist/components/Settings/SettingsModal.js +33 -9
  17. package/dist/hooks/useMenu.js +31 -31
  18. package/dist/types/lib/components/Account/AccountList.d.ts +1 -1
  19. package/dist/types/lib/components/Account/AccountList.stories.d.ts +1 -1
  20. package/dist/types/lib/components/Account/AccountListItem.stories.d.ts +1 -0
  21. package/dist/types/lib/components/Account/AccountMenu.d.ts +3 -2
  22. package/dist/types/lib/components/Account/AccountMenu.stories.d.ts +2 -1
  23. package/dist/types/lib/components/Header/Header.stories.d.ts +1 -0
  24. package/dist/types/lib/components/Header/HeaderLogo.d.ts +3 -1
  25. package/dist/types/lib/components/List/ListItemBase.d.ts +2 -1
  26. package/dist/types/lib/components/Menu/MenuBase.d.ts +2 -1
  27. package/dist/types/lib/components/Settings/SettingsItem.d.ts +5 -3
  28. package/dist/types/lib/components/Settings/SettingsItem.stories.d.ts +2 -0
  29. package/dist/types/lib/components/Settings/SettingsItemBase.d.ts +1 -1
  30. package/dist/types/lib/components/Settings/SettingsModal.d.ts +6 -2
  31. package/dist/types/lib/components/Settings/SettingsModal.stories.d.ts +1 -1
  32. package/dist/types/lib/components/Transmission/Transmission.stories.d.ts +1 -0
  33. package/package.json +1 -1
@@ -1 +1 @@
1
- ._item_zzw8j_1{font:inherit;color:inherit;padding:0;border:0;text-align:inherit;text-decoration:none;line-height:normal;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-user-select:none;user-select:none;cursor:pointer;position:relative;width:100%;display:flex;align-items:center;column-gap:.25rem;margin:.5rem 0;border-radius:2px}._item_zzw8j_1[aria-disabled=true]{opacity:.5;pointer-events:none}._item_zzw8j_1[data-size=md]{min-height:56px}._item_zzw8j_1[data-size=md]{min-height:44px}._item_zzw8j_1[data-size=sm]{min-height:40px}._content_zzw8j_45{display:flex;width:100%;align-items:center;column-gap:6px;padding:6px}._item_zzw8j_1{background-color:transparent}._item_zzw8j_1{pointer-events:none}._item_zzw8j_1[data-interactive=true]{pointer-events:all}._item_zzw8j_1:hover,._item_zzw8j_1[data-active=true]{background-color:var(--ds-color-background-tinted)}._item_zzw8j_1[data-active=true]{outline:2px solid black}._item_zzw8j_1[data-selected=true],._item_zzw8j_1:active,[data-variant=subtle] ._item_zzw8j_1:hover{background-color:var(--ds-color-surface-hover)}[data-variant=subtle] ._item_zzw8j_1:active{background-color:var(--ds-color-surface-active)}[data-variant=subtle] ._item_zzw8j_1[data-selected=true]{background-color:var(--ds-color-background-default)}._content_zzw8j_45{display:flex;width:100%;align-items:center;column-gap:.5em}._item_zzw8j_1:focus-visible{box-shadow:var(--_ds--focus, var(--dsc-focus-boxShadow));outline:var(--_ds--focus, var(--dsc-focus-outline))}._item_zzw8j_1:focus-visible *{--_ds--focus: }
1
+ ._item_cs9p2_1{font:inherit;color:inherit;padding:0;border:0;text-align:inherit;text-decoration:none;line-height:normal;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-user-select:none;user-select:none;cursor:pointer;position:relative;width:100%;display:flex;align-items:center;column-gap:.25rem;margin:.5rem 0;border-radius:2px}._item_cs9p2_1[data-size=md]{min-height:56px}._item_cs9p2_1[data-size=md]{min-height:44px}._item_cs9p2_1[data-size=sm]{min-height:40px}._content_cs9p2_40{display:flex;width:100%;align-items:center;column-gap:6px;padding:6px}._item_cs9p2_1{background-color:transparent}._item_cs9p2_1{pointer-events:none}._item_cs9p2_1[data-interactive=true]{pointer-events:all}._item_cs9p2_1:hover,._item_cs9p2_1[data-active=true]{background-color:var(--ds-color-background-tinted)}._item_cs9p2_1[data-active=true]{outline:2px solid black}._item_cs9p2_1[data-selected=true],._item_cs9p2_1:active,[data-variant=subtle] ._item_cs9p2_1:hover{background-color:var(--ds-color-surface-hover)}[data-variant=subtle] ._item_cs9p2_1:active{background-color:var(--ds-color-surface-active)}[data-variant=subtle] ._item_cs9p2_1[data-selected=true]{background-color:var(--ds-color-background-default)}._content_cs9p2_40{display:flex;width:100%;align-items:center;column-gap:.5em}._item_cs9p2_1[aria-disabled=true]{opacity:.5;pointer-events:none;outline:none;box-shadow:none;background-color:transparent}._item_cs9p2_1:not([aria-disabled=true]):focus-visible{box-shadow:var(--_ds--focus, var(--dsc-focus-boxShadow));outline:var(--_ds--focus, var(--dsc-focus-outline))}._item_cs9p2_1:not([aria-disabled=true]):focus-visible *{--_ds--focus: }
@@ -1 +1 @@
1
- ._label_1gf5h_1{flex-grow:1;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;padding:0 .125rem}._label_1gf5h_1[data-size=lg]{font-size:1.125rem}._label_1gf5h_1[data-size=md],._label_1gf5h_1[data-size=sm]{font-size:1rem}._title_1gf5h_22{display:inline-flex;align-items:center;column-gap:.5em}._label_1gf5h_1 mark{text-decoration:underline;background-color:transparent;color:inherit}
1
+ ._label_1el1b_1{flex-grow:1;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;padding:0 .125rem}._label_1el1b_1[data-size=lg]{font-size:1.125rem}._label_1el1b_1[data-size=md],._label_1el1b_1[data-size=sm]{font-size:1rem}._title_1el1b_22{display:inline;vertical-align:center}._label_1el1b_1 mark{text-decoration:underline;background-color:transparent;color:inherit}
@@ -1 +1 @@
1
- ._label_sfsij_1{flex-grow:1;display:flex;flex-direction:row;align-items:center;justify-content:center;padding:0 .125rem;font-size:1rem;column-gap:.5em;pointer-events:none}._title_sfsij_13{color:var(--ds-color-text-default);display:inline-flex;align-items:center;column-gap:.5em}._count_sfsij_20{vertical-align:super;font-size:smaller}._radio_sfsij_25,._checkbox_sfsij_26{flex-shrink:0;flex-grow:0;position:relative;width:1.25em;height:1.25em;display:flex;align-items:center;justify-content:center;color:transparent}._radio_sfsij_25{border:1px solid;border-color:var(--ds-color-border-subtle);outline:var(--ds-color-border-subtle) solid 1px;border-radius:50%}._checkbox_sfsij_26{border:2px solid;border-color:var(--ds-color-border-subtle);border-radius:2px}._radio_sfsij_25[data-checked=true],._checkbox_sfsij_26[data-checked=true]{background-color:var(--ds-color-base-default);border:none;outline-color:var(--ds-color-base-default);color:var(--ds-color-base-contrast-default)}._icon_sfsij_59{font-size:1.25em}@supports (-webkit-hyphens: none){._icon_sfsij_59{font-size:unset;width:1.25em;height:1.25em}._icon_sfsij_59 svg,._icon_sfsij_59 img{width:100%;height:100%}}
1
+ ._label_e5maf_1{flex-grow:1;display:flex;flex-direction:row;align-items:center;justify-content:center;padding:0 .125rem;font-size:1rem;column-gap:.5em;pointer-events:none}._title_e5maf_13{color:var(--ds-color-text-default);display:inline;vertical-align:text-top}._count_e5maf_19{display:inline;vertical-align:super;font-size:smaller}._radio_e5maf_25,._checkbox_e5maf_26{flex-shrink:0;flex-grow:0;position:relative;width:1.25em;height:1.25em;display:flex;align-items:center;justify-content:center;color:transparent}._radio_e5maf_25{border:1px solid;border-color:var(--ds-color-border-subtle);outline:var(--ds-color-border-subtle) solid 1px;border-radius:50%}._checkbox_e5maf_26{border:2px solid;border-color:var(--ds-color-border-subtle);border-radius:2px}._radio_e5maf_25[data-checked=true],._checkbox_e5maf_26[data-checked=true]{background-color:var(--ds-color-base-default);border:none;outline-color:var(--ds-color-base-default);color:var(--ds-color-base-contrast-default)}._icon_e5maf_59{font-size:1.25em}@supports (-webkit-hyphens: none){._icon_e5maf_59{font-size:unset;width:1.25em;height:1.25em}._icon_e5maf_59 svg,._icon_e5maf_59 img{width:100%;height:100%}}
@@ -1,44 +1,32 @@
1
- import { jsxs as o, jsx as r } from "react/jsx-runtime";
2
- import { Fragment as y, createElement as k } from "react";
1
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
2
+ import { Fragment as f, createElement as d } from "react";
3
3
  import "../../index-L8X2o7IH.js";
4
- import { AccountListItem as u } from "./AccountListItem.js";
5
- import { Typography as x } from "../Typography/Typography.js";
6
- import { Heading as m } from "../Typography/Heading.js";
7
- import { useMenu as I } from "../../hooks/useMenu.js";
4
+ import { AccountListItem as h } from "./AccountListItem.js";
5
+ import { Heading as y } from "../Typography/Heading.js";
6
+ import { useMenu as x } from "../../hooks/useMenu.js";
8
7
  import "../RootProvider/RootProvider.js";
9
8
  import { List as L } from "../List/List.js";
10
9
  import "../Snackbar/useSnackbar.js";
11
- import { Section as c } from "../Page/Section.js";
12
- const M = ({
13
- items: i,
14
- groups: p = {},
15
- sortGroupBy: s,
16
- emptyTitle: f = "Ingen treff",
17
- emptyDescription: l = "Søket ga ingen treff"
18
- }) => {
19
- if (!i || i.length === 0)
20
- return /* @__PURE__ */ o(c, { children: [
21
- /* @__PURE__ */ r(m, { size: "lg", children: f }),
22
- /* @__PURE__ */ r(x, { children: l })
23
- ] });
24
- const { menu: n } = I({
25
- items: i,
26
- groups: p,
10
+ import { Section as j } from "../Page/Section.js";
11
+ const H = ({ items: o, groups: m = {}, sortGroupBy: n }) => {
12
+ const { menu: e } = x({
13
+ items: o,
14
+ groups: m,
27
15
  groupByKey: "groupId",
28
16
  keyboardEvents: !1,
29
- sortGroupBy: s
17
+ sortGroupBy: n
30
18
  });
31
- return /* @__PURE__ */ r(c, { spacing: 6, children: n == null ? void 0 : n.map((t, a) => {
32
- const e = t.props || {};
33
- return /* @__PURE__ */ o(y, { children: [
34
- (e == null ? void 0 : e.title) && /* @__PURE__ */ r(m, { size: "lg", children: e.title }),
35
- /* @__PURE__ */ r(L, { children: t == null ? void 0 : t.items.map((d, h) => {
36
- const g = d.props || {};
37
- return /* @__PURE__ */ k(u, { ...g, key: h });
19
+ return /* @__PURE__ */ i(j, { spacing: 6, children: e == null ? void 0 : e.map((t, s) => {
20
+ const r = t.props || {};
21
+ return /* @__PURE__ */ a(f, { children: [
22
+ (r == null ? void 0 : r.title) && /* @__PURE__ */ i(y, { size: "lg", children: r.title }),
23
+ /* @__PURE__ */ i(L, { children: t == null ? void 0 : t.items.map((c, p) => {
24
+ const l = c.props || {};
25
+ return /* @__PURE__ */ d(h, { ...l, key: p });
38
26
  }) })
39
- ] }, a);
27
+ ] }, s);
40
28
  }) });
41
29
  };
42
30
  export {
43
- M as AccountList
31
+ H as AccountList
44
32
  };
@@ -1,61 +1,62 @@
1
1
  "use client";
2
- import { jsx as c } from "react/jsx-runtime";
3
- import { useState as M } from "react";
2
+ import { jsx as M } from "react/jsx-runtime";
3
+ import { useState as v } from "react";
4
4
  import "../../index-L8X2o7IH.js";
5
5
  import "../RootProvider/RootProvider.js";
6
- import { Menu as v } from "../Menu/Menu.js";
6
+ import { Menu as x } from "../Menu/Menu.js";
7
7
  import "../Snackbar/useSnackbar.js";
8
- const b = (r) => `${r} hits`, G = ({
9
- items: r = [],
8
+ const R = (e) => `${e} hits`, z = ({
9
+ items: e = [],
10
10
  groups: f = {},
11
11
  search: t,
12
- onSelectAccount: e,
12
+ filterAccount: C,
13
+ onSelectAccount: r,
13
14
  currentAccount: a,
14
- isVirtualized: C,
15
- keyboardEvents: h
15
+ isVirtualized: h,
16
+ keyboardEvents: L
16
17
  }) => {
17
18
  var u;
18
- const s = r.map((o) => ({
19
+ const d = e.map((o) => ({
19
20
  ...o,
20
21
  title: (o == null ? void 0 : o.title) || o.name,
21
22
  groupId: o.groupId || "search",
22
23
  selected: o.selected ?? (a == null ? void 0 : a.id) === o.id,
23
- onClick: () => e == null ? void 0 : e(o.id)
24
- })), [l, d] = M(""), n = l ? s.filter(
25
- (o) => {
26
- var p, g, i;
27
- return ((p = o == null ? void 0 : o.name) == null ? void 0 : p.toLowerCase().includes(l.toLowerCase())) || ((i = (g = o == null ? void 0 : o.description) == null ? void 0 : g.toString()) == null ? void 0 : i.toLowerCase().includes(l.toLowerCase()));
24
+ onClick: () => {
25
+ !o.disabled && (r == null || r(o.id));
28
26
  }
29
- ).map((o) => ({
27
+ })), [l, s] = v(""), w = C || ((o, p) => {
28
+ var g, i, c;
29
+ return ((g = o == null ? void 0 : o.name) == null ? void 0 : g.toLowerCase().includes(p.toLowerCase())) || ((c = (i = o == null ? void 0 : o.description) == null ? void 0 : i.toString()) == null ? void 0 : c.toLowerCase().includes(p.toLowerCase()));
30
+ }), n = l ? d.filter((o) => w(o, l)).map((o) => ({
30
31
  ...o,
31
32
  groupId: "search",
32
33
  title: (o == null ? void 0 : o.title) || o.name,
33
34
  highlightWords: [l]
34
- })) : s, L = l ? {
35
+ })) : d, F = l ? {
35
36
  search: {
36
- title: ((u = t == null ? void 0 : t.getResultsLabel) == null ? void 0 : u.call(t, n.length)) ?? b(n.length)
37
+ title: ((u = t == null ? void 0 : t.getResultsLabel) == null ? void 0 : u.call(t, n.length)) ?? R(n.length)
37
38
  }
38
- } : f, w = {
39
+ } : f, b = {
39
40
  name: "account-search",
40
41
  value: l,
41
42
  placeholder: (t == null ? void 0 : t.placeholder) ?? "Find account",
42
- onChange: (o) => d(o.target.value),
43
- onClear: () => d("")
43
+ onChange: (o) => s(o.target.value),
44
+ onClear: () => s("")
44
45
  }, I = [
45
46
  ...n.length > 0 ? n : [{ id: "search", groupId: "search", hidden: !0 }]
46
47
  ];
47
- return /* @__PURE__ */ c(
48
- v,
48
+ return /* @__PURE__ */ M(
49
+ x,
49
50
  {
50
51
  variant: "default",
51
- search: t && w,
52
- groups: L,
52
+ search: t && b,
53
+ groups: F,
53
54
  items: I,
54
- isVirtualized: C,
55
- keyboardEvents: h
55
+ isVirtualized: h,
56
+ keyboardEvents: L
56
57
  }
57
58
  );
58
59
  };
59
60
  export {
60
- G as AccountMenu
61
+ z as AccountMenu
61
62
  };
@@ -1,34 +1,34 @@
1
1
  "use client";
2
2
  import { jsx as r } from "react/jsx-runtime";
3
- import { c as n } from "../../index-L8X2o7IH.js";
3
+ import { c as i } from "../../index-L8X2o7IH.js";
4
4
  import { useMemo as f } from "react";
5
5
  import { Avatar as h } from "./Avatar.js";
6
6
  import '../../assets/AvatarGroup.css';const A = "_group_1ts6c_1", _ = "_item_1ts6c_10", s = {
7
7
  group: A,
8
8
  item: _
9
- }, L = (o) => typeof o == "object" && o !== null && "items" in o, N = ({
10
- items: o = [],
9
+ }, L = (t) => typeof t == "object" && t !== null && "items" in t, N = ({
10
+ items: t = [],
11
11
  maxItemsCount: l = 4,
12
- defaultType: i,
13
- size: c,
12
+ defaultType: n,
13
+ size: u,
14
14
  className: m,
15
- style: u
15
+ style: p
16
16
  }) => {
17
- const t = f(() => o.slice(0, l).reverse(), [o, l]);
18
- return o.length === 0 ? /* @__PURE__ */ r("div", { className: s.avatarGroup }) : /* @__PURE__ */ r("ul", { className: n(s.group, m), "data-size": c, "data-count": t == null ? void 0 : t.length, style: u, children: t.map((e, p) => {
19
- const g = p === l - 1, d = e.customLabel || g ? o.length.toString() : void 0;
20
- return /* @__PURE__ */ r("li", { className: n(s.item), children: /* @__PURE__ */ r(
17
+ const o = f(() => t.slice(0, l).reverse(), [t, l]);
18
+ return t.length === 0 ? /* @__PURE__ */ r("div", { className: s.avatarGroup }) : /* @__PURE__ */ r("ul", { className: i(s.group, m), "data-size": u, "data-count": o == null ? void 0 : o.length, style: p, children: o.map((e, c) => {
19
+ const g = c === l - 1, d = e.customLabel || g ? t.length.toString() : void 0;
20
+ return /* @__PURE__ */ r("li", { className: i(s.item), children: /* @__PURE__ */ r(
21
21
  h,
22
22
  {
23
23
  name: e.name,
24
24
  customLabel: d,
25
25
  imageUrl: e.imageUrl,
26
26
  imageUrlAlt: e.imageUrlAlt,
27
- type: (e == null ? void 0 : e.type) || i,
27
+ type: (e == null ? void 0 : e.type) || n,
28
28
  variant: e == null ? void 0 : e.variant,
29
29
  outline: !0
30
30
  }
31
- ) }, e.name);
31
+ ) }, c);
32
32
  }) });
33
33
  };
34
34
  export {
@@ -5,14 +5,14 @@ import "react";
5
5
  import { useRootContext as H } from "../RootProvider/RootProvider.js";
6
6
  import { DropdownBase as S } from "../Dropdown/DropdownBase.js";
7
7
  import { DrawerBase as k } from "../Dropdown/DrawerBase.js";
8
- import { GlobalMenu as f } from "../GlobalMenu/GlobalMenu.js";
8
+ import { GlobalMenu as w } from "../GlobalMenu/GlobalMenu.js";
9
9
  import { GlobalMenuButton as B } from "../GlobalMenu/GlobalMenuButton.js";
10
10
  import { HeaderBase as D } from "./HeaderBase.js";
11
11
  import { HeaderLogo as I } from "./HeaderLogo.js";
12
12
  import { HeaderGroup as N } from "./HeaderGroup.js";
13
- import { HeaderSearch as w } from "./HeaderSearch.js";
13
+ import { HeaderSearch as x } from "./HeaderSearch.js";
14
14
  import { LocaleSwitcher as F } from "./LocaleSwitcher.js";
15
- import { Searchbar as x } from "../Searchbar/Searchbar.js";
15
+ import { Searchbar as _ } from "../Searchbar/Searchbar.js";
16
16
  import "../Snackbar/useSnackbar.js";
17
17
  import { useIsDesktop as G } from "../../hooks/useIsDesktop.js";
18
18
  import '../../assets/Header.css';const L = "_drawer_afyu3_1", j = "_dropdown_afyu3_6", z = "_relative_afyu3_19", t = {
@@ -21,21 +21,21 @@ import '../../assets/Header.css';const L = "_drawer_afyu3_1", j = "_dropdown_afy
21
21
  relative: z
22
22
  }, A = ({
23
23
  globalMenu: e,
24
- desktopMenu: _,
25
- mobileMenu: C,
24
+ desktopMenu: C,
25
+ mobileMenu: u,
26
26
  locale: p,
27
27
  search: s,
28
28
  currentAccount: m,
29
- logo: u = {},
30
- badge: l
29
+ logo: l = {},
30
+ badge: i
31
31
  }) => {
32
- const { currentId: r, toggleId: i, openId: v, closeAll: d } = H(), c = () => {
32
+ const { currentId: r, toggleId: c, openId: v, closeAll: d } = H(), a = () => {
33
33
  v("search");
34
- }, a = () => {
35
- i("search");
34
+ }, h = () => {
35
+ c("search");
36
36
  }, y = () => {
37
- i("menu");
38
- }, h = G();
37
+ c("menu");
38
+ }, f = G();
39
39
  return /* @__PURE__ */ n(
40
40
  D,
41
41
  {
@@ -43,15 +43,15 @@ import '../../assets/Header.css';const L = "_drawer_afyu3_1", j = "_dropdown_afy
43
43
  open: r === "search" || r === "menu" || r === "locale",
44
44
  onClose: d,
45
45
  children: [
46
- /* @__PURE__ */ o(I, { ...u, className: t.logo }),
47
- s && h && /* @__PURE__ */ o(w, { expanded: r === "search", children: /* @__PURE__ */ o(x, { ...s, expanded: r === "search", onClose: a, onFocus: c }) }),
46
+ /* @__PURE__ */ o(I, { ...l, badge: i, className: t.logo }),
47
+ s && f && /* @__PURE__ */ o(x, { expanded: r === "search", children: /* @__PURE__ */ o(_, { ...s, expanded: r === "search", onClose: h, onFocus: a }) }),
48
48
  /* @__PURE__ */ n(N, { children: [
49
49
  p && /* @__PURE__ */ o(F, { ...p }),
50
50
  /* @__PURE__ */ n("div", { className: t.relative, children: [
51
51
  /* @__PURE__ */ o(
52
52
  B,
53
53
  {
54
- badge: l,
54
+ badge: i,
55
55
  currentAccount: m,
56
56
  onClick: y,
57
57
  expanded: r === "menu",
@@ -68,10 +68,10 @@ import '../../assets/Header.css';const L = "_drawer_afyu3_1", j = "_dropdown_afy
68
68
  open: r === "menu",
69
69
  className: t.dropdown,
70
70
  children: /* @__PURE__ */ o(
71
- f,
71
+ w,
72
72
  {
73
73
  ...e,
74
- menu: _ || (e == null ? void 0 : e.menu),
74
+ menu: C || (e == null ? void 0 : e.menu),
75
75
  currentAccount: m,
76
76
  onClose: d
77
77
  }
@@ -80,12 +80,12 @@ import '../../assets/Header.css';const L = "_drawer_afyu3_1", j = "_dropdown_afy
80
80
  )
81
81
  ] })
82
82
  ] }),
83
- s && !h && /* @__PURE__ */ o(w, { expanded: r === "search", children: /* @__PURE__ */ o(x, { ...s, expanded: r === "search", onClose: a, onFocus: c }) }),
83
+ s && !f && /* @__PURE__ */ o(x, { expanded: r === "search", children: /* @__PURE__ */ o(_, { ...s, expanded: r === "search", onClose: h, onFocus: a }) }),
84
84
  e && /* @__PURE__ */ o(k, { open: r === "menu", className: t.drawer, children: /* @__PURE__ */ o(
85
- f,
85
+ w,
86
86
  {
87
87
  ...e,
88
- menu: C || (e == null ? void 0 : e.menu),
88
+ menu: u || (e == null ? void 0 : e.menu),
89
89
  currentAccount: m,
90
90
  onClose: d
91
91
  }
@@ -1,18 +1,21 @@
1
- import { jsxs as l, jsx as t } from "react/jsx-runtime";
2
- import { c as n } from "../../index-L8X2o7IH.js";
3
- import { ButtonBase as a } from "../Button/ButtonBase.js";
1
+ import { jsxs as n, jsx as o } from "react/jsx-runtime";
2
+ import { c as i } from "../../index-L8X2o7IH.js";
3
+ import { Badge as a } from "../Badge/Badge.js";
4
+ import { ButtonBase as c } from "../Button/ButtonBase.js";
4
5
  import "react";
5
6
  import "../RootProvider/RootProvider.js";
6
- import { DigdirLogomark as c } from "./DigdirLogomark.js";
7
+ import { DigdirLogomark as x } from "./DigdirLogomark.js";
7
8
  import "../Snackbar/useSnackbar.js";
8
- import '../../assets/HeaderLogo.css';const i = "_logo_y48xn_1", x = "_symbol_y48xn_8", p = "_text_y48xn_20", o = {
9
- logo: i,
10
- symbol: x,
11
- text: p
12
- }, h = ({ className: s, as: m = "a", title: r = "Altinn", href: e = "/" }) => /* @__PURE__ */ l(a, { as: m, className: n(o.logo, s), href: e, children: [
13
- /* @__PURE__ */ t(c, { className: o.symbol }),
14
- /* @__PURE__ */ t("span", { className: o.text, children: r })
9
+ import '../../assets/HeaderLogo.css';const p = "_logo_y48xn_1", _ = "_symbol_y48xn_8", y = "_text_y48xn_20", t = {
10
+ logo: p,
11
+ symbol: _,
12
+ text: y
13
+ }, u = ({ className: m, as: r = "a", title: e = "Altinn", href: l = "/", badge: s }) => /* @__PURE__ */ n(c, { as: r, className: i(t.logo, m), href: l, children: [
14
+ /* @__PURE__ */ o(x, { className: t.symbol }),
15
+ /* @__PURE__ */ o("span", { className: t.text, children: e }),
16
+ " ",
17
+ s && /* @__PURE__ */ o(a, { ...s })
15
18
  ] });
16
19
  export {
17
- h as HeaderLogo
20
+ u as HeaderLogo
18
21
  };
@@ -1,38 +1,40 @@
1
- import { jsx as p } from "react/jsx-runtime";
2
- import { c as f } from "../../index-L8X2o7IH.js";
3
- import '../../assets/ListItemBase.css';const x = "_base_1xkee_1", u = {
4
- base: x
5
- }, C = ({
6
- as: a,
7
- interactive: e = !0,
8
- size: t,
9
- color: s,
10
- variant: o = "default",
11
- shadow: n = "none",
12
- border: r = "none",
13
- hidden: d = !1,
14
- selected: c,
15
- className: i,
16
- onMouseEnter: m,
17
- id: l,
18
- children: b
19
- }) => /* @__PURE__ */ p(
20
- a || "li",
1
+ import { jsx as f } from "react/jsx-runtime";
2
+ import { c as x } from "../../index-L8X2o7IH.js";
3
+ import '../../assets/ListItemBase.css';const u = "_base_1xkee_1", _ = {
4
+ base: u
5
+ }, j = ({
6
+ ref: a,
7
+ as: e,
8
+ interactive: t = !0,
9
+ size: s,
10
+ color: o,
11
+ variant: n = "default",
12
+ shadow: r = "none",
13
+ border: d = "none",
14
+ hidden: c = !1,
15
+ selected: i,
16
+ className: m,
17
+ onMouseEnter: l,
18
+ id: b,
19
+ children: p
20
+ }) => /* @__PURE__ */ f(
21
+ e || "li",
21
22
  {
22
- className: f(u.base, i),
23
- "data-interactive": e,
24
- "data-selected": c,
25
- "data-variant": o,
26
- "data-color": s,
27
- "data-border": r,
28
- "data-shadow": n,
29
- "data-size": t,
30
- "aria-hidden": d,
31
- onMouseEnter: m,
32
- id: l,
33
- children: b
23
+ className: x(_.base, m),
24
+ "data-interactive": t,
25
+ "data-selected": i,
26
+ "data-variant": n,
27
+ "data-color": o,
28
+ "data-border": d,
29
+ "data-shadow": r,
30
+ "data-size": s,
31
+ "aria-hidden": c,
32
+ onMouseEnter: l,
33
+ id: b,
34
+ ref: a,
35
+ children: p
34
36
  }
35
37
  );
36
38
  export {
37
- C as ListItemBase
39
+ j as ListItemBase
38
40
  };
@@ -1,18 +1,18 @@
1
1
  import { jsx as c } from "react/jsx-runtime";
2
2
  import { c as r } from "../../index-L8X2o7IH.js";
3
- import '../../assets/MenuBase.css';const l = "_menu_twp4i_1", _ = "_list_twp4i_12", d = "_item_twp4i_18", p = {
4
- menu: l,
5
- list: _,
6
- item: d
7
- }, M = ({ as: t = "nav", color: n, variant: e, className: o, children: s, ref: a }) => /* @__PURE__ */ c(t, { className: r(p.menu, o), "data-color": n, "data-variant": e, ref: a, children: s }), N = ({
3
+ import '../../assets/MenuBase.css';const _ = "_menu_twp4i_1", d = "_list_twp4i_12", C = "_item_twp4i_18", p = {
4
+ menu: _,
5
+ list: d,
6
+ item: C
7
+ }, N = ({ as: t = "nav", color: n, variant: e, className: o, children: s, ref: a }) => /* @__PURE__ */ c(t, { className: r(p.menu, o), "data-color": n, "data-variant": e, ref: a, children: s }), f = ({
8
8
  as: t = "ul",
9
9
  role: n = "group",
10
10
  className: e,
11
11
  children: o,
12
12
  ref: s,
13
13
  onMouseEnter: a,
14
- onMouseLeave: m,
15
- onBlurCapture: i
14
+ onMouseLeave: i,
15
+ onBlurCapture: m
16
16
  }) => /* @__PURE__ */ c(
17
17
  t,
18
18
  {
@@ -20,19 +20,20 @@ import '../../assets/MenuBase.css';const l = "_menu_twp4i_1", _ = "_list_twp4i_1
20
20
  role: n,
21
21
  ref: s,
22
22
  onMouseEnter: a,
23
- onMouseLeave: m,
24
- onBlurCapture: i,
23
+ onMouseLeave: i,
24
+ onBlurCapture: m,
25
25
  children: o
26
26
  }
27
- ), f = ({
27
+ ), h = ({
28
28
  as: t = "li",
29
29
  role: n = "presentation",
30
30
  className: e,
31
31
  children: o,
32
32
  style: s,
33
33
  dataIndex: a,
34
+ disabled: i,
34
35
  onMouseEnter: m,
35
- onMouseLeave: i,
36
+ onMouseLeave: l,
36
37
  "aria-checked": u
37
38
  }) => /* @__PURE__ */ c(
38
39
  t,
@@ -42,13 +43,14 @@ import '../../assets/MenuBase.css';const l = "_menu_twp4i_1", _ = "_list_twp4i_1
42
43
  style: s,
43
44
  "data-index": a,
44
45
  onMouseEnter: m,
45
- onMouseLeave: i,
46
+ onMouseLeave: l,
47
+ "aria-disabled": i,
46
48
  "aria-checked": u,
47
49
  children: o
48
50
  }
49
51
  );
50
52
  export {
51
- M as MenuBase,
52
- N as MenuList,
53
- f as MenuListItem
53
+ N as MenuBase,
54
+ f as MenuList,
55
+ h as MenuListItem
54
56
  };
@@ -1,55 +1,55 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import { c as N } from "../../index-L8X2o7IH.js";
3
- import { useRef as B } from "react";
4
- import '../../assets/MenuItemBase.css';const E = "_item_zzw8j_1", M = "_content_zzw8j_45", s = {
5
- item: E,
6
- content: M
2
+ import { c as E } from "../../index-L8X2o7IH.js";
3
+ import { useRef as M } from "react";
4
+ import '../../assets/MenuItemBase.css';const R = "_item_cs9p2_1", b = "_content_cs9p2_40", c = {
5
+ item: R,
6
+ content: b
7
7
  }, A = ({
8
- interactive: c = !0,
8
+ interactive: s = !0,
9
9
  ariaLabel: m,
10
- role: d,
10
+ role: o,
11
11
  as: i,
12
- color: o,
13
- variant: f,
14
- size: l,
15
- className: p,
12
+ color: d,
13
+ variant: p,
14
+ size: f,
15
+ className: u,
16
16
  href: _,
17
17
  onClick: t,
18
- onKeyPress: a,
19
- tabIndex: u = 0,
20
- hidden: z,
21
- selected: x,
22
- disabled: e = !1,
23
- children: j,
24
- active: v,
25
- onMouseEnter: b,
26
- dataTestId: h
18
+ onKeyPress: e,
19
+ tabIndex: l = 0,
20
+ hidden: x,
21
+ selected: v,
22
+ disabled: a = !1,
23
+ children: h,
24
+ active: I,
25
+ onMouseEnter: N,
26
+ dataTestId: j
27
27
  }) => {
28
- const w = i || "a", I = B(null);
28
+ const z = i || "a", B = M(null);
29
29
  return /* @__PURE__ */ r(
30
- w,
30
+ z,
31
31
  {
32
- tabIndex: e ? "-1" : u ?? 0,
33
- className: N(s.item, p),
34
- role: d,
32
+ tabIndex: a ? "-1" : l ?? 0,
33
+ className: E(c.item, u),
34
+ role: o,
35
35
  "aria-label": m,
36
- "data-interactive": c,
37
- "data-active": v,
38
- "data-size": l,
39
- "data-color": o,
40
- "data-variant": f,
41
- "aria-hidden": z,
42
- "aria-disabled": e,
43
- "data-selected": x,
36
+ "data-interactive": !a && s,
37
+ "data-active": I,
38
+ "data-size": f,
39
+ "data-color": d,
40
+ "data-variant": p,
41
+ "aria-hidden": x,
42
+ "aria-disabled": a,
43
+ "data-selected": v,
44
44
  href: _,
45
45
  onKeyPress: (n) => {
46
- n.key === "Enter" && (t == null || t()), a == null || a(n);
46
+ a || (n.key === "Enter" && (t == null || t()), e == null || e(n));
47
47
  },
48
48
  onClick: t,
49
- onMouseEnter: b,
50
- "data-testid": h,
51
- ref: I,
52
- children: /* @__PURE__ */ r("span", { className: s.content, children: j })
49
+ onMouseEnter: N,
50
+ "data-testid": j,
51
+ ref: B,
52
+ children: /* @__PURE__ */ r("span", { className: c.content, children: h })
53
53
  }
54
54
  );
55
55
  };