@altinn/altinn-components 0.6.10 → 0.6.12
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/README.md +1 -12
- package/dist/assets/Footer.css +1 -0
- package/dist/assets/FooterBase.css +1 -1
- package/dist/assets/ListItemAction.css +1 -0
- package/dist/assets/ListItemBase.css +1 -1
- package/dist/components/Footer/Footer.d.ts +2 -1
- package/dist/components/Footer/Footer.js +14 -9
- package/dist/components/Footer/Footer.stories.js +6 -3
- package/dist/components/Footer/FooterBase.js +5 -5
- package/dist/components/GlobalMenu/GlobalMenu.js +5 -5
- package/dist/components/GlobalMenu/index.d.ts +3 -0
- package/dist/components/GlobalMenu/index.js +8 -2
- package/dist/components/Header/Header.d.ts +4 -3
- package/dist/components/Header/Header.js +29 -29
- package/dist/components/Layout/Layout.stories.js +26 -25
- package/dist/components/LayoutAction/ActionFooter.d.ts +1 -1
- package/dist/components/List/ListItem.d.ts +15 -6
- package/dist/components/List/ListItem.js +18 -19
- package/dist/components/List/ListItem.stories.js +146 -118
- package/dist/components/List/ListItemAction.d.ts +13 -0
- package/dist/components/List/ListItemAction.js +19 -0
- package/dist/components/List/ListItemAction.stories.js +45 -0
- package/dist/components/List/ListItemBase.d.ts +3 -1
- package/dist/components/List/ListItemBase.js +44 -48
- package/dist/components/List/index.d.ts +1 -0
- package/dist/components/List/index.js +6 -4
- package/dist/components/Menu/MenuItemBase.js +25 -25
- package/dist/components/Searchbar/AutocompleteItem.js +3 -2
- package/dist/components/index.js +151 -143
- package/dist/index.js +152 -144
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -42,23 +42,12 @@ To use the components in your application, you need to import the components you
|
|
|
42
42
|
// example: import the Avatar component and type
|
|
43
43
|
import { Avatar, type AvatarVariant } from '@altinn/components';
|
|
44
44
|
```
|
|
45
|
-
and import the css file in your application once:
|
|
45
|
+
and import the css file in your application once, e.g. in your css:
|
|
46
46
|
```ts
|
|
47
47
|
import '@altinn/altinn-components/lib/css/global.css';
|
|
48
48
|
```
|
|
49
49
|
for correct `font-family` and minimal collection of resets.
|
|
50
50
|
|
|
51
|
-
Using `nextjs`?
|
|
52
|
-
|
|
53
|
-
You probably need to transpile the package. Add the following to your `next.config.js`:
|
|
54
|
-
|
|
55
|
-
```js
|
|
56
|
-
/** @type {import('next').NextConfig} */
|
|
57
|
-
const nextConfig = {
|
|
58
|
-
transpilePackages: ['@altinn/components'],
|
|
59
|
-
}
|
|
60
|
-
module.exports = nextConfig
|
|
61
|
-
```
|
|
62
51
|
|
|
63
52
|
## Documentation
|
|
64
53
|
The documentation for the components can be found in the [Storybook](https://altinn.github.io/altinn-components)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._address_5rd7f_1{display:flex;flex-direction:column;column-gap:.5rem}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._footer_z2xgm_1{border-top:1px solid;border-color:var(--theme-border-subtle);display:flex;flex-direction:column;row-gap:1rem;padding:1rem 0;margin:2rem 1rem}._grid_z2xgm_13{width:100%;max-width:80rem;margin:0 auto;display:flex;flex-direction:column;justify-content:space-between;row-gap:1rem}@media (min-width: 1024px){._grid_z2xgm_13{padding:0 1rem;flex-direction:row}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._action_1lv65_3{display:flex;align-items:center;gap:.625rem;padding:.625rem}._linkText_1lv65_10{font-size:.875rem;white-space:nowrap}._linkIcon_1lv65_15{font-size:1.5rem}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._item_17cbe_3{border:0;color:inherit;font:inherit;text-align:inherit;text-decoration:none;line-height:normal;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-user-select:none;user-select:none;cursor:pointer;position:relative;width:100%;display:flex;align-items:center}._item_17cbe_3[data-size=xs]{min-height:36px}._item_17cbe_3[data-size=sm]{min-height:44px}._item_17cbe_3[data-size=md]{min-height:56px}._item_17cbe_3[data-size=lg]{min-height:64px}._item_17cbe_3[data-size=xl]{min-height:72px}._content_17cbe_46{flex-grow:1;display:flex;align-items:center;gap:.625rem;padding:.5rem .625rem}._action_17cbe_56{display:flex;align-items:center;gap:.625rem;padding:.625rem}._linkText_17cbe_63{font-size:.875rem;white-space:nowrap}._linkIcon_17cbe_68{font-size:1.5rem}._item_17cbe_3{background-color:var(--theme-background-default);box-shadow:var(--ds-shadow-xs)}._item_17cbe_3:hover{outline:2px solid var(--theme-border-strong);z-index:2}._item_17cbe_3:hover strong{text-decoration:underline}._item_17cbe_3[data-active=true],._item_17cbe_3[data-color=accent]{background-color:var(--theme-surface-default)}._item_17cbe_3[data-color=accent]:hover{background-color:var(--theme-surface-hover)}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FooterMenuProps } from './FooterMenu';
|
|
2
2
|
export interface FooterProps {
|
|
3
3
|
address: string;
|
|
4
|
+
address2?: string;
|
|
4
5
|
menu: FooterMenuProps;
|
|
5
6
|
}
|
|
6
|
-
export declare const Footer: ({ address, menu }: FooterProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const Footer: ({ address, address2, menu }: FooterProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import { jsxs as o, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { FooterAddress as
|
|
3
|
-
import { FooterBase as
|
|
4
|
-
import { FooterLogo as
|
|
5
|
-
import { FooterMenu as
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
import { FooterAddress as t } from "./FooterAddress.js";
|
|
3
|
+
import { FooterBase as n } from "./FooterBase.js";
|
|
4
|
+
import { FooterLogo as i } from "./FooterLogo.js";
|
|
5
|
+
import { FooterMenu as m } from "./FooterMenu.js";
|
|
6
|
+
import '../../assets/Footer.css';const a = "_address_5rd7f_1", c = {
|
|
7
|
+
address: a
|
|
8
|
+
}, x = ({ address: s, address2: e, menu: d }) => /* @__PURE__ */ o(n, { children: [
|
|
9
|
+
/* @__PURE__ */ o(t, { children: [
|
|
10
|
+
/* @__PURE__ */ r(i, {}),
|
|
11
|
+
/* @__PURE__ */ o("div", { className: c.address, children: [
|
|
12
|
+
/* @__PURE__ */ r("span", { children: s }),
|
|
13
|
+
/* @__PURE__ */ r("span", { children: e })
|
|
14
|
+
] })
|
|
10
15
|
] }),
|
|
11
|
-
/* @__PURE__ */ r(
|
|
16
|
+
/* @__PURE__ */ r(m, { ...d })
|
|
12
17
|
] });
|
|
13
18
|
export {
|
|
14
19
|
x as Footer
|
|
@@ -3,9 +3,12 @@ const o = {
|
|
|
3
3
|
title: "Footer/Footer",
|
|
4
4
|
component: t,
|
|
5
5
|
tags: ["autodocs"],
|
|
6
|
-
parameters: {
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: "fullscreen"
|
|
8
|
+
},
|
|
7
9
|
args: {
|
|
8
10
|
address: "Postboks 1382 Vika, 0114 Oslo.",
|
|
11
|
+
address2: "Org.nr. 991 825 827",
|
|
9
12
|
menu: {
|
|
10
13
|
items: [
|
|
11
14
|
{
|
|
@@ -27,8 +30,8 @@ const o = {
|
|
|
27
30
|
]
|
|
28
31
|
}
|
|
29
32
|
}
|
|
30
|
-
},
|
|
33
|
+
}, r = {};
|
|
31
34
|
export {
|
|
32
|
-
|
|
35
|
+
r as Default,
|
|
33
36
|
o as default
|
|
34
37
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as t, jsxs as e } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "../../index-L8X2o7IH.js";
|
|
3
|
-
import '../../assets/FooterBase.css';const
|
|
4
|
-
footer:
|
|
5
|
-
grid:
|
|
6
|
-
},
|
|
3
|
+
import '../../assets/FooterBase.css';const i = "_footer_z2xgm_1", m = "_grid_z2xgm_13", o = {
|
|
4
|
+
footer: i,
|
|
5
|
+
grid: m
|
|
6
|
+
}, n = ({ className: r, children: s }) => /* @__PURE__ */ t("footer", { className: c(o.footer, r), children: /* @__PURE__ */ e("div", { className: o.grid, children: [
|
|
7
7
|
s,
|
|
8
8
|
" "
|
|
9
9
|
] }) });
|
|
10
10
|
export {
|
|
11
|
-
|
|
11
|
+
n as FooterBase
|
|
12
12
|
};
|
|
@@ -5,12 +5,12 @@ import "../../index-L8X2o7IH.js";
|
|
|
5
5
|
import "../Icon/SvgIcon.js";
|
|
6
6
|
import "../RootProvider/RootProvider.js";
|
|
7
7
|
import { AccountMenu as v } from "./AccountMenu.js";
|
|
8
|
-
import { MenuListItem as l } from "../Menu/MenuBase.js";
|
|
9
|
-
import { Menu as d } from "../Menu/Menu.js";
|
|
10
8
|
import { AccountButton as C } from "./AccountButton.js";
|
|
11
9
|
import { BackButton as j } from "./BackButton.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
10
|
+
import { LogoutButton as A } from "./LogoutButton.js";
|
|
11
|
+
import { MenuListItem as l } from "../Menu/MenuBase.js";
|
|
12
|
+
import { Menu as d } from "../Menu/Menu.js";
|
|
13
|
+
import { GlobalMenuBase as m, GlobalMenuHeader as f, GlobalMenuFooter as F } from "./GlobalMenuBase.js";
|
|
14
14
|
const N = ({
|
|
15
15
|
accounts: a = [],
|
|
16
16
|
accountGroups: h = {},
|
|
@@ -55,7 +55,7 @@ const N = ({
|
|
|
55
55
|
/* @__PURE__ */ o(d, { groups: c, items: p }),
|
|
56
56
|
u && /* @__PURE__ */ n(x, { children: [
|
|
57
57
|
/* @__PURE__ */ o(l, { as: "div", role: "separator" }),
|
|
58
|
-
/* @__PURE__ */ o(
|
|
58
|
+
/* @__PURE__ */ o(F, { children: /* @__PURE__ */ o(A, { ...u }) })
|
|
59
59
|
] })
|
|
60
60
|
] }) : /* @__PURE__ */ o(m, { children: /* @__PURE__ */ o(d, { groups: c, items: p }) });
|
|
61
61
|
};
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { AccountMenu as r } from "./AccountMenu.js";
|
|
2
|
-
import { GlobalMenu as
|
|
2
|
+
import { GlobalMenu as e } from "./GlobalMenu.js";
|
|
3
|
+
import { AccountButton as c } from "./AccountButton.js";
|
|
4
|
+
import { BackButton as m } from "./BackButton.js";
|
|
5
|
+
import { LogoutButton as x } from "./LogoutButton.js";
|
|
3
6
|
export {
|
|
7
|
+
c as AccountButton,
|
|
4
8
|
r as AccountMenu,
|
|
5
|
-
|
|
9
|
+
m as BackButton,
|
|
10
|
+
e as GlobalMenu,
|
|
11
|
+
x as LogoutButton
|
|
6
12
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { GlobalMenuProps } from '../GlobalMenu';
|
|
2
|
-
import { Account } from '../GlobalMenu/AccountButton.tsx';
|
|
1
|
+
import { GlobalMenuProps, Account } from '../GlobalMenu';
|
|
3
2
|
import { SearchbarProps } from '../Searchbar';
|
|
3
|
+
import { HeaderLogoProps } from './HeaderLogo';
|
|
4
4
|
export interface HeaderProps {
|
|
5
5
|
menu: GlobalMenuProps;
|
|
6
6
|
search?: SearchbarProps;
|
|
7
7
|
currentAccount?: Account;
|
|
8
|
+
logo?: HeaderLogoProps;
|
|
8
9
|
}
|
|
9
|
-
export declare const Header: ({ search, menu, currentAccount }: HeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const Header: ({ search, menu, currentAccount, logo }: HeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,53 +1,53 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as p, jsx as o } from "react/jsx-runtime";
|
|
3
3
|
import "react";
|
|
4
|
-
import { useEscapeKey as
|
|
5
|
-
import { DropdownBase as
|
|
4
|
+
import { useEscapeKey as w } from "../../hooks/useEscapeKey.js";
|
|
5
|
+
import { DropdownBase as g } from "../Dropdown/DropdownBase.js";
|
|
6
6
|
import "../../index-L8X2o7IH.js";
|
|
7
|
-
import { DrawerBase as
|
|
7
|
+
import { DrawerBase as x } from "../Dropdown/DrawerBase.js";
|
|
8
8
|
import "../Icon/SvgIcon.js";
|
|
9
|
-
import { useRootContext as
|
|
9
|
+
import { useRootContext as H } from "../RootProvider/RootProvider.js";
|
|
10
10
|
import { GlobalMenu as t } from "../GlobalMenu/GlobalMenu.js";
|
|
11
|
-
import { HeaderBase as
|
|
12
|
-
import { HeaderLogo as
|
|
13
|
-
import { HeaderButton as
|
|
14
|
-
import { Searchbar as
|
|
15
|
-
import { HeaderMenu as
|
|
16
|
-
import { HeaderSearch as
|
|
17
|
-
import '../../assets/Header.css';const
|
|
18
|
-
drawer:
|
|
19
|
-
dropdown:
|
|
20
|
-
},
|
|
21
|
-
const { currentId: e, toggleId: n, openId:
|
|
22
|
-
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
}, c = () => {
|
|
26
|
-
n("search");
|
|
11
|
+
import { HeaderBase as _ } from "./HeaderBase.js";
|
|
12
|
+
import { HeaderLogo as C } from "./HeaderLogo.js";
|
|
13
|
+
import { HeaderButton as b } from "./HeaderButton.js";
|
|
14
|
+
import { Searchbar as y } from "../Searchbar/Searchbar.js";
|
|
15
|
+
import { HeaderMenu as B } from "./HeaderMenu.js";
|
|
16
|
+
import { HeaderSearch as N } from "./HeaderSearch.js";
|
|
17
|
+
import '../../assets/Header.css';const S = "_drawer_1wgf5_1", I = "_dropdown_1wgf5_5", d = {
|
|
18
|
+
drawer: S,
|
|
19
|
+
dropdown: I
|
|
20
|
+
}, J = ({ search: s, menu: r, currentAccount: a, logo: l = {} }) => {
|
|
21
|
+
const { currentId: e, toggleId: n, openId: i, closeAll: m } = H();
|
|
22
|
+
w(m);
|
|
23
|
+
const c = () => {
|
|
24
|
+
i("search");
|
|
27
25
|
}, f = () => {
|
|
26
|
+
n("search");
|
|
27
|
+
}, h = () => {
|
|
28
28
|
n("menu");
|
|
29
29
|
};
|
|
30
|
-
return /* @__PURE__ */ p(
|
|
31
|
-
/* @__PURE__ */ o(
|
|
32
|
-
/* @__PURE__ */ p(
|
|
30
|
+
return /* @__PURE__ */ p(_, { currentId: e, open: e === "search" || e === "menu", onClose: m, children: [
|
|
31
|
+
/* @__PURE__ */ o(C, { ...l, className: d.logo }),
|
|
32
|
+
/* @__PURE__ */ p(B, { className: d.menu, children: [
|
|
33
33
|
/* @__PURE__ */ o(
|
|
34
|
-
|
|
34
|
+
b,
|
|
35
35
|
{
|
|
36
36
|
avatar: a && {
|
|
37
37
|
type: a.type,
|
|
38
38
|
name: a.name
|
|
39
39
|
},
|
|
40
|
-
onClick:
|
|
40
|
+
onClick: h,
|
|
41
41
|
expanded: e === "menu",
|
|
42
42
|
label: r == null ? void 0 : r.menuLabel
|
|
43
43
|
}
|
|
44
44
|
),
|
|
45
|
-
r && /* @__PURE__ */ o(
|
|
45
|
+
r && /* @__PURE__ */ o(g, { padding: !1, placement: "right", expanded: e === "menu", className: d.dropdown, children: /* @__PURE__ */ o(t, { ...r, currentAccount: a }) })
|
|
46
46
|
] }),
|
|
47
|
-
s && /* @__PURE__ */ o(
|
|
48
|
-
r && /* @__PURE__ */ o(
|
|
47
|
+
s && /* @__PURE__ */ o(N, { expanded: e === "search", children: /* @__PURE__ */ o(y, { ...s, expanded: e === "search", onClose: f, onFocus: c }) }),
|
|
48
|
+
r && /* @__PURE__ */ o(x, { expanded: e === "menu", className: d.drawer, children: /* @__PURE__ */ o(t, { ...r, currentAccount: a }) })
|
|
49
49
|
] });
|
|
50
50
|
};
|
|
51
51
|
export {
|
|
52
|
-
|
|
52
|
+
J as Header
|
|
53
53
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { jsx as n, jsxs as u } from "react/jsx-runtime";
|
|
2
|
-
import { useState as g, createElement as
|
|
1
|
+
import { jsx as n, jsxs as u, Fragment as I } from "react/jsx-runtime";
|
|
2
|
+
import { useState as g, createElement as y } from "react";
|
|
3
3
|
import "../../index-L8X2o7IH.js";
|
|
4
4
|
import "../Icon/SvgIcon.js";
|
|
5
5
|
import "../RootProvider/RootProvider.js";
|
|
6
|
-
import { DialogListItem as
|
|
7
|
-
import { ListBase as
|
|
6
|
+
import { DialogListItem as A } from "../Dialog/DialogListItem.js";
|
|
7
|
+
import { ListBase as v } from "../List/ListBase.js";
|
|
8
8
|
import { Layout as k } from "./Layout.js";
|
|
9
|
-
import { ActionHeader as
|
|
10
|
-
import { ActionFooter as
|
|
11
|
-
import { ActionMenu as
|
|
12
|
-
import { Snackbar as
|
|
9
|
+
import { ActionHeader as w } from "../LayoutAction/ActionHeader.js";
|
|
10
|
+
import { ActionFooter as C } from "../LayoutAction/ActionFooter.js";
|
|
11
|
+
import { ActionMenu as L } from "../LayoutAction/ActionMenu.js";
|
|
12
|
+
import { Snackbar as M } from "../Snackbar/Snackbar.js";
|
|
13
13
|
const m = {
|
|
14
14
|
search: {
|
|
15
15
|
name: "search",
|
|
@@ -29,8 +29,9 @@ const m = {
|
|
|
29
29
|
}
|
|
30
30
|
]
|
|
31
31
|
}
|
|
32
|
-
},
|
|
32
|
+
}, x = {
|
|
33
33
|
address: "Postboks 1382 Vika, 0114 Oslo.",
|
|
34
|
+
address2: "Org.nr. 991 825 827",
|
|
34
35
|
menu: {
|
|
35
36
|
items: [
|
|
36
37
|
{
|
|
@@ -99,7 +100,7 @@ const m = {
|
|
|
99
100
|
title: "Papirkurv"
|
|
100
101
|
}
|
|
101
102
|
]
|
|
102
|
-
},
|
|
103
|
+
}, Q = {
|
|
103
104
|
title: "Layout/Layout",
|
|
104
105
|
component: k,
|
|
105
106
|
tags: ["autodocs"],
|
|
@@ -109,14 +110,14 @@ const m = {
|
|
|
109
110
|
args: {
|
|
110
111
|
theme: "person",
|
|
111
112
|
header: m,
|
|
112
|
-
footer:
|
|
113
|
+
footer: x,
|
|
113
114
|
sidebar: {
|
|
114
115
|
menu: f
|
|
115
116
|
}
|
|
116
117
|
}
|
|
117
|
-
},
|
|
118
|
+
}, U = {
|
|
118
119
|
args: {}
|
|
119
|
-
},
|
|
120
|
+
}, V = (a) => {
|
|
120
121
|
const [r, s] = g(""), h = (t) => {
|
|
121
122
|
s(t.target.value);
|
|
122
123
|
}, p = [
|
|
@@ -173,7 +174,7 @@ const m = {
|
|
|
173
174
|
}
|
|
174
175
|
}
|
|
175
176
|
);
|
|
176
|
-
},
|
|
177
|
+
}, $ = (a) => {
|
|
177
178
|
const [r, s] = g([]), [h, p] = g({
|
|
178
179
|
1: {
|
|
179
180
|
id: "1",
|
|
@@ -237,9 +238,9 @@ const m = {
|
|
|
237
238
|
sidebar: { hidden: i, menu: f },
|
|
238
239
|
content: { theme: "neutral" },
|
|
239
240
|
children: [
|
|
240
|
-
/* @__PURE__ */ n(
|
|
241
|
-
/* @__PURE__ */ n(
|
|
242
|
-
|
|
241
|
+
/* @__PURE__ */ n(w, { title: b, hidden: !i }),
|
|
242
|
+
/* @__PURE__ */ n(v, { children: t == null ? void 0 : t.map((e) => /* @__PURE__ */ y(
|
|
243
|
+
A,
|
|
243
244
|
{
|
|
244
245
|
...e,
|
|
245
246
|
key: e == null ? void 0 : e.id,
|
|
@@ -249,17 +250,17 @@ const m = {
|
|
|
249
250
|
select: { checked: e == null ? void 0 : e.selected, onChange: () => d(e) }
|
|
250
251
|
}
|
|
251
252
|
)) }),
|
|
252
|
-
/* @__PURE__ */ u(
|
|
253
|
-
i && /* @__PURE__ */ n(
|
|
254
|
-
r.length > 0 && (r == null ? void 0 : r.map((e, o) => /* @__PURE__ */ n(
|
|
255
|
-
] })
|
|
253
|
+
/* @__PURE__ */ n(C, { hidden: !1, children: /* @__PURE__ */ u(I, { children: [
|
|
254
|
+
i && /* @__PURE__ */ n(L, { items: c, theme: "global-dark" }),
|
|
255
|
+
r.length > 0 && (r == null ? void 0 : r.map((e, o) => /* @__PURE__ */ n(M, { ...e }, o)))
|
|
256
|
+
] }) })
|
|
256
257
|
]
|
|
257
258
|
}
|
|
258
259
|
);
|
|
259
260
|
};
|
|
260
261
|
export {
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
262
|
+
V as ControlledStateSearch,
|
|
263
|
+
U as Default,
|
|
264
|
+
$ as InboxBulkMode,
|
|
265
|
+
Q as default
|
|
265
266
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
export interface ActionFooterProps {
|
|
3
|
-
hidden
|
|
3
|
+
hidden?: boolean;
|
|
4
4
|
children?: ReactElement;
|
|
5
5
|
}
|
|
6
6
|
export declare const ActionFooter: ({ hidden, children }: ActionFooterProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ElementType, ReactNode } from 'react';
|
|
2
2
|
import { AvatarGroupProps, AvatarProps } from '../Avatar';
|
|
3
3
|
import { BadgeProps } from '../Badge';
|
|
4
|
+
import { ContextMenuProps } from '../ContextMenu';
|
|
4
5
|
import { IconName } from '../Icon';
|
|
5
6
|
import { ListItemColor, ListItemSize } from './ListItemBase';
|
|
6
7
|
export interface ListItemProps {
|
|
@@ -23,24 +24,32 @@ export interface ListItemProps {
|
|
|
23
24
|
selected?: boolean;
|
|
24
25
|
/** Item is disabled, should disable mouse events */
|
|
25
26
|
disabled?: boolean;
|
|
26
|
-
/** Display an icon indicating behaviour */
|
|
27
|
-
linkIcon?: IconName;
|
|
28
27
|
/** Size of list item */
|
|
29
28
|
size?: ListItemSize;
|
|
30
29
|
/** Title */
|
|
31
30
|
title?: string;
|
|
32
31
|
/** Optional description */
|
|
33
32
|
description?: string;
|
|
34
|
-
/**
|
|
35
|
-
|
|
33
|
+
/** Use children to create a custom label, overriding title and description */
|
|
34
|
+
children?: ReactNode;
|
|
36
35
|
/** List item icon */
|
|
37
36
|
icon?: IconName;
|
|
38
37
|
/** List item avatar */
|
|
39
38
|
avatar?: AvatarProps;
|
|
40
39
|
/** List item avatarGroup */
|
|
41
40
|
avatarGroup?: AvatarGroupProps;
|
|
42
|
-
|
|
41
|
+
/** Optional text indicating behaviour */
|
|
42
|
+
linkText?: string;
|
|
43
|
+
/** Optional icon indicating behaviour */
|
|
44
|
+
linkIcon?: IconName;
|
|
45
|
+
/** Optional badge */
|
|
46
|
+
badge?: BadgeProps;
|
|
47
|
+
/** Optional context menu */
|
|
48
|
+
menu?: ContextMenuProps;
|
|
49
|
+
/** Custom action overrides linkText, linkIcon, badge and menu */
|
|
50
|
+
action?: ReactNode;
|
|
51
|
+
/** Child items */
|
|
43
52
|
items?: ListItemProps[];
|
|
44
53
|
className?: string;
|
|
45
54
|
}
|
|
46
|
-
export declare const ListItem: ({ as, color,
|
|
55
|
+
export declare const ListItem: ({ as, color, selected, disabled, size, icon, avatar, avatarGroup, title, description, children, ...rest }: ListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,25 +1,24 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { ListItemBase as
|
|
3
|
-
import { ListItemLabel as
|
|
4
|
-
import { ListItemMedia as
|
|
5
|
-
const
|
|
1
|
+
import { jsxs as I, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { ListItemBase as n } from "./ListItemBase.js";
|
|
3
|
+
import { ListItemLabel as x } from "./ListItemLabel.js";
|
|
4
|
+
import { ListItemMedia as b } from "./ListItemMedia.js";
|
|
5
|
+
const B = ({
|
|
6
6
|
as: e = "a",
|
|
7
7
|
color: m,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
disabled: l,
|
|
8
|
+
selected: i,
|
|
9
|
+
disabled: j,
|
|
11
10
|
size: t = "sm",
|
|
12
|
-
icon:
|
|
13
|
-
avatar:
|
|
14
|
-
avatarGroup:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
...
|
|
19
|
-
}) => /* @__PURE__ */ n
|
|
20
|
-
/* @__PURE__ */ r(
|
|
21
|
-
/* @__PURE__ */ r(
|
|
11
|
+
icon: s,
|
|
12
|
+
avatar: o,
|
|
13
|
+
avatarGroup: a,
|
|
14
|
+
title: p,
|
|
15
|
+
description: L,
|
|
16
|
+
children: d,
|
|
17
|
+
...f
|
|
18
|
+
}) => /* @__PURE__ */ I(n, { as: e, size: t, color: m, selected: i, ...f, children: [
|
|
19
|
+
/* @__PURE__ */ r(b, { color: m, size: t, icon: s, avatar: o, avatarGroup: a }),
|
|
20
|
+
/* @__PURE__ */ r(x, { title: p, description: L, size: t, children: d })
|
|
22
21
|
] });
|
|
23
22
|
export {
|
|
24
|
-
|
|
23
|
+
B as ListItem
|
|
25
24
|
};
|