proje-react-panel 1.6.0-test-1 → 1.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.
Files changed (75) hide show
  1. package/COLOR_SYSTEM_GUIDE.md +296 -0
  2. package/DASHBOARD_GUIDE.md +531 -0
  3. package/README.md +18 -1
  4. package/dist/components/DashboardContainer.d.ts +7 -0
  5. package/dist/components/DashboardGrid.d.ts +9 -0
  6. package/dist/components/DashboardItem.d.ts +10 -0
  7. package/dist/components/ThemeSwitcher.d.ts +7 -0
  8. package/dist/components/dashboard/Dashboard.d.ts +7 -0
  9. package/dist/components/dashboard/DashboardGrid.d.ts +7 -0
  10. package/dist/components/dashboard/DashboardItem.d.ts +6 -0
  11. package/dist/components/dashboard/index.d.ts +3 -0
  12. package/dist/index.cjs.js +1 -1
  13. package/dist/index.d.ts +1 -0
  14. package/dist/index.esm.js +1 -1
  15. package/dist/store/themeStore.d.ts +23 -0
  16. package/package.json +1 -1
  17. package/src/components/dashboard/Dashboard.tsx +11 -0
  18. package/src/components/dashboard/DashboardGrid.tsx +14 -0
  19. package/src/components/dashboard/DashboardItem.tsx +9 -0
  20. package/src/components/dashboard/index.ts +3 -0
  21. package/src/index.ts +1 -0
  22. package/src/styles/base/_variables.scss +45 -0
  23. package/src/styles/components/button.scss +3 -3
  24. package/src/styles/components/checkbox.scss +6 -6
  25. package/src/styles/components/form-header.scss +21 -19
  26. package/src/styles/components/uploader.scss +15 -37
  27. package/src/styles/counter.scss +25 -33
  28. package/src/styles/dashboard.scss +9 -0
  29. package/src/styles/details.scss +6 -15
  30. package/src/styles/error-boundary.scss +75 -74
  31. package/src/styles/filter-popup.scss +29 -27
  32. package/src/styles/form.scss +16 -15
  33. package/src/styles/index.scss +8 -4
  34. package/src/styles/layout.scss +9 -8
  35. package/src/styles/list.scss +29 -27
  36. package/src/styles/loading-screen.scss +4 -4
  37. package/src/styles/login.scss +3 -3
  38. package/src/styles/pagination.scss +13 -13
  39. package/src/styles/sidebar.scss +24 -22
  40. package/src/styles/utils/scrollbar.scss +4 -3
  41. package/dist/components/components/Checkbox.d.ts +0 -7
  42. package/dist/components/components/Counter.d.ts +0 -9
  43. package/dist/components/components/ErrorBoundary.d.ts +0 -16
  44. package/dist/components/components/ErrorComponent.d.ts +0 -4
  45. package/dist/components/components/FormField.d.ts +0 -17
  46. package/dist/components/components/ImageUploader.d.ts +0 -15
  47. package/dist/components/components/InnerForm.d.ts +0 -17
  48. package/dist/components/components/Label.d.ts +0 -9
  49. package/dist/components/components/LoadingScreen.d.ts +0 -2
  50. package/dist/components/components/Uploader.d.ts +0 -8
  51. package/dist/components/components/index.d.ts +0 -8
  52. package/dist/components/components/list/Datagrid.d.ts +0 -9
  53. package/dist/components/components/list/EmptyList.d.ts +0 -2
  54. package/dist/components/components/list/FilterPopup.d.ts +0 -11
  55. package/dist/components/components/list/ListPage.d.ts +0 -20
  56. package/dist/components/components/list/Pagination.d.ts +0 -11
  57. package/dist/components/components/list/index.d.ts +0 -0
  58. package/dist/components/pages/ControllerDetails.d.ts +0 -5
  59. package/dist/components/pages/FormPage.d.ts +0 -18
  60. package/dist/components/pages/ListPage.d.ts +0 -18
  61. package/dist/components/pages/Login.d.ts +0 -13
  62. package/dist/decorators/Crud.d.ts +0 -6
  63. package/dist/decorators/form/FormOptions.d.ts +0 -7
  64. package/dist/decorators/form/getFormFields.d.ts +0 -3
  65. package/dist/decorators/list/GetCellFields.d.ts +0 -2
  66. package/dist/decorators/list/ImageCell.d.ts +0 -6
  67. package/dist/decorators/list/ListData.d.ts +0 -6
  68. package/dist/decorators/list/getListFields.d.ts +0 -2
  69. package/dist/initPanel.d.ts +0 -2
  70. package/dist/types/Screen.d.ts +0 -4
  71. package/dist/types/ScreenCreatorData.d.ts +0 -13
  72. package/dist/types/getDetailsData.d.ts +0 -1
  73. package/dist/types/initPanelOptions.d.ts +0 -2
  74. package/dist/utils/createScreens.d.ts +0 -1
  75. package/dist/utils/getFields.d.ts +0 -3
@@ -1,9 +1,9 @@
1
1
  .sidebar {
2
2
  position: relative;
3
- background-color: #343a40;
3
+ background-color: var(--prp-bg-tertiary);
4
4
  height: 100vh;
5
5
  transition: width 0.3s ease;
6
- border-right: 1px solid #454d55;
6
+ border-right: 1px solid var(--prp-border-primary);
7
7
  &.open {
8
8
  width: 250px;
9
9
  }
@@ -14,14 +14,12 @@
14
14
  .nav-links a.active {
15
15
  border-radius: 0;
16
16
  &::before {
17
-
18
- background-color: #9b1a1a;
17
+ background-color: var(--prp-bg-button-primary);
19
18
  }
20
-
21
19
  }
22
20
  .nav-links a:hover {
23
- transform: none !important;
24
- }
21
+ transform: none !important;
22
+ }
25
23
  }
26
24
 
27
25
  .toggle-button {
@@ -31,8 +29,8 @@
31
29
  width: 24px;
32
30
  height: 24px;
33
31
  border-radius: 50%;
34
- background-color: #495057;
35
- border: 1px solid #6c757d;
32
+ background-color: var(--prp-bg-tertiary);
33
+ border: 1px solid var(--prp-border-primary);
36
34
  display: flex;
37
35
  align-items: center;
38
36
  justify-content: center;
@@ -40,7 +38,8 @@
40
38
  z-index: 10;
41
39
 
42
40
  &:hover {
43
- background-color: #6c757d;
41
+ background-color: var(--prp-bg-tertiary);
42
+ opacity: 0.9;
44
43
  }
45
44
  }
46
45
 
@@ -55,7 +54,7 @@
55
54
  padding: 0.75rem 0;
56
55
  white-space: nowrap;
57
56
  margin-bottom: 0.5rem;
58
- color: #e9ecef;
57
+ color: var(--prp-text-muted);
59
58
  text-decoration: none;
60
59
  border-radius: 4px;
61
60
  font-weight: 500;
@@ -64,13 +63,15 @@
64
63
  overflow: hidden;
65
64
 
66
65
  &:hover {
67
- background-color: rgba(233, 236, 239, 0.1);
66
+ background-color: var(--prp-bg-tertiary);
67
+ opacity: 0.8;
68
68
  transform: translateX(2px);
69
69
  }
70
70
 
71
71
  &.active {
72
- background-color: rgba(233, 236, 239, 0.2);
73
- color: #fff;
72
+ background-color: var(--prp-bg-tertiary);
73
+ opacity: 0.9;
74
+ color: var(--prp-text-primary);
74
75
  font-weight: 600;
75
76
 
76
77
  &::before {
@@ -80,7 +81,7 @@
80
81
  top: 0;
81
82
  height: 100%;
82
83
  width: 4px;
83
- background-color: #fff;
84
+ background-color: var(--prp-bg-white);
84
85
  }
85
86
  }
86
87
 
@@ -95,19 +96,19 @@
95
96
  margin-top: auto;
96
97
 
97
98
  a {
98
- color: #adb5bd;
99
+ color: var(--prp-text-secondary);
99
100
  font-weight: 400;
100
101
  }
101
102
  }
102
103
  }
103
-
104
+
104
105
  .sidebar-footer {
105
106
  position: absolute;
106
107
  bottom: 0;
107
108
  width: 100%;
108
109
  padding: 1rem 0;
109
110
  border-top: 1px solid #454d55;
110
-
111
+
111
112
  .logout-button {
112
113
  display: flex;
113
114
  align-items: center;
@@ -119,12 +120,13 @@
119
120
  cursor: pointer;
120
121
  font-weight: 500;
121
122
  transition: all 0.2s ease;
122
-
123
+
123
124
  &:hover {
124
- color: #fff;
125
- background-color: rgba(233, 236, 239, 0.1);
125
+ color: var(--prp-text-primary);
126
+ background-color: var(--prp-bg-tertiary);
127
+ opacity: 0.8;
126
128
  }
127
-
129
+
128
130
  .nav-links-icon {
129
131
  display: inline-block;
130
132
  width: 60px;
@@ -5,15 +5,16 @@
5
5
  }
6
6
 
7
7
  &::-webkit-scrollbar-track {
8
- background: #2b2b2b;
8
+ background: var(--prp-bg-secondary);
9
9
  }
10
10
 
11
11
  &::-webkit-scrollbar-thumb {
12
- background: #666666;
12
+ background: var(--prp-bg-tertiary);
13
13
  border-radius: 4px;
14
14
 
15
15
  &:hover {
16
- background: #777777;
16
+ background: var(--prp-bg-tertiary);
17
+ opacity: 0.9;
17
18
  }
18
19
  }
19
20
  }
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- import { InputOptions } from '../../decorators/form/Input';
3
- interface CheckboxProps extends React.InputHTMLAttributes<HTMLInputElement> {
4
- input: InputOptions;
5
- }
6
- export declare function Checkbox({ input, ...props }: CheckboxProps): React.JSX.Element;
7
- export {};
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- interface CounterProps {
3
- image: React.ReactNode;
4
- text: string;
5
- targetNumber: number;
6
- duration?: number;
7
- }
8
- export declare function Counter({ image, text, targetNumber, duration }: CounterProps): React.JSX.Element;
9
- export {};
@@ -1,16 +0,0 @@
1
- import React, { Component, ErrorInfo, ReactNode } from "react";
2
- interface Props {
3
- children: ReactNode;
4
- }
5
- interface State {
6
- hasError: boolean;
7
- error: Error | null;
8
- errorInfo: ErrorInfo | null;
9
- }
10
- export declare class ErrorBoundary extends Component<Props, State> {
11
- state: State;
12
- static getDerivedStateFromError(error: Error): State;
13
- componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
14
- render(): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | React.JSX.Element | null | undefined;
15
- }
16
- export {};
@@ -1,4 +0,0 @@
1
- import React from "react";
2
- export declare function ErrorComponent({ error }: {
3
- error: unknown | Response;
4
- }): React.JSX.Element;
@@ -1,17 +0,0 @@
1
- import React from 'react';
2
- import { InputOptions } from '../../decorators/form/Input';
3
- import { UseFormRegister } from 'react-hook-form';
4
- interface FormFieldProps {
5
- input: InputOptions;
6
- register: UseFormRegister<any>;
7
- error?: {
8
- message?: string;
9
- };
10
- baseName?: string;
11
- onSelectPreloader?: (inputOptions: InputOptions) => Promise<{
12
- label: string;
13
- value: string;
14
- }[]>;
15
- }
16
- export declare function FormField({ input, register, error, baseName, onSelectPreloader }: FormFieldProps): React.JSX.Element;
17
- export {};
@@ -1,15 +0,0 @@
1
- import React from "react";
2
- interface MultipleImageUploaderProps {
3
- value?: Array<{
4
- file: File;
5
- image: string;
6
- remove?: boolean;
7
- }>;
8
- onError?: (error: string | null) => void;
9
- onClear?: () => void;
10
- reset?: any;
11
- onFilesChange?: (files: File[]) => void;
12
- }
13
- export declare function ImageUploader(): React.JSX.Element;
14
- export declare function MultipleImageUploader(props: MultipleImageUploaderProps): React.JSX.Element;
15
- export {};
@@ -1,17 +0,0 @@
1
- import React from 'react';
2
- import { InputOptions } from '../../decorators/form/Input';
3
- import { FormOptions } from '../../decorators/form/FormOptions';
4
- import { OnSubmitFN, GetDetailsDataFN } from '../pages/FormPage';
5
- interface InnerFormProps<T> {
6
- formOptions: FormOptions;
7
- onSubmit: OnSubmitFN<T>;
8
- getDetailsData?: GetDetailsDataFN<T>;
9
- redirectBackOnSuccess?: boolean;
10
- onSelectPreloader?: (inputOptions: InputOptions) => Promise<{
11
- label: string;
12
- value: string;
13
- }[]>;
14
- type?: 'json' | 'formData';
15
- }
16
- export declare function InnerForm<T>({ formOptions, onSubmit, getDetailsData, redirectBackOnSuccess, onSelectPreloader, type, }: InnerFormProps<T>): React.JSX.Element;
17
- export {};
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- interface LabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> {
3
- htmlFor: string;
4
- label?: string;
5
- fieldName: string;
6
- children?: React.ReactNode;
7
- }
8
- export declare function Label({ label, fieldName, children, ...props }: LabelProps): React.JSX.Element;
9
- export {};
@@ -1,2 +0,0 @@
1
- import React from 'react';
2
- export declare function LoadingScreen(): React.JSX.Element;
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import { InputOptions } from '../../decorators/form/Input';
3
- interface UploaderProps {
4
- input: InputOptions;
5
- maxLength?: number;
6
- }
7
- export declare function Uploader({ input, maxLength }: UploaderProps): React.JSX.Element;
8
- export {};
@@ -1,8 +0,0 @@
1
- export { InnerForm } from './InnerForm';
2
- export { FormField } from './FormField';
3
- export { LoadingScreen } from './LoadingScreen';
4
- export { Counter } from './Counter';
5
- export { Uploader } from './Uploader';
6
- export { ErrorComponent } from './ErrorComponent';
7
- export { Label } from './Label';
8
- export { ErrorBoundary } from './ErrorBoundary';
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import { ListData } from '../../../decorators/list/ListData';
3
- interface DatagridProps<T> {
4
- data: T[];
5
- listData: ListData<T>;
6
- onRemoveItem?: (item: T) => Promise<void>;
7
- }
8
- export declare function Datagrid<T>({ data, listData, onRemoveItem }: DatagridProps<T>): React.JSX.Element;
9
- export {};
@@ -1,2 +0,0 @@
1
- import React from 'react';
2
- export declare const EmptyList: React.FC;
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- import { ListData } from '../../../decorators/list/ListData';
3
- interface FilterPopupProps<T> {
4
- isOpen: boolean;
5
- onClose: () => void;
6
- onApplyFilters: (filters: Record<string, string>) => void;
7
- listData: ListData<T>;
8
- activeFilters?: Record<string, string>;
9
- }
10
- export declare function FilterPopup<T>({ isOpen, onClose, onApplyFilters, listData, activeFilters, }: FilterPopupProps<T>): React.ReactElement | null;
11
- export {};
@@ -1,20 +0,0 @@
1
- import React from 'react';
2
- import { AnyClass } from '../../../types/AnyClass';
3
- export interface GetDataParams {
4
- page?: number;
5
- limit?: number;
6
- filters?: Record<string, any>;
7
- }
8
- export interface PaginatedResponse<T> {
9
- data: T[];
10
- total: number;
11
- page: number;
12
- limit: number;
13
- }
14
- export type GetDataForList<T> = (params: GetDataParams) => Promise<PaginatedResponse<T>>;
15
- export declare function ListPage<T extends AnyClass>({ model, getData, onRemoveItem, customHeader, }: {
16
- model: any;
17
- getData: GetDataForList<T>;
18
- customHeader?: React.ReactNode;
19
- onRemoveItem?: (item: T) => Promise<void>;
20
- }): React.JSX.Element;
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- interface PaginationProps {
3
- pagination: {
4
- total: number;
5
- page: number;
6
- limit: number;
7
- };
8
- onPageChange: (page: number) => void;
9
- }
10
- export declare function Pagination({ pagination, onPageChange }: PaginationProps): React.JSX.Element | null;
11
- export {};
File without changes
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- import { Screen } from '../../types/Screen';
3
- export declare function ControllerDetails({ screen }: {
4
- screen: Screen;
5
- }): React.JSX.Element;
@@ -1,18 +0,0 @@
1
- import React from 'react';
2
- import { AnyClass } from '../../types/AnyClass';
3
- import { InputOptions } from '../../decorators/form/Input';
4
- export type GetDetailsDataFN<T> = (param: Record<string, string>) => Promise<T>;
5
- export type OnSubmitFN<T> = (data: T) => Promise<T>;
6
- export interface FormPageProps<T extends AnyClass> {
7
- model: any;
8
- getDetailsData?: GetDetailsDataFN<T>;
9
- redirect?: string;
10
- onSubmit: OnSubmitFN<T>;
11
- onSelectPreloader?: (inputOptions: InputOptions) => Promise<{
12
- label: string;
13
- value: string;
14
- }[]>;
15
- redirectBackOnSuccess?: boolean;
16
- type?: 'json' | 'formData';
17
- }
18
- export declare function FormPage<T extends AnyClass>({ model, getDetailsData, onSubmit, redirect, onSelectPreloader, redirectBackOnSuccess, type, ...rest }: FormPageProps<T>): React.JSX.Element;
@@ -1,18 +0,0 @@
1
- import React from 'react';
2
- import { AnyClass } from '../../types/AnyClass';
3
- export interface PaginationParams {
4
- page?: number;
5
- limit?: number;
6
- filters?: Record<string, any>;
7
- }
8
- export interface PaginatedResponse<T> {
9
- data: T[];
10
- total: number;
11
- page: number;
12
- limit: number;
13
- }
14
- export type GetDataForList<T> = (params: PaginationParams) => Promise<PaginatedResponse<T>>;
15
- export declare function ListPage<T extends AnyClass>({ model, getData, }: {
16
- model: T;
17
- getData: GetDataForList<T>;
18
- }): React.JSX.Element;
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- export type OnLogin = {
3
- login: (username: string, password: string) => Promise<LoginResponse>;
4
- };
5
- interface LoginResponse {
6
- user: any;
7
- token: string;
8
- }
9
- interface LoginProps {
10
- onLogin: OnLogin;
11
- }
12
- export declare function Login({ onLogin }: LoginProps): React.JSX.Element;
13
- export {};
@@ -1,6 +0,0 @@
1
- import 'reflect-metadata';
2
- export interface CrudOptions {
3
- controller: string;
4
- }
5
- export declare function Crud(options?: CrudOptions): ClassDecorator;
6
- export declare function getClassCrudData(entityClass: any): CrudOptions | undefined;
@@ -1,7 +0,0 @@
1
- import { FormConfiguration } from "./Form";
2
- import { InputOptions } from "./Input";
3
- export interface FormOptions {
4
- resolver: any;
5
- form?: FormConfiguration;
6
- inputs?: InputOptions[];
7
- }
@@ -1,3 +0,0 @@
1
- import { AnyClass } from "../../types/AnyClass";
2
- import { FormOptions } from "./FormOptions";
3
- export declare function getFormFields<T extends AnyClass>(entityClass: T): FormOptions;
@@ -1,2 +0,0 @@
1
- import { CellOptions } from "./Cell";
2
- export declare function getCellFields(entityClass: any): CellOptions[];
@@ -1,6 +0,0 @@
1
- import "reflect-metadata";
2
- import { CellOptions } from "./Cell";
3
- export interface ImageCellOptions extends CellOptions {
4
- baseUrl: string;
5
- }
6
- export declare function ImageCell(options?: ImageCellOptions): PropertyDecorator;
@@ -1,6 +0,0 @@
1
- import { ListOptions } from './List';
2
- import { CellOptions } from './Cell';
3
- export interface ListData<T> {
4
- list?: ListOptions<T>;
5
- cells: CellOptions[];
6
- }
@@ -1,2 +0,0 @@
1
- import { ListData } from './ListData';
2
- export declare function getListFields<T>(entityClass: T): ListData<T>;
@@ -1,2 +0,0 @@
1
- import { InitPanelOptions } from './types/initPanelOptions';
2
- export declare function initPanel({}: InitPanelOptions): void;
@@ -1,4 +0,0 @@
1
- export interface Screen {
2
- key: string;
3
- controller: string;
4
- }
@@ -1,13 +0,0 @@
1
- import { CellOptions } from '../decorators/list/Cell';
2
- import { CrudOptions } from '../decorators/Crud';
3
- import { InputOptions } from '../decorators/form/Input';
4
- import { ListOptions } from '../decorators/list/List';
5
- export interface ScreenCreatorData {
6
- resolver: any;
7
- fields: string[];
8
- inputs: InputOptions[];
9
- crud?: CrudOptions;
10
- path: string;
11
- list?: ListOptions<any>;
12
- cells: CellOptions[];
13
- }
@@ -1 +0,0 @@
1
- export type GetDetailsDataFN<T> = (param: Record<string, string>) => Promise<T>;
@@ -1,2 +0,0 @@
1
- export interface InitPanelOptions {
2
- }
@@ -1 +0,0 @@
1
- export declare function createScreens(screens: Record<string, any>): void;
@@ -1,3 +0,0 @@
1
- import { ScreenCreatorData } from "../types/ScreenCreatorData";
2
- import { AnyClass } from "../types/AnyClass";
3
- export declare function getFields<T extends AnyClass>(key: string, entityClass: T): ScreenCreatorData;