@thecb/components 11.1.7 → 11.1.8
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 +19 -14
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +19 -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 +13 -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;
|
|
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,9 @@ 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;
|
|
28519
28523
|
var getDefaultChecked = function getDefaultChecked(value, idx) {
|
|
28520
28524
|
var selectionExistsInConfig = config === null || config === void 0 ? void 0 : config.map(function (c) {
|
|
28521
28525
|
return c.value;
|
|
@@ -28530,8 +28534,9 @@ var RadioButtonWithLabel = function RadioButtonWithLabel(_ref5) {
|
|
|
28530
28534
|
return /*#__PURE__*/React__default.createElement(InputAndLabelContainer, {
|
|
28531
28535
|
align: "center",
|
|
28532
28536
|
childGap: "0.5rem",
|
|
28533
|
-
|
|
28537
|
+
borderColor: disabled ? themeValues.inactiveBorderColor : themeValues.activeColor
|
|
28534
28538
|
}, /*#__PURE__*/React__default.createElement(HiddenRadioInput, {
|
|
28539
|
+
disabled: disabled,
|
|
28535
28540
|
"aria-invalid": ariaInvalid,
|
|
28536
28541
|
style: {
|
|
28537
28542
|
marginTop: 0
|
|
@@ -28550,8 +28555,8 @@ var RadioButtonWithLabel = function RadioButtonWithLabel(_ref5) {
|
|
|
28550
28555
|
htmlFor: id,
|
|
28551
28556
|
extraStyles: "\n font-size: 1rem;\n display: flex; \n width: 100%;\n :hover {\n cursor: pointer;\n }\n "
|
|
28552
28557
|
}, /*#__PURE__*/React__default.createElement(Circle, {
|
|
28553
|
-
activeColor: themeValues.activeColor,
|
|
28554
|
-
|
|
28558
|
+
activeColor: disabled ? themeValues.disabledColor : themeValues.activeColor,
|
|
28559
|
+
borderColor: themeValues.inactiveBorderColor
|
|
28555
28560
|
}), labelText));
|
|
28556
28561
|
};
|
|
28557
28562
|
var RadioButtonWithLabel$1 = themeComponent(RadioButtonWithLabel, "RadioButtonWithLabel", fallbackValues$x);
|
|
@@ -46471,7 +46476,7 @@ var iconsMap = (_iconsMap = {}, _defineProperty(_defineProperty(_defineProperty(
|
|
|
46471
46476
|
|
|
46472
46477
|
var disabledBackgroundColor$1 = TRANSPARENT;
|
|
46473
46478
|
var disabledBorderColor$1 = GHOST_GREY;
|
|
46474
|
-
var disabledColor$
|
|
46479
|
+
var disabledColor$2 = MANATEE_GREY;
|
|
46475
46480
|
var activeBackgroundColor$1 = CORNFLOWER_BLUE;
|
|
46476
46481
|
var backgroundColor$a = LINK_WATER;
|
|
46477
46482
|
var borderColor$5 = MOON_RAKER;
|
|
@@ -46479,7 +46484,7 @@ var color$b = ROYAL_BLUE_VIVID;
|
|
|
46479
46484
|
var fallbackValues$L = {
|
|
46480
46485
|
disabledBackgroundColor: disabledBackgroundColor$1,
|
|
46481
46486
|
disabledBorderColor: disabledBorderColor$1,
|
|
46482
|
-
disabledColor: disabledColor$
|
|
46487
|
+
disabledColor: disabledColor$2,
|
|
46483
46488
|
activeBackgroundColor: activeBackgroundColor$1,
|
|
46484
46489
|
backgroundColor: backgroundColor$a,
|
|
46485
46490
|
borderColor: borderColor$5,
|