@tight-embedded/react 6.6.1 → 6.7.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.css CHANGED
@@ -211,6 +211,7 @@
211
211
  --Tight-colors-surface-intent-danger-disabled: var(--Tight-colors-surface-foreground-disabled);
212
212
  --Tight-colors-surface-intent-danger-weak: var(--Tight-colors-brand-danger-weak);
213
213
  --Tight-colors-surface-intent-danger-highlight: var(--Tight-colors-brand-danger-weaker);
214
+ --Tight-colors-surface-reports-alternateRows: var(--Tight-colors-brand-action-weaker);
214
215
  --Tight-colors-typography-base: var(--Tight-colors-black700);
215
216
  --Tight-colors-typography-base-weak: var(--Tight-colors-black400);
216
217
  --Tight-colors-typography-contrast: var(--Tight-colors-white100);
@@ -566,18 +567,6 @@
566
567
  padding: 16px 16px;
567
568
  }
568
569
 
569
- .tsystem-p_2px {
570
- padding: 2px;
571
- }
572
-
573
- .tsystem-bg_none {
574
- background: var(--Tight-colors-none);
575
- }
576
-
577
- .tsystem-p_5px_10px {
578
- padding: 5px 10px;
579
- }
580
-
581
570
  .tsystem-m_0_8px {
582
571
  margin: 0 8px;
583
572
  }
@@ -602,6 +591,18 @@
602
591
  animation: var(--Tight-animations-shimmer);
603
592
  }
604
593
 
594
+ .tsystem-p_2px {
595
+ padding: 2px;
596
+ }
597
+
598
+ .tsystem-bg_none {
599
+ background: var(--Tight-colors-none);
600
+ }
601
+
602
+ .tsystem-p_5px_10px {
603
+ padding: 5px 10px;
604
+ }
605
+
605
606
  .tsystem-anim_appear\.instant {
606
607
  animation: var(--Tight-animations-appear-instant);
607
608
  }
@@ -642,6 +643,10 @@
642
643
  padding: 15px;
643
644
  }
644
645
 
646
+ .tsystem-p_36px_24px {
647
+ padding: 36px 24px;
648
+ }
649
+
645
650
  .tsystem-bd_inherit {
646
651
  border: inherit;
647
652
  }
@@ -774,10 +779,6 @@
774
779
  padding: 6px 0 6px 6px;
775
780
  }
776
781
 
777
- .tsystem-m_6px_6px_6px_5px {
778
- margin: 6px 6px 6px 5px;
779
- }
780
-
781
782
  .tsystem-p_0_6px_0_0 {
782
783
  padding: 0 6px 0 0;
783
784
  }
@@ -975,8 +976,8 @@
975
976
  transition: height 0.5s, width 0.5s;
976
977
  }
977
978
 
978
- .tsystem-gap_45px {
979
- gap: 45px;
979
+ .tsystem-gap_24px {
980
+ gap: 24px;
980
981
  }
981
982
 
982
983
  .tsystem-gap_20px {
@@ -987,6 +988,10 @@
987
988
  border-top: hidden;
988
989
  }
989
990
 
991
+ .tsystem-gap_45px {
992
+ gap: 45px;
993
+ }
994
+
990
995
  .tsystem-bdr_0 {
991
996
  border-radius: 0;
992
997
  }
@@ -1059,6 +1064,14 @@
1059
1064
  transition: all 300ms ease-out;
1060
1065
  }
1061
1066
 
1067
+ .tsystem-bdr_4px {
1068
+ border-radius: 4px;
1069
+ }
1070
+
1071
+ .tsystem-tw_wrap {
1072
+ text-wrap: wrap;
1073
+ }
1074
+
1062
1075
  .tsystem-bdr_borderWidths\.sm {
1063
1076
  border-radius: borderWidths.sm;
1064
1077
  }
@@ -1071,10 +1084,6 @@
1071
1084
  border-width: 1px;
1072
1085
  }
1073
1086
 
1074
- .tsystem-bdr_4px {
1075
- border-radius: 4px;
1076
- }
1077
-
1078
1087
  .tsystem-bdr_8px {
1079
1088
  border-radius: 8px;
1080
1089
  }
@@ -1187,10 +1196,6 @@
1187
1196
  border-color: weak;
1188
1197
  }
1189
1198
 
1190
- .tsystem-tw_wrap {
1191
- text-wrap: wrap;
1192
- }
1193
-
1194
1199
  .tsystem-flex_1_1_100\% {
1195
1200
  flex: 1 1 100%;
1196
1201
  }
@@ -1320,10 +1325,6 @@
1320
1325
  line-height: 12px;
1321
1326
  }
1322
1327
 
1323
- .tsystem-ls_0\.66px {
1324
- letter-spacing: 0.66px;
1325
- }
1326
-
1327
1328
  .tsystem-white-space_normal {
1328
1329
  white-space: normal;
1329
1330
  }
@@ -1344,10 +1345,6 @@
1344
1345
  line-height: 18px;
1345
1346
  }
1346
1347
 
1347
- .tsystem-ls_0\.84px {
1348
- letter-spacing: 0.84px;
1349
- }
1350
-
1351
1348
  .tsystem-fw_md {
1352
1349
  font-weight: var(--Tight-fontWeights-md);
1353
1350
  }
@@ -1360,10 +1357,6 @@
1360
1357
  line-height: 14px;
1361
1358
  }
1362
1359
 
1363
- .tsystem-ls_0\.72px {
1364
- letter-spacing: 0.72px;
1365
- }
1366
-
1367
1360
  .tsystem-bx-s_border-box {
1368
1361
  box-sizing: border-box;
1369
1362
  }
@@ -1441,10 +1434,6 @@
1441
1434
  line-height: 26px;
1442
1435
  }
1443
1436
 
1444
- .tsystem-ls_1\.2px {
1445
- letter-spacing: 1.2px;
1446
- }
1447
-
1448
1437
  .tsystem-pos_fixed {
1449
1438
  position: fixed;
1450
1439
  }
@@ -1473,10 +1462,6 @@
1473
1462
  font-size: var(--Tight-fontSizes-lg);
1474
1463
  }
1475
1464
 
1476
- .tsystem-ls_0\.96px {
1477
- letter-spacing: 0.96px;
1478
- }
1479
-
1480
1465
  .tsystem-ff_label {
1481
1466
  font-family: var(--Tight-fonts-label);
1482
1467
  }
@@ -1609,18 +1594,6 @@
1609
1594
  background-color: yellow;
1610
1595
  }
1611
1596
 
1612
- .tsystem-c_typography\.intent\.secondary {
1613
- color: var(--Tight-colors-typography-intent-secondary);
1614
- }
1615
-
1616
- .tsystem-cursor_not-allowed {
1617
- cursor: not-allowed;
1618
- }
1619
-
1620
- .tsystem-op_0\.5 {
1621
- opacity: 0.5;
1622
- }
1623
-
1624
1597
  .tsystem-fill_surface\.intent\.action\.active {
1625
1598
  fill: var(--Tight-colors-surface-intent-action-active);
1626
1599
  }
@@ -1653,6 +1626,10 @@
1653
1626
  background-color: var(--Tight-colors-surface-intent-action-highlight);
1654
1627
  }
1655
1628
 
1629
+ .tsystem-c_typography\.intent\.secondary {
1630
+ color: var(--Tight-colors-typography-intent-secondary);
1631
+ }
1632
+
1656
1633
  .tsystem-jc_flex-end {
1657
1634
  justify-content: flex-end;
1658
1635
  }
@@ -1669,6 +1646,18 @@
1669
1646
  background-size: 400%;
1670
1647
  }
1671
1648
 
1649
+ .tsystem-cursor_not-allowed {
1650
+ cursor: not-allowed;
1651
+ }
1652
+
1653
+ .tsystem-op_0\.5 {
1654
+ opacity: 0.5;
1655
+ }
1656
+
1657
+ .tsystem-flex-wrap_wrap {
1658
+ flex-wrap: wrap;
1659
+ }
1660
+
1672
1661
  .tsystem-bx-sh_box-shadow {
1673
1662
  box-shadow: var(--Tight-shadows-box-shadow);
1674
1663
  }
@@ -1707,18 +1696,6 @@
1707
1696
  border-top-right-radius: var(--Tight-radii-lg);
1708
1697
  }
1709
1698
 
1710
- .tsystem-flex-wrap_wrap {
1711
- flex-wrap: wrap;
1712
- }
1713
-
1714
- .tsystem-rg_10px {
1715
- row-gap: 10px;
1716
- }
1717
-
1718
- .tsystem-cg_max\(10px\,_calc\(50\%_-_600px\)\) {
1719
- column-gap: max(10px, calc(50% - 600px));
1720
- }
1721
-
1722
1699
  .tsystem-c_icon\.intent\.primary {
1723
1700
  color: var(--Tight-colors-icon-intent-primary);
1724
1701
  }
@@ -1843,6 +1820,40 @@
1843
1820
  background-color: var(--Tight-colors-typography-base);
1844
1821
  }
1845
1822
 
1823
+ .tsystem-bg-linear_to-t {
1824
+ --gradient-stops: var(--gradient-via-stops, var(--gradient-position), var(--gradient-from) var(--gradient-from-position), var(--gradient-to) var(--gradient-to-position));
1825
+ --gradient-position: to top;
1826
+ background-image: linear-gradient(var(--gradient-stops));
1827
+ }
1828
+
1829
+ .tsystem-grad-from_\#009C75 {
1830
+ --gradient-from: #009C75;
1831
+ }
1832
+
1833
+ .tsystem-grad-to_\#2AD17B {
1834
+ --gradient-to: #2AD17B;
1835
+ }
1836
+
1837
+ .tsystem-grad-from-pos_23\.41\% {
1838
+ --gradient-from-position: 23.41%;
1839
+ }
1840
+
1841
+ .tsystem-grad-to-pos_106\.24\% {
1842
+ --gradient-to-position: 106.24%;
1843
+ }
1844
+
1845
+ .tsystem-fw_label\.strong {
1846
+ font-weight: var(--Tight-fontWeights-label-strong);
1847
+ }
1848
+
1849
+ .tsystem-c_\#FFF {
1850
+ color: #FFF;
1851
+ }
1852
+
1853
+ .tsystem-d_inline {
1854
+ display: inline;
1855
+ }
1856
+
1846
1857
  .tsystem-ta_end {
1847
1858
  text-align: end;
1848
1859
  }
@@ -1931,10 +1942,6 @@
1931
1942
  line-height: 25px;
1932
1943
  }
1933
1944
 
1934
- .tsystem-ls_2px {
1935
- letter-spacing: 2px;
1936
- }
1937
-
1938
1945
  .tsystem-fw_metric\.sm {
1939
1946
  font-weight: var(--Tight-fontWeights-metric-sm);
1940
1947
  }
@@ -2061,10 +2068,6 @@
2061
2068
  transform: rotate(90deg);
2062
2069
  }
2063
2070
 
2064
- .tsystem-fw_label\.strong {
2065
- font-weight: var(--Tight-fontWeights-label-strong);
2066
- }
2067
-
2068
2071
  .tsystem-stk_icon\.base\.weak {
2069
2072
  stroke: var(--Tight-colors-icon-base-weak);
2070
2073
  }
@@ -2236,6 +2239,10 @@
2236
2239
  color: var(--Tight-colors-icon-base-weak);
2237
2240
  }
2238
2241
 
2242
+ .tsystem-overlay_true {
2243
+ overlay: true;
2244
+ }
2245
+
2239
2246
  .tsystem-c_surface\.intent\.danger\.active {
2240
2247
  color: var(--Tight-colors-surface-intent-danger-active);
2241
2248
  }
@@ -2556,18 +2563,6 @@
2556
2563
  height: 24px;
2557
2564
  }
2558
2565
 
2559
- .tsystem-w_14px {
2560
- width: 14px;
2561
- }
2562
-
2563
- .tsystem-h_14px {
2564
- height: 14px;
2565
- }
2566
-
2567
- .tsystem-max-w_200px {
2568
- max-width: 200px;
2569
- }
2570
-
2571
2566
  .tsystem-h_37px {
2572
2567
  height: 37px;
2573
2568
  }
@@ -2632,6 +2627,18 @@
2632
2627
  height: 80px;
2633
2628
  }
2634
2629
 
2630
+ .tsystem-w_14px {
2631
+ width: 14px;
2632
+ }
2633
+
2634
+ .tsystem-h_14px {
2635
+ height: 14px;
2636
+ }
2637
+
2638
+ .tsystem-max-w_200px {
2639
+ max-width: 200px;
2640
+ }
2641
+
2635
2642
  .tsystem-max-w_900px {
2636
2643
  max-width: 900px;
2637
2644
  }
@@ -2692,8 +2699,16 @@
2692
2699
  height: 300px;
2693
2700
  }
2694
2701
 
2695
- .tsystem-w_400px {
2696
- width: 400px;
2702
+ .tsystem-min-w_295px {
2703
+ min-width: 295px;
2704
+ }
2705
+
2706
+ .tsystem-max-w_426px {
2707
+ max-width: 426px;
2708
+ }
2709
+
2710
+ .tsystem-h_295px {
2711
+ height: 295px;
2697
2712
  }
2698
2713
 
2699
2714
  .tsystem-min-w_900px {
@@ -2856,6 +2871,14 @@
2856
2871
  max-width: 250px;
2857
2872
  }
2858
2873
 
2874
+ .tsystem-w_361 {
2875
+ width: 361px;
2876
+ }
2877
+
2878
+ .tsystem-w_89 {
2879
+ width: 89px;
2880
+ }
2881
+
2859
2882
  .tsystem-w_200px {
2860
2883
  width: 200px;
2861
2884
  }
@@ -3602,8 +3625,8 @@
3602
3625
  background-color: var(--Tight-colors-surface-intent-action-discreet-active);
3603
3626
  }
3604
3627
 
3605
- .odd\:tsystem-bg-c_surface\.intent\.action\.highlight:nth-child(odd) {
3606
- background-color: var(--Tight-colors-surface-intent-action-highlight);
3628
+ .odd\:tsystem-bg-c_surface\.reports\.alternateRows:nth-child(odd) {
3629
+ background-color: var(--Tight-colors-surface-reports-alternateRows);
3607
3630
  }
3608
3631
 
3609
3632
  .even\:tsystem-bg-c_surface\.foreground:nth-child(even) {
@@ -4332,6 +4355,10 @@
4332
4355
  transform: none;
4333
4356
  }
4334
4357
 
4358
+ .md\:tsystem-w_416 {
4359
+ width: 416px;
4360
+ }
4361
+
4335
4362
  .md\:tsystem-min-w_800px {
4336
4363
  min-width: 800px;
4337
4364
  }
@@ -4516,10 +4543,6 @@
4516
4543
  font-size: var(--Tight-fontSizes-label-strong);
4517
4544
  }
4518
4545
 
4519
- .xl\:tsystem-ls_0\.84px {
4520
- letter-spacing: 0.84px;
4521
- }
4522
-
4523
4546
  .xl\:tsystem-fs_label\.strongSub {
4524
4547
  font-size: var(--Tight-fontSizes-label-strongSub);
4525
4548
  }
package/dist/index.css.gz CHANGED
Binary file
package/dist/index.d.ts CHANGED
@@ -15,7 +15,7 @@ export declare type Anchor = AnchorFor<keyof PageAnchorMap>;
15
15
  *
16
16
  * @example
17
17
  * ```TypeScript
18
- * type BODAnchors = AnchorFor<"FinancialOverviewDashboard">;
18
+ * type BODAnchors = AnchorFor<"FinancialOverview">;
19
19
  * // = "conversations-section" | "transactions-section"
20
20
  * ```
21
21
  */
@@ -28,14 +28,12 @@ declare type AnchorFor<T extends keyof PageAnchorMap> = T extends keyof PageAnch
28
28
  * @see NavState
29
29
  */
30
30
  declare type AppProps = {
31
- /** The current navigation target. Controls which page, anchor, and drawer are active. */
32
- navState: NavState;
33
- /** Called when the user triggers an internal navigation event. The host must update `navState` in response. */
34
- onNavigate: (navState: NavState) => void;
35
- /** Bearer token used to authenticate API requests. Obtain one from the Tight Authentication Endpoint. */
31
+ /** Bearer token used to authenticate API requests. Get one from the Tight Authentication Endpoint. */
36
32
  accessToken: string;
37
33
  /** Selects the Tight API environment. Defaults to `"PRODUCTION"`. Use `"SANDBOX"` for development and testing. */
38
34
  environment?: Environment;
35
+ /** The initial page of the TightApp that should open on the initial render. Defaults to the Financial Overview */
36
+ initialNav?: NavState;
39
37
  };
40
38
 
41
39
  declare function BankAccountForm({ bankAccountId }: BankAccountFormProps): JSX.Element;
@@ -73,7 +71,7 @@ declare type BankTransactionType = "EXPENSE" | "REVENUE" | "TRANSFER_IN" | "TRAN
73
71
  *
74
72
  * @see NavState
75
73
  */
76
- export declare type BasePage = "FinancialOverviewDashboard";
74
+ export declare type BasePage = "FinancialOverview";
77
75
 
78
76
  /**
79
77
  * A standalone drawer for rendering a conversation that is not attached to an entity.
@@ -142,6 +140,8 @@ declare type FinancialOverviewDashboardProps = {
142
140
  onChangePeriod?: (period: Period) => void;
143
141
  };
144
142
 
143
+ declare type FinancialOverviewPageProps = Pick<FinancialOverviewDashboardProps, "period">;
144
+
145
145
  declare function FinancialSummaryDrawer({ summaryId, conversationId }: FinancialSummaryDrawerProps): JSX.Element;
146
146
 
147
147
  declare type FinancialSummaryDrawerProps = {
@@ -185,11 +185,11 @@ declare type MobileConversationDrawerProps = {
185
185
  * @example
186
186
  * ```TypeScript
187
187
  * // Navigate to a top-level page
188
- * const nav: NavState = { page: "FinancialOverviewDashboard" };
188
+ * const nav: NavState = { page: "FinancialOverview" };
189
189
  *
190
190
  * // Navigate to a specific anchor section
191
191
  * const navWithAnchor: NavState = {
192
- * page: "FinancialOverviewDashboard",
192
+ * page: "FinancialOverview",
193
193
  * anchor: "conversations-section",
194
194
  * };
195
195
  *
@@ -211,6 +211,7 @@ export declare type NavState = {
211
211
  page: P;
212
212
  anchor?: P extends keyof PageAnchorMap ? AnchorFor<P> : never;
213
213
  drawer?: DrawerNavObject;
214
+ pageProps?: P extends keyof PagePropsMap ? PagePropsMap[P] : never;
214
215
  };
215
216
  }[BasePage];
216
217
 
@@ -237,7 +238,7 @@ declare type OptionSetter = (options: Partial<ExternalOptions>, replace?: boolea
237
238
  *
238
239
  */
239
240
  declare const PAGE_ANCHOR_MAP: {
240
- readonly FinancialOverviewDashboard: {
241
+ readonly FinancialOverview: {
241
242
  readonly CONVERSATIONS: "conversations-section";
242
243
  readonly TRANSACTIONS: "transactions-section";
243
244
  };
@@ -245,6 +246,10 @@ declare const PAGE_ANCHOR_MAP: {
245
246
 
246
247
  declare type PageAnchorMap = typeof PAGE_ANCHOR_MAP;
247
248
 
249
+ declare type PagePropsMap = {
250
+ FinancialOverview: FinancialOverviewPageProps;
251
+ };
252
+
248
253
  /**
249
254
  * Parses a URL string into a `NavObject` for use as the `navObject` prop on `<App />`.
250
255
  *
@@ -256,13 +261,13 @@ declare type PageAnchorMap = typeof PAGE_ANCHOR_MAP;
256
261
  *
257
262
  * @example
258
263
  * ```TypeScript
259
- * const nav = parseNavUrl("https://app.example.com?bkPage=FinancialOverviewDashboard");
260
- * // nav = { page: "FinancialOverviewDashboard" }
264
+ * const nav = parseNavUrl("https://app.example.com?bkPage=FinancialOverview");
265
+ * // nav = { page: "FinancialOverview" }
261
266
  *
262
267
  * const navWithAnchor = parseNavUrl(
263
- * "https://app.example.com?bkPage=FinancialOverviewDashboard&bkAnchor=conversations-section"
268
+ * "https://app.example.com?bkPage=FinancialOverview&bkAnchor=conversations-section"
264
269
  * );
265
- * // navWithAnchor = { page: "FinancialOverviewDashboard", anchor: "conversations-section" }
270
+ * // navWithAnchor = { page: "FinancialOverview", anchor: "conversations-section" }
266
271
  * ```
267
272
  */
268
273
  export declare function parseNavUrl(url: string): NavState | undefined;
@@ -282,30 +287,27 @@ declare const PLAID_EVENTS: {
282
287
 
283
288
  declare type PlaidEvent = ValueOf<typeof PLAID_EVENTS>;
284
289
 
290
+ export declare function ReportDashboard(): JSX.Element;
291
+
285
292
  declare const SUPPORTED_INTEGRATION_IDENTIFIERS: readonly ["UNIT", "STRIPE", "GUSTO", "SHOPIFY", "SQUARE", "RUTTER", "UBER", "MOOV", "QUALPAY", "MANUAL_ENTRY", "PARTNER_IMPLEMENTATION", "QBO", "XERO", "FRESHBOOKS"];
286
293
 
287
294
  export declare function Tight({ children, environment, accessToken }: TightProps): JSX.Element;
288
295
 
289
296
  /**
290
- * The root component of the Tight application.
291
- *
292
- * Wraps all dashboard views in a shared `MemoryRouter` and navigation context.
293
- * Navigation state is driven externally via the `navState` prop, making the
294
- * component fully controlled — the host application owns navigation state.
297
+ * All-in-one component that provides simple and easy consumption of Tight Embedded Components.
295
298
  *
296
299
  * @param accessToken - Bearer token used to authenticate API requests.
297
300
  * @param environment - Selects the Tight API environment (`"PRODUCTION"` or `"SANDBOX"`). Defaults to `"PRODUCTION"`.
298
- * @param navState - The current navigation target. Controls page, anchor, and open drawer.
299
- * @param onNavigate - Callback fired when the user triggers an internal navigation event.
301
+ * @param initialNav - The initial page of the TightApp that should open on the initial render. Defaults to the Financial Overview
300
302
  *
301
303
  * @example
302
304
  * ```TypeScript
303
- * const [nav, setNav] = useState<NavState>({ page: "FinancialOverviewDashboard" });
305
+ * const initialTightPage = { page: "FinancialOverview" };
304
306
  *
305
- * <TightApp accessToken={accessToken} navState={nav} onNavigate={setNav} />
307
+ * <TightApp accessToken={accessToken} initialNav={initialTightPage} />
306
308
  * ```
307
309
  */
308
- export declare function TightApp({ accessToken, environment, navState, onNavigate }: AppProps): JSX.Element;
310
+ export declare function TightApp({ accessToken, environment, initialNav }: AppProps): JSX.Element;
309
311
 
310
312
  declare type TightProps = PropsWithChildren<{
311
313
  environment: Environment;
@@ -331,7 +333,7 @@ declare const TransactionTableColumns: {
331
333
  readonly DESCRIPTION: "description";
332
334
  readonly AMOUNT: "amount";
333
335
  readonly CATEGORY: "category";
334
- readonly CLASS_SEGMENT: "classSegment";
336
+ readonly DIMENSION_VALUE: "dimensionValue";
335
337
  readonly REVIEW_STATUS: "reviewStatus";
336
338
  readonly COMMENTS: "comments";
337
339
  };