dgrcorrientes-modulos 1.0.3 → 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/package.json +1 -61
- 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/README.md +0 -12
- package/dist/package.json +0 -1
- package/dist-config.cjs +0 -57
- package/index.html +0 -13
- package/public/elevation.ico +0 -0
- package/public/elevationImage.png +0 -0
- package/public/vite.svg +0 -1
- 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/{dist/components.js → components.js} +0 -0
- /package/{dist/components.umd.cjs → components.umd.cjs} +0 -0
- /package/{dist/elevation.ico → elevation.ico} +0 -0
- /package/{dist/elevationImage.png → elevationImage.png} +0 -0
- /package/{dist/index.d.ts → index.d.ts} +0 -0
- /package/{dist/style.css → style.css} +0 -0
- /package/{dist/vite.svg → vite.svg} +0 -0
|
@@ -1,230 +0,0 @@
|
|
|
1
|
-
import {useEffect, useRef, useState} from 'react';
|
|
2
|
-
import './filters.scss';
|
|
3
|
-
import {shortenText} from '../../../utils/functions';
|
|
4
|
-
import {Icon, IIcon} from '../../Elements/Icon/Icon';
|
|
5
|
-
import {Button, IButton} from '../../Elements/Button/Button';
|
|
6
|
-
import {Checkbox} from '../Checkbox/Checkbox';
|
|
7
|
-
import {Radio} from '../Radio/Radio';
|
|
8
|
-
import {Badge} from '../../Elements/Badge/Badge';
|
|
9
|
-
|
|
10
|
-
export interface IFilters extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
|
|
11
|
-
// base
|
|
12
|
-
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
13
|
-
fill?: 'outline' | 'rounded' | 'underline' | 'unstyled' | 'background';
|
|
14
|
-
placeholder: string;
|
|
15
|
-
button: IButton;
|
|
16
|
-
buttonCleaner: IButton;
|
|
17
|
-
section?: {
|
|
18
|
-
name: string;
|
|
19
|
-
type: string;
|
|
20
|
-
label: string;
|
|
21
|
-
options?: {name: string; iconItem?: IIcon; onClick?: () => void}[];
|
|
22
|
-
}[];
|
|
23
|
-
|
|
24
|
-
// boolean
|
|
25
|
-
disabled?: boolean;
|
|
26
|
-
error?: boolean;
|
|
27
|
-
|
|
28
|
-
// events
|
|
29
|
-
onChangeFilters?: (filters: FilterValue[]) => void;
|
|
30
|
-
|
|
31
|
-
// react
|
|
32
|
-
className?: string;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export interface FilterValue {
|
|
36
|
-
name: string;
|
|
37
|
-
label?: string;
|
|
38
|
-
value: string[];
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export const Filters = ({
|
|
42
|
-
size = 'sm',
|
|
43
|
-
fill = 'outline',
|
|
44
|
-
disabled = false,
|
|
45
|
-
placeholder,
|
|
46
|
-
error,
|
|
47
|
-
section,
|
|
48
|
-
button,
|
|
49
|
-
buttonCleaner,
|
|
50
|
-
onChangeFilters,
|
|
51
|
-
className,
|
|
52
|
-
...props
|
|
53
|
-
}: IFilters) => {
|
|
54
|
-
const [visibleDropdown, setVisibleDropdown] = useState(false);
|
|
55
|
-
const [visibleCleaner, setvisibleCleaner] = useState(false);
|
|
56
|
-
const [visibleAplicate, setvisibleAplicate] = useState(false);
|
|
57
|
-
const [filterValues, setFilterValues] = useState<FilterValue[]>([]);
|
|
58
|
-
const [filterValuesChanged, setFilterValuesChanged] = useState<FilterValue[]>([]);
|
|
59
|
-
|
|
60
|
-
const handleFilterChange = (type: string, filterName: string, selectedValue: string) => {
|
|
61
|
-
const sectionIndex = filterValues.findIndex(f => f.name === filterName);
|
|
62
|
-
const newValues = [...filterValues];
|
|
63
|
-
|
|
64
|
-
if (type === 'radio') {
|
|
65
|
-
if (sectionIndex >= 0) {
|
|
66
|
-
newValues[sectionIndex] = {name: filterName, value: [selectedValue]};
|
|
67
|
-
} else {
|
|
68
|
-
newValues.push({name: filterName, value: [selectedValue]});
|
|
69
|
-
}
|
|
70
|
-
} else {
|
|
71
|
-
const valueIndex = filterValues[sectionIndex]?.value?.indexOf(selectedValue);
|
|
72
|
-
if (sectionIndex >= 0 && valueIndex >= 0) {
|
|
73
|
-
newValues[sectionIndex].value.splice(valueIndex, 1);
|
|
74
|
-
} else if (sectionIndex >= 0) {
|
|
75
|
-
newValues[sectionIndex].value.push(selectedValue);
|
|
76
|
-
} else {
|
|
77
|
-
newValues.push({name: filterName, value: [selectedValue]});
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
if (newValues[sectionIndex]?.value.length === 0) {
|
|
82
|
-
newValues.splice(sectionIndex, 1);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
if (newValues.length > 0) {
|
|
86
|
-
setvisibleAplicate(true);
|
|
87
|
-
}
|
|
88
|
-
setFilterValues(newValues);
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
const handleApplyFilters = () => {
|
|
92
|
-
if (onChangeFilters) {
|
|
93
|
-
onChangeFilters(filterValues);
|
|
94
|
-
setFilterValuesChanged(filterValues);
|
|
95
|
-
setvisibleAplicate(false);
|
|
96
|
-
|
|
97
|
-
if (filterValues.length === 0) {
|
|
98
|
-
setvisibleCleaner(false);
|
|
99
|
-
} else {
|
|
100
|
-
setvisibleCleaner(true);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
const handleCleanFilter = () => {
|
|
106
|
-
setFilterValues([]);
|
|
107
|
-
|
|
108
|
-
const containers = document.querySelectorAll('.section__options');
|
|
109
|
-
containers.forEach(container => {
|
|
110
|
-
const labels = container.querySelectorAll('label');
|
|
111
|
-
|
|
112
|
-
labels.forEach(label => {
|
|
113
|
-
const inputs = label.querySelectorAll('input');
|
|
114
|
-
inputs.forEach(input => {
|
|
115
|
-
input.checked = false;
|
|
116
|
-
});
|
|
117
|
-
});
|
|
118
|
-
});
|
|
119
|
-
setvisibleCleaner(false);
|
|
120
|
-
setvisibleAplicate(false);
|
|
121
|
-
|
|
122
|
-
if (onChangeFilters) {
|
|
123
|
-
onChangeFilters([]);
|
|
124
|
-
setFilterValuesChanged([]);
|
|
125
|
-
}
|
|
126
|
-
};
|
|
127
|
-
|
|
128
|
-
function changeDrop(): React.MouseEventHandler<HTMLDivElement> {
|
|
129
|
-
return (event: React.MouseEvent<HTMLDivElement>) => {
|
|
130
|
-
setVisibleDropdown(!visibleDropdown);
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
const dropRef = useRef<HTMLDivElement>(null);
|
|
135
|
-
useEffect(() => {
|
|
136
|
-
function handleClickOutside(event: MouseEvent) {
|
|
137
|
-
if (dropRef.current && !dropRef.current.contains(event.target as Node)) {
|
|
138
|
-
setVisibleDropdown(false);
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
document.addEventListener('click', handleClickOutside);
|
|
143
|
-
|
|
144
|
-
return () => {
|
|
145
|
-
document.removeEventListener('click', handleClickOutside);
|
|
146
|
-
};
|
|
147
|
-
}, [dropRef]);
|
|
148
|
-
|
|
149
|
-
return (
|
|
150
|
-
<div className="elv-component elv-filters" {...props}>
|
|
151
|
-
<div className={`filter-container ${className ? className : ''}`} ref={dropRef}>
|
|
152
|
-
<div
|
|
153
|
-
className={[
|
|
154
|
-
'filter-container__filter',
|
|
155
|
-
`filter--${fill}`,
|
|
156
|
-
`filter--${size}`,
|
|
157
|
-
`${error ? `filter--error` : ''} ${disabled ? `filter--disabled` : ''}`,
|
|
158
|
-
,
|
|
159
|
-
].join(' ')}
|
|
160
|
-
onClick={changeDrop()}
|
|
161
|
-
>
|
|
162
|
-
<Icon icon="fa-solid fa-filter" className={'filter'} />
|
|
163
|
-
<span className="placeholder">{shortenText(placeholder, 25)}</span>
|
|
164
|
-
{filterValuesChanged.length > 0 && <Badge color="primary" text={filterValuesChanged.length.toString()} />}
|
|
165
|
-
<Icon icon="fa-solid fa-chevron-down" className={'chebron'} />
|
|
166
|
-
</div>
|
|
167
|
-
<div className={`filter-container__dropdown filter--${size} ${visibleDropdown ? 'filter-container__dropdown--active' : ''}`}>
|
|
168
|
-
{section?.map(s => (
|
|
169
|
-
<div key={s.name} className="section">
|
|
170
|
-
<p className="section__title is-5">{s.label}</p>
|
|
171
|
-
<div className={`section__options ${s.type == 'radio' ? 'control' : 'checkbox'} is-flex is-flex-direction-column`}>
|
|
172
|
-
{s.options?.map(o => (
|
|
173
|
-
<div key={o.name}>
|
|
174
|
-
<label
|
|
175
|
-
htmlFor={o.name}
|
|
176
|
-
className={`filter-label ${s.type == 'radio' ? 'radio' : 'checkbox'} is-flex is-justify-content-space-between`}
|
|
177
|
-
>
|
|
178
|
-
<span className="filter-label__name is-flex">
|
|
179
|
-
{o.iconItem && <Icon {...o.iconItem}></Icon>}
|
|
180
|
-
<p className="">{o.name}</p>
|
|
181
|
-
</span>
|
|
182
|
-
{s.type == 'radio' ? (
|
|
183
|
-
<Radio label="" name={s.name} size="md" value={o.name} onCheck={() => handleFilterChange(s.type, s.name, o.name)} />
|
|
184
|
-
) : (
|
|
185
|
-
<Checkbox
|
|
186
|
-
label=""
|
|
187
|
-
size="md"
|
|
188
|
-
value={o.name}
|
|
189
|
-
name={s.name}
|
|
190
|
-
onCheck={() => handleFilterChange(s.type, s.name, o.name)}
|
|
191
|
-
/>
|
|
192
|
-
)}
|
|
193
|
-
</label>
|
|
194
|
-
</div>
|
|
195
|
-
))}
|
|
196
|
-
</div>
|
|
197
|
-
</div>
|
|
198
|
-
))}
|
|
199
|
-
{visibleAplicate || visibleCleaner ? (
|
|
200
|
-
<div className="actionButtons is-flex is-flex-direction-column">
|
|
201
|
-
{visibleAplicate && (
|
|
202
|
-
<span className="button-aplicate is-flex is-justify-content-center">
|
|
203
|
-
<Button
|
|
204
|
-
label={button.label !== undefined ? shortenText(button.label, 25) : ''}
|
|
205
|
-
trailingIcon={button.trailingIcon}
|
|
206
|
-
isFullWidth={true}
|
|
207
|
-
onClick={handleApplyFilters}
|
|
208
|
-
{...button}
|
|
209
|
-
/>
|
|
210
|
-
</span>
|
|
211
|
-
)}
|
|
212
|
-
{visibleCleaner && (
|
|
213
|
-
<span className="button-cleaner is-flex is-justify-content-center">
|
|
214
|
-
<Button
|
|
215
|
-
{...buttonCleaner}
|
|
216
|
-
label={buttonCleaner.label !== undefined ? shortenText(buttonCleaner.label, 25) : ''}
|
|
217
|
-
trailingIcon={buttonCleaner.trailingIcon}
|
|
218
|
-
onClick={handleCleanFilter}
|
|
219
|
-
/>
|
|
220
|
-
</span>
|
|
221
|
-
)}
|
|
222
|
-
</div>
|
|
223
|
-
) : (
|
|
224
|
-
<></>
|
|
225
|
-
)}
|
|
226
|
-
</div>
|
|
227
|
-
</div>
|
|
228
|
-
</div>
|
|
229
|
-
);
|
|
230
|
-
};
|
|
@@ -1,261 +0,0 @@
|
|
|
1
|
-
@import '/src/sass/utilities/variables';
|
|
2
|
-
|
|
3
|
-
.elv-filters {
|
|
4
|
-
display: inline-flex;
|
|
5
|
-
|
|
6
|
-
.filter-container {
|
|
7
|
-
position: relative;
|
|
8
|
-
display: inline-block;
|
|
9
|
-
|
|
10
|
-
&__filter {
|
|
11
|
-
box-sizing: border-box;
|
|
12
|
-
display: flex;
|
|
13
|
-
flex-direction: row;
|
|
14
|
-
align-items: center;
|
|
15
|
-
justify-content: center;
|
|
16
|
-
gap: 4px;
|
|
17
|
-
font-weight: 500;
|
|
18
|
-
color: #171717;
|
|
19
|
-
background-color: white;
|
|
20
|
-
cursor: pointer;
|
|
21
|
-
padding: 8px 12px 8px 12px;
|
|
22
|
-
|
|
23
|
-
.fa_icon.filter {
|
|
24
|
-
font-size: 9px;
|
|
25
|
-
color: $text-600;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.placeholder {
|
|
29
|
-
margin-left: 4px;
|
|
30
|
-
margin-right: 7px;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.fa_icon.chebron {
|
|
34
|
-
font-size: 7px;
|
|
35
|
-
color: $text-400;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.badge {
|
|
39
|
-
border-radius: 15px;
|
|
40
|
-
font-size: 10px;
|
|
41
|
-
margin: 0;
|
|
42
|
-
padding: 3px 8px 3px 7.5px;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
// =================== VARIABLES ====================
|
|
46
|
-
/*outline*/
|
|
47
|
-
&.filter--outline {
|
|
48
|
-
border: 1px solid #d4d4d4;
|
|
49
|
-
border-radius: 12px;
|
|
50
|
-
|
|
51
|
-
&:hover {
|
|
52
|
-
border: 1px solid $primary-600;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
&:focus {
|
|
56
|
-
background-color: rgba(18, 69, 150, 0.1);
|
|
57
|
-
outline: 2px solid $primary-600;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
&.filter--error {
|
|
61
|
-
border: 2px solid red;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
&[disabled] {
|
|
65
|
-
cursor: not-allowed;
|
|
66
|
-
background-color: #ffffff;
|
|
67
|
-
border: 1px solid #d4d4d4;
|
|
68
|
-
color: #171717;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/*rounded*/
|
|
73
|
-
&.filter--rounded {
|
|
74
|
-
border: 1px solid #d4d4d4;
|
|
75
|
-
border-radius: 16px;
|
|
76
|
-
|
|
77
|
-
&:hover {
|
|
78
|
-
border: 1px solid $primary-600;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
&:focus {
|
|
82
|
-
background-color: rgba(18, 69, 150, 0.1);
|
|
83
|
-
outline: 2px solid $primary-600;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
&.filter--error {
|
|
87
|
-
border: 2px solid #dc2626;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
&[disabled] {
|
|
91
|
-
cursor: not-allowed;
|
|
92
|
-
background-color: #ffffff;
|
|
93
|
-
border: 1px solid #d4d4d4;
|
|
94
|
-
color: #171717;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
/*underline*/
|
|
99
|
-
&.filter--underline {
|
|
100
|
-
border: none;
|
|
101
|
-
border-bottom: 1px solid #d4d4d4;
|
|
102
|
-
|
|
103
|
-
&:hover {
|
|
104
|
-
border-bottom: 1px solid $primary-600;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
&:focus {
|
|
108
|
-
background-color: rgba(18, 69, 150, 0.1);
|
|
109
|
-
outline: none;
|
|
110
|
-
border-bottom: 2px solid $primary-600;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
&.filter--error {
|
|
114
|
-
outline: none;
|
|
115
|
-
border-bottom: 2px solid #dc2626;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
&.filter--disabled {
|
|
119
|
-
cursor: not-allowed;
|
|
120
|
-
border-bottom: 1px solid #d4d4d4;
|
|
121
|
-
color: #171717;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
/*unstyled*/
|
|
126
|
-
&.filter--unstyled {
|
|
127
|
-
border: 1px solid transparent;
|
|
128
|
-
border-radius: 12px;
|
|
129
|
-
|
|
130
|
-
&:focus {
|
|
131
|
-
outline: none;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
/*background*/
|
|
136
|
-
&.filter--background {
|
|
137
|
-
border: 1px solid #d4d4d4;
|
|
138
|
-
border-radius: 12px;
|
|
139
|
-
background-color: #f5f5f5;
|
|
140
|
-
|
|
141
|
-
&:hover {
|
|
142
|
-
border: 1px solid $primary-600;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
&:focus {
|
|
146
|
-
background-color: rgba(18, 69, 150, 0.1);
|
|
147
|
-
outline: 2px solid $primary-600;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
&.filter--error {
|
|
151
|
-
border: 2px solid #dc2626;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
&[disabled] {
|
|
155
|
-
cursor: not-allowed;
|
|
156
|
-
background-color: #ffffff;
|
|
157
|
-
border: 1px solid #d4d4d4;
|
|
158
|
-
color: #171717;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
// =================== SIZES ====================
|
|
163
|
-
&.filter--xs {
|
|
164
|
-
font-size: 10px;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
&.filter--sm {
|
|
168
|
-
font-size: 12px;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
&.filter--md {
|
|
172
|
-
font-size: 14px;
|
|
173
|
-
// width: 105px;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
&.filter--lg {
|
|
177
|
-
font-size: 16px;
|
|
178
|
-
// width: 120px;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
&.filter--xl {
|
|
182
|
-
font-size: 18px;
|
|
183
|
-
// width: 130px;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
&.filter--xxl {
|
|
187
|
-
font-size: 20px;
|
|
188
|
-
// width: 140px;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
// =================== STATES ====================
|
|
192
|
-
&.filter--disabled {
|
|
193
|
-
cursor: not-allowed;
|
|
194
|
-
pointer-events: none;
|
|
195
|
-
background-color: white;
|
|
196
|
-
border-color: $muted-300;
|
|
197
|
-
color: $muted-400;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
&.filter--error {
|
|
201
|
-
border-color: 1px solid red;
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
&__dropdown {
|
|
206
|
-
display: none;
|
|
207
|
-
position: absolute;
|
|
208
|
-
background-color: white;
|
|
209
|
-
background: #ffffff;
|
|
210
|
-
width: 236px;
|
|
211
|
-
padding: 16px;
|
|
212
|
-
box-shadow: 0px 14px 24px rgba(20, 23, 38, 0.12);
|
|
213
|
-
border-radius: 6px;
|
|
214
|
-
z-index: 1;
|
|
215
|
-
|
|
216
|
-
&--active {
|
|
217
|
-
display: block;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
.section {
|
|
221
|
-
padding: 0;
|
|
222
|
-
|
|
223
|
-
&__title {
|
|
224
|
-
font-size: 10px;
|
|
225
|
-
color: $text-400;
|
|
226
|
-
margin: 0;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
&__options {
|
|
230
|
-
.filter-label {
|
|
231
|
-
&__name {
|
|
232
|
-
gap: 10px;
|
|
233
|
-
font-size: 14px;
|
|
234
|
-
margin: 2px 12px;
|
|
235
|
-
|
|
236
|
-
i {
|
|
237
|
-
font-size: 20px;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
svg {
|
|
241
|
-
height: 20px;
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
padding-bottom: 15px;
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
.actionButtons {
|
|
250
|
-
gap: 10px;
|
|
251
|
-
|
|
252
|
-
.button-cleaner {
|
|
253
|
-
.button {
|
|
254
|
-
color: $error-600;
|
|
255
|
-
font-weight: $fw-semibold;
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import {ComponentStory, ComponentMeta} from '@storybook/react';
|
|
2
|
-
import {Input} from './Input';
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: 'Form/Input',
|
|
6
|
-
component: Input,
|
|
7
|
-
args: {
|
|
8
|
-
type: 'text',
|
|
9
|
-
color: 'none',
|
|
10
|
-
size: 'normal',
|
|
11
|
-
placeholder: 'Input placeholder',
|
|
12
|
-
onChangeInput: event => console.log('Input value changed:', event.target.value),
|
|
13
|
-
},
|
|
14
|
-
} as ComponentMeta<typeof Input>;
|
|
15
|
-
|
|
16
|
-
const Template: ComponentStory<typeof Input> = args => <Input {...args} />;
|
|
17
|
-
|
|
18
|
-
export const Standard = Template.bind({});
|
|
19
|
-
Standard.args = {};
|
|
20
|
-
|
|
21
|
-
export const Icons = Template.bind({});
|
|
22
|
-
Icons.args = {
|
|
23
|
-
iconLeft: {icon: 'fas fa-envelope'},
|
|
24
|
-
iconRight: {icon: 'fas fa-check'},
|
|
25
|
-
};
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import {useState} from 'react';
|
|
2
|
-
import {IIcon, Icon} from '../../Elements/Icon/Icon';
|
|
3
|
-
import './input.scss';
|
|
4
|
-
|
|
5
|
-
export interface IInput extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
|
|
6
|
-
// base
|
|
7
|
-
type: 'text' | 'password' | 'email' | 'tel' | 'number';
|
|
8
|
-
color: 'none' | 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger';
|
|
9
|
-
size: 'small' | 'normal' | 'medium' | 'large';
|
|
10
|
-
placeholder?: string;
|
|
11
|
-
defaultValue?: string;
|
|
12
|
-
|
|
13
|
-
iconLeft?: IIcon;
|
|
14
|
-
iconRight?: IIcon;
|
|
15
|
-
|
|
16
|
-
// boolean
|
|
17
|
-
isRounded?: boolean;
|
|
18
|
-
isLoading?: boolean;
|
|
19
|
-
isDisabled?: boolean;
|
|
20
|
-
hasError?: boolean;
|
|
21
|
-
|
|
22
|
-
// events
|
|
23
|
-
onChangeInput?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
24
|
-
|
|
25
|
-
// react
|
|
26
|
-
className?: string;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export const Input = ({
|
|
30
|
-
type,
|
|
31
|
-
color,
|
|
32
|
-
size,
|
|
33
|
-
placeholder,
|
|
34
|
-
defaultValue,
|
|
35
|
-
iconLeft,
|
|
36
|
-
iconRight,
|
|
37
|
-
isRounded,
|
|
38
|
-
isLoading,
|
|
39
|
-
isDisabled,
|
|
40
|
-
hasError,
|
|
41
|
-
className,
|
|
42
|
-
onChangeInput,
|
|
43
|
-
...props
|
|
44
|
-
}: IInput) => {
|
|
45
|
-
return (
|
|
46
|
-
<div className="elv-component elv-input" {...props}>
|
|
47
|
-
<div className={`field e-input ${className ? className : ''}`}>
|
|
48
|
-
<p
|
|
49
|
-
className={[
|
|
50
|
-
'control',
|
|
51
|
-
`${iconLeft ? ' has-icons-left' : ''}`,
|
|
52
|
-
`${iconRight ? ' has-icons-right' : ''}`,
|
|
53
|
-
`${isLoading ? ' is-loading' : ''}`,
|
|
54
|
-
].join('')}
|
|
55
|
-
>
|
|
56
|
-
<input
|
|
57
|
-
className={[
|
|
58
|
-
'input',
|
|
59
|
-
`${' is-' + size}`,
|
|
60
|
-
`${color !== 'none' ? ' is-' + color : ''}`,
|
|
61
|
-
`${isRounded ? ' is-rounded' : ''}`,
|
|
62
|
-
`${hasError ? ' has-error' : ''}`,
|
|
63
|
-
].join('')}
|
|
64
|
-
type={type}
|
|
65
|
-
placeholder={placeholder}
|
|
66
|
-
defaultValue={defaultValue}
|
|
67
|
-
disabled={isDisabled}
|
|
68
|
-
onChange={e => {
|
|
69
|
-
onChangeInput && onChangeInput(e);
|
|
70
|
-
}}
|
|
71
|
-
/>
|
|
72
|
-
{iconLeft && (
|
|
73
|
-
<span className={`icon is-left ${'is-' + size}`}>
|
|
74
|
-
<Icon {...iconLeft}></Icon>
|
|
75
|
-
</span>
|
|
76
|
-
)}
|
|
77
|
-
{iconRight && (
|
|
78
|
-
<span className={`icon is-right ${'is-' + size}`}>
|
|
79
|
-
<Icon {...iconRight}></Icon>
|
|
80
|
-
</span>
|
|
81
|
-
)}
|
|
82
|
-
</p>
|
|
83
|
-
</div>
|
|
84
|
-
</div>
|
|
85
|
-
);
|
|
86
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
$input-color: $text-strong !default
|
|
2
|
-
$input-background-color: $scheme-main !default
|
|
3
|
-
$input-border-color: $border !default
|
|
4
|
-
$input-height: $control-height !default
|
|
5
|
-
$input-shadow: inset 0 0.0625em 0.125em rgba($scheme-invert, 0.05) !default
|
|
6
|
-
$input-placeholder-color: bulmaRgba($input-color, 0.3) !default
|
|
7
|
-
|
|
8
|
-
$input-hover-color: $text-strong !default
|
|
9
|
-
$input-hover-border-color: $border-hover !default
|
|
10
|
-
|
|
11
|
-
$input-focus-color: $text-strong !default
|
|
12
|
-
$input-focus-border-color: $link !default
|
|
13
|
-
$input-focus-box-shadow-size: 0 0 0 0.125em !default
|
|
14
|
-
$input-focus-box-shadow-color: bulmaRgba($link, 0.25) !default
|
|
15
|
-
|
|
16
|
-
$input-disabled-color: $text-light !default
|
|
17
|
-
$input-disabled-background-color: $background !default
|
|
18
|
-
$input-disabled-border-color: $background !default
|
|
19
|
-
$input-disabled-placeholder-color: bulmaRgba($input-disabled-color, 0.3) !default
|
|
20
|
-
|
|
21
|
-
$input-arrow: $link !default
|
|
22
|
-
|
|
23
|
-
$input-icon-color: $border !default
|
|
24
|
-
$input-icon-active-color: $text !default
|
|
25
|
-
|
|
26
|
-
$input-radius: 12px !default
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
@import '/src/sass/utilities/variables';
|
|
2
|
-
|
|
3
|
-
.elv-input {
|
|
4
|
-
.input {
|
|
5
|
-
box-sizing: border-box;
|
|
6
|
-
|
|
7
|
-
&.is-small {
|
|
8
|
-
border-radius: 12px;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
&.has-error {
|
|
12
|
-
border-color: $error-600;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
&:focus {
|
|
16
|
-
background-color: rgba(18, 69, 150, 0.1);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import {ComponentStory, ComponentMeta} from '@storybook/react';
|
|
2
|
-
import {useState} from 'react';
|
|
3
|
-
import {InputForm} from './Input-form-control';
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: 'Form/Input Form Control',
|
|
7
|
-
component: InputForm,
|
|
8
|
-
args: {
|
|
9
|
-
input: {
|
|
10
|
-
color: 'none',
|
|
11
|
-
placeholder: 'Input placeholder',
|
|
12
|
-
size: 'normal',
|
|
13
|
-
type: 'text',
|
|
14
|
-
iconLeft: {icon: 'fas fa-user'},
|
|
15
|
-
},
|
|
16
|
-
label: 'Label',
|
|
17
|
-
helperText: 'Helper text',
|
|
18
|
-
defaultValue: '',
|
|
19
|
-
maxLength: 10,
|
|
20
|
-
},
|
|
21
|
-
} as ComponentMeta<typeof InputForm>;
|
|
22
|
-
|
|
23
|
-
const Template: ComponentStory<typeof InputForm> = args => <InputForm {...args} />;
|
|
24
|
-
|
|
25
|
-
export const Standard = Template.bind({});
|
|
26
|
-
Standard.args = {};
|