@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.js CHANGED
@@ -4147,19 +4147,24 @@ function TableHeader(props) {
4147
4147
  const textAlignClass = column.align === "center" ? "text-center" : column.align === "right" ? "text-right" : "text-left";
4148
4148
  const titleContent = hasWrapParts ? column.wrapParts.map((part, idx) => /* @__PURE__ */ jsxs(Fragment$1, { children: [
4149
4149
  idx > 0 && /* @__PURE__ */ jsx("wbr", {}),
4150
- part
4150
+ /* @__PURE__ */ jsx("span", { style: { whiteSpace: "nowrap" }, children: part })
4151
4151
  ] }, idx)) : column.title;
4152
- return /* @__PURE__ */ jsxs("div", { className: "flex items-center w-full", children: [
4153
- hasSortIcon && column.align === "center" && /* @__PURE__ */ jsx("div", { className: "w-5 shrink-0" }),
4152
+ return /* @__PURE__ */ jsxs("div", { className: "relative flex items-center w-full", children: [
4154
4153
  /* @__PURE__ */ jsx(
4155
4154
  "span",
4156
4155
  {
4157
- className: `flex-1 px-3 ${textAlignClass} ${baseClasses} ${isClickableHead} ${subTitleClasses}`,
4156
+ className: `w-full px-3 ${hasSortIcon && column.align !== "center" ? "pr-6" : ""} ${textAlignClass} ${baseClasses} ${isClickableHead} ${subTitleClasses}`,
4158
4157
  style: hasWrapParts ? { wordBreak: "keep-all" } : void 0,
4159
4158
  children: titleContent
4160
4159
  }
4161
4160
  ),
4162
- hasSortIcon && /* @__PURE__ */ jsx("div", { className: `w-6 shrink-0 flex items-center justify-center cursor-pointer ${isClickableHead}`, children: renderSortIcon(column.key) })
4161
+ hasSortIcon && /* @__PURE__ */ jsx(
4162
+ "div",
4163
+ {
4164
+ className: `absolute right-0 top-1/2 -translate-y-1/2 w-5 flex items-center justify-start cursor-pointer ${isClickableHead}`,
4165
+ children: renderSortIcon(column.key)
4166
+ }
4167
+ )
4163
4168
  ] });
4164
4169
  };
4165
4170
  const createGroupHeaders = () => {
@@ -4208,7 +4213,7 @@ function TableHeader(props) {
4208
4213
  {
4209
4214
  id: `${column.key}-header`,
4210
4215
  ...getDragProps(column),
4211
- 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}`,
4216
+ 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}`,
4212
4217
  onClick: () => {
4213
4218
  if (column.sortable) {
4214
4219
  handleSort(column.key);
@@ -4388,7 +4393,7 @@ function TableHeader(props) {
4388
4393
  {
4389
4394
  id: `${column.key}-header`,
4390
4395
  ...getDragProps(column),
4391
- 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}`,
4396
+ 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}`,
4392
4397
  onClick: () => {
4393
4398
  if (column.sortable) {
4394
4399
  handleSort(column.key);
@@ -4492,7 +4497,7 @@ function TableHeader(props) {
4492
4497
  {
4493
4498
  id: `${column.key}-header`,
4494
4499
  ...getDragProps(column),
4495
- 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}`,
4500
+ 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}`,
4496
4501
  onClick: () => {
4497
4502
  if (column.sortable) {
4498
4503
  handleSort(column.key);