@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.esm.js
CHANGED
|
@@ -28462,10 +28462,12 @@ var ProcessingFee = function ProcessingFee(_ref) {
|
|
|
28462
28462
|
var ProcessingFee$1 = themeComponent(ProcessingFee, "ProcessingFee", fallbackValues$w, "default");
|
|
28463
28463
|
|
|
28464
28464
|
var activeColor$6 = MATISSE_BLUE;
|
|
28465
|
+
var disabledColor$1 = MANATEE_GREY; // or GREY_CHATEAU?
|
|
28465
28466
|
var inactiveBorderColor = GREY_CHATEAU;
|
|
28466
28467
|
var fallbackValues$x = {
|
|
28467
|
-
|
|
28468
|
-
|
|
28468
|
+
activeColor: activeColor$6,
|
|
28469
|
+
disabledColor: disabledColor$1,
|
|
28470
|
+
inactiveBorderColor: inactiveBorderColor
|
|
28469
28471
|
};
|
|
28470
28472
|
|
|
28471
28473
|
var HiddenRadioInput = styled.input.withConfig({
|
|
@@ -28476,8 +28478,8 @@ var Circle = styled.div.withConfig({
|
|
|
28476
28478
|
displayName: "RadioButtonWithLabel__Circle",
|
|
28477
28479
|
componentId: "sc-1m9whwg-1"
|
|
28478
28480
|
})(["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) {
|
|
28479
|
-
var
|
|
28480
|
-
return "1px solid ".concat(
|
|
28481
|
+
var borderColor = _ref.borderColor;
|
|
28482
|
+
return "1px solid ".concat(borderColor);
|
|
28481
28483
|
}, function (_ref2) {
|
|
28482
28484
|
var activeColor = _ref2.activeColor;
|
|
28483
28485
|
return activeColor;
|
|
@@ -28486,11 +28488,11 @@ var InputAndLabelContainer = styled(Cluster).withConfig({
|
|
|
28486
28488
|
displayName: "RadioButtonWithLabel__InputAndLabelContainer",
|
|
28487
28489
|
componentId: "sc-1m9whwg-2"
|
|
28488
28490
|
})(["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) {
|
|
28489
|
-
var
|
|
28490
|
-
return "1px solid ".concat(
|
|
28491
|
+
var borderColor = _ref3.borderColor;
|
|
28492
|
+
return "1px solid ".concat(borderColor, ";");
|
|
28491
28493
|
}, HiddenRadioInput, Circle, function (_ref4) {
|
|
28492
|
-
var
|
|
28493
|
-
return "0px 0px 2px 1px ".concat(
|
|
28494
|
+
var borderColor = _ref4.borderColor;
|
|
28495
|
+
return "0px 0px 2px 1px ".concat(borderColor, ";");
|
|
28494
28496
|
});
|
|
28495
28497
|
var RadioButtonWithLabel = function RadioButtonWithLabel(_ref5) {
|
|
28496
28498
|
var _ref5$id = _ref5.id,
|
|
@@ -28507,7 +28509,11 @@ var RadioButtonWithLabel = function RadioButtonWithLabel(_ref5) {
|
|
|
28507
28509
|
_ref5$handleChange = _ref5.handleChange,
|
|
28508
28510
|
handleChange = _ref5$handleChange === void 0 ? noop$1 : _ref5$handleChange,
|
|
28509
28511
|
field = _ref5.field,
|
|
28510
|
-
config = _ref5.config
|
|
28512
|
+
config = _ref5.config,
|
|
28513
|
+
_ref5$disabled = _ref5.disabled,
|
|
28514
|
+
disabled = _ref5$disabled === void 0 ? false : _ref5$disabled,
|
|
28515
|
+
_ref5$title = _ref5.title,
|
|
28516
|
+
title = _ref5$title === void 0 ? "" : _ref5$title;
|
|
28511
28517
|
var getDefaultChecked = function getDefaultChecked(value, idx) {
|
|
28512
28518
|
var selectionExistsInConfig = config === null || config === void 0 ? void 0 : config.map(function (c) {
|
|
28513
28519
|
return c.value;
|
|
@@ -28522,8 +28528,10 @@ var RadioButtonWithLabel = function RadioButtonWithLabel(_ref5) {
|
|
|
28522
28528
|
return /*#__PURE__*/React.createElement(InputAndLabelContainer, {
|
|
28523
28529
|
align: "center",
|
|
28524
28530
|
childGap: "0.5rem",
|
|
28525
|
-
|
|
28531
|
+
borderColor: disabled ? themeValues.inactiveBorderColor : themeValues.activeColor,
|
|
28532
|
+
title: title
|
|
28526
28533
|
}, /*#__PURE__*/React.createElement(HiddenRadioInput, {
|
|
28534
|
+
disabled: disabled,
|
|
28527
28535
|
"aria-invalid": ariaInvalid,
|
|
28528
28536
|
style: {
|
|
28529
28537
|
marginTop: 0
|
|
@@ -28542,8 +28550,8 @@ var RadioButtonWithLabel = function RadioButtonWithLabel(_ref5) {
|
|
|
28542
28550
|
htmlFor: id,
|
|
28543
28551
|
extraStyles: "\n font-size: 1rem;\n display: flex; \n width: 100%;\n :hover {\n cursor: pointer;\n }\n "
|
|
28544
28552
|
}, /*#__PURE__*/React.createElement(Circle, {
|
|
28545
|
-
activeColor: themeValues.activeColor,
|
|
28546
|
-
|
|
28553
|
+
activeColor: disabled ? themeValues.disabledColor : themeValues.activeColor,
|
|
28554
|
+
borderColor: themeValues.inactiveBorderColor
|
|
28547
28555
|
}), labelText));
|
|
28548
28556
|
};
|
|
28549
28557
|
var RadioButtonWithLabel$1 = themeComponent(RadioButtonWithLabel, "RadioButtonWithLabel", fallbackValues$x);
|
|
@@ -46463,7 +46471,7 @@ var iconsMap = (_iconsMap = {}, _defineProperty(_defineProperty(_defineProperty(
|
|
|
46463
46471
|
|
|
46464
46472
|
var disabledBackgroundColor$1 = TRANSPARENT;
|
|
46465
46473
|
var disabledBorderColor$1 = GHOST_GREY;
|
|
46466
|
-
var disabledColor$
|
|
46474
|
+
var disabledColor$2 = MANATEE_GREY;
|
|
46467
46475
|
var activeBackgroundColor$1 = CORNFLOWER_BLUE;
|
|
46468
46476
|
var backgroundColor$a = LINK_WATER;
|
|
46469
46477
|
var borderColor$5 = MOON_RAKER;
|
|
@@ -46471,7 +46479,7 @@ var color$b = ROYAL_BLUE_VIVID;
|
|
|
46471
46479
|
var fallbackValues$L = {
|
|
46472
46480
|
disabledBackgroundColor: disabledBackgroundColor$1,
|
|
46473
46481
|
disabledBorderColor: disabledBorderColor$1,
|
|
46474
|
-
disabledColor: disabledColor$
|
|
46482
|
+
disabledColor: disabledColor$2,
|
|
46475
46483
|
activeBackgroundColor: activeBackgroundColor$1,
|
|
46476
46484
|
backgroundColor: backgroundColor$a,
|
|
46477
46485
|
borderColor: borderColor$5,
|