pcm-shared-components 0.0.11 → 0.0.14

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/README.md CHANGED
@@ -1,3 +1,3 @@
1
1
  # Shared Components between client and admin portal
2
2
 
3
-
3
+ The Library is published to NPM on the github build.
@@ -0,0 +1,120 @@
1
+ import React, { memo } from 'react';
2
+ import { makeStyles } from '@mui/styles';
3
+ import Fab from '@mui/material/Fab';
4
+ import PropTypes from 'prop-types';
5
+ import Tooltip from '@mui/material/Tooltip';
6
+ import clsx from 'clsx';
7
+ const useStyles = makeStyles(() => ({
8
+ rootFabElement: {
9
+ margin: 2,
10
+ backgroundColor: ({
11
+ backgroundColor
12
+ }) => backgroundColor,
13
+ '&:hover': {
14
+ background: ({
15
+ hoverBackgroundColor
16
+ }) => hoverBackgroundColor,
17
+ color: ({
18
+ hoverTextColor
19
+ }) => hoverTextColor
20
+ },
21
+ boxShadow: ({
22
+ boxShadow
23
+ }) => boxShadow,
24
+ color: ({
25
+ textColor
26
+ }) => textColor
27
+ }
28
+ }));
29
+
30
+ const CustomFab = props => {
31
+ const {
32
+ onClick,
33
+ variant,
34
+ tooltipText,
35
+ size,
36
+ className,
37
+ backgroundColor,
38
+ color,
39
+ Icon,
40
+ buttonText,
41
+ iconLocation
42
+ } = props;
43
+ const classes = useStyles(props);
44
+ return /*#__PURE__*/React.createElement(Tooltip, {
45
+ title: tooltipText,
46
+ disableHoverListener: tooltipText && tooltipText.length === 0 ? true : false
47
+ }, /*#__PURE__*/React.createElement(Fab, {
48
+ size: size,
49
+ color: backgroundColor ? backgroundColor : color,
50
+ "aria-label": "add",
51
+ className: clsx(classes.rootFabElement, className),
52
+ variant: buttonText && buttonText.length > 0 ? 'extended' : variant,
53
+ onClick: onClick
54
+ }, /*#__PURE__*/React.createElement("div", {
55
+ className: `flex ${iconLocation === 'left' ? 'flex-row' : 'flex-row-reverse'}`
56
+ }, Icon && /*#__PURE__*/React.createElement(Icon, null), buttonText && buttonText.length > 0 && /*#__PURE__*/React.createElement("div", {
57
+ className: "mx-6"
58
+ }, " ", buttonText))));
59
+ };
60
+
61
+ export default /*#__PURE__*/memo(CustomFab);
62
+ CustomFab.defaultProps = {
63
+ onClick: () => {},
64
+ Icon: undefined,
65
+ iconLocation: 'left',
66
+ buttonText: '',
67
+ variant: 'circular',
68
+ boxShadow: PropTypes.oneOf(['none', undefined]),
69
+ size: 'small',
70
+ tooltipText: '',
71
+ backgroundColor: undefined,
72
+ hoverBackgroundColor: undefined,
73
+ textColor: 'textPrimary',
74
+ hoverTextColor: 'textPrimary',
75
+ className: '',
76
+ color: 'primary'
77
+ };
78
+ CustomFab.propTypes = {
79
+ /** onClick function passed to the button */
80
+ onClick: PropTypes.object,
81
+
82
+ /** Icon to be used in the button */
83
+ Icon: PropTypes.element,
84
+
85
+ /** Text inside of the button */
86
+ buttonText: PropTypes.string,
87
+
88
+ /** Either [circular or extended] if including text */
89
+ variant: PropTypes.oneOf(['extended', 'circular']),
90
+
91
+ /** Either [left or right] controls the location of the icon*/
92
+ iconLocation: PropTypes.oneOf(['left', 'right']),
93
+
94
+ /** The text to display in the tooltip */
95
+ tooltipText: PropTypes.string,
96
+
97
+ /** Display the drop shadow or not [none or undefined] */
98
+ boxShadow: PropTypes.string,
99
+
100
+ /** Background color */
101
+ backgroundColor: PropTypes.string,
102
+
103
+ /** On hover background color. */
104
+ hoverBackgroundColor: PropTypes.string,
105
+
106
+ /** Font color */
107
+ textColor: PropTypes.string,
108
+
109
+ /** The color of the text and icon on hover */
110
+ hoverTextColor: PropTypes.string,
111
+
112
+ /** Size of the FAB icon ['small','medium','large'] */
113
+ size: PropTypes.oneOf(['small', 'medium', 'large']),
114
+
115
+ /** Classes to override */
116
+ className: PropTypes.string,
117
+
118
+ /** Theme colors if not using backgroundColor ['primary','secondary'] */
119
+ color: PropTypes.oneOf(['primary', 'secondary'])
120
+ };
@@ -0,0 +1,47 @@
1
+ import CustomFab from '../CustomFab/CustomFab';
2
+ import HelpOutlineIcon from '@mui/icons-material/HelpOutline';
3
+ import PropTypes from 'prop-types';
4
+ export const HelpButton = props => {
5
+ const {
6
+ onClickLink,
7
+ className,
8
+ color,
9
+ tooltipText,
10
+ size
11
+ } = props;
12
+ return /*#__PURE__*/React.createElement(CustomFab, {
13
+ className: className,
14
+ Icon: HelpOutlineIcon,
15
+ tooltipText: tooltipText,
16
+ color: color,
17
+ size: size,
18
+ variant: 'round',
19
+ onClick: () => {
20
+ window.open(onClickLink, "_blank");
21
+ }
22
+ });
23
+ };
24
+ export default HelpButton;
25
+ HelpButton.defaultProps = {
26
+ onClickLink: '',
27
+ className: '',
28
+ color: 'primary',
29
+ tooltipText: '',
30
+ size: 'large'
31
+ };
32
+ HelpButton.propTypes = {
33
+ /** On click link, it's the URL to navigate too */
34
+ onClickLink: PropTypes.string.isRequired,
35
+
36
+ /** className override */
37
+ className: PropTypes.string,
38
+
39
+ /** Theme color primary or secondary */
40
+ color: PropTypes.oneOf(['primary', 'secondary']),
41
+
42
+ /** Just a tooltip text */
43
+ tooltipText: PropTypes.string,
44
+
45
+ /** The size of the Icon ['small','medium','large'] */
46
+ size: PropTypes.oneOf(['small', 'medium', 'large'])
47
+ };
@@ -1,8 +1,19 @@
1
1
  import React from "react";
2
- export const Button = () => {
2
+ import PropTypes from 'prop-types';
3
+ export const TestButton = props => {
4
+ const {
5
+ text = 'hey'
6
+ } = props;
3
7
  return /*#__PURE__*/React.createElement("button", {
4
8
  type: "button",
5
9
  className: "relative inline-flex items-center px-4 py-2 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-green-600 hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500"
6
- }, "Button");
10
+ }, text);
7
11
  };
8
- export default Button;
12
+ export default TestButton;
13
+ TestButton.defaultProps = {
14
+ text: 'ballon'
15
+ };
16
+ TestButton.propTypes = {
17
+ /** onClick function passed to the button */
18
+ text: PropTypes.string
19
+ };
@@ -0,0 +1,120 @@
1
+ import React, { useState } from 'react';
2
+ import * as Prism from 'prismjs';
3
+ import { memo, useEffect, useRef } from 'react';
4
+ import './prism-languages';
5
+ import PropTypes from 'prop-types';
6
+ export const CodeHighlight = props => {
7
+ const domNode = useRef(null);
8
+ const source = useRef(trimCode());
9
+ const [copied, setCopied] = useState(false);
10
+ useEffect(() => {
11
+ function highlight() {
12
+ Prism.highlightElement(domNode.current, props.async);
13
+ }
14
+
15
+ highlight();
16
+ }, [props]);
17
+
18
+ function trimCode() {
19
+ let sourceString = props.children;
20
+
21
+ if (typeof sourceString === 'object' && sourceString.default) {
22
+ sourceString = sourceString.default;
23
+ } // Split the source into lines
24
+
25
+
26
+ const sourceLines = sourceString.split('\n'); // Remove the first and the last line of the source
27
+ // code if they are blank lines. This way, the html component
28
+
29
+ if (!sourceLines[0].trim()) {
30
+ sourceLines.shift();
31
+ }
32
+
33
+ if (!sourceLines[sourceLines.length - 1].trim()) {
34
+ sourceLines.pop();
35
+ } // Find the first non-whitespace char index in
36
+ // the first line of the source code
37
+
38
+
39
+ const indexOfFirstChar = sourceLines[0].search(/\S|$/); // Generate the trimmed source
40
+
41
+ let sourceRaw = ''; // Iterate through all the lines
42
+
43
+ sourceLines.forEach((line, index) => {
44
+ // Trim the beginning white space depending on the index
45
+ // and concat the source code
46
+ sourceRaw += line.substr(indexOfFirstChar, line.length); // If it's not the last line...
47
+
48
+ if (index !== sourceLines.length - 1) {
49
+ // Add a line break at the end
50
+ sourceRaw = `${sourceRaw}\n`;
51
+ }
52
+ });
53
+ return sourceRaw;
54
+ }
55
+
56
+ const ShowCopyTextButton = () => {
57
+ return /*#__PURE__*/React.createElement("div", {
58
+ className: "flex flex-row justify-end w-full "
59
+ }, /*#__PURE__*/React.createElement("button", {
60
+ className: "hover:bg-gray-100/75 rounded-md px-2",
61
+ onClick: () => {
62
+ copyToClipboard(source.current);
63
+ setCopied(true);
64
+ setTimeout(() => {
65
+ setCopied(false);
66
+ }, 1500);
67
+ }
68
+ }, !copied ? 'Copy' : 'Copied'));
69
+ };
70
+
71
+ const copyToClipboard = text => {
72
+ navigator.clipboard.writeText(text);
73
+ };
74
+
75
+ const {
76
+ className,
77
+ component: Wrapper,
78
+ showCopyButton
79
+ } = props;
80
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Wrapper, {
81
+ ref: domNode,
82
+ className: className
83
+ }, source.current), showCopyButton && /*#__PURE__*/React.createElement(ShowCopyTextButton, null));
84
+ };
85
+ export default /*#__PURE__*/memo(CodeHighlight); // Specifies the default values for the props:
86
+
87
+ CodeHighlight.defaultProps = {
88
+ component: 'pre',
89
+ className: 'language-js',
90
+ showCopyButton: false
91
+ }; // Type of
92
+
93
+ CodeHighlight.propTypes = {
94
+ /**
95
+ * Specifies the wrapping element tag to use for the code wrapper
96
+ *
97
+ * pre = provides a nice wrapper for the code.
98
+ *
99
+ * code = only renders the code without the pre wrapper
100
+ */
101
+ component: PropTypes.oneOf(['pre', 'code']),
102
+
103
+ /**
104
+ * Specifies the class to use in order to properly highlight the languages
105
+ */
106
+ className: PropTypes.oneOf(['language-js', 'language-jsx', 'language-typescript', 'language-php', 'language-sass', 'language-scss', 'language-css', 'language-python', 'language-perl', 'language-json', 'language-csharp', 'language-cpp', 'language-c', 'language-diff']),
107
+
108
+ /**
109
+ * Any literal string inside the CodeHighlight component
110
+ *
111
+ * Example: {`import React from 'react'`}
112
+ *
113
+ */
114
+ children: PropTypes.string.isRequired,
115
+
116
+ /**
117
+ * Displays a Copy button in the right bottom corner of the code to allow users to copy the displayed code.
118
+ */
119
+ showCopyButton: PropTypes.bool
120
+ };
@@ -0,0 +1,18 @@
1
+ import 'prismjs/components/prism-c';
2
+ import 'prismjs/components/prism-cpp';
3
+ import 'prismjs/components/prism-csharp';
4
+ import 'prismjs/components/prism-css';
5
+ import 'prismjs/components/prism-diff';
6
+ import 'prismjs/components/prism-java';
7
+ import 'prismjs/components/prism-javascript';
8
+ import 'prismjs/components/prism-json';
9
+ import 'prismjs/components/prism-jsx';
10
+ import 'prismjs/components/prism-markup';
11
+ import 'prismjs/components/prism-markup-templating';
12
+ import 'prismjs/components/prism-perl';
13
+ import 'prismjs/components/prism-php';
14
+ import 'prismjs/components/prism-python';
15
+ import 'prismjs/components/prism-sass';
16
+ import 'prismjs/components/prism-scss';
17
+ import 'prismjs/components/prism-typescript';
18
+ import 'prismjs/prism';
package/dist/index.js CHANGED
@@ -1,3 +1,7 @@
1
1
  import './styles/tailwind.css';
2
- import Button from './components/Button';
3
- export { Button };
2
+ import './styles/prism.css';
3
+ import TestButton from './components/Buttons/TestButton';
4
+ import CodeHighlight from './components/Tools/CodeHighlight';
5
+ import CustomFab from './components/Buttons/CustomFab/CustomFab';
6
+ import HelpButton from './components/Buttons/HelpButton/HelpButton';
7
+ export { TestButton, CodeHighlight, CustomFab, HelpButton };
@@ -0,0 +1,221 @@
1
+ code[class*="language-"],
2
+ pre[class*="language-"] {
3
+ text-align: left !important;
4
+ white-space: pre-wrap !important;
5
+ word-break: break-all !important;
6
+ word-wrap: break-word !important;
7
+ color: #c3cee3 !important;
8
+ background: #263238 !important;
9
+ font-family: Roboto Mono,"Liberation Mono",Menlo,Courier,monospace !important;
10
+ font-size: 1em !important;
11
+ line-height: 1.5 !important;
12
+ -moz-tab-size: 4 !important;
13
+ -o-tab-size: 4 !important;
14
+ tab-size: 4 !important;
15
+ -webkit-hyphens: none !important;
16
+ -moz-hyphens: none !important;
17
+ -ms-hyphens: none !important;
18
+ hyphens: none !important;
19
+ padding: 12px;
20
+ border-radius: 5px;
21
+ }
22
+
23
+
24
+ code[class*="language-"]::-moz-selection,
25
+ pre[class*="language-"]::-moz-selection,
26
+ code[class*="language-"] ::-moz-selection,
27
+ pre[class*="language-"] ::-moz-selection {
28
+ background: #363636 !important;
29
+ }
30
+
31
+ code[class*="language-"]::selection,
32
+ pre[class*="language-"]::selection,
33
+ code[class*="language-"] ::selection,
34
+ pre[class*="language-"] ::selection {
35
+ background: #363636 !important;
36
+ }
37
+
38
+ :not(pre) > code[class*="language-"] {
39
+ white-space: normal !important;
40
+ border-radius: 0.2em !important;
41
+ padding: 0.1em !important;
42
+ }
43
+
44
+ pre[class*="language-"] {
45
+ overflow: auto !important;
46
+ position: relative !important;
47
+ padding: 10px !important;
48
+ border-radius: 16px !important;
49
+ }
50
+
51
+ .language-css > code,
52
+ .language-sass > code,
53
+ .language-scss > code {
54
+ color: #fd9170 !important;
55
+ }
56
+
57
+ [class*="language-"] .namespace {
58
+ opacity: 0.7 !important;
59
+ }
60
+
61
+ .token.plain-text {
62
+ color: #c3cee3 !important;
63
+ }
64
+
65
+ .token.atrule {
66
+ color: #c792ea !important;
67
+ }
68
+
69
+ .token.attr-name {
70
+ color: #ffcb6b !important;
71
+ }
72
+
73
+ .token.attr-value {
74
+ color: #c3e88d !important;
75
+ }
76
+
77
+ .token.attribute {
78
+ color: #c3e88d !important;
79
+ }
80
+
81
+ .token.boolean {
82
+ color: #c792ea !important;
83
+ }
84
+
85
+ .token.builtin {
86
+ color: #ffcb6b !important;
87
+ }
88
+
89
+ .token.cdata {
90
+ color: #80cbc4 !important;
91
+ }
92
+
93
+ .token.char {
94
+ color: #80cbc4 !important;
95
+ }
96
+
97
+ .token.class {
98
+ color: #ffcb6b !important;
99
+ }
100
+
101
+ .token.class-name {
102
+ color: #82aaff !important;
103
+ }
104
+
105
+ .token.color {
106
+ color: #f2ff00 !important;
107
+ }
108
+
109
+ .token.comment {
110
+ color: #5cd15c !important;
111
+ }
112
+
113
+ .token.constant {
114
+ color: #c792ea !important;
115
+ }
116
+
117
+ .token.deleted {
118
+ color: #f07178 !important;
119
+ }
120
+
121
+ .token.doctype {
122
+ color: #546e7a !important;
123
+ }
124
+
125
+ .token.entity {
126
+ color: #f07178 !important;
127
+ }
128
+
129
+ .token.function {
130
+ color: #c792ea !important;
131
+ }
132
+
133
+ .token.hexcode {
134
+ color: #f2ff00 !important;
135
+ }
136
+
137
+ .token.id {
138
+ color: #c792ea !important;
139
+ font-weight: bold !important;
140
+ }
141
+
142
+ .token.important {
143
+ color: #c792ea !important;
144
+ font-weight: bold !important;
145
+ }
146
+
147
+ .token.inserted {
148
+ color: #80cbc4 !important;
149
+ }
150
+
151
+ .token.keyword {
152
+ color: #c792ea !important;
153
+ font-style: italic !important;
154
+ }
155
+
156
+ .token.number {
157
+ color: #fd9170 !important;
158
+ }
159
+
160
+ .token.operator {
161
+ color: #89ddff !important;
162
+ }
163
+
164
+ .token.prolog {
165
+ color: #546e7a !important;
166
+ }
167
+
168
+ .token.property {
169
+ color: #80cbc4 !important;
170
+ }
171
+
172
+ .token.pseudo-class {
173
+ color: #c3e88d !important;
174
+ }
175
+
176
+ .token.pseudo-element {
177
+ color: #c3e88d !important;
178
+ }
179
+
180
+ .token.punctuation {
181
+ color: #89ddff !important;
182
+ }
183
+
184
+ .token.regex {
185
+ color: #f2ff00 !important;
186
+ }
187
+
188
+ .token.selector {
189
+ color: #f07178 !important;
190
+ }
191
+
192
+ .token.string {
193
+ color: #c3e88d !important;
194
+ }
195
+
196
+ .token.symbol {
197
+ color: #c792ea !important;
198
+ }
199
+
200
+ .token.tag {
201
+ color: #f07178 !important;
202
+ }
203
+
204
+ .token.unit {
205
+ color: #f07178 !important;
206
+ }
207
+
208
+ .token.url {
209
+ color: #fd9170 !important;
210
+ }
211
+
212
+ .token.variable {
213
+ color: #f07178 !important;
214
+ }
215
+
216
+
217
+
218
+ /* Markdown code highlight override */
219
+ pre span, code span{
220
+ color:#929292 !important;
221
+ }
@@ -1 +1 @@
1
- /*! tailwindcss v3.0.23 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #eee}:after,:before{--tw-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Muli,Roboto,-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:Consolas,Liberation Mono,Menlo,Courier,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:initial;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#bdbdbd}input:-ms-input-placeholder,textarea:-ms-input-placeholder{opacity:1;color:#bdbdbd}input::placeholder,textarea::placeholder{opacity:1;color:#bdbdbd}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,: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}.inline-flex{display:inline-flex}.items-center{align-items:center}.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}.text-sm{font-size:1.4rem;line-height:2rem}.font-medium{font-weight:500}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.shadow-sm{--tw-shadow:0 1px 2px 0 #0000000d;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.hover\:bg-green-700:hover{--tw-bg-opacity:1;background-color:rgb(56 142 60/var(--tw-bg-opacity))}.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}
1
+ /*! tailwindcss v3.0.23 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #eee}:after,:before{--tw-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Muli,Roboto,-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:Consolas,Liberation Mono,Menlo,Courier,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:initial;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#bdbdbd}input:-ms-input-placeholder,textarea:-ms-input-placeholder{opacity:1;color:#bdbdbd}input::placeholder,textarea::placeholder{opacity:1;color:#bdbdbd}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,: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}
package/package.json CHANGED
@@ -1,15 +1,11 @@
1
1
  {
2
2
  "name": "pcm-shared-components",
3
- "version": "0.0.11",
3
+ "version": "0.0.14",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "babel": {
7
7
  "presets": [
8
8
  "@babel/preset-react"
9
- ],
10
- "ignore": [
11
- "**/*.stories.js",
12
- "**/*.stories.mdx"
13
9
  ]
14
10
  },
15
11
  "files": [
@@ -21,7 +17,7 @@
21
17
  "build-storybook": "build-storybook",
22
18
  "clean": "rm -rf dist",
23
19
  "build-tailwind": "NODE_ENV=production npx tailwindcss -o ./dist/styles/tailwind.css --minify",
24
- "build": "npm run clean && NODE_ENV=production babel src/ --out-dir dist && npm run build-tailwind"
20
+ "build": "npm run clean && NODE_ENV=production babel src/ --out-dir dist --ignore '**/*.stories.js' --ignore '**/*.stories.mdx' --ignore '**/*.docs.js' && npm run build-tailwind && cp ./src/styles/prism.css ./dist/styles/"
25
21
  },
26
22
  "peerDependencies": {
27
23
  "react": "^17.0.2",
@@ -52,12 +48,15 @@
52
48
  },
53
49
  "dependencies": {
54
50
  "@babel/polyfill": "^7.12.1",
51
+ "@emotion/react": "^11.8.1",
52
+ "@emotion/styled": "^11.8.1",
55
53
  "@mdi/js": "^6.5.95",
56
54
  "@mdi/react": "^1.5.0",
57
55
  "@mdx-js/loader": "^2.0.0",
58
56
  "@mui/icons-material": "^5.3.1",
59
57
  "@mui/material": "^5.3.1",
60
58
  "@mui/styles": "^5.3.0",
59
+ "clsx": "^1.1.1",
61
60
  "moment": "^2.29.1"
62
61
  }
63
62
  }