@eztrak/shared 0.15.0 → 0.15.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.
@@ -1582,13 +1582,14 @@ import {
1582
1582
  FaTrashAlt
1583
1583
  } from "react-icons/fa";
1584
1584
  var ROW_ACTION_ITEM_HOVER_CLASS = "hover:bg-primary-50 hover:text-primary-150";
1585
+ var ROW_ACTION_ITEM_TEXT_CLASS = "text-secondary";
1585
1586
  var ROW_ACTION_DEFAULT_ICON_SIZE = 16;
1586
1587
  var ROW_ACTION_DEFAULT_MENU_TOOLTIP_STYLE = {
1587
1588
  zIndex: 1e4
1588
1589
  };
1589
1590
  var ROW_ACTION_PRESETS = {
1590
1591
  edit: { label: "Edit", icon: FaEdit },
1591
- delete: { label: "Delete", icon: FaTrashAlt, danger: true },
1592
+ delete: { label: "Delete", icon: FaTrashAlt, danger: true, iconClassName: "text-red-500" },
1592
1593
  view: { label: "View", icon: FaEye },
1593
1594
  notes: { label: "Notes", icon: FaFileAlt },
1594
1595
  history: { label: "History", icon: FaHistory },
@@ -1604,6 +1605,7 @@ function ActionMenuItem({
1604
1605
  icon: Icon,
1605
1606
  iconSize = ROW_ACTION_DEFAULT_ICON_SIZE,
1606
1607
  iconClassName,
1608
+ labelClassName,
1607
1609
  tooltip,
1608
1610
  tooltipPlacement = "top",
1609
1611
  tooltipDelayShow,
@@ -1642,9 +1644,9 @@ function ActionMenuItem({
1642
1644
  },
1643
1645
  className: cn(
1644
1646
  "flex items-center gap-2 text-sm transition-colors duration-150",
1647
+ ROW_ACTION_ITEM_TEXT_CLASS,
1645
1648
  showLabel ? "w-full rounded-xl px-3 py-2 text-left" : "justify-center rounded-md p-1",
1646
1649
  disabled ? "cursor-not-allowed opacity-50" : ROW_ACTION_ITEM_HOVER_CLASS,
1647
- danger && "text-red-500",
1648
1650
  highlight && !danger && "text-primary-150",
1649
1651
  className
1650
1652
  ),
@@ -1657,7 +1659,7 @@ function ActionMenuItem({
1657
1659
  size: iconSize
1658
1660
  }
1659
1661
  ) : null,
1660
- showLabel ? /* @__PURE__ */ jsx13("span", { children: label }) : null
1662
+ showLabel ? /* @__PURE__ */ jsx13("span", { className: labelClassName, children: label }) : null
1661
1663
  ]
1662
1664
  }
1663
1665
  )
@@ -1706,7 +1708,9 @@ function resolveActions(actions, data, hasPermission, presets) {
1706
1708
  tooltipPlacement: action.tooltipPlacement,
1707
1709
  confirm: action.confirm,
1708
1710
  closeOnClick: action.closeOnClick !== false,
1709
- className: action.className
1711
+ className: action.className,
1712
+ iconClassName: cn(preset?.iconClassName, action.iconClassName) || void 0,
1713
+ labelClassName: action.labelClassName
1710
1714
  };
1711
1715
  return [resolved];
1712
1716
  });
@@ -1738,6 +1742,7 @@ function RowActions({
1738
1742
  menuClassName,
1739
1743
  itemClassName,
1740
1744
  itemIconClassName,
1745
+ itemLabelClassName,
1741
1746
  iconSize = ROW_ACTION_DEFAULT_ICON_SIZE,
1742
1747
  triggerTooltip = "Actions",
1743
1748
  triggerAriaLabel = "Row actions",
@@ -1783,7 +1788,8 @@ function RowActions({
1783
1788
  label: action.label,
1784
1789
  icon: action.icon,
1785
1790
  iconSize: action.iconSize ?? iconSize,
1786
- iconClassName: itemIconClassName,
1791
+ iconClassName: cn(itemIconClassName, action.iconClassName),
1792
+ labelClassName: cn(itemLabelClassName, action.labelClassName),
1787
1793
  tooltip: action.tooltip,
1788
1794
  tooltipPlacement: action.tooltipPlacement ?? tooltipPlacement,
1789
1795
  tooltipDelayShow,
@@ -1961,6 +1967,7 @@ export {
1961
1967
  CustomCellEditor,
1962
1968
  PopupCellRenderer,
1963
1969
  ROW_ACTION_ITEM_HOVER_CLASS,
1970
+ ROW_ACTION_ITEM_TEXT_CLASS,
1964
1971
  ROW_ACTION_DEFAULT_ICON_SIZE,
1965
1972
  ROW_ACTION_DEFAULT_MENU_TOOLTIP_STYLE,
1966
1973
  ROW_ACTION_PRESETS,
@@ -1969,4 +1976,4 @@ export {
1969
1976
  RowActions,
1970
1977
  TableErrorBoundary
1971
1978
  };
1972
- //# sourceMappingURL=chunk-KFBKDGZV.mjs.map
1979
+ //# sourceMappingURL=chunk-HQPQ6TOE.mjs.map