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,129 @@
|
|
|
1
|
+
import React, {useEffect, useRef, useState} from 'react';
|
|
2
|
+
import './Sidebar.scss';
|
|
3
|
+
import {Search, ISearch} from '../../Form/Search/Search';
|
|
4
|
+
import {Button, IButton} from '../../Elements/Button/Button';
|
|
5
|
+
import {Pagination, IPagination} from '../../Components/Pagination/Pagination';
|
|
6
|
+
import {generateRandomKey} from '../../../utils/functions';
|
|
7
|
+
|
|
8
|
+
export interface ISidebar extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
|
|
9
|
+
// base
|
|
10
|
+
buttonShow: IButton;
|
|
11
|
+
title: string;
|
|
12
|
+
search?: ISearch;
|
|
13
|
+
|
|
14
|
+
listOfComponents: React.ReactNode[];
|
|
15
|
+
listLineSeparation: boolean;
|
|
16
|
+
listClassName: string;
|
|
17
|
+
|
|
18
|
+
itemsPerPage: number;
|
|
19
|
+
|
|
20
|
+
// boolean
|
|
21
|
+
show: boolean;
|
|
22
|
+
|
|
23
|
+
// events
|
|
24
|
+
onShow?: () => void;
|
|
25
|
+
onClose?: () => void;
|
|
26
|
+
|
|
27
|
+
// react
|
|
28
|
+
className?: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export const Sidebar = ({
|
|
32
|
+
className,
|
|
33
|
+
buttonShow,
|
|
34
|
+
title,
|
|
35
|
+
show,
|
|
36
|
+
search,
|
|
37
|
+
itemsPerPage = 5,
|
|
38
|
+
listClassName = '',
|
|
39
|
+
listOfComponents,
|
|
40
|
+
listLineSeparation = false,
|
|
41
|
+
onShow,
|
|
42
|
+
onClose,
|
|
43
|
+
...props
|
|
44
|
+
}: ISidebar) => {
|
|
45
|
+
const [showState, setShowState] = useState(show);
|
|
46
|
+
const [page, setPage] = useState(1);
|
|
47
|
+
const [componentHeight, setComponentHeight] = useState(0);
|
|
48
|
+
const componentRef = useRef<HTMLDivElement>(null);
|
|
49
|
+
const listItemsRef = useRef<HTMLDivElement>(null);
|
|
50
|
+
const [itemsPerPageState, setItemsPerPageState] = useState(itemsPerPage);
|
|
51
|
+
|
|
52
|
+
useEffect(() => {
|
|
53
|
+
setShowState(show);
|
|
54
|
+
}, [show]);
|
|
55
|
+
|
|
56
|
+
useEffect(() => {
|
|
57
|
+
setItemsPerPageState(itemsPerPage);
|
|
58
|
+
}, [itemsPerPage]);
|
|
59
|
+
|
|
60
|
+
const minHeight = `${itemsPerPage * componentHeight + itemsPerPage}px`;
|
|
61
|
+
|
|
62
|
+
return (
|
|
63
|
+
<div className="elv-component elv-sidebar" {...props}>
|
|
64
|
+
{!showState && (
|
|
65
|
+
<div className="is-flex is-justify-content-end">
|
|
66
|
+
<Button
|
|
67
|
+
{...buttonShow}
|
|
68
|
+
onClick={() => {
|
|
69
|
+
setShowState(true);
|
|
70
|
+
onShow && onShow();
|
|
71
|
+
}}
|
|
72
|
+
></Button>
|
|
73
|
+
</div>
|
|
74
|
+
)}
|
|
75
|
+
{showState && (
|
|
76
|
+
<div
|
|
77
|
+
className="modal-background"
|
|
78
|
+
onClick={() => {
|
|
79
|
+
setShowState(false);
|
|
80
|
+
onClose && onClose();
|
|
81
|
+
}}
|
|
82
|
+
></div>
|
|
83
|
+
)}
|
|
84
|
+
<div className={`sidebar-container is-flex is-flex-direction-column ${showState ? 'is-open' : ''} ${className ? className : ''}`}>
|
|
85
|
+
<div className="sidebar-container__header is-flex is-align-items-center">
|
|
86
|
+
<Button
|
|
87
|
+
fill="unstyled"
|
|
88
|
+
icon="fa-solid fa-xmark"
|
|
89
|
+
size="medium"
|
|
90
|
+
onClick={() => {
|
|
91
|
+
setShowState(false);
|
|
92
|
+
onClose && onClose();
|
|
93
|
+
}}
|
|
94
|
+
></Button>
|
|
95
|
+
<p className="title is-5">{title}</p>
|
|
96
|
+
</div>
|
|
97
|
+
{search && (
|
|
98
|
+
<div className="sidebar-container__search">
|
|
99
|
+
<Search {...search}></Search>
|
|
100
|
+
</div>
|
|
101
|
+
)}
|
|
102
|
+
<div
|
|
103
|
+
ref={listItemsRef}
|
|
104
|
+
className={`sidebar-container__list is-flex is-flex-direction-column is-gap-4 ${listClassName} `}
|
|
105
|
+
style={{minHeight}}
|
|
106
|
+
>
|
|
107
|
+
{listOfComponents.slice((page - 1) * itemsPerPage, page * itemsPerPage).map((comp, index) => (
|
|
108
|
+
<div key={generateRandomKey()} ref={componentRef} className={`listItem ${listLineSeparation ? ' line-separation' : ''}`}>
|
|
109
|
+
{comp}
|
|
110
|
+
</div>
|
|
111
|
+
))}
|
|
112
|
+
</div>
|
|
113
|
+
<div className="sidebar-container__pagination is-flex is-justify-content-center is-align-items-end">
|
|
114
|
+
{listOfComponents?.length > itemsPerPage && (
|
|
115
|
+
<Pagination
|
|
116
|
+
onChangePage={value => {
|
|
117
|
+
setPage(value);
|
|
118
|
+
}}
|
|
119
|
+
minItemsPerPage={itemsPerPageState}
|
|
120
|
+
totalItems={listOfComponents.length}
|
|
121
|
+
showTotals={true}
|
|
122
|
+
isColumn
|
|
123
|
+
></Pagination>
|
|
124
|
+
)}
|
|
125
|
+
</div>
|
|
126
|
+
</div>
|
|
127
|
+
</div>
|
|
128
|
+
);
|
|
129
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
@import '/src/sass/utilities/variables';
|
|
2
|
+
|
|
3
|
+
.elv-sidebarEmpty {
|
|
4
|
+
.sidebar-container {
|
|
5
|
+
box-shadow: -15px 0px 40px -1px rgba(14, 31, 53, 0.2);
|
|
6
|
+
border-radius: 16px 0px 0px 16px;
|
|
7
|
+
background-color: $white;
|
|
8
|
+
height: 100%;
|
|
9
|
+
position: fixed;
|
|
10
|
+
width: 315px;
|
|
11
|
+
top: 0;
|
|
12
|
+
z-index: 10000;
|
|
13
|
+
|
|
14
|
+
&__header {
|
|
15
|
+
padding: 10px 0px;
|
|
16
|
+
border-bottom: 1px solid $truegray-300;
|
|
17
|
+
}
|
|
18
|
+
&__button {
|
|
19
|
+
width: 24px;
|
|
20
|
+
}
|
|
21
|
+
&__content {
|
|
22
|
+
height: 100%;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&--right {
|
|
26
|
+
right: -315px;
|
|
27
|
+
transition: right 0.3s ease-in-out;
|
|
28
|
+
border-radius: 16px 0px 0px 16px;
|
|
29
|
+
|
|
30
|
+
&.is-open {
|
|
31
|
+
right: 0;
|
|
32
|
+
}
|
|
33
|
+
@media screen and (max-width: $mobile) {
|
|
34
|
+
right: -80%;
|
|
35
|
+
width: 80%;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&--left {
|
|
40
|
+
left: -315px;
|
|
41
|
+
transition: left 0.3s ease-in-out;
|
|
42
|
+
border-radius: 0px 16px 16px 0px;
|
|
43
|
+
|
|
44
|
+
&.is-open {
|
|
45
|
+
left: 0;
|
|
46
|
+
}
|
|
47
|
+
@media screen and (max-width: $mobile) {
|
|
48
|
+
left: -80%;
|
|
49
|
+
width: 80%;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.button-container {
|
|
54
|
+
gap: 16px;
|
|
55
|
+
box-shadow: 1px -6px 16px 0px rgba(151, 151, 151, 0.25);
|
|
56
|
+
border-radius: 0px 0px 0px 16px;
|
|
57
|
+
padding-top: 30px;
|
|
58
|
+
|
|
59
|
+
@media screen and (max-width: $mobile) {
|
|
60
|
+
padding-left: 0px !important;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import {ComponentStory, ComponentMeta} from '@storybook/react';
|
|
2
|
+
import {SidebarEmpty} from './SidebarEmpty';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Layout/SidebarEmpty',
|
|
6
|
+
component: SidebarEmpty,
|
|
7
|
+
args: {
|
|
8
|
+
buttonShow: {
|
|
9
|
+
label: 'Mostrar',
|
|
10
|
+
fill: 'solid',
|
|
11
|
+
color: 'primary',
|
|
12
|
+
icon: 'fa-solid fa-chevron-left',
|
|
13
|
+
},
|
|
14
|
+
title: 'Agregar actividad',
|
|
15
|
+
optionalButton: {fill: 'outline', color: 'secondary', size: 'normal', label: 'Cancelar'},
|
|
16
|
+
optionalButton2: {fill: 'solid', color: 'tertiary', size: 'normal', label: 'Agregar'},
|
|
17
|
+
position: 'right',
|
|
18
|
+
show: true,
|
|
19
|
+
footerbutton: true,
|
|
20
|
+
},
|
|
21
|
+
} as ComponentMeta<typeof SidebarEmpty>;
|
|
22
|
+
|
|
23
|
+
const Template: ComponentStory<typeof SidebarEmpty> = args => <SidebarEmpty {...args} />;
|
|
24
|
+
|
|
25
|
+
export const Standard = Template.bind({});
|
|
26
|
+
Standard.args = {};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import './SidebarEmpty.scss';
|
|
2
|
+
import {Button, IButton} from '../../Elements/Button/Button';
|
|
3
|
+
import {Checkbox, ICheckbox} from '../../Form/Checkbox/Checkbox';
|
|
4
|
+
import {useEffect, useState} from 'react';
|
|
5
|
+
|
|
6
|
+
export interface ISidebarEmpty extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
|
|
7
|
+
// BASE
|
|
8
|
+
title: string;
|
|
9
|
+
show: boolean;
|
|
10
|
+
button: IButton;
|
|
11
|
+
buttonShow: IButton;
|
|
12
|
+
optionalButton: IButton;
|
|
13
|
+
optionalButton2: IButton;
|
|
14
|
+
children?: React.ReactNode;
|
|
15
|
+
position: 'left' | 'right';
|
|
16
|
+
footerbutton: boolean;
|
|
17
|
+
|
|
18
|
+
// IS-OPTIONS
|
|
19
|
+
|
|
20
|
+
// EVENTS
|
|
21
|
+
|
|
22
|
+
// GENERIC
|
|
23
|
+
className?: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export const SidebarEmpty = ({
|
|
27
|
+
className,
|
|
28
|
+
title,
|
|
29
|
+
show,
|
|
30
|
+
button,
|
|
31
|
+
buttonShow,
|
|
32
|
+
optionalButton,
|
|
33
|
+
optionalButton2,
|
|
34
|
+
children,
|
|
35
|
+
position = 'right',
|
|
36
|
+
footerbutton,
|
|
37
|
+
...props
|
|
38
|
+
}: ISidebarEmpty) => {
|
|
39
|
+
const [showState, setShowState] = useState(show);
|
|
40
|
+
|
|
41
|
+
useEffect(() => {
|
|
42
|
+
setShowState(show);
|
|
43
|
+
}, [show]);
|
|
44
|
+
|
|
45
|
+
return (
|
|
46
|
+
<div className="elv-component elv-sidebarEmpty" {...props}>
|
|
47
|
+
{!showState && (
|
|
48
|
+
<div className="is-flex is-justify-content-end">
|
|
49
|
+
<Button
|
|
50
|
+
{...buttonShow}
|
|
51
|
+
onClick={() => {
|
|
52
|
+
setShowState(true);
|
|
53
|
+
}}
|
|
54
|
+
></Button>
|
|
55
|
+
</div>
|
|
56
|
+
)}
|
|
57
|
+
{showState && (
|
|
58
|
+
<div
|
|
59
|
+
className="modal-background"
|
|
60
|
+
onClick={() => {
|
|
61
|
+
setShowState(false);
|
|
62
|
+
}}
|
|
63
|
+
></div>
|
|
64
|
+
)}
|
|
65
|
+
<div
|
|
66
|
+
className={[
|
|
67
|
+
`sidebar-container is-flex is-flex-direction-column is-justify-content-space-between ${showState ? 'is-open' : ''}`,
|
|
68
|
+
` sidebar-container--${position}`,
|
|
69
|
+
`${className ? ' ' + className : ''}`,
|
|
70
|
+
].join('')}
|
|
71
|
+
>
|
|
72
|
+
<div>
|
|
73
|
+
<div className="sidebar-container__header is-flex is-align-items-center mb-6 is-gap-4">
|
|
74
|
+
<div className="sidebar-container__button mr-3">
|
|
75
|
+
<Button
|
|
76
|
+
{...button}
|
|
77
|
+
fill="unstyled"
|
|
78
|
+
icon="fa-solid fa-xmark"
|
|
79
|
+
size="medium"
|
|
80
|
+
onClick={() => {
|
|
81
|
+
setShowState(false);
|
|
82
|
+
}}
|
|
83
|
+
></Button>
|
|
84
|
+
</div>
|
|
85
|
+
<p className="title is-5 has-text-link-dark">{title}</p>
|
|
86
|
+
</div>
|
|
87
|
+
<div className="sidebar-container__content">{children}</div>
|
|
88
|
+
</div>
|
|
89
|
+
{footerbutton && (
|
|
90
|
+
<div>
|
|
91
|
+
<div className="button-container is-flex pl-5 pb-5">
|
|
92
|
+
<div className="button-container__opt ml-5">{optionalButton && <Button {...optionalButton}></Button>}</div>
|
|
93
|
+
<div className="button-container__opt">{optionalButton2 && <Button {...optionalButton2}></Button>}</div>
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|
|
96
|
+
)}
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
99
|
+
);
|
|
100
|
+
};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
@import '/src/sass/utilities/variables';
|
|
2
|
+
|
|
3
|
+
.subtitle-component {
|
|
4
|
+
display: flex;
|
|
5
|
+
justify-content: space-between;
|
|
6
|
+
|
|
7
|
+
&--border-bot-gray {
|
|
8
|
+
border-bottom: 1px solid $truegray-300;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
&__left {
|
|
12
|
+
gap: 5px;
|
|
13
|
+
padding-bottom: 10px;
|
|
14
|
+
|
|
15
|
+
.left-backButton {
|
|
16
|
+
.button {
|
|
17
|
+
font-size: 20px;
|
|
18
|
+
padding-top: 10px;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.left-texts {
|
|
23
|
+
&__principal {
|
|
24
|
+
gap: 16px;
|
|
25
|
+
|
|
26
|
+
&__rectangle {
|
|
27
|
+
width: 24px;
|
|
28
|
+
height: 16px;
|
|
29
|
+
background-color: $primary-600;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&__label {
|
|
33
|
+
font-weight: $fw-heavy;
|
|
34
|
+
font-size: 24px;
|
|
35
|
+
line-height: 33px;
|
|
36
|
+
|
|
37
|
+
&--lg {
|
|
38
|
+
font-size: 32px;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&__description {
|
|
44
|
+
color: $text-600;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&__right {
|
|
50
|
+
gap: 15px;
|
|
51
|
+
|
|
52
|
+
.right-linkButton {
|
|
53
|
+
.button {
|
|
54
|
+
padding: 0px;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.right-switcher {
|
|
59
|
+
gap: 10px;
|
|
60
|
+
|
|
61
|
+
&__label {
|
|
62
|
+
font-size: 14px;
|
|
63
|
+
color: $text-600;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.right-editButtons {
|
|
68
|
+
gap: 30px;
|
|
69
|
+
|
|
70
|
+
&__addButton {
|
|
71
|
+
.button {
|
|
72
|
+
color: $primary-600;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
&__removeButton {
|
|
77
|
+
.button {
|
|
78
|
+
color: $error-600;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.right-label {
|
|
84
|
+
font-weight: $fw-semibold;
|
|
85
|
+
font-size: 18px;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {ComponentStory, ComponentMeta} from '@storybook/react';
|
|
3
|
+
import icon from '../../Elements/Icon/icono.svg';
|
|
4
|
+
|
|
5
|
+
import {Subtitle} from './Subtitle';
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
title: 'Layout/Subtitle',
|
|
9
|
+
component: Subtitle,
|
|
10
|
+
args: {
|
|
11
|
+
border: true,
|
|
12
|
+
},
|
|
13
|
+
} as ComponentMeta<typeof Subtitle>;
|
|
14
|
+
|
|
15
|
+
const Template: ComponentStory<typeof Subtitle> = args => <Subtitle {...args} />;
|
|
16
|
+
|
|
17
|
+
export const Standard = Template.bind({});
|
|
18
|
+
Standard.args = {label: 'Datos de contacto'};
|
|
19
|
+
|
|
20
|
+
export const Example_SVG_Icon = Template.bind({});
|
|
21
|
+
Example_SVG_Icon.args = {label: 'Datos de contacto', leftIcon: {icon: icon, type: 'svg_icon', size: '18px'}};
|
|
22
|
+
|
|
23
|
+
export const AllPropsActive = Template.bind({});
|
|
24
|
+
AllPropsActive.args = {
|
|
25
|
+
label: 'Datos de contacto',
|
|
26
|
+
leftIcon: {icon: 'fa-solid fa-car', size: '18px'},
|
|
27
|
+
rectangle: true,
|
|
28
|
+
linkButton: {
|
|
29
|
+
label: 'Ver más',
|
|
30
|
+
size: 'small',
|
|
31
|
+
fill: 'link',
|
|
32
|
+
type: 'button',
|
|
33
|
+
onClick: () => console.log('Añadir Clicked'),
|
|
34
|
+
},
|
|
35
|
+
iconButton: {
|
|
36
|
+
size: 'medium',
|
|
37
|
+
fill: 'unstyled',
|
|
38
|
+
icon: 'fa-solid fa-magnifying-glass',
|
|
39
|
+
type: 'button',
|
|
40
|
+
onClick: () => console.log('Añadir Clicked'),
|
|
41
|
+
},
|
|
42
|
+
description: 'Descargá el comprobante. Encontrá más información',
|
|
43
|
+
switcherLabel: 'Ver disponibles',
|
|
44
|
+
switcher: {size: 'md', disabled: false, defaultChecked: true, onCheck: check => console.log('Switcher Check ' + check)},
|
|
45
|
+
labelRight: '$ 12.000.662',
|
|
46
|
+
};
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './Subtitle.scss';
|
|
3
|
+
import {Icon, IIcon} from '../../Elements/Icon/Icon';
|
|
4
|
+
import {Button, IButton} from '../../Elements/Button/Button';
|
|
5
|
+
import {Switch, ISwitch} from '../../Form/Switch/Switch';
|
|
6
|
+
|
|
7
|
+
export interface ISubtitle extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
|
|
8
|
+
// base
|
|
9
|
+
size?: 'md' | 'lg';
|
|
10
|
+
//LEFT
|
|
11
|
+
label?: string;
|
|
12
|
+
backButton?: IButton;
|
|
13
|
+
leftIcon?: IIcon;
|
|
14
|
+
rectangle?: boolean;
|
|
15
|
+
description?: string;
|
|
16
|
+
actionButtons?: IButton[];
|
|
17
|
+
//RIGHT
|
|
18
|
+
addButton?: IButton;
|
|
19
|
+
removeButton?: IButton;
|
|
20
|
+
linkButton?: IButton;
|
|
21
|
+
iconButton?: IButton;
|
|
22
|
+
switcherLabel?: string;
|
|
23
|
+
switcher?: ISwitch;
|
|
24
|
+
labelRight?: string;
|
|
25
|
+
|
|
26
|
+
// boolean
|
|
27
|
+
border?: boolean;
|
|
28
|
+
|
|
29
|
+
// react
|
|
30
|
+
className?: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export const Subtitle = ({
|
|
34
|
+
className,
|
|
35
|
+
border,
|
|
36
|
+
size,
|
|
37
|
+
label,
|
|
38
|
+
description,
|
|
39
|
+
backButton,
|
|
40
|
+
leftIcon,
|
|
41
|
+
rectangle,
|
|
42
|
+
actionButtons,
|
|
43
|
+
addButton,
|
|
44
|
+
removeButton,
|
|
45
|
+
linkButton,
|
|
46
|
+
iconButton,
|
|
47
|
+
switcherLabel,
|
|
48
|
+
switcher,
|
|
49
|
+
labelRight,
|
|
50
|
+
...props
|
|
51
|
+
}: ISubtitle) => {
|
|
52
|
+
return (
|
|
53
|
+
<div className="elv-component elv-subtitle" {...props}>
|
|
54
|
+
<div className={`subtitle-component ${border && 'subtitle-component--border-bot-gray'} ${className ? className : ''}`}>
|
|
55
|
+
<div className="subtitle-component__left is-flex is-justify-content-start is-align-items-start">
|
|
56
|
+
{backButton && (
|
|
57
|
+
<div className="left-backButton">
|
|
58
|
+
<Button {...backButton}></Button>
|
|
59
|
+
</div>
|
|
60
|
+
)}
|
|
61
|
+
<div className="left-texts">
|
|
62
|
+
<div className="left-texts__principal is-flex is-align-items-center">
|
|
63
|
+
{leftIcon && <Icon {...leftIcon}></Icon>}
|
|
64
|
+
{rectangle && <span className="left-texts__principal__rectangle"></span>}
|
|
65
|
+
{label && <p className={`left-texts__principal__label left-texts__principal__label--${size}`}>{label}</p>}
|
|
66
|
+
</div>
|
|
67
|
+
{description && <p className={`left-texts__description left-texts__description--${size}`}>{description}</p>}
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
<div className="subtitle-component__right is-flex is-align-items-center">
|
|
71
|
+
{addButton || removeButton ? (
|
|
72
|
+
<div className="right-editButtons is-flex">
|
|
73
|
+
{addButton && (
|
|
74
|
+
<span className="right-editButtons__addButton">
|
|
75
|
+
<Button {...addButton}></Button>
|
|
76
|
+
</span>
|
|
77
|
+
)}
|
|
78
|
+
{removeButton && (
|
|
79
|
+
<span className="right-editButtons__removeButton">
|
|
80
|
+
<Button {...removeButton}></Button>
|
|
81
|
+
</span>
|
|
82
|
+
)}
|
|
83
|
+
</div>
|
|
84
|
+
) : (
|
|
85
|
+
<></>
|
|
86
|
+
)}
|
|
87
|
+
{linkButton && (
|
|
88
|
+
<span className="right-linkButton">
|
|
89
|
+
<Button {...linkButton}></Button>
|
|
90
|
+
</span>
|
|
91
|
+
)}
|
|
92
|
+
{iconButton && (
|
|
93
|
+
<span>
|
|
94
|
+
<Button {...iconButton}></Button>
|
|
95
|
+
</span>
|
|
96
|
+
)}
|
|
97
|
+
{switcher && (
|
|
98
|
+
<div className="right-switcher is-flex is-align-items-center">
|
|
99
|
+
{switcherLabel && <p className="right-switcher__label">{switcherLabel}</p>}
|
|
100
|
+
<Switch {...switcher}></Switch>
|
|
101
|
+
</div>
|
|
102
|
+
)}
|
|
103
|
+
{labelRight && <p className="right-label">{labelRight}</p>}
|
|
104
|
+
</div>
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
);
|
|
108
|
+
};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
@import '/src/sass/utilities/variables';
|
|
2
|
+
|
|
3
|
+
.title-component-container {
|
|
4
|
+
min-width: 320px;
|
|
5
|
+
|
|
6
|
+
&__backButton {
|
|
7
|
+
width: 100%;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.title-component {
|
|
11
|
+
gap: 5px;
|
|
12
|
+
|
|
13
|
+
&--center {
|
|
14
|
+
align-items: center;
|
|
15
|
+
text-align: center;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&--right {
|
|
19
|
+
align-items: end;
|
|
20
|
+
text-align: right;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&__subtitle {
|
|
24
|
+
font-size: 14px;
|
|
25
|
+
line-height: 20px;
|
|
26
|
+
color: $text-400;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&__title {
|
|
30
|
+
font-size: 32px;
|
|
31
|
+
font-weight: $fw-heavy;
|
|
32
|
+
color: $text-900;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&__content {
|
|
36
|
+
&--center {
|
|
37
|
+
align-items: center;
|
|
38
|
+
text-align: center;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&--right {
|
|
42
|
+
align-items: end;
|
|
43
|
+
text-align: right;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&--backButton {
|
|
47
|
+
max-width: 700px;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&__description {
|
|
52
|
+
font-weight: $fw-regular;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&__secondDescription {
|
|
56
|
+
padding-top: 20px;
|
|
57
|
+
font-weight: $fw-regular;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&__actionButtons {
|
|
61
|
+
padding-top: 28px;
|
|
62
|
+
padding-bottom: 28px;
|
|
63
|
+
gap: 10px;
|
|
64
|
+
|
|
65
|
+
.button {
|
|
66
|
+
font-weight: $fw-medium;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&__button {
|
|
71
|
+
margin-top: 10px;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&__search {
|
|
75
|
+
width: 100%;
|
|
76
|
+
max-width: 600px;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|