@granto-umbrella/umbrella-components 3.0.31 → 3.0.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/dist/umbrella-components.es.js +11411 -11409
  2. package/dist/umbrella-components.umd.js +340 -340
  3. package/package.json +4 -5
  4. package/src/components/atoms/DatePickerInput/DatePicker.styles.ts +75 -75
  5. package/src/components/atoms/DatePickerInput/DatePickerInput.tsx +154 -154
  6. package/src/components/atoms/DropDownMenu/DropdownMenu.styles.tsx +106 -106
  7. package/src/components/atoms/ErrorMessage/ErrorMessage.styles.tsx +1 -1
  8. package/src/components/atoms/Footer/Footer.styles.tsx +1 -1
  9. package/src/components/atoms/GenericContainer/GenericContainer.styles.tsx +1 -1
  10. package/src/components/atoms/Input/Input.tsx +80 -80
  11. package/src/components/atoms/Input/Input.types.ts +21 -21
  12. package/src/components/atoms/Label/Label.styles.ts +16 -16
  13. package/src/components/atoms/Loading/Loading.styles.tsx +1 -1
  14. package/src/components/atoms/Loading/index.tsx +1 -1
  15. package/src/components/atoms/LogoContainer/LogoContainer.styles.tsx +1 -1
  16. package/src/components/atoms/ModalAviso/ModalAviso.styles.tsx +1 -1
  17. package/src/components/atoms/MultiSelect/index.tsx +1 -1
  18. package/src/components/atoms/RadioButton/RadioButton.types.ts +9 -9
  19. package/src/components/atoms/ResendLink/index.tsx +2 -1
  20. package/src/components/atoms/Select/Select.types.ts +19 -19
  21. package/src/components/atoms/Skeleton/Skeleton.styles.ts +32 -32
  22. package/src/components/atoms/Skeleton/Skeleton.tsx +43 -43
  23. package/src/components/atoms/Skeleton/Skeleton.types.ts +13 -13
  24. package/src/components/atoms/Subtitle/Subtitle.styles.tsx +21 -21
  25. package/src/components/atoms/Switch/Switch.styles.ts +59 -59
  26. package/src/components/atoms/Switch/Switch.types.ts +7 -7
  27. package/src/components/atoms/TabBar/TabBar.tsx +24 -24
  28. package/src/components/atoms/TabBar/TabBar.types.ts +11 -11
  29. package/src/components/atoms/TabBar/index.tsx +2 -2
  30. package/src/components/atoms/Text/Text.styles.tsx +18 -6
  31. package/src/components/atoms/Text/Text.tsx +9 -4
  32. package/src/components/atoms/Text/Text.types.ts +2 -1
  33. package/src/components/atoms/Textarea/Textarea.types.ts +7 -7
  34. package/src/components/atoms/Title/Title.styles.tsx +17 -17
  35. package/src/components/molecules/BannerAjuda/BannerAjuda.types.ts +5 -5
  36. package/src/components/molecules/ButtonGroup/ButtonGroup.tsx +27 -27
  37. package/src/components/molecules/CodeInputContainer/CodeInputContainer.tsx +32 -32
  38. package/src/components/molecules/HighlightsCard/HighlightsCard.tsx +1 -1
  39. package/src/components/molecules/InsuranceCard/InsuranceCard.styles.tsx +1 -1
  40. package/src/components/molecules/InsuranceCard/InsuranceCard.tsx +455 -455
  41. package/src/components/molecules/InsuranceCard/InsuranceCard.types.ts +41 -41
  42. package/src/components/molecules/ResultsChart/ResultsChart.styles.tsx +26 -26
  43. package/src/components/molecules/TimeLine/TimeLine.mapper.ts +69 -69
  44. package/src/components/molecules/TimeLine/TimeLine.styles.ts +154 -154
  45. package/src/components/molecules/TimeLine/TimeLine.tsx +96 -96
  46. package/src/components/molecules/TimeLine/TimeLine.types.ts +124 -124
  47. package/src/components/organisms/AlertDialog/AlertDialog.types.ts +14 -14
  48. package/src/components/organisms/Navbar/Navbar.styles.tsx +1 -1
  49. package/src/components/organisms/Navbar/Navbar.tsx +118 -118
  50. package/src/components/organisms/Navbar/Navbar.types.ts +34 -34
  51. package/src/components/organisms/TimelineModal/TimelineModal.styles.ts +49 -49
  52. package/src/components/organisms/TimelineModal/TimelineModal.tsx +49 -49
  53. package/src/index.ts +157 -157
  54. package/src/styles/tokens/colors.ts +296 -296
  55. package/src/styles/tokens/typography.ts +161 -161
  56. package/src/types/colors.types.ts +21 -21
  57. package/src/types/sizes.types.ts +4 -4
@@ -1,96 +1,96 @@
1
- // src/components/molecules/TimeLine/TimeLine.tsx
2
- import React from 'react';
3
- import {
4
- ItemWrap,
5
- Card,
6
- Sub,
7
- Row,
8
- Dot,
9
- List,
10
- Title,
11
- Empty,
12
- RetryButton,
13
- } from './TimeLine.styles';
14
- import { TimelineProps } from './TimeLine.types';
15
- import { Skeleton } from '../../atoms/Skeleton/Skeleton';
16
-
17
- export const Timeline: React.FC<TimelineProps> = ({
18
- items,
19
- loading = false,
20
- onRetry,
21
- emptyLabel = 'Nenhum evento encontrado.',
22
- skeletonItems = 3,
23
- }) => {
24
- if (loading) {
25
- return (
26
- <List aria-label="Linha do tempo (carregando)">
27
- {Array.from({ length: skeletonItems }).map((_, i) => (
28
- <ItemWrap key={`sk-${i}`}>
29
- <Skeleton
30
- variant="circle"
31
- width={24}
32
- height={24}
33
- ariaLabel="Carregando ponto da linha do tempo"
34
- />
35
- <Card>
36
- <Title>
37
- <Skeleton variant="text" width="60%" height={32} />
38
- </Title>
39
-
40
- <Sub>
41
- <Skeleton variant="text" width="40%" height={18} />
42
- </Sub>
43
- </Card>
44
- </ItemWrap>
45
- ))}
46
- </List>
47
- );
48
- }
49
-
50
- if (!items || items.length === 0) {
51
- return (
52
- <Empty role="status" aria-live="polite">
53
- <div>{emptyLabel}</div>
54
- {onRetry && (
55
- <RetryButton type="button" onClick={onRetry}>
56
- Tentar novamente
57
- </RetryButton>
58
- )}
59
- </Empty>
60
- );
61
- }
62
-
63
- return (
64
- <List aria-label="Linha do tempo">
65
- {items.map((it) => {
66
- const d = new Date(it.timestamp);
67
- const dateStr = d.toLocaleDateString('pt-BR');
68
- const timeStr = d.toLocaleTimeString('pt-BR', {
69
- hour: '2-digit',
70
- minute: '2-digit',
71
- });
72
-
73
- //const actorName = it.actor?.displayName || 'Sistema';
74
-
75
- return (
76
- <ItemWrap key={it.id}>
77
- {it?.type && <Dot aria-hidden $variant={it.type || 'continued'} />}
78
- <Card>
79
- <Row style={{ justifyContent: 'space-between' }}>
80
- <Title>{it.title}</Title>
81
- </Row>
82
-
83
- <Sub>
84
- <div>
85
- {/*Por: {actorName}{' '}
86
- {dateStr ? `dia ${dateStr} às ${timeStr}` : ''}*/}
87
- Em: {dateStr ? `${dateStr} às ${timeStr}` : ''}
88
- </div>
89
- </Sub>
90
- </Card>
91
- </ItemWrap>
92
- );
93
- })}
94
- </List>
95
- );
96
- };
1
+ // src/components/molecules/TimeLine/TimeLine.tsx
2
+ import React from 'react';
3
+ import {
4
+ ItemWrap,
5
+ Card,
6
+ Sub,
7
+ Row,
8
+ Dot,
9
+ List,
10
+ Title,
11
+ Empty,
12
+ RetryButton,
13
+ } from './TimeLine.styles';
14
+ import { TimelineProps } from './TimeLine.types';
15
+ import { Skeleton } from '../../atoms/Skeleton/Skeleton';
16
+
17
+ export const Timeline: React.FC<TimelineProps> = ({
18
+ items,
19
+ loading = false,
20
+ onRetry,
21
+ emptyLabel = 'Nenhum evento encontrado.',
22
+ skeletonItems = 3,
23
+ }) => {
24
+ if (loading) {
25
+ return (
26
+ <List aria-label="Linha do tempo (carregando)">
27
+ {Array.from({ length: skeletonItems }).map((_, i) => (
28
+ <ItemWrap key={`sk-${i}`}>
29
+ <Skeleton
30
+ variant="circle"
31
+ width={24}
32
+ height={24}
33
+ ariaLabel="Carregando ponto da linha do tempo"
34
+ />
35
+ <Card>
36
+ <Title>
37
+ <Skeleton variant="text" width="60%" height={32} />
38
+ </Title>
39
+
40
+ <Sub>
41
+ <Skeleton variant="text" width="40%" height={18} />
42
+ </Sub>
43
+ </Card>
44
+ </ItemWrap>
45
+ ))}
46
+ </List>
47
+ );
48
+ }
49
+
50
+ if (!items || items.length === 0) {
51
+ return (
52
+ <Empty role="status" aria-live="polite">
53
+ <div>{emptyLabel}</div>
54
+ {onRetry && (
55
+ <RetryButton type="button" onClick={onRetry}>
56
+ Tentar novamente
57
+ </RetryButton>
58
+ )}
59
+ </Empty>
60
+ );
61
+ }
62
+
63
+ return (
64
+ <List aria-label="Linha do tempo">
65
+ {items.map((it) => {
66
+ const d = new Date(it.timestamp);
67
+ const dateStr = d.toLocaleDateString('pt-BR');
68
+ const timeStr = d.toLocaleTimeString('pt-BR', {
69
+ hour: '2-digit',
70
+ minute: '2-digit',
71
+ });
72
+
73
+ //const actorName = it.actor?.displayName || 'Sistema';
74
+
75
+ return (
76
+ <ItemWrap key={it.id}>
77
+ {it?.type && <Dot aria-hidden $variant={it.type || 'continued'} />}
78
+ <Card>
79
+ <Row style={{ justifyContent: 'space-between' }}>
80
+ <Title>{it.title}</Title>
81
+ </Row>
82
+
83
+ <Sub>
84
+ <div>
85
+ {/*Por: {actorName}{' '}
86
+ {dateStr ? `dia ${dateStr} às ${timeStr}` : ''}*/}
87
+ Em: {dateStr ? `${dateStr} às ${timeStr}` : ''}
88
+ </div>
89
+ </Sub>
90
+ </Card>
91
+ </ItemWrap>
92
+ );
93
+ })}
94
+ </List>
95
+ );
96
+ };
@@ -1,124 +1,124 @@
1
- /* eslint-disable @typescript-eslint/no-explicit-any */
2
- export type TimelineVariant =
3
- | 'accepted'
4
- | 'continued'
5
- | 'rejected'
6
- | 'download'
7
- | 'issue'
8
- | 'order';
9
-
10
- export enum EventType {
11
- PartnerSubscribe = 'subscription:partner_subscribe',
12
- PartnerQuote = 'subscription:partner_quote',
13
- ProposalRefused = 'order:proposal_refused',
14
- PartnerIssue = 'issue:partner_issue',
15
- PartnerOrder = 'order:partner_order',
16
- }
17
-
18
- export interface TimelineItem {
19
- id: string;
20
- timestamp: string;
21
- type: string;
22
- title: string;
23
- description?: string;
24
- actor?: TimelineActor;
25
- origin?: string;
26
- correlationId?: string;
27
- metadata?: TimelineMetadata;
28
- }
29
-
30
- export type TimelineProps = {
31
- items: TimelineItem[];
32
- loading?: boolean;
33
- onRetry?: () => void;
34
- emptyLabel?: string;
35
- skeletonItems?: number;
36
- };
37
-
38
- export interface TimelineActor {
39
- id: string;
40
- displayName: string;
41
- type: string;
42
- }
43
-
44
- export interface TimelineMetadata {
45
- from?: string;
46
- to?: string;
47
- [key: string]: any;
48
- }
49
-
50
- export type RemoteEventType =
51
- | 'subscription:partner_quote'
52
- | 'subscription:partner_subscribe'
53
- | 'order:proposal_refused'
54
- | 'issue:partner_issue'
55
- | 'order:partner_order'
56
- | string;
57
-
58
- export interface RemoteEventActor {
59
- id: number | string;
60
- name: string;
61
- type: 'app' | 'user' | string;
62
- }
63
-
64
- export interface RemoteEventData {
65
- orderId?: string | null;
66
- title?: string | number | null;
67
- insuranceId?: string | null;
68
- subscription?: {
69
- branch?: number;
70
- sumInsuredRatio?: number;
71
- sumContract?: number;
72
- hasExclusivity?: boolean;
73
- hasContinuity?: boolean;
74
- retroactive?: number;
75
- coverages?: Array<unknown>;
76
- insured?: {
77
- name?: string;
78
- type?: string;
79
- document?: string;
80
- address?: {
81
- cep?: string;
82
- street?: string;
83
- number?: number | string;
84
- locale?: string;
85
- city?: string;
86
- uf?: string;
87
- complement?: string | null;
88
- };
89
- };
90
- contract?: {
91
- edital?: string | null;
92
- number?: string | null;
93
- title?: string | null;
94
- addition?: string | null;
95
- object?: string | null;
96
- process?: string | null;
97
- signedOn?: string | null;
98
- };
99
- event?: unknown;
100
- startAt?: string | null;
101
- endAt?: string | null;
102
- period?: number | null;
103
- sumInsured?: number | null;
104
- endosso?: unknown;
105
- underwriter?: unknown;
106
- details?: unknown;
107
- } | null;
108
- offers?: Array<{ insurerId: number; insurerName: string }> | null;
109
- upn?: number;
110
- isApp?: boolean;
111
- }
112
-
113
- export interface RemoteEvent {
114
- eventType: RemoteEventType;
115
- isPublic: boolean;
116
- startAt: string; // ISO
117
- endAt?: string; // ISO
118
- duration?: number; // ms
119
- correlationId: string;
120
- parentCorrelationId?: string;
121
- parentEventType?: string;
122
- actor: RemoteEventActor;
123
- data: RemoteEventData;
124
- }
1
+ /* eslint-disable @typescript-eslint/no-explicit-any */
2
+ export type TimelineVariant =
3
+ | 'accepted'
4
+ | 'continued'
5
+ | 'rejected'
6
+ | 'download'
7
+ | 'issue'
8
+ | 'order';
9
+
10
+ export enum EventType {
11
+ PartnerSubscribe = 'subscription:partner_subscribe',
12
+ PartnerQuote = 'subscription:partner_quote',
13
+ ProposalRefused = 'order:proposal_refused',
14
+ PartnerIssue = 'issue:partner_issue',
15
+ PartnerOrder = 'order:partner_order',
16
+ }
17
+
18
+ export interface TimelineItem {
19
+ id: string;
20
+ timestamp: string;
21
+ type: string;
22
+ title: string;
23
+ description?: string;
24
+ actor?: TimelineActor;
25
+ origin?: string;
26
+ correlationId?: string;
27
+ metadata?: TimelineMetadata;
28
+ }
29
+
30
+ export type TimelineProps = {
31
+ items: TimelineItem[];
32
+ loading?: boolean;
33
+ onRetry?: () => void;
34
+ emptyLabel?: string;
35
+ skeletonItems?: number;
36
+ };
37
+
38
+ export interface TimelineActor {
39
+ id: string;
40
+ displayName: string;
41
+ type: string;
42
+ }
43
+
44
+ export interface TimelineMetadata {
45
+ from?: string;
46
+ to?: string;
47
+ [key: string]: any;
48
+ }
49
+
50
+ export type RemoteEventType =
51
+ | 'subscription:partner_quote'
52
+ | 'subscription:partner_subscribe'
53
+ | 'order:proposal_refused'
54
+ | 'issue:partner_issue'
55
+ | 'order:partner_order'
56
+ | string;
57
+
58
+ export interface RemoteEventActor {
59
+ id: number | string;
60
+ name: string;
61
+ type: 'app' | 'user' | string;
62
+ }
63
+
64
+ export interface RemoteEventData {
65
+ orderId?: string | null;
66
+ title?: string | number | null;
67
+ insuranceId?: string | null;
68
+ subscription?: {
69
+ branch?: number;
70
+ sumInsuredRatio?: number;
71
+ sumContract?: number;
72
+ hasExclusivity?: boolean;
73
+ hasContinuity?: boolean;
74
+ retroactive?: number;
75
+ coverages?: Array<unknown>;
76
+ insured?: {
77
+ name?: string;
78
+ type?: string;
79
+ document?: string;
80
+ address?: {
81
+ cep?: string;
82
+ street?: string;
83
+ number?: number | string;
84
+ locale?: string;
85
+ city?: string;
86
+ uf?: string;
87
+ complement?: string | null;
88
+ };
89
+ };
90
+ contract?: {
91
+ edital?: string | null;
92
+ number?: string | null;
93
+ title?: string | null;
94
+ addition?: string | null;
95
+ object?: string | null;
96
+ process?: string | null;
97
+ signedOn?: string | null;
98
+ };
99
+ event?: unknown;
100
+ startAt?: string | null;
101
+ endAt?: string | null;
102
+ period?: number | null;
103
+ sumInsured?: number | null;
104
+ endosso?: unknown;
105
+ underwriter?: unknown;
106
+ details?: unknown;
107
+ } | null;
108
+ offers?: Array<{ insurerId: number; insurerName: string }> | null;
109
+ upn?: number;
110
+ isApp?: boolean;
111
+ }
112
+
113
+ export interface RemoteEvent {
114
+ eventType: RemoteEventType;
115
+ isPublic: boolean;
116
+ startAt: string; // ISO
117
+ endAt?: string; // ISO
118
+ duration?: number; // ms
119
+ correlationId: string;
120
+ parentCorrelationId?: string;
121
+ parentEventType?: string;
122
+ actor: RemoteEventActor;
123
+ data: RemoteEventData;
124
+ }
@@ -1,14 +1,14 @@
1
- export interface AlertDialogProps {
2
- isOpen: boolean;
3
- buttons: {
4
- cancel?: string;
5
- confirm?: string;
6
- onClose?: () => void;
7
- onConfirm?: () => void;
8
- };
9
- text: {
10
- title: string;
11
- description: string;
12
- };
13
- testId?: string;
14
- }
1
+ export interface AlertDialogProps {
2
+ isOpen: boolean;
3
+ buttons: {
4
+ cancel?: string;
5
+ confirm?: string;
6
+ onClose?: () => void;
7
+ onConfirm?: () => void;
8
+ };
9
+ text: {
10
+ title: string;
11
+ description: string;
12
+ };
13
+ testId?: string;
14
+ }
@@ -5,7 +5,7 @@ import {
5
5
  semanticBorders,
6
6
  semanticColors,
7
7
  semanticShadows,
8
- } from '@granto-umbrella/umbrella-components';
8
+ } from "@/styles/tokens";
9
9
  import styled from 'styled-components';
10
10
  import { Search } from 'lucide-react';
11
11
  //