@fixefy/fixefy-ui-components 0.2.66 → 0.2.68
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/FxTag/FxTag.d.ts
CHANGED
|
@@ -2,5 +2,6 @@ import React from 'react';
|
|
|
2
2
|
export type TagPropsType = {
|
|
3
3
|
name: string;
|
|
4
4
|
count?: number;
|
|
5
|
+
type?: 'invoiceState' | 'recoState';
|
|
5
6
|
};
|
|
6
|
-
export declare const FxTag: ({ name, count }: TagPropsType) => React.JSX.Element;
|
|
7
|
+
export declare const FxTag: ({ name, count, type }: TagPropsType) => React.JSX.Element;
|
package/dist/FxTag/FxTag.js
CHANGED
|
@@ -18,7 +18,7 @@ function _interop_require_default(obj) {
|
|
|
18
18
|
default: obj
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
-
const FxTag = ({ name, count = 0 })=>/*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
|
|
21
|
+
const FxTag = ({ name, count = 0, type })=>/*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
|
|
22
22
|
display: "flex",
|
|
23
23
|
alignItems: "center",
|
|
24
24
|
justifyContent: "center",
|
|
@@ -29,12 +29,14 @@ const FxTag = ({ name, count = 0 })=>/*#__PURE__*/ (0, _jsxruntime.jsxs)(_materi
|
|
|
29
29
|
children: [
|
|
30
30
|
/*#__PURE__*/ (0, _jsxruntime.jsx)(_tagstyles.StyledTag, {
|
|
31
31
|
name: name,
|
|
32
|
+
type: type,
|
|
32
33
|
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_tagstyles.StyledLabel, {
|
|
33
34
|
children: (0, _fixefyuiutils.titleCase)(name)
|
|
34
35
|
})
|
|
35
36
|
}),
|
|
36
37
|
/*#__PURE__*/ (0, _jsxruntime.jsx)(_tagstyles.StyledCount, {
|
|
37
38
|
name: name,
|
|
39
|
+
type: type,
|
|
38
40
|
children: count
|
|
39
41
|
})
|
|
40
42
|
]
|
|
@@ -73,13 +73,13 @@ function _object_spread_props(target, source) {
|
|
|
73
73
|
}
|
|
74
74
|
return target;
|
|
75
75
|
}
|
|
76
|
-
const StyledTag = (0, _styles.styled)(_material.Box)(({ theme, name })=>{
|
|
77
|
-
var _theme_palette_tag_name, _theme_palette_tag_name1;
|
|
76
|
+
const StyledTag = (0, _styles.styled)(_material.Box)(({ theme, name, type })=>{
|
|
77
|
+
var _theme_palette_type_name, _theme_palette_tag_name, _theme_palette_tag_name1;
|
|
78
78
|
return {
|
|
79
|
-
background: (_theme_palette_tag_name = theme.palette.tag[name]) === null || _theme_palette_tag_name === void 0 ? void 0 : _theme_palette_tag_name.background,
|
|
79
|
+
background: type ? (_theme_palette_type_name = theme.palette.type[name]) === null || _theme_palette_type_name === void 0 ? void 0 : _theme_palette_type_name.background : (_theme_palette_tag_name = theme.palette.tag[name]) === null || _theme_palette_tag_name === void 0 ? void 0 : _theme_palette_tag_name.background,
|
|
80
80
|
borderRadius: 8,
|
|
81
81
|
padding: '2px 8px',
|
|
82
|
-
border: `1px solid ${(_theme_palette_tag_name1 = theme.palette.tag[name]) === null || _theme_palette_tag_name1 === void 0 ? void 0 : _theme_palette_tag_name1.border}`,
|
|
82
|
+
border: `1px solid ${type ? '' : (_theme_palette_tag_name1 = theme.palette.tag[name]) === null || _theme_palette_tag_name1 === void 0 ? void 0 : _theme_palette_tag_name1.border}`,
|
|
83
83
|
display: 'flex',
|
|
84
84
|
alignItems: 'center',
|
|
85
85
|
width: 'fit-content'
|
|
@@ -89,12 +89,12 @@ const StyledLabel = (0, _styles.styled)(_material.Typography)(({ theme })=>_obje
|
|
|
89
89
|
lineHeight: '20px',
|
|
90
90
|
color: theme.palette.common.white
|
|
91
91
|
}));
|
|
92
|
-
const StyledCount = (0, _styles.styled)(_material.Typography)(({ theme, name })=>{
|
|
93
|
-
var _theme_palette_tag_name;
|
|
92
|
+
const StyledCount = (0, _styles.styled)(_material.Typography)(({ theme, name, type })=>{
|
|
93
|
+
var _theme_palette_type_name, _theme_palette_tag_name;
|
|
94
94
|
return _object_spread_props(_object_spread({}, theme.typography.subtitle2), {
|
|
95
95
|
lineHeight: '16px',
|
|
96
96
|
fontWeight: 700,
|
|
97
|
-
color: (_theme_palette_tag_name = theme.palette.tag[name]) === null || _theme_palette_tag_name === void 0 ? void 0 : _theme_palette_tag_name.background,
|
|
97
|
+
color: type ? (_theme_palette_type_name = theme.palette.type[name]) === null || _theme_palette_type_name === void 0 ? void 0 : _theme_palette_type_name.background : (_theme_palette_tag_name = theme.palette.tag[name]) === null || _theme_palette_tag_name === void 0 ? void 0 : _theme_palette_tag_name.background,
|
|
98
98
|
marginLeft: 8
|
|
99
99
|
});
|
|
100
100
|
});
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
},
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@apollo/client": "^3.10.4",
|
|
8
|
-
"@fixefy/fixefy-ui-utils": "0.2.
|
|
8
|
+
"@fixefy/fixefy-ui-utils": "0.2.29",
|
|
9
9
|
"@mui/icons-material": "^5.16.7",
|
|
10
10
|
"@mui/material": "^5.16.7",
|
|
11
11
|
"@mui/styled-engine": "^5.15.14",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"require": "./dist/index.js"
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
|
-
"version": "0.2.
|
|
68
|
+
"version": "0.2.68"
|
|
69
69
|
}
|