@altinn/altinn-components 0.26.1 → 0.27.1
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/FieldsetLegend-Dwb3U0vQ.js +10 -0
- package/dist/Input-B_w6SBmg.js +12 -0
- package/dist/Label-DjSEhgyW.js +11 -0
- package/dist/Paragraph-CFjOkbXa.js +11 -0
- package/dist/Textarea-BBstVlPT.js +10 -0
- package/dist/altinn-ds-overrides.css +2 -2
- package/dist/altinn-ds.css +47 -101
- package/dist/assets/Button.css +1 -1
- package/dist/assets/ButtonBase.css +1 -1
- package/dist/assets/ButtonIcon.css +1 -1
- package/dist/assets/ButtonLabel.css +1 -1
- package/dist/assets/ComboButton.css +1 -1
- package/dist/assets/IconButton.css +1 -1
- package/dist/assets/ListItemHeader.css +1 -1
- package/dist/assets/MenuItemLabel.css +1 -1
- package/dist/components/Bookmarks/EditableBookmark.js +31 -30
- package/dist/components/Button/Button.js +41 -43
- package/dist/components/Button/ButtonBase.js +28 -26
- package/dist/components/Button/ButtonIcon.js +3 -3
- package/dist/components/Button/ButtonLabel.js +3 -3
- package/dist/components/Button/ComboButton.js +30 -28
- package/dist/components/Button/IconButton.js +24 -25
- package/dist/components/ContextMenu/ContextMenu.js +5 -6
- package/dist/components/Dialog/DialogActions.js +22 -21
- package/dist/components/Dialog/DialogListItem.js +65 -62
- package/dist/components/DsComponents/index.js +23 -21
- package/dist/components/Forms/Checkbox.js +16 -0
- package/dist/components/Forms/CheckboxOptions.js +12 -0
- package/dist/components/Forms/Field.js +6 -0
- package/dist/components/Forms/FieldBase.js +17 -0
- package/dist/components/Forms/Fieldset.js +28 -0
- package/dist/components/Forms/FieldsetBase.js +15 -0
- package/dist/components/Forms/Input.js +14 -0
- package/dist/components/Forms/Label.js +6 -0
- package/dist/components/Forms/Legend.js +14 -0
- package/dist/components/Forms/OptionsBase.js +18 -0
- package/dist/components/Forms/Radio.js +16 -0
- package/dist/components/Forms/RadioOptions.js +12 -0
- package/dist/components/Forms/Select.js +25 -0
- package/dist/components/Forms/SelectField.js +12 -0
- package/dist/components/Forms/Switch.js +16 -0
- package/dist/components/Forms/SwitchOptions.js +12 -0
- package/dist/components/Forms/TextField.js +12 -0
- package/dist/components/Forms/Textarea.js +6 -0
- package/dist/components/Forms/TextareaField.js +12 -0
- package/dist/components/Forms/index.js +40 -0
- package/dist/components/GlobalMenu/AccountMenu.js +2 -2
- package/dist/components/GlobalMenu/GlobalMenu.js +72 -65
- package/dist/components/List/ListItem.js +15 -13
- package/dist/components/List/ListItemBase.js +18 -16
- package/dist/components/List/ListItemHeader.js +30 -30
- package/dist/components/Menu/Menu.js +42 -38
- package/dist/components/Menu/MenuItemLabel.js +10 -10
- package/dist/components/Menu/MenuItemsVirtual.js +28 -27
- package/dist/components/Page/DashboardCard.js +10 -9
- package/dist/components/Page/PageDetails.js +1 -1
- package/dist/components/Page/PageNav.js +6 -6
- package/dist/components/Toolbar/ToolbarButton.js +23 -21
- package/dist/components/Toolbar/ToolbarFilter.js +27 -26
- package/dist/components/index.js +147 -113
- package/dist/{floating-ui.react-BQwG1HOM.js → floating-ui.react-DpzNAs2N.js} +26 -31
- package/dist/{index-DcykCrjD.js → index-B7UjMwQm.js} +13 -12
- package/dist/index-Bq6w9CqA.js +81 -0
- package/dist/index.js +177 -143
- package/dist/lite-1fxw3LjI.js +7 -0
- package/dist/tokens/README.md +1 -1
- package/dist/tokens/altinn-ds.css +48 -102
- package/dist/tokens/design-tokens-build/altinn-ds.css +48 -102
- package/dist/types/fields.js +1 -0
- package/dist/types/lib/components/Bookmarks/BookmarksSection.stories.d.ts +0 -1
- package/dist/types/lib/components/Button/Button.d.ts +1 -2
- package/dist/types/lib/components/Button/Button.stories.d.ts +5 -1
- package/dist/types/lib/components/Button/ButtonBase.d.ts +3 -2
- package/dist/types/lib/components/Button/ComboButton.d.ts +1 -1
- package/dist/types/lib/components/Dialog/DialogActions.d.ts +2 -1
- package/dist/types/lib/components/Dialog/DialogActions.stories.d.ts +1 -1
- package/dist/types/lib/components/Dialog/DialogListItem.d.ts +1 -1
- package/dist/types/lib/components/Forms/Checkbox.d.ts +7 -0
- package/dist/types/lib/components/Forms/Checkbox.stories.d.ts +15 -0
- package/dist/types/lib/components/Forms/CheckboxOptions.d.ts +5 -0
- package/dist/types/lib/components/Forms/CheckboxOptions.stories.d.ts +18 -0
- package/dist/types/lib/components/Forms/Field.d.ts +7 -0
- package/dist/types/lib/components/Forms/FieldBase.d.ts +8 -0
- package/dist/types/lib/components/Forms/Fieldset.d.ts +7 -0
- package/dist/types/lib/components/Forms/FieldsetBase.d.ts +8 -0
- package/dist/types/lib/components/Forms/Forms.stories.d.ts +7 -0
- package/dist/types/lib/components/Forms/Input.d.ts +10 -0
- package/dist/types/lib/components/Forms/Label.d.ts +7 -0
- package/dist/types/lib/components/Forms/Legend.d.ts +7 -0
- package/dist/types/lib/components/Forms/OptionsBase.d.ts +9 -0
- package/dist/types/lib/components/Forms/Radio.d.ts +7 -0
- package/dist/types/lib/components/Forms/Radio.stories.d.ts +15 -0
- package/dist/types/lib/components/Forms/RadioOptions.d.ts +6 -0
- package/dist/types/lib/components/Forms/RadioOptions.stories.d.ts +18 -0
- package/dist/types/lib/components/Forms/Select.d.ts +9 -0
- package/dist/types/lib/components/Forms/SelectField.d.ts +8 -0
- package/dist/types/lib/components/Forms/SelectField.stories.d.ts +14 -0
- package/dist/types/lib/components/Forms/Switch.d.ts +7 -0
- package/dist/types/lib/components/Forms/Switch.stories.d.ts +15 -0
- package/dist/types/lib/components/Forms/SwitchOptions.d.ts +6 -0
- package/dist/types/lib/components/Forms/SwitchOptions.stories.d.ts +18 -0
- package/dist/types/lib/components/Forms/TextField.d.ts +6 -0
- package/dist/types/lib/components/Forms/TextField.stories.d.ts +15 -0
- package/dist/types/lib/components/Forms/Textarea.d.ts +7 -0
- package/dist/types/lib/components/Forms/TextareaField.d.ts +6 -0
- package/dist/types/lib/components/Forms/TextareaField.stories.d.ts +15 -0
- package/dist/types/lib/components/Forms/index.d.ts +19 -0
- package/dist/types/lib/components/GlobalMenu/AccountMenu.d.ts +4 -2
- package/dist/types/lib/components/GlobalMenu/AccountMenu.stories.d.ts +3 -2
- package/dist/types/lib/components/GlobalMenu/GlobalMenu.d.ts +1 -1
- package/dist/types/lib/components/GlobalMenu/GlobalMenu.stories.d.ts +3 -2
- package/dist/types/lib/components/Header/Header.stories.d.ts +1 -0
- package/dist/types/lib/components/List/ListItem.d.ts +1 -1
- package/dist/types/lib/components/List/ListItem.stories.d.ts +1 -1
- package/dist/types/lib/components/List/ListItemBase.d.ts +3 -1
- package/dist/types/lib/components/List/Specimens.stories.d.ts +1 -1
- package/dist/types/lib/components/Menu/Examples.stories.d.ts +6 -6
- package/dist/types/lib/components/Menu/Menu.d.ts +3 -3
- package/dist/types/lib/components/Menu/Menu.stories.d.ts +1 -1
- package/dist/types/lib/components/Menu/MenuItems.d.ts +4 -0
- package/dist/types/lib/components/Menu/MenuItemsVirtual.d.ts +5 -1
- package/dist/types/lib/components/Page/DashboardHeader.stories.d.ts +12 -0
- package/dist/types/lib/components/Page/{Patterns.stories.d.ts → Examples.stories.d.ts} +2 -0
- package/dist/types/lib/components/Toolbar/ToolbarButton.d.ts +2 -1
- package/dist/types/lib/components/Toolbar/ToolbarButton.stories.d.ts +1 -1
- package/dist/types/lib/components/index.d.ts +1 -1
- package/dist/types/lib/types/fields.d.ts +2 -0
- package/dist/usePagination-B4GfH2GQ.js +1026 -0
- package/package.json +1 -1
- package/dist/assets/FieldBase.css +0 -1
- package/dist/assets/InputBase.css +0 -1
- package/dist/components/TextField/FieldBase.js +0 -16
- package/dist/components/TextField/InputBase.js +0 -33
- package/dist/components/TextField/TextField.js +0 -7
- package/dist/components/TextField/index.js +0 -8
- package/dist/types/lib/components/Button/Buttons.stories.d.ts +0 -18
- package/dist/types/lib/components/TextField/FieldBase.d.ts +0 -11
- package/dist/types/lib/components/TextField/InputBase.d.ts +0 -14
- package/dist/types/lib/components/TextField/TextField.d.ts +0 -7
- package/dist/types/lib/components/TextField/index.d.ts +0 -3
- package/dist/usePagination-BJD-uxk9.js +0 -1098
|
@@ -14,7 +14,7 @@ import "../Snackbar/useSnackbar.js";
|
|
|
14
14
|
import { S as O } from "../../ChevronUp-H8Nuww4h.js";
|
|
15
15
|
import { S as P } from "../../ChevronDown-CRAwzuD3.js";
|
|
16
16
|
import { S as Q } from "../../ChevronRight-DUaHaWi-.js";
|
|
17
|
-
import '../../assets/ListItemHeader.css';const W = "
|
|
17
|
+
import '../../assets/ListItemHeader.css';const W = "_wrapper_e1z23_1", X = "_link_e1z23_5", Y = "_linkTitle_e1z23_10", Z = "_header_e1z23_16", $ = "_content_e1z23_54", t = {
|
|
18
18
|
wrapper: W,
|
|
19
19
|
link: X,
|
|
20
20
|
linkTitle: Y,
|
|
@@ -27,22 +27,22 @@ import '../../assets/ListItemHeader.css';const W = "_wrapper_1c93s_1", X = "_lin
|
|
|
27
27
|
theme: v,
|
|
28
28
|
loading: r,
|
|
29
29
|
disabled: k,
|
|
30
|
-
collapsible:
|
|
31
|
-
linkIcon:
|
|
32
|
-
expanded:
|
|
33
|
-
select:
|
|
34
|
-
href:
|
|
35
|
-
onClick:
|
|
36
|
-
onKeyPress:
|
|
37
|
-
tabIndex:
|
|
38
|
-
size:
|
|
39
|
-
title:
|
|
40
|
-
description:
|
|
41
|
-
icon:
|
|
30
|
+
collapsible: z,
|
|
31
|
+
linkIcon: L,
|
|
32
|
+
expanded: S,
|
|
33
|
+
select: l,
|
|
34
|
+
href: u,
|
|
35
|
+
onClick: x,
|
|
36
|
+
onKeyPress: N,
|
|
37
|
+
tabIndex: w,
|
|
38
|
+
size: s = "sm",
|
|
39
|
+
title: a,
|
|
40
|
+
description: b,
|
|
41
|
+
icon: y,
|
|
42
42
|
avatar: C,
|
|
43
|
-
active:
|
|
43
|
+
active: c,
|
|
44
44
|
avatarGroup: T,
|
|
45
|
-
badge:
|
|
45
|
+
badge: i,
|
|
46
46
|
controls: p,
|
|
47
47
|
className: j,
|
|
48
48
|
children: B,
|
|
@@ -55,7 +55,7 @@ import '../../assets/ListItemHeader.css';const W = "_wrapper_1c93s_1", X = "_lin
|
|
|
55
55
|
md: "lg",
|
|
56
56
|
lg: "lg",
|
|
57
57
|
xl: "xl"
|
|
58
|
-
}, d =
|
|
58
|
+
}, d = z ? S ? O : P : L ? Q : void 0, o = D[s], F = () => i && !r && typeof i == "object" && "label" in i ? /* @__PURE__ */ e(V, { ...i }) : R(i) ? i : null, h = M();
|
|
59
59
|
return /* @__PURE__ */ e("div", { className: t.wrapper, children: /* @__PURE__ */ n(
|
|
60
60
|
"header",
|
|
61
61
|
{
|
|
@@ -63,8 +63,8 @@ import '../../assets/ListItemHeader.css';const W = "_wrapper_1c93s_1", X = "_lin
|
|
|
63
63
|
"data-color": I,
|
|
64
64
|
"data-theme": v,
|
|
65
65
|
"data-interactive": m,
|
|
66
|
-
"data-size":
|
|
67
|
-
"data-has-active-child":
|
|
66
|
+
"data-size": s,
|
|
67
|
+
"data-has-active-child": c,
|
|
68
68
|
children: [
|
|
69
69
|
/* @__PURE__ */ e(
|
|
70
70
|
q,
|
|
@@ -72,25 +72,25 @@ import '../../assets/ListItemHeader.css';const W = "_wrapper_1c93s_1", X = "_lin
|
|
|
72
72
|
interactive: m,
|
|
73
73
|
className: f(t.link),
|
|
74
74
|
as: _,
|
|
75
|
-
href:
|
|
76
|
-
onClick:
|
|
77
|
-
onKeyPress:
|
|
78
|
-
tabIndex:
|
|
75
|
+
href: u,
|
|
76
|
+
onClick: x,
|
|
77
|
+
onKeyPress: N,
|
|
78
|
+
tabIndex: w,
|
|
79
79
|
loading: r,
|
|
80
80
|
disabled: k || r,
|
|
81
|
-
active:
|
|
81
|
+
active: c,
|
|
82
82
|
describedby: h,
|
|
83
|
-
children: /* @__PURE__ */ e("span", { className: t.linkTitle, children: E ||
|
|
83
|
+
children: /* @__PURE__ */ e("span", { className: t.linkTitle, children: E || a })
|
|
84
84
|
}
|
|
85
85
|
),
|
|
86
|
-
/* @__PURE__ */ n("div", { className: t.content, "data-size":
|
|
87
|
-
|
|
86
|
+
/* @__PURE__ */ n("div", { className: t.content, "data-size": s, children: [
|
|
87
|
+
l && /* @__PURE__ */ e(K, { ...l, className: t.select, size: o }),
|
|
88
88
|
/* @__PURE__ */ e(
|
|
89
89
|
G,
|
|
90
90
|
{
|
|
91
91
|
loading: r,
|
|
92
92
|
size: o,
|
|
93
|
-
icon:
|
|
93
|
+
icon: y,
|
|
94
94
|
avatar: C,
|
|
95
95
|
avatarGroup: T
|
|
96
96
|
}
|
|
@@ -98,10 +98,10 @@ import '../../assets/ListItemHeader.css';const W = "_wrapper_1c93s_1", X = "_lin
|
|
|
98
98
|
/* @__PURE__ */ e(
|
|
99
99
|
A,
|
|
100
100
|
{
|
|
101
|
-
size:
|
|
101
|
+
size: s,
|
|
102
102
|
loading: r,
|
|
103
|
-
title:
|
|
104
|
-
description:
|
|
103
|
+
title: a,
|
|
104
|
+
description: b,
|
|
105
105
|
id: h,
|
|
106
106
|
titleAs: g,
|
|
107
107
|
children: B
|
|
@@ -1,41 +1,45 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { MenuBase as
|
|
3
|
-
import { MenuItems as
|
|
4
|
-
import { MenuItemsVirtual as
|
|
5
|
-
const
|
|
6
|
-
color:
|
|
7
|
-
theme:
|
|
8
|
-
defaultItemColor:
|
|
9
|
-
defaultItemTheme:
|
|
10
|
-
defaultItemSize:
|
|
11
|
-
defaultIconTheme:
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { MenuBase as R } from "./MenuBase.js";
|
|
3
|
+
import { MenuItems as B } from "./MenuItems.js";
|
|
4
|
+
import { MenuItemsVirtual as S } from "./MenuItemsVirtual.js";
|
|
5
|
+
const w = ({
|
|
6
|
+
color: i,
|
|
7
|
+
theme: n,
|
|
8
|
+
defaultItemColor: p,
|
|
9
|
+
defaultItemTheme: M,
|
|
10
|
+
defaultItemSize: c,
|
|
11
|
+
defaultIconTheme: f,
|
|
12
12
|
groups: s,
|
|
13
|
-
items:
|
|
14
|
-
search:
|
|
15
|
-
|
|
16
|
-
}) =>
|
|
17
|
-
|
|
18
|
-
{
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
13
|
+
items: x = [],
|
|
14
|
+
search: y,
|
|
15
|
+
menuItemsVirtual: r
|
|
16
|
+
}) => {
|
|
17
|
+
const { isVirtualized: j } = r || {};
|
|
18
|
+
return j ? /* @__PURE__ */ o(R, { color: i, theme: n, children: /* @__PURE__ */ o(
|
|
19
|
+
S,
|
|
20
|
+
{
|
|
21
|
+
search: y,
|
|
22
|
+
items: x,
|
|
23
|
+
groups: s,
|
|
24
|
+
defaultItemSize: c,
|
|
25
|
+
defaultItemColor: p,
|
|
26
|
+
defaultItemTheme: M,
|
|
27
|
+
defaultIconTheme: f,
|
|
28
|
+
scrollRefStyles: r == null ? void 0 : r.scrollRefStyles
|
|
29
|
+
}
|
|
30
|
+
) }) : /* @__PURE__ */ o(R, { color: i, theme: n, children: /* @__PURE__ */ o(
|
|
31
|
+
B,
|
|
32
|
+
{
|
|
33
|
+
search: y,
|
|
34
|
+
items: x,
|
|
35
|
+
groups: s,
|
|
36
|
+
defaultItemSize: c,
|
|
37
|
+
defaultItemColor: p,
|
|
38
|
+
defaultItemTheme: M,
|
|
39
|
+
defaultIconTheme: f
|
|
40
|
+
}
|
|
41
|
+
) });
|
|
42
|
+
};
|
|
39
43
|
export {
|
|
40
|
-
|
|
44
|
+
w as Menu
|
|
41
45
|
};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as e, jsxs as m, Fragment as d } from "react/jsx-runtime";
|
|
2
2
|
import { c as p } from "../../index-L8X2o7IH.js";
|
|
3
|
-
import '../../assets/MenuItemLabel.css';const _ = "
|
|
3
|
+
import '../../assets/MenuItemLabel.css';const _ = "_label_10xs5_1", x = "_title_10xs5_19", b = "_description_10xs5_42", s = {
|
|
4
4
|
label: _,
|
|
5
|
-
title:
|
|
5
|
+
title: x,
|
|
6
6
|
description: b
|
|
7
|
-
},
|
|
7
|
+
}, u = ({
|
|
8
8
|
className: l,
|
|
9
|
-
size:
|
|
9
|
+
size: t = "sm",
|
|
10
10
|
label: i,
|
|
11
11
|
title: n,
|
|
12
12
|
weight: c,
|
|
13
13
|
description: o,
|
|
14
14
|
children: a
|
|
15
15
|
}) => {
|
|
16
|
-
const r = c ||
|
|
17
|
-
return /* @__PURE__ */
|
|
18
|
-
/* @__PURE__ */
|
|
19
|
-
/* @__PURE__ */
|
|
16
|
+
const r = c || t === "lg" ? "medium" : "normal";
|
|
17
|
+
return /* @__PURE__ */ e("span", { className: p(s.label, l), "data-size": t, children: a || /* @__PURE__ */ m(d, { children: [
|
|
18
|
+
/* @__PURE__ */ e("strong", { className: s.title, "data-size": t, "data-weight": r, children: n || i }),
|
|
19
|
+
/* @__PURE__ */ e("span", { className: s.description, "data-size": t, children: o })
|
|
20
20
|
] }) });
|
|
21
21
|
};
|
|
22
22
|
export {
|
|
23
|
-
|
|
23
|
+
u as MenuItemLabel
|
|
24
24
|
};
|
|
@@ -1,42 +1,43 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as v, jsx as i } from "react/jsx-runtime";
|
|
3
|
-
import { u as
|
|
4
|
-
import { useRef as
|
|
3
|
+
import { u as b } from "../../index-DyDqjche.js";
|
|
4
|
+
import { useRef as R, useEffect as T } from "react";
|
|
5
5
|
import "../../index-L8X2o7IH.js";
|
|
6
|
-
import { useMenu as
|
|
6
|
+
import { useMenu as V } from "../../hooks/useMenu.js";
|
|
7
7
|
import "../RootProvider/RootProvider.js";
|
|
8
|
-
import { MenuItem as
|
|
9
|
-
import { MenuSearch as
|
|
10
|
-
import { MenuHeader as
|
|
11
|
-
import { MenuList as
|
|
8
|
+
import { MenuItem as $ } from "./MenuItem.js";
|
|
9
|
+
import { MenuSearch as j } from "./MenuSearch.js";
|
|
10
|
+
import { MenuHeader as k } from "./MenuHeader.js";
|
|
11
|
+
import { MenuList as N, MenuListItem as g } from "./MenuBase.js";
|
|
12
12
|
import "../Search/AutocompleteBase.js";
|
|
13
13
|
import "../Snackbar/useSnackbar.js";
|
|
14
|
-
import '../../assets/MenuItemsVirtual.css';const
|
|
15
|
-
virtualScrollRef:
|
|
16
|
-
virtualMenuListItem:
|
|
17
|
-
},
|
|
18
|
-
level:
|
|
14
|
+
import '../../assets/MenuItemsVirtual.css';const q = "_virtualScrollRef_12fdc_1", B = "_virtualMenuListItem_12fdc_6", y = {
|
|
15
|
+
virtualScrollRef: q,
|
|
16
|
+
virtualMenuListItem: B
|
|
17
|
+
}, W = ({
|
|
18
|
+
level: h = 0,
|
|
19
19
|
search: l,
|
|
20
20
|
items: I,
|
|
21
21
|
groups: M = {},
|
|
22
22
|
defaultItemSize: x,
|
|
23
23
|
defaultItemColor: S,
|
|
24
24
|
defaultItemTheme: P,
|
|
25
|
-
defaultIconTheme: L
|
|
25
|
+
defaultIconTheme: L,
|
|
26
|
+
scrollRefStyles: z
|
|
26
27
|
}) => {
|
|
27
|
-
const { menu:
|
|
28
|
+
const { menu: _ } = V({
|
|
28
29
|
items: I,
|
|
29
30
|
groups: M,
|
|
30
31
|
groupByKey: "groupId",
|
|
31
32
|
keyboardEvents: !1
|
|
32
|
-
}), m =
|
|
33
|
+
}), m = R(null), a = _.flatMap((t, e) => {
|
|
33
34
|
var u;
|
|
34
|
-
const
|
|
35
|
+
const E = (t == null ? void 0 : t.props) || {}, { title: c } = E, p = ((u = t == null ? void 0 : t.items) == null ? void 0 : u.filter((r) => {
|
|
35
36
|
var s;
|
|
36
37
|
return !((s = r.props) != null && s.hidden);
|
|
37
38
|
})) || [];
|
|
38
39
|
return [
|
|
39
|
-
...e > 0 ||
|
|
40
|
+
...e > 0 || h > 0 ? [{ type: "separator" }] : [],
|
|
40
41
|
...c ? [{ type: "title", title: c }] : [],
|
|
41
42
|
...p.map((r, s) => {
|
|
42
43
|
var d, f;
|
|
@@ -49,32 +50,32 @@ import '../../assets/MenuItemsVirtual.css';const g = "_virtualScrollRef_12fdc_1"
|
|
|
49
50
|
};
|
|
50
51
|
})
|
|
51
52
|
];
|
|
52
|
-
}), n =
|
|
53
|
+
}), n = b({
|
|
53
54
|
count: a.length,
|
|
54
55
|
gap: 8,
|
|
55
56
|
estimateSize: () => 44,
|
|
56
57
|
getScrollElement: () => m.current
|
|
57
58
|
}), o = n.getVirtualItems();
|
|
58
|
-
return
|
|
59
|
+
return T(() => {
|
|
59
60
|
for (const t of o) {
|
|
60
61
|
const e = document.querySelector(`[data-index="${t.index}"]`);
|
|
61
62
|
e && n.measureElement(e);
|
|
62
63
|
}
|
|
63
|
-
}, [o]), /* @__PURE__ */ v(
|
|
64
|
-
l && /* @__PURE__ */ i(
|
|
65
|
-
/* @__PURE__ */ i("div", { ref: m, className:
|
|
64
|
+
}, [o]), /* @__PURE__ */ v(N, { children: [
|
|
65
|
+
l && /* @__PURE__ */ i(j, { ...l }),
|
|
66
|
+
/* @__PURE__ */ i("div", { ref: m, className: y.virtualScrollRef, style: z, children: /* @__PURE__ */ i("div", { style: { position: "relative", height: `${n.getTotalSize()}px` }, children: o.map((t) => {
|
|
66
67
|
const e = a[t.index];
|
|
67
68
|
return e ? /* @__PURE__ */ v(
|
|
68
|
-
|
|
69
|
+
g,
|
|
69
70
|
{
|
|
70
71
|
dataIndex: t.index,
|
|
71
|
-
className:
|
|
72
|
+
className: y.virtualMenuListItem,
|
|
72
73
|
style: { transform: `translateY(${t.start}px)` },
|
|
73
74
|
role: e.type === "separator" ? "separator" : void 0,
|
|
74
75
|
children: [
|
|
75
|
-
e.type === "title" && /* @__PURE__ */ i(
|
|
76
|
+
e.type === "title" && /* @__PURE__ */ i(k, { title: e.title }),
|
|
76
77
|
e.type === "item" && /* @__PURE__ */ i(
|
|
77
|
-
|
|
78
|
+
$,
|
|
78
79
|
{
|
|
79
80
|
...e.itemProps,
|
|
80
81
|
size: e.itemProps.size || x,
|
|
@@ -93,5 +94,5 @@ import '../../assets/MenuItemsVirtual.css';const g = "_virtualScrollRef_12fdc_1"
|
|
|
93
94
|
] });
|
|
94
95
|
};
|
|
95
96
|
export {
|
|
96
|
-
|
|
97
|
+
W as MenuItemsVirtual
|
|
97
98
|
};
|
|
@@ -8,24 +8,25 @@ import "../RootProvider/RootProvider.js";
|
|
|
8
8
|
import { Heading as S } from "../Typography/Heading.js";
|
|
9
9
|
import "../Search/AutocompleteBase.js";
|
|
10
10
|
import "../Snackbar/useSnackbar.js";
|
|
11
|
-
import { u as b
|
|
12
|
-
import { S as
|
|
11
|
+
import { u as b } from "../../floating-ui.react-DpzNAs2N.js";
|
|
12
|
+
import { S as u } from "../../index-C8BS_2GY.js";
|
|
13
|
+
import { c as h } from "../../lite-1fxw3LjI.js";
|
|
13
14
|
const j = p(function({ asChild: n = !1, variant: r = "default", className: s, ...c }, t) {
|
|
14
|
-
const l = n ?
|
|
15
|
+
const l = n ? u : "div", m = g(null), k = b([m, t]);
|
|
15
16
|
return w(() => {
|
|
16
|
-
const e =
|
|
17
|
+
const e = m.current, f = ({ ctrlKey: x, metaKey: v, target: B }) => {
|
|
17
18
|
const o = e == null ? void 0 : e.querySelector(":is(h1,h2,h3,h4,h5,h6) a");
|
|
18
19
|
!o || o != null && o.contains(B) || (x || v ? window.open(o.href, "", "noreferrer") : o.click());
|
|
19
20
|
};
|
|
20
|
-
return e == null || e.addEventListener("click",
|
|
21
|
-
}, []), i(l, { className:
|
|
21
|
+
return e == null || e.addEventListener("click", f), () => e == null ? void 0 : e.removeEventListener("click", f);
|
|
22
|
+
}, []), i(l, { className: h("ds-card", s), "data-variant": r, ref: k, ...c });
|
|
22
23
|
}), E = p(function({ asChild: n, className: r, ...s }, c) {
|
|
23
|
-
return i(n ?
|
|
24
|
+
return i(n ? u : "div", { className: h("ds-card__block", r), ref: c, ...s });
|
|
24
25
|
}), C = Object.assign(j, {
|
|
25
26
|
Block: E
|
|
26
27
|
});
|
|
27
28
|
C.Block.displayName = "Card.Block";
|
|
28
|
-
function
|
|
29
|
+
function A({
|
|
29
30
|
color: a,
|
|
30
31
|
theme: n = "tinted",
|
|
31
32
|
icon: r,
|
|
@@ -54,5 +55,5 @@ function $({
|
|
|
54
55
|
] });
|
|
55
56
|
}
|
|
56
57
|
export {
|
|
57
|
-
|
|
58
|
+
A as DashboardCard
|
|
58
59
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { D as a, a as i, b as o } from "../../index-
|
|
2
|
+
import { D as a, a as i, b as o } from "../../index-B7UjMwQm.js";
|
|
3
3
|
const n = ({ summary: t, children: s }) => /* @__PURE__ */ r(a, { style: { fontSize: "1.125rem" }, children: [
|
|
4
4
|
/* @__PURE__ */ e(i, { children: t }),
|
|
5
5
|
/* @__PURE__ */ e(o, { children: s })
|
|
@@ -12,17 +12,17 @@ import '../../assets/PageNav.css';const p = "_nav_9bu1z_1", v = "_controls_9bu1z
|
|
|
12
12
|
nav: p,
|
|
13
13
|
controls: v
|
|
14
14
|
}, S = ({
|
|
15
|
-
color:
|
|
16
|
-
padding:
|
|
15
|
+
color: s,
|
|
16
|
+
padding: t,
|
|
17
17
|
breadcrumbs: i,
|
|
18
18
|
backButton: r = {
|
|
19
19
|
as: "a",
|
|
20
20
|
label: "Back"
|
|
21
21
|
},
|
|
22
|
-
controls:
|
|
23
|
-
}) => /* @__PURE__ */ m(a, { as: "nav", direction: "row", align: "center", justify: "between", color:
|
|
24
|
-
i ? /* @__PURE__ */ o(l, { items: i }) : /* @__PURE__ */ o(n, { ...r, variant: "text", icon: c, children: (r == null ? void 0 : r.label) || "Back" }),
|
|
25
|
-
|
|
22
|
+
controls: e
|
|
23
|
+
}) => /* @__PURE__ */ m(a, { as: "nav", direction: "row", align: "center", justify: "between", color: s, padding: t, children: [
|
|
24
|
+
i ? /* @__PURE__ */ o(l, { items: i }) : /* @__PURE__ */ o(n, { ...r, variant: "text", size: "sm", icon: c, children: (r == null ? void 0 : r.label) || "Back" }),
|
|
25
|
+
e && /* @__PURE__ */ o("div", { className: f.controls, children: e })
|
|
26
26
|
] });
|
|
27
27
|
export {
|
|
28
28
|
S as PageNav
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
import { jsx as a } from "react/jsx-runtime";
|
|
3
3
|
import "../../index-L8X2o7IH.js";
|
|
4
4
|
import * as m from "react";
|
|
5
|
-
import { forwardRef as
|
|
5
|
+
import { forwardRef as c } from "react";
|
|
6
6
|
import "../RootProvider/RootProvider.js";
|
|
7
7
|
import "../Search/AutocompleteBase.js";
|
|
8
8
|
import "../Snackbar/useSnackbar.js";
|
|
9
9
|
import { Button as f } from "../Button/Button.js";
|
|
10
|
-
import { ComboButton as
|
|
11
|
-
import { S as
|
|
12
|
-
import { S as
|
|
13
|
-
import { u as
|
|
14
|
-
import '../../assets/ToolbarButton.css';var
|
|
10
|
+
import { ComboButton as p } from "../Button/ComboButton.js";
|
|
11
|
+
import { S as d } from "../../XMark-Bv1I87Ev.js";
|
|
12
|
+
import { S as v } from "../../Plus-B6MBOAcH.js";
|
|
13
|
+
import { u as b } from "../../useId-CsCRkvK3.js";
|
|
14
|
+
import '../../assets/ToolbarButton.css';var w = function(e, n) {
|
|
15
15
|
var r = {};
|
|
16
16
|
for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && n.indexOf(t) < 0 && (r[t] = e[t]);
|
|
17
17
|
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
@@ -19,18 +19,18 @@ import '../../assets/ToolbarButton.css';var b = function(e, n) {
|
|
|
19
19
|
n.indexOf(t[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[o]) && (r[t[o]] = e[t[o]]);
|
|
20
20
|
return r;
|
|
21
21
|
};
|
|
22
|
-
const
|
|
23
|
-
var { title: r, titleId: t } = e, o =
|
|
24
|
-
let l =
|
|
22
|
+
const y = c((e, n) => {
|
|
23
|
+
var { title: r, titleId: t } = e, o = w(e, ["title", "titleId"]);
|
|
24
|
+
let l = b();
|
|
25
25
|
return l = r ? t || "title-" + l : void 0, m.createElement(
|
|
26
26
|
"svg",
|
|
27
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
28
|
r ? m.createElement("title", { id: l }, r) : null,
|
|
29
29
|
m.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M12.53 4.47a.75.75 0 0 0-1.06 0l-3.5 3.5a.75.75 0 0 0 1.06 1.06L12 6.06l2.97 2.97a.75.75 0 1 0 1.06-1.06zm-3.5 10.5a.75.75 0 0 0-1.06 1.06l3.5 3.5a.75.75 0 0 0 1.06 0l3.5-3.5a.75.75 0 1 0-1.06-1.06L12 17.94z", clipRule: "evenodd" })
|
|
30
30
|
);
|
|
31
|
-
}),
|
|
32
|
-
removeButton:
|
|
33
|
-
},
|
|
31
|
+
}), x = "_removeButton_fxc8_1", O = {
|
|
32
|
+
removeButton: x
|
|
33
|
+
}, P = ({
|
|
34
34
|
type: e = "select",
|
|
35
35
|
selected: n = !1,
|
|
36
36
|
removable: r = !1,
|
|
@@ -38,17 +38,19 @@ const w = u((e, n) => {
|
|
|
38
38
|
active: o,
|
|
39
39
|
children: l,
|
|
40
40
|
onToggle: i,
|
|
41
|
-
onRemove: s
|
|
41
|
+
onRemove: s,
|
|
42
|
+
iconAltText: u
|
|
42
43
|
}) => r ? /* @__PURE__ */ a(
|
|
43
|
-
|
|
44
|
+
p,
|
|
44
45
|
{
|
|
45
46
|
className: O.removeButton,
|
|
46
47
|
variant: o ? "solid" : "outline",
|
|
47
|
-
size: "
|
|
48
|
-
icon:
|
|
48
|
+
size: "xs",
|
|
49
|
+
icon: d,
|
|
49
50
|
selected: n,
|
|
50
51
|
onLabelClick: i,
|
|
51
52
|
onIconClick: s,
|
|
53
|
+
iconAltText: u,
|
|
52
54
|
ariaLabel: t || "remove",
|
|
53
55
|
children: l
|
|
54
56
|
}
|
|
@@ -56,8 +58,8 @@ const w = u((e, n) => {
|
|
|
56
58
|
f,
|
|
57
59
|
{
|
|
58
60
|
variant: "dotted",
|
|
59
|
-
size: "
|
|
60
|
-
icon:
|
|
61
|
+
size: "xs",
|
|
62
|
+
icon: v,
|
|
61
63
|
selected: n,
|
|
62
64
|
onClick: i,
|
|
63
65
|
ariaLabel: t || "add",
|
|
@@ -67,8 +69,8 @@ const w = u((e, n) => {
|
|
|
67
69
|
f,
|
|
68
70
|
{
|
|
69
71
|
variant: o ? "solid" : "outline",
|
|
70
|
-
size: "
|
|
71
|
-
icon:
|
|
72
|
+
size: "xs",
|
|
73
|
+
icon: y,
|
|
72
74
|
ariaLabel: t,
|
|
73
75
|
selected: n,
|
|
74
76
|
onClick: i,
|
|
@@ -77,5 +79,5 @@ const w = u((e, n) => {
|
|
|
77
79
|
}
|
|
78
80
|
);
|
|
79
81
|
export {
|
|
80
|
-
|
|
82
|
+
P as ToolbarButton
|
|
81
83
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as B, jsx as
|
|
1
|
+
import { jsxs as B, jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import "../../index-L8X2o7IH.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import { useRootContext as C } from "../RootProvider/RootProvider.js";
|
|
@@ -8,57 +8,58 @@ import "../Snackbar/useSnackbar.js";
|
|
|
8
8
|
import { ToolbarButton as k } from "./ToolbarButton.js";
|
|
9
9
|
import { ToolbarFilterBase as D } from "./ToolbarFilterBase.js";
|
|
10
10
|
import { ToolbarOptions as F } from "./ToolbarOptions.js";
|
|
11
|
-
const I = (
|
|
12
|
-
removable:
|
|
11
|
+
const I = (u, r) => Array.isArray(r) ? r.join(", ") : r, K = ({
|
|
12
|
+
removable: u,
|
|
13
13
|
label: r,
|
|
14
14
|
name: o,
|
|
15
15
|
filterState: n,
|
|
16
|
-
options:
|
|
17
|
-
optionGroups:
|
|
18
|
-
onChange:
|
|
19
|
-
onRemove:
|
|
20
|
-
buttonAltText:
|
|
16
|
+
options: y,
|
|
17
|
+
optionGroups: A,
|
|
18
|
+
onChange: e,
|
|
19
|
+
onRemove: h,
|
|
20
|
+
buttonAltText: t = "Remove button",
|
|
21
21
|
getSelectedLabel: i,
|
|
22
22
|
showResultsLabel: T = "Show results",
|
|
23
|
-
optionType:
|
|
24
|
-
id:
|
|
23
|
+
optionType: v,
|
|
24
|
+
id: d = `toolbar-filter-${o}`
|
|
25
25
|
}) => {
|
|
26
|
-
const { currentId:
|
|
26
|
+
const { currentId: w, toggleId: x, closeAll: b } = C(), f = (y ?? []).map((p) => {
|
|
27
27
|
const c = n == null ? void 0 : n[p.name || o];
|
|
28
28
|
return {
|
|
29
29
|
name: o,
|
|
30
30
|
...p,
|
|
31
31
|
checked: Array.isArray(c) ? c.includes(p.value) : p.value === c
|
|
32
32
|
};
|
|
33
|
-
}), s = n == null ? void 0 : n[o], j = (i == null ? void 0 : i(o, s)) ?? I(o, s),
|
|
34
|
-
return /* @__PURE__ */ B(D, { expanded:
|
|
35
|
-
/* @__PURE__ */
|
|
33
|
+
}), s = n == null ? void 0 : n[o], j = (i == null ? void 0 : i(o, s)) ?? I(o, s), m = () => x(d), a = w === d;
|
|
34
|
+
return /* @__PURE__ */ B(D, { expanded: a, children: [
|
|
35
|
+
/* @__PURE__ */ l(
|
|
36
36
|
k,
|
|
37
37
|
{
|
|
38
38
|
type: "select",
|
|
39
|
-
removable:
|
|
39
|
+
removable: u,
|
|
40
40
|
active: Array.isArray(s) ? s.length > 0 : typeof s < "u",
|
|
41
|
-
onToggle:
|
|
42
|
-
ariaLabel:
|
|
43
|
-
|
|
41
|
+
onToggle: m,
|
|
42
|
+
ariaLabel: t,
|
|
43
|
+
iconAltText: t,
|
|
44
|
+
onRemove: h,
|
|
44
45
|
children: j || r
|
|
45
46
|
}
|
|
46
47
|
),
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
+
/* @__PURE__ */ l(
|
|
48
49
|
O,
|
|
49
50
|
{
|
|
50
|
-
open:
|
|
51
|
+
open: a,
|
|
51
52
|
drawerTitle: r,
|
|
52
|
-
onClose:
|
|
53
|
-
drawerButton: { onClick:
|
|
54
|
-
children: /* @__PURE__ */
|
|
53
|
+
onClose: b,
|
|
54
|
+
drawerButton: { onClick: m, label: T },
|
|
55
|
+
children: /* @__PURE__ */ l(
|
|
55
56
|
F,
|
|
56
57
|
{
|
|
57
58
|
name: o,
|
|
58
59
|
options: f,
|
|
59
|
-
optionGroups:
|
|
60
|
-
onChange:
|
|
61
|
-
optionType:
|
|
60
|
+
optionGroups: A,
|
|
61
|
+
onChange: e,
|
|
62
|
+
optionType: v
|
|
62
63
|
}
|
|
63
64
|
)
|
|
64
65
|
}
|