@ctlyst.id/internal-ui 4.2.7 → 4.3.1

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.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,
@@ -7361,11 +7374,6 @@ var baseStyle11 = definePartsStyle10({
7361
7374
  td: {
7362
7375
  backgroundColor: "neutral.200"
7363
7376
  }
7364
- },
7365
- '&[aria-selected="true"]': {
7366
- td: {
7367
- backgroundColor: "danger.50"
7368
- }
7369
7377
  }
7370
7378
  }
7371
7379
  }
@@ -7384,7 +7392,7 @@ var baseStyle11 = definePartsStyle10({
7384
7392
  backgroundColor: "neutral.50"
7385
7393
  },
7386
7394
  td: {
7387
- // backgroundColor: 'neutral.50',
7395
+ backgroundColor: "white",
7388
7396
  textAlign: "start",
7389
7397
  minHeight: "56px",
7390
7398
  _disabled: {