@fixefy/fixefy-ui-components 0.0.24 → 0.0.26

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.
@@ -1,26 +1,25 @@
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, {
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
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__*/ _jsxs(Box, {
15
6
  display: "flex",
16
7
  alignItems: "center",
17
8
  justifyContent: "center",
18
9
  sx: {
19
10
  maxWidth: 'fit-content',
20
11
  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));
12
+ },
13
+ children: [
14
+ /*#__PURE__*/ _jsx(StyledTag, {
15
+ name: name,
16
+ children: /*#__PURE__*/ _jsx(StyledLabel, {
17
+ children: titleCase(name)
18
+ })
19
+ }),
20
+ /*#__PURE__*/ _jsx(StyledCount, {
21
+ name: name,
22
+ children: count
23
+ })
24
+ ]
25
+ });
@@ -1,11 +1 @@
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.Tag;
9
- }
10
- });
11
- const _Tag = require("./Tag");
1
+ export { Tag } from "./Tag";
@@ -1,29 +1,59 @@
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
- });
1
+ function _define_property(obj, key, value) {
2
+ if (key in obj) {
3
+ Object.defineProperty(obj, key, {
4
+ value: value,
5
+ enumerable: true,
6
+ configurable: true,
7
+ writable: true
8
+ });
9
+ } else {
10
+ obj[key] = value;
11
+ }
12
+ return obj;
13
+ }
14
+ function _object_spread(target) {
15
+ for(var i = 1; i < arguments.length; i++){
16
+ var source = arguments[i] != null ? arguments[i] : {};
17
+ var ownKeys = Object.keys(source);
18
+ if (typeof Object.getOwnPropertySymbols === "function") {
19
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
20
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
21
+ }));
22
+ }
23
+ ownKeys.forEach(function(key) {
24
+ _define_property(target, key, source[key]);
25
+ });
26
+ }
27
+ return target;
10
28
  }
11
- _export(exports, {
12
- StyledCount: function() {
13
- return StyledCount;
14
- },
15
- StyledLabel: function() {
16
- return StyledLabel;
17
- },
18
- StyledTag: function() {
19
- return StyledTag;
29
+ function ownKeys(object, enumerableOnly) {
30
+ var keys = Object.keys(object);
31
+ if (Object.getOwnPropertySymbols) {
32
+ var symbols = Object.getOwnPropertySymbols(object);
33
+ if (enumerableOnly) {
34
+ symbols = symbols.filter(function(sym) {
35
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
36
+ });
37
+ }
38
+ keys.push.apply(keys, symbols);
20
39
  }
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 })=>({
40
+ return keys;
41
+ }
42
+ function _object_spread_props(target, source) {
43
+ source = source != null ? source : {};
44
+ if (Object.getOwnPropertyDescriptors) {
45
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
46
+ } else {
47
+ ownKeys(Object(source)).forEach(function(key) {
48
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
49
+ });
50
+ }
51
+ return target;
52
+ }
53
+ import { styled } from '@mui/material/styles';
54
+ import { Box, Typography } from '@mui/material';
55
+ //
56
+ export const StyledTag = styled(Box)(({ theme, name })=>({
27
57
  background: name === 'in_dispute' ? '#56CCF2' : name === '' ? '#BB6BD9' : theme.palette.reconcilation[name].background,
28
58
  borderRadius: 8,
29
59
  padding: '2px 8px',
@@ -32,11 +62,11 @@ const StyledTag = (0, _styles.styled)(_material.Box)(({ theme, name })=>({
32
62
  alignItems: 'center',
33
63
  width: 'fit-content'
34
64
  }));
35
- const StyledLabel = (0, _styles.styled)(_material.Typography)(({ theme })=>_object_spread_props._(_object_spread._({}, theme.typography.body1), {
65
+ export const StyledLabel = styled(Typography)(({ theme })=>_object_spread_props(_object_spread({}, theme.typography.body1), {
36
66
  lineHeight: '20px',
37
67
  color: theme.palette.common.white
38
68
  }));
39
- const StyledCount = (0, _styles.styled)(_material.Typography)(({ theme, name })=>_object_spread_props._(_object_spread._({}, theme.typography.subtitle2), {
69
+ export const StyledCount = styled(Typography)(({ theme, name })=>_object_spread_props(_object_spread({}, theme.typography.subtitle2), {
40
70
  lineHeight: '16px',
41
71
  fontWeight: 700,
42
72
  color: name === 'in_dispute' ? '#56CCF2' : name === '' ? '#BB6BD9' : theme.palette.reconcilation[name].background,
package/dist-cjs/index.js CHANGED
@@ -1,11 +1 @@
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("./Tag/");
1
+ export { Tag } from "./Tag/";
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,4 @@
1
+ export type TagProps = {
2
+ name: string;
3
+ count?: number;
4
+ };
package/package.json CHANGED
@@ -32,7 +32,7 @@
32
32
  "scripts": {
33
33
  "build:cjs": "swc src -d dist-cjs --config-file .swcrc.cjs.json",
34
34
  "build:es": "swc src -d dist-es --config-file .swcrc.es.json",
35
- "build:types": "tsc --project tsconfig.types.json",
35
+ "build:types": "tsc -p tsconfig.types.json",
36
36
  "build": "yarn build:cjs && yarn build:es && yarn build:types && yarn build:copy",
37
37
  "build:copy": "node ../../scripts/copy-files-ex.js",
38
38
  "pre_release": "yarn clean && yarn && yarn build",
@@ -66,5 +66,5 @@
66
66
  }
67
67
  },
68
68
  "types": "./dist-types/index.d.ts",
69
- "version": "0.0.24"
69
+ "version": "0.0.26"
70
70
  }
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });