@mamrp/components 1.7.1 → 1.7.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.d.mts +6 -4
- package/dist/index.d.ts +6 -4
- package/dist/index.js +15 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -657,7 +657,6 @@ import React4 from "react";
|
|
|
657
657
|
import { IoIosArrowUp } from "react-icons/io";
|
|
658
658
|
var AnimatedIcon = styled(IoIosArrowUp, {
|
|
659
659
|
shouldForwardProp: (prop) => prop !== "isShowFilter"
|
|
660
|
-
// Don't pass isShowFilter to the underlying component
|
|
661
660
|
})(({ isShowFilter }) => ({
|
|
662
661
|
transition: "all 0.5s ease",
|
|
663
662
|
transform: `rotate(${isShowFilter ? 0 : "0.5turn"})`
|
|
@@ -667,26 +666,36 @@ function AdvancedSearchButton({
|
|
|
667
666
|
setIsShowFilter,
|
|
668
667
|
color = "black",
|
|
669
668
|
title = "\u0641\u0631\u0645 \u062C\u0633\u062A\u062C\u0648",
|
|
670
|
-
|
|
669
|
+
onToggle,
|
|
671
670
|
icon,
|
|
672
671
|
borderRadius,
|
|
673
672
|
paddingY,
|
|
674
|
-
fontSize
|
|
673
|
+
fontSize,
|
|
674
|
+
backgroundColor,
|
|
675
|
+
border = false
|
|
675
676
|
}) {
|
|
676
677
|
const theme3 = useTheme2();
|
|
678
|
+
const isDarkMode = theme3.palette.mode === "dark";
|
|
677
679
|
return /* @__PURE__ */ React4.createElement(
|
|
678
680
|
Button2,
|
|
679
681
|
{
|
|
680
682
|
onClick: () => {
|
|
681
683
|
setIsShowFilter((prev) => !prev);
|
|
682
|
-
|
|
684
|
+
onToggle?.(false);
|
|
683
685
|
},
|
|
684
686
|
startIcon: /* @__PURE__ */ React4.createElement(AnimatedIcon, { isShowFilter }),
|
|
685
687
|
sx: {
|
|
686
688
|
color: theme3.palette.text.primary ?? color,
|
|
687
|
-
borderRadius,
|
|
689
|
+
borderRadius: borderRadius ?? 2,
|
|
688
690
|
paddingY,
|
|
689
|
-
fontSize
|
|
691
|
+
fontSize,
|
|
692
|
+
backgroundColor,
|
|
693
|
+
...border && {
|
|
694
|
+
border: isDarkMode ? `1px solid rgba(255, 255, 255, 0.23)` : `1px solid rgba(0, 0, 0, 0.23)`
|
|
695
|
+
},
|
|
696
|
+
"&:hover": {
|
|
697
|
+
backgroundColor: backgroundColor ? backgroundColor : isDarkMode ? "rgba(255, 255, 255, 0.05)" : "rgba(0, 0, 0, 0.04)"
|
|
698
|
+
}
|
|
690
699
|
},
|
|
691
700
|
fullWidth: true
|
|
692
701
|
},
|