@farmzone/fz-react-ui 1.0.21 → 1.0.22

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
@@ -4181,14 +4181,15 @@ function TableHeader(props) {
4181
4181
  const textAlignClass = column.align === "center" ? "text-center" : column.align === "right" ? "text-right" : "text-left";
4182
4182
  const titleContent = hasWrapParts ? column.wrapParts.map((part, idx) => /* @__PURE__ */ jsxRuntime.jsxs(React6.Fragment, { children: [
4183
4183
  idx > 0 && /* @__PURE__ */ jsxRuntime.jsx("wbr", {}),
4184
- part
4184
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { whiteSpace: "nowrap" }, children: part })
4185
4185
  ] }, idx)) : column.title;
4186
+ const paddingClass = hasSortIcon ? column.align === "center" ? "pl-1" : "pl-3" : "px-3";
4186
4187
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center w-full", children: [
4187
- hasSortIcon && column.align === "center" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-5 shrink-0" }),
4188
+ hasSortIcon && column.align === "center" && !column.isWrap && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-5 shrink-0" }),
4188
4189
  /* @__PURE__ */ jsxRuntime.jsx(
4189
4190
  "span",
4190
4191
  {
4191
- className: `flex-1 px-3 ${textAlignClass} ${baseClasses} ${isClickableHead} ${subTitleClasses}`,
4192
+ className: `flex-1 min-w-0 ${paddingClass} ${textAlignClass} ${baseClasses} ${isClickableHead} ${subTitleClasses}`,
4192
4193
  style: hasWrapParts ? { wordBreak: "keep-all" } : void 0,
4193
4194
  children: titleContent
4194
4195
  }
@@ -4242,7 +4243,7 @@ function TableHeader(props) {
4242
4243
  {
4243
4244
  id: `${column.key}-header`,
4244
4245
  ...getDragProps(column),
4245
- className: `bg-gray-200 border-b border-r border-gray-300 py-2 text-left font-semibold text-gray-700 text-sm tracking-wider last:border-r-0 transition-all ${column.isWrap ? "" : "overflow-hidden"} ${isClickableHead}`,
4246
+ className: `bg-gray-200 border-b border-r border-gray-300 py-2 text-left font-semibold text-gray-700 text-sm tracking-wider last:border-r-0 transition-all overflow-hidden ${isClickableHead}`,
4246
4247
  onClick: () => {
4247
4248
  if (column.sortable) {
4248
4249
  handleSort(column.key);
@@ -4422,7 +4423,7 @@ function TableHeader(props) {
4422
4423
  {
4423
4424
  id: `${column.key}-header`,
4424
4425
  ...getDragProps(column),
4425
- className: `bg-gray-200 border-b border-r border-gray-300 py-1 text-left font-semibold text-gray-700 text-sm tracking-wider transition-all ${column.isWrap ? "" : "overflow-hidden"} ${isClickableHead}`,
4426
+ className: `bg-gray-200 border-b border-r border-gray-300 py-1 text-left font-semibold text-gray-700 text-sm tracking-wider transition-all overflow-hidden ${isClickableHead}`,
4426
4427
  onClick: () => {
4427
4428
  if (column.sortable) {
4428
4429
  handleSort(column.key);
@@ -4526,7 +4527,7 @@ function TableHeader(props) {
4526
4527
  {
4527
4528
  id: `${column.key}-header`,
4528
4529
  ...getDragProps(column),
4529
- className: `bg-gray-200 border-b border-r border-gray-300 py-1 text-left font-semibold text-gray-700 text-sm tracking-wider transition-all ${column.isWrap ? "" : "overflow-hidden"} ${isClickableHead}`,
4530
+ className: `bg-gray-200 border-b border-r border-gray-300 py-1 text-left font-semibold text-gray-700 text-sm tracking-wider transition-all overflow-hidden ${isClickableHead}`,
4530
4531
  onClick: () => {
4531
4532
  if (column.sortable) {
4532
4533
  handleSort(column.key);