pcm-shared-components 0.0.41 → 0.0.44

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.
@@ -39,6 +39,11 @@ const useStyles = makeStyles(() => ({
39
39
  }) => `${iconSize}px !important`,
40
40
  marginTop: 'auto',
41
41
  marginBottom: 'auto'
42
+ },
43
+ buttonText: {
44
+ fontSize: ({
45
+ buttonFontSize
46
+ }) => buttonFontSize
42
47
  }
43
48
  }));
44
49
 
@@ -61,10 +66,13 @@ const CustomFab = props => {
61
66
  return /*#__PURE__*/React.createElement(ThemeProvider, {
62
67
  theme: defaultTheme
63
68
  }, /*#__PURE__*/React.createElement(Tooltip, {
64
- title: /*#__PURE__*/React.createElement("div", {
65
- className: "text-8"
66
- }, tooltipText),
67
- disableHoverListener: tooltipText && tooltipText.length === 0 ? true : false
69
+ title: tooltipText && tooltipText.length > 0 ? /*#__PURE__*/React.createElement("div", {
70
+ style: {
71
+ fontSize: 12,
72
+ padding: 4
73
+ }
74
+ }, tooltipText) : undefined,
75
+ disableHoverListener: !tooltipText || tooltipText.length === 0 ? true : false
68
76
  }, /*#__PURE__*/React.createElement(Fab, {
69
77
  size: size,
70
78
  color: backgroundColor ? backgroundColor : color,
@@ -77,7 +85,7 @@ const CustomFab = props => {
77
85
  }, Icon && /*#__PURE__*/React.createElement(Icon, {
78
86
  className: classes.Icon
79
87
  }), buttonText && buttonText.length > 0 && /*#__PURE__*/React.createElement("div", {
80
- className: "mx-6 my-auto"
88
+ className: clsx('mx-6 my-auto', classes.buttonText)
81
89
  }, " ", buttonText)))));
82
90
  };
83
91
 
@@ -88,6 +96,7 @@ CustomFab.defaultProps = {
88
96
  iconSize: 24,
89
97
  iconLocation: 'left',
90
98
  buttonText: '',
99
+ buttonFontSize: 14,
91
100
  variant: 'circular',
92
101
  boxShadow: true,
93
102
  size: 'large',
@@ -111,6 +120,8 @@ CustomFab.propTypes = {
111
120
 
112
121
  /** Text inside of the button */
113
122
  buttonText: PropTypes.string,
123
+ //** Font size of the button text */
124
+ buttonFontSize: PropTypes.number,
114
125
 
115
126
  /** Either [circular or extended] if including text */
116
127
  variant: PropTypes.oneOf(['extended', 'circular']),
@@ -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!important}.mx-6{margin-left:.6rem!important;margin-right:.6rem!important}.my-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-6{margin-top:.6rem!important}.mb-2{margin-bottom:.2rem!important}.mb-6{margin-bottom:.6rem!important}.ml-6{margin-left:.6rem!important}.block{display:block!important}.flex{display:flex!important}.inline-flex{display:inline-flex!important}.w-full{width:100%!important}.flex-row{flex-direction:row!important}.flex-row-reverse{flex-direction:row-reverse!important}.items-center{align-items:center!important}.justify-end{justify-content:flex-end!important}.rounded-md{border-radius:.6rem!important}.border{border-width:1px!important}.border-transparent{border-color:#0000!important}.bg-green-600{--tw-bg-opacity:1!important;background-color:rgb(67 160 71/var(--tw-bg-opacity))!important}.px-4{padding-left:.4rem!important;padding-right:.4rem!important}.py-2{padding-top:.2rem!important;padding-bottom:.2rem!important}.px-2{padding-left:.2rem!important;padding-right:.2rem!important}.text-xl{font-size:2rem!important;line-height:2.8rem!important}.text-sm{font-size:1.4rem!important;line-height:2rem!important}.text-2xl{font-size:2.4rem!important;line-height:3.2rem!important}.font-medium{font-weight:500!important}.text-white{--tw-text-opacity:1!important;color:rgb(255 255 255/var(--tw-text-opacity))!important}.shadow{--tw-shadow:0 1px 3px 0 #0000001a,0 1px 2px 0 #0000000f!important;--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px 0 var(--tw-shadow-color)!important}.shadow,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.shadow-sm{--tw-shadow:0 1px 2px 0 #0000000d!important;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)!important}.hover\:bg-green-700:hover{--tw-bg-opacity:1!important;background-color:rgb(56 142 60/var(--tw-bg-opacity))!important}.hover\:bg-gray-100\/75:hover{background-color:#f5f5f5bf!important}.focus\:outline-none:focus{outline:2px solid #0000!important;outline-offset:2px!important}.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)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)!important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)!important}.focus\:ring-green-500:focus{--tw-ring-opacity:1!important;--tw-ring-color:rgb(76 175 80/var(--tw-ring-opacity))!important}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px!important}
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}.my-auto{margin-top:auto;margin-bottom:auto}.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,6 +1,6 @@
1
1
  {
2
2
  "name": "pcm-shared-components",
3
- "version": "0.0.41",
3
+ "version": "0.0.44",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "babel": {