@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.
- package/dist/assets/LayoutSidebar.css +1 -1
- package/dist/assets/SearchbarBase.css +1 -1
- package/dist/assets/Typography.css +1 -1
- package/dist/components/Account/AccountMenu.js +23 -23
- package/dist/components/Article/ArticleHeader.js +5 -5
- package/dist/components/InboxSearch/InboxSearch.js +30 -0
- package/dist/components/InboxSearch/index.js +4 -0
- package/dist/components/Layout/Layout.js +33 -29
- package/dist/components/Layout/LayoutSidebar.js +19 -3
- package/dist/components/Searchbar/Searchbar.js +17 -15
- package/dist/components/Searchbar/SearchbarBase.js +18 -11
- package/dist/components/Typography/Typography.js +6 -6
- package/dist/types/lib/components/InboxSearch/InboxSearch.d.ts +5 -0
- package/dist/types/lib/components/InboxSearch/index.d.ts +1 -0
- package/dist/types/lib/components/Layout/LayoutSidebar.d.ts +2 -1
- package/dist/types/lib/components/Searchbar/Searchbar.d.ts +2 -1
- package/dist/types/lib/components/Searchbar/Searchbar.stories.d.ts +1 -1
- package/dist/types/lib/components/Searchbar/SearchbarBase.d.ts +2 -1
- package/dist/types/lib/components/Typography/Typography.stories.d.ts +2 -0
- package/dist/types/lib/stories/Inbox.stories.d.ts +1 -0
- package/dist/types/lib/stories/Portal.stories.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
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
|
-
.
|
|
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
|
-
.
|
|
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
|
|
3
|
-
import { useState as
|
|
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
|
|
6
|
+
import { Menu as S } from "../Menu/Menu.js";
|
|
7
7
|
import "../Snackbar/useSnackbar.js";
|
|
8
|
-
const
|
|
8
|
+
const j = (d) => `${d} hits`, B = ({
|
|
9
9
|
items: d = [],
|
|
10
10
|
groups: v = {},
|
|
11
|
-
search:
|
|
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
|
|
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
|
-
})), [
|
|
28
|
-
|
|
29
|
-
(
|
|
30
|
-
}, [
|
|
31
|
-
const F = C || ((o,
|
|
32
|
-
var g,
|
|
33
|
-
return ((g = o == null ? void 0 : o.name) == null ? void 0 : g.toLowerCase().includes(
|
|
34
|
-
}), n =
|
|
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: [
|
|
39
|
-
})) : p, b =
|
|
38
|
+
highlightWords: [l]
|
|
39
|
+
})) : p, b = l ? {
|
|
40
40
|
search: {
|
|
41
|
-
title: ((
|
|
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:
|
|
46
|
-
placeholder: (
|
|
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__ */
|
|
53
|
-
|
|
52
|
+
return /* @__PURE__ */ c(
|
|
53
|
+
S,
|
|
54
54
|
{
|
|
55
55
|
variant: "default",
|
|
56
|
-
search:
|
|
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
|
-
|
|
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
|
|
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
|
|
8
|
-
const
|
|
9
|
-
/* @__PURE__ */ e(
|
|
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
|
-
|
|
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
|
+
};
|
|
@@ -1,43 +1,47 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
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
|
|
5
|
-
import { LayoutContent as
|
|
6
|
-
import { LayoutSidebar as
|
|
7
|
-
import { Footer as
|
|
8
|
-
import { GlobalHeader as
|
|
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
|
|
12
|
-
import { Menu as
|
|
13
|
-
import { Header as
|
|
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 {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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:
|
|
23
|
-
children:
|
|
24
|
-
skipLink:
|
|
25
|
-
useGlobalHeader:
|
|
23
|
+
content: n = {},
|
|
24
|
+
children: x,
|
|
25
|
+
skipLink: f,
|
|
26
|
+
useGlobalHeader: p = !1
|
|
26
27
|
}) => {
|
|
27
|
-
const { currentId:
|
|
28
|
-
return /* @__PURE__ */
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
/* @__PURE__ */
|
|
32
|
-
o && /* @__PURE__ */
|
|
33
|
-
(o == null ? void 0 : o.menu) && /* @__PURE__ */
|
|
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__ */
|
|
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
|
-
|
|
42
|
+
u && /* @__PURE__ */ t(B, { ...u })
|
|
39
43
|
] });
|
|
40
44
|
};
|
|
41
45
|
export {
|
|
42
|
-
|
|
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
|
|
3
|
-
sidebar:
|
|
4
|
-
}, c = ({
|
|
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
|
|
2
|
-
import { useState as
|
|
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
|
|
5
|
-
import { useRootContext as
|
|
6
|
-
import { SearchbarBase as
|
|
7
|
-
import { SearchbarField as
|
|
8
|
-
import { Autocomplete as
|
|
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
|
|
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] =
|
|
19
|
-
return /* @__PURE__ */
|
|
20
|
-
|
|
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") && (
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
66
|
+
L as Searchbar
|
|
65
67
|
};
|
|
@@ -1,18 +1,25 @@
|
|
|
1
|
-
import { jsx as
|
|
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 = "
|
|
4
|
-
searchbar:
|
|
5
|
-
searchbarExpanded:
|
|
6
|
-
|
|
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:
|
|
9
|
-
expanded:
|
|
9
|
+
children: s,
|
|
10
|
+
expanded: e = !1,
|
|
10
11
|
onBlurCapture: c,
|
|
11
|
-
autocomplete:
|
|
12
|
+
autocomplete: n = !1,
|
|
13
|
+
useGlobalHeader: o = !1
|
|
12
14
|
}) => {
|
|
13
|
-
const
|
|
14
|
-
|
|
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
|
-
|
|
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
|
|
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 = "
|
|
5
|
+
import '../../assets/Typography.css';const f = "_typography_1h9tz_1", T = {
|
|
6
6
|
typography: f
|
|
7
|
-
},
|
|
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,
|
|
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(
|
|
34
|
+
children: /* @__PURE__ */ t(l, { loading: o, children: h })
|
|
35
35
|
}
|
|
36
36
|
);
|
|
37
37
|
};
|
|
38
38
|
export {
|
|
39
|
-
|
|
39
|
+
k as Typography
|
|
40
40
|
};
|
|
@@ -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;
|