@farmzone/fz-react-ui 1.1.3 → 1.1.5

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 CHANGED
@@ -7865,6 +7865,8 @@ function PageFilter(props) {
7865
7865
  colGap = 0,
7866
7866
  submitButtonText = "\uAC80\uC0C9",
7867
7867
  resetButtonText = "\uCD08\uAE30\uD654",
7868
+ showSubmitButton = true,
7869
+ showResetButton = true,
7868
7870
  values,
7869
7871
  primaryColor
7870
7872
  } = props;
@@ -7925,7 +7927,8 @@ function PageFilter(props) {
7925
7927
  onKeyDown: (e) => {
7926
7928
  if (e.key === "Enter") handleSubmit();
7927
7929
  },
7928
- leftIcon: option.leftIcon !== false ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { size: 16 }) : void 0
7930
+ leftIcon: option.leftIcon !== false ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { size: 16 }) : void 0,
7931
+ className: option.className
7929
7932
  }
7930
7933
  ) }, String(optionKey));
7931
7934
  case "select":
@@ -7937,7 +7940,8 @@ function PageFilter(props) {
7937
7940
  options: option.options,
7938
7941
  placeholder: option.placeholder || "\uC120\uD0DD",
7939
7942
  canReset: option.canReset ?? true,
7940
- containerClassName: option.containerClassName ?? "w-30"
7943
+ containerClassName: option.containerClassName ?? "w-30",
7944
+ className: option.className
7941
7945
  }
7942
7946
  ) }, String(optionKey));
7943
7947
  case "radio":
@@ -7948,7 +7952,8 @@ function PageFilter(props) {
7948
7952
  value: currentValue,
7949
7953
  onChange: handleRadioChange(optionKey, option.autoSubmit),
7950
7954
  options: option.options,
7951
- direction: "horizontal"
7955
+ direction: "horizontal",
7956
+ containerClassName: option.className
7952
7957
  }
7953
7958
  ) }, String(optionKey));
7954
7959
  case "date":
@@ -7958,7 +7963,8 @@ function PageFilter(props) {
7958
7963
  value: currentValue,
7959
7964
  onChange: handleDateChange(optionKey),
7960
7965
  placeholder: option.placeholder,
7961
- onKeyDownEnter: handleSubmit
7966
+ onKeyDownEnter: handleSubmit,
7967
+ className: option.className
7962
7968
  }
7963
7969
  ) }, String(optionKey));
7964
7970
  case "date-range":
@@ -7968,17 +7974,20 @@ function PageFilter(props) {
7968
7974
  startValue: currentValue,
7969
7975
  endValue: String(values[option.endKey] ?? ""),
7970
7976
  onRangeChange: handleRangeChangeCurried(optionKey, option.endKey),
7971
- onKeyDownEnter: handleSubmit
7977
+ onKeyDownEnter: handleSubmit,
7978
+ className: option.className
7972
7979
  }
7973
7980
  ) }, String(optionKey));
7974
7981
  case "checkbox":
7975
- return /* @__PURE__ */ jsxRuntime.jsx(LabeledFilterOption, { label: option.label, gap: rowGap2, children: /* @__PURE__ */ jsxRuntime.jsx(
7982
+ return /* @__PURE__ */ jsxRuntime.jsx(LabeledFilterOption, { gap: rowGap2, children: /* @__PURE__ */ jsxRuntime.jsx(
7976
7983
  Checkbox,
7977
7984
  {
7978
7985
  checked: currentValue === "true",
7979
7986
  name: String(optionKey),
7980
7987
  value: currentValue,
7981
- onChange: handleCheckboxChange(optionKey, option.autoSubmit)
7988
+ label: option.label,
7989
+ onChange: handleCheckboxChange(optionKey, option.autoSubmit),
7990
+ className: option.className
7982
7991
  }
7983
7992
  ) }, String(optionKey));
7984
7993
  default: {
@@ -7996,9 +8005,9 @@ function PageFilter(props) {
7996
8005
  const isLastRow = rows.length - 1 === ix;
7997
8006
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row min-h-11", children: [
7998
8007
  row.options.map((option, index) => renderFilterOption(option, rowGap, index)),
7999
- isLastRow && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-2 flex flex-row items-center gap-2", children: [
8000
- /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "search", onClick: handleSubmit, children: submitButtonText }),
8001
- onReset && /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "reset", onClick: handleReset, children: resetButtonText })
8008
+ isLastRow && (showSubmitButton || showResetButton && onReset) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-2 flex flex-row items-center gap-2", children: [
8009
+ showSubmitButton && /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "search", onClick: handleSubmit, children: submitButtonText }),
8010
+ onReset && showResetButton && /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "reset", onClick: handleReset, children: resetButtonText })
8002
8011
  ] })
8003
8012
  ] }, row.options.map((opt) => String(opt.key)).join("_"));
8004
8013
  }) })