@mahatisystems/mahati-ui-components 5.3.1 → 5.3.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.
package/dist/index.mjs CHANGED
@@ -505,6 +505,17 @@ var ButtonBase = React2.forwardRef(function(_0, _1) {
505
505
  "style"
506
506
  ]), _rest1 = _sliced_to_array(_rest, 1), ref = _rest1[0];
507
507
  var color = getColorByName(name);
508
+ var getHoverStyles = function getHoverStyles() {
509
+ if (iconButtonHoverBgClass) return {};
510
+ if (iconButtonHoverIntensity) {
511
+ var opacity = iconButtonHoverIntensity / 100;
512
+ return {
513
+ "--hover-bg": "rgba(0,0,0,".concat(opacity, ")"),
514
+ "--active-bg": "rgba(0,0,0,".concat(Math.min(opacity + 0.2, 1), ")")
515
+ };
516
+ }
517
+ return {};
518
+ };
508
519
  if (iconButton) {
509
520
  var height = parseHeightWidth(iconButtonHeightClass);
510
521
  var width = parseHeightWidth(iconButtonWidthClass);
@@ -516,8 +527,11 @@ var ButtonBase = React2.forwardRef(function(_0, _1) {
516
527
  minHeight: height,
517
528
  minWidth: width,
518
529
  color: color.startsWith("linear") ? "white" : color
530
+ }, iconButtonHoverIntensity && {
531
+ "--hover-bg": "rgba(0,0,0,".concat(iconButtonHoverIntensity / 100, ")"),
532
+ "--active-bg": "rgba(0,0,0,".concat(Math.min(iconButtonHoverIntensity / 100 + 0.2, 1), ")")
519
533
  }, style),
520
- className: "\n inline-flex items-center justify-center\n transition-all duration-200\n focus-visible:outline focus-visible:outline-2 focus-visible:outline-white\n ".concat(iconButtonRadiusClass || "rounded-md", "\n ").concat(iconButtonBgPaddingClass || "p-[2px]", "\n ").concat(iconButtonBgClass || "bg-white/10", "\n hover:opacity-85 active:opacity-70\n ").concat(className || "", "\n ")
534
+ className: "\n inline-flex items-center justify-center\n transition-all duration-200\n ".concat(iconButtonRadiusClass || "rounded-md", "\n ").concat(iconButtonBgPaddingClass || "p-[2px]", "\n ").concat(iconButtonBgClass || "bg-white/10", "\n\n ").concat(iconButtonHoverBgClass ? iconButtonHoverBgClass : iconButtonHoverIntensity ? "hover:bg-[var(--hover-bg)] active:bg-[var(--active-bg)]" : "hover:opacity-85 active:opacity-70", "\n\n ").concat(className || "", "\n")
521
535
  }, props), {
522
536
  children: children
523
537
  }));
@@ -532,7 +546,10 @@ var ButtonBase = React2.forwardRef(function(_0, _1) {
532
546
  }, style) : style,
533
547
  className: "\n inline-flex items-center justify-center\n whitespace-nowrap\n font-medium\n text-[14px]\n transition-all duration-200\n cursor-pointer\n focus-visible:outline focus-visible:outline-2 focus-visible:outline-blue-400\n disabled:pointer-events-none disabled:opacity-50\n ".concat(!name ? variantClasses[variant] : "", "\n ").concat(sizeClasses[size], "\n ").concat(className || "", "\n ")
534
548
  }, props), {
535
- children: children
549
+ children: /* @__PURE__ */ jsx2("span", {
550
+ className: "".concat(iconButtonBgPaddingClass || "p-[2px]", " flex items-center justify-center"),
551
+ children: children
552
+ })
536
553
  }));
537
554
  });
538
555
  ButtonBase.displayName = "Button";
@@ -12600,7 +12617,8 @@ var MahatiCameraAccessModal = function MahatiCameraAccessModal(param) {
12600
12617
  onClick: onClose,
12601
12618
  className: "absolute right-5 top-5 flex h-8 w-8 items-center justify-center rounded-full bg-white shadow-[0_2px_6px_rgba(0,0,0,0.15)]",
12602
12619
  children: /* @__PURE__ */ jsx33(X4, {
12603
- size: 16
12620
+ size: 16,
12621
+ color: "black"
12604
12622
  })
12605
12623
  }),
12606
12624
  image && /* @__PURE__ */ jsx33("div", {