@layerfi/components 0.1.75 → 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, }: {
@@ -3050,41 +3039,102 @@ declare module '@layerfi/components/components/ProfitAndLossReport/ProfitAndLoss
3050
3039
  declare module '@layerfi/components/components/ProfitAndLossReport/index' {
3051
3040
  export { ProfitAndLossReport } from '@layerfi/components/components/ProfitAndLossReport/ProfitAndLossReport';
3052
3041
 
3053
- }
3054
- declare module '@layerfi/components/components/ProfitAndLossSummaries/MiniChart' {
3055
- import React from 'react';
3056
- import { LineBaseItem } from '@layerfi/components/types/line_item';
3057
- export interface MiniChartProps {
3058
- data: LineBaseItem[];
3059
- chartColorsList?: string[];
3060
- }
3061
- export const MiniChart: ({ data, chartColorsList }: MiniChartProps) => React.JSX.Element;
3062
-
3063
3042
  }
3064
3043
  declare module '@layerfi/components/components/ProfitAndLossSummaries/ProfitAndLossSummaries' {
3065
- import React from 'react';
3044
+ import React, { type ReactNode } from 'react';
3045
+ import type { Variants } from '@layerfi/components/utils/styleUtils/sizeVariants';
3066
3046
  export interface ProfitAndLossSummariesStringOverrides {
3067
3047
  revenueLabel?: string;
3068
3048
  expensesLabel?: string;
3069
3049
  netProfitLabel?: string;
3070
3050
  }
3071
3051
  type ProfitAndLossSummariesProps = {
3072
- vertical?: boolean;
3073
3052
  actionable?: boolean;
3053
+ stringOverrides?: ProfitAndLossSummariesStringOverrides;
3054
+ chartColorsList?: string[];
3055
+ variants?: Variants;
3074
3056
  /**
3075
3057
  * @deprecated Use `stringOverrides.revenueLabel` instead
3076
3058
  */
3077
3059
  revenueLabel?: string;
3078
- stringOverrides?: ProfitAndLossSummariesStringOverrides;
3079
- chartColorsList?: string[];
3060
+ /**
3061
+ * @deprecated Orientation is determined by the container size
3062
+ */
3063
+ vertical?: boolean;
3080
3064
  };
3081
- 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;
3082
3072
  export {};
3083
3073
 
3084
3074
  }
3085
3075
  declare module '@layerfi/components/components/ProfitAndLossSummaries/index' {
3086
3076
  export { ProfitAndLossSummaries } from '@layerfi/components/components/ProfitAndLossSummaries/ProfitAndLossSummaries';
3087
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
+
3088
3138
  }
3089
3139
  declare module '@layerfi/components/components/ProfitAndLossTable/ProfitAndLossCompareTable' {
3090
3140
  import React from 'react';
@@ -3637,23 +3687,6 @@ declare module '@layerfi/components/components/Tooltip/useTooltip' {
3637
3687
  disabled: boolean | undefined;
3638
3688
  };
3639
3689
 
3640
- }
3641
- declare module '@layerfi/components/components/TransactionToReviewCard/TransactionToReviewCard' {
3642
- import React from 'react';
3643
- export interface TransactionToReviewCardProps {
3644
- onClick?: () => void;
3645
- usePnlDateRange?: boolean;
3646
- tagFilter?: {
3647
- key: string;
3648
- values: string[];
3649
- };
3650
- }
3651
- export const TransactionToReviewCard: ({ onClick, usePnlDateRange, tagFilter, }: TransactionToReviewCardProps) => React.JSX.Element;
3652
-
3653
- }
3654
- declare module '@layerfi/components/components/TransactionToReviewCard/index' {
3655
- export { TransactionToReviewCard } from '@layerfi/components/components/TransactionToReviewCard/TransactionToReviewCard';
3656
-
3657
3690
  }
3658
3691
  declare module '@layerfi/components/components/Typography/ErrorText' {
3659
3692
  import React from 'react';
@@ -3768,15 +3801,20 @@ declare module '@layerfi/components/components/ViewHeader/ViewHeader' {
3768
3801
  declare module '@layerfi/components/components/ViewHeader/index' {
3769
3802
  export { ViewHeader } from '@layerfi/components/components/ViewHeader/ViewHeader';
3770
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
+
3771
3813
  }
3772
3814
  declare module '@layerfi/components/config/charts' {
3773
3815
  export const INACTIVE_OPACITY_LEVELS: number[];
3774
3816
  export const DEFAULT_CHART_OPACITY: number[];
3775
3817
  export const DEFAULT_CHART_COLOR_TYPE: string[];
3776
- export const DEFAULT_MINICHART_COLORS: {
3777
- color: string;
3778
- opacity: number;
3779
- }[];
3780
3818
  export const TASKS_CHARTS_COLORS: {
3781
3819
  done: string;
3782
3820
  pending: string;
@@ -5143,6 +5181,7 @@ declare module '@layerfi/components/providers/LayerProvider/LayerProvider' {
5143
5181
  url: string;
5144
5182
  scope: string;
5145
5183
  apiUrl: string;
5184
+ usePlaidSandbox: boolean;
5146
5185
  };
5147
5186
  export const LayerEnvironment: Record<string, LayerEnvironmentConfig>;
5148
5187
  export type EventCallbacks = {
@@ -5585,7 +5624,7 @@ declare module '@layerfi/components/types/layer_context' {
5585
5624
  apiUrl: string;
5586
5625
  theme?: LayerThemeConfig;
5587
5626
  colors: ColorsPalette;
5588
- usePlaidSandbox?: boolean;
5627
+ usePlaidSandbox: boolean;
5589
5628
  onboardingStep?: OnboardingStep;
5590
5629
  environment: string;
5591
5630
  toasts: (ToastProps & {
@@ -6176,12 +6215,32 @@ declare module '@layerfi/components/utils/profitAndLossUtils' {
6176
6215
  export const humanizeTitle: (sidebarView: SidebarScope) => "Expenses" | "Revenue" | "Profit & Loss";
6177
6216
  export const applyShare: (items: LineBaseItem[], total: number) => LineBaseItem[];
6178
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
+
6179
6237
  }
6180
6238
  declare module '@layerfi/components/views/AccountingOverview/AccountingOverview' {
6181
6239
  import React, { ReactNode } from 'react';
6182
6240
  import { ProfitAndLossDetailedChartsStringOverrides } from '@layerfi/components/components/ProfitAndLossDetailedCharts/ProfitAndLossDetailedCharts';
6183
6241
  import { ProfitAndLossSummariesStringOverrides } from '@layerfi/components/components/ProfitAndLossSummaries/ProfitAndLossSummaries';
6184
6242
  import { OnboardingStep } from '@layerfi/components/types/layer_context';
6243
+ import type { Variants } from '@layerfi/components/utils/styleUtils/sizeVariants';
6185
6244
  import { TagOption } from '@layerfi/components/views/ProjectProfitability/ProjectProfitability';
6186
6245
  interface AccountingOverviewStringOverrides {
6187
6246
  header?: string;
@@ -6201,14 +6260,37 @@ declare module '@layerfi/components/views/AccountingOverview/AccountingOverview'
6201
6260
  stringOverrides?: AccountingOverviewStringOverrides;
6202
6261
  tagFilter?: TagOption;
6203
6262
  showTransactionsToReview?: boolean;
6263
+ slotProps?: {
6264
+ profitAndLoss?: {
6265
+ summaries?: {
6266
+ variants?: Variants;
6267
+ };
6268
+ };
6269
+ };
6204
6270
  }
6205
- 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;
6206
6272
  export {};
6207
6273
 
6208
6274
  }
6209
6275
  declare module '@layerfi/components/views/AccountingOverview/index' {
6210
6276
  export { AccountingOverview } from '@layerfi/components/views/AccountingOverview/AccountingOverview';
6211
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
+
6212
6294
  }
6213
6295
  declare module '@layerfi/components/views/BankTransactionsWithLinkedAccounts/BankTransactionsWithLinkedAccounts' {
6214
6296
  import React from 'react';
@@ -6246,8 +6328,8 @@ declare module '@layerfi/components/views/BookkeepingOverview/BookkeepingOvervie
6246
6328
  import { ProfitAndLossDetailedChartsStringOverrides } from '@layerfi/components/components/ProfitAndLossDetailedCharts/ProfitAndLossDetailedCharts';
6247
6329
  import { ProfitAndLossSummariesStringOverrides } from '@layerfi/components/components/ProfitAndLossSummaries/ProfitAndLossSummaries';
6248
6330
  import { TasksStringOverrides } from '@layerfi/components/components/Tasks/Tasks';
6331
+ import { Variants } from '@layerfi/components/utils/styleUtils/sizeVariants';
6249
6332
  export interface BookkeepingOverviewProps {
6250
- title?: string;
6251
6333
  showTitle?: boolean;
6252
6334
  stringOverrides?: {
6253
6335
  title?: string;
@@ -6258,13 +6340,29 @@ declare module '@layerfi/components/views/BookkeepingOverview/BookkeepingOvervie
6258
6340
  summaries?: ProfitAndLossSummariesStringOverrides;
6259
6341
  };
6260
6342
  };
6343
+ slotProps?: {
6344
+ profitAndLoss?: {
6345
+ summaries?: {
6346
+ variants?: Variants;
6347
+ };
6348
+ };
6349
+ };
6350
+ /**
6351
+ * @deprecated Use `stringOverrides.title` instead
6352
+ */
6353
+ title?: string;
6261
6354
  }
6262
- export const BookkeepingOverview: ({ title, showTitle, stringOverrides, }: BookkeepingOverviewProps) => React.JSX.Element;
6355
+ export const BookkeepingOverview: ({ title, showTitle, stringOverrides, slotProps, }: BookkeepingOverviewProps) => React.JSX.Element;
6263
6356
 
6264
6357
  }
6265
6358
  declare module '@layerfi/components/views/BookkeepingOverview/index' {
6266
6359
  export { BookkeepingOverview } from '@layerfi/components/views/BookkeepingOverview/BookkeepingOverview';
6267
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
+
6268
6366
  }
6269
6367
  declare module '@layerfi/components/views/GeneralLedger/GeneralLedger' {
6270
6368
  import React from 'react';