@thecb/components 10.11.1 → 10.11.2-beta.0
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 +6 -0
- 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-layouts/FormInput.js +6 -4
- package/src/components/atoms/form-layouts/FormInput.stories.js +33 -0
- package/src/components/atoms/form-layouts/index.d.ts +5 -0
- package/src/components/molecules/radio-group/RadioGroup.js +8 -3
- package/src/components/molecules/radio-group/RadioGroup.stories.js +1 -0
- package/src/components/molecules/radio-group/index.d.ts +1 -0
- package/src/components/atoms/.DS_Store +0 -0
package/dist/index.cjs.js
CHANGED
|
@@ -27237,7 +27237,7 @@ var fallbackValues$n = {
|
|
|
27237
27237
|
};
|
|
27238
27238
|
|
|
27239
27239
|
var _excluded$v = ["showErrors", "themeValues"],
|
|
27240
|
-
_excluded2 = ["type", "labelTextWhenNoError", "errorMessages", "isNum", "isEmail", "helperModal", "field", "fieldActions", "showErrors", "formatter", "decorator", "themeValues", "background", "customHeight", "autocompleteValue", "extraStyles", "removeFromValue", "dataQa", "isRequired", "errorFieldExtraStyles", "showFieldErrorRow"];
|
|
27240
|
+
_excluded2 = ["type", "labelTextWhenNoError", "errorMessages", "isNum", "isEmail", "helperModal", "field", "fieldActions", "showErrors", "formatter", "decorator", "themeValues", "background", "customHeight", "autocompleteValue", "extraStyles", "removeFromValue", "dataQa", "isRequired", "errorFieldExtraStyles", "showFieldErrorRow", "labelTextVariant", "errorTextVariant"];
|
|
27241
27241
|
var InputField = styled__default.input.withConfig({
|
|
27242
27242
|
displayName: "FormInput__InputField",
|
|
27243
27243
|
componentId: "sc-l094r1-0"
|
|
@@ -27328,6 +27328,10 @@ var FormInput = function FormInput(_ref15) {
|
|
|
27328
27328
|
errorFieldExtraStyles = _ref15.errorFieldExtraStyles,
|
|
27329
27329
|
_ref15$showFieldError = _ref15.showFieldErrorRow,
|
|
27330
27330
|
showFieldErrorRow = _ref15$showFieldError === void 0 ? true : _ref15$showFieldError,
|
|
27331
|
+
_ref15$labelTextVaria = _ref15.labelTextVariant,
|
|
27332
|
+
labelTextVariant = _ref15$labelTextVaria === void 0 ? "pS" : _ref15$labelTextVaria,
|
|
27333
|
+
_ref15$errorTextVaria = _ref15.errorTextVariant,
|
|
27334
|
+
errorTextVariant = _ref15$errorTextVaria === void 0 ? "pXS" : _ref15$errorTextVaria,
|
|
27331
27335
|
props = _objectWithoutProperties(_ref15, _excluded2);
|
|
27332
27336
|
var _useState = React.useState(false),
|
|
27333
27337
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -27362,7 +27366,7 @@ var FormInput = function FormInput(_ref15) {
|
|
|
27362
27366
|
}, /*#__PURE__*/React__default.createElement(Text$1, {
|
|
27363
27367
|
as: "label",
|
|
27364
27368
|
color: themeValues.labelColor,
|
|
27365
|
-
variant:
|
|
27369
|
+
variant: labelTextVariant,
|
|
27366
27370
|
weight: themeValues.fontWeight,
|
|
27367
27371
|
extraStyles: "word-break: break-word;\n font-family: Public Sans;\n &::first-letter {\n text-transform: uppercase;\n }",
|
|
27368
27372
|
id: createIdFromString(labelTextWhenNoError)
|
|
@@ -27375,12 +27379,12 @@ var FormInput = function FormInput(_ref15) {
|
|
|
27375
27379
|
}, /*#__PURE__*/React__default.createElement(Text$1, {
|
|
27376
27380
|
as: "label",
|
|
27377
27381
|
color: themeValues.labelColor,
|
|
27378
|
-
variant:
|
|
27382
|
+
variant: labelTextVariant,
|
|
27379
27383
|
fontWeight: themeValues.fontWeight,
|
|
27380
27384
|
extraStyles: "word-break: break-word;\n font-family: Public Sans;\n &::first-letter {\n text-transform: uppercase;\n }",
|
|
27381
27385
|
id: createIdFromString(labelTextWhenNoError)
|
|
27382
27386
|
}, labelTextWhenNoError), type === "password" && /*#__PURE__*/React__default.createElement(Text$1, {
|
|
27383
|
-
variant:
|
|
27387
|
+
variant: labelTextVariant,
|
|
27384
27388
|
color: themeValues.linkColor,
|
|
27385
27389
|
weight: themeValues.fontWeight,
|
|
27386
27390
|
hoverStyles: themeValues.hoverFocusStyles,
|
|
@@ -27460,7 +27464,7 @@ var FormInput = function FormInput(_ref15) {
|
|
|
27460
27464
|
"aria-atomic": true
|
|
27461
27465
|
}, field.hasErrors && field.dirty || field.hasErrors && showErrors ? /*#__PURE__*/React__default.createElement(Text$1, {
|
|
27462
27466
|
color: ERROR_COLOR,
|
|
27463
|
-
variant:
|
|
27467
|
+
variant: errorTextVariant,
|
|
27464
27468
|
weight: themeValues.fontWeight,
|
|
27465
27469
|
extraStyles: "word-break: break-word;\n font-family: Public Sans;\n &::first-letter {\n text-transform: uppercase;\n }\n ".concat(errorFieldExtraStyles, ";"),
|
|
27466
27470
|
id: createIdFromString(labelTextWhenNoError, "error message")
|
|
@@ -49202,27 +49206,33 @@ PhoneForm.mapDispatchToProps = mapDispatchToProps$8;
|
|
|
49202
49206
|
var DefaultHeading = styled__default.div.withConfig({
|
|
49203
49207
|
displayName: "RadioGroup__DefaultHeading",
|
|
49204
49208
|
componentId: "sc-7lqrl8-0"
|
|
49205
|
-
})(["
|
|
49209
|
+
})(["", " color:", ";margin:0;padding:8px 0px;"], function (_ref) {
|
|
49210
|
+
var fontSize = _ref.fontSize;
|
|
49211
|
+
return "font-size: ".concat(fontSize, ";");
|
|
49212
|
+
}, CHARADE_GREY);
|
|
49206
49213
|
var StyledFieldset = styled__default.fieldset.withConfig({
|
|
49207
49214
|
displayName: "RadioGroup__StyledFieldset",
|
|
49208
49215
|
componentId: "sc-7lqrl8-1"
|
|
49209
49216
|
})(["", ""], function (props) {
|
|
49210
49217
|
return props.$extraStyles;
|
|
49211
49218
|
});
|
|
49212
|
-
var RadioGroup = function RadioGroup(
|
|
49213
|
-
var headingText =
|
|
49214
|
-
groupName =
|
|
49215
|
-
|
|
49216
|
-
|
|
49219
|
+
var RadioGroup = function RadioGroup(_ref2) {
|
|
49220
|
+
var headingText = _ref2.headingText,
|
|
49221
|
+
groupName = _ref2.groupName,
|
|
49222
|
+
_ref2$headingFontSize = _ref2.headingFontSize,
|
|
49223
|
+
headingFontSize = _ref2$headingFontSize === void 0 ? "0.875rem" : _ref2$headingFontSize,
|
|
49224
|
+
_ref2$heading = _ref2.heading,
|
|
49225
|
+
Heading = _ref2$heading === void 0 ? /*#__PURE__*/React__default.createElement(DefaultHeading, {
|
|
49217
49226
|
role: "heading",
|
|
49218
|
-
id: "radio-group-".concat(groupName, "-heading")
|
|
49219
|
-
|
|
49220
|
-
|
|
49221
|
-
|
|
49222
|
-
|
|
49223
|
-
handleChange =
|
|
49224
|
-
|
|
49225
|
-
|
|
49227
|
+
id: "radio-group-".concat(groupName, "-heading"),
|
|
49228
|
+
fontSize: headingFontSize
|
|
49229
|
+
}, headingText) : _ref2$heading,
|
|
49230
|
+
config = _ref2.config,
|
|
49231
|
+
extraStyles = _ref2.extraStyles,
|
|
49232
|
+
_ref2$handleChange = _ref2.handleChange,
|
|
49233
|
+
handleChange = _ref2$handleChange === void 0 ? noop : _ref2$handleChange,
|
|
49234
|
+
field = _ref2.field,
|
|
49235
|
+
fieldActions = _ref2.fieldActions;
|
|
49226
49236
|
var setValue = function setValue(value) {
|
|
49227
49237
|
return fieldActions.set(value);
|
|
49228
49238
|
};
|