@llmnative/react 1.18.0 → 1.18.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 +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +32 -30
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -14786,12 +14786,14 @@ var dm = ({ children: e, name: n, onChange: r = void 0, onAdd: i = void 0, onRem
|
|
|
14786
14786
|
content: /* @__PURE__ */ t.createElement("div", { className: mf() }, w)
|
|
14787
14787
|
}));
|
|
14788
14788
|
}, fm = ({ records: e, children: n, limit: r = void 0, page: i = void 0, maxPageButtons: a = void 0, appendTo: o = void 0, before: s = void 0, after: c = void 0, className: u = void 0, wrapperClassName: d = void 0, scrollToTopOnChange: f = void 0, scrollBehavior: m = void 0, align: g = void 0, sticky: _ = void 0 }) => {
|
|
14789
|
-
let v = Y("pagination"), y = Fn("common"), [b, x] = h(i || 1), S
|
|
14789
|
+
let v = Y("pagination"), y = Fn("common"), [b, x] = h(i || 1), [S, C] = h(e.length);
|
|
14790
|
+
e.length !== S && (C(e.length), x(1));
|
|
14791
|
+
let w = r || e.length, T = Math.ceil(e.length / w), E = (b - 1) * w, D = E + w, O = p(() => e.slice(E, D), [
|
|
14790
14792
|
e,
|
|
14791
|
-
|
|
14792
|
-
|
|
14793
|
-
]),
|
|
14794
|
-
e >= 1 && e <=
|
|
14793
|
+
E,
|
|
14794
|
+
D
|
|
14795
|
+
]), k = (e) => {
|
|
14796
|
+
e >= 1 && e <= T && x(e);
|
|
14795
14797
|
};
|
|
14796
14798
|
l(() => {
|
|
14797
14799
|
(f || v.Pagination.scrollToTop) && window.scrollTo({
|
|
@@ -14803,52 +14805,52 @@ var dm = ({ children: e, name: n, onChange: r = void 0, onAdd: i = void 0, onRem
|
|
|
14803
14805
|
f,
|
|
14804
14806
|
m
|
|
14805
14807
|
]);
|
|
14806
|
-
let
|
|
14807
|
-
let e = Math.min(a || v.Pagination.maxItems,
|
|
14808
|
-
return n >
|
|
14808
|
+
let A = p(() => {
|
|
14809
|
+
let e = Math.min(a || v.Pagination.maxItems, T), t = Math.max(1, b - Math.floor(e / 2)), n = t + e - 1;
|
|
14810
|
+
return n > T && (n = T, t = Math.max(1, n - e + 1)), Array.from({ length: n - t + 1 }, (e, n) => t + n);
|
|
14809
14811
|
}, [
|
|
14810
14812
|
b,
|
|
14811
14813
|
a,
|
|
14812
|
-
|
|
14813
|
-
]),
|
|
14814
|
+
T
|
|
14815
|
+
]), M = b === 1 ? "disabled" : "", N = b === T ? "disabled" : "", P = {
|
|
14814
14816
|
start: "justify-start",
|
|
14815
14817
|
center: "justify-center",
|
|
14816
14818
|
end: "justify-end"
|
|
14817
|
-
}[g || v.Pagination.align] || "justify-end",
|
|
14818
|
-
className: (d || v.Pagination.wrapperClassName) + (
|
|
14819
|
-
style:
|
|
14819
|
+
}[g || v.Pagination.align] || "justify-end", F = e.length > w && (_ ?? v.Pagination.sticky), I = /* @__PURE__ */ t.createElement(Z, {
|
|
14820
|
+
className: (d || v.Pagination.wrapperClassName) + (F ? ` ${v.Pagination.stickyClassName}` : ""),
|
|
14821
|
+
style: F ? {
|
|
14820
14822
|
backdropFilter: "blur(10px)",
|
|
14821
14823
|
backgroundColor: "rgba(255, 255, 255, 0.1)"
|
|
14822
14824
|
} : {}
|
|
14823
|
-
}, s, e.length >
|
|
14825
|
+
}, s, e.length > w && /* @__PURE__ */ t.createElement("nav", {
|
|
14824
14826
|
"aria-label": y.pageNavigation,
|
|
14825
|
-
className: `${u || v.Pagination.className} flex w-full ${
|
|
14827
|
+
className: `${u || v.Pagination.className} flex w-full ${P}`
|
|
14826
14828
|
}, /* @__PURE__ */ t.createElement("ul", { className: "flex items-center gap-1" }, /* @__PURE__ */ t.createElement("li", { className: "mr-2" }, /* @__PURE__ */ t.createElement("button", {
|
|
14827
14829
|
type: "button",
|
|
14828
|
-
onClick: () =>
|
|
14829
|
-
disabled:
|
|
14830
|
-
className: X("inline-flex h-9 min-w-[2.25rem] items-center justify-center rounded-md border bg-background px-3 text-sm transition-colors",
|
|
14830
|
+
onClick: () => k(1),
|
|
14831
|
+
disabled: M === "disabled",
|
|
14832
|
+
className: X("inline-flex h-9 min-w-[2.25rem] items-center justify-center rounded-md border bg-background px-3 text-sm transition-colors", M === "disabled" ? "pointer-events-none opacity-40" : "cursor-pointer hover:bg-accent hover:text-accent-foreground")
|
|
14831
14833
|
}, /* @__PURE__ */ t.createElement("span", null, "«"))), /* @__PURE__ */ t.createElement("li", null, /* @__PURE__ */ t.createElement("button", {
|
|
14832
14834
|
type: "button",
|
|
14833
|
-
disabled:
|
|
14834
|
-
className: X("inline-flex h-9 min-w-[2.25rem] items-center justify-center rounded-md border bg-background px-3 text-sm transition-colors",
|
|
14835
|
-
onClick: () =>
|
|
14836
|
-
}, /* @__PURE__ */ t.createElement("span", null, "‹"))),
|
|
14835
|
+
disabled: M === "disabled",
|
|
14836
|
+
className: X("inline-flex h-9 min-w-[2.25rem] items-center justify-center rounded-md border bg-background px-3 text-sm transition-colors", M === "disabled" ? "pointer-events-none opacity-40" : "cursor-pointer hover:bg-accent hover:text-accent-foreground"),
|
|
14837
|
+
onClick: () => k(b - 1)
|
|
14838
|
+
}, /* @__PURE__ */ t.createElement("span", null, "‹"))), A.map((e) => /* @__PURE__ */ t.createElement("li", { key: e }, /* @__PURE__ */ t.createElement("button", {
|
|
14837
14839
|
type: "button",
|
|
14838
|
-
onClick: () =>
|
|
14840
|
+
onClick: () => k(e),
|
|
14839
14841
|
className: X("inline-flex h-9 min-w-[2.25rem] items-center justify-center rounded-md border bg-background px-3 text-sm transition-colors cursor-pointer hover:bg-accent hover:text-accent-foreground", b === e && "border-primary bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground")
|
|
14840
14842
|
}, e))), /* @__PURE__ */ t.createElement("li", { className: "ml-2" }, /* @__PURE__ */ t.createElement("button", {
|
|
14841
14843
|
type: "button",
|
|
14842
|
-
disabled:
|
|
14843
|
-
className: X("inline-flex h-9 min-w-[2.25rem] items-center justify-center rounded-md border bg-background px-3 text-sm transition-colors",
|
|
14844
|
-
onClick: () =>
|
|
14844
|
+
disabled: N === "disabled",
|
|
14845
|
+
className: X("inline-flex h-9 min-w-[2.25rem] items-center justify-center rounded-md border bg-background px-3 text-sm transition-colors", N === "disabled" ? "pointer-events-none opacity-40" : "cursor-pointer hover:bg-accent hover:text-accent-foreground"),
|
|
14846
|
+
onClick: () => k(b + 1)
|
|
14845
14847
|
}, /* @__PURE__ */ t.createElement("span", null, "›"))), /* @__PURE__ */ t.createElement("li", null, /* @__PURE__ */ t.createElement("button", {
|
|
14846
14848
|
type: "button",
|
|
14847
|
-
onClick: () =>
|
|
14848
|
-
disabled:
|
|
14849
|
-
className: X("inline-flex h-9 min-w-[2.25rem] items-center justify-center rounded-md border bg-background px-3 text-sm transition-colors",
|
|
14849
|
+
onClick: () => k(T),
|
|
14850
|
+
disabled: N === "disabled",
|
|
14851
|
+
className: X("inline-flex h-9 min-w-[2.25rem] items-center justify-center rounded-md border bg-background px-3 text-sm transition-colors", N === "disabled" ? "pointer-events-none opacity-40" : "cursor-pointer hover:bg-accent hover:text-accent-foreground")
|
|
14850
14852
|
}, /* @__PURE__ */ t.createElement("span", null, "»"))))), c);
|
|
14851
|
-
return /* @__PURE__ */ t.createElement(t.Fragment, null, n(
|
|
14853
|
+
return /* @__PURE__ */ t.createElement(t.Fragment, null, n(O, E), o ? j(I, o) : o === void 0 && I);
|
|
14852
14854
|
}, pm = ({ records: e = void 0, header: n = void 0, footer: r = void 0, overlays: i = void 0, renderItem: a = void 0, onRowClick: o = void 0, onSelectionChange: c = void 0, sortable: u = !1, pagination: d = void 0, gap: f = void 0, columns: g = void 0, groupBy: _ = void 0, selectedKeys: v = void 0, before: y = void 0, after: b = void 0, wrapperClassName: x = void 0, className: S = void 0, headerClassName: C = void 0, scrollClassName: w = void 0, bodyClassName: T = void 0, footerClassName: E = void 0, selectedClassName: D = void 0 }) => {
|
|
14853
14855
|
let O = Y("gallery"), k = Fn("gallery"), A = Fn("common"), j = D || O.Gallery.selectedClassName, [M, N] = h(null), P = s((e) => {
|
|
14854
14856
|
e && N(e);
|