@fixefy/fixefy-ui-components 0.0.20 → 0.0.22

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,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "Tag", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return Tag;
9
+ }
10
+ });
11
+ const _ = require("@fixefy/fixefy-ui-utils/");
12
+ const _material = require("@mui/material");
13
+ const _tagstyles = require("./styles/tag.styles");
14
+ const Tag = ({ name, count = 0 })=>/*#__PURE__*/ React.createElement(_material.Box, {
15
+ display: "flex",
16
+ alignItems: "center",
17
+ justifyContent: "center",
18
+ sx: {
19
+ maxWidth: 'fit-content',
20
+ mb: 1
21
+ }
22
+ }, /*#__PURE__*/ React.createElement(_tagstyles.StyledTag, {
23
+ name: name
24
+ }, /*#__PURE__*/ React.createElement(_tagstyles.StyledLabel, null, (0, _.titleCase)(name))), /*#__PURE__*/ React.createElement(_tagstyles.StyledCount, {
25
+ name: name
26
+ }, count));
@@ -1,5 +1,11 @@
1
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; } });
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "Tag", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return _Tag.Tag;
9
+ }
10
+ });
11
+ const _Tag = require("./Tag");
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ StyledCount: function() {
13
+ return StyledCount;
14
+ },
15
+ StyledLabel: function() {
16
+ return StyledLabel;
17
+ },
18
+ StyledTag: function() {
19
+ return StyledTag;
20
+ }
21
+ });
22
+ const _object_spread = require("@swc/helpers/_/_object_spread");
23
+ const _object_spread_props = require("@swc/helpers/_/_object_spread_props");
24
+ const _styles = require("@mui/material/styles");
25
+ const _material = require("@mui/material");
26
+ const StyledTag = (0, _styles.styled)(_material.Box)(({ theme, name })=>({
27
+ background: name === 'in_dispute' ? '#56CCF2' : name === '' ? '#BB6BD9' : theme.palette.reconcilation[name].background,
28
+ borderRadius: 8,
29
+ padding: '2px 8px',
30
+ border: `1px solid ${name === 'in_dispute' ? '#56CCF2' : name === '' ? '#BB6BD9' : theme.palette.reconcilation[name].border}`,
31
+ display: 'flex',
32
+ alignItems: 'center',
33
+ width: 'fit-content'
34
+ }));
35
+ const StyledLabel = (0, _styles.styled)(_material.Typography)(({ theme })=>_object_spread_props._(_object_spread._({}, theme.typography.body1), {
36
+ lineHeight: '20px',
37
+ color: theme.palette.common.white
38
+ }));
39
+ const StyledCount = (0, _styles.styled)(_material.Typography)(({ theme, name })=>_object_spread_props._(_object_spread._({}, theme.typography.subtitle2), {
40
+ lineHeight: '16px',
41
+ fontWeight: 700,
42
+ color: name === 'in_dispute' ? '#56CCF2' : name === '' ? '#BB6BD9' : theme.palette.reconcilation[name].background,
43
+ marginLeft: 8
44
+ }));
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
package/dist-cjs/index.js CHANGED
@@ -1,5 +1,11 @@
1
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; } });
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "Tag", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return _.Tag;
9
+ }
10
+ });
11
+ const _ = require("./Tag/");
@@ -0,0 +1,16 @@
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 })=>/*#__PURE__*/ React.createElement(Box, {
5
+ display: "flex",
6
+ alignItems: "center",
7
+ justifyContent: "center",
8
+ sx: {
9
+ maxWidth: 'fit-content',
10
+ mb: 1
11
+ }
12
+ }, /*#__PURE__*/ React.createElement(StyledTag, {
13
+ name: name
14
+ }, /*#__PURE__*/ React.createElement(StyledLabel, null, titleCase(name))), /*#__PURE__*/ React.createElement(StyledCount, {
15
+ name: name
16
+ }, count));
@@ -0,0 +1,24 @@
1
+ import { styled } from '@mui/material/styles';
2
+ import { Box, Typography } from '@mui/material';
3
+ //
4
+ export const StyledTag = styled(Box)(({ theme, name })=>({
5
+ background: name === 'in_dispute' ? '#56CCF2' : name === '' ? '#BB6BD9' : theme.palette.reconcilation[name].background,
6
+ borderRadius: 8,
7
+ padding: '2px 8px',
8
+ border: `1px solid ${name === 'in_dispute' ? '#56CCF2' : name === '' ? '#BB6BD9' : theme.palette.reconcilation[name].border}`,
9
+ display: 'flex',
10
+ alignItems: 'center',
11
+ width: 'fit-content'
12
+ }));
13
+ export const StyledLabel = styled(Typography)(({ theme })=>({
14
+ ...theme.typography.body1,
15
+ lineHeight: '20px',
16
+ color: theme.palette.common.white
17
+ }));
18
+ export const StyledCount = styled(Typography)(({ theme, name })=>({
19
+ ...theme.typography.subtitle2,
20
+ lineHeight: '16px',
21
+ fontWeight: 700,
22
+ color: name === 'in_dispute' ? '#56CCF2' : name === '' ? '#BB6BD9' : theme.palette.reconcilation[name].background,
23
+ marginLeft: 8
24
+ }));
@@ -0,0 +1 @@
1
+ export { };
package/package.json CHANGED
@@ -29,7 +29,10 @@
29
29
  "url": "https://github.com/Fixefy/fixefy-ui-components.git"
30
30
  },
31
31
  "scripts": {
32
- "build": "tsc -p ./tsconfig.cjs.json && tsc -p ./tsconfig.es.json && tsc -p ./tsconfig.types.json && yarn build:copy swc src -d dist",
32
+ "build:cjs": "swc src -d dist-cjs --config-file .swcrc.cjs.json",
33
+ "build:es": "swc src -d dist-es --config-file .swcrc.es.json",
34
+ "build:types": "tsc --project tsconfig.types.json",
35
+ "build": "yarn build:cjs && yarn build:es && yarn build:types && yarn build:copy",
33
36
  "build:copy": "node ../../scripts/copy-files-ex.js",
34
37
  "pre_release": "yarn clean && yarn && yarn build",
35
38
  "pre_release_base": "yarn clean:base && yarn && yarn build",
@@ -62,5 +65,5 @@
62
65
  }
63
66
  },
64
67
  "types": "./dist-types/index.d.ts",
65
- "version": "0.0.20"
68
+ "version": "0.0.22"
66
69
  }
@@ -1,13 +0,0 @@
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;
@@ -1,16 +0,0 @@
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 })));
@@ -1,9 +0,0 @@
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>);
@@ -1,23 +0,0 @@
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
- }));