@thecb/components 7.9.4-beta.2 → 7.9.4-beta.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 +38 -39
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +38 -39
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/checkbox/Checkbox.js +1 -3
- package/src/components/molecules/terms-and-conditions/TermsAndConditionsControlV2.js +4 -2
package/dist/index.esm.js
CHANGED
|
@@ -21000,43 +21000,40 @@ var HiddenCheckbox = styled.input.attrs({
|
|
|
21000
21000
|
var StyledCheckbox = styled.div.withConfig({
|
|
21001
21001
|
displayName: "Checkbox__StyledCheckbox",
|
|
21002
21002
|
componentId: "sc-36kqbv-4"
|
|
21003
|
-
})(["display:inline-block;
|
|
21004
|
-
var
|
|
21005
|
-
return checkboxMargin;
|
|
21006
|
-
}, CheckboxIcon, function (_ref3) {
|
|
21007
|
-
var checked = _ref3.checked;
|
|
21003
|
+
})(["display:inline-block;width:24px;height:24px;border-radius:2px;transition:all 150ms;", "{visibility:", ";}", ";"], CheckboxIcon, function (_ref2) {
|
|
21004
|
+
var checked = _ref2.checked;
|
|
21008
21005
|
return checked ? "visible" : "hidden";
|
|
21009
|
-
}, function (
|
|
21010
|
-
var error =
|
|
21011
|
-
disabled =
|
|
21012
|
-
checked =
|
|
21013
|
-
focused =
|
|
21014
|
-
defaultStyles =
|
|
21015
|
-
checkedStyles =
|
|
21016
|
-
focusedStyles =
|
|
21017
|
-
errorStyles =
|
|
21018
|
-
disabledStyles =
|
|
21019
|
-
disabledCheckedStyles =
|
|
21006
|
+
}, function (_ref3) {
|
|
21007
|
+
var error = _ref3.error,
|
|
21008
|
+
disabled = _ref3.disabled,
|
|
21009
|
+
checked = _ref3.checked,
|
|
21010
|
+
focused = _ref3.focused,
|
|
21011
|
+
defaultStyles = _ref3.defaultStyles,
|
|
21012
|
+
checkedStyles = _ref3.checkedStyles,
|
|
21013
|
+
focusedStyles = _ref3.focusedStyles,
|
|
21014
|
+
errorStyles = _ref3.errorStyles,
|
|
21015
|
+
disabledStyles = _ref3.disabledStyles,
|
|
21016
|
+
disabledCheckedStyles = _ref3.disabledCheckedStyles;
|
|
21020
21017
|
return error ? css(["", " ", ""], errorStyles, focused && focusedStyles) : disabled ? css(["", ""], checked ? disabledCheckedStyles : disabledStyles) : checked ? css(["", " ", ""], checkedStyles, focused && focusedStyles) : css(["", " ", ""], defaultStyles, focused && focusedStyles);
|
|
21021
21018
|
});
|
|
21022
21019
|
|
|
21023
|
-
var Checkbox = function Checkbox(
|
|
21024
|
-
var title =
|
|
21025
|
-
name =
|
|
21026
|
-
checked =
|
|
21027
|
-
|
|
21028
|
-
onChange =
|
|
21029
|
-
|
|
21030
|
-
disabled =
|
|
21031
|
-
themeValues =
|
|
21032
|
-
|
|
21033
|
-
hidden =
|
|
21034
|
-
|
|
21035
|
-
error =
|
|
21036
|
-
|
|
21037
|
-
checkboxMargin =
|
|
21038
|
-
extraStyles =
|
|
21039
|
-
textExtraStyles =
|
|
21020
|
+
var Checkbox = function Checkbox(_ref4) {
|
|
21021
|
+
var title = _ref4.title,
|
|
21022
|
+
name = _ref4.name,
|
|
21023
|
+
checked = _ref4.checked,
|
|
21024
|
+
_ref4$onChange = _ref4.onChange,
|
|
21025
|
+
onChange = _ref4$onChange === void 0 ? noop : _ref4$onChange,
|
|
21026
|
+
_ref4$disabled = _ref4.disabled,
|
|
21027
|
+
disabled = _ref4$disabled === void 0 ? false : _ref4$disabled,
|
|
21028
|
+
themeValues = _ref4.themeValues,
|
|
21029
|
+
_ref4$hidden = _ref4.hidden,
|
|
21030
|
+
hidden = _ref4$hidden === void 0 ? false : _ref4$hidden,
|
|
21031
|
+
_ref4$error = _ref4.error,
|
|
21032
|
+
error = _ref4$error === void 0 ? false : _ref4$error,
|
|
21033
|
+
_ref4$checkboxMargin = _ref4.checkboxMargin,
|
|
21034
|
+
checkboxMargin = _ref4$checkboxMargin === void 0 ? "0 16px 0 0" : _ref4$checkboxMargin,
|
|
21035
|
+
extraStyles = _ref4.extraStyles,
|
|
21036
|
+
textExtraStyles = _ref4.textExtraStyles;
|
|
21040
21037
|
|
|
21041
21038
|
var _useState = useState(false),
|
|
21042
21039
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -21063,7 +21060,7 @@ var Checkbox = function Checkbox(_ref5) {
|
|
|
21063
21060
|
},
|
|
21064
21061
|
hiddenStyles: hidden,
|
|
21065
21062
|
background: themeValues.backgroundColor,
|
|
21066
|
-
extraStyles: "outline: none; ".concat(extraStyles)
|
|
21063
|
+
extraStyles: "outline: none; ".concat(extraStyles, "; margin: ").concat(checkboxMargin, ";")
|
|
21067
21064
|
}, /*#__PURE__*/React.createElement(CheckboxLabelContainer, null, /*#__PURE__*/React.createElement(CheckboxContainer, {
|
|
21068
21065
|
"data-qa": "Checkbox"
|
|
21069
21066
|
}, /*#__PURE__*/React.createElement(HiddenCheckbox, {
|
|
@@ -21086,8 +21083,7 @@ var Checkbox = function Checkbox(_ref5) {
|
|
|
21086
21083
|
errorStyles: themeValues.errorStyles,
|
|
21087
21084
|
disabledStyles: themeValues.disabledStyles,
|
|
21088
21085
|
disabledCheckedStyles: themeValues.disabledCheckedStyles,
|
|
21089
|
-
focusedStyles: themeValues.focusedStyles
|
|
21090
|
-
checkboxMargin: checkboxMargin
|
|
21086
|
+
focusedStyles: themeValues.focusedStyles
|
|
21091
21087
|
}, /*#__PURE__*/React.createElement(CheckboxIcon, {
|
|
21092
21088
|
viewBox: "0 0 24 24",
|
|
21093
21089
|
disabled: disabled,
|
|
@@ -48645,7 +48641,9 @@ var TermsAndConditionsControlV2 = function TermsAndConditionsControlV2(_ref) {
|
|
|
48645
48641
|
_ref$modalVariant = _ref.modalVariant,
|
|
48646
48642
|
modalVariant = _ref$modalVariant === void 0 ? "default" : _ref$modalVariant,
|
|
48647
48643
|
_ref$containerBackgro = _ref.containerBackground,
|
|
48648
|
-
containerBackground = _ref$containerBackgro === void 0 ? ATHENS_GREY : _ref$containerBackgro
|
|
48644
|
+
containerBackground = _ref$containerBackgro === void 0 ? ATHENS_GREY : _ref$containerBackgro,
|
|
48645
|
+
_ref$checkboxMargin = _ref.checkboxMargin,
|
|
48646
|
+
checkboxMargin = _ref$checkboxMargin === void 0 ? "0 0.5rem 0 0" : _ref$checkboxMargin;
|
|
48649
48647
|
|
|
48650
48648
|
var _useState = useState(false),
|
|
48651
48649
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -48671,12 +48669,13 @@ var TermsAndConditionsControlV2 = function TermsAndConditionsControlV2(_ref) {
|
|
|
48671
48669
|
name: id,
|
|
48672
48670
|
error: hasError,
|
|
48673
48671
|
checked: isChecked,
|
|
48674
|
-
onChange: onCheck
|
|
48672
|
+
onChange: onCheck,
|
|
48673
|
+
checkboxMargin: checkboxMargin
|
|
48675
48674
|
}), /*#__PURE__*/React.createElement(Stack, {
|
|
48676
48675
|
childGap: "0.25rem"
|
|
48677
48676
|
}, /*#__PURE__*/React.createElement(Cluster, {
|
|
48678
48677
|
justify: "flex-start",
|
|
48679
|
-
align: "
|
|
48678
|
+
align: "center",
|
|
48680
48679
|
nowrap: true
|
|
48681
48680
|
}, description && /*#__PURE__*/React.createElement(Text$1, {
|
|
48682
48681
|
color: CHARADE_GREY
|