@fixefy/fixefy-ui-components 0.0.18 → 0.0.20

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.
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Tag = void 0;
4
+ const fixefy_ui_utils_1 = require("@fixefy/fixefy-ui-utils/");
5
+ const material_1 = require("@mui/material");
6
+ const tag_styles_1 = require("./styles/tag.styles");
7
+ const Tag = ({ name, count = 0 }) => (<material_1.Box display="flex" alignItems="center" justifyContent="center" sx={{ maxWidth: 'fit-content', mb: 1 }}>
8
+ <tag_styles_1.StyledTag name={name}>
9
+ <tag_styles_1.StyledLabel>{(0, fixefy_ui_utils_1.titleCase)(name)}</tag_styles_1.StyledLabel>
10
+ </tag_styles_1.StyledTag>
11
+ <tag_styles_1.StyledCount name={name}>{count}</tag_styles_1.StyledCount>
12
+ </material_1.Box>);
13
+ exports.Tag = Tag;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Tag = void 0;
4
+ var Tag_1 = require("./Tag");
5
+ Object.defineProperty(exports, "Tag", { enumerable: true, get: function () { return Tag_1.Tag; } });
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StyledCount = exports.StyledLabel = exports.StyledTag = void 0;
4
+ const styles_1 = require("@mui/material/styles");
5
+ const material_1 = require("@mui/material");
6
+ exports.StyledTag = (0, styles_1.styled)(material_1.Box)(({ theme, name }) => ({
7
+ background: name === 'in_dispute' ? '#56CCF2' : name === '' ? '#BB6BD9' : theme.palette.reconcilation[name].background,
8
+ borderRadius: 8,
9
+ padding: '2px 8px',
10
+ border: `1px solid ${name === 'in_dispute' ? '#56CCF2' : name === '' ? '#BB6BD9' : theme.palette.reconcilation[name].border}`,
11
+ display: 'flex',
12
+ alignItems: 'center',
13
+ width: 'fit-content',
14
+ }));
15
+ exports.StyledLabel = (0, styles_1.styled)(material_1.Typography)(({ theme }) => (Object.assign(Object.assign({}, theme.typography.body1), { lineHeight: '20px', color: theme.palette.common.white })));
16
+ exports.StyledCount = (0, styles_1.styled)(material_1.Typography)(({ theme, name }) => (Object.assign(Object.assign({}, theme.typography.subtitle2), { lineHeight: '16px', fontWeight: 700, color: name === 'in_dispute' ? '#56CCF2' : name === '' ? '#BB6BD9' : theme.palette.reconcilation[name].background, marginLeft: 8 })));
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Tag = void 0;
4
+ var Tag_1 = require("./Tag/");
5
+ Object.defineProperty(exports, "Tag", { enumerable: true, get: function () { return Tag_1.Tag; } });
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "commonjs"
3
+ }
@@ -0,0 +1,9 @@
1
+ import { titleCase } from '@fixefy/fixefy-ui-utils/';
2
+ import { Box } from '@mui/material';
3
+ import { StyledCount, StyledLabel, StyledTag } from './styles/tag.styles';
4
+ export const Tag = ({ name, count = 0 }) => (<Box display="flex" alignItems="center" justifyContent="center" sx={{ maxWidth: 'fit-content', mb: 1 }}>
5
+ <StyledTag name={name}>
6
+ <StyledLabel>{titleCase(name)}</StyledLabel>
7
+ </StyledTag>
8
+ <StyledCount name={name}>{count}</StyledCount>
9
+ </Box>);
@@ -0,0 +1 @@
1
+ export { Tag } from "./Tag";
@@ -0,0 +1,23 @@
1
+ import { styled } from '@mui/material/styles';
2
+ import { Box, Typography } from '@mui/material';
3
+ export const StyledTag = styled(Box)(({ theme, name }) => ({
4
+ background: name === 'in_dispute' ? '#56CCF2' : name === '' ? '#BB6BD9' : theme.palette.reconcilation[name].background,
5
+ borderRadius: 8,
6
+ padding: '2px 8px',
7
+ border: `1px solid ${name === 'in_dispute' ? '#56CCF2' : name === '' ? '#BB6BD9' : theme.palette.reconcilation[name].border}`,
8
+ display: 'flex',
9
+ alignItems: 'center',
10
+ width: 'fit-content',
11
+ }));
12
+ export const StyledLabel = styled(Typography)(({ theme }) => ({
13
+ ...theme.typography.body1,
14
+ lineHeight: '20px',
15
+ color: theme.palette.common.white,
16
+ }));
17
+ export const StyledCount = styled(Typography)(({ theme, name }) => ({
18
+ ...theme.typography.subtitle2,
19
+ lineHeight: '16px',
20
+ fontWeight: 700,
21
+ color: name === 'in_dispute' ? '#56CCF2' : name === '' ? '#BB6BD9' : theme.palette.reconcilation[name].background,
22
+ marginLeft: 8,
23
+ }));
@@ -0,0 +1 @@
1
+ export { Tag } from "./Tag/";
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "module"
3
+ }
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { TagProps } from './tag_types';
3
+ export declare const Tag: ({ name, count }: TagProps) => import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { Tag } from "./Tag";
2
+ export type { TagProps } from "./tag_types";
@@ -0,0 +1,3 @@
1
+ export declare const StyledTag: StyledComponent<ComponentProps & AdditionalProps, SpecificComponentProps, JSXProps>;
2
+ export declare const StyledLabel: StyledComponent<ComponentProps, SpecificComponentProps, JSXProps>;
3
+ export declare const StyledCount: StyledComponent<ComponentProps & AdditionalProps, SpecificComponentProps, JSXProps>;
@@ -0,0 +1,2 @@
1
+ export { Tag } from "./Tag/";
2
+ export type { TagProps } from "./Tag/tag_types";
package/package.json CHANGED
@@ -29,7 +29,7 @@
29
29
  "url": "https://github.com/Fixefy/fixefy-ui-components.git"
30
30
  },
31
31
  "scripts": {
32
- "build": "swc src -d dist",
32
+ "build": "tsc -p ./tsconfig.cjs.json && tsc -p ./tsconfig.es.json && tsc -p ./tsconfig.types.json && yarn build:copy swc src -d dist",
33
33
  "build:copy": "node ../../scripts/copy-files-ex.js",
34
34
  "pre_release": "yarn clean && yarn && yarn build",
35
35
  "pre_release_base": "yarn clean:base && yarn && yarn build",
@@ -62,5 +62,5 @@
62
62
  }
63
63
  },
64
64
  "types": "./dist-types/index.d.ts",
65
- "version": "0.0.18"
65
+ "version": "0.0.20"
66
66
  }