@altinn/altinn-components 0.61.1 → 0.61.3

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 (92) hide show
  1. package/dist/assets/HeaderLogo.css +1 -1
  2. package/dist/assets/ItemLink.css +1 -1
  3. package/dist/assets/LayoutBase.css +1 -1
  4. package/dist/assets/SettingsItemBase.css +1 -1
  5. package/dist/assets/SettingsSection.css +1 -1
  6. package/dist/assets/settlingsList.css +1 -0
  7. package/dist/components/Bookmarks/BookmarkSettingsList.js +32 -38
  8. package/dist/components/Footer/FooterLogo.js +1 -1
  9. package/dist/components/GlobalHeader/HeaderLogo.js +1 -1
  10. package/dist/components/GlobalMenu/GlobalMenu.js +57 -40
  11. package/dist/components/Item/ItemLink.js +26 -26
  12. package/dist/components/Layout/Layout.js +27 -29
  13. package/dist/components/Layout/LayoutBase.js +3 -3
  14. package/dist/components/Logo/index.js +4 -0
  15. package/dist/components/Settings/SettingsItem.js +59 -36
  16. package/dist/components/Settings/SettingsItemBase.js +72 -61
  17. package/dist/components/Settings/SettingsList.js +28 -25
  18. package/dist/components/Settings/SettingsSection.js +5 -5
  19. package/dist/components/index.js +355 -377
  20. package/dist/index.js +365 -387
  21. package/dist/settlingsList.module-So3_AYgj.js +8 -0
  22. package/dist/types/lib/components/Account/Account.stories.d.ts +0 -3
  23. package/dist/types/lib/components/Account/AccountList.stories.d.ts +14 -6
  24. package/dist/types/lib/components/ActivityLog/ActivityLog.stories.d.ts +4 -1
  25. package/dist/types/lib/components/Dialog/DialogLayout.d.ts +7 -2
  26. package/dist/types/lib/components/GlobalHeader/GlobalHeader.stories.d.ts +5 -4
  27. package/dist/types/lib/components/GlobalMenu/GlobalMenu.stories.d.ts +9 -12
  28. package/dist/types/lib/components/Item/ItemBase.d.ts +4 -4
  29. package/dist/types/lib/components/Layout/Layout.d.ts +2 -4
  30. package/dist/types/lib/components/Layout/Layout.stories.d.ts +2 -8
  31. package/dist/types/lib/components/Layout/LayoutBase.d.ts +1 -1
  32. package/dist/types/lib/components/Logo/index.d.ts +1 -0
  33. package/dist/types/lib/components/Page/PageNav.d.ts +5 -2
  34. package/dist/types/lib/components/Settings/SettingsItem.d.ts +2 -2
  35. package/dist/types/lib/components/Settings/SettingsItem.stories.d.ts +65 -0
  36. package/dist/types/lib/components/Settings/SettingsItemBase.d.ts +5 -1
  37. package/dist/types/lib/components/Settings/SettingsList.d.ts +2 -1
  38. package/dist/types/lib/components/Settings/VerifySettingsModal.stories.d.ts +2 -0
  39. package/dist/types/lib/components/index.d.ts +2 -2
  40. package/dist/types/lib/stories/Inbox.stories.d.ts +0 -4
  41. package/dist/types/lib/stories/Profile.stories.d.ts +1 -1
  42. package/package.json +1 -1
  43. package/dist/Globe-BcPkcH4E.js +0 -24
  44. package/dist/PadlockLocked-XL1IB5Ae.js +0 -24
  45. package/dist/assets/EndUserLabel.css +0 -1
  46. package/dist/assets/GlobalMenuButton2.css +0 -1
  47. package/dist/assets/Header.css +0 -1
  48. package/dist/assets/HeaderBase.css +0 -1
  49. package/dist/assets/HeaderButton.css +0 -1
  50. package/dist/assets/HeaderGroup.css +0 -1
  51. package/dist/assets/HeaderLogo2.css +0 -1
  52. package/dist/assets/HeaderSearch.css +0 -1
  53. package/dist/assets/LocaleButton.css +0 -1
  54. package/dist/components/GlobalMenu_old/BackButton.js +0 -13
  55. package/dist/components/GlobalMenu_old/CurrentAccount.js +0 -24
  56. package/dist/components/GlobalMenu_old/EndUserLabel.js +0 -32
  57. package/dist/components/GlobalMenu_old/GlobalMenu.js +0 -81
  58. package/dist/components/GlobalMenu_old/GlobalMenuBase.js +0 -10
  59. package/dist/components/GlobalMenu_old/GlobalMenuButton.js +0 -58
  60. package/dist/components/GlobalMenu_old/LogoutButton.js +0 -14
  61. package/dist/components/GlobalMenu_old/index.js +0 -14
  62. package/dist/components/Header/Header.js +0 -101
  63. package/dist/components/Header/HeaderBase.js +0 -19
  64. package/dist/components/Header/HeaderButton.js +0 -51
  65. package/dist/components/Header/HeaderGroup.js +0 -8
  66. package/dist/components/Header/HeaderLogo.js +0 -17
  67. package/dist/components/Header/HeaderSearch.js +0 -12
  68. package/dist/components/Header/LocaleButton.js +0 -29
  69. package/dist/components/Header/LocaleSwitcher.js +0 -44
  70. package/dist/components/Header/index.js +0 -18
  71. package/dist/types/lib/components/GlobalMenu_old/BackButton.d.ts +0 -7
  72. package/dist/types/lib/components/GlobalMenu_old/CurrentAccount.d.ts +0 -16
  73. package/dist/types/lib/components/GlobalMenu_old/EndUserLabel.d.ts +0 -5
  74. package/dist/types/lib/components/GlobalMenu_old/GlobalMenu.d.ts +0 -18
  75. package/dist/types/lib/components/GlobalMenu_old/GlobalMenuBase.d.ts +0 -15
  76. package/dist/types/lib/components/GlobalMenu_old/GlobalMenuButton.d.ts +0 -13
  77. package/dist/types/lib/components/GlobalMenu_old/LogoutButton.d.ts +0 -7
  78. package/dist/types/lib/components/GlobalMenu_old/index.d.ts +0 -6
  79. package/dist/types/lib/components/Header/Header.d.ts +0 -18
  80. package/dist/types/lib/components/Header/Header.stories.d.ts +0 -29
  81. package/dist/types/lib/components/Header/HeaderBase.d.ts +0 -9
  82. package/dist/types/lib/components/Header/HeaderButton.d.ts +0 -11
  83. package/dist/types/lib/components/Header/HeaderButton.stories.d.ts +0 -17
  84. package/dist/types/lib/components/Header/HeaderGroup.d.ts +0 -7
  85. package/dist/types/lib/components/Header/HeaderLogo.d.ts +0 -11
  86. package/dist/types/lib/components/Header/HeaderSearch.d.ts +0 -7
  87. package/dist/types/lib/components/Header/LocaleButton.d.ts +0 -8
  88. package/dist/types/lib/components/Header/LocaleSwitcher.d.ts +0 -7
  89. package/dist/types/lib/components/Header/index.d.ts +0 -8
  90. package/dist/types/lib/stories/Beta/Beta.stories.d.ts +0 -15
  91. /package/dist/components/{Header → Logo}/DigdirLogomark.js +0 -0
  92. /package/dist/types/lib/components/{Header → Logo}/DigdirLogomark.d.ts +0 -0
@@ -1 +1 @@
1
- ._logo_mt7vd_1{display:flex;align-items:center;color:currentColor;text-decoration:none}._symbol_mt7vd_8{width:2rem;height:2rem;margin:0}@media(min-width:1024px){._symbol_mt7vd_8{margin:6px}}._riksSymbol_mt7vd_20{width:2.5rem;height:2.5rem;margin:0}._text_mt7vd_26{font-size:1.5rem;font-weight:500;padding:4px}
1
+ ._logo_1yxnd_1{display:flex;align-items:center;color:currentColor;text-decoration:none;height:3.25rem;min-width:3.25rem;padding:0 .5rem;-webkit-user-select:none;user-select:none}._logo_1yxnd_1:hover{background-color:transparent}._logomark_1yxnd_16{color:#0062b8;width:2rem;height:2rem;margin:0!important}._text_1yxnd_23{font-size:2rem;font-weight:400}
@@ -1 +1 @@
1
- ._link_eet0n_1{position:static;padding:0;border:0;margin:0;background-color:transparent;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;text-align:left;appearance:none;-webkit-user-select:none;user-select:none}._link_eet0n_1[aria-disabled=true]{pointer-events:none}._link_eet0n_1[data-interactive=true]{cursor:pointer}._link_eet0n_1:focus-visible{outline:none}._linkFocus_eet0n_26{position:absolute;inset:0}._link_eet0n_1:focus-visible ._linkFocus_eet0n_26{box-shadow:var(--_ds--focus, var(--dsc-focus-boxShadow));outline:var(--_ds--focus, var(--dsc-focus-outline));outline-offset:var(--_ds--focus, var(--ds-border-width-focus))}._link_eet0n_1:focus-visible ._linkFocus_eet0n_26 *{--_ds--focus: }
1
+ ._link_1pvv7_1{position:static;padding:0;border:0;margin:0;background-color:transparent;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;text-align:left;appearance:none;-webkit-user-select:none;user-select:none}._link_1pvv7_1[aria-disabled=true]{pointer-events:none}._link_1pvv7_1[data-interactive=true]{cursor:pointer}._link_1pvv7_1[data-disabled=true]{opacity:.5}._link_1pvv7_1:focus-visible{outline:none}._linkFocus_1pvv7_30{position:absolute;inset:0}._link_1pvv7_1:focus-visible ._linkFocus_1pvv7_30{box-shadow:var(--_ds--focus, var(--dsc-focus-boxShadow));outline:var(--_ds--focus, var(--dsc-focus-outline));outline-offset:var(--_ds--focus, var(--ds-border-width-focus))}._link_1pvv7_1:focus-visible ._linkFocus_1pvv7_30 *{--_ds--focus: }
@@ -1 +1 @@
1
- ._base_1m3p1_1{position:relative;display:flex;flex-direction:column;min-height:100vh;background-color:var(--altinn-layout-background)}._base_1m3p1_1[data-theme=default]{--altinn-layout-background: var(--ds-color-background-default)}._base_1m3p1_1[data-theme=subtle]{--altinn-layout-background: var(--ds-color-background-tinted)}._base_1m3p1_1[data-theme=neutral]{--altinn-layout-background: var(--ds-color-neutral-background-tinted)}._base_1m3p1_1[data-theme=inbox]{--altinn-layout-background: var(--ds-color-background-tinted)}._base_1m3p1_1[data-theme=inbox][data-color=person]{--altinn-layout-background: var(--ds-color-neutral-background-tinted)}
1
+ ._base_k5ay7_1{position:relative;display:flex;flex-direction:column;min-height:100vh;background-color:var(--altinn-layout-background)}._base_k5ay7_1[data-theme=default]{--altinn-layout-background: var(--ds-color-background-default)}._base_k5ay7_1[data-theme=subtle]{--altinn-layout-background: var(--ds-color-background-tinted)}._base_k5ay7_1[data-theme=neutral]{--altinn-layout-background: var(--ds-color-neutral-background-tinted)}._base_k5ay7_1[data-theme=inbox]{--altinn-layout-background: var(--ds-color-background-tinted)}._base_k5ay7_1[data-theme=inbox][data-color=person],._base_k5ay7_1[data-theme=settings]{--altinn-layout-background: var(--ds-color-neutral-background-tinted)}
@@ -1 +1 @@
1
- ._item_1xpqe_1{position:relative;display:flex;align-items:center;gap:.5rem;padding:.25rem .5rem;margin:0 -.5rem;--dsc-item-background--hover: var(--ds-color-surface-tinted)}._item_1xpqe_1:has(a):hover,._item_1xpqe_1:has(button):hover{background-color:var(--dsc-item-background--hover)}._item_1xpqe_1+[aria-hidden]{margin-block:0}._item_1xpqe_1+._item_1xpqe_1{margin-top:.5em}._media_1xpqe_24{pointer-events:none;position:relative;flex-shrink:0;font-size:2em;display:flex;align-items:center;justify-content:center}._media_1xpqe_24 svg{font-size:1.5rem}._link_1xpqe_38{font-size:1rem;flex-grow:1;display:flex;align-items:center;gap:.5rem;text-decoration:none;color:inherit}._linkIcon_1xpqe_48{font-size:1.5rem;width:1em;height:1em}._label_1xpqe_54{flex-grow:1;min-height:2.5rem;display:flex;flex-direction:column;justify-content:center}._label_1xpqe_54 mark{background-color:transparent;text-decoration:underline}._controls_1xpqe_67{flex-grow:0}
1
+ ._listItem_1p24v_1{padding-top:.375rem;padding-bottom:.375rem}._listItem_1p24v_1+._listItem_1p24v_1{border-top:1px solid var(--ds-color-border-subtle)}._listItem_1p24v_1[data-collapsible=true][data-expanded=true]{margin:0 -1em;padding:1em;background-color:var(--ds-color-background-default);border-radius:1rem;border:1px solid var(--ds-color-border-default);box-shadow:var(--ds-shadow-sm);display:flex;flex-direction:column;gap:1rem}._summary_1p24v_23{padding:.5rem}._item_1p24v_27{position:relative;display:flex;align-items:center;gap:.5rem;padding:.25rem .5rem;--dsc-item-background--hover: var(--ds-color-surface-tinted)}._item_1p24v_27:has(>a):hover,._item_1p24v_27:has(>button):not(disabled):hover{background-color:var(--dsc-item-background--hover)}._item_1p24v_27+[aria-hidden]{margin-block:0}._media_1p24v_45{pointer-events:none;position:relative;flex-shrink:0;font-size:2em;display:flex;align-items:center;justify-content:center}._media_1p24v_45 svg{font-size:1.5rem}._link_1p24v_59{font-size:1rem;flex-grow:1;display:flex;align-items:center;gap:.5rem;text-decoration:none;color:inherit}._linkIcon_1p24v_69{font-size:1.5rem;width:1em;height:1em}._label_1p24v_75{flex-grow:1;min-height:2.5rem;display:flex;flex-direction:column;justify-content:center}._label_1p24v_75 mark{background-color:transparent;text-decoration:underline}._controls_1p24v_88{position:relative;flex-grow:0}._linkIcon_1p24v_69{margin-right:.25rem}
@@ -1 +1 @@
1
- ._section_13ero_1{padding:.5rem 1rem;border-radius:.5rem}
1
+ ._section_1ccux_1{padding:1rem .5rem;border-radius:1rem}
@@ -0,0 +1 @@
1
+ ._section_ncfus_1{display:flex;flex-direction:column}._section_ncfus_1[data-variant=default]{row-gap:1.5rem}._section_ncfus_1[data-variant=menu]{row-gap:.5rem}._group_ncfus_14{background-color:var(--ds-color-surface-default);border-radius:1rem;padding:.375rem .5rem;box-shadow:var(--ds-shadow-xs)}._list_ncfus_21{display:flex;flex-direction:column;list-style:none;padding:0;margin:0}
@@ -1,55 +1,49 @@
1
- import { jsx as r, jsxs as s } from "react/jsx-runtime";
2
- import { Fragment as n, createElement as f } from "react";
1
+ import { jsx as t, jsxs as u } from "react/jsx-runtime";
2
+ import { Fragment as h, createElement as f } from "react";
3
3
  import "../../index-p1eeF8LQ.js";
4
- import { useMenu as u } from "../../hooks/useMenu.js";
5
- import { H as k } from "../../ToolbarSearch-56Sm2j7P.js";
4
+ import { useMenu as k } from "../../hooks/useMenu.js";
5
+ import { H as y } from "../../ToolbarSearch-56Sm2j7P.js";
6
6
  import "../Typography/Link.js";
7
7
  import "../Button/Button.js";
8
- import { BookmarkSettingsItem as y } from "./BookmarkSettingsItem.js";
8
+ import { BookmarkSettingsItem as v } from "./BookmarkSettingsItem.js";
9
9
  import "react-dom";
10
- import { Divider as S } from "../Divider/Divider.js";
11
- import { List as v } from "../List/List.js";
12
10
  import "../Snackbar/useSnackbar.js";
13
- import { Flex as B } from "../Page/Flex.js";
14
- import { SettingsSection as j } from "../Settings/SettingsSection.js";
15
- const w = ({
16
- loading: p,
17
- highlightWords: l,
18
- items: t,
19
- groups: g = {},
11
+ import { s as o } from "../../settlingsList.module-So3_AYgj.js";
12
+ const z = ({
13
+ loading: m,
14
+ highlightWords: n,
15
+ items: r,
16
+ groups: l = {},
20
17
  sortGroupBy: a
21
18
  }) => {
22
- if (!t || t.length < 1)
19
+ if (!r || r.length < 1)
23
20
  return null;
24
- const { menu: c } = u({
25
- items: t,
26
- groups: g,
21
+ const { menu: p } = k({
22
+ items: r,
23
+ groups: l,
27
24
  groupByKey: "groupId",
28
25
  keyboardEvents: !1,
29
26
  sortGroupBy: a
30
27
  });
31
- return /* @__PURE__ */ r(B, { as: "div", spacing: "page", direction: "col", children: c?.map((e, d) => {
32
- const m = e.props || {};
33
- return /* @__PURE__ */ s(n, { children: [
34
- m?.title && /* @__PURE__ */ r(k, { size: "lg", children: m.title }),
35
- /* @__PURE__ */ r(j, { children: /* @__PURE__ */ r(v, { size: "sm", children: e?.items.map((h, i) => {
36
- const o = h.props || {};
37
- return /* @__PURE__ */ s(n, { children: [
38
- i > 0 && /* @__PURE__ */ r(S, { as: "li" }),
39
- /* @__PURE__ */ f(
40
- y,
41
- {
42
- ...o,
43
- key: "settings-list-item" + i,
44
- highlightWords: l || o?.highlightWords,
45
- loading: p || o?.loading
46
- }
47
- )
48
- ] }, i);
28
+ return /* @__PURE__ */ t("div", { className: o.section, "data-variant": "default", children: p?.map((i, g) => {
29
+ const s = i.props || {};
30
+ return /* @__PURE__ */ u(h, { children: [
31
+ s?.title && /* @__PURE__ */ t(y, { size: "lg", children: s.title }),
32
+ /* @__PURE__ */ t("section", { className: o.group, children: /* @__PURE__ */ t("ul", { className: o.list, children: i?.items.map((c, d) => {
33
+ const e = c.props || {};
34
+ return /* @__PURE__ */ f(
35
+ v,
36
+ {
37
+ ...e,
38
+ key: "settings-list-item" + d,
39
+ highlightWords: n || e?.highlightWords,
40
+ loading: m || e?.loading
41
+ }
42
+ );
49
43
  }) }) })
50
- ] }, d);
44
+ ] }, g);
51
45
  }) });
52
46
  };
53
47
  export {
54
- w as BookmarkSettingsList
48
+ z as BookmarkSettingsList
55
49
  };
@@ -1,6 +1,6 @@
1
1
  import { jsxs as m, jsx as o } from "react/jsx-runtime";
2
2
  import { c as i } from "../../index-p1eeF8LQ.js";
3
- import { DigdirLogomark as t } from "../Header/DigdirLogomark.js";
3
+ import { DigdirLogomark as t } from "../Logo/DigdirLogomark.js";
4
4
  import '../../assets/FooterLogo.css';const c = "_logo_127g0_1", e = "_symbol_127g0_9", s = {
5
5
  logo: c,
6
6
  symbol: e
@@ -7,7 +7,7 @@ import "../Typography/Link.js";
7
7
  import "react-dom";
8
8
  import "../Snackbar/useSnackbar.js";
9
9
  import { DigdirLogomark as x } from "./DigdirLogomark.js";
10
- import '../../assets/HeaderLogo2.css';const d = "_logo_1yxnd_1", _ = "_logomark_1yxnd_16", f = "_text_1yxnd_23", t = {
10
+ import '../../assets/HeaderLogo.css';const d = "_logo_1yxnd_1", _ = "_logomark_1yxnd_16", f = "_text_1yxnd_23", t = {
11
11
  logo: d,
12
12
  logomark: _,
13
13
  text: f
@@ -1,63 +1,80 @@
1
1
  "use client";
2
- import { jsxs as f, jsx as o } from "react/jsx-runtime";
3
- import { useState as d, useCallback as L, useEffect as C, useMemo as G } from "react";
4
- import { M as S } from "../../ToolbarSearch-56Sm2j7P.js";
2
+ import { jsxs as d, jsx as a } from "react/jsx-runtime";
3
+ import s, { forwardRef as y, useState as M, useCallback as k, useEffect as I, useMemo as O } from "react";
4
+ import { M as w } from "../../ToolbarSearch-56Sm2j7P.js";
5
5
  import "../../index-p1eeF8LQ.js";
6
6
  import "../Typography/Link.js";
7
7
  import "../Button/Button.js";
8
8
  import "react-dom";
9
- import { LocaleSwitcher as v } from "./LocaleSwitcher.js";
9
+ import { LocaleSwitcher as j } from "./LocaleSwitcher.js";
10
10
  import "../Snackbar/useSnackbar.js";
11
11
  import { MenuListItem as x } from "../Menu/MenuListItem.js";
12
- import { GlobalMenuBase as u, GlobalMenuFooter as I } from "./GlobalMenuBase.js";
13
- import { LogoutButton as T } from "./LogoutButton.js";
14
- import { S as h } from "../../Globe-BcPkcH4E.js";
15
- const N = ({
16
- menu: e,
17
- backLabel: g = "Back",
18
- onClose: s,
19
- logoutButton: a,
20
- ariaLabel: n = "Menu",
21
- localeSwitcher: r,
22
- isOpen: m = !1
12
+ import { GlobalMenuBase as g, GlobalMenuFooter as S } from "./GlobalMenuBase.js";
13
+ import { LogoutButton as _ } from "./LogoutButton.js";
14
+ import { u as C } from "../../useId-BVFxCjkq.js";
15
+ var E = function(t, i) {
16
+ var r = {};
17
+ for (var e in t) Object.prototype.hasOwnProperty.call(t, e) && i.indexOf(e) < 0 && (r[e] = t[e]);
18
+ if (t != null && typeof Object.getOwnPropertySymbols == "function")
19
+ for (var o = 0, e = Object.getOwnPropertySymbols(t); o < e.length; o++)
20
+ i.indexOf(e[o]) < 0 && Object.prototype.propertyIsEnumerable.call(t, e[o]) && (r[e[o]] = t[e[o]]);
21
+ return r;
22
+ };
23
+ const L = y((t, i) => {
24
+ var { title: r, titleId: e } = t, o = E(t, ["title", "titleId"]);
25
+ let l = C();
26
+ return l = r ? e || "title-" + l : void 0, s.createElement(
27
+ "svg",
28
+ Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 24 24", focusable: !1, role: "img", ref: i, "aria-labelledby": l }, o),
29
+ r ? s.createElement("title", { id: l }, r) : null,
30
+ s.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12m6.74-7.683A8.28 8.28 0 0 0 4.65 8.25h3.719a41 41 0 0 1 .62-3.934m1.63-.452a41 41 0 0 0-.742 4.385h4.245a41 41 0 0 0-.743-4.385 8.3 8.3 0 0 0-2.76 0M8.24 14.25a34.5 34.5 0 0 1 0-4.5H4.06A8.3 8.3 0 0 0 3.75 12c0 .78.108 1.535.31 2.25zm1.503 0a33 33 0 0 1 0-4.5h4.514c.103 1.51.103 2.997 0 4.5zm-.754 5.433a41 41 0 0 1-.62-3.933h-3.72a8.28 8.28 0 0 0 4.34 3.933m1.631.452a41 41 0 0 1-.743-4.385h4.246a41 41 0 0 1-.743 4.385 8.3 8.3 0 0 1-2.76 0m5.141-5.885c.098-1.502.098-2.99 0-4.5h4.179c.202.715.31 1.47.31 2.25a8.3 8.3 0 0 1-.31 2.25zm-.75-9.933a8.28 8.28 0 0 1 4.34 3.933h-3.72a41 41 0 0 0-.62-3.933m0 15.366c.276-1.344.483-2.648.62-3.933h3.72a8.28 8.28 0 0 1-4.34 3.933", clipRule: "evenodd" })
31
+ );
32
+ }), K = ({
33
+ menu: t,
34
+ backLabel: i = "Back",
35
+ onClose: r,
36
+ logoutButton: e,
37
+ ariaLabel: o = "Menu",
38
+ localeSwitcher: l,
39
+ isOpen: f = !1
23
40
  }) => {
24
- const [k, c] = d(!1), l = L(() => {
25
- c((t) => !t);
41
+ const [b, p] = M(!1), m = k(() => {
42
+ p((n) => !n);
26
43
  }, []);
27
- C(() => {
28
- m || c(!1);
29
- }, [m]);
30
- const M = G(() => {
31
- const t = (e?.items ?? []).map((i) => ({
32
- ...i,
44
+ I(() => {
45
+ f || p(!1);
46
+ }, [f]);
47
+ const h = O(() => {
48
+ const n = (t?.items ?? []).map((c) => ({
49
+ ...c,
33
50
  onClick: () => {
34
- i.onClick?.(), s?.();
51
+ c.onClick?.(), r?.();
35
52
  },
36
- items: Array.isArray(i.items) ? i.items.map((p) => ({
37
- ...p,
53
+ items: Array.isArray(c.items) ? c.items.map((u) => ({
54
+ ...u,
38
55
  onClick: () => {
39
- p.onClick?.(), s?.();
56
+ u.onClick?.(), r?.();
40
57
  }
41
58
  })) : void 0
42
59
  }));
43
- if (!r) return t;
44
- const b = {
60
+ if (!l) return n;
61
+ const v = {
45
62
  title: "Språk/language",
46
- icon: h,
63
+ icon: L,
47
64
  size: "sm",
48
- onClick: l,
65
+ onClick: m,
49
66
  linkIcon: !0
50
67
  };
51
- return [...t, b];
52
- }, [e, s, r, l]);
53
- return k ? /* @__PURE__ */ f(u, { "aria-label": n, children: [
54
- r && /* @__PURE__ */ o(v, { ...r, backLabel: g, onToggle: l }),
55
- /* @__PURE__ */ o(x, { as: "div", role: "separator" })
56
- ] }) : /* @__PURE__ */ f(u, { "aria-label": n, children: [
57
- e && /* @__PURE__ */ o(S, { ...e, items: M }),
58
- a && /* @__PURE__ */ o(I, { children: /* @__PURE__ */ o(T, { ...a }) })
68
+ return [...n, v];
69
+ }, [t, r, l, m]);
70
+ return b ? /* @__PURE__ */ d(g, { "aria-label": o, children: [
71
+ l && /* @__PURE__ */ a(j, { ...l, backLabel: i, onToggle: m }),
72
+ /* @__PURE__ */ a(x, { as: "div", role: "separator" })
73
+ ] }) : /* @__PURE__ */ d(g, { "aria-label": o, children: [
74
+ t && /* @__PURE__ */ a(w, { ...t, items: h }),
75
+ e && /* @__PURE__ */ a(S, { children: /* @__PURE__ */ a(_, { ...e }) })
59
76
  ] });
60
77
  };
61
78
  export {
62
- N as GlobalMenu
79
+ K as GlobalMenu
63
80
  };
@@ -1,49 +1,49 @@
1
- import { jsx as k, jsxs as f } from "react/jsx-runtime";
1
+ import { jsx as k, jsxs as j } from "react/jsx-runtime";
2
2
  import { c as u } from "../../index-p1eeF8LQ.js";
3
- import '../../assets/ItemLink.css';const j = "_link_eet0n_1", A = "_linkFocus_eet0n_26", e = {
4
- link: j,
5
- linkFocus: A
3
+ import '../../assets/ItemLink.css';const A = "_link_1pvv7_1", I = "_linkFocus_1pvv7_30", a = {
4
+ link: A,
5
+ linkFocus: I
6
6
  }, h = ({
7
- as: m,
7
+ as: d,
8
8
  loading: t,
9
- disabled: n,
10
- selected: v,
11
- href: s,
12
- onClick: a,
9
+ disabled: s,
10
+ selected: m,
11
+ href: n,
12
+ onClick: e,
13
13
  onKeyPress: p,
14
- className: o,
14
+ className: r,
15
15
  active: _,
16
- ariaLabel: r,
16
+ ariaLabel: o,
17
17
  children: c,
18
18
  tabIndex: x = 0,
19
19
  expanded: l,
20
20
  collapsible: y,
21
21
  ariaControlsId: F
22
22
  }) => {
23
- const i = m || "div";
24
- if (i === "div")
25
- return /* @__PURE__ */ k("div", { className: u(e.link, o), children: c });
26
- const b = !t && s || i !== "a" && r;
27
- return /* @__PURE__ */ f(
23
+ const i = d || "div";
24
+ if (i === "div" || s || t)
25
+ return /* @__PURE__ */ k("div", { className: u(a.link, r), "data-disabled": s || t, children: c });
26
+ const f = !t && n || i !== "a" && o;
27
+ return /* @__PURE__ */ j(
28
28
  i,
29
29
  {
30
- className: u(e.link, o),
31
- href: s,
32
- onKeyPress: (d) => {
33
- d.key === "Enter" && a?.(), p?.(d);
30
+ className: u(a.link, r),
31
+ href: n,
32
+ onKeyPress: (v) => {
33
+ v.key === "Enter" && e?.(), p?.(v);
34
34
  },
35
- onClick: a,
35
+ onClick: e,
36
36
  "data-interactive": "true",
37
- "aria-disabled": t || n,
38
- "aria-selected": v,
37
+ "aria-disabled": t || s,
38
+ "aria-selected": m,
39
39
  "aria-expanded": y ? l : void 0,
40
40
  "aria-controls": l ? F : void 0,
41
- ...b && { "aria-label": r },
41
+ ...f && { "aria-label": o },
42
42
  "data-active": _,
43
- tabIndex: t || n ? -1 : x,
43
+ tabIndex: t || s ? -1 : x,
44
44
  children: [
45
45
  c,
46
- /* @__PURE__ */ k("div", { className: e.linkFocus, "aria-hidden": "true" })
46
+ /* @__PURE__ */ k("div", { className: a.linkFocus, "aria-hidden": "true" })
47
47
  ]
48
48
  }
49
49
  );
@@ -1,60 +1,58 @@
1
1
  "use client";
2
2
  import { jsxs as r, jsx as t } from "react/jsx-runtime";
3
- import { LayoutBase as d } from "./LayoutBase.js";
4
- import { LayoutGrid as L } from "./LayoutGrid.js";
5
- import { LayoutBody as a } from "./LayoutBody.js";
6
- import { LayoutContent as h } from "./LayoutContent.js";
7
- import { LayoutSidebar as s } from "./LayoutSidebar.js";
8
- import { Breadcrumbs as x } from "../Breadcrumbs/Breadcrumbs.js";
3
+ import { LayoutBase as y } from "./LayoutBase.js";
4
+ import { LayoutGrid as d } from "./LayoutGrid.js";
5
+ import { LayoutBody as h } from "./LayoutBody.js";
6
+ import { LayoutContent as L } from "./LayoutContent.js";
7
+ import { LayoutSidebar as a } from "./LayoutSidebar.js";
8
+ import { Breadcrumbs as s } from "../Breadcrumbs/Breadcrumbs.js";
9
9
  import "../../index-p1eeF8LQ.js";
10
- import { Footer as B } from "../Footer/Footer.js";
11
- import { GlobalHeader as j } from "../GlobalHeader/GlobalHeader.js";
10
+ import { Footer as x } from "../Footer/Footer.js";
11
+ import { GlobalHeader as B } from "../GlobalHeader/GlobalHeader.js";
12
12
  import "react";
13
- import { u as k, M as C } from "../../ToolbarSearch-56Sm2j7P.js";
13
+ import { u as j, M as k } from "../../ToolbarSearch-56Sm2j7P.js";
14
14
  import "../Typography/Link.js";
15
15
  import "../Button/Button.js";
16
16
  import "react-dom";
17
- import { Header as G } from "../Header/Header.js";
18
17
  import "../Snackbar/useSnackbar.js";
19
- import { SkipLink as H } from "../SkipLink/SkipLink.js";
20
- const Q = ({
18
+ import { SkipLink as C } from "../SkipLink/SkipLink.js";
19
+ const N = ({
21
20
  color: c,
22
21
  theme: u = "subtle",
23
- header: m,
22
+ header: i,
24
23
  footer: n,
25
24
  sidebar: o,
26
- content: f = {},
27
- children: l,
25
+ content: l = {},
26
+ children: f,
28
27
  skipLink: p,
29
- breadcrumbs: e,
30
- useGlobalHeader: y = !0
28
+ breadcrumbs: e
31
29
  }) => {
32
- const { currentId: i } = k();
33
- return /* @__PURE__ */ r(d, { color: c, theme: u, currentId: i, children: [
34
- p && /* @__PURE__ */ t(H, { ...p }),
35
- m && (y ? /* @__PURE__ */ t(j, { ...m }) : /* @__PURE__ */ t(G, { ...m })),
36
- /* @__PURE__ */ r(L, { currentId: i, children: [
37
- e && /* @__PURE__ */ t(x, { ...e }),
38
- /* @__PURE__ */ r(a, { currentId: i, children: [
30
+ const { currentId: m } = j();
31
+ return /* @__PURE__ */ r(y, { color: c, theme: u, currentId: m, children: [
32
+ p && /* @__PURE__ */ t(C, { ...p }),
33
+ i && /* @__PURE__ */ t(B, { ...i }),
34
+ /* @__PURE__ */ r(d, { currentId: m, children: [
35
+ e && /* @__PURE__ */ t(s, { ...e }),
36
+ /* @__PURE__ */ r(h, { currentId: m, children: [
39
37
  o && /* @__PURE__ */ r(
40
- s,
38
+ a,
41
39
  {
42
40
  sticky: o?.sticky,
43
41
  hidden: o?.hidden,
44
42
  color: o?.color,
45
43
  footer: o?.footer,
46
44
  children: [
47
- o?.menu && /* @__PURE__ */ t(C, { ...o?.menu }),
45
+ o?.menu && /* @__PURE__ */ t(k, { ...o?.menu }),
48
46
  o?.children
49
47
  ]
50
48
  }
51
49
  ),
52
- /* @__PURE__ */ t(h, { color: f?.color, id: "main-content", children: l })
50
+ /* @__PURE__ */ t(L, { color: l?.color, id: "main-content", children: f })
53
51
  ] })
54
52
  ] }),
55
- n && /* @__PURE__ */ t(B, { ...n })
53
+ n && /* @__PURE__ */ t(x, { ...n })
56
54
  ] });
57
55
  };
58
56
  export {
59
- Q as Layout
57
+ N as Layout
60
58
  };
@@ -1,7 +1,7 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import '../../assets/LayoutBase.css';const r = "_base_1m3p1_1", c = {
2
+ import '../../assets/LayoutBase.css';const r = "_base_k5ay7_1", c = {
3
3
  base: r
4
- }, m = ({ currentId: a, color: s, theme: t, children: e }) => /* @__PURE__ */ o("div", { className: c.base, "data-color": s, "data-theme": t, "data-current-id": a, children: e });
4
+ }, n = ({ currentId: a, color: s, theme: t, children: e }) => /* @__PURE__ */ o("div", { className: c.base, "data-color": s, "data-theme": t, "data-current-id": a, children: e });
5
5
  export {
6
- m as LayoutBase
6
+ n as LayoutBase
7
7
  };
@@ -0,0 +1,4 @@
1
+ import { DigdirLogomark as g } from "./DigdirLogomark.js";
2
+ export {
3
+ g as DigdirLogomark
4
+ };
@@ -1,38 +1,40 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
2
  import "../../index-p1eeF8LQ.js";
3
- import { useState as g } from "react";
4
- import { Input as b } from "../Forms/Input.js";
3
+ import { useState as b } from "react";
4
+ import { Input as P } from "../Forms/Input.js";
5
5
  import "../../ToolbarSearch-56Sm2j7P.js";
6
6
  import "../Typography/Link.js";
7
7
  import "../Button/Button.js";
8
8
  import "react-dom";
9
9
  import "../Snackbar/useSnackbar.js";
10
- import { SettingsItemBase as n } from "./SettingsItemBase.js";
11
- import { SettingsModal as x } from "./SettingsModal.js";
12
- const M = ({
13
- loading: c,
14
- variant: m = "default",
15
- id: d = "settings",
16
- name: h,
10
+ import { SettingsItemBase as r } from "./SettingsItemBase.js";
11
+ import { SettingsModal as w } from "./SettingsModal.js";
12
+ const O = ({
13
+ loading: d,
14
+ variant: h = "default",
15
+ id: u = "settings",
16
+ name: p,
17
17
  title: e,
18
- value: r,
18
+ value: n,
19
19
  description: s,
20
- checked: p,
21
- onChange: u,
20
+ checked: f,
21
+ onChange: g,
22
22
  modalProps: o,
23
- children: f,
23
+ expanded: a,
24
+ children: c,
24
25
  ...i
25
26
  }) => {
26
- const [l, a] = g(!1);
27
- if (c)
28
- return /* @__PURE__ */ t(n, { icon: i?.icon, titleProps: { children: e }, loading: !0 });
29
- switch (m) {
27
+ const [l, m] = b(!1);
28
+ if (d)
29
+ return /* @__PURE__ */ t(r, { icon: i?.icon, titleProps: { children: e }, loading: !0 });
30
+ switch (h) {
30
31
  case "link":
31
32
  return /* @__PURE__ */ t(
32
- n,
33
+ r,
33
34
  {
34
35
  ...i,
35
36
  titleProps: {
37
+ size: "md",
36
38
  children: e
37
39
  },
38
40
  descriptionProps: {
@@ -45,7 +47,7 @@ const M = ({
45
47
  );
46
48
  case "switch":
47
49
  return /* @__PURE__ */ t(
48
- n,
50
+ r,
49
51
  {
50
52
  ...i,
51
53
  as: "div",
@@ -59,27 +61,48 @@ const M = ({
59
61
  children: s
60
62
  },
61
63
  controls: /* @__PURE__ */ t(
62
- b,
64
+ P,
63
65
  {
64
66
  type: "checkbox",
65
67
  role: "switch",
66
- "aria-labelledby": d,
67
- name: h,
68
- value: r,
69
- checked: p,
70
- onChange: u,
68
+ "aria-labelledby": u,
69
+ name: p,
70
+ value: n,
71
+ checked: f,
72
+ onChange: g,
71
73
  style: { marginRight: "0.5em" }
72
74
  }
73
75
  )
74
76
  }
75
77
  );
78
+ case "accordion":
79
+ return /* @__PURE__ */ t(
80
+ r,
81
+ {
82
+ ...i,
83
+ as: "button",
84
+ linkIcon: !0,
85
+ collapsible: !0,
86
+ expanded: a,
87
+ titleProps: {
88
+ children: e
89
+ },
90
+ descriptionProps: {
91
+ size: "xs",
92
+ weight: "normal",
93
+ variant: "subtle",
94
+ children: s
95
+ },
96
+ children: a && /* @__PURE__ */ t("div", { children: c })
97
+ }
98
+ );
76
99
  case "modal":
77
100
  return /* @__PURE__ */ t(
78
- n,
101
+ r,
79
102
  {
80
103
  ...i,
81
104
  titleProps: {
82
- size: r ? "xs" : "sm",
105
+ size: n ? "xs" : "sm",
83
106
  variant: "subtle",
84
107
  weight: "normal",
85
108
  children: e
@@ -87,32 +110,32 @@ const M = ({
87
110
  descriptionProps: {
88
111
  size: "sm",
89
112
  variant: "default",
90
- children: s || r
113
+ children: s || n
91
114
  },
92
115
  as: "button",
93
116
  linkIcon: !0,
94
- onClick: () => a(!0),
117
+ onClick: () => m(!0),
95
118
  expanded: l,
96
119
  children: l && /* @__PURE__ */ t(
97
- x,
120
+ w,
98
121
  {
99
122
  ...o,
100
123
  icon: o?.icon || i?.icon,
101
124
  title: o?.title || e,
102
125
  open: l,
103
- onClose: () => a(!1),
104
- children: f
126
+ onClose: () => m(!1),
127
+ children: c
105
128
  }
106
129
  )
107
130
  }
108
131
  );
109
132
  default:
110
133
  return /* @__PURE__ */ t(
111
- n,
134
+ r,
112
135
  {
113
136
  ...i,
114
137
  titleProps: {
115
- size: r ? "xs" : "sm",
138
+ size: n ? "xs" : "sm",
116
139
  variant: "subtle",
117
140
  weight: "normal",
118
141
  children: e
@@ -120,12 +143,12 @@ const M = ({
120
143
  descriptionProps: {
121
144
  size: "sm",
122
145
  variant: "default",
123
- children: s || r
146
+ children: s || n
124
147
  }
125
148
  }
126
149
  );
127
150
  }
128
151
  };
129
152
  export {
130
- M as SettingsItem
153
+ O as SettingsItem
131
154
  };