@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 +7 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -6
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4147,14 +4147,15 @@ 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
|
+
const paddingClass = hasSortIcon ? column.align === "center" ? "pl-1" : "pl-3" : "px-3";
|
|
4152
4153
|
return /* @__PURE__ */ jsxs("div", { className: "flex items-center w-full", children: [
|
|
4153
|
-
hasSortIcon && column.align === "center" && /* @__PURE__ */ jsx("div", { className: "w-5 shrink-0" }),
|
|
4154
|
+
hasSortIcon && column.align === "center" && !column.isWrap && /* @__PURE__ */ jsx("div", { className: "w-5 shrink-0" }),
|
|
4154
4155
|
/* @__PURE__ */ jsx(
|
|
4155
4156
|
"span",
|
|
4156
4157
|
{
|
|
4157
|
-
className: `flex-1
|
|
4158
|
+
className: `flex-1 min-w-0 ${paddingClass} ${textAlignClass} ${baseClasses} ${isClickableHead} ${subTitleClasses}`,
|
|
4158
4159
|
style: hasWrapParts ? { wordBreak: "keep-all" } : void 0,
|
|
4159
4160
|
children: titleContent
|
|
4160
4161
|
}
|
|
@@ -4208,7 +4209,7 @@ function TableHeader(props) {
|
|
|
4208
4209
|
{
|
|
4209
4210
|
id: `${column.key}-header`,
|
|
4210
4211
|
...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
|
|
4212
|
+
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
4213
|
onClick: () => {
|
|
4213
4214
|
if (column.sortable) {
|
|
4214
4215
|
handleSort(column.key);
|
|
@@ -4388,7 +4389,7 @@ function TableHeader(props) {
|
|
|
4388
4389
|
{
|
|
4389
4390
|
id: `${column.key}-header`,
|
|
4390
4391
|
...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
|
|
4392
|
+
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
4393
|
onClick: () => {
|
|
4393
4394
|
if (column.sortable) {
|
|
4394
4395
|
handleSort(column.key);
|
|
@@ -4492,7 +4493,7 @@ function TableHeader(props) {
|
|
|
4492
4493
|
{
|
|
4493
4494
|
id: `${column.key}-header`,
|
|
4494
4495
|
...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
|
|
4496
|
+
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
4497
|
onClick: () => {
|
|
4497
4498
|
if (column.sortable) {
|
|
4498
4499
|
handleSort(column.key);
|