@thecb/components 9.2.10-beta.8 → 9.2.10-beta.9
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 +28 -13
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +28 -13
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/checkbox/Checkbox.js +4 -2
- package/src/components/molecules/terms-and-conditions/TermsAndConditionsControlV1.js +15 -3
- package/src/components/molecules/terms-and-conditions/TermsAndConditionsControlV2.js +26 -12
package/dist/index.cjs.js
CHANGED
|
@@ -22175,7 +22175,8 @@ var Checkbox = function Checkbox(_ref4) {
|
|
|
22175
22175
|
background: themeValues.backgroundColor,
|
|
22176
22176
|
extraStyles: "outline: none; ".concat(extraStyles, "; margin: ").concat(checkboxMargin, ";")
|
|
22177
22177
|
}, /*#__PURE__*/React__default.createElement(CheckboxLabelContainer, {
|
|
22178
|
-
"data-qa": dataQa
|
|
22178
|
+
"data-qa": dataQa,
|
|
22179
|
+
id: "".concat(id, "_label_container")
|
|
22179
22180
|
}, /*#__PURE__*/React__default.createElement(CheckboxContainer, {
|
|
22180
22181
|
"data-qa": "Checkbox"
|
|
22181
22182
|
}, /*#__PURE__*/React__default.createElement(HiddenCheckbox, {
|
|
@@ -22200,7 +22201,7 @@ var Checkbox = function Checkbox(_ref4) {
|
|
|
22200
22201
|
disabledStyles: themeValues.disabledStyles,
|
|
22201
22202
|
disabledCheckedStyles: themeValues.disabledCheckedStyles,
|
|
22202
22203
|
focusedStyles: themeValues.focusedStyles,
|
|
22203
|
-
"aria-labelledby": "".concat(name, "_title_id")
|
|
22204
|
+
"aria-labelledby": title ? "".concat(name, "_title_id") : "".concat(id, "_label_container")
|
|
22204
22205
|
}, /*#__PURE__*/React__default.createElement(CheckboxIcon, {
|
|
22205
22206
|
viewBox: "0 0 24 24",
|
|
22206
22207
|
disabled: disabled,
|
|
@@ -22716,12 +22717,12 @@ var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
|
22716
22717
|
return hasOwnProperty(toObject(it), key);
|
|
22717
22718
|
};
|
|
22718
22719
|
|
|
22719
|
-
var id = 0;
|
|
22720
|
+
var id$1 = 0;
|
|
22720
22721
|
var postfix = Math.random();
|
|
22721
22722
|
var toString$3 = functionUncurryThis(1.0.toString);
|
|
22722
22723
|
|
|
22723
22724
|
var uid = function (key) {
|
|
22724
|
-
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$3(++id + postfix, 36);
|
|
22725
|
+
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$3(++id$1 + postfix, 36);
|
|
22725
22726
|
};
|
|
22726
22727
|
|
|
22727
22728
|
var WellKnownSymbolsStore = shared('wks');
|
|
@@ -47864,7 +47865,11 @@ var TermsAndConditionsControlV1 = function TermsAndConditionsControlV1(_ref) {
|
|
|
47864
47865
|
_ref$initialFocusSele = _ref.initialFocusSelector,
|
|
47865
47866
|
initialFocusSelector = _ref$initialFocusSele === void 0 ? "" : _ref$initialFocusSele,
|
|
47866
47867
|
_ref$id = _ref.id,
|
|
47867
|
-
id = _ref$id === void 0 ? "terms-and-conditions" : _ref$id
|
|
47868
|
+
id = _ref$id === void 0 ? "terms-and-conditions" : _ref$id,
|
|
47869
|
+
_ref$screenReaderChec = _ref.screenReaderCheckboxLabel,
|
|
47870
|
+
screenReaderCheckboxLabel = _ref$screenReaderChec === void 0 ? "" : _ref$screenReaderChec,
|
|
47871
|
+
_ref$ariaLabelledBy = _ref.ariaLabelledBy,
|
|
47872
|
+
ariaLabelledBy = _ref$ariaLabelledBy === void 0 ? "" : _ref$ariaLabelledBy;
|
|
47868
47873
|
|
|
47869
47874
|
var _useState = React.useState(false),
|
|
47870
47875
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -47877,12 +47882,15 @@ var TermsAndConditionsControlV1 = function TermsAndConditionsControlV1(_ref) {
|
|
|
47877
47882
|
error: error,
|
|
47878
47883
|
checked: isChecked,
|
|
47879
47884
|
onChange: onCheck,
|
|
47880
|
-
"aria-labelledby": "".concat(id, "
|
|
47885
|
+
"aria-labelledby": ariaLabelledBy || (screenReaderCheckboxLabel ? "".concat(id, "_sr_only_label") : "".concat(id, "_html_label"))
|
|
47881
47886
|
}), /*#__PURE__*/React__default.createElement(Box, {
|
|
47882
47887
|
padding: "0 0 0 58px"
|
|
47883
|
-
},
|
|
47888
|
+
}, screenReaderCheckboxLabel && /*#__PURE__*/React__default.createElement("span", {
|
|
47889
|
+
className: "sr-only-text",
|
|
47890
|
+
id: "".concat(id, "_sr_only_label")
|
|
47891
|
+
}, screenReaderCheckboxLabel), /*#__PURE__*/React__default.createElement(Stack, null, /*#__PURE__*/React__default.createElement(Box, {
|
|
47884
47892
|
padding: "0",
|
|
47885
|
-
id: "".concat(id, "
|
|
47893
|
+
id: "".concat(id, "_html_label")
|
|
47886
47894
|
}, html), terms && /*#__PURE__*/React__default.createElement(TermsAndConditionsModal$1, {
|
|
47887
47895
|
link: "Learn More",
|
|
47888
47896
|
terms: terms,
|
|
@@ -47920,7 +47928,11 @@ var TermsAndConditionsControlV2 = function TermsAndConditionsControlV2(_ref) {
|
|
|
47920
47928
|
_ref$modalTitle = _ref.modalTitle,
|
|
47921
47929
|
modalTitle = _ref$modalTitle === void 0 ? "Terms and Conditions" : _ref$modalTitle,
|
|
47922
47930
|
_ref$initialFocusSele = _ref.initialFocusSelector,
|
|
47923
|
-
initialFocusSelector = _ref$initialFocusSele === void 0 ? "" : _ref$initialFocusSele
|
|
47931
|
+
initialFocusSelector = _ref$initialFocusSele === void 0 ? "" : _ref$initialFocusSele,
|
|
47932
|
+
_ref$screenReaderChec = _ref.screenReaderCheckboxLabel,
|
|
47933
|
+
screenReaderCheckboxLabel = _ref$screenReaderChec === void 0 ? "" : _ref$screenReaderChec,
|
|
47934
|
+
_ref$ariaLabelledBy = _ref.ariaLabelledBy,
|
|
47935
|
+
ariaLabelledBy = _ref$ariaLabelledBy === void 0 ? "" : _ref$ariaLabelledBy;
|
|
47924
47936
|
|
|
47925
47937
|
var _useState = React.useState(false),
|
|
47926
47938
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -47947,20 +47959,23 @@ var TermsAndConditionsControlV2 = function TermsAndConditionsControlV2(_ref) {
|
|
|
47947
47959
|
childGap: "0"
|
|
47948
47960
|
}, html && /*#__PURE__*/React__default.createElement(Box, {
|
|
47949
47961
|
padding: "0",
|
|
47950
|
-
id: "".concat(id, "
|
|
47962
|
+
id: "".concat(id, "_html_label")
|
|
47951
47963
|
}, html), /*#__PURE__*/React__default.createElement(Cluster, {
|
|
47952
47964
|
justify: "flex-start",
|
|
47953
47965
|
align: "center",
|
|
47954
47966
|
nowrap: true
|
|
47955
|
-
}, showCheckbox && /*#__PURE__*/React__default.createElement(Checkbox$1, {
|
|
47967
|
+
}, showCheckbox && /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(Checkbox$1, {
|
|
47956
47968
|
name: id,
|
|
47957
47969
|
error: hasError,
|
|
47958
47970
|
checked: isChecked,
|
|
47959
47971
|
onChange: onCheck,
|
|
47960
47972
|
checkboxMargin: checkboxMargin,
|
|
47961
47973
|
extraStyles: "align-self: flex-start;",
|
|
47962
|
-
"aria-labelledby": "".concat(id, "
|
|
47963
|
-
}), /*#__PURE__*/React__default.createElement(
|
|
47974
|
+
"aria-labelledby": ariaLabelledBy || (screenReaderCheckboxLabel ? "".concat(id, "_sr_only_label") : "".concat(id, "_html_label"))
|
|
47975
|
+
}), screenReaderCheckboxLabel && /*#__PURE__*/React__default.createElement("span", {
|
|
47976
|
+
className: "sr-only-text",
|
|
47977
|
+
id: "".concat(id, "_sr_only_label")
|
|
47978
|
+
}, screenReaderCheckboxLabel)), /*#__PURE__*/React__default.createElement(Stack, {
|
|
47964
47979
|
childGap: "0.25rem",
|
|
47965
47980
|
fullHeight: true
|
|
47966
47981
|
}, /*#__PURE__*/React__default.createElement(Cluster, {
|