@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 +10 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -965,7 +965,7 @@ var counter_default = Counter;
|
|
|
965
965
|
|
|
966
966
|
// src/components/data-table/components/data-table.tsx
|
|
967
967
|
import { ChevronDownIcon, ChevronUpIcon, UpDownIcon } from "@chakra-ui/icons";
|
|
968
|
-
import { Box as Box11, Flex as Flex2, Skeleton as Skeleton2, Table, Tbody, Td, Th, Thead, Tr, useColorModeValue } from "@chakra-ui/react";
|
|
968
|
+
import { Box as Box11, Flex as Flex2, keyframes, Skeleton as Skeleton2, Table, Tbody, Td, Th, Thead, Tr, useColorModeValue } from "@chakra-ui/react";
|
|
969
969
|
import { css } from "@emotion/react";
|
|
970
970
|
import { flexRender, getCoreRowModel, getSortedRowModel, useReactTable } from "@tanstack/react-table";
|
|
971
971
|
import * as React5 from "react";
|
|
@@ -1109,6 +1109,10 @@ var getCommonPinningStyles = (column, paddingRowX) => {
|
|
|
1109
1109
|
} : {}
|
|
1110
1110
|
};
|
|
1111
1111
|
};
|
|
1112
|
+
var fadeIn = keyframes`
|
|
1113
|
+
from { opacity: 0; }
|
|
1114
|
+
to { opacity: 1; }
|
|
1115
|
+
`;
|
|
1112
1116
|
var useDataTable = ({
|
|
1113
1117
|
columns,
|
|
1114
1118
|
dataSource = [],
|
|
@@ -1320,24 +1324,25 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
|
1320
1324
|
...((_e = columnPinning == null ? void 0 : columnPinning.right) == null ? void 0 : _e.length) && hasScroll ? { "data-pin-right": true } : {},
|
|
1321
1325
|
...container,
|
|
1322
1326
|
children: isLoading ? /* @__PURE__ */ jsxs8(Table, { ...styles == null ? void 0 : styles.table, "data-loading": "true", children: [
|
|
1323
|
-
/* @__PURE__ */ jsx24(Thead, { ...(styles == null ? void 0 : styles.tableHead, headerSticky ? { position: "sticky", top: 0, bg: "white", zIndex: 1 } : {}), children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx24(Tr, {
|
|
1327
|
+
/* @__PURE__ */ jsx24(Thead, { ...(styles == null ? void 0 : styles.tableHead, headerSticky ? { position: "sticky", top: 0, bg: "white", zIndex: 1 } : {}), children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx24(Tr, { ...styles == null ? void 0 : styles.tableRow, children: headerGroup.headers.map((header, index) => /* @__PURE__ */ jsx24(
|
|
1324
1328
|
Th,
|
|
1325
1329
|
{
|
|
1326
1330
|
colSpan: header.colSpan,
|
|
1327
|
-
width: `${header.getSize()}px`,
|
|
1328
1331
|
_first: { paddingLeft: `${paddingRowX + 8}px` },
|
|
1329
1332
|
_last: { paddingRight: `${paddingRowX + 8}px` },
|
|
1330
1333
|
...styles == null ? void 0 : styles.tableColumnHeader,
|
|
1334
|
+
...getTableHeaderSize(header, index, headerGroup.headers.length),
|
|
1331
1335
|
children: /* @__PURE__ */ jsx24(Flex2, { "data-test-id": "CT_component_data-table_loader", align: "center", gap: 2, children: flexRender(header.column.columnDef.header, header.getContext()) })
|
|
1332
1336
|
},
|
|
1333
1337
|
header.id
|
|
1334
1338
|
)) }, headerGroup.id)) }),
|
|
1335
|
-
/* @__PURE__ */ jsx24(Tbody, { children: [...Array(5)].map((num) => /* @__PURE__ */ jsx24(Tr, { mx: "2", children: [...Array(generateColumn().length)].map((i) => /* @__PURE__ */ jsx24(
|
|
1339
|
+
/* @__PURE__ */ jsx24(Tbody, { ...styles == null ? void 0 : styles.tableBody, children: [...Array(5)].map((num) => /* @__PURE__ */ jsx24(Tr, { mx: "2", ...styles == null ? void 0 : styles.tableRow, children: [...Array(generateColumn().length)].map((i) => /* @__PURE__ */ jsx24(
|
|
1336
1340
|
Td,
|
|
1337
1341
|
{
|
|
1338
|
-
width:
|
|
1342
|
+
width: "100%",
|
|
1339
1343
|
_first: { paddingLeft: `${paddingRowX + 8}px` },
|
|
1340
1344
|
_last: { paddingRight: `${paddingRowX + 8}px` },
|
|
1345
|
+
...styles == null ? void 0 : styles.tableCell,
|
|
1341
1346
|
children: /* @__PURE__ */ jsx24(Skeleton2, { startColor: "neutral.100", endColor: "neutral.200", h: "20px", w: "70%" }, i)
|
|
1342
1347
|
},
|
|
1343
1348
|
i
|
|
@@ -1395,7 +1400,7 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
|
1395
1400
|
}) }, headerGroup.id))
|
|
1396
1401
|
}
|
|
1397
1402
|
),
|
|
1398
|
-
/* @__PURE__ */ jsx24(Tbody, { ...styles == null ? void 0 : styles.tableBody, children: table.getRowModel().rows.map((row, index) => {
|
|
1403
|
+
/* @__PURE__ */ jsx24(Tbody, { ...styles == null ? void 0 : styles.tableBody, animation: `${fadeIn} 0.15s ease-out`, children: table.getRowModel().rows.map((row, index) => {
|
|
1399
1404
|
const isDisabledRow = disabledRow && disabledRow(row.original);
|
|
1400
1405
|
const isHighlightedRow = Object.keys(selectedRow != null ? selectedRow : {}).filter((key) => selectedRow == null ? void 0 : selectedRow[key]).includes(row.id) || highlightedRow && highlightedRow(row.original);
|
|
1401
1406
|
return /* @__PURE__ */ jsx24(
|
|
@@ -7309,8 +7314,8 @@ var input_default = Input4;
|
|
|
7309
7314
|
|
|
7310
7315
|
// src/config/theme/components/loader.ts
|
|
7311
7316
|
import { defineStyleConfig as defineStyleConfig4 } from "@chakra-ui/styled-system";
|
|
7312
|
-
import { keyframes } from "@emotion/react";
|
|
7313
|
-
var rotate =
|
|
7317
|
+
import { keyframes as keyframes2 } from "@emotion/react";
|
|
7318
|
+
var rotate = keyframes2({
|
|
7314
7319
|
"0%": {
|
|
7315
7320
|
transform: "rotate(0deg)"
|
|
7316
7321
|
},
|