@altinn/altinn-components 0.28.1 → 0.29.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/Badge.css +1 -1
- package/dist/assets/Button.css +1 -1
- package/dist/assets/ButtonBase.css +1 -1
- package/dist/assets/ButtonIcon.css +1 -1
- package/dist/assets/ComboButton.css +1 -1
- package/dist/assets/Flex.css +1 -1
- package/dist/assets/Grid.css +1 -1
- package/dist/assets/Heading.css +1 -1
- package/dist/assets/List.css +1 -0
- package/dist/assets/ListItemControls.css +1 -1
- package/dist/assets/ListItemHeader.css +1 -1
- package/dist/assets/MenuItem.css +1 -0
- package/dist/assets/MenuItemBase.css +1 -1
- package/dist/assets/MenuItemLabel.css +1 -1
- package/dist/assets/MenuSearch.css +1 -1
- package/dist/assets/SearchField.css +1 -1
- package/dist/assets/SearchbarField.css +1 -0
- package/dist/assets/Section.css +1 -0
- package/dist/components/Account/AccountList.js +24 -0
- package/dist/components/Account/AccountListItem.js +58 -0
- package/dist/components/Account/AccountListItemControls.js +77 -0
- package/dist/components/Account/AccountMenu.js +56 -0
- package/dist/components/Account/index.js +8 -0
- package/dist/components/Badge/Badge.js +13 -3
- package/dist/components/Button/Button.js +49 -44
- package/dist/components/Button/ButtonBase.js +17 -15
- package/dist/components/Button/ButtonIcon.js +13 -7
- package/dist/components/Button/ComboButton.js +49 -33
- package/dist/components/Button/IconButton.js +31 -27
- package/dist/components/ContextMenu/ContextMenu.js +45 -48
- package/dist/components/Forms/SearchField.js +34 -0
- package/dist/components/Forms/index.js +14 -12
- package/dist/components/GlobalMenu/CurrentAccount.js +28 -0
- package/dist/components/GlobalMenu/GlobalMenu.js +70 -75
- package/dist/components/GlobalMenu/index.js +6 -8
- package/dist/components/Header/HeaderButton.js +1 -1
- package/dist/components/Icon/Icon.js +21 -22
- package/dist/components/Icon/IconOrAvatar.js +12 -12
- package/dist/components/List/List.js +9 -7
- package/dist/components/List/ListItemControls.js +1 -1
- package/dist/components/List/ListItemHeader.js +64 -57
- package/dist/components/List/ListItemLabel.js +36 -28
- package/dist/components/List/ListItemLink.js +32 -32
- package/dist/components/Menu/MenuItem.js +41 -41
- package/dist/components/Menu/MenuItemBase.js +33 -54
- package/dist/components/Menu/MenuItemLabel.js +58 -20
- package/dist/components/Menu/MenuOption.js +32 -41
- package/dist/components/Menu/MenuSearch.js +24 -43
- package/dist/components/Menu/index.js +24 -23
- package/dist/components/Page/Flex.js +5 -5
- package/dist/components/Page/Grid.js +24 -26
- package/dist/components/Page/Section.js +7 -5
- package/dist/components/Page/index.js +20 -22
- package/dist/components/Searchbar/Searchbar.js +6 -6
- package/dist/components/Searchbar/{SearchField.js → SearchbarField.js} +8 -8
- package/dist/components/Searchbar/index.js +6 -6
- package/dist/components/Settings/SettingsItem.js +27 -30
- package/dist/components/Toolbar/ToolbarAccountMenu.js +6 -6
- package/dist/components/Toolbar/ToolbarSearch.js +22 -43
- package/dist/components/Typography/Heading.js +7 -7
- package/dist/components/index.js +391 -390
- package/dist/index.js +397 -396
- package/dist/spacing.css +44 -8
- package/dist/types/lib/components/Account/AccountList.d.ts +10 -0
- package/dist/types/lib/components/Account/AccountList.stories.d.ts +18 -0
- package/dist/types/lib/components/Account/AccountListItem.d.ts +18 -0
- package/dist/types/lib/components/{Profile → Account}/AccountListItem.stories.d.ts +16 -7
- package/dist/types/lib/components/Account/AccountListItemControls.d.ts +17 -0
- package/dist/types/lib/components/Account/AccountMenu.d.ts +22 -0
- package/dist/types/lib/components/Account/AccountMenu.stories.d.ts +15 -0
- package/dist/types/lib/components/{Profile → Account}/index.d.ts +1 -0
- package/dist/types/lib/components/Badge/Badge.d.ts +4 -1
- package/dist/types/lib/components/Badge/Badge.stories.d.ts +1 -1
- package/dist/types/lib/components/Button/Button.d.ts +5 -5
- package/dist/types/lib/components/Button/Button.stories.d.ts +2 -1
- package/dist/types/lib/components/Button/ButtonBase.d.ts +2 -1
- package/dist/types/lib/components/Button/ButtonIcon.d.ts +5 -5
- package/dist/types/lib/components/Button/ButtonLabel.d.ts +2 -2
- package/dist/types/lib/components/Button/ComboButton.d.ts +6 -4
- package/dist/types/lib/components/Button/IconButton.d.ts +4 -4
- package/dist/types/lib/components/ContextMenu/ContextMenu.d.ts +1 -3
- package/dist/types/lib/components/ContextMenu/ContextMenu.stories.d.ts +2 -1
- package/dist/types/lib/components/Forms/SearchField.d.ts +9 -0
- package/dist/types/lib/components/Forms/SearchField.stories.d.ts +16 -0
- package/dist/types/lib/components/Forms/index.d.ts +1 -0
- package/dist/types/lib/components/GlobalMenu/{AccountButton.d.ts → CurrentAccount.d.ts} +3 -2
- package/dist/types/lib/components/GlobalMenu/GlobalMenu.d.ts +4 -4
- package/dist/types/lib/components/GlobalMenu/GlobalMenu.stories.d.ts +8 -11
- package/dist/types/lib/components/GlobalMenu/index.d.ts +1 -2
- package/dist/types/lib/components/Header/Header.stories.d.ts +8 -7
- package/dist/types/lib/components/Header/LocaleSwitcher.stories.d.ts +3 -1
- package/dist/types/lib/components/Icon/Icon.d.ts +1 -3
- package/dist/types/lib/components/Layout/Layout.stories.d.ts +1 -0
- package/dist/types/lib/components/List/List.d.ts +1 -1
- package/dist/types/lib/components/List/List.stories.d.ts +1 -1
- package/dist/types/lib/components/List/ListItem.d.ts +24 -1
- package/dist/types/lib/components/List/ListItem.stories.d.ts +1 -1
- package/dist/types/lib/components/List/ListItemLabel.d.ts +2 -1
- package/dist/types/lib/components/List/ListItemLink.d.ts +3 -5
- package/dist/types/lib/components/List/Specimens.stories.d.ts +1 -1
- package/dist/types/lib/components/Menu/Menu.stories.d.ts +5 -0
- package/dist/types/lib/components/Menu/MenuItem.d.ts +7 -9
- package/dist/types/lib/components/Menu/MenuItemBase.d.ts +2 -5
- package/dist/types/lib/components/Menu/MenuItemLabel.d.ts +6 -4
- package/dist/types/lib/components/Menu/MenuSearch.d.ts +1 -1
- package/dist/types/lib/components/Menu/MenuSearch.stories.d.ts +1 -1
- package/dist/types/lib/components/Page/Breadcrumbs.stories.d.ts +19 -0
- package/dist/types/lib/components/Page/BreadcrumbsLink.d.ts +1 -1
- package/dist/types/lib/components/Page/Flex.d.ts +1 -1
- package/dist/types/lib/components/Page/Flex.stories.d.ts +17 -0
- package/dist/types/lib/components/Page/Grid.d.ts +5 -8
- package/dist/types/lib/components/Page/Grid.stories.d.ts +15 -0
- package/dist/types/lib/components/Page/List.stories.d.ts +17 -0
- package/dist/types/lib/components/Page/Section.d.ts +2 -1
- package/dist/types/lib/components/Page/index.d.ts +0 -1
- package/dist/types/lib/components/Search/SearchItem.d.ts +2 -2
- package/dist/types/lib/components/Searchbar/Searchbar.d.ts +2 -2
- package/dist/types/lib/components/Searchbar/{SearchField.d.ts → SearchbarField.d.ts} +2 -2
- package/dist/types/lib/components/Searchbar/index.d.ts +1 -1
- package/dist/types/lib/components/Settings/SettingsItem.d.ts +5 -6
- package/dist/types/lib/components/Settings/SettingsItem.stories.d.ts +8 -7
- package/dist/types/lib/components/Toolbar/Toolbar.stories.d.ts +1 -1
- package/dist/types/lib/components/Toolbar/ToolbarSearch.d.ts +2 -5
- package/dist/types/lib/components/Toolbar/ToolbarSearch.stories.d.ts +1 -0
- package/dist/types/lib/components/Transmission/Transmission.stories.d.ts +7 -8
- package/dist/types/lib/components/Typography/Heading.d.ts +1 -1
- package/dist/types/lib/components/index.d.ts +1 -1
- package/dist/types/lib/stories/Profile/Accounts.stories.d.ts +6 -11
- package/package.json +1 -1
- package/dist/assets/AccountButton.css +0 -1
- package/dist/assets/IconButton.css +0 -1
- package/dist/assets/MenuOption.css +0 -1
- package/dist/assets/ToolbarSearch.css +0 -1
- package/dist/components/GlobalMenu/AccountButton.js +0 -58
- package/dist/components/GlobalMenu/AccountMenu.js +0 -72
- package/dist/components/Page/PageHeader.js +0 -55
- package/dist/components/Profile/AccountList.js +0 -12
- package/dist/components/Profile/AccountListItem.js +0 -86
- package/dist/components/Profile/index.js +0 -6
- package/dist/types/lib/components/GlobalMenu/AccountMenu.d.ts +0 -27
- package/dist/types/lib/components/GlobalMenu/AccountMenu.stories.d.ts +0 -19
- package/dist/types/lib/components/Menu/Examples.stories.d.ts +0 -97
- package/dist/types/lib/components/Page/PageHeader.d.ts +0 -18
- package/dist/types/lib/components/Page/PageHeader.stories.d.ts +0 -16
- package/dist/types/lib/components/Profile/AccountList.d.ts +0 -5
- package/dist/types/lib/components/Profile/AccountListItem.d.ts +0 -12
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { jsxs as m, jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { MenuItemBase as r } from "../Menu/MenuItemBase.js";
|
|
3
|
-
import { MenuItemLabel as s } from "../Menu/MenuItemLabel.js";
|
|
4
|
-
import { MenuItemIcon as l } from "../Menu/MenuItemIcon.js";
|
|
5
|
-
import "../../index-L8X2o7IH.js";
|
|
6
|
-
import "react";
|
|
7
|
-
import "../RootProvider/RootProvider.js";
|
|
8
|
-
import "../Searchbar/AutocompleteBase.js";
|
|
9
|
-
import "../Snackbar/useSnackbar.js";
|
|
10
|
-
import { S as o } from "../../ChevronRight-BbelnTke.js";
|
|
11
|
-
import '../../assets/AccountButton.css';const b = "_label_1dcj3_1", p = {
|
|
12
|
-
label: b
|
|
13
|
-
}, _ = ({ account: e, linkText: t, onClick: d, multipleAccounts: g }) => g ? /* @__PURE__ */ m(r, { size: "lg", onClick: d, linkText: t, linkIcon: o, as: "button", children: [
|
|
14
|
-
/* @__PURE__ */ i(
|
|
15
|
-
l,
|
|
16
|
-
{
|
|
17
|
-
size: "lg",
|
|
18
|
-
icon: {
|
|
19
|
-
name: e.name,
|
|
20
|
-
type: e.type
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
),
|
|
24
|
-
/* @__PURE__ */ i(
|
|
25
|
-
s,
|
|
26
|
-
{
|
|
27
|
-
className: p.label,
|
|
28
|
-
size: "md",
|
|
29
|
-
title: e == null ? void 0 : e.name,
|
|
30
|
-
weight: "medium",
|
|
31
|
-
description: e == null ? void 0 : e.description
|
|
32
|
-
}
|
|
33
|
-
)
|
|
34
|
-
] }) : /* @__PURE__ */ m(r, { size: "lg", as: "div", children: [
|
|
35
|
-
/* @__PURE__ */ i(
|
|
36
|
-
l,
|
|
37
|
-
{
|
|
38
|
-
size: "lg",
|
|
39
|
-
icon: {
|
|
40
|
-
name: e.name,
|
|
41
|
-
type: e.type
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
),
|
|
45
|
-
/* @__PURE__ */ i(
|
|
46
|
-
s,
|
|
47
|
-
{
|
|
48
|
-
className: p.label,
|
|
49
|
-
size: "md",
|
|
50
|
-
title: e == null ? void 0 : e.name,
|
|
51
|
-
weight: "medium",
|
|
52
|
-
description: e == null ? void 0 : e.description
|
|
53
|
-
}
|
|
54
|
-
)
|
|
55
|
-
] });
|
|
56
|
-
export {
|
|
57
|
-
_ as AccountButton
|
|
58
|
-
};
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as L } from "react/jsx-runtime";
|
|
3
|
-
import { useState as M } from "react";
|
|
4
|
-
import "../../index-L8X2o7IH.js";
|
|
5
|
-
import "../RootProvider/RootProvider.js";
|
|
6
|
-
import "../Searchbar/AutocompleteBase.js";
|
|
7
|
-
import "../Snackbar/useSnackbar.js";
|
|
8
|
-
import { Menu as w } from "../Menu/Menu.js";
|
|
9
|
-
const v = (p) => `${p} hits`, $ = ({
|
|
10
|
-
accounts: p = [],
|
|
11
|
-
accountGroups: y = {},
|
|
12
|
-
accountSearch: s,
|
|
13
|
-
onSelectAccount: r,
|
|
14
|
-
currentAccount: m,
|
|
15
|
-
menuItemsVirtual: C
|
|
16
|
-
}) => {
|
|
17
|
-
var f;
|
|
18
|
-
const g = p.map((e) => ({
|
|
19
|
-
id: e.id || e.name,
|
|
20
|
-
groupId: e.groupId || "search",
|
|
21
|
-
selected: e.selected ?? (m == null ? void 0 : m.id) === e.id,
|
|
22
|
-
title: e.name,
|
|
23
|
-
...(e == null ? void 0 : e.items) && {
|
|
24
|
-
icon: {
|
|
25
|
-
items: e.items.map((i) => ({
|
|
26
|
-
name: i.name,
|
|
27
|
-
type: i.type || e.type
|
|
28
|
-
}))
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
...!(e != null && e.items) && {
|
|
32
|
-
icon: {
|
|
33
|
-
type: e.type,
|
|
34
|
-
name: e.name
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
badge: e.badge,
|
|
38
|
-
alertBadge: e.alertBadge,
|
|
39
|
-
onClick: () => r == null ? void 0 : r(e.id || e.name)
|
|
40
|
-
})), [l, t] = M(""), d = l ? g.filter((e) => {
|
|
41
|
-
var i;
|
|
42
|
-
return (i = e == null ? void 0 : e.title) == null ? void 0 : i.toLowerCase().includes(l.toLowerCase());
|
|
43
|
-
}).map((e) => ({
|
|
44
|
-
...e,
|
|
45
|
-
groupId: "search"
|
|
46
|
-
})) : g, I = l ? {
|
|
47
|
-
search: {
|
|
48
|
-
title: ((f = s == null ? void 0 : s.getResultsLabel) == null ? void 0 : f.call(s, d.length)) ?? v(d.length)
|
|
49
|
-
}
|
|
50
|
-
} : y, b = {
|
|
51
|
-
name: "account-search",
|
|
52
|
-
value: l,
|
|
53
|
-
placeholder: (s == null ? void 0 : s.placeholder) ?? "Find account",
|
|
54
|
-
onChange: (e) => t(e.target.value),
|
|
55
|
-
onClear: () => t("")
|
|
56
|
-
}, h = [
|
|
57
|
-
...d.length > 0 ? d : [{ id: "search", groupId: "search", hidden: !0 }]
|
|
58
|
-
];
|
|
59
|
-
return /* @__PURE__ */ L(
|
|
60
|
-
w,
|
|
61
|
-
{
|
|
62
|
-
theme: "default",
|
|
63
|
-
search: s && b,
|
|
64
|
-
groups: I,
|
|
65
|
-
items: h,
|
|
66
|
-
menuItemsVirtual: C
|
|
67
|
-
}
|
|
68
|
-
);
|
|
69
|
-
};
|
|
70
|
-
export {
|
|
71
|
-
$ as AccountMenu
|
|
72
|
-
};
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { jsxs as i, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import "../../index-L8X2o7IH.js";
|
|
3
|
-
import "react";
|
|
4
|
-
import "../RootProvider/RootProvider.js";
|
|
5
|
-
import { ListItemIcon as z } from "../List/ListItemIcon.js";
|
|
6
|
-
import { Typography as P } from "../Typography/Typography.js";
|
|
7
|
-
import { Heading as j } from "../Typography/Heading.js";
|
|
8
|
-
import "../Searchbar/AutocompleteBase.js";
|
|
9
|
-
import "../Snackbar/useSnackbar.js";
|
|
10
|
-
import { Flex as m } from "./Flex.js";
|
|
11
|
-
import { PageNav as y } from "./PageNav.js";
|
|
12
|
-
import { PageTabs as H } from "./PageTabs.js";
|
|
13
|
-
import { Section as I } from "./Section.js";
|
|
14
|
-
const K = ({
|
|
15
|
-
variant: g,
|
|
16
|
-
size: f = "xl",
|
|
17
|
-
title: t,
|
|
18
|
-
description: o,
|
|
19
|
-
icon: a,
|
|
20
|
-
tabs: e,
|
|
21
|
-
theme: l,
|
|
22
|
-
padding: x,
|
|
23
|
-
shadow: c,
|
|
24
|
-
bleed: d,
|
|
25
|
-
breadcrumbs: n,
|
|
26
|
-
backButton: p,
|
|
27
|
-
controls: T,
|
|
28
|
-
children: h,
|
|
29
|
-
...s
|
|
30
|
-
}) => (g === "card" && (l = "default", x = "page", c = "xs", d = !0), g === "card" ? /* @__PURE__ */ i(I, { as: "header", theme: l, shadow: c, bleed: d, ...s, children: [
|
|
31
|
-
(p || n) && /* @__PURE__ */ r(y, { backButton: p, breadcrumbs: n, padding: 2 }),
|
|
32
|
-
/* @__PURE__ */ i(m, { direction: "row", align: "center", padding: "page", spacing: 3, children: [
|
|
33
|
-
/* @__PURE__ */ r(z, { icon: a, size: "xl" }),
|
|
34
|
-
/* @__PURE__ */ i(m, { direction: "col", children: [
|
|
35
|
-
/* @__PURE__ */ r(j, { size: f, children: t }),
|
|
36
|
-
o && /* @__PURE__ */ r(P, { size: "xs", children: o })
|
|
37
|
-
] })
|
|
38
|
-
] }),
|
|
39
|
-
h,
|
|
40
|
-
e && /* @__PURE__ */ r(H, { ...e, padding: 2 })
|
|
41
|
-
] }) : /* @__PURE__ */ i(I, { as: "header", theme: l, shadow: c, bleed: d, ...s, children: [
|
|
42
|
-
(p || n) && /* @__PURE__ */ r(y, { backButton: p, breadcrumbs: n }),
|
|
43
|
-
/* @__PURE__ */ i(m, { direction: "row", align: "center", padding: x, spacing: 3, children: [
|
|
44
|
-
/* @__PURE__ */ r(z, { icon: a, size: "xl" }),
|
|
45
|
-
/* @__PURE__ */ i(m, { direction: "col", children: [
|
|
46
|
-
/* @__PURE__ */ r(j, { size: f, children: t }),
|
|
47
|
-
o && /* @__PURE__ */ r(P, { size: "xs", children: o })
|
|
48
|
-
] })
|
|
49
|
-
] }),
|
|
50
|
-
h,
|
|
51
|
-
e && /* @__PURE__ */ r(H, { ...e })
|
|
52
|
-
] }));
|
|
53
|
-
export {
|
|
54
|
-
K as PageHeader
|
|
55
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { createElement as m } from "react";
|
|
3
|
-
import "../../index-L8X2o7IH.js";
|
|
4
|
-
import "../RootProvider/RootProvider.js";
|
|
5
|
-
import { List as i } from "../List/List.js";
|
|
6
|
-
import "../Searchbar/AutocompleteBase.js";
|
|
7
|
-
import { AccountListItem as p } from "./AccountListItem.js";
|
|
8
|
-
import "../Snackbar/useSnackbar.js";
|
|
9
|
-
const d = ({ items: t }) => /* @__PURE__ */ o(i, { children: t.map((r) => /* @__PURE__ */ m(p, { ...r, key: r.id })) });
|
|
10
|
-
export {
|
|
11
|
-
d as AccountList
|
|
12
|
-
};
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsxs as v, jsx as n } from "react/jsx-runtime";
|
|
3
|
-
import "../../index-L8X2o7IH.js";
|
|
4
|
-
import * as c from "react";
|
|
5
|
-
import { forwardRef as m } from "react";
|
|
6
|
-
import { Badge as y } from "../Badge/Badge.js";
|
|
7
|
-
import { ContextMenu as O } from "../ContextMenu/ContextMenu.js";
|
|
8
|
-
import { ListItemControls as w } from "../List/ListItemControls.js";
|
|
9
|
-
import { ListItem as h } from "../List/ListItem.js";
|
|
10
|
-
import "../RootProvider/RootProvider.js";
|
|
11
|
-
import "../Searchbar/AutocompleteBase.js";
|
|
12
|
-
import "../Snackbar/useSnackbar.js";
|
|
13
|
-
import { Flex as I } from "../Page/Flex.js";
|
|
14
|
-
import { u as d } from "../../useId-BVFxCjkq.js";
|
|
15
|
-
var j = function(t, o) {
|
|
16
|
-
var l = {};
|
|
17
|
-
for (var e in t) Object.prototype.hasOwnProperty.call(t, e) && o.indexOf(e) < 0 && (l[e] = t[e]);
|
|
18
|
-
if (t != null && typeof Object.getOwnPropertySymbols == "function")
|
|
19
|
-
for (var r = 0, e = Object.getOwnPropertySymbols(t); r < e.length; r++)
|
|
20
|
-
o.indexOf(e[r]) < 0 && Object.prototype.propertyIsEnumerable.call(t, e[r]) && (l[e[r]] = t[e[r]]);
|
|
21
|
-
return l;
|
|
22
|
-
};
|
|
23
|
-
const x = m((t, o) => {
|
|
24
|
-
var { title: l, titleId: e } = t, r = j(t, ["title", "titleId"]);
|
|
25
|
-
let i = d();
|
|
26
|
-
return i = l ? e || "title-" + i : void 0, c.createElement(
|
|
27
|
-
"svg",
|
|
28
|
-
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: o, "aria-labelledby": i }, r),
|
|
29
|
-
l ? c.createElement("title", { id: i }, l) : null,
|
|
30
|
-
c.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M12 4.969c1.399-1.242 2.776-1.844 4.125-1.844 1.519 0 2.823.763 3.905 1.845 2.373 2.372 2.207 6.354-1 9.56l-6.5 6.5-.53-.53-.53.53-6.5-6.5c-3.207-3.206-3.373-7.188-1-9.56C5.05 3.888 6.356 3.125 7.875 3.125c1.349 0 2.726.602 4.125 1.844M12 20.5l-.53.53a.75.75 0 0 0 1.06 0zm0-1.06 5.97-5.97c2.793-2.794 2.627-5.812 1-7.44-.919-.918-1.864-1.405-2.845-1.405s-2.177.487-3.595 1.905a.75.75 0 0 1-1.06 0C10.05 5.112 8.856 4.625 7.874 4.625S5.948 5.112 5.03 6.03c-1.627 1.628-1.793 4.646 1 7.44z", clipRule: "evenodd" })
|
|
31
|
-
);
|
|
32
|
-
});
|
|
33
|
-
var E = function(t, o) {
|
|
34
|
-
var l = {};
|
|
35
|
-
for (var e in t) Object.prototype.hasOwnProperty.call(t, e) && o.indexOf(e) < 0 && (l[e] = t[e]);
|
|
36
|
-
if (t != null && typeof Object.getOwnPropertySymbols == "function")
|
|
37
|
-
for (var r = 0, e = Object.getOwnPropertySymbols(t); r < e.length; r++)
|
|
38
|
-
o.indexOf(e[r]) < 0 && Object.prototype.propertyIsEnumerable.call(t, e[r]) && (l[e[r]] = t[e[r]]);
|
|
39
|
-
return l;
|
|
40
|
-
};
|
|
41
|
-
const S = m((t, o) => {
|
|
42
|
-
var { title: l, titleId: e } = t, r = E(t, ["title", "titleId"]);
|
|
43
|
-
let i = d();
|
|
44
|
-
return i = l ? e || "title-" + i : void 0, c.createElement(
|
|
45
|
-
"svg",
|
|
46
|
-
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: o, "aria-labelledby": i }, r),
|
|
47
|
-
l ? c.createElement("title", { id: i }, l) : null,
|
|
48
|
-
c.createElement("path", { fill: "currentColor", d: "M12 4.969c1.399-1.242 2.776-1.844 4.125-1.844 1.519 0 2.823.763 3.905 1.845 2.373 2.372 2.206 6.354-1 9.56l-6.5 6.5a.75.75 0 0 1-1.06 0l-6.5-6.5c-3.207-3.206-3.373-7.188-1-9.56C5.05 3.888 6.355 3.125 7.874 3.125c1.349 0 2.726.602 4.125 1.844" })
|
|
49
|
-
);
|
|
50
|
-
}), $ = ({
|
|
51
|
-
size: t,
|
|
52
|
-
expanded: o,
|
|
53
|
-
type: l,
|
|
54
|
-
icon: e,
|
|
55
|
-
title: r,
|
|
56
|
-
description: i,
|
|
57
|
-
label: a,
|
|
58
|
-
favourite: s = !1,
|
|
59
|
-
contextMenu: f,
|
|
60
|
-
favouriteLabel: p,
|
|
61
|
-
children: u,
|
|
62
|
-
...g
|
|
63
|
-
}) => {
|
|
64
|
-
const b = /* @__PURE__ */ v(w, { children: [
|
|
65
|
-
/* @__PURE__ */ n(I, { align: "center", spacing: 2, style: { position: "relative", fontSize: "1.25rem" }, children: a ? /* @__PURE__ */ n(y, { color: l === "group" ? "neutral" : l, children: a }) : s ? /* @__PURE__ */ n(S, { "aria-label": p }) : /* @__PURE__ */ n(x, { "aria-hidden": !0 }) }),
|
|
66
|
-
f && /* @__PURE__ */ n(O, { ...f, size: "sm" })
|
|
67
|
-
] });
|
|
68
|
-
return /* @__PURE__ */ n(
|
|
69
|
-
h,
|
|
70
|
-
{
|
|
71
|
-
...g,
|
|
72
|
-
size: t,
|
|
73
|
-
icon: e,
|
|
74
|
-
title: r,
|
|
75
|
-
description: o ? void 0 : i,
|
|
76
|
-
expanded: o,
|
|
77
|
-
selected: o,
|
|
78
|
-
badge: !o && b,
|
|
79
|
-
linkIcon: !0,
|
|
80
|
-
children: u
|
|
81
|
-
}
|
|
82
|
-
);
|
|
83
|
-
};
|
|
84
|
-
export {
|
|
85
|
-
$ as AccountListItem
|
|
86
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { AvatarProps, BadgeProps } from '../';
|
|
2
|
-
import { MenuItemGroups, MenuSearchProps } from '../Menu';
|
|
3
|
-
import { MenuItemsVirtualProps } from '../Menu/MenuItems';
|
|
4
|
-
export interface AccountSearchProps extends MenuSearchProps {
|
|
5
|
-
getResultsLabel?: (hits: number) => string;
|
|
6
|
-
hidden?: boolean;
|
|
7
|
-
}
|
|
8
|
-
export interface AccountMenuItem {
|
|
9
|
-
type: 'person' | 'company';
|
|
10
|
-
name: string;
|
|
11
|
-
id: string;
|
|
12
|
-
groupId?: string;
|
|
13
|
-
selected?: boolean;
|
|
14
|
-
items?: AvatarProps[];
|
|
15
|
-
badge?: BadgeProps | undefined;
|
|
16
|
-
alertBadge?: BadgeProps | undefined;
|
|
17
|
-
}
|
|
18
|
-
export interface AccountMenuProps {
|
|
19
|
-
accounts?: AccountMenuItem[];
|
|
20
|
-
accountGroups?: MenuItemGroups;
|
|
21
|
-
accountSearch?: AccountSearchProps;
|
|
22
|
-
currentAccount?: AccountMenuItem;
|
|
23
|
-
onSelectAccount?: (id: string) => void;
|
|
24
|
-
menuItemsVirtual?: MenuItemsVirtualProps;
|
|
25
|
-
scrollRefStyles?: React.CSSProperties;
|
|
26
|
-
}
|
|
27
|
-
export declare const AccountMenu: ({ accounts, accountGroups, accountSearch, onSelectAccount, currentAccount, menuItemsVirtual, }: AccountMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
2
|
-
declare const meta: {
|
|
3
|
-
title: string;
|
|
4
|
-
component: ({ accounts, accountGroups, accountSearch, onSelectAccount, currentAccount, menuItemsVirtual, }: import('./AccountMenu').AccountMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
tags: string[];
|
|
6
|
-
parameters: {};
|
|
7
|
-
args: {
|
|
8
|
-
accounts?: import('./AccountMenu').AccountMenuItem[];
|
|
9
|
-
accountGroups?: import('..').MenuItemGroups;
|
|
10
|
-
accountSearch?: import('./AccountMenu').AccountSearchProps;
|
|
11
|
-
currentAccount?: import('./AccountMenu').AccountMenuItem;
|
|
12
|
-
onSelectAccount?: (id: string) => void;
|
|
13
|
-
menuItemsVirtual?: import('..').MenuItemsVirtualProps;
|
|
14
|
-
scrollRefStyles?: React.CSSProperties;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
export default meta;
|
|
18
|
-
type Story = StoryObj<typeof meta>;
|
|
19
|
-
export declare const Default: Story;
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
2
|
-
declare const meta: {
|
|
3
|
-
title: string;
|
|
4
|
-
component: ({ color, theme, defaultItemColor, defaultItemTheme, defaultItemSize, defaultIconTheme, groups, items, search, menuItemsVirtual, }: import('./Menu').MenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
parameters: {};
|
|
6
|
-
args: {};
|
|
7
|
-
};
|
|
8
|
-
export default meta;
|
|
9
|
-
type Story = StoryObj<typeof meta>;
|
|
10
|
-
export declare const InboxMenu: Story;
|
|
11
|
-
export declare const NeutralInboxMenu: {
|
|
12
|
-
args: {
|
|
13
|
-
color: string;
|
|
14
|
-
theme: string;
|
|
15
|
-
menuItemsVirtual?: import('./MenuItems').MenuItemsVirtualProps;
|
|
16
|
-
level?: number;
|
|
17
|
-
expanded?: boolean;
|
|
18
|
-
search?: import('./MenuSearch').MenuSearchProps;
|
|
19
|
-
items: import('./MenuItem').MenuItemProps[];
|
|
20
|
-
groups?: import('./MenuItems').MenuItemGroups;
|
|
21
|
-
defaultItemSize?: import('./MenuItemBase').MenuItemSize;
|
|
22
|
-
defaultItemColor?: import('./MenuItemBase').MenuItemColor;
|
|
23
|
-
defaultItemTheme?: import('./MenuItemBase').MenuItemTheme;
|
|
24
|
-
defaultIconTheme?: import('..').IconTheme;
|
|
25
|
-
as?: React.ElementType;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
export declare const CompanyInboxMenu: {
|
|
29
|
-
args: {
|
|
30
|
-
color: string;
|
|
31
|
-
theme: string;
|
|
32
|
-
menuItemsVirtual?: import('./MenuItems').MenuItemsVirtualProps;
|
|
33
|
-
level?: number;
|
|
34
|
-
expanded?: boolean;
|
|
35
|
-
search?: import('./MenuSearch').MenuSearchProps;
|
|
36
|
-
items: import('./MenuItem').MenuItemProps[];
|
|
37
|
-
groups?: import('./MenuItems').MenuItemGroups;
|
|
38
|
-
defaultItemSize?: import('./MenuItemBase').MenuItemSize;
|
|
39
|
-
defaultItemColor?: import('./MenuItemBase').MenuItemColor;
|
|
40
|
-
defaultItemTheme?: import('./MenuItemBase').MenuItemTheme;
|
|
41
|
-
defaultIconTheme?: import('..').IconTheme;
|
|
42
|
-
as?: React.ElementType;
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
export declare const PersonInboxMenu: {
|
|
46
|
-
args: {
|
|
47
|
-
color: string;
|
|
48
|
-
theme: string;
|
|
49
|
-
menuItemsVirtual?: import('./MenuItems').MenuItemsVirtualProps;
|
|
50
|
-
level?: number;
|
|
51
|
-
expanded?: boolean;
|
|
52
|
-
search?: import('./MenuSearch').MenuSearchProps;
|
|
53
|
-
items: import('./MenuItem').MenuItemProps[];
|
|
54
|
-
groups?: import('./MenuItems').MenuItemGroups;
|
|
55
|
-
defaultItemSize?: import('./MenuItemBase').MenuItemSize;
|
|
56
|
-
defaultItemColor?: import('./MenuItemBase').MenuItemColor;
|
|
57
|
-
defaultItemTheme?: import('./MenuItemBase').MenuItemTheme;
|
|
58
|
-
defaultIconTheme?: import('..').IconTheme;
|
|
59
|
-
as?: React.ElementType;
|
|
60
|
-
};
|
|
61
|
-
};
|
|
62
|
-
export declare const CompanyMenu: Story;
|
|
63
|
-
export declare const NeutralCompanyMenu: {
|
|
64
|
-
args: {
|
|
65
|
-
color: string;
|
|
66
|
-
theme?: import('./MenuBase').MenuTheme;
|
|
67
|
-
menuItemsVirtual?: import('./MenuItems').MenuItemsVirtualProps;
|
|
68
|
-
level?: number;
|
|
69
|
-
expanded?: boolean;
|
|
70
|
-
search?: import('./MenuSearch').MenuSearchProps;
|
|
71
|
-
items: import('./MenuItem').MenuItemProps[];
|
|
72
|
-
groups?: import('./MenuItems').MenuItemGroups;
|
|
73
|
-
defaultItemSize?: import('./MenuItemBase').MenuItemSize;
|
|
74
|
-
defaultItemColor?: import('./MenuItemBase').MenuItemColor;
|
|
75
|
-
defaultItemTheme?: import('./MenuItemBase').MenuItemTheme;
|
|
76
|
-
defaultIconTheme?: import('..').IconTheme;
|
|
77
|
-
as?: React.ElementType;
|
|
78
|
-
};
|
|
79
|
-
};
|
|
80
|
-
export declare const PersonMenu: Story;
|
|
81
|
-
export declare const NeutralPersonMenu: {
|
|
82
|
-
args: {
|
|
83
|
-
color: string;
|
|
84
|
-
theme?: import('./MenuBase').MenuTheme;
|
|
85
|
-
menuItemsVirtual?: import('./MenuItems').MenuItemsVirtualProps;
|
|
86
|
-
level?: number;
|
|
87
|
-
expanded?: boolean;
|
|
88
|
-
search?: import('./MenuSearch').MenuSearchProps;
|
|
89
|
-
items: import('./MenuItem').MenuItemProps[];
|
|
90
|
-
groups?: import('./MenuItems').MenuItemGroups;
|
|
91
|
-
defaultItemSize?: import('./MenuItemBase').MenuItemSize;
|
|
92
|
-
defaultItemColor?: import('./MenuItemBase').MenuItemColor;
|
|
93
|
-
defaultItemTheme?: import('./MenuItemBase').MenuItemTheme;
|
|
94
|
-
defaultIconTheme?: import('..').IconTheme;
|
|
95
|
-
as?: React.ElementType;
|
|
96
|
-
};
|
|
97
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { AvatarGroupProps, AvatarProps, BackButtonProps, BreadcrumbsLinkProps, IconProps, PageTabsProps, SectionProps, SvgElement } from '..';
|
|
3
|
-
export type PageHeaderVariant = 'card' | undefined;
|
|
4
|
-
export type PageHeaderSize = 'lg' | 'xl';
|
|
5
|
-
export interface PageHeaderProps extends SectionProps {
|
|
6
|
-
variant?: PageHeaderVariant;
|
|
7
|
-
size?: PageHeaderSize;
|
|
8
|
-
title?: string;
|
|
9
|
-
description?: string;
|
|
10
|
-
icon?: SvgElement | IconProps;
|
|
11
|
-
avatar?: AvatarProps;
|
|
12
|
-
avatarGroup?: AvatarGroupProps;
|
|
13
|
-
tabs?: PageTabsProps;
|
|
14
|
-
backButton?: BackButtonProps;
|
|
15
|
-
breadcrumbs?: BreadcrumbsLinkProps[];
|
|
16
|
-
controls?: ReactNode;
|
|
17
|
-
}
|
|
18
|
-
export declare const PageHeader: ({ variant, size, title, description, icon, tabs, theme, padding, shadow, bleed, breadcrumbs, backButton, controls, children, ...rest }: PageHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react';
|
|
2
|
-
declare const meta: {
|
|
3
|
-
title: string;
|
|
4
|
-
component: ({ variant, size, title, description, icon, tabs, theme, padding, shadow, bleed, breadcrumbs, backButton, controls, children, ...rest }: import('./PageHeader').PageHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
tags: string[];
|
|
6
|
-
parameters: {};
|
|
7
|
-
args: {
|
|
8
|
-
title: string;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
export default meta;
|
|
12
|
-
type Story = StoryObj<typeof meta>;
|
|
13
|
-
export declare const Default: Story;
|
|
14
|
-
export declare const Icon: Story;
|
|
15
|
-
export declare const UserCard: Story;
|
|
16
|
-
export declare const CardAndTabs: Story;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ContextMenuProps, ListItemProps } from '..';
|
|
2
|
-
export type AccountListItemType = 'person' | 'company' | 'group';
|
|
3
|
-
export interface AccountListItemProps extends ListItemProps {
|
|
4
|
-
id?: string;
|
|
5
|
-
title: string;
|
|
6
|
-
type?: AccountListItemType;
|
|
7
|
-
favourite?: boolean;
|
|
8
|
-
contextMenu?: ContextMenuProps;
|
|
9
|
-
label?: string;
|
|
10
|
-
favouriteLabel?: string;
|
|
11
|
-
}
|
|
12
|
-
export declare const AccountListItem: ({ size, expanded, type, icon, title, description, label, favourite, contextMenu, favouriteLabel, children, ...item }: AccountListItemProps) => import("react/jsx-runtime").JSX.Element;
|