@tesouro/embedded-components-react 0.11.219 → 0.11.221

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.
Files changed (62) hide show
  1. package/README.md +11 -7
  2. package/dist/experimental/QuickViewWidget.d.ts +25 -13
  3. package/dist/experimental/index.d.ts +25 -13
  4. package/dist/index.css +394 -30
  5. package/dist/index.d.ts +24 -7
  6. package/dist/lib/AcceptDisclosuresWidget.d.ts +6 -2
  7. package/dist/lib/BankAccountsWidget.d.ts +4 -0
  8. package/dist/lib/BillPayWidget.d.ts +4 -3
  9. package/dist/lib/ExpenseManagementWidget.d.ts +7 -0
  10. package/dist/lib/ReceivablesWidget.d.ts +3 -2
  11. package/dist/lib/WidgetSuite.d.ts +13 -1
  12. package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/lib/AcceptDisclosuresWidget/AcceptDisclosuresWidget.js +1 -2
  13. package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/lib/AcceptDisclosuresWidget/resolveAcceptDisclosuresContent.js +1 -2
  14. package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/lib/AcceptDisclosuresWidget/AcceptDisclosuresWidget.js +0 -1
  15. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index25.js +7 -0
  16. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index9.js +1 -1
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index31.js +5 -1
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index12.js +27 -13
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index29.js +1 -0
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index31.js +3 -0
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget/BillPayWidget.js +61 -51
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +6 -6
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index14.js +48 -37
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js +28 -30
  25. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/receipt-match/ui/dist/index2.js +1 -0
  26. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/receipt-match/ui/dist/index5.js +3 -0
  27. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/AccordionItemCard/AccordionItemCard.js +8 -3
  28. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpensesTransactionsFilterBar/ExpensesTransactionsFilterBar.js +1 -1
  29. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/FileViewer/FileViewer.js +3 -0
  30. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/FileViewer/labels.js +1 -0
  31. package/dist/libs/tesouro-embedded-components-react/insights-widget/ui/dist/lib/InsightsWidget/SingleInsight/SingleInsight.js +47 -44
  32. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +105 -97
  33. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +21 -21
  34. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +66 -63
  35. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index46.js +73 -74
  36. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index48.js +2 -1
  37. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index51.js +4 -1
  38. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index7.js +42 -35
  39. package/dist/libs/tesouro-embedded-components-react/offer-widget/ui/dist/index7.js +1 -1
  40. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/bills/feature/dist/lib/BillsQuickViewWidget/BillsQuickViewWidgetFeature.js +0 -8
  41. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/bills/ui/dist/index3.js +13 -14
  42. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/feature/dist/lib/CardsQuickViewWidget/CardsQuickViewWidgetFeature.js +1 -6
  43. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/ui/dist/index3.js +5 -5
  44. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/invoices/feature/dist/lib/InvoicesQuickViewWidget/InvoicesQuickViewWidgetFeature.js +0 -8
  45. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/invoices/ui/dist/index3.js +13 -14
  46. package/dist/libs/tesouro-embedded-components-react/remote-check-capture/ui/dist/index6.js +1 -0
  47. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index12.js +5 -6
  48. package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index3.js +1 -1
  49. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetProvider.js +119 -119
  50. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  51. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/ui/dist/index9.js +86 -77
  52. package/dist/libs/tesouro-embedded-components-react/shared/quick-view/ui/dist/index3.js +18 -19
  53. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/ConsentBlock/ConsentBlock.js +11 -12
  54. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/FdicLogo.js +76 -72
  55. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShell.js +7 -5
  56. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/UploadTray/UploadTray.js +49 -43
  57. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/theme/createTheme.js +20 -4
  58. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/theme/themeTokens.js +10 -10
  59. package/dist/libs/tesouro-embedded-components-react/upload-receipt-widget/feature/dist/lib/UploadReceiptWidget.js +1 -0
  60. package/dist/libs/tesouro-embedded-components-react/upload-receipt-widget/ui/dist/index2.js +1 -0
  61. package/dist/packages/shared-ui-shadcn/dist/index.js +141 -124
  62. package/package.json +1 -1
package/README.md CHANGED
@@ -310,14 +310,17 @@ removed in a future major version. None is declared: until you set one,
310
310
  them out.
311
311
 
312
312
  In development, `createTheme` warns once in the console about unknown keys,
313
- text under 4.5:1 contrast (3:1 for `mutedForeground` on `muted`) and a radius
314
- outside 0–1.25rem, and the widgets run the same contrast check once against
313
+ text under 4.5:1 contrast and a radius outside
314
+ 0–1.25rem, and the widgets run the same contrast check once against
315
315
  the theme they actually render with.
316
316
  Nothing warns in production, and a warning never stops a widget rendering.
317
317
  `themeIssues(tokens)` returns the same findings as data, for a test in your
318
318
  own CI; a variable you leave out is judged at its default, so
319
- `themeIssues(createTheme({ primary }))` checks `primary` against the default
320
- `primaryForeground`.
319
+ `themeIssues({ '--ttw-primary': primary })` checks `primary` against the
320
+ default `primaryForeground`. If you set `primary` without
321
+ `primaryForeground` and the default text would fall under 4.5:1 on it,
322
+ `createTheme` sets `primaryForeground` to white or black, whichever reads
323
+ better.
321
324
 
322
325
  A status colour you set (`info`, `success`, `warning`, `destructive`,
323
326
  `violet`, `cyan`) gets its pale fill and its text derived from it. Browsers
@@ -510,7 +513,7 @@ Shows "Business Banking provided by" the business customer's bank, plus the FDIC
510
513
 
511
514
  A bill pay widget with Tesouro widget auth and theming: a Bills tab for uploading, reviewing and paying bills, and a Vendors tab for the vendors they are paid to.
512
515
 
513
- The right end of the tab row holds the active tab's main action: Add bill on Bills and Add vendor on Vendors. While the vendor list is empty, Add vendor shows only in its empty state.
516
+ The settings cog sits at the top right, on the same line as `headerStart`. The right end of the tab row holds the active tab's main action: Add bill on Bills and Add vendor on Vendors. While the vendor list is empty, Add vendor shows only in its empty state.
514
517
 
515
518
  Above the bills list, the Total unpaid, Overdue, Scheduled and Not submitted cards act as quick filters. Clicking one switches to All bills, narrows the list to the bills that card totals, shows that as a filter chip and selects the card. Clicking it again, removing the chip or Clear all deselects it, and only one card is selected at a time. Picking another view, such as Assigned to me, also deselects it. Pass `selectedSummaryCard` and `onSummaryCardChange` to keep the card in your URL, for example to link straight to overdue bills, and `selectedBillsView` and `onBillsViewChange` to do the same for All bills and Assigned to me.
516
519
 
@@ -523,7 +526,8 @@ Above the bills list, the Total unpaid, Overdue, Scheduled and Not submitted car
523
526
  | `onTabChange` | `(tab: BillPayWidgetTabId) => void` | `undefined` | Called when the active tab changes, from a tab click or a vendor's "View all" or "Add a bill" opening the Bills tab, so you can keep it in the URL. |
524
527
  | `initialView` | `'create'` | `undefined` | Opens the Bills tab's "Add a bill" dialog once on arrival, when the user can create bills. Closing it does not reopen it. Ignored when the widget opens on Vendors. |
525
528
  | `poweredByBankName` | `string` | `undefined` | Bank shown as "Powered by {bank}" next to the source account when paying a bill. Omit it to hide the badge. |
526
- | `onSettingsClick` | `() => void` | `undefined` | Opens your bill pay settings surface from a cog on the tab row, beside the active tab's add button. The cog renders only when this is supplied and the user's scopes reach that surface. |
529
+ | `onSettingsClick` | `() => void` | `undefined` | Opens your bill pay settings surface from a cog at the top right, on the `headerStart` line. The cog renders only when this is supplied and the user's scopes reach that surface. |
530
+ | `headerStart` | `ReactNode` | `undefined` | Rendered above the tab row, beside the settings cog. It stays when an error or the disclosures gate replaces the tabs. The widget renders no heading of its own, so pass your page title here. |
527
531
  | `selectedSummaryCard` | `BillSummaryCard \| null` | `undefined` | The active summary card on the Bills tab: `'total_unpaid'`, `'overdue'`, `'scheduled'` or `'not_submitted'`, or `null` for none. Applied on mount and whenever it changes. Omit to let the widget track it, starting with none. |
528
532
  | `onSummaryCardChange` | `(card: BillSummaryCard \| null) => void` | `undefined` | Called when the reader selects or deselects a summary card, so you can keep it in the URL. |
529
533
  | `selectedBillsView` | `BillsView` | `undefined` | The open view on the Bills tab: `'all'` (All bills) or `'assigned_to_me'`. Applied on mount and whenever it changes. A selected summary card opens All bills instead. Omit to let the widget track it, starting on All bills. |
@@ -749,7 +753,7 @@ Lists, creates, edits and acts on an organization's invoices, including sending
749
753
  | `onReceivableCreated` | `(id: string, type: ReceivableDocumentType) => void` | `undefined` | Called after a create succeeds. Not called for a duplicate. |
750
754
  | `onReceivableOpened` | `(id: string, type: ReceivableDocumentType) => void` | `undefined` | Called when the user opens a row's details panel. |
751
755
  | `onTemplateSettingsClick` | `() => void` | `undefined` | Shows the invoice settings button at the top right, on the `headerStart` line, for users holding `organization_settings:write:org`, and calls this when it is clicked. |
752
- | `headerStart` | `ReactNode` | `undefined` | Rendered above the tab row. The widget renders no heading of its own, so pass your page title here. |
756
+ | `headerStart` | `ReactNode` | `undefined` | Rendered above the tab row. It stays when an error or the disclosures gate replaces the tabs. The widget renders no heading of its own, so pass your page title here. |
753
757
  | `selectedTab` | `InvoicingTabId` | `undefined` | The active tab: `'invoices'`, `'recurring'`, `'customers'` or `'products'`. Omit to let the widget track it, starting on Invoices. |
754
758
  | `onTabChange` | `(tab: InvoicingTabId) => void` | `undefined` | Called when the user picks a tab, so you can keep it in the URL. |
755
759
  | `selectedStatusCard` | `ReceivableStatusCard \| null` | `undefined` | The active summary card on the Invoices tab: `'unpaid'`, `'overdue'`, `'paid'` (paid in the last 30 days) or `'drafts'`, or `null` for none. Applied on mount and whenever it changes. Omit to let the widget track it, starting with none. |
@@ -661,11 +661,16 @@ interface InvoicesQuickViewWidgetLabels extends InvoicesQuickViewTileLabels {
661
661
  * `overdueAmount` directly, so it carries its own separator.
662
662
  */
663
663
  overdueInvoiceCount: (count: number) => string;
664
- /** The overdue line as a screen reader hears it, without the separator. */
664
+ /**
665
+ * @deprecated No longer read: the tile is named by its visible text, so a
666
+ * screen reader hears what is on screen (WCAG 2.5.3). Kept so existing
667
+ * overrides still type-check; removed in a future release.
668
+ */
665
669
  overdueDescription: (amount: string, count: number) => string;
666
670
  /**
667
- * The tile's one-sentence accessible name, e.g. "Open invoices, $18,300.00,
668
- * $6,450.00 overdue across 3 invoices. View invoices."
671
+ * @deprecated No longer read: the tile is named by its visible text, so a
672
+ * screen reader hears what is on screen (WCAG 2.5.3). Kept so existing
673
+ * overrides still type-check; removed in a future release.
669
674
  */
670
675
  accessibleName: (parts: {
671
676
  title: string;
@@ -688,8 +693,9 @@ interface BillsQuickViewTileLabels {
688
693
 
689
694
  interface BillsQuickViewWidgetLabels extends BillsQuickViewTileLabels {
690
695
  /**
691
- * The tile heading as a screen reader hears it, at the start of the
692
- * accessible name. Override it alongside `title`.
696
+ * @deprecated No longer read: the tile is named by its visible text, so a
697
+ * screen reader hears what is on screen (WCAG 2.5.3). Kept so existing
698
+ * overrides still type-check; removed in a future release.
693
699
  */
694
700
  accessibleTitle: string;
695
701
  /** Call to action that opens the bills list. */
@@ -714,11 +720,16 @@ interface BillsQuickViewWidgetLabels extends BillsQuickViewTileLabels {
714
720
  awaitingApprovalCount: (count: number) => string;
715
721
  /** Joins the sub-line parts, e.g. "1 overdue · 1 awaiting approval". */
716
722
  joinSubtext: (parts: string[]) => string;
717
- /** Joins the same parts as a screen reader hears them, without the dot. */
723
+ /**
724
+ * @deprecated No longer read: the tile is named by its visible text, so a
725
+ * screen reader hears what is on screen (WCAG 2.5.3). Kept so existing
726
+ * overrides still type-check; removed in a future release.
727
+ */
718
728
  joinDescription: (parts: string[]) => string;
719
729
  /**
720
- * The tile's one-sentence accessible name, e.g. "Bills due in the next 30
721
- * days, $9,615.00, 1 overdue, 1 awaiting approval. View bills."
730
+ * @deprecated No longer read: the tile is named by its visible text, so a
731
+ * screen reader hears what is on screen (WCAG 2.5.3). Kept so existing
732
+ * overrides still type-check; removed in a future release.
722
733
  */
723
734
  accessibleName: (parts: {
724
735
  title: string;
@@ -749,9 +760,9 @@ interface CardsQuickViewWidgetLabels extends CardsQuickViewTileLabels {
749
760
  */
750
761
  titleForMonth: (month: number) => string;
751
762
  /**
752
- * The heading as a screen reader hears it, at the start of the accessible
753
- * name, e.g. "Card spend in October". Override it alongside
754
- * `titleForMonth`.
763
+ * @deprecated No longer read: the tile is named by its visible text, so a
764
+ * screen reader hears what is on screen (WCAG 2.5.3). Kept so existing
765
+ * overrides still type-check; removed in a future release.
755
766
  */
756
767
  accessibleTitleForMonth: (month: number) => string;
757
768
  /** Call to action that opens the cards list. */
@@ -766,8 +777,9 @@ interface CardsQuickViewWidgetLabels extends CardsQuickViewTileLabels {
766
777
  */
767
778
  negativeAmount: (magnitude: string) => string;
768
779
  /**
769
- * The tile's one-sentence accessible name, e.g. "Card spend in October,
770
- * $3,186.52, 5 cards. View cards."
780
+ * @deprecated No longer read: the tile is named by its visible text, so a
781
+ * screen reader hears what is on screen (WCAG 2.5.3). Kept so existing
782
+ * overrides still type-check; removed in a future release.
771
783
  */
772
784
  accessibleName: (parts: {
773
785
  title: string;
@@ -752,11 +752,16 @@ interface InvoicesQuickViewWidgetLabels extends InvoicesQuickViewTileLabels {
752
752
  * `overdueAmount` directly, so it carries its own separator.
753
753
  */
754
754
  overdueInvoiceCount: (count: number) => string;
755
- /** The overdue line as a screen reader hears it, without the separator. */
755
+ /**
756
+ * @deprecated No longer read: the tile is named by its visible text, so a
757
+ * screen reader hears what is on screen (WCAG 2.5.3). Kept so existing
758
+ * overrides still type-check; removed in a future release.
759
+ */
756
760
  overdueDescription: (amount: string, count: number) => string;
757
761
  /**
758
- * The tile's one-sentence accessible name, e.g. "Open invoices, $18,300.00,
759
- * $6,450.00 overdue across 3 invoices. View invoices."
762
+ * @deprecated No longer read: the tile is named by its visible text, so a
763
+ * screen reader hears what is on screen (WCAG 2.5.3). Kept so existing
764
+ * overrides still type-check; removed in a future release.
760
765
  */
761
766
  accessibleName: (parts: {
762
767
  title: string;
@@ -779,8 +784,9 @@ interface BillsQuickViewTileLabels {
779
784
 
780
785
  interface BillsQuickViewWidgetLabels extends BillsQuickViewTileLabels {
781
786
  /**
782
- * The tile heading as a screen reader hears it, at the start of the
783
- * accessible name. Override it alongside `title`.
787
+ * @deprecated No longer read: the tile is named by its visible text, so a
788
+ * screen reader hears what is on screen (WCAG 2.5.3). Kept so existing
789
+ * overrides still type-check; removed in a future release.
784
790
  */
785
791
  accessibleTitle: string;
786
792
  /** Call to action that opens the bills list. */
@@ -805,11 +811,16 @@ interface BillsQuickViewWidgetLabels extends BillsQuickViewTileLabels {
805
811
  awaitingApprovalCount: (count: number) => string;
806
812
  /** Joins the sub-line parts, e.g. "1 overdue · 1 awaiting approval". */
807
813
  joinSubtext: (parts: string[]) => string;
808
- /** Joins the same parts as a screen reader hears them, without the dot. */
814
+ /**
815
+ * @deprecated No longer read: the tile is named by its visible text, so a
816
+ * screen reader hears what is on screen (WCAG 2.5.3). Kept so existing
817
+ * overrides still type-check; removed in a future release.
818
+ */
809
819
  joinDescription: (parts: string[]) => string;
810
820
  /**
811
- * The tile's one-sentence accessible name, e.g. "Bills due in the next 30
812
- * days, $9,615.00, 1 overdue, 1 awaiting approval. View bills."
821
+ * @deprecated No longer read: the tile is named by its visible text, so a
822
+ * screen reader hears what is on screen (WCAG 2.5.3). Kept so existing
823
+ * overrides still type-check; removed in a future release.
813
824
  */
814
825
  accessibleName: (parts: {
815
826
  title: string;
@@ -840,9 +851,9 @@ interface CardsQuickViewWidgetLabels extends CardsQuickViewTileLabels {
840
851
  */
841
852
  titleForMonth: (month: number) => string;
842
853
  /**
843
- * The heading as a screen reader hears it, at the start of the accessible
844
- * name, e.g. "Card spend in October". Override it alongside
845
- * `titleForMonth`.
854
+ * @deprecated No longer read: the tile is named by its visible text, so a
855
+ * screen reader hears what is on screen (WCAG 2.5.3). Kept so existing
856
+ * overrides still type-check; removed in a future release.
846
857
  */
847
858
  accessibleTitleForMonth: (month: number) => string;
848
859
  /** Call to action that opens the cards list. */
@@ -857,8 +868,9 @@ interface CardsQuickViewWidgetLabels extends CardsQuickViewTileLabels {
857
868
  */
858
869
  negativeAmount: (magnitude: string) => string;
859
870
  /**
860
- * The tile's one-sentence accessible name, e.g. "Card spend in October,
861
- * $3,186.52, 5 cards. View cards."
871
+ * @deprecated No longer read: the tile is named by its visible text, so a
872
+ * screen reader hears what is on screen (WCAG 2.5.3). Kept so existing
873
+ * overrides still type-check; removed in a future release.
862
874
  */
863
875
  accessibleName: (parts: {
864
876
  title: string;