@ctlyst.id/internal-ui 5.6.2 → 5.6.4

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
@@ -1466,6 +1466,10 @@ var getCommonPinningStyles = (column, paddingRowX) => {
1466
1466
  } : {}
1467
1467
  };
1468
1468
  };
1469
+ var fadeIn = import_react30.keyframes`
1470
+ from { opacity: 0; }
1471
+ to { opacity: 1; }
1472
+ `;
1469
1473
  var useDataTable = ({
1470
1474
  columns,
1471
1475
  dataSource = [],
@@ -1677,24 +1681,25 @@ var DataTable = React5.forwardRef((props, ref) => {
1677
1681
  ...((_e = columnPinning == null ? void 0 : columnPinning.right) == null ? void 0 : _e.length) && hasScroll ? { "data-pin-right": true } : {},
1678
1682
  ...container,
1679
1683
  children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react30.Table, { ...styles == null ? void 0 : styles.table, "data-loading": "true", children: [
1680
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.Thead, { ...(styles == null ? void 0 : styles.tableHead, headerSticky ? { position: "sticky", top: 0, bg: "white", zIndex: 1 } : {}), children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.Tr, { mx: "2", ...styles == null ? void 0 : styles.tableRow, children: headerGroup.headers.map((header, index) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1684
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.Thead, { ...(styles == null ? void 0 : styles.tableHead, headerSticky ? { position: "sticky", top: 0, bg: "white", zIndex: 1 } : {}), children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.Tr, { ...styles == null ? void 0 : styles.tableRow, children: headerGroup.headers.map((header, index) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1681
1685
  import_react30.Th,
1682
1686
  {
1683
1687
  colSpan: header.colSpan,
1684
- width: `${header.getSize()}px`,
1685
1688
  _first: { paddingLeft: `${paddingRowX + 8}px` },
1686
1689
  _last: { paddingRight: `${paddingRowX + 8}px` },
1687
1690
  ...styles == null ? void 0 : styles.tableColumnHeader,
1691
+ ...getTableHeaderSize(header, index, headerGroup.headers.length),
1688
1692
  children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.Flex, { "data-test-id": "CT_component_data-table_loader", align: "center", gap: 2, children: (0, import_react_table.flexRender)(header.column.columnDef.header, header.getContext()) })
1689
1693
  },
1690
1694
  header.id
1691
1695
  )) }, headerGroup.id)) }),
1692
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.Tbody, { children: [...Array(5)].map((num) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.Tr, { mx: "2", children: [...Array(generateColumn().length)].map((i) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1696
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.Tbody, { ...styles == null ? void 0 : styles.tableBody, children: [...Array(5)].map((num) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.Tr, { mx: "2", ...styles == null ? void 0 : styles.tableRow, children: [...Array(generateColumn().length)].map((i) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1693
1697
  import_react30.Td,
1694
1698
  {
1695
- width: 210,
1699
+ width: "100%",
1696
1700
  _first: { paddingLeft: `${paddingRowX + 8}px` },
1697
1701
  _last: { paddingRight: `${paddingRowX + 8}px` },
1702
+ ...styles == null ? void 0 : styles.tableCell,
1698
1703
  children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.Skeleton, { startColor: "neutral.100", endColor: "neutral.200", h: "20px", w: "70%" }, i)
1699
1704
  },
1700
1705
  i
@@ -1752,7 +1757,7 @@ var DataTable = React5.forwardRef((props, ref) => {
1752
1757
  }) }, headerGroup.id))
1753
1758
  }
1754
1759
  ),
1755
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.Tbody, { ...styles == null ? void 0 : styles.tableBody, children: table.getRowModel().rows.map((row, index) => {
1760
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.Tbody, { ...styles == null ? void 0 : styles.tableBody, animation: `${fadeIn} 0.15s ease-out`, children: table.getRowModel().rows.map((row, index) => {
1756
1761
  const isDisabledRow = disabledRow && disabledRow(row.original);
1757
1762
  const isHighlightedRow = Object.keys(selectedRow != null ? selectedRow : {}).filter((key) => selectedRow == null ? void 0 : selectedRow[key]).includes(row.id) || highlightedRow && highlightedRow(row.original);
1758
1763
  return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(