@tesouro/embedded-components-react 0.9.27 → 0.9.30
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/README.md +9 -0
- package/dist/index.css +814 -35
- package/dist/index.d.ts +38 -3
- package/dist/lib/BankAccountOnboardingWidget.d.ts +23 -3
- package/dist/lib/WidgetSuite.d.ts +23 -3
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/BankAccountOnboardingWidget.js +366 -350
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/labels.js +4 -3
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/testIds.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index.js +3 -1
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index33.js +8 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index34.js +46 -0
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShell.js +62 -51
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShellScrollRegion.js +25 -45
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShellStepper.js +38 -48
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/labels.js +1 -2
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/useScrollHintContainer.js +10 -11
- package/dist/libs/tesouro-embedded-components-react/shared/util/dist/index.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/theme/color.js +104 -59
- package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/theme/createTheme.js +61 -48
- package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/theme/index.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/theme/themeTokens.js +43 -1
- package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/theme/toneColors.js +70 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1403,10 +1403,25 @@ type ThemeIssue = {
|
|
|
1403
1403
|
text: ThemeTokenName;
|
|
1404
1404
|
ratio: number;
|
|
1405
1405
|
minimum: number;
|
|
1406
|
+
} | {
|
|
1407
|
+
/** Readable under the current formula, but not under the color-mix() fallback. */
|
|
1408
|
+
kind: 'fallback-contrast';
|
|
1409
|
+
fill: ThemeTokenName;
|
|
1410
|
+
text: ThemeTokenName;
|
|
1411
|
+
ratio: number;
|
|
1412
|
+
minimum: number;
|
|
1406
1413
|
} | {
|
|
1407
1414
|
kind: 'radius';
|
|
1408
1415
|
value: string;
|
|
1409
1416
|
};
|
|
1417
|
+
/**
|
|
1418
|
+
* Checks a theme against what the widgets render. A derived status tone is
|
|
1419
|
+
* checked against the relative-colour formula, and then against the older
|
|
1420
|
+
* `color-mix()` tint a browser that fails the `@supports` test keeps instead
|
|
1421
|
+
* (ADR-0011, "Browser support"). A pale tone such as `#fde68a` passes the
|
|
1422
|
+
* first and falls below 4.5:1 in the second, which is a `fallback-contrast`
|
|
1423
|
+
* issue rather than a `contrast` one.
|
|
1424
|
+
*/
|
|
1410
1425
|
declare function themeIssues(input: Readonly<Record<string, string | undefined>>): ThemeIssue[];
|
|
1411
1426
|
declare function createTheme(input: ThemeInput): ThemeTokens;
|
|
1412
1427
|
declare function themeToCss(tokens: Readonly<ThemeTokens>, selector?: string): string;
|
|
@@ -2041,6 +2056,13 @@ interface DeleteApplicationDialogLabels {
|
|
|
2041
2056
|
close: string;
|
|
2042
2057
|
}
|
|
2043
2058
|
|
|
2059
|
+
interface ApplicationDeletedScreenLabels {
|
|
2060
|
+
title: string;
|
|
2061
|
+
body: string;
|
|
2062
|
+
/** Restarts the flow on a fresh, empty application. */
|
|
2063
|
+
startNewApplicationButton: string;
|
|
2064
|
+
}
|
|
2065
|
+
|
|
2044
2066
|
/**
|
|
2045
2067
|
* Values the application-status copy can interpolate. The bank name comes from
|
|
2046
2068
|
* widget init with `fallbackBankName` applied, so it is never missing. The rest
|
|
@@ -2122,6 +2144,8 @@ interface BankAccountOnboardingWidgetLabels {
|
|
|
2122
2144
|
* defaults to `saveAndClose`, so it names the footer's save control.
|
|
2123
2145
|
*/
|
|
2124
2146
|
deleteApplicationDialog: Partial<DeleteApplicationDialogLabels>;
|
|
2147
|
+
/** The screen shown in place of the form once the application is deleted. */
|
|
2148
|
+
applicationDeleted: Partial<ApplicationDeletedScreenLabels>;
|
|
2125
2149
|
/** Visible text of the footer's Back control on every step. */
|
|
2126
2150
|
back: string;
|
|
2127
2151
|
/**
|
|
@@ -2146,7 +2170,11 @@ interface BankAccountOnboardingWidgetLabels {
|
|
|
2146
2170
|
saveAndClose: string;
|
|
2147
2171
|
/** The destructive footer control that opens the delete prompt. */
|
|
2148
2172
|
deleteApplication: string;
|
|
2149
|
-
/**
|
|
2173
|
+
/**
|
|
2174
|
+
* @deprecated No longer shown: a confirmed delete now replaces the form with
|
|
2175
|
+
* a confirmation screen, labelled through `applicationDeleted`. Kept so
|
|
2176
|
+
* existing overrides still compile.
|
|
2177
|
+
*/
|
|
2150
2178
|
applicationDeletedToast: string;
|
|
2151
2179
|
/** Shown after "Save and continue later" or the close prompt's "Save changes" writes the application. */
|
|
2152
2180
|
applicationSavedToast: string;
|
|
@@ -2248,7 +2276,8 @@ interface BankAccountOnboardingWidgetInnerProps {
|
|
|
2248
2276
|
} | null) => void;
|
|
2249
2277
|
/**
|
|
2250
2278
|
* Called once the applicant has deleted the application, so the session
|
|
2251
|
-
* scope can start a fresh one. Set by the
|
|
2279
|
+
* scope can show the deleted screen and later start a fresh one. Set by the
|
|
2280
|
+
* session scope, not by hosts.
|
|
2252
2281
|
*/
|
|
2253
2282
|
onApplicationDeleted?: () => void;
|
|
2254
2283
|
/**
|
|
@@ -2257,6 +2286,12 @@ interface BankAccountOnboardingWidgetInnerProps {
|
|
|
2257
2286
|
* the card was showing. Set by the session scope, not by hosts.
|
|
2258
2287
|
*/
|
|
2259
2288
|
onNoticeReplacedByForm?: () => void;
|
|
2289
|
+
/**
|
|
2290
|
+
* Moves focus to the form's title when it mounts. Set by the session scope
|
|
2291
|
+
* after "Start a new application", whose button unmounts with the deleted
|
|
2292
|
+
* screen. Not set by hosts.
|
|
2293
|
+
*/
|
|
2294
|
+
focusFormOnMount?: boolean;
|
|
2260
2295
|
bankLogoSrc?: string;
|
|
2261
2296
|
/**
|
|
2262
2297
|
* Host-resolved disclosure URLs for the business-details agreement step.
|
|
@@ -2285,7 +2320,7 @@ interface BankAccountOnboardingWidgetInnerProps {
|
|
|
2285
2320
|
*/
|
|
2286
2321
|
onResultPhaseChange?: (isInResultPhase: boolean) => void;
|
|
2287
2322
|
}
|
|
2288
|
-
type BankAccountOnboardingWidgetProps = WidgetProviderProps & Omit<BankAccountOnboardingWidgetInnerProps, 'initialApplicationId' | 'initialBoundAuthEpoch' | 'initialBusinessDetails' | 'initialPersonalDetails' | 'initialAdditionalOwners' | 'onEditableDraftChange' | 'onApplicationDeleted' | 'onNoticeReplacedByForm'> & {
|
|
2323
|
+
type BankAccountOnboardingWidgetProps = WidgetProviderProps & Omit<BankAccountOnboardingWidgetInnerProps, 'initialApplicationId' | 'initialBoundAuthEpoch' | 'initialBusinessDetails' | 'initialPersonalDetails' | 'initialAdditionalOwners' | 'onEditableDraftChange' | 'onApplicationDeleted' | 'onNoticeReplacedByForm' | 'focusFormOnMount'> & {
|
|
2289
2324
|
initialBusinessDetails?: Partial<HostSupplied<BusinessDetailsValues>>;
|
|
2290
2325
|
initialPersonalDetails?: Partial<HostSupplied<PersonalDetailsValues>>;
|
|
2291
2326
|
initialAdditionalOwners?: HostSuppliedOwner[];
|
|
@@ -1037,6 +1037,13 @@ interface DeleteApplicationDialogLabels {
|
|
|
1037
1037
|
close: string;
|
|
1038
1038
|
}
|
|
1039
1039
|
|
|
1040
|
+
interface ApplicationDeletedScreenLabels {
|
|
1041
|
+
title: string;
|
|
1042
|
+
body: string;
|
|
1043
|
+
/** Restarts the flow on a fresh, empty application. */
|
|
1044
|
+
startNewApplicationButton: string;
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1040
1047
|
/**
|
|
1041
1048
|
* Values the application-status copy can interpolate. The bank name comes from
|
|
1042
1049
|
* widget init with `fallbackBankName` applied, so it is never missing. The rest
|
|
@@ -1118,6 +1125,8 @@ interface BankAccountOnboardingWidgetLabels {
|
|
|
1118
1125
|
* defaults to `saveAndClose`, so it names the footer's save control.
|
|
1119
1126
|
*/
|
|
1120
1127
|
deleteApplicationDialog: Partial<DeleteApplicationDialogLabels>;
|
|
1128
|
+
/** The screen shown in place of the form once the application is deleted. */
|
|
1129
|
+
applicationDeleted: Partial<ApplicationDeletedScreenLabels>;
|
|
1121
1130
|
/** Visible text of the footer's Back control on every step. */
|
|
1122
1131
|
back: string;
|
|
1123
1132
|
/**
|
|
@@ -1142,7 +1151,11 @@ interface BankAccountOnboardingWidgetLabels {
|
|
|
1142
1151
|
saveAndClose: string;
|
|
1143
1152
|
/** The destructive footer control that opens the delete prompt. */
|
|
1144
1153
|
deleteApplication: string;
|
|
1145
|
-
/**
|
|
1154
|
+
/**
|
|
1155
|
+
* @deprecated No longer shown: a confirmed delete now replaces the form with
|
|
1156
|
+
* a confirmation screen, labelled through `applicationDeleted`. Kept so
|
|
1157
|
+
* existing overrides still compile.
|
|
1158
|
+
*/
|
|
1146
1159
|
applicationDeletedToast: string;
|
|
1147
1160
|
/** Shown after "Save and continue later" or the close prompt's "Save changes" writes the application. */
|
|
1148
1161
|
applicationSavedToast: string;
|
|
@@ -1244,7 +1257,8 @@ interface BankAccountOnboardingWidgetInnerProps {
|
|
|
1244
1257
|
} | null) => void;
|
|
1245
1258
|
/**
|
|
1246
1259
|
* Called once the applicant has deleted the application, so the session
|
|
1247
|
-
* scope can start a fresh one. Set by the
|
|
1260
|
+
* scope can show the deleted screen and later start a fresh one. Set by the
|
|
1261
|
+
* session scope, not by hosts.
|
|
1248
1262
|
*/
|
|
1249
1263
|
onApplicationDeleted?: () => void;
|
|
1250
1264
|
/**
|
|
@@ -1253,6 +1267,12 @@ interface BankAccountOnboardingWidgetInnerProps {
|
|
|
1253
1267
|
* the card was showing. Set by the session scope, not by hosts.
|
|
1254
1268
|
*/
|
|
1255
1269
|
onNoticeReplacedByForm?: () => void;
|
|
1270
|
+
/**
|
|
1271
|
+
* Moves focus to the form's title when it mounts. Set by the session scope
|
|
1272
|
+
* after "Start a new application", whose button unmounts with the deleted
|
|
1273
|
+
* screen. Not set by hosts.
|
|
1274
|
+
*/
|
|
1275
|
+
focusFormOnMount?: boolean;
|
|
1256
1276
|
bankLogoSrc?: string;
|
|
1257
1277
|
/**
|
|
1258
1278
|
* Host-resolved disclosure URLs for the business-details agreement step.
|
|
@@ -1281,7 +1301,7 @@ interface BankAccountOnboardingWidgetInnerProps {
|
|
|
1281
1301
|
*/
|
|
1282
1302
|
onResultPhaseChange?: (isInResultPhase: boolean) => void;
|
|
1283
1303
|
}
|
|
1284
|
-
type BankAccountOnboardingWidgetProps = WidgetProviderProps & Omit<BankAccountOnboardingWidgetInnerProps, 'initialApplicationId' | 'initialBoundAuthEpoch' | 'initialBusinessDetails' | 'initialPersonalDetails' | 'initialAdditionalOwners' | 'onEditableDraftChange' | 'onApplicationDeleted' | 'onNoticeReplacedByForm'> & {
|
|
1304
|
+
type BankAccountOnboardingWidgetProps = WidgetProviderProps & Omit<BankAccountOnboardingWidgetInnerProps, 'initialApplicationId' | 'initialBoundAuthEpoch' | 'initialBusinessDetails' | 'initialPersonalDetails' | 'initialAdditionalOwners' | 'onEditableDraftChange' | 'onApplicationDeleted' | 'onNoticeReplacedByForm' | 'focusFormOnMount'> & {
|
|
1285
1305
|
initialBusinessDetails?: Partial<HostSupplied<BusinessDetailsValues>>;
|
|
1286
1306
|
initialPersonalDetails?: Partial<HostSupplied<PersonalDetailsValues>>;
|
|
1287
1307
|
initialAdditionalOwners?: HostSuppliedOwner[];
|
|
@@ -1087,6 +1087,13 @@ interface DeleteApplicationDialogLabels {
|
|
|
1087
1087
|
close: string;
|
|
1088
1088
|
}
|
|
1089
1089
|
|
|
1090
|
+
interface ApplicationDeletedScreenLabels {
|
|
1091
|
+
title: string;
|
|
1092
|
+
body: string;
|
|
1093
|
+
/** Restarts the flow on a fresh, empty application. */
|
|
1094
|
+
startNewApplicationButton: string;
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1090
1097
|
/**
|
|
1091
1098
|
* Values the application-status copy can interpolate. The bank name comes from
|
|
1092
1099
|
* widget init with `fallbackBankName` applied, so it is never missing. The rest
|
|
@@ -1167,6 +1174,8 @@ interface BankAccountOnboardingWidgetLabels {
|
|
|
1167
1174
|
* defaults to `saveAndClose`, so it names the footer's save control.
|
|
1168
1175
|
*/
|
|
1169
1176
|
deleteApplicationDialog: Partial<DeleteApplicationDialogLabels>;
|
|
1177
|
+
/** The screen shown in place of the form once the application is deleted. */
|
|
1178
|
+
applicationDeleted: Partial<ApplicationDeletedScreenLabels>;
|
|
1170
1179
|
/** Visible text of the footer's Back control on every step. */
|
|
1171
1180
|
back: string;
|
|
1172
1181
|
/**
|
|
@@ -1191,7 +1200,11 @@ interface BankAccountOnboardingWidgetLabels {
|
|
|
1191
1200
|
saveAndClose: string;
|
|
1192
1201
|
/** The destructive footer control that opens the delete prompt. */
|
|
1193
1202
|
deleteApplication: string;
|
|
1194
|
-
/**
|
|
1203
|
+
/**
|
|
1204
|
+
* @deprecated No longer shown: a confirmed delete now replaces the form with
|
|
1205
|
+
* a confirmation screen, labelled through `applicationDeleted`. Kept so
|
|
1206
|
+
* existing overrides still compile.
|
|
1207
|
+
*/
|
|
1195
1208
|
applicationDeletedToast: string;
|
|
1196
1209
|
/** Shown after "Save and continue later" or the close prompt's "Save changes" writes the application. */
|
|
1197
1210
|
applicationSavedToast: string;
|
|
@@ -1293,7 +1306,8 @@ interface BankAccountOnboardingWidgetInnerProps {
|
|
|
1293
1306
|
} | null) => void;
|
|
1294
1307
|
/**
|
|
1295
1308
|
* Called once the applicant has deleted the application, so the session
|
|
1296
|
-
* scope can start a fresh one. Set by the
|
|
1309
|
+
* scope can show the deleted screen and later start a fresh one. Set by the
|
|
1310
|
+
* session scope, not by hosts.
|
|
1297
1311
|
*/
|
|
1298
1312
|
onApplicationDeleted?: () => void;
|
|
1299
1313
|
/**
|
|
@@ -1302,6 +1316,12 @@ interface BankAccountOnboardingWidgetInnerProps {
|
|
|
1302
1316
|
* the card was showing. Set by the session scope, not by hosts.
|
|
1303
1317
|
*/
|
|
1304
1318
|
onNoticeReplacedByForm?: () => void;
|
|
1319
|
+
/**
|
|
1320
|
+
* Moves focus to the form's title when it mounts. Set by the session scope
|
|
1321
|
+
* after "Start a new application", whose button unmounts with the deleted
|
|
1322
|
+
* screen. Not set by hosts.
|
|
1323
|
+
*/
|
|
1324
|
+
focusFormOnMount?: boolean;
|
|
1305
1325
|
bankLogoSrc?: string;
|
|
1306
1326
|
/**
|
|
1307
1327
|
* Host-resolved disclosure URLs for the business-details agreement step.
|
|
@@ -1330,7 +1350,7 @@ interface BankAccountOnboardingWidgetInnerProps {
|
|
|
1330
1350
|
*/
|
|
1331
1351
|
onResultPhaseChange?: (isInResultPhase: boolean) => void;
|
|
1332
1352
|
}
|
|
1333
|
-
type BankAccountOnboardingWidgetProps = WidgetProviderProps & Omit<BankAccountOnboardingWidgetInnerProps, 'initialApplicationId' | 'initialBoundAuthEpoch' | 'initialBusinessDetails' | 'initialPersonalDetails' | 'initialAdditionalOwners' | 'onEditableDraftChange' | 'onApplicationDeleted' | 'onNoticeReplacedByForm'> & {
|
|
1353
|
+
type BankAccountOnboardingWidgetProps = WidgetProviderProps & Omit<BankAccountOnboardingWidgetInnerProps, 'initialApplicationId' | 'initialBoundAuthEpoch' | 'initialBusinessDetails' | 'initialPersonalDetails' | 'initialAdditionalOwners' | 'onEditableDraftChange' | 'onApplicationDeleted' | 'onNoticeReplacedByForm' | 'focusFormOnMount'> & {
|
|
1334
1354
|
initialBusinessDetails?: Partial<HostSupplied<BusinessDetailsValues>>;
|
|
1335
1355
|
initialPersonalDetails?: Partial<HostSupplied<PersonalDetailsValues>>;
|
|
1336
1356
|
initialAdditionalOwners?: HostSuppliedOwner[];
|