@granto-umbrella/umbrella-components 3.0.34 → 3.0.36

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 (156) hide show
  1. package/README.md +165 -27
  2. package/dist/umbrella-components.css +1 -1
  3. package/dist/umbrella-components.es.js +28129 -29249
  4. package/dist/umbrella-components.umd.js +1234 -2181
  5. package/package.json +135 -106
  6. package/src/assets.d.ts +19 -19
  7. package/src/components/atoms/Badge/Badge.styles.ts +88 -86
  8. package/src/components/atoms/Badge/Badge.tsx +42 -44
  9. package/src/components/atoms/Badge/Badge.types.ts +15 -15
  10. package/src/components/atoms/Breadcrumb/Breadcrumb.styles.ts +43 -43
  11. package/src/components/atoms/Breadcrumb/Breadcrumb.tsx +46 -48
  12. package/src/components/atoms/Breadcrumb/Breadcrumb.types.ts +12 -12
  13. package/src/components/atoms/Button/Button.styles.ts +279 -280
  14. package/src/components/atoms/Button/Button.tsx +76 -76
  15. package/src/components/atoms/Button/Button.types.ts +28 -28
  16. package/src/components/atoms/Button/index.ts +1 -1
  17. package/src/components/atoms/Checkbox/Checkbox.styles.ts +72 -72
  18. package/src/components/atoms/Checkbox/Checkbox.tsx +36 -36
  19. package/src/components/atoms/Checkbox/Checkbox.types.ts +14 -14
  20. package/src/components/atoms/Checkbox/CheckboxGroup.tsx +30 -30
  21. package/src/components/atoms/Checkbox/CheckboxSelectAll.tsx +32 -32
  22. package/src/components/atoms/CodeInput/CodeInput.styles.tsx +38 -39
  23. package/src/components/atoms/CodeInput/CodeInput.tsx +13 -19
  24. package/src/components/atoms/CodeInput/CodeInput.types.ts +3 -3
  25. package/src/components/atoms/CodeInput/index.tsx +1 -1
  26. package/src/components/atoms/DropDownMenu/DropdownMenu.tsx +48 -48
  27. package/src/components/atoms/DropDownMenu/DropdownMenu.types.ts +15 -15
  28. package/src/components/atoms/DropDownMenu/index.tsx +5 -2
  29. package/src/components/atoms/ErrorMessage/ErrorMessage.styles.tsx +28 -28
  30. package/src/components/atoms/ErrorMessage/ErrorMessage.tsx +12 -12
  31. package/src/components/atoms/ErrorMessage/ErrorMessage.types.ts +6 -6
  32. package/src/components/atoms/ErrorMessage/index.tsx +1 -1
  33. package/src/components/atoms/Footer/Footer.styles.tsx +22 -22
  34. package/src/components/atoms/Footer/Footer.tsx +9 -9
  35. package/src/components/atoms/Footer/Footer.types.tsx +5 -5
  36. package/src/components/atoms/Footer/index.tsx +1 -1
  37. package/src/components/atoms/GenericContainer/GenericContainer.styles.tsx +21 -21
  38. package/src/components/atoms/GenericContainer/GenericContainer.tsx +9 -9
  39. package/src/components/atoms/GenericContainer/GenericContainer.types.ts +5 -5
  40. package/src/components/atoms/GenericContainer/index.tsx +1 -1
  41. package/src/components/atoms/Icon/Icon.styles.ts +11 -11
  42. package/src/components/atoms/Icon/Icon.tsx +22 -22
  43. package/src/components/atoms/Icon/Icon.types.ts +6 -6
  44. package/src/components/atoms/Icon/index.ts +1 -1
  45. package/src/components/atoms/Input/Input.styles.ts +106 -101
  46. package/src/components/atoms/Input/index.ts +1 -1
  47. package/src/components/atoms/Label/Label.tsx +16 -16
  48. package/src/components/atoms/Loading/Loading.styles.tsx +25 -25
  49. package/src/components/atoms/Loading/Loading.tsx +8 -8
  50. package/src/components/atoms/LogoContainer/LogoContainer.Types.tsx +5 -5
  51. package/src/components/atoms/LogoContainer/LogoContainer.styles.tsx +11 -11
  52. package/src/components/atoms/LogoContainer/LogoContainer.tsx +11 -11
  53. package/src/components/atoms/LogoContainer/index.tsx +1 -1
  54. package/src/components/atoms/ModalAviso/ModalAviso.styles.tsx +56 -56
  55. package/src/components/atoms/ModalAviso/ModalAviso.tsx +43 -37
  56. package/src/components/atoms/ModalAviso/ModalAviso.types.ts +5 -5
  57. package/src/components/atoms/ModalAviso/index.tsx +1 -1
  58. package/src/components/atoms/MultiSelect/MultiSelect.styles.tsx +100 -92
  59. package/src/components/atoms/MultiSelect/MultiSelect.tsx +346 -346
  60. package/src/components/atoms/MultiSelect/MultiSelect.types.ts +38 -38
  61. package/src/components/atoms/Pill/Pill.styles.ts +46 -46
  62. package/src/components/atoms/Pill/Pill.tsx +35 -36
  63. package/src/components/atoms/Pill/Pill.types.ts +14 -18
  64. package/src/components/atoms/RadioButton/RadioButton.styles.ts +44 -43
  65. package/src/components/atoms/RadioButton/RadioButton.tsx +31 -31
  66. package/src/components/atoms/ResendLink/ResendLink.styles.tsx +19 -20
  67. package/src/components/atoms/ResendLink/ResendLink.tsx +21 -21
  68. package/src/components/atoms/ResendLink/ResendLink.types.ts +8 -9
  69. package/src/components/atoms/ResendLink/index.tsx +1 -2
  70. package/src/components/atoms/Select/Select.styles.ts +153 -149
  71. package/src/components/atoms/Select/Select.tsx +52 -43
  72. package/src/components/atoms/Select/index.tsx +1 -1
  73. package/src/components/atoms/Subtitle/Subtitle.tsx +7 -7
  74. package/src/components/atoms/Subtitle/Subtitle.types.ts +5 -5
  75. package/src/components/atoms/Subtitle/index.tsx +1 -1
  76. package/src/components/atoms/Switch/Switch.tsx +25 -25
  77. package/src/components/atoms/TabBar/TabBar.styles.tsx +64 -57
  78. package/src/components/atoms/TabBar/index.tsx +2 -2
  79. package/src/components/atoms/Text/Text.styles.tsx +35 -35
  80. package/src/components/atoms/Text/Text.tsx +32 -31
  81. package/src/components/atoms/Text/Text.types.ts +8 -8
  82. package/src/components/atoms/Text/index.ts +1 -1
  83. package/src/components/atoms/Textarea/Textarea.styles.ts +52 -52
  84. package/src/components/atoms/Textarea/Textarea.tsx +31 -31
  85. package/src/components/atoms/Title/Title.tsx +7 -7
  86. package/src/components/atoms/Title/Title.types.ts +5 -5
  87. package/src/components/atoms/Title/index.tsx +1 -1
  88. package/src/components/molecules/BannerAjuda/BannerAjuda.styles.tsx +9 -9
  89. package/src/components/molecules/BannerAjuda/BannerAjuda.tsx +18 -19
  90. package/src/components/molecules/BannerAjuda/index.tsx +1 -1
  91. package/src/components/molecules/ButtonGroup/ButtonGroup.styles.ts +10 -10
  92. package/src/components/molecules/ButtonGroup/ButtonGroup.types.ts +22 -22
  93. package/src/components/molecules/Calendar/Calendar.styles.ts +143 -143
  94. package/src/components/molecules/Calendar/Calendar.tsx +31 -31
  95. package/src/components/molecules/CodeInputContainer/CodeInputContainer.styles.tsx +7 -7
  96. package/src/components/molecules/CodeInputContainer/CodeInputContainer.types.ts +13 -13
  97. package/src/components/molecules/CodeInputContainer/index.tsx +1 -3
  98. package/src/components/molecules/ExcludeModal/ExcludeModal.styles.tsx +123 -118
  99. package/src/components/molecules/ExcludeModal/ExcludeModal.tsx +48 -48
  100. package/src/components/molecules/ExcludeModal/ExcludeModal.types.ts +10 -10
  101. package/src/components/molecules/ExcludeModal/index.tsx +1 -1
  102. package/src/components/molecules/FieldSelector/FieldSelector.styles.ts +59 -0
  103. package/src/components/molecules/FieldSelector/FieldSelector.tsx +167 -0
  104. package/src/components/molecules/HighlightsCard/HighlightsCard.styles.tsx +67 -68
  105. package/src/components/molecules/HighlightsCard/HighlightsCard.tsx +35 -26
  106. package/src/components/molecules/HighlightsCard/HighlightsCard.types.ts +10 -10
  107. package/src/components/molecules/HighlightsCard/index.tsx +1 -1
  108. package/src/components/molecules/InsuranceCard/InsuranceCard.styles.tsx +237 -237
  109. package/src/components/molecules/InsuranceCard/index.tsx +1 -1
  110. package/src/components/molecules/PieChartComponent/PieChartComponent.styles.tsx +7 -8
  111. package/src/components/molecules/PieChartComponent/PieChartComponent.tsx +70 -73
  112. package/src/components/molecules/PieChartComponent/PieChartComponent.types.ts +11 -11
  113. package/src/components/molecules/PieChartComponent/index.tsx +1 -1
  114. package/src/components/molecules/Popover/Popover.styles.ts +66 -65
  115. package/src/components/molecules/Popover/Popover.tsx +23 -23
  116. package/src/components/molecules/RadioBoxGroup/RadioBoxGroup.styles.ts +11 -11
  117. package/src/components/molecules/RadioBoxGroup/RadioBoxGroup.tsx +43 -43
  118. package/src/components/molecules/RadioGroupField/RadioGroupField.styles.tsx +65 -64
  119. package/src/components/molecules/RadioGroupField/RadioGroupField.tsx +69 -69
  120. package/src/components/molecules/RadioGroupField/RadioGroupField.types.ts +17 -17
  121. package/src/components/molecules/RadioGroupField/index.tsx +1 -1
  122. package/src/components/molecules/RefuseModal/RefuseModal.styles.tsx +139 -139
  123. package/src/components/molecules/RefuseModal/RefuseModal.tsx +92 -76
  124. package/src/components/molecules/RefuseModal/RefuseModal.types.ts +15 -15
  125. package/src/components/molecules/RefuseModal/index.tsx +2 -2
  126. package/src/components/molecules/ResultsChart/ResultsChart.tsx +23 -19
  127. package/src/components/molecules/ResultsChart/ResultsChart.types.ts +3 -3
  128. package/src/components/molecules/ResultsChart/index.tsx +2 -2
  129. package/src/components/molecules/TabToggle/TabToggle.styles.ts +54 -54
  130. package/src/components/molecules/TabToggle/TabToggle.tsx +35 -35
  131. package/src/components/organisms/AlertDialog/AlertDialog.styles.tsx +61 -61
  132. package/src/components/organisms/AlertDialog/AlertDialog.tsx +70 -70
  133. package/src/components/organisms/Dialog/Dialog.styles.ts +107 -106
  134. package/src/components/organisms/Dialog/Dialog.tsx +69 -69
  135. package/src/components/organisms/DonutEmissionsChart/DonutEmissionsChart.styles.tsx +113 -113
  136. package/src/components/organisms/DonutEmissionsChart/DonutEmissionsChart.tsx +75 -71
  137. package/src/components/organisms/DonutEmissionsChart/DonutEmissionsChart.types.ts +9 -9
  138. package/src/components/organisms/DonutEmissionsChart/index.tsx +5 -2
  139. package/src/components/organisms/Form/Form.styles.ts +35 -35
  140. package/src/components/organisms/Form/Form.tsx +160 -160
  141. package/src/components/organisms/ListagemUltimasEmissoes/ListagemUltimasEmissoes.styles.tsx +115 -114
  142. package/src/components/organisms/ListagemUltimasEmissoes/ListagemUltimasEmissoes.tsx +89 -89
  143. package/src/components/organisms/ListagemUltimasEmissoes/ListagemUltimasEmissoes.types.ts +16 -16
  144. package/src/components/organisms/ListagemUltimasEmissoes/index.tsx +1 -1
  145. package/src/components/organisms/Navbar/Navbar.styles.tsx +243 -243
  146. package/src/global.d.ts +9 -9
  147. package/src/index.ts +2 -0
  148. package/src/lib/utils.ts +6 -6
  149. package/src/styles/tokens/borders.ts +17 -17
  150. package/src/styles/tokens/index.tsx +6 -6
  151. package/src/styles/tokens/radius.ts +22 -22
  152. package/src/styles/tokens/shadows.ts +22 -22
  153. package/src/styles/tokens/sizes.ts +60 -64
  154. package/src/types/radius.types.ts +1 -1
  155. package/src/types/shadows.types.ts +1 -1
  156. package/src/utils/renderHighlightsCard.tsx +21 -0
@@ -1,143 +1,143 @@
1
- import styled from "styled-components";
2
- import { DayPicker as RDPDayPicker } from "react-day-picker";
3
-
4
- export const StyledDayPicker = styled(RDPDayPicker)`
5
- padding: 0.75rem; /* p-3 */
6
-
7
- /* Estilo para o container dos meses */
8
- .rdp-months {
9
- display: flex;
10
- flex-direction: column;
11
- gap: 1rem; /* equivalente a space-y-4 */
12
- }
13
-
14
- @media (min-width: 640px) {
15
- .rdp-months {
16
- flex-direction: row;
17
- gap: 0 1rem; /* sm:flex-row com space-x-4 e sm:space-y-0 */
18
- }
19
- }
20
-
21
- /* Cada mês */
22
- .rdp-month {
23
- margin-bottom: 1rem;
24
- }
25
-
26
- /* Legenda (caption) do mês */
27
- .rdp-caption {
28
- display: flex;
29
- justify-content: center;
30
- padding-top: 0.25rem; /* pt-1 */
31
- position: relative;
32
- align-items: center;
33
- }
34
-
35
- .rdp-caption_label {
36
- font-size: 0.875rem; /* text-sm */
37
- font-weight: 500; /* font-medium */
38
- }
39
-
40
- /* Navegação */
41
- .rdp-nav {
42
- display: flex;
43
- align-items: center;
44
- gap: 0.25rem; /* space-x-1 */
45
- position: relative;
46
- }
47
-
48
- .rdp-nav_button {
49
- height: 1.75rem; /* h-7 */
50
- width: 1.75rem; /* w-7 */
51
- background: transparent;
52
- padding: 0;
53
- opacity: 0.5;
54
- /* Pode-se definir aqui estilos de border se desejar imitar o buttonVariants({ variant: "outline" }) */
55
- border: 1px solid #d1d5db;
56
- cursor: pointer;
57
- transition: opacity 0.2s ease;
58
-
59
- &:hover {
60
- opacity: 1;
61
- }
62
- }
63
-
64
- .rdp-nav_button_previous {
65
- position: absolute;
66
- left: 0.25rem; /* left-1 */
67
- }
68
-
69
- .rdp-nav_button_next {
70
- position: absolute;
71
- right: 0.25rem; /* right-1 */
72
- }
73
-
74
- /* Tabela de dias */
75
- .rdp-table {
76
- width: 100%; /* w-full */
77
- border-collapse: collapse;
78
- margin-top: 0.25rem; /* espaço vertical */
79
- }
80
-
81
- .rdp-head_row {
82
- display: flex;
83
- }
84
-
85
- .rdp-head_cell {
86
- font-size: 0.8rem; /* text-[0.8rem] */
87
- color: #6b7280; /* text-muted-foreground */
88
- border-radius: 0.375rem; /* rounded-md */
89
- width: 2.25rem; /* w-9 */
90
- font-weight: 400; /* font-normal */
91
- }
92
-
93
- .rdp-row {
94
- display: flex;
95
- width: 100%;
96
- margin-top: 0.5rem; /* mt-2 */
97
- }
98
-
99
- .rdp-cell {
100
- height: 2.25rem; /* h-9 */
101
- width: 2.25rem; /* w-9 */
102
- text-align: center;
103
- font-size: 0.875rem; /* text-sm */
104
- padding: 0;
105
- position: relative;
106
-
107
- &:focus-within {
108
- z-index: 20;
109
- }
110
- }
111
-
112
- /* Botão do dia */
113
- .rdp-day {
114
- height: 2.25rem; /* h-9 */
115
- width: 2.25rem; /* w-9 */
116
- padding: 0;
117
- font-size: 0.875rem;
118
- font-weight: 400;
119
- background: transparent;
120
- border: none;
121
- cursor: pointer;
122
- /* Estilos adicionais podem ser aplicados conforme necessário */
123
- }
124
-
125
- .rdp-day_selected {
126
- background: #3b82f6; /* bg-primary (substitua conforme seu tema) */
127
- color: #ffffff; /* text-primary-foreground */
128
- }
129
-
130
- .rdp-day_today {
131
- background: #f3f4f6; /* bg-accent */
132
- color: #111827; /* text-accent-foreground */
133
- }
134
-
135
- .rdp-day_outside {
136
- color: #6b7280; /* text-muted-foreground */
137
- }
138
-
139
- .rdp-day_disabled {
140
- color: #6b7280;
141
- opacity: 0.5;
142
- }
143
- `;
1
+ import styled from 'styled-components';
2
+ import { DayPicker as RDPDayPicker } from 'react-day-picker';
3
+
4
+ export const StyledDayPicker = styled(RDPDayPicker)`
5
+ padding: 0.75rem; /* p-3 */
6
+
7
+ /* Estilo para o container dos meses */
8
+ .rdp-months {
9
+ display: flex;
10
+ flex-direction: column;
11
+ gap: 1rem; /* equivalente a space-y-4 */
12
+ }
13
+
14
+ @media (min-width: 640px) {
15
+ .rdp-months {
16
+ flex-direction: row;
17
+ gap: 0 1rem; /* sm:flex-row com space-x-4 e sm:space-y-0 */
18
+ }
19
+ }
20
+
21
+ /* Cada mês */
22
+ .rdp-month {
23
+ margin-bottom: 1rem;
24
+ }
25
+
26
+ /* Legenda (caption) do mês */
27
+ .rdp-caption {
28
+ display: flex;
29
+ justify-content: center;
30
+ padding-top: 0.25rem; /* pt-1 */
31
+ position: relative;
32
+ align-items: center;
33
+ }
34
+
35
+ .rdp-caption_label {
36
+ font-size: 0.875rem; /* text-sm */
37
+ font-weight: 500; /* font-medium */
38
+ }
39
+
40
+ /* Navegação */
41
+ .rdp-nav {
42
+ display: flex;
43
+ align-items: center;
44
+ gap: 0.25rem; /* space-x-1 */
45
+ position: relative;
46
+ }
47
+
48
+ .rdp-nav_button {
49
+ height: 1.75rem; /* h-7 */
50
+ width: 1.75rem; /* w-7 */
51
+ background: transparent;
52
+ padding: 0;
53
+ opacity: 0.5;
54
+ /* Pode-se definir aqui estilos de border se desejar imitar o buttonVariants({ variant: "outline" }) */
55
+ border: 1px solid #d1d5db;
56
+ cursor: pointer;
57
+ transition: opacity 0.2s ease;
58
+
59
+ &:hover {
60
+ opacity: 1;
61
+ }
62
+ }
63
+
64
+ .rdp-nav_button_previous {
65
+ position: absolute;
66
+ left: 0.25rem; /* left-1 */
67
+ }
68
+
69
+ .rdp-nav_button_next {
70
+ position: absolute;
71
+ right: 0.25rem; /* right-1 */
72
+ }
73
+
74
+ /* Tabela de dias */
75
+ .rdp-table {
76
+ width: 100%; /* w-full */
77
+ border-collapse: collapse;
78
+ margin-top: 0.25rem; /* espaço vertical */
79
+ }
80
+
81
+ .rdp-head_row {
82
+ display: flex;
83
+ }
84
+
85
+ .rdp-head_cell {
86
+ font-size: 0.8rem; /* text-[0.8rem] */
87
+ color: #6b7280; /* text-muted-foreground */
88
+ border-radius: 0.375rem; /* rounded-md */
89
+ width: 2.25rem; /* w-9 */
90
+ font-weight: 400; /* font-normal */
91
+ }
92
+
93
+ .rdp-row {
94
+ display: flex;
95
+ width: 100%;
96
+ margin-top: 0.5rem; /* mt-2 */
97
+ }
98
+
99
+ .rdp-cell {
100
+ height: 2.25rem; /* h-9 */
101
+ width: 2.25rem; /* w-9 */
102
+ text-align: center;
103
+ font-size: 0.875rem; /* text-sm */
104
+ padding: 0;
105
+ position: relative;
106
+
107
+ &:focus-within {
108
+ z-index: 20;
109
+ }
110
+ }
111
+
112
+ /* Botão do dia */
113
+ .rdp-day {
114
+ height: 2.25rem; /* h-9 */
115
+ width: 2.25rem; /* w-9 */
116
+ padding: 0;
117
+ font-size: 0.875rem;
118
+ font-weight: 400;
119
+ background: transparent;
120
+ border: none;
121
+ cursor: pointer;
122
+ /* Estilos adicionais podem ser aplicados conforme necessário */
123
+ }
124
+
125
+ .rdp-day_selected {
126
+ background: #3b82f6; /* bg-primary (substitua conforme seu tema) */
127
+ color: #ffffff; /* text-primary-foreground */
128
+ }
129
+
130
+ .rdp-day_today {
131
+ background: #f3f4f6; /* bg-accent */
132
+ color: #111827; /* text-accent-foreground */
133
+ }
134
+
135
+ .rdp-day_outside {
136
+ color: #6b7280; /* text-muted-foreground */
137
+ }
138
+
139
+ .rdp-day_disabled {
140
+ color: #6b7280;
141
+ opacity: 0.5;
142
+ }
143
+ `;
@@ -1,31 +1,31 @@
1
- /* eslint-disable @typescript-eslint/no-explicit-any */
2
- import * as React from "react";
3
- import { ChevronLeft, ChevronRight } from "lucide-react";
4
- import { DayPicker as RDPDayPicker } from "react-day-picker";
5
- import { StyledDayPicker } from "./Calendar.styles";
6
-
7
- export type CalendarProps = React.ComponentProps<typeof RDPDayPicker>;
8
-
9
- function Calendar({ className, ...props }: CalendarProps) {
10
- return (
11
- <StyledDayPicker
12
- className={className}
13
- showOutsideDays={true}
14
- components={
15
- {
16
- IconPrevious: ({ className, ...props }: { className?: string }) => (
17
- <ChevronLeft className={className} {...props} />
18
- ),
19
- IconNext: ({ className, ...props }: { className?: string }) => (
20
- <ChevronRight className={className} {...props} />
21
- ),
22
- } as unknown as any
23
- }
24
- {...props}
25
- />
26
- );
27
- }
28
-
29
- Calendar.displayName = "Calendar";
30
-
31
- export { Calendar };
1
+ /* eslint-disable @typescript-eslint/no-explicit-any */
2
+ import * as React from 'react';
3
+ import { ChevronLeft, ChevronRight } from 'lucide-react';
4
+ import { DayPicker as RDPDayPicker } from 'react-day-picker';
5
+ import { StyledDayPicker } from './Calendar.styles';
6
+
7
+ export type CalendarProps = React.ComponentProps<typeof RDPDayPicker>;
8
+
9
+ function Calendar({ className, ...props }: CalendarProps) {
10
+ return (
11
+ <StyledDayPicker
12
+ className={className}
13
+ showOutsideDays={true}
14
+ components={
15
+ {
16
+ IconPrevious: ({ className, ...props }: { className?: string }) => (
17
+ <ChevronLeft className={className} {...props} />
18
+ ),
19
+ IconNext: ({ className, ...props }: { className?: string }) => (
20
+ <ChevronRight className={className} {...props} />
21
+ ),
22
+ } as unknown as any
23
+ }
24
+ {...props}
25
+ />
26
+ );
27
+ }
28
+
29
+ Calendar.displayName = 'Calendar';
30
+
31
+ export { Calendar };
@@ -1,7 +1,7 @@
1
- import styled from "styled-components";
2
- import { semanticSizes } from "../../../styles/tokens";
3
-
4
- export const StyledCodeInputContainer = styled.div`
5
- display: flex;
6
- margin-bottom: ${semanticSizes.global.padding.xl};
7
- `;
1
+ import styled from 'styled-components';
2
+ import { semanticSizes } from '../../../styles/tokens';
3
+
4
+ export const StyledCodeInputContainer = styled.div`
5
+ display: flex;
6
+ margin-bottom: ${semanticSizes.global.padding.xl};
7
+ `;
@@ -1,13 +1,13 @@
1
- import React from "react";
2
-
3
- export interface CodeInputContainerProps {
4
- code: string[];
5
- inputRefs: React.MutableRefObject<(HTMLInputElement | null)[]>;
6
- handleChange: (value: string, index: number) => void;
7
- handleKeyDown: (
8
- event: React.KeyboardEvent<HTMLInputElement>,
9
- index: number
10
- ) => void;
11
- handlePaste: (event: React.ClipboardEvent<HTMLInputElement>) => void;
12
- testId?: string;
13
- }
1
+ import React from 'react';
2
+
3
+ export interface CodeInputContainerProps {
4
+ code: string[];
5
+ inputRefs: React.MutableRefObject<(HTMLInputElement | null)[]>;
6
+ handleChange: (value: string, index: number) => void;
7
+ handleKeyDown: (
8
+ event: React.KeyboardEvent<HTMLInputElement>,
9
+ index: number
10
+ ) => void;
11
+ handlePaste: (event: React.ClipboardEvent<HTMLInputElement>) => void;
12
+ testId?: string;
13
+ }
@@ -1,3 +1 @@
1
-
2
-
3
- export { CodeInputContainer } from "./CodeInputContainer";
1
+ export { CodeInputContainer } from './CodeInputContainer';
@@ -1,118 +1,123 @@
1
- import styled from "styled-components";
2
- import * as Dialog from "@radix-ui/react-dialog";
3
- import { semanticRadius, semanticColors, typographyTokens, semanticSizes, semanticShadows } from "../../../styles/tokens"
4
-
5
- export const Overlay = styled(Dialog.Overlay)`
6
- position: fixed;
7
- inset: 0;
8
- background-color: rgba(0, 0, 0, 0.6);
9
- z-index: 50;
10
- `;
11
-
12
- export const Content = styled(Dialog.Content)`
13
- position: fixed;
14
- top: 50%;
15
- left: 50%;
16
- transform: translate(-50%, -50%);
17
- font-family: ${typographyTokens.fontFamily.base};
18
- background: ${semanticColors.base.background};
19
- border-radius: 12px;
20
- padding: ${semanticSizes.global.padding["3xl"]};
21
- width: 100%;
22
- max-width: 520px;
23
- z-index: 1000;
24
- box-shadow: ${semanticShadows.shadow.lg};
25
- border-top: 6px solid #c53030;
26
- `;
27
-
28
- export const Title = styled.h2`
29
- font-size: 28px;
30
- font-weight: ${typographyTokens.fontWeights.semibold};
31
- line-height: ${typographyTokens.lineHeights.displayM};
32
- color: ${semanticColors.global.text.default.enabled};
33
- margin-bottom: ${semanticSizes.global.gap.sm};
34
- padding-right: ${semanticSizes.global.padding.md};
35
- `;
36
-
37
- export const Description = styled.p`
38
- font-size: 1.1rem;
39
- line-height: 1.5;
40
- color: ${semanticColors.global.text.onSurface.subtitle};
41
- margin-bottom: ${semanticSizes.global.gap.lg};
42
-
43
- span {
44
- cursor: pointer;
45
- color: ${semanticColors.global.text.default.enabled};
46
- }
47
-
48
- strong {
49
- font-weight: ${typographyTokens.fontWeights.semibold};
50
- color: ${semanticColors.global.text.default.enabled};
51
- }
52
- `;
53
-
54
- export const Footer = styled.div`
55
- display: flex;
56
- justify-content: flex-end;
57
- gap: ${semanticSizes.global.gap.md};
58
- margin-top: ${semanticSizes.global.gap.xl};
59
- `;
60
-
61
-
62
- export const CancelButton = styled(Dialog.Close)`
63
- background: ${semanticColors.base.background};
64
- border: 2px solid ${semanticColors.global.border.strong};
65
- border-radius: ${semanticRadius.global.radius.md2};
66
- padding: ${semanticSizes.global.padding.sm} ${semanticSizes.global.padding.lg};
67
- font-weight: ${typographyTokens.fontWeights.semibold};
68
- font-size: ${typographyTokens.fontSizes.labelM};
69
- color: ${semanticColors.global.border.strong};
70
- cursor: pointer;
71
- transition: all 0.2s;
72
-
73
- &:hover {
74
- background: ${semanticColors.neutral[100]};
75
- }
76
- `;
77
-
78
- export const ConfirmButton = styled.button`
79
- background: #c53030;
80
- color: ${semanticColors.danger.text.onSurface};
81
- border: none;
82
- border-radius: ${semanticRadius.global.radius.md2};
83
- padding: ${semanticSizes.global.padding.sm} ${semanticSizes.global.padding.lg};
84
- font-weight: ${typographyTokens.fontWeights.semibold};
85
- font-size: ${typographyTokens.fontSizes.labelM};
86
- cursor: pointer;
87
- transition: all 0.2s;
88
-
89
- &:hover {
90
- background: #b02828;
91
- }
92
-
93
- &:active {
94
- background: #952020;
95
- }
96
-
97
- &:disabled {
98
- background: #e2e2e2;
99
- cursor: not-allowed;
100
- }
101
- `;
102
-
103
- export const CloseIcon = styled(Dialog.Close)`
104
- position: absolute;
105
- top: ${semanticSizes.global.padding["3xl"]};
106
- right: ${semanticSizes.global.padding["3xl"]};
107
- background: transparent;
108
- border: none;
109
- cursor: pointer;
110
-
111
- svg {
112
- color: ${semanticColors.global.text.onSurface.subtitle};
113
- }
114
-
115
- &:hover svg {
116
- color: ${semanticColors.global.text.default.enabled};
117
- }
118
- `;
1
+ import styled from 'styled-components';
2
+ import * as Dialog from '@radix-ui/react-dialog';
3
+ import {
4
+ semanticRadius,
5
+ semanticColors,
6
+ typographyTokens,
7
+ semanticSizes,
8
+ semanticShadows,
9
+ } from '../../../styles/tokens';
10
+
11
+ export const Overlay = styled(Dialog.Overlay)`
12
+ position: fixed;
13
+ inset: 0;
14
+ background-color: rgba(0, 0, 0, 0.6);
15
+ z-index: 50;
16
+ `;
17
+
18
+ export const Content = styled(Dialog.Content)`
19
+ position: fixed;
20
+ top: 50%;
21
+ left: 50%;
22
+ transform: translate(-50%, -50%);
23
+ font-family: ${typographyTokens.fontFamily.base};
24
+ background: ${semanticColors.base.background};
25
+ border-radius: 12px;
26
+ padding: ${semanticSizes.global.padding['3xl']};
27
+ width: 100%;
28
+ max-width: 520px;
29
+ z-index: 1000;
30
+ box-shadow: ${semanticShadows.shadow.lg};
31
+ border-top: 6px solid #c53030;
32
+ `;
33
+
34
+ export const Title = styled.h2`
35
+ font-size: 28px;
36
+ font-weight: ${typographyTokens.fontWeights.semibold};
37
+ line-height: ${typographyTokens.lineHeights.displayM};
38
+ color: ${semanticColors.global.text.default.enabled};
39
+ margin-bottom: ${semanticSizes.global.gap.sm};
40
+ padding-right: ${semanticSizes.global.padding.md};
41
+ `;
42
+
43
+ export const Description = styled.p`
44
+ font-size: 1.1rem;
45
+ line-height: 1.5;
46
+ color: ${semanticColors.global.text.onSurface.subtitle};
47
+ margin-bottom: ${semanticSizes.global.gap.lg};
48
+
49
+ span {
50
+ cursor: pointer;
51
+ color: ${semanticColors.global.text.default.enabled};
52
+ }
53
+
54
+ strong {
55
+ font-weight: ${typographyTokens.fontWeights.semibold};
56
+ color: ${semanticColors.global.text.default.enabled};
57
+ }
58
+ `;
59
+
60
+ export const Footer = styled.div`
61
+ display: flex;
62
+ justify-content: flex-end;
63
+ gap: ${semanticSizes.global.gap.md};
64
+ margin-top: ${semanticSizes.global.gap.xl};
65
+ `;
66
+
67
+ export const CancelButton = styled(Dialog.Close)`
68
+ background: ${semanticColors.base.background};
69
+ border: 2px solid ${semanticColors.global.border.strong};
70
+ border-radius: ${semanticRadius.global.radius.md2};
71
+ padding: ${semanticSizes.global.padding.sm} ${semanticSizes.global.padding.lg};
72
+ font-weight: ${typographyTokens.fontWeights.semibold};
73
+ font-size: ${typographyTokens.fontSizes.labelM};
74
+ color: ${semanticColors.global.border.strong};
75
+ cursor: pointer;
76
+ transition: all 0.2s;
77
+
78
+ &:hover {
79
+ background: ${semanticColors.neutral[100]};
80
+ }
81
+ `;
82
+
83
+ export const ConfirmButton = styled.button`
84
+ background: #c53030;
85
+ color: ${semanticColors.danger.text.onSurface};
86
+ border: none;
87
+ border-radius: ${semanticRadius.global.radius.md2};
88
+ padding: ${semanticSizes.global.padding.sm} ${semanticSizes.global.padding.lg};
89
+ font-weight: ${typographyTokens.fontWeights.semibold};
90
+ font-size: ${typographyTokens.fontSizes.labelM};
91
+ cursor: pointer;
92
+ transition: all 0.2s;
93
+
94
+ &:hover {
95
+ background: #b02828;
96
+ }
97
+
98
+ &:active {
99
+ background: #952020;
100
+ }
101
+
102
+ &:disabled {
103
+ background: #e2e2e2;
104
+ cursor: not-allowed;
105
+ }
106
+ `;
107
+
108
+ export const CloseIcon = styled(Dialog.Close)`
109
+ position: absolute;
110
+ top: ${semanticSizes.global.padding['3xl']};
111
+ right: ${semanticSizes.global.padding['3xl']};
112
+ background: transparent;
113
+ border: none;
114
+ cursor: pointer;
115
+
116
+ svg {
117
+ color: ${semanticColors.global.text.onSurface.subtitle};
118
+ }
119
+
120
+ &:hover svg {
121
+ color: ${semanticColors.global.text.default.enabled};
122
+ }
123
+ `;