@altinn/altinn-components 0.41.0 → 0.41.2
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/ButtonIcon.css +1 -1
- package/dist/assets/GlobalMenuButton.css +1 -1
- package/dist/assets/Icon.css +1 -1
- package/dist/assets/MenuOption.css +1 -1
- package/dist/components/Account/AccountList.js +39 -23
- package/dist/components/Account/AccountListItem.js +42 -40
- package/dist/components/Button/ButtonIcon.js +9 -9
- package/dist/components/ContextMenu/ContextMenu.js +6 -6
- package/dist/components/GlobalMenu/BackButton.js +10 -10
- package/dist/components/GlobalMenu/GlobalMenuButton.js +25 -25
- package/dist/components/Icon/Icon.js +12 -12
- package/dist/components/Menu/MenuOption.js +26 -26
- package/dist/components/Settings/SettingsList.js +31 -32
- package/dist/types/lib/components/Account/AccountList.d.ts +2 -1
- package/dist/types/lib/components/Account/AccountList.stories.d.ts +2 -1
- package/dist/types/lib/components/Account/AccountListItem.d.ts +1 -1
- package/dist/types/lib/components/Account/AccountListItem.stories.d.ts +1 -1
- package/dist/types/lib/components/Settings/SettingsList.d.ts +2 -1
- package/dist/types/lib/stories/Settings/Settings.stories.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._wrapper_1y1r9_1{display:flex;align-items:center;justify-content:center;font-size:1em}._icon_1y1r9_8[data-size=xs]{font-size:.875rem}._icon_1y1r9_8[data-size=sm]{font-size:1rem}._icon_1y1r9_8[data-size=md]{font-size:1.125rem}._icon_1y1r9_8[data-size=lg]{font-size:1.5rem}._icon_1y1r9_8 svg,._icon_1y1r9_8 img{display:block;width:1.5em;height:1.5em}._avatar_1y1r9_31{font-size:1.5em}._avatarGroup_1y1r9_35{font-size:1.125em}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._button_234vz_1{flex-shrink:0;position:relative;z-index:2;display:inline-flex;align-items:center;column-gap:.625rem;padding:.625rem;border:none;border-radius:4px}._label_234vz_13{font-size:1.125rem;font-weight:500;padding:.25rem}._loginIcon_234vz_19,._closeIcon_234vz_20,._avatar_234vz_21{font-size:1.5rem;width:2.25rem;height:2.25rem;border-radius:2px}._loginIcon_234vz_19{background-color:#fff;color:#000}._closeIcon_234vz_20{outline:1px solid white}._badge_234vz_37{position:absolute;top:0;right:0;margin-top:-.75rem;margin-right:-.75rem}@supports (-webkit-hyphens: none){._loginIcon_234vz_19,._closeIcon_234vz_20,._avatar_234vz_21{font-size:unset}._loginIcon_234vz_19 svg,._loginIcon_234vz_19 img,._closeIcon_234vz_20 svg,._closeIcon_234vz_20 img{width:1.5rem;height:1.5rem}}
|
package/dist/assets/Icon.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._icon_1y3dz_1{position:relative;display:flex;justify-content:center;align-items:center;border-radius:5%}._shape_1y3dz_9{width:1em;height:1em}._svg_1y3dz_14,._image_1y3dz_15{position:absolute;display:block;width:1em;height:1em;margin:auto}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._label_16xuy_1{flex-grow:1;display:flex;flex-direction:row;align-items:center;justify-content:center;padding:0 .125rem;font-size:1rem;column-gap:.5em;pointer-events:none}._title_16xuy_13{display:inline-flex;align-items:center;column-gap:.5em}._radio_16xuy_19,._checkbox_16xuy_20{flex-shrink:0;flex-grow:0;position:relative;width:1.25em;height:1.25em;display:flex;align-items:center;justify-content:center;color:transparent}._radio_16xuy_19{border:1px solid;border-color:var(--ds-color-border-subtle);outline:var(--ds-color-border-subtle) solid 1px;border-radius:50%}._checkbox_16xuy_20{border:2px solid;border-color:var(--ds-color-border-subtle);border-radius:2px}._radio_16xuy_19[data-checked=true],._checkbox_16xuy_20[data-checked=true]{background-color:var(--ds-color-base-default);border:none;outline-color:var(--ds-color-base-default);color:var(--ds-color-base-contrast-default)}._icon_16xuy_53{font-size:1.25em}@supports (-webkit-hyphens: none){._icon_16xuy_53{font-size:unset;width:1.25em;height:1.25em}._icon_16xuy_53 svg,._icon_16xuy_53 img{width:100%;height:100%}}
|
|
@@ -1,28 +1,44 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Fragment as
|
|
1
|
+
import { jsxs as o, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { Fragment as y, createElement as k } from "react";
|
|
3
3
|
import "../../index-L8X2o7IH.js";
|
|
4
|
-
import { AccountListItem as
|
|
5
|
-
import { Typography as
|
|
6
|
-
import { Heading as
|
|
4
|
+
import { AccountListItem as u } from "./AccountListItem.js";
|
|
5
|
+
import { Typography as x } from "../Typography/Typography.js";
|
|
6
|
+
import { Heading as m } from "../Typography/Heading.js";
|
|
7
|
+
import { useMenu as I } from "../../hooks/useMenu.js";
|
|
7
8
|
import "../RootProvider/RootProvider.js";
|
|
8
|
-
import { List as
|
|
9
|
+
import { List as L } from "../List/List.js";
|
|
9
10
|
import "../Snackbar/useSnackbar.js";
|
|
10
|
-
import { Section as
|
|
11
|
-
const
|
|
12
|
-
items:
|
|
13
|
-
groups:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
11
|
+
import { Section as c } from "../Page/Section.js";
|
|
12
|
+
const M = ({
|
|
13
|
+
items: i,
|
|
14
|
+
groups: p = {},
|
|
15
|
+
sortGroupBy: s,
|
|
16
|
+
emptyTitle: f = "Ingen treff",
|
|
17
|
+
emptyDescription: l = "Søket ga ingen treff"
|
|
18
|
+
}) => {
|
|
19
|
+
if (!i || i.length === 0)
|
|
20
|
+
return /* @__PURE__ */ o(c, { children: [
|
|
21
|
+
/* @__PURE__ */ r(m, { size: "lg", children: f }),
|
|
22
|
+
/* @__PURE__ */ r(x, { children: l })
|
|
23
|
+
] });
|
|
24
|
+
const { menu: n } = I({
|
|
25
|
+
items: i,
|
|
26
|
+
groups: p,
|
|
27
|
+
groupByKey: "groupId",
|
|
28
|
+
keyboardEvents: !1,
|
|
29
|
+
sortGroupBy: s
|
|
30
|
+
});
|
|
31
|
+
return /* @__PURE__ */ r(c, { spacing: 6, children: n == null ? void 0 : n.map((t, a) => {
|
|
32
|
+
const e = t.props || {};
|
|
33
|
+
return /* @__PURE__ */ o(y, { children: [
|
|
34
|
+
(e == null ? void 0 : e.title) && /* @__PURE__ */ r(m, { size: "lg", children: e.title }),
|
|
35
|
+
/* @__PURE__ */ r(L, { children: t == null ? void 0 : t.items.map((d, h) => {
|
|
36
|
+
const g = d.props || {};
|
|
37
|
+
return /* @__PURE__ */ k(u, { ...g, key: h });
|
|
38
|
+
}) })
|
|
39
|
+
] }, a);
|
|
40
|
+
}) });
|
|
41
|
+
};
|
|
26
42
|
export {
|
|
27
|
-
|
|
43
|
+
M as AccountList
|
|
28
44
|
};
|
|
@@ -1,57 +1,59 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import "../../index-L8X2o7IH.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "../RootProvider/RootProvider.js";
|
|
5
|
-
import { ListItem as
|
|
5
|
+
import { ListItem as C } from "../List/ListItem.js";
|
|
6
6
|
import "../Snackbar/useSnackbar.js";
|
|
7
|
-
import { AccountListItemControls as
|
|
8
|
-
const
|
|
9
|
-
id:
|
|
10
|
-
type:
|
|
11
|
-
size:
|
|
7
|
+
import { AccountListItemControls as M } from "./AccountListItemControls.js";
|
|
8
|
+
const B = ({
|
|
9
|
+
id: i,
|
|
10
|
+
type: m,
|
|
11
|
+
size: c,
|
|
12
12
|
expanded: t,
|
|
13
|
-
icon:
|
|
14
|
-
title:
|
|
13
|
+
icon: s,
|
|
14
|
+
title: e,
|
|
15
15
|
description: n,
|
|
16
|
-
isCurrentEndUser:
|
|
17
|
-
isDeleted:
|
|
18
|
-
badge:
|
|
19
|
-
favourite:
|
|
20
|
-
favouriteLabel:
|
|
21
|
-
onToggleFavourite:
|
|
22
|
-
contextMenu:
|
|
23
|
-
children:
|
|
24
|
-
interactive:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
16
|
+
isCurrentEndUser: p,
|
|
17
|
+
isDeleted: u,
|
|
18
|
+
badge: f,
|
|
19
|
+
favourite: I = !1,
|
|
20
|
+
favouriteLabel: l,
|
|
21
|
+
onToggleFavourite: L,
|
|
22
|
+
contextMenu: v,
|
|
23
|
+
children: A,
|
|
24
|
+
interactive: j,
|
|
25
|
+
loading: o,
|
|
26
|
+
...k
|
|
27
|
+
}) => /* @__PURE__ */ r(
|
|
28
|
+
C,
|
|
28
29
|
{
|
|
29
|
-
...
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
...k,
|
|
31
|
+
loading: o,
|
|
32
|
+
size: c,
|
|
33
|
+
icon: s,
|
|
34
|
+
title: e,
|
|
33
35
|
description: t ? void 0 : n,
|
|
34
36
|
expanded: t,
|
|
35
37
|
selected: t,
|
|
36
|
-
controls: /* @__PURE__ */
|
|
37
|
-
|
|
38
|
+
controls: !o && /* @__PURE__ */ r(
|
|
39
|
+
M,
|
|
38
40
|
{
|
|
39
|
-
id:
|
|
40
|
-
type:
|
|
41
|
-
favourite:
|
|
42
|
-
favouriteLabel:
|
|
43
|
-
badge:
|
|
44
|
-
isCurrentEndUser:
|
|
45
|
-
isDeleted:
|
|
46
|
-
onToggleFavourite:
|
|
47
|
-
contextMenu: t ? void 0 :
|
|
41
|
+
id: i,
|
|
42
|
+
type: m,
|
|
43
|
+
favourite: I,
|
|
44
|
+
favouriteLabel: l,
|
|
45
|
+
badge: f,
|
|
46
|
+
isCurrentEndUser: p,
|
|
47
|
+
isDeleted: u,
|
|
48
|
+
onToggleFavourite: L,
|
|
49
|
+
contextMenu: t ? void 0 : v
|
|
48
50
|
}
|
|
49
51
|
),
|
|
50
|
-
linkIcon: !0,
|
|
51
|
-
interactive:
|
|
52
|
-
children:
|
|
52
|
+
linkIcon: !o && !0,
|
|
53
|
+
interactive: j,
|
|
54
|
+
children: A
|
|
53
55
|
}
|
|
54
56
|
);
|
|
55
57
|
export {
|
|
56
|
-
|
|
58
|
+
B as AccountListItem
|
|
57
59
|
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as
|
|
3
|
-
import { isValidElement as
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { c as m } from "../../index-L8X2o7IH.js";
|
|
3
|
+
import { isValidElement as n } from "react";
|
|
4
4
|
import { isIconProps as c, Icon as o } from "../Icon/Icon.js";
|
|
5
5
|
import { isAvatarProps as i, Avatar as _ } from "../Avatar/Avatar.js";
|
|
6
6
|
import { isAvatarGroupProps as l, AvatarGroup as f } from "../Avatar/AvatarGroup.js";
|
|
7
7
|
import "../RootProvider/RootProvider.js";
|
|
8
8
|
import "../Snackbar/useSnackbar.js";
|
|
9
|
-
import '../../assets/ButtonIcon.css';const v = "
|
|
9
|
+
import '../../assets/ButtonIcon.css';const v = "_wrapper_1y1r9_1", u = "_icon_1y1r9_8", y = "_avatar_1y1r9_31", G = "_avatarGroup_1y1r9_35", t = {
|
|
10
10
|
wrapper: v,
|
|
11
11
|
icon: u,
|
|
12
|
-
avatar:
|
|
13
|
-
avatarGroup:
|
|
12
|
+
avatar: y,
|
|
13
|
+
avatarGroup: G
|
|
14
14
|
};
|
|
15
|
-
function
|
|
16
|
-
return typeof
|
|
15
|
+
function N(r) {
|
|
16
|
+
return typeof r == "string" || typeof r == "number" || typeof r == "boolean" || r === null || n(r);
|
|
17
17
|
}
|
|
18
|
-
const E = ({ icon:
|
|
18
|
+
const E = ({ icon: r, size: s, iconAltText: p, className: e }) => /* @__PURE__ */ a("span", { className: m(t.wrapper, e), "data-size": s, "aria-label": p, children: i(r) && /* @__PURE__ */ a(_, { ...r, className: t.avatar }) || l(r) && /* @__PURE__ */ a(f, { ...r, className: t.avatarGroup }) || c(r) && /* @__PURE__ */ a(o, { ...r, className: t.icon }) || N(r) && r || /* @__PURE__ */ a(o, { svgElement: r, className: t.icon }) });
|
|
19
19
|
export {
|
|
20
20
|
E as ButtonIcon
|
|
21
21
|
};
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { jsxs as y, jsx as f } from "react/jsx-runtime";
|
|
3
3
|
import { c as I } from "../../index-L8X2o7IH.js";
|
|
4
4
|
import m, { forwardRef as w, useRef as O, useMemo as k } from "react";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { useClickOutside as E } from "../../hooks/useClickOutside.js";
|
|
6
|
+
import { useEnterKey as _ } from "../../hooks/useEnterKey.js";
|
|
7
|
+
import { IconButton as C } from "../Button/IconButton.js";
|
|
8
8
|
import { DropdownBase as M } from "../Dropdown/DropdownBase.js";
|
|
9
9
|
import { MenuItems as j } from "../Menu/MenuItems.js";
|
|
10
10
|
import { useRootContext as R } from "../RootProvider/RootProvider.js";
|
|
@@ -38,7 +38,7 @@ const A = w((e, s) => {
|
|
|
38
38
|
items: i
|
|
39
39
|
}) => {
|
|
40
40
|
const { currentId: v, toggleId: p, closeAll: a } = R(), d = O(null), g = "context-menu-" + e, x = () => p(e), u = v === e;
|
|
41
|
-
|
|
41
|
+
E(d, () => {
|
|
42
42
|
u && p(e);
|
|
43
43
|
});
|
|
44
44
|
const b = k(() => i.map((n) => ({
|
|
@@ -49,7 +49,7 @@ const A = w((e, s) => {
|
|
|
49
49
|
(c = n.onClick) == null || c.call(n), a();
|
|
50
50
|
}
|
|
51
51
|
})), [i, a]);
|
|
52
|
-
|
|
52
|
+
_((n) => {
|
|
53
53
|
var c;
|
|
54
54
|
if (u) {
|
|
55
55
|
n.preventDefault();
|
|
@@ -63,7 +63,7 @@ const A = w((e, s) => {
|
|
|
63
63
|
};
|
|
64
64
|
return /* @__PURE__ */ y("div", { className: I(S.toggle, o), ref: d, "data-testid": g, children: [
|
|
65
65
|
/* @__PURE__ */ f(
|
|
66
|
-
|
|
66
|
+
C,
|
|
67
67
|
{
|
|
68
68
|
size: "xs",
|
|
69
69
|
rounded: !0,
|
|
@@ -6,24 +6,24 @@ import "../RootProvider/RootProvider.js";
|
|
|
6
6
|
import "../Snackbar/useSnackbar.js";
|
|
7
7
|
import { MenuItem as m } from "../Menu/MenuItem.js";
|
|
8
8
|
import { u as c } from "../../useId-BVFxCjkq.js";
|
|
9
|
-
var d = function(t,
|
|
9
|
+
var d = function(t, l) {
|
|
10
10
|
var r = {};
|
|
11
|
-
for (var e in t) Object.prototype.hasOwnProperty.call(t, e) &&
|
|
11
|
+
for (var e in t) Object.prototype.hasOwnProperty.call(t, e) && l.indexOf(e) < 0 && (r[e] = t[e]);
|
|
12
12
|
if (t != null && typeof Object.getOwnPropertySymbols == "function")
|
|
13
|
-
for (var
|
|
14
|
-
|
|
13
|
+
for (var o = 0, e = Object.getOwnPropertySymbols(t); o < e.length; o++)
|
|
14
|
+
l.indexOf(e[o]) < 0 && Object.prototype.propertyIsEnumerable.call(t, e[o]) && (r[e[o]] = t[e[o]]);
|
|
15
15
|
return r;
|
|
16
16
|
};
|
|
17
|
-
const p = f((t,
|
|
18
|
-
var { title: r, titleId: e } = t,
|
|
17
|
+
const p = f((t, l) => {
|
|
18
|
+
var { title: r, titleId: e } = t, o = d(t, ["title", "titleId"]);
|
|
19
19
|
let n = c();
|
|
20
20
|
return n = r ? e || "title-" + n : void 0, i.createElement(
|
|
21
21
|
"svg",
|
|
22
|
-
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:
|
|
22
|
+
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: l, "aria-labelledby": n }, o),
|
|
23
23
|
r ? i.createElement("title", { id: n }, r) : null,
|
|
24
|
-
i.createElement("path", { fill: "currentColor", d: "
|
|
24
|
+
i.createElement("path", { fill: "currentColor", d: "M9.03 5.03a.75.75 0 1 0-1.06-1.06l-4.5 4.5a.75.75 0 0 0 0 1.06l4.5 4.5a.75.75 0 1 0 1.06-1.06L5.81 9.75H16a4.25 4.25 0 0 1 0 8.5h-1.5a.75.75 0 0 0 0 1.5H16a5.75 5.75 0 0 0 0-11.5H5.81z" })
|
|
25
25
|
);
|
|
26
|
-
}),
|
|
26
|
+
}), v = ({ label: t, onClick: l, as: r }) => /* @__PURE__ */ a(m, { size: "sm", id: "back", icon: p, title: t, onClick: l, as: r });
|
|
27
27
|
export {
|
|
28
|
-
|
|
28
|
+
v as BackButton
|
|
29
29
|
};
|
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
import { jsxs as r, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { c as
|
|
2
|
+
import { c as _ } from "../../index-L8X2o7IH.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import { Badge as
|
|
5
|
-
import { ButtonBase as
|
|
6
|
-
import { ButtonLabel as
|
|
4
|
+
import { Badge as d } from "../Badge/Badge.js";
|
|
5
|
+
import { ButtonBase as I } from "../Button/ButtonBase.js";
|
|
6
|
+
import { ButtonLabel as f } from "../Button/ButtonLabel.js";
|
|
7
7
|
import { ButtonIcon as p } from "../Button/ButtonIcon.js";
|
|
8
8
|
import "../RootProvider/RootProvider.js";
|
|
9
9
|
import "../Snackbar/useSnackbar.js";
|
|
10
|
-
import { S as
|
|
10
|
+
import { S as v } from "../../XMark-tKk6aExO.js";
|
|
11
11
|
import { S as N } from "../../PadlockLocked-XL1IB5Ae.js";
|
|
12
|
-
import '../../assets/GlobalMenuButton.css';const b = "
|
|
12
|
+
import '../../assets/GlobalMenuButton.css';const b = "_button_234vz_1", h = "_loginIcon_234vz_19", B = "_closeIcon_234vz_20", z = "_avatar_234vz_21", u = "_badge_234vz_37", a = {
|
|
13
13
|
button: b,
|
|
14
14
|
loginIcon: h,
|
|
15
15
|
closeIcon: B,
|
|
16
|
-
avatar:
|
|
17
|
-
badge:
|
|
18
|
-
},
|
|
16
|
+
avatar: z,
|
|
17
|
+
badge: u
|
|
18
|
+
}, w = ({
|
|
19
19
|
className: t,
|
|
20
|
-
as:
|
|
21
|
-
color:
|
|
22
|
-
variant:
|
|
20
|
+
as: c = "button",
|
|
21
|
+
color: i = "accent",
|
|
22
|
+
variant: e = "solid",
|
|
23
23
|
currentAccount: s,
|
|
24
24
|
expanded: g,
|
|
25
|
-
label:
|
|
25
|
+
label: l = "Menu",
|
|
26
26
|
badge: n,
|
|
27
|
-
...
|
|
28
|
-
}) => g ? /* @__PURE__ */ r(
|
|
29
|
-
/* @__PURE__ */ o(
|
|
30
|
-
/* @__PURE__ */ o(p, { className: a.closeIcon, icon: /* @__PURE__ */ o(
|
|
31
|
-
n && /* @__PURE__ */ o(
|
|
32
|
-
] }) : s ? /* @__PURE__ */ r(
|
|
33
|
-
/* @__PURE__ */ o(
|
|
27
|
+
...m
|
|
28
|
+
}) => g ? /* @__PURE__ */ r(I, { ...m, as: c, variant: e, color: i, className: _(a.button, t), children: [
|
|
29
|
+
/* @__PURE__ */ o(f, { children: l }),
|
|
30
|
+
/* @__PURE__ */ o(p, { className: a.closeIcon, icon: /* @__PURE__ */ o(v, { className: a.icon, "aria-label": "Close Icon" }) }),
|
|
31
|
+
n && /* @__PURE__ */ o(d, { ...n, className: a.badge })
|
|
32
|
+
] }) : s ? /* @__PURE__ */ r(I, { ...m, as: c, variant: e, color: i, className: _(a.button, t), children: [
|
|
33
|
+
/* @__PURE__ */ o(f, { children: l }),
|
|
34
34
|
/* @__PURE__ */ o(p, { className: a.avatar, icon: s == null ? void 0 : s.icon }),
|
|
35
|
-
n && /* @__PURE__ */ o(
|
|
36
|
-
] }) : /* @__PURE__ */ r(
|
|
37
|
-
/* @__PURE__ */ o(
|
|
35
|
+
n && /* @__PURE__ */ o(d, { ...n, className: a.badge })
|
|
36
|
+
] }) : /* @__PURE__ */ r(I, { ...m, as: c, variant: e, color: i, className: _(a.button, t), children: [
|
|
37
|
+
/* @__PURE__ */ o(f, { children: l }),
|
|
38
38
|
/* @__PURE__ */ o(
|
|
39
39
|
p,
|
|
40
40
|
{
|
|
@@ -42,8 +42,8 @@ import '../../assets/GlobalMenuButton.css';const b = "_button_af7mx_1", h = "_lo
|
|
|
42
42
|
icon: /* @__PURE__ */ o(N, { className: a.icon, "aria-label": "Login Icon" })
|
|
43
43
|
}
|
|
44
44
|
),
|
|
45
|
-
n && /* @__PURE__ */ o(
|
|
45
|
+
n && /* @__PURE__ */ o(d, { ...n, className: a.badge })
|
|
46
46
|
] });
|
|
47
47
|
export {
|
|
48
|
-
|
|
48
|
+
w as GlobalMenuButton
|
|
49
49
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as d } from "react/jsx-runtime";
|
|
2
2
|
import { c as n } from "../../index-L8X2o7IH.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import { Skeleton as
|
|
4
|
+
import { Skeleton as h } from "../Skeleton/Skeleton.js";
|
|
5
5
|
import "../RootProvider/RootProvider.js";
|
|
6
6
|
import "../Snackbar/useSnackbar.js";
|
|
7
|
-
import '../../assets/Icon.css';const
|
|
8
|
-
icon:
|
|
9
|
-
shape:
|
|
10
|
-
svg:
|
|
11
|
-
image:
|
|
12
|
-
},
|
|
7
|
+
import '../../assets/Icon.css';const _ = "_icon_1y3dz_1", g = "_shape_1y3dz_9", v = "_svg_1y3dz_14", N = "_image_1y3dz_15", a = {
|
|
8
|
+
icon: _,
|
|
9
|
+
shape: g,
|
|
10
|
+
svg: v,
|
|
11
|
+
image: N
|
|
12
|
+
}, b = (s) => typeof s == "object" && s !== null && ("svgElement" in s || "iconUrl" in s), I = ({
|
|
13
13
|
loading: s,
|
|
14
14
|
altText: t,
|
|
15
15
|
svgElement: r,
|
|
@@ -19,14 +19,14 @@ import '../../assets/Icon.css';const d = "_icon_2h14f_1", f = "_shape_2h14f_9",
|
|
|
19
19
|
iconUrl: p,
|
|
20
20
|
className: c,
|
|
21
21
|
style: l
|
|
22
|
-
}) => r ? /* @__PURE__ */ e("span", { "data-size": i, "data-color": o, "data-theme": m, className: n(a.icon, c), style: l, children: /* @__PURE__ */ h
|
|
22
|
+
}) => r ? /* @__PURE__ */ e("span", { "data-size": i, "data-color": o, "data-theme": m, className: n(a.icon, c), style: l, children: /* @__PURE__ */ d(h, { loading: s, variant: "circle", className: a.shape, children: [
|
|
23
23
|
/* @__PURE__ */ e("span", { className: a.shape }),
|
|
24
24
|
/* @__PURE__ */ e(r, { "aria-hidden": "true", "alt-label": t, className: a.svg })
|
|
25
|
-
] }) }) : p ? /* @__PURE__ */ e("span", { "data-size": i, "data-color": o, "data-theme": m, className: n(a.icon, c), style: l, children: /* @__PURE__ */ h
|
|
25
|
+
] }) }) : p ? /* @__PURE__ */ e("span", { "data-size": i, "data-color": o, "data-theme": m, className: n(a.icon, c), style: l, children: /* @__PURE__ */ d(h, { loading: s, variant: "circle", className: a.shape, children: [
|
|
26
26
|
/* @__PURE__ */ e("span", { className: a.shape }),
|
|
27
27
|
/* @__PURE__ */ e("img", { src: p, alt: t, className: a.image })
|
|
28
28
|
] }) }) : /* @__PURE__ */ e("span", { className: n(a.icon, c) });
|
|
29
29
|
export {
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
I as Icon,
|
|
31
|
+
b as isIconProps
|
|
32
32
|
};
|
|
@@ -3,49 +3,49 @@ import "../../index-L8X2o7IH.js";
|
|
|
3
3
|
import "react";
|
|
4
4
|
import { Badge as p } from "../Badge/Badge.js";
|
|
5
5
|
import "../RootProvider/RootProvider.js";
|
|
6
|
-
import { MenuItem as
|
|
6
|
+
import { MenuItem as u } from "./MenuItem.js";
|
|
7
7
|
import "../Snackbar/useSnackbar.js";
|
|
8
|
-
import { S as
|
|
9
|
-
import '../../assets/MenuOption.css';const
|
|
10
|
-
label:
|
|
8
|
+
import { S as x } from "../../Checkmark-Byz_C9x4.js";
|
|
9
|
+
import '../../assets/MenuOption.css';const y = "_label_16xuy_1", k = "_title_16xuy_13", v = "_radio_16xuy_19", I = "_checkbox_16xuy_20", M = "_icon_16xuy_53", a = {
|
|
10
|
+
label: y,
|
|
11
11
|
title: k,
|
|
12
|
-
radio:
|
|
13
|
-
checkbox:
|
|
14
|
-
icon:
|
|
15
|
-
},
|
|
12
|
+
radio: v,
|
|
13
|
+
checkbox: I,
|
|
14
|
+
icon: M
|
|
15
|
+
}, F = ({
|
|
16
16
|
size: o = "md",
|
|
17
|
-
type:
|
|
18
|
-
name:
|
|
17
|
+
type: _,
|
|
18
|
+
name: j,
|
|
19
19
|
active: n,
|
|
20
|
-
value:
|
|
20
|
+
value: S,
|
|
21
21
|
label: c,
|
|
22
|
-
title:
|
|
23
|
-
description:
|
|
24
|
-
icon:
|
|
22
|
+
title: h,
|
|
23
|
+
description: b,
|
|
24
|
+
icon: N,
|
|
25
25
|
badge: s,
|
|
26
26
|
checked: t = !1,
|
|
27
27
|
disabled: r,
|
|
28
|
-
onMouseEnter:
|
|
28
|
+
onMouseEnter: w,
|
|
29
29
|
onClick: i,
|
|
30
30
|
role: l,
|
|
31
31
|
...m
|
|
32
32
|
}) => {
|
|
33
|
-
const
|
|
34
|
-
switch (
|
|
33
|
+
const f = () => {
|
|
34
|
+
switch (_) {
|
|
35
35
|
case "checkbox":
|
|
36
36
|
return /* @__PURE__ */ d("span", { className: a.label, children: [
|
|
37
|
-
/* @__PURE__ */ e("span", { className: a.checkbox, "data-checked": t, children: /* @__PURE__ */ e(
|
|
37
|
+
/* @__PURE__ */ e("span", { className: a.checkbox, "data-checked": t, children: /* @__PURE__ */ e(x, { className: a.icon, "aria-hidden": !0 }) }),
|
|
38
38
|
/* @__PURE__ */ e("span", { className: a.title, children: c })
|
|
39
39
|
] });
|
|
40
40
|
case "radio":
|
|
41
41
|
return /* @__PURE__ */ d("span", { className: a.label, children: [
|
|
42
|
-
/* @__PURE__ */ e("span", { className: a.radio, "data-checked": t, children: /* @__PURE__ */ e(
|
|
42
|
+
/* @__PURE__ */ e("span", { className: a.radio, "data-checked": t, children: /* @__PURE__ */ e(x, { className: a.icon, "aria-hidden": !0 }) }),
|
|
43
43
|
/* @__PURE__ */ e("span", { className: a.title, children: c })
|
|
44
44
|
] });
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
47
|
return c ? /* @__PURE__ */ e(
|
|
48
|
-
|
|
48
|
+
u,
|
|
49
49
|
{
|
|
50
50
|
disabled: r,
|
|
51
51
|
selected: t,
|
|
@@ -55,12 +55,12 @@ import '../../assets/MenuOption.css';const w = "_label_zw85f_1", k = "_title_zw8
|
|
|
55
55
|
tabIndex: -1,
|
|
56
56
|
onClick: i,
|
|
57
57
|
role: l,
|
|
58
|
-
label: /* @__PURE__ */ e(
|
|
58
|
+
label: /* @__PURE__ */ e(f, {}),
|
|
59
59
|
controls: s && /* @__PURE__ */ e(p, { ...s }),
|
|
60
60
|
...m
|
|
61
61
|
}
|
|
62
62
|
) : /* @__PURE__ */ e(
|
|
63
|
-
|
|
63
|
+
u,
|
|
64
64
|
{
|
|
65
65
|
disabled: r,
|
|
66
66
|
selected: t,
|
|
@@ -70,14 +70,14 @@ import '../../assets/MenuOption.css';const w = "_label_zw85f_1", k = "_title_zw8
|
|
|
70
70
|
tabIndex: -1,
|
|
71
71
|
onClick: i,
|
|
72
72
|
role: l,
|
|
73
|
-
icon:
|
|
74
|
-
title:
|
|
75
|
-
description:
|
|
73
|
+
icon: N,
|
|
74
|
+
title: h,
|
|
75
|
+
description: b,
|
|
76
76
|
controls: s && /* @__PURE__ */ e(p, { ...s }),
|
|
77
77
|
...m
|
|
78
78
|
}
|
|
79
79
|
);
|
|
80
80
|
};
|
|
81
81
|
export {
|
|
82
|
-
|
|
82
|
+
F as MenuOption
|
|
83
83
|
};
|
|
@@ -1,38 +1,37 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import { Fragment as s } from "react";
|
|
1
|
+
import { jsx as t, jsxs as o } from "react/jsx-runtime";
|
|
2
|
+
import { Fragment as s, createElement as f } from "react";
|
|
3
3
|
import "../../index-L8X2o7IH.js";
|
|
4
|
-
import {
|
|
4
|
+
import { useMenu as h } from "../../hooks/useMenu.js";
|
|
5
|
+
import { Heading as g } from "../Typography/Heading.js";
|
|
5
6
|
import "../RootProvider/RootProvider.js";
|
|
6
|
-
import { Divider as
|
|
7
|
-
import { List as
|
|
7
|
+
import { Divider as y } from "../Divider/Divider.js";
|
|
8
|
+
import { List as S } from "../List/List.js";
|
|
8
9
|
import "../Snackbar/useSnackbar.js";
|
|
9
|
-
import { Flex as
|
|
10
|
-
import { SettingsSection as
|
|
11
|
-
import { SettingsItem as
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
/* @__PURE__ */ t(p, { ...e })
|
|
34
|
-
] }, e.id)) }) });
|
|
10
|
+
import { Flex as v } from "../Page/Flex.js";
|
|
11
|
+
import { SettingsSection as j } from "./SettingsSection.js";
|
|
12
|
+
import { SettingsItem as k } from "./SettingsItem.js";
|
|
13
|
+
const q = ({ items: n, groups: p = {}, sortGroupBy: c }) => {
|
|
14
|
+
const { menu: r } = h({
|
|
15
|
+
items: n,
|
|
16
|
+
groups: p,
|
|
17
|
+
groupByKey: "groupId",
|
|
18
|
+
keyboardEvents: !1,
|
|
19
|
+
sortGroupBy: c
|
|
20
|
+
});
|
|
21
|
+
return /* @__PURE__ */ t(v, { as: "div", spacing: "page", direction: "col", children: r == null ? void 0 : r.map((i, l) => {
|
|
22
|
+
const e = i.props || {};
|
|
23
|
+
return /* @__PURE__ */ o(s, { children: [
|
|
24
|
+
(e == null ? void 0 : e.title) && /* @__PURE__ */ t(g, { size: "lg", children: e.title }),
|
|
25
|
+
/* @__PURE__ */ t(j, { children: /* @__PURE__ */ t(S, { size: "sm", children: i == null ? void 0 : i.items.map((a, m) => {
|
|
26
|
+
const d = a.props || {};
|
|
27
|
+
return /* @__PURE__ */ o(s, { children: [
|
|
28
|
+
m > 0 && /* @__PURE__ */ t(y, {}),
|
|
29
|
+
/* @__PURE__ */ f(k, { ...d, key: "settings-list-item" + m })
|
|
30
|
+
] }, m);
|
|
31
|
+
}) }) })
|
|
32
|
+
] }, l);
|
|
33
|
+
}) });
|
|
35
34
|
};
|
|
36
35
|
export {
|
|
37
|
-
|
|
36
|
+
q as SettingsList
|
|
38
37
|
};
|
|
@@ -6,7 +6,8 @@ export interface AccountListGroupProps {
|
|
|
6
6
|
export interface AccountListProps {
|
|
7
7
|
items: AccountListItemProps[];
|
|
8
8
|
groups?: Record<string, AccountListGroupProps>;
|
|
9
|
+
sortGroupBy?: (a: [string, AccountListItemProps[]], b: [string, AccountListItemProps[]]) => number;
|
|
9
10
|
emptyTitle?: string;
|
|
10
11
|
emptyDescription?: string;
|
|
11
12
|
}
|
|
12
|
-
export declare const AccountList: ({ items, groups, emptyTitle, emptyDescription, }: AccountListProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const AccountList: ({ items, groups, sortGroupBy, emptyTitle, emptyDescription, }: AccountListProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,13 +3,14 @@ import { AccountListItemProps, AccountListProps } from '..';
|
|
|
3
3
|
import { UseAccountsProps } from '../../../examples';
|
|
4
4
|
declare const meta: {
|
|
5
5
|
title: string;
|
|
6
|
-
component: ({ items, groups, emptyTitle, emptyDescription, }: AccountListProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
component: ({ items, groups, sortGroupBy, emptyTitle, emptyDescription, }: AccountListProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
tags: string[];
|
|
8
8
|
parameters: {};
|
|
9
9
|
args: AccountListProps;
|
|
10
10
|
};
|
|
11
11
|
export default meta;
|
|
12
12
|
export declare const Default: ({ includeGroups }: UseAccountsProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const Loading: () => import("react/jsx-runtime").JSX.Element;
|
|
13
14
|
interface ControlledProps {
|
|
14
15
|
includeGroups?: boolean;
|
|
15
16
|
contextMenu?: boolean;
|
|
@@ -16,4 +16,4 @@ export interface AccountListItemProps extends ListItemProps, AccountListItemCont
|
|
|
16
16
|
contextMenu?: ContextMenuProps;
|
|
17
17
|
label?: string;
|
|
18
18
|
}
|
|
19
|
-
export declare const AccountListItem: ({ id, type, size, expanded, icon, title, description, isCurrentEndUser, isDeleted, badge, favourite, favouriteLabel, onToggleFavourite, contextMenu, children, interactive, ...item }: AccountListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare const AccountListItem: ({ id, type, size, expanded, icon, title, description, isCurrentEndUser, isDeleted, badge, favourite, favouriteLabel, onToggleFavourite, contextMenu, children, interactive, loading, ...item }: AccountListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,7 +2,7 @@ import { StoryObj } from '@storybook/react-vite';
|
|
|
2
2
|
import { AccountListItemProps } from '..';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: ({ id, type, size, expanded, icon, title, description, isCurrentEndUser, isDeleted, badge, favourite, favouriteLabel, onToggleFavourite, contextMenu, children, interactive, ...item }: AccountListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
component: ({ id, type, size, expanded, icon, title, description, isCurrentEndUser, isDeleted, badge, favourite, favouriteLabel, onToggleFavourite, contextMenu, children, interactive, loading, ...item }: AccountListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
tags: string[];
|
|
7
7
|
parameters: {};
|
|
8
8
|
args: {
|
|
@@ -5,5 +5,6 @@ export interface SettingsGroupProps {
|
|
|
5
5
|
export interface SettingsListProps {
|
|
6
6
|
items: SettingsItemProps[];
|
|
7
7
|
groups?: Record<string, SettingsGroupProps>;
|
|
8
|
+
sortGroupBy?: (a: [string, SettingsItemProps[]], b: [string, SettingsItemProps[]]) => number;
|
|
8
9
|
}
|
|
9
|
-
export declare const SettingsList: ({ items, groups }: SettingsListProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const SettingsList: ({ items, groups, sortGroupBy }: SettingsListProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -30,7 +30,7 @@ interface LocaleSettingsModal extends SettingsModalProps {
|
|
|
30
30
|
value?: string;
|
|
31
31
|
}
|
|
32
32
|
export declare const LocaleSettingsModal: ({ open, onClose, value, onChange, }: LocaleSettingsModal) => import("react/jsx-runtime").JSX.Element;
|
|
33
|
-
export declare const
|
|
33
|
+
export declare const AllSettings: ({ query, groups, includeGroups, excludeGroups, }: UseSettingsProps) => import("react/jsx-runtime").JSX.Element;
|
|
34
34
|
export declare const AlertSettings: () => import("react/jsx-runtime").JSX.Element;
|
|
35
35
|
export declare const AccountSettings: () => import("react/jsx-runtime").JSX.Element;
|
|
36
36
|
export declare const PersonSettings: () => import("react/jsx-runtime").JSX.Element;
|