@fixefy/fixefy-ui-components 0.2.95 → 0.2.97
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/FxModalWithComponent/FxModalWithComponent.js +8 -18
- package/dist/FxModalWithMenu/FxModalWithMenu.d.ts +2 -1
- package/dist/FxModalWithMenu/FxModalWithMenu.js +10 -25
- package/dist/FxStyledButton/FxStyledButton.d.ts +11 -0
- package/dist/FxStyledButton/FxStyledButton.js +51 -0
- package/dist/FxStyledButton/index.d.ts +1 -0
- package/dist/FxStyledButton/index.js +11 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4 -0
- package/package.json +1 -1
|
@@ -11,7 +11,7 @@ Object.defineProperty(exports, "FxModalWithComponent", {
|
|
|
11
11
|
const _jsxruntime = require("react/jsx-runtime");
|
|
12
12
|
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
13
13
|
const _material = require("@mui/material");
|
|
14
|
-
const
|
|
14
|
+
const _FxStyledButton = require("../FxStyledButton");
|
|
15
15
|
function _getRequireWildcardCache(nodeInterop) {
|
|
16
16
|
if (typeof WeakMap !== "function") return null;
|
|
17
17
|
var cacheBabelInterop = new WeakMap();
|
|
@@ -77,13 +77,9 @@ const FxModalWithComponent = ({ btnType = 'text', color, btnValue, modalData, on
|
|
|
77
77
|
]);
|
|
78
78
|
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
|
|
79
79
|
children: [
|
|
80
|
-
|
|
81
|
-
disabled: disabled,
|
|
82
|
-
color: color || 'primary',
|
|
83
|
-
id: "fade-button",
|
|
84
|
-
"aria-haspopup": "true",
|
|
85
|
-
onClick: handleClick,
|
|
80
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_FxStyledButton.FxStyledButton, {
|
|
86
81
|
sx: {
|
|
82
|
+
color: color || 'primary',
|
|
87
83
|
fontWeight: 'normal',
|
|
88
84
|
width: '100%',
|
|
89
85
|
justifyContent: 'flex-start',
|
|
@@ -92,18 +88,12 @@ const FxModalWithComponent = ({ btnType = 'text', color, btnValue, modalData, on
|
|
|
92
88
|
backgroundColor: '#F0F0F0'
|
|
93
89
|
}
|
|
94
90
|
},
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
btnType == 'icon' && icon && /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.IconButton, {
|
|
91
|
+
btnType: btnType,
|
|
92
|
+
btnValue: btnValue,
|
|
98
93
|
onClick: handleClick,
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
width: 20,
|
|
103
|
-
height: 20
|
|
104
|
-
}),
|
|
105
|
-
' '
|
|
106
|
-
]
|
|
94
|
+
startIcon: icon,
|
|
95
|
+
iconSize: 20,
|
|
96
|
+
disabled: disabled
|
|
107
97
|
}),
|
|
108
98
|
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Menu, {
|
|
109
99
|
id: "fade-menu",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const FxModalWithMenu: ({ btnType, color, btnValue, modalData, onClick, disabled, icon, }: {
|
|
2
|
+
export declare const FxModalWithMenu: ({ btnType, color, btnValue, modalData, onClick, disabled, icon, shouldShowModal, }: {
|
|
3
3
|
btnType?: 'text' | 'icon';
|
|
4
4
|
color?: 'secondary' | undefined;
|
|
5
5
|
btnValue?: string;
|
|
@@ -7,4 +7,5 @@ export declare const FxModalWithMenu: ({ btnType, color, btnValue, modalData, on
|
|
|
7
7
|
onClick?: any;
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
icon?: string;
|
|
10
|
+
shouldShowModal?: boolean;
|
|
10
11
|
}) => React.JSX.Element;
|
|
@@ -11,8 +11,8 @@ Object.defineProperty(exports, "FxModalWithMenu", {
|
|
|
11
11
|
const _jsxruntime = require("react/jsx-runtime");
|
|
12
12
|
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
13
13
|
const _material = require("@mui/material");
|
|
14
|
-
const _FxIcon = require("../FxIcon");
|
|
15
14
|
const _FxMenuItemWithIcon = require("../FxMenuItemWithIcon");
|
|
15
|
+
const _FxStyledButton = require("../FxStyledButton");
|
|
16
16
|
function _getRequireWildcardCache(nodeInterop) {
|
|
17
17
|
if (typeof WeakMap !== "function") return null;
|
|
18
18
|
var cacheBabelInterop = new WeakMap();
|
|
@@ -54,7 +54,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
54
54
|
}
|
|
55
55
|
return newObj;
|
|
56
56
|
}
|
|
57
|
-
const FxModalWithMenu = ({ btnType = 'text', color, btnValue, modalData, onClick, disabled, icon })=>{
|
|
57
|
+
const FxModalWithMenu = ({ btnType = 'text', color, btnValue, modalData, onClick, disabled, icon, shouldShowModal = true })=>{
|
|
58
58
|
const [isOpen, setIsOpen] = (0, _react.useState)(false);
|
|
59
59
|
const [AnchorEl, setAnchorEl] = (0, _react.useState)(null);
|
|
60
60
|
const handleClick = (e)=>{
|
|
@@ -78,18 +78,9 @@ const FxModalWithMenu = ({ btnType = 'text', color, btnValue, modalData, onClick
|
|
|
78
78
|
]);
|
|
79
79
|
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
|
|
80
80
|
children: [
|
|
81
|
-
|
|
82
|
-
disabled: disabled,
|
|
83
|
-
color: color || 'primary',
|
|
84
|
-
startIcon: icon ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxIcon.FxIcon, {
|
|
85
|
-
icon: icon,
|
|
86
|
-
width: 20,
|
|
87
|
-
height: 20
|
|
88
|
-
}) : null,
|
|
89
|
-
id: "fade-button",
|
|
90
|
-
"aria-haspopup": "true",
|
|
91
|
-
onClick: handleClick,
|
|
81
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_FxStyledButton.FxStyledButton, {
|
|
92
82
|
sx: {
|
|
83
|
+
color: color || 'primary',
|
|
93
84
|
fontWeight: 'normal',
|
|
94
85
|
width: '100%',
|
|
95
86
|
justifyContent: 'flex-start',
|
|
@@ -98,20 +89,14 @@ const FxModalWithMenu = ({ btnType = 'text', color, btnValue, modalData, onClick
|
|
|
98
89
|
backgroundColor: '#F0F0F0'
|
|
99
90
|
}
|
|
100
91
|
},
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
btnType == 'icon' && icon && /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.IconButton, {
|
|
92
|
+
btnType: btnType,
|
|
93
|
+
btnValue: btnValue,
|
|
104
94
|
onClick: handleClick,
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
width: 20,
|
|
109
|
-
height: 20
|
|
110
|
-
}),
|
|
111
|
-
' '
|
|
112
|
-
]
|
|
95
|
+
startIcon: icon,
|
|
96
|
+
iconSize: 20,
|
|
97
|
+
disabled: disabled
|
|
113
98
|
}),
|
|
114
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Menu, {
|
|
99
|
+
shouldShowModal && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Menu, {
|
|
115
100
|
id: "fade-menu",
|
|
116
101
|
MenuListProps: {
|
|
117
102
|
'aria-labelledby': 'fade-button'
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const FxStyledButton: ({ btnValue, btnType, disabled, onClick, startIcon, endIcon, iconSize, sx, variant, }: {
|
|
2
|
+
btnValue?: string;
|
|
3
|
+
btnType?: 'text' | 'icon';
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
onClick: any;
|
|
6
|
+
startIcon?: any;
|
|
7
|
+
endIcon?: any;
|
|
8
|
+
iconSize?: number;
|
|
9
|
+
sx?: any;
|
|
10
|
+
variant?: 'contained' | 'outlined' | 'text';
|
|
11
|
+
}) => any;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "FxStyledButton", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return FxStyledButton;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_default(require("react"));
|
|
13
|
+
const _material = require("@mui/material");
|
|
14
|
+
const _FxIcon = require("../FxIcon");
|
|
15
|
+
const _fixefyuiutils = require("@fixefy/fixefy-ui-utils");
|
|
16
|
+
function _interop_require_default(obj) {
|
|
17
|
+
return obj && obj.__esModule ? obj : {
|
|
18
|
+
default: obj
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
const FxStyledButton = ({ btnValue, btnType = 'text', disabled, onClick, startIcon, endIcon, iconSize, sx, variant })=>{
|
|
22
|
+
return btnType == 'text' ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Button, {
|
|
23
|
+
disabled: disabled,
|
|
24
|
+
sx: sx,
|
|
25
|
+
variant: variant || 'outlined',
|
|
26
|
+
onClick: (e)=>{
|
|
27
|
+
onClick && onClick(e);
|
|
28
|
+
},
|
|
29
|
+
startIcon: startIcon && iconSize ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxIcon.FxIcon, {
|
|
30
|
+
width: iconSize,
|
|
31
|
+
height: iconSize,
|
|
32
|
+
icon: startIcon
|
|
33
|
+
}) : null,
|
|
34
|
+
endIcon: endIcon && iconSize ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxIcon.FxIcon, {
|
|
35
|
+
width: iconSize,
|
|
36
|
+
height: iconSize,
|
|
37
|
+
icon: endIcon
|
|
38
|
+
}) : null,
|
|
39
|
+
children: (0, _fixefyuiutils.titleCase)(btnValue)
|
|
40
|
+
}) : btnType == 'icon' && startIcon && iconSize && /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.IconButton, {
|
|
41
|
+
onClick: onClick,
|
|
42
|
+
children: [
|
|
43
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_FxIcon.FxIcon, {
|
|
44
|
+
icon: startIcon,
|
|
45
|
+
width: iconSize,
|
|
46
|
+
height: iconSize
|
|
47
|
+
}),
|
|
48
|
+
' '
|
|
49
|
+
]
|
|
50
|
+
});
|
|
51
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { FxStyledButton } from './FxStyledButton';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "FxStyledButton", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return _FxStyledButton.FxStyledButton;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _FxStyledButton = require("./FxStyledButton");
|
package/dist/index.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export { FxShowMore, ShowMorePropsType } from './FxShowMore';
|
|
|
19
19
|
export { FxSlider, SliderPropsType } from './FxSlider';
|
|
20
20
|
export { FxStaticDropdown, StaticDropdownStylesOptions, StaticDropdownPropsType } from './FxStaticDropdown';
|
|
21
21
|
export { FxStatisticsBar, StatisticsPropsType } from './FxStatisticsBar';
|
|
22
|
+
export { FxStyledButton } from './FxStyledButton';
|
|
22
23
|
export { FxStatusBar, StatusBarPropsType, Options } from './FxStatusBar';
|
|
23
24
|
export { FxTag, TagPropsType } from './FxTag';
|
|
24
25
|
export { FxTextField, TextFieldPropsType } from './FxTextField';
|
package/dist/index.js
CHANGED
|
@@ -111,6 +111,9 @@ _export(exports, {
|
|
|
111
111
|
FxStatusBar: function() {
|
|
112
112
|
return _FxStatusBar.FxStatusBar;
|
|
113
113
|
},
|
|
114
|
+
FxStyledButton: function() {
|
|
115
|
+
return _FxStyledButton.FxStyledButton;
|
|
116
|
+
},
|
|
114
117
|
FxTag: function() {
|
|
115
118
|
return _FxTag.FxTag;
|
|
116
119
|
},
|
|
@@ -232,6 +235,7 @@ const _FxShowMore = require("./FxShowMore");
|
|
|
232
235
|
const _FxSlider = require("./FxSlider");
|
|
233
236
|
const _FxStaticDropdown = require("./FxStaticDropdown");
|
|
234
237
|
const _FxStatisticsBar = require("./FxStatisticsBar");
|
|
238
|
+
const _FxStyledButton = require("./FxStyledButton");
|
|
235
239
|
const _FxStatusBar = require("./FxStatusBar");
|
|
236
240
|
const _FxTag = require("./FxTag");
|
|
237
241
|
const _FxTextField = require("./FxTextField");
|
package/package.json
CHANGED