@addev-be/ui 0.20.8 → 0.21.0
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/assets/icons/table.svg +1 -1
- package/dist/Icons.d.ts +1 -11
- package/dist/Icons.js +1 -22
- package/dist/components/auth/LoginForm.js +1 -1
- package/dist/components/auth/PasswordRecoveryForm.js +1 -1
- package/dist/components/auth/PasswordResetForm.js +1 -1
- package/dist/components/data/AdvancedRequestDataGrid/helpers/advancedRequests.d.ts +14 -0
- package/dist/components/data/AdvancedRequestDataGrid/helpers/advancedRequests.js +76 -0
- package/dist/components/data/AdvancedRequestDataGrid/helpers/columns.d.ts +22 -0
- package/dist/components/data/AdvancedRequestDataGrid/helpers/columns.js +156 -0
- package/dist/components/data/AdvancedRequestDataGrid/helpers/index.d.ts +2 -0
- package/dist/{helpers/styled → components/data/AdvancedRequestDataGrid/helpers}/index.js +2 -1
- package/dist/components/data/AdvancedRequestDataGrid/index.d.ts +2 -0
- package/dist/components/data/AdvancedRequestDataGrid/index.js +215 -0
- package/dist/components/data/AdvancedRequestDataGrid/types.d.ts +21 -0
- package/dist/components/data/DataGrid/DataGridCell.js +5 -5
- package/dist/components/data/DataGrid/DataGridColumnsModal/helpers.d.ts +2 -2
- package/dist/components/data/DataGrid/DataGridColumnsModal/helpers.js +7 -1
- package/dist/components/data/DataGrid/DataGridColumnsModal/hooks.js +3 -3
- package/dist/components/data/DataGrid/DataGridColumnsModal/index.js +21 -16
- package/dist/components/data/DataGrid/DataGridEditableCell.d.ts +2 -0
- package/dist/components/data/DataGrid/DataGridEditableCell.js +27 -0
- package/dist/components/data/DataGrid/DataGridFilterMenu/FilterValuesScroller.js +1 -17
- package/dist/components/data/DataGrid/DataGridFilterMenu/hooks.d.ts +3 -4
- package/dist/components/data/DataGrid/DataGridFilterMenu/hooks.js +12 -11
- package/dist/components/data/DataGrid/DataGridFilterMenu/index.d.ts +4 -5
- package/dist/components/data/DataGrid/DataGridFilterMenu/index.js +40 -44
- package/dist/components/data/DataGrid/DataGridFilterMenu/styles.js +1 -1
- package/dist/components/data/DataGrid/DataGridFooter.js +5 -5
- package/dist/components/data/DataGrid/DataGridHeader.js +8 -52
- package/dist/components/data/DataGrid/DataGridHeaderCell.d.ts +1 -1
- package/dist/components/data/DataGrid/DataGridHeaderCell.js +24 -11
- package/dist/components/data/DataGrid/DataGridRowTemplate.d.ts +1 -1
- package/dist/components/data/DataGrid/DataGridRowTemplate.js +9 -8
- package/dist/components/data/DataGrid/FilterModalContent/index.js +1 -1
- package/dist/components/data/DataGrid/helpers/columns.d.ts +12 -13
- package/dist/components/data/DataGrid/helpers/columns.js +130 -100
- package/dist/components/data/DataGrid/hooks/index.d.ts +3 -3
- package/dist/components/data/DataGrid/hooks/index.js +12 -8
- package/dist/components/data/DataGrid/hooks/useDataGrid.js +24 -73
- package/dist/components/data/DataGrid/hooks/useDataGridCopy.js +30 -25
- package/dist/components/data/DataGrid/index.d.ts +2 -2
- package/dist/components/data/DataGrid/index.js +3 -17
- package/dist/components/data/DataGrid/styles.d.ts +8 -13
- package/dist/components/data/DataGrid/styles.js +30 -58
- package/dist/components/data/DataGrid/types.d.ts +17 -87
- package/dist/components/data/SqlRequestDataGrid/helpers/columns.d.ts +17 -16
- package/dist/components/data/SqlRequestDataGrid/helpers/columns.js +84 -237
- package/dist/components/data/SqlRequestDataGrid/index.d.ts +2 -2
- package/dist/components/data/SqlRequestDataGrid/index.js +68 -92
- package/dist/components/data/SqlRequestDataGrid/types.d.ts +3 -13
- package/dist/components/data/SqlRequestDataGrid/types.js +0 -1
- package/dist/components/data/SqlRequestGrid/index.d.ts +1 -1
- package/dist/components/data/SqlRequestGrid/index.js +50 -139
- package/dist/components/data/SqlRequestGrid/styles.d.ts +12 -0
- package/dist/components/data/SqlRequestGrid/styles.js +20 -4
- package/dist/components/data/SqlRequestGrid/types.d.ts +4 -14
- package/dist/components/data/VirtualScroller/index.d.ts +3 -4
- package/dist/components/data/VirtualScroller/index.js +5 -15
- package/dist/components/data/VirtualScroller/styles.d.ts +2 -4
- package/dist/components/data/VirtualScroller/styles.js +6 -9
- package/dist/components/data/index.d.ts +2 -1
- package/dist/components/data/index.js +2 -1
- package/dist/components/forms/Button.d.ts +4 -11
- package/dist/components/forms/Button.js +9 -15
- package/dist/components/forms/IconButton.d.ts +1 -2
- package/dist/components/forms/IconButton.js +12 -12
- package/dist/components/forms/Select.d.ts +6 -5
- package/dist/components/forms/Select.js +5 -2
- package/dist/components/forms/index.d.ts +0 -4
- package/dist/components/forms/index.js +0 -4
- package/dist/components/forms/styles.d.ts +3 -17
- package/dist/components/forms/styles.js +7 -8
- package/dist/components/layout/Dropdown/index.d.ts +0 -1
- package/dist/components/layout/Dropdown/index.js +3 -24
- package/dist/components/layout/Modal/styles.js +1 -1
- package/dist/components/layout/index.d.ts +1 -5
- package/dist/components/layout/index.js +1 -5
- package/dist/components/search/HighlightedText.js +7 -9
- package/dist/components/search/QuickSearchBar.d.ts +2 -6
- package/dist/components/search/QuickSearchBar.js +7 -7
- package/dist/components/search/styles.js +1 -1
- package/dist/components/search/types.d.ts +0 -3
- package/dist/components/ui/Card/styles.js +1 -1
- package/dist/components/ui/index.d.ts +0 -4
- package/dist/components/ui/index.js +0 -4
- package/dist/helpers/index.d.ts +0 -2
- package/dist/helpers/index.js +0 -2
- package/dist/helpers/numbers.d.ts +0 -3
- package/dist/helpers/numbers.js +1 -33
- package/dist/hooks/index.d.ts +0 -5
- package/dist/hooks/index.js +0 -5
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/providers/AuthenticationProvider/index.d.ts +0 -1
- package/dist/providers/AuthenticationProvider/index.js +15 -57
- package/dist/providers/PortalsProvider/styles.js +1 -1
- package/dist/providers/ThemeProvider/defaultTheme.js +0 -13
- package/dist/providers/ThemeProvider/types.d.ts +1 -2
- package/dist/providers/UiProviders/index.js +1 -2
- package/dist/providers/index.d.ts +0 -2
- package/dist/providers/index.js +0 -2
- package/dist/services/WebSocketService.d.ts +0 -8
- package/dist/services/WebSocketService.js +2 -34
- package/dist/services/globalSearch.d.ts +2 -6
- package/dist/services/hooks.d.ts +0 -10
- package/dist/services/hooks.js +2 -89
- package/dist/services/index.d.ts +0 -7
- package/dist/services/index.js +0 -20
- package/package.json +2 -2
- package/src/components/data/DataGrid/DataGridColumnsModal/styles.ts +6 -6
- package/src/components/data/DataGrid/DataGridEditableCell/styles.ts +4 -4
- package/src/components/data/DataGrid/DataGridFilterMenu/styles.ts +6 -6
- package/src/components/data/DataGrid/styles.ts +22 -22
- package/src/components/data/SqlRequestForeignList/styles.ts +2 -2
- package/src/components/data/SqlRequestGrid/filters/styles.ts +6 -6
- package/src/components/forms/Button.tsx +3 -3
- package/src/components/forms/Form/styles.ts +12 -12
- package/src/components/forms/styles.ts +3 -3
- package/src/components/layout/Dropdown/styles.ts +2 -2
- package/src/components/layout/Modal/styles.ts +3 -3
- package/src/components/search/styles.ts +5 -5
- package/src/components/ui/Avatar/styles.ts +61 -61
- package/src/components/ui/Card/styles.ts +4 -4
- package/src/components/ui/ContextMenu/styles.ts +11 -11
- package/src/components/ui/Label.tsx +90 -90
- package/src/components/ui/Message/index.tsx +1 -1
- package/src/components/ui/TabsView/TabsList.tsx +44 -44
- package/src/components/ui/TabsView/index.ts +3 -3
- package/src/components/ui/TabsView/styles.ts +13 -6
- package/src/helpers/styled/index.ts +1 -1
- package/src/helpers/styled/space.ts +111 -111
- package/src/providers/ThemeProvider/ThemeProvider.ts +12 -9
- package/src/providers/ThemeProvider/defaultTheme.ts +1 -0
- package/src/providers/ThemeProvider/helpers.ts +13 -0
- package/src/providers/ThemeProvider/types.ts +1 -1
- package/src/providers/TrackingProvider/hooks.ts +14 -14
- package/src/providers/UiProviders/index.tsx +11 -3
- package/src/providers/UiProviders/styles.ts +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/components/data/DataGrid/DataGridEditableCell/CheckboxEditableCell.d.ts +0 -2
- package/dist/components/data/DataGrid/DataGridEditableCell/CheckboxEditableCell.js +0 -23
- package/dist/components/data/DataGrid/DataGridEditableCell/DateEditableCell.d.ts +0 -2
- package/dist/components/data/DataGrid/DataGridEditableCell/DateEditableCell.js +0 -27
- package/dist/components/data/DataGrid/DataGridEditableCell/NumberEditableCell.d.ts +0 -7
- package/dist/components/data/DataGrid/DataGridEditableCell/NumberEditableCell.js +0 -34
- package/dist/components/data/DataGrid/DataGridEditableCell/TextEditableCell.d.ts +0 -2
- package/dist/components/data/DataGrid/DataGridEditableCell/TextEditableCell.js +0 -23
- package/dist/components/data/DataGrid/DataGridEditableCell/index.d.ts +0 -2
- package/dist/components/data/DataGrid/DataGridEditableCell/index.js +0 -91
- package/dist/components/data/DataGrid/DataGridEditableCell/styles.d.ts +0 -3
- package/dist/components/data/DataGrid/DataGridEditableCell/styles.js +0 -17
- package/dist/components/data/DataGrid/DataGridEditableCell/types.d.ts +0 -11
- package/dist/components/data/DataGrid/DataGridEditableCell/types.js +0 -3
- package/dist/components/data/DataGrid/constants.d.ts +0 -6
- package/dist/components/data/DataGrid/constants.js +0 -9
- package/dist/components/data/DataGrid/hooks/useDataGridChangedRows.d.ts +0 -9
- package/dist/components/data/DataGrid/hooks/useDataGridChangedRows.js +0 -91
- package/dist/components/data/DataGrid/hooks/useRefreshModal.d.ts +0 -5
- package/dist/components/data/DataGrid/hooks/useRefreshModal.js +0 -25
- package/dist/components/data/SqlRequestDataGrid/SqlRequestForeignListEditableCell.d.ts +0 -2
- package/dist/components/data/SqlRequestDataGrid/SqlRequestForeignListEditableCell.js +0 -19
- package/dist/components/data/SqlRequestDataGrid/styles.d.ts +0 -2
- package/dist/components/data/SqlRequestDataGrid/styles.js +0 -14
- package/dist/components/data/SqlRequestForeignList/index.d.ts +0 -4
- package/dist/components/data/SqlRequestForeignList/index.js +0 -131
- package/dist/components/data/SqlRequestForeignList/styles.d.ts +0 -9
- package/dist/components/data/SqlRequestForeignList/styles.js +0 -22
- package/dist/components/data/SqlRequestForeignList/types.d.ts +0 -22
- package/dist/components/data/SqlRequestForeignList/types.js +0 -3
- package/dist/components/data/SqlRequestGrid/filters/FiltersSidebar.d.ts +0 -10
- package/dist/components/data/SqlRequestGrid/filters/FiltersSidebar.js +0 -51
- package/dist/components/data/SqlRequestGrid/filters/styles.d.ts +0 -4
- package/dist/components/data/SqlRequestGrid/filters/styles.js +0 -17
- package/dist/components/forms/AutoTextArea.d.ts +0 -10
- package/dist/components/forms/AutoTextArea.js +0 -41
- package/dist/components/forms/Form/Checkbox.d.ts +0 -3
- package/dist/components/forms/Form/Checkbox.js +0 -33
- package/dist/components/forms/Form/FormGroup.d.ts +0 -11
- package/dist/components/forms/Form/FormGroup.js +0 -10
- package/dist/components/forms/Form/Input.d.ts +0 -3
- package/dist/components/forms/Form/Input.js +0 -33
- package/dist/components/forms/Form/Row.d.ts +0 -9
- package/dist/components/forms/Form/Row.js +0 -10
- package/dist/components/forms/Form/Select.d.ts +0 -18
- package/dist/components/forms/Form/Select.js +0 -51
- package/dist/components/forms/Form/TextArea.d.ts +0 -4
- package/dist/components/forms/Form/TextArea.js +0 -34
- package/dist/components/forms/Form/index.d.ts +0 -81
- package/dist/components/forms/Form/index.js +0 -29
- package/dist/components/forms/Form/styles.d.ts +0 -19
- package/dist/components/forms/Form/styles.js +0 -49
- package/dist/components/forms/NumberInput.d.ts +0 -9
- package/dist/components/forms/NumberInput.js +0 -40
- package/dist/components/layout/Columns.d.ts +0 -6
- package/dist/components/layout/Columns.js +0 -23
- package/dist/components/layout/Flexbox.d.ts +0 -11
- package/dist/components/layout/Flexbox.js +0 -26
- package/dist/components/layout/Grid/index.d.ts +0 -6
- package/dist/components/layout/Grid/index.js +0 -6
- package/dist/components/layout/Grid/styles.d.ts +0 -14
- package/dist/components/layout/Grid/styles.js +0 -29
- package/dist/components/layout/Masonry/index.d.ts +0 -3
- package/dist/components/layout/Masonry/index.js +0 -20
- package/dist/components/layout/Masonry/styles.d.ts +0 -5
- package/dist/components/layout/Masonry/styles.js +0 -17
- package/dist/components/ui/Avatar/index.d.ts +0 -10
- package/dist/components/ui/Avatar/index.js +0 -52
- package/dist/components/ui/Avatar/styles.d.ts +0 -4
- package/dist/components/ui/Avatar/styles.js +0 -43
- package/dist/components/ui/Ellipsis.d.ts +0 -13
- package/dist/components/ui/Ellipsis.js +0 -28
- package/dist/components/ui/Label.d.ts +0 -9
- package/dist/components/ui/Label.js +0 -74
- package/dist/components/ui/Tab/index.d.ts +0 -3
- package/dist/components/ui/Tab/index.js +0 -12
- package/dist/components/ui/Tab/styles.d.ts +0 -6
- package/dist/components/ui/Tab/styles.js +0 -41
- package/dist/components/ui/Tab/types.d.ts +0 -13
- package/dist/components/ui/Tabs/index.d.ts +0 -2
- package/dist/components/ui/Tabs/index.js +0 -10
- package/dist/components/ui/Tabs/styles.d.ts +0 -0
- package/dist/components/ui/Tabs/styles.js +0 -1
- package/dist/components/ui/Tabs/types.d.ts +0 -8
- package/dist/components/ui/Tabs/types.js +0 -2
- package/dist/components/ui/Tab/302/265/index.d.ts +0 -2
- package/dist/components/ui/Tab/302/265/index.js +0 -10
- package/dist/components/ui/Tab/302/265/styles.d.ts +0 -0
- package/dist/components/ui/Tab/302/265/styles.js +0 -1
- package/dist/components/ui/Tab/302/265/types.d.ts +0 -8
- package/dist/components/ui/Tab/302/265/types.js +0 -2
- package/dist/components/ui/ToastNotification.d.ts +0 -14
- package/dist/components/ui/ToastNotification.js +0 -78
- package/dist/helpers/responsive.d.ts +0 -37
- package/dist/helpers/responsive.js +0 -57
- package/dist/helpers/styled/index.d.ts +0 -1
- package/dist/helpers/styled/space.d.ts +0 -23
- package/dist/helpers/styled/space.js +0 -56
- package/dist/hooks/useContainerMediaQuery.d.ts +0 -17
- package/dist/hooks/useContainerMediaQuery.js +0 -10
- package/dist/hooks/useMediaQuery.d.ts +0 -17
- package/dist/hooks/useMediaQuery.js +0 -11
- package/dist/hooks/useMediaQueryForWidth.d.ts +0 -17
- package/dist/hooks/useMediaQueryForWidth.js +0 -26
- package/dist/hooks/useMutableState.d.ts +0 -2
- package/dist/hooks/useMutableState.js +0 -16
- package/dist/hooks/useShowArchived.d.ts +0 -6
- package/dist/hooks/useShowArchived.js +0 -21
- package/dist/poppins-700.woff2 +0 -0
- package/dist/providers/ThemeProvider/helpers.d.ts +0 -8
- package/dist/providers/ThemeProvider/helpers.js +0 -53
- package/dist/providers/TrackingProvider/hooks.d.ts +0 -1
- package/dist/providers/TrackingProvider/hooks.js +0 -15
- package/dist/providers/TrackingProvider/index.d.ts +0 -8
- package/dist/providers/TrackingProvider/index.js +0 -41
- package/dist/services/requests/generic.d.ts +0 -29
- package/dist/services/requests/generic.js +0 -29
- package/dist/services/requests/tracking.d.ts +0 -18
- package/dist/services/requests/tracking.js +0 -8
- package/dist/services/smartQueries.d.ts +0 -51
- package/dist/services/smartQueries.js +0 -10
- package/dist/services/smartRequests.d.ts +0 -0
- package/dist/services/smartRequests.js +0 -1
- package/dist/services/types/generic.d.ts +0 -44
- package/dist/services/types/generic.js +0 -79
- package/dist/services/types/tracking.d.ts +0 -24
- package/dist/services/types/tracking.js +0 -47
- package/dist/services/updateSqlRequests.d.ts +0 -24
- package/dist/services/updateSqlRequests.js +0 -7
- /package/dist/components/{ui/Tab → data/AdvancedRequestDataGrid}/types.js +0 -0
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
import styled, { css } from 'styled-components';
|
|
2
|
-
|
|
3
|
-
export type AvatarContainerProps = {
|
|
4
|
-
size: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
const stylesMap: Record<
|
|
8
|
-
AvatarContainerProps['size'],
|
|
9
|
-
ReturnType<typeof css>
|
|
10
|
-
> = {
|
|
11
|
-
xs: css`
|
|
12
|
-
width: var(--size-6);
|
|
13
|
-
height: var(--size-6);
|
|
14
|
-
min-width: var(--size-6);
|
|
15
|
-
min-height: var(--size-6);
|
|
16
|
-
font-size: var(--text-xs);
|
|
17
|
-
line-height: var(--text-xs);
|
|
18
|
-
`,
|
|
19
|
-
sm: css`
|
|
20
|
-
width: var(--size-8);
|
|
21
|
-
height: var(--size-8);
|
|
22
|
-
min-width: var(--size-8);
|
|
23
|
-
min-height: var(--size-8);
|
|
24
|
-
font-size: var(--text-sm);
|
|
25
|
-
line-height: var(--text-sm);
|
|
26
|
-
`,
|
|
27
|
-
md: css`
|
|
28
|
-
width: var(--size-10);
|
|
29
|
-
height: var(--size-10);
|
|
30
|
-
min-width: var(--size-10);
|
|
31
|
-
min-height: var(--size-10);
|
|
32
|
-
font-size: var(--text-md);
|
|
33
|
-
line-height: var(--text-md);
|
|
34
|
-
`,
|
|
35
|
-
lg: css`
|
|
36
|
-
width: var(--size-12);
|
|
37
|
-
height: var(--size-12);
|
|
38
|
-
min-width: var(--size-12);
|
|
39
|
-
min-height: var(--size-12);
|
|
40
|
-
font-size: var(--text-lg);
|
|
41
|
-
line-height: var(--text-lg);
|
|
42
|
-
`,
|
|
43
|
-
xl: css`
|
|
44
|
-
width: var(--size-14);
|
|
45
|
-
height: var(--size-14);
|
|
46
|
-
min-width: var(--size-14);
|
|
47
|
-
min-height: var(--size-14);
|
|
48
|
-
font-size: var(--text-2xl);
|
|
49
|
-
line-height: var(--text-2xl);
|
|
50
|
-
`,
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
export const AvatarContainer = styled.div<AvatarContainerProps>`
|
|
54
|
-
display: inline-flex;
|
|
55
|
-
align-items: center;
|
|
56
|
-
justify-content: center;
|
|
57
|
-
border-radius: var(--rounded-full);
|
|
58
|
-
user-select: none;
|
|
59
|
-
|
|
60
|
-
${({ size }) => stylesMap[size]}
|
|
61
|
-
`;
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
|
+
|
|
3
|
+
export type AvatarContainerProps = {
|
|
4
|
+
size: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
const stylesMap: Record<
|
|
8
|
+
AvatarContainerProps['size'],
|
|
9
|
+
ReturnType<typeof css>
|
|
10
|
+
> = {
|
|
11
|
+
xs: css`
|
|
12
|
+
width: var(--size-6);
|
|
13
|
+
height: var(--size-6);
|
|
14
|
+
min-width: var(--size-6);
|
|
15
|
+
min-height: var(--size-6);
|
|
16
|
+
font-size: var(--text-xs);
|
|
17
|
+
line-height: var(--text-xs);
|
|
18
|
+
`,
|
|
19
|
+
sm: css`
|
|
20
|
+
width: var(--size-8);
|
|
21
|
+
height: var(--size-8);
|
|
22
|
+
min-width: var(--size-8);
|
|
23
|
+
min-height: var(--size-8);
|
|
24
|
+
font-size: var(--text-sm);
|
|
25
|
+
line-height: var(--text-sm);
|
|
26
|
+
`,
|
|
27
|
+
md: css`
|
|
28
|
+
width: var(--size-10);
|
|
29
|
+
height: var(--size-10);
|
|
30
|
+
min-width: var(--size-10);
|
|
31
|
+
min-height: var(--size-10);
|
|
32
|
+
font-size: var(--text-md);
|
|
33
|
+
line-height: var(--text-md);
|
|
34
|
+
`,
|
|
35
|
+
lg: css`
|
|
36
|
+
width: var(--size-12);
|
|
37
|
+
height: var(--size-12);
|
|
38
|
+
min-width: var(--size-12);
|
|
39
|
+
min-height: var(--size-12);
|
|
40
|
+
font-size: var(--text-lg);
|
|
41
|
+
line-height: var(--text-lg);
|
|
42
|
+
`,
|
|
43
|
+
xl: css`
|
|
44
|
+
width: var(--size-14);
|
|
45
|
+
height: var(--size-14);
|
|
46
|
+
min-width: var(--size-14);
|
|
47
|
+
min-height: var(--size-14);
|
|
48
|
+
font-size: var(--text-2xl);
|
|
49
|
+
line-height: var(--text-2xl);
|
|
50
|
+
`,
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export const AvatarContainer = styled.div<AvatarContainerProps>`
|
|
54
|
+
display: inline-flex;
|
|
55
|
+
align-items: center;
|
|
56
|
+
justify-content: center;
|
|
57
|
+
border-radius: var(--rounded-full);
|
|
58
|
+
user-select: none;
|
|
59
|
+
|
|
60
|
+
${({ size }) => stylesMap[size]}
|
|
61
|
+
`;
|
|
@@ -5,11 +5,11 @@ export const CardContainer = styled.div.attrs({
|
|
|
5
5
|
})`
|
|
6
6
|
display: flex;
|
|
7
7
|
flex-direction: column;
|
|
8
|
-
background-color: var(--color-
|
|
8
|
+
background-color: var(--color-base-0);
|
|
9
9
|
border-radius: var(--rounded-md);
|
|
10
10
|
box-shadow: var(--shadow-md);
|
|
11
11
|
padding: var(--space-4);
|
|
12
|
-
border: 1px solid var(--color-
|
|
12
|
+
border: 1px solid var(--color-base-100);
|
|
13
13
|
`;
|
|
14
14
|
|
|
15
15
|
export const CardHeader = styled.div.attrs({
|
|
@@ -19,7 +19,7 @@ export const CardHeader = styled.div.attrs({
|
|
|
19
19
|
flex-direction: row;
|
|
20
20
|
align-items: center;
|
|
21
21
|
padding-bottom: var(--space-2);
|
|
22
|
-
border-bottom: 1px solid var(--color-
|
|
22
|
+
border-bottom: 1px solid var(--color-base-200);
|
|
23
23
|
margin-bottom: var(--space-2);
|
|
24
24
|
gap: var(--space-2);
|
|
25
25
|
`;
|
|
@@ -31,7 +31,7 @@ export const CardFooter = styled.div.attrs({
|
|
|
31
31
|
flex-direction: row;
|
|
32
32
|
align-items: center;
|
|
33
33
|
padding-top: var(--space-2);
|
|
34
|
-
border-top: 1px solid var(--color-
|
|
34
|
+
border-top: 1px solid var(--color-base-200);
|
|
35
35
|
margin-top: var(--space-2);
|
|
36
36
|
gap: var(--space-2);
|
|
37
37
|
`;
|
|
@@ -4,13 +4,13 @@ import { ThemeColor } from '../../../providers/ThemeProvider/types';
|
|
|
4
4
|
|
|
5
5
|
const menuContainerCss = css`
|
|
6
6
|
position: absolute;
|
|
7
|
-
color: var(--color-
|
|
7
|
+
color: var(--color-base-900);
|
|
8
8
|
border-radius: var(--rounded-md);
|
|
9
9
|
padding: var(--space-1) 0;
|
|
10
10
|
box-shadow: var(--shadow-lg);
|
|
11
|
-
background-color: var(--color-
|
|
11
|
+
background-color: var(--color-base-100);
|
|
12
12
|
min-width: 20em;
|
|
13
|
-
outline: 1px solid var(--color-
|
|
13
|
+
outline: 1px solid var(--color-base-200);
|
|
14
14
|
display: flex;
|
|
15
15
|
flex-direction: column;
|
|
16
16
|
`;
|
|
@@ -63,30 +63,30 @@ export const MenuItemContainer = styled.div.attrs({
|
|
|
63
63
|
top: 50%;
|
|
64
64
|
transform: translateY(-50%);
|
|
65
65
|
border: 4px solid transparent;
|
|
66
|
-
border-left-color: var(--color-
|
|
66
|
+
border-left-color: var(--color-base-600);
|
|
67
67
|
}
|
|
68
68
|
`}
|
|
69
69
|
|
|
70
70
|
${({ $color, disabled }) =>
|
|
71
71
|
disabled
|
|
72
72
|
? css`
|
|
73
|
-
color: var(--color-
|
|
74
|
-
background-color: var(--color-
|
|
73
|
+
color: var(--color-base-300);
|
|
74
|
+
background-color: var(--color-base-100);
|
|
75
75
|
cursor: default;
|
|
76
76
|
`
|
|
77
77
|
: $color
|
|
78
78
|
? css`
|
|
79
79
|
color: var(--color-${$color}-600);
|
|
80
|
-
background-color: var(--color-
|
|
80
|
+
background-color: var(--color-base-100);
|
|
81
81
|
&:hover {
|
|
82
82
|
background-color: var(--color-${$color}-200);
|
|
83
83
|
}
|
|
84
84
|
`
|
|
85
85
|
: css`
|
|
86
|
-
color: var(--color-
|
|
87
|
-
background-color: var(--color-
|
|
86
|
+
color: var(--color-base-900);
|
|
87
|
+
background-color: var(--color-base-100);
|
|
88
88
|
&:hover {
|
|
89
|
-
background-color: var(--color-
|
|
89
|
+
background-color: var(--color-base-200);
|
|
90
90
|
}
|
|
91
91
|
`}
|
|
92
92
|
|
|
@@ -114,6 +114,6 @@ MenuItemContainer.displayName = 'MenuItemContainer';
|
|
|
114
114
|
export const Divider = styled.div.attrs({
|
|
115
115
|
className: 'Divider',
|
|
116
116
|
})`
|
|
117
|
-
border-top: 1px solid var(--color-
|
|
117
|
+
border-top: 1px solid var(--color-base-200);
|
|
118
118
|
margin: var(--space-1) 0;
|
|
119
119
|
`;
|
|
@@ -1,90 +1,90 @@
|
|
|
1
|
-
import { ComponentProps, forwardRef } from 'react';
|
|
2
|
-
import styled, { css } from 'styled-components';
|
|
3
|
-
|
|
4
|
-
import { ThemeColor } from '../../providers/ThemeProvider/types';
|
|
5
|
-
|
|
6
|
-
export const StyledLabel = styled.span.withConfig({
|
|
7
|
-
shouldForwardProp: () => true,
|
|
8
|
-
})<LabelProps>`
|
|
9
|
-
display: inline-flex;
|
|
10
|
-
align-items: center;
|
|
11
|
-
justify-content: center;
|
|
12
|
-
font-family: var(--font-sans);
|
|
13
|
-
font-weight: 500;
|
|
14
|
-
|
|
15
|
-
${({ color }) =>
|
|
16
|
-
color
|
|
17
|
-
? css`
|
|
18
|
-
background-color: var(--color-${color}-100);
|
|
19
|
-
color: var(--color-${color}-700);
|
|
20
|
-
svg {
|
|
21
|
-
fill: var(--color-${color}-700);
|
|
22
|
-
}
|
|
23
|
-
`
|
|
24
|
-
: css`
|
|
25
|
-
background-color: var(--color-
|
|
26
|
-
color: var(--color-
|
|
27
|
-
svg {
|
|
28
|
-
fill: var(--color-
|
|
29
|
-
}
|
|
30
|
-
`}
|
|
31
|
-
|
|
32
|
-
${({ bordered, color }) =>
|
|
33
|
-
bordered
|
|
34
|
-
? css`
|
|
35
|
-
border: 1px solid
|
|
36
|
-
${color ? `var(--color-${color}-200)` : 'var(--color-
|
|
37
|
-
`
|
|
38
|
-
: 'border: none;'}
|
|
39
|
-
|
|
40
|
-
${({ rounded }) => rounded && 'border-radius: var(--rounded-full);'}
|
|
41
|
-
|
|
42
|
-
&.small {
|
|
43
|
-
padding: var(--space-0_5) var(--space-1_5);
|
|
44
|
-
font-size: var(--text-xs);
|
|
45
|
-
border-radius: var(--rounded-sm);
|
|
46
|
-
svg {
|
|
47
|
-
margin-right: var(--space-1);
|
|
48
|
-
width: var(--space-3);
|
|
49
|
-
height: var(--space-3);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
&.medium {
|
|
54
|
-
padding: var(--space-1) var(--space-2);
|
|
55
|
-
font-size: var(--text-sm);
|
|
56
|
-
border-radius: var(--rounded-md);
|
|
57
|
-
svg {
|
|
58
|
-
margin-right: var(--space-1);
|
|
59
|
-
width: var(--space-3_5);
|
|
60
|
-
height: var(--space-3_5);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
&.large {
|
|
65
|
-
padding: var(--space-1_5) var(--space-2_5);
|
|
66
|
-
font-size: var(--text-base);
|
|
67
|
-
border-radius: var(--rounded-lg);
|
|
68
|
-
svg {
|
|
69
|
-
margin-right: var(--space-1_5);
|
|
70
|
-
width: var(--space-4);
|
|
71
|
-
height: var(--space-4);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
`;
|
|
75
|
-
|
|
76
|
-
export type LabelProps = {
|
|
77
|
-
color?: ThemeColor;
|
|
78
|
-
size?: 'small' | 'medium' | 'large';
|
|
79
|
-
rounded?: boolean;
|
|
80
|
-
bordered?: boolean;
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
export const Label = forwardRef<
|
|
84
|
-
HTMLSpanElement,
|
|
85
|
-
ComponentProps<typeof StyledLabel> & LabelProps
|
|
86
|
-
>(({ children, size = 'medium', className = '', ...props }, ref) => (
|
|
87
|
-
<StyledLabel ref={ref} className={`${size} ${className}`} {...props}>
|
|
88
|
-
{children}
|
|
89
|
-
</StyledLabel>
|
|
90
|
-
));
|
|
1
|
+
import { ComponentProps, forwardRef } from 'react';
|
|
2
|
+
import styled, { css } from 'styled-components';
|
|
3
|
+
|
|
4
|
+
import { ThemeColor } from '../../providers/ThemeProvider/types';
|
|
5
|
+
|
|
6
|
+
export const StyledLabel = styled.span.withConfig({
|
|
7
|
+
shouldForwardProp: () => true,
|
|
8
|
+
})<LabelProps>`
|
|
9
|
+
display: inline-flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
font-family: var(--font-sans);
|
|
13
|
+
font-weight: 500;
|
|
14
|
+
|
|
15
|
+
${({ color }) =>
|
|
16
|
+
color
|
|
17
|
+
? css`
|
|
18
|
+
background-color: var(--color-${color}-100);
|
|
19
|
+
color: var(--color-${color}-700);
|
|
20
|
+
svg {
|
|
21
|
+
fill: var(--color-${color}-700);
|
|
22
|
+
}
|
|
23
|
+
`
|
|
24
|
+
: css`
|
|
25
|
+
background-color: var(--color-base-100);
|
|
26
|
+
color: var(--color-base-700);
|
|
27
|
+
svg {
|
|
28
|
+
fill: var(--color-base-700);
|
|
29
|
+
}
|
|
30
|
+
`}
|
|
31
|
+
|
|
32
|
+
${({ bordered, color }) =>
|
|
33
|
+
bordered
|
|
34
|
+
? css`
|
|
35
|
+
border: 1px solid
|
|
36
|
+
${color ? `var(--color-${color}-200)` : 'var(--color-base-200)'};
|
|
37
|
+
`
|
|
38
|
+
: 'border: none;'}
|
|
39
|
+
|
|
40
|
+
${({ rounded }) => rounded && 'border-radius: var(--rounded-full);'}
|
|
41
|
+
|
|
42
|
+
&.small {
|
|
43
|
+
padding: var(--space-0_5) var(--space-1_5);
|
|
44
|
+
font-size: var(--text-xs);
|
|
45
|
+
border-radius: var(--rounded-sm);
|
|
46
|
+
svg {
|
|
47
|
+
margin-right: var(--space-1);
|
|
48
|
+
width: var(--space-3);
|
|
49
|
+
height: var(--space-3);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&.medium {
|
|
54
|
+
padding: var(--space-1) var(--space-2);
|
|
55
|
+
font-size: var(--text-sm);
|
|
56
|
+
border-radius: var(--rounded-md);
|
|
57
|
+
svg {
|
|
58
|
+
margin-right: var(--space-1);
|
|
59
|
+
width: var(--space-3_5);
|
|
60
|
+
height: var(--space-3_5);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&.large {
|
|
65
|
+
padding: var(--space-1_5) var(--space-2_5);
|
|
66
|
+
font-size: var(--text-base);
|
|
67
|
+
border-radius: var(--rounded-lg);
|
|
68
|
+
svg {
|
|
69
|
+
margin-right: var(--space-1_5);
|
|
70
|
+
width: var(--space-4);
|
|
71
|
+
height: var(--space-4);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
`;
|
|
75
|
+
|
|
76
|
+
export type LabelProps = {
|
|
77
|
+
color?: ThemeColor;
|
|
78
|
+
size?: 'small' | 'medium' | 'large';
|
|
79
|
+
rounded?: boolean;
|
|
80
|
+
bordered?: boolean;
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
export const Label = forwardRef<
|
|
84
|
+
HTMLSpanElement,
|
|
85
|
+
ComponentProps<typeof StyledLabel> & LabelProps
|
|
86
|
+
>(({ children, size = 'medium', className = '', ...props }, ref) => (
|
|
87
|
+
<StyledLabel ref={ref} className={`${size} ${className}`} {...props}>
|
|
88
|
+
{children}
|
|
89
|
+
</StyledLabel>
|
|
90
|
+
));
|
|
@@ -44,7 +44,7 @@ const colorsMap: Record<
|
|
|
44
44
|
};
|
|
45
45
|
|
|
46
46
|
export const Message: FC<MessageProps> = ({ children, title, type }) => {
|
|
47
|
-
const { iconComponent: Icon, baseColor = '
|
|
47
|
+
const { iconComponent: Icon, baseColor = 'base' } = colorsMap[type];
|
|
48
48
|
return (
|
|
49
49
|
<styles.MessageContainer $baseColor={baseColor}>
|
|
50
50
|
<Icon className="MessageIcon" />
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { FC, useEffect, useState } from 'react';
|
|
2
|
-
import { TabContainer, TabsListContainer } from './styles';
|
|
3
|
-
|
|
4
|
-
import { SpaceProps } from '../../../helpers';
|
|
5
|
-
import { Tab } from './types';
|
|
6
|
-
|
|
7
|
-
type TabsListProps = {
|
|
8
|
-
tabs: Tab[];
|
|
9
|
-
selectedIndex?: number;
|
|
10
|
-
onSelectedIndexChanged?: (index: number) => void;
|
|
11
|
-
} & SpaceProps;
|
|
12
|
-
|
|
13
|
-
export const TabsList: FC<TabsListProps> = ({
|
|
14
|
-
tabs,
|
|
15
|
-
selectedIndex,
|
|
16
|
-
onSelectedIndexChanged,
|
|
17
|
-
...spaceProps
|
|
18
|
-
}) => {
|
|
19
|
-
const [activeIndex, setActiveIndex] = useState(selectedIndex ?? 0);
|
|
20
|
-
|
|
21
|
-
useEffect(() => {
|
|
22
|
-
setActiveIndex(selectedIndex ?? 0);
|
|
23
|
-
}, [selectedIndex]);
|
|
24
|
-
|
|
25
|
-
useEffect(() => {
|
|
26
|
-
onSelectedIndexChanged?.(activeIndex);
|
|
27
|
-
}, [activeIndex, onSelectedIndexChanged]);
|
|
28
|
-
|
|
29
|
-
return (
|
|
30
|
-
<TabsListContainer {...spaceProps}>
|
|
31
|
-
{tabs.map((tab, index) => (
|
|
32
|
-
<TabContainer
|
|
33
|
-
key={index}
|
|
34
|
-
$color={tab.color}
|
|
35
|
-
$isActive={activeIndex === index}
|
|
36
|
-
onClick={() => setActiveIndex(index)}
|
|
37
|
-
>
|
|
38
|
-
{tab.icon ? <tab.icon /> : null}
|
|
39
|
-
{tab.tabName}
|
|
40
|
-
</TabContainer>
|
|
41
|
-
))}
|
|
42
|
-
</TabsListContainer>
|
|
43
|
-
);
|
|
44
|
-
};
|
|
1
|
+
import { FC, useEffect, useState } from 'react';
|
|
2
|
+
import { TabContainer, TabsListContainer } from './styles';
|
|
3
|
+
|
|
4
|
+
import { SpaceProps } from '../../../helpers';
|
|
5
|
+
import { Tab } from './types';
|
|
6
|
+
|
|
7
|
+
type TabsListProps = {
|
|
8
|
+
tabs: Tab[];
|
|
9
|
+
selectedIndex?: number;
|
|
10
|
+
onSelectedIndexChanged?: (index: number) => void;
|
|
11
|
+
} & SpaceProps;
|
|
12
|
+
|
|
13
|
+
export const TabsList: FC<TabsListProps> = ({
|
|
14
|
+
tabs,
|
|
15
|
+
selectedIndex,
|
|
16
|
+
onSelectedIndexChanged,
|
|
17
|
+
...spaceProps
|
|
18
|
+
}) => {
|
|
19
|
+
const [activeIndex, setActiveIndex] = useState(selectedIndex ?? 0);
|
|
20
|
+
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
setActiveIndex(selectedIndex ?? 0);
|
|
23
|
+
}, [selectedIndex]);
|
|
24
|
+
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
onSelectedIndexChanged?.(activeIndex);
|
|
27
|
+
}, [activeIndex, onSelectedIndexChanged]);
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<TabsListContainer {...spaceProps}>
|
|
31
|
+
{tabs.map((tab, index) => (
|
|
32
|
+
<TabContainer
|
|
33
|
+
key={index}
|
|
34
|
+
$color={tab.color}
|
|
35
|
+
$isActive={activeIndex === index}
|
|
36
|
+
onClick={() => setActiveIndex(index)}
|
|
37
|
+
>
|
|
38
|
+
{tab.icon ? <tab.icon /> : null}
|
|
39
|
+
{tab.tabName}
|
|
40
|
+
</TabContainer>
|
|
41
|
+
))}
|
|
42
|
+
</TabsListContainer>
|
|
43
|
+
);
|
|
44
|
+
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './types';
|
|
2
|
-
export * from './TabsView';
|
|
3
|
-
export * from './TabsList';
|
|
1
|
+
export * from './types';
|
|
2
|
+
export * from './TabsView';
|
|
3
|
+
export * from './TabsList';
|
|
@@ -32,15 +32,20 @@ export const TabContainer = styled.div<{
|
|
|
32
32
|
gap: var(--space-2);
|
|
33
33
|
cursor: pointer;
|
|
34
34
|
padding: 0 var(--space-2);
|
|
35
|
+
color: var(--color-base-800);
|
|
36
|
+
|
|
37
|
+
svg {
|
|
38
|
+
height: var(--space-4);
|
|
39
|
+
width: var(--space-4);
|
|
40
|
+
fill: var(--color-base-800);
|
|
41
|
+
}
|
|
35
42
|
|
|
36
43
|
${({ $color = 'primary' }) => css`
|
|
37
44
|
&:hover {
|
|
38
45
|
color: var(--color-${getColorWithIntensity($color, 500)});
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
height: var(--space-4);
|
|
43
|
-
width: var(--space-4);
|
|
46
|
+
svg {
|
|
47
|
+
fill: var(--color-${getColorWithIntensity($color, 500)});
|
|
48
|
+
}
|
|
44
49
|
}
|
|
45
50
|
`};
|
|
46
51
|
|
|
@@ -49,7 +54,9 @@ export const TabContainer = styled.div<{
|
|
|
49
54
|
css`
|
|
50
55
|
border-bottom: var(--space-0_5) solid;
|
|
51
56
|
color: var(--color-${getColorWithIntensity($color, 500)});
|
|
52
|
-
|
|
57
|
+
svg {
|
|
58
|
+
fill: var(--color-${getColorWithIntensity($color, 500)});
|
|
59
|
+
}
|
|
53
60
|
`}
|
|
54
61
|
`;
|
|
55
62
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './space';
|
|
1
|
+
export * from './space';
|