@altinn/altinn-components 0.36.7 → 0.37.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/DialogListItem.css +1 -1
- package/dist/assets/DrawerBody.css +1 -1
- package/dist/assets/Heading.css +1 -1
- package/dist/assets/MenuItemsVirtual.css +1 -1
- package/dist/assets/ScopeListItem.css +1 -1
- package/dist/components/Dialog/DialogList.js +13 -13
- package/dist/components/Dialog/DialogListItem.js +126 -104
- package/dist/components/Dropdown/DrawerBody.js +3 -3
- package/dist/components/List/ListItem.js +39 -38
- package/dist/components/List/ListItemLabel.js +0 -2
- package/dist/components/Menu/MenuItemsVirtual.js +9 -9
- package/dist/components/Searchbar/AutocompleteItem.js +10 -12
- package/dist/components/Searchbar/ScopeListItem.js +3 -3
- package/dist/components/Typography/Heading.js +36 -30
- package/dist/components/Typography/Typography.js +34 -29
- package/dist/components/Typography/useHighlightedText.js +53 -0
- package/dist/types/lib/components/Dialog/DialogList.d.ts +2 -1
- package/dist/types/lib/components/Dialog/DialogList.stories.d.ts +2 -1
- package/dist/types/lib/components/Dialog/DialogListItem.d.ts +3 -1
- package/dist/types/lib/components/Typography/Heading.d.ts +2 -1
- package/dist/types/lib/components/Typography/Heading.stories.d.ts +2 -1
- package/dist/types/lib/components/Typography/Typography.d.ts +2 -1
- package/dist/types/lib/components/Typography/Typography.stories.d.ts +2 -1
- package/dist/types/lib/components/Typography/useHighlightedText.d.ts +2 -0
- package/dist/types/lib/stories/Inbox.stories.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._border_jg0tu_1{pointer-events:none;border-left:.25rem solid;border-color:var(--dsc-border-color);display:flex;flex-direction:column;margin-top:.25em;margin-bottom:.25em;--dsc-item-my: 0;--dsc-border-color: var(--ds-color-neutral-surface-tinted);--dsc-title-weight: 400;--dsc-title-font-size: 1rem;--dsc-title-line-height: 1.25;--dsc-summary-font-size: .875rem}._border_jg0tu_1[data-selected=true]{--dsc-border-color: var(--ds-color-surface-tinted)}._border_jg0tu_1[data-unread=true]{--dsc-border-color: var(--ds-color-surface-active);--dsc-title-weight: 600}._border_jg0tu_1[data-trashed=true] ._title_jg0tu_27{text-decoration:line-through}._border_jg0tu_1[data-size=xs],._border_jg0tu_1[data-size=sm]{width:100%;flex-direction:row;align-items:center;padding-left:.75rem}._border_jg0tu_1[data-size=md]{padding-left:.75rem;row-gap:.5rem}._border_jg0tu_1[data-size=lg]{--dsc-title-font-size: 1.25rem;--dsc-summary-font-size: 1rem;padding-left:.875rem;row-gap:.875rem}._border_jg0tu_1[data-size=xl]{--dsc-title-font-size: 1.25rem;--dsc-summary-font-size: 1rem;padding-left:1rem;row-gap:1rem}._controls_jg0tu_58{position:absolute;top:0;right:0;margin:.25em}._header_jg0tu_65{position:relative;display:flex;flex-direction:column;row-gap:.25rem}._header_jg0tu_65[data-size=xs],._header_jg0tu_65[data-size=sm]{display:flex;flex-direction:row}._header_jg0tu_65 mark{background-color:var(--ds-color-surface-tinted)}._summary_jg0tu_82{font-size:var(--dsc-summary-font-size);font-weight:400;line-height:1.375;color:var(--ds-color-neutral-text-subtle);display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;margin:0}._footer_jg0tu_96{width:100%;padding-right:2rem}._seenBy_jg0tu_101{position:absolute;right:0;bottom:0;margin:.25rem -1rem}._heading_jg0tu_108{padding-right:1.25rem;display:inline-flex;align-items:center;column-gap:.5em}._title_jg0tu_27{font-size:var(--dsc-title-font-size);font-weight:var(--dsc-title-font-weight);line-height:var(--dsc-title-line-height);margin:0}._title_jg0tu_27[data-size=md],._title_jg0tu_27[data-size=lg],._title_jg0tu_27[data-size=xl]{display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._body_oqhlu_1{width:100%;padding:0 .5em;overflow-y:visible}
|
package/dist/assets/Heading.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._heading_1dyne_1{font-size:1em;line-height:1.25;margin:0}._heading_1dyne_1[data-max-rows="1"]{display:-webkit-box;-webkit-line-clamp:1;line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}._heading_1dyne_1[data-max-rows="2"]{display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}._heading_1dyne_1[data-variant=default]{background-color:transparent;color:var(--ds-color-text-default)}._heading_1dyne_1[data-variant=subtle]{background-color:transparent;color:var(--ds-color-text-subtle)}._heading_1dyne_1[data-weight=normal]{font-weight:400}._heading_1dyne_1[data-weight=medium]{font-weight:500}._heading_1dyne_1[data-weight=bold]{font-weight:600}._heading_1dyne_1[data-size=inherit]{font-size:1em}._heading_1dyne_1[data-size=xxs]{font-size:.75rem}._heading_1dyne_1[data-size=xs]{font-size:.875rem}._heading_1dyne_1[data-size=sm]{font-size:1rem}._heading_1dyne_1[data-size=md]{font-size:1.125rem}._heading_1dyne_1[data-size=lg]{font-size:1.25rem}._heading_1dyne_1[data-size=xl]{font-size:1.5rem}._heading_1dyne_1[data-leading=none]{line-height:1}._heading_1dyne_1[data-leading=normal]{line-height:1.5}._heading_1dyne_1[data-leading=tight]{line-height:1.25}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._virtualScrollRef_u54k3_1{max-height:400px;overflow-y:auto;padding:0 .5em;margin:0 -.5em}._virtualMenuListItem_u54k3_8{position:absolute;top:0;left:0;width:100%}._virtualMenuListItem_u54k3_8>*{margin:0}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._item_4v2ol_1 mark{background-color:transparent;font-weight:400;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:4px}._item_4v2ol_1 mark:before{content:"«"}._item_4v2ol_1 mark:after{content:"»"}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as y } from "react/jsx-runtime";
|
|
2
2
|
import { createElement as r } from "react";
|
|
3
3
|
import "../../index-L8X2o7IH.js";
|
|
4
|
-
import { useMenu as
|
|
4
|
+
import { useMenu as d } from "../../hooks/useMenu.js";
|
|
5
5
|
import "../RootProvider/RootProvider.js";
|
|
6
|
-
import { DialogListGroup as
|
|
7
|
-
import { DialogListItem as
|
|
6
|
+
import { DialogListGroup as g } from "./DialogListGroup.js";
|
|
7
|
+
import { DialogListItem as u } from "./DialogListItem.js";
|
|
8
8
|
import "../Snackbar/useSnackbar.js";
|
|
9
|
-
import { Section as
|
|
10
|
-
const
|
|
11
|
-
const { menu: o } =
|
|
9
|
+
import { Section as k } from "../Page/Section.js";
|
|
10
|
+
const v = ({ items: i, groups: e = {}, sortGroupBy: m, highlightWords: s, isLoading: p }) => {
|
|
11
|
+
const { menu: o } = d({
|
|
12
12
|
items: i,
|
|
13
13
|
groups: e,
|
|
14
14
|
groupByKey: "groupId",
|
|
15
15
|
keyboardEvents: !1,
|
|
16
16
|
sortGroupBy: m
|
|
17
17
|
});
|
|
18
|
-
return /* @__PURE__ */
|
|
19
|
-
const
|
|
20
|
-
return /* @__PURE__ */ r(
|
|
21
|
-
const
|
|
22
|
-
return /* @__PURE__ */ r(
|
|
18
|
+
return /* @__PURE__ */ y(k, { spacing: 3, margin: "section", "aria-busy": p, children: o == null ? void 0 : o.map((t, a) => {
|
|
19
|
+
const n = t.props || {};
|
|
20
|
+
return /* @__PURE__ */ r(g, { ...n, key: "dialog-list-item" + a }, t == null ? void 0 : t.items.map((l, c) => {
|
|
21
|
+
const f = l.props || {};
|
|
22
|
+
return /* @__PURE__ */ r(u, { ...f, highlightWords: s, key: "dialog-list-item" + c });
|
|
23
23
|
}));
|
|
24
24
|
}) });
|
|
25
25
|
};
|
|
26
26
|
export {
|
|
27
|
-
|
|
27
|
+
v as DialogList
|
|
28
28
|
};
|
|
@@ -1,151 +1,173 @@
|
|
|
1
|
-
import { jsx as a, jsxs as
|
|
1
|
+
import { jsx as a, jsxs as c } from "react/jsx-runtime";
|
|
2
2
|
import "../../index-L8X2o7IH.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import {
|
|
5
|
-
import { Badge as J } from "../Badge/Badge.js";
|
|
4
|
+
import { Badge as O } from "../Badge/Badge.js";
|
|
6
5
|
import "../RootProvider/RootProvider.js";
|
|
7
|
-
import { Heading as
|
|
8
|
-
import { DialogMetadata as
|
|
9
|
-
import { DialogByline as
|
|
10
|
-
import { MetaItem as
|
|
11
|
-
import { ListItemLabel as
|
|
12
|
-
import { ListItem as
|
|
6
|
+
import { Heading as N } from "../Typography/Heading.js";
|
|
7
|
+
import { DialogMetadata as y } from "./DialogMetadata.js";
|
|
8
|
+
import { DialogByline as P } from "./DialogByline.js";
|
|
9
|
+
import { MetaItem as Q } from "../Metadata/MetaItem.js";
|
|
10
|
+
import { ListItemLabel as S } from "../List/ListItemLabel.js";
|
|
11
|
+
import { ListItem as u } from "../List/ListItem.js";
|
|
13
12
|
import "../Snackbar/useSnackbar.js";
|
|
14
|
-
import '../../assets/DialogListItem.css';const T = "
|
|
13
|
+
import '../../assets/DialogListItem.css';const T = "_border_jg0tu_1", U = "_title_jg0tu_27", X = "_controls_jg0tu_58", Y = "_header_jg0tu_65", Z = "_summary_jg0tu_82", $ = "_footer_jg0tu_96", W = "_seenBy_jg0tu_101", z = "_heading_jg0tu_108", r = {
|
|
15
14
|
border: T,
|
|
16
15
|
title: U,
|
|
17
|
-
controls:
|
|
18
|
-
header:
|
|
19
|
-
summary:
|
|
20
|
-
footer:
|
|
21
|
-
seenBy:
|
|
22
|
-
heading:
|
|
23
|
-
},
|
|
24
|
-
size:
|
|
25
|
-
state:
|
|
26
|
-
loading:
|
|
27
|
-
controls:
|
|
16
|
+
controls: X,
|
|
17
|
+
header: Y,
|
|
18
|
+
summary: Z,
|
|
19
|
+
footer: $,
|
|
20
|
+
seenBy: W,
|
|
21
|
+
heading: z
|
|
22
|
+
}, ha = ({
|
|
23
|
+
size: e = "xl",
|
|
24
|
+
state: A = "normal",
|
|
25
|
+
loading: t,
|
|
26
|
+
controls: B,
|
|
28
27
|
select: aa,
|
|
29
28
|
selected: m,
|
|
30
|
-
status:
|
|
31
|
-
sender:
|
|
32
|
-
recipient:
|
|
33
|
-
recipientLabel:
|
|
34
|
-
grouped:
|
|
35
|
-
updatedAt:
|
|
29
|
+
status: o,
|
|
30
|
+
sender: d,
|
|
31
|
+
recipient: w,
|
|
32
|
+
recipientLabel: I = "to",
|
|
33
|
+
grouped: D = !1,
|
|
34
|
+
updatedAt: l,
|
|
36
35
|
updatedAtLabel: _,
|
|
37
36
|
archived: h,
|
|
38
|
-
archivedAt:
|
|
39
|
-
archivedAtLabel:
|
|
37
|
+
archivedAt: L,
|
|
38
|
+
archivedAtLabel: M,
|
|
40
39
|
trashed: f,
|
|
41
|
-
trashedAt:
|
|
42
|
-
trashedAtLabel:
|
|
40
|
+
trashedAt: R,
|
|
41
|
+
trashedAtLabel: H,
|
|
43
42
|
badge: p,
|
|
44
|
-
dueAt:
|
|
45
|
-
dueAtLabel:
|
|
46
|
-
unread:
|
|
47
|
-
seenByLog:
|
|
48
|
-
draftsLabel:
|
|
49
|
-
sentCount:
|
|
50
|
-
receivedCount:
|
|
51
|
-
attachmentsCount:
|
|
52
|
-
attachmentsLabel:
|
|
53
|
-
title:
|
|
54
|
-
description:
|
|
55
|
-
summary:
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
43
|
+
dueAt: V,
|
|
44
|
+
dueAtLabel: k,
|
|
45
|
+
unread: n,
|
|
46
|
+
seenByLog: g,
|
|
47
|
+
draftsLabel: q,
|
|
48
|
+
sentCount: C,
|
|
49
|
+
receivedCount: E,
|
|
50
|
+
attachmentsCount: F,
|
|
51
|
+
attachmentsLabel: G,
|
|
52
|
+
title: i,
|
|
53
|
+
description: J,
|
|
54
|
+
summary: s,
|
|
55
|
+
highlightWords: b,
|
|
56
|
+
variant: K = "default",
|
|
57
|
+
id: j,
|
|
58
|
+
...v
|
|
59
59
|
}) => {
|
|
60
|
-
const
|
|
61
|
-
return
|
|
62
|
-
|
|
60
|
+
const x = m ? "tinted" : K;
|
|
61
|
+
return e === "xs" || e === "sm" ? /* @__PURE__ */ a(
|
|
62
|
+
u,
|
|
63
63
|
{
|
|
64
|
-
...
|
|
65
|
-
id:
|
|
66
|
-
size:
|
|
64
|
+
...v,
|
|
65
|
+
id: j,
|
|
66
|
+
size: e,
|
|
67
67
|
selected: m,
|
|
68
|
-
variant:
|
|
69
|
-
ariaLabel:
|
|
68
|
+
variant: x,
|
|
69
|
+
ariaLabel: i,
|
|
70
70
|
label: /* @__PURE__ */ a(
|
|
71
71
|
"div",
|
|
72
72
|
{
|
|
73
|
-
className:
|
|
74
|
-
"data-status":
|
|
73
|
+
className: r.border,
|
|
74
|
+
"data-status": o == null ? void 0 : o.value,
|
|
75
75
|
"data-selected": m,
|
|
76
|
-
"data-size":
|
|
77
|
-
"data-unread":
|
|
76
|
+
"data-size": e,
|
|
77
|
+
"data-unread": n,
|
|
78
78
|
"data-archived": h,
|
|
79
79
|
"data-trashed": f,
|
|
80
|
-
"data-loading":
|
|
81
|
-
children: /* @__PURE__ */ a(
|
|
80
|
+
"data-loading": t,
|
|
81
|
+
children: /* @__PURE__ */ a(S, { loading: t, size: e, title: i, description: s || J })
|
|
82
82
|
}
|
|
83
83
|
),
|
|
84
|
-
badge: /* @__PURE__ */ a(
|
|
85
|
-
title:
|
|
84
|
+
badge: /* @__PURE__ */ a(y, { loading: t, sender: d, updatedAt: l, updatedAtLabel: _ }),
|
|
85
|
+
title: i
|
|
86
86
|
}
|
|
87
87
|
) : /* @__PURE__ */ a(
|
|
88
|
-
|
|
88
|
+
u,
|
|
89
89
|
{
|
|
90
|
-
...
|
|
91
|
-
id:
|
|
92
|
-
size:
|
|
90
|
+
...v,
|
|
91
|
+
id: j,
|
|
92
|
+
size: e,
|
|
93
93
|
selected: m,
|
|
94
|
-
variant:
|
|
95
|
-
controls: /* @__PURE__ */ a("div", { className:
|
|
96
|
-
title:
|
|
97
|
-
label: /* @__PURE__ */
|
|
94
|
+
variant: x,
|
|
95
|
+
controls: /* @__PURE__ */ a("div", { className: r.controls, children: B }),
|
|
96
|
+
title: i,
|
|
97
|
+
label: /* @__PURE__ */ c(
|
|
98
98
|
"div",
|
|
99
99
|
{
|
|
100
|
-
className:
|
|
100
|
+
className: r.border,
|
|
101
101
|
"data-selected": m,
|
|
102
|
-
"data-status":
|
|
103
|
-
"data-size":
|
|
104
|
-
"data-unread":
|
|
102
|
+
"data-status": o == null ? void 0 : o.value,
|
|
103
|
+
"data-size": e,
|
|
104
|
+
"data-unread": n,
|
|
105
105
|
"data-archived": h,
|
|
106
106
|
"data-trashed": f,
|
|
107
|
-
"data-loading":
|
|
107
|
+
"data-loading": t,
|
|
108
108
|
children: [
|
|
109
|
-
/* @__PURE__ */
|
|
110
|
-
/* @__PURE__ */
|
|
111
|
-
/* @__PURE__ */ a(
|
|
112
|
-
|
|
109
|
+
/* @__PURE__ */ c("header", { className: r.header, "data-size": e, children: [
|
|
110
|
+
/* @__PURE__ */ c("span", { className: r.heading, children: [
|
|
111
|
+
/* @__PURE__ */ a(
|
|
112
|
+
N,
|
|
113
|
+
{
|
|
114
|
+
as: "h2",
|
|
115
|
+
highlightWords: b,
|
|
116
|
+
weight: n ? "bold" : "normal",
|
|
117
|
+
loading: t,
|
|
118
|
+
maxRows: 2,
|
|
119
|
+
className: r.title,
|
|
120
|
+
children: i
|
|
121
|
+
}
|
|
122
|
+
),
|
|
123
|
+
p && /* @__PURE__ */ a(O, { variant: "tinted", size: "xs", ...p })
|
|
113
124
|
] }),
|
|
114
125
|
/* @__PURE__ */ a(
|
|
115
|
-
|
|
126
|
+
P,
|
|
116
127
|
{
|
|
117
128
|
size: "xs",
|
|
118
|
-
loading:
|
|
119
|
-
sender:
|
|
120
|
-
recipient:
|
|
121
|
-
recipientLabel:
|
|
122
|
-
grouped:
|
|
129
|
+
loading: t,
|
|
130
|
+
sender: d,
|
|
131
|
+
recipient: w,
|
|
132
|
+
recipientLabel: I,
|
|
133
|
+
grouped: D
|
|
123
134
|
}
|
|
124
135
|
),
|
|
125
|
-
|
|
136
|
+
s && /* @__PURE__ */ a(
|
|
137
|
+
N,
|
|
138
|
+
{
|
|
139
|
+
as: "h3",
|
|
140
|
+
highlightWords: b,
|
|
141
|
+
weight: "normal",
|
|
142
|
+
className: r.summary,
|
|
143
|
+
loading: t,
|
|
144
|
+
maxRows: 2,
|
|
145
|
+
children: s
|
|
146
|
+
}
|
|
147
|
+
)
|
|
126
148
|
] }),
|
|
127
149
|
/* @__PURE__ */ a(
|
|
128
|
-
|
|
150
|
+
y,
|
|
129
151
|
{
|
|
130
|
-
className:
|
|
131
|
-
loading:
|
|
132
|
-
status:
|
|
133
|
-
draftsLabel:
|
|
134
|
-
sentCount:
|
|
135
|
-
receivedCount:
|
|
136
|
-
updatedAt:
|
|
152
|
+
className: r.footer,
|
|
153
|
+
loading: t,
|
|
154
|
+
status: o,
|
|
155
|
+
draftsLabel: q,
|
|
156
|
+
sentCount: C,
|
|
157
|
+
receivedCount: E,
|
|
158
|
+
updatedAt: l,
|
|
137
159
|
updatedAtLabel: _,
|
|
138
|
-
archivedAt:
|
|
139
|
-
archivedAtLabel:
|
|
140
|
-
trashedAt:
|
|
141
|
-
trashedAtLabel:
|
|
142
|
-
dueAt:
|
|
143
|
-
dueAtLabel:
|
|
144
|
-
attachmentsCount:
|
|
145
|
-
attachmentsLabel:
|
|
160
|
+
archivedAt: L,
|
|
161
|
+
archivedAtLabel: M,
|
|
162
|
+
trashedAt: R,
|
|
163
|
+
trashedAtLabel: H,
|
|
164
|
+
dueAt: V,
|
|
165
|
+
dueAtLabel: k,
|
|
166
|
+
attachmentsCount: F,
|
|
167
|
+
attachmentsLabel: G
|
|
146
168
|
}
|
|
147
169
|
),
|
|
148
|
-
|
|
170
|
+
g && /* @__PURE__ */ a(Q, { className: r.seenBy, icon: { items: g.items } })
|
|
149
171
|
]
|
|
150
172
|
}
|
|
151
173
|
)
|
|
@@ -153,5 +175,5 @@ import '../../assets/DialogListItem.css';const T = "_border_1cz0s_1", U = "_titl
|
|
|
153
175
|
);
|
|
154
176
|
};
|
|
155
177
|
export {
|
|
156
|
-
|
|
178
|
+
ha as DialogListItem
|
|
157
179
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { c as t } from "../../index-L8X2o7IH.js";
|
|
3
|
-
import '../../assets/DrawerBody.css';const c = "
|
|
3
|
+
import '../../assets/DrawerBody.css';const c = "_body_oqhlu_1", d = {
|
|
4
4
|
body: c
|
|
5
|
-
},
|
|
5
|
+
}, m = ({ className: o, children: r }) => /* @__PURE__ */ s("div", { className: t(d.body, o), children: r });
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
m as DrawerBody
|
|
8
8
|
};
|
|
@@ -1,66 +1,67 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { jsxs as H, jsx as N } from "react/jsx-runtime";
|
|
2
|
+
import { c as b } from "../../index-L8X2o7IH.js";
|
|
3
|
+
import { ListItemBase as k } from "./ListItemBase.js";
|
|
4
|
+
import { ListItemHeader as q } from "./ListItemHeader.js";
|
|
5
|
+
import '../../assets/ListItem.css';const A = "_item_1nwey_3", C = {
|
|
6
|
+
item: A
|
|
7
|
+
}, J = ({
|
|
8
|
+
className: i,
|
|
9
|
+
color: m,
|
|
10
|
+
variant: c = "default",
|
|
10
11
|
shadow: n = "xs",
|
|
11
|
-
border:
|
|
12
|
-
loading:
|
|
13
|
-
collapsible:
|
|
12
|
+
border: f = "none",
|
|
13
|
+
loading: e,
|
|
14
|
+
collapsible: p,
|
|
14
15
|
expanded: t,
|
|
15
16
|
size: o,
|
|
16
17
|
icon: l,
|
|
17
18
|
label: s,
|
|
18
19
|
title: a,
|
|
19
|
-
description:
|
|
20
|
-
badge:
|
|
21
|
-
linkIcon:
|
|
20
|
+
description: u,
|
|
21
|
+
badge: L,
|
|
22
|
+
linkIcon: x = !1,
|
|
22
23
|
select: y,
|
|
23
24
|
selected: I,
|
|
24
25
|
controls: _,
|
|
25
26
|
children: h,
|
|
26
|
-
interactive:
|
|
27
|
+
interactive: r,
|
|
27
28
|
id: j,
|
|
28
|
-
...
|
|
29
|
+
...w
|
|
29
30
|
}) => {
|
|
30
|
-
const
|
|
31
|
-
return /* @__PURE__ */
|
|
32
|
-
|
|
31
|
+
const B = typeof s == "function" ? s() : s;
|
|
32
|
+
return /* @__PURE__ */ H(
|
|
33
|
+
k,
|
|
33
34
|
{
|
|
34
|
-
className:
|
|
35
|
+
className: b(C.item, i),
|
|
35
36
|
size: o,
|
|
36
|
-
color:
|
|
37
|
-
variant:
|
|
37
|
+
color: m,
|
|
38
|
+
variant: c,
|
|
38
39
|
shadow: n,
|
|
39
|
-
border:
|
|
40
|
+
border: f,
|
|
40
41
|
selected: I,
|
|
41
42
|
expanded: t,
|
|
42
|
-
loading:
|
|
43
|
-
interactive:
|
|
43
|
+
loading: e,
|
|
44
|
+
interactive: r,
|
|
44
45
|
id: j,
|
|
45
46
|
children: [
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
|
|
47
|
+
/* @__PURE__ */ N(
|
|
48
|
+
q,
|
|
48
49
|
{
|
|
49
|
-
color:
|
|
50
|
-
loading:
|
|
51
|
-
linkIcon:
|
|
52
|
-
collapsible:
|
|
50
|
+
color: m,
|
|
51
|
+
loading: e,
|
|
52
|
+
linkIcon: x,
|
|
53
|
+
collapsible: p,
|
|
53
54
|
expanded: t,
|
|
54
55
|
select: y,
|
|
55
56
|
title: a,
|
|
56
57
|
size: o,
|
|
57
|
-
description:
|
|
58
|
+
description: u,
|
|
58
59
|
icon: l,
|
|
59
|
-
badge:
|
|
60
|
+
badge: L,
|
|
60
61
|
controls: _,
|
|
61
|
-
interactive:
|
|
62
|
-
...
|
|
63
|
-
children:
|
|
62
|
+
interactive: r,
|
|
63
|
+
...w,
|
|
64
|
+
children: B
|
|
64
65
|
}
|
|
65
66
|
),
|
|
66
67
|
t ? h : null
|
|
@@ -69,5 +70,5 @@ import '../../assets/ListItem.css';const k = "_item_1nwey_3", q = {
|
|
|
69
70
|
);
|
|
70
71
|
};
|
|
71
72
|
export {
|
|
72
|
-
|
|
73
|
+
J as ListItem
|
|
73
74
|
};
|
|
@@ -14,7 +14,6 @@ const d = (r) => {
|
|
|
14
14
|
const s = {
|
|
15
15
|
as: "h3",
|
|
16
16
|
size: "sm"
|
|
17
|
-
// leading: "tight",
|
|
18
17
|
};
|
|
19
18
|
return j(r) ? { ...s, ...r } : z(r) ? {
|
|
20
19
|
...s,
|
|
@@ -26,7 +25,6 @@ const d = (r) => {
|
|
|
26
25
|
size: "xs",
|
|
27
26
|
weight: "normal",
|
|
28
27
|
variant: "subtle"
|
|
29
|
-
// leading: "tight",
|
|
30
28
|
};
|
|
31
29
|
return j(r) ? { ...s, ...r } : z(r) ? {
|
|
32
30
|
...s,
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as v, jsx as i } from "react/jsx-runtime";
|
|
3
|
-
import { u as
|
|
4
|
-
import { useRef as
|
|
3
|
+
import { u as E } from "../../index-D-VWMqlv.js";
|
|
4
|
+
import { useRef as b, useEffect as R } from "react";
|
|
5
5
|
import "../../index-L8X2o7IH.js";
|
|
6
6
|
import { useMenu as T } from "../../hooks/useMenu.js";
|
|
7
7
|
import "../RootProvider/RootProvider.js";
|
|
8
8
|
import { MenuItem as V } from "./MenuItem.js";
|
|
9
9
|
import { MenuSearch as $ } from "./MenuSearch.js";
|
|
10
10
|
import { MenuHeader as j } from "./MenuHeader.js";
|
|
11
|
-
import { MenuList as
|
|
11
|
+
import { MenuList as N, MenuListItem as g } from "./MenuBase.js";
|
|
12
12
|
import "../Snackbar/useSnackbar.js";
|
|
13
|
-
import '../../assets/MenuItemsVirtual.css';const q = "
|
|
13
|
+
import '../../assets/MenuItemsVirtual.css';const q = "_virtualScrollRef_u54k3_1", B = "_virtualMenuListItem_u54k3_8", y = {
|
|
14
14
|
virtualScrollRef: q,
|
|
15
15
|
virtualMenuListItem: B
|
|
16
16
|
}, U = ({
|
|
@@ -29,9 +29,9 @@ import '../../assets/MenuItemsVirtual.css';const q = "_virtualScrollRef_15wg7_1"
|
|
|
29
29
|
groups: M,
|
|
30
30
|
groupByKey: "groupId",
|
|
31
31
|
keyboardEvents: !1
|
|
32
|
-
}), m =
|
|
32
|
+
}), m = b(null), a = _.flatMap((t, e) => {
|
|
33
33
|
var u;
|
|
34
|
-
const
|
|
34
|
+
const k = (t == null ? void 0 : t.props) || {}, { title: c } = k, p = ((u = t == null ? void 0 : t.items) == null ? void 0 : u.filter((r) => {
|
|
35
35
|
var s;
|
|
36
36
|
return !((s = r.props) != null && s.hidden);
|
|
37
37
|
})) || [];
|
|
@@ -49,7 +49,7 @@ import '../../assets/MenuItemsVirtual.css';const q = "_virtualScrollRef_15wg7_1"
|
|
|
49
49
|
};
|
|
50
50
|
})
|
|
51
51
|
];
|
|
52
|
-
}), o =
|
|
52
|
+
}), o = E({
|
|
53
53
|
count: a.length,
|
|
54
54
|
gap: 8,
|
|
55
55
|
estimateSize: () => 44,
|
|
@@ -60,12 +60,12 @@ import '../../assets/MenuItemsVirtual.css';const q = "_virtualScrollRef_15wg7_1"
|
|
|
60
60
|
const e = document.querySelector(`[data-index="${t.index}"]`);
|
|
61
61
|
e && o.measureElement(e);
|
|
62
62
|
}
|
|
63
|
-
}, [n]), /* @__PURE__ */ v(
|
|
63
|
+
}, [n]), /* @__PURE__ */ v(N, { children: [
|
|
64
64
|
l && /* @__PURE__ */ i($, { ...l }),
|
|
65
65
|
/* @__PURE__ */ i("div", { ref: m, className: y.virtualScrollRef, style: z, children: /* @__PURE__ */ i("div", { style: { position: "relative", height: `${o.getTotalSize()}px` }, children: n.map((t) => {
|
|
66
66
|
const e = a[t.index];
|
|
67
67
|
return e ? /* @__PURE__ */ v(
|
|
68
|
-
|
|
68
|
+
g,
|
|
69
69
|
{
|
|
70
70
|
dataIndex: t.index,
|
|
71
71
|
className: y.virtualMenuListItem,
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import "../../index-L8X2o7IH.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import { BookmarksListItem as
|
|
4
|
+
import { BookmarksListItem as o } from "../Bookmarks/BookmarksListItem.js";
|
|
5
5
|
import "../RootProvider/RootProvider.js";
|
|
6
|
-
import { DialogListItem as
|
|
7
|
-
import { ScopeListItem as
|
|
8
|
-
import { SuggestListItem as
|
|
6
|
+
import { DialogListItem as i } from "../Dialog/DialogListItem.js";
|
|
7
|
+
import { ScopeListItem as r } from "./ScopeListItem.js";
|
|
8
|
+
import { SuggestListItem as s } from "./SuggestListItem.js";
|
|
9
9
|
import { ListItem as a } from "../List/ListItem.js";
|
|
10
10
|
import "../Snackbar/useSnackbar.js";
|
|
11
|
-
const h = ({ type:
|
|
12
|
-
switch (
|
|
11
|
+
const h = ({ type: n, ...t }) => {
|
|
12
|
+
switch (n) {
|
|
13
13
|
case "scope":
|
|
14
14
|
return /* @__PURE__ */ e(
|
|
15
|
-
|
|
15
|
+
r,
|
|
16
16
|
{
|
|
17
17
|
...t,
|
|
18
|
-
color: "company",
|
|
19
18
|
variant: "default",
|
|
20
19
|
shadow: "none",
|
|
21
20
|
size: "sm",
|
|
@@ -25,10 +24,9 @@ const h = ({ type: o, ...t }) => {
|
|
|
25
24
|
);
|
|
26
25
|
case "suggest":
|
|
27
26
|
return /* @__PURE__ */ e(
|
|
28
|
-
|
|
27
|
+
s,
|
|
29
28
|
{
|
|
30
29
|
...t,
|
|
31
|
-
color: "company",
|
|
32
30
|
variant: "default",
|
|
33
31
|
shadow: "none",
|
|
34
32
|
size: "sm",
|
|
@@ -38,7 +36,7 @@ const h = ({ type: o, ...t }) => {
|
|
|
38
36
|
);
|
|
39
37
|
case "bookmark":
|
|
40
38
|
return /* @__PURE__ */ e(
|
|
41
|
-
|
|
39
|
+
o,
|
|
42
40
|
{
|
|
43
41
|
...t,
|
|
44
42
|
variant: "default",
|
|
@@ -49,7 +47,7 @@ const h = ({ type: o, ...t }) => {
|
|
|
49
47
|
);
|
|
50
48
|
case "dialog":
|
|
51
49
|
return /* @__PURE__ */ e(
|
|
52
|
-
|
|
50
|
+
i,
|
|
53
51
|
{
|
|
54
52
|
...t,
|
|
55
53
|
variant: "default",
|
|
@@ -4,9 +4,9 @@ import "react";
|
|
|
4
4
|
import "../RootProvider/RootProvider.js";
|
|
5
5
|
import "../Snackbar/useSnackbar.js";
|
|
6
6
|
import { ListItem as e } from "../List/ListItem.js";
|
|
7
|
-
import '../../assets/ScopeListItem.css';const r = "
|
|
7
|
+
import '../../assets/ScopeListItem.css';const r = "_item_4v2ol_1", s = {
|
|
8
8
|
item: r
|
|
9
|
-
},
|
|
9
|
+
}, f = ({ as: t = "a", label: m, ...o }) => /* @__PURE__ */ i(e, { className: s.item, label: m, ...o, as: t });
|
|
10
10
|
export {
|
|
11
|
-
|
|
11
|
+
f as ScopeListItem
|
|
12
12
|
};
|
|
@@ -1,37 +1,43 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
3
|
+
import { c as x } from "../../index-L8X2o7IH.js";
|
|
3
4
|
import "react";
|
|
4
|
-
import { Skeleton as
|
|
5
|
+
import { Skeleton as f } from "../Skeleton/Skeleton.js";
|
|
5
6
|
import "../RootProvider/RootProvider.js";
|
|
7
|
+
import { useHighlightedText as u } from "./useHighlightedText.js";
|
|
6
8
|
import "../Snackbar/useSnackbar.js";
|
|
7
|
-
import '../../assets/Heading.css';const
|
|
8
|
-
heading:
|
|
9
|
-
},
|
|
10
|
-
loading:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
import '../../assets/Heading.css';const H = "_heading_1dyne_1", _ = {
|
|
10
|
+
heading: H
|
|
11
|
+
}, T = ({
|
|
12
|
+
loading: e,
|
|
13
|
+
highlightWords: i = [],
|
|
14
|
+
as: o = "h2",
|
|
15
|
+
size: t,
|
|
16
|
+
leading: n = "tight",
|
|
17
|
+
weight: r = "medium",
|
|
15
18
|
color: d,
|
|
16
|
-
variant:
|
|
17
|
-
maxRows:
|
|
18
|
-
className:
|
|
19
|
-
style:
|
|
19
|
+
variant: m,
|
|
20
|
+
maxRows: s,
|
|
21
|
+
className: c,
|
|
22
|
+
style: h,
|
|
20
23
|
children: g
|
|
21
|
-
}) =>
|
|
22
|
-
i
|
|
23
|
-
{
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
24
|
+
}) => {
|
|
25
|
+
const l = o, p = u(g, i || []);
|
|
26
|
+
return /* @__PURE__ */ a(f, { loading: e, children: /* @__PURE__ */ a(
|
|
27
|
+
l,
|
|
28
|
+
{
|
|
29
|
+
className: x(_.heading, c),
|
|
30
|
+
style: h,
|
|
31
|
+
"data-size": t,
|
|
32
|
+
"data-leading": n,
|
|
33
|
+
"data-weight": r,
|
|
34
|
+
"data-color": d,
|
|
35
|
+
"data-variant": t === "xxs" && "default" || m,
|
|
36
|
+
"data-max-rows": s,
|
|
37
|
+
children: p
|
|
38
|
+
}
|
|
39
|
+
) });
|
|
40
|
+
};
|
|
35
41
|
export {
|
|
36
|
-
|
|
42
|
+
T as Heading
|
|
37
43
|
};
|
|
@@ -1,35 +1,40 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as
|
|
3
|
-
import { Skeleton as
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { c as l } from "../../index-L8X2o7IH.js";
|
|
3
|
+
import { Skeleton as f } from "../Skeleton/Skeleton.js";
|
|
4
|
+
import { useHighlightedText as x } from "./useHighlightedText.js";
|
|
5
|
+
import '../../assets/Typography.css';const _ = "_typography_cr720_1", u = {
|
|
6
|
+
typography: _
|
|
7
|
+
}, z = ({
|
|
8
|
+
loading: t,
|
|
8
9
|
loadingText: r = "Loading ...",
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
highlightWords: a,
|
|
11
|
+
as: p = "div",
|
|
12
|
+
size: e = "md",
|
|
11
13
|
color: n,
|
|
12
|
-
variant:
|
|
13
|
-
className:
|
|
14
|
+
variant: s,
|
|
15
|
+
className: c,
|
|
14
16
|
style: y = {},
|
|
15
|
-
maxWidth:
|
|
17
|
+
maxWidth: i,
|
|
16
18
|
children: m,
|
|
17
|
-
...
|
|
18
|
-
}) =>
|
|
19
|
-
a
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
)
|
|
19
|
+
...h
|
|
20
|
+
}) => {
|
|
21
|
+
const d = p, g = x(m, a || []);
|
|
22
|
+
return /* @__PURE__ */ o(
|
|
23
|
+
d,
|
|
24
|
+
{
|
|
25
|
+
className: l(u.typography, c),
|
|
26
|
+
style: {
|
|
27
|
+
maxWidth: i,
|
|
28
|
+
...y
|
|
29
|
+
},
|
|
30
|
+
"data-size": e,
|
|
31
|
+
"data-color": n,
|
|
32
|
+
"data-variant": s,
|
|
33
|
+
...h,
|
|
34
|
+
children: t && /* @__PURE__ */ o(f, { loading: t, children: r }) || g
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
};
|
|
33
38
|
export {
|
|
34
|
-
|
|
39
|
+
z as Typography
|
|
35
40
|
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import f, { useMemo as p, isValidElement as d, cloneElement as m } from "react";
|
|
3
|
+
const g = /* @__PURE__ */ new Set(["mark", "code", "pre", "script", "style"]);
|
|
4
|
+
function h(e) {
|
|
5
|
+
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
6
|
+
}
|
|
7
|
+
function y(e, t) {
|
|
8
|
+
if (!t.test(e))
|
|
9
|
+
return { node: e, changed: !1 };
|
|
10
|
+
t.lastIndex = 0;
|
|
11
|
+
const n = [];
|
|
12
|
+
let s = 0, c;
|
|
13
|
+
for (; c = t.exec(e); ) {
|
|
14
|
+
const r = c.index, l = r + c[0].length;
|
|
15
|
+
r > s && n.push(e.slice(s, r)), n.push(/* @__PURE__ */ u("mark", { children: c[0] }, n.length)), s = l;
|
|
16
|
+
}
|
|
17
|
+
return s < e.length && n.push(e.slice(s)), { node: n.length === 1 ? n[0] : n, changed: !0 };
|
|
18
|
+
}
|
|
19
|
+
function i(e, t) {
|
|
20
|
+
if (typeof e == "string")
|
|
21
|
+
return y(e, t);
|
|
22
|
+
if (d(e)) {
|
|
23
|
+
const n = e, s = typeof n.type == "string" ? n.type : void 0;
|
|
24
|
+
if (s && g.has(s)) return { node: e, changed: !1 };
|
|
25
|
+
let c = !1;
|
|
26
|
+
const r = f.Children.map(n.props.children, (o) => {
|
|
27
|
+
const a = i(o, t);
|
|
28
|
+
return a.changed && (c = !0), a.node;
|
|
29
|
+
});
|
|
30
|
+
if (!c)
|
|
31
|
+
return { node: e, changed: !1 };
|
|
32
|
+
const l = r && r.length === 1 ? r[0] : r;
|
|
33
|
+
return { node: m(n, { children: l }), changed: !0 };
|
|
34
|
+
}
|
|
35
|
+
return { node: e, changed: !1 };
|
|
36
|
+
}
|
|
37
|
+
function E(e, t) {
|
|
38
|
+
return p(() => {
|
|
39
|
+
if (!e || !(t != null && t.length)) return e;
|
|
40
|
+
const n = Array.from(
|
|
41
|
+
new Set(
|
|
42
|
+
t.map((r) => r.trim()).filter(Boolean).map(h)
|
|
43
|
+
)
|
|
44
|
+
);
|
|
45
|
+
if (n.length === 0) return e;
|
|
46
|
+
n.sort((r, l) => l.length - r.length);
|
|
47
|
+
const s = new RegExp(`(${n.join("|")})`, "gi"), { node: c } = i(e, s);
|
|
48
|
+
return c;
|
|
49
|
+
}, [e, t]);
|
|
50
|
+
}
|
|
51
|
+
export {
|
|
52
|
+
E as useHighlightedText
|
|
53
|
+
};
|
|
@@ -3,6 +3,7 @@ export interface DialogListProps {
|
|
|
3
3
|
items: DialogListItemProps[];
|
|
4
4
|
groups?: Record<string, DialogListGroupProps>;
|
|
5
5
|
sortGroupBy?: (a: [string, DialogListItemProps[]], b: [string, DialogListItemProps[]]) => number;
|
|
6
|
+
highlightWords?: string[];
|
|
6
7
|
isLoading?: boolean;
|
|
7
8
|
}
|
|
8
|
-
export declare const DialogList: ({ items, groups, sortGroupBy, isLoading }: DialogListProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const DialogList: ({ items, groups, sortGroupBy, highlightWords, isLoading }: DialogListProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: ({ items, groups, sortGroupBy, isLoading }: import('./DialogList').DialogListProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
component: ({ items, groups, sortGroupBy, highlightWords, isLoading }: import('./DialogList').DialogListProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
tags: string[];
|
|
6
6
|
args: {
|
|
7
7
|
items: import('./DialogListItem').DialogListItemProps[];
|
|
8
8
|
groups?: Record<string, import('./DialogListGroup').DialogListGroupProps>;
|
|
9
9
|
sortGroupBy?: (a: [string, import('./DialogListItem').DialogListItemProps[]], b: [string, import('./DialogListItem').DialogListItemProps[]]) => number;
|
|
10
|
+
highlightWords?: string[];
|
|
10
11
|
isLoading?: boolean;
|
|
11
12
|
};
|
|
12
13
|
};
|
|
@@ -3,6 +3,8 @@ export type DialogListItemSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
|
3
3
|
export type DialogListItemState = 'normal' | 'trashed' | 'archived';
|
|
4
4
|
export type DialogListItemTheme = 'default' | 'subtle' | 'transparent';
|
|
5
5
|
export interface DialogListItemProps extends ListItemProps, DialogMetadataProps {
|
|
6
|
+
/** Highlight words, ie. search terms */
|
|
7
|
+
highlightWords?: string[];
|
|
6
8
|
/** Dialog title */
|
|
7
9
|
title: string;
|
|
8
10
|
/** Dialog id */
|
|
@@ -51,4 +53,4 @@ export interface DialogListItemProps extends ListItemProps, DialogMetadataProps
|
|
|
51
53
|
* summary, sender, and receiver.
|
|
52
54
|
* to mark the item as checked/unchecked and can visually indicate if it is unread.
|
|
53
55
|
*/
|
|
54
|
-
export declare const DialogListItem: ({ size, state, loading, controls, select, selected, status, sender, recipient, recipientLabel, grouped, updatedAt, updatedAtLabel, archived, archivedAt, archivedAtLabel, trashed, trashedAt, trashedAtLabel, badge, dueAt, dueAtLabel, unread, seenByLog, draftsLabel, sentCount, receivedCount, attachmentsCount, attachmentsLabel, title, description, summary, variant, id, ...rest }: DialogListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
56
|
+
export declare const DialogListItem: ({ size, state, loading, controls, select, selected, status, sender, recipient, recipientLabel, grouped, updatedAt, updatedAtLabel, archived, archivedAt, archivedAtLabel, trashed, trashedAt, trashedAtLabel, badge, dueAt, dueAtLabel, unread, seenByLog, draftsLabel, sentCount, receivedCount, attachmentsCount, attachmentsLabel, title, description, summary, highlightWords, variant, id, ...rest }: DialogListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,6 +6,7 @@ export type HeadingLeading = 'none' | 'tight' | 'normal';
|
|
|
6
6
|
export type HeadingComponent = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'div' | 'span';
|
|
7
7
|
export interface HeadingProps {
|
|
8
8
|
loading?: boolean;
|
|
9
|
+
highlightWords?: string[];
|
|
9
10
|
as?: HeadingComponent;
|
|
10
11
|
size?: HeadingSize;
|
|
11
12
|
weight?: HeadingWeight;
|
|
@@ -17,4 +18,4 @@ export interface HeadingProps {
|
|
|
17
18
|
style?: CSSProperties;
|
|
18
19
|
children?: ReactNode;
|
|
19
20
|
}
|
|
20
|
-
export declare const Heading: ({ loading, as, size, leading, weight, color, variant, maxRows, className, style, children, }: HeadingProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare const Heading: ({ loading, highlightWords, as, size, leading, weight, color, variant, maxRows, className, style, children, }: HeadingProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: ({ loading, as, size, leading, weight, color, variant, maxRows, className, style, children, }: import('./Heading').HeadingProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
component: ({ loading, highlightWords, as, size, leading, weight, color, variant, maxRows, className, style, children, }: import('./Heading').HeadingProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
tags: string[];
|
|
6
6
|
parameters: {};
|
|
7
7
|
args: {
|
|
@@ -11,3 +11,4 @@ declare const meta: {
|
|
|
11
11
|
export default meta;
|
|
12
12
|
type Story = StoryObj<typeof meta>;
|
|
13
13
|
export declare const Default: Story;
|
|
14
|
+
export declare const HighlightWords: Story;
|
|
@@ -5,6 +5,7 @@ export type TypographySize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
|
5
5
|
export interface TypographyProps {
|
|
6
6
|
loading?: boolean;
|
|
7
7
|
loadingText?: string;
|
|
8
|
+
highlightWords?: string[];
|
|
8
9
|
as?: ElementType;
|
|
9
10
|
size?: TypographySize;
|
|
10
11
|
color?: TypographyColor;
|
|
@@ -15,4 +16,4 @@ export interface TypographyProps {
|
|
|
15
16
|
style?: CSSProperties;
|
|
16
17
|
maxWidth?: string;
|
|
17
18
|
}
|
|
18
|
-
export declare const Typography: ({ loading, loadingText, as, size, color, variant, className, style, maxWidth, children, ...restProps }: TypographyProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare const Typography: ({ loading, loadingText, highlightWords, as, size, color, variant, className, style, maxWidth, children, ...restProps }: TypographyProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: ({ loading, loadingText, as, size, color, variant, className, style, maxWidth, children, ...restProps }: import('./Typography').TypographyProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
component: ({ loading, loadingText, highlightWords, as, size, color, variant, className, style, maxWidth, children, ...restProps }: import('./Typography').TypographyProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
tags: string[];
|
|
6
6
|
parameters: {};
|
|
7
7
|
args: {
|
|
@@ -11,3 +11,4 @@ declare const meta: {
|
|
|
11
11
|
export default meta;
|
|
12
12
|
type Story = StoryObj<typeof meta>;
|
|
13
13
|
export declare const Default: Story;
|
|
14
|
+
export declare const HighlightWords: 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 SearchPage: () => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const NoHitsPage: () => import("react/jsx-runtime").JSX.Element;
|
|
12
13
|
export declare const DraftsPage: () => import("react/jsx-runtime").JSX.Element;
|
|
13
14
|
export declare const SentPage: () => import("react/jsx-runtime").JSX.Element;
|
|
14
15
|
export declare const BookmarksPage: () => import("react/jsx-runtime").JSX.Element;
|