@thecb/components 9.2.10-beta.4 → 9.2.10-beta.6

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