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,89 +0,0 @@
|
|
|
1
|
-
import {useState} from 'react';
|
|
2
|
-
import './checkbox.scss';
|
|
3
|
-
import '/src/sass/base/_controls.scss';
|
|
4
|
-
|
|
5
|
-
export interface ICheckbox extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
|
|
6
|
-
// base
|
|
7
|
-
size?: 'sm' | 'md' | 'lg';
|
|
8
|
-
label?: string;
|
|
9
|
-
value: string;
|
|
10
|
-
name: string;
|
|
11
|
-
|
|
12
|
-
// boolean
|
|
13
|
-
checked?: boolean;
|
|
14
|
-
defaultChecked?: boolean;
|
|
15
|
-
disabled?: boolean;
|
|
16
|
-
error?: boolean;
|
|
17
|
-
|
|
18
|
-
// events
|
|
19
|
-
onCheck?: (checked: boolean) => void;
|
|
20
|
-
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
21
|
-
|
|
22
|
-
// react
|
|
23
|
-
className?: string;
|
|
24
|
-
key?: string;
|
|
25
|
-
}
|
|
26
|
-
export const Checkbox = ({
|
|
27
|
-
size = 'md',
|
|
28
|
-
label = 'checkbox',
|
|
29
|
-
value,
|
|
30
|
-
name,
|
|
31
|
-
className,
|
|
32
|
-
key,
|
|
33
|
-
defaultChecked,
|
|
34
|
-
checked,
|
|
35
|
-
error,
|
|
36
|
-
disabled = false,
|
|
37
|
-
//hover,
|
|
38
|
-
onCheck,
|
|
39
|
-
onChange,
|
|
40
|
-
...props
|
|
41
|
-
}: ICheckbox) => {
|
|
42
|
-
const [isChecked, setIsChecked] = useState<boolean>(defaultChecked ? defaultChecked : false);
|
|
43
|
-
|
|
44
|
-
const toggleChecked = (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
45
|
-
setIsChecked(!isChecked);
|
|
46
|
-
onCheck && onCheck(!isChecked);
|
|
47
|
-
onChange && onChange(e);
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
return (
|
|
51
|
-
<div className={`elv-component elv-checkbox elv-control`} {...props}>
|
|
52
|
-
<label
|
|
53
|
-
className={[
|
|
54
|
-
'e-control e-checkbox',
|
|
55
|
-
` e-control--${size} e-checkbox--${size}`,
|
|
56
|
-
`${error ? ` e-control--error e-checkbox--error` : ''}`,
|
|
57
|
-
`${disabled ? ` e-control--disabled e-checkbox--disabled` : ''}`,
|
|
58
|
-
' is-relative',
|
|
59
|
-
' is-flex is-flex-direction-row-reverse is-justify-content-flex-end',
|
|
60
|
-
' has-text-dark',
|
|
61
|
-
' is-clickable',
|
|
62
|
-
`${className ? ' ' + className : ''}`,
|
|
63
|
-
].join('')}
|
|
64
|
-
>
|
|
65
|
-
<input
|
|
66
|
-
type="checkbox"
|
|
67
|
-
onChange={e => {
|
|
68
|
-
toggleChecked(e);
|
|
69
|
-
}}
|
|
70
|
-
defaultChecked={defaultChecked}
|
|
71
|
-
id={value}
|
|
72
|
-
value={value}
|
|
73
|
-
name={name}
|
|
74
|
-
checked={checked}
|
|
75
|
-
className={['e-control__input e-checkbox__input'].join('')}
|
|
76
|
-
disabled={disabled}
|
|
77
|
-
/>
|
|
78
|
-
{label && <span className="label-text is-flex is-align-items-center">{label}</span>}
|
|
79
|
-
|
|
80
|
-
<span
|
|
81
|
-
className={[
|
|
82
|
-
'e-control__checkmark e-checkbox__checkmark',
|
|
83
|
-
' is-flex is-align-items-center is-justify-content-center is-relative',
|
|
84
|
-
].join('')}
|
|
85
|
-
/>
|
|
86
|
-
</label>
|
|
87
|
-
</div>
|
|
88
|
-
);
|
|
89
|
-
};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
@import '/src/sass/utilities/variables';
|
|
2
|
-
|
|
3
|
-
.elv-checkbox {
|
|
4
|
-
.e-checkbox {
|
|
5
|
-
&__input:checked ~ .e-control__checkmark {
|
|
6
|
-
background-color: $primary-600;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
&__checkmark {
|
|
10
|
-
border-radius: 2px;
|
|
11
|
-
|
|
12
|
-
&:after {
|
|
13
|
-
width: 9px;
|
|
14
|
-
height: 4px;
|
|
15
|
-
border: 2px solid white;
|
|
16
|
-
border-top: none;
|
|
17
|
-
border-right: none;
|
|
18
|
-
background: transparent;
|
|
19
|
-
transform: rotate(-45deg) !important;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
&--sm {
|
|
24
|
-
.e-checkbox__checkmark {
|
|
25
|
-
&:after {
|
|
26
|
-
width: 6px;
|
|
27
|
-
height: 3px;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
&--lg {
|
|
33
|
-
.e-checkbox__checkmark {
|
|
34
|
-
&:after {
|
|
35
|
-
width: 12px;
|
|
36
|
-
height: 5px;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {ComponentStory, ComponentMeta} from '@storybook/react';
|
|
3
|
-
|
|
4
|
-
import {DatePickerExample} from './DatePickerExample';
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
title: 'Example/DatePickerExample',
|
|
8
|
-
component: DatePickerExample,
|
|
9
|
-
args: {},
|
|
10
|
-
} as ComponentMeta<typeof DatePickerExample>;
|
|
11
|
-
|
|
12
|
-
const Template: ComponentStory<typeof DatePickerExample> = args => <DatePickerExample {...args} />;
|
|
13
|
-
|
|
14
|
-
export const Day = Template.bind({});
|
|
15
|
-
Day.args = {type: 'day'};
|
|
16
|
-
|
|
17
|
-
export const Range = Template.bind({});
|
|
18
|
-
Range.args = {type: 'range'};
|
|
19
|
-
|
|
20
|
-
export const Portal = Template.bind({});
|
|
21
|
-
Portal.args = {type: 'portal'};
|
|
22
|
-
|
|
23
|
-
export const Months = Template.bind({});
|
|
24
|
-
Months.args = {type: 'months'};
|
|
25
|
-
|
|
26
|
-
export const Year = Template.bind({});
|
|
27
|
-
Year.args = {type: 'year-select'};
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import React, {useState} from 'react';
|
|
2
|
-
import DatePicker from 'react-datepicker';
|
|
3
|
-
|
|
4
|
-
import 'react-datepicker/dist/react-datepicker.css';
|
|
5
|
-
import '/src/sass/base/_datepicker.scss';
|
|
6
|
-
|
|
7
|
-
export interface DatePickerExampleProps {
|
|
8
|
-
type?: 'day' | 'range' | 'portal' | 'months' | 'year-select';
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export const DatePickerExample = ({type}: DatePickerExampleProps) => {
|
|
12
|
-
const [startDate, setStartDate] = useState(new Date('2014/02/08'));
|
|
13
|
-
const [startDateMonth, setStartDateMonth] = useState(new Date('2014/02/08'));
|
|
14
|
-
const [endDate, setEndDate] = useState(new Date('2014/02/10'));
|
|
15
|
-
|
|
16
|
-
switch (type) {
|
|
17
|
-
case 'day':
|
|
18
|
-
return <DatePicker showIcon selected={startDate} onChange={(date: React.SetStateAction<Date>) => setStartDate(date)} />;
|
|
19
|
-
case 'range':
|
|
20
|
-
return (
|
|
21
|
-
<>
|
|
22
|
-
<DatePicker
|
|
23
|
-
selected={startDate}
|
|
24
|
-
onChange={(date: React.SetStateAction<Date>) => setStartDate(date)}
|
|
25
|
-
selectsStart
|
|
26
|
-
startDate={startDate}
|
|
27
|
-
endDate={endDate}
|
|
28
|
-
/>
|
|
29
|
-
<DatePicker
|
|
30
|
-
selected={endDate}
|
|
31
|
-
onChange={(date: React.SetStateAction<Date>) => setEndDate(date)}
|
|
32
|
-
selectsEnd
|
|
33
|
-
startDate={startDate}
|
|
34
|
-
endDate={endDate}
|
|
35
|
-
minDate={startDate}
|
|
36
|
-
/>
|
|
37
|
-
</>
|
|
38
|
-
);
|
|
39
|
-
case 'portal':
|
|
40
|
-
return <DatePicker selected={startDate} onChange={(date: React.SetStateAction<Date>) => setStartDate(date)} withPortal />;
|
|
41
|
-
case 'months':
|
|
42
|
-
return (
|
|
43
|
-
<DatePicker
|
|
44
|
-
selected={startDateMonth}
|
|
45
|
-
onChange={(date: React.SetStateAction<Date>) => setStartDateMonth(date)}
|
|
46
|
-
dateFormat="MM/yyyy"
|
|
47
|
-
excludeDates={[1661990400000, 1664582400000, 1667260800000, 1672531200000]}
|
|
48
|
-
showMonthYearPicker
|
|
49
|
-
/>
|
|
50
|
-
);
|
|
51
|
-
case 'year-select':
|
|
52
|
-
return (
|
|
53
|
-
<DatePicker
|
|
54
|
-
selected={startDate}
|
|
55
|
-
onChange={(date: React.SetStateAction<Date>) => setStartDate(date)}
|
|
56
|
-
showYearPicker
|
|
57
|
-
dateFormat="yyyy"
|
|
58
|
-
/>
|
|
59
|
-
);
|
|
60
|
-
default:
|
|
61
|
-
return (
|
|
62
|
-
<DatePicker showTimeSelect showIcon selected={startDate} onChange={(date: React.SetStateAction<Date>) => setStartDate(date)} />
|
|
63
|
-
);
|
|
64
|
-
}
|
|
65
|
-
};
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
@import '/src/sass/utilities/variables';
|
|
2
|
-
|
|
3
|
-
.elv-datepicker {
|
|
4
|
-
.react-datepicker {
|
|
5
|
-
font-family: 'SF UI Text', sans-serif !important;
|
|
6
|
-
box-shadow: 0px 0px 2px rgba(14, 31, 53, 0.12), 0px 1px 4px rgba(14, 31, 53, 0.06);
|
|
7
|
-
border-radius: 16px;
|
|
8
|
-
overflow: hidden;
|
|
9
|
-
|
|
10
|
-
&__header {
|
|
11
|
-
background-color: $white;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
&__input-container {
|
|
15
|
-
input {
|
|
16
|
-
font-family: 'SF UI Text', sans-serif !important;
|
|
17
|
-
// min-width: 160px;
|
|
18
|
-
text-align: center;
|
|
19
|
-
|
|
20
|
-
padding-top: 9px;
|
|
21
|
-
padding-bottom: 8px;
|
|
22
|
-
|
|
23
|
-
border: 1px solid #d4d4d4;
|
|
24
|
-
border-radius: 12px;
|
|
25
|
-
background: transparent;
|
|
26
|
-
|
|
27
|
-
&:hover {
|
|
28
|
-
border: 1px solid $primary-600;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
&:focus {
|
|
32
|
-
background: rgba(18, 69, 150, 0.1);
|
|
33
|
-
outline: 2px solid $primary-600;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.react-datepicker__view-calendar-icon {
|
|
38
|
-
input {
|
|
39
|
-
padding-left: 25px !important;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
&__day {
|
|
45
|
-
border-radius: 50%;
|
|
46
|
-
|
|
47
|
-
&--selected {
|
|
48
|
-
border-radius: 50%;
|
|
49
|
-
background-color: $primary-600;
|
|
50
|
-
|
|
51
|
-
&:hover {
|
|
52
|
-
background-color: #4355fa;
|
|
53
|
-
background-color: $primary-400;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
&:hover {
|
|
58
|
-
border-radius: 50%;
|
|
59
|
-
background-color: $primary-200;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
&__month {
|
|
64
|
-
&-text {
|
|
65
|
-
border-radius: 16px;
|
|
66
|
-
|
|
67
|
-
&--selected {
|
|
68
|
-
border-radius: 16px;
|
|
69
|
-
background-color: $primary-600;
|
|
70
|
-
color: white;
|
|
71
|
-
|
|
72
|
-
&:hover {
|
|
73
|
-
border-radius: 16px;
|
|
74
|
-
background-color: #4355fa;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
&.react-datepicker__month--selected {
|
|
79
|
-
&:hover {
|
|
80
|
-
background-color: #4355fa;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
&--selected {
|
|
86
|
-
border-radius: 16px;
|
|
87
|
-
background-color: $primary-600;
|
|
88
|
-
color: white;
|
|
89
|
-
|
|
90
|
-
&:hover {
|
|
91
|
-
border-radius: 16px;
|
|
92
|
-
background-color: #4355fa;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
&__year-wrapper {
|
|
98
|
-
justify-content: center;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
&__year-text {
|
|
102
|
-
border-radius: 16px;
|
|
103
|
-
|
|
104
|
-
&--selected {
|
|
105
|
-
border-radius: 16px;
|
|
106
|
-
background-color: $primary-600;
|
|
107
|
-
color: white;
|
|
108
|
-
|
|
109
|
-
&:hover {
|
|
110
|
-
border-radius: 16px;
|
|
111
|
-
background-color: #4355fa;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {ComponentStory, ComponentMeta} from '@storybook/react';
|
|
3
|
-
|
|
4
|
-
import {DatePickerComponent} from './DatePickerComponent';
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
title: 'Form/DatePickerComponent',
|
|
8
|
-
component: DatePickerComponent,
|
|
9
|
-
args: {
|
|
10
|
-
startDate: new Date('2017/06/10'),
|
|
11
|
-
endDate: new Date('2017/06/20'),
|
|
12
|
-
dateFormat: 'dd/MM/yyyy',
|
|
13
|
-
onStartDateChange(date) {
|
|
14
|
-
console.log('Start Date: ' + date);
|
|
15
|
-
},
|
|
16
|
-
onStartDateMonthChange(date) {
|
|
17
|
-
console.log('StartDateMonth: ' + date);
|
|
18
|
-
},
|
|
19
|
-
onEndDateChange(date) {
|
|
20
|
-
console.log('EndDate: ' + date);
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
} as ComponentMeta<typeof DatePickerComponent>;
|
|
24
|
-
|
|
25
|
-
const Template: ComponentStory<typeof DatePickerComponent> = args => <DatePickerComponent {...args} />;
|
|
26
|
-
|
|
27
|
-
export const Day = Template.bind({});
|
|
28
|
-
Day.args = {type: 'day'};
|
|
29
|
-
|
|
30
|
-
export const Range = Template.bind({});
|
|
31
|
-
Range.args = {isRange: true};
|
|
32
|
-
|
|
33
|
-
export const Months = Template.bind({});
|
|
34
|
-
Months.args = {type: 'months', dateFormat: 'MM/yyyy'};
|
|
35
|
-
|
|
36
|
-
export const Year = Template.bind({});
|
|
37
|
-
Year.args = {type: 'year', dateFormat: 'yyyy'};
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import React, {useEffect, useState} from 'react';
|
|
2
|
-
import DatePicker from 'react-datepicker';
|
|
3
|
-
|
|
4
|
-
import 'react-datepicker/dist/react-datepicker.css';
|
|
5
|
-
import './DatePickerComponent.scss';
|
|
6
|
-
|
|
7
|
-
export interface IDatePickerComponent extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
|
|
8
|
-
// base
|
|
9
|
-
type: 'day' | 'months' | 'year';
|
|
10
|
-
dateFormat?: string;
|
|
11
|
-
startDate?: Date;
|
|
12
|
-
endDate?: Date;
|
|
13
|
-
|
|
14
|
-
// boolean
|
|
15
|
-
showIcon?: boolean;
|
|
16
|
-
withPortal?: boolean;
|
|
17
|
-
|
|
18
|
-
isRange?: boolean;
|
|
19
|
-
|
|
20
|
-
// events
|
|
21
|
-
onStartDateChange?: (date: Date) => void;
|
|
22
|
-
onStartDateMonthChange?: (date: Date) => void;
|
|
23
|
-
onEndDateChange?: (date: Date) => void;
|
|
24
|
-
|
|
25
|
-
// react
|
|
26
|
-
className?: string;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export const DatePickerComponent = ({
|
|
30
|
-
type,
|
|
31
|
-
dateFormat,
|
|
32
|
-
startDate,
|
|
33
|
-
endDate,
|
|
34
|
-
showIcon,
|
|
35
|
-
withPortal,
|
|
36
|
-
isRange,
|
|
37
|
-
onStartDateChange,
|
|
38
|
-
onEndDateChange,
|
|
39
|
-
className,
|
|
40
|
-
...props
|
|
41
|
-
}: IDatePickerComponent) => {
|
|
42
|
-
const [startDateState, setStartDateState] = useState(startDate ? startDate : new Date());
|
|
43
|
-
const [endDateState, setEndDateState] = useState(endDate ? endDate : new Date());
|
|
44
|
-
|
|
45
|
-
useEffect(() => {
|
|
46
|
-
onStartDateChange && onStartDateChange(startDateState);
|
|
47
|
-
}, [startDateState]);
|
|
48
|
-
|
|
49
|
-
useEffect(() => {
|
|
50
|
-
onEndDateChange && onEndDateChange(endDateState);
|
|
51
|
-
}, [endDateState]);
|
|
52
|
-
|
|
53
|
-
return !isRange ? (
|
|
54
|
-
<div className="elv-component elv-datepicker" {...props}>
|
|
55
|
-
<DatePicker
|
|
56
|
-
selected={startDateState}
|
|
57
|
-
onChange={(date: React.SetStateAction<Date>) => setStartDateState(date)}
|
|
58
|
-
withPortal={withPortal}
|
|
59
|
-
showMonthYearPicker={type == 'months' ? true : false}
|
|
60
|
-
showYearPicker={type == 'year' ? true : false}
|
|
61
|
-
dateFormat={dateFormat}
|
|
62
|
-
showIcon={showIcon}
|
|
63
|
-
className={className}
|
|
64
|
-
/>
|
|
65
|
-
</div>
|
|
66
|
-
) : (
|
|
67
|
-
<div className="elv-component elv-datepicker" {...props}>
|
|
68
|
-
<DatePicker
|
|
69
|
-
selected={startDateState}
|
|
70
|
-
onChange={(date: React.SetStateAction<Date>) => setStartDateState(date)}
|
|
71
|
-
withPortal={withPortal}
|
|
72
|
-
showMonthYearPicker={type == 'months' ? true : false}
|
|
73
|
-
showYearPicker={type == 'year' ? true : false}
|
|
74
|
-
dateFormat={dateFormat}
|
|
75
|
-
showIcon={showIcon}
|
|
76
|
-
selectsStart
|
|
77
|
-
startDate={startDateState}
|
|
78
|
-
endDate={endDateState}
|
|
79
|
-
className={className}
|
|
80
|
-
/>
|
|
81
|
-
<DatePicker
|
|
82
|
-
selected={endDateState}
|
|
83
|
-
onChange={(date: React.SetStateAction<Date>) => setEndDateState(date)}
|
|
84
|
-
withPortal={withPortal}
|
|
85
|
-
showMonthYearPicker={type == 'months' ? true : false}
|
|
86
|
-
showYearPicker={type == 'year' ? true : false}
|
|
87
|
-
dateFormat={dateFormat}
|
|
88
|
-
showIcon={showIcon}
|
|
89
|
-
selectsEnd
|
|
90
|
-
startDate={startDateState}
|
|
91
|
-
endDate={endDateState}
|
|
92
|
-
minDate={startDateState}
|
|
93
|
-
className={className}
|
|
94
|
-
/>
|
|
95
|
-
</div>
|
|
96
|
-
);
|
|
97
|
-
};
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import {ComponentStory, ComponentMeta} from '@storybook/react';
|
|
2
|
-
import {Filters} from './Filters';
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: 'Form/Filters',
|
|
6
|
-
component: Filters,
|
|
7
|
-
args: {
|
|
8
|
-
size: 'sm',
|
|
9
|
-
fill: 'outline',
|
|
10
|
-
disabled: false,
|
|
11
|
-
error: false,
|
|
12
|
-
placeholder: 'Filtrar',
|
|
13
|
-
button: {
|
|
14
|
-
type: 'button',
|
|
15
|
-
color: 'primary',
|
|
16
|
-
size: 'normal',
|
|
17
|
-
fill: 'solid',
|
|
18
|
-
loading: false,
|
|
19
|
-
disabled: false,
|
|
20
|
-
label: 'Aplicar Filtros',
|
|
21
|
-
trailingIcon: true,
|
|
22
|
-
},
|
|
23
|
-
buttonCleaner: {
|
|
24
|
-
type: 'button',
|
|
25
|
-
color: 'tertiary',
|
|
26
|
-
size: 'normal',
|
|
27
|
-
fill: 'unstyled',
|
|
28
|
-
loading: false,
|
|
29
|
-
disabled: false,
|
|
30
|
-
label: 'Borrar Filtros',
|
|
31
|
-
trailingIcon: true,
|
|
32
|
-
},
|
|
33
|
-
onChangeFilters: () => console.log('Filter Change'),
|
|
34
|
-
section: [
|
|
35
|
-
{
|
|
36
|
-
name: 'antiguedad',
|
|
37
|
-
label: 'FILTRAR ANTIGÜEDAD: ',
|
|
38
|
-
type: 'radio',
|
|
39
|
-
options: [{name: 'Más viejo'}, {name: 'Más nuevo'}],
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
name: 'anio',
|
|
43
|
-
label: 'FILTRAR POR AÑO: ',
|
|
44
|
-
type: 'checkbox',
|
|
45
|
-
options: [{name: '2019'}, {name: '2020'}, {name: '2021'}, {name: '2022'}],
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
name: 'order',
|
|
49
|
-
label: 'ORDENAR: ',
|
|
50
|
-
type: 'radio',
|
|
51
|
-
options: [
|
|
52
|
-
{icon: 'fa-solid fa-home', name: 'Ascendente', iconItem: {icon: 'fa-solid fa-arrow-up'}},
|
|
53
|
-
{icon: 'fa-solid fa-home', name: 'Descendente', iconItem: {icon: 'fa-solid fa-arrow-down'}},
|
|
54
|
-
],
|
|
55
|
-
},
|
|
56
|
-
],
|
|
57
|
-
},
|
|
58
|
-
} as ComponentMeta<typeof Filters>;
|
|
59
|
-
|
|
60
|
-
const Template: ComponentStory<typeof Filters> = args => <Filters {...args} />;
|
|
61
|
-
|
|
62
|
-
export const Outline = Template.bind({});
|
|
63
|
-
Outline.args = {
|
|
64
|
-
fill: 'outline',
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
export const Rounded = Template.bind({});
|
|
68
|
-
Rounded.args = {
|
|
69
|
-
fill: 'rounded',
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
export const Underline = Template.bind({});
|
|
73
|
-
Underline.args = {
|
|
74
|
-
fill: 'underline',
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
export const Unstyled = Template.bind({});
|
|
78
|
-
Unstyled.args = {
|
|
79
|
-
fill: 'unstyled',
|
|
80
|
-
};
|
|
81
|
-
export const Background = Template.bind({});
|
|
82
|
-
Background.args = {
|
|
83
|
-
fill: 'background',
|
|
84
|
-
};
|