dgrcorrientes-modulos 1.0.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/.nvmrc +1 -0
- package/.prettierrc.cjs +8 -0
- package/.storybook/main.cjs +11 -0
- package/.storybook/manager-head.html +2 -0
- package/.storybook/manager.cjs +6 -0
- package/.storybook/preview-head.html +3 -0
- package/.storybook/preview.cjs +11 -0
- package/.storybook/themes.cjs +14 -0
- package/README.md +21 -0
- package/StoryBook.txt +19 -0
- package/dist-config.cjs +57 -0
- package/index.html +13 -0
- package/package.json +60 -0
- package/public/elevation.ico +0 -0
- package/public/elevationImage.png +0 -0
- package/public/vite.svg +1 -0
- package/src/App.scss +36 -0
- package/src/App.tsx +34 -0
- package/src/assets/react.svg +1 -0
- package/src/index.js +70 -0
- package/src/index.scss +63 -0
- package/src/index.ts +108 -0
- package/src/main.tsx +11 -0
- package/src/sass/base/_base.scss +50 -0
- package/src/sass/base/_controls.scss +90 -0
- package/src/sass/base/_datepicker.scss +114 -0
- package/src/sass/base/_typo.scss +71 -0
- package/src/sass/base/fonts/SFUIText-Bold.ttf +0 -0
- package/src/sass/base/fonts/SFUIText-BoldItalic.ttf +0 -0
- package/src/sass/base/fonts/SFUIText-Heavy.ttf +0 -0
- package/src/sass/base/fonts/SFUIText-HeavyItalic.ttf +0 -0
- package/src/sass/base/fonts/SFUIText-Light.ttf +0 -0
- package/src/sass/base/fonts/SFUIText-LightItalic.ttf +0 -0
- package/src/sass/base/fonts/SFUIText-Medium.ttf +0 -0
- package/src/sass/base/fonts/SFUIText-MediumItalic.ttf +0 -0
- package/src/sass/base/fonts/SFUIText-Regular.ttf +0 -0
- package/src/sass/base/fonts/SFUIText-RegularItalic.ttf +0 -0
- package/src/sass/base/fonts/SFUIText-Semibold.ttf +0 -0
- package/src/sass/base/fonts/SFUIText-SemiboldItalic.ttf +0 -0
- package/src/sass/bulma/bulma-changes.scss +19 -0
- package/src/sass/bulma/extensions/extensions.sass +1 -0
- package/src/sass/bulma/extensions/steps/bulma-steps.sass +3 -0
- package/src/sass/bulma/extensions/steps/index.sass +421 -0
- package/src/sass/bulma/variables/_variables-bulma.sass +16 -0
- package/src/sass/bulma/variables/components/card.sass +20 -0
- package/src/sass/bulma/variables/components/navbar.sass +50 -0
- package/src/sass/bulma/variables/components/tabs.sass +28 -0
- package/src/sass/bulma/variables/elements/button.sass +46 -0
- package/src/sass/bulma/variables/elements/notification.sass +8 -0
- package/src/sass/bulma/variables/elements/title.sass +20 -0
- package/src/sass/bulma/variables/grid/column.sass +2 -0
- package/src/sass/main.sass +16 -0
- package/src/sass/utilities/_bulma-variables.sass +20 -0
- package/src/sass/utilities/_derived-variables.scss +68 -0
- package/src/sass/utilities/_helpers.scss +70 -0
- package/src/sass/utilities/_variables.scss +147 -0
- package/src/stories/Changelog.stories.tsx +73 -0
- package/src/stories/Components/AssistanceDiary/AssistanceDiary.scss +19 -0
- package/src/stories/Components/AssistanceDiary/AssistanceDiary.stories.tsx +25 -0
- package/src/stories/Components/AssistanceDiary/AssistanceDiary.tsx +57 -0
- package/src/stories/Components/AverageAttended/AverageAttended.scss +39 -0
- package/src/stories/Components/AverageAttended/AverageAttended.stories.tsx +71 -0
- package/src/stories/Components/AverageAttended/AverageAttended.tsx +311 -0
- package/src/stories/Components/Breadcrumb/Breadcrumb.stories.tsx +45 -0
- package/src/stories/Components/Breadcrumb/Breadcrumb.tsx +68 -0
- package/src/stories/Components/Breadcrumb/breadcrumb.scss +82 -0
- package/src/stories/Components/CTA/CTA.scss +76 -0
- package/src/stories/Components/CTA/CTA.stories.tsx +46 -0
- package/src/stories/Components/CTA/CTA.tsx +70 -0
- package/src/stories/Components/Cards/Card CTA/CardCta.stories.tsx +34 -0
- package/src/stories/Components/Cards/Card CTA/CardCta.tsx +81 -0
- package/src/stories/Components/Cards/Card CTA/cardCta.scss +71 -0
- package/src/stories/Components/Cards/Card Expiration/cardExpiration.scss +105 -0
- package/src/stories/Components/Cards/Card Expiration/cardExpiration.stories.tsx +40 -0
- package/src/stories/Components/Cards/Card Expiration/cardExpiration.tsx +95 -0
- package/src/stories/Components/Cards/Card Vertical/CardVertical.stories.tsx +43 -0
- package/src/stories/Components/Cards/Card Vertical/CardVertical.tsx +106 -0
- package/src/stories/Components/Cards/Card Vertical/cardVertical.scss +130 -0
- package/src/stories/Components/Cards/CardActivity/cardActivity.scss +31 -0
- package/src/stories/Components/Cards/CardActivity/cardActivity.stories.tsx +20 -0
- package/src/stories/Components/Cards/CardActivity/cardActivity.tsx +48 -0
- package/src/stories/Components/Cards/CardHorizontal/CardHorizontal.stories.tsx +96 -0
- package/src/stories/Components/Cards/CardHorizontal/CardHorizontal.tsx +94 -0
- package/src/stories/Components/Cards/CardHorizontal/cardHorizontal.scss +65 -0
- package/src/stories/Components/Cards/CardUser/CardUser.stories.tsx +135 -0
- package/src/stories/Components/Cards/CardUser/CardUser.tsx +122 -0
- package/src/stories/Components/Cards/CardUser/cardUser.scss +115 -0
- package/src/stories/Components/Cart/Cart.scss +279 -0
- package/src/stories/Components/Cart/Cart.stories.tsx +350 -0
- package/src/stories/Components/Cart/Cart.tsx +277 -0
- package/src/stories/Components/Collapse/Collapse.scss +339 -0
- package/src/stories/Components/Collapse/Collapse.stories.tsx +766 -0
- package/src/stories/Components/Collapse/Collapse.tsx +451 -0
- package/src/stories/Components/CollapseEdit/CollapseEdit.scss +128 -0
- package/src/stories/Components/CollapseEdit/CollapseEdit.stories.tsx +29 -0
- package/src/stories/Components/CollapseEdit/CollapseEdit.tsx +185 -0
- package/src/stories/Components/CompleteDiary/CompleteDiary.scss +165 -0
- package/src/stories/Components/CompleteDiary/CompleteDiary.stories.tsx +219 -0
- package/src/stories/Components/CompleteDiary/CompleteDiary.tsx +394 -0
- package/src/stories/Components/Dropdown/Dropdown.scss +60 -0
- package/src/stories/Components/Dropdown/Dropdown.stories.tsx +19 -0
- package/src/stories/Components/Dropdown/Dropdown.tsx +99 -0
- package/src/stories/Components/EmptyState/EmptyState.stories.tsx +46 -0
- package/src/stories/Components/EmptyState/EmptyState.tsx +44 -0
- package/src/stories/Components/EmptyState/emptyState.scss +75 -0
- package/src/stories/Components/ErrorPage/ErrorPage.scss +65 -0
- package/src/stories/Components/ErrorPage/ErrorPage.stories.tsx +164 -0
- package/src/stories/Components/ErrorPage/ErrorPage.tsx +107 -0
- package/src/stories/Components/IncomingCall/IncomingCall.scss +27 -0
- package/src/stories/Components/IncomingCall/IncomingCall.stories.tsx +43 -0
- package/src/stories/Components/IncomingCall/IncomingCall.tsx +76 -0
- package/src/stories/Components/ModalConfirm/ModalConfirm.scss +30 -0
- package/src/stories/Components/ModalConfirm/ModalConfirm.stories.tsx +21 -0
- package/src/stories/Components/ModalConfirm/ModalConfirm.tsx +118 -0
- package/src/stories/Components/Pagination/Pagination.scss +42 -0
- package/src/stories/Components/Pagination/Pagination.stories.tsx +25 -0
- package/src/stories/Components/Pagination/Pagination.tsx +143 -0
- package/src/stories/Components/PerformanceAssessment/PerformanceAssessment.scss +26 -0
- package/src/stories/Components/PerformanceAssessment/PerformanceAssessment.stories.tsx +27 -0
- package/src/stories/Components/PerformanceAssessment/PerformanceAssessment.tsx +108 -0
- package/src/stories/Components/ShiftDiary/ShiftDiary.scss +45 -0
- package/src/stories/Components/ShiftDiary/ShiftDiary.stories.tsx +32 -0
- package/src/stories/Components/ShiftDiary/ShiftDiary.tsx +92 -0
- package/src/stories/Components/Stepper/Stepper.stories.tsx +26 -0
- package/src/stories/Components/Stepper/Stepper.tsx +102 -0
- package/src/stories/Components/Stepper/stepper.scss +59 -0
- package/src/stories/Components/Tabs/Tabs.stories.tsx +76 -0
- package/src/stories/Components/Tabs/Tabs.tsx +111 -0
- package/src/stories/Components/Tabs/tabs.scss +118 -0
- package/src/stories/Components/Tooltip/Tooltip.scss +235 -0
- package/src/stories/Components/Tooltip/Tooltip.stories.tsx +125 -0
- package/src/stories/Components/Tooltip/Tooltip.tsx +222 -0
- package/src/stories/Elements/Alert/Alert.stories.tsx +65 -0
- package/src/stories/Elements/Alert/Alert.tsx +49 -0
- package/src/stories/Elements/Alert/alert.scss +189 -0
- package/src/stories/Elements/Badge/Badge.stories.tsx +15 -0
- package/src/stories/Elements/Badge/Badge.tsx +21 -0
- package/src/stories/Elements/Badge/badge.scss +24 -0
- package/src/stories/Elements/Button/Button.stories.tsx +54 -0
- package/src/stories/Elements/Button/Button.tsx +118 -0
- package/src/stories/Elements/Button/button.scss +102 -0
- package/src/stories/Elements/Icon/Icon.stories.tsx +33 -0
- package/src/stories/Elements/Icon/Icon.tsx +57 -0
- package/src/stories/Elements/Icon/icon.scss +15 -0
- package/src/stories/Elements/Icon/icono.svg +1 -0
- package/src/stories/Elements/ProgressBar/ProgressBar.scss +26 -0
- package/src/stories/Elements/ProgressBar/ProgressBar.stories.tsx +19 -0
- package/src/stories/Elements/ProgressBar/ProgressBar.tsx +35 -0
- package/src/stories/Form/Autocomplete/Autocomplete.stories.tsx +55 -0
- package/src/stories/Form/Autocomplete/Autocomplete.tsx +160 -0
- package/src/stories/Form/Autocomplete/autocomplete.scss +311 -0
- package/src/stories/Form/Autocomplete-Prueba/Autocomplete.stories.tsx +50 -0
- package/src/stories/Form/Autocomplete-Prueba/AutocompletePrueba.tsx +83 -0
- package/src/stories/Form/Checkbox/Checkbox.stories.tsx +26 -0
- package/src/stories/Form/Checkbox/Checkbox.tsx +89 -0
- package/src/stories/Form/Checkbox/checkbox.scss +41 -0
- package/src/stories/Form/DatePicker/DatePickerExample.stories.tsx +27 -0
- package/src/stories/Form/DatePicker/DatePickerExample.tsx +65 -0
- package/src/stories/Form/DatePickerComponent/DatePickerComponent.scss +116 -0
- package/src/stories/Form/DatePickerComponent/DatePickerComponent.stories.tsx +37 -0
- package/src/stories/Form/DatePickerComponent/DatePickerComponent.tsx +97 -0
- package/src/stories/Form/Filters/Filters.stories.tsx +84 -0
- package/src/stories/Form/Filters/Filters.tsx +230 -0
- package/src/stories/Form/Filters/filters.scss +261 -0
- package/src/stories/Form/Input/Input.stories.tsx +25 -0
- package/src/stories/Form/Input/Input.tsx +86 -0
- package/src/stories/Form/Input/InputVar.sass +26 -0
- package/src/stories/Form/Input/input.scss +19 -0
- package/src/stories/Form/InputFormControl/Input-form-control.stories.tsx +26 -0
- package/src/stories/Form/InputFormControl/Input-form-control.tsx +48 -0
- package/src/stories/Form/InputFormControl/input-form-control.scss +34 -0
- package/src/stories/Form/Radio/Radio.stories.tsx +19 -0
- package/src/stories/Form/Radio/Radio.tsx +84 -0
- package/src/stories/Form/Radio/radio.scss +19 -0
- package/src/stories/Form/Search/Search.scss +50 -0
- package/src/stories/Form/Search/Search.stories.tsx +26 -0
- package/src/stories/Form/Search/Search.tsx +84 -0
- package/src/stories/Form/Select/Select.stories.tsx +55 -0
- package/src/stories/Form/Select/Select.tsx +121 -0
- package/src/stories/Form/Select/select.scss +303 -0
- package/src/stories/Form/Switch/Switch.stories.tsx +17 -0
- package/src/stories/Form/Switch/Switch.tsx +36 -0
- package/src/stories/Form/Switch/switch.scss +123 -0
- package/src/stories/Form/Textarea/Textarea.stories.tsx +19 -0
- package/src/stories/Form/Textarea/Textarea.tsx +52 -0
- package/src/stories/Form/Textarea/textarea.scss +25 -0
- package/src/stories/Form/UploadFileItem/UploadFileItem.scss +49 -0
- package/src/stories/Form/UploadFileItem/UploadFileItem.stories.tsx +18 -0
- package/src/stories/Form/UploadFileItem/UploadFileItem.tsx +89 -0
- package/src/stories/Form/UploadFiles/UploadFiles.scss +17 -0
- package/src/stories/Form/UploadFiles/UploadFiles.stories.tsx +32 -0
- package/src/stories/Form/UploadFiles/UploadFiles.tsx +177 -0
- package/src/stories/Layout/Footer/Footer.scss +129 -0
- package/src/stories/Layout/Footer/Footer.stories.tsx +101 -0
- package/src/stories/Layout/Footer/Footer.tsx +81 -0
- package/src/stories/Layout/Header/Header.scss +190 -0
- package/src/stories/Layout/Header/Header.stories.tsx +223 -0
- package/src/stories/Layout/Header/Header.tsx +278 -0
- package/src/stories/Layout/HeaderTable/HeaderTable.scss +21 -0
- package/src/stories/Layout/HeaderTable/HeaderTable.stories.tsx +112 -0
- package/src/stories/Layout/HeaderTable/HeaderTable.tsx +72 -0
- package/src/stories/Layout/Sidebar/Sidebar.scss +50 -0
- package/src/stories/Layout/Sidebar/Sidebar.stories.tsx +744 -0
- package/src/stories/Layout/Sidebar/Sidebar.tsx +129 -0
- package/src/stories/Layout/SidebarEmpty/SidebarEmpty.scss +64 -0
- package/src/stories/Layout/SidebarEmpty/SidebarEmpty.stories.tsx +26 -0
- package/src/stories/Layout/SidebarEmpty/SidebarEmpty.tsx +100 -0
- package/src/stories/Layout/Subtitle/Subtitle.scss +88 -0
- package/src/stories/Layout/Subtitle/Subtitle.stories.tsx +46 -0
- package/src/stories/Layout/Subtitle/Subtitle.tsx +108 -0
- package/src/stories/Layout/Title/Title.scss +79 -0
- package/src/stories/Layout/Title/Title.stories.tsx +86 -0
- package/src/stories/Layout/Title/Title.tsx +96 -0
- package/src/stories/Welcome.stories.tsx +111 -0
- package/src/stories/assets/404 Page Not Found _Two Color (1).png +0 -0
- package/src/stories/assets/404 Page Not Found _Two Color.png +0 -0
- package/src/stories/assets/Empty Inbox _Two Color.png +0 -0
- package/src/stories/assets/Loading _Two Color.png +0 -0
- package/src/stories/assets/Notifications_Two Color 1.png +0 -0
- package/src/stories/assets/Online protection_Two Color.png +0 -0
- package/src/stories/assets/Under Constructions _Two Color.png +0 -0
- package/src/stories/assets/bulma.png +0 -0
- package/src/stories/assets/burger.svg +5 -0
- package/src/stories/assets/code-brackets.svg +1 -0
- package/src/stories/assets/colors.svg +1 -0
- package/src/stories/assets/comments.svg +1 -0
- package/src/stories/assets/decor-bg.png +0 -0
- package/src/stories/assets/direction.svg +1 -0
- package/src/stories/assets/e-isologo.svg +4 -0
- package/src/stories/assets/e-isotype.svg +4 -0
- package/src/stories/assets/e-logo_negative.svg +14 -0
- package/src/stories/assets/e-logotype.svg +14 -0
- package/src/stories/assets/flow.svg +1 -0
- package/src/stories/assets/logo_gobierno_corrientes.svg +9 -0
- package/src/stories/assets/logo_rentas_corrientes.svg +10 -0
- package/src/stories/assets/logo_rentas_corrientes_compacto.svg +10 -0
- package/src/stories/assets/plugin.svg +1 -0
- package/src/stories/assets/repo.svg +1 -0
- package/src/stories/assets/stackalt.svg +1 -0
- package/src/stories/assets/storybook.svg +13 -0
- package/src/stories/assets/thumbnail-black.jpg +0 -0
- package/src/stories/assets/thumbnail-black[2].jpg +0 -0
- package/src/stories/assets/thumbnail.jpg +0 -0
- package/src/stories/assets/thumbnail[2].jpg +0 -0
- package/src/stories/changelog.ts +389 -0
- package/src/utils/functions.ts +57 -0
- package/src/vite-env.d.ts +2 -0
- package/static/e-isologo-192.jpg +0 -0
- package/static/e-isologo.svg +4 -0
- package/static/e-logotype.svg +14 -0
- package/static/favicon.ico +0 -0
- package/tsconfig.json +22 -0
- package/tsconfig.node.json +9 -0
- package/vite.config.ts +22 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import {ComponentStory, ComponentMeta} from '@storybook/react';
|
|
2
|
+
|
|
3
|
+
import {HeaderTable} from './HeaderTable';
|
|
4
|
+
import {Tooltip} from '../../Components/Tooltip/Tooltip';
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title: 'Layout/HeaderTable',
|
|
8
|
+
component: HeaderTable,
|
|
9
|
+
args: {
|
|
10
|
+
menuDropComponent: (
|
|
11
|
+
<Tooltip active contentType="text" text="Usá esta Base Imponible para tu declaración de Bienes Personales 2020" trianglePos="none" />
|
|
12
|
+
),
|
|
13
|
+
},
|
|
14
|
+
} as ComponentMeta<typeof HeaderTable>;
|
|
15
|
+
|
|
16
|
+
const Template: ComponentStory<typeof HeaderTable> = args => <HeaderTable {...args} />;
|
|
17
|
+
|
|
18
|
+
export const Example1 = Template.bind({});
|
|
19
|
+
Example1.args = {
|
|
20
|
+
search: {
|
|
21
|
+
size: 'normal',
|
|
22
|
+
placeholder: 'Buscar...',
|
|
23
|
+
backgroundColor: '#F5F5F5',
|
|
24
|
+
buttonSearch: {
|
|
25
|
+
fill: 'solid',
|
|
26
|
+
icon: 'fa-solid fa-magnifying-glass',
|
|
27
|
+
type: 'button',
|
|
28
|
+
onClick: () => console.log('Button Clicked'),
|
|
29
|
+
},
|
|
30
|
+
onChange: value => console.log(value),
|
|
31
|
+
},
|
|
32
|
+
selectList: [
|
|
33
|
+
{
|
|
34
|
+
size: 'md',
|
|
35
|
+
fill: 'outline',
|
|
36
|
+
placeholder: 'Default Select',
|
|
37
|
+
defaultValue: '1',
|
|
38
|
+
options: [
|
|
39
|
+
{value: '1', label: 'Option 1', icon: 'fa fa-house'},
|
|
40
|
+
{value: '2', label: 'Option 2'},
|
|
41
|
+
{value: '3', label: 'Option 3'},
|
|
42
|
+
],
|
|
43
|
+
onChangeSelect: value => {
|
|
44
|
+
console.log('Select changed' + ' ' + value);
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
size: 'md',
|
|
49
|
+
fill: 'outline',
|
|
50
|
+
placeholder: 'Default Select',
|
|
51
|
+
options: [
|
|
52
|
+
{value: '1', label: 'Option 1', icon: 'fa fa-house'},
|
|
53
|
+
{value: '2', label: 'Option 2'},
|
|
54
|
+
{value: '3', label: 'Option 3'},
|
|
55
|
+
],
|
|
56
|
+
onChangeSelect: value => {
|
|
57
|
+
console.log('Select changed' + ' ' + value);
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
size: 'md',
|
|
62
|
+
fill: 'outline',
|
|
63
|
+
placeholder: 'Default Select',
|
|
64
|
+
options: [
|
|
65
|
+
{value: '1', label: 'Option 1', icon: 'fa fa-house'},
|
|
66
|
+
{value: '2', label: 'Option 2'},
|
|
67
|
+
{value: '3', label: 'Option 3'},
|
|
68
|
+
],
|
|
69
|
+
onChangeSelect: value => {
|
|
70
|
+
console.log('Select changed' + ' ' + value);
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
button: {
|
|
75
|
+
fill: 'solid',
|
|
76
|
+
color: 'primary',
|
|
77
|
+
label: 'Button',
|
|
78
|
+
icon: 'fa-solid fa-plus',
|
|
79
|
+
},
|
|
80
|
+
menuButton: {
|
|
81
|
+
fill: 'unstyled',
|
|
82
|
+
size: 'medium',
|
|
83
|
+
color: 'primary',
|
|
84
|
+
icon: 'fa-solid fa-ellipsis-vertical',
|
|
85
|
+
},
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export const Example2 = Template.bind({});
|
|
89
|
+
Example2.args = {
|
|
90
|
+
search: {
|
|
91
|
+
size: 'normal',
|
|
92
|
+
placeholder: 'Buscar...',
|
|
93
|
+
backgroundColor: '#F5F5F5',
|
|
94
|
+
buttonSearch: {
|
|
95
|
+
fill: 'solid',
|
|
96
|
+
icon: 'fa-solid fa-magnifying-glass',
|
|
97
|
+
type: 'button',
|
|
98
|
+
onClick: () => console.log('Button Clicked'),
|
|
99
|
+
},
|
|
100
|
+
onChange: value => console.log(value),
|
|
101
|
+
},
|
|
102
|
+
pagination: {
|
|
103
|
+
totalItems: 340,
|
|
104
|
+
minItemsPerPage: 10,
|
|
105
|
+
onChangePage: page => {
|
|
106
|
+
console.log('Page selected: ' + page);
|
|
107
|
+
},
|
|
108
|
+
onChangeShowedItems: showedItems => {
|
|
109
|
+
console.log('ShowedItems: ' + showedItems);
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import {Search, ISearch} from '../../Form/Search/Search';
|
|
2
|
+
import {Pagination, IPagination} from '../../Components/Pagination/Pagination';
|
|
3
|
+
import {Select, ISelect} from '../../Form/Select/Select';
|
|
4
|
+
import {Button, IButton} from '../../Elements/Button/Button';
|
|
5
|
+
import './HeaderTable.scss';
|
|
6
|
+
import {useEffect, useRef, useState} from 'react';
|
|
7
|
+
import {generateRandomKey} from '../../../utils/functions';
|
|
8
|
+
|
|
9
|
+
export interface IHeaderTable extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
|
|
10
|
+
// base
|
|
11
|
+
search?: ISearch;
|
|
12
|
+
pagination?: IPagination;
|
|
13
|
+
selectList?: ISelect[];
|
|
14
|
+
button?: IButton;
|
|
15
|
+
menuButton?: IButton;
|
|
16
|
+
menuDropComponent?: React.ReactNode;
|
|
17
|
+
|
|
18
|
+
// react
|
|
19
|
+
className?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export const HeaderTable = ({className, search, pagination, selectList, button, menuButton, menuDropComponent, ...props}: IHeaderTable) => {
|
|
23
|
+
const [menuExpanded, setMenuExpanded] = useState(false);
|
|
24
|
+
|
|
25
|
+
const menuDropRef = useRef<HTMLDivElement>(null);
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
function handleClickOutside(event: MouseEvent) {
|
|
28
|
+
if (menuDropRef.current && !menuDropRef.current.contains(event.target as Node)) {
|
|
29
|
+
setMenuExpanded(false);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
document.addEventListener('click', handleClickOutside);
|
|
34
|
+
|
|
35
|
+
return () => {
|
|
36
|
+
document.removeEventListener('click', handleClickOutside);
|
|
37
|
+
};
|
|
38
|
+
}, [menuDropRef]);
|
|
39
|
+
|
|
40
|
+
return (
|
|
41
|
+
<div className={`elv-component elv-header-table ${className ? className : ''}`} {...props}>
|
|
42
|
+
<div className="header-table is-flex">
|
|
43
|
+
{search && (
|
|
44
|
+
<span>
|
|
45
|
+
<Search {...search}></Search>
|
|
46
|
+
</span>
|
|
47
|
+
)}
|
|
48
|
+
{selectList &&
|
|
49
|
+
selectList.map(selec => (
|
|
50
|
+
<span key={generateRandomKey()}>
|
|
51
|
+
<Select {...selec}></Select>
|
|
52
|
+
</span>
|
|
53
|
+
))}
|
|
54
|
+
{pagination && <Pagination {...pagination}></Pagination>}
|
|
55
|
+
{button && <Button {...button}></Button>}
|
|
56
|
+
{menuButton && (
|
|
57
|
+
<div ref={menuDropRef} className="menuButton">
|
|
58
|
+
<Button
|
|
59
|
+
{...menuButton}
|
|
60
|
+
onClick={() => {
|
|
61
|
+
setMenuExpanded(!menuExpanded);
|
|
62
|
+
menuButton.onClick && menuButton.onClick();
|
|
63
|
+
}}
|
|
64
|
+
></Button>
|
|
65
|
+
|
|
66
|
+
{menuDropComponent && menuExpanded && <div className="menuButton__dropComponent">{menuDropComponent}</div>}
|
|
67
|
+
</div>
|
|
68
|
+
)}
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
);
|
|
72
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
@import '/src/sass/utilities/variables';
|
|
2
|
+
|
|
3
|
+
.elv-sidebar {
|
|
4
|
+
.sidebar-container {
|
|
5
|
+
box-shadow: 0px 90px 200px rgba(5, 29, 61, 0.12);
|
|
6
|
+
border-radius: 16px 0px 0px 16px;
|
|
7
|
+
padding: 20px 0px 56px 0px;
|
|
8
|
+
position: fixed;
|
|
9
|
+
top: 0;
|
|
10
|
+
right: -315px;
|
|
11
|
+
width: 315px;
|
|
12
|
+
height: 100%;
|
|
13
|
+
transition: right 0.3s ease-in-out;
|
|
14
|
+
display: block;
|
|
15
|
+
background-color: $white;
|
|
16
|
+
z-index: 10000;
|
|
17
|
+
// overflow: hidden;
|
|
18
|
+
|
|
19
|
+
&.is-open {
|
|
20
|
+
right: 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&__header {
|
|
24
|
+
gap: 16px;
|
|
25
|
+
padding: 0px 16px 20px 16px;
|
|
26
|
+
border-bottom: 1px solid $truegray-100;
|
|
27
|
+
|
|
28
|
+
.title {
|
|
29
|
+
color: $primary-600;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&__search {
|
|
34
|
+
padding: 25px 16px 6px 16px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&__list {
|
|
38
|
+
.line-separation {
|
|
39
|
+
border-bottom: 1px solid $truegray-300;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&__pagination {
|
|
44
|
+
position: fixed;
|
|
45
|
+
bottom: 0;
|
|
46
|
+
padding: 25px;
|
|
47
|
+
background-color: $white;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|