@nice2dev/ui 1.3.17 → 1.3.18
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/CHANGELOG.md +71 -0
- package/README.md +2 -2
- package/dist/{NiceDataGrid-aNPAHsWy.cjs → NiceDataGrid-CFibAGHt.cjs} +1 -1
- package/dist/NiceForm-ChRj4r3f.cjs +1 -0
- package/dist/{NiceMention-CMqAGvO0.cjs → NiceMention-DNx3d9L7.cjs} +1 -1
- package/dist/NiceModuleLifecyclePanel-D8Q081R6.cjs +1 -0
- package/dist/{NiceSavedQueryPanel-JHrSlHAV.cjs → NiceSavedQueryPanel-BuRAgrBk.cjs} +1 -1
- package/dist/{NiceScheduler-2TwOZq-y.cjs → NiceScheduler-DAoo1eyo.cjs} +1 -1
- package/dist/{core-lazy-Cda-D35m.cjs → core-lazy-DohJQ33c.cjs} +1 -1
- package/dist/data/treeDragSession.mjs +52 -46
- package/dist/data.cjs +1 -1
- package/dist/editors/inputs/NiceAutocomplete.mjs +44 -46
- package/dist/editors/pickers/NiceDateTimePicker.mjs +1 -1
- package/dist/editors.cjs +1 -1
- package/dist/index.cjs +113 -113
- package/dist/index.d.ts +111 -21
- package/dist/index.mjs +364 -359
- package/dist/navigation/NiceIconRail.mjs +74 -53
- package/dist/navigation/NiceNavShell.mjs +855 -807
- package/dist/navigation/NiceSetupWizard.mjs +287 -278
- package/dist/navigation/NiceSidebarNav.mjs +1487 -1144
- package/dist/navigation/navItemDrag.mjs +42 -0
- package/dist/navigation/navShellPane.mjs +16 -11
- package/dist/navigation/sidebarNavTypes.mjs +1 -0
- package/dist/navigation/sidebarSearch.mjs +28 -0
- package/dist/navigation.cjs +1 -1
- package/dist/navigation.d.ts +63 -21
- package/dist/style.css +2 -2
- package/package.json +4 -4
- package/dist/NiceForm-BtRBLffD.cjs +0 -1
- package/dist/NiceModuleLifecyclePanel-ugNtHimh.cjs +0 -1
|
@@ -1,69 +1,90 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useNiceTranslation as
|
|
3
|
-
import { useRef as
|
|
1
|
+
import { jsx as i, jsxs as t, Fragment as v } from "react/jsx-runtime";
|
|
2
|
+
import { useNiceTranslation as R, useNiceAccessMode as x, useRovingFocus as y } from "@nice2dev/ui-core";
|
|
3
|
+
import { useRef as u } from "react";
|
|
4
|
+
import { createPortal as M } from "react-dom";
|
|
5
|
+
import { NiceContextMenu as j } from "./NiceContextMenu.mjs";
|
|
4
6
|
/* empty css */
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
onSelect:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
function C({
|
|
8
|
+
item: e,
|
|
9
|
+
active: n,
|
|
10
|
+
inert: a,
|
|
11
|
+
onSelect: o
|
|
12
|
+
}) {
|
|
13
|
+
const l = u(null);
|
|
14
|
+
return /* @__PURE__ */ t(v, { children: [
|
|
15
|
+
/* @__PURE__ */ t(
|
|
16
|
+
"button",
|
|
17
|
+
{
|
|
18
|
+
ref: l,
|
|
19
|
+
type: "button",
|
|
20
|
+
className: `nice-icon-rail__item${n ? " nice-icon-rail__item--active" : ""}`,
|
|
21
|
+
title: e.title ?? e.label,
|
|
22
|
+
"aria-current": n ? "page" : void 0,
|
|
23
|
+
"aria-haspopup": e.menu?.length ? "menu" : void 0,
|
|
24
|
+
disabled: a || e.disabled,
|
|
25
|
+
onClick: () => {
|
|
26
|
+
e.onClick?.(), o?.(e);
|
|
27
|
+
},
|
|
28
|
+
children: [
|
|
29
|
+
/* @__PURE__ */ t("span", { className: "nice-icon-rail__icon", "aria-hidden": "true", children: [
|
|
30
|
+
e.icon,
|
|
31
|
+
e.badge !== void 0 && e.badge !== "" && /* @__PURE__ */ i("span", { className: "nice-icon-rail__badge", children: e.badge })
|
|
32
|
+
] }),
|
|
33
|
+
/* @__PURE__ */ i("span", { className: "nice-icon-rail__label", children: e.label })
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
),
|
|
37
|
+
!!e.menu?.length && !a && typeof document < "u" && M(/* @__PURE__ */ i(j, { target: l, items: e.menu, size: "sm" }), document.body)
|
|
38
|
+
] });
|
|
39
|
+
}
|
|
40
|
+
const S = [], I = ({
|
|
41
|
+
items: e = S,
|
|
42
|
+
orientation: n = "vertical",
|
|
43
|
+
activeId: a,
|
|
44
|
+
onSelect: o,
|
|
45
|
+
"aria-label": l,
|
|
46
|
+
size: m = "md",
|
|
47
|
+
className: b,
|
|
13
48
|
style: p,
|
|
14
|
-
id:
|
|
15
|
-
title:
|
|
16
|
-
accessMode:
|
|
17
|
-
"data-testid":
|
|
49
|
+
id: s,
|
|
50
|
+
title: f,
|
|
51
|
+
accessMode: _,
|
|
52
|
+
"data-testid": h
|
|
18
53
|
}) => {
|
|
19
|
-
const { t:
|
|
20
|
-
if (
|
|
54
|
+
const { t: g } = R(), c = x(_, s), d = u(null);
|
|
55
|
+
if (y(d, { orientation: n, itemSelector: ".nice-icon-rail__item" }), c === "hidden")
|
|
21
56
|
return null;
|
|
22
|
-
const
|
|
23
|
-
return /* @__PURE__ */
|
|
57
|
+
const N = c === "disabled" || c === "readOnly";
|
|
58
|
+
return /* @__PURE__ */ i(
|
|
24
59
|
"div",
|
|
25
60
|
{
|
|
26
|
-
ref:
|
|
27
|
-
id:
|
|
28
|
-
title:
|
|
29
|
-
"data-testid":
|
|
61
|
+
ref: d,
|
|
62
|
+
id: s,
|
|
63
|
+
title: f,
|
|
64
|
+
"data-testid": h,
|
|
30
65
|
role: "toolbar",
|
|
31
|
-
"aria-orientation":
|
|
32
|
-
"aria-label":
|
|
66
|
+
"aria-orientation": n,
|
|
67
|
+
"aria-label": l ?? g("iconRail.label", "Shortcuts"),
|
|
33
68
|
className: [
|
|
34
69
|
"nice-icon-rail",
|
|
35
|
-
`nice-icon-rail--${
|
|
36
|
-
`nice-icon-rail--${
|
|
37
|
-
|
|
70
|
+
`nice-icon-rail--${n}`,
|
|
71
|
+
`nice-icon-rail--${m}`,
|
|
72
|
+
b ?? ""
|
|
38
73
|
].filter(Boolean).join(" "),
|
|
39
74
|
style: p,
|
|
40
|
-
children:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
onClick: () => {
|
|
51
|
-
i.onClick?.(), d?.(i);
|
|
52
|
-
},
|
|
53
|
-
children: [
|
|
54
|
-
/* @__PURE__ */ r("span", { className: "nice-icon-rail__icon", "aria-hidden": "true", children: [
|
|
55
|
-
i.icon,
|
|
56
|
-
i.badge !== void 0 && i.badge !== "" && /* @__PURE__ */ n("span", { className: "nice-icon-rail__badge", children: i.badge })
|
|
57
|
-
] }),
|
|
58
|
-
/* @__PURE__ */ n("span", { className: "nice-icon-rail__label", children: i.label })
|
|
59
|
-
]
|
|
60
|
-
},
|
|
61
|
-
i.id
|
|
62
|
-
);
|
|
63
|
-
})
|
|
75
|
+
children: e.map((r) => /* @__PURE__ */ i(
|
|
76
|
+
C,
|
|
77
|
+
{
|
|
78
|
+
item: r,
|
|
79
|
+
active: r.id === a,
|
|
80
|
+
inert: N,
|
|
81
|
+
onSelect: o
|
|
82
|
+
},
|
|
83
|
+
r.id
|
|
84
|
+
))
|
|
64
85
|
}
|
|
65
86
|
);
|
|
66
87
|
};
|
|
67
88
|
export {
|
|
68
|
-
|
|
89
|
+
I as NiceIconRail
|
|
69
90
|
};
|