@thecb/components 9.2.10-beta.3 → 9.2.10-beta.5

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 CHANGED
@@ -22146,7 +22146,9 @@ var Checkbox = function Checkbox(_ref4) {
22146
22146
  extraStyles = _ref4.extraStyles,
22147
22147
  textExtraStyles = _ref4.textExtraStyles,
22148
22148
  _ref4$dataQa = _ref4.dataQa,
22149
- dataQa = _ref4$dataQa === void 0 ? null : _ref4$dataQa;
22149
+ dataQa = _ref4$dataQa === void 0 ? null : _ref4$dataQa,
22150
+ _ref4$checkboxAriaLab = _ref4.checkboxAriaLabel,
22151
+ checkboxAriaLabel = _ref4$checkboxAriaLab === void 0 ? "" : _ref4$checkboxAriaLab;
22150
22152
 
22151
22153
  var _useState = React.useState(false),
22152
22154
  _useState2 = _slicedToArray(_useState, 2),
@@ -22182,7 +22184,7 @@ var Checkbox = function Checkbox(_ref4) {
22182
22184
  id: "checkbox-".concat(name),
22183
22185
  disabled: disabled,
22184
22186
  name: name,
22185
- "aria-label": name,
22187
+ "aria-label": checkboxAriaLabel || "".concat(title, " checkbox"),
22186
22188
  checked: checked,
22187
22189
  onChange: onChange,
22188
22190
  tabIndex: "-1",
@@ -22200,7 +22202,8 @@ var Checkbox = function Checkbox(_ref4) {
22200
22202
  errorStyles: themeValues.errorStyles,
22201
22203
  disabledStyles: themeValues.disabledStyles,
22202
22204
  disabledCheckedStyles: themeValues.disabledCheckedStyles,
22203
- focusedStyles: themeValues.focusedStyles
22205
+ focusedStyles: themeValues.focusedStyles,
22206
+ "aria-labelledby": "".concat(name, "_title_id")
22204
22207
  }, /*#__PURE__*/React__default.createElement(CheckboxIcon, {
22205
22208
  viewBox: "0 0 24 24",
22206
22209
  disabled: disabled,
@@ -22212,6 +22215,7 @@ var Checkbox = function Checkbox(_ref4) {
22212
22215
  variant: "p",
22213
22216
  weight: themeValues.textFontWeight,
22214
22217
  color: themeValues.textColor,
22218
+ id: "".concat(name, "_title_id"),
22215
22219
  extraStyles: textExtraStyles ? "".concat(textExtraStyles, " ").concat(disabled && "color: #6e727e; background-color: #f7f7f7;", " ") : "margin-left: 1rem ".concat(disabled && "color: #6e727e; background-color: #f7f7f7;")
22216
22220
  }, title)));
22217
22221
  };
@@ -47861,7 +47865,9 @@ var TermsAndConditionsControlV1 = function TermsAndConditionsControlV1(_ref) {
47861
47865
  error = _ref$error === void 0 ? false : _ref$error,
47862
47866
  linkVariant = _ref.linkVariant,
47863
47867
  _ref$initialFocusSele = _ref.initialFocusSelector,
47864
- initialFocusSelector = _ref$initialFocusSele === void 0 ? "" : _ref$initialFocusSele;
47868
+ initialFocusSelector = _ref$initialFocusSele === void 0 ? "" : _ref$initialFocusSele,
47869
+ _ref$checkboxAriaLabe = _ref.checkboxAriaLabel,
47870
+ checkboxAriaLabel = _ref$checkboxAriaLabe === void 0 ? "" : _ref$checkboxAriaLabe;
47865
47871
 
47866
47872
  var _useState = React.useState(false),
47867
47873
  _useState2 = _slicedToArray(_useState, 2),
@@ -47873,7 +47879,8 @@ var TermsAndConditionsControlV1 = function TermsAndConditionsControlV1(_ref) {
47873
47879
  title: "Terms and Conditions",
47874
47880
  error: error,
47875
47881
  checked: isChecked,
47876
- onChange: onCheck
47882
+ onChange: onCheck,
47883
+ "aria-label": checkboxAriaLabel
47877
47884
  }), /*#__PURE__*/React__default.createElement(Box, {
47878
47885
  padding: "0 0 0 58px"
47879
47886
  }, /*#__PURE__*/React__default.createElement(Stack, null, /*#__PURE__*/React__default.createElement(Box, {
@@ -47915,7 +47922,9 @@ var TermsAndConditionsControlV2 = function TermsAndConditionsControlV2(_ref) {
47915
47922
  _ref$modalTitle = _ref.modalTitle,
47916
47923
  modalTitle = _ref$modalTitle === void 0 ? "Terms and Conditions" : _ref$modalTitle,
47917
47924
  _ref$initialFocusSele = _ref.initialFocusSelector,
47918
- initialFocusSelector = _ref$initialFocusSele === void 0 ? "" : _ref$initialFocusSele;
47925
+ initialFocusSelector = _ref$initialFocusSele === void 0 ? "" : _ref$initialFocusSele,
47926
+ _ref$checkboxAriaLabe = _ref.checkboxAriaLabel,
47927
+ checkboxAriaLabel = _ref$checkboxAriaLabe === void 0 ? "" : _ref$checkboxAriaLabe;
47919
47928
 
47920
47929
  var _useState = React.useState(false),
47921
47930
  _useState2 = _slicedToArray(_useState, 2),
@@ -47952,7 +47961,8 @@ var TermsAndConditionsControlV2 = function TermsAndConditionsControlV2(_ref) {
47952
47961
  checked: isChecked,
47953
47962
  onChange: onCheck,
47954
47963
  checkboxMargin: checkboxMargin,
47955
- extraStyles: "align-self: flex-start;"
47964
+ extraStyles: "align-self: flex-start;",
47965
+ "aria-label": checkboxAriaLabel
47956
47966
  }), /*#__PURE__*/React__default.createElement(Stack, {
47957
47967
  childGap: "0.25rem",
47958
47968
  fullHeight: true