@rehagro/ui 1.0.53 → 1.0.54

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.d.mts CHANGED
@@ -829,24 +829,22 @@ type TableColumn<T> = {
829
829
  actionIcon?: ColumnActionIcon<T>;
830
830
  /** Whether this column is editable with a dropdown */
831
831
  editable?: boolean;
832
- /** Type of editable field: "select" (default) or "date" */
833
- type?: "select" | "date";
832
+ /** Type of editable field: "select" (default), "date", or "textInput" */
833
+ type?: "select" | "date" | "textInput";
834
834
  /** List of choices for the editable dropdown (required for type="select") */
835
835
  choices?: CustomSelectOption[];
836
+ /** Placeholder shown when there is no value */
837
+ editablePlaceholder?: string;
836
838
  /** Function to get the current value for the editable field */
837
839
  editableValue?: (row: T) => string;
838
840
  /** Callback when the editable value changes */
839
841
  onEditChange?: (row: T, index: number, value: string) => void;
840
- /** Text color for the editable select/date value. Can be fixed or derived from the row. */
842
+ /** Text color for editable field content (select/date/textInput). Can be fixed or derived from the row. */
841
843
  editableTextColor?: string | ((row: T, index: number) => string | undefined);
842
- /** Background color for the editable select/date value. Can be fixed or derived from the row. */
844
+ /** Placeholder text color for editable field content. Can be fixed or derived from the row. */
845
+ editablePlaceholderColor?: string | ((row: T, index: number) => string | undefined);
846
+ /** Background color for editable field elements (value chip/control/calendar/input). Can be fixed or derived from the row. */
843
847
  editableBackgroundColor?: string | ((row: T, index: number) => string | undefined);
844
- /** Background color for the editable select/date control itself. Can be fixed or derived from the row. */
845
- editableSelectBackgroundColor?: string | ((row: T, index: number) => string | undefined);
846
- /** Background color for the editable date calendar panel. Can be fixed or derived from the row. */
847
- editableCalendarBackgroundColor?: string | ((row: T, index: number) => string | undefined);
848
- /** Text color for the editable date calendar panel, excluding the apply button. */
849
- editableCalendarTextColor?: string | ((row: T, index: number) => string | undefined);
850
848
  };
851
849
  type SortDirection = "asc" | "desc" | null;
852
850
  type TableSort = {
package/dist/index.d.ts CHANGED
@@ -829,24 +829,22 @@ type TableColumn<T> = {
829
829
  actionIcon?: ColumnActionIcon<T>;
830
830
  /** Whether this column is editable with a dropdown */
831
831
  editable?: boolean;
832
- /** Type of editable field: "select" (default) or "date" */
833
- type?: "select" | "date";
832
+ /** Type of editable field: "select" (default), "date", or "textInput" */
833
+ type?: "select" | "date" | "textInput";
834
834
  /** List of choices for the editable dropdown (required for type="select") */
835
835
  choices?: CustomSelectOption[];
836
+ /** Placeholder shown when there is no value */
837
+ editablePlaceholder?: string;
836
838
  /** Function to get the current value for the editable field */
837
839
  editableValue?: (row: T) => string;
838
840
  /** Callback when the editable value changes */
839
841
  onEditChange?: (row: T, index: number, value: string) => void;
840
- /** Text color for the editable select/date value. Can be fixed or derived from the row. */
842
+ /** Text color for editable field content (select/date/textInput). Can be fixed or derived from the row. */
841
843
  editableTextColor?: string | ((row: T, index: number) => string | undefined);
842
- /** Background color for the editable select/date value. Can be fixed or derived from the row. */
844
+ /** Placeholder text color for editable field content. Can be fixed or derived from the row. */
845
+ editablePlaceholderColor?: string | ((row: T, index: number) => string | undefined);
846
+ /** Background color for editable field elements (value chip/control/calendar/input). Can be fixed or derived from the row. */
843
847
  editableBackgroundColor?: string | ((row: T, index: number) => string | undefined);
844
- /** Background color for the editable select/date control itself. Can be fixed or derived from the row. */
845
- editableSelectBackgroundColor?: string | ((row: T, index: number) => string | undefined);
846
- /** Background color for the editable date calendar panel. Can be fixed or derived from the row. */
847
- editableCalendarBackgroundColor?: string | ((row: T, index: number) => string | undefined);
848
- /** Text color for the editable date calendar panel, excluding the apply button. */
849
- editableCalendarTextColor?: string | ((row: T, index: number) => string | undefined);
850
848
  };
851
849
  type SortDirection = "asc" | "desc" | null;
852
850
  type TableSort = {
package/dist/index.js CHANGED
@@ -3778,7 +3778,7 @@ var DAYS_SHORT = ["D", "S", "T", "Q", "Q", "S", "S"];
3778
3778
  var MONTHS_PT = [
3779
3779
  "Janeiro",
3780
3780
  "Fevereiro",
3781
- "Mar\xE7o",
3781
+ "Marco",
3782
3782
  "Abril",
3783
3783
  "Maio",
3784
3784
  "Junho",
@@ -3853,18 +3853,15 @@ var DatePickerDropdown = ({
3853
3853
  onClose,
3854
3854
  containerRef,
3855
3855
  backgroundColor,
3856
- textColor,
3857
- calendarTextColor
3856
+ textColor
3858
3857
  }) => {
3859
3858
  const today = /* @__PURE__ */ new Date();
3860
3859
  const opaqueBackgroundColor = removeHexAlpha(backgroundColor);
3861
- const calendarTextStyle = calendarTextColor ? { color: calendarTextColor } : void 0;
3860
+ const calendarTextStyle = textColor ? { color: textColor } : void 0;
3862
3861
  const [viewYear, setViewYear] = React9.useState(
3863
3862
  selectedDate ? selectedDate.getFullYear() : today.getFullYear()
3864
3863
  );
3865
- const [viewMonth, setViewMonth] = React9.useState(
3866
- selectedDate ? selectedDate.getMonth() : today.getMonth()
3867
- );
3864
+ const [viewMonth, setViewMonth] = React9.useState(selectedDate ? selectedDate.getMonth() : today.getMonth());
3868
3865
  const [tempDate, setTempDate] = React9.useState(selectedDate);
3869
3866
  const dropdownRef = React9.useRef(null);
3870
3867
  React9.useEffect(() => {
@@ -3895,12 +3892,8 @@ var DatePickerDropdown = ({
3895
3892
  };
3896
3893
  const daysInMonth = getDaysInMonth(viewYear, viewMonth);
3897
3894
  const firstDay = getFirstDayOfMonth(viewYear, viewMonth);
3898
- const prevMonthDays = getDaysInMonth(
3899
- viewMonth === 0 ? viewYear - 1 : viewYear,
3900
- viewMonth === 0 ? 11 : viewMonth - 1
3901
- );
3902
- const totalCells = firstDay + daysInMonth;
3903
- const trailingCount = totalCells % 7 === 0 ? 0 : 7 - totalCells % 7;
3895
+ const prevMonthDays = getDaysInMonth(viewMonth === 0 ? viewYear - 1 : viewYear, viewMonth === 0 ? 11 : viewMonth - 1);
3896
+ const trailingCount = (firstDay + daysInMonth) % 7 === 0 ? 0 : 7 - (firstDay + daysInMonth) % 7;
3904
3897
  const isSelected = (day) => !!tempDate && tempDate.getFullYear() === viewYear && tempDate.getMonth() === viewMonth && tempDate.getDate() === day;
3905
3898
  return reactDom.createPortal(
3906
3899
  /* @__PURE__ */ jsxRuntime.jsxs(
@@ -3958,28 +3951,9 @@ var DatePickerDropdown = ({
3958
3951
  },
3959
3952
  i
3960
3953
  )) }),
3961
- /* @__PURE__ */ jsxRuntime.jsx(
3962
- "svg",
3963
- {
3964
- xmlns: "http://www.w3.org/2000/svg",
3965
- width: "100%",
3966
- height: "1",
3967
- viewBox: "0 0 350 1",
3968
- fill: "none",
3969
- className: "rh-mb-3",
3970
- children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M0 0.5H350", stroke: "#F5F5F5" })
3971
- }
3972
- ),
3954
+ /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "100%", height: "1", viewBox: "0 0 350 1", fill: "none", className: "rh-mb-3", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M0 0.5H350", stroke: "#F5F5F5" }) }),
3973
3955
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rh-grid rh-grid-cols-7 rh-gap-0", children: [
3974
- Array.from({ length: firstDay }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(
3975
- "div",
3976
- {
3977
- className: "rh-w-7 rh-h-7 rh-flex rh-items-center rh-justify-center rh-text-sm rh-text-text-muted rh-opacity-40",
3978
- style: calendarTextStyle,
3979
- children: prevMonthDays - firstDay + i + 1
3980
- },
3981
- `prev-${i}`
3982
- )),
3956
+ Array.from({ length: firstDay }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rh-w-7 rh-h-7 rh-flex rh-items-center rh-justify-center rh-text-sm rh-text-text-muted rh-opacity-40", style: calendarTextStyle, children: prevMonthDays - firstDay + i + 1 }, `prev-${i}`)),
3983
3957
  Array.from({ length: daysInMonth }).map((_, i) => {
3984
3958
  const day = i + 1;
3985
3959
  const selected = isSelected(day);
@@ -3987,10 +3961,7 @@ var DatePickerDropdown = ({
3987
3961
  "button",
3988
3962
  {
3989
3963
  type: "button",
3990
- style: {
3991
- backgroundColor: selected ? "#15607A" : "transparent",
3992
- ...calendarTextStyle
3993
- },
3964
+ style: { backgroundColor: selected ? "#15607A" : "transparent", ...calendarTextStyle },
3994
3965
  onMouseDown: (e) => {
3995
3966
  e.preventDefault();
3996
3967
  setTempDate(new Date(viewYear, viewMonth, day));
@@ -4004,15 +3975,7 @@ var DatePickerDropdown = ({
4004
3975
  day
4005
3976
  );
4006
3977
  }),
4007
- Array.from({ length: trailingCount }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(
4008
- "div",
4009
- {
4010
- className: "rh-w-7 rh-h-7 rh-flex rh-items-center rh-justify-center rh-text-sm rh-text-text-muted rh-opacity-40",
4011
- style: calendarTextStyle,
4012
- children: i + 1
4013
- },
4014
- `next-${i}`
4015
- ))
3978
+ Array.from({ length: trailingCount }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rh-w-7 rh-h-7 rh-flex rh-items-center rh-justify-center rh-text-sm rh-text-text-muted rh-opacity-40", style: calendarTextStyle, children: i + 1 }, `next-${i}`))
4016
3979
  ] }),
4017
3980
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rh-flex rh-justify-end rh-gap-2 rh-mt-4", children: /* @__PURE__ */ jsxRuntime.jsx(
4018
3981
  "button",
@@ -4020,9 +3983,7 @@ var DatePickerDropdown = ({
4020
3983
  type: "button",
4021
3984
  style: { backgroundColor: "#87A851" },
4022
3985
  onClick: () => {
4023
- if (tempDate) {
4024
- onSelect(tempDate);
4025
- }
3986
+ if (tempDate) onSelect(tempDate);
4026
3987
  onClose();
4027
3988
  },
4028
3989
  className: "rh-text-sm rh-font-medium rh-px-4 rh-py-1.5 rh-rounded-lg rh-transition-colors rh-duration-150 rh-bg-success rh-text-surface",
@@ -4040,16 +4001,29 @@ var CustomSelect = ({
4040
4001
  value,
4041
4002
  onChange,
4042
4003
  className = "",
4004
+ placeholder,
4043
4005
  textColor,
4006
+ placeholderColor,
4044
4007
  backgroundColor,
4045
- selectBackgroundColor,
4046
- calendarBackgroundColor,
4047
- calendarTextColor,
4048
4008
  type = "select"
4049
4009
  }) => {
4050
4010
  const [isOpen, setIsOpen] = React9.useState(false);
4051
4011
  const [dropdownStyle, setDropdownStyle] = React9.useState({});
4052
4012
  const containerRef = React9.useRef(null);
4013
+ const textAreaRef = React9.useRef(null);
4014
+ const resizeTextArea = React9__default.default.useCallback(() => {
4015
+ if (type !== "textInput" || !textAreaRef.current) return;
4016
+ const textarea = textAreaRef.current;
4017
+ textarea.style.height = "auto";
4018
+ if (textarea.value) {
4019
+ textarea.style.height = `${textarea.scrollHeight}px`;
4020
+ return;
4021
+ }
4022
+ const previousValue = textarea.value;
4023
+ textarea.value = placeholder || "";
4024
+ textarea.style.height = `${textarea.scrollHeight}px`;
4025
+ textarea.value = previousValue;
4026
+ }, [type, placeholder]);
4053
4027
  const calcPosition = () => {
4054
4028
  if (!containerRef.current) return {};
4055
4029
  const rect = containerRef.current.getBoundingClientRect();
@@ -4078,6 +4052,9 @@ var CustomSelect = ({
4078
4052
  window.removeEventListener("resize", close);
4079
4053
  };
4080
4054
  }, [isOpen]);
4055
+ React9.useEffect(() => {
4056
+ resizeTextArea();
4057
+ }, [resizeTextArea, value]);
4081
4058
  const selectedOption = options.find((opt) => opt.value === value);
4082
4059
  React9.useEffect(() => {
4083
4060
  if (type !== "select") return;
@@ -4093,31 +4070,52 @@ var CustomSelect = ({
4093
4070
  }, [isOpen, type]);
4094
4071
  const selectedDate = type === "date" ? parseDate(value) : null;
4095
4072
  const handleDateSelect = (date) => {
4096
- if (date) {
4097
- onChange(formatISO(date));
4098
- }
4073
+ if (date) onChange(formatISO(date));
4099
4074
  setIsOpen(false);
4100
4075
  };
4101
- const displayLabel = type === "date" ? selectedDate ? formatDisplay(selectedDate) : value || "\u2014" : selectedOption?.label || value;
4076
+ const hasValue = value != null && value !== "";
4077
+ const displayLabel = type === "date" ? selectedDate ? formatDisplay(selectedDate) : hasValue ? value : placeholder || "-" : selectedOption?.label || (hasValue ? value : placeholder || "");
4102
4078
  const displayBg = type === "date" ? backgroundColor : selectedOption?.backgroundColor || backgroundColor;
4103
- const displayTextColor = type === "date" ? textColor : selectedOption?.textColor || textColor || (displayBg ? "white" : "inherit");
4079
+ const displayTextColor = type === "date" ? textColor : selectedOption?.textColor || (hasValue ? textColor : placeholderColor) || (displayBg ? "white" : "inherit");
4080
+ if (type === "textInput") {
4081
+ const inputTextColor = textColor || "#111827";
4082
+ const inputPlaceholderColor = placeholderColor || "#9CA3AF";
4083
+ const textInputWrapperClassName = className.replace(/\brh-h-full\b/g, "").trim();
4084
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: containerRef, className: `rh-relative rh-h-full rh-flex rh-items-center ${textInputWrapperClassName}`, children: [
4085
+ /* @__PURE__ */ jsxRuntime.jsx(
4086
+ "textarea",
4087
+ {
4088
+ ref: textAreaRef,
4089
+ value,
4090
+ placeholder,
4091
+ rows: 1,
4092
+ onInput: (e) => {
4093
+ onChange(e.currentTarget.value);
4094
+ resizeTextArea();
4095
+ },
4096
+ style: {
4097
+ color: inputTextColor,
4098
+ backgroundColor: backgroundColor || "transparent"
4099
+ },
4100
+ className: "rh-table-textarea rh-flex rh-items-center rh-leading-[20px] rh-py-[7px] rh-w-full rh-min-h-[40px] rh-text-sm rh-px-1 rh-border rh-bg-surface rh-rounded-xs rh-border-transparent rh-line-height-[20px] rh-outline-none rh-resize-none rh-overflow-hidden hover:rh-border-primary focus:rh-border-primary focus:rh-ring-2 focus:rh-ring-gray-200"
4101
+ }
4102
+ ),
4103
+ /* @__PURE__ */ jsxRuntime.jsx("style", { children: `.rh-table-textarea::placeholder { color: ${inputPlaceholderColor}; }` })
4104
+ ] });
4105
+ }
4104
4106
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: containerRef, className: `rh-relative ${className}`, children: [
4105
4107
  /* @__PURE__ */ jsxRuntime.jsx(
4106
4108
  "button",
4107
4109
  {
4108
4110
  type: "button",
4109
4111
  onClick: openDropdown,
4110
- style: { backgroundColor: selectBackgroundColor || void 0 },
4111
- className: "rh-w-full rh-h-full rh-flex rh-items-center rh-border rh-bg-surface rh-rounded-sm rh-border-transparent rh-justify-between rh-py-2\n hover:rh-border-primary hover:rh-ring-2 hover:rh-ring-gray-200 rh-cursor-pointer rh-text-left",
4112
- children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rh-flex rh-items-center rh-gap-2 rh-flex-1 rh-truncate", children: /* @__PURE__ */ jsxRuntime.jsx(
4112
+ style: { backgroundColor: backgroundColor || void 0 },
4113
+ className: "rh-w-full rh-min-h-[40px] rh-flex rh-items-center rh-border rh-bg-surface rh-rounded-sm rh-border-transparent rh-justify-between rh-py-2 hover:rh-border-primary hover:rh-ring-2 hover:rh-ring-gray-200 rh-cursor-pointer rh-text-left",
4114
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rh-flex rh-items-center rh-gap-2 rh-flex-1 rh-px-0.5", children: /* @__PURE__ */ jsxRuntime.jsx(
4113
4115
  "span",
4114
4116
  {
4115
- className: "rh-truncate rh-text-[14px] rh-px-2 rh-py-1 rh-rounded-xl",
4116
- style: {
4117
- backgroundColor: displayBg || "transparent",
4118
- fontFamily: "Inter, sans-serif",
4119
- color: displayTextColor
4120
- },
4117
+ className: "rh-text-[14px] rh-px-2 rh-py-0.5 rh-rounded-xl rh-whitespace-normal rh-break-words",
4118
+ style: { backgroundColor: displayBg || "transparent", fontFamily: "Inter, sans-serif", color: displayTextColor },
4121
4119
  children: displayLabel
4122
4120
  }
4123
4121
  ) })
@@ -4127,11 +4125,7 @@ var CustomSelect = ({
4127
4125
  /* @__PURE__ */ jsxRuntime.jsx(
4128
4126
  "div",
4129
4127
  {
4130
- style: {
4131
- ...dropdownStyle,
4132
- backgroundColor: selectBackgroundColor || void 0,
4133
- boxShadow: "0 10px 20px 0 rgba(0, 0, 0, 0.05)"
4134
- },
4128
+ style: { ...dropdownStyle, backgroundColor: backgroundColor || void 0, boxShadow: "0 10px 20px 0 rgba(0, 0, 0, 0.05)" },
4135
4129
  className: "rh-border rh-border-border rh-rounded-xs rh-max-h-60 rh-overflow-auto",
4136
4130
  children: options.map((option) => /* @__PURE__ */ jsxRuntime.jsxs(
4137
4131
  "button",
@@ -4144,27 +4138,17 @@ var CustomSelect = ({
4144
4138
  },
4145
4139
  className: "rh-flex rh-items-center rh-gap-2 rh-px-3 rh-py-2 rh-text-left hover:rh-bg-background/50 rh-w-full rh-cursor-pointer",
4146
4140
  children: [
4147
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rh-w-4", children: option.value === value && /* @__PURE__ */ jsxRuntime.jsx(
4148
- "svg",
4141
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rh-w-4", children: option.value === value && /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "13", height: "10", viewBox: "0 0 13 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntime.jsx(
4142
+ "path",
4149
4143
  {
4150
- width: "13",
4151
- height: "10",
4152
- viewBox: "0 0 13 10",
4153
- fill: "none",
4154
- xmlns: "http://www.w3.org/2000/svg",
4155
- children: /* @__PURE__ */ jsxRuntime.jsx(
4156
- "path",
4157
- {
4158
- d: "M12.7826 1.2813L4.78255 9.2813C4.71287 9.35122 4.63008 9.4067 4.53891 9.44455C4.44775 9.48241 4.35001 9.50189 4.2513 9.50189C4.15259 9.50189 4.05485 9.48241 3.96369 9.44455C3.87252 9.4067 3.78973 9.35122 3.72005 9.2813L0.220051 5.7813C0.150286 5.71154 0.0949458 5.62871 0.0571893 5.53756C0.0194329 5.44641 1.03958e-09 5.34871 0 5.25005C-1.03958e-09 5.15139 0.0194329 5.05369 0.0571893 4.96254C0.0949458 4.87139 0.150286 4.78857 0.220051 4.7188C0.289816 4.64904 0.372638 4.5937 0.46379 4.55594C0.554942 4.51818 0.652639 4.49875 0.751301 4.49875C0.849963 4.49875 0.947659 4.51818 1.03881 4.55594C1.12996 4.5937 1.21279 4.64904 1.28255 4.7188L4.25193 7.68818L11.7213 0.220051C11.8622 0.0791546 12.0533 0 12.2526 0C12.4518 0 12.6429 0.0791546 12.7838 0.220051C12.9247 0.360947 13.0039 0.552044 13.0039 0.751301C13.0039 0.950559 12.9247 1.14165 12.7838 1.28255L12.7826 1.2813Z",
4159
- fill: "#374151"
4160
- }
4161
- )
4144
+ d: "M12.7826 1.2813L4.78255 9.2813C4.71287 9.35122 4.63008 9.4067 4.53891 9.44455C4.44775 9.48241 4.35001 9.50189 4.2513 9.50189C4.15259 9.50189 4.05485 9.48241 3.96369 9.44455C3.87252 9.4067 3.78973 9.35122 3.72005 9.2813L0.220051 5.7813C0.150286 5.71154 0.0949458 5.62871 0.0571893 5.53756C0.0194329 5.44641 1.03958e-09 5.34871 0 5.25005C-1.03958e-09 5.15139 0.0194329 5.05369 0.0571893 4.96254C0.0949458 4.87139 0.150286 4.78857 0.220051 4.7188C0.289816 4.64904 0.372638 4.5937 0.46379 4.55594C0.554942 4.51818 0.652639 4.49875 0.751301 4.49875C0.849963 4.49875 0.947659 4.51818 1.03881 4.55594C1.12996 4.5937 1.21279 4.64904 1.28255 4.7188L4.25193 7.68818L11.7213 0.220051C11.8622 0.0791546 12.0533 0 12.2526 0C12.4518 0 12.6429 0.0791546 12.7838 0.220051C12.9247 0.360947 13.0039 0.552044 13.0039 0.751301C13.0039 0.950559 12.9247 1.14165 12.7838 1.28255L12.7826 1.2813Z",
4145
+ fill: "#374151"
4162
4146
  }
4163
- ) }),
4147
+ ) }) }),
4164
4148
  /* @__PURE__ */ jsxRuntime.jsx(
4165
4149
  "span",
4166
4150
  {
4167
- className: "rh-truncate rh-p-1 rh-px-2 rh-rounded-xl rh-text-white rh-text-[14px]",
4151
+ className: "rh-p-0.5 rh-px-2 rh-rounded-xl rh-text-white rh-text-[14px] rh-whitespace-normal rh-break-words",
4168
4152
  style: {
4169
4153
  backgroundColor: option.backgroundColor || backgroundColor || "transparent",
4170
4154
  fontFamily: "Inter, sans-serif",
@@ -4189,9 +4173,8 @@ var CustomSelect = ({
4189
4173
  onSelect: handleDateSelect,
4190
4174
  onClose: () => setIsOpen(false),
4191
4175
  containerRef,
4192
- backgroundColor: calendarBackgroundColor,
4193
- textColor,
4194
- calendarTextColor
4176
+ backgroundColor,
4177
+ textColor
4195
4178
  }
4196
4179
  )
4197
4180
  ] });
@@ -4300,7 +4283,7 @@ function TableInner({
4300
4283
  const rowPaddingStyle = getRowPaddingStyle();
4301
4284
  const isEditableCell = (column) => {
4302
4285
  if (!column.editable || !column.editableValue) return false;
4303
- if (column.type === "date") return true;
4286
+ if (column.type === "date" || column.type === "textInput") return true;
4304
4287
  return !!column.choices;
4305
4288
  };
4306
4289
  const getEditableTextColor = (column, row, index) => {
@@ -4315,23 +4298,11 @@ function TableInner({
4315
4298
  }
4316
4299
  return column.editableBackgroundColor;
4317
4300
  };
4318
- const getEditableSelectBackgroundColor = (column, row, index) => {
4319
- if (typeof column.editableSelectBackgroundColor === "function") {
4320
- return column.editableSelectBackgroundColor(row, index);
4321
- }
4322
- return column.editableSelectBackgroundColor;
4323
- };
4324
- const getEditableCalendarBackgroundColor = (column, row, index) => {
4325
- if (typeof column.editableCalendarBackgroundColor === "function") {
4326
- return column.editableCalendarBackgroundColor(row, index);
4327
- }
4328
- return column.editableCalendarBackgroundColor;
4329
- };
4330
- const getEditableCalendarTextColor = (column, row, index) => {
4331
- if (typeof column.editableCalendarTextColor === "function") {
4332
- return column.editableCalendarTextColor(row, index);
4301
+ const getEditablePlaceholderColor = (column, row, index) => {
4302
+ if (typeof column.editablePlaceholderColor === "function") {
4303
+ return column.editablePlaceholderColor(row, index);
4333
4304
  }
4334
- return column.editableCalendarTextColor;
4305
+ return column.editablePlaceholderColor;
4335
4306
  };
4336
4307
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rh-w-full rh-rounded rh-overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsxs(
4337
4308
  "table",
@@ -4436,23 +4407,10 @@ function TableInner({
4436
4407
  type: column.type ?? "select",
4437
4408
  options: column.choices,
4438
4409
  value: column.editableValue(row),
4410
+ placeholder: column.editablePlaceholder,
4439
4411
  textColor: getEditableTextColor(column, row, index),
4412
+ placeholderColor: getEditablePlaceholderColor(column, row, index),
4440
4413
  backgroundColor: getEditableBackgroundColor(column, row, index),
4441
- selectBackgroundColor: getEditableSelectBackgroundColor(
4442
- column,
4443
- row,
4444
- index
4445
- ),
4446
- calendarBackgroundColor: getEditableCalendarBackgroundColor(
4447
- column,
4448
- row,
4449
- index
4450
- ),
4451
- calendarTextColor: getEditableCalendarTextColor(
4452
- column,
4453
- row,
4454
- index
4455
- ),
4456
4414
  onChange: (value) => column.onEditChange?.(row, index, value),
4457
4415
  className: "rh-w-full rh-h-full"
4458
4416
  }