@farmzone/fz-react-ui 1.0.21 → 1.0.23

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,19 +4181,24 @@ 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
- 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" }),
4186
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex items-center w-full", children: [
4188
4187
  /* @__PURE__ */ jsxRuntime.jsx(
4189
4188
  "span",
4190
4189
  {
4191
- className: `flex-1 px-3 ${textAlignClass} ${baseClasses} ${isClickableHead} ${subTitleClasses}`,
4190
+ className: `w-full px-3 ${hasSortIcon && column.align !== "center" ? "pr-6" : ""} ${textAlignClass} ${baseClasses} ${isClickableHead} ${subTitleClasses}`,
4192
4191
  style: hasWrapParts ? { wordBreak: "keep-all" } : void 0,
4193
4192
  children: titleContent
4194
4193
  }
4195
4194
  ),
4196
- hasSortIcon && /* @__PURE__ */ jsxRuntime.jsx("div", { className: `w-6 shrink-0 flex items-center justify-center cursor-pointer ${isClickableHead}`, children: renderSortIcon(column.key) })
4195
+ hasSortIcon && /* @__PURE__ */ jsxRuntime.jsx(
4196
+ "div",
4197
+ {
4198
+ className: `absolute right-0 top-1/2 -translate-y-1/2 w-5 flex items-center justify-start cursor-pointer ${isClickableHead}`,
4199
+ children: renderSortIcon(column.key)
4200
+ }
4201
+ )
4197
4202
  ] });
4198
4203
  };
4199
4204
  const createGroupHeaders = () => {
@@ -4242,7 +4247,7 @@ function TableHeader(props) {
4242
4247
  {
4243
4248
  id: `${column.key}-header`,
4244
4249
  ...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}`,
4250
+ 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
4251
  onClick: () => {
4247
4252
  if (column.sortable) {
4248
4253
  handleSort(column.key);
@@ -4422,7 +4427,7 @@ function TableHeader(props) {
4422
4427
  {
4423
4428
  id: `${column.key}-header`,
4424
4429
  ...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}`,
4430
+ 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
4431
  onClick: () => {
4427
4432
  if (column.sortable) {
4428
4433
  handleSort(column.key);
@@ -4526,7 +4531,7 @@ function TableHeader(props) {
4526
4531
  {
4527
4532
  id: `${column.key}-header`,
4528
4533
  ...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}`,
4534
+ 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
4535
  onClick: () => {
4531
4536
  if (column.sortable) {
4532
4537
  handleSort(column.key);