@nypl/design-system-react-components 1.2.0-rc-3 → 1.2.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.
@@ -4063,7 +4063,7 @@ var Form = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function (props, ref) {
4063
4063
  }
4064
4064
  });
4065
4065
 
4066
- var _excluded$18 = ["children", "className", "htmlFor", "id", "isInlined", "isRequired"];
4066
+ var _excluded$18 = ["children", "className", "htmlFor", "id", "isInlined", "isRequired", "requiredLabelText"];
4067
4067
  /**
4068
4068
  * A label for form inputs. It should never be used alone.
4069
4069
  */
@@ -4077,6 +4077,7 @@ var Label = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function (props, ref) {
4077
4077
  isInlined = _props$isInlined === void 0 ? false : _props$isInlined,
4078
4078
  _props$isRequired = props.isRequired,
4079
4079
  isRequired = _props$isRequired === void 0 ? false : _props$isRequired,
4080
+ requiredLabelText = props.requiredLabelText,
4080
4081
  rest = _objectWithoutPropertiesLoose(props, _excluded$18);
4081
4082
 
4082
4083
  var styles = useStyleConfig("Label", {
@@ -4094,10 +4095,10 @@ var Label = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function (props, ref) {
4094
4095
  htmlFor: htmlFor,
4095
4096
  ref: ref,
4096
4097
  __css: styles
4097
- }, rest), children, isRequired && React__default.createElement("span", null, " (Required)"));
4098
+ }, rest), children, isRequired && React__default.createElement("span", null, requiredLabelText ? " (" + requiredLabelText + ")" : " (Required)"));
4098
4099
  }));
4099
4100
 
4100
- var _excluded$19 = ["className", "defaultValue", "helperText", "id", "invalidText", "isDisabled", "isInvalid", "isRequired", "labelText", "max", "maxLength", "min", "name", "onChange", "onClick", "onFocus", "placeholder", "showHelperInvalidText", "showLabel", "showRequiredLabel", "step", "textInputType", "type", "value"];
4101
+ var _excluded$19 = ["className", "defaultValue", "helperText", "id", "invalidText", "isDisabled", "isInvalid", "isRequired", "labelText", "max", "maxLength", "min", "name", "onChange", "onClick", "onFocus", "placeholder", "showHelperInvalidText", "showLabel", "showRequiredLabel", "requiredLabelText", "step", "textInputType", "type", "value"];
4101
4102
 
4102
4103
  var TextInputFormats = {
4103
4104
  email: "jdoe@domain.com",
@@ -4141,6 +4142,7 @@ var TextInput = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function (props, re
4141
4142
  showLabel = _props$showLabel === void 0 ? true : _props$showLabel,
4142
4143
  _props$showRequiredLa = props.showRequiredLabel,
4143
4144
  showRequiredLabel = _props$showRequiredLa === void 0 ? true : _props$showRequiredLa,
4145
+ requiredLabelText = props.requiredLabelText,
4144
4146
  _props$step = props.step,
4145
4147
  step = _props$step === void 0 ? 1 : _props$step,
4146
4148
  _props$textInputType = props.textInputType,
@@ -4236,7 +4238,8 @@ var TextInput = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function (props, re
4236
4238
  }, rest), labelText && showLabel && !isHidden && React__default.createElement(Label, {
4237
4239
  htmlFor: id,
4238
4240
  id: id + "-label",
4239
- isRequired: showRequiredLabel && isRequired
4241
+ isRequired: showRequiredLabel && isRequired,
4242
+ requiredLabelText: requiredLabelText
4240
4243
  }, labelText), fieldOutput);
4241
4244
  }));
4242
4245