@altinn/altinn-components 0.6.9 → 0.6.11
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/Footer.css +1 -0
- package/dist/assets/GlobalMenuBase.css +1 -1
- package/dist/assets/ListItemAction.css +1 -0
- package/dist/assets/ListItemBase.css +1 -1
- package/dist/assets/MenuItemBase.css +1 -1
- package/dist/assets/MenuOption.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/FooterMenu.js +9 -13
- package/dist/components/GlobalMenu/AccountMenu.js +13 -5
- package/dist/components/GlobalMenu/GlobalMenu.js +45 -39
- package/dist/components/GlobalMenu/GlobalMenu.stories.js +16 -5
- package/dist/components/GlobalMenu/GlobalMenuBase.d.ts +8 -2
- package/dist/components/GlobalMenu/GlobalMenuBase.js +9 -10
- package/dist/components/GlobalMenu/index.d.ts +3 -0
- package/dist/components/GlobalMenu/index.js +8 -2
- 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/MenuItem.stories.js +2 -2
- package/dist/components/Menu/MenuItemBase.js +36 -36
- package/dist/components/Menu/MenuItemMedia.js +1 -3
- package/dist/components/Menu/MenuOption.js +20 -20
- package/dist/components/Searchbar/AutocompleteItem.js +3 -2
- package/dist/components/Toolbar/Toolbar.stories.js +14 -7
- package/dist/components/index.js +151 -143
- package/dist/index.js +152 -144
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._address_5rd7f_1{display:flex;flex-direction:column;column-gap:.5rem}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._nav_1mnmu_1{background-color:#fff;display:flex;flex-direction:column;padding:0 .5rem}._footer_1mnmu_8{padding:1rem .5rem;display:flex;width:100%;flex-direction:column;align-items:stretch}._drawer_1mnmu_16[aria-expanded=true]{display:block;padding:.5rem;z-index:2}._dropdown_1mnmu_22[aria-expanded=true]{display:none}@media (min-width: 1024px){._drawer_1mnmu_16[aria-expanded=true]{display:none}._dropdown_1mnmu_22[aria-expanded=true]{display:block;z-index:2}}
|
|
@@ -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 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._item_16huj_1{padding:0;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;column-gap:.25rem;margin:.5rem 0}._item_16huj_1[aria-disabled=true]{opacity:.5;pointer-events:none}._item_16huj_1[data-size=sm]{min-height:44px}._content_16huj_36{display:flex;width:100%;align-items:center;column-gap:6px;padding:6px}._action_16huj_44{display:flex;justify-content:center;align-items:center;padding:10px}._linkText_16huj_51{font-size:.875rem;white-space:nowrap}._linkIcon_16huj_56{font-size:1.5rem}._item_16huj_1{background-color:transparent;color:var(--theme-text-default)}._item_16huj_1[aria-selected=true]{background-color:var(--theme-background-default)}._item_16huj_1:hover,._item_16huj_1:active{background-color:var(--theme-surface-hover)}._media_16huj_76[data-color=subtle]{background-color:var(--theme-background-default);color:var(--theme-text-default)}._media_16huj_76[data-color=strong]{background-color:var(--theme-base-default);color:var(--theme-background-default)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._label_dg58p_1{padding-left:6px}._input_dg58p_5{position:absolute;opacity:0}._icon_dg58p_10{flex-shrink:0;font-size:1rem;display:flex;align-items:center;justify-content:center}._icon_dg58p_10{color:var(--theme-base-default)}._icon_dg58p_10 [data-hover=true]{opacity:0}._label_dg58p_1:hover [data-hover=true]{opacity:1}
|
|
@@ -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,16 +1,12 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { c as
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
list: c,
|
|
10
|
-
item: _,
|
|
11
|
-
link: a
|
|
12
|
-
}, p = ({ as: t, className: e, title: o, ...r }) => /* @__PURE__ */ n(t || "a", { className: s(i.link, e), ...r, children: o }), C = ({ className: t, items: e = [] }) => /* @__PURE__ */ n(m, { className: s(i.menu, t), children: /* @__PURE__ */ n("ul", { className: i.list, children: e.map((o) => /* @__PURE__ */ n("li", { children: /* @__PURE__ */ n(p, { ...o }) }, o.id)) }) });
|
|
2
|
+
import { c as i } from "../../index-L8X2o7IH.js";
|
|
3
|
+
import '../../assets/FooterMenu.css';const c = "_menu_3o631_1", r = "_list_3o631_7", m = "_item_3o631_28", _ = "_link_3o631_32", s = {
|
|
4
|
+
menu: c,
|
|
5
|
+
list: r,
|
|
6
|
+
item: m,
|
|
7
|
+
link: _
|
|
8
|
+
}, a = ({ as: t, className: e, title: o, ...l }) => /* @__PURE__ */ n(t || "a", { className: i(s.link, e), ...l, children: o }), k = ({ className: t, items: e = [] }) => /* @__PURE__ */ n("nav", { className: i(s.menu, t), children: /* @__PURE__ */ n("ul", { className: s.list, children: e.map((o) => /* @__PURE__ */ n("li", { children: /* @__PURE__ */ n(a, { ...o }) }, o.id)) }) });
|
|
13
9
|
export {
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
a as FooterLink,
|
|
11
|
+
k as FooterMenu
|
|
16
12
|
};
|
|
@@ -5,7 +5,7 @@ import "../../index-L8X2o7IH.js";
|
|
|
5
5
|
import "../Icon/SvgIcon.js";
|
|
6
6
|
import "../RootProvider/RootProvider.js";
|
|
7
7
|
import { Menu as b } from "../Menu/Menu.js";
|
|
8
|
-
const v = (r) => `${r} hits`,
|
|
8
|
+
const v = (r) => `${r} hits`, k = ({
|
|
9
9
|
accounts: r = [],
|
|
10
10
|
accountGroups: f = {},
|
|
11
11
|
accountSearch: s,
|
|
@@ -29,11 +29,11 @@ const v = (r) => `${r} hits`, R = ({
|
|
|
29
29
|
}).map((e) => ({
|
|
30
30
|
...e,
|
|
31
31
|
groupId: "search"
|
|
32
|
-
})) : p,
|
|
32
|
+
})) : p, I = i ? {
|
|
33
33
|
search: {
|
|
34
34
|
title: ((m = s == null ? void 0 : s.getResultsLabel) == null ? void 0 : m.call(s, l.length)) ?? v(l.length)
|
|
35
35
|
}
|
|
36
|
-
} : f,
|
|
36
|
+
} : f, h = {
|
|
37
37
|
name: "account-search",
|
|
38
38
|
value: i,
|
|
39
39
|
placeholder: (s == null ? void 0 : s.placeholder) ?? "Find account",
|
|
@@ -41,8 +41,16 @@ const v = (r) => `${r} hits`, R = ({
|
|
|
41
41
|
}, C = [
|
|
42
42
|
...l.length > 0 ? l : [{ id: "search", groupId: "search", hidden: !0 }]
|
|
43
43
|
];
|
|
44
|
-
return /* @__PURE__ */ L(
|
|
44
|
+
return /* @__PURE__ */ L(
|
|
45
|
+
b,
|
|
46
|
+
{
|
|
47
|
+
theme: "global",
|
|
48
|
+
search: s && h,
|
|
49
|
+
groups: I,
|
|
50
|
+
items: C
|
|
51
|
+
}
|
|
52
|
+
);
|
|
45
53
|
};
|
|
46
54
|
export {
|
|
47
|
-
|
|
55
|
+
k as AccountMenu
|
|
48
56
|
};
|
|
@@ -1,58 +1,64 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { useState as
|
|
2
|
+
import { jsxs as n, jsx as o, Fragment as x } from "react/jsx-runtime";
|
|
3
|
+
import { useState as G } from "react";
|
|
4
4
|
import "../../index-L8X2o7IH.js";
|
|
5
5
|
import "../Icon/SvgIcon.js";
|
|
6
6
|
import "../RootProvider/RootProvider.js";
|
|
7
|
-
import { AccountMenu as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { BackButton as G } from "./BackButton.js";
|
|
11
|
-
import { GlobalMenuBase as i, GlobalMenuHeader as C, GlobalMenuFooter as j } from "./GlobalMenuBase.js";
|
|
7
|
+
import { AccountMenu as v } from "./AccountMenu.js";
|
|
8
|
+
import { AccountButton as C } from "./AccountButton.js";
|
|
9
|
+
import { BackButton as j } from "./BackButton.js";
|
|
12
10
|
import { LogoutButton as A } from "./LogoutButton.js";
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
+
const N = ({
|
|
15
|
+
accounts: a = [],
|
|
16
|
+
accountGroups: h = {},
|
|
17
|
+
accountSearch: s,
|
|
18
|
+
items: p = [],
|
|
18
19
|
groups: c,
|
|
19
|
-
changeLabel:
|
|
20
|
-
backLabel:
|
|
21
|
-
currentAccount:
|
|
20
|
+
changeLabel: M = "Change",
|
|
21
|
+
backLabel: g = "Back",
|
|
22
|
+
currentAccount: r,
|
|
22
23
|
onSelectAccount: e,
|
|
23
|
-
logoutButton:
|
|
24
|
+
logoutButton: u
|
|
24
25
|
}) => {
|
|
25
|
-
const [
|
|
26
|
-
|
|
27
|
-
},
|
|
28
|
-
|
|
26
|
+
const [b, k] = G(!1), t = () => {
|
|
27
|
+
k((i) => !i);
|
|
28
|
+
}, B = (i) => {
|
|
29
|
+
t(), e == null || e(i);
|
|
29
30
|
};
|
|
30
|
-
return
|
|
31
|
-
/* @__PURE__ */ o(
|
|
31
|
+
return b ? /* @__PURE__ */ n(m, { children: [
|
|
32
|
+
/* @__PURE__ */ o(f, { children: /* @__PURE__ */ o(j, { onClick: t, label: g }) }),
|
|
33
|
+
!s && /* @__PURE__ */ o(l, { as: "div", role: "separator" }),
|
|
32
34
|
/* @__PURE__ */ o(
|
|
33
|
-
|
|
35
|
+
v,
|
|
34
36
|
{
|
|
35
|
-
currentAccount:
|
|
36
|
-
accounts:
|
|
37
|
-
accountGroups:
|
|
38
|
-
accountSearch:
|
|
39
|
-
onSelectAccount:
|
|
37
|
+
currentAccount: r,
|
|
38
|
+
accounts: a,
|
|
39
|
+
accountGroups: h,
|
|
40
|
+
accountSearch: s,
|
|
41
|
+
onSelectAccount: B
|
|
40
42
|
}
|
|
41
43
|
)
|
|
42
|
-
] }) :
|
|
43
|
-
/* @__PURE__ */ o(
|
|
44
|
-
|
|
44
|
+
] }) : r ? /* @__PURE__ */ n(m, { children: [
|
|
45
|
+
/* @__PURE__ */ o(f, { children: /* @__PURE__ */ o(
|
|
46
|
+
C,
|
|
45
47
|
{
|
|
46
|
-
account:
|
|
47
|
-
linkText:
|
|
48
|
-
multipleAccounts:
|
|
49
|
-
onClick:
|
|
48
|
+
account: r,
|
|
49
|
+
linkText: M,
|
|
50
|
+
multipleAccounts: a.length > 1,
|
|
51
|
+
onClick: t
|
|
50
52
|
}
|
|
51
53
|
) }),
|
|
52
|
-
/* @__PURE__ */ o(
|
|
53
|
-
|
|
54
|
-
|
|
54
|
+
/* @__PURE__ */ o(l, { as: "div", role: "separator" }),
|
|
55
|
+
/* @__PURE__ */ o(d, { groups: c, items: p }),
|
|
56
|
+
u && /* @__PURE__ */ n(x, { children: [
|
|
57
|
+
/* @__PURE__ */ o(l, { as: "div", role: "separator" }),
|
|
58
|
+
/* @__PURE__ */ o(F, { children: /* @__PURE__ */ o(A, { ...u }) })
|
|
59
|
+
] })
|
|
60
|
+
] }) : /* @__PURE__ */ o(m, { children: /* @__PURE__ */ o(d, { groups: c, items: p }) });
|
|
55
61
|
};
|
|
56
62
|
export {
|
|
57
|
-
|
|
63
|
+
N as GlobalMenu
|
|
58
64
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { GlobalMenu as
|
|
2
|
-
const
|
|
1
|
+
import { GlobalMenu as t } from "./GlobalMenu.js";
|
|
2
|
+
const r = {
|
|
3
3
|
title: "GlobalMenu/GlobalMenu",
|
|
4
|
-
component:
|
|
4
|
+
component: t,
|
|
5
5
|
tags: ["autodocs"],
|
|
6
6
|
parameters: {},
|
|
7
7
|
args: {
|
|
@@ -14,10 +14,14 @@ const t = {
|
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
currentAccount: {
|
|
17
|
+
id: "party:mathias",
|
|
17
18
|
type: "person",
|
|
18
19
|
name: "Mathias Dyngeland",
|
|
19
20
|
description: "Fødselsnr. 07101995 XXXXXX"
|
|
20
21
|
},
|
|
22
|
+
logoutButton: {
|
|
23
|
+
label: "Logg ut"
|
|
24
|
+
},
|
|
21
25
|
accounts: [
|
|
22
26
|
{
|
|
23
27
|
id: "party:mathias",
|
|
@@ -148,6 +152,12 @@ const t = {
|
|
|
148
152
|
}
|
|
149
153
|
}
|
|
150
154
|
}, l = {
|
|
155
|
+
args: {
|
|
156
|
+
accountSearch: {
|
|
157
|
+
placeholder: "Finn konto"
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}, s = {
|
|
151
161
|
args: {
|
|
152
162
|
logoutLabel: "Logg ut",
|
|
153
163
|
menuLabel: "Meny",
|
|
@@ -161,9 +171,10 @@ const t = {
|
|
|
161
171
|
}
|
|
162
172
|
};
|
|
163
173
|
export {
|
|
174
|
+
l as AccountSearch,
|
|
164
175
|
i as Company,
|
|
165
|
-
|
|
176
|
+
s as CustomLabels,
|
|
166
177
|
o as Default,
|
|
167
178
|
n as Login,
|
|
168
|
-
|
|
179
|
+
r as default
|
|
169
180
|
};
|
|
@@ -2,6 +2,12 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
export interface GlobalMenuBaseProps {
|
|
3
3
|
children: ReactNode;
|
|
4
4
|
}
|
|
5
|
+
export interface GlobalMenuHeaderProps {
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export interface GlobalMenuFooterProps {
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
}
|
|
5
11
|
export declare const GlobalMenuBase: ({ children }: GlobalMenuBaseProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
export declare const GlobalMenuHeader: ({ children }:
|
|
7
|
-
export declare const GlobalMenuFooter: ({ children }:
|
|
12
|
+
export declare const GlobalMenuHeader: ({ children }: GlobalMenuHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const GlobalMenuFooter: ({ children }: GlobalMenuFooterProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import '../../assets/GlobalMenuBase.css';const
|
|
3
|
-
nav:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}, _ = ({ children: o }) => /* @__PURE__ */ e("nav", { className: r.nav, "data-theme": "global", children: o }), c = ({ children: o }) => /* @__PURE__ */ e("header", { className: r.header, children: o }), f = ({ children: o }) => /* @__PURE__ */ e("footer", { className: r.footer, children: o });
|
|
2
|
+
import '../../assets/GlobalMenuBase.css';const n = "_nav_1mnmu_1", a = "_footer_1mnmu_8", t = "_drawer_1mnmu_16", s = "_dropdown_1mnmu_22", r = {
|
|
3
|
+
nav: n,
|
|
4
|
+
footer: a,
|
|
5
|
+
drawer: t,
|
|
6
|
+
dropdown: s
|
|
7
|
+
}, d = ({ children: o }) => /* @__PURE__ */ e("nav", { className: r.nav, "data-theme": "global", children: o }), l = ({ children: o }) => /* @__PURE__ */ e("header", { className: r.header, children: o }), _ = ({ children: o }) => /* @__PURE__ */ e("footer", { className: r.footer, children: o });
|
|
9
8
|
export {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
d as GlobalMenuBase,
|
|
10
|
+
_ as GlobalMenuFooter,
|
|
11
|
+
l as GlobalMenuHeader
|
|
13
12
|
};
|
|
@@ -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,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
|
};
|