cr-ui-lib 1.1.51 → 1.1.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.js +115 -110
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +115 -110
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3208,7 +3208,7 @@ var MultipleAutoSuggestionInput = ({
|
|
|
3208
3208
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3209
3209
|
"div",
|
|
3210
3210
|
{
|
|
3211
|
-
className: `absolute
|
|
3211
|
+
className: `absolute transition-transform duration-200 ${!isDropdownOpen ? "rotate-180" : ""} ${hasIcon ? "block" : "hidden"} ${iconClass}`,
|
|
3212
3212
|
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3213
3213
|
"svg",
|
|
3214
3214
|
{
|
|
@@ -4867,121 +4867,126 @@ var DynamicTableV2 = ({
|
|
|
4867
4867
|
tableSubDivClass
|
|
4868
4868
|
),
|
|
4869
4869
|
children: [
|
|
4870
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex
|
|
4871
|
-
/* @__PURE__ */ jsxRuntime.
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
|
|
4878
|
-
|
|
4879
|
-
|
|
4880
|
-
verticalAlign: "bottom"
|
|
4881
|
-
},
|
|
4882
|
-
onClick: () => column.sortable && handleSort(column.selector),
|
|
4883
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4884
|
-
"div",
|
|
4870
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-grow overflow-y-auto", children: [
|
|
4871
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4872
|
+
"table",
|
|
4873
|
+
{
|
|
4874
|
+
ref: tableRef,
|
|
4875
|
+
className: "min-w-full",
|
|
4876
|
+
style: { tableLayout: "fixed" },
|
|
4877
|
+
children: [
|
|
4878
|
+
/* @__PURE__ */ jsxRuntime.jsx("colgroup", { children: columns.map((column) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4879
|
+
"col",
|
|
4885
4880
|
{
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
"span",
|
|
4904
|
-
{
|
|
4905
|
-
className: `${column.isCenteredText && "h-[25px] flex flex-center"} items-center ${column.tableHeaderFontSize ? column.tableHeaderFontSize : "text-[12px]"} font-semibold text-[#131414]`,
|
|
4906
|
-
children: column.name
|
|
4907
|
-
}
|
|
4908
|
-
),
|
|
4909
|
-
column.sortable && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-block ml-2", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4910
|
-
"svg",
|
|
4881
|
+
style: { width: column.width || "150px" }
|
|
4882
|
+
},
|
|
4883
|
+
column.name
|
|
4884
|
+
)) }),
|
|
4885
|
+
!isDisableTableHeader && /* @__PURE__ */ jsxRuntime.jsx("thead", { className: "border-b-2 bg-white sticky top-0 z-10", children: /* @__PURE__ */ jsxRuntime.jsx("tr", { children: columns.map((column, columnIndex) => {
|
|
4886
|
+
var _a2, _b2;
|
|
4887
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4888
|
+
"th",
|
|
4889
|
+
{
|
|
4890
|
+
scope: "col",
|
|
4891
|
+
className: `${(_a2 = tableHeaderCustom == null ? void 0 : tableHeaderCustom.px) != null ? _a2 : "px-1"} pb-[7.5px] ${(tableHeaderCustom == null ? void 0 : tableHeaderCustom.tableHeaderHeight) !== void 0 ? tableHeaderCustom.tableHeaderHeight : "h-[42px]"} text-left tracking-wider cursor-pointer ${column.isLineHeight && "line-height-1"} ${columnIndex === 0 ? "pl-[24px]" : ""} ${columnIndex === columns.length - 1 ? "pr-[24px]" : ""}`,
|
|
4892
|
+
style: {
|
|
4893
|
+
verticalAlign: "bottom"
|
|
4894
|
+
},
|
|
4895
|
+
onClick: () => column.sortable && handleSort(column.selector),
|
|
4896
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4897
|
+
"div",
|
|
4911
4898
|
{
|
|
4912
|
-
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
fill: "none",
|
|
4916
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
4917
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4918
|
-
"path",
|
|
4899
|
+
className: `flex ${column.isJustifyBetween && "justify-between"} ${column.isJustifyBetween && column.className !== void 0 ? column.className : ""} items-center`,
|
|
4900
|
+
children: column.selector === "checkbox" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
4901
|
+
"input",
|
|
4919
4902
|
{
|
|
4920
|
-
|
|
4921
|
-
|
|
4903
|
+
type: "checkbox",
|
|
4904
|
+
checked: (_b2 = tableHeaderCustom == null ? void 0 : tableHeaderCustom.isAllSelected) != null ? _b2 : false,
|
|
4905
|
+
ref: (input) => {
|
|
4906
|
+
var _a3;
|
|
4907
|
+
if (input) {
|
|
4908
|
+
input.indeterminate = (_a3 = tableHeaderCustom == null ? void 0 : tableHeaderCustom.isIndeterminate) != null ? _a3 : false;
|
|
4909
|
+
}
|
|
4910
|
+
},
|
|
4911
|
+
onChange: tableHeaderCustom == null ? void 0 : tableHeaderCustom.toggleAll,
|
|
4912
|
+
className: "cursor-pointer absolute top-6"
|
|
4922
4913
|
}
|
|
4923
|
-
)
|
|
4914
|
+
) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4915
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4916
|
+
"span",
|
|
4917
|
+
{
|
|
4918
|
+
className: `${column.isCenteredText && "h-[25px] flex flex-center"} items-center ${column.tableHeaderFontSize ? column.tableHeaderFontSize : "text-[12px]"} font-semibold text-[#131414]`,
|
|
4919
|
+
children: column.name
|
|
4920
|
+
}
|
|
4921
|
+
),
|
|
4922
|
+
column.sortable && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-block ml-2", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4923
|
+
"svg",
|
|
4924
|
+
{
|
|
4925
|
+
width: "8",
|
|
4926
|
+
height: "12",
|
|
4927
|
+
viewBox: "0 0 8 12",
|
|
4928
|
+
fill: "none",
|
|
4929
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4930
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4931
|
+
"path",
|
|
4932
|
+
{
|
|
4933
|
+
d: "M3.99994 1.88667L6.11328 4L7.05328 3.06L3.99994 0L0.939941 3.06L1.88661 4L3.99994 1.88667ZM3.99994 10.1133L1.88661 8L0.946608 8.94L3.99994 12L7.05994 8.94L6.11328 8L3.99994 10.1133Z",
|
|
4934
|
+
fill: "#323232"
|
|
4935
|
+
}
|
|
4936
|
+
)
|
|
4937
|
+
}
|
|
4938
|
+
) })
|
|
4939
|
+
] })
|
|
4924
4940
|
}
|
|
4925
|
-
)
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4941
|
+
)
|
|
4942
|
+
},
|
|
4943
|
+
column.name
|
|
4944
|
+
);
|
|
4945
|
+
}) }) }),
|
|
4946
|
+
!isLoading && /* @__PURE__ */ jsxRuntime.jsx("tbody", { className: "bg-white divide-y divide-gray-200", children: tableData.map((item, index) => {
|
|
4947
|
+
const rowProps = tableRow ? tableRow(item, index) : {};
|
|
4948
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4949
|
+
"tr",
|
|
4950
|
+
{
|
|
4951
|
+
...rowProps,
|
|
4952
|
+
className: tailwindMerge.twMerge(rowProps.className || ""),
|
|
4953
|
+
children: columns.map((column, columnIndex) => {
|
|
4954
|
+
var _a2, _b2;
|
|
4955
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4956
|
+
"td",
|
|
4957
|
+
{
|
|
4958
|
+
className: `${(_a2 = tableHeaderCustom == null ? void 0 : tableHeaderCustom.px) != null ? _a2 : "px-1"} py-[5px] whitespace-normal text-[12px] font-normal items-center text-[#131414] break-all
|
|
4959
|
+
${columnIndex === 0 ? " pl-[24px] " : ""} ${columnIndex === columns.length - 1 ? " pr-[24px] " : ""}
|
|
4960
|
+
${(_b2 = tableBodyDesign == null ? void 0 : tableBodyDesign.className) != null ? _b2 : ""}
|
|
4961
|
+
`,
|
|
4962
|
+
style: { minHeight: "45px" },
|
|
4963
|
+
children: tableBody ? tableBody(item, column, columnIndex) : item[column.selector]
|
|
4964
|
+
},
|
|
4965
|
+
column.selector
|
|
4966
|
+
);
|
|
4967
|
+
})
|
|
4968
|
+
},
|
|
4969
|
+
index
|
|
4970
|
+
);
|
|
4971
|
+
}) })
|
|
4972
|
+
]
|
|
4973
|
+
}
|
|
4974
|
+
),
|
|
4975
|
+
(isError || tableData.length === 0) && !isLoading && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "container mx-auto", children: /* @__PURE__ */ jsxRuntime.jsx(NoDataComponent, {}) }),
|
|
4976
|
+
isLoading && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4977
|
+
"div",
|
|
4978
|
+
{
|
|
4979
|
+
className: "container mx-auto",
|
|
4980
|
+
style: { borderColor: "rgba(64, 98, 229, 0.2)" },
|
|
4981
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4982
|
+
"div",
|
|
4937
4983
|
{
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
)
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4945
|
-
"tr",
|
|
4946
|
-
{
|
|
4947
|
-
...rowProps,
|
|
4948
|
-
className: tailwindMerge.twMerge(rowProps.className || ""),
|
|
4949
|
-
children: columns.map((column, columnIndex) => {
|
|
4950
|
-
var _a2;
|
|
4951
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4952
|
-
"td",
|
|
4953
|
-
{
|
|
4954
|
-
className: `px-1 py-[5px] whitespace-normal text-[12px] font-normal items-center text-[#131414] break-all
|
|
4955
|
-
${columnIndex === 0 ? " pl-[24px] " : ""} ${columnIndex === columns.length - 1 ? " pr-[24px] " : ""}
|
|
4956
|
-
${(_a2 = tableBodyDesign == null ? void 0 : tableBodyDesign.className) != null ? _a2 : ""}
|
|
4957
|
-
`,
|
|
4958
|
-
style: { width: column.width, minHeight: "45px" },
|
|
4959
|
-
children: tableBody ? tableBody(item, column, columnIndex) : item[column.selector]
|
|
4960
|
-
},
|
|
4961
|
-
column.selector
|
|
4962
|
-
);
|
|
4963
|
-
})
|
|
4964
|
-
},
|
|
4965
|
-
index
|
|
4966
|
-
);
|
|
4967
|
-
}) })
|
|
4968
|
-
] }),
|
|
4969
|
-
(isError || tableData.length === 0) && !isLoading && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "container mx-auto", children: /* @__PURE__ */ jsxRuntime.jsx(NoDataComponent, {}) }),
|
|
4970
|
-
isLoading && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4971
|
-
"div",
|
|
4972
|
-
{
|
|
4973
|
-
className: "container mx-auto",
|
|
4974
|
-
style: { borderColor: "rgba(64, 98, 229, 0.2)" },
|
|
4975
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4976
|
-
"div",
|
|
4977
|
-
{
|
|
4978
|
-
className: `flex justify-center items-center ${loadAndErrorHeight}`,
|
|
4979
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "animate-spin rounded-full h-10 w-10 border-b-2 border-primary" })
|
|
4980
|
-
}
|
|
4981
|
-
)
|
|
4982
|
-
}
|
|
4983
|
-
)
|
|
4984
|
-
] })
|
|
4984
|
+
className: `flex justify-center items-center ${loadAndErrorHeight}`,
|
|
4985
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "animate-spin rounded-full h-10 w-10 border-b-2 border-primary" })
|
|
4986
|
+
}
|
|
4987
|
+
)
|
|
4988
|
+
}
|
|
4989
|
+
)
|
|
4985
4990
|
] }),
|
|
4986
4991
|
hasPagination && tableData && tableData.length > 0 && !isLoading && !isSimpleMode && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4987
4992
|
"div",
|