@llmnative/react 1.10.3 → 1.11.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/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +53 -49
- package/dist/index.mjs.map +1 -1
- package/dist/types/src/components/blocks/SideNav.d.ts +18 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3109,10 +3109,7 @@ var Tr = new dr(), Q = ({ name: e, size: n = 16, className: r, style: i, provide
|
|
|
3109
3109
|
}), r);
|
|
3110
3110
|
return /* @__PURE__ */ t.createElement(Z, { className: u }, c, /* @__PURE__ */ t.createElement("span", {
|
|
3111
3111
|
title: s ? a : void 0,
|
|
3112
|
-
style: s ? {
|
|
3113
|
-
cursor: "not-allowed",
|
|
3114
|
-
display: "inline-flex"
|
|
3115
|
-
} : void 0
|
|
3112
|
+
style: s ? { cursor: "not-allowed" } : void 0
|
|
3116
3113
|
}, /* @__PURE__ */ t.createElement(Zn, { badge: i }, v)), l);
|
|
3117
3114
|
}, Ur = ({ label: e = void 0, before: n = void 0, after: r = void 0, wrapperClassName: i = void 0, className: a = void 0 }) => {
|
|
3118
3115
|
let o = S(), s = Y("button"), c = Fn("common");
|
|
@@ -13798,39 +13795,46 @@ function zf({ group: e, expanded: n, openItems: r, showIcons: i, onToggle: a })
|
|
|
13798
13795
|
onToggle: a
|
|
13799
13796
|
}))));
|
|
13800
13797
|
}
|
|
13801
|
-
function Bf({ menuKey: e, items: n, defaultCollapsed: r = !1,
|
|
13802
|
-
let { pathname:
|
|
13798
|
+
function Bf({ menuKey: e, items: n, defaultCollapsed: r = !1, collapsed: i, onCollapsedChange: a, showIcons: o = !0, showCollapseButton: c = !0, footer: u, header: d, embedded: f = !1 }) {
|
|
13799
|
+
let { pathname: p } = x(), g = Y("sideNav"), _ = Uh(e ?? ""), v = n ?? (e ? Nf(_) : []), y = i !== void 0, [b, S] = h(r), C = i === void 0 ? b : i, w = s((e) => {
|
|
13800
|
+
let t = typeof e == "function" ? e(C) : e;
|
|
13801
|
+
y ? a?.(t) : S(t);
|
|
13802
|
+
}, [
|
|
13803
|
+
y,
|
|
13804
|
+
C,
|
|
13805
|
+
a
|
|
13806
|
+
]), [T, E] = h(!1), [D, O] = h(/* @__PURE__ */ new Set()), k = m(null), A = !C || T;
|
|
13803
13807
|
l(() => {
|
|
13804
|
-
|
|
13808
|
+
O((e) => {
|
|
13805
13809
|
let t = new Set(e);
|
|
13806
|
-
return
|
|
13807
|
-
e.children?.some((e) => Pf(
|
|
13810
|
+
return v.forEach((e) => {
|
|
13811
|
+
e.children?.some((e) => Pf(p, e.path, e.end)) && t.add(e.path);
|
|
13808
13812
|
}), t;
|
|
13809
13813
|
});
|
|
13810
|
-
}, [
|
|
13811
|
-
let
|
|
13812
|
-
|
|
13814
|
+
}, [p]);
|
|
13815
|
+
let j = s((e) => {
|
|
13816
|
+
O((t) => {
|
|
13813
13817
|
let n = new Set(t);
|
|
13814
13818
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
13815
13819
|
});
|
|
13816
|
-
}, []),
|
|
13817
|
-
|
|
13818
|
-
},
|
|
13819
|
-
|
|
13820
|
+
}, []), M = () => {
|
|
13821
|
+
C && (k.current && clearTimeout(k.current), E(!0));
|
|
13822
|
+
}, N = () => {
|
|
13823
|
+
C && (k.current = setTimeout(() => E(!1), 80));
|
|
13820
13824
|
};
|
|
13821
|
-
if (
|
|
13822
|
-
let
|
|
13823
|
-
return
|
|
13825
|
+
if (v.length === 0) return null;
|
|
13826
|
+
let P = Ff(v);
|
|
13827
|
+
return f ? /* @__PURE__ */ t.createElement("nav", { className: X("px-1.5 py-2", g.SideNav.navClassName) }, P.map((e) => /* @__PURE__ */ t.createElement(zf, {
|
|
13824
13828
|
key: e.key,
|
|
13825
13829
|
group: e,
|
|
13826
13830
|
expanded: !0,
|
|
13827
|
-
openItems:
|
|
13828
|
-
showIcons:
|
|
13829
|
-
onToggle:
|
|
13831
|
+
openItems: D,
|
|
13832
|
+
showIcons: o,
|
|
13833
|
+
onToggle: j
|
|
13830
13834
|
}))) : /* @__PURE__ */ t.createElement("div", {
|
|
13831
|
-
className: X("min-h-0",
|
|
13835
|
+
className: X("min-h-0", g.SideNav.wrapperClassName),
|
|
13832
13836
|
style: {
|
|
13833
|
-
width:
|
|
13837
|
+
width: C ? Mf : jf,
|
|
13834
13838
|
height: "100%",
|
|
13835
13839
|
transition: "width 220ms cubic-bezier(0.4,0,0.2,1)",
|
|
13836
13840
|
flexShrink: 0,
|
|
@@ -13838,51 +13842,51 @@ function Bf({ menuKey: e, items: n, defaultCollapsed: r = !1, showIcons: i = !0,
|
|
|
13838
13842
|
}
|
|
13839
13843
|
}, /* @__PURE__ */ t.createElement("aside", {
|
|
13840
13844
|
style: {
|
|
13841
|
-
width:
|
|
13845
|
+
width: A ? jf : Mf,
|
|
13842
13846
|
transition: "width 220ms cubic-bezier(0.4,0,0.2,1)",
|
|
13843
|
-
position:
|
|
13847
|
+
position: C ? "absolute" : "sticky",
|
|
13844
13848
|
top: 0,
|
|
13845
|
-
zIndex:
|
|
13846
|
-
boxShadow:
|
|
13849
|
+
zIndex: C && T ? 50 : 10,
|
|
13850
|
+
boxShadow: C && T ? "4px 0 24px rgba(0,0,0,0.10)" : "none",
|
|
13847
13851
|
height: "100%",
|
|
13848
13852
|
overflowX: "hidden",
|
|
13849
13853
|
overflowY: "hidden"
|
|
13850
13854
|
},
|
|
13851
|
-
className: X("flex min-h-0 flex-col border-r bg-background",
|
|
13852
|
-
onMouseEnter:
|
|
13853
|
-
onMouseLeave:
|
|
13854
|
-
},
|
|
13855
|
-
className: X("flex h-14 shrink-0 items-center border-b px-1.5",
|
|
13855
|
+
className: X("flex min-h-0 flex-col border-r bg-background", g.SideNav.shellClassName, C && T && g.SideNav.overlayClassName),
|
|
13856
|
+
onMouseEnter: M,
|
|
13857
|
+
onMouseLeave: N
|
|
13858
|
+
}, d && /* @__PURE__ */ t.createElement("div", {
|
|
13859
|
+
className: X("flex h-14 shrink-0 items-center border-b px-1.5", g.SideNav.headerClassName),
|
|
13856
13860
|
style: {
|
|
13857
|
-
opacity: +!!
|
|
13858
|
-
maxWidth:
|
|
13861
|
+
opacity: +!!A,
|
|
13862
|
+
maxWidth: A ? "100%" : "0px",
|
|
13859
13863
|
overflow: "hidden",
|
|
13860
13864
|
transition: "opacity 150ms ease, max-width 200ms ease"
|
|
13861
13865
|
}
|
|
13862
|
-
}, /* @__PURE__ */ t.createElement("div", { className: "min-w-0 flex-1" },
|
|
13866
|
+
}, /* @__PURE__ */ t.createElement("div", { className: "min-w-0 flex-1" }, d)), /* @__PURE__ */ t.createElement("nav", { className: X("min-h-0 flex-1 overflow-y-auto overflow-x-hidden px-1.5 py-2", g.SideNav.navClassName) }, P.map((e) => /* @__PURE__ */ t.createElement(zf, {
|
|
13863
13867
|
key: e.key,
|
|
13864
13868
|
group: e,
|
|
13865
|
-
expanded:
|
|
13866
|
-
openItems:
|
|
13867
|
-
showIcons:
|
|
13868
|
-
onToggle:
|
|
13869
|
-
}))), (
|
|
13869
|
+
expanded: A,
|
|
13870
|
+
openItems: D,
|
|
13871
|
+
showIcons: o,
|
|
13872
|
+
onToggle: j
|
|
13873
|
+
}))), (c || u) && /* @__PURE__ */ t.createElement("div", { className: X("shrink-0 border-t px-1.5 py-2 flex items-center gap-1", g.SideNav.footerClassName) }, c && /* @__PURE__ */ t.createElement("button", {
|
|
13870
13874
|
onClick: () => {
|
|
13871
|
-
|
|
13875
|
+
w((e) => !e), E(!1);
|
|
13872
13876
|
},
|
|
13873
|
-
title:
|
|
13874
|
-
className: X("shrink-0 flex items-center justify-center rounded-md w-8 h-8 transition-colors text-muted-foreground hover:text-foreground hover:bg-accent",
|
|
13877
|
+
title: C ? "Expand sidebar" : "Collapse sidebar",
|
|
13878
|
+
className: X("shrink-0 flex items-center justify-center rounded-md w-8 h-8 transition-colors text-muted-foreground hover:text-foreground hover:bg-accent", g.SideNav.collapseButtonClassName)
|
|
13875
13879
|
}, /* @__PURE__ */ t.createElement(Q, {
|
|
13876
|
-
name:
|
|
13880
|
+
name: C ? "chevrons-right" : "chevrons-left",
|
|
13877
13881
|
size: 16
|
|
13878
|
-
})),
|
|
13882
|
+
})), u && /* @__PURE__ */ t.createElement("div", { style: {
|
|
13879
13883
|
flex: 1,
|
|
13880
13884
|
minWidth: 0,
|
|
13881
|
-
opacity: +!!
|
|
13882
|
-
maxWidth:
|
|
13885
|
+
opacity: +!!A,
|
|
13886
|
+
maxWidth: A ? "100%" : "0px",
|
|
13883
13887
|
overflow: "hidden",
|
|
13884
13888
|
transition: "opacity 150ms ease, max-width 200ms ease"
|
|
13885
|
-
} },
|
|
13889
|
+
} }, u))));
|
|
13886
13890
|
}
|
|
13887
13891
|
//#endregion
|
|
13888
13892
|
//#region src/components/widgets/grid-core/useGridDBRecords.ts
|