@thecb/components 7.9.4-beta.2 → 7.9.4-beta.4
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 +49 -44
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +49 -44
- 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 +14 -6
package/dist/index.cjs.js
CHANGED
|
@@ -21008,43 +21008,40 @@ var HiddenCheckbox = styled__default.input.attrs({
|
|
|
21008
21008
|
var StyledCheckbox = styled__default.div.withConfig({
|
|
21009
21009
|
displayName: "Checkbox__StyledCheckbox",
|
|
21010
21010
|
componentId: "sc-36kqbv-4"
|
|
21011
|
-
})(["display:inline-block;
|
|
21012
|
-
var
|
|
21013
|
-
return checkboxMargin;
|
|
21014
|
-
}, CheckboxIcon, function (_ref3) {
|
|
21015
|
-
var checked = _ref3.checked;
|
|
21011
|
+
})(["display:inline-block;width:24px;height:24px;border-radius:2px;transition:all 150ms;", "{visibility:", ";}", ";"], CheckboxIcon, function (_ref2) {
|
|
21012
|
+
var checked = _ref2.checked;
|
|
21016
21013
|
return checked ? "visible" : "hidden";
|
|
21017
|
-
}, function (
|
|
21018
|
-
var error =
|
|
21019
|
-
disabled =
|
|
21020
|
-
checked =
|
|
21021
|
-
focused =
|
|
21022
|
-
defaultStyles =
|
|
21023
|
-
checkedStyles =
|
|
21024
|
-
focusedStyles =
|
|
21025
|
-
errorStyles =
|
|
21026
|
-
disabledStyles =
|
|
21027
|
-
disabledCheckedStyles =
|
|
21014
|
+
}, function (_ref3) {
|
|
21015
|
+
var error = _ref3.error,
|
|
21016
|
+
disabled = _ref3.disabled,
|
|
21017
|
+
checked = _ref3.checked,
|
|
21018
|
+
focused = _ref3.focused,
|
|
21019
|
+
defaultStyles = _ref3.defaultStyles,
|
|
21020
|
+
checkedStyles = _ref3.checkedStyles,
|
|
21021
|
+
focusedStyles = _ref3.focusedStyles,
|
|
21022
|
+
errorStyles = _ref3.errorStyles,
|
|
21023
|
+
disabledStyles = _ref3.disabledStyles,
|
|
21024
|
+
disabledCheckedStyles = _ref3.disabledCheckedStyles;
|
|
21028
21025
|
return error ? styled.css(["", " ", ""], errorStyles, focused && focusedStyles) : disabled ? styled.css(["", ""], checked ? disabledCheckedStyles : disabledStyles) : checked ? styled.css(["", " ", ""], checkedStyles, focused && focusedStyles) : styled.css(["", " ", ""], defaultStyles, focused && focusedStyles);
|
|
21029
21026
|
});
|
|
21030
21027
|
|
|
21031
|
-
var Checkbox = function Checkbox(
|
|
21032
|
-
var title =
|
|
21033
|
-
name =
|
|
21034
|
-
checked =
|
|
21035
|
-
|
|
21036
|
-
onChange =
|
|
21037
|
-
|
|
21038
|
-
disabled =
|
|
21039
|
-
themeValues =
|
|
21040
|
-
|
|
21041
|
-
hidden =
|
|
21042
|
-
|
|
21043
|
-
error =
|
|
21044
|
-
|
|
21045
|
-
checkboxMargin =
|
|
21046
|
-
extraStyles =
|
|
21047
|
-
textExtraStyles =
|
|
21028
|
+
var Checkbox = function Checkbox(_ref4) {
|
|
21029
|
+
var title = _ref4.title,
|
|
21030
|
+
name = _ref4.name,
|
|
21031
|
+
checked = _ref4.checked,
|
|
21032
|
+
_ref4$onChange = _ref4.onChange,
|
|
21033
|
+
onChange = _ref4$onChange === void 0 ? noop : _ref4$onChange,
|
|
21034
|
+
_ref4$disabled = _ref4.disabled,
|
|
21035
|
+
disabled = _ref4$disabled === void 0 ? false : _ref4$disabled,
|
|
21036
|
+
themeValues = _ref4.themeValues,
|
|
21037
|
+
_ref4$hidden = _ref4.hidden,
|
|
21038
|
+
hidden = _ref4$hidden === void 0 ? false : _ref4$hidden,
|
|
21039
|
+
_ref4$error = _ref4.error,
|
|
21040
|
+
error = _ref4$error === void 0 ? false : _ref4$error,
|
|
21041
|
+
_ref4$checkboxMargin = _ref4.checkboxMargin,
|
|
21042
|
+
checkboxMargin = _ref4$checkboxMargin === void 0 ? "0 16px 0 0" : _ref4$checkboxMargin,
|
|
21043
|
+
extraStyles = _ref4.extraStyles,
|
|
21044
|
+
textExtraStyles = _ref4.textExtraStyles;
|
|
21048
21045
|
|
|
21049
21046
|
var _useState = React.useState(false),
|
|
21050
21047
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -21071,7 +21068,7 @@ var Checkbox = function Checkbox(_ref5) {
|
|
|
21071
21068
|
},
|
|
21072
21069
|
hiddenStyles: hidden,
|
|
21073
21070
|
background: themeValues.backgroundColor,
|
|
21074
|
-
extraStyles: "outline: none; ".concat(extraStyles)
|
|
21071
|
+
extraStyles: "outline: none; ".concat(extraStyles, "; margin: ").concat(checkboxMargin, ";")
|
|
21075
21072
|
}, /*#__PURE__*/React__default.createElement(CheckboxLabelContainer, null, /*#__PURE__*/React__default.createElement(CheckboxContainer, {
|
|
21076
21073
|
"data-qa": "Checkbox"
|
|
21077
21074
|
}, /*#__PURE__*/React__default.createElement(HiddenCheckbox, {
|
|
@@ -21094,8 +21091,7 @@ var Checkbox = function Checkbox(_ref5) {
|
|
|
21094
21091
|
errorStyles: themeValues.errorStyles,
|
|
21095
21092
|
disabledStyles: themeValues.disabledStyles,
|
|
21096
21093
|
disabledCheckedStyles: themeValues.disabledCheckedStyles,
|
|
21097
|
-
focusedStyles: themeValues.focusedStyles
|
|
21098
|
-
checkboxMargin: checkboxMargin
|
|
21094
|
+
focusedStyles: themeValues.focusedStyles
|
|
21099
21095
|
}, /*#__PURE__*/React__default.createElement(CheckboxIcon, {
|
|
21100
21096
|
viewBox: "0 0 24 24",
|
|
21101
21097
|
disabled: disabled,
|
|
@@ -48653,7 +48649,11 @@ var TermsAndConditionsControlV2 = function TermsAndConditionsControlV2(_ref) {
|
|
|
48653
48649
|
_ref$modalVariant = _ref.modalVariant,
|
|
48654
48650
|
modalVariant = _ref$modalVariant === void 0 ? "default" : _ref$modalVariant,
|
|
48655
48651
|
_ref$containerBackgro = _ref.containerBackground,
|
|
48656
|
-
containerBackground = _ref$containerBackgro === void 0 ? ATHENS_GREY : _ref$containerBackgro
|
|
48652
|
+
containerBackground = _ref$containerBackgro === void 0 ? ATHENS_GREY : _ref$containerBackgro,
|
|
48653
|
+
_ref$checkboxMargin = _ref.checkboxMargin,
|
|
48654
|
+
checkboxMargin = _ref$checkboxMargin === void 0 ? "0 0.5rem 0 0" : _ref$checkboxMargin,
|
|
48655
|
+
_ref$modalTitle = _ref.modalTitle,
|
|
48656
|
+
modalTitle = _ref$modalTitle === void 0 ? "Terms and Conditions" : _ref$modalTitle;
|
|
48657
48657
|
|
|
48658
48658
|
var _useState = React.useState(false),
|
|
48659
48659
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -48666,7 +48666,8 @@ var TermsAndConditionsControlV2 = function TermsAndConditionsControlV2(_ref) {
|
|
|
48666
48666
|
minWidth: displayInline ? "0" : "100%",
|
|
48667
48667
|
background: displayInline ? "transparent" : containerBackground,
|
|
48668
48668
|
boxShadow: displayInline ? "none" : standardBoxShadow,
|
|
48669
|
-
borderRadius: displayInline ? "0" : "4px"
|
|
48669
|
+
borderRadius: displayInline ? "0" : "4px",
|
|
48670
|
+
extraStyles: "margin: 4px 0 0 4px;"
|
|
48670
48671
|
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
48671
48672
|
childGap: "0.25rem"
|
|
48672
48673
|
}, html && /*#__PURE__*/React__default.createElement(Box, {
|
|
@@ -48679,21 +48680,25 @@ var TermsAndConditionsControlV2 = function TermsAndConditionsControlV2(_ref) {
|
|
|
48679
48680
|
name: id,
|
|
48680
48681
|
error: hasError,
|
|
48681
48682
|
checked: isChecked,
|
|
48682
|
-
onChange: onCheck
|
|
48683
|
+
onChange: onCheck,
|
|
48684
|
+
checkboxMargin: checkboxMargin
|
|
48683
48685
|
}), /*#__PURE__*/React__default.createElement(Stack, {
|
|
48684
|
-
childGap: "0.25rem"
|
|
48686
|
+
childGap: "0.25rem",
|
|
48687
|
+
fullHeight: true
|
|
48685
48688
|
}, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
48686
48689
|
justify: "flex-start",
|
|
48687
|
-
align: "
|
|
48688
|
-
nowrap: true
|
|
48690
|
+
align: "center",
|
|
48691
|
+
nowrap: true,
|
|
48692
|
+
extraStyles: "padding-right: 2px; > div > * { margin: 4px 2px; };"
|
|
48689
48693
|
}, description && /*#__PURE__*/React__default.createElement(Text$1, {
|
|
48690
48694
|
color: CHARADE_GREY
|
|
48691
|
-
}, description
|
|
48695
|
+
}, description), terms && /*#__PURE__*/React__default.createElement(TermsAndConditionsModal$1, {
|
|
48692
48696
|
link: linkText,
|
|
48693
48697
|
terms: terms,
|
|
48694
48698
|
isOpen: showTerms,
|
|
48695
48699
|
toggleOpen: toggleShowTerms,
|
|
48696
|
-
linkVariant: modalVariant
|
|
48700
|
+
linkVariant: modalVariant,
|
|
48701
|
+
title: modalTitle
|
|
48697
48702
|
})), showCheckbox && hasError && /*#__PURE__*/React__default.createElement(Text$1, {
|
|
48698
48703
|
variant: "pXS",
|
|
48699
48704
|
color: ERROR_COLOR,
|