@fixefy/fixefy-ui-components 0.0.29 → 0.0.30
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-cjs/Tag/Tag.js +12 -20
- package/dist-cjs/Tag/styles/tag.styles.js +12 -11
- package/dist-es/Tag/Tag.js +5 -4
- package/dist-es/Tag/styles/tag.styles.js +12 -11
- package/dist-types/Tag/Tag.d.ts +1 -1
- package/package.json +1 -1
package/dist-cjs/Tag/Tag.js
CHANGED
|
@@ -1,25 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { titleCase } from
|
|
3
|
-
import { Box } from
|
|
4
|
-
import { StyledCount, StyledLabel, StyledTag } from
|
|
5
|
-
export const Tag = ({ name, count = 0 })=>/*#__PURE__*/
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { titleCase } from "@fixefy/fixefy-ui-utils/";
|
|
3
|
+
import { Box } from "@mui/material";
|
|
4
|
+
import { StyledCount, StyledLabel, StyledTag } from "./styles/tag.styles";
|
|
5
|
+
export const Tag = ({ name, count = 0 })=>/*#__PURE__*/ React.createElement(Box, {
|
|
6
6
|
display: "flex",
|
|
7
7
|
alignItems: "center",
|
|
8
8
|
justifyContent: "center",
|
|
9
9
|
sx: {
|
|
10
|
-
maxWidth:
|
|
10
|
+
maxWidth: "fit-content",
|
|
11
11
|
mb: 1
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
})
|
|
19
|
-
}),
|
|
20
|
-
/*#__PURE__*/ _jsx(StyledCount, {
|
|
21
|
-
name: name,
|
|
22
|
-
children: count
|
|
23
|
-
})
|
|
24
|
-
]
|
|
25
|
-
});
|
|
12
|
+
}
|
|
13
|
+
}, /*#__PURE__*/ React.createElement(StyledTag, {
|
|
14
|
+
name: name
|
|
15
|
+
}, /*#__PURE__*/ React.createElement(StyledLabel, null, titleCase(name))), /*#__PURE__*/ React.createElement(StyledCount, {
|
|
16
|
+
name: name
|
|
17
|
+
}, count));
|
|
@@ -50,25 +50,26 @@ function _object_spread_props(target, source) {
|
|
|
50
50
|
}
|
|
51
51
|
return target;
|
|
52
52
|
}
|
|
53
|
-
import
|
|
54
|
-
import {
|
|
53
|
+
import React from "react";
|
|
54
|
+
import { styled } from "@mui/material/styles";
|
|
55
|
+
import { Box, Typography } from "@mui/material";
|
|
55
56
|
//
|
|
56
57
|
export const StyledTag = styled(Box)(({ theme, name })=>({
|
|
57
|
-
background: name ===
|
|
58
|
+
background: name === "in_dispute" ? "#56CCF2" : name === "" ? "#BB6BD9" : theme.palette.reconcilation[name].background,
|
|
58
59
|
borderRadius: 8,
|
|
59
|
-
padding:
|
|
60
|
-
border: `1px solid ${name ===
|
|
61
|
-
display:
|
|
62
|
-
alignItems:
|
|
63
|
-
width:
|
|
60
|
+
padding: "2px 8px",
|
|
61
|
+
border: `1px solid ${name === "in_dispute" ? "#56CCF2" : name === "" ? "#BB6BD9" : theme.palette.reconcilation[name].border}`,
|
|
62
|
+
display: "flex",
|
|
63
|
+
alignItems: "center",
|
|
64
|
+
width: "fit-content"
|
|
64
65
|
}));
|
|
65
66
|
export const StyledLabel = styled(Typography)(({ theme })=>_object_spread_props(_object_spread({}, theme.typography.body1), {
|
|
66
|
-
lineHeight:
|
|
67
|
+
lineHeight: "20px",
|
|
67
68
|
color: theme.palette.common.white
|
|
68
69
|
}));
|
|
69
70
|
export const StyledCount = styled(Typography)(({ theme, name })=>_object_spread_props(_object_spread({}, theme.typography.subtitle2), {
|
|
70
|
-
lineHeight:
|
|
71
|
+
lineHeight: "16px",
|
|
71
72
|
fontWeight: 700,
|
|
72
|
-
color: name ===
|
|
73
|
+
color: name === "in_dispute" ? "#56CCF2" : name === "" ? "#BB6BD9" : theme.palette.reconcilation[name].background,
|
|
73
74
|
marginLeft: 8
|
|
74
75
|
}));
|
package/dist-es/Tag/Tag.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { titleCase } from "@fixefy/fixefy-ui-utils/";
|
|
3
|
+
import { Box } from "@mui/material";
|
|
4
|
+
import { StyledCount, StyledLabel, StyledTag } from "./styles/tag.styles";
|
|
4
5
|
export const Tag = ({ name, count = 0 })=>/*#__PURE__*/ React.createElement(Box, {
|
|
5
6
|
display: "flex",
|
|
6
7
|
alignItems: "center",
|
|
7
8
|
justifyContent: "center",
|
|
8
9
|
sx: {
|
|
9
|
-
maxWidth:
|
|
10
|
+
maxWidth: "fit-content",
|
|
10
11
|
mb: 1
|
|
11
12
|
}
|
|
12
13
|
}, /*#__PURE__*/ React.createElement(StyledTag, {
|
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { styled } from "@mui/material/styles";
|
|
3
|
+
import { Box, Typography } from "@mui/material";
|
|
3
4
|
//
|
|
4
5
|
export const StyledTag = styled(Box)(({ theme, name })=>({
|
|
5
|
-
background: name ===
|
|
6
|
+
background: name === "in_dispute" ? "#56CCF2" : name === "" ? "#BB6BD9" : theme.palette.reconcilation[name].background,
|
|
6
7
|
borderRadius: 8,
|
|
7
|
-
padding:
|
|
8
|
-
border: `1px solid ${name ===
|
|
9
|
-
display:
|
|
10
|
-
alignItems:
|
|
11
|
-
width:
|
|
8
|
+
padding: "2px 8px",
|
|
9
|
+
border: `1px solid ${name === "in_dispute" ? "#56CCF2" : name === "" ? "#BB6BD9" : theme.palette.reconcilation[name].border}`,
|
|
10
|
+
display: "flex",
|
|
11
|
+
alignItems: "center",
|
|
12
|
+
width: "fit-content"
|
|
12
13
|
}));
|
|
13
14
|
export const StyledLabel = styled(Typography)(({ theme })=>({
|
|
14
15
|
...theme.typography.body1,
|
|
15
|
-
lineHeight:
|
|
16
|
+
lineHeight: "20px",
|
|
16
17
|
color: theme.palette.common.white
|
|
17
18
|
}));
|
|
18
19
|
export const StyledCount = styled(Typography)(({ theme, name })=>({
|
|
19
20
|
...theme.typography.subtitle2,
|
|
20
|
-
lineHeight:
|
|
21
|
+
lineHeight: "16px",
|
|
21
22
|
fontWeight: 700,
|
|
22
|
-
color: name ===
|
|
23
|
+
color: name === "in_dispute" ? "#56CCF2" : name === "" ? "#BB6BD9" : theme.palette.reconcilation[name].background,
|
|
23
24
|
marginLeft: 8
|
|
24
25
|
}));
|
package/dist-types/Tag/Tag.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { TagProps } from
|
|
1
|
+
import { TagProps } from "./tag_types";
|
|
2
2
|
export declare const Tag: ({ name, count }: TagProps) => import("react/jsx-runtime").JSX.Element;
|
package/package.json
CHANGED