@altinn/altinn-components 0.61.2 → 0.62.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/LayoutBase-CAdjuw9Q.js +18 -0
- package/dist/assets/Banner.css +1 -1
- package/dist/assets/HeaderDrawer.css +1 -1
- package/dist/assets/HeaderDropdown.css +1 -1
- package/dist/assets/ItemLink.css +1 -1
- package/dist/assets/LayoutBase.css +1 -1
- package/dist/assets/SettingsItemBase.css +1 -1
- package/dist/assets/SettingsSection.css +1 -1
- package/dist/assets/settlingsList.css +1 -0
- package/dist/components/Banner/Banner.js +34 -34
- package/dist/components/Bookmarks/BookmarkSettingsList.js +32 -38
- package/dist/components/GlobalHeader/HeaderDrawer.js +13 -13
- package/dist/components/GlobalHeader/HeaderDropdown.js +8 -8
- package/dist/components/Item/ItemLink.js +26 -26
- package/dist/components/Layout/Layout.js +63 -40
- package/dist/components/Layout/LayoutBase.js +3 -5
- package/dist/components/Layout/index.js +9 -9
- package/dist/components/Settings/SettingsItem.js +59 -36
- package/dist/components/Settings/SettingsItemBase.js +72 -61
- package/dist/components/Settings/SettingsList.js +28 -25
- package/dist/components/Settings/SettingsSection.js +5 -5
- package/dist/components/index.js +1 -1
- package/dist/index.js +1 -1
- package/dist/settlingsList.module-So3_AYgj.js +8 -0
- package/dist/types/lib/components/Account/AccountList.stories.d.ts +14 -6
- package/dist/types/lib/components/ActivityLog/ActivityLog.stories.d.ts +4 -1
- package/dist/types/lib/components/Banner/Banner.stories.d.ts +1 -0
- package/dist/types/lib/components/Item/ItemBase.d.ts +4 -4
- package/dist/types/lib/components/Layout/Layout.d.ts +14 -1
- package/dist/types/lib/components/Layout/Layout.stories.d.ts +3 -1
- package/dist/types/lib/components/Layout/LayoutBase.d.ts +3 -2
- package/dist/types/lib/components/Settings/SettingsItem.d.ts +2 -2
- package/dist/types/lib/components/Settings/SettingsItem.stories.d.ts +65 -0
- package/dist/types/lib/components/Settings/SettingsItemBase.d.ts +5 -1
- package/dist/types/lib/components/Settings/SettingsList.d.ts +2 -1
- package/dist/types/lib/components/Settings/VerifySettingsModal.stories.d.ts +2 -0
- package/dist/types/lib/stories/Profile.stories.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { LayoutGrid as
|
|
3
|
-
import { LayoutBody as
|
|
4
|
-
import { LayoutContent as
|
|
5
|
-
import { LayoutSidebar as
|
|
1
|
+
import { L as t } from "../../LayoutBase-CAdjuw9Q.js";
|
|
2
|
+
import { LayoutGrid as e } from "./LayoutGrid.js";
|
|
3
|
+
import { LayoutBody as L } from "./LayoutBody.js";
|
|
4
|
+
import { LayoutContent as m } from "./LayoutContent.js";
|
|
5
|
+
import { LayoutSidebar as u } from "./LayoutSidebar.js";
|
|
6
6
|
import { Layout as d } from "./Layout.js";
|
|
7
7
|
export {
|
|
8
8
|
d as Layout,
|
|
9
9
|
t as LayoutBase,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
L as LayoutBody,
|
|
11
|
+
m as LayoutContent,
|
|
12
|
+
e as LayoutGrid,
|
|
13
|
+
u as LayoutSidebar
|
|
14
14
|
};
|
|
@@ -1,38 +1,40 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import "../../index-p1eeF8LQ.js";
|
|
3
|
-
import { useState as
|
|
4
|
-
import { Input as
|
|
3
|
+
import { useState as b } from "react";
|
|
4
|
+
import { Input as P } from "../Forms/Input.js";
|
|
5
5
|
import "../../ToolbarSearch-56Sm2j7P.js";
|
|
6
6
|
import "../Typography/Link.js";
|
|
7
7
|
import "../Button/Button.js";
|
|
8
8
|
import "react-dom";
|
|
9
9
|
import "../Snackbar/useSnackbar.js";
|
|
10
|
-
import { SettingsItemBase as
|
|
11
|
-
import { SettingsModal as
|
|
12
|
-
const
|
|
13
|
-
loading:
|
|
14
|
-
variant:
|
|
15
|
-
id:
|
|
16
|
-
name:
|
|
10
|
+
import { SettingsItemBase as r } from "./SettingsItemBase.js";
|
|
11
|
+
import { SettingsModal as w } from "./SettingsModal.js";
|
|
12
|
+
const O = ({
|
|
13
|
+
loading: d,
|
|
14
|
+
variant: h = "default",
|
|
15
|
+
id: u = "settings",
|
|
16
|
+
name: p,
|
|
17
17
|
title: e,
|
|
18
|
-
value:
|
|
18
|
+
value: n,
|
|
19
19
|
description: s,
|
|
20
|
-
checked:
|
|
21
|
-
onChange:
|
|
20
|
+
checked: f,
|
|
21
|
+
onChange: g,
|
|
22
22
|
modalProps: o,
|
|
23
|
-
|
|
23
|
+
expanded: a,
|
|
24
|
+
children: c,
|
|
24
25
|
...i
|
|
25
26
|
}) => {
|
|
26
|
-
const [l,
|
|
27
|
-
if (
|
|
28
|
-
return /* @__PURE__ */ t(
|
|
29
|
-
switch (
|
|
27
|
+
const [l, m] = b(!1);
|
|
28
|
+
if (d)
|
|
29
|
+
return /* @__PURE__ */ t(r, { icon: i?.icon, titleProps: { children: e }, loading: !0 });
|
|
30
|
+
switch (h) {
|
|
30
31
|
case "link":
|
|
31
32
|
return /* @__PURE__ */ t(
|
|
32
|
-
|
|
33
|
+
r,
|
|
33
34
|
{
|
|
34
35
|
...i,
|
|
35
36
|
titleProps: {
|
|
37
|
+
size: "md",
|
|
36
38
|
children: e
|
|
37
39
|
},
|
|
38
40
|
descriptionProps: {
|
|
@@ -45,7 +47,7 @@ const M = ({
|
|
|
45
47
|
);
|
|
46
48
|
case "switch":
|
|
47
49
|
return /* @__PURE__ */ t(
|
|
48
|
-
|
|
50
|
+
r,
|
|
49
51
|
{
|
|
50
52
|
...i,
|
|
51
53
|
as: "div",
|
|
@@ -59,27 +61,48 @@ const M = ({
|
|
|
59
61
|
children: s
|
|
60
62
|
},
|
|
61
63
|
controls: /* @__PURE__ */ t(
|
|
62
|
-
|
|
64
|
+
P,
|
|
63
65
|
{
|
|
64
66
|
type: "checkbox",
|
|
65
67
|
role: "switch",
|
|
66
|
-
"aria-labelledby":
|
|
67
|
-
name:
|
|
68
|
-
value:
|
|
69
|
-
checked:
|
|
70
|
-
onChange:
|
|
68
|
+
"aria-labelledby": u,
|
|
69
|
+
name: p,
|
|
70
|
+
value: n,
|
|
71
|
+
checked: f,
|
|
72
|
+
onChange: g,
|
|
71
73
|
style: { marginRight: "0.5em" }
|
|
72
74
|
}
|
|
73
75
|
)
|
|
74
76
|
}
|
|
75
77
|
);
|
|
78
|
+
case "accordion":
|
|
79
|
+
return /* @__PURE__ */ t(
|
|
80
|
+
r,
|
|
81
|
+
{
|
|
82
|
+
...i,
|
|
83
|
+
as: "button",
|
|
84
|
+
linkIcon: !0,
|
|
85
|
+
collapsible: !0,
|
|
86
|
+
expanded: a,
|
|
87
|
+
titleProps: {
|
|
88
|
+
children: e
|
|
89
|
+
},
|
|
90
|
+
descriptionProps: {
|
|
91
|
+
size: "xs",
|
|
92
|
+
weight: "normal",
|
|
93
|
+
variant: "subtle",
|
|
94
|
+
children: s
|
|
95
|
+
},
|
|
96
|
+
children: a && /* @__PURE__ */ t("div", { children: c })
|
|
97
|
+
}
|
|
98
|
+
);
|
|
76
99
|
case "modal":
|
|
77
100
|
return /* @__PURE__ */ t(
|
|
78
|
-
|
|
101
|
+
r,
|
|
79
102
|
{
|
|
80
103
|
...i,
|
|
81
104
|
titleProps: {
|
|
82
|
-
size:
|
|
105
|
+
size: n ? "xs" : "sm",
|
|
83
106
|
variant: "subtle",
|
|
84
107
|
weight: "normal",
|
|
85
108
|
children: e
|
|
@@ -87,32 +110,32 @@ const M = ({
|
|
|
87
110
|
descriptionProps: {
|
|
88
111
|
size: "sm",
|
|
89
112
|
variant: "default",
|
|
90
|
-
children: s ||
|
|
113
|
+
children: s || n
|
|
91
114
|
},
|
|
92
115
|
as: "button",
|
|
93
116
|
linkIcon: !0,
|
|
94
|
-
onClick: () =>
|
|
117
|
+
onClick: () => m(!0),
|
|
95
118
|
expanded: l,
|
|
96
119
|
children: l && /* @__PURE__ */ t(
|
|
97
|
-
|
|
120
|
+
w,
|
|
98
121
|
{
|
|
99
122
|
...o,
|
|
100
123
|
icon: o?.icon || i?.icon,
|
|
101
124
|
title: o?.title || e,
|
|
102
125
|
open: l,
|
|
103
|
-
onClose: () =>
|
|
104
|
-
children:
|
|
126
|
+
onClose: () => m(!1),
|
|
127
|
+
children: c
|
|
105
128
|
}
|
|
106
129
|
)
|
|
107
130
|
}
|
|
108
131
|
);
|
|
109
132
|
default:
|
|
110
133
|
return /* @__PURE__ */ t(
|
|
111
|
-
|
|
134
|
+
r,
|
|
112
135
|
{
|
|
113
136
|
...i,
|
|
114
137
|
titleProps: {
|
|
115
|
-
size:
|
|
138
|
+
size: n ? "xs" : "sm",
|
|
116
139
|
variant: "subtle",
|
|
117
140
|
weight: "normal",
|
|
118
141
|
children: e
|
|
@@ -120,12 +143,12 @@ const M = ({
|
|
|
120
143
|
descriptionProps: {
|
|
121
144
|
size: "sm",
|
|
122
145
|
variant: "default",
|
|
123
|
-
children: s ||
|
|
146
|
+
children: s || n
|
|
124
147
|
}
|
|
125
148
|
}
|
|
126
149
|
);
|
|
127
150
|
}
|
|
128
151
|
};
|
|
129
152
|
export {
|
|
130
|
-
|
|
153
|
+
O as SettingsItem
|
|
131
154
|
};
|
|
@@ -1,73 +1,84 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { h as
|
|
1
|
+
import { jsxs as m, jsx as a, Fragment as g } from "react/jsx-runtime";
|
|
2
|
+
import { h as u, H as c, B, v as C } from "../../ToolbarSearch-56Sm2j7P.js";
|
|
3
3
|
import "../../index-p1eeF8LQ.js";
|
|
4
4
|
import "react";
|
|
5
|
+
import { Typography as b } from "../Typography/Typography.js";
|
|
5
6
|
import "../Typography/Link.js";
|
|
6
|
-
import { ItemControls as
|
|
7
|
-
import { ItemBase as
|
|
8
|
-
import { ItemLink as
|
|
7
|
+
import { ItemControls as w } from "../Item/ItemControls.js";
|
|
8
|
+
import { ItemBase as R } from "../Item/ItemBase.js";
|
|
9
|
+
import { ItemLink as j } from "../Item/ItemLink.js";
|
|
9
10
|
import "../Button/Button.js";
|
|
10
11
|
import "react-dom";
|
|
11
12
|
import "../Snackbar/useSnackbar.js";
|
|
12
|
-
import
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
13
|
+
import { S as H } from "../../ChevronUp-hn05LboH.js";
|
|
14
|
+
import { S as z } from "../../ChevronDown-D_a7nb-G.js";
|
|
15
|
+
import '../../assets/SettingsItemBase.css';const D = "_listItem_1p24v_1", F = "_summary_1p24v_23", L = "_item_1p24v_27", M = "_media_1p24v_45", T = "_link_1p24v_59", U = "_linkIcon_1p24v_69", q = "_label_1p24v_75", A = "_controls_1p24v_88", s = {
|
|
16
|
+
listItem: D,
|
|
17
|
+
summary: F,
|
|
18
|
+
item: L,
|
|
19
|
+
media: M,
|
|
20
|
+
link: T,
|
|
21
|
+
linkIcon: U,
|
|
22
|
+
label: q,
|
|
23
|
+
controls: A
|
|
24
|
+
}, as = ({
|
|
25
|
+
as: p,
|
|
26
|
+
ref: _,
|
|
27
|
+
hidden: v,
|
|
28
|
+
disabled: e,
|
|
23
29
|
loading: t,
|
|
24
|
-
color:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
30
|
+
color: d,
|
|
31
|
+
collapsible: o,
|
|
32
|
+
expanded: i,
|
|
33
|
+
icon: I,
|
|
34
|
+
label: N,
|
|
35
|
+
titleProps: h = {},
|
|
36
|
+
descriptionProps: k = {},
|
|
37
|
+
summary: n,
|
|
38
|
+
children: f,
|
|
39
|
+
highlightWords: l,
|
|
40
|
+
badge: r,
|
|
41
|
+
linkIcon: x,
|
|
42
|
+
controls: y,
|
|
43
|
+
...S
|
|
44
|
+
}) => /* @__PURE__ */ m("li", { className: s.listItem, "data-collapsible": o, "data-expanded": i, children: [
|
|
45
|
+
/* @__PURE__ */ m(R, { ref: _, as: "div", className: s.item, color: d, "aria-hidden": v, "data-loading": t, children: [
|
|
46
|
+
/* @__PURE__ */ m(j, { ...S, className: s.link, disabled: e, as: p, children: [
|
|
47
|
+
/* @__PURE__ */ a(u, { icon: I, className: s.media }),
|
|
48
|
+
N || /* @__PURE__ */ m("span", { className: s.label, children: [
|
|
49
|
+
/* @__PURE__ */ a(
|
|
50
|
+
c,
|
|
51
|
+
{
|
|
52
|
+
...h,
|
|
53
|
+
as: "span",
|
|
54
|
+
highlightWords: l,
|
|
55
|
+
loading: t,
|
|
56
|
+
maxRows: 2,
|
|
57
|
+
className: s.title
|
|
58
|
+
}
|
|
59
|
+
),
|
|
60
|
+
/* @__PURE__ */ a(
|
|
61
|
+
c,
|
|
62
|
+
{
|
|
63
|
+
...k,
|
|
64
|
+
as: "span",
|
|
65
|
+
highlightWords: l,
|
|
66
|
+
loading: t,
|
|
67
|
+
maxRows: 2,
|
|
68
|
+
className: s.description
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
] })
|
|
72
|
+
] }),
|
|
73
|
+
!e && /* @__PURE__ */ m(g, { children: [
|
|
74
|
+
/* @__PURE__ */ a(w, { className: s.controls, children: y }),
|
|
75
|
+
r && /* @__PURE__ */ a(B, { ...r }),
|
|
76
|
+
o && (i ? /* @__PURE__ */ a(H, { className: s.linkIcon }) : /* @__PURE__ */ a(z, { className: s.linkIcon })) || x && /* @__PURE__ */ a(C, { className: s.linkIcon })
|
|
62
77
|
] })
|
|
63
78
|
] }),
|
|
64
|
-
/* @__PURE__ */ a(b, { className:
|
|
65
|
-
|
|
66
|
-
i && /* @__PURE__ */ s(h, { ...i }),
|
|
67
|
-
I && /* @__PURE__ */ s(B, { className: e.linkIcon })
|
|
68
|
-
] }),
|
|
69
|
-
k
|
|
79
|
+
n && /* @__PURE__ */ a(b, { className: s.summary, size: "xs", variant: "subtle", children: n }),
|
|
80
|
+
f
|
|
70
81
|
] });
|
|
71
82
|
export {
|
|
72
|
-
|
|
83
|
+
as as SettingsItemBase
|
|
73
84
|
};
|
|
@@ -1,39 +1,42 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Fragment as
|
|
1
|
+
import { jsx as t, jsxs as a } from "react/jsx-runtime";
|
|
2
|
+
import { Fragment as c, createElement as d } from "react";
|
|
3
3
|
import "../../index-p1eeF8LQ.js";
|
|
4
|
-
import { useMenu as
|
|
4
|
+
import { useMenu as N } from "../../hooks/useMenu.js";
|
|
5
5
|
import { H as u } from "../../ToolbarSearch-56Sm2j7P.js";
|
|
6
6
|
import "../Typography/Link.js";
|
|
7
7
|
import "../Button/Button.js";
|
|
8
|
+
import { s } from "../../settlingsList.module-So3_AYgj.js";
|
|
8
9
|
import "react-dom";
|
|
9
|
-
import { Divider as h } from "../Divider/Divider.js";
|
|
10
|
-
import { List as y } from "../List/List.js";
|
|
11
10
|
import "../Snackbar/useSnackbar.js";
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
items: s,
|
|
18
|
-
groups: p,
|
|
11
|
+
import { SettingsItem as g } from "./SettingsItem.js";
|
|
12
|
+
const w = ({ items: h, variant: i = "default", groups: f = {}, sortGroupBy: y }) => {
|
|
13
|
+
const { menu: p } = N({
|
|
14
|
+
items: h,
|
|
15
|
+
groups: f,
|
|
19
16
|
groupByKey: "groupId",
|
|
20
17
|
keyboardEvents: !1,
|
|
21
|
-
sortGroupBy:
|
|
18
|
+
sortGroupBy: y
|
|
22
19
|
});
|
|
23
|
-
return /* @__PURE__ */
|
|
24
|
-
const
|
|
25
|
-
return /* @__PURE__ */
|
|
26
|
-
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
-
const
|
|
29
|
-
return /* @__PURE__ */
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
20
|
+
return i === "menu" ? /* @__PURE__ */ t("div", { className: s.section, "data-variant": i, children: p?.map((e, o) => {
|
|
21
|
+
const r = e.props || {};
|
|
22
|
+
return /* @__PURE__ */ a(c, { children: [
|
|
23
|
+
r?.title && /* @__PURE__ */ t(u, { size: "xs", weight: "normal", variant: "subtle", children: r.title }),
|
|
24
|
+
/* @__PURE__ */ t("ul", { className: s.list, children: e?.items.map((m, n) => {
|
|
25
|
+
const l = m.props || {};
|
|
26
|
+
return /* @__PURE__ */ d(g, { ...l, key: "settings-list-item" + n });
|
|
27
|
+
}) })
|
|
28
|
+
] }, o);
|
|
29
|
+
}) }) : /* @__PURE__ */ t("div", { className: s.section, "data-variant": i, children: p?.map((e, o) => {
|
|
30
|
+
const r = e.props || {};
|
|
31
|
+
return /* @__PURE__ */ a(c, { children: [
|
|
32
|
+
r?.title && /* @__PURE__ */ t(u, { size: "lg", children: r.title }),
|
|
33
|
+
/* @__PURE__ */ t("section", { className: s.group, children: /* @__PURE__ */ t("ul", { className: s.list, children: e?.items.map((m, n) => {
|
|
34
|
+
const l = m.props || {};
|
|
35
|
+
return /* @__PURE__ */ d(g, { ...l, key: "settings-list-item" + n });
|
|
33
36
|
}) }) })
|
|
34
|
-
] },
|
|
37
|
+
] }, o);
|
|
35
38
|
}) });
|
|
36
39
|
};
|
|
37
40
|
export {
|
|
38
|
-
|
|
41
|
+
w as SettingsList
|
|
39
42
|
};
|
|
@@ -6,17 +6,17 @@ import "../Typography/Link.js";
|
|
|
6
6
|
import "../Button/Button.js";
|
|
7
7
|
import "react-dom";
|
|
8
8
|
import "../Snackbar/useSnackbar.js";
|
|
9
|
-
import { Section as
|
|
10
|
-
import '../../assets/SettingsSection.css';const
|
|
11
|
-
section:
|
|
9
|
+
import { Section as e } from "../Page/Section.js";
|
|
10
|
+
import '../../assets/SettingsSection.css';const n = "_section_1ccux_1", p = {
|
|
11
|
+
section: n
|
|
12
12
|
}, j = ({
|
|
13
13
|
size: t = "sm",
|
|
14
14
|
theme: o = "default",
|
|
15
15
|
shadow: i = "xs",
|
|
16
16
|
as: s,
|
|
17
17
|
color: r,
|
|
18
|
-
children:
|
|
19
|
-
}) => /* @__PURE__ */ m(
|
|
18
|
+
children: c
|
|
19
|
+
}) => /* @__PURE__ */ m(e, { as: s, size: t, color: r, theme: o, shadow: i, className: p.section, spacing: 2, children: c });
|
|
20
20
|
export {
|
|
21
21
|
j as SettingsSection
|
|
22
22
|
};
|
package/dist/components/index.js
CHANGED
|
@@ -69,7 +69,7 @@ import { ItemControls as ae } from "./Item/ItemControls.js";
|
|
|
69
69
|
import { ItemSelect as xe } from "./Item/ItemSelect.js";
|
|
70
70
|
import { ItemBase as ie } from "./Item/ItemBase.js";
|
|
71
71
|
import { ItemLink as ne } from "./Item/ItemLink.js";
|
|
72
|
-
import {
|
|
72
|
+
import { L as ce } from "../LayoutBase-CAdjuw9Q.js";
|
|
73
73
|
import { LayoutGrid as de } from "./Layout/LayoutGrid.js";
|
|
74
74
|
import { LayoutBody as De } from "./Layout/LayoutBody.js";
|
|
75
75
|
import { LayoutContent as Be } from "./Layout/LayoutContent.js";
|
package/dist/index.js
CHANGED
|
@@ -69,7 +69,7 @@ import { ItemControls as ae } from "./components/Item/ItemControls.js";
|
|
|
69
69
|
import { ItemSelect as xe } from "./components/Item/ItemSelect.js";
|
|
70
70
|
import { ItemBase as ie } from "./components/Item/ItemBase.js";
|
|
71
71
|
import { ItemLink as ne } from "./components/Item/ItemLink.js";
|
|
72
|
-
import {
|
|
72
|
+
import { L as ce } from "./LayoutBase-CAdjuw9Q.js";
|
|
73
73
|
import { LayoutGrid as de } from "./components/Layout/LayoutGrid.js";
|
|
74
74
|
import { LayoutBody as De } from "./components/Layout/LayoutBody.js";
|
|
75
75
|
import { LayoutContent as Be } from "./components/Layout/LayoutContent.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChangeEvent } from 'react';
|
|
2
|
-
import { AccountListItemProps, AccountListProps } from '..';
|
|
2
|
+
import { AccountListItemProps, AccountListProps, LayoutProps } from '..';
|
|
3
3
|
import { UseAccountsProps } from '../../../examples';
|
|
4
4
|
declare const meta: {
|
|
5
5
|
title: string;
|
|
@@ -13,18 +13,26 @@ declare const meta: {
|
|
|
13
13
|
export default meta;
|
|
14
14
|
export declare const Default: ({ includeGroups }: UseAccountsProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
export declare const Loading: () => import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
interface
|
|
16
|
+
interface ControlledPageQuery {
|
|
17
|
+
q?: string;
|
|
18
|
+
}
|
|
19
|
+
interface ControlledPageProps {
|
|
20
|
+
layout?: LayoutProps;
|
|
21
|
+
title?: string;
|
|
17
22
|
includeGroups?: boolean;
|
|
18
23
|
contextMenu?: boolean;
|
|
19
24
|
collapsible?: boolean;
|
|
20
25
|
color?: 'neutral';
|
|
21
26
|
variant?: 'subtle' | 'tinted' | 'default';
|
|
22
27
|
virtualized?: boolean;
|
|
28
|
+
query?: ControlledPageQuery;
|
|
23
29
|
}
|
|
24
|
-
export declare const
|
|
25
|
-
export declare const
|
|
26
|
-
export declare const
|
|
27
|
-
export declare const
|
|
30
|
+
export declare const ControlledPage: ({ layout, title, includeGroups, collapsible, contextMenu, variant, virtualized, query, }: ControlledPageProps) => import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export declare const CollapsiblePage: () => import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export declare const AccountSelector: () => import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export declare const AccountSettings: () => import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
export declare const AccountUserSettings: () => import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export declare const AccountCompanySettings: () => import("react/jsx-runtime").JSX.Element;
|
|
28
36
|
interface AccountDetailsProps extends AccountListItemProps {
|
|
29
37
|
smsAlerts?: boolean;
|
|
30
38
|
emailAlerts?: boolean;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
declare const meta: {
|
|
2
2
|
title: string;
|
|
3
3
|
tags: string[];
|
|
4
|
-
parameters: {
|
|
4
|
+
parameters: {
|
|
5
|
+
layout: string;
|
|
6
|
+
};
|
|
5
7
|
args: {};
|
|
6
8
|
};
|
|
7
9
|
export default meta;
|
|
8
10
|
export declare const Default: () => import("react/jsx-runtime").JSX.Element;
|
|
9
11
|
export declare const Controlled: () => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const ProfileActivityLog: () => import("react/jsx-runtime").JSX.Element;
|
|
10
13
|
export declare const ActivityLogModal: () => import("react/jsx-runtime").JSX.Element;
|
|
11
14
|
export declare const ActivityLogModalAdvanced: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -22,3 +22,4 @@ export declare const InfoExpanded: Story;
|
|
|
22
22
|
export declare const ErrorBanner: Story;
|
|
23
23
|
export declare const ErrorExpanded: Story;
|
|
24
24
|
export declare const Colors: (args: BannerProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare const StrongCompany: (args: BannerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,11 +2,11 @@ import { ComponentPropsWithRef, ElementType, ReactNode } from 'react';
|
|
|
2
2
|
import { Color } from '..';
|
|
3
3
|
export type ItemSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
4
4
|
export type ItemColor = Color;
|
|
5
|
-
export type ItemBaseProps
|
|
5
|
+
export type ItemBaseProps = {
|
|
6
6
|
/** The element type to render as. */
|
|
7
|
-
as?:
|
|
7
|
+
as?: ElementType;
|
|
8
8
|
/** Optional ref */
|
|
9
|
-
ref?: React.Ref<
|
|
9
|
+
ref?: React.Ref<ElementType>;
|
|
10
10
|
/** The tab index of the list item. */
|
|
11
11
|
tabIndex?: number;
|
|
12
12
|
/** The size of item. */
|
|
@@ -25,5 +25,5 @@ export type ItemBaseProps<T extends ElementType = 'li'> = {
|
|
|
25
25
|
children?: ReactNode;
|
|
26
26
|
/** Id of list item. */
|
|
27
27
|
id?: string;
|
|
28
|
-
} & Omit<ComponentPropsWithRef<
|
|
28
|
+
} & Omit<ComponentPropsWithRef<ElementType>, 'color' | 'size'>;
|
|
29
29
|
export declare const ItemBase: ({ id, ref, as, size, color, variant, hidden, disabled, className, children, ...rest }: ItemBaseProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { LayoutColor, LayoutSidebarProps, LayoutTheme } from '.';
|
|
3
|
+
import { BannerColor, BannerVariant } from '../Banner';
|
|
3
4
|
import { BreadcrumbsProps } from '../Breadcrumbs';
|
|
4
5
|
import { FooterProps } from '../Footer';
|
|
5
6
|
import { GlobalHeaderProps } from '../GlobalHeader';
|
|
7
|
+
import { SvgElement } from '../Icon';
|
|
6
8
|
import { MenuProps } from '../Menu';
|
|
7
9
|
import { SkipLinkProps } from '../SkipLink';
|
|
8
10
|
interface SidebarProps extends LayoutSidebarProps {
|
|
@@ -12,7 +14,18 @@ interface SidebarProps extends LayoutSidebarProps {
|
|
|
12
14
|
interface ContentProps {
|
|
13
15
|
color?: LayoutColor;
|
|
14
16
|
}
|
|
17
|
+
export interface LayoutBannerProps {
|
|
18
|
+
title: string;
|
|
19
|
+
link?: {
|
|
20
|
+
label: string;
|
|
21
|
+
href: string;
|
|
22
|
+
};
|
|
23
|
+
color?: BannerColor;
|
|
24
|
+
variant?: BannerVariant;
|
|
25
|
+
icon?: SvgElement;
|
|
26
|
+
}
|
|
15
27
|
export interface LayoutProps {
|
|
28
|
+
banner?: LayoutBannerProps;
|
|
16
29
|
color?: LayoutColor;
|
|
17
30
|
theme?: LayoutTheme;
|
|
18
31
|
header?: GlobalHeaderProps;
|
|
@@ -23,5 +36,5 @@ export interface LayoutProps {
|
|
|
23
36
|
skipLink?: SkipLinkProps;
|
|
24
37
|
breadcrumbs?: BreadcrumbsProps;
|
|
25
38
|
}
|
|
26
|
-
export declare const Layout: ({ color, theme, header, footer, sidebar, content, children, skipLink, breadcrumbs, }: LayoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
export declare const Layout: ({ banner, color, theme, header, footer, sidebar, content, children, skipLink, breadcrumbs, }: LayoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
27
40
|
export {};
|
|
@@ -4,7 +4,7 @@ interface LayoutStoryArgs extends LayoutProps {
|
|
|
4
4
|
}
|
|
5
5
|
declare const meta: {
|
|
6
6
|
title: string;
|
|
7
|
-
component: ({ color, theme, header, footer, sidebar, content, children, skipLink, breadcrumbs, }: LayoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
component: ({ banner, color, theme, header, footer, sidebar, content, children, skipLink, breadcrumbs, }: LayoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
parameters: {
|
|
9
9
|
layout: string;
|
|
10
10
|
};
|
|
@@ -46,4 +46,6 @@ export declare const HiddenSidebar: (args: LayoutStoryArgs) => import("react/jsx
|
|
|
46
46
|
export declare const Fullscreen: (args: LayoutStoryArgs) => import("react/jsx-runtime").JSX.Element;
|
|
47
47
|
export declare const Profile: (args: LayoutStoryArgs) => import("react/jsx-runtime").JSX.Element;
|
|
48
48
|
export declare const SidebarReference: (args: LayoutStoryArgs) => import("react/jsx-runtime").JSX.Element;
|
|
49
|
+
export declare const WithBanner: (args: LayoutStoryArgs) => import("react/jsx-runtime").JSX.Element;
|
|
50
|
+
export declare const WithCustomBanner: (args: LayoutStoryArgs) => import("react/jsx-runtime").JSX.Element;
|
|
49
51
|
export declare const InboxLayout: (args: LayoutStoryArgs) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
export type LayoutColor = 'neutral' | 'company' | 'person';
|
|
3
|
-
export type LayoutTheme = 'default' | 'subtle' | 'neutral' | 'inbox';
|
|
3
|
+
export type LayoutTheme = 'default' | 'subtle' | 'neutral' | 'inbox' | 'settings';
|
|
4
4
|
export interface LayoutBaseProps {
|
|
5
5
|
color?: LayoutColor;
|
|
6
6
|
theme?: LayoutTheme /** TODO: Should be renamed to variant */;
|
|
7
7
|
currentId?: string;
|
|
8
|
+
bannerHeight?: number;
|
|
8
9
|
children?: ReactNode;
|
|
9
10
|
}
|
|
10
11
|
/**
|
|
@@ -20,4 +21,4 @@ export interface LayoutBaseProps {
|
|
|
20
21
|
* - Footer
|
|
21
22
|
*
|
|
22
23
|
*/
|
|
23
|
-
export declare const LayoutBase: ({ currentId, color, theme, children }: LayoutBaseProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare const LayoutBase: ({ currentId, color, theme, bannerHeight, children }: LayoutBaseProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { InputProps, SettingsItemBaseProps, SettingsModalProps } from '..';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
export type SettingsItemVariant = 'default' | 'link' | 'modal' | 'switch';
|
|
3
|
+
export type SettingsItemVariant = 'default' | 'link' | 'modal' | 'accordion' | 'switch';
|
|
4
4
|
export interface SettingsItemModalProps {
|
|
5
5
|
icon?: SettingsModalProps['icon'];
|
|
6
6
|
title?: SettingsModalProps['title'];
|
|
@@ -19,4 +19,4 @@ export interface SettingsItemProps extends SettingsItemBaseProps {
|
|
|
19
19
|
modalProps?: SettingsItemModalProps;
|
|
20
20
|
children?: ReactNode;
|
|
21
21
|
}
|
|
22
|
-
export declare const SettingsItem: ({ loading, variant, id, name, title, value, description, checked, onChange, modalProps, children, ...props }: SettingsItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare const SettingsItem: ({ loading, variant, id, name, title, value, description, checked, onChange, modalProps, expanded, children, ...props }: SettingsItemProps) => import("react/jsx-runtime").JSX.Element;
|