opus-toolkit-components 0.5.0 → 0.5.2

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.
@@ -716,6 +716,7 @@ function Button(_ref) {
716
716
  // Optional animation for icon hover
717
717
  className = '',
718
718
  // Accepts additional custom class
719
+ title = '',
719
720
  onClick
720
721
  } = _ref;
721
722
  // Define styles for button ranks
@@ -737,6 +738,8 @@ function Button(_ref) {
737
738
  const classNames = "\n ".concat(state === 'disabled' ? disabledStyles : rankStyles[rank] || rankStyles.primary, "\n group\n transition \n ease-in-out \n duration-700 \n rounded-lg \n px-6 \n py-2 \n text-").concat(size, " \n flex \n items-center\n justify-center\n whitespace-nowrap // Prevents text wrapping\n ").concat(isFullWidth ? 'w-full' : '', "\n ").concat(className, "\n ");
738
739
  return /*#__PURE__*/external_react_default().createElement("button", {
739
740
  type: type,
741
+ title: title,
742
+ "aria-label": title,
740
743
  className: classNames,
741
744
  onClick: state === 'disabled' ? null : onClick,
742
745
  disabled: state === 'disabled'
@@ -1003,22 +1006,26 @@ function Table(_ref) {
1003
1006
  // Array defining columns and rendering logic
1004
1007
  rows = [],
1005
1008
  // Array defining rows
1006
- className = "",
1009
+ className = '',
1010
+ rowClassName = '',
1011
+ cellClassName = '',
1012
+ headRowClassName = '',
1013
+ headCellClassName = '',
1007
1014
  rowKeyExtractor = (row, index) => index // Function to extract unique keys for rows
1008
1015
  } = _ref;
1009
1016
  return /*#__PURE__*/external_react_default().createElement("table", {
1010
1017
  className: "w-full table-auto text-left border-collapse ".concat(className)
1011
1018
  }, /*#__PURE__*/external_react_default().createElement("thead", null, /*#__PURE__*/external_react_default().createElement("tr", {
1012
- className: "bg-greyBaseDark900"
1019
+ className: "bg-greyBaseDark900 ".concat(headRowClassName)
1013
1020
  }, data.map(column => /*#__PURE__*/external_react_default().createElement("th", {
1014
1021
  key: column.key,
1015
- className: "border-b border-gray-300 py-2 px-4 text-sm font-normal text-greyDark1000"
1022
+ className: "border-b border-gray-300 py-2 px-4 text-sm font-normal text-greyDark1000 ".concat(headCellClassName)
1016
1023
  }, column.header)))), /*#__PURE__*/external_react_default().createElement("tbody", null, rows.map((row, index) => /*#__PURE__*/external_react_default().createElement("tr", {
1017
1024
  key: rowKeyExtractor(row, index),
1018
- className: "".concat(index % 2 === 0 ? "bg-greyLight100" : "bg-greyLight50", " hover:bg-greyLight500")
1025
+ className: "".concat(index % 2 === 0 ? "bg-greyLight100" : "bg-greyLight50", " hover:bg-greyLight500 ").concat(rowClassName)
1019
1026
  }, data.map(column => /*#__PURE__*/external_react_default().createElement("td", {
1020
1027
  key: column.key,
1021
- className: "p-4 text-sm text-greyLight700"
1028
+ className: "p-4 text-sm text-greyLight700 ".concat(cellClassName)
1022
1029
  }, column.render ? column.render(row) : row[column.key]))))));
1023
1030
  }
1024
1031
  ;// ./node_modules/@react-aria/utils/dist/platform.mjs
@@ -9493,4 +9500,4 @@ const Modal = _ref => {
9493
9500
  /******/ })()
9494
9501
  ;
9495
9502
  });
9496
- //# sourceMappingURL=main.a19a73517a94be49c0dc.js.map
9503
+ //# sourceMappingURL=main.06986501865044f51795.js.map