@oatfi/ui 0.6.0 → 0.8.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 +177 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +111 -8
- package/dist/index.esm.js +173 -4
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Theme as Theme$1 } from '@mui/material/styles';
|
|
2
2
|
import * as react from 'react';
|
|
3
|
-
import react__default from 'react';
|
|
3
|
+
import react__default, { FC } from 'react';
|
|
4
4
|
import * as styled_components_dist_types from 'styled-components/dist/types';
|
|
5
5
|
import * as styled_components from 'styled-components';
|
|
6
6
|
|
|
@@ -646,12 +646,20 @@ declare const HelperText: styled_components_dist_types.IStyledComponentBase<"web
|
|
|
646
646
|
* Underwriting outcomes as the API reports them.
|
|
647
647
|
*
|
|
648
648
|
* The declined set is deliberately wide: `CLOSED_NO_DECISION`, `DECLINED`,
|
|
649
|
-
* `DENIED`, `ERROR`, `N/A` and `REJECTED` all mean "no"
|
|
650
|
-
* shown identically. Anything unrecognised — including
|
|
651
|
-
* `NOT_EXECUTED` and `null` — falls through to the manual-review
|
|
652
|
-
* than showing nothing, because an unknown status must never read
|
|
649
|
+
* `DENIED`, `ERROR`, `MANUAL_REVIEW_DECLINED`, `N/A` and `REJECTED` all mean "no"
|
|
650
|
+
* to a borrower and are shown identically. Anything unrecognised — including
|
|
651
|
+
* `MANUAL_REVIEW`, `NOT_EXECUTED` and `null` — falls through to the manual-review
|
|
652
|
+
* message rather than showing nothing, because an unknown status must never read
|
|
653
|
+
* as approval.
|
|
653
654
|
*/
|
|
654
|
-
type UnderwritingDecision = 'PROCESSING' | 'APPROVED' | 'MANUAL_REVIEW' | 'NOT_EXECUTED' | 'CLOSED_NO_DECISION' | 'DECLINED' | 'DENIED' | 'ERROR' | 'N/A' | 'REJECTED';
|
|
655
|
+
type UnderwritingDecision = 'PROCESSING' | 'APPROVED' | 'MANUAL_REVIEW' | 'MANUAL_REVIEW_DECLINED' | 'NOT_EXECUTED' | 'CLOSED_NO_DECISION' | 'DECLINED' | 'DENIED' | 'ERROR' | 'N/A' | 'REJECTED';
|
|
656
|
+
/** How a borrower-facing surface should present an underwriting status. */
|
|
657
|
+
type UnderwritingOutcome = 'processing' | 'approved' | 'declined' | 'review';
|
|
658
|
+
/**
|
|
659
|
+
* The grouping `UnderwritingStatus` renders by, exported so other surfaces (the
|
|
660
|
+
* servicing status summary) cannot drift from it. Unknown statuses are `review`.
|
|
661
|
+
*/
|
|
662
|
+
declare function classifyUnderwritingStatus(status?: string | null): UnderwritingOutcome;
|
|
655
663
|
interface UnderwritingStatusProps {
|
|
656
664
|
status?: string | null;
|
|
657
665
|
/**
|
|
@@ -811,6 +819,28 @@ interface AchVerificationConsentProps {
|
|
|
811
819
|
*/
|
|
812
820
|
declare function AchVerificationConsent({ consentGiven, onChange, disabled, actionLabel, testId, }: AchVerificationConsentProps): react__default.JSX.Element;
|
|
813
821
|
|
|
822
|
+
interface EnvironmentTagProps {
|
|
823
|
+
/** The Vercel project the bundle was built for (`OATFI_ENV`), `local` under a dev server. */
|
|
824
|
+
bundleEnv?: string;
|
|
825
|
+
/** The host's `environment` attribute. */
|
|
826
|
+
apiEnv?: string;
|
|
827
|
+
/** Git ref the bundle was built from, for the tooltip. */
|
|
828
|
+
buildRef?: string;
|
|
829
|
+
/** Short commit SHA, for the tooltip. */
|
|
830
|
+
buildSha?: string;
|
|
831
|
+
size?: 'small' | 'medium';
|
|
832
|
+
/** `data-testid` on the chip. Override when several embeds share a page. */
|
|
833
|
+
testId?: string;
|
|
834
|
+
}
|
|
835
|
+
/**
|
|
836
|
+
* The environment chip for embedded components. Shows which API the component
|
|
837
|
+
* calls and, when it differs, which Vercel project the bundle came from:
|
|
838
|
+
* `DEV` on a match, `LOCAL | API DEV` for a local dev server, `BUNDLE DEV | API STG`
|
|
839
|
+
* (red-bordered) on a mismatch, a red `API ?` for an unrecognised API env, and
|
|
840
|
+
* nothing in production/production. See `resolveComponentEnvTag` for the rules.
|
|
841
|
+
*/
|
|
842
|
+
declare const EnvironmentTag: FC<EnvironmentTagProps>;
|
|
843
|
+
|
|
814
844
|
interface PreviewProps {
|
|
815
845
|
/** Partner branding to render the sample with. Omit for the default theme. */
|
|
816
846
|
branding?: Branding;
|
|
@@ -824,5 +854,78 @@ interface PreviewProps {
|
|
|
824
854
|
*/
|
|
825
855
|
declare function Preview({ branding, className }: PreviewProps): react__default.JSX.Element;
|
|
826
856
|
|
|
827
|
-
|
|
828
|
-
|
|
857
|
+
/**
|
|
858
|
+
* Environment chip logic for embedded components. Framework-free so the
|
|
859
|
+
* React-18 bundle (`mf-remote-react`), which can't take this package, can copy
|
|
860
|
+
* it verbatim.
|
|
861
|
+
*
|
|
862
|
+
* Ported from `oatfi-app-shell/src/lib/environment.ts`. The difference: a
|
|
863
|
+
* dashboard has one environment, a component has two — the Vercel project the
|
|
864
|
+
* bundle was built for (`bundleEnv`) and the API the host points it at
|
|
865
|
+
* (`apiEnv`, the `environment` attribute). They render as one chip that splits
|
|
866
|
+
* when they disagree.
|
|
867
|
+
*/
|
|
868
|
+
type EnvironmentName = 'production' | 'staging' | 'qa' | 'development' | 'local';
|
|
869
|
+
interface EnvironmentTagInfo {
|
|
870
|
+
/** Short chip text, e.g. "STG". */
|
|
871
|
+
readonly label: string;
|
|
872
|
+
/** Full name, for the tooltip. */
|
|
873
|
+
readonly name: string;
|
|
874
|
+
/** Chip fill. */
|
|
875
|
+
readonly fill: string;
|
|
876
|
+
/** Text color on the fill. */
|
|
877
|
+
readonly ink: string;
|
|
878
|
+
}
|
|
879
|
+
type ComponentEnvTag =
|
|
880
|
+
/** Bundle and API agree (or the bundle env is unset). */
|
|
881
|
+
{
|
|
882
|
+
kind: 'single';
|
|
883
|
+
tag: EnvironmentTagInfo;
|
|
884
|
+
}
|
|
885
|
+
/** A local dev-server bundle on a non-prod API: informational, not a warning. */
|
|
886
|
+
| {
|
|
887
|
+
kind: 'local';
|
|
888
|
+
api: EnvironmentTagInfo;
|
|
889
|
+
}
|
|
890
|
+
/** Bundle and API disagree, or the bundle env is unrecognised (`bundleEnv: null`): a warning. */
|
|
891
|
+
| {
|
|
892
|
+
kind: 'split';
|
|
893
|
+
bundleEnv: EnvironmentName | null;
|
|
894
|
+
bundle: EnvironmentTagInfo;
|
|
895
|
+
api: EnvironmentTagInfo;
|
|
896
|
+
}
|
|
897
|
+
/** The API env is set but unrecognised, so the component calls the wrong API (or none). */
|
|
898
|
+
| {
|
|
899
|
+
kind: 'invalid-api';
|
|
900
|
+
apiEnv: string;
|
|
901
|
+
};
|
|
902
|
+
interface ComponentEnv {
|
|
903
|
+
/** The Vercel project the bundle was built for (`OATFI_ENV`), `local` under a dev server. */
|
|
904
|
+
bundleEnv?: string | null;
|
|
905
|
+
/** The host's `environment` attribute — which API the component calls. */
|
|
906
|
+
apiEnv?: string | null;
|
|
907
|
+
}
|
|
908
|
+
/**
|
|
909
|
+
* What the chip shows. Unset envs stay quiet; set-but-unrecognised ones are flagged:
|
|
910
|
+
* - API env unset → nothing (it means production)
|
|
911
|
+
* - API env unrecognised → `invalid-api`, an error (the host is calling the wrong API)
|
|
912
|
+
* - bundle env unset → treated as a match on the API env
|
|
913
|
+
* - bundle env unrecognised → a warning split against the API env
|
|
914
|
+
* - local bundle → informational `LOCAL | API X` on a non-prod API, a single `LOCAL` on
|
|
915
|
+
* the local API, and a warning against prod
|
|
916
|
+
* - prod/prod → nothing
|
|
917
|
+
*/
|
|
918
|
+
declare const resolveComponentEnvTag: ({ bundleEnv, apiEnv, }: ComponentEnv) => ComponentEnvTag | null;
|
|
919
|
+
interface ComponentBuildInfo extends ComponentEnv {
|
|
920
|
+
/** Git ref the bundle was built from, e.g. `dev12` or `v1.4.0`. */
|
|
921
|
+
ref?: string | null;
|
|
922
|
+
/** Short commit SHA. */
|
|
923
|
+
sha?: string | null;
|
|
924
|
+
}
|
|
925
|
+
/** One-line debug string for the console: `bundle=development api=staging ref=dev12 sha=abc1234`. */
|
|
926
|
+
declare const describeComponentEnv: ({ bundleEnv, apiEnv, ref, sha }: ComponentBuildInfo) => string;
|
|
927
|
+
/** Tooltip text: `Bundle: Development (dev12, abc1234) · API: Staging`. */
|
|
928
|
+
declare const describeComponentEnvTitle: ({ bundleEnv, apiEnv, ref, sha, }: ComponentBuildInfo) => string;
|
|
929
|
+
|
|
930
|
+
export { AchVerificationConsent, AsteriskMark, AsteriskNote, AutocompleteInput, Badge, Banner, BaseInput, Body100, Body200, Body400, Button, ButtonContainer, CheckboxInput, CollapsibleSource, Container, Content, CurrencyInput, DateInput, DetailElement, DetailRow, DetailsContainer, DotsMenu, DropDown, DropdownContainer, DropdownItem, DropdownList, EmailInput, EnvironmentTag, FieldsGrid, FileInput, FlexColumnWrapper, FlexRowWrapper, FooterActions, FooterRight, Footnote, Form, FormActions, FormCheckboxLabel, FormColumn, FormRow, FormSubtitle, FormTitle, H1, H2, H3, HelperText, InputError, InputLabel, InputWrapper, Loader, ManualMethodCard, MethodBody, MethodCard, MethodHeader, MethodTitle, NoResults, PhoneInput, PlaidMethodCard, PlaidTile, Preview, RadioInput, SSNInput, SearchDropdown, SelectInput, StatusTag, Stepper, Tabs, TaxIdInput, TermsDocument, TermsList, TextInput, ThemeProvider, UnderwritingStatus, UploadZone, buildMuiTheme, classifyUnderwritingStatus, defaultTheme, describeComponentEnv, describeComponentEnvTitle, mergeBranding, resolveComponentEnvTag, useTheme };
|
|
931
|
+
export type { AchVerificationConsentProps, BadgeVariant, Branding, CollapsibleSourceProps, ComponentBuildInfo, ComponentEnv, ComponentEnvTag, CurrencyInputProps, DateInputProps, DotsMenuOption, DotsMenuProps, DropDownProps, EmailInputProps, EnvironmentName, EnvironmentTagInfo, EnvironmentTagProps, FileInputProps, FootnoteLink, FootnoteProps, LoaderProps, ManualMethodCardProps, ManualMethodStatus, ManualMethodValue, Option, PhoneInputProps, PlaidConnection, PlaidMethodCardProps, PlaidTileProps, PreviewProps, SSNInputProps, SearchDropdownProps, StepperProps, StepperStep, Tab, TabsProps, TaxIdInputProps, TermsDocumentProps, TextInputProps, Theme, ThemeBorder, ThemeColors, ThemeProviderProps, ThemeTypography, UnderwritingDecision, UnderwritingOutcome, UnderwritingStatusProps, UploadZoneProps, UploadedFile };
|
package/dist/index.esm.js
CHANGED
|
@@ -2043,16 +2043,24 @@ const DECLINED = /* @__PURE__ */ new Set([
|
|
|
2043
2043
|
"DECLINED",
|
|
2044
2044
|
"DENIED",
|
|
2045
2045
|
"ERROR",
|
|
2046
|
+
"MANUAL_REVIEW_DECLINED",
|
|
2046
2047
|
"N/A",
|
|
2047
2048
|
"REJECTED"
|
|
2048
2049
|
]);
|
|
2050
|
+
function classifyUnderwritingStatus(status) {
|
|
2051
|
+
if (status === "PROCESSING") return "processing";
|
|
2052
|
+
if (status === "APPROVED") return "approved";
|
|
2053
|
+
if (status && DECLINED.has(status)) return "declined";
|
|
2054
|
+
return "review";
|
|
2055
|
+
}
|
|
2049
2056
|
function UnderwritingStatus({
|
|
2050
2057
|
status,
|
|
2051
2058
|
creditLimit,
|
|
2052
2059
|
children,
|
|
2053
2060
|
testId
|
|
2054
2061
|
}) {
|
|
2055
|
-
|
|
2062
|
+
const outcome = classifyUnderwritingStatus(status);
|
|
2063
|
+
if (outcome === "processing") {
|
|
2056
2064
|
return /* @__PURE__ */ jsxs("div", { "data-testid": testId, children: [
|
|
2057
2065
|
/* @__PURE__ */ jsx(H3, { children: "Your application is being reviewed" }),
|
|
2058
2066
|
/* @__PURE__ */ jsxs(Stack, { width: "100%", alignItems: "center", gap: "16px", children: [
|
|
@@ -2061,7 +2069,7 @@ function UnderwritingStatus({
|
|
|
2061
2069
|
] })
|
|
2062
2070
|
] });
|
|
2063
2071
|
}
|
|
2064
|
-
if (
|
|
2072
|
+
if (outcome === "approved") {
|
|
2065
2073
|
return /* @__PURE__ */ jsxs("div", { "data-testid": testId, children: [
|
|
2066
2074
|
/* @__PURE__ */ jsx(H3, { children: "Congrats!" }),
|
|
2067
2075
|
/* @__PURE__ */ jsxs(Body200, { children: [
|
|
@@ -2075,7 +2083,7 @@ function UnderwritingStatus({
|
|
|
2075
2083
|
children
|
|
2076
2084
|
] });
|
|
2077
2085
|
}
|
|
2078
|
-
if (
|
|
2086
|
+
if (outcome === "declined") {
|
|
2079
2087
|
return /* @__PURE__ */ jsxs("div", { "data-testid": testId, children: [
|
|
2080
2088
|
/* @__PURE__ */ jsx(H3, { children: "Sorry, we cannot approve your application" }),
|
|
2081
2089
|
/* @__PURE__ */ jsx(Body200, { children: "We are sorry to inform you that we cannot approve your application. Please try again later." })
|
|
@@ -2365,6 +2373,167 @@ function AchVerificationConsent({
|
|
|
2365
2373
|
] });
|
|
2366
2374
|
}
|
|
2367
2375
|
|
|
2376
|
+
const AMBER = "#F59E0B";
|
|
2377
|
+
const CYAN = "#22D3EE";
|
|
2378
|
+
const GREY = "#9CA3AF";
|
|
2379
|
+
const GREEN = "#22C55E";
|
|
2380
|
+
const WHITE = "#FFFFFF";
|
|
2381
|
+
const INK = "#141312";
|
|
2382
|
+
const RED = "#DC2626";
|
|
2383
|
+
const ENVIRONMENT_MISMATCH_BORDER = RED;
|
|
2384
|
+
const ENVIRONMENT_TAGS = Object.freeze({
|
|
2385
|
+
production: Object.freeze({ label: "PROD", name: "Production", fill: WHITE, ink: INK }),
|
|
2386
|
+
staging: Object.freeze({ label: "STG", name: "Staging", fill: AMBER, ink: INK }),
|
|
2387
|
+
qa: Object.freeze({ label: "QA", name: "QA", fill: CYAN, ink: INK }),
|
|
2388
|
+
development: Object.freeze({ label: "DEV", name: "Development", fill: GREY, ink: INK }),
|
|
2389
|
+
local: Object.freeze({ label: "LOCAL", name: "Local", fill: GREEN, ink: INK })
|
|
2390
|
+
});
|
|
2391
|
+
const UNKNOWN_ENVIRONMENT_TAG = Object.freeze({
|
|
2392
|
+
label: "?",
|
|
2393
|
+
name: "Unknown",
|
|
2394
|
+
fill: WHITE,
|
|
2395
|
+
ink: INK
|
|
2396
|
+
});
|
|
2397
|
+
const INVALID_API_TAG = Object.freeze({
|
|
2398
|
+
label: "?",
|
|
2399
|
+
name: "Unknown",
|
|
2400
|
+
fill: RED,
|
|
2401
|
+
ink: WHITE
|
|
2402
|
+
});
|
|
2403
|
+
const ALIASES = /* @__PURE__ */ new Map([
|
|
2404
|
+
["production", "production"],
|
|
2405
|
+
["prod", "production"],
|
|
2406
|
+
["staging", "staging"],
|
|
2407
|
+
["stg", "staging"],
|
|
2408
|
+
["qa", "qa"],
|
|
2409
|
+
["development", "development"],
|
|
2410
|
+
["dev", "development"],
|
|
2411
|
+
["local", "local"]
|
|
2412
|
+
]);
|
|
2413
|
+
const normalizeEnvironment = (value) => {
|
|
2414
|
+
const key = value?.trim().toLowerCase();
|
|
2415
|
+
return key && ALIASES.get(key) || null;
|
|
2416
|
+
};
|
|
2417
|
+
const resolveComponentEnvTag = ({
|
|
2418
|
+
bundleEnv,
|
|
2419
|
+
apiEnv
|
|
2420
|
+
}) => {
|
|
2421
|
+
const apiValue = apiEnv?.trim();
|
|
2422
|
+
if (!apiValue) return null;
|
|
2423
|
+
const api = normalizeEnvironment(apiValue);
|
|
2424
|
+
if (!api) return { kind: "invalid-api", apiEnv: apiValue };
|
|
2425
|
+
const bundleValue = bundleEnv?.trim();
|
|
2426
|
+
const bundle = normalizeEnvironment(bundleValue);
|
|
2427
|
+
const apiTag = ENVIRONMENT_TAGS[api];
|
|
2428
|
+
if (bundleValue && !bundle) {
|
|
2429
|
+
return { kind: "split", bundleEnv: null, bundle: UNKNOWN_ENVIRONMENT_TAG, api: apiTag };
|
|
2430
|
+
}
|
|
2431
|
+
if (bundle === "local" && api !== "local" && api !== "production") {
|
|
2432
|
+
return { kind: "local", api: apiTag };
|
|
2433
|
+
}
|
|
2434
|
+
if (bundle && bundle !== api) {
|
|
2435
|
+
return { kind: "split", bundleEnv: bundle, bundle: ENVIRONMENT_TAGS[bundle], api: apiTag };
|
|
2436
|
+
}
|
|
2437
|
+
if (api === "production") return null;
|
|
2438
|
+
return { kind: "single", tag: apiTag };
|
|
2439
|
+
};
|
|
2440
|
+
const environmentDebug = (value) => {
|
|
2441
|
+
const env = normalizeEnvironment(value);
|
|
2442
|
+
if (env) return env;
|
|
2443
|
+
const raw = value?.trim();
|
|
2444
|
+
return raw ? `unrecognised:${raw}` : "unknown";
|
|
2445
|
+
};
|
|
2446
|
+
const describeComponentEnv = ({ bundleEnv, apiEnv, ref, sha }) => [
|
|
2447
|
+
`bundle=${environmentDebug(bundleEnv)}`,
|
|
2448
|
+
`api=${environmentDebug(apiEnv)}`,
|
|
2449
|
+
`ref=${ref || "unknown"}`,
|
|
2450
|
+
`sha=${sha || "unknown"}`
|
|
2451
|
+
].join(" ");
|
|
2452
|
+
const environmentTitle = (value) => {
|
|
2453
|
+
const env = normalizeEnvironment(value);
|
|
2454
|
+
if (env) return ENVIRONMENT_TAGS[env].name;
|
|
2455
|
+
const raw = value?.trim();
|
|
2456
|
+
return raw ? `Unrecognised "${raw}"` : "Unknown";
|
|
2457
|
+
};
|
|
2458
|
+
const describeComponentEnvTitle = ({
|
|
2459
|
+
bundleEnv,
|
|
2460
|
+
apiEnv,
|
|
2461
|
+
ref,
|
|
2462
|
+
sha
|
|
2463
|
+
}) => {
|
|
2464
|
+
const build = [ref, sha].filter(Boolean).join(", ");
|
|
2465
|
+
return `Bundle: ${environmentTitle(bundleEnv)}${build ? ` (${build})` : ""} \xB7 API: ${environmentTitle(apiEnv)}`;
|
|
2466
|
+
};
|
|
2467
|
+
|
|
2468
|
+
const FONT_SIZE = { small: 9, medium: 11 };
|
|
2469
|
+
const PADDING_X = { small: 6, medium: 8 };
|
|
2470
|
+
const FONT_FAMILY = 'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif';
|
|
2471
|
+
const BORDER_WIDTH = 1.5;
|
|
2472
|
+
const base = (size) => ({
|
|
2473
|
+
display: "inline-flex",
|
|
2474
|
+
alignItems: "stretch",
|
|
2475
|
+
boxSizing: "border-box",
|
|
2476
|
+
fontFamily: FONT_FAMILY,
|
|
2477
|
+
fontSize: FONT_SIZE[size],
|
|
2478
|
+
fontWeight: 800,
|
|
2479
|
+
letterSpacing: "0.1em",
|
|
2480
|
+
lineHeight: 1.4,
|
|
2481
|
+
whiteSpace: "nowrap",
|
|
2482
|
+
borderRadius: 0
|
|
2483
|
+
});
|
|
2484
|
+
const half = (tag, label, size) => /* @__PURE__ */ jsx("span", { style: { padding: `2px ${PADDING_X[size]}px`, background: tag.fill, color: tag.ink }, children: label });
|
|
2485
|
+
const EnvironmentTag = ({
|
|
2486
|
+
bundleEnv,
|
|
2487
|
+
apiEnv,
|
|
2488
|
+
buildRef,
|
|
2489
|
+
buildSha,
|
|
2490
|
+
size = "small",
|
|
2491
|
+
testId = "oatfi-env-tag"
|
|
2492
|
+
}) => {
|
|
2493
|
+
const result = resolveComponentEnvTag({ bundleEnv, apiEnv });
|
|
2494
|
+
if (!result) return null;
|
|
2495
|
+
const title = describeComponentEnvTitle({ bundleEnv, apiEnv, ref: buildRef, sha: buildSha });
|
|
2496
|
+
const chip = (border, children) => /* @__PURE__ */ jsx(
|
|
2497
|
+
"span",
|
|
2498
|
+
{
|
|
2499
|
+
role: "note",
|
|
2500
|
+
"aria-label": `Environment: ${title}`,
|
|
2501
|
+
"data-testid": testId,
|
|
2502
|
+
"data-env-kind": result.kind,
|
|
2503
|
+
title,
|
|
2504
|
+
style: { ...base(size), border: `${BORDER_WIDTH}px solid ${border}` },
|
|
2505
|
+
children
|
|
2506
|
+
}
|
|
2507
|
+
);
|
|
2508
|
+
switch (result.kind) {
|
|
2509
|
+
case "single":
|
|
2510
|
+
return chip(result.tag.fill, half(result.tag, result.tag.label, size));
|
|
2511
|
+
case "local":
|
|
2512
|
+
return chip(
|
|
2513
|
+
ENVIRONMENT_TAGS.local.fill,
|
|
2514
|
+
/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2515
|
+
half(ENVIRONMENT_TAGS.local, ENVIRONMENT_TAGS.local.label, size),
|
|
2516
|
+
half(result.api, `API ${result.api.label}`, size)
|
|
2517
|
+
] })
|
|
2518
|
+
);
|
|
2519
|
+
case "invalid-api":
|
|
2520
|
+
return chip(
|
|
2521
|
+
INVALID_API_TAG.fill,
|
|
2522
|
+
half(INVALID_API_TAG, `API ${INVALID_API_TAG.label}`, size)
|
|
2523
|
+
);
|
|
2524
|
+
case "split": {
|
|
2525
|
+
const bundleLabel = result.bundleEnv === "local" ? "LOCAL" : `BUNDLE ${result.bundle.label}`;
|
|
2526
|
+
return chip(
|
|
2527
|
+
ENVIRONMENT_MISMATCH_BORDER,
|
|
2528
|
+
/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2529
|
+
half(result.bundle, bundleLabel, size),
|
|
2530
|
+
half(result.api, `API ${result.api.label}`, size)
|
|
2531
|
+
] })
|
|
2532
|
+
);
|
|
2533
|
+
}
|
|
2534
|
+
}
|
|
2535
|
+
};
|
|
2536
|
+
|
|
2368
2537
|
const PreviewCard = styled.div`
|
|
2369
2538
|
display: flex;
|
|
2370
2539
|
gap: 2rem;
|
|
@@ -2436,5 +2605,5 @@ function Preview({ branding, className }) {
|
|
|
2436
2605
|
return /* @__PURE__ */ jsx(ThemeProvider, { branding, children: /* @__PURE__ */ jsx("div", { className, children: /* @__PURE__ */ jsx(PreviewContent, {}) }) });
|
|
2437
2606
|
}
|
|
2438
2607
|
|
|
2439
|
-
export { AchVerificationConsent, AsteriskMark, AsteriskNote, AutocompleteInput, Badge, Banner, BaseInput, Body100, Body200, Body400, Button, ButtonContainer, CheckboxInput, CollapsibleSource, Container, Content$1 as Content, CurrencyInput, DateInput, DetailElement, DetailRow, DetailsContainer, DotsMenu, DropDown, DropdownContainer, DropdownItem, DropdownList, EmailInput, FieldsGrid, FileInput, FlexColumnWrapper, FlexRowWrapper, FooterActions, FooterRight, Footnote, Form, FormActions, FormCheckboxLabel, FormColumn, FormRow, FormSubtitle, FormTitle, H1, H2, H3, HelperText, InputError, InputLabel, InputWrapper, Loader, ManualMethodCard, MethodBody, MethodCard, MethodHeader, MethodTitle, NoResults, PhoneInput, PlaidMethodCard, PlaidTile, Preview, RadioInput, SSNInput, SearchDropdown, SelectInput, StatusTag, Stepper, Tabs, TaxIdInput, TermsDocument, TermsList, TextInput, ThemeProvider, UnderwritingStatus, UploadZone, buildMuiTheme, defaultTheme, mergeBranding, useTheme };
|
|
2608
|
+
export { AchVerificationConsent, AsteriskMark, AsteriskNote, AutocompleteInput, Badge, Banner, BaseInput, Body100, Body200, Body400, Button, ButtonContainer, CheckboxInput, CollapsibleSource, Container, Content$1 as Content, CurrencyInput, DateInput, DetailElement, DetailRow, DetailsContainer, DotsMenu, DropDown, DropdownContainer, DropdownItem, DropdownList, EmailInput, EnvironmentTag, FieldsGrid, FileInput, FlexColumnWrapper, FlexRowWrapper, FooterActions, FooterRight, Footnote, Form, FormActions, FormCheckboxLabel, FormColumn, FormRow, FormSubtitle, FormTitle, H1, H2, H3, HelperText, InputError, InputLabel, InputWrapper, Loader, ManualMethodCard, MethodBody, MethodCard, MethodHeader, MethodTitle, NoResults, PhoneInput, PlaidMethodCard, PlaidTile, Preview, RadioInput, SSNInput, SearchDropdown, SelectInput, StatusTag, Stepper, Tabs, TaxIdInput, TermsDocument, TermsList, TextInput, ThemeProvider, UnderwritingStatus, UploadZone, buildMuiTheme, classifyUnderwritingStatus, defaultTheme, describeComponentEnv, describeComponentEnvTitle, mergeBranding, resolveComponentEnvTag, useTheme };
|
|
2440
2609
|
//# sourceMappingURL=index.esm.js.map
|