pcm-shared-components 0.0.30 → 0.0.33
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/components/Buttons/CustomFab/CustomFab.js +26 -4
- package/dist/components/Buttons/HelpButton/HelpButton.js +1 -2
- package/dist/components/Buttons/TestButton/index.js +1 -2
- package/dist/components/Tools/CodeHighlight/CodeHighlight.js +2 -3
- package/dist/index.js +1 -0
- package/dist/styles/tailwind.css +1 -1
- package/package.json +1 -1
|
@@ -4,11 +4,31 @@ import Fab from '@mui/material/Fab';
|
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import Tooltip from '@mui/material/Tooltip';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
|
-
import '../../../styles/tailwind.css';
|
|
8
7
|
import MoreVertIcon from '@mui/icons-material/MoreVert';
|
|
8
|
+
import { ThemeProvider } from '@mui/system';
|
|
9
|
+
import { createTheme } from '@mui/material/styles';
|
|
10
|
+
import { theme } from '../../Theme/theme';
|
|
11
|
+
const defaultTheme = createTheme(theme.pitchCamp);
|
|
9
12
|
const useStyles = makeStyles(() => ({
|
|
10
13
|
rootFabElement: {
|
|
11
|
-
margin: 2
|
|
14
|
+
margin: 2,
|
|
15
|
+
backgroundColor: ({
|
|
16
|
+
backgroundColor
|
|
17
|
+
}) => backgroundColor,
|
|
18
|
+
'&:hover': {
|
|
19
|
+
background: ({
|
|
20
|
+
hoverBackgroundColor
|
|
21
|
+
}) => hoverBackgroundColor,
|
|
22
|
+
color: ({
|
|
23
|
+
hoverTextColor
|
|
24
|
+
}) => hoverTextColor
|
|
25
|
+
},
|
|
26
|
+
boxShadow: ({
|
|
27
|
+
boxShadow
|
|
28
|
+
}) => boxShadow ? '' : 'none',
|
|
29
|
+
color: ({
|
|
30
|
+
textColor
|
|
31
|
+
}) => textColor
|
|
12
32
|
}
|
|
13
33
|
}));
|
|
14
34
|
|
|
@@ -26,7 +46,9 @@ const CustomFab = props => {
|
|
|
26
46
|
iconLocation
|
|
27
47
|
} = props;
|
|
28
48
|
const classes = useStyles(props);
|
|
29
|
-
return /*#__PURE__*/React.createElement(
|
|
49
|
+
return /*#__PURE__*/React.createElement(ThemeProvider, {
|
|
50
|
+
theme: defaultTheme
|
|
51
|
+
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
30
52
|
title: tooltipText,
|
|
31
53
|
disableHoverListener: tooltipText && tooltipText.length === 0 ? true : false
|
|
32
54
|
}, /*#__PURE__*/React.createElement(Fab, {
|
|
@@ -40,7 +62,7 @@ const CustomFab = props => {
|
|
|
40
62
|
className: `flex ${iconLocation === 'left' ? 'flex-row' : 'flex-row-reverse'}`
|
|
41
63
|
}, Icon && /*#__PURE__*/React.createElement(Icon, null), buttonText && buttonText.length > 0 && /*#__PURE__*/React.createElement("div", {
|
|
42
64
|
className: "mx-6"
|
|
43
|
-
}, " ", buttonText))));
|
|
65
|
+
}, " ", buttonText)))));
|
|
44
66
|
};
|
|
45
67
|
|
|
46
68
|
export default /*#__PURE__*/memo(CustomFab);
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import CustomFab from '../CustomFab/CustomFab';
|
|
3
3
|
import HelpOutlineIcon from '@mui/icons-material/HelpOutline';
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
5
|
-
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
6
5
|
export const HelpButton = props => {
|
|
7
6
|
const {
|
|
8
7
|
onClickLink,
|
|
@@ -2,9 +2,8 @@ import React, { useState } from 'react';
|
|
|
2
2
|
import * as Prism from 'prismjs';
|
|
3
3
|
import { memo, useEffect, useRef } from 'react';
|
|
4
4
|
import './prism-languages';
|
|
5
|
-
import PropTypes from 'prop-types';
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
import PropTypes from 'prop-types';
|
|
6
|
+
import '../../../styles/prism.css';
|
|
8
7
|
export const CodeHighlight = props => {
|
|
9
8
|
const domNode = useRef(null);
|
|
10
9
|
const source = useRef(trimCode());
|
package/dist/index.js
CHANGED
package/dist/styles/tailwind.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
*,:after,:before{--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#2196f380;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.relative{position:relative}.mx-6{margin-left:.6rem;margin-right:.6rem}.mt-6{margin-top:.6rem}.mb-2{margin-bottom:.2rem}.mb-6{margin-bottom:.6rem}.ml-6{margin-left:.6rem}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.w-full{width:100%}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.items-center{align-items:center}.justify-end{justify-content:flex-end}.rounded-md{border-radius:.6rem}.border{border-width:1px}.border-transparent{border-color:#0000}.bg-green-600{--tw-bg-opacity:1;background-color:rgb(67 160 71/var(--tw-bg-opacity))}.px-4{padding-left:.4rem;padding-right:.4rem}.py-2{padding-top:.2rem;padding-bottom:.2rem}.px-2{padding-left:.2rem;padding-right:.2rem}.text-xl{font-size:2rem;line-height:2.8rem}.text-sm{font-size:1.4rem;line-height:2rem}.text-2xl{font-size:2.4rem;line-height:3.2rem}.font-medium{font-weight:500}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.shadow{--tw-shadow:0 1px 3px 0 #0000001a,0 1px 2px 0 #0000000f;--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px 0 var(--tw-shadow-color)}.shadow,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 #0000000d;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.hover\:bg-green-700:hover{--tw-bg-opacity:1;background-color:rgb(56 142 60/var(--tw-bg-opacity))}.hover\:bg-gray-100\/75:hover{background-color:#f5f5f5bf}.focus\:outline-none:focus{outline:2px solid #0000;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-green-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(76 175 80/var(--tw-ring-opacity))}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px}
|