dgrcorrientes-modulos 1.0.2 → 1.0.4
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/README.md +12 -21
- package/components.js +31576 -0
- package/components.umd.cjs +311 -0
- package/index.d.ts +1 -0
- package/package.json +1 -60
- package/style.css +5 -0
- package/.nvmrc +0 -1
- package/.prettierrc.cjs +0 -8
- package/.storybook/main.cjs +0 -11
- package/.storybook/manager-head.html +0 -2
- package/.storybook/manager.cjs +0 -6
- package/.storybook/preview-head.html +0 -3
- package/.storybook/preview.cjs +0 -11
- package/.storybook/themes.cjs +0 -14
- package/StoryBook.txt +0 -19
- package/dist-config.cjs +0 -57
- package/index.html +0 -13
- package/src/App.scss +0 -36
- package/src/App.tsx +0 -34
- package/src/assets/react.svg +0 -1
- package/src/index.js +0 -70
- package/src/index.scss +0 -63
- package/src/index.ts +0 -108
- package/src/main.tsx +0 -11
- package/src/sass/base/_base.scss +0 -50
- package/src/sass/base/_controls.scss +0 -90
- package/src/sass/base/_datepicker.scss +0 -114
- package/src/sass/base/_typo.scss +0 -71
- 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 +0 -19
- package/src/sass/bulma/extensions/extensions.sass +0 -1
- package/src/sass/bulma/extensions/steps/bulma-steps.sass +0 -3
- package/src/sass/bulma/extensions/steps/index.sass +0 -421
- package/src/sass/bulma/variables/_variables-bulma.sass +0 -16
- package/src/sass/bulma/variables/components/card.sass +0 -20
- package/src/sass/bulma/variables/components/navbar.sass +0 -50
- package/src/sass/bulma/variables/components/tabs.sass +0 -28
- package/src/sass/bulma/variables/elements/button.sass +0 -46
- package/src/sass/bulma/variables/elements/notification.sass +0 -8
- package/src/sass/bulma/variables/elements/title.sass +0 -20
- package/src/sass/bulma/variables/grid/column.sass +0 -2
- package/src/sass/main.sass +0 -16
- package/src/sass/utilities/_bulma-variables.sass +0 -20
- package/src/sass/utilities/_derived-variables.scss +0 -68
- package/src/sass/utilities/_helpers.scss +0 -70
- package/src/sass/utilities/_variables.scss +0 -147
- package/src/stories/Changelog.stories.tsx +0 -73
- package/src/stories/Components/AssistanceDiary/AssistanceDiary.scss +0 -19
- package/src/stories/Components/AssistanceDiary/AssistanceDiary.stories.tsx +0 -25
- package/src/stories/Components/AssistanceDiary/AssistanceDiary.tsx +0 -57
- package/src/stories/Components/AverageAttended/AverageAttended.scss +0 -39
- package/src/stories/Components/AverageAttended/AverageAttended.stories.tsx +0 -71
- package/src/stories/Components/AverageAttended/AverageAttended.tsx +0 -311
- package/src/stories/Components/Breadcrumb/Breadcrumb.stories.tsx +0 -45
- package/src/stories/Components/Breadcrumb/Breadcrumb.tsx +0 -68
- package/src/stories/Components/Breadcrumb/breadcrumb.scss +0 -82
- package/src/stories/Components/CTA/CTA.scss +0 -76
- package/src/stories/Components/CTA/CTA.stories.tsx +0 -46
- package/src/stories/Components/CTA/CTA.tsx +0 -70
- package/src/stories/Components/Cards/Card CTA/CardCta.stories.tsx +0 -34
- package/src/stories/Components/Cards/Card CTA/CardCta.tsx +0 -81
- package/src/stories/Components/Cards/Card CTA/cardCta.scss +0 -71
- package/src/stories/Components/Cards/Card Expiration/cardExpiration.scss +0 -105
- package/src/stories/Components/Cards/Card Expiration/cardExpiration.stories.tsx +0 -40
- package/src/stories/Components/Cards/Card Expiration/cardExpiration.tsx +0 -95
- package/src/stories/Components/Cards/Card Vertical/CardVertical.stories.tsx +0 -43
- package/src/stories/Components/Cards/Card Vertical/CardVertical.tsx +0 -106
- package/src/stories/Components/Cards/Card Vertical/cardVertical.scss +0 -130
- package/src/stories/Components/Cards/CardActivity/cardActivity.scss +0 -31
- package/src/stories/Components/Cards/CardActivity/cardActivity.stories.tsx +0 -20
- package/src/stories/Components/Cards/CardActivity/cardActivity.tsx +0 -48
- package/src/stories/Components/Cards/CardHorizontal/CardHorizontal.stories.tsx +0 -96
- package/src/stories/Components/Cards/CardHorizontal/CardHorizontal.tsx +0 -94
- package/src/stories/Components/Cards/CardHorizontal/cardHorizontal.scss +0 -65
- package/src/stories/Components/Cards/CardUser/CardUser.stories.tsx +0 -135
- package/src/stories/Components/Cards/CardUser/CardUser.tsx +0 -122
- package/src/stories/Components/Cards/CardUser/cardUser.scss +0 -115
- package/src/stories/Components/Cart/Cart.scss +0 -279
- package/src/stories/Components/Cart/Cart.stories.tsx +0 -350
- package/src/stories/Components/Cart/Cart.tsx +0 -277
- package/src/stories/Components/Collapse/Collapse.scss +0 -339
- package/src/stories/Components/Collapse/Collapse.stories.tsx +0 -766
- package/src/stories/Components/Collapse/Collapse.tsx +0 -451
- package/src/stories/Components/CollapseEdit/CollapseEdit.scss +0 -128
- package/src/stories/Components/CollapseEdit/CollapseEdit.stories.tsx +0 -29
- package/src/stories/Components/CollapseEdit/CollapseEdit.tsx +0 -185
- package/src/stories/Components/CompleteDiary/CompleteDiary.scss +0 -165
- package/src/stories/Components/CompleteDiary/CompleteDiary.stories.tsx +0 -219
- package/src/stories/Components/CompleteDiary/CompleteDiary.tsx +0 -394
- package/src/stories/Components/Dropdown/Dropdown.scss +0 -60
- package/src/stories/Components/Dropdown/Dropdown.stories.tsx +0 -19
- package/src/stories/Components/Dropdown/Dropdown.tsx +0 -99
- package/src/stories/Components/EmptyState/EmptyState.stories.tsx +0 -46
- package/src/stories/Components/EmptyState/EmptyState.tsx +0 -44
- package/src/stories/Components/EmptyState/emptyState.scss +0 -75
- package/src/stories/Components/ErrorPage/ErrorPage.scss +0 -65
- package/src/stories/Components/ErrorPage/ErrorPage.stories.tsx +0 -164
- package/src/stories/Components/ErrorPage/ErrorPage.tsx +0 -107
- package/src/stories/Components/IncomingCall/IncomingCall.scss +0 -27
- package/src/stories/Components/IncomingCall/IncomingCall.stories.tsx +0 -43
- package/src/stories/Components/IncomingCall/IncomingCall.tsx +0 -76
- package/src/stories/Components/ModalConfirm/ModalConfirm.scss +0 -30
- package/src/stories/Components/ModalConfirm/ModalConfirm.stories.tsx +0 -21
- package/src/stories/Components/ModalConfirm/ModalConfirm.tsx +0 -118
- package/src/stories/Components/Pagination/Pagination.scss +0 -42
- package/src/stories/Components/Pagination/Pagination.stories.tsx +0 -25
- package/src/stories/Components/Pagination/Pagination.tsx +0 -143
- package/src/stories/Components/PerformanceAssessment/PerformanceAssessment.scss +0 -26
- package/src/stories/Components/PerformanceAssessment/PerformanceAssessment.stories.tsx +0 -27
- package/src/stories/Components/PerformanceAssessment/PerformanceAssessment.tsx +0 -108
- package/src/stories/Components/ShiftDiary/ShiftDiary.scss +0 -45
- package/src/stories/Components/ShiftDiary/ShiftDiary.stories.tsx +0 -32
- package/src/stories/Components/ShiftDiary/ShiftDiary.tsx +0 -92
- package/src/stories/Components/Stepper/Stepper.stories.tsx +0 -26
- package/src/stories/Components/Stepper/Stepper.tsx +0 -102
- package/src/stories/Components/Stepper/stepper.scss +0 -59
- package/src/stories/Components/Tabs/Tabs.stories.tsx +0 -76
- package/src/stories/Components/Tabs/Tabs.tsx +0 -111
- package/src/stories/Components/Tabs/tabs.scss +0 -118
- package/src/stories/Components/Tooltip/Tooltip.scss +0 -235
- package/src/stories/Components/Tooltip/Tooltip.stories.tsx +0 -125
- package/src/stories/Components/Tooltip/Tooltip.tsx +0 -222
- package/src/stories/Elements/Alert/Alert.stories.tsx +0 -65
- package/src/stories/Elements/Alert/Alert.tsx +0 -49
- package/src/stories/Elements/Alert/alert.scss +0 -189
- package/src/stories/Elements/Badge/Badge.stories.tsx +0 -15
- package/src/stories/Elements/Badge/Badge.tsx +0 -21
- package/src/stories/Elements/Badge/badge.scss +0 -24
- package/src/stories/Elements/Button/Button.stories.tsx +0 -54
- package/src/stories/Elements/Button/Button.tsx +0 -118
- package/src/stories/Elements/Button/button.scss +0 -102
- package/src/stories/Elements/Icon/Icon.stories.tsx +0 -33
- package/src/stories/Elements/Icon/Icon.tsx +0 -57
- package/src/stories/Elements/Icon/icon.scss +0 -15
- package/src/stories/Elements/Icon/icono.svg +0 -1
- package/src/stories/Elements/ProgressBar/ProgressBar.scss +0 -26
- package/src/stories/Elements/ProgressBar/ProgressBar.stories.tsx +0 -19
- package/src/stories/Elements/ProgressBar/ProgressBar.tsx +0 -35
- package/src/stories/Form/Autocomplete/Autocomplete.stories.tsx +0 -55
- package/src/stories/Form/Autocomplete/Autocomplete.tsx +0 -160
- package/src/stories/Form/Autocomplete/autocomplete.scss +0 -311
- package/src/stories/Form/Autocomplete-Prueba/Autocomplete.stories.tsx +0 -50
- package/src/stories/Form/Autocomplete-Prueba/AutocompletePrueba.tsx +0 -83
- package/src/stories/Form/Checkbox/Checkbox.stories.tsx +0 -26
- package/src/stories/Form/Checkbox/Checkbox.tsx +0 -89
- package/src/stories/Form/Checkbox/checkbox.scss +0 -41
- package/src/stories/Form/DatePicker/DatePickerExample.stories.tsx +0 -27
- package/src/stories/Form/DatePicker/DatePickerExample.tsx +0 -65
- package/src/stories/Form/DatePickerComponent/DatePickerComponent.scss +0 -116
- package/src/stories/Form/DatePickerComponent/DatePickerComponent.stories.tsx +0 -37
- package/src/stories/Form/DatePickerComponent/DatePickerComponent.tsx +0 -97
- package/src/stories/Form/Filters/Filters.stories.tsx +0 -84
- package/src/stories/Form/Filters/Filters.tsx +0 -230
- package/src/stories/Form/Filters/filters.scss +0 -261
- package/src/stories/Form/Input/Input.stories.tsx +0 -25
- package/src/stories/Form/Input/Input.tsx +0 -86
- package/src/stories/Form/Input/InputVar.sass +0 -26
- package/src/stories/Form/Input/input.scss +0 -19
- package/src/stories/Form/InputFormControl/Input-form-control.stories.tsx +0 -26
- package/src/stories/Form/InputFormControl/Input-form-control.tsx +0 -48
- package/src/stories/Form/InputFormControl/input-form-control.scss +0 -34
- package/src/stories/Form/Radio/Radio.stories.tsx +0 -19
- package/src/stories/Form/Radio/Radio.tsx +0 -84
- package/src/stories/Form/Radio/radio.scss +0 -19
- package/src/stories/Form/Search/Search.scss +0 -50
- package/src/stories/Form/Search/Search.stories.tsx +0 -26
- package/src/stories/Form/Search/Search.tsx +0 -84
- package/src/stories/Form/Select/Select.stories.tsx +0 -55
- package/src/stories/Form/Select/Select.tsx +0 -121
- package/src/stories/Form/Select/select.scss +0 -303
- package/src/stories/Form/Switch/Switch.stories.tsx +0 -17
- package/src/stories/Form/Switch/Switch.tsx +0 -36
- package/src/stories/Form/Switch/switch.scss +0 -123
- package/src/stories/Form/Textarea/Textarea.stories.tsx +0 -19
- package/src/stories/Form/Textarea/Textarea.tsx +0 -52
- package/src/stories/Form/Textarea/textarea.scss +0 -25
- package/src/stories/Form/UploadFileItem/UploadFileItem.scss +0 -49
- package/src/stories/Form/UploadFileItem/UploadFileItem.stories.tsx +0 -18
- package/src/stories/Form/UploadFileItem/UploadFileItem.tsx +0 -89
- package/src/stories/Form/UploadFiles/UploadFiles.scss +0 -17
- package/src/stories/Form/UploadFiles/UploadFiles.stories.tsx +0 -32
- package/src/stories/Form/UploadFiles/UploadFiles.tsx +0 -177
- package/src/stories/Layout/Footer/Footer.scss +0 -129
- package/src/stories/Layout/Footer/Footer.stories.tsx +0 -101
- package/src/stories/Layout/Footer/Footer.tsx +0 -81
- package/src/stories/Layout/Header/Header.scss +0 -190
- package/src/stories/Layout/Header/Header.stories.tsx +0 -223
- package/src/stories/Layout/Header/Header.tsx +0 -278
- package/src/stories/Layout/HeaderTable/HeaderTable.scss +0 -21
- package/src/stories/Layout/HeaderTable/HeaderTable.stories.tsx +0 -112
- package/src/stories/Layout/HeaderTable/HeaderTable.tsx +0 -72
- package/src/stories/Layout/Sidebar/Sidebar.scss +0 -50
- package/src/stories/Layout/Sidebar/Sidebar.stories.tsx +0 -744
- package/src/stories/Layout/Sidebar/Sidebar.tsx +0 -129
- package/src/stories/Layout/SidebarEmpty/SidebarEmpty.scss +0 -64
- package/src/stories/Layout/SidebarEmpty/SidebarEmpty.stories.tsx +0 -26
- package/src/stories/Layout/SidebarEmpty/SidebarEmpty.tsx +0 -100
- package/src/stories/Layout/Subtitle/Subtitle.scss +0 -88
- package/src/stories/Layout/Subtitle/Subtitle.stories.tsx +0 -46
- package/src/stories/Layout/Subtitle/Subtitle.tsx +0 -108
- package/src/stories/Layout/Title/Title.scss +0 -79
- package/src/stories/Layout/Title/Title.stories.tsx +0 -86
- package/src/stories/Layout/Title/Title.tsx +0 -96
- package/src/stories/Welcome.stories.tsx +0 -111
- 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 +0 -5
- package/src/stories/assets/code-brackets.svg +0 -1
- package/src/stories/assets/colors.svg +0 -1
- package/src/stories/assets/comments.svg +0 -1
- package/src/stories/assets/decor-bg.png +0 -0
- package/src/stories/assets/direction.svg +0 -1
- package/src/stories/assets/e-isologo.svg +0 -4
- package/src/stories/assets/e-isotype.svg +0 -4
- package/src/stories/assets/e-logo_negative.svg +0 -14
- package/src/stories/assets/e-logotype.svg +0 -14
- package/src/stories/assets/flow.svg +0 -1
- package/src/stories/assets/logo_gobierno_corrientes.svg +0 -9
- package/src/stories/assets/logo_rentas_corrientes.svg +0 -10
- package/src/stories/assets/logo_rentas_corrientes_compacto.svg +0 -10
- package/src/stories/assets/plugin.svg +0 -1
- package/src/stories/assets/repo.svg +0 -1
- package/src/stories/assets/stackalt.svg +0 -1
- package/src/stories/assets/storybook.svg +0 -13
- 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 +0 -389
- package/src/utils/functions.ts +0 -57
- package/src/vite-env.d.ts +0 -2
- package/static/e-isologo-192.jpg +0 -0
- package/static/e-isologo.svg +0 -4
- package/static/e-logotype.svg +0 -14
- package/static/favicon.ico +0 -0
- package/tsconfig.json +0 -22
- package/tsconfig.node.json +0 -9
- package/vite.config.ts +0 -22
- /package/{public/elevation.ico → elevation.ico} +0 -0
- /package/{public/elevationImage.png → elevationImage.png} +0 -0
- /package/{public/vite.svg → vite.svg} +0 -0
|
@@ -1,451 +0,0 @@
|
|
|
1
|
-
import React, {useEffect, useRef, useState} from 'react';
|
|
2
|
-
import './Collapse.scss';
|
|
3
|
-
import {Badge, BadgeProps} from '../../Elements/Badge/Badge';
|
|
4
|
-
import {Button, IButton} from '../../Elements/Button/Button';
|
|
5
|
-
import {Checkbox, ICheckbox} from '../../Form/Checkbox/Checkbox';
|
|
6
|
-
import {Icon, IIcon} from '../../Elements/Icon/Icon';
|
|
7
|
-
import {Tooltip, ITooltip} from '../Tooltip/Tooltip';
|
|
8
|
-
import {Radio, IRadio} from '../../Form/Radio/Radio';
|
|
9
|
-
import {ISelect, Select} from '../../Form/Select/Select';
|
|
10
|
-
import {generateRandomKey} from '../../../utils/functions';
|
|
11
|
-
import {CollapseEdit, ICollapseEdit, IDataPrice} from '../CollapseEdit/CollapseEdit';
|
|
12
|
-
import {Input} from '../../Form/Input/Input';
|
|
13
|
-
|
|
14
|
-
type ICollapseOrEmptyObject = ICollapse | {};
|
|
15
|
-
|
|
16
|
-
export interface ICollapse extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
|
|
17
|
-
type: 'father' | 'child' | 'nephew';
|
|
18
|
-
paddingLeft?: 'short' | 'long';
|
|
19
|
-
isFather?: boolean;
|
|
20
|
-
className?: string;
|
|
21
|
-
show?: boolean;
|
|
22
|
-
initialState?: boolean;
|
|
23
|
-
childCollapse?: ICollapse[];
|
|
24
|
-
disabled?: boolean;
|
|
25
|
-
colored?: boolean;
|
|
26
|
-
borderBottom?: boolean;
|
|
27
|
-
borderTop?: boolean;
|
|
28
|
-
collapseEdit?: ICollapseEdit;
|
|
29
|
-
showAmountinEdit?: boolean;
|
|
30
|
-
|
|
31
|
-
// LEFT
|
|
32
|
-
title?: string;
|
|
33
|
-
stateTitle?: {color?: string; label?: string};
|
|
34
|
-
titleWeight?: 'regular' | 'semibold';
|
|
35
|
-
titleIcon?: IIcon;
|
|
36
|
-
description?: string;
|
|
37
|
-
badge?: BadgeProps;
|
|
38
|
-
details?: string;
|
|
39
|
-
dateDays?: string;
|
|
40
|
-
dateTime?: string;
|
|
41
|
-
|
|
42
|
-
// RIGHT
|
|
43
|
-
price?: number;
|
|
44
|
-
priceColor?: string;
|
|
45
|
-
priceTop?: {description?: string; value?: number};
|
|
46
|
-
priceBottom?: {description?: string; value?: number};
|
|
47
|
-
priceLeft?: {checkbox?: ICheckbox; label?: string};
|
|
48
|
-
buttonMenu?: {button: IButton; select?: ISelect; menuDropComponent?: React.ReactNode; onEllipse?: () => void};
|
|
49
|
-
buttonLink?: IButton;
|
|
50
|
-
buttonDetail?: {button: IButton; tooltip?: ITooltip; tooltipPos?: 'top' | 'bottom'};
|
|
51
|
-
|
|
52
|
-
dropRightButton?: IButton;
|
|
53
|
-
buttonEdit?: IButton;
|
|
54
|
-
checkbox?: ICheckbox;
|
|
55
|
-
callBackCheckbox?: (object: ICollapseOrEmptyObject) => void;
|
|
56
|
-
radio?: IRadio;
|
|
57
|
-
|
|
58
|
-
onSaveData?: (Data: IDataPrice) => void;
|
|
59
|
-
onCalculateClick?: (value: number) => void;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export const Collapse = ({
|
|
63
|
-
type,
|
|
64
|
-
paddingLeft,
|
|
65
|
-
isFather,
|
|
66
|
-
className,
|
|
67
|
-
show,
|
|
68
|
-
initialState,
|
|
69
|
-
childCollapse,
|
|
70
|
-
disabled,
|
|
71
|
-
colored,
|
|
72
|
-
borderBottom,
|
|
73
|
-
borderTop,
|
|
74
|
-
title,
|
|
75
|
-
stateTitle,
|
|
76
|
-
titleWeight,
|
|
77
|
-
titleIcon,
|
|
78
|
-
description,
|
|
79
|
-
badge,
|
|
80
|
-
details,
|
|
81
|
-
dateDays,
|
|
82
|
-
dateTime,
|
|
83
|
-
price,
|
|
84
|
-
priceColor,
|
|
85
|
-
priceTop,
|
|
86
|
-
priceBottom,
|
|
87
|
-
priceLeft,
|
|
88
|
-
buttonMenu,
|
|
89
|
-
buttonLink,
|
|
90
|
-
buttonDetail,
|
|
91
|
-
dropRightButton,
|
|
92
|
-
buttonEdit,
|
|
93
|
-
checkbox,
|
|
94
|
-
collapseEdit,
|
|
95
|
-
callBackCheckbox,
|
|
96
|
-
radio,
|
|
97
|
-
onSaveData,
|
|
98
|
-
showAmountinEdit,
|
|
99
|
-
...props
|
|
100
|
-
}: ICollapse) => {
|
|
101
|
-
const [isExpanded, setIsExpanded] = useState(initialState);
|
|
102
|
-
const [detailExpanded, setDetailExpanded] = useState(false);
|
|
103
|
-
const [menuExpanded, setMenuExpanded] = useState(false);
|
|
104
|
-
const [edit, setEdit] = useState(false);
|
|
105
|
-
const [disable, setDisable] = useState(disabled);
|
|
106
|
-
const [cantidad, setCantidad] = useState(price);
|
|
107
|
-
const [isChecked, setIsChecked] = useState(false);
|
|
108
|
-
|
|
109
|
-
const handleClickExpand = () => {
|
|
110
|
-
setIsExpanded(!isExpanded);
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
const handleClickEdit = () => {
|
|
114
|
-
setEdit(!edit);
|
|
115
|
-
setDisable(!disable);
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
const handleCantidadChange = (cantidad: number) => {
|
|
119
|
-
setCantidad(cantidad);
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
const menuDropRef = useRef<HTMLDivElement>(null);
|
|
123
|
-
useEffect(() => {
|
|
124
|
-
function handleClickOutside(event: MouseEvent) {
|
|
125
|
-
if (menuDropRef.current && !menuDropRef.current.contains(event.target as Node)) {
|
|
126
|
-
setMenuExpanded(false);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
document.addEventListener('click', handleClickOutside);
|
|
131
|
-
|
|
132
|
-
return () => {
|
|
133
|
-
document.removeEventListener('click', handleClickOutside);
|
|
134
|
-
};
|
|
135
|
-
}, [menuDropRef]);
|
|
136
|
-
|
|
137
|
-
const detailsDropRef = useRef<HTMLDivElement>(null);
|
|
138
|
-
useEffect(() => {
|
|
139
|
-
function handleClickOutside(event: MouseEvent) {
|
|
140
|
-
if (detailsDropRef.current && !detailsDropRef.current.contains(event.target as Node)) {
|
|
141
|
-
setDetailExpanded(false);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
document.addEventListener('click', handleClickOutside);
|
|
146
|
-
|
|
147
|
-
return () => {
|
|
148
|
-
document.removeEventListener('click', handleClickOutside);
|
|
149
|
-
};
|
|
150
|
-
}, [detailsDropRef]);
|
|
151
|
-
|
|
152
|
-
return (
|
|
153
|
-
<div className={`elv-component elv-collapse ${className ? className : ''}`} {...props}>
|
|
154
|
-
{!edit && !disable ? (
|
|
155
|
-
<div
|
|
156
|
-
className={[
|
|
157
|
-
'e-collapse',
|
|
158
|
-
`${show ? ' e-collapse--show' : ' e-collapse--hide'}`,
|
|
159
|
-
`${colored ? ' e-collapse--colored-gray' : ''}`,
|
|
160
|
-
`${borderTop ? ' e-collapse--borderTop' : ''}`,
|
|
161
|
-
`${className ? ' ' + className : ''}`,
|
|
162
|
-
].join('')}
|
|
163
|
-
>
|
|
164
|
-
<div
|
|
165
|
-
className={`e-collapse__container ${'e-collapse__container--' + type} ${
|
|
166
|
-
paddingLeft && paddingLeft === 'short'
|
|
167
|
-
? 'e-collapse__container--' + type + '--short'
|
|
168
|
-
: 'e-collapse__container--' + type + '--long'
|
|
169
|
-
} ${disabled ? 'e-collapse__container--disabled' : ''} ${borderBottom ? 'e-collapse__container--borderBottom' : ''} ${
|
|
170
|
-
title && !description && !details ? 'e-collapse__container--' + type + '--onlyTitle ' : ''
|
|
171
|
-
}is-flex is-justify-content-space-between`}
|
|
172
|
-
>
|
|
173
|
-
<div
|
|
174
|
-
className="left-container is-flex"
|
|
175
|
-
style={{cursor: isFather && !disabled ? 'pointer' : 'auto'}}
|
|
176
|
-
onClick={() => {
|
|
177
|
-
if (isFather && !disabled) {
|
|
178
|
-
handleClickExpand();
|
|
179
|
-
}
|
|
180
|
-
}}
|
|
181
|
-
>
|
|
182
|
-
{isFather && (
|
|
183
|
-
<div className={`left-container__dropIcon`} style={stateTitle && {paddingTop: '28px'}}>
|
|
184
|
-
<Icon icon={'fa-solid fa-chevron-right'} className={`icon-drop ${isExpanded && 'rotate'}`}></Icon>
|
|
185
|
-
</div>
|
|
186
|
-
)}
|
|
187
|
-
<div className="left-container__texts is-flex is-flex-direction-column is-justify-content-center">
|
|
188
|
-
{stateTitle && (
|
|
189
|
-
<div className="state-title is-flex" style={{color: stateTitle?.color}}>
|
|
190
|
-
<Icon icon="fa-solid fa-circle"></Icon> <p className="state-title__text">{stateTitle?.label}</p>
|
|
191
|
-
</div>
|
|
192
|
-
)}
|
|
193
|
-
<div className="title-container is-flex is-align-items-center">
|
|
194
|
-
{titleIcon && <Icon {...titleIcon}></Icon>}
|
|
195
|
-
{badge && <Badge {...badge}></Badge>}
|
|
196
|
-
{title && (
|
|
197
|
-
<p
|
|
198
|
-
className={`title-container__title title-container__title${
|
|
199
|
-
titleWeight && titleWeight == 'regular' ? '--regular' : '--semibold'
|
|
200
|
-
}`}
|
|
201
|
-
>
|
|
202
|
-
{title}
|
|
203
|
-
</p>
|
|
204
|
-
)}
|
|
205
|
-
</div>
|
|
206
|
-
{description && <p className="description">{description}</p>}
|
|
207
|
-
|
|
208
|
-
{details && <p className="details">{details}</p>}
|
|
209
|
-
{(dateDays || dateTime) && (
|
|
210
|
-
<div className="date is-flex">
|
|
211
|
-
{dateDays && (
|
|
212
|
-
<span className="date__days is-flex is-align-items-center">
|
|
213
|
-
<Icon icon="fa-solid fa-calendar-days"></Icon>
|
|
214
|
-
<p>{dateDays}</p>
|
|
215
|
-
</span>
|
|
216
|
-
)}
|
|
217
|
-
{dateTime && (
|
|
218
|
-
<span className="date__time is-flex is-align-items-center">
|
|
219
|
-
<Icon icon="fa-solid fa-clock"></Icon>
|
|
220
|
-
<p>{dateTime}</p>
|
|
221
|
-
</span>
|
|
222
|
-
)}
|
|
223
|
-
</div>
|
|
224
|
-
)}
|
|
225
|
-
</div>
|
|
226
|
-
</div>
|
|
227
|
-
<div className="right-container is-flex is-align-items-center">
|
|
228
|
-
{buttonDetail && (
|
|
229
|
-
<span className="right-container__buttonDetail" ref={detailsDropRef}>
|
|
230
|
-
<Button
|
|
231
|
-
{...buttonDetail.button}
|
|
232
|
-
onClick={() => {
|
|
233
|
-
setDetailExpanded(!detailExpanded);
|
|
234
|
-
buttonDetail.button.onClick && buttonDetail.button.onClick();
|
|
235
|
-
}}
|
|
236
|
-
/>
|
|
237
|
-
{buttonDetail.tooltip ? (
|
|
238
|
-
<div
|
|
239
|
-
className={`detail-tooltip ${buttonDetail.tooltipPos === 'top' ? 'detail-tooltip--top' : 'detail-tooltip--bottom'}`}
|
|
240
|
-
>
|
|
241
|
-
<Tooltip {...buttonDetail.tooltip} active={detailExpanded} />
|
|
242
|
-
</div>
|
|
243
|
-
) : (
|
|
244
|
-
<></>
|
|
245
|
-
)}
|
|
246
|
-
</span>
|
|
247
|
-
)}
|
|
248
|
-
<div className="right-container__price is-flex">
|
|
249
|
-
{priceLeft && priceLeft.checkbox && (
|
|
250
|
-
<div className="is-flex is-align-items-center">
|
|
251
|
-
<Checkbox {...priceLeft.checkbox}></Checkbox>
|
|
252
|
-
</div>
|
|
253
|
-
)}
|
|
254
|
-
<div className="col-price is-flex is-flex-direction-column is-align-items-end">
|
|
255
|
-
{priceTop && (
|
|
256
|
-
<span className="col-price__top is-flex is-align-items-center">
|
|
257
|
-
<p className="desc">{priceTop.description}</p>
|
|
258
|
-
<p className="value">$ {priceTop.value}</p>
|
|
259
|
-
</span>
|
|
260
|
-
)}
|
|
261
|
-
{price && (
|
|
262
|
-
<p className="col-price__price" style={priceColor && priceColor != '' ? {color: priceColor} : {color: 'none'}}>
|
|
263
|
-
${price}
|
|
264
|
-
</p>
|
|
265
|
-
)}
|
|
266
|
-
{priceBottom && (
|
|
267
|
-
<span className="col-price__bottom is-flex is-align-items-center">
|
|
268
|
-
<p className="desc">{priceBottom.description}</p>
|
|
269
|
-
<p className="value">$ {priceBottom.value}</p>
|
|
270
|
-
</span>
|
|
271
|
-
)}
|
|
272
|
-
</div>
|
|
273
|
-
</div>
|
|
274
|
-
{buttonMenu && (
|
|
275
|
-
<div className="right-container__buttonMenu is-flex is-align-items-center is-relative" ref={menuDropRef}>
|
|
276
|
-
<span className="menu-button ">
|
|
277
|
-
<Button
|
|
278
|
-
{...buttonMenu.button}
|
|
279
|
-
onClick={() => {
|
|
280
|
-
setMenuExpanded(!menuExpanded), buttonMenu.onEllipse && buttonMenu.onEllipse();
|
|
281
|
-
}}
|
|
282
|
-
/>
|
|
283
|
-
</span>
|
|
284
|
-
{menuExpanded && buttonMenu.menuDropComponent && (
|
|
285
|
-
<div className="menu-drop-component is-absolute">{buttonMenu.menuDropComponent}</div>
|
|
286
|
-
)}
|
|
287
|
-
|
|
288
|
-
{buttonMenu.select && (
|
|
289
|
-
<div className={`menu-select`} style={menuExpanded ? {display: 'block'} : {display: 'none'}}>
|
|
290
|
-
<Select {...buttonMenu.select} />
|
|
291
|
-
</div>
|
|
292
|
-
)}
|
|
293
|
-
</div>
|
|
294
|
-
)}
|
|
295
|
-
{dropRightButton && (
|
|
296
|
-
<div className="right-container__dropLeftButton is-flex">
|
|
297
|
-
<Button {...dropRightButton} />
|
|
298
|
-
</div>
|
|
299
|
-
)}
|
|
300
|
-
{buttonLink && (
|
|
301
|
-
<div className="right-container__buttonLink is-flex is-align-items-center">
|
|
302
|
-
<Button {...buttonLink} />
|
|
303
|
-
</div>
|
|
304
|
-
)}
|
|
305
|
-
{buttonEdit || checkbox || radio ? (
|
|
306
|
-
<div className="right-container__editCheckbox is-flex">
|
|
307
|
-
{buttonEdit && (
|
|
308
|
-
<div className="buttonEdit is-flex is-align-items-center">
|
|
309
|
-
<Button
|
|
310
|
-
{...buttonEdit}
|
|
311
|
-
onClick={() => {
|
|
312
|
-
handleClickEdit();
|
|
313
|
-
}}
|
|
314
|
-
/>
|
|
315
|
-
</div>
|
|
316
|
-
)}
|
|
317
|
-
{checkbox && (
|
|
318
|
-
<div className="_checkbox is-flex is-align-items-center">
|
|
319
|
-
<Checkbox
|
|
320
|
-
// defaultChecked={isChecked}
|
|
321
|
-
{...checkbox}
|
|
322
|
-
onCheck={state => {
|
|
323
|
-
setIsChecked(state);
|
|
324
|
-
if (callBackCheckbox) {
|
|
325
|
-
if (state) {
|
|
326
|
-
callBackCheckbox({
|
|
327
|
-
type,
|
|
328
|
-
paddingLeft,
|
|
329
|
-
isFather,
|
|
330
|
-
show,
|
|
331
|
-
initialState,
|
|
332
|
-
childCollapse,
|
|
333
|
-
disabled,
|
|
334
|
-
colored,
|
|
335
|
-
borderBottom,
|
|
336
|
-
borderTop,
|
|
337
|
-
title,
|
|
338
|
-
stateTitle,
|
|
339
|
-
titleWeight,
|
|
340
|
-
titleIcon,
|
|
341
|
-
description,
|
|
342
|
-
badge,
|
|
343
|
-
details,
|
|
344
|
-
dateDays,
|
|
345
|
-
dateTime,
|
|
346
|
-
price,
|
|
347
|
-
priceColor,
|
|
348
|
-
priceTop,
|
|
349
|
-
priceBottom,
|
|
350
|
-
priceLeft,
|
|
351
|
-
buttonMenu,
|
|
352
|
-
buttonLink,
|
|
353
|
-
buttonDetail,
|
|
354
|
-
dropRightButton,
|
|
355
|
-
buttonEdit,
|
|
356
|
-
});
|
|
357
|
-
} else {
|
|
358
|
-
callBackCheckbox({});
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
}}
|
|
362
|
-
/>
|
|
363
|
-
</div>
|
|
364
|
-
)}
|
|
365
|
-
{radio && (
|
|
366
|
-
<div className="_radio is-flex is-align-items-center">
|
|
367
|
-
<Radio
|
|
368
|
-
{...radio}
|
|
369
|
-
onCheck={() => {
|
|
370
|
-
if (callBackCheckbox) {
|
|
371
|
-
callBackCheckbox({
|
|
372
|
-
type,
|
|
373
|
-
paddingLeft,
|
|
374
|
-
isFather,
|
|
375
|
-
show,
|
|
376
|
-
initialState,
|
|
377
|
-
childCollapse,
|
|
378
|
-
disabled,
|
|
379
|
-
colored,
|
|
380
|
-
borderBottom,
|
|
381
|
-
borderTop,
|
|
382
|
-
title,
|
|
383
|
-
stateTitle,
|
|
384
|
-
titleWeight,
|
|
385
|
-
titleIcon,
|
|
386
|
-
description,
|
|
387
|
-
badge,
|
|
388
|
-
details,
|
|
389
|
-
dateDays,
|
|
390
|
-
dateTime,
|
|
391
|
-
price,
|
|
392
|
-
priceColor,
|
|
393
|
-
priceTop,
|
|
394
|
-
priceBottom,
|
|
395
|
-
priceLeft,
|
|
396
|
-
buttonMenu,
|
|
397
|
-
buttonLink,
|
|
398
|
-
buttonDetail,
|
|
399
|
-
dropRightButton,
|
|
400
|
-
buttonEdit,
|
|
401
|
-
});
|
|
402
|
-
}
|
|
403
|
-
{
|
|
404
|
-
radio.onCheck && radio.onCheck();
|
|
405
|
-
}
|
|
406
|
-
}}
|
|
407
|
-
></Radio>
|
|
408
|
-
</div>
|
|
409
|
-
)}
|
|
410
|
-
</div>
|
|
411
|
-
) : (
|
|
412
|
-
<></>
|
|
413
|
-
)}
|
|
414
|
-
</div>
|
|
415
|
-
</div>
|
|
416
|
-
|
|
417
|
-
{childCollapse && childCollapse.map(item => <Collapse key={generateRandomKey()} {...item} show={isExpanded} />)}
|
|
418
|
-
</div>
|
|
419
|
-
) : (
|
|
420
|
-
<div className="">
|
|
421
|
-
<CollapseEdit
|
|
422
|
-
labelDescription="1001 - Tambos"
|
|
423
|
-
priceTopEdit={{labelImpost: 'Impuesto', labelNumberI: priceTop?.value}}
|
|
424
|
-
priceBottomEdit={{labelAliquot: 'Alícuota', labelNumberA: priceBottom?.value}}
|
|
425
|
-
className="collapseEdit"
|
|
426
|
-
checkbox={{label: 'Exento', disabled: false, size: 'sm', value: '', name: '', onCheck(checked) {}}}
|
|
427
|
-
inputAmount={{type: 'number', color: 'none', placeholder: 'Monto imponible', size: 'normal', onChange(value) {}}}
|
|
428
|
-
input={{type: 'number', color: 'none', placeholder: 'Cantidad', size: 'normal', onChange(value) {}}}
|
|
429
|
-
buttonRecalculate={{fill: 'unstyled', label: 'Recalcular', icon: 'fa-solid fa-rotate-right', trailingIcon: false, onClick() {}}}
|
|
430
|
-
buttonCancel={{
|
|
431
|
-
fill: 'unstyled',
|
|
432
|
-
color: 'secondary',
|
|
433
|
-
size: 'normal',
|
|
434
|
-
label: 'Cancelar',
|
|
435
|
-
onClick() {
|
|
436
|
-
setEdit(false);
|
|
437
|
-
setDisable(false);
|
|
438
|
-
},
|
|
439
|
-
}}
|
|
440
|
-
onSaveData={data => {
|
|
441
|
-
onSaveData && onSaveData({aliquot: data.aliquot, calculatedtax: data.calculatedtax});
|
|
442
|
-
setEdit(false);
|
|
443
|
-
setDisable(false);
|
|
444
|
-
}}
|
|
445
|
-
showAmountinEdit={showAmountinEdit}
|
|
446
|
-
/>
|
|
447
|
-
</div>
|
|
448
|
-
)}
|
|
449
|
-
</div>
|
|
450
|
-
);
|
|
451
|
-
};
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
@import '/src/sass/utilities/variables';
|
|
2
|
-
|
|
3
|
-
.elv-collapsedit {
|
|
4
|
-
.collapsedit {
|
|
5
|
-
border: 1px solid $truegray-300;
|
|
6
|
-
border-radius: 0px;
|
|
7
|
-
|
|
8
|
-
&__breakpoint4 {
|
|
9
|
-
@media screen and (max-width: 768px) {
|
|
10
|
-
flex-direction: column;
|
|
11
|
-
padding: 16px;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
&__breakpoint3 {
|
|
16
|
-
@media screen and (max-width: 853px) {
|
|
17
|
-
flex-direction: column;
|
|
18
|
-
align-items: flex-start !important;
|
|
19
|
-
gap: 10px;
|
|
20
|
-
}
|
|
21
|
-
@media screen and (max-width: 768px) {
|
|
22
|
-
align-items: center !important;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
&__breakpoint2 {
|
|
27
|
-
@media screen and (max-width: 1060px) {
|
|
28
|
-
flex-direction: column;
|
|
29
|
-
align-items: center !important;
|
|
30
|
-
gap: 10px !important;
|
|
31
|
-
}
|
|
32
|
-
@media screen and (max-width: 768px) {
|
|
33
|
-
width: 100% !important;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
&__breakpoint1 {
|
|
38
|
-
@media screen and (max-width: 1275px) {
|
|
39
|
-
flex-direction: column;
|
|
40
|
-
align-items: center !important;
|
|
41
|
-
gap: 5px !important;
|
|
42
|
-
}
|
|
43
|
-
@media screen and (max-width: 768px) {
|
|
44
|
-
width: 100% !important;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
&__desc-cont {
|
|
48
|
-
@media screen and (max-width: 1110px) {
|
|
49
|
-
margin-right: 0px !important;
|
|
50
|
-
align-items: center !important;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
&__desc {
|
|
55
|
-
min-width: 130px;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
&__check {
|
|
59
|
-
min-width: 77px;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
&__input {
|
|
63
|
-
@media screen and (max-width: 768px) {
|
|
64
|
-
width: 100% !important;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
&__inputAmount {
|
|
69
|
-
@media screen and (max-width: 1060px) {
|
|
70
|
-
margin-right: 0 !important;
|
|
71
|
-
}
|
|
72
|
-
@media screen and (max-width: 768px) {
|
|
73
|
-
width: 100% !important;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
&__bottom {
|
|
78
|
-
min-width: 50px;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
&__top {
|
|
82
|
-
min-width: 50px;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
input {
|
|
86
|
-
padding: 8px 12px;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
button {
|
|
90
|
-
padding: 8px 16px;
|
|
91
|
-
}
|
|
92
|
-
&__buttonCont {
|
|
93
|
-
@media screen and (max-width: 768px) {
|
|
94
|
-
gap: 5px !important;
|
|
95
|
-
align-items: center;
|
|
96
|
-
flex-direction: column;
|
|
97
|
-
width: 100%;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
&__buttonRec {
|
|
102
|
-
color: $primary-600;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
&__button {
|
|
106
|
-
border-left: 1px solid $truegray-300;
|
|
107
|
-
@media screen and (max-width: 768px) {
|
|
108
|
-
width: 100%;
|
|
109
|
-
border-left: none;
|
|
110
|
-
gap: 5px !important;
|
|
111
|
-
flex-direction: column;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
.button-cancel {
|
|
115
|
-
width: 100px;
|
|
116
|
-
@media screen and (max-width: 768px) {
|
|
117
|
-
width: 100% !important;
|
|
118
|
-
margin-left: 0px !important;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
.button-save {
|
|
122
|
-
width: 100px;
|
|
123
|
-
@media screen and (max-width: 768px) {
|
|
124
|
-
width: 100% !important;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import {ComponentStory, ComponentMeta} from '@storybook/react';
|
|
2
|
-
import {CollapseEdit} from './CollapseEdit';
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: 'Components/Collapsedit',
|
|
6
|
-
component: CollapseEdit,
|
|
7
|
-
args: {
|
|
8
|
-
labelDescription: '1001 - Tambos',
|
|
9
|
-
checkbox: {label: 'Exento', disabled: false, size: 'sm'},
|
|
10
|
-
input: {type: 'number', color: 'none', placeholder: 'Cantidad', onChange(value) {}},
|
|
11
|
-
inputAmount: {type: 'number', color: 'none', placeholder: 'Monto imponible'},
|
|
12
|
-
priceBottomEdit: {labelAliquot: 'Alícuota', labelNumberA: 2.9},
|
|
13
|
-
priceTopEdit: {labelImpost: 'Impuesto.', labelNumberI: 990},
|
|
14
|
-
buttonRecalculate: {fill: 'unstyled', label: 'Recalcular', icon: 'fa-solid fa-rotate-right', trailingIcon: false, onClick() {}},
|
|
15
|
-
buttonCancel: {
|
|
16
|
-
fill: 'unstyled',
|
|
17
|
-
color: 'secondary',
|
|
18
|
-
size: 'normal',
|
|
19
|
-
label: 'Cancelar',
|
|
20
|
-
onClick: () => console.log('buttonCancel Clicked'),
|
|
21
|
-
},
|
|
22
|
-
showAmountinEdit: true,
|
|
23
|
-
},
|
|
24
|
-
} as ComponentMeta<typeof CollapseEdit>;
|
|
25
|
-
|
|
26
|
-
const Template: ComponentStory<typeof CollapseEdit> = args => <CollapseEdit {...args} />;
|
|
27
|
-
|
|
28
|
-
export const Standard = Template.bind({});
|
|
29
|
-
Standard.args = {};
|