@thecb/components 11.2.3-beta.4 → 11.2.3
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 +2 -37
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +2 -37
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/molecules/registration-banner/RegistrationBanner.js +0 -2
- package/src/components/molecules/registration-banner/RegistrationBanner.styled.js +3 -2
- package/src/components/molecules/registration-banner/index.d.ts +1 -1
- package/src/util/general.js +0 -36
package/dist/index.esm.js
CHANGED
|
@@ -6248,38 +6248,6 @@ var adjustHexColor = function adjustHexColor(hex, percent, action) {
|
|
|
6248
6248
|
return "#".concat(((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1).padStart(6, "0"));
|
|
6249
6249
|
};
|
|
6250
6250
|
|
|
6251
|
-
/**
|
|
6252
|
-
* Converts a hex color code to an RGBA color string with the specified alpha value.
|
|
6253
|
-
*
|
|
6254
|
-
* @param {string} hex - The hex color code (e.g., "#3498db" or "3498db").
|
|
6255
|
-
* @param {number} alpha - The alpha value (opacity) between 0 and 1.
|
|
6256
|
-
* @returns {string} - The RGBA color string (e.g., "rgba(52, 152, 219, 0.5)").
|
|
6257
|
-
* @throws {Error} - Throws an error if the hex code is not a valid 3 or 6-digit hex color.
|
|
6258
|
-
*/
|
|
6259
|
-
var hexToRGBA = function hexToRGBA(hex, alpha) {
|
|
6260
|
-
// Remove hash at the start if present
|
|
6261
|
-
hex = hex.replace(/^\s*#/, "");
|
|
6262
|
-
|
|
6263
|
-
// If hex is 3 characters, convert it to 6 characters.
|
|
6264
|
-
if (hex.length === 3) {
|
|
6265
|
-
hex = hex.split("").map(function (_char) {
|
|
6266
|
-
return _char + _char;
|
|
6267
|
-
}).join("");
|
|
6268
|
-
}
|
|
6269
|
-
|
|
6270
|
-
// Validate hex length
|
|
6271
|
-
if (hex.length !== 6) {
|
|
6272
|
-
throw new Error("Invalid hex color provided. Expected a 3 or 6-digit hex color.");
|
|
6273
|
-
}
|
|
6274
|
-
|
|
6275
|
-
// Parse the hex color components
|
|
6276
|
-
var bigint = parseInt(hex, 16);
|
|
6277
|
-
var r = bigint >> 16 & 255;
|
|
6278
|
-
var g = bigint >> 8 & 255;
|
|
6279
|
-
var b = bigint & 255;
|
|
6280
|
-
return "rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(alpha, ")");
|
|
6281
|
-
};
|
|
6282
|
-
|
|
6283
6251
|
var general = /*#__PURE__*/Object.freeze({
|
|
6284
6252
|
__proto__: null,
|
|
6285
6253
|
noop: noop$1,
|
|
@@ -6301,8 +6269,7 @@ var general = /*#__PURE__*/Object.freeze({
|
|
|
6301
6269
|
titleCaseString: titleCaseString,
|
|
6302
6270
|
kebabCaseString: kebabCaseString,
|
|
6303
6271
|
wrapIndex: wrapIndex,
|
|
6304
|
-
adjustHexColor: adjustHexColor
|
|
6305
|
-
hexToRGBA: hexToRGBA
|
|
6272
|
+
adjustHexColor: adjustHexColor
|
|
6306
6273
|
});
|
|
6307
6274
|
|
|
6308
6275
|
var _excluded$1 = ["themeValues", "weight", "color", "textWrap", "extraStyles", "hoverStyles", "onClick", "onKeyPress", "as", "dataQa", "children", "variant"];
|
|
@@ -49748,7 +49715,7 @@ var BannerContainer = styled(Cluster).withConfig({
|
|
|
49748
49715
|
componentId: "sc-1m1lm4y-0"
|
|
49749
49716
|
})(["background:", ";padding:", ";"], function (_ref) {
|
|
49750
49717
|
var themeValues = _ref.themeValues;
|
|
49751
|
-
return
|
|
49718
|
+
return adjustHexColor(themeValues.background, 10, "lighten");
|
|
49752
49719
|
}, function (_ref2) {
|
|
49753
49720
|
var isMobile = _ref2.isMobile;
|
|
49754
49721
|
return isMobile ? "1rem 2rem" : " 2rem 8.25rem";
|
|
@@ -49795,11 +49762,9 @@ var RegistrationBanner = function RegistrationBanner(_ref) {
|
|
|
49795
49762
|
extraStyles: extraStyles,
|
|
49796
49763
|
themeValues: themeValues,
|
|
49797
49764
|
isMobile: isMobile,
|
|
49798
|
-
role: "banner",
|
|
49799
49765
|
"aria-label": "Registration Banner",
|
|
49800
49766
|
justify: "center"
|
|
49801
49767
|
}, /*#__PURE__*/React.createElement(ContentContainer, {
|
|
49802
|
-
role: "main",
|
|
49803
49768
|
align: "center",
|
|
49804
49769
|
justify: "space-between",
|
|
49805
49770
|
overflow: "visible",
|