@geomak/ui 6.26.0 → 6.26.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.cjs +42 -45
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +42 -45
- package/dist/index.js.map +1 -1
- package/dist/styles.css +28 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -5766,48 +5766,45 @@ function Pagination({
|
|
|
5766
5766
|
if (next) setPerPageKey(next.key);
|
|
5767
5767
|
}
|
|
5768
5768
|
}, [serverSide, options.perPage, picker]);
|
|
5769
|
-
const navBtn = (icon, disabled, onClick) => /* @__PURE__ */ jsxRuntime.jsx(IconButton, { disabled, onClick, icon });
|
|
5770
|
-
const chevronRight = /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, className: "h-
|
|
5771
|
-
const doubleChevronRight = /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, className: "h-
|
|
5772
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex
|
|
5773
|
-
|
|
5774
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "
|
|
5775
|
-
|
|
5776
|
-
|
|
5777
|
-
|
|
5778
|
-
|
|
5779
|
-
|
|
5780
|
-
|
|
5781
|
-
|
|
5782
|
-
|
|
5783
|
-
|
|
5784
|
-
|
|
5785
|
-
|
|
5786
|
-
|
|
5787
|
-
|
|
5788
|
-
|
|
5789
|
-
|
|
5790
|
-
|
|
5791
|
-
activePage === maxPage,
|
|
5792
|
-
() => onPageChange(maxPage)
|
|
5793
|
-
),
|
|
5794
|
-
options.withPicker && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5795
|
-
Dropdown,
|
|
5796
|
-
{
|
|
5797
|
-
style: { width: 80, position: "relative", bottom: 4 },
|
|
5798
|
-
hasSearch: false,
|
|
5799
|
-
items: picker,
|
|
5800
|
-
isMultiselect: false,
|
|
5801
|
-
value: displayPerPageKey,
|
|
5802
|
-
onChange: ({ target: { value } }) => {
|
|
5803
|
-
if (Array.isArray(value)) return;
|
|
5804
|
-
const numKey = typeof value === "number" ? value : Number(value);
|
|
5805
|
-
if (!serverSide) setPerPageKey(numKey);
|
|
5806
|
-
const opt = picker.find((o) => o.key === numKey);
|
|
5807
|
-
onPerPageChange(opt?.label ?? opt?.value ?? numKey);
|
|
5769
|
+
const navBtn = (icon, disabled, onClick, title) => /* @__PURE__ */ jsxRuntime.jsx(IconButton, { type: "bordered", size: "sm", disabled, onClick, icon, title });
|
|
5770
|
+
const chevronRight = /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, className: "h-4 w-4", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) });
|
|
5771
|
+
const doubleChevronRight = /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, className: "h-4 w-4", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M13 5l7 7-7 7M5 5l7 7-7 7" }) });
|
|
5772
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center justify-end gap-x-4 gap-y-3 pt-3", children: [
|
|
5773
|
+
options.withPicker && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mr-auto flex items-center gap-2", children: [
|
|
5774
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "whitespace-nowrap text-xs text-foreground-muted", children: "Rows per page" }),
|
|
5775
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5776
|
+
Dropdown,
|
|
5777
|
+
{
|
|
5778
|
+
size: "sm",
|
|
5779
|
+
style: { width: 76 },
|
|
5780
|
+
hasSearch: false,
|
|
5781
|
+
items: picker,
|
|
5782
|
+
isMultiselect: false,
|
|
5783
|
+
value: displayPerPageKey,
|
|
5784
|
+
onChange: ({ target: { value } }) => {
|
|
5785
|
+
if (Array.isArray(value)) return;
|
|
5786
|
+
const numKey = typeof value === "number" ? value : Number(value);
|
|
5787
|
+
if (!serverSide) setPerPageKey(numKey);
|
|
5788
|
+
const opt = picker.find((o) => o.key === numKey);
|
|
5789
|
+
onPerPageChange(opt?.label ?? opt?.value ?? numKey);
|
|
5790
|
+
}
|
|
5808
5791
|
}
|
|
5809
|
-
|
|
5810
|
-
)
|
|
5792
|
+
)
|
|
5793
|
+
] }),
|
|
5794
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
5795
|
+
navBtn(/* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex rotate-180", children: doubleChevronRight }), activePage === 0, () => onPageChange(0), "First page"),
|
|
5796
|
+
navBtn(/* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex rotate-180", children: chevronRight }), activePage === 0, () => activePage > 0 && onPageChange(activePage - 1), "Previous page"),
|
|
5797
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "px-2 text-sm tabular-nums text-foreground-secondary select-none", children: [
|
|
5798
|
+
activePage + 1,
|
|
5799
|
+
" ",
|
|
5800
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-foreground-muted", children: [
|
|
5801
|
+
"/ ",
|
|
5802
|
+
maxPage + 1
|
|
5803
|
+
] })
|
|
5804
|
+
] }),
|
|
5805
|
+
navBtn(chevronRight, activePage === maxPage, () => activePage < maxPage && onPageChange(activePage + 1), "Next page"),
|
|
5806
|
+
navBtn(doubleChevronRight, activePage === maxPage, () => onPageChange(maxPage), "Last page")
|
|
5807
|
+
] })
|
|
5811
5808
|
] });
|
|
5812
5809
|
}
|
|
5813
5810
|
function Table({
|
|
@@ -8535,7 +8532,7 @@ function OtpInput({
|
|
|
8535
8532
|
emit(valid.join(""));
|
|
8536
8533
|
focusBox(valid.length);
|
|
8537
8534
|
};
|
|
8538
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Field, { className, label, htmlFor, errorId, errorMessage, required, layout, helperText, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2", role: "group", "aria-label": typeof label === "string" ? label : "One-time code", children: chars.map((char, idx) => /* @__PURE__ */ jsxRuntime.jsxs(React29__default.default.Fragment, { children: [
|
|
8535
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Field, { className, label, htmlFor, errorId, errorMessage, required, layout, helperText, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap items-center gap-2", role: "group", "aria-label": typeof label === "string" ? label : "One-time code", children: chars.map((char, idx) => /* @__PURE__ */ jsxRuntime.jsxs(React29__default.default.Fragment, { children: [
|
|
8539
8536
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8540
8537
|
"input",
|
|
8541
8538
|
{
|
|
@@ -8946,9 +8943,9 @@ function DateRangePicker({
|
|
|
8946
8943
|
{
|
|
8947
8944
|
align: "start",
|
|
8948
8945
|
sideOffset: 4,
|
|
8949
|
-
className: "bg-surface text-foreground border border-border rounded-lg shadow-md z-50 p-3 flex gap-3 animate-in fade-in-0 zoom-in-95",
|
|
8946
|
+
className: "bg-surface text-foreground border border-border rounded-lg shadow-md z-50 p-3 flex flex-col gap-3 sm:flex-row max-w-[calc(100vw-1rem)] max-h-[calc(100vh-2rem)] overflow-auto animate-in fade-in-0 zoom-in-95",
|
|
8950
8947
|
children: [
|
|
8951
|
-
presets && presets.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-1 pr-3 border-r border-border
|
|
8948
|
+
presets && presets.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-1 min-w-[120px] sm:pr-3 sm:border-r sm:border-border", children: presets.map((p) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8952
8949
|
"button",
|
|
8953
8950
|
{
|
|
8954
8951
|
type: "button",
|
|
@@ -8961,7 +8958,7 @@ function DateRangePicker({
|
|
|
8961
8958
|
},
|
|
8962
8959
|
p.label
|
|
8963
8960
|
)) }),
|
|
8964
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-4", children: [
|
|
8961
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-4 sm:flex-row", children: [
|
|
8965
8962
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
8966
8963
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8967
8964
|
"button",
|