@thecb/components 9.2.0-beta.12 → 9.2.0-beta.13

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.esm.js CHANGED
@@ -24193,7 +24193,11 @@ var FormSelect = function FormSelect(_ref) {
24193
24193
  hasTitles = _ref$hasTitles === void 0 ? false : _ref$hasTitles,
24194
24194
  autocompleteValue = _ref.autocompleteValue,
24195
24195
  _ref$smoothScroll = _ref.smoothScroll,
24196
- smoothScroll = _ref$smoothScroll === void 0 ? true : _ref$smoothScroll;
24196
+ smoothScroll = _ref$smoothScroll === void 0 ? true : _ref$smoothScroll,
24197
+ _ref$dataQa = _ref.dataQa,
24198
+ dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa,
24199
+ _ref$widthFitOptions = _ref.widthFitOptions,
24200
+ widthFitOptions = _ref$widthFitOptions === void 0 ? false : _ref$widthFitOptions;
24197
24201
 
24198
24202
  var _useState = useState(false),
24199
24203
  _useState2 = _slicedToArray(_useState, 2),
@@ -24216,7 +24220,9 @@ var FormSelect = function FormSelect(_ref) {
24216
24220
  });
24217
24221
  return /*#__PURE__*/React.createElement(SelectContainer, {
24218
24222
  ref: dropdownRef,
24219
- disabled: disabled
24223
+ disabled: disabled,
24224
+ "aria-disabled": disabled,
24225
+ "data-qa": dataQa
24220
24226
  }, /*#__PURE__*/React.createElement(Box, {
24221
24227
  padding: "0",
24222
24228
  minWidth: "100%"
@@ -24234,6 +24240,7 @@ var FormSelect = function FormSelect(_ref) {
24234
24240
  ariaLabelledby: createIdFromString(labelTextWhenNoError),
24235
24241
  ariaDescribedby: createIdFromString(labelTextWhenNoError, "error message"),
24236
24242
  maxHeight: dropdownMaxHeight,
24243
+ widthFitOptions: widthFitOptions,
24237
24244
  hasTitles: hasTitles,
24238
24245
  placeholder: options[0] ? options[0].text : "",
24239
24246
  options: options,
@@ -24241,6 +24248,7 @@ var FormSelect = function FormSelect(_ref) {
24241
24248
  disabledValues: disabledValues,
24242
24249
  isOpen: open,
24243
24250
  isError: field.hasErrors && field.dirty || field.hasErrors && showErrors,
24251
+ ariaInvalid: field.hasErrors && field.dirty || field.hasErrors && showErrors,
24244
24252
  onSelect: onChange ? function (value) {
24245
24253
  return onChange(value);
24246
24254
  } : function (value) {
@@ -24254,17 +24262,17 @@ var FormSelect = function FormSelect(_ref) {
24254
24262
  smoothScroll: smoothScroll
24255
24263
  }), /*#__PURE__*/React.createElement(Stack, {
24256
24264
  direction: "row",
24257
- justify: "space-between",
24258
- "aria-live": "polite"
24259
- }, field.hasErrors && field.dirty || field.hasErrors && showErrors ? /*#__PURE__*/React.createElement(Text$1, {
24265
+ justify: "space-between"
24266
+ }, /*#__PURE__*/React.createElement(Text$1, {
24260
24267
  color: ERROR_COLOR,
24261
24268
  variant: "pXS",
24262
24269
  weight: themeValues.fontWeight,
24263
- extraStyles: "word-break: break-word;\n font-family: Public Sans;\n &::first-letter {\n text-transform: uppercase;\n }",
24264
- id: createIdFromString(labelTextWhenNoError, "error message")
24265
- }, errorMessages[field.errors[0]]) : /*#__PURE__*/React.createElement(Text$1, {
24266
- extraStyles: "height: ".concat(themeValues.lineHeight, ";")
24267
- })));
24270
+ extraStyles: "\n word-break: break-word;\n font-family: Public Sans;\n &::first-letter {\n text-transform: uppercase;\n }\n ",
24271
+ id: createIdFromString(labelTextWhenNoError, "error message"),
24272
+ "aria-live": "polite",
24273
+ "aria-atomic": true,
24274
+ "data-qa": createIdFromString(labelTextWhenNoError, "error message")
24275
+ }, field.hasErrors && field.dirty || field.hasErrors && showErrors ? errorMessages[field.errors[0]] : "")));
24268
24276
  };
24269
24277
 
24270
24278
  var FormSelect$1 = themeComponent(FormSelect, "FormSelect", fallbackValues$g, "default");
@@ -27283,7 +27291,7 @@ var RadioButtonWithLabel = function RadioButtonWithLabel(_ref5) {
27283
27291
  var RadioButtonWithLabel$1 = themeComponent(RadioButtonWithLabel, "RadioButtonWithLabel", fallbackValues$u);
27284
27292
 
27285
27293
  var activeColor$6 = "".concat(MATISSE_BLUE);
27286
- var inactiveColor = "".concat(GREY_CHATEAU);
27294
+ var inactiveColor = "".concat(STORM_GREY);
27287
27295
  var fallbackValues$v = {
27288
27296
  activeColor: activeColor$6,
27289
27297
  inactiveColor: inactiveColor
@@ -27316,19 +27324,21 @@ var RadioButton$1 = function RadioButton(_ref2) {
27316
27324
  var buttonBorder = {
27317
27325
  onFocused: {
27318
27326
  borderColor: themeValues.activeColor,
27319
- boxShadow: "0px 0px 4px 0px ".concat(themeValues.activeColor)
27327
+ outline: "3px solid ".concat(themeValues.activeColor),
27328
+ outlineOffset: "2px"
27320
27329
  },
27321
27330
  offFocused: {
27322
27331
  borderColor: themeValues.activeColor,
27323
- boxShadow: "0px 0px 4px 0px ".concat(themeValues.activeColor)
27332
+ outline: "3px solid ".concat(themeValues.activeColor),
27333
+ outlineOffset: "2px"
27324
27334
  },
27325
27335
  on: {
27326
27336
  borderColor: themeValues.activeColor,
27327
- boxShadow: "0px 0px 0px 0px #FFFFFF"
27337
+ outline: "0"
27328
27338
  },
27329
27339
  off: {
27330
27340
  borderColor: themeValues.inactiveColor,
27331
- boxShadow: "0px 0px 0px 0px #FFFFFF"
27341
+ outline: "0"
27332
27342
  }
27333
27343
  };
27334
27344
  var buttonCenter = {
@@ -27377,7 +27387,7 @@ var RadioButton$1 = function RadioButton(_ref2) {
27377
27387
  borderWidth: "1px",
27378
27388
  borderStyle: "solid",
27379
27389
  borderRadius: "12px",
27380
- margin: "4px 14px 4px 4px",
27390
+ margin: "6px 14px 6px 6px",
27381
27391
  height: "24px",
27382
27392
  width: "24px",
27383
27393
  variants: buttonBorder,
@@ -50325,19 +50335,19 @@ var ToastNotification = function ToastNotification(_ref) {
50325
50335
  backgroundColor = _ref.backgroundColor;
50326
50336
  return /*#__PURE__*/React.createElement(Box, {
50327
50337
  onClick: closeToastNotification,
50328
- background: backgroundColor ? backgroundColor : variant === VARIANTS.SUCCESS ? HINT_GREEN : variant === "error" ? ERROR_BACKGROUND_COLOR : WHITE,
50338
+ background: backgroundColor ? backgroundColor : variant === VARIANTS.SUCCESS ? HINT_GREEN : variant === VARIANTS.ERROR ? ERROR_BACKGROUND_COLOR : WHITE,
50329
50339
  minWidth: minWidth,
50330
50340
  minHeight: height && parseInt(height) < 100 ? height : "100px",
50331
50341
  height: height ? height : "auto",
50332
50342
  tabIndex: toastOpen ? "-1" : "0",
50333
50343
  padding: "0rem 1rem",
50334
50344
  borderRadius: "4px",
50335
- boxShadow: "0px 4px 4px rgba(41, 42, 51, 0.15), 0px 1px 7px rgba(41, 42, 51, 0.2), 0px 7px 12px rgba(41, 42, 51, 0.15)",
50345
+ boxShadow: generateShadows().standard.base,
50336
50346
  extraStyles: "\n display: ".concat(toastOpen ? "block" : "none", ";\n position: fixed; bottom: 4rem; left: 4rem;\n ").concat(extraStyles, ";\n cursor: pointer;\n ")
50337
50347
  }, /*#__PURE__*/React.createElement(Cluster, {
50338
50348
  align: "center",
50339
50349
  childGap: childGap
50340
- }, variant === "success" && /*#__PURE__*/React.createElement(SuccessfulIconMedium, null), variant === "error" && /*#__PURE__*/React.createElement(ErroredIcon, null), /*#__PURE__*/React.createElement(Box, {
50350
+ }, variant === VARIANTS.SUCCESS && /*#__PURE__*/React.createElement(SuccessfulIconMedium, null), variant === VARIANTS.ERROR && /*#__PURE__*/React.createElement(ErroredIcon, null), /*#__PURE__*/React.createElement(Box, {
50341
50351
  padding: "1rem 0",
50342
50352
  maxWidth: maxWidth
50343
50353
  }, /*#__PURE__*/React.createElement(Paragraph$1, {