@stella-source/stellasource-dsl 1.3.0 → 1.3.2

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/cjs/index.js CHANGED
@@ -21888,7 +21888,8 @@ const PaymentStatusComponent = styled.div `
21888
21888
  gap: 3px;
21889
21889
  font-family: "Inter", sans-serif;
21890
21890
  font-weight: 500;
21891
- font-size: 16px;
21891
+ font-size: 12px;
21892
+ color: var(--charcoal);
21892
21893
  `;
21893
21894
  const PaymentStatusIcon = styled(StellaIcon) `
21894
21895
  flex-shrink: 0;
@@ -21897,21 +21898,39 @@ const PaymentStatusLabel = styled.span `
21897
21898
  line-height: 20px;
21898
21899
  `;
21899
21900
 
21901
+ var PaymentStatusVariant;
21902
+ (function (PaymentStatusVariant) {
21903
+ PaymentStatusVariant["PAYMENT_PENDING"] = "PaymentPending";
21904
+ PaymentStatusVariant["TERMS_APPLIED"] = "TermsApplied";
21905
+ PaymentStatusVariant["PAYMENT_AUTHORIZED"] = "PaymentAuthorized";
21906
+ PaymentStatusVariant["PAYMENT_PROCESSING"] = "PaymentProcessing";
21907
+ PaymentStatusVariant["PAYMENT_SETTLED"] = "PaymentSettled";
21908
+ PaymentStatusVariant["PAYMENT_FAILED"] = "PaymentFailed";
21909
+ PaymentStatusVariant["PAYMENT_CANCELED"] = "PaymentCanceled";
21910
+ PaymentStatusVariant["PAYMENT_WINDOW_EXPIRED"] = "PaymentWindowExpired";
21911
+ })(PaymentStatusVariant || (PaymentStatusVariant = {}));
21912
+
21900
21913
  const STATUS_ICON_MAP = {
21901
- "Payment Required": "warning",
21902
- "Terms Applied": "check-square",
21903
- "Payment Authorized": "check-square",
21904
- "Payment Processing": "money",
21905
- Paid: "currency-dollar",
21906
- "Payment Failed": "x-circle",
21907
- Canceled: "empty",
21908
- "Payment Window Expired": "hourglass-simple-low",
21914
+ PaymentPending: "warning",
21915
+ TermsApplied: "check-square",
21916
+ PaymentAuthorized: "check-square",
21917
+ PaymentProcessing: "money",
21918
+ PaymentSettled: "currency-dollar",
21919
+ PaymentFailed: "x-circle",
21920
+ PaymentCanceled: "empty",
21921
+ PaymentWindowExpired: "hourglass-simple-low",
21909
21922
  };
21910
21923
  const PaymentStatus = ({ variant, id, className }) => {
21911
- const iconName = STATUS_ICON_MAP[variant];
21924
+ const iconName = variant ? STATUS_ICON_MAP[variant] : "";
21925
+ const labelWords = variant?.split(/(?=[A-Z])/);
21926
+ let label = labelWords ? labelWords.join(" ") : "--";
21927
+ if (variant === PaymentStatusVariant.PAYMENT_SETTLED)
21928
+ label = "Paid";
21929
+ if (variant === PaymentStatusVariant.PAYMENT_CANCELED)
21930
+ label = "Canceled";
21912
21931
  return (a$l.createElement(PaymentStatusComponent, { id: id, className: className },
21913
- a$l.createElement(PaymentStatusIcon, { iconName: iconName }),
21914
- a$l.createElement(PaymentStatusLabel, null, variant)));
21932
+ iconName ? a$l.createElement(PaymentStatusIcon, { iconName: iconName, size: 16 }) : "",
21933
+ a$l.createElement(PaymentStatusLabel, null, label)));
21915
21934
  };
21916
21935
 
21917
21936
  exports.HelperText = HelperText;