@thecb/components 9.2.0-beta.12 → 9.2.0-beta.14
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 +29 -19
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +29 -19
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/form-select/FormSelect.js +35 -21
- package/src/components/molecules/radio-section/radio-button/RadioButton.js +7 -5
- package/src/components/molecules/radio-section/radio-button/RadioButton.theme.js +2 -2
- package/src/components/molecules/toast-notification/ToastNotification.js +5 -6
- package/src/types/common/ToastVariants.ts +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -24201,7 +24201,11 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24201
24201
|
hasTitles = _ref$hasTitles === void 0 ? false : _ref$hasTitles,
|
|
24202
24202
|
autocompleteValue = _ref.autocompleteValue,
|
|
24203
24203
|
_ref$smoothScroll = _ref.smoothScroll,
|
|
24204
|
-
smoothScroll = _ref$smoothScroll === void 0 ? true : _ref$smoothScroll
|
|
24204
|
+
smoothScroll = _ref$smoothScroll === void 0 ? true : _ref$smoothScroll,
|
|
24205
|
+
_ref$dataQa = _ref.dataQa,
|
|
24206
|
+
dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa,
|
|
24207
|
+
_ref$widthFitOptions = _ref.widthFitOptions,
|
|
24208
|
+
widthFitOptions = _ref$widthFitOptions === void 0 ? false : _ref$widthFitOptions;
|
|
24205
24209
|
|
|
24206
24210
|
var _useState = React.useState(false),
|
|
24207
24211
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -24224,7 +24228,9 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24224
24228
|
});
|
|
24225
24229
|
return /*#__PURE__*/React__default.createElement(SelectContainer, {
|
|
24226
24230
|
ref: dropdownRef,
|
|
24227
|
-
disabled: disabled
|
|
24231
|
+
disabled: disabled,
|
|
24232
|
+
"aria-disabled": disabled,
|
|
24233
|
+
"data-qa": dataQa
|
|
24228
24234
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
24229
24235
|
padding: "0",
|
|
24230
24236
|
minWidth: "100%"
|
|
@@ -24242,6 +24248,7 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24242
24248
|
ariaLabelledby: createIdFromString(labelTextWhenNoError),
|
|
24243
24249
|
ariaDescribedby: createIdFromString(labelTextWhenNoError, "error message"),
|
|
24244
24250
|
maxHeight: dropdownMaxHeight,
|
|
24251
|
+
widthFitOptions: widthFitOptions,
|
|
24245
24252
|
hasTitles: hasTitles,
|
|
24246
24253
|
placeholder: options[0] ? options[0].text : "",
|
|
24247
24254
|
options: options,
|
|
@@ -24249,6 +24256,7 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24249
24256
|
disabledValues: disabledValues,
|
|
24250
24257
|
isOpen: open,
|
|
24251
24258
|
isError: field.hasErrors && field.dirty || field.hasErrors && showErrors,
|
|
24259
|
+
ariaInvalid: field.hasErrors && field.dirty || field.hasErrors && showErrors,
|
|
24252
24260
|
onSelect: onChange ? function (value) {
|
|
24253
24261
|
return onChange(value);
|
|
24254
24262
|
} : function (value) {
|
|
@@ -24262,17 +24270,17 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24262
24270
|
smoothScroll: smoothScroll
|
|
24263
24271
|
}), /*#__PURE__*/React__default.createElement(Stack, {
|
|
24264
24272
|
direction: "row",
|
|
24265
|
-
justify: "space-between"
|
|
24266
|
-
|
|
24267
|
-
}, field.hasErrors && field.dirty || field.hasErrors && showErrors ? /*#__PURE__*/React__default.createElement(Text$1, {
|
|
24273
|
+
justify: "space-between"
|
|
24274
|
+
}, /*#__PURE__*/React__default.createElement(Text$1, {
|
|
24268
24275
|
color: ERROR_COLOR,
|
|
24269
24276
|
variant: "pXS",
|
|
24270
24277
|
weight: themeValues.fontWeight,
|
|
24271
|
-
extraStyles: "word-break: break-word;\n
|
|
24272
|
-
id: createIdFromString(labelTextWhenNoError, "error message")
|
|
24273
|
-
|
|
24274
|
-
|
|
24275
|
-
|
|
24278
|
+
extraStyles: "\n word-break: break-word;\n font-family: Public Sans;\n &::first-letter {\n text-transform: uppercase;\n }\n ",
|
|
24279
|
+
id: createIdFromString(labelTextWhenNoError, "error message"),
|
|
24280
|
+
"aria-live": "polite",
|
|
24281
|
+
"aria-atomic": true,
|
|
24282
|
+
"data-qa": createIdFromString(labelTextWhenNoError, "error message")
|
|
24283
|
+
}, field.hasErrors && field.dirty || field.hasErrors && showErrors ? errorMessages[field.errors[0]] : "")));
|
|
24276
24284
|
};
|
|
24277
24285
|
|
|
24278
24286
|
var FormSelect$1 = themeComponent(FormSelect, "FormSelect", fallbackValues$g, "default");
|
|
@@ -27291,7 +27299,7 @@ var RadioButtonWithLabel = function RadioButtonWithLabel(_ref5) {
|
|
|
27291
27299
|
var RadioButtonWithLabel$1 = themeComponent(RadioButtonWithLabel, "RadioButtonWithLabel", fallbackValues$u);
|
|
27292
27300
|
|
|
27293
27301
|
var activeColor$6 = "".concat(MATISSE_BLUE);
|
|
27294
|
-
var inactiveColor = "".concat(
|
|
27302
|
+
var inactiveColor = "".concat(STORM_GREY);
|
|
27295
27303
|
var fallbackValues$v = {
|
|
27296
27304
|
activeColor: activeColor$6,
|
|
27297
27305
|
inactiveColor: inactiveColor
|
|
@@ -27324,19 +27332,21 @@ var RadioButton$1 = function RadioButton(_ref2) {
|
|
|
27324
27332
|
var buttonBorder = {
|
|
27325
27333
|
onFocused: {
|
|
27326
27334
|
borderColor: themeValues.activeColor,
|
|
27327
|
-
|
|
27335
|
+
outline: "3px solid ".concat(themeValues.activeColor),
|
|
27336
|
+
outlineOffset: "2px"
|
|
27328
27337
|
},
|
|
27329
27338
|
offFocused: {
|
|
27330
27339
|
borderColor: themeValues.activeColor,
|
|
27331
|
-
|
|
27340
|
+
outline: "3px solid ".concat(themeValues.activeColor),
|
|
27341
|
+
outlineOffset: "2px"
|
|
27332
27342
|
},
|
|
27333
27343
|
on: {
|
|
27334
27344
|
borderColor: themeValues.activeColor,
|
|
27335
|
-
|
|
27345
|
+
outline: "0"
|
|
27336
27346
|
},
|
|
27337
27347
|
off: {
|
|
27338
27348
|
borderColor: themeValues.inactiveColor,
|
|
27339
|
-
|
|
27349
|
+
outline: "0"
|
|
27340
27350
|
}
|
|
27341
27351
|
};
|
|
27342
27352
|
var buttonCenter = {
|
|
@@ -27385,7 +27395,7 @@ var RadioButton$1 = function RadioButton(_ref2) {
|
|
|
27385
27395
|
borderWidth: "1px",
|
|
27386
27396
|
borderStyle: "solid",
|
|
27387
27397
|
borderRadius: "12px",
|
|
27388
|
-
margin: "
|
|
27398
|
+
margin: "6px 14px 6px 6px",
|
|
27389
27399
|
height: "24px",
|
|
27390
27400
|
width: "24px",
|
|
27391
27401
|
variants: buttonBorder,
|
|
@@ -50333,19 +50343,19 @@ var ToastNotification = function ToastNotification(_ref) {
|
|
|
50333
50343
|
backgroundColor = _ref.backgroundColor;
|
|
50334
50344
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
50335
50345
|
onClick: closeToastNotification,
|
|
50336
|
-
background: backgroundColor ? backgroundColor : variant === VARIANTS.SUCCESS ? HINT_GREEN : variant ===
|
|
50346
|
+
background: backgroundColor ? backgroundColor : variant === VARIANTS.SUCCESS ? HINT_GREEN : variant === VARIANTS.ERROR ? ERROR_BACKGROUND_COLOR : WHITE,
|
|
50337
50347
|
minWidth: minWidth,
|
|
50338
50348
|
minHeight: height && parseInt(height) < 100 ? height : "100px",
|
|
50339
50349
|
height: height ? height : "auto",
|
|
50340
50350
|
tabIndex: toastOpen ? "-1" : "0",
|
|
50341
50351
|
padding: "0rem 1rem",
|
|
50342
50352
|
borderRadius: "4px",
|
|
50343
|
-
boxShadow:
|
|
50353
|
+
boxShadow: generateShadows().standard.base,
|
|
50344
50354
|
extraStyles: "\n display: ".concat(toastOpen ? "block" : "none", ";\n position: fixed; bottom: 4rem; left: 4rem;\n ").concat(extraStyles, ";\n cursor: pointer;\n ")
|
|
50345
50355
|
}, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
50346
50356
|
align: "center",
|
|
50347
50357
|
childGap: childGap
|
|
50348
|
-
}, variant ===
|
|
50358
|
+
}, variant === VARIANTS.SUCCESS && /*#__PURE__*/React__default.createElement(SuccessfulIconMedium, null), variant === VARIANTS.ERROR && /*#__PURE__*/React__default.createElement(ErroredIcon, null), /*#__PURE__*/React__default.createElement(Box, {
|
|
50349
50359
|
padding: "1rem 0",
|
|
50350
50360
|
maxWidth: maxWidth
|
|
50351
50361
|
}, /*#__PURE__*/React__default.createElement(Paragraph$1, {
|