@plusscommunities/pluss-core-web 1.4.10 → 1.4.12-beta.0
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/index.cjs.js +28 -2
- package/dist/index.esm.js +28 -2
- package/dist/index.umd.js +28 -2
- package/package.json +1 -1
- package/src/colours.js +26 -26
- package/src/components/Header.js +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1659,7 +1659,31 @@ var COLOUR_RED = '#c02743'; // const COLOUR_GREEN = '#00cc9c';
|
|
|
1659
1659
|
|
|
1660
1660
|
var COLOUR_LIGHTGREY = '#8695b2';
|
|
1661
1661
|
var INACTIVE_TEXT = COLOUR_LIGHTGREY;
|
|
1662
|
-
var COLOUR_BRANDING_APP = '#4a57b7';
|
|
1662
|
+
var COLOUR_BRANDING_APP = '#4a57b7';
|
|
1663
|
+
|
|
1664
|
+
var hexToRGB = function hexToRGB(hex) {
|
|
1665
|
+
// Expand shorthand form (e.g. "03F") to full form (e.g. "0033FF")
|
|
1666
|
+
var shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
|
|
1667
|
+
hex = hex.replace(shorthandRegex, function (m, r, g, b) {
|
|
1668
|
+
return r + r + g + g + b + b;
|
|
1669
|
+
});
|
|
1670
|
+
var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
|
1671
|
+
return result ? {
|
|
1672
|
+
r: parseInt(result[1], 16),
|
|
1673
|
+
g: parseInt(result[2], 16),
|
|
1674
|
+
b: parseInt(result[3], 16)
|
|
1675
|
+
} : null;
|
|
1676
|
+
};
|
|
1677
|
+
|
|
1678
|
+
var hexToRGBAstring = function hexToRGBAstring(hex, opacity) {
|
|
1679
|
+
// Expand shorthand form (e.g. "03F") to full form (e.g. "0033FF")
|
|
1680
|
+
var shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
|
|
1681
|
+
hex = hex.replace(shorthandRegex, function (m, r, g, b) {
|
|
1682
|
+
return r + r + g + g + b + b;
|
|
1683
|
+
});
|
|
1684
|
+
var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
|
1685
|
+
return result ? "rgba(".concat(parseInt(result[1], 16), ", ").concat(parseInt(result[2], 16), ", ").concat(parseInt(result[3], 16), ", ").concat(opacity, ")") : null;
|
|
1686
|
+
}; // const pctBtwnColours = (c1, c2, percentage) => {
|
|
1663
1687
|
|
|
1664
1688
|
var colours = /*#__PURE__*/Object.freeze({
|
|
1665
1689
|
__proto__: null,
|
|
@@ -1669,6 +1693,8 @@ var colours = /*#__PURE__*/Object.freeze({
|
|
|
1669
1693
|
COLOUR_DUSK_LIGHTER: COLOUR_DUSK_LIGHTER,
|
|
1670
1694
|
LINEGREY: LINEGREY,
|
|
1671
1695
|
COLOUR_RED: COLOUR_RED,
|
|
1696
|
+
hexToRGB: hexToRGB,
|
|
1697
|
+
hexToRGBAstring: hexToRGBAstring,
|
|
1672
1698
|
COLOUR_BRANDING_MAIN: COLOUR_BRANDING_MAIN,
|
|
1673
1699
|
COLOUR_BRANDING_OFF: COLOUR_BRANDING_OFF,
|
|
1674
1700
|
COLOUR_BRANDING_ACTION: COLOUR_BRANDING_ACTION,
|
|
@@ -5776,7 +5802,7 @@ var Header = /*#__PURE__*/function (_Component) {
|
|
|
5776
5802
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
5777
5803
|
|
|
5778
5804
|
_defineProperty__default['default'](_assertThisInitialized__default['default'](_this), "goToHelpGuide", function () {
|
|
5779
|
-
window.
|
|
5805
|
+
window.open('https://plusscommunities.notion.site/Pluss-Communities-User-Guide-fb54cc32718946d09176589b4a2fa8d1', '_blank');
|
|
5780
5806
|
});
|
|
5781
5807
|
|
|
5782
5808
|
_defineProperty__default['default'](_assertThisInitialized__default['default'](_this), "toggleSideMenu", function () {
|
package/dist/index.esm.js
CHANGED
|
@@ -1629,7 +1629,31 @@ var COLOUR_RED = '#c02743'; // const COLOUR_GREEN = '#00cc9c';
|
|
|
1629
1629
|
|
|
1630
1630
|
var COLOUR_LIGHTGREY = '#8695b2';
|
|
1631
1631
|
var INACTIVE_TEXT = COLOUR_LIGHTGREY;
|
|
1632
|
-
var COLOUR_BRANDING_APP = '#4a57b7';
|
|
1632
|
+
var COLOUR_BRANDING_APP = '#4a57b7';
|
|
1633
|
+
|
|
1634
|
+
var hexToRGB = function hexToRGB(hex) {
|
|
1635
|
+
// Expand shorthand form (e.g. "03F") to full form (e.g. "0033FF")
|
|
1636
|
+
var shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
|
|
1637
|
+
hex = hex.replace(shorthandRegex, function (m, r, g, b) {
|
|
1638
|
+
return r + r + g + g + b + b;
|
|
1639
|
+
});
|
|
1640
|
+
var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
|
1641
|
+
return result ? {
|
|
1642
|
+
r: parseInt(result[1], 16),
|
|
1643
|
+
g: parseInt(result[2], 16),
|
|
1644
|
+
b: parseInt(result[3], 16)
|
|
1645
|
+
} : null;
|
|
1646
|
+
};
|
|
1647
|
+
|
|
1648
|
+
var hexToRGBAstring = function hexToRGBAstring(hex, opacity) {
|
|
1649
|
+
// Expand shorthand form (e.g. "03F") to full form (e.g. "0033FF")
|
|
1650
|
+
var shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
|
|
1651
|
+
hex = hex.replace(shorthandRegex, function (m, r, g, b) {
|
|
1652
|
+
return r + r + g + g + b + b;
|
|
1653
|
+
});
|
|
1654
|
+
var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
|
1655
|
+
return result ? "rgba(".concat(parseInt(result[1], 16), ", ").concat(parseInt(result[2], 16), ", ").concat(parseInt(result[3], 16), ", ").concat(opacity, ")") : null;
|
|
1656
|
+
}; // const pctBtwnColours = (c1, c2, percentage) => {
|
|
1633
1657
|
|
|
1634
1658
|
var colours = /*#__PURE__*/Object.freeze({
|
|
1635
1659
|
__proto__: null,
|
|
@@ -1639,6 +1663,8 @@ var colours = /*#__PURE__*/Object.freeze({
|
|
|
1639
1663
|
COLOUR_DUSK_LIGHTER: COLOUR_DUSK_LIGHTER,
|
|
1640
1664
|
LINEGREY: LINEGREY,
|
|
1641
1665
|
COLOUR_RED: COLOUR_RED,
|
|
1666
|
+
hexToRGB: hexToRGB,
|
|
1667
|
+
hexToRGBAstring: hexToRGBAstring,
|
|
1642
1668
|
COLOUR_BRANDING_MAIN: COLOUR_BRANDING_MAIN,
|
|
1643
1669
|
COLOUR_BRANDING_OFF: COLOUR_BRANDING_OFF,
|
|
1644
1670
|
COLOUR_BRANDING_ACTION: COLOUR_BRANDING_ACTION,
|
|
@@ -5746,7 +5772,7 @@ var Header = /*#__PURE__*/function (_Component) {
|
|
|
5746
5772
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
5747
5773
|
|
|
5748
5774
|
_defineProperty(_assertThisInitialized(_this), "goToHelpGuide", function () {
|
|
5749
|
-
window.
|
|
5775
|
+
window.open('https://plusscommunities.notion.site/Pluss-Communities-User-Guide-fb54cc32718946d09176589b4a2fa8d1', '_blank');
|
|
5750
5776
|
});
|
|
5751
5777
|
|
|
5752
5778
|
_defineProperty(_assertThisInitialized(_this), "toggleSideMenu", function () {
|
package/dist/index.umd.js
CHANGED
|
@@ -1630,7 +1630,31 @@
|
|
|
1630
1630
|
|
|
1631
1631
|
var COLOUR_LIGHTGREY = '#8695b2';
|
|
1632
1632
|
var INACTIVE_TEXT = COLOUR_LIGHTGREY;
|
|
1633
|
-
var COLOUR_BRANDING_APP = '#4a57b7';
|
|
1633
|
+
var COLOUR_BRANDING_APP = '#4a57b7';
|
|
1634
|
+
|
|
1635
|
+
var hexToRGB = function hexToRGB(hex) {
|
|
1636
|
+
// Expand shorthand form (e.g. "03F") to full form (e.g. "0033FF")
|
|
1637
|
+
var shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
|
|
1638
|
+
hex = hex.replace(shorthandRegex, function (m, r, g, b) {
|
|
1639
|
+
return r + r + g + g + b + b;
|
|
1640
|
+
});
|
|
1641
|
+
var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
|
1642
|
+
return result ? {
|
|
1643
|
+
r: parseInt(result[1], 16),
|
|
1644
|
+
g: parseInt(result[2], 16),
|
|
1645
|
+
b: parseInt(result[3], 16)
|
|
1646
|
+
} : null;
|
|
1647
|
+
};
|
|
1648
|
+
|
|
1649
|
+
var hexToRGBAstring = function hexToRGBAstring(hex, opacity) {
|
|
1650
|
+
// Expand shorthand form (e.g. "03F") to full form (e.g. "0033FF")
|
|
1651
|
+
var shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
|
|
1652
|
+
hex = hex.replace(shorthandRegex, function (m, r, g, b) {
|
|
1653
|
+
return r + r + g + g + b + b;
|
|
1654
|
+
});
|
|
1655
|
+
var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
|
1656
|
+
return result ? "rgba(".concat(parseInt(result[1], 16), ", ").concat(parseInt(result[2], 16), ", ").concat(parseInt(result[3], 16), ", ").concat(opacity, ")") : null;
|
|
1657
|
+
}; // const pctBtwnColours = (c1, c2, percentage) => {
|
|
1634
1658
|
|
|
1635
1659
|
var colours = /*#__PURE__*/Object.freeze({
|
|
1636
1660
|
__proto__: null,
|
|
@@ -1640,6 +1664,8 @@
|
|
|
1640
1664
|
COLOUR_DUSK_LIGHTER: COLOUR_DUSK_LIGHTER,
|
|
1641
1665
|
LINEGREY: LINEGREY,
|
|
1642
1666
|
COLOUR_RED: COLOUR_RED,
|
|
1667
|
+
hexToRGB: hexToRGB,
|
|
1668
|
+
hexToRGBAstring: hexToRGBAstring,
|
|
1643
1669
|
COLOUR_BRANDING_MAIN: COLOUR_BRANDING_MAIN,
|
|
1644
1670
|
COLOUR_BRANDING_OFF: COLOUR_BRANDING_OFF,
|
|
1645
1671
|
COLOUR_BRANDING_ACTION: COLOUR_BRANDING_ACTION,
|
|
@@ -5747,7 +5773,7 @@
|
|
|
5747
5773
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
5748
5774
|
|
|
5749
5775
|
_defineProperty__default['default'](_assertThisInitialized__default['default'](_this), "goToHelpGuide", function () {
|
|
5750
|
-
window.
|
|
5776
|
+
window.open('https://plusscommunities.notion.site/Pluss-Communities-User-Guide-fb54cc32718946d09176589b4a2fa8d1', '_blank');
|
|
5751
5777
|
});
|
|
5752
5778
|
|
|
5753
5779
|
_defineProperty__default['default'](_assertThisInitialized__default['default'](_this), "toggleSideMenu", function () {
|
package/package.json
CHANGED
package/src/colours.js
CHANGED
|
@@ -48,33 +48,33 @@ const INACTIVE_TEXT = COLOUR_LIGHTGREY;
|
|
|
48
48
|
|
|
49
49
|
const COLOUR_BRANDING_APP = '#4a57b7';
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
//
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
51
|
+
const hexToRGB = (hex) => {
|
|
52
|
+
// Expand shorthand form (e.g. "03F") to full form (e.g. "0033FF")
|
|
53
|
+
const shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
|
|
54
|
+
hex = hex.replace(shorthandRegex, (m, r, g, b) => {
|
|
55
|
+
return r + r + g + g + b + b;
|
|
56
|
+
});
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
58
|
+
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
|
59
|
+
return result
|
|
60
|
+
? {
|
|
61
|
+
r: parseInt(result[1], 16),
|
|
62
|
+
g: parseInt(result[2], 16),
|
|
63
|
+
b: parseInt(result[3], 16),
|
|
64
|
+
}
|
|
65
|
+
: null;
|
|
66
|
+
};
|
|
67
67
|
|
|
68
|
-
|
|
69
|
-
//
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
68
|
+
const hexToRGBAstring = (hex, opacity) => {
|
|
69
|
+
// Expand shorthand form (e.g. "03F") to full form (e.g. "0033FF")
|
|
70
|
+
const shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
|
|
71
|
+
hex = hex.replace(shorthandRegex, (m, r, g, b) => {
|
|
72
|
+
return r + r + g + g + b + b;
|
|
73
|
+
});
|
|
74
74
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
|
76
|
+
return result ? `rgba(${parseInt(result[1], 16)}, ${parseInt(result[2], 16)}, ${parseInt(result[3], 16)}, ${opacity})` : null;
|
|
77
|
+
};
|
|
78
78
|
|
|
79
79
|
// const pctBtwnColours = (c1, c2, percentage) => {
|
|
80
80
|
// const rgbC1 = hexToRGB(c1);
|
|
@@ -114,8 +114,8 @@ export {
|
|
|
114
114
|
// COLOUR_CITRON,
|
|
115
115
|
// COLOUR_GRAPEFRUIT,
|
|
116
116
|
// DARK_OVERLAY,
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
hexToRGB,
|
|
118
|
+
hexToRGBAstring,
|
|
119
119
|
// pctBtwnColours,
|
|
120
120
|
// FACEBOOK_BLUE,
|
|
121
121
|
// COLOUR_NAV_GREY,
|
package/src/components/Header.js
CHANGED
|
@@ -10,7 +10,7 @@ class Header extends Component {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
goToHelpGuide = () => {
|
|
13
|
-
window.
|
|
13
|
+
window.open('https://plusscommunities.notion.site/Pluss-Communities-User-Guide-fb54cc32718946d09176589b4a2fa8d1', '_blank');
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
toggleSideMenu = () => {
|