@ctlyst.id/internal-ui 4.2.0 → 4.2.2

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.mjs CHANGED
@@ -965,7 +965,8 @@ var getCommonPinningStyles = (column) => {
965
965
  right: "0px",
966
966
  bottom: "-1px",
967
967
  top: 0,
968
- transform: "translateX(100%)"
968
+ transform: "translateX(100%)",
969
+ pointerEvents: "none"
969
970
  },
970
971
  "[data-pin-left=true] &:after": {
971
972
  boxShadow: "inset 14px 0px 20px -10px #00000010"
@@ -982,7 +983,8 @@ var getCommonPinningStyles = (column) => {
982
983
  left: "0%",
983
984
  top: 0,
984
985
  bottom: "-1px",
985
- transform: "translateX(-100%)"
986
+ transform: "translateX(-100%)",
987
+ pointerEvents: "none"
986
988
  },
987
989
  "[data-pin-right=true] &:after": {
988
990
  boxShadow: "inset -14px 0px 20px -10px #00000010"
@@ -1092,7 +1094,8 @@ var DataTable = React5.forwardRef((props, ref) => {
1092
1094
  onRowClick,
1093
1095
  container,
1094
1096
  columnPinning,
1095
- isRowDisabled,
1097
+ disabledRow,
1098
+ highlightedRow,
1096
1099
  cellLineClamp = 2
1097
1100
  } = props;
1098
1101
  const { table, toggleAllRowsSelected, generateColumn } = useDataTable(props);
@@ -1219,14 +1222,14 @@ var DataTable = React5.forwardRef((props, ref) => {
1219
1222
  }
1220
1223
  ),
1221
1224
  /* @__PURE__ */ jsx24(Tbody, { ...styles == null ? void 0 : styles.tableBody, children: table.getRowModel().rows.map((row) => {
1222
- const disabledRow = isRowDisabled && isRowDisabled(row.original);
1225
+ const isDisabledRow = disabledRow && disabledRow(row.original);
1226
+ const isHighlightedRow = highlightedRow && highlightedRow(row.original);
1223
1227
  return /* @__PURE__ */ jsx24(
1224
1228
  Tr,
1225
1229
  {
1226
1230
  "data-test-id": "-RU0hNYGRzeVM3HQ4cXHl",
1227
- tabindex: "0",
1228
1231
  ...styles == null ? void 0 : styles.tableRow,
1229
- "aria-disabled": disabledRow,
1232
+ "aria-selected": isHighlightedRow,
1230
1233
  css: css`
1231
1234
  &:last-child {
1232
1235
  td {
@@ -1234,10 +1237,10 @@ var DataTable = React5.forwardRef((props, ref) => {
1234
1237
  }
1235
1238
  }
1236
1239
  `,
1237
- cursor: disabledRow ? "default" : "pointer",
1240
+ cursor: isDisabledRow ? "default" : "pointer",
1238
1241
  onMouseDown: (e) => {
1239
1242
  var _a2;
1240
- if (!disabledRow) {
1243
+ if (!isDisabledRow && !isHighlightedRow) {
1241
1244
  (_a2 = e.currentTarget) == null ? void 0 : _a2.setAttribute("data-active", "true");
1242
1245
  }
1243
1246
  },
@@ -1247,7 +1250,7 @@ var DataTable = React5.forwardRef((props, ref) => {
1247
1250
  },
1248
1251
  onClick: () => {
1249
1252
  if (onRowClick) {
1250
- if (disabledRow) return;
1253
+ if (isDisabledRow) return;
1251
1254
  onRowClick(row.original);
1252
1255
  }
1253
1256
  },
@@ -7364,6 +7367,11 @@ var baseStyle11 = definePartsStyle10({
7364
7367
  td: {
7365
7368
  backgroundColor: "neutral.200"
7366
7369
  }
7370
+ },
7371
+ '&[aria-selected="true"]': {
7372
+ td: {
7373
+ backgroundColor: "danger.50"
7374
+ }
7367
7375
  }
7368
7376
  }
7369
7377
  }