@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,42 +1,58 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { c as
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import { ButtonLabel as
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
iconAltText:
|
|
23
|
-
|
|
24
|
-
|
|
1
|
+
import { jsxs as f, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { c as k } from "../../index-L8X2o7IH.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { ButtonBase as s } from "./ButtonBase.js";
|
|
5
|
+
import { ButtonLabel as v } from "./ButtonLabel.js";
|
|
6
|
+
import { ButtonIcon as x } from "./ButtonIcon.js";
|
|
7
|
+
import "../RootProvider/RootProvider.js";
|
|
8
|
+
import "../Searchbar/AutocompleteBase.js";
|
|
9
|
+
import "../Snackbar/useSnackbar.js";
|
|
10
|
+
import '../../assets/ComboButton.css';const B = "_button_kd2d3_1", h = "_divider_kd2d3_7", N = "_primary_kd2d3_14", C = "_secondary_kd2d3_15", r = {
|
|
11
|
+
button: B,
|
|
12
|
+
divider: h,
|
|
13
|
+
primary: N,
|
|
14
|
+
secondary: C
|
|
15
|
+
}, E = ({
|
|
16
|
+
variant: a = "solid",
|
|
17
|
+
color: n,
|
|
18
|
+
size: t,
|
|
19
|
+
selected: e = !1,
|
|
20
|
+
icon: i,
|
|
21
|
+
iconSize: m,
|
|
22
|
+
iconAltText: c,
|
|
23
|
+
label: p,
|
|
24
|
+
labelSize: d,
|
|
25
|
+
children: l,
|
|
26
|
+
className: _,
|
|
27
|
+
ariaLabel: u,
|
|
28
|
+
onLabelClick: y,
|
|
29
|
+
onIconClick: b
|
|
30
|
+
}) => /* @__PURE__ */ f(
|
|
31
|
+
s,
|
|
25
32
|
{
|
|
26
33
|
as: "div",
|
|
27
|
-
size:
|
|
28
|
-
variant:
|
|
29
|
-
color:
|
|
30
|
-
selected:
|
|
31
|
-
className:
|
|
34
|
+
size: t,
|
|
35
|
+
variant: a,
|
|
36
|
+
color: n,
|
|
37
|
+
selected: e,
|
|
38
|
+
className: k(r.button, _),
|
|
32
39
|
tabIndex: -1,
|
|
33
40
|
children: [
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
/* @__PURE__ */
|
|
41
|
+
/* @__PURE__ */ o(s, { ariaLabel: u, size: t, onClick: y, className: r.primary, children: /* @__PURE__ */ o(v, { size: d, children: l || p }) }),
|
|
42
|
+
/* @__PURE__ */ o("span", { "data-size": t, className: r.divider }),
|
|
43
|
+
/* @__PURE__ */ o(
|
|
44
|
+
s,
|
|
45
|
+
{
|
|
46
|
+
onClick: b,
|
|
47
|
+
className: r.secondary,
|
|
48
|
+
ariaLabel: c,
|
|
49
|
+
size: m || d,
|
|
50
|
+
children: i && /* @__PURE__ */ o(x, { icon: i })
|
|
51
|
+
}
|
|
52
|
+
)
|
|
37
53
|
]
|
|
38
54
|
}
|
|
39
55
|
);
|
|
40
56
|
export {
|
|
41
|
-
|
|
57
|
+
E as ComboButton
|
|
42
58
|
};
|
|
@@ -1,34 +1,38 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
2
|
+
import "../../index-L8X2o7IH.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { ButtonBase as f } from "./ButtonBase.js";
|
|
5
|
+
import { ButtonIcon as u } from "./ButtonIcon.js";
|
|
6
|
+
import "../RootProvider/RootProvider.js";
|
|
7
|
+
import "../Searchbar/AutocompleteBase.js";
|
|
8
|
+
import "../Snackbar/useSnackbar.js";
|
|
9
|
+
const g = ({
|
|
10
|
+
variant: r = "solid",
|
|
11
|
+
rounded: i = !1,
|
|
12
|
+
size: m,
|
|
13
|
+
icon: t,
|
|
14
|
+
iconSize: p,
|
|
15
|
+
iconAltText: e,
|
|
16
|
+
color: a,
|
|
17
|
+
className: n,
|
|
18
|
+
selected: s,
|
|
19
|
+
onClick: l,
|
|
20
|
+
dataTestId: d
|
|
18
21
|
}) => /* @__PURE__ */ o(
|
|
19
|
-
|
|
22
|
+
f,
|
|
20
23
|
{
|
|
21
|
-
variant:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"
|
|
29
|
-
|
|
24
|
+
variant: r,
|
|
25
|
+
rounded: i,
|
|
26
|
+
color: a,
|
|
27
|
+
size: m,
|
|
28
|
+
className: n,
|
|
29
|
+
onClick: l,
|
|
30
|
+
selected: s,
|
|
31
|
+
"data-testid": d,
|
|
32
|
+
"aria-label": e,
|
|
33
|
+
children: t && /* @__PURE__ */ o(u, { icon: t, size: p })
|
|
30
34
|
}
|
|
31
35
|
);
|
|
32
36
|
export {
|
|
33
|
-
|
|
37
|
+
g as IconButton
|
|
34
38
|
};
|
|
@@ -1,69 +1,66 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { c as
|
|
2
|
+
import { jsxs as x, jsx as s } from "react/jsx-runtime";
|
|
3
|
+
import { c as v } from "../../index-L8X2o7IH.js";
|
|
4
4
|
import * as a from "react";
|
|
5
|
-
import { forwardRef as
|
|
6
|
-
import { IconButton as
|
|
7
|
-
import { useClickOutside as
|
|
8
|
-
import { DropdownBase as
|
|
9
|
-
import { MenuItems as
|
|
10
|
-
import { useRootContext as
|
|
5
|
+
import { forwardRef as O, useRef as b, useMemo as h } from "react";
|
|
6
|
+
import { IconButton as w } from "../Button/IconButton.js";
|
|
7
|
+
import { useClickOutside as y } from "../../hooks/useClickOutside.js";
|
|
8
|
+
import { DropdownBase as I } from "../Dropdown/DropdownBase.js";
|
|
9
|
+
import { MenuItems as j } from "../Menu/MenuItems.js";
|
|
10
|
+
import { useRootContext as C } from "../RootProvider/RootProvider.js";
|
|
11
11
|
import "../Searchbar/AutocompleteBase.js";
|
|
12
12
|
import "../Snackbar/useSnackbar.js";
|
|
13
|
-
import { u as
|
|
14
|
-
import '../../assets/ContextMenu.css';var
|
|
15
|
-
var
|
|
16
|
-
for (var
|
|
17
|
-
if (
|
|
18
|
-
for (var o = 0,
|
|
19
|
-
|
|
20
|
-
return
|
|
13
|
+
import { u as _ } from "../../useId-BVFxCjkq.js";
|
|
14
|
+
import '../../assets/ContextMenu.css';var R = function(t, n) {
|
|
15
|
+
var r = {};
|
|
16
|
+
for (var e in t) Object.prototype.hasOwnProperty.call(t, e) && n.indexOf(e) < 0 && (r[e] = t[e]);
|
|
17
|
+
if (t != null && typeof Object.getOwnPropertySymbols == "function")
|
|
18
|
+
for (var o = 0, e = Object.getOwnPropertySymbols(t); o < e.length; o++)
|
|
19
|
+
n.indexOf(e[o]) < 0 && Object.prototype.propertyIsEnumerable.call(t, e[o]) && (r[e[o]] = t[e[o]]);
|
|
20
|
+
return r;
|
|
21
21
|
};
|
|
22
|
-
const
|
|
23
|
-
var { title:
|
|
24
|
-
let
|
|
25
|
-
return
|
|
22
|
+
const E = O((t, n) => {
|
|
23
|
+
var { title: r, titleId: e } = t, o = R(t, ["title", "titleId"]);
|
|
24
|
+
let l = _();
|
|
25
|
+
return l = r ? e || "title-" + l : void 0, a.createElement(
|
|
26
26
|
"svg",
|
|
27
|
-
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:
|
|
28
|
-
|
|
27
|
+
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: n, "aria-labelledby": l }, o),
|
|
28
|
+
r ? a.createElement("title", { id: l }, r) : null,
|
|
29
29
|
a.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M6 10.5a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3m4.5 1.5a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0m6 0a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0", clipRule: "evenodd" })
|
|
30
30
|
);
|
|
31
|
-
}),
|
|
32
|
-
toggle:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
className: o,
|
|
40
|
-
items: r
|
|
31
|
+
}), M = "_toggle_nol5i_1", k = {
|
|
32
|
+
toggle: M
|
|
33
|
+
}, q = ({
|
|
34
|
+
id: t = "context-menu",
|
|
35
|
+
placement: n = "right",
|
|
36
|
+
groups: r = {},
|
|
37
|
+
className: e,
|
|
38
|
+
items: o
|
|
41
39
|
}) => {
|
|
42
|
-
const { currentId:
|
|
43
|
-
|
|
44
|
-
const
|
|
40
|
+
const { currentId: l, toggleId: f, closeAll: c } = C(), m = b(null);
|
|
41
|
+
y(m, () => c());
|
|
42
|
+
const d = () => f(t), p = l === t, g = h(() => o.map((i) => ({
|
|
45
43
|
...i,
|
|
46
44
|
onClick: () => {
|
|
47
|
-
var
|
|
48
|
-
(
|
|
45
|
+
var u;
|
|
46
|
+
(u = i.onClick) == null || u.call(i), c();
|
|
49
47
|
}
|
|
50
|
-
})), [
|
|
51
|
-
return /* @__PURE__ */
|
|
48
|
+
})), [o, c]);
|
|
49
|
+
return /* @__PURE__ */ x("div", { className: v(k.toggle, e), "data-color": "neutral", ref: m, children: [
|
|
52
50
|
/* @__PURE__ */ s(
|
|
53
|
-
|
|
51
|
+
w,
|
|
54
52
|
{
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
icon:
|
|
53
|
+
size: "xs",
|
|
54
|
+
rounded: !0,
|
|
55
|
+
icon: E,
|
|
58
56
|
variant: "text",
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
iconAltText: `Open ${e}`
|
|
57
|
+
onClick: d,
|
|
58
|
+
iconAltText: `Open ${t}`
|
|
62
59
|
}
|
|
63
60
|
),
|
|
64
|
-
/* @__PURE__ */ s(
|
|
61
|
+
/* @__PURE__ */ s(I, { placement: n, open: p, children: /* @__PURE__ */ s(j, { groups: r, items: g }) })
|
|
65
62
|
] });
|
|
66
63
|
};
|
|
67
64
|
export {
|
|
68
|
-
|
|
65
|
+
q as ContextMenu
|
|
69
66
|
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx as r, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { Icon as p } from "../Icon/Icon.js";
|
|
3
|
+
import "../../index-L8X2o7IH.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import "../RootProvider/RootProvider.js";
|
|
6
|
+
import "../Searchbar/AutocompleteBase.js";
|
|
7
|
+
import "../Snackbar/useSnackbar.js";
|
|
8
|
+
import { Input as _ } from "./Input.js";
|
|
9
|
+
import { FieldBase as f } from "./FieldBase.js";
|
|
10
|
+
import { S as d } from "../../MagnifyingGlass-3Ln1MufI.js";
|
|
11
|
+
import { S as g } from "../../XMark-DIqxCTTQ.js";
|
|
12
|
+
import '../../assets/SearchField.css';const u = "_field_5zm0g_1", h = "_icon_5zm0g_5", I = "_input_5zm0g_14", z = "_clear_5zm0g_24", N = "_clearIcon_5zm0g_48", c = {
|
|
13
|
+
field: u,
|
|
14
|
+
icon: h,
|
|
15
|
+
input: I,
|
|
16
|
+
clear: z,
|
|
17
|
+
clearIcon: N
|
|
18
|
+
}, E = ({
|
|
19
|
+
className: t,
|
|
20
|
+
size: i,
|
|
21
|
+
color: n = "neutral",
|
|
22
|
+
label: a,
|
|
23
|
+
value: o,
|
|
24
|
+
onClear: e,
|
|
25
|
+
clearButtonAltText: s = "Clear search",
|
|
26
|
+
...l
|
|
27
|
+
}) => /* @__PURE__ */ r(f, { size: i, color: n, label: a, className: t, children: /* @__PURE__ */ m("div", { className: c.field, children: [
|
|
28
|
+
/* @__PURE__ */ r(_, { ...l, type: "search", value: o, className: c.input }),
|
|
29
|
+
/* @__PURE__ */ r(p, { svgElement: d, className: c.icon }),
|
|
30
|
+
e && !!o && /* @__PURE__ */ r("button", { type: "button", className: c.clear, onClick: e, "aria-label": s, children: /* @__PURE__ */ r(g, { className: c.clearIcon }) })
|
|
31
|
+
] }) });
|
|
32
|
+
export {
|
|
33
|
+
E as SearchField
|
|
34
|
+
};
|
|
@@ -6,34 +6,36 @@ import { Input as d } from "./Input.js";
|
|
|
6
6
|
import { Textarea as s } from "./Textarea.js";
|
|
7
7
|
import { Select as c } from "./Select.js";
|
|
8
8
|
import { Radio as h } from "./Radio.js";
|
|
9
|
-
import { Checkbox as
|
|
9
|
+
import { Checkbox as O } from "./Checkbox.js";
|
|
10
10
|
import { Switch as B } from "./Switch.js";
|
|
11
11
|
import { FieldBase as k } from "./FieldBase.js";
|
|
12
12
|
import { TextField as C } from "./TextField.js";
|
|
13
13
|
import { TextareaField as R } from "./TextareaField.js";
|
|
14
14
|
import { SelectField as u } from "./SelectField.js";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
15
|
+
import { SearchField as j } from "./SearchField.js";
|
|
16
|
+
import { FieldsetBase as v } from "./FieldsetBase.js";
|
|
17
|
+
import { OptionsBase as z } from "./OptionsBase.js";
|
|
18
|
+
import { RadioOptions as D } from "./RadioOptions.js";
|
|
19
|
+
import { SwitchOptions as G } from "./SwitchOptions.js";
|
|
20
|
+
import { CheckboxOptions as J } from "./CheckboxOptions.js";
|
|
20
21
|
export {
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
O as Checkbox,
|
|
23
|
+
J as CheckboxOptions,
|
|
23
24
|
r as Field,
|
|
24
25
|
k as FieldBase,
|
|
25
26
|
p as Fieldset,
|
|
26
|
-
|
|
27
|
+
v as FieldsetBase,
|
|
27
28
|
d as Input,
|
|
28
29
|
i as Label,
|
|
29
30
|
f as Legend,
|
|
30
|
-
|
|
31
|
+
z as OptionsBase,
|
|
31
32
|
h as Radio,
|
|
32
|
-
|
|
33
|
+
D as RadioOptions,
|
|
34
|
+
j as SearchField,
|
|
33
35
|
c as Select,
|
|
34
36
|
u as SelectField,
|
|
35
37
|
B as Switch,
|
|
36
|
-
|
|
38
|
+
G as SwitchOptions,
|
|
37
39
|
C as TextField,
|
|
38
40
|
s as Textarea,
|
|
39
41
|
R as TextareaField
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import "../../index-L8X2o7IH.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import "../RootProvider/RootProvider.js";
|
|
5
|
+
import { MenuItem as o } from "../Menu/MenuItem.js";
|
|
6
|
+
import "../Searchbar/AutocompleteBase.js";
|
|
7
|
+
import "../Snackbar/useSnackbar.js";
|
|
8
|
+
import { Button as p } from "../Button/Button.js";
|
|
9
|
+
import { S as s } from "../../ChevronRight-BbelnTke.js";
|
|
10
|
+
const y = ({ account: r, as: m, onClick: t, linkText: i }) => /* @__PURE__ */ e(
|
|
11
|
+
o,
|
|
12
|
+
{
|
|
13
|
+
id: "account",
|
|
14
|
+
size: "lg",
|
|
15
|
+
as: m,
|
|
16
|
+
onClick: t,
|
|
17
|
+
controls: i && /* @__PURE__ */ e(p, { as: "div", icon: s, reverse: !0, variant: "outline", size: "xs", children: i }),
|
|
18
|
+
icon: {
|
|
19
|
+
name: r.name,
|
|
20
|
+
type: r.type
|
|
21
|
+
},
|
|
22
|
+
title: { children: r == null ? void 0 : r.name, size: "sm", weight: "medium" },
|
|
23
|
+
description: r == null ? void 0 : r.description
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
export {
|
|
27
|
+
y as CurrentAccount
|
|
28
|
+
};
|
|
@@ -1,95 +1,90 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as p, jsx as
|
|
2
|
+
import { jsxs as p, jsx as r, Fragment as y } from "react/jsx-runtime";
|
|
3
3
|
import { useState as w, useMemo as z } from "react";
|
|
4
4
|
import "../../index-L8X2o7IH.js";
|
|
5
|
+
import { AccountMenu as D } from "../Account/AccountMenu.js";
|
|
5
6
|
import "../RootProvider/RootProvider.js";
|
|
6
|
-
import {
|
|
7
|
-
import { AccountButton as J } from "./AccountButton.js";
|
|
7
|
+
import { CurrentAccount as J } from "./CurrentAccount.js";
|
|
8
8
|
import { BackButton as K } from "./BackButton.js";
|
|
9
|
-
import { LogoutButton as
|
|
10
|
-
import { EndUserLabel as
|
|
9
|
+
import { LogoutButton as T } from "./LogoutButton.js";
|
|
10
|
+
import { EndUserLabel as j } from "./EndUserLabel.js";
|
|
11
11
|
import "../Searchbar/AutocompleteBase.js";
|
|
12
|
+
import { MenuListItem as h } from "../Menu/MenuBase.js";
|
|
13
|
+
import { Menu as B } from "../Menu/Menu.js";
|
|
12
14
|
import "../Snackbar/useSnackbar.js";
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
currentEndUserLabel: l = "Signed in",
|
|
26
|
-
onSelectAccount: o,
|
|
27
|
-
onClose: r,
|
|
28
|
-
logoutButton: t,
|
|
29
|
-
menuItemsVirtual: H
|
|
15
|
+
import { GlobalMenuBase as s, GlobalMenuHeader as L, GlobalMenuFooter as F } from "./GlobalMenuBase.js";
|
|
16
|
+
const c = ({
|
|
17
|
+
accountMenu: l,
|
|
18
|
+
items: k = [],
|
|
19
|
+
groups: g,
|
|
20
|
+
changeLabel: H = "Change",
|
|
21
|
+
backLabel: M = "Back",
|
|
22
|
+
currentAccount: d,
|
|
23
|
+
currentEndUserLabel: t = "Signed in",
|
|
24
|
+
onSelectAccount: f,
|
|
25
|
+
onClose: m,
|
|
26
|
+
logoutButton: e
|
|
30
27
|
}) => {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
28
|
+
var x;
|
|
29
|
+
const [S, W] = w(!1), o = () => {
|
|
30
|
+
W((i) => !i);
|
|
31
|
+
}, q = (i) => {
|
|
32
|
+
o(), m == null || m(), f == null || f(i);
|
|
33
|
+
}, v = z(() => k.map((i) => ({
|
|
34
|
+
...i,
|
|
37
35
|
onClick: () => {
|
|
38
|
-
var
|
|
39
|
-
(
|
|
36
|
+
var a;
|
|
37
|
+
(a = i.onClick) == null || a.call(i), m == null || m();
|
|
40
38
|
},
|
|
41
|
-
items: Array.isArray(
|
|
42
|
-
...
|
|
39
|
+
items: Array.isArray(i.items) ? i.items.map((a) => ({
|
|
40
|
+
...a,
|
|
43
41
|
onClick: () => {
|
|
44
|
-
var
|
|
45
|
-
(
|
|
42
|
+
var G;
|
|
43
|
+
(G = a.onClick) == null || G.call(a), m == null || m();
|
|
46
44
|
}
|
|
47
45
|
})) : void 0
|
|
48
|
-
})), [
|
|
49
|
-
|
|
50
|
-
/* @__PURE__ */
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
D,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
/* @__PURE__ */ i(d, { as: "div", role: "separator" }),
|
|
77
|
-
/* @__PURE__ */ p(y, { children: [
|
|
78
|
-
l && /* @__PURE__ */ i(x, { children: l }),
|
|
79
|
-
/* @__PURE__ */ i(v, { ...t })
|
|
46
|
+
})), [k, m]);
|
|
47
|
+
if (S)
|
|
48
|
+
return /* @__PURE__ */ p(s, { children: [
|
|
49
|
+
/* @__PURE__ */ r(L, { children: /* @__PURE__ */ r(K, { onClick: o, label: M }) }),
|
|
50
|
+
/* @__PURE__ */ r(h, { as: "div", role: "separator" }),
|
|
51
|
+
l && /* @__PURE__ */ r(D, { ...l, currentAccount: d, onSelectAccount: q })
|
|
52
|
+
] });
|
|
53
|
+
if (d) {
|
|
54
|
+
const i = l && ((x = l == null ? void 0 : l.items) == null ? void 0 : x.length) > 1;
|
|
55
|
+
return /* @__PURE__ */ p(s, { color: d == null ? void 0 : d.type, children: [
|
|
56
|
+
/* @__PURE__ */ r(
|
|
57
|
+
J,
|
|
58
|
+
{
|
|
59
|
+
account: d,
|
|
60
|
+
linkText: H,
|
|
61
|
+
multipleAccounts: i,
|
|
62
|
+
as: i ? "button" : "div",
|
|
63
|
+
onClick: i ? o : void 0
|
|
64
|
+
}
|
|
65
|
+
),
|
|
66
|
+
/* @__PURE__ */ r(h, { as: "div", role: "separator" }),
|
|
67
|
+
/* @__PURE__ */ r(B, { groups: g, items: v, theme: "default" }),
|
|
68
|
+
e && /* @__PURE__ */ p(y, { children: [
|
|
69
|
+
/* @__PURE__ */ r(h, { as: "div", role: "separator" }),
|
|
70
|
+
/* @__PURE__ */ p(F, { children: [
|
|
71
|
+
t && /* @__PURE__ */ r(j, { children: t }),
|
|
72
|
+
/* @__PURE__ */ r(T, { ...e })
|
|
73
|
+
] })
|
|
80
74
|
] })
|
|
81
|
-
] })
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
/* @__PURE__ */
|
|
87
|
-
|
|
88
|
-
/* @__PURE__ */
|
|
75
|
+
] });
|
|
76
|
+
}
|
|
77
|
+
return /* @__PURE__ */ p(s, { children: [
|
|
78
|
+
/* @__PURE__ */ r(B, { groups: g, items: v }),
|
|
79
|
+
e && /* @__PURE__ */ p(y, { children: [
|
|
80
|
+
/* @__PURE__ */ r(h, { as: "div", role: "separator" }),
|
|
81
|
+
/* @__PURE__ */ p(F, { children: [
|
|
82
|
+
t && /* @__PURE__ */ r(j, { children: t }),
|
|
83
|
+
/* @__PURE__ */ r(T, { ...e })
|
|
89
84
|
] })
|
|
90
85
|
] })
|
|
91
86
|
] });
|
|
92
87
|
};
|
|
93
88
|
export {
|
|
94
|
-
|
|
89
|
+
c as GlobalMenu
|
|
95
90
|
};
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CurrentAccount as t } from "./CurrentAccount.js";
|
|
2
2
|
import { GlobalMenu as n } from "./GlobalMenu.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { LogoutButton as c } from "./LogoutButton.js";
|
|
3
|
+
import { BackButton as f } from "./BackButton.js";
|
|
4
|
+
import { LogoutButton as p } from "./LogoutButton.js";
|
|
6
5
|
import { EndUserLabel as a } from "./EndUserLabel.js";
|
|
7
6
|
export {
|
|
8
|
-
f as
|
|
9
|
-
|
|
10
|
-
p as BackButton,
|
|
7
|
+
f as BackButton,
|
|
8
|
+
t as CurrentAccount,
|
|
11
9
|
a as EndUserLabel,
|
|
12
10
|
n as GlobalMenu,
|
|
13
|
-
|
|
11
|
+
p as LogoutButton
|
|
14
12
|
};
|
|
@@ -5,9 +5,9 @@ import { Avatar as I } from "../Avatar/Avatar.js";
|
|
|
5
5
|
import { AvatarGroup as y } from "../Avatar/AvatarGroup.js";
|
|
6
6
|
import { Badge as f } from "../Badge/Badge.js";
|
|
7
7
|
import { ButtonBase as u } from "../Button/ButtonBase.js";
|
|
8
|
-
import { Icon as b } from "../Icon/Icon.js";
|
|
9
8
|
import * as _ from "react";
|
|
10
9
|
import { forwardRef as v } from "react";
|
|
10
|
+
import { Icon as b } from "../Icon/Icon.js";
|
|
11
11
|
import "../RootProvider/RootProvider.js";
|
|
12
12
|
import "../Searchbar/AutocompleteBase.js";
|
|
13
13
|
import "../Snackbar/useSnackbar.js";
|