@layerfi/components 0.1.81 → 0.1.83

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
@@ -444,28 +444,41 @@ declare module '@layerfi/components/api/layer/statement-of-cash-flow' {
444
444
  }
445
445
  declare module '@layerfi/components/api/layer/tasks' {
446
446
  import { FileMetadata } from '@layerfi/components/types/file_upload';
447
- import { TaskTypes } from '@layerfi/components/types/tasks';
447
+ import { Task } from '@layerfi/components/types/tasks';
448
448
  export const getTasks: (baseUrl: string, accessToken: string | undefined, options?: {
449
449
  params?: Record<string, string | undefined> | undefined;
450
450
  } | undefined) => () => Promise<{
451
- data: TaskTypes[];
451
+ data: Task[];
452
452
  }>;
453
453
  export const submitResponseToTask: (baseUrl: string, accessToken: string | undefined, options?: {
454
454
  params?: Record<string, string | undefined> | undefined;
455
455
  body?: Record<string, unknown> | undefined;
456
456
  } | undefined) => Promise<{
457
- data: TaskTypes;
457
+ data: Task;
458
+ }>;
459
+ export const updateUploadDocumentTaskDescription: (baseUrl: string, accessToken: string | undefined, options?: {
460
+ params?: Record<string, string | undefined> | undefined;
461
+ body?: Record<string, unknown> | undefined;
462
+ } | undefined) => Promise<{
463
+ data: Task;
458
464
  }>;
459
465
  export const markTaskAsComplete: (baseUrl: string, accessToken: string | undefined, options?: {
460
466
  params?: Record<string, string | undefined> | undefined;
461
467
  body?: Record<string, unknown> | undefined;
462
468
  } | undefined) => Promise<{
463
- data: TaskTypes;
469
+ data: Task;
464
470
  }>;
465
- export const completeTaskWithUpload: (baseUrl: string, accessToken?: string) => ({ businessId, taskId, file, }: {
471
+ export const deleteTaskUploads: (baseUrl: string, accessToken: string | undefined, options?: {
472
+ params?: Record<string, string | undefined> | undefined;
473
+ body?: Record<string, unknown> | undefined;
474
+ } | undefined) => Promise<{
475
+ data: Task;
476
+ }>;
477
+ export const completeTaskWithUpload: (baseUrl: string, accessToken?: string) => ({ businessId, taskId, files, description, }: {
466
478
  businessId: string;
467
479
  taskId: string;
468
- file: File;
480
+ files: File[];
481
+ description?: string;
469
482
  }) => Promise<{
470
483
  data: FileMetadata;
471
484
  errors: unknown;
@@ -730,12 +743,13 @@ declare module '@layerfi/components/api/layer' {
730
743
  getTasks: (baseUrl: string, accessToken: string | undefined, options?: {
731
744
  params?: Record<string, string | undefined> | undefined;
732
745
  } | undefined) => () => Promise<{
733
- data: import("@layerfi/components/types/tasks").TaskTypes[];
746
+ data: import("@layerfi/components/types/tasks").Task[];
734
747
  }>;
735
- completeTaskWithUpload: (baseUrl: string, accessToken?: string) => ({ businessId, taskId, file, }: {
748
+ completeTaskWithUpload: (baseUrl: string, accessToken?: string) => ({ businessId, taskId, files, description, }: {
736
749
  businessId: string;
737
750
  taskId: string;
738
- file: File;
751
+ files: File[];
752
+ description?: string;
739
753
  }) => Promise<{
740
754
  data: import("@layerfi/components/types/file_upload").FileMetadata;
741
755
  errors: unknown;
@@ -744,7 +758,19 @@ declare module '@layerfi/components/api/layer' {
744
758
  params?: Record<string, string | undefined> | undefined;
745
759
  body?: Record<string, unknown> | undefined;
746
760
  } | undefined) => Promise<{
747
- data: import("@layerfi/components/types/tasks").TaskTypes;
761
+ data: import("@layerfi/components/types/tasks").Task;
762
+ }>;
763
+ deleteTaskUploads: (baseUrl: string, accessToken: string | undefined, options?: {
764
+ params?: Record<string, string | undefined> | undefined;
765
+ body?: Record<string, unknown> | undefined;
766
+ } | undefined) => Promise<{
767
+ data: import("@layerfi/components/types/tasks").Task;
768
+ }>;
769
+ updateUploadDocumentTaskDescription: (baseUrl: string, accessToken: string | undefined, options?: {
770
+ params?: Record<string, string | undefined> | undefined;
771
+ body?: Record<string, unknown> | undefined;
772
+ } | undefined) => Promise<{
773
+ data: import("@layerfi/components/types/tasks").Task;
748
774
  }>;
749
775
  breakPlaidItemConnection: (baseUrl: string, accessToken: string | undefined, options?: {
750
776
  params?: {
@@ -1968,10 +1994,12 @@ declare module '@layerfi/components/components/DatePicker/DatePicker' {
1968
1994
  import React, { type FC } from 'react';
1969
1995
  import { CustomDateRange } from '@layerfi/components/components/DatePicker/DatePickerOptions';
1970
1996
  import type { DatePickerMode, DatePickerModeSelectorProps } from '@layerfi/components/components/DatePicker/ModeSelector/DatePickerModeSelector';
1997
+ type NavigationArrows = 'desktop' | 'mobile';
1971
1998
  interface DatePickerProps {
1972
1999
  mode: DatePickerMode;
1973
2000
  selected: Date | [Date | null, Date | null];
1974
2001
  onChange: (date: Date | [Date, Date | null]) => void;
2002
+ disabled?: boolean;
1975
2003
  allowedModes?: ReadonlyArray<DatePickerMode>;
1976
2004
  dateFormat?: string;
1977
2005
  timeIntervals?: number;
@@ -1984,13 +2012,13 @@ declare module '@layerfi/components/components/DatePicker/DatePicker' {
1984
2012
  currentDateOption?: boolean;
1985
2013
  minDate?: Date;
1986
2014
  maxDate?: Date;
1987
- navigateArrows?: boolean;
2015
+ navigateArrows?: NavigationArrows[];
1988
2016
  onChangeMode?: (mode: DatePickerMode) => void;
1989
2017
  slots?: {
1990
2018
  ModeSelector: FC<DatePickerModeSelectorProps>;
1991
2019
  };
1992
2020
  }
1993
- export const DatePicker: ({ selected, onChange, mode, allowedModes, dateFormat, timeIntervals, timeCaption, placeholderText: _placeholderText, customDateRanges, wrapperClassName, calendarClassName, popperClassName, minDate, maxDate, currentDateOption, navigateArrows, onChangeMode, slots, ...props }: DatePickerProps) => React.JSX.Element;
2021
+ export const DatePicker: ({ selected, onChange, disabled, mode, allowedModes, dateFormat, timeIntervals, timeCaption, placeholderText: _placeholderText, customDateRanges, wrapperClassName, calendarClassName, popperClassName, minDate, maxDate, currentDateOption, navigateArrows, onChangeMode, slots, ...props }: DatePickerProps) => React.JSX.Element;
1994
2022
  export {};
1995
2023
 
1996
2024
  }
@@ -2010,7 +2038,7 @@ declare module '@layerfi/components/components/DatePicker/DatePickerOptions' {
2010
2038
  declare module '@layerfi/components/components/DatePicker/ModeSelector/DatePickerModeSelector' {
2011
2039
  import React from 'react';
2012
2040
  export type SingularPickerMode = 'dayPicker' | 'timePicker';
2013
- export type RangePickerMode = 'dayRangePicker' | 'monthRangePicker' | 'monthPicker';
2041
+ export type RangePickerMode = 'dayRangePicker' | 'monthRangePicker' | 'monthPicker' | 'yearPicker';
2014
2042
  export type DatePickerMode = SingularPickerMode | RangePickerMode;
2015
2043
  export const DEFAULT_ALLOWED_PICKER_MODES: readonly ["monthPicker"];
2016
2044
  export type DatePickerModeSelectorProps = {
@@ -2269,13 +2297,14 @@ declare module '@layerfi/components/components/Input/FileInput' {
2269
2297
  import React from 'react';
2270
2298
  export interface FileInputProps {
2271
2299
  text?: string;
2272
- onUpload?: (file: File) => void;
2300
+ onUpload?: (files: File[]) => void;
2273
2301
  disabled?: boolean;
2274
2302
  secondary?: boolean;
2275
2303
  iconOnly?: boolean;
2276
2304
  icon?: React.ReactNode;
2305
+ allowMultipleUploads?: boolean;
2277
2306
  }
2278
- export const FileInput: ({ text, onUpload, disabled, secondary, iconOnly, icon, }: FileInputProps) => React.JSX.Element;
2307
+ export const FileInput: ({ text, onUpload, disabled, secondary, iconOnly, icon, allowMultipleUploads, }: FileInputProps) => React.JSX.Element;
2279
2308
 
2280
2309
  }
2281
2310
  declare module '@layerfi/components/components/Input/Input' {
@@ -3534,24 +3563,50 @@ declare module '@layerfi/components/components/Tasks/Tasks' {
3534
3563
  import { useTasks } from '@layerfi/components/hooks/useTasks/index';
3535
3564
  export type UseTasksContextType = ReturnType<typeof useTasks>;
3536
3565
  export const UseTasksContext: React.Context<{
3537
- data?: import("@layerfi/components/types/tasks").TaskTypes[];
3566
+ data?: import("@layerfi/components/types/tasks").Task[];
3567
+ monthlyData?: import("@layerfi/components/types/tasks").TasksMonthly[];
3538
3568
  isLoading?: boolean;
3539
3569
  loadedStatus?: import("@layerfi/components/types/general").LoadedStatus;
3540
3570
  isValidating?: boolean;
3541
3571
  error?: unknown;
3572
+ currentDate: Date;
3573
+ setCurrentDate: (date: Date) => void;
3574
+ dateRange: {
3575
+ startDate: Date;
3576
+ endDate: Date;
3577
+ };
3578
+ setDateRange: (props: {
3579
+ startDate: Date;
3580
+ endDate: Date;
3581
+ }) => void;
3542
3582
  refetch: () => void;
3543
3583
  submitResponseToTask: (taskId: string, userResponse: string) => void;
3544
- uploadDocumentForTask: (taskId: string, file: File) => void;
3584
+ uploadDocumentsForTask: (taskId: string, files: File[], description?: string) => Promise<void>;
3585
+ deleteUploadsForTask: (taskId: string) => void;
3586
+ updateDocUploadTaskDescription: (taskId: string, userResponse: string) => void;
3545
3587
  }>;
3546
3588
  export const useTasksContext: () => {
3547
- data?: import("@layerfi/components/types/tasks").TaskTypes[];
3589
+ data?: import("@layerfi/components/types/tasks").Task[];
3590
+ monthlyData?: import("@layerfi/components/types/tasks").TasksMonthly[];
3548
3591
  isLoading?: boolean;
3549
3592
  loadedStatus?: import("@layerfi/components/types/general").LoadedStatus;
3550
3593
  isValidating?: boolean;
3551
3594
  error?: unknown;
3595
+ currentDate: Date;
3596
+ setCurrentDate: (date: Date) => void;
3597
+ dateRange: {
3598
+ startDate: Date;
3599
+ endDate: Date;
3600
+ };
3601
+ setDateRange: (props: {
3602
+ startDate: Date;
3603
+ endDate: Date;
3604
+ }) => void;
3552
3605
  refetch: () => void;
3553
3606
  submitResponseToTask: (taskId: string, userResponse: string) => void;
3554
- uploadDocumentForTask: (taskId: string, file: File) => void;
3607
+ uploadDocumentsForTask: (taskId: string, files: File[], description?: string) => Promise<void>;
3608
+ deleteUploadsForTask: (taskId: string) => void;
3609
+ updateDocUploadTaskDescription: (taskId: string, userResponse: string) => void;
3555
3610
  };
3556
3611
  export interface TasksStringOverrides {
3557
3612
  header?: string;
@@ -3606,10 +3661,10 @@ declare module '@layerfi/components/components/TasksList/index' {
3606
3661
  }
3607
3662
  declare module '@layerfi/components/components/TasksListItem/TasksListItem' {
3608
3663
  import React from 'react';
3609
- import { TaskTypes } from '@layerfi/components/types/tasks';
3664
+ import { Task } from '@layerfi/components/types/tasks';
3610
3665
  export const TasksListItem: ({ task, goToNextPageIfAllComplete, defaultOpen, }: {
3611
- task: TaskTypes;
3612
- goToNextPageIfAllComplete: (task: TaskTypes) => void;
3666
+ task: Task;
3667
+ goToNextPageIfAllComplete: (task: Task) => void;
3613
3668
  defaultOpen: boolean;
3614
3669
  }) => React.JSX.Element;
3615
3670
 
@@ -3617,6 +3672,47 @@ declare module '@layerfi/components/components/TasksListItem/TasksListItem' {
3617
3672
  declare module '@layerfi/components/components/TasksListItem/index' {
3618
3673
  export { TasksListItem } from '@layerfi/components/components/TasksListItem/TasksListItem';
3619
3674
 
3675
+ }
3676
+ declare module '@layerfi/components/components/TasksMonthSelector/TaskMonthTile' {
3677
+ import React from 'react';
3678
+ import { TaskMonthTileProps } from '@layerfi/components/components/TasksMonthSelector/types';
3679
+ const TaskMonthTile: ({ monthData, onClick, active, disabled }: TaskMonthTileProps) => React.JSX.Element;
3680
+ export { TaskMonthTile };
3681
+
3682
+ }
3683
+ declare module '@layerfi/components/components/TasksMonthSelector/TasksMonthSelector' {
3684
+ import React from 'react';
3685
+ import { TasksMonthSelectorProps } from '@layerfi/components/components/TasksMonthSelector/types';
3686
+ const TasksMonthSelector: ({ tasks, year, currentDate, onClick }: TasksMonthSelectorProps) => React.JSX.Element;
3687
+ export { TasksMonthSelector };
3688
+
3689
+ }
3690
+ declare module '@layerfi/components/components/TasksMonthSelector/types' {
3691
+ import { Task, TasksMonthly } from '@layerfi/components/types/tasks';
3692
+ export type TasksMonthSelectorProps = {
3693
+ tasks?: TasksMonthly[];
3694
+ currentDate: Date;
3695
+ year: number;
3696
+ onClick: (date: Date) => void;
3697
+ };
3698
+ export type MonthData = {
3699
+ year: number;
3700
+ month: number;
3701
+ total: number;
3702
+ completed: number;
3703
+ tasks: Task[];
3704
+ monthStr: string;
3705
+ startDate: Date;
3706
+ endDate: Date;
3707
+ disabled?: boolean;
3708
+ };
3709
+ export type TaskMonthTileProps = {
3710
+ monthData: MonthData;
3711
+ active?: boolean;
3712
+ disabled?: boolean;
3713
+ onClick: TasksMonthSelectorProps['onClick'];
3714
+ };
3715
+
3620
3716
  }
3621
3717
  declare module '@layerfi/components/components/TasksPending/TasksPending' {
3622
3718
  import React from 'react';
@@ -4432,14 +4528,27 @@ declare module '@layerfi/components/contexts/TasksContext/TasksContext' {
4432
4528
  import { useTasks } from '@layerfi/components/hooks/useTasks/index';
4433
4529
  export type TasksContextType = ReturnType<typeof useTasks>;
4434
4530
  export const TasksContext: import("react").Context<{
4435
- data?: import("@layerfi/components/types/tasks").TaskTypes[];
4531
+ data?: import("@layerfi/components/types/tasks").Task[];
4532
+ monthlyData?: import("@layerfi/components/types/tasks").TasksMonthly[];
4436
4533
  isLoading?: boolean;
4437
4534
  loadedStatus?: import("@layerfi/components/types/general").LoadedStatus;
4438
4535
  isValidating?: boolean;
4439
4536
  error?: unknown;
4537
+ currentDate: Date;
4538
+ setCurrentDate: (date: Date) => void;
4539
+ dateRange: {
4540
+ startDate: Date;
4541
+ endDate: Date;
4542
+ };
4543
+ setDateRange: (props: {
4544
+ startDate: Date;
4545
+ endDate: Date;
4546
+ }) => void;
4440
4547
  refetch: () => void;
4441
4548
  submitResponseToTask: (taskId: string, userResponse: string) => void;
4442
- uploadDocumentForTask: (taskId: string, file: File) => void;
4549
+ uploadDocumentsForTask: (taskId: string, files: File[], description?: string) => Promise<void>;
4550
+ deleteUploadsForTask: (taskId: string) => void;
4551
+ updateDocUploadTaskDescription: (taskId: string, userResponse: string) => void;
4443
4552
  }>;
4444
4553
 
4445
4554
  }
@@ -5006,22 +5115,39 @@ declare module '@layerfi/components/hooks/useTasks/index' {
5006
5115
 
5007
5116
  }
5008
5117
  declare module '@layerfi/components/hooks/useTasks/mockData' {
5009
- import { TaskTypes } from '@layerfi/components/types/tasks';
5010
- export const mockData: TaskTypes[];
5118
+ import { Task } from '@layerfi/components/types/tasks';
5119
+ export const mockData: Task[];
5011
5120
 
5012
5121
  }
5013
5122
  declare module '@layerfi/components/hooks/useTasks/useTasks' {
5014
5123
  import { LoadedStatus } from '@layerfi/components/types/general';
5015
- import { TaskTypes } from '@layerfi/components/types/tasks';
5016
- type UseTasks = () => {
5017
- data?: TaskTypes[];
5124
+ import { Task, TasksMonthly } from '@layerfi/components/types/tasks';
5125
+ type UseTasks = (props?: UseTasksProps) => {
5126
+ data?: Task[];
5127
+ monthlyData?: TasksMonthly[];
5018
5128
  isLoading?: boolean;
5019
5129
  loadedStatus?: LoadedStatus;
5020
5130
  isValidating?: boolean;
5021
5131
  error?: unknown;
5132
+ currentDate: Date;
5133
+ setCurrentDate: (date: Date) => void;
5134
+ dateRange: {
5135
+ startDate: Date;
5136
+ endDate: Date;
5137
+ };
5138
+ setDateRange: (props: {
5139
+ startDate: Date;
5140
+ endDate: Date;
5141
+ }) => void;
5022
5142
  refetch: () => void;
5023
5143
  submitResponseToTask: (taskId: string, userResponse: string) => void;
5024
- uploadDocumentForTask: (taskId: string, file: File) => void;
5144
+ uploadDocumentsForTask: (taskId: string, files: File[], description?: string) => Promise<void>;
5145
+ deleteUploadsForTask: (taskId: string) => void;
5146
+ updateDocUploadTaskDescription: (taskId: string, userResponse: string) => void;
5147
+ };
5148
+ type UseTasksProps = {
5149
+ startDate?: Date;
5150
+ endDate?: Date;
5025
5151
  };
5026
5152
  export const useTasks: UseTasks;
5027
5153
  export {};
@@ -6221,10 +6347,10 @@ declare module '@layerfi/components/types/linked_accounts' {
6221
6347
  institution: PlaidInstitution | null;
6222
6348
  };
6223
6349
  export type AccountSource = EnumWithUnknownValues<'PLAID' | 'STRIPE'>;
6224
- const KNOWN_ACCOUNT_NOTIFICATION_TYPES: readonly ["CONFIRM_RELEVANT", "CONFIRM_UNIQUE"];
6225
- type KnownAccountNotificationType = typeof KNOWN_ACCOUNT_NOTIFICATION_TYPES[number];
6226
- const KNOWN_ACCOUNT_NOTIFICATION_SCOPES: readonly ["USER"];
6227
- type KnownAccountNotificationScope = typeof KNOWN_ACCOUNT_NOTIFICATION_SCOPES[number];
6350
+ const _KNOWN_ACCOUNT_NOTIFICATION_TYPES: readonly ["CONFIRM_RELEVANT", "CONFIRM_UNIQUE"];
6351
+ type KnownAccountNotificationType = typeof _KNOWN_ACCOUNT_NOTIFICATION_TYPES[number];
6352
+ const _KNOWN_ACCOUNT_NOTIFICATION_SCOPES: readonly ["USER"];
6353
+ type KnownAccountNotificationScope = typeof _KNOWN_ACCOUNT_NOTIFICATION_SCOPES[number];
6228
6354
  type AccountNotificationType = EnumWithUnknownValues<KnownAccountNotificationType>;
6229
6355
  type AccountNotificationScope = EnumWithUnknownValues<KnownAccountNotificationScope>;
6230
6356
  type AccountNotification = {
@@ -6415,7 +6541,13 @@ declare module '@layerfi/components/types/table' {
6415
6541
  }
6416
6542
  declare module '@layerfi/components/types/tasks' {
6417
6543
  import { DocumentType } from '@layerfi/components/types/file_upload';
6418
- export interface TaskTypes {
6544
+ import { S3PresignedUrl } from '@layerfi/components/types/general';
6545
+ type Document = {
6546
+ document_type: DocumentType;
6547
+ file_name: string;
6548
+ presigned_url: S3PresignedUrl;
6549
+ };
6550
+ export type Task = {
6419
6551
  id: string;
6420
6552
  question: string;
6421
6553
  status: TasksStatusType;
@@ -6429,11 +6561,21 @@ declare module '@layerfi/components/types/tasks' {
6429
6561
  completed_at: string | null;
6430
6562
  created_at: string;
6431
6563
  updated_at: string;
6564
+ effective_date: string;
6432
6565
  document_type: DocumentType;
6433
- }
6566
+ documents: Document[];
6567
+ };
6434
6568
  export type TasksStatusType = 'COMPLETED' | 'TODO' | 'USER_MARKED_COMPLETED';
6435
6569
  export type TasksResponseType = 'FREE_RESPONSE' | 'UPLOAD_DOCUMENT';
6436
6570
  export function isComplete(taskType: TasksStatusType): boolean;
6571
+ export type TasksMonthly = {
6572
+ year: number;
6573
+ month: number;
6574
+ total: number;
6575
+ completed: number;
6576
+ tasks: Task[];
6577
+ };
6578
+ export {};
6437
6579
 
6438
6580
  }
6439
6581
  declare module '@layerfi/components/types/utility/enumWithUnknownValues' {
@@ -6603,8 +6745,8 @@ declare module '@layerfi/components/utils/request/toDefinedSearchParameters' {
6603
6745
 
6604
6746
  }
6605
6747
  declare module '@layerfi/components/utils/styleUtils/sizeVariants' {
6606
- const SIZE_VARIANTS: readonly ["sm", "lg"];
6607
- type SizeVariant = (typeof SIZE_VARIANTS)[number];
6748
+ const _SIZE_VARIANTS: readonly ["sm", "lg"];
6749
+ type SizeVariant = (typeof _SIZE_VARIANTS)[number];
6608
6750
  export type Variants = Partial<{
6609
6751
  size: SizeVariant;
6610
6752
  }>;
@@ -0,0 +1,101 @@
1
+ import globals from 'globals'
2
+
3
+ import js from '@eslint/js'
4
+ import reactPlugin from 'eslint-plugin-react'
5
+ import reactHooksPlugin from 'eslint-plugin-react-hooks'
6
+ import stylisticPlugin from '@stylistic/eslint-plugin'
7
+ import tsEslint from 'typescript-eslint'
8
+ import unusedImportsPlugin from 'eslint-plugin-unused-imports'
9
+
10
+ export default tsEslint.config([
11
+ {
12
+ ignores: [
13
+ 'build/*',
14
+ 'dist/*',
15
+ 'bin/*',
16
+ ],
17
+ },
18
+ js.configs.recommended,
19
+ tsEslint.configs.recommended,
20
+ stylisticPlugin.configs['recommended-flat'],
21
+ reactPlugin.configs.flat.recommended,
22
+ reactPlugin.configs.flat['jsx-runtime'],
23
+ {
24
+ plugins: {
25
+ 'react-hooks': reactHooksPlugin,
26
+ },
27
+ rules: reactHooksPlugin.configs.recommended.rules,
28
+ },
29
+ {
30
+ plugins: {
31
+ 'unused-imports': unusedImportsPlugin,
32
+ },
33
+ languageOptions: {
34
+ globals: {
35
+ ...globals['shared-node-browser'],
36
+ },
37
+ parserOptions: {
38
+ ecmaFeatures: {
39
+ jsx: true,
40
+ },
41
+ },
42
+ },
43
+ settings: {
44
+ react: {
45
+ version: 'detect',
46
+ },
47
+ },
48
+ rules: {
49
+ 'no-console': ['error', {
50
+ allow: ['warn', 'error', 'debug'],
51
+ }],
52
+
53
+ '@stylistic/quotes': ['error', 'single', { avoidEscape: false }],
54
+ '@stylistic/jsx-quotes': ['error', 'prefer-single'],
55
+ '@stylistic/semi': ['error', 'never'],
56
+ '@stylistic/eol-last': ['error', 'always'],
57
+ '@stylistic/indent': ['error', 2],
58
+ '@stylistic/operator-linebreak': [
59
+ 'error',
60
+ 'before',
61
+ {
62
+ overrides: {
63
+ '=': 'after',
64
+ },
65
+ },
66
+ ],
67
+ '@stylistic/max-len': [
68
+ 'error',
69
+ {
70
+ code: 100,
71
+ ignoreUrls: true,
72
+ ignoreStrings: true,
73
+ ignoreTemplateLiterals: true,
74
+ },
75
+ ],
76
+
77
+ 'no-unused-vars': 'off',
78
+ '@typescript-eslint/no-unused-vars': 'off',
79
+ 'unused-imports/no-unused-vars': [
80
+ 'error',
81
+ {
82
+ args: 'all',
83
+ argsIgnorePattern: '^_',
84
+ caughtErrors: 'all',
85
+ caughtErrorsIgnorePattern: '^_',
86
+ destructuredArrayIgnorePattern: '^_',
87
+ varsIgnorePattern: '^_',
88
+ ignoreRestSiblings: true,
89
+ },
90
+ ],
91
+
92
+ 'react/prop-types': 'off',
93
+ },
94
+ },
95
+ {
96
+ files: ['**/*.tsx', '**/*.ts'],
97
+ rules: {
98
+ 'no-restricted-imports': ['error', { patterns: ['*.css'] }],
99
+ },
100
+ },
101
+ ])
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@layerfi/components",
3
- "version": "0.1.81",
3
+ "version": "0.1.83",
4
4
  "description": "Layer React Components",
5
5
  "main": "dist/cjs/index.cjs",
6
6
  "module": "dist/esm/index.mjs",
@@ -52,21 +52,21 @@
52
52
  "@types/react": "^18.2.0",
53
53
  "@types/react-datepicker": "^6.2.0",
54
54
  "@types/react-dom": "^18.2.0",
55
- "@typescript-eslint/eslint-plugin": "^6.19.0",
56
55
  "esbuild": "^0.19.5",
57
56
  "esbuild-jest": "^0.5.0",
58
57
  "esbuild-sass-plugin": "^2.16.0",
59
- "eslint": "^8.57.0",
58
+ "eslint": "^9.15.0",
60
59
  "eslint-plugin-react": "^7.37.2",
61
- "eslint-plugin-react-hooks": "^4.6.0",
62
- "eslint-plugin-unused-imports": "^3.2.0",
60
+ "eslint-plugin-react-hooks": "^5.0.0",
61
+ "eslint-plugin-unused-imports": "^4.1.4",
63
62
  "jest": "^29.7.0",
64
63
  "jest-environment-jsdom": "^29.7.0",
65
64
  "jsdom": "^22.1.0",
66
65
  "npm-dts": "^1.3.12",
67
66
  "react": "^18.2.0",
68
67
  "react-dom": "^18.2.0",
69
- "typescript": "^5.6.3"
68
+ "typescript": "^5.6.3",
69
+ "typescript-eslint": "^8.15.0"
70
70
  },
71
71
  "dependencies": {
72
72
  "@floating-ui/react": "^0.26.8",
@@ -81,6 +81,9 @@
81
81
  "swr": "^2.2.4",
82
82
  "zustand": "^5.0.1"
83
83
  },
84
+ "engines": {
85
+ "node": ">=20.2"
86
+ },
84
87
  "jest": {
85
88
  "testEnvironment": "jsdom",
86
89
  "transform": {
package/.eslintrc.js DELETED
@@ -1,82 +0,0 @@
1
- /** @type {import("eslint").Linter.Config} */
2
- module.exports = {
3
- env: {
4
- browser: true,
5
- es2021: true,
6
- node: true,
7
- },
8
- extends: [
9
- 'eslint:recommended',
10
- 'plugin:@typescript-eslint/recommended',
11
- 'plugin:react/recommended',
12
- 'plugin:react-hooks/recommended',
13
- ],
14
- ignorePatterns: ['build/*', 'dist/*', 'bin/*'],
15
- parser: '@typescript-eslint/parser',
16
- parserOptions: {
17
- ecmaFeatures: {
18
- jsx: true,
19
- },
20
- ecmaVersion: 'latest',
21
- sourceType: 'module',
22
- },
23
- plugins: ['@typescript-eslint', '@stylistic', 'unused-imports'],
24
- rules: {
25
- 'no-console': ['error', { allow: ['warn', 'error', 'debug'] }],
26
-
27
- '@stylistic/quotes': ['error', 'single', { avoidEscape: false }],
28
- '@stylistic/jsx-quotes': ['error', 'prefer-single'],
29
- '@stylistic/semi': ['error', 'never'],
30
- '@stylistic/eol-last': ['error', 'always'],
31
- '@stylistic/indent': ['error', 2],
32
- '@stylistic/operator-linebreak': [
33
- 'error',
34
- 'before',
35
- {
36
- overrides: {
37
- '=': 'after',
38
- },
39
- }
40
- ],
41
- '@stylistic/max-len': [
42
- 'error',
43
- {
44
- code: 100,
45
- ignoreUrls: true,
46
- ignoreStrings: true,
47
- ignoreTemplateLiterals: true
48
- }
49
- ],
50
-
51
- '@typescript-eslint/no-unused-vars': 'off',
52
- 'unused-imports/no-unused-imports': 'error',
53
- 'unused-imports/no-unused-vars': [
54
- 'error',
55
- {
56
- argsIgnorePattern: '^_',
57
- varsIgnorePattern: '^_',
58
- caughtErrorsIgnorePattern: '^_',
59
- },
60
- ],
61
-
62
- 'react/prop-types': 'off',
63
- },
64
- overrides: [
65
- {
66
- files: ['*.tsx'],
67
- rules: {
68
- 'no-restricted-imports': [
69
- 'error',
70
- {
71
- patterns: ['*.css'],
72
- },
73
- ],
74
- },
75
- },
76
- ],
77
- settings: {
78
- react: {
79
- version: 'detect',
80
- },
81
- },
82
- }