@layerfi/components 0.1.74 → 0.1.76

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.d.ts CHANGED
@@ -2647,20 +2647,6 @@ declare module '@layerfi/components/components/MatchForm/index' {
2647
2647
  export { MatchForm } from '@layerfi/components/components/MatchForm/MatchForm';
2648
2648
  export { MatchFormMobile } from '@layerfi/components/components/MatchForm/MatchFormMobile';
2649
2649
 
2650
- }
2651
- declare module '@layerfi/components/components/NotificationCard/NotificationCard' {
2652
- import React, { ReactNode } from 'react';
2653
- export interface NotificationCardProps {
2654
- onClick: () => void;
2655
- children: ReactNode;
2656
- className?: string;
2657
- }
2658
- export const NotificationCard: ({ onClick, children, className, }: NotificationCardProps) => React.JSX.Element;
2659
-
2660
- }
2661
- declare module '@layerfi/components/components/NotificationCard/index' {
2662
- export { NotificationCard } from '@layerfi/components/components/NotificationCard/NotificationCard';
2663
-
2664
2650
  }
2665
2651
  declare module '@layerfi/components/components/Onboarding/ConnectAccount' {
2666
2652
  import React from 'react';
@@ -2813,12 +2799,15 @@ declare module '@layerfi/components/components/ProfitAndLoss/ProfitAndLoss' {
2813
2799
  }>;
2814
2800
  DatePicker: ({ allowedDatePickerModes, datePickerMode: deprecated_datePickerMode, defaultDatePickerMode, customDateRanges, }: import("@layerfi/components/views/Reports/reportTypes").TimeRangePickerConfig) => React.JSX.Element;
2815
2801
  CompareOptions: ({ tagComparisonOptions, defaultTagFilter: defaultOption, }: import("@layerfi/components/components/ProfitAndLossCompareOptions/index").ProfitAndLossCompareOptionsProps) => React.JSX.Element;
2816
- Summaries: ({ vertical, actionable, revenueLabel, stringOverrides, chartColorsList, }: {
2817
- vertical?: boolean | undefined;
2802
+ Summaries: (props: {
2818
2803
  actionable?: boolean | undefined;
2819
- revenueLabel?: string | undefined;
2820
2804
  stringOverrides?: import("@layerfi/components/components/ProfitAndLossSummaries/ProfitAndLossSummaries").ProfitAndLossSummariesStringOverrides | undefined;
2821
2805
  chartColorsList?: string[] | undefined;
2806
+ variants?: Partial<{
2807
+ size: "lg" | "sm";
2808
+ }> | undefined;
2809
+ revenueLabel?: string | undefined;
2810
+ vertical?: boolean | undefined;
2822
2811
  }) => React.JSX.Element;
2823
2812
  Table: (props: import("@layerfi/components/components/ProfitAndLossTable/ProfitAndLossTableComponent").ProfitAndLossTableProps) => React.JSX.Element;
2824
2813
  DetailedCharts: ({ scope, hideClose, showDatePicker, chartColorsList, stringOverrides, }: {
@@ -2894,7 +2883,6 @@ declare module '@layerfi/components/components/ProfitAndLossCompareOptions/Profi
2894
2883
  tagKey: string;
2895
2884
  tagValues: string[];
2896
2885
  } | 'None';
2897
- export const tagFilterToQueryString: (tagFilter: TagFilterInput) => string;
2898
2886
  export const ProfitAndLossCompareOptions: ({ tagComparisonOptions, defaultTagFilter: defaultOption, }: ProfitAndLossCompareOptionsProps) => React.JSX.Element;
2899
2887
 
2900
2888
  }
@@ -3051,41 +3039,102 @@ declare module '@layerfi/components/components/ProfitAndLossReport/ProfitAndLoss
3051
3039
  declare module '@layerfi/components/components/ProfitAndLossReport/index' {
3052
3040
  export { ProfitAndLossReport } from '@layerfi/components/components/ProfitAndLossReport/ProfitAndLossReport';
3053
3041
 
3054
- }
3055
- declare module '@layerfi/components/components/ProfitAndLossSummaries/MiniChart' {
3056
- import React from 'react';
3057
- import { LineBaseItem } from '@layerfi/components/types/line_item';
3058
- export interface MiniChartProps {
3059
- data: LineBaseItem[];
3060
- chartColorsList?: string[];
3061
- }
3062
- export const MiniChart: ({ data, chartColorsList }: MiniChartProps) => React.JSX.Element;
3063
-
3064
3042
  }
3065
3043
  declare module '@layerfi/components/components/ProfitAndLossSummaries/ProfitAndLossSummaries' {
3066
- import React from 'react';
3044
+ import React, { type ReactNode } from 'react';
3045
+ import type { Variants } from '@layerfi/components/utils/styleUtils/sizeVariants';
3067
3046
  export interface ProfitAndLossSummariesStringOverrides {
3068
3047
  revenueLabel?: string;
3069
3048
  expensesLabel?: string;
3070
3049
  netProfitLabel?: string;
3071
3050
  }
3072
3051
  type ProfitAndLossSummariesProps = {
3073
- vertical?: boolean;
3074
3052
  actionable?: boolean;
3053
+ stringOverrides?: ProfitAndLossSummariesStringOverrides;
3054
+ chartColorsList?: string[];
3055
+ variants?: Variants;
3075
3056
  /**
3076
3057
  * @deprecated Use `stringOverrides.revenueLabel` instead
3077
3058
  */
3078
3059
  revenueLabel?: string;
3079
- stringOverrides?: ProfitAndLossSummariesStringOverrides;
3080
- chartColorsList?: string[];
3060
+ /**
3061
+ * @deprecated Orientation is determined by the container size
3062
+ */
3063
+ vertical?: boolean;
3081
3064
  };
3082
- export const ProfitAndLossSummaries: ({ vertical, actionable, revenueLabel, stringOverrides, chartColorsList, }: ProfitAndLossSummariesProps) => React.JSX.Element;
3065
+ type Internal_ProfitAndLossSummariesProps = {
3066
+ slots?: {
3067
+ unstable_AdditionalListItems?: [ReactNode];
3068
+ };
3069
+ } & ProfitAndLossSummariesProps;
3070
+ export function Internal_ProfitAndLossSummaries({ actionable, revenueLabel, stringOverrides, chartColorsList, slots, variants, }: Internal_ProfitAndLossSummariesProps): React.JSX.Element;
3071
+ export const ProfitAndLossSummaries: (props: ProfitAndLossSummariesProps) => React.JSX.Element;
3083
3072
  export {};
3084
3073
 
3085
3074
  }
3086
3075
  declare module '@layerfi/components/components/ProfitAndLossSummaries/index' {
3087
3076
  export { ProfitAndLossSummaries } from '@layerfi/components/components/ProfitAndLossSummaries/ProfitAndLossSummaries';
3088
3077
 
3078
+ }
3079
+ declare module '@layerfi/components/components/ProfitAndLossSummaries/internal/ProfitAndLossSummariesHeading' {
3080
+ import { PropsWithChildren } from 'react';
3081
+ import React from 'react';
3082
+ import type { Variants } from '@layerfi/components/utils/styleUtils/sizeVariants';
3083
+ type ProfitAndLossSummariesHeadingProps = {
3084
+ variants?: Variants;
3085
+ } & PropsWithChildren;
3086
+ export function ProfitAndLossSummariesHeading({ variants, children, }: ProfitAndLossSummariesHeadingProps): React.JSX.Element;
3087
+ export {};
3088
+
3089
+ }
3090
+ declare module '@layerfi/components/components/ProfitAndLossSummaries/internal/ProfitAndLossSummariesList' {
3091
+ import React, { type PropsWithChildren } from 'react';
3092
+ type ProfitAndLossSummariesListItemProps = PropsWithChildren<{
3093
+ isActive?: boolean;
3094
+ onClick?: () => void;
3095
+ }>;
3096
+ export function ProfitAndLossSummariesListItem({ children, isActive, onClick, }: ProfitAndLossSummariesListItemProps): React.JSX.Element;
3097
+ type ProfitAndLossSummariesListProps = PropsWithChildren<{
3098
+ itemCount?: number;
3099
+ }>;
3100
+ export function ProfitAndLossSummariesList({ children, itemCount, }: ProfitAndLossSummariesListProps): React.JSX.Element;
3101
+ export {};
3102
+
3103
+ }
3104
+ declare module '@layerfi/components/components/ProfitAndLossSummaries/internal/ProfitAndLossSummariesMiniChart' {
3105
+ import React from 'react';
3106
+ import type { Scope } from '@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss';
3107
+ import type { ProfitAndLoss } from '@layerfi/components/types';
3108
+ import type { LineBaseItem } from '@layerfi/components/types/line_item';
3109
+ import { Variants } from '@layerfi/components/utils/styleUtils/sizeVariants';
3110
+ export function toMiniChartData({ scope, data, }: {
3111
+ scope: Scope;
3112
+ data?: ProfitAndLoss;
3113
+ }): LineBaseItem[];
3114
+ type ProfitAndLossMiniChartProps = {
3115
+ data: LineBaseItem[];
3116
+ chartColorsList?: string[];
3117
+ variants?: Variants;
3118
+ };
3119
+ export function ProfitAndLossSummariesMiniChart({ data, chartColorsList, variants, }: ProfitAndLossMiniChartProps): React.JSX.Element;
3120
+ export {};
3121
+
3122
+ }
3123
+ declare module '@layerfi/components/components/ProfitAndLossSummaries/internal/ProfitAndLossSummariesSummary' {
3124
+ import React, { type ReactNode } from 'react';
3125
+ import type { Variants } from '@layerfi/components/utils/styleUtils/sizeVariants';
3126
+ type ProfitAndLossSummariesSummaryProps = {
3127
+ label: string;
3128
+ amount: number;
3129
+ isLoading?: boolean;
3130
+ slots?: {
3131
+ Chart: ReactNode;
3132
+ };
3133
+ variants?: Variants;
3134
+ };
3135
+ export function ProfitAndLossSummariesSummary({ label, amount, isLoading, slots, variants, }: ProfitAndLossSummariesSummaryProps): React.JSX.Element;
3136
+ export {};
3137
+
3089
3138
  }
3090
3139
  declare module '@layerfi/components/components/ProfitAndLossTable/ProfitAndLossCompareTable' {
3091
3140
  import React from 'react';
@@ -3638,23 +3687,6 @@ declare module '@layerfi/components/components/Tooltip/useTooltip' {
3638
3687
  disabled: boolean | undefined;
3639
3688
  };
3640
3689
 
3641
- }
3642
- declare module '@layerfi/components/components/TransactionToReviewCard/TransactionToReviewCard' {
3643
- import React from 'react';
3644
- export interface TransactionToReviewCardProps {
3645
- onClick?: () => void;
3646
- usePnlDateRange?: boolean;
3647
- tagFilter?: {
3648
- key: string;
3649
- values: string[];
3650
- };
3651
- }
3652
- export const TransactionToReviewCard: ({ onClick, usePnlDateRange, tagFilter, }: TransactionToReviewCardProps) => React.JSX.Element;
3653
-
3654
- }
3655
- declare module '@layerfi/components/components/TransactionToReviewCard/index' {
3656
- export { TransactionToReviewCard } from '@layerfi/components/components/TransactionToReviewCard/TransactionToReviewCard';
3657
-
3658
3690
  }
3659
3691
  declare module '@layerfi/components/components/Typography/ErrorText' {
3660
3692
  import React from 'react';
@@ -3769,15 +3801,20 @@ declare module '@layerfi/components/components/ViewHeader/ViewHeader' {
3769
3801
  declare module '@layerfi/components/components/ViewHeader/index' {
3770
3802
  export { ViewHeader } from '@layerfi/components/components/ViewHeader/ViewHeader';
3771
3803
 
3804
+ }
3805
+ declare module '@layerfi/components/components/ui/Stack' {
3806
+ import React, { type PropsWithChildren } from 'react';
3807
+ export type StackProps = PropsWithChildren<{
3808
+ gap?: '3xs' | '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '5xl';
3809
+ align?: 'start';
3810
+ }>;
3811
+ export function VStack({ align, children, gap }: StackProps): React.JSX.Element;
3812
+
3772
3813
  }
3773
3814
  declare module '@layerfi/components/config/charts' {
3774
3815
  export const INACTIVE_OPACITY_LEVELS: number[];
3775
3816
  export const DEFAULT_CHART_OPACITY: number[];
3776
3817
  export const DEFAULT_CHART_COLOR_TYPE: string[];
3777
- export const DEFAULT_MINICHART_COLORS: {
3778
- color: string;
3779
- opacity: number;
3780
- }[];
3781
3818
  export const TASKS_CHARTS_COLORS: {
3782
3819
  done: string;
3783
3820
  pending: string;
@@ -5144,6 +5181,7 @@ declare module '@layerfi/components/providers/LayerProvider/LayerProvider' {
5144
5181
  url: string;
5145
5182
  scope: string;
5146
5183
  apiUrl: string;
5184
+ usePlaidSandbox: boolean;
5147
5185
  };
5148
5186
  export const LayerEnvironment: Record<string, LayerEnvironmentConfig>;
5149
5187
  export type EventCallbacks = {
@@ -5586,7 +5624,7 @@ declare module '@layerfi/components/types/layer_context' {
5586
5624
  apiUrl: string;
5587
5625
  theme?: LayerThemeConfig;
5588
5626
  colors: ColorsPalette;
5589
- usePlaidSandbox?: boolean;
5627
+ usePlaidSandbox: boolean;
5590
5628
  onboardingStep?: OnboardingStep;
5591
5629
  environment: string;
5592
5630
  toasts: (ToastProps & {
@@ -6177,12 +6215,32 @@ declare module '@layerfi/components/utils/profitAndLossUtils' {
6177
6215
  export const humanizeTitle: (sidebarView: SidebarScope) => "Expenses" | "Revenue" | "Profit & Loss";
6178
6216
  export const applyShare: (items: LineBaseItem[], total: number) => LineBaseItem[];
6179
6217
 
6218
+ }
6219
+ declare module '@layerfi/components/utils/styleUtils/sizeVariants' {
6220
+ const SIZE_VARIANTS: readonly ["sm", "lg"];
6221
+ type SizeVariant = (typeof SIZE_VARIANTS)[number];
6222
+ export type Variants = Partial<{
6223
+ size: SizeVariant;
6224
+ }>;
6225
+ export {};
6226
+
6227
+ }
6228
+ declare module '@layerfi/components/utils/styleUtils/toDataProperties' {
6229
+ type AllowedDataValue = string | number | true;
6230
+ type DataPrefix<T extends string> = `data-${T}`;
6231
+ type DataProperties<T> = {
6232
+ [K in keyof T as DataPrefix<Extract<K, string>>]: T[K] extends AllowedDataValue ? T[K] : never;
6233
+ };
6234
+ export function toDataProperties<T extends Record<string, unknown>>(input: T): DataProperties<T>;
6235
+ export {};
6236
+
6180
6237
  }
6181
6238
  declare module '@layerfi/components/views/AccountingOverview/AccountingOverview' {
6182
6239
  import React, { ReactNode } from 'react';
6183
6240
  import { ProfitAndLossDetailedChartsStringOverrides } from '@layerfi/components/components/ProfitAndLossDetailedCharts/ProfitAndLossDetailedCharts';
6184
6241
  import { ProfitAndLossSummariesStringOverrides } from '@layerfi/components/components/ProfitAndLossSummaries/ProfitAndLossSummaries';
6185
6242
  import { OnboardingStep } from '@layerfi/components/types/layer_context';
6243
+ import type { Variants } from '@layerfi/components/utils/styleUtils/sizeVariants';
6186
6244
  import { TagOption } from '@layerfi/components/views/ProjectProfitability/ProjectProfitability';
6187
6245
  interface AccountingOverviewStringOverrides {
6188
6246
  header?: string;
@@ -6202,14 +6260,37 @@ declare module '@layerfi/components/views/AccountingOverview/AccountingOverview'
6202
6260
  stringOverrides?: AccountingOverviewStringOverrides;
6203
6261
  tagFilter?: TagOption;
6204
6262
  showTransactionsToReview?: boolean;
6263
+ slotProps?: {
6264
+ profitAndLoss?: {
6265
+ summaries?: {
6266
+ variants?: Variants;
6267
+ };
6268
+ };
6269
+ };
6205
6270
  }
6206
- export const AccountingOverview: ({ title, showTitle, enableOnboarding, onboardingStepOverride, onTransactionsToReviewClick, middleBanner, chartColorsList, stringOverrides, tagFilter, showTransactionsToReview, }: AccountingOverviewProps) => React.JSX.Element;
6271
+ export const AccountingOverview: ({ title, showTitle, enableOnboarding, onboardingStepOverride, onTransactionsToReviewClick, middleBanner, chartColorsList, stringOverrides, tagFilter, showTransactionsToReview, slotProps, }: AccountingOverviewProps) => React.JSX.Element;
6207
6272
  export {};
6208
6273
 
6209
6274
  }
6210
6275
  declare module '@layerfi/components/views/AccountingOverview/index' {
6211
6276
  export { AccountingOverview } from '@layerfi/components/views/AccountingOverview/AccountingOverview';
6212
6277
 
6278
+ }
6279
+ declare module '@layerfi/components/views/AccountingOverview/internal/TransactionsToReview' {
6280
+ import React from 'react';
6281
+ import type { Variants } from '@layerfi/components/utils/styleUtils/sizeVariants';
6282
+ type TransactionsToReviewProps = {
6283
+ onClick?: () => void;
6284
+ usePnlDateRange?: boolean;
6285
+ tagFilter?: {
6286
+ key: string;
6287
+ values: string[];
6288
+ };
6289
+ variants?: Variants;
6290
+ };
6291
+ export function TransactionsToReview({ onClick, usePnlDateRange, tagFilter, variants, }: TransactionsToReviewProps): React.JSX.Element;
6292
+ export {};
6293
+
6213
6294
  }
6214
6295
  declare module '@layerfi/components/views/BankTransactionsWithLinkedAccounts/BankTransactionsWithLinkedAccounts' {
6215
6296
  import React from 'react';
@@ -6247,8 +6328,8 @@ declare module '@layerfi/components/views/BookkeepingOverview/BookkeepingOvervie
6247
6328
  import { ProfitAndLossDetailedChartsStringOverrides } from '@layerfi/components/components/ProfitAndLossDetailedCharts/ProfitAndLossDetailedCharts';
6248
6329
  import { ProfitAndLossSummariesStringOverrides } from '@layerfi/components/components/ProfitAndLossSummaries/ProfitAndLossSummaries';
6249
6330
  import { TasksStringOverrides } from '@layerfi/components/components/Tasks/Tasks';
6331
+ import { Variants } from '@layerfi/components/utils/styleUtils/sizeVariants';
6250
6332
  export interface BookkeepingOverviewProps {
6251
- title?: string;
6252
6333
  showTitle?: boolean;
6253
6334
  stringOverrides?: {
6254
6335
  title?: string;
@@ -6259,13 +6340,29 @@ declare module '@layerfi/components/views/BookkeepingOverview/BookkeepingOvervie
6259
6340
  summaries?: ProfitAndLossSummariesStringOverrides;
6260
6341
  };
6261
6342
  };
6343
+ slotProps?: {
6344
+ profitAndLoss?: {
6345
+ summaries?: {
6346
+ variants?: Variants;
6347
+ };
6348
+ };
6349
+ };
6350
+ /**
6351
+ * @deprecated Use `stringOverrides.title` instead
6352
+ */
6353
+ title?: string;
6262
6354
  }
6263
- export const BookkeepingOverview: ({ title, showTitle, stringOverrides, }: BookkeepingOverviewProps) => React.JSX.Element;
6355
+ export const BookkeepingOverview: ({ title, showTitle, stringOverrides, slotProps, }: BookkeepingOverviewProps) => React.JSX.Element;
6264
6356
 
6265
6357
  }
6266
6358
  declare module '@layerfi/components/views/BookkeepingOverview/index' {
6267
6359
  export { BookkeepingOverview } from '@layerfi/components/views/BookkeepingOverview/BookkeepingOverview';
6268
6360
 
6361
+ }
6362
+ declare module '@layerfi/components/views/BookkeepingOverview/internal/BookkeepingProfitAndLossSummariesContainer' {
6363
+ import React, { PropsWithChildren } from 'react';
6364
+ export function BookkeepingProfitAndLossSummariesContainer({ children, }: PropsWithChildren): React.JSX.Element;
6365
+
6269
6366
  }
6270
6367
  declare module '@layerfi/components/views/GeneralLedger/GeneralLedger' {
6271
6368
  import React from 'react';