react-better-html 1.1.121 → 1.1.122

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.d.mts CHANGED
@@ -769,11 +769,14 @@ type TooltipComponent = {
769
769
  declare const TooltipComponent: TooltipComponent;
770
770
  type TooltipItemProps<Value = unknown> = {
771
771
  icon?: IconName | AnyOtherString;
772
+ iconColor?: string;
772
773
  text?: string;
774
+ textColor?: string;
773
775
  description?: string;
774
776
  isActive?: boolean;
775
777
  value?: Value;
776
778
  id?: string;
779
+ disabled?: boolean;
777
780
  onClick?: () => void;
778
781
  onClickWithValue?: (value: Value) => void;
779
782
  };
package/dist/index.d.ts CHANGED
@@ -769,11 +769,14 @@ type TooltipComponent = {
769
769
  declare const TooltipComponent: TooltipComponent;
770
770
  type TooltipItemProps<Value = unknown> = {
771
771
  icon?: IconName | AnyOtherString;
772
+ iconColor?: string;
772
773
  text?: string;
774
+ textColor?: string;
773
775
  description?: string;
774
776
  isActive?: boolean;
775
777
  value?: Value;
776
778
  id?: string;
779
+ disabled?: boolean;
777
780
  onClick?: () => void;
778
781
  onClickWithValue?: (value: Value) => void;
779
782
  };
package/dist/index.js CHANGED
@@ -7972,7 +7972,19 @@ var TooltipComponent = (0, import_react24.forwardRef)(function Tooltip({
7972
7972
  }
7973
7973
  );
7974
7974
  });
7975
- TooltipComponent.item = (0, import_react24.forwardRef)(function Item({ icon, text, description, isActive, value, id, onClick, onClickWithValue }, ref) {
7975
+ TooltipComponent.item = (0, import_react24.forwardRef)(function Item({
7976
+ icon,
7977
+ iconColor,
7978
+ text,
7979
+ textColor,
7980
+ description,
7981
+ isActive,
7982
+ value,
7983
+ id,
7984
+ disabled,
7985
+ onClick,
7986
+ onClickWithValue
7987
+ }, ref) {
7976
7988
  const theme2 = useTheme();
7977
7989
  return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
7978
7990
  Div_default.row,
@@ -7980,20 +7992,21 @@ TooltipComponent.item = (0, import_react24.forwardRef)(function Item({ icon, tex
7980
7992
  alignItems: "center",
7981
7993
  gap: theme2.styles.space,
7982
7994
  backgroundColor: theme2.colors.backgroundContent,
7983
- filterHover: "brightness(0.9)",
7995
+ filterHover: !disabled ? "brightness(0.9)" : "brightness(0.94)",
7984
7996
  paddingBlock: theme2.styles.gap,
7985
7997
  paddingInline: theme2.styles.space,
7986
- cursor: "pointer",
7998
+ cursor: disabled ? "not-allowed" : "pointer",
7987
7999
  isTabAccessed: true,
7988
8000
  id,
8001
+ opacity: disabled ? 0.4 : void 0,
7989
8002
  value,
7990
- onClick,
7991
- onClickWithValue,
8003
+ onClick: !disabled ? onClick : void 0,
8004
+ onClickWithValue: !disabled ? onClickWithValue : void 0,
7992
8005
  ref,
7993
8006
  children: [
7994
- icon && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Icon_default, { name: icon, color: !isActive ? theme2.colors.textSecondary : void 0 }),
8007
+ icon && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Icon_default, { name: icon, color: iconColor ?? (!isActive ? theme2.colors.textSecondary : void 0) }),
7995
8008
  /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Div_default.column, { flex: 1, gap: theme2.styles.gap / 2, children: [
7996
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text_default, { fontWeight: isActive ? 700 : void 0, children: text }),
8009
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text_default, { fontWeight: isActive ? 700 : void 0, color: textColor ?? theme2.colors.textPrimary, children: text }),
7997
8010
  description && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Text_default, { fontSize: 14, color: theme2.colors.textSecondary, children: description })
7998
8011
  ] })
7999
8012
  ]