@altinn/altinn-components 0.56.18 → 0.56.20
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/Badge.css +1 -1
- package/dist/assets/BreadcrumbsLink.css +1 -1
- package/dist/assets/MenuItem.css +1 -1
- package/dist/components/Badge/Badge.js +7 -7
- package/dist/components/Breadcrumbs/Breadcrumbs.js +29 -30
- package/dist/components/Breadcrumbs/BreadcrumbsLink.js +4 -4
- package/dist/components/Dialog/DialogHeader.js +38 -37
- package/dist/components/Dialog/DialogListItem.js +29 -27
- package/dist/components/Dialog/DialogMetadata.js +67 -55
- package/dist/components/Dialog/DialogStatus.js +21 -21
- package/dist/components/Layout/Layout.js +5 -5
- package/dist/components/Menu/MenuItem.js +60 -60
- package/dist/components/Metadata/MetaItem.js +21 -16
- package/dist/components/Metadata/MetaProgress.js +12 -8
- package/dist/components/Metadata/MetaTimestamp.js +18 -13
- package/dist/components/Tooltip/Tooltip.js +1 -1
- package/dist/types/lib/components/Breadcrumbs/Breadcrumbs.d.ts +3 -1
- package/dist/types/lib/components/Breadcrumbs/Breadcrumbs.stories.d.ts +1 -1
- package/dist/types/lib/components/Dialog/DialogHeader.d.ts +1 -1
- package/dist/types/lib/components/Dialog/DialogHeader.stories.d.ts +3 -1
- package/dist/types/lib/components/Dialog/DialogListItem.d.ts +1 -1
- package/dist/types/lib/components/Dialog/DialogMetadata.d.ts +4 -1
- package/dist/types/lib/components/Dialog/DialogMetadata.stories.d.ts +2 -1
- package/dist/types/lib/components/Dialog/DialogStatus.d.ts +2 -1
- package/dist/types/lib/components/Dialog/DialogStatus.stories.d.ts +1 -1
- package/dist/types/lib/components/Layout/Layout.d.ts +1 -1
- package/dist/types/lib/components/Metadata/MetaItem.d.ts +3 -1
- package/dist/types/lib/components/Metadata/MetaItem.stories.d.ts +1 -1
- package/dist/types/lib/components/Metadata/MetaProgress.d.ts +3 -1
- package/dist/types/lib/components/Metadata/MetaProgress.stories.d.ts +1 -1
- package/dist/types/lib/components/Metadata/MetaTimestamp.d.ts +3 -1
- package/dist/types/lib/components/Metadata/MetaTimestamp.stories.d.ts +1 -1
- package/dist/types/lib/components/ResourceListItem/ResourceListItem.d.ts +1 -1
- package/dist/types/lib/components/ResourceListItem/ResourceListItem.stories.d.ts +6 -0
- package/dist/types/lib/components/Tooltip/Tooltip.d.ts +1 -1
- package/dist/types/lib/components/Tooltip/Tooltip.stories.d.ts +1 -1
- package/dist/types/lib/stories/Inbox.stories.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,47 +1,47 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as o } from "react/jsx-runtime";
|
|
3
3
|
import "../../index-p1eeF8LQ.js";
|
|
4
|
-
import a, { forwardRef as
|
|
4
|
+
import a, { forwardRef as f } from "react";
|
|
5
5
|
import "../Button/Button.js";
|
|
6
6
|
import "react-dom";
|
|
7
7
|
import "../RootProvider/RootProvider.js";
|
|
8
8
|
import { MetaItem as c } from "../Metadata/MetaItem.js";
|
|
9
9
|
import { MetaProgress as d } from "../Metadata/MetaProgress.js";
|
|
10
10
|
import "../Snackbar/useSnackbar.js";
|
|
11
|
-
import { u as
|
|
12
|
-
var s = function(e,
|
|
13
|
-
var
|
|
14
|
-
for (var
|
|
11
|
+
import { u as p } from "../../useId-BVFxCjkq.js";
|
|
12
|
+
var s = function(e, i) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && i.indexOf(r) < 0 && (t[r] = e[r]);
|
|
15
15
|
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
16
|
-
for (var
|
|
17
|
-
|
|
18
|
-
return
|
|
16
|
+
for (var n = 0, r = Object.getOwnPropertySymbols(e); n < r.length; n++)
|
|
17
|
+
i.indexOf(r[n]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[n]) && (t[r[n]] = e[r[n]]);
|
|
18
|
+
return t;
|
|
19
19
|
};
|
|
20
|
-
const m =
|
|
21
|
-
var { title:
|
|
22
|
-
let l =
|
|
23
|
-
return l =
|
|
20
|
+
const m = f((e, i) => {
|
|
21
|
+
var { title: t, titleId: r } = e, n = s(e, ["title", "titleId"]);
|
|
22
|
+
let l = p();
|
|
23
|
+
return l = t ? r || "title-" + l : void 0, a.createElement(
|
|
24
24
|
"svg",
|
|
25
|
-
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:
|
|
26
|
-
|
|
25
|
+
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 }, n),
|
|
26
|
+
t ? a.createElement("title", { id: l }, t) : null,
|
|
27
27
|
a.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M6 3.25a.75.75 0 0 0 0 1.5h.315c.109 1.966.642 3.846 1.546 5.302.502.81 1.116 1.479 1.81 1.948-.694.47-1.308 1.138-1.81 1.948-.904 1.456-1.437 3.336-1.546 5.302H6a.75.75 0 0 0 0 1.5h12a.75.75 0 0 0 0-1.5h-.298c-.109-1.966-.643-3.846-1.546-5.302-.503-.81-1.116-1.479-1.81-1.948.694-.47 1.307-1.138 1.81-1.948.904-1.456 1.437-3.336 1.546-5.302H18a.75.75 0 0 0 0-1.5zm6.008 8c.972 0 2.027-.624 2.873-1.989.738-1.189 1.211-2.785 1.318-4.511H7.818c.107 1.726.58 3.322 1.318 4.511.846 1.365 1.901 1.989 2.872 1.989m0 1.5c-.971 0-2.026.624-2.872 1.989-.738 1.189-1.211 2.784-1.318 4.511h8.381c-.107-1.727-.58-3.322-1.318-4.511-.846-1.365-1.901-1.989-2.873-1.989", clipRule: "evenodd" })
|
|
28
28
|
);
|
|
29
29
|
});
|
|
30
30
|
var u = /* @__PURE__ */ ((e) => (e["not-applicable"] = "NOT_APPLICABLE", e.draft = "DRAFT", e.awaiting = "AWAITING", e.completed = "COMPLETED", e["in-progress"] = "IN_PROGRESS", e["requires-attention"] = "REQUIRES_ATTENTION", e))(u || {});
|
|
31
|
-
const P = ({ loading: e, size:
|
|
31
|
+
const P = ({ loading: e, size: i = "xs", value: t = "not-applicable", label: r, tooltip: n }) => {
|
|
32
32
|
if (e)
|
|
33
33
|
return null;
|
|
34
|
-
switch (
|
|
34
|
+
switch (t) {
|
|
35
35
|
case "draft":
|
|
36
|
-
return /* @__PURE__ */ o(c, {
|
|
36
|
+
return /* @__PURE__ */ o(c, { tooltip: n, size: i, variant: "dotted", children: r || t });
|
|
37
37
|
case "requires-attention":
|
|
38
|
-
return /* @__PURE__ */ o(c, { variant: "solid", children:
|
|
38
|
+
return /* @__PURE__ */ o(c, { tooltip: n, variant: "solid", children: r || t });
|
|
39
39
|
case "awaiting":
|
|
40
|
-
return /* @__PURE__ */ o(c, {
|
|
40
|
+
return /* @__PURE__ */ o(c, { tooltip: n, size: i, variant: "outline", icon: m, children: r || t });
|
|
41
41
|
case "in-progress":
|
|
42
|
-
return /* @__PURE__ */ o(d, {
|
|
42
|
+
return /* @__PURE__ */ o(d, { tooltip: n, size: i, variant: "outline", progress: 75, children: r || t });
|
|
43
43
|
case "completed":
|
|
44
|
-
return /* @__PURE__ */ o(d, {
|
|
44
|
+
return /* @__PURE__ */ o(d, { tooltip: n, size: i, variant: "outline", progress: 100, children: r || t });
|
|
45
45
|
default:
|
|
46
46
|
return null;
|
|
47
47
|
}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { jsxs as m, jsx as t } from "react/jsx-runtime";
|
|
3
3
|
import { LayoutBase as d } from "./LayoutBase.js";
|
|
4
4
|
import { LayoutGrid as a } from "./LayoutGrid.js";
|
|
5
|
-
import { LayoutBody as
|
|
6
|
-
import { LayoutContent as
|
|
5
|
+
import { LayoutBody as h } from "./LayoutBody.js";
|
|
6
|
+
import { LayoutContent as s } from "./LayoutContent.js";
|
|
7
7
|
import { LayoutSidebar as L } from "./LayoutSidebar.js";
|
|
8
8
|
import { Breadcrumbs as x } from "../Breadcrumbs/Breadcrumbs.js";
|
|
9
9
|
import "../../index-p1eeF8LQ.js";
|
|
@@ -34,8 +34,8 @@ const Q = ({
|
|
|
34
34
|
n && /* @__PURE__ */ t(G, { ...n }),
|
|
35
35
|
i && (y ? /* @__PURE__ */ t(j, { ...i }) : /* @__PURE__ */ t(F, { ...i })),
|
|
36
36
|
/* @__PURE__ */ m(a, { currentId: r, children: [
|
|
37
|
-
c && /* @__PURE__ */ t(x, {
|
|
38
|
-
/* @__PURE__ */ m(
|
|
37
|
+
c && /* @__PURE__ */ t(x, { ...c }),
|
|
38
|
+
/* @__PURE__ */ m(h, { currentId: r, children: [
|
|
39
39
|
o && /* @__PURE__ */ m(
|
|
40
40
|
L,
|
|
41
41
|
{
|
|
@@ -49,7 +49,7 @@ const Q = ({
|
|
|
49
49
|
]
|
|
50
50
|
}
|
|
51
51
|
),
|
|
52
|
-
/* @__PURE__ */ t(
|
|
52
|
+
/* @__PURE__ */ t(s, { color: u?.color, id: "main-content", children: f })
|
|
53
53
|
] })
|
|
54
54
|
] }),
|
|
55
55
|
e && /* @__PURE__ */ t(B, { ...e })
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as s, jsx as n, Fragment as z } from "react/jsx-runtime";
|
|
3
3
|
import { c as A } from "../../index-p1eeF8LQ.js";
|
|
4
4
|
import { Badge as C } from "../Badge/Badge.js";
|
|
5
5
|
import { Icon as V } from "../Icon/Icon.js";
|
|
@@ -15,57 +15,57 @@ import { pickAriaProps as Y } from "./aria.js";
|
|
|
15
15
|
import { S as Z } from "../../Checkmark-Byz_C9x4.js";
|
|
16
16
|
import { u as $ } from "../../useId-BVFxCjkq.js";
|
|
17
17
|
import { S as T } from "../../ChevronRight-ANFWmIs1.js";
|
|
18
|
-
import '../../assets/MenuItem.css';var W = function(t,
|
|
18
|
+
import '../../assets/MenuItem.css';var W = function(t, l) {
|
|
19
19
|
var a = {};
|
|
20
|
-
for (var e in t) Object.prototype.hasOwnProperty.call(t, e) &&
|
|
20
|
+
for (var e in t) Object.prototype.hasOwnProperty.call(t, e) && l.indexOf(e) < 0 && (a[e] = t[e]);
|
|
21
21
|
if (t != null && typeof Object.getOwnPropertySymbols == "function")
|
|
22
22
|
for (var r = 0, e = Object.getOwnPropertySymbols(t); r < e.length; r++)
|
|
23
|
-
|
|
23
|
+
l.indexOf(e[r]) < 0 && Object.prototype.propertyIsEnumerable.call(t, e[r]) && (a[e[r]] = t[e[r]]);
|
|
24
24
|
return a;
|
|
25
25
|
};
|
|
26
|
-
const tt = X((t,
|
|
26
|
+
const tt = X((t, l) => {
|
|
27
27
|
var { title: a, titleId: e } = t, r = W(t, ["title", "titleId"]);
|
|
28
|
-
let
|
|
29
|
-
return
|
|
28
|
+
let o = $();
|
|
29
|
+
return o = a ? e || "title-" + o : void 0, h.createElement(
|
|
30
30
|
"svg",
|
|
31
|
-
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:
|
|
32
|
-
a ? h.createElement("title", { id:
|
|
31
|
+
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: l, "aria-labelledby": o }, r),
|
|
32
|
+
a ? h.createElement("title", { id: o }, a) : null,
|
|
33
33
|
h.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M4.75 12a.75.75 0 0 1 .75-.75h13a.75.75 0 1 1 0 1.5h-13a.75.75 0 0 1-.75-.75", clipRule: "evenodd" })
|
|
34
34
|
);
|
|
35
|
-
}), et = "
|
|
35
|
+
}), et = "_item_1ud33_3", at = "_media_1ud33_130", it = "_label_1ud33_151", rt = "_title_1ud33_166", nt = "_description_1ud33_170", ot = "_count_1ud33_182", lt = "_linkIcon_1ud33_190", i = {
|
|
36
36
|
item: et,
|
|
37
37
|
media: at,
|
|
38
38
|
label: it,
|
|
39
39
|
title: rt,
|
|
40
40
|
description: nt,
|
|
41
|
-
count:
|
|
42
|
-
linkIcon:
|
|
43
|
-
},
|
|
41
|
+
count: ot,
|
|
42
|
+
linkIcon: lt
|
|
43
|
+
}, Ot = ({
|
|
44
44
|
id: t,
|
|
45
|
-
groupId:
|
|
45
|
+
groupId: l,
|
|
46
46
|
role: a = "menuItem",
|
|
47
47
|
as: e,
|
|
48
48
|
href: r,
|
|
49
|
-
onClick:
|
|
49
|
+
onClick: o,
|
|
50
50
|
onChange: v,
|
|
51
51
|
onKeyPress: y,
|
|
52
|
-
onMouseEnter:
|
|
53
|
-
size:
|
|
54
|
-
variant:
|
|
55
|
-
color:
|
|
52
|
+
onMouseEnter: I,
|
|
53
|
+
size: g = "sm",
|
|
54
|
+
variant: w,
|
|
55
|
+
color: N,
|
|
56
56
|
name: D,
|
|
57
57
|
value: G,
|
|
58
|
-
checked:
|
|
59
|
-
icon:
|
|
60
|
-
label:
|
|
58
|
+
checked: c,
|
|
59
|
+
icon: _,
|
|
60
|
+
label: b,
|
|
61
61
|
badge: d,
|
|
62
|
-
controls:
|
|
62
|
+
controls: O,
|
|
63
63
|
title: p,
|
|
64
|
-
description:
|
|
64
|
+
description: x,
|
|
65
65
|
highlightWords: P,
|
|
66
66
|
count: u,
|
|
67
67
|
linkIcon: j = !1,
|
|
68
|
-
disabled:
|
|
68
|
+
disabled: m,
|
|
69
69
|
selected: S,
|
|
70
70
|
active: E,
|
|
71
71
|
tabIndex: k = 0,
|
|
@@ -73,33 +73,33 @@ const tt = X((t, o) => {
|
|
|
73
73
|
"data-testid": B,
|
|
74
74
|
...H
|
|
75
75
|
}) => {
|
|
76
|
-
const L = typeof
|
|
76
|
+
const L = typeof b == "function" ? b() : b, M = Y(H);
|
|
77
77
|
if (a === "checkbox" || a === "radio") {
|
|
78
|
-
const f =
|
|
79
|
-
return /* @__PURE__ */
|
|
78
|
+
const f = _ || (c ? Z : tt);
|
|
79
|
+
return /* @__PURE__ */ s(
|
|
80
80
|
"label",
|
|
81
81
|
{
|
|
82
82
|
...M,
|
|
83
83
|
className: A(i.item, R),
|
|
84
84
|
id: t,
|
|
85
85
|
"data-id": t,
|
|
86
|
-
"data-group-id":
|
|
87
|
-
"data-size":
|
|
88
|
-
"data-variant":
|
|
89
|
-
"data-color":
|
|
86
|
+
"data-group-id": l,
|
|
87
|
+
"data-size": g,
|
|
88
|
+
"data-variant": w,
|
|
89
|
+
"data-color": N,
|
|
90
90
|
"data-active": E,
|
|
91
91
|
role: a,
|
|
92
|
-
"aria-disabled":
|
|
93
|
-
"aria-checked":
|
|
94
|
-
"aria-selected":
|
|
95
|
-
"data-selected":
|
|
92
|
+
"aria-disabled": m,
|
|
93
|
+
"aria-checked": c,
|
|
94
|
+
"aria-selected": c,
|
|
95
|
+
"data-selected": c,
|
|
96
96
|
"aria-label": p,
|
|
97
97
|
"data-testid": B,
|
|
98
98
|
onKeyUp: (U) => {
|
|
99
|
-
|
|
99
|
+
m || (U.key === "Enter" && o?.(), y?.(U));
|
|
100
100
|
},
|
|
101
|
-
onClick:
|
|
102
|
-
onMouseEnter:
|
|
101
|
+
onClick: o,
|
|
102
|
+
onMouseEnter: I,
|
|
103
103
|
tabIndex: k,
|
|
104
104
|
children: [
|
|
105
105
|
/* @__PURE__ */ n(
|
|
@@ -108,7 +108,7 @@ const tt = X((t, o) => {
|
|
|
108
108
|
name: D,
|
|
109
109
|
value: G,
|
|
110
110
|
type: a,
|
|
111
|
-
checked: !!
|
|
111
|
+
checked: !!c,
|
|
112
112
|
onChange: v,
|
|
113
113
|
readOnly: !v,
|
|
114
114
|
style: { opacity: 0, position: "absolute" },
|
|
@@ -121,7 +121,7 @@ const tt = X((t, o) => {
|
|
|
121
121
|
{
|
|
122
122
|
className: i.label,
|
|
123
123
|
highlightWords: P,
|
|
124
|
-
title: /* @__PURE__ */
|
|
124
|
+
title: /* @__PURE__ */ s(z, { children: [
|
|
125
125
|
p,
|
|
126
126
|
" ",
|
|
127
127
|
u && /* @__PURE__ */ n("i", { className: i.count, children: u })
|
|
@@ -130,7 +130,7 @@ const tt = X((t, o) => {
|
|
|
130
130
|
weight: "medium",
|
|
131
131
|
className: i.title
|
|
132
132
|
},
|
|
133
|
-
description:
|
|
133
|
+
description: x,
|
|
134
134
|
descriptionProps: {
|
|
135
135
|
weight: "normal",
|
|
136
136
|
variant: "subtle",
|
|
@@ -139,48 +139,48 @@ const tt = X((t, o) => {
|
|
|
139
139
|
children: L
|
|
140
140
|
}
|
|
141
141
|
),
|
|
142
|
-
/* @__PURE__ */
|
|
142
|
+
/* @__PURE__ */ s(q, { children: [
|
|
143
143
|
d && /* @__PURE__ */ n(C, { ...d }),
|
|
144
|
-
|
|
144
|
+
!m && O
|
|
145
145
|
] })
|
|
146
146
|
]
|
|
147
147
|
}
|
|
148
148
|
);
|
|
149
149
|
}
|
|
150
150
|
const J = e || (r ? "a" : "button"), Q = j && T;
|
|
151
|
-
return /* @__PURE__ */
|
|
151
|
+
return /* @__PURE__ */ s(
|
|
152
152
|
J,
|
|
153
153
|
{
|
|
154
154
|
href: r,
|
|
155
155
|
className: A(i.item, R),
|
|
156
156
|
id: t,
|
|
157
157
|
"data-id": t,
|
|
158
|
-
"data-group-id":
|
|
159
|
-
"data-size":
|
|
160
|
-
"data-variant":
|
|
161
|
-
"data-color":
|
|
158
|
+
"data-group-id": l,
|
|
159
|
+
"data-size": g,
|
|
160
|
+
"data-variant": w,
|
|
161
|
+
"data-color": N,
|
|
162
162
|
"data-active": E,
|
|
163
|
-
"aria-disabled":
|
|
163
|
+
"aria-disabled": m,
|
|
164
164
|
"aria-selected": S,
|
|
165
165
|
"data-selected": S,
|
|
166
166
|
"aria-label": p,
|
|
167
167
|
"data-testid": B,
|
|
168
168
|
onKeyUp: (f) => {
|
|
169
|
-
|
|
169
|
+
m || (f.key === "Enter" && o?.(), y?.(f));
|
|
170
170
|
},
|
|
171
|
-
onClick:
|
|
172
|
-
onMouseEnter:
|
|
173
|
-
tabIndex:
|
|
171
|
+
onClick: o,
|
|
172
|
+
onMouseEnter: I,
|
|
173
|
+
tabIndex: m ? -1 : k ?? 0,
|
|
174
174
|
role: a === "menuItem" ? "menuitem" : a,
|
|
175
175
|
...M,
|
|
176
176
|
children: [
|
|
177
|
-
|
|
177
|
+
_ && /* @__PURE__ */ n(F, { icon: _, className: i.media }),
|
|
178
178
|
/* @__PURE__ */ n(
|
|
179
179
|
K,
|
|
180
180
|
{
|
|
181
181
|
className: i.label,
|
|
182
182
|
highlightWords: P,
|
|
183
|
-
title: /* @__PURE__ */
|
|
183
|
+
title: /* @__PURE__ */ s(z, { children: [
|
|
184
184
|
p,
|
|
185
185
|
" ",
|
|
186
186
|
u && /* @__PURE__ */ n("i", { className: i.count, children: u })
|
|
@@ -189,7 +189,7 @@ const tt = X((t, o) => {
|
|
|
189
189
|
weight: "medium",
|
|
190
190
|
className: i.title
|
|
191
191
|
},
|
|
192
|
-
description:
|
|
192
|
+
description: x,
|
|
193
193
|
descriptionProps: {
|
|
194
194
|
variant: "subtle",
|
|
195
195
|
className: i.description
|
|
@@ -197,9 +197,9 @@ const tt = X((t, o) => {
|
|
|
197
197
|
children: L
|
|
198
198
|
}
|
|
199
199
|
),
|
|
200
|
-
/* @__PURE__ */
|
|
200
|
+
/* @__PURE__ */ s(q, { children: [
|
|
201
201
|
d && /* @__PURE__ */ n(C, { ...d }),
|
|
202
|
-
|
|
202
|
+
!m && O,
|
|
203
203
|
j && /* @__PURE__ */ n(V, { svgElement: Q, className: i.linkIcon })
|
|
204
204
|
] })
|
|
205
205
|
]
|
|
@@ -207,5 +207,5 @@ const tt = X((t, o) => {
|
|
|
207
207
|
);
|
|
208
208
|
};
|
|
209
209
|
export {
|
|
210
|
-
|
|
210
|
+
Ot as MenuItem
|
|
211
211
|
};
|
|
@@ -1,25 +1,30 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as t, jsxs as M } from "react/jsx-runtime";
|
|
2
2
|
import "../../index-p1eeF8LQ.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "../Button/Button.js";
|
|
5
5
|
import "react-dom";
|
|
6
6
|
import "../RootProvider/RootProvider.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
7
|
+
import { Tooltip as i } from "../Tooltip/Tooltip.js";
|
|
8
|
+
import { MetaItemBase as c } from "./MetaItemBase.js";
|
|
9
|
+
import { MetaItemIcon as b } from "./MetaItemIcon.js";
|
|
10
|
+
import { MetaItemLabel as h } from "./MetaItemLabel.js";
|
|
10
11
|
import "../Snackbar/useSnackbar.js";
|
|
11
|
-
const
|
|
12
|
-
loading:
|
|
13
|
-
reverse:
|
|
14
|
-
size:
|
|
15
|
-
variant:
|
|
16
|
-
icon:
|
|
17
|
-
children:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
/* @__PURE__ */
|
|
12
|
+
const y = ({
|
|
13
|
+
loading: m,
|
|
14
|
+
reverse: e,
|
|
15
|
+
size: r = "xs",
|
|
16
|
+
variant: o = "text",
|
|
17
|
+
icon: p,
|
|
18
|
+
children: f,
|
|
19
|
+
tooltip: x,
|
|
20
|
+
...I
|
|
21
|
+
}) => x ? /* @__PURE__ */ t(i, { placement: "bottom", content: x, children: /* @__PURE__ */ M(c, { loading: m, reverse: e, variant: o, size: r, ...I, children: [
|
|
22
|
+
!m && p && /* @__PURE__ */ t(b, { icon: p }),
|
|
23
|
+
/* @__PURE__ */ t(h, { variant: o, size: r, children: f })
|
|
24
|
+
] }) }) : /* @__PURE__ */ M(c, { loading: m, reverse: e, variant: o, size: r, ...I, children: [
|
|
25
|
+
!m && p && /* @__PURE__ */ t(b, { icon: p }),
|
|
26
|
+
/* @__PURE__ */ t(h, { variant: o, size: r, children: f })
|
|
22
27
|
] });
|
|
23
28
|
export {
|
|
24
|
-
|
|
29
|
+
y as MetaItem
|
|
25
30
|
};
|
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as o, jsxs as c } from "react/jsx-runtime";
|
|
2
2
|
import "../../index-p1eeF8LQ.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "../Button/Button.js";
|
|
5
5
|
import "react-dom";
|
|
6
6
|
import "../RootProvider/RootProvider.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
7
|
+
import { Tooltip as x } from "../Tooltip/Tooltip.js";
|
|
8
|
+
import { MetaItemBase as f } from "./MetaItemBase.js";
|
|
9
|
+
import { MetaItemIcon as i } from "./MetaItemIcon.js";
|
|
10
|
+
import { MetaItemLabel as n } from "./MetaItemLabel.js";
|
|
10
11
|
import "../Snackbar/useSnackbar.js";
|
|
11
|
-
const
|
|
12
|
-
/* @__PURE__ */ o(
|
|
13
|
-
/* @__PURE__ */ o(
|
|
12
|
+
const L = ({ size: t = "xs", variant: m = "text", progress: r = 0, tooltip: e, children: p }) => e ? /* @__PURE__ */ o(x, { placement: "bottom", content: e, children: /* @__PURE__ */ c(f, { variant: m, size: t, children: [
|
|
13
|
+
/* @__PURE__ */ o(i, { size: t, progress: r }),
|
|
14
|
+
/* @__PURE__ */ o(n, { variant: m, size: t, children: p })
|
|
15
|
+
] }) }) : /* @__PURE__ */ c(f, { variant: m, size: t, children: [
|
|
16
|
+
/* @__PURE__ */ o(i, { size: t, progress: r }),
|
|
17
|
+
/* @__PURE__ */ o(n, { variant: m, size: t, children: p })
|
|
14
18
|
] });
|
|
15
19
|
export {
|
|
16
|
-
|
|
20
|
+
L as MetaProgress
|
|
17
21
|
};
|
|
@@ -1,24 +1,29 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as m, jsxs as s } from "react/jsx-runtime";
|
|
2
2
|
import "../../index-p1eeF8LQ.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "../Button/Button.js";
|
|
5
5
|
import "react-dom";
|
|
6
6
|
import "../RootProvider/RootProvider.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
7
|
+
import { Tooltip as b } from "../Tooltip/Tooltip.js";
|
|
8
|
+
import { MetaItemBase as I } from "./MetaItemBase.js";
|
|
9
|
+
import { MetaItemIcon as M } from "./MetaItemIcon.js";
|
|
10
|
+
import { MetaItemLabel as c } from "./MetaItemLabel.js";
|
|
10
11
|
import "../Snackbar/useSnackbar.js";
|
|
11
|
-
const
|
|
12
|
-
loading:
|
|
12
|
+
const q = ({
|
|
13
|
+
loading: r,
|
|
13
14
|
size: t = "xs",
|
|
14
|
-
variant:
|
|
15
|
+
variant: o = "text",
|
|
15
16
|
datetime: p,
|
|
16
|
-
icon:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
/* @__PURE__ */
|
|
17
|
+
icon: e,
|
|
18
|
+
tooltip: f,
|
|
19
|
+
children: x
|
|
20
|
+
}) => f ? /* @__PURE__ */ m(b, { placement: "bottom", content: f, children: /* @__PURE__ */ s(I, { loading: r, as: "time", variant: o, datetime: p, size: t, children: [
|
|
21
|
+
!r && e && /* @__PURE__ */ m(M, { size: t, icon: e }),
|
|
22
|
+
/* @__PURE__ */ m(c, { variant: o, size: t, children: x })
|
|
23
|
+
] }) }) : /* @__PURE__ */ s(I, { loading: r, as: "time", variant: o, datetime: p, size: t, children: [
|
|
24
|
+
!r && e && /* @__PURE__ */ m(M, { size: t, icon: e }),
|
|
25
|
+
/* @__PURE__ */ m(c, { variant: o, size: t, children: x })
|
|
21
26
|
] });
|
|
22
27
|
export {
|
|
23
|
-
|
|
28
|
+
q as MetaTimestamp
|
|
24
29
|
};
|
|
@@ -95,7 +95,7 @@ import '../../assets/Tooltip.css';const H = U(function({ id: s, children: e, con
|
|
|
95
95
|
}
|
|
96
96
|
}, V = "_tooltip_10ebf_1", Z = {
|
|
97
97
|
tooltip: V
|
|
98
|
-
}, le = ({ size: r = "xs", placement: s, children: e, content: n, hidden: t }) => /* @__PURE__ */ w(H, { "aria-hidden": t, "data-size": r, content: n, placement: s, className: Z.tooltip, children: e });
|
|
98
|
+
}, le = ({ size: r = "xs", placement: s, children: e, content: n, hidden: t }) => n ? /* @__PURE__ */ w(H, { "aria-hidden": t, "data-size": r, content: n, placement: s, className: Z.tooltip, children: e }) : e;
|
|
99
99
|
export {
|
|
100
100
|
le as Tooltip
|
|
101
101
|
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { BreadcrumbsLinkProps } from '../';
|
|
2
2
|
export interface BreadcrumbsProps {
|
|
3
|
+
ariaLabel?: string;
|
|
4
|
+
className?: string;
|
|
3
5
|
items?: BreadcrumbsLinkProps[];
|
|
4
6
|
}
|
|
5
|
-
export declare const Breadcrumbs: ({ items }: BreadcrumbsProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const Breadcrumbs: ({ ariaLabel, className, items }: BreadcrumbsProps) => 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: ({ items }: import('./Breadcrumbs').BreadcrumbsProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
component: ({ ariaLabel, className, items }: import('./Breadcrumbs').BreadcrumbsProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
tags: string[];
|
|
6
6
|
parameters: {};
|
|
7
7
|
args: {
|
|
@@ -25,4 +25,4 @@ export interface DialogHeaderProps extends DialogMetadataProps {
|
|
|
25
25
|
/** Due date label */
|
|
26
26
|
dueAtLabel?: string;
|
|
27
27
|
}
|
|
28
|
-
export declare const DialogHeader: ({ loading, title, badge, status, extendedStatusLabel, draftsLabel, sentCount, receivedCount, updatedAt, updatedAtLabel, attachmentsCount, dueAt, dueAtLabel, activityLog, }: DialogHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export declare const DialogHeader: ({ loading, title, badge, status, extendedStatusLabel, draftsLabel, sentCount, receivedCount, updatedAt, updatedAtLabel, attachmentsCount, dueAt, dueAtLabel, activityLog, tooltips, }: DialogHeaderProps) => 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, title, badge, status, extendedStatusLabel, draftsLabel, sentCount, receivedCount, updatedAt, updatedAtLabel, attachmentsCount, dueAt, dueAtLabel, activityLog, }: import('./DialogHeader').DialogHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
component: ({ loading, title, badge, status, extendedStatusLabel, draftsLabel, sentCount, receivedCount, updatedAt, updatedAtLabel, attachmentsCount, dueAt, dueAtLabel, activityLog, tooltips, }: import('./DialogHeader').DialogHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
tags: string[];
|
|
6
6
|
parameters: {};
|
|
7
7
|
args: {
|
|
@@ -20,4 +20,6 @@ export declare const Default: Story;
|
|
|
20
20
|
export declare const InProgress: Story;
|
|
21
21
|
export declare const Completed: Story;
|
|
22
22
|
export declare const Loading: Story;
|
|
23
|
+
export declare const WithBadge: Story;
|
|
23
24
|
export declare const WithExtendedStatus: Story;
|
|
25
|
+
export declare const WithTooltips: Story;
|
|
@@ -53,4 +53,4 @@ export interface DialogListItemProps extends ListItemProps, DialogMetadataProps
|
|
|
53
53
|
* summary, sender, and receiver.
|
|
54
54
|
* to mark the item as checked/unchecked and can visually indicate if it is unread.
|
|
55
55
|
*/
|
|
56
|
-
export declare const DialogListItem: ({ size, state, loading, controls, select, selected, status, extendedStatusLabel, 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;
|
|
56
|
+
export declare const DialogListItem: ({ size, state, loading, controls, select, selected, status, extendedStatusLabel, sender, recipient, recipientLabel, grouped, updatedAt, updatedAtLabel, archived, archivedAt, archivedAtLabel, trashed, trashedAt, trashedAtLabel, badge, dueAt, dueAtLabel, unread, seenByLog, draftsLabel, sentCount, receivedCount, attachmentsCount, attachmentsLabel, tooltips, title, description, summary, highlightWords, variant, id, ...rest }: DialogListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,6 +3,7 @@ interface DialogMetadataButtonProps {
|
|
|
3
3
|
label: string;
|
|
4
4
|
onClick?: () => void;
|
|
5
5
|
}
|
|
6
|
+
export type DialogMetadataTooltips = Record<string, string>;
|
|
6
7
|
export type DialogMetadataProps = {
|
|
7
8
|
className?: string;
|
|
8
9
|
/** Metadata is loading */
|
|
@@ -47,9 +48,11 @@ export type DialogMetadataProps = {
|
|
|
47
48
|
transmissionsLabel?: string;
|
|
48
49
|
/** Activity Log */
|
|
49
50
|
activityLog?: DialogMetadataButtonProps;
|
|
51
|
+
/** Tooltips */
|
|
52
|
+
tooltips?: DialogMetadataTooltips;
|
|
50
53
|
};
|
|
51
54
|
/**
|
|
52
55
|
* Metadata for a dialog in list view.
|
|
53
56
|
*/
|
|
54
|
-
export declare const DialogMetadata: ({ className, loading, status, sender, updatedAt, updatedAtLabel, dueAt, dueAtLabel, archivedAt, archivedAtLabel, trashedAt, trashedAtLabel, draftsLabel, sentCount, receivedCount, attachmentsCount, attachmentsLabel, transmissionsLabel, activityLog, extendedStatusLabel, }: DialogMetadataProps) => import("react/jsx-runtime").JSX.Element;
|
|
57
|
+
export declare const DialogMetadata: ({ className, loading, status, sender, updatedAt, updatedAtLabel, dueAt, dueAtLabel, archivedAt, archivedAtLabel, trashedAt, trashedAtLabel, draftsLabel, sentCount, receivedCount, attachmentsCount, attachmentsLabel, transmissionsLabel, activityLog, extendedStatusLabel, tooltips, }: DialogMetadataProps) => import("react/jsx-runtime").JSX.Element;
|
|
55
58
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: ({ className, loading, status, sender, updatedAt, updatedAtLabel, dueAt, dueAtLabel, archivedAt, archivedAtLabel, trashedAt, trashedAtLabel, draftsLabel, sentCount, receivedCount, attachmentsCount, attachmentsLabel, transmissionsLabel, activityLog, extendedStatusLabel, }: import('./DialogMetadata').DialogMetadataProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
component: ({ className, loading, status, sender, updatedAt, updatedAtLabel, dueAt, dueAtLabel, archivedAt, archivedAtLabel, trashedAt, trashedAtLabel, draftsLabel, sentCount, receivedCount, attachmentsCount, attachmentsLabel, transmissionsLabel, activityLog, extendedStatusLabel, tooltips, }: import('./DialogMetadata').DialogMetadataProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
tags: string[];
|
|
6
6
|
parameters: {};
|
|
7
7
|
args: {
|
|
@@ -19,3 +19,4 @@ export declare const NotApplicable: Story;
|
|
|
19
19
|
export declare const Transmissions: Story;
|
|
20
20
|
export declare const ActivityLog: Story;
|
|
21
21
|
export declare const WithExtendedStatus: Story;
|
|
22
|
+
export declare const WithTooltips: Story;
|
|
@@ -18,9 +18,10 @@ export interface DialogStatusProps {
|
|
|
18
18
|
loading?: boolean;
|
|
19
19
|
size?: MetaItemSize;
|
|
20
20
|
value?: DialogStatusValue;
|
|
21
|
+
tooltip?: string;
|
|
21
22
|
label?: string;
|
|
22
23
|
}
|
|
23
24
|
/**
|
|
24
25
|
* Dialog status.
|
|
25
26
|
*/
|
|
26
|
-
export declare const DialogStatus: ({ loading, size, value, label }: DialogStatusProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
27
|
+
export declare const DialogStatus: ({ loading, size, value, label, tooltip }: DialogStatusProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: ({ loading, size, value, label }: import('./DialogStatus').DialogStatusProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
4
|
+
component: ({ loading, size, value, label, tooltip }: import('./DialogStatus').DialogStatusProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
5
5
|
tags: string[];
|
|
6
6
|
parameters: {};
|
|
7
7
|
argTypes: {
|
|
@@ -23,7 +23,7 @@ export interface LayoutProps {
|
|
|
23
23
|
children?: ReactNode;
|
|
24
24
|
skipLink?: SkipLinkProps;
|
|
25
25
|
useGlobalHeader?: boolean;
|
|
26
|
-
breadcrumbs?: BreadcrumbsProps
|
|
26
|
+
breadcrumbs?: BreadcrumbsProps;
|
|
27
27
|
}
|
|
28
28
|
export declare const Layout: ({ color, theme, header, footer, sidebar, content, children, skipLink, breadcrumbs, useGlobalHeader, }: LayoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
29
|
export {};
|
|
@@ -13,9 +13,11 @@ export interface MetaItemProps {
|
|
|
13
13
|
icon?: MetaItemIconProps['icon'];
|
|
14
14
|
/** Label */
|
|
15
15
|
children?: ReactNode;
|
|
16
|
+
/** Tooltip */
|
|
17
|
+
tooltip?: string;
|
|
16
18
|
/** classname */
|
|
17
19
|
className?: string;
|
|
18
20
|
/** OnClick handler */
|
|
19
21
|
onClick?: () => void;
|
|
20
22
|
}
|
|
21
|
-
export declare const MetaItem: ({ loading, reverse, size, variant, icon, children, ...rest }: MetaItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare const MetaItem: ({ loading, reverse, size, variant, icon, children, tooltip, ...rest }: MetaItemProps) => 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, reverse, size, variant, icon, children, ...rest }: import('./MetaItem').MetaItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
component: ({ loading, reverse, size, variant, icon, children, tooltip, ...rest }: import('./MetaItem').MetaItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
tags: string[];
|
|
6
6
|
parameters: {
|
|
7
7
|
layout: string;
|