@fixefy/fixefy-ui-components 0.2.99 → 0.3.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.
- package/dist/FxMenuItemWithIcon/FxMenuItemWithIcon.d.ts +2 -1
- package/dist/FxMenuItemWithIcon/FxMenuItemWithIcon.js +31 -3
- package/dist/FxModalWithComponent/FxModalWithComponent.d.ts +2 -1
- package/dist/FxModalWithComponent/FxModalWithComponent.js +3 -3
- package/dist/FxModalWithMenu/FxModalWithMenu.d.ts +6 -3
- package/dist/FxModalWithMenu/FxModalWithMenu.js +7 -5
- package/package.json +1 -1
|
@@ -13,12 +13,40 @@ const _react = /*#__PURE__*/ _interop_require_default(require("react"));
|
|
|
13
13
|
const _material = require("@mui/material");
|
|
14
14
|
const _fixefyuiutils = require("@fixefy/fixefy-ui-utils");
|
|
15
15
|
const _FxIcon = require("../FxIcon");
|
|
16
|
+
function _define_property(obj, key, value) {
|
|
17
|
+
if (key in obj) {
|
|
18
|
+
Object.defineProperty(obj, key, {
|
|
19
|
+
value: value,
|
|
20
|
+
enumerable: true,
|
|
21
|
+
configurable: true,
|
|
22
|
+
writable: true
|
|
23
|
+
});
|
|
24
|
+
} else {
|
|
25
|
+
obj[key] = value;
|
|
26
|
+
}
|
|
27
|
+
return obj;
|
|
28
|
+
}
|
|
16
29
|
function _interop_require_default(obj) {
|
|
17
30
|
return obj && obj.__esModule ? obj : {
|
|
18
31
|
default: obj
|
|
19
32
|
};
|
|
20
33
|
}
|
|
21
|
-
|
|
34
|
+
function _object_spread(target) {
|
|
35
|
+
for(var i = 1; i < arguments.length; i++){
|
|
36
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
37
|
+
var ownKeys = Object.keys(source);
|
|
38
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
39
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
40
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
41
|
+
}));
|
|
42
|
+
}
|
|
43
|
+
ownKeys.forEach(function(key) {
|
|
44
|
+
_define_property(target, key, source[key]);
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
return target;
|
|
48
|
+
}
|
|
49
|
+
const FxMenuItemWithIcon = ({ title, icon, onClick, sx = {} })=>{
|
|
22
50
|
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.MenuItem, {
|
|
23
51
|
sx: {
|
|
24
52
|
width: '197px',
|
|
@@ -43,10 +71,10 @@ const FxMenuItemWithIcon = ({ title, icon, onClick })=>{
|
|
|
43
71
|
}),
|
|
44
72
|
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.ListItemText, {
|
|
45
73
|
secondary: (0, _fixefyuiutils.titleCase)(title),
|
|
46
|
-
secondaryTypographyProps: {
|
|
74
|
+
secondaryTypographyProps: _object_spread({
|
|
47
75
|
fontSize: '14px',
|
|
48
76
|
marginLeft: '-10px'
|
|
49
|
-
}
|
|
77
|
+
}, sx)
|
|
50
78
|
})
|
|
51
79
|
]
|
|
52
80
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const FxModalWithComponent: ({ btnType, btnValue, modalData, onClick, disabled, icon, sx, }: {
|
|
2
|
+
export declare const FxModalWithComponent: ({ btnType, btnValue, modalData, onClick, disabled, icon, sx, iconSize, }: {
|
|
3
3
|
btnType?: 'text' | 'icon';
|
|
4
4
|
btnValue?: string;
|
|
5
5
|
modalData: any;
|
|
@@ -7,4 +7,5 @@ export declare const FxModalWithComponent: ({ btnType, btnValue, modalData, onCl
|
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
icon?: string;
|
|
9
9
|
sx?: any;
|
|
10
|
+
iconSize?: number;
|
|
10
11
|
}) => React.JSX.Element;
|
|
@@ -53,7 +53,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
53
53
|
}
|
|
54
54
|
return newObj;
|
|
55
55
|
}
|
|
56
|
-
const FxModalWithComponent = ({ btnType = 'text', btnValue, modalData, onClick, disabled, icon, sx })=>{
|
|
56
|
+
const FxModalWithComponent = ({ btnType = 'text', btnValue, modalData, onClick, disabled, icon, sx, iconSize })=>{
|
|
57
57
|
const [isOpen, setIsOpen] = (0, _react.useState)(false);
|
|
58
58
|
const [AnchorEl, setAnchorEl] = (0, _react.useState)(null);
|
|
59
59
|
const handleClick = (e)=>{
|
|
@@ -83,8 +83,8 @@ const FxModalWithComponent = ({ btnType = 'text', btnValue, modalData, onClick,
|
|
|
83
83
|
btnValue: btnValue,
|
|
84
84
|
onClick: handleClick,
|
|
85
85
|
startIcon: icon,
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
disabled: disabled,
|
|
87
|
+
iconSize: iconSize || 20
|
|
88
88
|
}),
|
|
89
89
|
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Menu, {
|
|
90
90
|
id: "fade-menu",
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const FxModalWithMenu: ({ btnType, btnValue, modalData, onClick, disabled,
|
|
2
|
+
export declare const FxModalWithMenu: ({ btnType, btnValue, modalData, onClick, disabled, startIcon, endIcon, shouldShowModal, buttonSx, menuItemSx, iconSize, }: {
|
|
3
3
|
btnType?: 'text' | 'icon';
|
|
4
4
|
btnValue?: string;
|
|
5
5
|
modalData: any;
|
|
6
6
|
onClick?: any;
|
|
7
7
|
disabled?: boolean;
|
|
8
|
-
|
|
8
|
+
startIcon?: string;
|
|
9
|
+
endIcon?: string;
|
|
9
10
|
shouldShowModal?: boolean;
|
|
10
|
-
|
|
11
|
+
buttonSx?: any;
|
|
12
|
+
menuItemSx?: any;
|
|
13
|
+
iconSize?: number;
|
|
11
14
|
}) => React.JSX.Element;
|
|
@@ -54,7 +54,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
54
54
|
}
|
|
55
55
|
return newObj;
|
|
56
56
|
}
|
|
57
|
-
const FxModalWithMenu = ({ btnType = 'text', btnValue, modalData, onClick, disabled,
|
|
57
|
+
const FxModalWithMenu = ({ btnType = 'text', btnValue, modalData, onClick, disabled, startIcon, endIcon, shouldShowModal = true, buttonSx, menuItemSx, iconSize })=>{
|
|
58
58
|
const [isOpen, setIsOpen] = (0, _react.useState)(false);
|
|
59
59
|
const [AnchorEl, setAnchorEl] = (0, _react.useState)(null);
|
|
60
60
|
const handleClick = (e)=>{
|
|
@@ -79,12 +79,13 @@ const FxModalWithMenu = ({ btnType = 'text', btnValue, modalData, onClick, disab
|
|
|
79
79
|
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
|
|
80
80
|
children: [
|
|
81
81
|
/*#__PURE__*/ (0, _jsxruntime.jsx)(_FxStyledButton.FxStyledButton, {
|
|
82
|
-
sx:
|
|
82
|
+
sx: buttonSx,
|
|
83
83
|
btnType: btnType,
|
|
84
84
|
btnValue: btnValue,
|
|
85
85
|
onClick: handleClick,
|
|
86
|
-
startIcon:
|
|
87
|
-
|
|
86
|
+
startIcon: startIcon,
|
|
87
|
+
endIcon: endIcon,
|
|
88
|
+
iconSize: iconSize || 20,
|
|
88
89
|
disabled: disabled
|
|
89
90
|
}),
|
|
90
91
|
shouldShowModal && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Menu, {
|
|
@@ -103,7 +104,8 @@ const FxModalWithMenu = ({ btnType = 'text', btnValue, modalData, onClick, disab
|
|
|
103
104
|
onClick: ()=>{
|
|
104
105
|
handleClose();
|
|
105
106
|
item.onClick();
|
|
106
|
-
}
|
|
107
|
+
},
|
|
108
|
+
sx: menuItemSx
|
|
107
109
|
}, i);
|
|
108
110
|
}))
|
|
109
111
|
})
|
package/package.json
CHANGED