prosperita-dumbo-react 1.4.14 → 1.4.15

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/README.md CHANGED
@@ -1,1594 +1,1594 @@
1
- # Prosperita Dumbo React - Biblioteca de Componentes
2
-
3
- Uma biblioteca de componentes React moderna e acessível, desenvolvida para aplicações financeiras com design system consistente.
4
-
5
- ## 📦 Instalação
6
-
7
- ```bash
8
- npm install prosperita-dumbo-react
9
- # ou
10
- yarn add prosperita-dumbo-react
11
- ```
12
-
13
- ## 🚀 Uso Básico
14
-
15
- ```tsx
16
- import { Button, Input, Modal } from 'prosperita-dumbo-react';
17
- import 'prosperita-dumbo-react/dist/style.css';
18
-
19
- function App() {
20
- return (
21
- <div>
22
- <Button kind="primary" size="medium" label="Clique aqui" />
23
- <Input label="Nome" placeholder="Digite seu nome" />
24
- </div>
25
- );
26
- }
27
- ```
28
-
29
- ## 🎨 Componentes
30
-
31
- ### Button
32
-
33
- Botão com múltiplas variantes e tamanhos.
34
-
35
- ```tsx
36
- import { Button } from 'prosperita-dumbo-react';
37
-
38
- // Props
39
- type ButtonProps = {
40
- kind: "primary" | "secondary" | "tertiary" | "ghost" | "dangerPrimary" | "dangerTertiary" | "dangerGhost";
41
- size: "large" | "medium" | "small" | "extraLarge" | "twoXLarge" | "expressive";
42
- label?: ReactNode;
43
- icon?: ReactNode | string;
44
- loading?: boolean;
45
- disabled?: boolean;
46
- onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
47
- width?: string;
48
- full?: boolean;
49
- borderNone?: boolean;
50
- hasIconSvg?: boolean;
51
- fortable?: boolean;
52
- fortableRadius?: boolean;
53
- dimension?: string;
54
- noPadding?: string;
55
- style?: CSSProperties;
56
- };
57
-
58
- // Exemplos
59
- <Button
60
- kind="primary"
61
- size="medium"
62
- label="Salvar"
63
- onClick={() => console.log('Clicado!')}
64
- />
65
-
66
- <Button
67
- kind="dangerPrimary"
68
- size="large"
69
- label="Excluir"
70
- icon="🗑️"
71
- loading={true}
72
- />
73
- ```
74
-
75
- ### Input
76
-
77
- Campo de entrada com diferentes tipos e estados.
78
-
79
- ```tsx
80
- import { Input } from 'prosperita-dumbo-react';
81
-
82
- // Props
83
- type InputProps = {
84
- size?: "small" | "medium" | "large";
85
- label?: string;
86
- message?: ReactNode;
87
- error?: boolean;
88
- warning?: boolean;
89
- maxLength?: number;
90
- disabled?: boolean;
91
- readOnly?: boolean;
92
- loading?: boolean;
93
- type?: "text" | "password" | "email" | "number" | "textarea";
94
- placeholder?: string;
95
- value?: string | number;
96
- onChange?: (event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
97
- noRadius?: boolean;
98
- borderNone?: boolean;
99
- forFilter?: boolean;
100
- forModal?: boolean;
101
- forSlider?: boolean;
102
- };
103
-
104
- // Exemplos
105
- <Input
106
- label="Email"
107
- type="email"
108
- placeholder="Digite seu email"
109
- error={true}
110
- message="Email inválido"
111
- />
112
-
113
- <Input
114
- label="Senha"
115
- type="password"
116
- size="large"
117
- disabled={false}
118
- />
119
- ```
120
-
121
- ### Checkbox
122
-
123
- Caixa de seleção com diferentes estados.
124
-
125
- ```tsx
126
- import { Checkbox } from 'prosperita-dumbo-react';
127
-
128
- // Props
129
- type CheckboxProps = {
130
- label?: string;
131
- checked?: boolean;
132
- disabled?: boolean;
133
- size?: "small" | "medium" | "large";
134
- onChange?: (checked: boolean) => void;
135
- error?: boolean;
136
- message?: string;
137
- };
138
-
139
- // Exemplos
140
- <Checkbox
141
- label="Aceito os termos"
142
- checked={true}
143
- onChange={(checked) => console.log(checked)}
144
- />
145
-
146
- <Checkbox
147
- label="Notificações"
148
- size="large"
149
- disabled={false}
150
- />
151
- ```
152
-
153
- ### Modal
154
-
155
- Modal com diferentes tamanhos e configurações.
156
-
157
- ```tsx
158
- import { Modal } from 'prosperita-dumbo-react';
159
-
160
- // Props
161
- type ModalProps = {
162
- open?: boolean;
163
- label?: ReactNode;
164
- textLabel?: ReactNode;
165
- children?: ReactNode;
166
- onClose?: () => void;
167
- backgroundModal?: string;
168
- background?: string;
169
- height?: string;
170
- width?: string;
171
- overflow?: boolean;
172
- radius?: boolean;
173
- closeButtonModal?: boolean;
174
- buttons?: Array<{
175
- label?: string;
176
- icon?: string | ReactNode;
177
- onClick?: () => void;
178
- disabled?: boolean;
179
- hasIconSvg?: boolean;
180
- dimension?: string;
181
- loading?: boolean;
182
- size?: "large" | "medium" | "small" | "extraLarge" | "twoXLarge" | "expressive";
183
- kind?: "primary" | "secondary" | "tertiary" | "ghost" | "dangerPrimary" | "dangerTertiary" | "dangerGhost";
184
- }>;
185
- };
186
-
187
- // Exemplos
188
- <Modal
189
- open={isOpen}
190
- label="Confirmação"
191
- onClose={() => setIsOpen(false)}
192
- buttons={[
193
- { label: "Cancelar", kind: "secondary", onClick: () => setIsOpen(false) },
194
- { label: "Confirmar", kind: "primary", onClick: handleConfirm }
195
- ]}
196
- >
197
- <p>Tem certeza que deseja excluir este item?</p>
198
- </Modal>
199
- ```
200
-
201
- ### TableColumnDrag
202
-
203
- Tabela com colunas arrastáveis e funcionalidades avançadas.
204
-
205
- ```tsx
206
- import { TableColumnDrag } from 'prosperita-dumbo-react';
207
-
208
- // Props
209
- type TableColumnDragProps = {
210
- columnTitles: Array<{
211
- id: string;
212
- label: ReactNode;
213
- name: string;
214
- hasFilter?: boolean;
215
- width?: string;
216
- text: boolean;
217
- value?: string;
218
- placeholder?: string;
219
- options?: Array<{ label: string; value: string }>;
220
- onChange?: (event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
221
- onChangeMoney?: (event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
222
- type?: string;
223
- paddingDrop?: string;
224
- }>;
225
- rowData: Array<{ [key: string]: ReactNode | string | JSX.Element }>;
226
- pageSizes: number[];
227
- clearFilesFilter: boolean;
228
- label?: string;
229
- search?: boolean;
230
- nofilter?: boolean;
231
- messagedatalength?: ReactNode;
232
- width?: string;
233
- sizeSearch?: "small" | "large" | "medium";
234
- rowSizes?: string;
235
- columnSizes?: string;
236
- stickyFirstColumn?: boolean;
237
- radiusButtonFilter: number;
238
- column_storage_name: string;
239
- widthOverflow?: string;
240
- values?: { [key: string]: any };
241
- onChangePage?: (event: number) => void;
242
- onFilterStateChange?: (isFiltering: boolean, data: any[]) => void;
243
- onChangeSearch?: (event: ChangeEvent<HTMLInputElement>) => void;
244
- buttons?: Array<{
245
- label: string;
246
- onClick?: () => void;
247
- icon?: string | ReactNode;
248
- kind: "primary" | "secondary" | "tertiary" | "ghost" | "dangerPrimary" | "dangerTertiary" | "dangerGhost";
249
- position?: "right" | "left";
250
- width?: string;
251
- hasIconSvg?: boolean;
252
- dimension?: string;
253
- size?: "small" | "large" | "medium" | "extraLarge" | "twoXLarge" | "expressive";
254
- }>;
255
- actions?: Array<{
256
- text: ReactNode;
257
- icon?: ReactNode;
258
- onClick?: () => void;
259
- feature?: boolean;
260
- noPadding?: string;
261
- size: "small" | "large" | "medium" | "extraLarge" | "twoXLarge" | "expressive";
262
- hasIconSvg?: boolean;
263
- width?: string;
264
- }>;
265
- headerAction?: {
266
- active: boolean;
267
- count: number;
268
- };
269
- datePicker?: {
270
- label: string;
271
- type?: string;
272
- value?: string;
273
- onChange?: (event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
274
- };
275
- };
276
-
277
- // Exemplo
278
- const columns = [
279
- { id: 'name', label: 'Nome', name: 'name', hasFilter: true, text: true },
280
- { id: 'email', label: 'Email', name: 'email', hasFilter: true, text: true },
281
- { id: 'status', label: 'Status', name: 'status', hasFilter: true, text: false, options: [
282
- { label: 'Ativo', value: 'active' },
283
- { label: 'Inativo', value: 'inactive' }
284
- ]}
285
- ];
286
-
287
- const data = [
288
- { name: 'João Silva', email: 'joao@email.com', status: 'Ativo' },
289
- { name: 'Maria Santos', email: 'maria@email.com', status: 'Inativo' }
290
- ];
291
-
292
- <TableColumnDrag
293
- columnTitles={columns}
294
- rowData={data}
295
- pageSizes={[10, 25, 50]}
296
- clearFilesFilter={false}
297
- search={true}
298
- column_storage_name="user-table"
299
- radiusButtonFilter={2}
300
- buttons={[
301
- { label: "Novo", kind: "primary", position: "left", onClick: () => console.log('Novo') },
302
- { label: "Excluir", kind: "dangerPrimary", position: "right", onClick: () => console.log('Excluir') }
303
- ]}
304
- />
305
- ```
306
-
307
- ### Dropdown
308
-
309
- Menu dropdown com opções customizáveis.
310
-
311
- ```tsx
312
- import { Dropdown } from 'prosperita-dumbo-react';
313
-
314
- // Props
315
- type DropdownProps = {
316
- options: Array<{ label: string; value: string }>;
317
- placeholder?: string;
318
- value?: string;
319
- onChange?: (data: { selectedItem: any }) => void;
320
- size?: "small" | "medium" | "large";
321
- kind?: "default" | "fluid";
322
- disabled?: boolean;
323
- loading?: boolean;
324
- error?: boolean;
325
- message?: string;
326
- noRadius?: boolean;
327
- borderNone?: boolean;
328
- forFilter?: boolean;
329
- clearFiles?: boolean;
330
- paddingDrop?: string;
331
- autoComplete?: string;
332
- name?: string;
333
- };
334
-
335
- // Exemplo
336
- <Dropdown
337
- options={[
338
- { label: 'Opção 1', value: '1' },
339
- { label: 'Opção 2', value: '2' }
340
- ]}
341
- placeholder="Selecione uma opção"
342
- onChange={({ selectedItem }) => console.log(selectedItem)}
343
- size="medium"
344
- />
345
- ```
346
-
347
- ### TabPane
348
-
349
- Aba individual para sistema de abas.
350
-
351
- ```tsx
352
- import { TabPane } from 'prosperita-dumbo-react';
353
-
354
- // Props
355
- type TabPaneProps = {
356
- children?: ReactNode;
357
- label: string;
358
- onClick: () => void;
359
- isActive: boolean;
360
- icon?: string | ReactNode;
361
- bordercolor?: string;
362
- width?: string;
363
- disabled?: boolean;
364
- position?: "center" | "right" | "left";
365
- padding?: string;
366
- bottom?: boolean;
367
- borderRadius?: string;
368
- };
369
-
370
- // Exemplo
371
- <TabPane
372
- label="Perfil"
373
- isActive={activeTab === 'profile'}
374
- onClick={() => setActiveTab('profile')}
375
- icon="👤"
376
- bordercolor="#007bff"
377
- >
378
- <div>Conteúdo da aba Perfil</div>
379
- </TabPane>
380
- ```
381
-
382
- ### Search
383
-
384
- Campo de busca com funcionalidades avançadas.
385
-
386
- ```tsx
387
- import { Search } from 'prosperita-dumbo-react';
388
-
389
- // Props
390
- type SearchProps = {
391
- kind?: "default" | "fluid";
392
- size?: "small" | "medium" | "large";
393
- placeholder?: string;
394
- value?: string;
395
- onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
396
- borderTable?: boolean;
397
- disabled?: boolean;
398
- loading?: boolean;
399
- };
400
-
401
- // Exemplo
402
- <Search
403
- placeholder="Digite para pesquisar..."
404
- onChange={(e) => setSearchTerm(e.target.value)}
405
- size="medium"
406
- borderTable
407
- />
408
- ```
409
-
410
- ### Notification
411
-
412
- Notificação com diferentes tipos e posições.
413
-
414
- ```tsx
415
- import { Notification } from 'prosperita-dumbo-react';
416
-
417
- // Props
418
- type NotificationProps = {
419
- title?: string;
420
- message?: string;
421
- kind?: "info" | "success" | "warning" | "error";
422
- position?: "top-right" | "top-left" | "bottom-right" | "bottom-left";
423
- duration?: number;
424
- onClose?: () => void;
425
- icon?: ReactNode;
426
- };
427
-
428
- // Exemplo
429
- <Notification
430
- title="Sucesso!"
431
- message="Operação realizada com sucesso."
432
- kind="success"
433
- position="top-right"
434
- duration={5000}
435
- />
436
- ```
437
-
438
- ### Tooltip
439
-
440
- Tooltip com diferentes posições e tamanhos.
441
-
442
- ```tsx
443
- import { Tooltip } from 'prosperita-dumbo-react';
444
-
445
- // Props
446
- type TooltipProps = {
447
- children: ReactNode;
448
- label: string;
449
- align?: "top" | "top-right" | "top-left" | "bottom" | "bottom-right" | "bottom-left" | "left" | "right";
450
- size?: "small" | "medium" | "large";
451
- width?: string;
452
- disabled?: boolean;
453
- };
454
-
455
- // Exemplo
456
- <Tooltip label="Informação adicional" align="top" size="small">
457
- <Button label="Hover me" />
458
- </Tooltip>
459
- ```
460
-
461
- ### Loading
462
-
463
- Indicador de carregamento.
464
-
465
- ```tsx
466
- import { Loading } from 'prosperita-dumbo-react';
467
-
468
- // Props
469
- type LoadingProps = {
470
- size?: "small" | "medium" | "large";
471
- kind?: "spinner" | "skeleton";
472
- text?: string;
473
- };
474
-
475
- // Exemplo
476
- <Loading size="medium" text="Carregando..." />
477
- ```
478
-
479
- ### InlineLoading
480
-
481
- Indicador de carregamento inline.
482
-
483
- ```tsx
484
- import { InlineLoading } from 'prosperita-dumbo-react';
485
-
486
- // Props
487
- type InlineLoadingProps = {
488
- size?: "small" | "medium" | "large";
489
- text?: string;
490
- success?: boolean;
491
- error?: boolean;
492
- };
493
-
494
- // Exemplo
495
- <InlineLoading size="small" text="Salvando..." />
496
- ```
497
-
498
- ### ProgressIndicator
499
-
500
- Indicador de progresso.
501
-
502
- ```tsx
503
- import { ProgressIndicator } from 'prosperita-dumbo-react';
504
-
505
- // Props
506
- type ProgressIndicatorProps = {
507
- current: number;
508
- total: number;
509
- size?: "small" | "medium" | "large";
510
- showPercentage?: boolean;
511
- color?: string;
512
- };
513
-
514
- // Exemplo
515
- <ProgressIndicator current={75} total={100} showPercentage />
516
- ```
517
-
518
- ### Slider
519
-
520
- Controle deslizante.
521
-
522
- ```tsx
523
- import { Slider } from 'prosperita-dumbo-react';
524
-
525
- // Props
526
- type SliderProps = {
527
- min: number;
528
- max: number;
529
- value: number;
530
- onChange: (value: number) => void;
531
- step?: number;
532
- disabled?: boolean;
533
- showValue?: boolean;
534
- label?: string;
535
- };
536
-
537
- // Exemplo
538
- <Slider
539
- min={0}
540
- max={100}
541
- value={50}
542
- onChange={(value) => console.log(value)}
543
- step={1}
544
- showValue
545
- label="Volume"
546
- />
547
- ```
548
-
549
- ### Toggle
550
-
551
- Interruptor on/off.
552
-
553
- ```tsx
554
- import { Toggle } from 'prosperita-dumbo-react';
555
-
556
- // Props
557
- type ToggleProps = {
558
- checked: boolean;
559
- onChange: (checked: boolean) => void;
560
- disabled?: boolean;
561
- size?: "small" | "medium" | "large";
562
- label?: string;
563
- };
564
-
565
- // Exemplo
566
- <Toggle
567
- checked={isEnabled}
568
- onChange={setIsEnabled}
569
- label="Notificações"
570
- size="medium"
571
- />
572
- ```
573
-
574
- ### Radio
575
-
576
- Botão de opção única.
577
-
578
- ```tsx
579
- import { Radio } from 'prosperita-dumbo-react';
580
-
581
- // Props
582
- type RadioProps = {
583
- name: string;
584
- value: string;
585
- checked: boolean;
586
- onChange: (value: string) => void;
587
- label?: string;
588
- disabled?: boolean;
589
- size?: "small" | "medium" | "large";
590
- };
591
-
592
- // Exemplo
593
- <Radio
594
- name="gender"
595
- value="male"
596
- checked={gender === 'male'}
597
- onChange={setGender}
598
- label="Masculino"
599
- />
600
- ```
601
-
602
- ### Tag
603
-
604
- Tag para categorização.
605
-
606
- ```tsx
607
- import { Tag } from 'prosperita-dumbo-react';
608
-
609
- // Props
610
- type TagProps = {
611
- label: string;
612
- kind?: "primary" | "secondary" | "success" | "warning" | "error";
613
- size?: "small" | "medium" | "large";
614
- onRemove?: () => void;
615
- disabled?: boolean;
616
- };
617
-
618
- // Exemplo
619
- <Tag
620
- label="React"
621
- kind="primary"
622
- size="medium"
623
- onRemove={() => console.log('Removido')}
624
- />
625
- ```
626
-
627
- ### Tile
628
-
629
- Bloco de conteúdo.
630
-
631
- ```tsx
632
- import { Tile } from 'prosperita-dumbo-react';
633
-
634
- // Props
635
- type TileProps = {
636
- children: ReactNode;
637
- kind?: "default" | "selectable" | "expandable";
638
- selected?: boolean;
639
- expanded?: boolean;
640
- onClick?: () => void;
641
- onExpand?: () => void;
642
- disabled?: boolean;
643
- size?: "small" | "medium" | "large";
644
- };
645
-
646
- // Exemplo
647
- <Tile
648
- kind="selectable"
649
- selected={isSelected}
650
- onClick={() => setIsSelected(!isSelected)}
651
- >
652
- <h3>Título do Tile</h3>
653
- <p>Conteúdo do tile</p>
654
- </Tile>
655
- ```
656
-
657
- ### Breadcrumb
658
-
659
- Navegação em migalhas.
660
-
661
- ```tsx
662
- import { Breadcrumb } from 'prosperita-dumbo-react';
663
-
664
- // Props
665
- type BreadcrumbProps = {
666
- items: Array<{
667
- label: string;
668
- href?: string;
669
- onClick?: () => void;
670
- }>;
671
- separator?: string;
672
- size?: "small" | "medium" | "large";
673
- };
674
-
675
- // Exemplo
676
- <Breadcrumb
677
- items={[
678
- { label: 'Home', href: '/' },
679
- { label: 'Produtos', href: '/products' },
680
- { label: 'Detalhes' }
681
- ]}
682
- separator="/"
683
- />
684
- ```
685
-
686
- ### FileUploader
687
-
688
- Upload de arquivos.
689
-
690
- ```tsx
691
- import { FileUploader } from 'prosperita-dumbo-react';
692
-
693
- // Props
694
- type FileUploaderProps = {
695
- onUpload: (files: File[]) => void;
696
- accept?: string;
697
- multiple?: boolean;
698
- maxSize?: number;
699
- disabled?: boolean;
700
- label?: string;
701
- description?: string;
702
- error?: boolean;
703
- message?: string;
704
- };
705
-
706
- // Exemplo
707
- <FileUploader
708
- onUpload={(files) => console.log(files)}
709
- accept=".pdf,.doc,.docx"
710
- multiple={true}
711
- maxSize={5242880}
712
- label="Upload de documentos"
713
- description="Arraste arquivos ou clique para selecionar"
714
- />
715
- ```
716
-
717
- ### ContentSwitcher
718
-
719
- Alternador de conteúdo.
720
-
721
- ```tsx
722
- import { ContentSwitcher } from 'prosperita-dumbo-react';
723
-
724
- // Props
725
- type ContentSwitcherProps = {
726
- items: Array<{
727
- id: string;
728
- label: string;
729
- content: ReactNode;
730
- }>;
731
- activeId: string;
732
- onChange: (id: string) => void;
733
- size?: "small" | "medium" | "large";
734
- };
735
-
736
- // Exemplo
737
- <ContentSwitcher
738
- items={[
739
- { id: 'tab1', label: 'Aba 1', content: <div>Conteúdo 1</div> },
740
- { id: 'tab2', label: 'Aba 2', content: <div>Conteúdo 2</div> }
741
- ]}
742
- activeId={activeTab}
743
- onChange={setActiveTab}
744
- />
745
- ```
746
-
747
- ### MenuButton
748
-
749
- Botão de menu.
750
-
751
- ```tsx
752
- import { MenuButton } from 'prosperita-dumbo-react';
753
-
754
- // Props
755
- type MenuButtonProps = {
756
- label?: string;
757
- icon?: ReactNode;
758
- items: Array<{
759
- label: string;
760
- onClick: () => void;
761
- disabled?: boolean;
762
- icon?: ReactNode;
763
- }>;
764
- size?: "small" | "medium" | "large";
765
- kind?: "primary" | "secondary" | "tertiary" | "ghost";
766
- disabled?: boolean;
767
- };
768
-
769
- // Exemplo
770
- <MenuButton
771
- label="Ações"
772
- icon="⚙️"
773
- items={[
774
- { label: 'Editar', onClick: () => console.log('Editar') },
775
- { label: 'Excluir', onClick: () => console.log('Excluir') }
776
- ]}
777
- />
778
- ```
779
-
780
- ### Margin
781
-
782
- Componente para espaçamento.
783
-
784
- ```tsx
785
- import { Margin } from 'prosperita-dumbo-react';
786
-
787
- // Props
788
- type MarginProps = {
789
- children: ReactNode;
790
- top?: string | number;
791
- bottom?: string | number;
792
- left?: string | number;
793
- right?: string | number;
794
- all?: string | number;
795
- };
796
-
797
- // Exemplo
798
- <Margin top={20} bottom={10}>
799
- <Button label="Botão com margem" />
800
- </Margin>
801
- ```
802
-
803
- ### InputCurrency
804
-
805
- Campo de entrada para valores monetários com formatação automática.
806
-
807
- ```tsx
808
- import { InputCurrency } from 'prosperita-dumbo-react';
809
-
810
- // Props
811
- type InputCurrencyProps = {
812
- size?: "small" | "medium" | "large";
813
- label?: string;
814
- message?: string;
815
- SymbolCipher?: string;
816
- randomSymbol?: string;
817
- error?: boolean;
818
- warning?: boolean;
819
- maxLength?: number;
820
- disabled?: boolean;
821
- readOnly?: boolean;
822
- forModal?: boolean;
823
- forSlider?: boolean;
824
- noRadius?: boolean;
825
- borderNone?: boolean;
826
- clearFilds?: boolean;
827
- onChange?: (event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
828
- };
829
-
830
- // Exemplo
831
- <InputCurrency
832
- label="Valor"
833
- SymbolCipher="R$"
834
- placeholder="0,00"
835
- onChange={(e) => console.log(e.target.value)}
836
- />
837
- ```
838
-
839
- ### InputCurrencyFluid
840
-
841
- Versão fluida do campo de entrada monetária.
842
-
843
- ```tsx
844
- import { InputCurrencyFluid } from 'prosperita-dumbo-react';
845
-
846
- // Props
847
- type InputCurrencyFluidProps = {
848
- size?: "small" | "medium" | "large";
849
- message?: string;
850
- SymbolCipher?: string;
851
- randomSymbol?: string;
852
- error?: boolean;
853
- warning?: boolean;
854
- maxLength?: number;
855
- disabled?: boolean;
856
- readOnly?: boolean;
857
- forModal?: boolean;
858
- forSlider?: boolean;
859
- noRadius?: boolean;
860
- borderNone?: boolean;
861
- clearFiles?: boolean;
862
- onChange?: (event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
863
- };
864
-
865
- // Exemplo
866
- <InputCurrencyFluid
867
- SymbolCipher="R$"
868
- placeholder="0,00"
869
- onChange={(e) => console.log(e.target.value)}
870
- />
871
- ```
872
-
873
- ### InputFluid
874
-
875
- Campo de entrada fluido com funcionalidades avançadas.
876
-
877
- ```tsx
878
- import { InputFluid } from 'prosperita-dumbo-react';
879
-
880
- // Props
881
- type InputFluidProps = {
882
- label?: string;
883
- message?: string;
884
- placeholder?: string;
885
- error?: boolean;
886
- warning?: boolean;
887
- onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
888
- maxLength?: number;
889
- disabled?: boolean;
890
- readOnly?: boolean;
891
- loading?: boolean;
892
- cols?: number;
893
- rows?: number;
894
- noRadius?: boolean;
895
- borderNone?: boolean;
896
- tootipLabel?: {
897
- align: "top" | "top-left" | "top-right" | "bottom" | "bottom-left" | "bottom-right" | "left" | "right";
898
- width?: string;
899
- children?: ReactNode;
900
- size: "small" | "large" | "medium";
901
- label?: string;
902
- };
903
- };
904
-
905
- // Exemplo
906
- <InputFluid
907
- label="Nome"
908
- placeholder="Digite seu nome"
909
- loading={false}
910
- tootipLabel={{
911
- align: "top",
912
- label: "Informação adicional",
913
- size: "small"
914
- }}
915
- />
916
- ```
917
-
918
- ### InputSelect
919
-
920
- Campo de seleção baseado em react-select.
921
-
922
- ```tsx
923
- import { InputSelect } from 'prosperita-dumbo-react';
924
-
925
- // Props
926
- type InputSelectProps = {
927
- size: "small" | "large" | "medium";
928
- kind: "default" | "fluid" | "little";
929
- message?: string;
930
- label?: string;
931
- placeholder?: string;
932
- disabled?: boolean;
933
- error?: boolean;
934
- warning?: boolean;
935
- readonly?: boolean;
936
- loading?: boolean;
937
- options?: Array<{ label: string; value: string }>;
938
- styles?: StylesConfig;
939
- name?: string;
940
- id?: string;
941
- noRadius?: boolean;
942
- isMulti?: boolean;
943
- value?: string;
944
- onChange?: (event: any) => void;
945
- clearInput?: boolean;
946
- noBorder?: boolean;
947
- };
948
-
949
- // Exemplo
950
- <InputSelect
951
- size="medium"
952
- kind="default"
953
- label="Selecione uma opção"
954
- options={[
955
- { label: 'Opção 1', value: '1' },
956
- { label: 'Opção 2', value: '2' }
957
- ]}
958
- onChange={(selected) => console.log(selected)}
959
- />
960
- ```
961
-
962
- ### Tab
963
-
964
- Container para sistema de abas.
965
-
966
- ```tsx
967
- import { Tab } from 'prosperita-dumbo-react';
968
-
969
- // Props
970
- type TabProps = {
971
- children: ReactNode;
972
- width: string;
973
- bottom?: boolean;
974
- };
975
-
976
- // Exemplo
977
- <Tab width="100%" bottom={false}>
978
- <TabPane label="Aba 1" isActive={true} onClick={() => {}} />
979
- <TabPane label="Aba 2" isActive={false} onClick={() => {}} />
980
- </Tab>
981
- ```
982
-
983
- ### Table
984
-
985
- Tabela básica com funcionalidades de paginação e busca.
986
-
987
- ```tsx
988
- import { Table } from 'prosperita-dumbo-react';
989
-
990
- // Props
991
- type TableProps = {
992
- columnTitles: string[];
993
- rowData: Array<{ [key: string]: ReactNode | string | JSX.Element }>;
994
- sizeHeightMessage?: string;
995
- actions?: Array<{
996
- text: ReactNode;
997
- onClick?: () => void;
998
- }>;
999
- label?: {
1000
- content: JSX.Element | ReactNode;
1001
- padding?: string;
1002
- margin?: string;
1003
- };
1004
- buttons?: Array<{
1005
- label: string;
1006
- onClick?: () => void;
1007
- icon?: string;
1008
- kind: "primary" | "secondary" | "tertiary" | "ghost" | "dangerPrimary" | "dangerTertiary" | "dangerGhost";
1009
- position?: "right" | "left";
1010
- width?: string;
1011
- dimension?: string;
1012
- size?: "small" | "large" | "medium" | "extraLarge" | "twoXLarge" | "expressive";
1013
- disabled?: boolean;
1014
- tooltip?: {
1015
- align: "top" | "top-left" | "top-right" | "bottom" | "bottom-left" | "bottom-right" | "left" | "right";
1016
- width?: string;
1017
- children?: ReactNode;
1018
- size: "small" | "large" | "medium";
1019
- label?: string;
1020
- };
1021
- }>;
1022
- pageSizes: number[];
1023
- datePicker?: {
1024
- label: string;
1025
- type?: string;
1026
- value?: string;
1027
- onChange?: (event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
1028
- };
1029
- search?: boolean;
1030
- pagination?: boolean;
1031
- messagedatalength?: string;
1032
- width?: string;
1033
- sizeSearch?: "small" | "large" | "medium";
1034
- rowSizes?: string;
1035
- radius?: boolean;
1036
- footer?: {
1037
- ht: string;
1038
- element: ReactNode;
1039
- bg: string;
1040
- };
1041
- bg?: string;
1042
- ht?: string;
1043
- };
1044
-
1045
- // Exemplo
1046
- <Table
1047
- columnTitles={['Nome', 'Email', 'Status']}
1048
- rowData={[
1049
- { name: 'João', email: 'joao@email.com', status: 'Ativo' },
1050
- { name: 'Maria', email: 'maria@email.com', status: 'Inativo' }
1051
- ]}
1052
- pageSizes={[10, 25, 50]}
1053
- search={true}
1054
- pagination={true}
1055
- />
1056
- ```
1057
-
1058
- ### TableBasic
1059
-
1060
- Tabela básica simplificada.
1061
-
1062
- ```tsx
1063
- import { TableBasic } from 'prosperita-dumbo-react';
1064
-
1065
- // Props
1066
- type TableBasicProps = {
1067
- columnTitles: string[];
1068
- rowData: Array<{ [key: string]: ReactNode | string | JSX.Element }>;
1069
- pageSizes: number[];
1070
- actions?: Array<{
1071
- text: ReactNode;
1072
- onClick?: () => void;
1073
- }>;
1074
- label?: string;
1075
- buttons?: Array<{
1076
- label: string;
1077
- onClick?: () => void;
1078
- icon?: string;
1079
- kind: "primary" | "secondary" | "tertiary" | "ghost" | "dangerPrimary" | "dangerTertiary" | "dangerGhost";
1080
- position?: "right" | "left";
1081
- width?: string;
1082
- dimension?: string;
1083
- size?: "small" | "large" | "medium" | "extraLarge" | "twoXLarge" | "expressive";
1084
- disabled?: boolean;
1085
- dropOptions?: {
1086
- options: Array<{
1087
- label: string;
1088
- onClick?: () => void;
1089
- }>;
1090
- };
1091
- }>;
1092
- search?: boolean;
1093
- messagedatalength?: string;
1094
- width?: string;
1095
- sizeSearch?: "small" | "large" | "medium";
1096
- rowSizes?: string;
1097
- columnSizes?: string;
1098
- };
1099
-
1100
- // Exemplo
1101
- <TableBasic
1102
- columnTitles={['Nome', 'Email']}
1103
- rowData={[
1104
- { name: 'João', email: 'joao@email.com' },
1105
- { name: 'Maria', email: 'maria@email.com' }
1106
- ]}
1107
- pageSizes={[10, 25, 50]}
1108
- search={true}
1109
- />
1110
- ```
1111
-
1112
- ### TableExpandable
1113
-
1114
- Tabela com linhas expansíveis.
1115
-
1116
- ```tsx
1117
- import { TableExpandable } from 'prosperita-dumbo-react';
1118
-
1119
- // Props
1120
- type TableExpandableProps = {
1121
- columnTitles: ReactNode[];
1122
- rowData: Array<{ [key: string]: any; onClick?: () => void }>;
1123
- pageSizes: number[];
1124
- actions?: Array<{
1125
- text: ReactNode;
1126
- icon?: string | ReactNode;
1127
- onClick?: () => void;
1128
- feature?: boolean;
1129
- noPadding?: string;
1130
- size: "small" | "large" | "medium" | "extraLarge" | "twoXLarge" | "expressive";
1131
- hasIconSvg?: boolean;
1132
- width?: string;
1133
- }>;
1134
- label?: string;
1135
- buttons?: Array<{
1136
- label: string;
1137
- onClick?: () => void;
1138
- icon?: string;
1139
- kind: "primary" | "secondary" | "tertiary" | "ghost" | "dangerPrimary" | "dangerTertiary" | "dangerGhost";
1140
- position?: "right" | "left";
1141
- size?: "small" | "large" | "medium" | "extraLarge" | "twoXLarge" | "expressive";
1142
- dimension?: string;
1143
- width?: string;
1144
- disabled?: boolean;
1145
- loading?: boolean;
1146
- }>;
1147
- search?: boolean;
1148
- onChangeSearch?: (event: ChangeEvent<HTMLInputElement>) => void;
1149
- arrow?: { thSize: string; iconSize?: string; transform?: string };
1150
- messageDatalength?: string;
1151
- width?: string;
1152
- expandedRowData?: string[];
1153
- columsKeys?: string[];
1154
- headerAction?: {
1155
- active: boolean;
1156
- count: number;
1157
- };
1158
- sizeSearch?: "small" | "large" | "medium";
1159
- rowSizes?: string;
1160
- columnSizes?: string;
1161
- overflowPagination?: boolean;
1162
- };
1163
-
1164
- // Exemplo
1165
- <TableExpandable
1166
- columnTitles={['Nome', 'Email', 'Ações']}
1167
- rowData={[
1168
- { name: 'João', email: 'joao@email.com', details: 'Detalhes do João' },
1169
- { name: 'Maria', email: 'maria@email.com', details: 'Detalhes da Maria' }
1170
- ]}
1171
- pageSizes={[10, 25, 50]}
1172
- expandedRowData={['details']}
1173
- search={true}
1174
- />
1175
- ```
1176
-
1177
- ### TableExpandableDrag
1178
-
1179
- Tabela expansível com colunas arrastáveis.
1180
-
1181
- ```tsx
1182
- import { TableExpandableDrag } from 'prosperita-dumbo-react';
1183
-
1184
- // Props
1185
- type TableExpandableDragProps = {
1186
- columnTitles: Array<{
1187
- id: string;
1188
- label: ReactNode;
1189
- name: string;
1190
- hasFilter?: boolean;
1191
- width?: string;
1192
- text: boolean;
1193
- value?: string;
1194
- paddingDrop?: string;
1195
- type?: string;
1196
- placeholder?: string;
1197
- options?: Array<{ label: string; value: string }>;
1198
- onChange?: (event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
1199
- onChangeMoney?: (event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
1200
- }>;
1201
- clearFilesFilter: boolean;
1202
- rowData: Array<{ [key: string]: ReactNode | string | JSX.Element }>;
1203
- pageSizes: number[];
1204
- actions?: Array<{
1205
- text: ReactNode;
1206
- icon?: ReactNode;
1207
- onClick?: () => void;
1208
- feature?: boolean;
1209
- noPadding?: string;
1210
- size: "small" | "large" | "medium" | "extraLarge" | "twoXLarge" | "expressive";
1211
- hasIconSvg?: boolean;
1212
- width?: string;
1213
- }>;
1214
- label?: ReactNode;
1215
- buttons?: Array<{
1216
- label: string;
1217
- onClick?: () => void;
1218
- icon?: string | ReactNode;
1219
- kind: "primary" | "secondary" | "tertiary" | "ghost" | "dangerPrimary" | "dangerTertiary" | "dangerGhost";
1220
- position?: "right" | "left";
1221
- width?: string;
1222
- hasIconSvg?: boolean;
1223
- dimension?: string;
1224
- size?: "small" | "large" | "medium" | "extraLarge" | "twoXLarge" | "expressive";
1225
- disabled?: boolean;
1226
- loading?: boolean;
1227
- }>;
1228
- search?: boolean;
1229
- nofilter?: boolean;
1230
- messagedatalength?: ReactNode;
1231
- width?: string;
1232
- onChangePage?: (event: number) => void;
1233
- onChangeSearch?: (event: ChangeEvent<HTMLInputElement>) => void;
1234
- sizeSearch?: "small" | "large" | "medium";
1235
- rowSizes?: number;
1236
- sizesRow?: string;
1237
- radiusButtonFilter: number;
1238
- columnSizes?: string;
1239
- expandedRowData?: string[];
1240
- onFilterStateChange?: (isFiltering: boolean, data: any[]) => void;
1241
- columsKeys?: string[];
1242
- arrow?: { thSize: string; iconSize?: string; transform?: string };
1243
- headerAction?: {
1244
- active: boolean;
1245
- count: number;
1246
- };
1247
- column_storage_name: string;
1248
- values?: { [key: string]: any };
1249
- stickyFirstColumn?: boolean;
1250
- widthOverflow?: string;
1251
- datePicker?: {
1252
- label: string;
1253
- type?: string;
1254
- value?: string;
1255
- onChange?: (event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
1256
- };
1257
- };
1258
-
1259
- // Exemplo
1260
- <TableExpandableDrag
1261
- columnTitles={[
1262
- { id: 'name', label: 'Nome', name: 'name', hasFilter: true, text: true },
1263
- { id: 'email', label: 'Email', name: 'email', hasFilter: true, text: true }
1264
- ]}
1265
- rowData={[
1266
- { name: 'João', email: 'joao@email.com', details: 'Detalhes' },
1267
- { name: 'Maria', email: 'maria@email.com', details: 'Detalhes' }
1268
- ]}
1269
- pageSizes={[10, 25, 50]}
1270
- clearFilesFilter={false}
1271
- column_storage_name="expandable-table"
1272
- radiusButtonFilter={2}
1273
- expandedRowData={['details']}
1274
- />
1275
- ```
1276
-
1277
- ### TableBatchActions
1278
-
1279
- Tabela com ações em lote.
1280
-
1281
- ```tsx
1282
- import { TableBatchActions } from 'prosperita-dumbo-react';
1283
-
1284
- // Props
1285
- type TableBatchActionsProps = {
1286
- columnTitles: ReactNode[];
1287
- rowData: Array<{ [key: string]: ReactNode | string | JSX.Element }>;
1288
- pageSizes: number[];
1289
- actions?: Array<{
1290
- text: ReactNode;
1291
- icon?: string;
1292
- feature?: boolean;
1293
- onClick?: () => void;
1294
- }>;
1295
- label?: string;
1296
- buttons?: Array<{
1297
- label: string;
1298
- onClick?: () => void;
1299
- icon?: string | ReactNode;
1300
- kind: "primary" | "secondary" | "tertiary" | "ghost" | "dangerPrimary" | "dangerTertiary" | "dangerGhost";
1301
- position?: "right" | "left";
1302
- hasIconSvg?: boolean;
1303
- dimension?: string;
1304
- width?: string;
1305
- size?: "small" | "large" | "medium" | "extraLarge" | "twoXLarge" | "expressive";
1306
- disabled?: boolean;
1307
- }>;
1308
- search?: boolean;
1309
- messagedatalength?: string;
1310
- width?: string;
1311
- columsKeys?: string[];
1312
- sizeSearch?: "small" | "large" | "medium";
1313
- headerAction?: {
1314
- active: boolean;
1315
- count: number;
1316
- };
1317
- rowSizes?: string;
1318
- };
1319
-
1320
- // Exemplo
1321
- <TableBatchActions
1322
- columnTitles={['Nome', 'Email', 'Selecionar']}
1323
- rowData={[
1324
- { name: 'João', email: 'joao@email.com', selected: false },
1325
- { name: 'Maria', email: 'maria@email.com', selected: false }
1326
- ]}
1327
- pageSizes={[10, 25, 50]}
1328
- headerAction={{ active: true, count: 0 }}
1329
- search={true}
1330
- />
1331
- ```
1332
-
1333
- ### CodeSnippet
1334
-
1335
- Snippet de código com funcionalidade de cópia.
1336
-
1337
- ```tsx
1338
- import { CodeSnippet } from 'prosperita-dumbo-react';
1339
-
1340
- // Props
1341
- type CodeSnippetProps = {
1342
- language?: string;
1343
- code: string;
1344
- background?: string;
1345
- color?: string;
1346
- icon?: ReactNode;
1347
- };
1348
-
1349
- // Exemplo
1350
- <CodeSnippet
1351
- language="javascript"
1352
- code="console.log('Hello World!');"
1353
- background="#f4f4f4"
1354
- color="#161616"
1355
- />
1356
- ```
1357
-
1358
- ### CodeSnippetInline
1359
-
1360
- Snippet de código inline com numeração de linhas.
1361
-
1362
- ```tsx
1363
- import { CodeSnippetInline } from 'prosperita-dumbo-react';
1364
-
1365
- // Props
1366
- type CodeSnippetInlineProps = {
1367
- code: string;
1368
- language?: string;
1369
- expanded?: boolean;
1370
- numbers?: boolean;
1371
- copy?: boolean;
1372
- };
1373
-
1374
- // Exemplo
1375
- <CodeSnippetInline
1376
- code={`function hello() {
1377
- console.log('Hello World!');
1378
- }`}
1379
- language="javascript"
1380
- expanded={true}
1381
- numbers={true}
1382
- copy={true}
1383
- />
1384
- ```
1385
-
1386
- ### DuoList
1387
-
1388
- Lista dupla para seleção de itens.
1389
-
1390
- ```tsx
1391
- import { DuoList } from 'prosperita-dumbo-react';
1392
-
1393
- // Props
1394
- type DuoListProps = {
1395
- options: Array<{
1396
- label: string;
1397
- value: number;
1398
- checked?: boolean;
1399
- }>;
1400
- onClick?: () => void;
1401
- selecteds?: Array<{
1402
- label: string;
1403
- value: number;
1404
- checked?: boolean;
1405
- }>;
1406
- onChange?: (selected: Array<{ label: string; value: number; checked?: boolean }>) => void;
1407
- width?: string;
1408
- };
1409
-
1410
- // Exemplo
1411
- <DuoList
1412
- options={[
1413
- { label: 'Opção 1', value: 1 },
1414
- { label: 'Opção 2', value: 2 },
1415
- { label: 'Opção 3', value: 3 }
1416
- ]}
1417
- onChange={(selected) => console.log(selected)}
1418
- width="400px"
1419
- />
1420
- ```
1421
-
1422
- ### UINavigationHeader
1423
-
1424
- Cabeçalho de navegação com menu e perfil do usuário.
1425
-
1426
- ```tsx
1427
- import { UINavigationHeader } from 'prosperita-dumbo-react';
1428
-
1429
- // Props
1430
- type UINavigationHeaderProps = {
1431
- options?: Array<{
1432
- normalMode?: boolean;
1433
- label?: string | ReactNode;
1434
- icon?: ReactNode;
1435
- onClick?: () => void;
1436
- href?: string;
1437
- permission?: boolean;
1438
- optionsMenu?: Array<{
1439
- label?: string;
1440
- onClick?: () => void;
1441
- permission?: boolean;
1442
- children?: Array<{
1443
- label?: string;
1444
- onClick?: () => void;
1445
- permission?: boolean;
1446
- }>;
1447
- }>;
1448
- minColumnWidth?: string;
1449
- gap?: string;
1450
- }>;
1451
- icon?: string | ReactNode;
1452
- emailuser?: string | ReactNode;
1453
- userName?: string | ReactNode;
1454
- children?: ReactNode;
1455
- SectionRightTime?: ReactNode;
1456
- open?: boolean;
1457
- bgHeader?: string;
1458
- navigateProfile?: () => void;
1459
- columnsMax?: number;
1460
- };
1461
-
1462
- // Exemplo
1463
- <UINavigationHeader
1464
- userName="João Silva"
1465
- emailuser="joao@email.com"
1466
- options={[
1467
- {
1468
- label: 'Dashboard',
1469
- onClick: () => console.log('Dashboard'),
1470
- optionsMenu: [
1471
- { label: 'Submenu 1', onClick: () => console.log('Submenu 1') }
1472
- ]
1473
- }
1474
- ]}
1475
- navigateProfile={() => console.log('Perfil')}
1476
- />
1477
- ```
1478
-
1479
- ### UISHELLHeader
1480
-
1481
- Cabeçalho simples com menu dropdown.
1482
-
1483
- ```tsx
1484
- import { UISHELLHeader } from 'prosperita-dumbo-react';
1485
-
1486
- // Props
1487
- type UISHELLHeaderProps = {
1488
- options: Array<{
1489
- label: string;
1490
- onClick: () => void;
1491
- }>;
1492
- label?: string;
1493
- };
1494
-
1495
- // Exemplo
1496
- <UISHELLHeader
1497
- label="Menu"
1498
- options={[
1499
- { label: 'Opção 1', onClick: () => console.log('Opção 1') },
1500
- { label: 'Opção 2', onClick: () => console.log('Opção 2') }
1501
- ]}
1502
- />
1503
- ```
1504
-
1505
- ### UIHeaderNav
1506
-
1507
- Cabeçalho de navegação com funcionalidades avançadas.
1508
-
1509
- ```tsx
1510
- import { UIHeaderNav } from 'prosperita-dumbo-react';
1511
-
1512
- // Props
1513
- type UIHeaderNavProps = {
1514
- options?: Array<{
1515
- label?: string | ReactNode;
1516
- onClick?: () => void;
1517
- href?: string;
1518
- permission?: boolean;
1519
- optionsMenu?: Array<{
1520
- label?: string;
1521
- onClick?: () => void;
1522
- permission?: boolean;
1523
- }>;
1524
- }>;
1525
- icon?: string | ReactNode;
1526
- emailuser?: string | ReactNode;
1527
- userName?: string | ReactNode;
1528
- children?: ReactNode;
1529
- SectionRightTime?: ReactNode;
1530
- open?: boolean;
1531
- bgHeader?: string;
1532
- navigateProfile?: () => void;
1533
- search?: {
1534
- onClick: () => void;
1535
- on: boolean;
1536
- };
1537
- };
1538
-
1539
- // Exemplo
1540
- <UIHeaderNav
1541
- userName="João Silva"
1542
- emailuser="joao@email.com"
1543
- options={[
1544
- { label: 'Dashboard', onClick: () => console.log('Dashboard') }
1545
- ]}
1546
- search={{ onClick: () => console.log('Search'), on: true }}
1547
- navigateProfile={() => console.log('Perfil')}
1548
- />
1549
- ```
1550
-
1551
- ## 🎨 Tema
1552
-
1553
- A biblioteca usa um sistema de temas consistente. Para customizar:
1554
-
1555
- ```tsx
1556
- import theme from 'prosperita-dumbo-react/theme';
1557
-
1558
- // Cores disponíveis
1559
- theme.buttonPrimary // Cor primária dos botões
1560
- theme.textPrimary // Cor primária do texto
1561
- theme.layer01 // Cor de fundo da camada 1
1562
- theme.borderSubtle00 // Cor da borda sutil
1563
- ```
1564
-
1565
- ## 📱 Responsividade
1566
-
1567
- Todos os componentes são responsivos por padrão e se adaptam automaticamente a diferentes tamanhos de tela.
1568
-
1569
- ## ♿ Acessibilidade
1570
-
1571
- A biblioteca segue as diretrizes WCAG 2.1 para acessibilidade, incluindo:
1572
- - Navegação por teclado
1573
- - Suporte a leitores de tela
1574
- - Contraste adequado
1575
- - Estados focáveis
1576
-
1577
- ## 🔧 Desenvolvimento
1578
-
1579
- Para contribuir com o projeto:
1580
-
1581
- ```bash
1582
- git clone <repository>
1583
- cd prosperita-dumbo-react
1584
- yarn install
1585
- yarn dev
1586
- ```
1587
-
1588
- ## 📄 Licença
1589
-
1590
- MIT License - veja o arquivo LICENSE para detalhes.
1591
-
1592
- ## 🤝 Contribuição
1593
-
1594
- Contribuições são bem-vindas! Por favor, leia o guia de contribuição antes de submeter um PR.
1
+ # Prosperita Dumbo React - Biblioteca de Componentes
2
+
3
+ Uma biblioteca de componentes React moderna e acessível, desenvolvida para aplicações financeiras com design system consistente.
4
+
5
+ ## 📦 Instalação
6
+
7
+ ```bash
8
+ npm install prosperita-dumbo-react
9
+ # ou
10
+ yarn add prosperita-dumbo-react
11
+ ```
12
+
13
+ ## 🚀 Uso Básico
14
+
15
+ ```tsx
16
+ import { Button, Input, Modal } from 'prosperita-dumbo-react';
17
+ import 'prosperita-dumbo-react/dist/style.css';
18
+
19
+ function App() {
20
+ return (
21
+ <div>
22
+ <Button kind="primary" size="medium" label="Clique aqui" />
23
+ <Input label="Nome" placeholder="Digite seu nome" />
24
+ </div>
25
+ );
26
+ }
27
+ ```
28
+
29
+ ## 🎨 Componentes
30
+
31
+ ### Button
32
+
33
+ Botão com múltiplas variantes e tamanhos.
34
+
35
+ ```tsx
36
+ import { Button } from 'prosperita-dumbo-react';
37
+
38
+ // Props
39
+ type ButtonProps = {
40
+ kind: "primary" | "secondary" | "tertiary" | "ghost" | "dangerPrimary" | "dangerTertiary" | "dangerGhost";
41
+ size: "large" | "medium" | "small" | "extraLarge" | "twoXLarge" | "expressive";
42
+ label?: ReactNode;
43
+ icon?: ReactNode | string;
44
+ loading?: boolean;
45
+ disabled?: boolean;
46
+ onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
47
+ width?: string;
48
+ full?: boolean;
49
+ borderNone?: boolean;
50
+ hasIconSvg?: boolean;
51
+ fortable?: boolean;
52
+ fortableRadius?: boolean;
53
+ dimension?: string;
54
+ noPadding?: string;
55
+ style?: CSSProperties;
56
+ };
57
+
58
+ // Exemplos
59
+ <Button
60
+ kind="primary"
61
+ size="medium"
62
+ label="Salvar"
63
+ onClick={() => console.log('Clicado!')}
64
+ />
65
+
66
+ <Button
67
+ kind="dangerPrimary"
68
+ size="large"
69
+ label="Excluir"
70
+ icon="🗑️"
71
+ loading={true}
72
+ />
73
+ ```
74
+
75
+ ### Input
76
+
77
+ Campo de entrada com diferentes tipos e estados.
78
+
79
+ ```tsx
80
+ import { Input } from 'prosperita-dumbo-react';
81
+
82
+ // Props
83
+ type InputProps = {
84
+ size?: "small" | "medium" | "large";
85
+ label?: string;
86
+ message?: ReactNode;
87
+ error?: boolean;
88
+ warning?: boolean;
89
+ maxLength?: number;
90
+ disabled?: boolean;
91
+ readOnly?: boolean;
92
+ loading?: boolean;
93
+ type?: "text" | "password" | "email" | "number" | "textarea";
94
+ placeholder?: string;
95
+ value?: string | number;
96
+ onChange?: (event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
97
+ noRadius?: boolean;
98
+ borderNone?: boolean;
99
+ forFilter?: boolean;
100
+ forModal?: boolean;
101
+ forSlider?: boolean;
102
+ };
103
+
104
+ // Exemplos
105
+ <Input
106
+ label="Email"
107
+ type="email"
108
+ placeholder="Digite seu email"
109
+ error={true}
110
+ message="Email inválido"
111
+ />
112
+
113
+ <Input
114
+ label="Senha"
115
+ type="password"
116
+ size="large"
117
+ disabled={false}
118
+ />
119
+ ```
120
+
121
+ ### Checkbox
122
+
123
+ Caixa de seleção com diferentes estados.
124
+
125
+ ```tsx
126
+ import { Checkbox } from 'prosperita-dumbo-react';
127
+
128
+ // Props
129
+ type CheckboxProps = {
130
+ label?: string;
131
+ checked?: boolean;
132
+ disabled?: boolean;
133
+ size?: "small" | "medium" | "large";
134
+ onChange?: (checked: boolean) => void;
135
+ error?: boolean;
136
+ message?: string;
137
+ };
138
+
139
+ // Exemplos
140
+ <Checkbox
141
+ label="Aceito os termos"
142
+ checked={true}
143
+ onChange={(checked) => console.log(checked)}
144
+ />
145
+
146
+ <Checkbox
147
+ label="Notificações"
148
+ size="large"
149
+ disabled={false}
150
+ />
151
+ ```
152
+
153
+ ### Modal
154
+
155
+ Modal com diferentes tamanhos e configurações.
156
+
157
+ ```tsx
158
+ import { Modal } from 'prosperita-dumbo-react';
159
+
160
+ // Props
161
+ type ModalProps = {
162
+ open?: boolean;
163
+ label?: ReactNode;
164
+ textLabel?: ReactNode;
165
+ children?: ReactNode;
166
+ onClose?: () => void;
167
+ backgroundModal?: string;
168
+ background?: string;
169
+ height?: string;
170
+ width?: string;
171
+ overflow?: boolean;
172
+ radius?: boolean;
173
+ closeButtonModal?: boolean;
174
+ buttons?: Array<{
175
+ label?: string;
176
+ icon?: string | ReactNode;
177
+ onClick?: () => void;
178
+ disabled?: boolean;
179
+ hasIconSvg?: boolean;
180
+ dimension?: string;
181
+ loading?: boolean;
182
+ size?: "large" | "medium" | "small" | "extraLarge" | "twoXLarge" | "expressive";
183
+ kind?: "primary" | "secondary" | "tertiary" | "ghost" | "dangerPrimary" | "dangerTertiary" | "dangerGhost";
184
+ }>;
185
+ };
186
+
187
+ // Exemplos
188
+ <Modal
189
+ open={isOpen}
190
+ label="Confirmação"
191
+ onClose={() => setIsOpen(false)}
192
+ buttons={[
193
+ { label: "Cancelar", kind: "secondary", onClick: () => setIsOpen(false) },
194
+ { label: "Confirmar", kind: "primary", onClick: handleConfirm }
195
+ ]}
196
+ >
197
+ <p>Tem certeza que deseja excluir este item?</p>
198
+ </Modal>
199
+ ```
200
+
201
+ ### TableColumnDrag
202
+
203
+ Tabela com colunas arrastáveis e funcionalidades avançadas.
204
+
205
+ ```tsx
206
+ import { TableColumnDrag } from 'prosperita-dumbo-react';
207
+
208
+ // Props
209
+ type TableColumnDragProps = {
210
+ columnTitles: Array<{
211
+ id: string;
212
+ label: ReactNode;
213
+ name: string;
214
+ hasFilter?: boolean;
215
+ width?: string;
216
+ text: boolean;
217
+ value?: string;
218
+ placeholder?: string;
219
+ options?: Array<{ label: string; value: string }>;
220
+ onChange?: (event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
221
+ onChangeMoney?: (event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
222
+ type?: string;
223
+ paddingDrop?: string;
224
+ }>;
225
+ rowData: Array<{ [key: string]: ReactNode | string | JSX.Element }>;
226
+ pageSizes: number[];
227
+ clearFilesFilter: boolean;
228
+ label?: string;
229
+ search?: boolean;
230
+ nofilter?: boolean;
231
+ messagedatalength?: ReactNode;
232
+ width?: string;
233
+ sizeSearch?: "small" | "large" | "medium";
234
+ rowSizes?: string;
235
+ columnSizes?: string;
236
+ stickyFirstColumn?: boolean;
237
+ radiusButtonFilter: number;
238
+ column_storage_name: string;
239
+ widthOverflow?: string;
240
+ values?: { [key: string]: any };
241
+ onChangePage?: (event: number) => void;
242
+ onFilterStateChange?: (isFiltering: boolean, data: any[]) => void;
243
+ onChangeSearch?: (event: ChangeEvent<HTMLInputElement>) => void;
244
+ buttons?: Array<{
245
+ label: string;
246
+ onClick?: () => void;
247
+ icon?: string | ReactNode;
248
+ kind: "primary" | "secondary" | "tertiary" | "ghost" | "dangerPrimary" | "dangerTertiary" | "dangerGhost";
249
+ position?: "right" | "left";
250
+ width?: string;
251
+ hasIconSvg?: boolean;
252
+ dimension?: string;
253
+ size?: "small" | "large" | "medium" | "extraLarge" | "twoXLarge" | "expressive";
254
+ }>;
255
+ actions?: Array<{
256
+ text: ReactNode;
257
+ icon?: ReactNode;
258
+ onClick?: () => void;
259
+ feature?: boolean;
260
+ noPadding?: string;
261
+ size: "small" | "large" | "medium" | "extraLarge" | "twoXLarge" | "expressive";
262
+ hasIconSvg?: boolean;
263
+ width?: string;
264
+ }>;
265
+ headerAction?: {
266
+ active: boolean;
267
+ count: number;
268
+ };
269
+ datePicker?: {
270
+ label: string;
271
+ type?: string;
272
+ value?: string;
273
+ onChange?: (event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
274
+ };
275
+ };
276
+
277
+ // Exemplo
278
+ const columns = [
279
+ { id: 'name', label: 'Nome', name: 'name', hasFilter: true, text: true },
280
+ { id: 'email', label: 'Email', name: 'email', hasFilter: true, text: true },
281
+ { id: 'status', label: 'Status', name: 'status', hasFilter: true, text: false, options: [
282
+ { label: 'Ativo', value: 'active' },
283
+ { label: 'Inativo', value: 'inactive' }
284
+ ]}
285
+ ];
286
+
287
+ const data = [
288
+ { name: 'João Silva', email: 'joao@email.com', status: 'Ativo' },
289
+ { name: 'Maria Santos', email: 'maria@email.com', status: 'Inativo' }
290
+ ];
291
+
292
+ <TableColumnDrag
293
+ columnTitles={columns}
294
+ rowData={data}
295
+ pageSizes={[10, 25, 50]}
296
+ clearFilesFilter={false}
297
+ search={true}
298
+ column_storage_name="user-table"
299
+ radiusButtonFilter={2}
300
+ buttons={[
301
+ { label: "Novo", kind: "primary", position: "left", onClick: () => console.log('Novo') },
302
+ { label: "Excluir", kind: "dangerPrimary", position: "right", onClick: () => console.log('Excluir') }
303
+ ]}
304
+ />
305
+ ```
306
+
307
+ ### Dropdown
308
+
309
+ Menu dropdown com opções customizáveis.
310
+
311
+ ```tsx
312
+ import { Dropdown } from 'prosperita-dumbo-react';
313
+
314
+ // Props
315
+ type DropdownProps = {
316
+ options: Array<{ label: string; value: string }>;
317
+ placeholder?: string;
318
+ value?: string;
319
+ onChange?: (data: { selectedItem: any }) => void;
320
+ size?: "small" | "medium" | "large";
321
+ kind?: "default" | "fluid";
322
+ disabled?: boolean;
323
+ loading?: boolean;
324
+ error?: boolean;
325
+ message?: string;
326
+ noRadius?: boolean;
327
+ borderNone?: boolean;
328
+ forFilter?: boolean;
329
+ clearFiles?: boolean;
330
+ paddingDrop?: string;
331
+ autoComplete?: string;
332
+ name?: string;
333
+ };
334
+
335
+ // Exemplo
336
+ <Dropdown
337
+ options={[
338
+ { label: 'Opção 1', value: '1' },
339
+ { label: 'Opção 2', value: '2' }
340
+ ]}
341
+ placeholder="Selecione uma opção"
342
+ onChange={({ selectedItem }) => console.log(selectedItem)}
343
+ size="medium"
344
+ />
345
+ ```
346
+
347
+ ### TabPane
348
+
349
+ Aba individual para sistema de abas.
350
+
351
+ ```tsx
352
+ import { TabPane } from 'prosperita-dumbo-react';
353
+
354
+ // Props
355
+ type TabPaneProps = {
356
+ children?: ReactNode;
357
+ label: string;
358
+ onClick: () => void;
359
+ isActive: boolean;
360
+ icon?: string | ReactNode;
361
+ bordercolor?: string;
362
+ width?: string;
363
+ disabled?: boolean;
364
+ position?: "center" | "right" | "left";
365
+ padding?: string;
366
+ bottom?: boolean;
367
+ borderRadius?: string;
368
+ };
369
+
370
+ // Exemplo
371
+ <TabPane
372
+ label="Perfil"
373
+ isActive={activeTab === 'profile'}
374
+ onClick={() => setActiveTab('profile')}
375
+ icon="👤"
376
+ bordercolor="#007bff"
377
+ >
378
+ <div>Conteúdo da aba Perfil</div>
379
+ </TabPane>
380
+ ```
381
+
382
+ ### Search
383
+
384
+ Campo de busca com funcionalidades avançadas.
385
+
386
+ ```tsx
387
+ import { Search } from 'prosperita-dumbo-react';
388
+
389
+ // Props
390
+ type SearchProps = {
391
+ kind?: "default" | "fluid";
392
+ size?: "small" | "medium" | "large";
393
+ placeholder?: string;
394
+ value?: string;
395
+ onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
396
+ borderTable?: boolean;
397
+ disabled?: boolean;
398
+ loading?: boolean;
399
+ };
400
+
401
+ // Exemplo
402
+ <Search
403
+ placeholder="Digite para pesquisar..."
404
+ onChange={(e) => setSearchTerm(e.target.value)}
405
+ size="medium"
406
+ borderTable
407
+ />
408
+ ```
409
+
410
+ ### Notification
411
+
412
+ Notificação com diferentes tipos e posições.
413
+
414
+ ```tsx
415
+ import { Notification } from 'prosperita-dumbo-react';
416
+
417
+ // Props
418
+ type NotificationProps = {
419
+ title?: string;
420
+ message?: string;
421
+ kind?: "info" | "success" | "warning" | "error";
422
+ position?: "top-right" | "top-left" | "bottom-right" | "bottom-left";
423
+ duration?: number;
424
+ onClose?: () => void;
425
+ icon?: ReactNode;
426
+ };
427
+
428
+ // Exemplo
429
+ <Notification
430
+ title="Sucesso!"
431
+ message="Operação realizada com sucesso."
432
+ kind="success"
433
+ position="top-right"
434
+ duration={5000}
435
+ />
436
+ ```
437
+
438
+ ### Tooltip
439
+
440
+ Tooltip com diferentes posições e tamanhos.
441
+
442
+ ```tsx
443
+ import { Tooltip } from 'prosperita-dumbo-react';
444
+
445
+ // Props
446
+ type TooltipProps = {
447
+ children: ReactNode;
448
+ label: string;
449
+ align?: "top" | "top-right" | "top-left" | "bottom" | "bottom-right" | "bottom-left" | "left" | "right";
450
+ size?: "small" | "medium" | "large";
451
+ width?: string;
452
+ disabled?: boolean;
453
+ };
454
+
455
+ // Exemplo
456
+ <Tooltip label="Informação adicional" align="top" size="small">
457
+ <Button label="Hover me" />
458
+ </Tooltip>
459
+ ```
460
+
461
+ ### Loading
462
+
463
+ Indicador de carregamento.
464
+
465
+ ```tsx
466
+ import { Loading } from 'prosperita-dumbo-react';
467
+
468
+ // Props
469
+ type LoadingProps = {
470
+ size?: "small" | "medium" | "large";
471
+ kind?: "spinner" | "skeleton";
472
+ text?: string;
473
+ };
474
+
475
+ // Exemplo
476
+ <Loading size="medium" text="Carregando..." />
477
+ ```
478
+
479
+ ### InlineLoading
480
+
481
+ Indicador de carregamento inline.
482
+
483
+ ```tsx
484
+ import { InlineLoading } from 'prosperita-dumbo-react';
485
+
486
+ // Props
487
+ type InlineLoadingProps = {
488
+ size?: "small" | "medium" | "large";
489
+ text?: string;
490
+ success?: boolean;
491
+ error?: boolean;
492
+ };
493
+
494
+ // Exemplo
495
+ <InlineLoading size="small" text="Salvando..." />
496
+ ```
497
+
498
+ ### ProgressIndicator
499
+
500
+ Indicador de progresso.
501
+
502
+ ```tsx
503
+ import { ProgressIndicator } from 'prosperita-dumbo-react';
504
+
505
+ // Props
506
+ type ProgressIndicatorProps = {
507
+ current: number;
508
+ total: number;
509
+ size?: "small" | "medium" | "large";
510
+ showPercentage?: boolean;
511
+ color?: string;
512
+ };
513
+
514
+ // Exemplo
515
+ <ProgressIndicator current={75} total={100} showPercentage />
516
+ ```
517
+
518
+ ### Slider
519
+
520
+ Controle deslizante.
521
+
522
+ ```tsx
523
+ import { Slider } from 'prosperita-dumbo-react';
524
+
525
+ // Props
526
+ type SliderProps = {
527
+ min: number;
528
+ max: number;
529
+ value: number;
530
+ onChange: (value: number) => void;
531
+ step?: number;
532
+ disabled?: boolean;
533
+ showValue?: boolean;
534
+ label?: string;
535
+ };
536
+
537
+ // Exemplo
538
+ <Slider
539
+ min={0}
540
+ max={100}
541
+ value={50}
542
+ onChange={(value) => console.log(value)}
543
+ step={1}
544
+ showValue
545
+ label="Volume"
546
+ />
547
+ ```
548
+
549
+ ### Toggle
550
+
551
+ Interruptor on/off.
552
+
553
+ ```tsx
554
+ import { Toggle } from 'prosperita-dumbo-react';
555
+
556
+ // Props
557
+ type ToggleProps = {
558
+ checked: boolean;
559
+ onChange: (checked: boolean) => void;
560
+ disabled?: boolean;
561
+ size?: "small" | "medium" | "large";
562
+ label?: string;
563
+ };
564
+
565
+ // Exemplo
566
+ <Toggle
567
+ checked={isEnabled}
568
+ onChange={setIsEnabled}
569
+ label="Notificações"
570
+ size="medium"
571
+ />
572
+ ```
573
+
574
+ ### Radio
575
+
576
+ Botão de opção única.
577
+
578
+ ```tsx
579
+ import { Radio } from 'prosperita-dumbo-react';
580
+
581
+ // Props
582
+ type RadioProps = {
583
+ name: string;
584
+ value: string;
585
+ checked: boolean;
586
+ onChange: (value: string) => void;
587
+ label?: string;
588
+ disabled?: boolean;
589
+ size?: "small" | "medium" | "large";
590
+ };
591
+
592
+ // Exemplo
593
+ <Radio
594
+ name="gender"
595
+ value="male"
596
+ checked={gender === 'male'}
597
+ onChange={setGender}
598
+ label="Masculino"
599
+ />
600
+ ```
601
+
602
+ ### Tag
603
+
604
+ Tag para categorização.
605
+
606
+ ```tsx
607
+ import { Tag } from 'prosperita-dumbo-react';
608
+
609
+ // Props
610
+ type TagProps = {
611
+ label: string;
612
+ kind?: "primary" | "secondary" | "success" | "warning" | "error";
613
+ size?: "small" | "medium" | "large";
614
+ onRemove?: () => void;
615
+ disabled?: boolean;
616
+ };
617
+
618
+ // Exemplo
619
+ <Tag
620
+ label="React"
621
+ kind="primary"
622
+ size="medium"
623
+ onRemove={() => console.log('Removido')}
624
+ />
625
+ ```
626
+
627
+ ### Tile
628
+
629
+ Bloco de conteúdo.
630
+
631
+ ```tsx
632
+ import { Tile } from 'prosperita-dumbo-react';
633
+
634
+ // Props
635
+ type TileProps = {
636
+ children: ReactNode;
637
+ kind?: "default" | "selectable" | "expandable";
638
+ selected?: boolean;
639
+ expanded?: boolean;
640
+ onClick?: () => void;
641
+ onExpand?: () => void;
642
+ disabled?: boolean;
643
+ size?: "small" | "medium" | "large";
644
+ };
645
+
646
+ // Exemplo
647
+ <Tile
648
+ kind="selectable"
649
+ selected={isSelected}
650
+ onClick={() => setIsSelected(!isSelected)}
651
+ >
652
+ <h3>Título do Tile</h3>
653
+ <p>Conteúdo do tile</p>
654
+ </Tile>
655
+ ```
656
+
657
+ ### Breadcrumb
658
+
659
+ Navegação em migalhas.
660
+
661
+ ```tsx
662
+ import { Breadcrumb } from 'prosperita-dumbo-react';
663
+
664
+ // Props
665
+ type BreadcrumbProps = {
666
+ items: Array<{
667
+ label: string;
668
+ href?: string;
669
+ onClick?: () => void;
670
+ }>;
671
+ separator?: string;
672
+ size?: "small" | "medium" | "large";
673
+ };
674
+
675
+ // Exemplo
676
+ <Breadcrumb
677
+ items={[
678
+ { label: 'Home', href: '/' },
679
+ { label: 'Produtos', href: '/products' },
680
+ { label: 'Detalhes' }
681
+ ]}
682
+ separator="/"
683
+ />
684
+ ```
685
+
686
+ ### FileUploader
687
+
688
+ Upload de arquivos.
689
+
690
+ ```tsx
691
+ import { FileUploader } from 'prosperita-dumbo-react';
692
+
693
+ // Props
694
+ type FileUploaderProps = {
695
+ onUpload: (files: File[]) => void;
696
+ accept?: string;
697
+ multiple?: boolean;
698
+ maxSize?: number;
699
+ disabled?: boolean;
700
+ label?: string;
701
+ description?: string;
702
+ error?: boolean;
703
+ message?: string;
704
+ };
705
+
706
+ // Exemplo
707
+ <FileUploader
708
+ onUpload={(files) => console.log(files)}
709
+ accept=".pdf,.doc,.docx"
710
+ multiple={true}
711
+ maxSize={5242880}
712
+ label="Upload de documentos"
713
+ description="Arraste arquivos ou clique para selecionar"
714
+ />
715
+ ```
716
+
717
+ ### ContentSwitcher
718
+
719
+ Alternador de conteúdo.
720
+
721
+ ```tsx
722
+ import { ContentSwitcher } from 'prosperita-dumbo-react';
723
+
724
+ // Props
725
+ type ContentSwitcherProps = {
726
+ items: Array<{
727
+ id: string;
728
+ label: string;
729
+ content: ReactNode;
730
+ }>;
731
+ activeId: string;
732
+ onChange: (id: string) => void;
733
+ size?: "small" | "medium" | "large";
734
+ };
735
+
736
+ // Exemplo
737
+ <ContentSwitcher
738
+ items={[
739
+ { id: 'tab1', label: 'Aba 1', content: <div>Conteúdo 1</div> },
740
+ { id: 'tab2', label: 'Aba 2', content: <div>Conteúdo 2</div> }
741
+ ]}
742
+ activeId={activeTab}
743
+ onChange={setActiveTab}
744
+ />
745
+ ```
746
+
747
+ ### MenuButton
748
+
749
+ Botão de menu.
750
+
751
+ ```tsx
752
+ import { MenuButton } from 'prosperita-dumbo-react';
753
+
754
+ // Props
755
+ type MenuButtonProps = {
756
+ label?: string;
757
+ icon?: ReactNode;
758
+ items: Array<{
759
+ label: string;
760
+ onClick: () => void;
761
+ disabled?: boolean;
762
+ icon?: ReactNode;
763
+ }>;
764
+ size?: "small" | "medium" | "large";
765
+ kind?: "primary" | "secondary" | "tertiary" | "ghost";
766
+ disabled?: boolean;
767
+ };
768
+
769
+ // Exemplo
770
+ <MenuButton
771
+ label="Ações"
772
+ icon="⚙️"
773
+ items={[
774
+ { label: 'Editar', onClick: () => console.log('Editar') },
775
+ { label: 'Excluir', onClick: () => console.log('Excluir') }
776
+ ]}
777
+ />
778
+ ```
779
+
780
+ ### Margin
781
+
782
+ Componente para espaçamento.
783
+
784
+ ```tsx
785
+ import { Margin } from 'prosperita-dumbo-react';
786
+
787
+ // Props
788
+ type MarginProps = {
789
+ children: ReactNode;
790
+ top?: string | number;
791
+ bottom?: string | number;
792
+ left?: string | number;
793
+ right?: string | number;
794
+ all?: string | number;
795
+ };
796
+
797
+ // Exemplo
798
+ <Margin top={20} bottom={10}>
799
+ <Button label="Botão com margem" />
800
+ </Margin>
801
+ ```
802
+
803
+ ### InputCurrency
804
+
805
+ Campo de entrada para valores monetários com formatação automática.
806
+
807
+ ```tsx
808
+ import { InputCurrency } from 'prosperita-dumbo-react';
809
+
810
+ // Props
811
+ type InputCurrencyProps = {
812
+ size?: "small" | "medium" | "large";
813
+ label?: string;
814
+ message?: string;
815
+ SymbolCipher?: string;
816
+ randomSymbol?: string;
817
+ error?: boolean;
818
+ warning?: boolean;
819
+ maxLength?: number;
820
+ disabled?: boolean;
821
+ readOnly?: boolean;
822
+ forModal?: boolean;
823
+ forSlider?: boolean;
824
+ noRadius?: boolean;
825
+ borderNone?: boolean;
826
+ clearFilds?: boolean;
827
+ onChange?: (event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
828
+ };
829
+
830
+ // Exemplo
831
+ <InputCurrency
832
+ label="Valor"
833
+ SymbolCipher="R$"
834
+ placeholder="0,00"
835
+ onChange={(e) => console.log(e.target.value)}
836
+ />
837
+ ```
838
+
839
+ ### InputCurrencyFluid
840
+
841
+ Versão fluida do campo de entrada monetária.
842
+
843
+ ```tsx
844
+ import { InputCurrencyFluid } from 'prosperita-dumbo-react';
845
+
846
+ // Props
847
+ type InputCurrencyFluidProps = {
848
+ size?: "small" | "medium" | "large";
849
+ message?: string;
850
+ SymbolCipher?: string;
851
+ randomSymbol?: string;
852
+ error?: boolean;
853
+ warning?: boolean;
854
+ maxLength?: number;
855
+ disabled?: boolean;
856
+ readOnly?: boolean;
857
+ forModal?: boolean;
858
+ forSlider?: boolean;
859
+ noRadius?: boolean;
860
+ borderNone?: boolean;
861
+ clearFiles?: boolean;
862
+ onChange?: (event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
863
+ };
864
+
865
+ // Exemplo
866
+ <InputCurrencyFluid
867
+ SymbolCipher="R$"
868
+ placeholder="0,00"
869
+ onChange={(e) => console.log(e.target.value)}
870
+ />
871
+ ```
872
+
873
+ ### InputFluid
874
+
875
+ Campo de entrada fluido com funcionalidades avançadas.
876
+
877
+ ```tsx
878
+ import { InputFluid } from 'prosperita-dumbo-react';
879
+
880
+ // Props
881
+ type InputFluidProps = {
882
+ label?: string;
883
+ message?: string;
884
+ placeholder?: string;
885
+ error?: boolean;
886
+ warning?: boolean;
887
+ onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
888
+ maxLength?: number;
889
+ disabled?: boolean;
890
+ readOnly?: boolean;
891
+ loading?: boolean;
892
+ cols?: number;
893
+ rows?: number;
894
+ noRadius?: boolean;
895
+ borderNone?: boolean;
896
+ tootipLabel?: {
897
+ align: "top" | "top-left" | "top-right" | "bottom" | "bottom-left" | "bottom-right" | "left" | "right";
898
+ width?: string;
899
+ children?: ReactNode;
900
+ size: "small" | "large" | "medium";
901
+ label?: string;
902
+ };
903
+ };
904
+
905
+ // Exemplo
906
+ <InputFluid
907
+ label="Nome"
908
+ placeholder="Digite seu nome"
909
+ loading={false}
910
+ tootipLabel={{
911
+ align: "top",
912
+ label: "Informação adicional",
913
+ size: "small"
914
+ }}
915
+ />
916
+ ```
917
+
918
+ ### InputSelect
919
+
920
+ Campo de seleção baseado em react-select.
921
+
922
+ ```tsx
923
+ import { InputSelect } from 'prosperita-dumbo-react';
924
+
925
+ // Props
926
+ type InputSelectProps = {
927
+ size: "small" | "large" | "medium";
928
+ kind: "default" | "fluid" | "little";
929
+ message?: string;
930
+ label?: string;
931
+ placeholder?: string;
932
+ disabled?: boolean;
933
+ error?: boolean;
934
+ warning?: boolean;
935
+ readonly?: boolean;
936
+ loading?: boolean;
937
+ options?: Array<{ label: string; value: string }>;
938
+ styles?: StylesConfig;
939
+ name?: string;
940
+ id?: string;
941
+ noRadius?: boolean;
942
+ isMulti?: boolean;
943
+ value?: string;
944
+ onChange?: (event: any) => void;
945
+ clearInput?: boolean;
946
+ noBorder?: boolean;
947
+ };
948
+
949
+ // Exemplo
950
+ <InputSelect
951
+ size="medium"
952
+ kind="default"
953
+ label="Selecione uma opção"
954
+ options={[
955
+ { label: 'Opção 1', value: '1' },
956
+ { label: 'Opção 2', value: '2' }
957
+ ]}
958
+ onChange={(selected) => console.log(selected)}
959
+ />
960
+ ```
961
+
962
+ ### Tab
963
+
964
+ Container para sistema de abas.
965
+
966
+ ```tsx
967
+ import { Tab } from 'prosperita-dumbo-react';
968
+
969
+ // Props
970
+ type TabProps = {
971
+ children: ReactNode;
972
+ width: string;
973
+ bottom?: boolean;
974
+ };
975
+
976
+ // Exemplo
977
+ <Tab width="100%" bottom={false}>
978
+ <TabPane label="Aba 1" isActive={true} onClick={() => {}} />
979
+ <TabPane label="Aba 2" isActive={false} onClick={() => {}} />
980
+ </Tab>
981
+ ```
982
+
983
+ ### Table
984
+
985
+ Tabela básica com funcionalidades de paginação e busca.
986
+
987
+ ```tsx
988
+ import { Table } from 'prosperita-dumbo-react';
989
+
990
+ // Props
991
+ type TableProps = {
992
+ columnTitles: string[];
993
+ rowData: Array<{ [key: string]: ReactNode | string | JSX.Element }>;
994
+ sizeHeightMessage?: string;
995
+ actions?: Array<{
996
+ text: ReactNode;
997
+ onClick?: () => void;
998
+ }>;
999
+ label?: {
1000
+ content: JSX.Element | ReactNode;
1001
+ padding?: string;
1002
+ margin?: string;
1003
+ };
1004
+ buttons?: Array<{
1005
+ label: string;
1006
+ onClick?: () => void;
1007
+ icon?: string;
1008
+ kind: "primary" | "secondary" | "tertiary" | "ghost" | "dangerPrimary" | "dangerTertiary" | "dangerGhost";
1009
+ position?: "right" | "left";
1010
+ width?: string;
1011
+ dimension?: string;
1012
+ size?: "small" | "large" | "medium" | "extraLarge" | "twoXLarge" | "expressive";
1013
+ disabled?: boolean;
1014
+ tooltip?: {
1015
+ align: "top" | "top-left" | "top-right" | "bottom" | "bottom-left" | "bottom-right" | "left" | "right";
1016
+ width?: string;
1017
+ children?: ReactNode;
1018
+ size: "small" | "large" | "medium";
1019
+ label?: string;
1020
+ };
1021
+ }>;
1022
+ pageSizes: number[];
1023
+ datePicker?: {
1024
+ label: string;
1025
+ type?: string;
1026
+ value?: string;
1027
+ onChange?: (event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
1028
+ };
1029
+ search?: boolean;
1030
+ pagination?: boolean;
1031
+ messagedatalength?: string;
1032
+ width?: string;
1033
+ sizeSearch?: "small" | "large" | "medium";
1034
+ rowSizes?: string;
1035
+ radius?: boolean;
1036
+ footer?: {
1037
+ ht: string;
1038
+ element: ReactNode;
1039
+ bg: string;
1040
+ };
1041
+ bg?: string;
1042
+ ht?: string;
1043
+ };
1044
+
1045
+ // Exemplo
1046
+ <Table
1047
+ columnTitles={['Nome', 'Email', 'Status']}
1048
+ rowData={[
1049
+ { name: 'João', email: 'joao@email.com', status: 'Ativo' },
1050
+ { name: 'Maria', email: 'maria@email.com', status: 'Inativo' }
1051
+ ]}
1052
+ pageSizes={[10, 25, 50]}
1053
+ search={true}
1054
+ pagination={true}
1055
+ />
1056
+ ```
1057
+
1058
+ ### TableBasic
1059
+
1060
+ Tabela básica simplificada.
1061
+
1062
+ ```tsx
1063
+ import { TableBasic } from 'prosperita-dumbo-react';
1064
+
1065
+ // Props
1066
+ type TableBasicProps = {
1067
+ columnTitles: string[];
1068
+ rowData: Array<{ [key: string]: ReactNode | string | JSX.Element }>;
1069
+ pageSizes: number[];
1070
+ actions?: Array<{
1071
+ text: ReactNode;
1072
+ onClick?: () => void;
1073
+ }>;
1074
+ label?: string;
1075
+ buttons?: Array<{
1076
+ label: string;
1077
+ onClick?: () => void;
1078
+ icon?: string;
1079
+ kind: "primary" | "secondary" | "tertiary" | "ghost" | "dangerPrimary" | "dangerTertiary" | "dangerGhost";
1080
+ position?: "right" | "left";
1081
+ width?: string;
1082
+ dimension?: string;
1083
+ size?: "small" | "large" | "medium" | "extraLarge" | "twoXLarge" | "expressive";
1084
+ disabled?: boolean;
1085
+ dropOptions?: {
1086
+ options: Array<{
1087
+ label: string;
1088
+ onClick?: () => void;
1089
+ }>;
1090
+ };
1091
+ }>;
1092
+ search?: boolean;
1093
+ messagedatalength?: string;
1094
+ width?: string;
1095
+ sizeSearch?: "small" | "large" | "medium";
1096
+ rowSizes?: string;
1097
+ columnSizes?: string;
1098
+ };
1099
+
1100
+ // Exemplo
1101
+ <TableBasic
1102
+ columnTitles={['Nome', 'Email']}
1103
+ rowData={[
1104
+ { name: 'João', email: 'joao@email.com' },
1105
+ { name: 'Maria', email: 'maria@email.com' }
1106
+ ]}
1107
+ pageSizes={[10, 25, 50]}
1108
+ search={true}
1109
+ />
1110
+ ```
1111
+
1112
+ ### TableExpandable
1113
+
1114
+ Tabela com linhas expansíveis.
1115
+
1116
+ ```tsx
1117
+ import { TableExpandable } from 'prosperita-dumbo-react';
1118
+
1119
+ // Props
1120
+ type TableExpandableProps = {
1121
+ columnTitles: ReactNode[];
1122
+ rowData: Array<{ [key: string]: any; onClick?: () => void }>;
1123
+ pageSizes: number[];
1124
+ actions?: Array<{
1125
+ text: ReactNode;
1126
+ icon?: string | ReactNode;
1127
+ onClick?: () => void;
1128
+ feature?: boolean;
1129
+ noPadding?: string;
1130
+ size: "small" | "large" | "medium" | "extraLarge" | "twoXLarge" | "expressive";
1131
+ hasIconSvg?: boolean;
1132
+ width?: string;
1133
+ }>;
1134
+ label?: string;
1135
+ buttons?: Array<{
1136
+ label: string;
1137
+ onClick?: () => void;
1138
+ icon?: string;
1139
+ kind: "primary" | "secondary" | "tertiary" | "ghost" | "dangerPrimary" | "dangerTertiary" | "dangerGhost";
1140
+ position?: "right" | "left";
1141
+ size?: "small" | "large" | "medium" | "extraLarge" | "twoXLarge" | "expressive";
1142
+ dimension?: string;
1143
+ width?: string;
1144
+ disabled?: boolean;
1145
+ loading?: boolean;
1146
+ }>;
1147
+ search?: boolean;
1148
+ onChangeSearch?: (event: ChangeEvent<HTMLInputElement>) => void;
1149
+ arrow?: { thSize: string; iconSize?: string; transform?: string };
1150
+ messageDatalength?: string;
1151
+ width?: string;
1152
+ expandedRowData?: string[];
1153
+ columsKeys?: string[];
1154
+ headerAction?: {
1155
+ active: boolean;
1156
+ count: number;
1157
+ };
1158
+ sizeSearch?: "small" | "large" | "medium";
1159
+ rowSizes?: string;
1160
+ columnSizes?: string;
1161
+ overflowPagination?: boolean;
1162
+ };
1163
+
1164
+ // Exemplo
1165
+ <TableExpandable
1166
+ columnTitles={['Nome', 'Email', 'Ações']}
1167
+ rowData={[
1168
+ { name: 'João', email: 'joao@email.com', details: 'Detalhes do João' },
1169
+ { name: 'Maria', email: 'maria@email.com', details: 'Detalhes da Maria' }
1170
+ ]}
1171
+ pageSizes={[10, 25, 50]}
1172
+ expandedRowData={['details']}
1173
+ search={true}
1174
+ />
1175
+ ```
1176
+
1177
+ ### TableExpandableDrag
1178
+
1179
+ Tabela expansível com colunas arrastáveis.
1180
+
1181
+ ```tsx
1182
+ import { TableExpandableDrag } from 'prosperita-dumbo-react';
1183
+
1184
+ // Props
1185
+ type TableExpandableDragProps = {
1186
+ columnTitles: Array<{
1187
+ id: string;
1188
+ label: ReactNode;
1189
+ name: string;
1190
+ hasFilter?: boolean;
1191
+ width?: string;
1192
+ text: boolean;
1193
+ value?: string;
1194
+ paddingDrop?: string;
1195
+ type?: string;
1196
+ placeholder?: string;
1197
+ options?: Array<{ label: string; value: string }>;
1198
+ onChange?: (event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
1199
+ onChangeMoney?: (event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
1200
+ }>;
1201
+ clearFilesFilter: boolean;
1202
+ rowData: Array<{ [key: string]: ReactNode | string | JSX.Element }>;
1203
+ pageSizes: number[];
1204
+ actions?: Array<{
1205
+ text: ReactNode;
1206
+ icon?: ReactNode;
1207
+ onClick?: () => void;
1208
+ feature?: boolean;
1209
+ noPadding?: string;
1210
+ size: "small" | "large" | "medium" | "extraLarge" | "twoXLarge" | "expressive";
1211
+ hasIconSvg?: boolean;
1212
+ width?: string;
1213
+ }>;
1214
+ label?: ReactNode;
1215
+ buttons?: Array<{
1216
+ label: string;
1217
+ onClick?: () => void;
1218
+ icon?: string | ReactNode;
1219
+ kind: "primary" | "secondary" | "tertiary" | "ghost" | "dangerPrimary" | "dangerTertiary" | "dangerGhost";
1220
+ position?: "right" | "left";
1221
+ width?: string;
1222
+ hasIconSvg?: boolean;
1223
+ dimension?: string;
1224
+ size?: "small" | "large" | "medium" | "extraLarge" | "twoXLarge" | "expressive";
1225
+ disabled?: boolean;
1226
+ loading?: boolean;
1227
+ }>;
1228
+ search?: boolean;
1229
+ nofilter?: boolean;
1230
+ messagedatalength?: ReactNode;
1231
+ width?: string;
1232
+ onChangePage?: (event: number) => void;
1233
+ onChangeSearch?: (event: ChangeEvent<HTMLInputElement>) => void;
1234
+ sizeSearch?: "small" | "large" | "medium";
1235
+ rowSizes?: number;
1236
+ sizesRow?: string;
1237
+ radiusButtonFilter: number;
1238
+ columnSizes?: string;
1239
+ expandedRowData?: string[];
1240
+ onFilterStateChange?: (isFiltering: boolean, data: any[]) => void;
1241
+ columsKeys?: string[];
1242
+ arrow?: { thSize: string; iconSize?: string; transform?: string };
1243
+ headerAction?: {
1244
+ active: boolean;
1245
+ count: number;
1246
+ };
1247
+ column_storage_name: string;
1248
+ values?: { [key: string]: any };
1249
+ stickyFirstColumn?: boolean;
1250
+ widthOverflow?: string;
1251
+ datePicker?: {
1252
+ label: string;
1253
+ type?: string;
1254
+ value?: string;
1255
+ onChange?: (event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
1256
+ };
1257
+ };
1258
+
1259
+ // Exemplo
1260
+ <TableExpandableDrag
1261
+ columnTitles={[
1262
+ { id: 'name', label: 'Nome', name: 'name', hasFilter: true, text: true },
1263
+ { id: 'email', label: 'Email', name: 'email', hasFilter: true, text: true }
1264
+ ]}
1265
+ rowData={[
1266
+ { name: 'João', email: 'joao@email.com', details: 'Detalhes' },
1267
+ { name: 'Maria', email: 'maria@email.com', details: 'Detalhes' }
1268
+ ]}
1269
+ pageSizes={[10, 25, 50]}
1270
+ clearFilesFilter={false}
1271
+ column_storage_name="expandable-table"
1272
+ radiusButtonFilter={2}
1273
+ expandedRowData={['details']}
1274
+ />
1275
+ ```
1276
+
1277
+ ### TableBatchActions
1278
+
1279
+ Tabela com ações em lote.
1280
+
1281
+ ```tsx
1282
+ import { TableBatchActions } from 'prosperita-dumbo-react';
1283
+
1284
+ // Props
1285
+ type TableBatchActionsProps = {
1286
+ columnTitles: ReactNode[];
1287
+ rowData: Array<{ [key: string]: ReactNode | string | JSX.Element }>;
1288
+ pageSizes: number[];
1289
+ actions?: Array<{
1290
+ text: ReactNode;
1291
+ icon?: string;
1292
+ feature?: boolean;
1293
+ onClick?: () => void;
1294
+ }>;
1295
+ label?: string;
1296
+ buttons?: Array<{
1297
+ label: string;
1298
+ onClick?: () => void;
1299
+ icon?: string | ReactNode;
1300
+ kind: "primary" | "secondary" | "tertiary" | "ghost" | "dangerPrimary" | "dangerTertiary" | "dangerGhost";
1301
+ position?: "right" | "left";
1302
+ hasIconSvg?: boolean;
1303
+ dimension?: string;
1304
+ width?: string;
1305
+ size?: "small" | "large" | "medium" | "extraLarge" | "twoXLarge" | "expressive";
1306
+ disabled?: boolean;
1307
+ }>;
1308
+ search?: boolean;
1309
+ messagedatalength?: string;
1310
+ width?: string;
1311
+ columsKeys?: string[];
1312
+ sizeSearch?: "small" | "large" | "medium";
1313
+ headerAction?: {
1314
+ active: boolean;
1315
+ count: number;
1316
+ };
1317
+ rowSizes?: string;
1318
+ };
1319
+
1320
+ // Exemplo
1321
+ <TableBatchActions
1322
+ columnTitles={['Nome', 'Email', 'Selecionar']}
1323
+ rowData={[
1324
+ { name: 'João', email: 'joao@email.com', selected: false },
1325
+ { name: 'Maria', email: 'maria@email.com', selected: false }
1326
+ ]}
1327
+ pageSizes={[10, 25, 50]}
1328
+ headerAction={{ active: true, count: 0 }}
1329
+ search={true}
1330
+ />
1331
+ ```
1332
+
1333
+ ### CodeSnippet
1334
+
1335
+ Snippet de código com funcionalidade de cópia.
1336
+
1337
+ ```tsx
1338
+ import { CodeSnippet } from 'prosperita-dumbo-react';
1339
+
1340
+ // Props
1341
+ type CodeSnippetProps = {
1342
+ language?: string;
1343
+ code: string;
1344
+ background?: string;
1345
+ color?: string;
1346
+ icon?: ReactNode;
1347
+ };
1348
+
1349
+ // Exemplo
1350
+ <CodeSnippet
1351
+ language="javascript"
1352
+ code="console.log('Hello World!');"
1353
+ background="#f4f4f4"
1354
+ color="#161616"
1355
+ />
1356
+ ```
1357
+
1358
+ ### CodeSnippetInline
1359
+
1360
+ Snippet de código inline com numeração de linhas.
1361
+
1362
+ ```tsx
1363
+ import { CodeSnippetInline } from 'prosperita-dumbo-react';
1364
+
1365
+ // Props
1366
+ type CodeSnippetInlineProps = {
1367
+ code: string;
1368
+ language?: string;
1369
+ expanded?: boolean;
1370
+ numbers?: boolean;
1371
+ copy?: boolean;
1372
+ };
1373
+
1374
+ // Exemplo
1375
+ <CodeSnippetInline
1376
+ code={`function hello() {
1377
+ console.log('Hello World!');
1378
+ }`}
1379
+ language="javascript"
1380
+ expanded={true}
1381
+ numbers={true}
1382
+ copy={true}
1383
+ />
1384
+ ```
1385
+
1386
+ ### DuoList
1387
+
1388
+ Lista dupla para seleção de itens.
1389
+
1390
+ ```tsx
1391
+ import { DuoList } from 'prosperita-dumbo-react';
1392
+
1393
+ // Props
1394
+ type DuoListProps = {
1395
+ options: Array<{
1396
+ label: string;
1397
+ value: number;
1398
+ checked?: boolean;
1399
+ }>;
1400
+ onClick?: () => void;
1401
+ selecteds?: Array<{
1402
+ label: string;
1403
+ value: number;
1404
+ checked?: boolean;
1405
+ }>;
1406
+ onChange?: (selected: Array<{ label: string; value: number; checked?: boolean }>) => void;
1407
+ width?: string;
1408
+ };
1409
+
1410
+ // Exemplo
1411
+ <DuoList
1412
+ options={[
1413
+ { label: 'Opção 1', value: 1 },
1414
+ { label: 'Opção 2', value: 2 },
1415
+ { label: 'Opção 3', value: 3 }
1416
+ ]}
1417
+ onChange={(selected) => console.log(selected)}
1418
+ width="400px"
1419
+ />
1420
+ ```
1421
+
1422
+ ### UINavigationHeader
1423
+
1424
+ Cabeçalho de navegação com menu e perfil do usuário.
1425
+
1426
+ ```tsx
1427
+ import { UINavigationHeader } from 'prosperita-dumbo-react';
1428
+
1429
+ // Props
1430
+ type UINavigationHeaderProps = {
1431
+ options?: Array<{
1432
+ normalMode?: boolean;
1433
+ label?: string | ReactNode;
1434
+ icon?: ReactNode;
1435
+ onClick?: () => void;
1436
+ href?: string;
1437
+ permission?: boolean;
1438
+ optionsMenu?: Array<{
1439
+ label?: string;
1440
+ onClick?: () => void;
1441
+ permission?: boolean;
1442
+ children?: Array<{
1443
+ label?: string;
1444
+ onClick?: () => void;
1445
+ permission?: boolean;
1446
+ }>;
1447
+ }>;
1448
+ minColumnWidth?: string;
1449
+ gap?: string;
1450
+ }>;
1451
+ icon?: string | ReactNode;
1452
+ emailuser?: string | ReactNode;
1453
+ userName?: string | ReactNode;
1454
+ children?: ReactNode;
1455
+ SectionRightTime?: ReactNode;
1456
+ open?: boolean;
1457
+ bgHeader?: string;
1458
+ navigateProfile?: () => void;
1459
+ columnsMax?: number;
1460
+ };
1461
+
1462
+ // Exemplo
1463
+ <UINavigationHeader
1464
+ userName="João Silva"
1465
+ emailuser="joao@email.com"
1466
+ options={[
1467
+ {
1468
+ label: 'Dashboard',
1469
+ onClick: () => console.log('Dashboard'),
1470
+ optionsMenu: [
1471
+ { label: 'Submenu 1', onClick: () => console.log('Submenu 1') }
1472
+ ]
1473
+ }
1474
+ ]}
1475
+ navigateProfile={() => console.log('Perfil')}
1476
+ />
1477
+ ```
1478
+
1479
+ ### UISHELLHeader
1480
+
1481
+ Cabeçalho simples com menu dropdown.
1482
+
1483
+ ```tsx
1484
+ import { UISHELLHeader } from 'prosperita-dumbo-react';
1485
+
1486
+ // Props
1487
+ type UISHELLHeaderProps = {
1488
+ options: Array<{
1489
+ label: string;
1490
+ onClick: () => void;
1491
+ }>;
1492
+ label?: string;
1493
+ };
1494
+
1495
+ // Exemplo
1496
+ <UISHELLHeader
1497
+ label="Menu"
1498
+ options={[
1499
+ { label: 'Opção 1', onClick: () => console.log('Opção 1') },
1500
+ { label: 'Opção 2', onClick: () => console.log('Opção 2') }
1501
+ ]}
1502
+ />
1503
+ ```
1504
+
1505
+ ### UIHeaderNav
1506
+
1507
+ Cabeçalho de navegação com funcionalidades avançadas.
1508
+
1509
+ ```tsx
1510
+ import { UIHeaderNav } from 'prosperita-dumbo-react';
1511
+
1512
+ // Props
1513
+ type UIHeaderNavProps = {
1514
+ options?: Array<{
1515
+ label?: string | ReactNode;
1516
+ onClick?: () => void;
1517
+ href?: string;
1518
+ permission?: boolean;
1519
+ optionsMenu?: Array<{
1520
+ label?: string;
1521
+ onClick?: () => void;
1522
+ permission?: boolean;
1523
+ }>;
1524
+ }>;
1525
+ icon?: string | ReactNode;
1526
+ emailuser?: string | ReactNode;
1527
+ userName?: string | ReactNode;
1528
+ children?: ReactNode;
1529
+ SectionRightTime?: ReactNode;
1530
+ open?: boolean;
1531
+ bgHeader?: string;
1532
+ navigateProfile?: () => void;
1533
+ search?: {
1534
+ onClick: () => void;
1535
+ on: boolean;
1536
+ };
1537
+ };
1538
+
1539
+ // Exemplo
1540
+ <UIHeaderNav
1541
+ userName="João Silva"
1542
+ emailuser="joao@email.com"
1543
+ options={[
1544
+ { label: 'Dashboard', onClick: () => console.log('Dashboard') }
1545
+ ]}
1546
+ search={{ onClick: () => console.log('Search'), on: true }}
1547
+ navigateProfile={() => console.log('Perfil')}
1548
+ />
1549
+ ```
1550
+
1551
+ ## 🎨 Tema
1552
+
1553
+ A biblioteca usa um sistema de temas consistente. Para customizar:
1554
+
1555
+ ```tsx
1556
+ import theme from 'prosperita-dumbo-react/theme';
1557
+
1558
+ // Cores disponíveis
1559
+ theme.buttonPrimary // Cor primária dos botões
1560
+ theme.textPrimary // Cor primária do texto
1561
+ theme.layer01 // Cor de fundo da camada 1
1562
+ theme.borderSubtle00 // Cor da borda sutil
1563
+ ```
1564
+
1565
+ ## 📱 Responsividade
1566
+
1567
+ Todos os componentes são responsivos por padrão e se adaptam automaticamente a diferentes tamanhos de tela.
1568
+
1569
+ ## ♿ Acessibilidade
1570
+
1571
+ A biblioteca segue as diretrizes WCAG 2.1 para acessibilidade, incluindo:
1572
+ - Navegação por teclado
1573
+ - Suporte a leitores de tela
1574
+ - Contraste adequado
1575
+ - Estados focáveis
1576
+
1577
+ ## 🔧 Desenvolvimento
1578
+
1579
+ Para contribuir com o projeto:
1580
+
1581
+ ```bash
1582
+ git clone <repository>
1583
+ cd prosperita-dumbo-react
1584
+ yarn install
1585
+ yarn dev
1586
+ ```
1587
+
1588
+ ## 📄 Licença
1589
+
1590
+ MIT License - veja o arquivo LICENSE para detalhes.
1591
+
1592
+ ## 🤝 Contribuição
1593
+
1594
+ Contribuições são bem-vindas! Por favor, leia o guia de contribuição antes de submeter um PR.