@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.css +12 -5
- package/dist/index.css.map +1 -1
- package/dist/index.js +21 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +21 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -697,6 +697,17 @@ var ButtonBase = import_react2.default.forwardRef(function(_0, _1) {
|
|
|
697
697
|
"style"
|
|
698
698
|
]), _rest1 = _sliced_to_array(_rest, 1), ref = _rest1[0];
|
|
699
699
|
var color = getColorByName(name);
|
|
700
|
+
var getHoverStyles = function getHoverStyles() {
|
|
701
|
+
if (iconButtonHoverBgClass) return {};
|
|
702
|
+
if (iconButtonHoverIntensity) {
|
|
703
|
+
var opacity = iconButtonHoverIntensity / 100;
|
|
704
|
+
return {
|
|
705
|
+
"--hover-bg": "rgba(0,0,0,".concat(opacity, ")"),
|
|
706
|
+
"--active-bg": "rgba(0,0,0,".concat(Math.min(opacity + 0.2, 1), ")")
|
|
707
|
+
};
|
|
708
|
+
}
|
|
709
|
+
return {};
|
|
710
|
+
};
|
|
700
711
|
if (iconButton) {
|
|
701
712
|
var height = parseHeightWidth(iconButtonHeightClass);
|
|
702
713
|
var width = parseHeightWidth(iconButtonWidthClass);
|
|
@@ -708,8 +719,11 @@ var ButtonBase = import_react2.default.forwardRef(function(_0, _1) {
|
|
|
708
719
|
minHeight: height,
|
|
709
720
|
minWidth: width,
|
|
710
721
|
color: color.startsWith("linear") ? "white" : color
|
|
722
|
+
}, iconButtonHoverIntensity && {
|
|
723
|
+
"--hover-bg": "rgba(0,0,0,".concat(iconButtonHoverIntensity / 100, ")"),
|
|
724
|
+
"--active-bg": "rgba(0,0,0,".concat(Math.min(iconButtonHoverIntensity / 100 + 0.2, 1), ")")
|
|
711
725
|
}, style),
|
|
712
|
-
className: "\n
|
|
726
|
+
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")
|
|
713
727
|
}, props), {
|
|
714
728
|
children: children
|
|
715
729
|
}));
|
|
@@ -724,7 +738,10 @@ var ButtonBase = import_react2.default.forwardRef(function(_0, _1) {
|
|
|
724
738
|
}, style) : style,
|
|
725
739
|
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 ")
|
|
726
740
|
}, props), {
|
|
727
|
-
children:
|
|
741
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", {
|
|
742
|
+
className: "".concat(iconButtonBgPaddingClass || "p-[2px]", " flex items-center justify-center"),
|
|
743
|
+
children: children
|
|
744
|
+
})
|
|
728
745
|
}));
|
|
729
746
|
});
|
|
730
747
|
ButtonBase.displayName = "Button";
|
|
@@ -12792,7 +12809,8 @@ var MahatiCameraAccessModal = function MahatiCameraAccessModal(param) {
|
|
|
12792
12809
|
onClick: onClose,
|
|
12793
12810
|
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)]",
|
|
12794
12811
|
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react6.X, {
|
|
12795
|
-
size: 16
|
|
12812
|
+
size: 16,
|
|
12813
|
+
color: "black"
|
|
12796
12814
|
})
|
|
12797
12815
|
}),
|
|
12798
12816
|
image && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", {
|