@altinn/altinn-components 0.6.9 → 0.6.10
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/FooterBase.css +1 -1
- package/dist/assets/GlobalMenuBase.css +1 -1
- package/dist/assets/MenuItemBase.css +1 -1
- package/dist/assets/MenuOption.css +1 -1
- package/dist/components/Footer/FooterBase.js +5 -5
- package/dist/components/Footer/FooterMenu.js +9 -13
- package/dist/components/GlobalMenu/AccountMenu.js +13 -5
- package/dist/components/GlobalMenu/GlobalMenu.js +46 -40
- 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/Menu/MenuItem.stories.js +2 -2
- package/dist/components/Menu/MenuItemBase.js +22 -22
- package/dist/components/Menu/MenuItemMedia.js +1 -3
- package/dist/components/Menu/MenuOption.js +20 -20
- package/dist/components/Toolbar/Toolbar.stories.js +14 -7
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._footer_1d8fg_1{width:100%;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_1d8fg_14{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_1d8fg_14{padding:0 1rem;flex-direction:row}}
|
|
@@ -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}}
|
|
@@ -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,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 d = "_footer_1d8fg_1", f = "_grid_1d8fg_14", o = {
|
|
4
|
+
footer: d,
|
|
5
|
+
grid: f
|
|
6
|
+
}, a = ({ 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
|
+
a as FooterBase
|
|
12
12
|
};
|
|
@@ -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 {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
+
import { AccountButton as C } from "./AccountButton.js";
|
|
11
|
+
import { BackButton as j } from "./BackButton.js";
|
|
12
|
+
import { GlobalMenuBase as m, GlobalMenuHeader as f, GlobalMenuFooter as A } from "./GlobalMenuBase.js";
|
|
13
|
+
import { LogoutButton as F } from "./LogoutButton.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(A, { children: /* @__PURE__ */ o(F, { ...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,11 +1,11 @@
|
|
|
1
1
|
import { jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
2
2
|
import { LayoutBase as i } from "../Layout/LayoutBase.js";
|
|
3
3
|
import "../../index-L8X2o7IH.js";
|
|
4
|
-
import "../Icon/SvgIcon.js";
|
|
5
4
|
import "react";
|
|
6
|
-
import
|
|
5
|
+
import "../Icon/SvgIcon.js";
|
|
7
6
|
import "../RootProvider/RootProvider.js";
|
|
8
7
|
import { MetaItem as l } from "../Meta/MetaItem.js";
|
|
8
|
+
import { MenuItem as o } from "./MenuItem.js";
|
|
9
9
|
import { MenuBase as p } from "./MenuBase.js";
|
|
10
10
|
const h = {
|
|
11
11
|
title: "Menu/MenuItem",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as t, jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { c as
|
|
3
|
-
import { Badge as
|
|
4
|
-
import { Icon as
|
|
2
|
+
import { c as v } from "../../index-L8X2o7IH.js";
|
|
3
|
+
import { Badge as N } from "../Badge/Badge.js";
|
|
4
|
+
import { Icon as T } from "../Icon/Icon.js";
|
|
5
5
|
import "../Icon/SvgIcon.js";
|
|
6
|
-
import '../../assets/MenuItemBase.css';const B = "
|
|
6
|
+
import '../../assets/MenuItemBase.css';const B = "_item_16huj_1", g = "_content_16huj_36", w = "_action_16huj_44", y = "_linkText_16huj_51", z = "_linkIcon_16huj_56", C = "_media_16huj_76", n = {
|
|
7
7
|
item: B,
|
|
8
8
|
content: g,
|
|
9
9
|
action: w,
|
|
@@ -16,41 +16,41 @@ import '../../assets/MenuItemBase.css';const B = "_item_1m3xe_1", g = "_content_
|
|
|
16
16
|
size: _,
|
|
17
17
|
color: d,
|
|
18
18
|
linkIcon: o,
|
|
19
|
-
linkText:
|
|
19
|
+
linkText: h,
|
|
20
20
|
badge: c,
|
|
21
21
|
tabIndex: p = 0,
|
|
22
|
-
active:
|
|
22
|
+
active: u = !1,
|
|
23
23
|
collapsible: i = !1,
|
|
24
24
|
expanded: s = !1,
|
|
25
|
-
selected:
|
|
25
|
+
selected: f = !1,
|
|
26
26
|
disabled: m = !1,
|
|
27
|
-
className:
|
|
28
|
-
children:
|
|
29
|
-
...
|
|
27
|
+
className: x,
|
|
28
|
+
children: j,
|
|
29
|
+
...k
|
|
30
30
|
}) => {
|
|
31
|
-
const
|
|
31
|
+
const I = r || "a", e = i && s ? "chevron-up" : i ? "chevron-down" : o && "chevron-right";
|
|
32
32
|
return /* @__PURE__ */ t(
|
|
33
|
-
|
|
33
|
+
I,
|
|
34
34
|
{
|
|
35
35
|
role: "menuitem",
|
|
36
36
|
tabIndex: m ? "-1" : p ?? 0,
|
|
37
37
|
"data-size": _,
|
|
38
38
|
"data-color": d,
|
|
39
|
-
"data-active":
|
|
39
|
+
"data-active": u,
|
|
40
40
|
"aria-expanded": s,
|
|
41
41
|
"aria-disabled": m,
|
|
42
|
-
"aria-selected":
|
|
42
|
+
"aria-selected": f,
|
|
43
43
|
onClick: l,
|
|
44
|
-
className:
|
|
45
|
-
...
|
|
44
|
+
className: v(n.item, x),
|
|
45
|
+
...k,
|
|
46
46
|
children: [
|
|
47
|
-
/* @__PURE__ */ t("div", { className:
|
|
48
|
-
|
|
49
|
-
c && /* @__PURE__ */ a(
|
|
47
|
+
/* @__PURE__ */ t("div", { className: n.content, children: [
|
|
48
|
+
j,
|
|
49
|
+
c && /* @__PURE__ */ a(N, { ...c })
|
|
50
50
|
] }),
|
|
51
|
-
|
|
52
|
-
/* @__PURE__ */ a("span", { className:
|
|
53
|
-
|
|
51
|
+
e && /* @__PURE__ */ t("div", { className: n.action, children: [
|
|
52
|
+
/* @__PURE__ */ a("span", { className: n.linkText, children: h }),
|
|
53
|
+
e && /* @__PURE__ */ a(T, { name: e, className: n.linkIcon })
|
|
54
54
|
] })
|
|
55
55
|
]
|
|
56
56
|
}
|
|
@@ -19,9 +19,7 @@ import '../../assets/MenuItemMedia.css';const f = "_media_7n7uy_1", _ = "_icon_7
|
|
|
19
19
|
lg: "md"
|
|
20
20
|
}
|
|
21
21
|
}, A = ({ size: o = "sm", color: n, icon: t, avatar: s, avatarGroup: r, children: i }) => !t && !s && !r && !i ? !1 : /* @__PURE__ */ d("div", { className: e.media, "data-size": o, "data-color": t ? n : null, children: [
|
|
22
|
-
t && /* @__PURE__ */ a(u, { name: t, variant: n === "strong" ? "solid" : "outline", className: e.icon }),
|
|
23
|
-
s && /* @__PURE__ */ a(l, { ...s, size: m == null ? void 0 : m.avatar[o] }),
|
|
24
|
-
r && /* @__PURE__ */ a(c, { ...r, size: m == null ? void 0 : m.avatarGroup[o] }),
|
|
22
|
+
t && /* @__PURE__ */ a(u, { name: t, variant: n === "strong" ? "solid" : "outline", className: e.icon }) || s && /* @__PURE__ */ a(l, { ...s, size: m == null ? void 0 : m.avatar[o] }) || r && /* @__PURE__ */ a(c, { ...r, size: m == null ? void 0 : m.avatarGroup[o] }),
|
|
25
23
|
i
|
|
26
24
|
] });
|
|
27
25
|
export {
|
|
@@ -3,30 +3,30 @@ import "../../index-L8X2o7IH.js";
|
|
|
3
3
|
import "../Icon/SvgIcon.js";
|
|
4
4
|
import { CheckboxIcon as b } from "../Icon/CheckboxIcon.js";
|
|
5
5
|
import { RadioIcon as f } from "../Icon/RadioIcon.js";
|
|
6
|
-
import { MenuItemBase as
|
|
7
|
-
import { MenuItemLabel as
|
|
8
|
-
import '../../assets/MenuOption.css';const
|
|
9
|
-
label:
|
|
10
|
-
input:
|
|
11
|
-
icon:
|
|
12
|
-
},
|
|
13
|
-
size:
|
|
14
|
-
type:
|
|
15
|
-
name:
|
|
16
|
-
value:
|
|
17
|
-
label:
|
|
18
|
-
title:
|
|
19
|
-
description:
|
|
6
|
+
import { MenuItemBase as d } from "./MenuItemBase.js";
|
|
7
|
+
import { MenuItemLabel as x } from "./MenuItemLabel.js";
|
|
8
|
+
import '../../assets/MenuOption.css';const I = "_label_dg58p_1", N = "_input_dg58p_5", g = "_icon_dg58p_10", t = {
|
|
9
|
+
label: I,
|
|
10
|
+
input: N,
|
|
11
|
+
icon: g
|
|
12
|
+
}, O = ({
|
|
13
|
+
size: r = "sm",
|
|
14
|
+
type: e,
|
|
15
|
+
name: s,
|
|
16
|
+
value: i,
|
|
17
|
+
label: l,
|
|
18
|
+
title: a,
|
|
19
|
+
description: m,
|
|
20
20
|
badge: c,
|
|
21
21
|
checked: o = !1,
|
|
22
22
|
disabled: p,
|
|
23
23
|
onChange: u
|
|
24
|
-
}) => /* @__PURE__ */ _(
|
|
25
|
-
/* @__PURE__ */ n("input", { className: t.input, name:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
/* @__PURE__ */ n(
|
|
24
|
+
}) => /* @__PURE__ */ _(d, { className: t.label, disabled: p, selected: o, size: r, badge: c, as: "label", children: [
|
|
25
|
+
/* @__PURE__ */ n("input", { className: t.input, name: s, value: i, type: e, checked: o, onChange: u }),
|
|
26
|
+
e === "checkbox" && /* @__PURE__ */ n(b, { checked: o, hover: !0, className: t.icon }),
|
|
27
|
+
e === "radio" && /* @__PURE__ */ n(f, { checked: o, hover: !0, className: t.icon }),
|
|
28
|
+
/* @__PURE__ */ n(x, { title: a, description: m, size: r, children: l })
|
|
29
29
|
] });
|
|
30
30
|
export {
|
|
31
|
-
|
|
31
|
+
O as MenuOption
|
|
32
32
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import n from "react";
|
|
3
3
|
import { Toolbar as o } from "./Toolbar.js";
|
|
4
|
-
const
|
|
4
|
+
const d = {
|
|
5
5
|
title: "Toolbar/Toolbar",
|
|
6
6
|
component: o,
|
|
7
7
|
tags: ["autodocs"],
|
|
@@ -40,7 +40,14 @@ const b = {
|
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
value: "brreg",
|
|
43
|
-
label: "
|
|
43
|
+
label: "Brønnøysundregistrene"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
value: "ssb",
|
|
47
|
+
label: "Statisitisk sentralbyrå",
|
|
48
|
+
badge: {
|
|
49
|
+
label: "10"
|
|
50
|
+
}
|
|
44
51
|
},
|
|
45
52
|
{
|
|
46
53
|
value: "nav",
|
|
@@ -123,10 +130,10 @@ const p = {
|
|
|
123
130
|
}))
|
|
124
131
|
}
|
|
125
132
|
}, v = () => {
|
|
126
|
-
const [t, e] =
|
|
133
|
+
const [t, e] = n.useState({
|
|
127
134
|
from: ["skatt", "brreg"]
|
|
128
135
|
});
|
|
129
|
-
return /* @__PURE__ */
|
|
136
|
+
return /* @__PURE__ */ s(o, { filters: a.args.filters, filterState: t, onFilterStateChange: e });
|
|
130
137
|
}, c = {
|
|
131
138
|
args: {
|
|
132
139
|
search: {
|
|
@@ -175,5 +182,5 @@ export {
|
|
|
175
182
|
c as FilterAndSearch,
|
|
176
183
|
g as NoFilters,
|
|
177
184
|
p as StaticFilters,
|
|
178
|
-
|
|
185
|
+
d as default
|
|
179
186
|
};
|