@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.d.cts
CHANGED
|
@@ -1239,6 +1239,8 @@ interface DetailModalFrameProps<T, S extends z.ZodTypeAny = z.ZodTypeAny> {
|
|
|
1239
1239
|
renderFooterExtra?: ReactNode;
|
|
1240
1240
|
/** isDirty 상태 외부 노출 — 라우터 blocker 등에서 활용 */
|
|
1241
1241
|
onDirtyChange?: (isDirty: boolean) => void;
|
|
1242
|
+
/** 제공 시 ModalIconHeader로 렌더링 (read 모드: 이 type, edit 모드: "edit" 자동 적용) */
|
|
1243
|
+
headerType?: ModalType;
|
|
1242
1244
|
}
|
|
1243
1245
|
declare function DetailModalFrame<T, S extends z.ZodTypeAny = z.ZodTypeAny>(props: DetailModalFrameProps<T, S>): react.JSX.Element;
|
|
1244
1246
|
|
|
@@ -1371,7 +1373,7 @@ declare const textVariants: (props?: ({
|
|
|
1371
1373
|
declare const Z_INDEX: {
|
|
1372
1374
|
readonly TABLE_COL_STICKY: 1;
|
|
1373
1375
|
readonly TABLE_FIXED_CELL: 5;
|
|
1374
|
-
readonly TABLE_FIXED_HEADER_CELL:
|
|
1376
|
+
readonly TABLE_FIXED_HEADER_CELL: 15;
|
|
1375
1377
|
readonly LOCAL_OVERLAY: 10;
|
|
1376
1378
|
readonly LAYOUT_HEADER: 20;
|
|
1377
1379
|
readonly DROPDOWN_LOCAL: 20;
|
package/dist/index.d.ts
CHANGED
|
@@ -1239,6 +1239,8 @@ interface DetailModalFrameProps<T, S extends z.ZodTypeAny = z.ZodTypeAny> {
|
|
|
1239
1239
|
renderFooterExtra?: ReactNode;
|
|
1240
1240
|
/** isDirty 상태 외부 노출 — 라우터 blocker 등에서 활용 */
|
|
1241
1241
|
onDirtyChange?: (isDirty: boolean) => void;
|
|
1242
|
+
/** 제공 시 ModalIconHeader로 렌더링 (read 모드: 이 type, edit 모드: "edit" 자동 적용) */
|
|
1243
|
+
headerType?: ModalType;
|
|
1242
1244
|
}
|
|
1243
1245
|
declare function DetailModalFrame<T, S extends z.ZodTypeAny = z.ZodTypeAny>(props: DetailModalFrameProps<T, S>): react.JSX.Element;
|
|
1244
1246
|
|
|
@@ -1371,7 +1373,7 @@ declare const textVariants: (props?: ({
|
|
|
1371
1373
|
declare const Z_INDEX: {
|
|
1372
1374
|
readonly TABLE_COL_STICKY: 1;
|
|
1373
1375
|
readonly TABLE_FIXED_CELL: 5;
|
|
1374
|
-
readonly TABLE_FIXED_HEADER_CELL:
|
|
1376
|
+
readonly TABLE_FIXED_HEADER_CELL: 15;
|
|
1375
1377
|
readonly LOCAL_OVERLAY: 10;
|
|
1376
1378
|
readonly LAYOUT_HEADER: 20;
|
|
1377
1379
|
readonly DROPDOWN_LOCAL: 20;
|
package/dist/index.js
CHANGED
|
@@ -214,7 +214,7 @@ function TooltipContent({
|
|
|
214
214
|
var Z_INDEX = {
|
|
215
215
|
TABLE_COL_STICKY: 1,
|
|
216
216
|
TABLE_FIXED_CELL: 5,
|
|
217
|
-
TABLE_FIXED_HEADER_CELL:
|
|
217
|
+
TABLE_FIXED_HEADER_CELL: 15,
|
|
218
218
|
LOCAL_OVERLAY: 10,
|
|
219
219
|
LAYOUT_HEADER: 20,
|
|
220
220
|
DROPDOWN_LOCAL: 20,
|
|
@@ -3719,7 +3719,7 @@ function confirmModal(options) {
|
|
|
3719
3719
|
}
|
|
3720
3720
|
function TableFooter(props) {
|
|
3721
3721
|
const { paginationInfo, renderLeft, renderRight } = props;
|
|
3722
|
-
return /* @__PURE__ */ jsx("div", { className: "w-full", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-4 min-h-16", children: [
|
|
3722
|
+
return /* @__PURE__ */ jsx("div", { className: "w-full", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-4 min-h-16 border-t-1 border-gray-100", children: [
|
|
3723
3723
|
/* @__PURE__ */ jsx("div", { className: "flex justify-start flex-1 min-w-0", children: renderLeft }),
|
|
3724
3724
|
paginationInfo && /* @__PURE__ */ jsx("div", { className: "px-5", children: /* @__PURE__ */ jsx(Pagination, { ...paginationInfo }) }),
|
|
3725
3725
|
/* @__PURE__ */ jsx("div", { className: "flex justify-end flex-1 min-w-0", children: renderRight })
|
|
@@ -4985,7 +4985,7 @@ function Table(props) {
|
|
|
4985
4985
|
id: `${col.key}-body`,
|
|
4986
4986
|
"data-row-cell": "true",
|
|
4987
4987
|
"data-col-key": col.key,
|
|
4988
|
-
className: `${isCheckbox ? "p-0" : "
|
|
4988
|
+
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`,
|
|
4989
4989
|
style: {
|
|
4990
4990
|
width,
|
|
4991
4991
|
minWidth: minWidth || width,
|
|
@@ -5077,7 +5077,7 @@ function Table(props) {
|
|
|
5077
5077
|
const rest = baseRows.filter((row) => !effectiveRowOrder.includes(String(getRowKey(row.original, row.index))));
|
|
5078
5078
|
return [...ordered, ...rest];
|
|
5079
5079
|
}, [baseRows, effectiveRowOrder, getRowKey]);
|
|
5080
|
-
return /* @__PURE__ */ jsxs("div", { className: "bg-white rounded shadow-
|
|
5080
|
+
return /* @__PURE__ */ jsxs("div", { className: "bg-white rounded shadow-table border border-gray-200 overflow-hidden", children: [
|
|
5081
5081
|
/* @__PURE__ */ jsx(
|
|
5082
5082
|
"div",
|
|
5083
5083
|
{
|
|
@@ -5085,7 +5085,7 @@ function Table(props) {
|
|
|
5085
5085
|
ref: scrollRef,
|
|
5086
5086
|
className: "relative w-full overflow-y-auto overflow-x-auto custom-view-scrollbar bg-white",
|
|
5087
5087
|
style: { height: `${tableHeight}px` },
|
|
5088
|
-
children: /* @__PURE__ */ jsxs("table", { className: "w-full table-fixed", children: [
|
|
5088
|
+
children: /* @__PURE__ */ jsxs("table", { className: "w-full table-fixed border-spacing-0", children: [
|
|
5089
5089
|
/* @__PURE__ */ jsx(
|
|
5090
5090
|
TableHeader,
|
|
5091
5091
|
{
|
|
@@ -7624,7 +7624,7 @@ var SubmitForm = Object.assign(SubmitFormRoot, {
|
|
|
7624
7624
|
});
|
|
7625
7625
|
function LabeledFilterOption(props) {
|
|
7626
7626
|
const { label, children, gap } = props;
|
|
7627
|
-
return /* @__PURE__ */ jsxs("div", { style: { marginLeft: gap }, className: "flex flex-row items-center gap-
|
|
7627
|
+
return /* @__PURE__ */ jsxs("div", { style: { marginLeft: gap }, className: "flex flex-row items-center gap-4", children: [
|
|
7628
7628
|
label && /* @__PURE__ */ jsx("label", { className: "text-sm font-medium text-gray-60 shrink-0", children: label }),
|
|
7629
7629
|
children
|
|
7630
7630
|
] });
|
|
@@ -7636,7 +7636,7 @@ function PageFilter(props) {
|
|
|
7636
7636
|
onSubmit,
|
|
7637
7637
|
onReset,
|
|
7638
7638
|
containerClassName,
|
|
7639
|
-
rowGap =
|
|
7639
|
+
rowGap = 28,
|
|
7640
7640
|
colGap = 0,
|
|
7641
7641
|
submitButtonText = "\uAC80\uC0C9",
|
|
7642
7642
|
resetButtonText = "\uCD08\uAE30\uD654",
|
|
@@ -7750,9 +7750,9 @@ function PageFilter(props) {
|
|
|
7750
7750
|
style: primaryColor ? { borderTopColor: primaryColor } : void 0,
|
|
7751
7751
|
children: /* @__PURE__ */ jsx("div", { className: "relative flex flex-col", style: { gap: `${colGap}px` }, children: rows.map((row, ix) => {
|
|
7752
7752
|
const isLastRow = rows.length - 1 === ix;
|
|
7753
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex flex-row min-h-
|
|
7753
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-row min-h-11", children: [
|
|
7754
7754
|
row.options.map((option, index) => renderFilterOption(option, rowGap, index)),
|
|
7755
|
-
isLastRow && /* @__PURE__ */ jsxs("div", { className: "ml-
|
|
7755
|
+
isLastRow && /* @__PURE__ */ jsxs("div", { className: "ml-2 flex flex-row items-center gap-2", children: [
|
|
7756
7756
|
/* @__PURE__ */ jsx(Button, { variant: "search", onClick: handleSubmit, children: submitButtonText }),
|
|
7757
7757
|
onReset && /* @__PURE__ */ jsx(Button, { variant: "reset", onClick: handleReset, children: resetButtonText })
|
|
7758
7758
|
] })
|
|
@@ -9498,7 +9498,8 @@ function DetailModalFrame(props) {
|
|
|
9498
9498
|
contentClassName,
|
|
9499
9499
|
renderExtraContent,
|
|
9500
9500
|
renderFooterExtra,
|
|
9501
|
-
onDirtyChange
|
|
9501
|
+
onDirtyChange,
|
|
9502
|
+
headerType
|
|
9502
9503
|
} = props;
|
|
9503
9504
|
const controller = useDetailController({ mode, onModeChange });
|
|
9504
9505
|
useEffect(() => {
|
|
@@ -9537,7 +9538,14 @@ function DetailModalFrame(props) {
|
|
|
9537
9538
|
const isEditMode = controller.mode === "edit";
|
|
9538
9539
|
const canEdit = Boolean(editSchema && (editFields || renderEditBody));
|
|
9539
9540
|
return /* @__PURE__ */ jsxs(Modal, { isOpen: open, onClose: handleClose, contentClassName: cn("max-w-2xl", contentClassName), children: [
|
|
9540
|
-
|
|
9541
|
+
headerType ? /* @__PURE__ */ jsx(
|
|
9542
|
+
ModalIconHeader,
|
|
9543
|
+
{
|
|
9544
|
+
type: isEditMode ? "edit" : headerType,
|
|
9545
|
+
title,
|
|
9546
|
+
onClose: handleClose
|
|
9547
|
+
}
|
|
9548
|
+
) : /* @__PURE__ */ jsx(ModalHeader, { className: "flex flex-row items-center justify-between", children: /* @__PURE__ */ jsx("span", { className: "text-base font-semibold text-gray-900", children: title }) }),
|
|
9541
9549
|
/* @__PURE__ */ jsxs(ModalBody, { className: "flex-1 min-h-0 overflow-hidden p-0 flex flex-col", children: [
|
|
9542
9550
|
/* @__PURE__ */ jsx("div", { className: "flex-1 min-h-0 overflow-y-auto", children: /* @__PURE__ */ jsx(
|
|
9543
9551
|
DetailContent,
|