@transferwise/components 0.0.0-experimental-5a9bfa5 → 0.0.0-experimental-0cfd3cc

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/build/index.js CHANGED
@@ -4883,7 +4883,10 @@ function InlineAlert({
4883
4883
  role: "alert",
4884
4884
  id: id,
4885
4885
  className: classNames__default.default('alert alert-detach', `alert-${danger ? 'danger' : type}`, className),
4886
- children: [danger && /*#__PURE__*/jsxRuntime.jsx(icons.AlertCircle, {}), /*#__PURE__*/jsxRuntime.jsx("div", {
4886
+ children: [type === 'positive' && /*#__PURE__*/jsxRuntime.jsx(icons.CheckCircleFill, {}), type === 'warning' && /*#__PURE__*/jsxRuntime.jsx(StatusIcon, {
4887
+ sentiment: exports.Sentiment.WARNING,
4888
+ size: exports.Size.SMALL
4889
+ }), danger && /*#__PURE__*/jsxRuntime.jsx(icons.CrossCircleFill, {}), /*#__PURE__*/jsxRuntime.jsx("div", {
4887
4890
  children: children
4888
4891
  })]
4889
4892
  });
@@ -4907,10 +4910,14 @@ const Field = ({
4907
4910
  id,
4908
4911
  label,
4909
4912
  hint,
4913
+ success,
4914
+ warning,
4910
4915
  error,
4911
4916
  className,
4912
4917
  children
4913
4918
  }) => {
4919
+ const hasSuccess = Boolean(success);
4920
+ const hasWarning = Boolean(warning);
4914
4921
  const hasError = Boolean(error);
4915
4922
  const hasHint = Boolean(hint) && !hasError;
4916
4923
  const labelId = React.useId();
@@ -4927,6 +4934,8 @@ const Field = ({
4927
4934
  value: hasError,
4928
4935
  children: /*#__PURE__*/jsxRuntime.jsxs("div", {
4929
4936
  className: classNames__default.default('form-group d-block', {
4937
+ 'has-positive': hasSuccess,
4938
+ 'has-warning': hasWarning,
4930
4939
  'has-error': hasError,
4931
4940
  'has-info': hasHint
4932
4941
  }, className),
@@ -4938,6 +4947,14 @@ const Field = ({
4938
4947
  type: exports.Sentiment.NEUTRAL,
4939
4948
  id: descriptionId,
4940
4949
  children: hint
4950
+ }), hasSuccess && /*#__PURE__*/jsxRuntime.jsx(InlineAlert, {
4951
+ type: exports.Sentiment.POSITIVE,
4952
+ id: descriptionId,
4953
+ children: success
4954
+ }), hasWarning && /*#__PURE__*/jsxRuntime.jsx(InlineAlert, {
4955
+ type: exports.Sentiment.WARNING,
4956
+ id: descriptionId,
4957
+ children: warning
4941
4958
  }), hasError && /*#__PURE__*/jsxRuntime.jsx(InlineAlert, {
4942
4959
  type: exports.Sentiment.NEGATIVE,
4943
4960
  id: descriptionId,