@ctlyst.id/internal-ui 4.2.6 → 4.3.0

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.mjs CHANGED
@@ -941,7 +941,6 @@ var getCommonPinningStyles = (column) => {
941
941
  right: isPinned === "right" ? `${column.getAfter("right")}px` : void 0,
942
942
  position: isPinned ? "sticky" : "relative",
943
943
  zIndex: isPinned ? 1 : 0,
944
- backgroundColor: "white",
945
944
  ...isFirstLeftPinnedColumn ? {
946
945
  pl: "16px"
947
946
  } : { pl: "8px" },
@@ -1090,6 +1089,7 @@ var DataTable = React5.forwardRef((props, ref) => {
1090
1089
  columnPinning,
1091
1090
  disabledRow,
1092
1091
  highlightedRow,
1092
+ highlightRowColor,
1093
1093
  cellLineClamp = 2
1094
1094
  } = props;
1095
1095
  const { table, toggleAllRowsSelected, generateColumn } = useDataTable(props);
@@ -1106,6 +1106,13 @@ var DataTable = React5.forwardRef((props, ref) => {
1106
1106
  (_e2 = refTable.current) == null ? void 0 : _e2.setAttribute("data-pin-right", "true");
1107
1107
  }
1108
1108
  };
1109
+ const getTableHighlightStyle = (highlightColor = "primary.50") => {
1110
+ return {
1111
+ td: {
1112
+ background: `${highlightColor} !important`
1113
+ }
1114
+ };
1115
+ };
1109
1116
  let lastPinnedColumn = 0;
1110
1117
  React5.useEffect(() => {
1111
1118
  var _a2;
@@ -1223,7 +1230,9 @@ var DataTable = React5.forwardRef((props, ref) => {
1223
1230
  {
1224
1231
  "data-test-id": "-RU0hNYGRzeVM3HQ4cXHl",
1225
1232
  ...styles == null ? void 0 : styles.tableRow,
1226
- "aria-selected": isHighlightedRow,
1233
+ sx: { ...isHighlightedRow && getTableHighlightStyle() },
1234
+ "aria-disabled": isDisabledRow,
1235
+ "data-highlight": isHighlightedRow ? "true" : "false",
1227
1236
  css: css`
1228
1237
  &:last-child {
1229
1238
  td {
@@ -1242,6 +1251,8 @@ var DataTable = React5.forwardRef((props, ref) => {
1242
1251
  var _a2;
1243
1252
  (_a2 = e.currentTarget) == null ? void 0 : _a2.removeAttribute("data-active");
1244
1253
  },
1254
+ opacity: isDisabledRow ? 0.4 : 1,
1255
+ pointerEvents: isDisabledRow ? "none" : "auto",
1245
1256
  onClick: () => {
1246
1257
  if (onRowClick) {
1247
1258
  if (isDisabledRow) return;
@@ -1256,7 +1267,9 @@ var DataTable = React5.forwardRef((props, ref) => {
1256
1267
  {
1257
1268
  "data-test-id": `CT_Component_TableCell_${cell.id}`,
1258
1269
  fontSize: "text.sm",
1259
- sx: getCommonPinningStyles(cell.column),
1270
+ sx: {
1271
+ ...getCommonPinningStyles(cell.column)
1272
+ },
1260
1273
  ...styles == null ? void 0 : styles.tableCell,
1261
1274
  children: /* @__PURE__ */ jsx24(
1262
1275
  Flex2,
@@ -7384,7 +7397,7 @@ var baseStyle11 = definePartsStyle10({
7384
7397
  backgroundColor: "neutral.50"
7385
7398
  },
7386
7399
  td: {
7387
- // backgroundColor: 'neutral.50',
7400
+ backgroundColor: "white",
7388
7401
  textAlign: "start",
7389
7402
  minHeight: "56px",
7390
7403
  _disabled: {
@@ -7409,12 +7422,12 @@ var variantSimple = definePartsStyle10((props) => {
7409
7422
  th: {
7410
7423
  color: "black.high",
7411
7424
  borderBottom: "1px",
7412
- borderColor: mode2(`${c}.100`, `${c}.700`)(props),
7425
+ borderColor: mode2(`${c}.300`, `${c}.700`)(props),
7413
7426
  ...numericStyles
7414
7427
  },
7415
7428
  td: {
7416
7429
  borderBottom: "1px",
7417
- borderColor: mode2(`${c}.100`, `${c}.700`)(props),
7430
+ borderColor: mode2(`${c}.300`, `${c}.700`)(props),
7418
7431
  ...numericStyles
7419
7432
  },
7420
7433
  caption: {
@@ -7435,12 +7448,12 @@ var variantStripe = definePartsStyle10((props) => {
7435
7448
  th: {
7436
7449
  color: "black.high",
7437
7450
  borderBottom: "1px",
7438
- borderColor: mode2(`${c}.100`, `${c}.700`)(props),
7451
+ borderColor: mode2(`${c}.300`, `${c}.700`)(props),
7439
7452
  ...numericStyles
7440
7453
  },
7441
7454
  td: {
7442
7455
  borderBottom: "1px",
7443
- borderColor: mode2(`${c}.100`, `${c}.700`)(props),
7456
+ borderColor: mode2(`${c}.300`, `${c}.700`)(props),
7444
7457
  ...numericStyles
7445
7458
  },
7446
7459
  caption: {
@@ -7537,7 +7550,7 @@ var tableTheme = defineMultiStyleConfig10({
7537
7550
  defaultProps: {
7538
7551
  variant: "simple",
7539
7552
  size: "md",
7540
- colorScheme: "gray"
7553
+ colorScheme: "neutral"
7541
7554
  }
7542
7555
  });
7543
7556
  var table_default = tableTheme;