teraprox-ui-kit 0.1.10 → 0.2.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/index.css +198 -25
- package/dist/index.d.mts +96 -30
- package/dist/index.d.ts +96 -30
- package/dist/index.js +1512 -1116
- package/dist/index.mjs +1519 -1109
- package/package.json +11 -2
package/dist/index.css
CHANGED
|
@@ -187,31 +187,6 @@
|
|
|
187
187
|
font-style: italic;
|
|
188
188
|
}
|
|
189
189
|
|
|
190
|
-
/* src/styles/RecursoDisplayer.css */
|
|
191
|
-
.recurso-displayer {
|
|
192
|
-
display: flex;
|
|
193
|
-
flex-wrap: wrap;
|
|
194
|
-
gap: 6px;
|
|
195
|
-
}
|
|
196
|
-
.recurso-displayer .recurso-badge {
|
|
197
|
-
display: inline-flex;
|
|
198
|
-
align-items: center;
|
|
199
|
-
gap: 4px;
|
|
200
|
-
padding: 4px 10px;
|
|
201
|
-
border-radius: 16px;
|
|
202
|
-
font-size: 0.85rem;
|
|
203
|
-
background-color: #e9ecef;
|
|
204
|
-
color: #495057;
|
|
205
|
-
}
|
|
206
|
-
.recurso-displayer .recurso-badge .remove-btn {
|
|
207
|
-
cursor: pointer;
|
|
208
|
-
font-size: 0.75rem;
|
|
209
|
-
opacity: 0.6;
|
|
210
|
-
}
|
|
211
|
-
.recurso-displayer .recurso-badge .remove-btn:hover {
|
|
212
|
-
opacity: 1;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
190
|
/* src/styles/StatusPills.css */
|
|
216
191
|
.status-pills-container {
|
|
217
192
|
display: flex;
|
|
@@ -408,6 +383,204 @@
|
|
|
408
383
|
border-top: 1px dashed #dee2e6;
|
|
409
384
|
}
|
|
410
385
|
|
|
386
|
+
/* src/styles/UnifiedPeriodSelector.css */
|
|
387
|
+
.ups-card {
|
|
388
|
+
border-radius: 10px;
|
|
389
|
+
border: 1px solid #dee2e6;
|
|
390
|
+
background: #fff;
|
|
391
|
+
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
|
|
392
|
+
transition: box-shadow 0.2s ease;
|
|
393
|
+
}
|
|
394
|
+
.ups-card:hover {
|
|
395
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
396
|
+
}
|
|
397
|
+
.ups-card--compact {
|
|
398
|
+
cursor: pointer;
|
|
399
|
+
}
|
|
400
|
+
.ups-compact-row {
|
|
401
|
+
display: flex;
|
|
402
|
+
align-items: center;
|
|
403
|
+
padding: 8px 14px;
|
|
404
|
+
gap: 4px;
|
|
405
|
+
}
|
|
406
|
+
.ups-edit-hint {
|
|
407
|
+
margin-left: auto;
|
|
408
|
+
}
|
|
409
|
+
.ups-body {
|
|
410
|
+
padding: 12px 16px !important;
|
|
411
|
+
display: flex;
|
|
412
|
+
flex-direction: column;
|
|
413
|
+
gap: 10px;
|
|
414
|
+
}
|
|
415
|
+
.ups-header {
|
|
416
|
+
display: flex;
|
|
417
|
+
align-items: center;
|
|
418
|
+
justify-content: space-between;
|
|
419
|
+
gap: 8px;
|
|
420
|
+
}
|
|
421
|
+
.ups-display-label {
|
|
422
|
+
font-weight: 600;
|
|
423
|
+
font-size: 0.95rem;
|
|
424
|
+
color: #212529;
|
|
425
|
+
}
|
|
426
|
+
.ups-tabs {
|
|
427
|
+
display: flex;
|
|
428
|
+
gap: 4px;
|
|
429
|
+
border-bottom: 2px solid #f0f0f0;
|
|
430
|
+
padding-bottom: 2px;
|
|
431
|
+
}
|
|
432
|
+
.ups-tab {
|
|
433
|
+
display: inline-flex;
|
|
434
|
+
align-items: center;
|
|
435
|
+
gap: 5px;
|
|
436
|
+
padding: 5px 12px;
|
|
437
|
+
border: none;
|
|
438
|
+
background: none;
|
|
439
|
+
font-size: 0.82rem;
|
|
440
|
+
font-weight: 500;
|
|
441
|
+
color: #6c757d;
|
|
442
|
+
border-radius: 6px 6px 0 0;
|
|
443
|
+
cursor: pointer;
|
|
444
|
+
position: relative;
|
|
445
|
+
transition: color 0.15s, background 0.15s;
|
|
446
|
+
}
|
|
447
|
+
.ups-tab:hover {
|
|
448
|
+
color: #0d6efd;
|
|
449
|
+
background: #f0f4ff;
|
|
450
|
+
}
|
|
451
|
+
.ups-tab--active {
|
|
452
|
+
color: #0d6efd;
|
|
453
|
+
font-weight: 600;
|
|
454
|
+
}
|
|
455
|
+
.ups-tab--active::after {
|
|
456
|
+
content: "";
|
|
457
|
+
position: absolute;
|
|
458
|
+
bottom: -2px;
|
|
459
|
+
left: 0;
|
|
460
|
+
right: 0;
|
|
461
|
+
height: 2px;
|
|
462
|
+
background: #0d6efd;
|
|
463
|
+
border-radius: 2px 2px 0 0;
|
|
464
|
+
}
|
|
465
|
+
.ups-tab:disabled {
|
|
466
|
+
opacity: 0.5;
|
|
467
|
+
cursor: not-allowed;
|
|
468
|
+
}
|
|
469
|
+
.ups-content {
|
|
470
|
+
min-height: 60px;
|
|
471
|
+
}
|
|
472
|
+
.ups-quick-grid {
|
|
473
|
+
display: flex;
|
|
474
|
+
flex-wrap: wrap;
|
|
475
|
+
gap: 8px;
|
|
476
|
+
}
|
|
477
|
+
.ups-quick-btn {
|
|
478
|
+
border-radius: 20px;
|
|
479
|
+
padding: 4px 16px;
|
|
480
|
+
font-size: 0.82rem;
|
|
481
|
+
font-weight: 500;
|
|
482
|
+
transition: all 0.15s ease;
|
|
483
|
+
}
|
|
484
|
+
.ups-quick-month {
|
|
485
|
+
margin-top: 10px;
|
|
486
|
+
padding-top: 10px;
|
|
487
|
+
border-top: 1px dashed #e9ecef;
|
|
488
|
+
}
|
|
489
|
+
.ups-quick-month .form-select-sm {
|
|
490
|
+
font-size: 0.82rem;
|
|
491
|
+
border-radius: 8px;
|
|
492
|
+
}
|
|
493
|
+
.ups-month-section {
|
|
494
|
+
display: flex;
|
|
495
|
+
flex-direction: column;
|
|
496
|
+
gap: 8px;
|
|
497
|
+
}
|
|
498
|
+
.ups-year-nav {
|
|
499
|
+
display: flex;
|
|
500
|
+
align-items: center;
|
|
501
|
+
justify-content: center;
|
|
502
|
+
gap: 14px;
|
|
503
|
+
}
|
|
504
|
+
.ups-year-btn {
|
|
505
|
+
width: 30px;
|
|
506
|
+
height: 30px;
|
|
507
|
+
padding: 0;
|
|
508
|
+
display: flex;
|
|
509
|
+
align-items: center;
|
|
510
|
+
justify-content: center;
|
|
511
|
+
border-radius: 50%;
|
|
512
|
+
}
|
|
513
|
+
.ups-year-label {
|
|
514
|
+
font-size: 1.1rem;
|
|
515
|
+
font-weight: 700;
|
|
516
|
+
color: #343a40;
|
|
517
|
+
min-width: 50px;
|
|
518
|
+
text-align: center;
|
|
519
|
+
}
|
|
520
|
+
.ups-month-grid {
|
|
521
|
+
display: grid;
|
|
522
|
+
grid-template-columns: repeat(6, 1fr);
|
|
523
|
+
gap: 6px;
|
|
524
|
+
}
|
|
525
|
+
.ups-month-cell {
|
|
526
|
+
padding: 6px 2px;
|
|
527
|
+
font-size: 0.82rem;
|
|
528
|
+
font-weight: 500;
|
|
529
|
+
text-align: center;
|
|
530
|
+
border: 1px solid #dee2e6;
|
|
531
|
+
border-radius: 6px;
|
|
532
|
+
background: #fff;
|
|
533
|
+
color: #495057;
|
|
534
|
+
cursor: pointer;
|
|
535
|
+
transition: all 0.15s ease;
|
|
536
|
+
}
|
|
537
|
+
.ups-month-cell:hover {
|
|
538
|
+
background: #e7f1ff;
|
|
539
|
+
border-color: #0d6efd;
|
|
540
|
+
color: #0d6efd;
|
|
541
|
+
}
|
|
542
|
+
.ups-month-cell--selected {
|
|
543
|
+
background: #0d6efd;
|
|
544
|
+
border-color: #0d6efd;
|
|
545
|
+
color: #fff;
|
|
546
|
+
font-weight: 600;
|
|
547
|
+
}
|
|
548
|
+
.ups-month-cell--selected:hover {
|
|
549
|
+
background: #0b5ed7;
|
|
550
|
+
color: #fff;
|
|
551
|
+
}
|
|
552
|
+
.ups-month-cell--current {
|
|
553
|
+
border-color: #0d6efd;
|
|
554
|
+
color: #0d6efd;
|
|
555
|
+
font-weight: 700;
|
|
556
|
+
}
|
|
557
|
+
.ups-month-cell:disabled {
|
|
558
|
+
opacity: 0.4;
|
|
559
|
+
cursor: not-allowed;
|
|
560
|
+
}
|
|
561
|
+
.ups-month-hint {
|
|
562
|
+
font-size: 0.72rem;
|
|
563
|
+
text-align: center;
|
|
564
|
+
margin: 0;
|
|
565
|
+
}
|
|
566
|
+
.ups-custom-section {
|
|
567
|
+
}
|
|
568
|
+
@media (max-width: 576px) {
|
|
569
|
+
.ups-month-grid {
|
|
570
|
+
grid-template-columns: repeat(4, 1fr);
|
|
571
|
+
}
|
|
572
|
+
.ups-tabs {
|
|
573
|
+
overflow-x: auto;
|
|
574
|
+
}
|
|
575
|
+
.ups-quick-grid {
|
|
576
|
+
gap: 6px;
|
|
577
|
+
}
|
|
578
|
+
.ups-quick-btn {
|
|
579
|
+
padding: 3px 12px;
|
|
580
|
+
font-size: 0.78rem;
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
|
|
411
584
|
/* src/styles/UploadArea.css */
|
|
412
585
|
.upload-area {
|
|
413
586
|
border: 3px dashed #ccc;
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ButtonProps, FormCheckProps, ModalProps } from 'react-bootstrap';
|
|
3
|
+
export { BranchDropDisplay, BranchDropDisplayProps, FindRecursoByTagField, FindRecursoByTagFieldProps, RecursoDisplayer, RecursoDisplayerProps } from '@teraprox/ui-kit-sgm';
|
|
4
|
+
import dayjs from 'dayjs';
|
|
3
5
|
import { Accept } from 'react-dropzone';
|
|
6
|
+
export { AnexoLocalItem, AnexoManager, AnexoManagerProps, AnexoPersistedItem } from '@teraprox/ui-kit-core';
|
|
7
|
+
export { CalculadoraCorrecaoModal, CalculoCorrecao, CampoDeVerificacaoV2, FrequenciaFormV2, TarefaUnidadeForm, UnidadeMaterialCard } from '@teraprox/ui-kit-sgp';
|
|
4
8
|
|
|
5
9
|
interface AddButtonProps {
|
|
6
10
|
callback: () => void;
|
|
@@ -396,6 +400,37 @@ interface GenericDisplayProps {
|
|
|
396
400
|
}
|
|
397
401
|
declare const GenericDisplay: React.FC<GenericDisplayProps>;
|
|
398
402
|
|
|
403
|
+
interface RateLimitEntry {
|
|
404
|
+
used: number;
|
|
405
|
+
limit: number;
|
|
406
|
+
exceeded: boolean;
|
|
407
|
+
windowReset: string;
|
|
408
|
+
}
|
|
409
|
+
interface RateLimitBarProps {
|
|
410
|
+
/** Rate limit entry from CoreService.rateLimits[pathGroup] */
|
|
411
|
+
entry: RateLimitEntry | undefined;
|
|
412
|
+
/** Optional label shown above the bar (e.g. "Login") */
|
|
413
|
+
label?: string;
|
|
414
|
+
/** Additional CSS class */
|
|
415
|
+
className?: string;
|
|
416
|
+
}
|
|
417
|
+
/**
|
|
418
|
+
* Displays a colored progress bar with rate limit usage.
|
|
419
|
+
*
|
|
420
|
+
* Color thresholds:
|
|
421
|
+
* < 70% → green
|
|
422
|
+
* 70–89% → yellow
|
|
423
|
+
* ≥ 90% or exceeded → red
|
|
424
|
+
*
|
|
425
|
+
* Hides itself when no entry is provided (tenant has no rate limit configured).
|
|
426
|
+
*
|
|
427
|
+
* Usage in remotes:
|
|
428
|
+
* import { RateLimitBar } from 'teraprox-ui-kit'
|
|
429
|
+
* const { rateLimits } = useCoreService()
|
|
430
|
+
* <RateLimitBar entry={rateLimits['user_auth_POST']} label="Login" />
|
|
431
|
+
*/
|
|
432
|
+
declare const RateLimitBar: React.FC<RateLimitBarProps>;
|
|
433
|
+
|
|
399
434
|
interface StatusIndicatorProps {
|
|
400
435
|
/** Status (pendente, executando, concluido, canceled, naoAtribuida) */
|
|
401
436
|
status: string;
|
|
@@ -473,16 +508,6 @@ interface TimerDisplayProps {
|
|
|
473
508
|
*/
|
|
474
509
|
declare const TimerDisplay: React.FC<TimerDisplayProps>;
|
|
475
510
|
|
|
476
|
-
type RecursoMode = 'manutencao' | 'processo';
|
|
477
|
-
interface RecursoDisplayerProps {
|
|
478
|
-
mode?: RecursoMode;
|
|
479
|
-
controller: any;
|
|
480
|
-
selectedList?: any[];
|
|
481
|
-
onSaveRecurso: (recursos: any[]) => void;
|
|
482
|
-
singleReturn?: boolean;
|
|
483
|
-
}
|
|
484
|
-
declare const RecursoDisplayer: React.FC<RecursoDisplayerProps>;
|
|
485
|
-
|
|
486
511
|
interface StatusMeta {
|
|
487
512
|
label: string;
|
|
488
513
|
color: string;
|
|
@@ -550,6 +575,38 @@ interface AdvancedFilterBarProps {
|
|
|
550
575
|
*/
|
|
551
576
|
declare const AdvancedFilterBar: React.FC<AdvancedFilterBarProps>;
|
|
552
577
|
|
|
578
|
+
type QuickPresetKey = "today" | "week" | "month" | "year";
|
|
579
|
+
interface PeriodRange {
|
|
580
|
+
dataInicio: string;
|
|
581
|
+
dataFim: string;
|
|
582
|
+
}
|
|
583
|
+
interface UnifiedPeriodSelectorProps {
|
|
584
|
+
/** Current start date (ISO string) */
|
|
585
|
+
dataInicio?: string | null;
|
|
586
|
+
/** Current end date (ISO string) */
|
|
587
|
+
dataFim?: string | null;
|
|
588
|
+
/** Called whenever the period changes */
|
|
589
|
+
onSelect: (range: PeriodRange) => void;
|
|
590
|
+
/** Which tab to show by default */
|
|
591
|
+
defaultTab?: "quick" | "month" | "custom";
|
|
592
|
+
/** Allow selecting future dates (default: true) */
|
|
593
|
+
allowFuture?: boolean;
|
|
594
|
+
/** Custom quick presets (overrides defaults) */
|
|
595
|
+
quickPresets?: {
|
|
596
|
+
key: string;
|
|
597
|
+
label: string;
|
|
598
|
+
start: () => dayjs.Dayjs;
|
|
599
|
+
end: () => dayjs.Dayjs;
|
|
600
|
+
}[];
|
|
601
|
+
/** Additional CSS class */
|
|
602
|
+
className?: string;
|
|
603
|
+
/** Whether the component is disabled */
|
|
604
|
+
disabled?: boolean;
|
|
605
|
+
/** Compact mode — shows only the header until clicked */
|
|
606
|
+
compact?: boolean;
|
|
607
|
+
}
|
|
608
|
+
declare const UnifiedPeriodSelector: React.FC<UnifiedPeriodSelectorProps>;
|
|
609
|
+
|
|
553
610
|
interface MailSenderProps {
|
|
554
611
|
/** Conteúdo HTML a ser enviado no corpo do e-mail */
|
|
555
612
|
htmlContent: string;
|
|
@@ -601,6 +658,7 @@ interface DeleteConfirmProps {
|
|
|
601
658
|
*/
|
|
602
659
|
declare const DeleteConfirm: React.FC<DeleteConfirmProps>;
|
|
603
660
|
|
|
661
|
+
type LabelPosition = "top" | "floating";
|
|
604
662
|
interface AutoCompleteProps {
|
|
605
663
|
className?: string;
|
|
606
664
|
/** Opções estáticas iniciais */
|
|
@@ -654,6 +712,12 @@ interface AutoCompleteProps {
|
|
|
654
712
|
showListOnFocus?: boolean;
|
|
655
713
|
/** Se deve carregar sob demanda ao digitar */
|
|
656
714
|
lazyLoad?: boolean;
|
|
715
|
+
/**
|
|
716
|
+
* Posicao da label:
|
|
717
|
+
* - 'top' (default): label acima do input (padrao UX /os/form)
|
|
718
|
+
* - 'floating': comportamento Bootstrap FloatingLabel legado
|
|
719
|
+
*/
|
|
720
|
+
labelPosition?: LabelPosition;
|
|
657
721
|
}
|
|
658
722
|
/**
|
|
659
723
|
* Componente de Input com Auto-complete dinâmico.
|
|
@@ -731,8 +795,15 @@ interface FormFieldProps {
|
|
|
731
795
|
onValueUpdate?: (val: string, event: React.ChangeEvent<any>) => void;
|
|
732
796
|
/** Callback no blur */
|
|
733
797
|
onBlur?: (val: string, event: React.FocusEvent<any>) => void;
|
|
734
|
-
/** Label exibida
|
|
798
|
+
/** Label exibida acima do input (top) ou dentro como FloatingLabel */
|
|
735
799
|
label?: string;
|
|
800
|
+
/**
|
|
801
|
+
* Posicao da label:
|
|
802
|
+
* - 'top' (default): label como elemento separado acima do control
|
|
803
|
+
* - 'floating' : comportamento Bootstrap FloatingLabel wrapping
|
|
804
|
+
* Default 'top' alinhado com auditoria browser /os/form (Wave 5A fix).
|
|
805
|
+
*/
|
|
806
|
+
labelPosition?: 'top' | 'floating';
|
|
736
807
|
/** Tipo do input (text, number, password, etc) */
|
|
737
808
|
ty?: string;
|
|
738
809
|
/** Callback para botão de ação à direita */
|
|
@@ -769,7 +840,13 @@ interface FormFieldProps {
|
|
|
769
840
|
controlId?: string;
|
|
770
841
|
}
|
|
771
842
|
/**
|
|
772
|
-
* Campo de formulário padronizado com suporte a
|
|
843
|
+
* Campo de formulário padronizado com suporte a label-top (default) ou
|
|
844
|
+
* FloatingLabel, mais botões de ação laterais.
|
|
845
|
+
*
|
|
846
|
+
* Wave 5A fix (sprint 2026-04-21-ui-kit-domain-split-wave0): default de
|
|
847
|
+
* `labelPosition` e 'top' para alinhar com padrao visual auditado no browser.
|
|
848
|
+
* Callers que dependem explicitamente de FloatingLabel devem passar
|
|
849
|
+
* `labelPosition="floating"`.
|
|
773
850
|
*/
|
|
774
851
|
declare const FormField: React.FC<FormFieldProps>;
|
|
775
852
|
|
|
@@ -807,9 +884,13 @@ declare const ClickToWriteField: React.FC<ClickToWriteFieldProps>;
|
|
|
807
884
|
|
|
808
885
|
interface ColorPickerProps {
|
|
809
886
|
/** Cor selecionada atualmente */
|
|
810
|
-
selectedColor
|
|
887
|
+
selectedColor?: string;
|
|
811
888
|
/** Callback para quando a cor muda */
|
|
812
|
-
onColorChange
|
|
889
|
+
onColorChange?: (color: string) => void;
|
|
890
|
+
/** Retrocompat legado */
|
|
891
|
+
defaultColor?: string;
|
|
892
|
+
/** Retrocompat legado */
|
|
893
|
+
setCor?: (color: string) => void;
|
|
813
894
|
/** Lista de cores sugeridas para a paleta rápida */
|
|
814
895
|
presetColors?: string[];
|
|
815
896
|
/** Título do componente (padrão: 'Cor de Identificação') */
|
|
@@ -852,21 +933,6 @@ interface UploadAreaProps {
|
|
|
852
933
|
*/
|
|
853
934
|
declare const UploadArea: React.FC<UploadAreaProps>;
|
|
854
935
|
|
|
855
|
-
interface FindRecursoByTagFieldProps {
|
|
856
|
-
/** Callback chamado quando um recurso é selecionado ou lido via QR. */
|
|
857
|
-
callback: (recurso: any, confirmed: boolean) => void;
|
|
858
|
-
/** Controller de recurso injetado (deve implementar read, get e findByTagDescription) */
|
|
859
|
-
recursoController?: {
|
|
860
|
-
read: (endpoint: string, data?: any) => Promise<any>;
|
|
861
|
-
get: (endpoint: string) => Promise<any>;
|
|
862
|
-
};
|
|
863
|
-
}
|
|
864
|
-
/**
|
|
865
|
-
* Componente para encontrar um recurso por sua tag (descrição ou ID).
|
|
866
|
-
* Suporta busca via AutoComplete e leitura via QR Code.
|
|
867
|
-
*/
|
|
868
|
-
declare const FindRecursoByTagField: React.FC<FindRecursoByTagFieldProps>;
|
|
869
|
-
|
|
870
936
|
interface Sector {
|
|
871
937
|
id: string | number;
|
|
872
938
|
nome: string;
|
|
@@ -1186,4 +1252,4 @@ interface TextWithMoreProps {
|
|
|
1186
1252
|
*/
|
|
1187
1253
|
declare const TextWithMore: React.FC<TextWithMoreProps>;
|
|
1188
1254
|
|
|
1189
|
-
export { ActionButtons, type ActionButtonsProps, AddButton, AdvancedFilterBar, type AdvancedFilterBarProps, ApproveAndReproveButtons, type ApproveAndReproveButtonsProps, AsyncButton, type AsyncButtonProps, AutoComplete, type AutoCompleteProps, BonusButton, type BonusButtonProps, ButtonWithDropdown, type ButtonWithDropdownOption, type ButtonWithDropdownProps, CheckBox, type CheckBoxOption, type CheckBoxProps, ClickToWriteField, type ClickToWriteFieldProps, ColorPicker, type ColorPickerProps, ConfigObject, DeleteButton, DeleteConfirm, type DeleteConfirmProps, ExpandableCard, type ExpandableCardItem, type ExpandableCardItemObject, type ExpandableCardProps,
|
|
1255
|
+
export { ActionButtons, type ActionButtonsProps, AddButton, AdvancedFilterBar, type AdvancedFilterBarProps, ApproveAndReproveButtons, type ApproveAndReproveButtonsProps, AsyncButton, type AsyncButtonProps, AutoComplete, type AutoCompleteProps, BonusButton, type BonusButtonProps, ButtonWithDropdown, type ButtonWithDropdownOption, type ButtonWithDropdownProps, CheckBox, type CheckBoxOption, type CheckBoxProps, ClickToWriteField, type ClickToWriteFieldProps, ColorPicker, type ColorPickerProps, ConfigObject, DeleteButton, DeleteConfirm, type DeleteConfirmProps, ExpandableCard, type ExpandableCardItem, type ExpandableCardItemObject, type ExpandableCardProps, FormField, type FormFieldProps, Generic3DotMenu, type Generic3DotMenuProps, GenericChart, type GenericChartProps, GenericDisplay, GenericForm, GenericREchart, type GenericREchartProps, GenericSelect, GenericSelectOps, IconLabelItem, type IconLabelItemProps, IconLabelList, type IconLabelListItem, type IconLabelListProps, type ImageData, ImageViewModal, type ImageViewModalProps, type Justificativa, JustificativaModal, type JustificativaModalProps, LoadingButton, type LoadingButtonProps, LoadingProgress, type LoadingProgressProps, MailSender, type MailSenderProps, MenuEvent, ModalBasicTemplate, type ModalBasicTemplateProps, NavigateButton, type NavigateButtonProps, type Notification, NotificationBell, type NotificationBellProps, NotificationItem, type NotificationItemProps, type PeriodPreset, type PeriodRange, PeriodSelector, type PeriodSelectorProps, QrCodeScanButton, type QrCodeScanButtonProps, QrReader, type QrReaderProps, type QuickPresetKey, RateLimitBar, type RateLimitBarProps, type RateLimitEntry, ResponsiveContainer, type ReusableTableColumnConfig, ReusableTableWithModal, type ReusableTableWithModalProps, type Sector, SectorSelector, type SectorSelectorProps, SelectDateModal, type SelectDateModalProps, StatusBadge, type StatusBadgeProps, StatusIndicator, type StatusIndicatorProps, StatusLight, type StatusLightProps, type StatusMeta, StatusPills, type StatusPillsProps, Switch, SwitchOnClick, type SwitchOnClickProps, type SwitchProps, TextWithMore, type TextWithMoreProps, TimerDisplay, type TimerDisplayProps, UnidadeMaterialForm, type UnidadeMaterialFormProps, type UnidadeMaterialValue, UnifiedPeriodSelector, type UnifiedPeriodSelectorProps, UploadArea, type UploadAreaProps, UuidPill, VerticalItemsDisplay, type VerticalItemsDisplayProps };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ButtonProps, FormCheckProps, ModalProps } from 'react-bootstrap';
|
|
3
|
+
export { BranchDropDisplay, BranchDropDisplayProps, FindRecursoByTagField, FindRecursoByTagFieldProps, RecursoDisplayer, RecursoDisplayerProps } from '@teraprox/ui-kit-sgm';
|
|
4
|
+
import dayjs from 'dayjs';
|
|
3
5
|
import { Accept } from 'react-dropzone';
|
|
6
|
+
export { AnexoLocalItem, AnexoManager, AnexoManagerProps, AnexoPersistedItem } from '@teraprox/ui-kit-core';
|
|
7
|
+
export { CalculadoraCorrecaoModal, CalculoCorrecao, CampoDeVerificacaoV2, FrequenciaFormV2, TarefaUnidadeForm, UnidadeMaterialCard } from '@teraprox/ui-kit-sgp';
|
|
4
8
|
|
|
5
9
|
interface AddButtonProps {
|
|
6
10
|
callback: () => void;
|
|
@@ -396,6 +400,37 @@ interface GenericDisplayProps {
|
|
|
396
400
|
}
|
|
397
401
|
declare const GenericDisplay: React.FC<GenericDisplayProps>;
|
|
398
402
|
|
|
403
|
+
interface RateLimitEntry {
|
|
404
|
+
used: number;
|
|
405
|
+
limit: number;
|
|
406
|
+
exceeded: boolean;
|
|
407
|
+
windowReset: string;
|
|
408
|
+
}
|
|
409
|
+
interface RateLimitBarProps {
|
|
410
|
+
/** Rate limit entry from CoreService.rateLimits[pathGroup] */
|
|
411
|
+
entry: RateLimitEntry | undefined;
|
|
412
|
+
/** Optional label shown above the bar (e.g. "Login") */
|
|
413
|
+
label?: string;
|
|
414
|
+
/** Additional CSS class */
|
|
415
|
+
className?: string;
|
|
416
|
+
}
|
|
417
|
+
/**
|
|
418
|
+
* Displays a colored progress bar with rate limit usage.
|
|
419
|
+
*
|
|
420
|
+
* Color thresholds:
|
|
421
|
+
* < 70% → green
|
|
422
|
+
* 70–89% → yellow
|
|
423
|
+
* ≥ 90% or exceeded → red
|
|
424
|
+
*
|
|
425
|
+
* Hides itself when no entry is provided (tenant has no rate limit configured).
|
|
426
|
+
*
|
|
427
|
+
* Usage in remotes:
|
|
428
|
+
* import { RateLimitBar } from 'teraprox-ui-kit'
|
|
429
|
+
* const { rateLimits } = useCoreService()
|
|
430
|
+
* <RateLimitBar entry={rateLimits['user_auth_POST']} label="Login" />
|
|
431
|
+
*/
|
|
432
|
+
declare const RateLimitBar: React.FC<RateLimitBarProps>;
|
|
433
|
+
|
|
399
434
|
interface StatusIndicatorProps {
|
|
400
435
|
/** Status (pendente, executando, concluido, canceled, naoAtribuida) */
|
|
401
436
|
status: string;
|
|
@@ -473,16 +508,6 @@ interface TimerDisplayProps {
|
|
|
473
508
|
*/
|
|
474
509
|
declare const TimerDisplay: React.FC<TimerDisplayProps>;
|
|
475
510
|
|
|
476
|
-
type RecursoMode = 'manutencao' | 'processo';
|
|
477
|
-
interface RecursoDisplayerProps {
|
|
478
|
-
mode?: RecursoMode;
|
|
479
|
-
controller: any;
|
|
480
|
-
selectedList?: any[];
|
|
481
|
-
onSaveRecurso: (recursos: any[]) => void;
|
|
482
|
-
singleReturn?: boolean;
|
|
483
|
-
}
|
|
484
|
-
declare const RecursoDisplayer: React.FC<RecursoDisplayerProps>;
|
|
485
|
-
|
|
486
511
|
interface StatusMeta {
|
|
487
512
|
label: string;
|
|
488
513
|
color: string;
|
|
@@ -550,6 +575,38 @@ interface AdvancedFilterBarProps {
|
|
|
550
575
|
*/
|
|
551
576
|
declare const AdvancedFilterBar: React.FC<AdvancedFilterBarProps>;
|
|
552
577
|
|
|
578
|
+
type QuickPresetKey = "today" | "week" | "month" | "year";
|
|
579
|
+
interface PeriodRange {
|
|
580
|
+
dataInicio: string;
|
|
581
|
+
dataFim: string;
|
|
582
|
+
}
|
|
583
|
+
interface UnifiedPeriodSelectorProps {
|
|
584
|
+
/** Current start date (ISO string) */
|
|
585
|
+
dataInicio?: string | null;
|
|
586
|
+
/** Current end date (ISO string) */
|
|
587
|
+
dataFim?: string | null;
|
|
588
|
+
/** Called whenever the period changes */
|
|
589
|
+
onSelect: (range: PeriodRange) => void;
|
|
590
|
+
/** Which tab to show by default */
|
|
591
|
+
defaultTab?: "quick" | "month" | "custom";
|
|
592
|
+
/** Allow selecting future dates (default: true) */
|
|
593
|
+
allowFuture?: boolean;
|
|
594
|
+
/** Custom quick presets (overrides defaults) */
|
|
595
|
+
quickPresets?: {
|
|
596
|
+
key: string;
|
|
597
|
+
label: string;
|
|
598
|
+
start: () => dayjs.Dayjs;
|
|
599
|
+
end: () => dayjs.Dayjs;
|
|
600
|
+
}[];
|
|
601
|
+
/** Additional CSS class */
|
|
602
|
+
className?: string;
|
|
603
|
+
/** Whether the component is disabled */
|
|
604
|
+
disabled?: boolean;
|
|
605
|
+
/** Compact mode — shows only the header until clicked */
|
|
606
|
+
compact?: boolean;
|
|
607
|
+
}
|
|
608
|
+
declare const UnifiedPeriodSelector: React.FC<UnifiedPeriodSelectorProps>;
|
|
609
|
+
|
|
553
610
|
interface MailSenderProps {
|
|
554
611
|
/** Conteúdo HTML a ser enviado no corpo do e-mail */
|
|
555
612
|
htmlContent: string;
|
|
@@ -601,6 +658,7 @@ interface DeleteConfirmProps {
|
|
|
601
658
|
*/
|
|
602
659
|
declare const DeleteConfirm: React.FC<DeleteConfirmProps>;
|
|
603
660
|
|
|
661
|
+
type LabelPosition = "top" | "floating";
|
|
604
662
|
interface AutoCompleteProps {
|
|
605
663
|
className?: string;
|
|
606
664
|
/** Opções estáticas iniciais */
|
|
@@ -654,6 +712,12 @@ interface AutoCompleteProps {
|
|
|
654
712
|
showListOnFocus?: boolean;
|
|
655
713
|
/** Se deve carregar sob demanda ao digitar */
|
|
656
714
|
lazyLoad?: boolean;
|
|
715
|
+
/**
|
|
716
|
+
* Posicao da label:
|
|
717
|
+
* - 'top' (default): label acima do input (padrao UX /os/form)
|
|
718
|
+
* - 'floating': comportamento Bootstrap FloatingLabel legado
|
|
719
|
+
*/
|
|
720
|
+
labelPosition?: LabelPosition;
|
|
657
721
|
}
|
|
658
722
|
/**
|
|
659
723
|
* Componente de Input com Auto-complete dinâmico.
|
|
@@ -731,8 +795,15 @@ interface FormFieldProps {
|
|
|
731
795
|
onValueUpdate?: (val: string, event: React.ChangeEvent<any>) => void;
|
|
732
796
|
/** Callback no blur */
|
|
733
797
|
onBlur?: (val: string, event: React.FocusEvent<any>) => void;
|
|
734
|
-
/** Label exibida
|
|
798
|
+
/** Label exibida acima do input (top) ou dentro como FloatingLabel */
|
|
735
799
|
label?: string;
|
|
800
|
+
/**
|
|
801
|
+
* Posicao da label:
|
|
802
|
+
* - 'top' (default): label como elemento separado acima do control
|
|
803
|
+
* - 'floating' : comportamento Bootstrap FloatingLabel wrapping
|
|
804
|
+
* Default 'top' alinhado com auditoria browser /os/form (Wave 5A fix).
|
|
805
|
+
*/
|
|
806
|
+
labelPosition?: 'top' | 'floating';
|
|
736
807
|
/** Tipo do input (text, number, password, etc) */
|
|
737
808
|
ty?: string;
|
|
738
809
|
/** Callback para botão de ação à direita */
|
|
@@ -769,7 +840,13 @@ interface FormFieldProps {
|
|
|
769
840
|
controlId?: string;
|
|
770
841
|
}
|
|
771
842
|
/**
|
|
772
|
-
* Campo de formulário padronizado com suporte a
|
|
843
|
+
* Campo de formulário padronizado com suporte a label-top (default) ou
|
|
844
|
+
* FloatingLabel, mais botões de ação laterais.
|
|
845
|
+
*
|
|
846
|
+
* Wave 5A fix (sprint 2026-04-21-ui-kit-domain-split-wave0): default de
|
|
847
|
+
* `labelPosition` e 'top' para alinhar com padrao visual auditado no browser.
|
|
848
|
+
* Callers que dependem explicitamente de FloatingLabel devem passar
|
|
849
|
+
* `labelPosition="floating"`.
|
|
773
850
|
*/
|
|
774
851
|
declare const FormField: React.FC<FormFieldProps>;
|
|
775
852
|
|
|
@@ -807,9 +884,13 @@ declare const ClickToWriteField: React.FC<ClickToWriteFieldProps>;
|
|
|
807
884
|
|
|
808
885
|
interface ColorPickerProps {
|
|
809
886
|
/** Cor selecionada atualmente */
|
|
810
|
-
selectedColor
|
|
887
|
+
selectedColor?: string;
|
|
811
888
|
/** Callback para quando a cor muda */
|
|
812
|
-
onColorChange
|
|
889
|
+
onColorChange?: (color: string) => void;
|
|
890
|
+
/** Retrocompat legado */
|
|
891
|
+
defaultColor?: string;
|
|
892
|
+
/** Retrocompat legado */
|
|
893
|
+
setCor?: (color: string) => void;
|
|
813
894
|
/** Lista de cores sugeridas para a paleta rápida */
|
|
814
895
|
presetColors?: string[];
|
|
815
896
|
/** Título do componente (padrão: 'Cor de Identificação') */
|
|
@@ -852,21 +933,6 @@ interface UploadAreaProps {
|
|
|
852
933
|
*/
|
|
853
934
|
declare const UploadArea: React.FC<UploadAreaProps>;
|
|
854
935
|
|
|
855
|
-
interface FindRecursoByTagFieldProps {
|
|
856
|
-
/** Callback chamado quando um recurso é selecionado ou lido via QR. */
|
|
857
|
-
callback: (recurso: any, confirmed: boolean) => void;
|
|
858
|
-
/** Controller de recurso injetado (deve implementar read, get e findByTagDescription) */
|
|
859
|
-
recursoController?: {
|
|
860
|
-
read: (endpoint: string, data?: any) => Promise<any>;
|
|
861
|
-
get: (endpoint: string) => Promise<any>;
|
|
862
|
-
};
|
|
863
|
-
}
|
|
864
|
-
/**
|
|
865
|
-
* Componente para encontrar um recurso por sua tag (descrição ou ID).
|
|
866
|
-
* Suporta busca via AutoComplete e leitura via QR Code.
|
|
867
|
-
*/
|
|
868
|
-
declare const FindRecursoByTagField: React.FC<FindRecursoByTagFieldProps>;
|
|
869
|
-
|
|
870
936
|
interface Sector {
|
|
871
937
|
id: string | number;
|
|
872
938
|
nome: string;
|
|
@@ -1186,4 +1252,4 @@ interface TextWithMoreProps {
|
|
|
1186
1252
|
*/
|
|
1187
1253
|
declare const TextWithMore: React.FC<TextWithMoreProps>;
|
|
1188
1254
|
|
|
1189
|
-
export { ActionButtons, type ActionButtonsProps, AddButton, AdvancedFilterBar, type AdvancedFilterBarProps, ApproveAndReproveButtons, type ApproveAndReproveButtonsProps, AsyncButton, type AsyncButtonProps, AutoComplete, type AutoCompleteProps, BonusButton, type BonusButtonProps, ButtonWithDropdown, type ButtonWithDropdownOption, type ButtonWithDropdownProps, CheckBox, type CheckBoxOption, type CheckBoxProps, ClickToWriteField, type ClickToWriteFieldProps, ColorPicker, type ColorPickerProps, ConfigObject, DeleteButton, DeleteConfirm, type DeleteConfirmProps, ExpandableCard, type ExpandableCardItem, type ExpandableCardItemObject, type ExpandableCardProps,
|
|
1255
|
+
export { ActionButtons, type ActionButtonsProps, AddButton, AdvancedFilterBar, type AdvancedFilterBarProps, ApproveAndReproveButtons, type ApproveAndReproveButtonsProps, AsyncButton, type AsyncButtonProps, AutoComplete, type AutoCompleteProps, BonusButton, type BonusButtonProps, ButtonWithDropdown, type ButtonWithDropdownOption, type ButtonWithDropdownProps, CheckBox, type CheckBoxOption, type CheckBoxProps, ClickToWriteField, type ClickToWriteFieldProps, ColorPicker, type ColorPickerProps, ConfigObject, DeleteButton, DeleteConfirm, type DeleteConfirmProps, ExpandableCard, type ExpandableCardItem, type ExpandableCardItemObject, type ExpandableCardProps, FormField, type FormFieldProps, Generic3DotMenu, type Generic3DotMenuProps, GenericChart, type GenericChartProps, GenericDisplay, GenericForm, GenericREchart, type GenericREchartProps, GenericSelect, GenericSelectOps, IconLabelItem, type IconLabelItemProps, IconLabelList, type IconLabelListItem, type IconLabelListProps, type ImageData, ImageViewModal, type ImageViewModalProps, type Justificativa, JustificativaModal, type JustificativaModalProps, LoadingButton, type LoadingButtonProps, LoadingProgress, type LoadingProgressProps, MailSender, type MailSenderProps, MenuEvent, ModalBasicTemplate, type ModalBasicTemplateProps, NavigateButton, type NavigateButtonProps, type Notification, NotificationBell, type NotificationBellProps, NotificationItem, type NotificationItemProps, type PeriodPreset, type PeriodRange, PeriodSelector, type PeriodSelectorProps, QrCodeScanButton, type QrCodeScanButtonProps, QrReader, type QrReaderProps, type QuickPresetKey, RateLimitBar, type RateLimitBarProps, type RateLimitEntry, ResponsiveContainer, type ReusableTableColumnConfig, ReusableTableWithModal, type ReusableTableWithModalProps, type Sector, SectorSelector, type SectorSelectorProps, SelectDateModal, type SelectDateModalProps, StatusBadge, type StatusBadgeProps, StatusIndicator, type StatusIndicatorProps, StatusLight, type StatusLightProps, type StatusMeta, StatusPills, type StatusPillsProps, Switch, SwitchOnClick, type SwitchOnClickProps, type SwitchProps, TextWithMore, type TextWithMoreProps, TimerDisplay, type TimerDisplayProps, UnidadeMaterialForm, type UnidadeMaterialFormProps, type UnidadeMaterialValue, UnifiedPeriodSelector, type UnifiedPeriodSelectorProps, UploadArea, type UploadAreaProps, UuidPill, VerticalItemsDisplay, type VerticalItemsDisplayProps };
|