pcm-shared-components 0.0.19 → 0.0.23

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.
@@ -5,6 +5,7 @@ import PropTypes from 'prop-types';
5
5
  import Tooltip from '@mui/material/Tooltip';
6
6
  import clsx from 'clsx';
7
7
  import '../../../styles/tailwind.css';
8
+ import MoreVertIcon from '@mui/icons-material/MoreVert';
8
9
  const useStyles = makeStyles(() => ({
9
10
  rootFabElement: {
10
11
  margin: 2,
@@ -21,7 +22,7 @@ const useStyles = makeStyles(() => ({
21
22
  },
22
23
  boxShadow: ({
23
24
  boxShadow
24
- }) => boxShadow,
25
+ }) => boxShadow ? '' : 'none',
25
26
  color: ({
26
27
  textColor
27
28
  }) => textColor
@@ -62,11 +63,11 @@ const CustomFab = props => {
62
63
  export default /*#__PURE__*/memo(CustomFab);
63
64
  CustomFab.defaultProps = {
64
65
  onClick: () => {},
65
- Icon: undefined,
66
+ Icon: MoreVertIcon,
66
67
  iconLocation: 'left',
67
68
  buttonText: '',
68
69
  variant: 'circular',
69
- boxShadow: PropTypes.oneOf(['none', undefined]),
70
+ boxShadow: true,
70
71
  size: 'small',
71
72
  tooltipText: '',
72
73
  backgroundColor: undefined,
@@ -96,7 +97,7 @@ CustomFab.propTypes = {
96
97
  tooltipText: PropTypes.string,
97
98
 
98
99
  /** Display the drop shadow or not [none or undefined] */
99
- boxShadow: PropTypes.string,
100
+ boxShadow: PropTypes.bool,
100
101
 
101
102
  /** Background color */
102
103
  backgroundColor: PropTypes.string,
@@ -1,5 +1,6 @@
1
1
  import React from "react";
2
2
  import PropTypes from 'prop-types';
3
+ import '../../../styles/tailwind.css';
3
4
  export const TestButton = props => {
4
5
  const {
5
6
  text = 'hey'
@@ -0,0 +1,172 @@
1
+ import lightBlue from '@mui/material/colors/lightBlue';
2
+ import red from '@mui/material/colors/red';
3
+ const fuseDark = {
4
+ 50: '#eceeec',
5
+ 100: '#96c545',
6
+ 200: '#72b05c',
7
+ 300: '#7d8c7d',
8
+ 400: '#556f4c',
9
+ 500: '#3d523c',
10
+ 600: '#384835',
11
+ 700: '#f1632f',
12
+ 800: '#293326',
13
+ 900: '#21291e',
14
+ A100: '#96c545',
15
+ A200: '#72b05c',
16
+ A400: '#556f4c',
17
+ A700: '#f1632f'
18
+ };
19
+ export const theme = {
20
+ default: {
21
+ palette: {
22
+ type: 'light',
23
+ primary: fuseDark,
24
+ secondary: {
25
+ light: lightBlue[400],
26
+ main: lightBlue[600],
27
+ dark: lightBlue[700]
28
+ },
29
+ error: red
30
+ },
31
+ status: {
32
+ danger: 'orange'
33
+ }
34
+ },
35
+ sunset: {
36
+ palette: {
37
+ type: 'light',
38
+ primary: {
39
+ light: '#ff908b',
40
+ main: '#d0605e',
41
+ dark: '#9b3134'
42
+ },
43
+ secondary: {
44
+ light: '#c76a1d',
45
+ main: '#ff994c',
46
+ dark: '#ffca7b',
47
+ contrastText: '#fff'
48
+ },
49
+ error: red
50
+ },
51
+ status: {
52
+ danger: 'orange'
53
+ }
54
+ },
55
+ greeny: {
56
+ palette: {
57
+ type: 'light',
58
+ primary: {
59
+ light: '#6cabd4',
60
+ main: '#387ca3',
61
+ dark: '#005074'
62
+ },
63
+ secondary: {
64
+ light: '#89f6cf',
65
+ main: '#55c39e',
66
+ dark: '#159270',
67
+ contrastText: '#fff'
68
+ },
69
+ error: red
70
+ },
71
+ status: {
72
+ danger: 'orange'
73
+ }
74
+ },
75
+ beach: {
76
+ palette: {
77
+ type: 'light',
78
+ primary: {
79
+ light: '#c4d8dd',
80
+ main: '#93a7ab',
81
+ dark: '#65787c',
82
+ contrastText: '#fff'
83
+ },
84
+ secondary: {
85
+ light: '#ffb281',
86
+ main: '#f18153',
87
+ dark: '#ba5228',
88
+ contrastText: '#fff'
89
+ }
90
+ }
91
+ },
92
+ pitchCamp: {
93
+ palette: {
94
+ type: 'light',
95
+ primary: {
96
+ light: '#96c545',
97
+ main: '#72b05c',
98
+ dark: '#556f4c',
99
+ contrastText: '#fff'
100
+ },
101
+ secondary: {
102
+ light: '#ffb883',
103
+ main: '#f1632f',
104
+ dark: '#dc3f05'
105
+ }
106
+ }
107
+ },
108
+ sweetHues: {
109
+ palette: {
110
+ type: 'light',
111
+ primary: {
112
+ light: '#d5c1eb',
113
+ main: '#a391b9',
114
+ dark: '#746389',
115
+ contrastText: '#fff'
116
+ },
117
+ secondary: {
118
+ light: '#90afd4',
119
+ main: '#6080a3',
120
+ dark: '#325474'
121
+ }
122
+ }
123
+ },
124
+ defaultDark: {
125
+ palette: {
126
+ type: 'dark',
127
+ primary: fuseDark,
128
+ secondary: {
129
+ light: lightBlue[400],
130
+ main: lightBlue[600],
131
+ dark: lightBlue[700]
132
+ },
133
+ error: red
134
+ },
135
+ status: {
136
+ danger: 'orange'
137
+ }
138
+ },
139
+ deepOcean: {
140
+ palette: {
141
+ type: 'dark',
142
+ primary: {
143
+ light: '#8f53e7',
144
+ main: '#5a24b4',
145
+ dark: '#1e0083'
146
+ },
147
+ secondary: {
148
+ light: '#ff61ff',
149
+ main: '#fe00e9',
150
+ dark: '#c600b6',
151
+ contrastText: '#fff'
152
+ }
153
+ }
154
+ },
155
+ slate: {
156
+ palette: {
157
+ type: 'dark',
158
+ primary: {
159
+ light: '#86fff7',
160
+ main: '#4ecdc4',
161
+ dark: '#009b94'
162
+ },
163
+ secondary: {
164
+ light: '#ff9d99',
165
+ main: '#ff6b6b',
166
+ dark: '#c73840',
167
+ contrastText: '#fff'
168
+ }
169
+ }
170
+ }
171
+ };
172
+ export default theme;
package/dist/index.js CHANGED
@@ -2,4 +2,5 @@ import TestButton from './components/Buttons/TestButton';
2
2
  import CodeHighlight from './components/Tools/CodeHighlight/CodeHighlight';
3
3
  import CustomFab from './components/Buttons/CustomFab/CustomFab';
4
4
  import HelpButton from './components/Buttons/HelpButton/HelpButton';
5
- export { TestButton, CodeHighlight, CustomFab, HelpButton };
5
+ import theme from './components/Theme/theme';
6
+ export { TestButton, CodeHighlight, CustomFab, HelpButton, theme };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pcm-shared-components",
3
- "version": "0.0.19",
3
+ "version": "0.0.23",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "babel": {
@@ -30,7 +30,8 @@
30
30
  "@babel/preset-env": "^7.16.11",
31
31
  "@babel/preset-react": "^7.16.7",
32
32
  "@rollup/plugin-babel": "^5.3.1",
33
- "@storybook/addon-actions": "^6.4.9",
33
+ "@storybook/addon-actions": "^6.4.19",
34
+ "@storybook/addon-console": "^1.2.3",
34
35
  "@storybook/addon-essentials": "^6.4.9",
35
36
  "@storybook/addon-links": "^6.4.9",
36
37
  "@storybook/addon-postcss": "^2.0.0",