@farmzone/fz-react-ui 1.0.6 → 1.0.7
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 +19 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +19 -11
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/tw.css +2 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -248,7 +248,7 @@ function TooltipContent({
|
|
|
248
248
|
var Z_INDEX = {
|
|
249
249
|
TABLE_COL_STICKY: 1,
|
|
250
250
|
TABLE_FIXED_CELL: 5,
|
|
251
|
-
TABLE_FIXED_HEADER_CELL:
|
|
251
|
+
TABLE_FIXED_HEADER_CELL: 15,
|
|
252
252
|
LOCAL_OVERLAY: 10,
|
|
253
253
|
LAYOUT_HEADER: 20,
|
|
254
254
|
DROPDOWN_LOCAL: 20,
|
|
@@ -3753,7 +3753,7 @@ function confirmModal(options) {
|
|
|
3753
3753
|
}
|
|
3754
3754
|
function TableFooter(props) {
|
|
3755
3755
|
const { paginationInfo, renderLeft, renderRight } = props;
|
|
3756
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between py-4 min-h-16", children: [
|
|
3756
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between py-4 min-h-16 border-t-1 border-gray-100", children: [
|
|
3757
3757
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-start flex-1 min-w-0", children: renderLeft }),
|
|
3758
3758
|
paginationInfo && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-5", children: /* @__PURE__ */ jsxRuntime.jsx(Pagination, { ...paginationInfo }) }),
|
|
3759
3759
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-end flex-1 min-w-0", children: renderRight })
|
|
@@ -5019,7 +5019,7 @@ function Table(props) {
|
|
|
5019
5019
|
id: `${col.key}-body`,
|
|
5020
5020
|
"data-row-cell": "true",
|
|
5021
5021
|
"data-col-key": col.key,
|
|
5022
|
-
className: `${isCheckbox ? "p-0" : "
|
|
5022
|
+
className: `${isCheckbox ? "p-0" : "p-3"} whitespace-nowrap text-sm text-gray-900 border-r border-b border-gray-300/70 last:border-r-0 bg-inherit group-hover:bg-gray-100 transition-all`,
|
|
5023
5023
|
style: {
|
|
5024
5024
|
width,
|
|
5025
5025
|
minWidth: minWidth || width,
|
|
@@ -5111,7 +5111,7 @@ function Table(props) {
|
|
|
5111
5111
|
const rest = baseRows.filter((row) => !effectiveRowOrder.includes(String(getRowKey(row.original, row.index))));
|
|
5112
5112
|
return [...ordered, ...rest];
|
|
5113
5113
|
}, [baseRows, effectiveRowOrder, getRowKey]);
|
|
5114
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-white rounded shadow-
|
|
5114
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-white rounded shadow-table border border-gray-200 overflow-hidden", children: [
|
|
5115
5115
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5116
5116
|
"div",
|
|
5117
5117
|
{
|
|
@@ -5119,7 +5119,7 @@ function Table(props) {
|
|
|
5119
5119
|
ref: scrollRef,
|
|
5120
5120
|
className: "relative w-full overflow-y-auto overflow-x-auto custom-view-scrollbar bg-white",
|
|
5121
5121
|
style: { height: `${tableHeight}px` },
|
|
5122
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "w-full table-fixed", children: [
|
|
5122
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "w-full table-fixed border-spacing-0", children: [
|
|
5123
5123
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5124
5124
|
TableHeader,
|
|
5125
5125
|
{
|
|
@@ -7658,7 +7658,7 @@ var SubmitForm = Object.assign(SubmitFormRoot, {
|
|
|
7658
7658
|
});
|
|
7659
7659
|
function LabeledFilterOption(props) {
|
|
7660
7660
|
const { label, children, gap } = props;
|
|
7661
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { marginLeft: gap }, className: "flex flex-row items-center gap-
|
|
7661
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { marginLeft: gap }, className: "flex flex-row items-center gap-4", children: [
|
|
7662
7662
|
label && /* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium text-gray-60 shrink-0", children: label }),
|
|
7663
7663
|
children
|
|
7664
7664
|
] });
|
|
@@ -7670,7 +7670,7 @@ function PageFilter(props) {
|
|
|
7670
7670
|
onSubmit,
|
|
7671
7671
|
onReset,
|
|
7672
7672
|
containerClassName,
|
|
7673
|
-
rowGap =
|
|
7673
|
+
rowGap = 28,
|
|
7674
7674
|
colGap = 0,
|
|
7675
7675
|
submitButtonText = "\uAC80\uC0C9",
|
|
7676
7676
|
resetButtonText = "\uCD08\uAE30\uD654",
|
|
@@ -7784,9 +7784,9 @@ function PageFilter(props) {
|
|
|
7784
7784
|
style: primaryColor ? { borderTopColor: primaryColor } : void 0,
|
|
7785
7785
|
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative flex flex-col", style: { gap: `${colGap}px` }, children: rows.map((row, ix) => {
|
|
7786
7786
|
const isLastRow = rows.length - 1 === ix;
|
|
7787
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row min-h-
|
|
7787
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row min-h-11", children: [
|
|
7788
7788
|
row.options.map((option, index) => renderFilterOption(option, rowGap, index)),
|
|
7789
|
-
isLastRow && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-
|
|
7789
|
+
isLastRow && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-2 flex flex-row items-center gap-2", children: [
|
|
7790
7790
|
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "search", onClick: handleSubmit, children: submitButtonText }),
|
|
7791
7791
|
onReset && /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "reset", onClick: handleReset, children: resetButtonText })
|
|
7792
7792
|
] })
|
|
@@ -9532,7 +9532,8 @@ function DetailModalFrame(props) {
|
|
|
9532
9532
|
contentClassName,
|
|
9533
9533
|
renderExtraContent,
|
|
9534
9534
|
renderFooterExtra,
|
|
9535
|
-
onDirtyChange
|
|
9535
|
+
onDirtyChange,
|
|
9536
|
+
headerType
|
|
9536
9537
|
} = props;
|
|
9537
9538
|
const controller = useDetailController({ mode, onModeChange });
|
|
9538
9539
|
React6.useEffect(() => {
|
|
@@ -9571,7 +9572,14 @@ function DetailModalFrame(props) {
|
|
|
9571
9572
|
const isEditMode = controller.mode === "edit";
|
|
9572
9573
|
const canEdit = Boolean(editSchema && (editFields || renderEditBody));
|
|
9573
9574
|
return /* @__PURE__ */ jsxRuntime.jsxs(Modal, { isOpen: open, onClose: handleClose, contentClassName: cn("max-w-2xl", contentClassName), children: [
|
|
9574
|
-
|
|
9575
|
+
headerType ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
9576
|
+
ModalIconHeader,
|
|
9577
|
+
{
|
|
9578
|
+
type: isEditMode ? "edit" : headerType,
|
|
9579
|
+
title,
|
|
9580
|
+
onClose: handleClose
|
|
9581
|
+
}
|
|
9582
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(ModalHeader, { className: "flex flex-row items-center justify-between", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-base font-semibold text-gray-900", children: title }) }),
|
|
9575
9583
|
/* @__PURE__ */ jsxRuntime.jsxs(ModalBody, { className: "flex-1 min-h-0 overflow-hidden p-0 flex flex-col", children: [
|
|
9576
9584
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 min-h-0 overflow-y-auto", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
9577
9585
|
DetailContent,
|