@qoretechnologies/reqore 0.56.0 → 0.56.1
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/components/Button/index.d.ts +6 -0
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Button/index.js +3 -0
- package/dist/components/Button/index.js.map +1 -1
- package/dist/components/DatePicker/index.d.ts.map +1 -1
- package/dist/components/DatePicker/index.js +1 -1
- package/dist/components/DatePicker/index.js.map +1 -1
- package/dist/components/Dropdown/index.d.ts +1 -1
- package/dist/components/Dropdown/index.d.ts.map +1 -1
- package/dist/components/Dropdown/index.js +2 -2
- package/dist/components/Dropdown/index.js.map +1 -1
- package/dist/components/InternalPopover/index.d.ts +3 -0
- package/dist/components/InternalPopover/index.d.ts.map +1 -1
- package/dist/components/InternalPopover/index.js +2 -2
- package/dist/components/InternalPopover/index.js.map +1 -1
- package/dist/components/Menu/index.d.ts +4 -1
- package/dist/components/Menu/index.d.ts.map +1 -1
- package/dist/components/Panel/index.d.ts +3 -0
- package/dist/components/Panel/index.d.ts.map +1 -1
- package/dist/components/Panel/index.js +18 -3
- package/dist/components/Panel/index.js.map +1 -1
- package/dist/components/Popover/index.d.ts +1 -0
- package/dist/components/Popover/index.d.ts.map +1 -1
- package/dist/components/Popover/index.js +129 -20
- package/dist/components/Popover/index.js.map +1 -1
- package/dist/components/Textarea/index.d.ts.map +1 -1
- package/dist/components/Textarea/index.js +1 -1
- package/dist/components/Textarea/index.js.map +1 -1
- package/dist/constants/sizes.d.ts +64 -2
- package/dist/constants/sizes.d.ts.map +1 -1
- package/dist/constants/sizes.js +99 -39
- package/dist/constants/sizes.js.map +1 -1
- package/dist/containers/UIProvider.d.ts +6 -0
- package/dist/containers/UIProvider.d.ts.map +1 -1
- package/dist/containers/UIProvider.js +3 -0
- package/dist/containers/UIProvider.js.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/docs/docs/components/button.mdx +391 -0
- package/docs/docs/components/input.mdx +328 -0
- package/docs/docs/components/panel.mdx +442 -0
- package/docs/docs/components/table.mdx +872 -0
- package/docs/docs/guides/effects.mdx +586 -0
- package/docs/docs/guides/getting-started.mdx +164 -0
- package/docs/docs/guides/theming.mdx +252 -0
- package/docs/docs/intro.md +98 -0
- package/docs/sidebars.js +23 -0
- package/package.json +11 -3
- package/tests.json +1 -1
- package/typedoc.json +10 -0
|
@@ -0,0 +1,442 @@
|
|
|
1
|
+
---
|
|
2
|
+
sidebar_position: 2
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
import LiveDemo from '../../src/components/LiveDemo';
|
|
6
|
+
import {
|
|
7
|
+
ReqorePanel,
|
|
8
|
+
ReqoreButton,
|
|
9
|
+
ReqoreControlGroup,
|
|
10
|
+
ReqoreInput,
|
|
11
|
+
ReqoreCheckbox,
|
|
12
|
+
ReqoreP,
|
|
13
|
+
} from '../../../src';
|
|
14
|
+
|
|
15
|
+
# Panel
|
|
16
|
+
|
|
17
|
+
Panels are container components that provide a consistent way to group related content with optional headers, footers, and actions.
|
|
18
|
+
|
|
19
|
+
## Props
|
|
20
|
+
|
|
21
|
+
| Prop | Type | Required | Default | Description |
|
|
22
|
+
| ------------------ | ---------------------- | -------- | ---------- | ---------------------- |
|
|
23
|
+
| `label` | `string` | - | - | Panel header title |
|
|
24
|
+
| `icon` | `IReqoreIconName` | - | - | Header icon |
|
|
25
|
+
| `children` | `ReactNode` | - | - | Panel content |
|
|
26
|
+
| `actions` | `IReqorePanelAction[]` | - | - | Header action buttons |
|
|
27
|
+
| `collapsible` | `boolean` | - | `false` | Enable collapse |
|
|
28
|
+
| `isCollapsed` | `boolean` | - | - | Collapsed state |
|
|
29
|
+
| `onCollapseChange` | `function` | - | - | Collapse callback |
|
|
30
|
+
| `badge` | `number \| object` | - | - | Header badge |
|
|
31
|
+
| `size` | `TSizes` | - | `'normal'` | Panel size |
|
|
32
|
+
| `intent` | `TReqoreIntent` | - | - | Color intent |
|
|
33
|
+
| `flat` | `boolean` | - | `true` | Flat styling |
|
|
34
|
+
| `minimal` | `boolean` | - | `false` | Minimal styling |
|
|
35
|
+
| `unpadded` | `boolean` | - | `false` | Remove padding |
|
|
36
|
+
| `tooltip` | `string \| object` | - | - | Tooltip |
|
|
37
|
+
| `breadcrumbs` | `object` | - | - | Breadcrumb navigation |
|
|
38
|
+
| `contentStyle` | `CSSProperties` | - | - | Content wrapper styles |
|
|
39
|
+
|
|
40
|
+
## Basic Usage
|
|
41
|
+
|
|
42
|
+
<LiveDemo vertical>
|
|
43
|
+
<ReqorePanel label='Panel Title'>Panel content goes here</ReqorePanel>
|
|
44
|
+
</LiveDemo>
|
|
45
|
+
|
|
46
|
+
```tsx
|
|
47
|
+
import { ReqorePanel } from '@qoretechnologies/reqore';
|
|
48
|
+
|
|
49
|
+
function Example() {
|
|
50
|
+
return <ReqorePanel label='Panel Title'>Panel content goes here</ReqorePanel>;
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## With Icon
|
|
55
|
+
|
|
56
|
+
<LiveDemo vertical>
|
|
57
|
+
<ReqorePanel label='Settings' icon='Settings4Line'>
|
|
58
|
+
Your settings content
|
|
59
|
+
</ReqorePanel>
|
|
60
|
+
</LiveDemo>
|
|
61
|
+
|
|
62
|
+
```tsx
|
|
63
|
+
<ReqorePanel label='Settings' icon='Settings4Line'>
|
|
64
|
+
Your settings content
|
|
65
|
+
</ReqorePanel>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Panel Actions
|
|
69
|
+
|
|
70
|
+
Add action buttons to the panel header:
|
|
71
|
+
|
|
72
|
+
<LiveDemo vertical>
|
|
73
|
+
<ReqorePanel
|
|
74
|
+
label='My Panel'
|
|
75
|
+
actions={[
|
|
76
|
+
{
|
|
77
|
+
icon: 'EditLine',
|
|
78
|
+
label: 'Edit',
|
|
79
|
+
onClick: () => alert('Edit clicked'),
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
icon: 'DeleteBinLine',
|
|
83
|
+
label: 'Delete',
|
|
84
|
+
intent: 'danger',
|
|
85
|
+
onClick: () => alert('Delete clicked'),
|
|
86
|
+
},
|
|
87
|
+
]}
|
|
88
|
+
>
|
|
89
|
+
Click the action buttons in the header!
|
|
90
|
+
</ReqorePanel>
|
|
91
|
+
</LiveDemo>
|
|
92
|
+
|
|
93
|
+
```tsx
|
|
94
|
+
<ReqorePanel
|
|
95
|
+
label='My Panel'
|
|
96
|
+
actions={[
|
|
97
|
+
{
|
|
98
|
+
icon: 'EditLine',
|
|
99
|
+
label: 'Edit',
|
|
100
|
+
onClick: () => console.log('Edit clicked'),
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
icon: 'DeleteBinLine',
|
|
104
|
+
label: 'Delete',
|
|
105
|
+
intent: 'danger',
|
|
106
|
+
onClick: () => console.log('Delete clicked'),
|
|
107
|
+
},
|
|
108
|
+
]}
|
|
109
|
+
>
|
|
110
|
+
Content
|
|
111
|
+
</ReqorePanel>
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Collapsible Panel
|
|
115
|
+
|
|
116
|
+
<LiveDemo vertical>
|
|
117
|
+
<ReqorePanel label='Collapsible Panel' collapsible isCollapsed={false}>
|
|
118
|
+
This content can be collapsed - try clicking the collapse button!
|
|
119
|
+
</ReqorePanel>
|
|
120
|
+
</LiveDemo>
|
|
121
|
+
|
|
122
|
+
```tsx
|
|
123
|
+
<ReqorePanel
|
|
124
|
+
label='Collapsible Panel'
|
|
125
|
+
collapsible
|
|
126
|
+
isCollapsed={false}
|
|
127
|
+
onCollapseChange={(isCollapsed) => console.log(isCollapsed)}
|
|
128
|
+
>
|
|
129
|
+
This content can be collapsed
|
|
130
|
+
</ReqorePanel>
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## With Badge
|
|
134
|
+
|
|
135
|
+
<LiveDemo vertical>
|
|
136
|
+
<ReqorePanel label='Notifications' badge={5} icon='NotificationLine'>
|
|
137
|
+
You have 5 new notifications
|
|
138
|
+
</ReqorePanel>
|
|
139
|
+
</LiveDemo>
|
|
140
|
+
|
|
141
|
+
```tsx
|
|
142
|
+
<ReqorePanel label='Notifications' badge={5} icon='NotificationLine'>
|
|
143
|
+
You have 5 new notifications
|
|
144
|
+
</ReqorePanel>
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## With Intent
|
|
148
|
+
|
|
149
|
+
<LiveDemo vertical>
|
|
150
|
+
<ReqorePanel label='Info Panel' intent='info'>
|
|
151
|
+
Information content
|
|
152
|
+
</ReqorePanel>
|
|
153
|
+
<ReqorePanel label='Success Panel' intent='success'>
|
|
154
|
+
Success content
|
|
155
|
+
</ReqorePanel>
|
|
156
|
+
<ReqorePanel label='Warning Panel' intent='warning'>
|
|
157
|
+
Warning content
|
|
158
|
+
</ReqorePanel>
|
|
159
|
+
<ReqorePanel label='Danger Panel' intent='danger'>
|
|
160
|
+
Error content
|
|
161
|
+
</ReqorePanel>
|
|
162
|
+
</LiveDemo>
|
|
163
|
+
|
|
164
|
+
```tsx
|
|
165
|
+
<ReqoreControlGroup vertical>
|
|
166
|
+
<ReqorePanel label='Info Panel' intent='info'>
|
|
167
|
+
Information content
|
|
168
|
+
</ReqorePanel>
|
|
169
|
+
<ReqorePanel label='Success Panel' intent='success'>
|
|
170
|
+
Success content
|
|
171
|
+
</ReqorePanel>
|
|
172
|
+
<ReqorePanel label='Warning Panel' intent='warning'>
|
|
173
|
+
Warning content
|
|
174
|
+
</ReqorePanel>
|
|
175
|
+
<ReqorePanel label='Danger Panel' intent='danger'>
|
|
176
|
+
Error content
|
|
177
|
+
</ReqorePanel>
|
|
178
|
+
</ReqoreControlGroup>
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
## Panel Sizes
|
|
182
|
+
|
|
183
|
+
<LiveDemo vertical>
|
|
184
|
+
<ReqorePanel label='Micro Panel' size='micro'>
|
|
185
|
+
Micro content
|
|
186
|
+
</ReqorePanel>
|
|
187
|
+
<ReqorePanel label='Tiny Panel' size='tiny'>
|
|
188
|
+
Tiny content
|
|
189
|
+
</ReqorePanel>
|
|
190
|
+
<ReqorePanel label='Small Panel' size='small'>
|
|
191
|
+
Small content
|
|
192
|
+
</ReqorePanel>
|
|
193
|
+
<ReqorePanel label='Normal Panel'>Normal content</ReqorePanel>
|
|
194
|
+
<ReqorePanel label='Big Panel' size='big'>
|
|
195
|
+
Big content
|
|
196
|
+
</ReqorePanel>
|
|
197
|
+
<ReqorePanel label='Huge Panel' size='huge'>
|
|
198
|
+
Huge content
|
|
199
|
+
</ReqorePanel>
|
|
200
|
+
<ReqorePanel label='Massive Panel' size='massive'>
|
|
201
|
+
Massive content
|
|
202
|
+
</ReqorePanel>
|
|
203
|
+
</LiveDemo>
|
|
204
|
+
|
|
205
|
+
```tsx
|
|
206
|
+
<ReqoreControlGroup vertical>
|
|
207
|
+
<ReqorePanel label='Micro Panel' size='micro'>
|
|
208
|
+
Micro content
|
|
209
|
+
</ReqorePanel>
|
|
210
|
+
<ReqorePanel label='Tiny Panel' size='tiny'>
|
|
211
|
+
Tiny content
|
|
212
|
+
</ReqorePanel>
|
|
213
|
+
<ReqorePanel label='Small Panel' size='small'>
|
|
214
|
+
Small content
|
|
215
|
+
</ReqorePanel>
|
|
216
|
+
<ReqorePanel label='Normal Panel'>Normal content</ReqorePanel>
|
|
217
|
+
<ReqorePanel label='Big Panel' size='big'>
|
|
218
|
+
Big content
|
|
219
|
+
</ReqorePanel>
|
|
220
|
+
<ReqorePanel label='Huge Panel' size='huge'>
|
|
221
|
+
Huge content
|
|
222
|
+
</ReqorePanel>
|
|
223
|
+
<ReqorePanel label='Massive Panel' size='massive'>
|
|
224
|
+
Massive content
|
|
225
|
+
</ReqorePanel>
|
|
226
|
+
</ReqoreControlGroup>
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
## Flat vs Non-Flat
|
|
230
|
+
|
|
231
|
+
<LiveDemo vertical>
|
|
232
|
+
<ReqorePanel label='Flat Panel' flat>
|
|
233
|
+
Flat styling (default)
|
|
234
|
+
</ReqorePanel>
|
|
235
|
+
<ReqorePanel label='Raised Panel' flat={false}>
|
|
236
|
+
Raised with shadow
|
|
237
|
+
</ReqorePanel>
|
|
238
|
+
</LiveDemo>
|
|
239
|
+
|
|
240
|
+
```tsx
|
|
241
|
+
<ReqoreControlGroup vertical>
|
|
242
|
+
<ReqorePanel label='Flat Panel' flat>
|
|
243
|
+
Flat styling (default)
|
|
244
|
+
</ReqorePanel>
|
|
245
|
+
<ReqorePanel label='Raised Panel' flat={false}>
|
|
246
|
+
Raised with shadow
|
|
247
|
+
</ReqorePanel>
|
|
248
|
+
</ReqoreControlGroup>
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
## Content Alignment
|
|
252
|
+
|
|
253
|
+
<LiveDemo vertical>
|
|
254
|
+
<ReqorePanel
|
|
255
|
+
label='Centered Content'
|
|
256
|
+
contentStyle={{
|
|
257
|
+
display: 'flex',
|
|
258
|
+
justifyContent: 'center',
|
|
259
|
+
alignItems: 'center',
|
|
260
|
+
minHeight: '100px',
|
|
261
|
+
}}
|
|
262
|
+
>
|
|
263
|
+
Centered content
|
|
264
|
+
</ReqorePanel>
|
|
265
|
+
</LiveDemo>
|
|
266
|
+
|
|
267
|
+
```tsx
|
|
268
|
+
<ReqorePanel
|
|
269
|
+
label='Centered Content'
|
|
270
|
+
contentStyle={{
|
|
271
|
+
display: 'flex',
|
|
272
|
+
justifyContent: 'center',
|
|
273
|
+
alignItems: 'center',
|
|
274
|
+
}}
|
|
275
|
+
>
|
|
276
|
+
Centered content
|
|
277
|
+
</ReqorePanel>
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
## Minimal Panel
|
|
281
|
+
|
|
282
|
+
<LiveDemo vertical>
|
|
283
|
+
<ReqorePanel label='Minimal' minimal>
|
|
284
|
+
Minimal styling with less visual weight
|
|
285
|
+
</ReqorePanel>
|
|
286
|
+
</LiveDemo>
|
|
287
|
+
|
|
288
|
+
```tsx
|
|
289
|
+
<ReqorePanel label='Minimal' minimal>
|
|
290
|
+
Minimal styling with less visual weight
|
|
291
|
+
</ReqorePanel>
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
## With Tooltip
|
|
295
|
+
|
|
296
|
+
<LiveDemo vertical>
|
|
297
|
+
<ReqorePanel label='Panel' tooltip='This is helpful panel information'>
|
|
298
|
+
Hover over the label to see tooltip
|
|
299
|
+
</ReqorePanel>
|
|
300
|
+
</LiveDemo>
|
|
301
|
+
|
|
302
|
+
```tsx
|
|
303
|
+
<ReqorePanel label='Panel' tooltip='This is helpful panel information'>
|
|
304
|
+
Content
|
|
305
|
+
</ReqorePanel>
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
## Examples
|
|
309
|
+
|
|
310
|
+
### Card Layout
|
|
311
|
+
|
|
312
|
+
<LiveDemo vertical>
|
|
313
|
+
<ReqorePanel
|
|
314
|
+
label='Premium Plan'
|
|
315
|
+
badge={{ label: 'Popular', intent: 'success' }}
|
|
316
|
+
actions={[
|
|
317
|
+
{
|
|
318
|
+
label: 'Subscribe',
|
|
319
|
+
icon: 'ShoppingCartLine',
|
|
320
|
+
intent: 'success',
|
|
321
|
+
onClick: () => alert('Subscribed!'),
|
|
322
|
+
},
|
|
323
|
+
]}
|
|
324
|
+
>
|
|
325
|
+
<ReqoreControlGroup vertical>
|
|
326
|
+
<ReqoreP>$29/month</ReqoreP>
|
|
327
|
+
<ReqoreP>All features included</ReqoreP>
|
|
328
|
+
<ReqoreButton fluid intent='success'>
|
|
329
|
+
Get Started
|
|
330
|
+
</ReqoreButton>
|
|
331
|
+
</ReqoreControlGroup>
|
|
332
|
+
</ReqorePanel>
|
|
333
|
+
</LiveDemo>
|
|
334
|
+
|
|
335
|
+
```tsx
|
|
336
|
+
function ProductCard() {
|
|
337
|
+
return (
|
|
338
|
+
<ReqorePanel
|
|
339
|
+
label='Premium Plan'
|
|
340
|
+
badge={{ label: 'Popular', intent: 'success' }}
|
|
341
|
+
actions={[
|
|
342
|
+
{
|
|
343
|
+
label: 'Learn More',
|
|
344
|
+
icon: 'InformationLine',
|
|
345
|
+
onClick: () => {},
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
label: 'Subscribe',
|
|
349
|
+
icon: 'ShoppingCartLine',
|
|
350
|
+
intent: 'success',
|
|
351
|
+
onClick: () => {},
|
|
352
|
+
},
|
|
353
|
+
]}
|
|
354
|
+
>
|
|
355
|
+
<ReqoreControlGroup vertical>
|
|
356
|
+
<ReqoreP>$29/month</ReqoreP>
|
|
357
|
+
<ReqoreP>All features included</ReqoreP>
|
|
358
|
+
<ReqoreButton fluid intent='success'>
|
|
359
|
+
Get Started
|
|
360
|
+
</ReqoreButton>
|
|
361
|
+
</ReqoreControlGroup>
|
|
362
|
+
</ReqorePanel>
|
|
363
|
+
);
|
|
364
|
+
}
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
### Settings Section
|
|
368
|
+
|
|
369
|
+
<LiveDemo vertical>
|
|
370
|
+
<ReqorePanel
|
|
371
|
+
label='Account Settings'
|
|
372
|
+
icon='UserLine'
|
|
373
|
+
collapsible
|
|
374
|
+
actions={[
|
|
375
|
+
{
|
|
376
|
+
icon: 'SaveLine',
|
|
377
|
+
label: 'Save',
|
|
378
|
+
intent: 'success',
|
|
379
|
+
onClick: () => alert('Settings saved!'),
|
|
380
|
+
},
|
|
381
|
+
]}
|
|
382
|
+
>
|
|
383
|
+
<ReqoreControlGroup vertical>
|
|
384
|
+
<ReqoreInput label='Email' placeholder='user@example.com' />
|
|
385
|
+
<ReqoreInput label='Username' placeholder='johndoe' />
|
|
386
|
+
<ReqoreCheckbox label='Email notifications' />
|
|
387
|
+
</ReqoreControlGroup>
|
|
388
|
+
</ReqorePanel>
|
|
389
|
+
</LiveDemo>
|
|
390
|
+
|
|
391
|
+
```tsx
|
|
392
|
+
function SettingsSection() {
|
|
393
|
+
return (
|
|
394
|
+
<ReqorePanel
|
|
395
|
+
label='Account Settings'
|
|
396
|
+
icon='UserLine'
|
|
397
|
+
collapsible
|
|
398
|
+
actions={[
|
|
399
|
+
{
|
|
400
|
+
icon: 'SaveLine',
|
|
401
|
+
label: 'Save',
|
|
402
|
+
intent: 'success',
|
|
403
|
+
},
|
|
404
|
+
]}
|
|
405
|
+
>
|
|
406
|
+
<ReqoreControlGroup vertical>
|
|
407
|
+
<ReqoreInput label='Email' />
|
|
408
|
+
<ReqoreInput label='Username' />
|
|
409
|
+
<ReqoreCheckbox label='Email notifications' />
|
|
410
|
+
</ReqoreControlGroup>
|
|
411
|
+
</ReqorePanel>
|
|
412
|
+
);
|
|
413
|
+
}
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
### Dashboard Widget
|
|
417
|
+
|
|
418
|
+
<LiveDemo vertical>
|
|
419
|
+
<ReqorePanel label='Active Users' icon='UserSmileLine' badge={{ label: '1,247', intent: 'info' }}>
|
|
420
|
+
<ReqoreControlGroup vertical>
|
|
421
|
+
<ReqoreP size='huge'>1,247</ReqoreP>
|
|
422
|
+
<ReqoreP intent='success'>↑ 12% from last week</ReqoreP>
|
|
423
|
+
</ReqoreControlGroup>
|
|
424
|
+
</ReqorePanel>
|
|
425
|
+
</LiveDemo>
|
|
426
|
+
|
|
427
|
+
```tsx
|
|
428
|
+
function DashboardWidget() {
|
|
429
|
+
return (
|
|
430
|
+
<ReqorePanel
|
|
431
|
+
label='Active Users'
|
|
432
|
+
icon='UserSmileLine'
|
|
433
|
+
badge={{ label: '1,247', intent: 'info' }}
|
|
434
|
+
>
|
|
435
|
+
<ReqoreControlGroup vertical>
|
|
436
|
+
<ReqoreP size='huge'>1,247</ReqoreP>
|
|
437
|
+
<ReqoreP intent='success'>+12% from last week</ReqoreP>
|
|
438
|
+
</ReqoreControlGroup>
|
|
439
|
+
</ReqorePanel>
|
|
440
|
+
);
|
|
441
|
+
}
|
|
442
|
+
```
|