@altinn/altinn-components 0.45.3 → 0.46.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.
@@ -1 +1 @@
1
- ._sidebar_lkphj_1,._sidebar_lkphj_1[aria-hidden=true]{display:none}@media (min-width: 1024px){._sidebar_lkphj_1{align-self:flex-start;flex-shrink:0;display:flex;flex-direction:column;width:224px}._sidebar_lkphj_1[data-sticky=true]{position:sticky;top:0}._sidebar_lkphj_1[aria-hidden=true]{display:none}}
1
+ ._sidebar_bcso7_1,._sidebar_bcso7_1[aria-hidden=true]{display:none}@media (min-width: 1024px){._sidebar_bcso7_1{align-self:flex-start;flex-shrink:0;display:flex;flex-direction:column;width:224px}._sidebar_bcso7_1[data-use-global-header=true]{margin-top:4.125rem}._sidebar_bcso7_1[data-sticky=true]{position:sticky;top:0}._sidebar_bcso7_1[aria-hidden=true]{display:none}}
@@ -1 +1 @@
1
- ._searchbar_1qnvb_1{position:relative}._searchbar_1qnvb_1[data-autocomplete=true][aria-expanded=true] input{border-bottom-left-radius:0;border-bottom-right-radius:0}._searchbar_1qnvb_1 nav{display:none}._searchbarExpanded_1qnvb_14 nav{position:absolute;display:block;border-top-left-radius:0;border-top-right-radius:0;margin-top:-2px}
1
+ ._searchbar_nnykn_1{position:relative}._searchbar_nnykn_1[data-autocomplete=true][aria-expanded=true] input{border-bottom-left-radius:0;border-bottom-right-radius:0}._searchbar_nnykn_1 nav{display:none}._searchbarExpanded_nnykn_14 nav{position:absolute;display:block;border-top-left-radius:0;border-top-right-radius:0;margin-top:-2px}._searchbarLocal_nnykn_22{width:100%;padding:var(--dsc-spacing-4) 0;z-index:100}@media (min-width: 1024px){._searchbarLocal_nnykn_22{max-width:320px;margin-right:auto}._searchbarLocal_nnykn_22._searchbarExpanded_nnykn_14{max-width:640px}}
@@ -1 +1 @@
1
- ._typography_xs81l_1{width:100%;line-height:1.5}p._typography_xs81l_1{margin:0}._typography_xs81l_1[data-theme=default]{background-color:transparent;color:var(--ds-color-text-default)}._typography_xs81l_1[data-theme=subtle]{background-color:transparent;color:var(--ds-color-text-subtle)}._typography_xs81l_1[data-size=xs]{font-size:.875rem}._typography_xs81l_1[data-size=sm]{font-size:1rem}._typography_xs81l_1[data-size=md]{font-size:1.125rem}._typography_xs81l_1[data-size=lg]{font-size:1.25rem}._typography_xs81l_1[data-size=xl]{font-size:1.5rem}._typography_xs81l_1>*:first-child{margin-top:0}._typography_xs81l_1>*:last-child{margin-bottom:0}._typography_xs81l_1 strong{font-weight:500}._typography_xs81l_1 a{color:var(--ds-color-base-default)}._typography_xs81l_1 a:hover{color:var(--ds-color-base-hover)}._typography_xs81l_1>p{font-size:1em;margin:1em 0}._typography_xs81l_1>h1{font-size:1.5rem;font-weight:500;margin-top:1.5em;margin-bottom:0}._typography_xs81l_1>h2{font-size:1.25rem;font-weight:600;margin-top:1.5em;margin-bottom:0}._typography_xs81l_1>h3{font-size:1em;font-weight:600;margin:1em 0}._typography_xs81l_1>h4{font-size:1em;font-weight:600;margin:1em 0 0}._typography_xs81l_1>h5,._typography_xs81l_1>h6{font-size:.875rem;margin:1em 0 0}._typography_xs81l_1>h6{font-weight:500;color:var(--ds-color-text-subtle)}._typography_xs81l_1>h6{font-weight:400;color:var(--ds-color-text-subtle)}._typography_xs81l_1>h5+*,._typography_xs81l_1>h6+*{margin-top:0}._typography_xs81l_1>section{margin:1em 0}._typography_xs81l_1 ul:not([class]),._typography_xs81l_1 ol:not([class]){list-style-position:outside;padding-left:1.5em;margin:1.5em 0}._typography_xs81l_1 ul:not([class]) li,._typography_xs81l_1 ol:not([class]) li{padding-left:.5em;margin:.5em 0}._typography_xs81l_1 table{width:100%;font-size:.875em;font-variant-numeric:tabular-nums;border-collapse:collapse;border:1px solid;margin:1.5em 0}._typography_xs81l_1 th,._typography_xs81l_1 td{text-align:left;padding:.25em .5em;vertical-align:top}._typography_xs81l_1 thead+tbody{border-top:1px solid;border-color:var(--ds-color-border-default)}._typography_xs81l_1 tr+tr{border-top:1px solid;border-color:var(--ds-color-border-subtle)}
1
+ ._typography_1h9tz_1{width:100%;line-height:1.5}p._typography_1h9tz_1{margin:0}._typography_1h9tz_1[data-theme=default]{background-color:transparent;color:var(--ds-color-text-default)}._typography_1h9tz_1[data-theme=subtle]{background-color:transparent;color:var(--ds-color-text-subtle)}._typography_1h9tz_1[data-size=xs]{font-size:.875rem}._typography_1h9tz_1[data-size=sm]{font-size:1rem}._typography_1h9tz_1[data-size=md]{font-size:1.125rem}._typography_1h9tz_1[data-size=lg]{font-size:1.25rem}._typography_1h9tz_1[data-size=xl]{font-size:1.5rem}._typography_1h9tz_1>*:first-child{margin-top:0}._typography_1h9tz_1>*:last-child{margin-bottom:0}._typography_1h9tz_1 strong{font-weight:500}._typography_1h9tz_1 a{color:var(--ds-color-base-default)}._typography_1h9tz_1 a:hover{color:var(--ds-color-base-hover)}._typography_1h9tz_1 p{font-size:1em;margin:1em 0}._typography_1h9tz_1 hr{--dsc-divider-border-width: var(--ds-border-width-default);--dsc-divider-border-style: solid;--dsc-divider-border-color: var(--ds-color-border-subtle);border-width:0;border-top-width:var(--dsc-divider-border-width);border-top-style:var(--dsc-divider-border-style);border-color:var(--dsc-divider-border-color);box-sizing:border-box;margin-block:.5em;width:100%}._typography_1h9tz_1 h1{font-size:1.5rem;line-height:1.25;font-weight:500;margin-top:1.5em;margin-bottom:0}._typography_1h9tz_1 h2{font-size:1.25rem;font-weight:600;margin-top:1.5em;margin-bottom:0}._typography_1h9tz_1 h3{font-size:1em;font-weight:600;margin:1em 0}._typography_1h9tz_1 h4{font-size:1em;font-weight:600;margin:1em 0 0}._typography_1h9tz_1 h5,._typography_1h9tz_1 h6{font-size:.875rem;margin:1em 0 0}._typography_1h9tz_1 h6{font-weight:500;color:var(--ds-color-text-subtle)}._typography_1h9tz_1 h6{font-weight:400;color:var(--ds-color-text-subtle)}._typography_1h9tz_1 h5+*,._typography_1h9tz_1 h6+*{margin-top:0}._typography_1h9tz_1 section{margin:1em 0}._typography_1h9tz_1 img{display:block;max-width:100%;width:auto;height:auto}._typography_1h9tz_1 ul:not([class]),._typography_1h9tz_1 ol:not([class]){list-style-position:outside;padding-left:1.5em;margin:1.5em 0}._typography_1h9tz_1 ul:not([class]) li,._typography_1h9tz_1 ol:not([class]) li{padding-left:.5em;margin:.5em 0}._typography_1h9tz_1 table{width:100%;font-size:.875em;font-variant-numeric:tabular-nums;border-collapse:collapse;border:1px solid;margin:1.5em 0}._typography_1h9tz_1 th,._typography_1h9tz_1 td{text-align:left;padding:.25em .5em;vertical-align:top}._typography_1h9tz_1 thead+tbody{border-top:1px solid;border-color:var(--ds-color-border-default)}._typography_1h9tz_1 tr+tr{border-top:1px solid;border-color:var(--ds-color-border-subtle)}
@@ -1,21 +1,21 @@
1
1
  "use client";
2
- import { jsx as x } from "react/jsx-runtime";
3
- import { useState as R, useEffect as S } from "react";
2
+ import { jsx as c } from "react/jsx-runtime";
3
+ import { useState as x, useEffect as R } from "react";
4
4
  import "../../index-L8X2o7IH.js";
5
5
  import "../RootProvider/RootProvider.js";
6
- import { Menu as j } from "../Menu/Menu.js";
6
+ import { Menu as S } from "../Menu/Menu.js";
7
7
  import "../Snackbar/useSnackbar.js";
8
- const k = (d) => `${d} hits`, D = ({
8
+ const j = (d) => `${d} hits`, B = ({
9
9
  items: d = [],
10
10
  groups: v = {},
11
- search: l,
11
+ search: t,
12
12
  filterAccount: C,
13
13
  onSelectAccount: u,
14
14
  currentAccount: e,
15
15
  isVirtualized: L,
16
16
  keyboardEvents: w
17
17
  }) => {
18
- var a;
18
+ var r;
19
19
  const p = d.map((o) => ({
20
20
  ...o,
21
21
  title: (o == null ? void 0 : o.title) || o.name,
@@ -24,36 +24,36 @@ const k = (d) => `${d} hits`, D = ({
24
24
  onClick: () => {
25
25
  !o.disabled && (u == null || u(o.id));
26
26
  }
27
- })), [t, i] = R("");
28
- S(() => {
29
- (l == null ? void 0 : l.value) !== void 0 && i(l.value);
30
- }, [l == null ? void 0 : l.value]);
31
- const F = C || ((o, f) => {
32
- var g, r, s;
33
- return ((g = o == null ? void 0 : o.name) == null ? void 0 : g.toLowerCase().includes(f.toLowerCase())) || ((s = (r = o == null ? void 0 : o.description) == null ? void 0 : r.toString()) == null ? void 0 : s.toLowerCase().includes(f.toLowerCase()));
34
- }), n = t ? p.filter((o) => F(o, t)).map((o) => ({
27
+ })), [l, i] = x("");
28
+ R(() => {
29
+ (t == null ? void 0 : t.value) !== void 0 && i(t.value);
30
+ }, [t == null ? void 0 : t.value]);
31
+ const F = C || ((o, a) => {
32
+ var g, f, s;
33
+ return ((g = o == null ? void 0 : o.name) == null ? void 0 : g.toLowerCase().includes(a.toLowerCase())) || ((s = (f = o == null ? void 0 : o.description) == null ? void 0 : f.toString()) == null ? void 0 : s.toLowerCase().includes(a.toLowerCase()));
34
+ }), n = l ? p.filter((o) => F(o, l)).map((o) => ({
35
35
  ...o,
36
36
  groupId: "search",
37
37
  title: (o == null ? void 0 : o.title) || o.name,
38
- highlightWords: [t]
39
- })) : p, b = t ? {
38
+ highlightWords: [l]
39
+ })) : p, b = l ? {
40
40
  search: {
41
- title: ((a = l == null ? void 0 : l.getResultsLabel) == null ? void 0 : a.call(l, n.length)) ?? k(n.length)
41
+ title: ((r = t == null ? void 0 : t.getResultsLabel) == null ? void 0 : r.call(t, n.length)) ?? j(n.length)
42
42
  }
43
43
  } : v, I = {
44
44
  name: "account-search",
45
- value: t,
46
- placeholder: (l == null ? void 0 : l.placeholder) ?? "Find account",
45
+ value: l,
46
+ placeholder: (t == null ? void 0 : t.placeholder) ?? "Find account",
47
47
  onChange: (o) => i(o.target.value),
48
48
  onClear: () => i("")
49
49
  }, M = [
50
50
  ...n.length > 0 ? n : [{ id: "search", groupId: "search", hidden: !0 }]
51
51
  ];
52
- return /* @__PURE__ */ x(
53
- j,
52
+ return /* @__PURE__ */ c(
53
+ S,
54
54
  {
55
55
  variant: "default",
56
- search: l && (l == null ? void 0 : l.hidden) === !1 ? I : void 0,
56
+ search: t && !t.hidden ? I : void 0,
57
57
  groups: b,
58
58
  items: M,
59
59
  isVirtualized: L,
@@ -62,5 +62,5 @@ const k = (d) => `${d} hits`, D = ({
62
62
  );
63
63
  };
64
64
  export {
65
- D as AccountMenu
65
+ B as AccountMenu
66
66
  };
@@ -1,14 +1,14 @@
1
1
  import { jsxs as o, jsx as e } from "react/jsx-runtime";
2
2
  import "../../index-L8X2o7IH.js";
3
3
  import "react";
4
- import { Heading as t } from "../Typography/Heading.js";
4
+ import { Heading as m } from "../Typography/Heading.js";
5
5
  import "../RootProvider/RootProvider.js";
6
6
  import "../Snackbar/useSnackbar.js";
7
- import { Section as m } from "../Page/Section.js";
8
- const x = ({ title: r, children: i }) => /* @__PURE__ */ o(m, { as: "header", spacing: 2, children: [
9
- /* @__PURE__ */ e(t, { size: "xl", children: r }),
7
+ import { Section as t } from "../Page/Section.js";
8
+ const f = ({ title: r, children: i }) => /* @__PURE__ */ o(t, { as: "header", spacing: 2, children: [
9
+ r && /* @__PURE__ */ e(m, { size: "xl", children: r }),
10
10
  i
11
11
  ] });
12
12
  export {
13
- x as ArticleHeader
13
+ f as ArticleHeader
14
14
  };
@@ -0,0 +1,30 @@
1
+ import { jsxs as i, Fragment as s, jsx as e } from "react/jsx-runtime";
2
+ import "../../index-L8X2o7IH.js";
3
+ import "react";
4
+ import { useRootContext as m } from "../RootProvider/RootProvider.js";
5
+ import { Searchbar as x } from "../Searchbar/Searchbar.js";
6
+ import "../Snackbar/useSnackbar.js";
7
+ import { Backdrop as p } from "../Dropdown/Backdrop.js";
8
+ const f = ({ search: n }) => {
9
+ const { currentId: o, toggleId: t, openId: c } = m(), a = () => {
10
+ c("inboxSearch");
11
+ }, r = () => {
12
+ t("inboxSearch");
13
+ };
14
+ return /* @__PURE__ */ i(s, { children: [
15
+ o === "inboxSearch" && /* @__PURE__ */ e(p, { onClick: r }),
16
+ /* @__PURE__ */ e(
17
+ x,
18
+ {
19
+ ...n,
20
+ expanded: o === "inboxSearch",
21
+ onClose: r,
22
+ onFocus: a,
23
+ useGlobalHeader: !0
24
+ }
25
+ )
26
+ ] });
27
+ };
28
+ export {
29
+ f as InboxSearch
30
+ };
@@ -0,0 +1,4 @@
1
+ import { InboxSearch as e } from "./InboxSearch.js";
2
+ export {
3
+ e as InboxSearch
4
+ };
@@ -1,43 +1,47 @@
1
1
  "use client";
2
- import { jsxs as p, jsx as m } from "react/jsx-runtime";
2
+ import { jsxs as c, jsx as t } from "react/jsx-runtime";
3
3
  import { LayoutBase as L } from "./LayoutBase.js";
4
- import { LayoutBody as x } from "./LayoutBody.js";
5
- import { LayoutContent as j } from "./LayoutContent.js";
6
- import { LayoutSidebar as B } from "./LayoutSidebar.js";
7
- import { Footer as C } from "../Footer/Footer.js";
8
- import { GlobalHeader as F } from "../GlobalHeader/GlobalHeader.js";
4
+ import { LayoutBody as S } from "./LayoutBody.js";
5
+ import { LayoutContent as i } from "./LayoutContent.js";
6
+ import { LayoutSidebar as j } from "./LayoutSidebar.js";
7
+ import { Footer as B } from "../Footer/Footer.js";
8
+ import { GlobalHeader as C } from "../GlobalHeader/GlobalHeader.js";
9
9
  import "../../index-L8X2o7IH.js";
10
10
  import "react";
11
- import { useRootContext as H } from "../RootProvider/RootProvider.js";
12
- import { Menu as S } from "../Menu/Menu.js";
13
- import { Header as G } from "../Header/Header.js";
11
+ import { useRootContext as F } from "../RootProvider/RootProvider.js";
12
+ import { Menu as I } from "../Menu/Menu.js";
13
+ import { Header as v } from "../Header/Header.js";
14
14
  import "../Snackbar/useSnackbar.js";
15
- import { SkipLink as I } from "../SkipLink/SkipLink.js";
16
- const O = ({
17
- color: c,
18
- theme: f = "subtle",
19
- header: t,
20
- footer: n,
15
+ import { InboxSearch as M } from "../InboxSearch/InboxSearch.js";
16
+ import { SkipLink as R } from "../SkipLink/SkipLink.js";
17
+ const T = ({
18
+ color: h,
19
+ theme: y = "subtle",
20
+ header: m,
21
+ footer: u,
21
22
  sidebar: o,
22
- content: l = {},
23
- children: y,
24
- skipLink: r,
25
- useGlobalHeader: h = !1
23
+ content: n = {},
24
+ children: x,
25
+ skipLink: f,
26
+ useGlobalHeader: p = !1
26
27
  }) => {
27
- const { currentId: u } = H();
28
- return /* @__PURE__ */ p(L, { color: c, theme: u === "accountFullscreen" ? "default" : f, currentId: u, children: [
29
- r && /* @__PURE__ */ m(I, { ...r }),
30
- t && (h ? /* @__PURE__ */ m(F, { ...t }) : /* @__PURE__ */ m(G, { ...t })),
31
- /* @__PURE__ */ p(x, { currentId: u, children: [
32
- o && /* @__PURE__ */ p(B, { hidden: o == null ? void 0 : o.hidden, color: o == null ? void 0 : o.color, ...o, children: [
33
- (o == null ? void 0 : o.menu) && /* @__PURE__ */ m(S, { ...o == null ? void 0 : o.menu }),
28
+ const { currentId: r } = F(), l = m && "search" in m ? m.search : void 0;
29
+ return /* @__PURE__ */ c(L, { color: h, theme: r === "accountFullscreen" ? "default" : y, currentId: r, children: [
30
+ f && /* @__PURE__ */ t(R, { ...f }),
31
+ m && (p ? /* @__PURE__ */ t(C, { ...m }) : /* @__PURE__ */ t(v, { ...m })),
32
+ /* @__PURE__ */ c(S, { currentId: r, children: [
33
+ o && /* @__PURE__ */ c(j, { hidden: o == null ? void 0 : o.hidden, color: o == null ? void 0 : o.color, ...o, useGlobalHeader: p, children: [
34
+ (o == null ? void 0 : o.menu) && /* @__PURE__ */ t(I, { ...o == null ? void 0 : o.menu }),
34
35
  o == null ? void 0 : o.children
35
36
  ] }),
36
- /* @__PURE__ */ m(j, { color: l == null ? void 0 : l.color, id: "main-content", children: y })
37
+ /* @__PURE__ */ c(i, { color: n == null ? void 0 : n.color, id: "main-content", children: [
38
+ p && l && /* @__PURE__ */ t(M, { search: l }),
39
+ x
40
+ ] })
37
41
  ] }),
38
- n && /* @__PURE__ */ m(C, { ...n })
42
+ u && /* @__PURE__ */ t(B, { ...u })
39
43
  ] });
40
44
  };
41
45
  export {
42
- O as Layout
46
+ T as Layout
43
47
  };
@@ -1,7 +1,23 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import '../../assets/LayoutSidebar.css';const d = "_sidebar_lkphj_1", i = {
3
- sidebar: d
4
- }, c = ({ color: a, hidden: s = !1, sticky: e, children: r }) => /* @__PURE__ */ t("aside", { className: i.sidebar, "data-color": a, "data-sticky": e, "aria-hidden": s, children: r });
2
+ import '../../assets/LayoutSidebar.css';const o = "_sidebar_bcso7_1", i = {
3
+ sidebar: o
4
+ }, c = ({
5
+ color: a,
6
+ hidden: s = !1,
7
+ sticky: e,
8
+ children: r,
9
+ useGlobalHeader: d = !1
10
+ }) => /* @__PURE__ */ t(
11
+ "aside",
12
+ {
13
+ className: i.sidebar,
14
+ "data-color": a,
15
+ "data-sticky": e,
16
+ "data-use-global-header": d,
17
+ "aria-hidden": s,
18
+ children: r
19
+ }
20
+ );
5
21
  export {
6
22
  c as LayoutSidebar
7
23
  };
@@ -1,23 +1,24 @@
1
- import { jsxs as S, jsx as g } from "react/jsx-runtime";
2
- import { useState as k } from "react";
1
+ import { jsxs as k, jsx as g } from "react/jsx-runtime";
2
+ import { useState as v } from "react";
3
3
  import "../../index-L8X2o7IH.js";
4
- import { useIsDesktop as v } from "../../hooks/useIsDesktop.js";
5
- import { useRootContext as j } from "../RootProvider/RootProvider.js";
6
- import { SearchbarBase as x } from "./SearchbarBase.js";
7
- import { SearchbarField as D } from "./SearchbarField.js";
8
- import { Autocomplete as P } from "./Autocomplete.js";
4
+ import { useIsDesktop as j } from "../../hooks/useIsDesktop.js";
5
+ import { useRootContext as x } from "../RootProvider/RootProvider.js";
6
+ import { SearchbarBase as D } from "./SearchbarBase.js";
7
+ import { SearchbarField as P } from "./SearchbarField.js";
8
+ import { Autocomplete as y } from "./Autocomplete.js";
9
9
  import "../Snackbar/useSnackbar.js";
10
- const K = ({
10
+ const L = ({
11
11
  className: I,
12
12
  autocomplete: a,
13
13
  expanded: u = !1,
14
14
  onClose: o,
15
15
  tabIndex: T,
16
+ useGlobalHeader: A = !1,
16
17
  ...e
17
18
  }) => {
18
- const [i, l] = k(!1), { previousId: A, openId: B } = j(), F = v();
19
- return /* @__PURE__ */ S(
20
- x,
19
+ const [i, l] = v(!1), { previousId: B, openId: F } = x(), S = j();
20
+ return /* @__PURE__ */ k(
21
+ D,
21
22
  {
22
23
  className: I,
23
24
  expanded: u,
@@ -25,11 +26,12 @@ const K = ({
25
26
  onBlurCapture: (t) => {
26
27
  var s, n, m, d, p, b, c, f;
27
28
  const r = (m = (n = (s = t.target) == null ? void 0 : s.attributes) == null ? void 0 : n.getNamedItem("data-testid")) == null ? void 0 : m.value;
28
- (d = t == null ? void 0 : t.relatedTarget) != null && d.closest('[data-autocomplete="true"]') || t.relatedTarget === null || (r === "search-button-clear" || r === "search-button-close" || r === "searchbar-input" && ((p = t.relatedTarget) == null ? void 0 : p.getAttribute("data-testid")) !== "searchbar-input" && ((b = t.relatedTarget) == null ? void 0 : b.getAttribute("data-testid")) !== "search-button-clear" && ((c = t.relatedTarget) == null ? void 0 : c.getAttribute("data-testid")) !== "search-button-close" && ((f = t.relatedTarget) == null ? void 0 : f.getAttribute("data-testid")) !== "autocomplete-list") && (F || A !== "menu" ? o == null || o() : B("menu"));
29
+ (d = t == null ? void 0 : t.relatedTarget) != null && d.closest('[data-autocomplete="true"]') || t.relatedTarget === null || (r === "search-button-clear" || r === "search-button-close" || r === "searchbar-input" && ((p = t.relatedTarget) == null ? void 0 : p.getAttribute("data-testid")) !== "searchbar-input" && ((b = t.relatedTarget) == null ? void 0 : b.getAttribute("data-testid")) !== "search-button-clear" && ((c = t.relatedTarget) == null ? void 0 : c.getAttribute("data-testid")) !== "search-button-close" && ((f = t.relatedTarget) == null ? void 0 : f.getAttribute("data-testid")) !== "autocomplete-list") && (S || B !== "menu" ? o == null || o() : F("menu"));
29
30
  },
31
+ useGlobalHeader: A,
30
32
  children: [
31
33
  /* @__PURE__ */ g(
32
- D,
34
+ P,
33
35
  {
34
36
  ...e,
35
37
  expanded: u,
@@ -47,7 +49,7 @@ const K = ({
47
49
  }
48
50
  ),
49
51
  a && /* @__PURE__ */ g(
50
- P,
52
+ y,
51
53
  {
52
54
  ...a,
53
55
  expanded: u,
@@ -61,5 +63,5 @@ const K = ({
61
63
  );
62
64
  };
63
65
  export {
64
- K as Searchbar
66
+ L as Searchbar
65
67
  };
@@ -1,18 +1,25 @@
1
- import { jsx as o } from "react/jsx-runtime";
1
+ import { jsx as h } from "react/jsx-runtime";
2
2
  import { c as b } from "../../index-L8X2o7IH.js";
3
- import '../../assets/SearchbarBase.css';const d = "_searchbar_1qnvb_1", h = "_searchbarExpanded_1qnvb_14", a = {
4
- searchbar: d,
5
- searchbarExpanded: h
6
- }, l = ({
3
+ import '../../assets/SearchbarBase.css';const l = "_searchbar_nnykn_1", d = "_searchbarExpanded_nnykn_14", _ = "_searchbarLocal_nnykn_22", a = {
4
+ searchbar: l,
5
+ searchbarExpanded: d,
6
+ searchbarLocal: _
7
+ }, m = ({
7
8
  className: r,
8
- children: e,
9
- expanded: s = !1,
9
+ children: s,
10
+ expanded: e = !1,
10
11
  onBlurCapture: c,
11
- autocomplete: t = !1
12
+ autocomplete: n = !1,
13
+ useGlobalHeader: o = !1
12
14
  }) => {
13
- const n = b(a.searchbar, r, s && a.searchbarExpanded);
14
- return /* @__PURE__ */ o("div", { className: n, "data-autocomplete": t, onBlurCapture: c, children: e });
15
+ const t = b(
16
+ a.searchbar,
17
+ r,
18
+ e && a.searchbarExpanded,
19
+ o && a.searchbarLocal
20
+ );
21
+ return /* @__PURE__ */ h("div", { className: t, "data-autocomplete": n, onBlurCapture: c, children: s });
15
22
  };
16
23
  export {
17
- l as SearchbarBase
24
+ m as SearchbarBase
18
25
  };
@@ -1,10 +1,10 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
2
  import { c as g } from "../../index-L8X2o7IH.js";
3
- import { Skeleton as h } from "../Skeleton/Skeleton.js";
3
+ import { Skeleton as l } from "../Skeleton/Skeleton.js";
4
4
  import { useHighlightedText as x } from "./useHighlightedText.js";
5
- import '../../assets/Typography.css';const f = "_typography_xs81l_1", T = {
5
+ import '../../assets/Typography.css';const f = "_typography_1h9tz_1", T = {
6
6
  typography: f
7
- }, z = ({
7
+ }, k = ({
8
8
  loading: o,
9
9
  loadingText: _ = "Loading ...",
10
10
  highlightWords: r,
@@ -18,7 +18,7 @@ import '../../assets/Typography.css';const f = "_typography_xs81l_1", T = {
18
18
  children: y,
19
19
  ...m
20
20
  }) => {
21
- const d = a, l = x(y, r || []);
21
+ const d = a, h = x(y, r || []);
22
22
  return /* @__PURE__ */ t(
23
23
  d,
24
24
  {
@@ -31,10 +31,10 @@ import '../../assets/Typography.css';const f = "_typography_xs81l_1", T = {
31
31
  "data-color": n,
32
32
  "data-variant": p,
33
33
  ...m,
34
- children: /* @__PURE__ */ t(h, { loading: o, children: l })
34
+ children: /* @__PURE__ */ t(l, { loading: o, children: h })
35
35
  }
36
36
  );
37
37
  };
38
38
  export {
39
- z as Typography
39
+ k as Typography
40
40
  };
@@ -0,0 +1,5 @@
1
+ import { SearchbarProps } from '../Searchbar';
2
+ export interface InboxSearchProps {
3
+ search: SearchbarProps;
4
+ }
5
+ export declare const InboxSearch: ({ search }: InboxSearchProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export { InboxSearch, type InboxSearchProps } from './InboxSearch';
@@ -10,5 +10,6 @@ export interface LayoutSidebarProps {
10
10
  hidden?: boolean;
11
11
  sticky?: boolean;
12
12
  children?: ReactNode;
13
+ useGlobalHeader?: boolean;
13
14
  }
14
- export declare const LayoutSidebar: ({ color, hidden, sticky, children }: LayoutSidebarProps) => import("react/jsx-runtime").JSX.Element;
15
+ export declare const LayoutSidebar: ({ color, hidden, sticky, children, useGlobalHeader, }: LayoutSidebarProps) => import("react/jsx-runtime").JSX.Element;
@@ -4,5 +4,6 @@ export interface SearchbarProps extends SearchbarFieldProps {
4
4
  autocomplete?: AutocompleteProps;
5
5
  expanded?: boolean;
6
6
  tabIndex?: number;
7
+ useGlobalHeader?: boolean;
7
8
  }
8
- export declare const Searchbar: ({ className, autocomplete, expanded, onClose, tabIndex, ...search }: SearchbarProps) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const Searchbar: ({ className, autocomplete, expanded, onClose, tabIndex, useGlobalHeader, ...search }: SearchbarProps) => import("react/jsx-runtime").JSX.Element;
@@ -2,7 +2,7 @@ import { StoryObj } from '@storybook/react-vite';
2
2
  import { SearchbarProps } from '..';
3
3
  declare const meta: {
4
4
  title: string;
5
- component: ({ className, autocomplete, expanded, onClose, tabIndex, ...search }: SearchbarProps) => import("react/jsx-runtime").JSX.Element;
5
+ component: ({ className, autocomplete, expanded, onClose, tabIndex, useGlobalHeader, ...search }: SearchbarProps) => import("react/jsx-runtime").JSX.Element;
6
6
  parameters: {};
7
7
  args: {
8
8
  placeholder: string;
@@ -5,5 +5,6 @@ export interface SearchbarBaseProps {
5
5
  expanded?: boolean;
6
6
  autocomplete?: boolean;
7
7
  onBlurCapture?: React.FocusEventHandler<HTMLDivElement>;
8
+ useGlobalHeader?: boolean;
8
9
  }
9
- export declare const SearchbarBase: ({ className, children, expanded, onBlurCapture, autocomplete, }: SearchbarBaseProps) => import("react/jsx-runtime").JSX.Element;
10
+ export declare const SearchbarBase: ({ className, children, expanded, onBlurCapture, autocomplete, useGlobalHeader, }: SearchbarBaseProps) => import("react/jsx-runtime").JSX.Element;
@@ -12,4 +12,6 @@ export default meta;
12
12
  type Story = StoryObj<typeof meta>;
13
13
  export declare const Default: Story;
14
14
  export declare const HighlightWords: Story;
15
+ export declare const Article: Story;
16
+ export declare const Article2: Story;
15
17
  export declare const Tables: Story;
@@ -9,6 +9,7 @@ declare const meta: {
9
9
  export default meta;
10
10
  export declare const InboxPage: () => import("react/jsx-runtime").JSX.Element;
11
11
  export declare const InboxEmptyPage: () => import("react/jsx-runtime").JSX.Element;
12
+ export declare const InboxWithGlobalSearch: () => import("react/jsx-runtime").JSX.Element;
12
13
  export declare const SearchPage: () => import("react/jsx-runtime").JSX.Element;
13
14
  export declare const SearchEmptyPage: () => import("react/jsx-runtime").JSX.Element;
14
15
  export declare const DraftsPage: () => import("react/jsx-runtime").JSX.Element;
@@ -12,3 +12,4 @@ export declare const Search: () => import("react/jsx-runtime").JSX.Element;
12
12
  export declare const Category: () => import("react/jsx-runtime").JSX.Element;
13
13
  export declare const Topic: () => import("react/jsx-runtime").JSX.Element;
14
14
  export declare const Service: () => import("react/jsx-runtime").JSX.Element;
15
+ export declare const ArticlePage: () => import("react/jsx-runtime").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@altinn/altinn-components",
3
- "version": "0.45.3",
3
+ "version": "0.46.0",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist/",