@thecb/components 11.1.7 → 11.1.8-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 +22 -14
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +22 -14
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/.DS_Store +0 -0
- package/src/components/atoms/radio-button-with-label/RadioButtonWithLabel.js +15 -7
- package/src/components/atoms/radio-button-with-label/RadioButtonWithLabel.theme.js +9 -3
package/dist/index.cjs.js
CHANGED
|
@@ -28470,10 +28470,12 @@ var ProcessingFee = function ProcessingFee(_ref) {
|
|
|
28470
28470
|
var ProcessingFee$1 = themeComponent(ProcessingFee, "ProcessingFee", fallbackValues$w, "default");
|
|
28471
28471
|
|
|
28472
28472
|
var activeColor$6 = MATISSE_BLUE;
|
|
28473
|
+
var disabledColor$1 = MANATEE_GREY; // or GREY_CHATEAU?
|
|
28473
28474
|
var inactiveBorderColor = GREY_CHATEAU;
|
|
28474
28475
|
var fallbackValues$x = {
|
|
28475
|
-
|
|
28476
|
-
|
|
28476
|
+
activeColor: activeColor$6,
|
|
28477
|
+
disabledColor: disabledColor$1,
|
|
28478
|
+
inactiveBorderColor: inactiveBorderColor
|
|
28477
28479
|
};
|
|
28478
28480
|
|
|
28479
28481
|
var HiddenRadioInput = styled__default.input.withConfig({
|
|
@@ -28484,8 +28486,8 @@ var Circle = styled__default.div.withConfig({
|
|
|
28484
28486
|
displayName: "RadioButtonWithLabel__Circle",
|
|
28485
28487
|
componentId: "sc-1m9whwg-1"
|
|
28486
28488
|
})(["flex-shrink:0;margin-right:8px;width:1.5rem;height 1.5rem;border:", ";border-radius:50%;box-sizing:border-box;padding:2px;:after{content:\"\";width:100%;height:100%;display:block;background:", ";border-radius:50%;transform:scale(0);}"], function (_ref) {
|
|
28487
|
-
var
|
|
28488
|
-
return "1px solid ".concat(
|
|
28489
|
+
var borderColor = _ref.borderColor;
|
|
28490
|
+
return "1px solid ".concat(borderColor);
|
|
28489
28491
|
}, function (_ref2) {
|
|
28490
28492
|
var activeColor = _ref2.activeColor;
|
|
28491
28493
|
return activeColor;
|
|
@@ -28494,11 +28496,11 @@ var InputAndLabelContainer = styled__default(Cluster).withConfig({
|
|
|
28494
28496
|
displayName: "RadioButtonWithLabel__InputAndLabelContainer",
|
|
28495
28497
|
componentId: "sc-1m9whwg-2"
|
|
28496
28498
|
})(["overflow:visible;", ":checked + label ", ":after{transform:scale(0.85);transition:transform 0.15s;}", ":checked + label ", "{border:", "}", ":focus + label ", "{{box-shadow:", "}"], HiddenRadioInput, Circle, HiddenRadioInput, Circle, function (_ref3) {
|
|
28497
|
-
var
|
|
28498
|
-
return "1px solid ".concat(
|
|
28499
|
+
var borderColor = _ref3.borderColor;
|
|
28500
|
+
return "1px solid ".concat(borderColor, ";");
|
|
28499
28501
|
}, HiddenRadioInput, Circle, function (_ref4) {
|
|
28500
|
-
var
|
|
28501
|
-
return "0px 0px 2px 1px ".concat(
|
|
28502
|
+
var borderColor = _ref4.borderColor;
|
|
28503
|
+
return "0px 0px 2px 1px ".concat(borderColor, ";");
|
|
28502
28504
|
});
|
|
28503
28505
|
var RadioButtonWithLabel = function RadioButtonWithLabel(_ref5) {
|
|
28504
28506
|
var _ref5$id = _ref5.id,
|
|
@@ -28515,7 +28517,11 @@ var RadioButtonWithLabel = function RadioButtonWithLabel(_ref5) {
|
|
|
28515
28517
|
_ref5$handleChange = _ref5.handleChange,
|
|
28516
28518
|
handleChange = _ref5$handleChange === void 0 ? noop$1 : _ref5$handleChange,
|
|
28517
28519
|
field = _ref5.field,
|
|
28518
|
-
config = _ref5.config
|
|
28520
|
+
config = _ref5.config,
|
|
28521
|
+
_ref5$disabled = _ref5.disabled,
|
|
28522
|
+
disabled = _ref5$disabled === void 0 ? false : _ref5$disabled,
|
|
28523
|
+
_ref5$title = _ref5.title,
|
|
28524
|
+
title = _ref5$title === void 0 ? "" : _ref5$title;
|
|
28519
28525
|
var getDefaultChecked = function getDefaultChecked(value, idx) {
|
|
28520
28526
|
var selectionExistsInConfig = config === null || config === void 0 ? void 0 : config.map(function (c) {
|
|
28521
28527
|
return c.value;
|
|
@@ -28530,8 +28536,10 @@ var RadioButtonWithLabel = function RadioButtonWithLabel(_ref5) {
|
|
|
28530
28536
|
return /*#__PURE__*/React__default.createElement(InputAndLabelContainer, {
|
|
28531
28537
|
align: "center",
|
|
28532
28538
|
childGap: "0.5rem",
|
|
28533
|
-
|
|
28539
|
+
borderColor: disabled ? themeValues.inactiveBorderColor : themeValues.activeColor,
|
|
28540
|
+
title: title
|
|
28534
28541
|
}, /*#__PURE__*/React__default.createElement(HiddenRadioInput, {
|
|
28542
|
+
disabled: disabled,
|
|
28535
28543
|
"aria-invalid": ariaInvalid,
|
|
28536
28544
|
style: {
|
|
28537
28545
|
marginTop: 0
|
|
@@ -28550,8 +28558,8 @@ var RadioButtonWithLabel = function RadioButtonWithLabel(_ref5) {
|
|
|
28550
28558
|
htmlFor: id,
|
|
28551
28559
|
extraStyles: "\n font-size: 1rem;\n display: flex; \n width: 100%;\n :hover {\n cursor: pointer;\n }\n "
|
|
28552
28560
|
}, /*#__PURE__*/React__default.createElement(Circle, {
|
|
28553
|
-
activeColor: themeValues.activeColor,
|
|
28554
|
-
|
|
28561
|
+
activeColor: disabled ? themeValues.disabledColor : themeValues.activeColor,
|
|
28562
|
+
borderColor: themeValues.inactiveBorderColor
|
|
28555
28563
|
}), labelText));
|
|
28556
28564
|
};
|
|
28557
28565
|
var RadioButtonWithLabel$1 = themeComponent(RadioButtonWithLabel, "RadioButtonWithLabel", fallbackValues$x);
|
|
@@ -46471,7 +46479,7 @@ var iconsMap = (_iconsMap = {}, _defineProperty(_defineProperty(_defineProperty(
|
|
|
46471
46479
|
|
|
46472
46480
|
var disabledBackgroundColor$1 = TRANSPARENT;
|
|
46473
46481
|
var disabledBorderColor$1 = GHOST_GREY;
|
|
46474
|
-
var disabledColor$
|
|
46482
|
+
var disabledColor$2 = MANATEE_GREY;
|
|
46475
46483
|
var activeBackgroundColor$1 = CORNFLOWER_BLUE;
|
|
46476
46484
|
var backgroundColor$a = LINK_WATER;
|
|
46477
46485
|
var borderColor$5 = MOON_RAKER;
|
|
@@ -46479,7 +46487,7 @@ var color$b = ROYAL_BLUE_VIVID;
|
|
|
46479
46487
|
var fallbackValues$L = {
|
|
46480
46488
|
disabledBackgroundColor: disabledBackgroundColor$1,
|
|
46481
46489
|
disabledBorderColor: disabledBorderColor$1,
|
|
46482
|
-
disabledColor: disabledColor$
|
|
46490
|
+
disabledColor: disabledColor$2,
|
|
46483
46491
|
activeBackgroundColor: activeBackgroundColor$1,
|
|
46484
46492
|
backgroundColor: backgroundColor$a,
|
|
46485
46493
|
borderColor: borderColor$5,
|