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
@@ -0,0 +1,296 @@
1
+ # Color System Guide
2
+
3
+ This guide documents the color system used in the `proje-react-panel` library. The system uses SCSS variables with the `dark-` prefix for the dark theme, which are then mapped to CSS custom properties with the `prp-` prefix for use throughout the application.
4
+
5
+ ## Table of Contents
6
+
7
+ 1. [Overview](#overview)
8
+ 2. [SCSS Variables](#scss-variables)
9
+ 3. [CSS Custom Properties](#css-custom-properties)
10
+ 4. [Usage Guidelines](#usage-guidelines)
11
+ 5. [Future: Light Theme Support](#future-light-theme-support)
12
+
13
+ ---
14
+
15
+ ## Overview
16
+
17
+ The color system is centralized in `src/styles/base/_variables.scss`. It consists of:
18
+
19
+ - **SCSS Variables**: Base color definitions with creative single-word names prefixed with `dark-`
20
+ - **CSS Custom Properties**: Runtime-accessible variables prefixed with `prp-` (proje-react-panel)
21
+ - **Theme Scoping**: All CSS custom properties are scoped to `.layout` for better isolation
22
+
23
+ ### Naming Convention
24
+
25
+ - **SCSS Variables**: `$dark-[name]` (e.g., `$dark-void`)
26
+ - **CSS Variables**: `--prp-[category]-[purpose]` (e.g., `--prp-bg-primary`)
27
+
28
+ ---
29
+
30
+ ## SCSS Variables
31
+
32
+ SCSS variables are defined at the top of `_variables.scss` and are used only during compilation. They are prefixed with `dark-` to indicate they belong to the dark theme.
33
+
34
+ ### Background Colors
35
+
36
+ | Variable | Hex Value | Usage | Example |
37
+ | -------------- | --------- | ------------------------------------------- | ------------------------------------------- |
38
+ | `$dark-void` | `#1a1a1a` | Darkest background - main page backgrounds | Primary container backgrounds |
39
+ | `$dark-slate` | `#2b2b2b` | Dark background - secondary surfaces | Cards, panels, secondary containers |
40
+ | `$dark-mist` | `#333333` | Medium dark background - elevated elements | Input fields, headers, tertiary backgrounds |
41
+ | `$dark-silver` | `#444444` | Lighter dark background - borders, dividers | Border colors, hover states |
42
+
43
+ ### Neutral Colors
44
+
45
+ | Variable | Hex Value | Usage | Example |
46
+ | ------------- | --------- | --------------------------- | ------------------------------------------ |
47
+ | `$dark-pearl` | `#ffffff` | White - primary text | Main headings, primary text content |
48
+ | `$dark-ash` | `#e0e0e0` | Light gray - secondary text | Secondary text, borders |
49
+ | `$dark-dust` | `#999999` | Medium gray - muted text | Placeholders, disabled text, muted content |
50
+
51
+ ### Action Colors
52
+
53
+ | Variable | Hex Value | Usage | Example |
54
+ | --------------- | --------- | -------------------------------- | --------------------------------------------- |
55
+ | `$dark-ocean` | `#007bff` | Primary blue - main actions | Primary buttons, links, main CTAs |
56
+ | `$dark-sky` | `#66b2ff` | Light blue - focus states | Focus rings, active states, highlights |
57
+ | `$dark-emerald` | `#4caf50` | Success green - positive actions | Success buttons, success messages, checkmarks |
58
+ | `$dark-ruby` | `#ff4d4f` | Error red - error states | Error messages, delete actions, warnings |
59
+
60
+ ---
61
+
62
+ ## CSS Custom Properties
63
+
64
+ CSS custom properties are scoped to `.layout` and are accessible at runtime. They use the `prp-` prefix to avoid conflicts with other libraries.
65
+
66
+ ### Background Variables
67
+
68
+ ```css
69
+ --prp-bg-primary: #1a1a1a /* Main background */ --prp-bg-secondary: #2b2b2b
70
+ /* Secondary background */ --prp-bg-tertiary: #333333 /* Tertiary background */
71
+ --prp-bg-white: #ffffff /* White background */ --prp-bg-button-primary: #007bff
72
+ /* Primary button background */ --prp-bg-button-success: #4caf50 /* Success button background */;
73
+ ```
74
+
75
+ ### Text Variables
76
+
77
+ ```css
78
+ --prp-text-primary: #ffffff /* Primary text (white) */ --prp-text-secondary: #e0e0e0
79
+ /* Secondary text (light gray) */ --prp-text-muted: #999999 /* Muted text (medium gray) */;
80
+ ```
81
+
82
+ ### Border Variables
83
+
84
+ ```css
85
+ --prp-border-primary: #444444 /* Primary border */ --prp-border-light: #e0e0e0 /* Light border */;
86
+ ```
87
+
88
+ ### Color Variables
89
+
90
+ ```css
91
+ --prp-color-focus: #66b2ff /* Focus/active states */ --prp-color-success: #4caf50
92
+ /* Success states */ --prp-color-error: #ff4d4f /* Error states */;
93
+ ```
94
+
95
+ ### Shadow Variables
96
+
97
+ ```css
98
+ --prp-shadow-light: rgba(0, 0, 0, 0.05) /* Subtle shadows */ --prp-shadow-medium: rgba(0, 0, 0, 0.2)
99
+ /* Medium shadows */ --prp-shadow-dark: rgba(0, 0, 0, 0.3) /* Strong shadows */
100
+ --prp-shadow-focus: rgba(102, 178, 255, 0.2) /* Focus ring shadows */;
101
+ ```
102
+
103
+ ---
104
+
105
+ ## Usage Guidelines
106
+
107
+ ### Using CSS Custom Properties
108
+
109
+ Always use CSS custom properties (not SCSS variables) in your stylesheets:
110
+
111
+ ```scss
112
+ // ✅ Correct - Use CSS custom properties
113
+ .component {
114
+ background-color: var(--prp-bg-primary);
115
+ color: var(--prp-text-primary);
116
+ border: 1px solid var(--prp-border-primary);
117
+ }
118
+
119
+ // ❌ Incorrect - Don't use SCSS variables directly
120
+ .component {
121
+ background-color: $dark-void; // Only for compilation
122
+ }
123
+ ```
124
+
125
+ ### When to Use Each Variable
126
+
127
+ #### Backgrounds
128
+
129
+ - **`--prp-bg-primary`**: Main page/container backgrounds
130
+ - **`--prp-bg-secondary`**: Cards, panels, dropdown menus
131
+ - **`--prp-bg-tertiary`**: Input fields, headers, elevated surfaces
132
+ - **`--prp-bg-white`**: Special white backgrounds (checkboxes, etc.)
133
+
134
+ #### Text
135
+
136
+ - **`--prp-text-primary`**: Main content, headings, important text
137
+ - **`--prp-text-secondary`**: Secondary content, labels
138
+ - **`--prp-text-muted`**: Placeholders, hints, disabled text
139
+
140
+ #### Colors
141
+
142
+ - **`--prp-color-focus`**: Focus rings, active indicators
143
+ - **`--prp-color-success`**: Success messages, positive feedback
144
+ - **`--prp-color-error`**: Error messages, validation errors, destructive actions
145
+
146
+ #### Shadows
147
+
148
+ - **`--prp-shadow-light`**: Subtle elevation (cards, inputs)
149
+ - **`--prp-shadow-medium`**: Medium elevation (modals, popovers)
150
+ - **`--prp-shadow-dark`**: Strong elevation (dropdowns, tooltips)
151
+ - **`--prp-shadow-focus`**: Focus rings around interactive elements
152
+
153
+ ---
154
+
155
+ ## Future: Light Theme Support
156
+
157
+ The current system is designed with dark theme in mind. When implementing light theme support:
158
+
159
+ 1. **Add light theme variables** with `light-` prefix:
160
+
161
+ ```scss
162
+ $light-[name]: #hexvalue;
163
+ ```
164
+
165
+ 2. **Use theme selector** to conditionally apply:
166
+
167
+ ```scss
168
+ .layout[data-theme='dark'] {
169
+ --prp-bg-primary: #{$dark-void};
170
+ // ...
171
+ }
172
+
173
+ .layout[data-theme='light'] {
174
+ --prp-bg-primary: #{$light-snow};
175
+ // ...
176
+ }
177
+ ```
178
+
179
+ 3. **Maintain same CSS custom property names** - only the values change based on theme
180
+
181
+ ---
182
+
183
+ ## Maintenance
184
+
185
+ ### Updating Colors
186
+
187
+ When modifying colors:
188
+
189
+ 1. Update the SCSS variable in `_variables.scss`
190
+ 2. The CSS custom property will automatically update (it references the SCSS variable)
191
+ 3. **Update this guide** to reflect any changes
192
+ 4. Test all components that use the affected colors
193
+
194
+ ### Adding New Colors
195
+
196
+ 1. Add the SCSS variable with `dark-` prefix
197
+ 2. Add the corresponding CSS custom property in `.layout`
198
+ 3. Document it in this guide
199
+ 4. Update any relevant usage examples
200
+
201
+ ### File Structure
202
+
203
+ ```
204
+ src/styles/
205
+ ├── base/
206
+ │ └── _variables.scss ← SCSS variables defined here
207
+ ├── layout.scss ← Contains layout-specific styles
208
+ └── [other component files] ← Use CSS custom properties here
209
+ ```
210
+
211
+ ---
212
+
213
+ ## Examples
214
+
215
+ ### Example 1: Button Component
216
+
217
+ ```scss
218
+ .button {
219
+ background-color: var(--prp-bg-button-primary);
220
+ color: var(--prp-text-primary);
221
+ border: 1px solid var(--prp-border-primary);
222
+
223
+ &:hover {
224
+ box-shadow: 0 2px 4px var(--prp-shadow-medium);
225
+ }
226
+
227
+ &:focus {
228
+ box-shadow: 0 0 0 2px var(--prp-shadow-focus);
229
+ }
230
+ }
231
+ ```
232
+
233
+ ### Example 2: Input Field
234
+
235
+ ```scss
236
+ .input {
237
+ background-color: var(--prp-bg-tertiary);
238
+ color: var(--prp-text-primary);
239
+ border: 1px solid var(--prp-border-primary);
240
+
241
+ &::placeholder {
242
+ color: var(--prp-text-muted);
243
+ }
244
+
245
+ &:focus {
246
+ border-color: var(--prp-color-focus);
247
+ outline: none;
248
+ }
249
+ }
250
+ ```
251
+
252
+ ### Example 3: Error Message
253
+
254
+ ```scss
255
+ .error-message {
256
+ background-color: var(--prp-bg-secondary);
257
+ color: var(--prp-color-error);
258
+ border-left: 4px solid var(--prp-color-error);
259
+ padding: 1rem;
260
+ }
261
+ ```
262
+
263
+ ---
264
+
265
+ ## Quick Reference
266
+
267
+ ### Background Hierarchy
268
+
269
+ ```
270
+ Darkest → Lightest
271
+ void → slate → mist → silver → pearl
272
+ ```
273
+
274
+ ### Text Hierarchy
275
+
276
+ ```
277
+ Brightest → Most Muted
278
+ pearl → ash → dust
279
+ ```
280
+
281
+ ### Action Colors
282
+
283
+ ```
284
+ ocean (primary) → sky (focus)
285
+ emerald (success)
286
+ ruby (error)
287
+ ```
288
+
289
+ ---
290
+
291
+ ## Notes
292
+
293
+ - All colors are scoped to `.layout` to prevent conflicts
294
+ - The `prp-` prefix stands for "proje-react-panel"
295
+ - SCSS variables are compile-time only, CSS custom properties are runtime
296
+ - Always update this guide when modifying the color system