@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,160 +1,160 @@
1
- /* eslint-disable react-refresh/only-export-components */
2
- // Form.tsx
3
- import * as React from "react";
4
- import { Slot } from "@radix-ui/react-slot";
5
- import {
6
- Controller,
7
- ControllerProps,
8
- FieldPath,
9
- FieldValues,
10
- FormProvider,
11
- useFormContext,
12
- } from "react-hook-form";
13
- import {
14
- StyledFormItem,
15
- StyledFormLabel,
16
- StyledFormDescription,
17
- StyledFormMessage,
18
- } from "./Form.styles";
19
-
20
- /* Reexporta o FormProvider como Form para facilitar o uso */
21
- const Form = FormProvider;
22
-
23
- type FormFieldContextValue<
24
- TFieldValues extends FieldValues = FieldValues,
25
- TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>
26
- > = {
27
- name: TName;
28
- };
29
-
30
- const FormFieldContext = React.createContext<FormFieldContextValue>(
31
- {} as FormFieldContextValue
32
- );
33
-
34
- const FormField = <
35
- TFieldValues extends FieldValues = FieldValues,
36
- TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>
37
- >({
38
- ...props
39
- }: ControllerProps<TFieldValues, TName>) => {
40
- return (
41
- <FormFieldContext.Provider value={{ name: props.name }}>
42
- <Controller {...props} />
43
- </FormFieldContext.Provider>
44
- );
45
- };
46
-
47
- type FormItemContextValue = { id: string };
48
-
49
- const FormItemContext = React.createContext<FormItemContextValue>(
50
- {} as FormItemContextValue
51
- );
52
-
53
- const FormItem = React.forwardRef<
54
- HTMLDivElement,
55
- React.HTMLAttributes<HTMLDivElement>
56
- >(({ ...props }, ref) => {
57
- const id = React.useId();
58
- return (
59
- <FormItemContext.Provider value={{ id }}>
60
- <StyledFormItem ref={ref} {...props} />
61
- </FormItemContext.Provider>
62
- );
63
- });
64
- FormItem.displayName = "FormItem";
65
-
66
- const useFormField = () => {
67
- const fieldContext = React.useContext(FormFieldContext);
68
- const itemContext = React.useContext(FormItemContext);
69
- const { getFieldState, formState } = useFormContext();
70
-
71
- const fieldState = getFieldState(fieldContext.name, formState);
72
-
73
- if (!fieldContext) {
74
- throw new Error("useFormField should be used within <FormField>");
75
- }
76
-
77
- const { id } = itemContext;
78
- return {
79
- id,
80
- name: fieldContext.name,
81
- formItemId: `${id}-form-item`,
82
- formDescriptionId: `${id}-form-item-description`,
83
- formMessageId: `${id}-form-item-message`,
84
- ...fieldState,
85
- };
86
- };
87
-
88
- const FormLabel = React.forwardRef<
89
- HTMLLabelElement,
90
- React.ComponentPropsWithoutRef<"label">
91
- >(({ children, ...props }, ref) => {
92
- const { error, formItemId } = useFormField();
93
- return (
94
- <StyledFormLabel ref={ref} htmlFor={formItemId} error={!!error} {...props}>
95
- {children}
96
- </StyledFormLabel>
97
- );
98
- });
99
- FormLabel.displayName = "FormLabel";
100
-
101
- const FormControl = React.forwardRef<
102
- React.ElementRef<typeof Slot>,
103
- React.ComponentPropsWithoutRef<typeof Slot>
104
- >(({ ...props }, ref) => {
105
- const { error, formItemId, formDescriptionId, formMessageId } =
106
- useFormField();
107
- return (
108
- <Slot
109
- ref={ref}
110
- id={formItemId}
111
- aria-describedby={
112
- !error
113
- ? `${formDescriptionId}`
114
- : `${formDescriptionId} ${formMessageId}`
115
- }
116
- aria-invalid={!!error}
117
- {...props}
118
- />
119
- );
120
- });
121
- FormControl.displayName = "FormControl";
122
-
123
- const FormDescription = React.forwardRef<
124
- HTMLParagraphElement,
125
- React.HTMLAttributes<HTMLParagraphElement>
126
- >(({ children, ...props }, ref) => {
127
- const { formDescriptionId } = useFormField();
128
- return (
129
- <StyledFormDescription ref={ref} id={formDescriptionId} {...props}>
130
- {children}
131
- </StyledFormDescription>
132
- );
133
- });
134
- FormDescription.displayName = "FormDescription";
135
-
136
- const FormMessage = React.forwardRef<
137
- HTMLParagraphElement,
138
- React.HTMLAttributes<HTMLParagraphElement>
139
- >(({ children, ...props }, ref) => {
140
- const { error, formMessageId } = useFormField();
141
- const body = error ? String(error?.message) : children;
142
- if (!body) return null;
143
- return (
144
- <StyledFormMessage ref={ref} id={formMessageId} {...props}>
145
- {body}
146
- </StyledFormMessage>
147
- );
148
- });
149
- FormMessage.displayName = "FormMessage";
150
-
151
- export {
152
- useFormField,
153
- Form,
154
- FormItem,
155
- FormLabel,
156
- FormControl,
157
- FormDescription,
158
- FormMessage,
159
- FormField,
160
- };
1
+ /* eslint-disable react-refresh/only-export-components */
2
+ // Form.tsx
3
+ import * as React from 'react';
4
+ import { Slot } from '@radix-ui/react-slot';
5
+ import {
6
+ Controller,
7
+ ControllerProps,
8
+ FieldPath,
9
+ FieldValues,
10
+ FormProvider,
11
+ useFormContext,
12
+ } from 'react-hook-form';
13
+ import {
14
+ StyledFormItem,
15
+ StyledFormLabel,
16
+ StyledFormDescription,
17
+ StyledFormMessage,
18
+ } from './Form.styles';
19
+
20
+ /* Reexporta o FormProvider como Form para facilitar o uso */
21
+ const Form = FormProvider;
22
+
23
+ type FormFieldContextValue<
24
+ TFieldValues extends FieldValues = FieldValues,
25
+ TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
26
+ > = {
27
+ name: TName;
28
+ };
29
+
30
+ const FormFieldContext = React.createContext<FormFieldContextValue>(
31
+ {} as FormFieldContextValue
32
+ );
33
+
34
+ const FormField = <
35
+ TFieldValues extends FieldValues = FieldValues,
36
+ TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
37
+ >({
38
+ ...props
39
+ }: ControllerProps<TFieldValues, TName>) => {
40
+ return (
41
+ <FormFieldContext.Provider value={{ name: props.name }}>
42
+ <Controller {...props} />
43
+ </FormFieldContext.Provider>
44
+ );
45
+ };
46
+
47
+ type FormItemContextValue = { id: string };
48
+
49
+ const FormItemContext = React.createContext<FormItemContextValue>(
50
+ {} as FormItemContextValue
51
+ );
52
+
53
+ const FormItem = React.forwardRef<
54
+ HTMLDivElement,
55
+ React.HTMLAttributes<HTMLDivElement>
56
+ >(({ ...props }, ref) => {
57
+ const id = React.useId();
58
+ return (
59
+ <FormItemContext.Provider value={{ id }}>
60
+ <StyledFormItem ref={ref} {...props} />
61
+ </FormItemContext.Provider>
62
+ );
63
+ });
64
+ FormItem.displayName = 'FormItem';
65
+
66
+ const useFormField = () => {
67
+ const fieldContext = React.useContext(FormFieldContext);
68
+ const itemContext = React.useContext(FormItemContext);
69
+ const { getFieldState, formState } = useFormContext();
70
+
71
+ const fieldState = getFieldState(fieldContext.name, formState);
72
+
73
+ if (!fieldContext) {
74
+ throw new Error('useFormField should be used within <FormField>');
75
+ }
76
+
77
+ const { id } = itemContext;
78
+ return {
79
+ id,
80
+ name: fieldContext.name,
81
+ formItemId: `${id}-form-item`,
82
+ formDescriptionId: `${id}-form-item-description`,
83
+ formMessageId: `${id}-form-item-message`,
84
+ ...fieldState,
85
+ };
86
+ };
87
+
88
+ const FormLabel = React.forwardRef<
89
+ HTMLLabelElement,
90
+ React.ComponentPropsWithoutRef<'label'>
91
+ >(({ children, ...props }, ref) => {
92
+ const { error, formItemId } = useFormField();
93
+ return (
94
+ <StyledFormLabel ref={ref} htmlFor={formItemId} error={!!error} {...props}>
95
+ {children}
96
+ </StyledFormLabel>
97
+ );
98
+ });
99
+ FormLabel.displayName = 'FormLabel';
100
+
101
+ const FormControl = React.forwardRef<
102
+ React.ElementRef<typeof Slot>,
103
+ React.ComponentPropsWithoutRef<typeof Slot>
104
+ >(({ ...props }, ref) => {
105
+ const { error, formItemId, formDescriptionId, formMessageId } =
106
+ useFormField();
107
+ return (
108
+ <Slot
109
+ ref={ref}
110
+ id={formItemId}
111
+ aria-describedby={
112
+ !error
113
+ ? `${formDescriptionId}`
114
+ : `${formDescriptionId} ${formMessageId}`
115
+ }
116
+ aria-invalid={!!error}
117
+ {...props}
118
+ />
119
+ );
120
+ });
121
+ FormControl.displayName = 'FormControl';
122
+
123
+ const FormDescription = React.forwardRef<
124
+ HTMLParagraphElement,
125
+ React.HTMLAttributes<HTMLParagraphElement>
126
+ >(({ children, ...props }, ref) => {
127
+ const { formDescriptionId } = useFormField();
128
+ return (
129
+ <StyledFormDescription ref={ref} id={formDescriptionId} {...props}>
130
+ {children}
131
+ </StyledFormDescription>
132
+ );
133
+ });
134
+ FormDescription.displayName = 'FormDescription';
135
+
136
+ const FormMessage = React.forwardRef<
137
+ HTMLParagraphElement,
138
+ React.HTMLAttributes<HTMLParagraphElement>
139
+ >(({ children, ...props }, ref) => {
140
+ const { error, formMessageId } = useFormField();
141
+ const body = error ? String(error?.message) : children;
142
+ if (!body) return null;
143
+ return (
144
+ <StyledFormMessage ref={ref} id={formMessageId} {...props}>
145
+ {body}
146
+ </StyledFormMessage>
147
+ );
148
+ });
149
+ FormMessage.displayName = 'FormMessage';
150
+
151
+ export {
152
+ useFormField,
153
+ Form,
154
+ FormItem,
155
+ FormLabel,
156
+ FormControl,
157
+ FormDescription,
158
+ FormMessage,
159
+ FormField,
160
+ };
@@ -1,114 +1,115 @@
1
- import styled from "styled-components";
2
- import {
3
- semanticColors,
4
- semanticSizes,
5
- typographyTokens,
6
- semanticRadius,
7
- } from "../../../styles/tokens";
8
-
9
- export const TableWrapper = styled.div`
10
- width: 100%;
11
- overflow-x: auto;
12
- background-color: ${semanticColors.base.background};
13
- border: 1px solid ${semanticColors.global.border.default};
14
- padding: ${semanticSizes.global.padding.xl};
15
- border-radius: ${semanticRadius.global.radius.md2};
16
- `;
17
-
18
- export const Table = styled.table`
19
- width: 100%;
20
- border-collapse: collapse;
21
- `;
22
-
23
- export const TableHead = styled.thead`
24
- background-color: ${semanticColors.base.background};
25
- `;
26
-
27
- export const TableRow = styled.tr`
28
- &:last-child td {
29
- border-bottom: none;
30
- padding-bottom: 0;
31
- }
32
- `;
33
-
34
- export const TableHeader = styled.th`
35
- padding: ${semanticSizes.global.padding.md} 0;
36
- text-align: left;
37
- border: 0px;
38
- font-weight: ${typographyTokens.fontWeights.semibold};
39
- font-size: ${typographyTokens.fontSizes.bodyS};
40
- color: ${semanticColors.global.text.onSurface.enabled};
41
-
42
- &.center {
43
- text-align: center;
44
- }
45
- `;
46
-
47
- export const TableData = styled.td`
48
- padding: ${semanticSizes.global.padding.lg} 0 ${semanticSizes.global.padding["2xl"]};
49
- border-bottom: 1px solid ${semanticColors.neutral[200]};
50
- text-align: left;
51
- font-size: ${typographyTokens.fontSizes.bodyM};
52
- color: ${semanticColors.global.text.default.enabled};
53
-
54
- &.center {
55
- text-align: center;
56
-
57
- img {
58
- display: block;
59
- margin: 0 auto;
60
- }
61
- }
62
-
63
- img {
64
- cursor: pointer;
65
- }
66
- `;
67
-
68
- export const TableWrapperHeader = styled.div`
69
- display: flex;
70
- flex-direction: row;
71
- justify-content: space-between;
72
- align-items: center;
73
- gap: ${semanticSizes.global.gap.sm};
74
- margin-bottom: ${semanticSizes.global.gap.lg};
75
- `;
76
-
77
- export const TableWrapperTitle = styled.h2`
78
- font-size: ${typographyTokens.fontSizes.headingM};
79
- font-weight: ${typographyTokens.fontWeights.medium};
80
- margin: 0;
81
- color: ${semanticColors.base.text};
82
- `;
83
-
84
- export const TableWrapperLink = styled.button`
85
- display: flex;
86
- flex-direction: row;
87
- font-size: ${typographyTokens.fontSizes.labelL};
88
- margin: 0;
89
- padding: 0;
90
- background: none;
91
- border: none;
92
- color: ${semanticColors.branding.text.accent.enabled};
93
- gap: ${semanticSizes.global.gap.sm};
94
- align-items: center;
95
- cursor: pointer;
96
- transition: opacity 0.2s;
97
-
98
- &:hover {
99
- opacity: 0.8;
100
- }
101
- `;
102
-
103
- export const LoadingContainer = styled.div`
104
- display: flex;
105
- justify-content: center;
106
- align-items: center;
107
- padding: ${semanticSizes.global.padding["3xl"]};
108
- font-size: ${typographyTokens.fontSizes.bodyM};
109
- color: ${semanticColors.global.text.onSurface.subtitle};
110
- `;
111
-
112
- export const ErrorContainer = styled(LoadingContainer)`
113
- color: ${semanticColors.danger.text.feedback.strong};
114
- `;
1
+ import styled from 'styled-components';
2
+ import {
3
+ semanticColors,
4
+ semanticSizes,
5
+ typographyTokens,
6
+ semanticRadius,
7
+ } from '../../../styles/tokens';
8
+
9
+ export const TableWrapper = styled.div`
10
+ width: 100%;
11
+ overflow-x: auto;
12
+ background-color: ${semanticColors.base.background};
13
+ border: 1px solid ${semanticColors.global.border.default};
14
+ padding: ${semanticSizes.global.padding.xl};
15
+ border-radius: ${semanticRadius.global.radius.md2};
16
+ `;
17
+
18
+ export const Table = styled.table`
19
+ width: 100%;
20
+ border-collapse: collapse;
21
+ `;
22
+
23
+ export const TableHead = styled.thead`
24
+ background-color: ${semanticColors.base.background};
25
+ `;
26
+
27
+ export const TableRow = styled.tr`
28
+ &:last-child td {
29
+ border-bottom: none;
30
+ padding-bottom: 0;
31
+ }
32
+ `;
33
+
34
+ export const TableHeader = styled.th`
35
+ padding: ${semanticSizes.global.padding.md} 0;
36
+ text-align: left;
37
+ border: 0px;
38
+ font-weight: ${typographyTokens.fontWeights.semibold};
39
+ font-size: ${typographyTokens.fontSizes.bodyS};
40
+ color: ${semanticColors.global.text.onSurface.enabled};
41
+
42
+ &.center {
43
+ text-align: center;
44
+ }
45
+ `;
46
+
47
+ export const TableData = styled.td`
48
+ padding: ${semanticSizes.global.padding.lg} 0
49
+ ${semanticSizes.global.padding['2xl']};
50
+ border-bottom: 1px solid ${semanticColors.neutral[200]};
51
+ text-align: left;
52
+ font-size: ${typographyTokens.fontSizes.bodyM};
53
+ color: ${semanticColors.global.text.default.enabled};
54
+
55
+ &.center {
56
+ text-align: center;
57
+
58
+ img {
59
+ display: block;
60
+ margin: 0 auto;
61
+ }
62
+ }
63
+
64
+ img {
65
+ cursor: pointer;
66
+ }
67
+ `;
68
+
69
+ export const TableWrapperHeader = styled.div`
70
+ display: flex;
71
+ flex-direction: row;
72
+ justify-content: space-between;
73
+ align-items: center;
74
+ gap: ${semanticSizes.global.gap.sm};
75
+ margin-bottom: ${semanticSizes.global.gap.lg};
76
+ `;
77
+
78
+ export const TableWrapperTitle = styled.h2`
79
+ font-size: ${typographyTokens.fontSizes.headingM};
80
+ font-weight: ${typographyTokens.fontWeights.medium};
81
+ margin: 0;
82
+ color: ${semanticColors.base.text};
83
+ `;
84
+
85
+ export const TableWrapperLink = styled.button`
86
+ display: flex;
87
+ flex-direction: row;
88
+ font-size: ${typographyTokens.fontSizes.labelL};
89
+ margin: 0;
90
+ padding: 0;
91
+ background: none;
92
+ border: none;
93
+ color: ${semanticColors.branding.text.accent.enabled};
94
+ gap: ${semanticSizes.global.gap.sm};
95
+ align-items: center;
96
+ cursor: pointer;
97
+ transition: opacity 0.2s;
98
+
99
+ &:hover {
100
+ opacity: 0.8;
101
+ }
102
+ `;
103
+
104
+ export const LoadingContainer = styled.div`
105
+ display: flex;
106
+ justify-content: center;
107
+ align-items: center;
108
+ padding: ${semanticSizes.global.padding['3xl']};
109
+ font-size: ${typographyTokens.fontSizes.bodyM};
110
+ color: ${semanticColors.global.text.onSurface.subtitle};
111
+ `;
112
+
113
+ export const ErrorContainer = styled(LoadingContainer)`
114
+ color: ${semanticColors.danger.text.feedback.strong};
115
+ `;