dgrcorrientes-modulos 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.nvmrc +1 -0
- package/.prettierrc.cjs +8 -0
- package/.storybook/main.cjs +11 -0
- package/.storybook/manager-head.html +2 -0
- package/.storybook/manager.cjs +6 -0
- package/.storybook/preview-head.html +3 -0
- package/.storybook/preview.cjs +11 -0
- package/.storybook/themes.cjs +14 -0
- package/README.md +21 -0
- package/StoryBook.txt +19 -0
- package/dist-config.cjs +57 -0
- package/index.html +13 -0
- package/package.json +60 -0
- package/public/elevation.ico +0 -0
- package/public/elevationImage.png +0 -0
- package/public/vite.svg +1 -0
- package/src/App.scss +36 -0
- package/src/App.tsx +34 -0
- package/src/assets/react.svg +1 -0
- package/src/index.js +70 -0
- package/src/index.scss +63 -0
- package/src/index.ts +108 -0
- package/src/main.tsx +11 -0
- package/src/sass/base/_base.scss +50 -0
- package/src/sass/base/_controls.scss +90 -0
- package/src/sass/base/_datepicker.scss +114 -0
- package/src/sass/base/_typo.scss +71 -0
- package/src/sass/base/fonts/SFUIText-Bold.ttf +0 -0
- package/src/sass/base/fonts/SFUIText-BoldItalic.ttf +0 -0
- package/src/sass/base/fonts/SFUIText-Heavy.ttf +0 -0
- package/src/sass/base/fonts/SFUIText-HeavyItalic.ttf +0 -0
- package/src/sass/base/fonts/SFUIText-Light.ttf +0 -0
- package/src/sass/base/fonts/SFUIText-LightItalic.ttf +0 -0
- package/src/sass/base/fonts/SFUIText-Medium.ttf +0 -0
- package/src/sass/base/fonts/SFUIText-MediumItalic.ttf +0 -0
- package/src/sass/base/fonts/SFUIText-Regular.ttf +0 -0
- package/src/sass/base/fonts/SFUIText-RegularItalic.ttf +0 -0
- package/src/sass/base/fonts/SFUIText-Semibold.ttf +0 -0
- package/src/sass/base/fonts/SFUIText-SemiboldItalic.ttf +0 -0
- package/src/sass/bulma/bulma-changes.scss +19 -0
- package/src/sass/bulma/extensions/extensions.sass +1 -0
- package/src/sass/bulma/extensions/steps/bulma-steps.sass +3 -0
- package/src/sass/bulma/extensions/steps/index.sass +421 -0
- package/src/sass/bulma/variables/_variables-bulma.sass +16 -0
- package/src/sass/bulma/variables/components/card.sass +20 -0
- package/src/sass/bulma/variables/components/navbar.sass +50 -0
- package/src/sass/bulma/variables/components/tabs.sass +28 -0
- package/src/sass/bulma/variables/elements/button.sass +46 -0
- package/src/sass/bulma/variables/elements/notification.sass +8 -0
- package/src/sass/bulma/variables/elements/title.sass +20 -0
- package/src/sass/bulma/variables/grid/column.sass +2 -0
- package/src/sass/main.sass +16 -0
- package/src/sass/utilities/_bulma-variables.sass +20 -0
- package/src/sass/utilities/_derived-variables.scss +68 -0
- package/src/sass/utilities/_helpers.scss +70 -0
- package/src/sass/utilities/_variables.scss +147 -0
- package/src/stories/Changelog.stories.tsx +73 -0
- package/src/stories/Components/AssistanceDiary/AssistanceDiary.scss +19 -0
- package/src/stories/Components/AssistanceDiary/AssistanceDiary.stories.tsx +25 -0
- package/src/stories/Components/AssistanceDiary/AssistanceDiary.tsx +57 -0
- package/src/stories/Components/AverageAttended/AverageAttended.scss +39 -0
- package/src/stories/Components/AverageAttended/AverageAttended.stories.tsx +71 -0
- package/src/stories/Components/AverageAttended/AverageAttended.tsx +311 -0
- package/src/stories/Components/Breadcrumb/Breadcrumb.stories.tsx +45 -0
- package/src/stories/Components/Breadcrumb/Breadcrumb.tsx +68 -0
- package/src/stories/Components/Breadcrumb/breadcrumb.scss +82 -0
- package/src/stories/Components/CTA/CTA.scss +76 -0
- package/src/stories/Components/CTA/CTA.stories.tsx +46 -0
- package/src/stories/Components/CTA/CTA.tsx +70 -0
- package/src/stories/Components/Cards/Card CTA/CardCta.stories.tsx +34 -0
- package/src/stories/Components/Cards/Card CTA/CardCta.tsx +81 -0
- package/src/stories/Components/Cards/Card CTA/cardCta.scss +71 -0
- package/src/stories/Components/Cards/Card Expiration/cardExpiration.scss +105 -0
- package/src/stories/Components/Cards/Card Expiration/cardExpiration.stories.tsx +40 -0
- package/src/stories/Components/Cards/Card Expiration/cardExpiration.tsx +95 -0
- package/src/stories/Components/Cards/Card Vertical/CardVertical.stories.tsx +43 -0
- package/src/stories/Components/Cards/Card Vertical/CardVertical.tsx +106 -0
- package/src/stories/Components/Cards/Card Vertical/cardVertical.scss +130 -0
- package/src/stories/Components/Cards/CardActivity/cardActivity.scss +31 -0
- package/src/stories/Components/Cards/CardActivity/cardActivity.stories.tsx +20 -0
- package/src/stories/Components/Cards/CardActivity/cardActivity.tsx +48 -0
- package/src/stories/Components/Cards/CardHorizontal/CardHorizontal.stories.tsx +96 -0
- package/src/stories/Components/Cards/CardHorizontal/CardHorizontal.tsx +94 -0
- package/src/stories/Components/Cards/CardHorizontal/cardHorizontal.scss +65 -0
- package/src/stories/Components/Cards/CardUser/CardUser.stories.tsx +135 -0
- package/src/stories/Components/Cards/CardUser/CardUser.tsx +122 -0
- package/src/stories/Components/Cards/CardUser/cardUser.scss +115 -0
- package/src/stories/Components/Cart/Cart.scss +279 -0
- package/src/stories/Components/Cart/Cart.stories.tsx +350 -0
- package/src/stories/Components/Cart/Cart.tsx +277 -0
- package/src/stories/Components/Collapse/Collapse.scss +339 -0
- package/src/stories/Components/Collapse/Collapse.stories.tsx +766 -0
- package/src/stories/Components/Collapse/Collapse.tsx +451 -0
- package/src/stories/Components/CollapseEdit/CollapseEdit.scss +128 -0
- package/src/stories/Components/CollapseEdit/CollapseEdit.stories.tsx +29 -0
- package/src/stories/Components/CollapseEdit/CollapseEdit.tsx +185 -0
- package/src/stories/Components/CompleteDiary/CompleteDiary.scss +165 -0
- package/src/stories/Components/CompleteDiary/CompleteDiary.stories.tsx +219 -0
- package/src/stories/Components/CompleteDiary/CompleteDiary.tsx +394 -0
- package/src/stories/Components/Dropdown/Dropdown.scss +60 -0
- package/src/stories/Components/Dropdown/Dropdown.stories.tsx +19 -0
- package/src/stories/Components/Dropdown/Dropdown.tsx +99 -0
- package/src/stories/Components/EmptyState/EmptyState.stories.tsx +46 -0
- package/src/stories/Components/EmptyState/EmptyState.tsx +44 -0
- package/src/stories/Components/EmptyState/emptyState.scss +75 -0
- package/src/stories/Components/ErrorPage/ErrorPage.scss +65 -0
- package/src/stories/Components/ErrorPage/ErrorPage.stories.tsx +164 -0
- package/src/stories/Components/ErrorPage/ErrorPage.tsx +107 -0
- package/src/stories/Components/IncomingCall/IncomingCall.scss +27 -0
- package/src/stories/Components/IncomingCall/IncomingCall.stories.tsx +43 -0
- package/src/stories/Components/IncomingCall/IncomingCall.tsx +76 -0
- package/src/stories/Components/ModalConfirm/ModalConfirm.scss +30 -0
- package/src/stories/Components/ModalConfirm/ModalConfirm.stories.tsx +21 -0
- package/src/stories/Components/ModalConfirm/ModalConfirm.tsx +118 -0
- package/src/stories/Components/Pagination/Pagination.scss +42 -0
- package/src/stories/Components/Pagination/Pagination.stories.tsx +25 -0
- package/src/stories/Components/Pagination/Pagination.tsx +143 -0
- package/src/stories/Components/PerformanceAssessment/PerformanceAssessment.scss +26 -0
- package/src/stories/Components/PerformanceAssessment/PerformanceAssessment.stories.tsx +27 -0
- package/src/stories/Components/PerformanceAssessment/PerformanceAssessment.tsx +108 -0
- package/src/stories/Components/ShiftDiary/ShiftDiary.scss +45 -0
- package/src/stories/Components/ShiftDiary/ShiftDiary.stories.tsx +32 -0
- package/src/stories/Components/ShiftDiary/ShiftDiary.tsx +92 -0
- package/src/stories/Components/Stepper/Stepper.stories.tsx +26 -0
- package/src/stories/Components/Stepper/Stepper.tsx +102 -0
- package/src/stories/Components/Stepper/stepper.scss +59 -0
- package/src/stories/Components/Tabs/Tabs.stories.tsx +76 -0
- package/src/stories/Components/Tabs/Tabs.tsx +111 -0
- package/src/stories/Components/Tabs/tabs.scss +118 -0
- package/src/stories/Components/Tooltip/Tooltip.scss +235 -0
- package/src/stories/Components/Tooltip/Tooltip.stories.tsx +125 -0
- package/src/stories/Components/Tooltip/Tooltip.tsx +222 -0
- package/src/stories/Elements/Alert/Alert.stories.tsx +65 -0
- package/src/stories/Elements/Alert/Alert.tsx +49 -0
- package/src/stories/Elements/Alert/alert.scss +189 -0
- package/src/stories/Elements/Badge/Badge.stories.tsx +15 -0
- package/src/stories/Elements/Badge/Badge.tsx +21 -0
- package/src/stories/Elements/Badge/badge.scss +24 -0
- package/src/stories/Elements/Button/Button.stories.tsx +54 -0
- package/src/stories/Elements/Button/Button.tsx +118 -0
- package/src/stories/Elements/Button/button.scss +102 -0
- package/src/stories/Elements/Icon/Icon.stories.tsx +33 -0
- package/src/stories/Elements/Icon/Icon.tsx +57 -0
- package/src/stories/Elements/Icon/icon.scss +15 -0
- package/src/stories/Elements/Icon/icono.svg +1 -0
- package/src/stories/Elements/ProgressBar/ProgressBar.scss +26 -0
- package/src/stories/Elements/ProgressBar/ProgressBar.stories.tsx +19 -0
- package/src/stories/Elements/ProgressBar/ProgressBar.tsx +35 -0
- package/src/stories/Form/Autocomplete/Autocomplete.stories.tsx +55 -0
- package/src/stories/Form/Autocomplete/Autocomplete.tsx +160 -0
- package/src/stories/Form/Autocomplete/autocomplete.scss +311 -0
- package/src/stories/Form/Autocomplete-Prueba/Autocomplete.stories.tsx +50 -0
- package/src/stories/Form/Autocomplete-Prueba/AutocompletePrueba.tsx +83 -0
- package/src/stories/Form/Checkbox/Checkbox.stories.tsx +26 -0
- package/src/stories/Form/Checkbox/Checkbox.tsx +89 -0
- package/src/stories/Form/Checkbox/checkbox.scss +41 -0
- package/src/stories/Form/DatePicker/DatePickerExample.stories.tsx +27 -0
- package/src/stories/Form/DatePicker/DatePickerExample.tsx +65 -0
- package/src/stories/Form/DatePickerComponent/DatePickerComponent.scss +116 -0
- package/src/stories/Form/DatePickerComponent/DatePickerComponent.stories.tsx +37 -0
- package/src/stories/Form/DatePickerComponent/DatePickerComponent.tsx +97 -0
- package/src/stories/Form/Filters/Filters.stories.tsx +84 -0
- package/src/stories/Form/Filters/Filters.tsx +230 -0
- package/src/stories/Form/Filters/filters.scss +261 -0
- package/src/stories/Form/Input/Input.stories.tsx +25 -0
- package/src/stories/Form/Input/Input.tsx +86 -0
- package/src/stories/Form/Input/InputVar.sass +26 -0
- package/src/stories/Form/Input/input.scss +19 -0
- package/src/stories/Form/InputFormControl/Input-form-control.stories.tsx +26 -0
- package/src/stories/Form/InputFormControl/Input-form-control.tsx +48 -0
- package/src/stories/Form/InputFormControl/input-form-control.scss +34 -0
- package/src/stories/Form/Radio/Radio.stories.tsx +19 -0
- package/src/stories/Form/Radio/Radio.tsx +84 -0
- package/src/stories/Form/Radio/radio.scss +19 -0
- package/src/stories/Form/Search/Search.scss +50 -0
- package/src/stories/Form/Search/Search.stories.tsx +26 -0
- package/src/stories/Form/Search/Search.tsx +84 -0
- package/src/stories/Form/Select/Select.stories.tsx +55 -0
- package/src/stories/Form/Select/Select.tsx +121 -0
- package/src/stories/Form/Select/select.scss +303 -0
- package/src/stories/Form/Switch/Switch.stories.tsx +17 -0
- package/src/stories/Form/Switch/Switch.tsx +36 -0
- package/src/stories/Form/Switch/switch.scss +123 -0
- package/src/stories/Form/Textarea/Textarea.stories.tsx +19 -0
- package/src/stories/Form/Textarea/Textarea.tsx +52 -0
- package/src/stories/Form/Textarea/textarea.scss +25 -0
- package/src/stories/Form/UploadFileItem/UploadFileItem.scss +49 -0
- package/src/stories/Form/UploadFileItem/UploadFileItem.stories.tsx +18 -0
- package/src/stories/Form/UploadFileItem/UploadFileItem.tsx +89 -0
- package/src/stories/Form/UploadFiles/UploadFiles.scss +17 -0
- package/src/stories/Form/UploadFiles/UploadFiles.stories.tsx +32 -0
- package/src/stories/Form/UploadFiles/UploadFiles.tsx +177 -0
- package/src/stories/Layout/Footer/Footer.scss +129 -0
- package/src/stories/Layout/Footer/Footer.stories.tsx +101 -0
- package/src/stories/Layout/Footer/Footer.tsx +81 -0
- package/src/stories/Layout/Header/Header.scss +190 -0
- package/src/stories/Layout/Header/Header.stories.tsx +223 -0
- package/src/stories/Layout/Header/Header.tsx +278 -0
- package/src/stories/Layout/HeaderTable/HeaderTable.scss +21 -0
- package/src/stories/Layout/HeaderTable/HeaderTable.stories.tsx +112 -0
- package/src/stories/Layout/HeaderTable/HeaderTable.tsx +72 -0
- package/src/stories/Layout/Sidebar/Sidebar.scss +50 -0
- package/src/stories/Layout/Sidebar/Sidebar.stories.tsx +744 -0
- package/src/stories/Layout/Sidebar/Sidebar.tsx +129 -0
- package/src/stories/Layout/SidebarEmpty/SidebarEmpty.scss +64 -0
- package/src/stories/Layout/SidebarEmpty/SidebarEmpty.stories.tsx +26 -0
- package/src/stories/Layout/SidebarEmpty/SidebarEmpty.tsx +100 -0
- package/src/stories/Layout/Subtitle/Subtitle.scss +88 -0
- package/src/stories/Layout/Subtitle/Subtitle.stories.tsx +46 -0
- package/src/stories/Layout/Subtitle/Subtitle.tsx +108 -0
- package/src/stories/Layout/Title/Title.scss +79 -0
- package/src/stories/Layout/Title/Title.stories.tsx +86 -0
- package/src/stories/Layout/Title/Title.tsx +96 -0
- package/src/stories/Welcome.stories.tsx +111 -0
- package/src/stories/assets/404 Page Not Found _Two Color (1).png +0 -0
- package/src/stories/assets/404 Page Not Found _Two Color.png +0 -0
- package/src/stories/assets/Empty Inbox _Two Color.png +0 -0
- package/src/stories/assets/Loading _Two Color.png +0 -0
- package/src/stories/assets/Notifications_Two Color 1.png +0 -0
- package/src/stories/assets/Online protection_Two Color.png +0 -0
- package/src/stories/assets/Under Constructions _Two Color.png +0 -0
- package/src/stories/assets/bulma.png +0 -0
- package/src/stories/assets/burger.svg +5 -0
- package/src/stories/assets/code-brackets.svg +1 -0
- package/src/stories/assets/colors.svg +1 -0
- package/src/stories/assets/comments.svg +1 -0
- package/src/stories/assets/decor-bg.png +0 -0
- package/src/stories/assets/direction.svg +1 -0
- package/src/stories/assets/e-isologo.svg +4 -0
- package/src/stories/assets/e-isotype.svg +4 -0
- package/src/stories/assets/e-logo_negative.svg +14 -0
- package/src/stories/assets/e-logotype.svg +14 -0
- package/src/stories/assets/flow.svg +1 -0
- package/src/stories/assets/logo_gobierno_corrientes.svg +9 -0
- package/src/stories/assets/logo_rentas_corrientes.svg +10 -0
- package/src/stories/assets/logo_rentas_corrientes_compacto.svg +10 -0
- package/src/stories/assets/plugin.svg +1 -0
- package/src/stories/assets/repo.svg +1 -0
- package/src/stories/assets/stackalt.svg +1 -0
- package/src/stories/assets/storybook.svg +13 -0
- package/src/stories/assets/thumbnail-black.jpg +0 -0
- package/src/stories/assets/thumbnail-black[2].jpg +0 -0
- package/src/stories/assets/thumbnail.jpg +0 -0
- package/src/stories/assets/thumbnail[2].jpg +0 -0
- package/src/stories/changelog.ts +389 -0
- package/src/utils/functions.ts +57 -0
- package/src/vite-env.d.ts +2 -0
- package/static/e-isologo-192.jpg +0 -0
- package/static/e-isologo.svg +4 -0
- package/static/e-logotype.svg +14 -0
- package/static/favicon.ico +0 -0
- package/tsconfig.json +22 -0
- package/tsconfig.node.json +9 -0
- package/vite.config.ts +22 -0
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import {ComponentStory, ComponentMeta} from '@storybook/react';
|
|
2
|
+
import {Tooltip} from './Tooltip';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Components/Tooltip',
|
|
6
|
+
component: Tooltip,
|
|
7
|
+
args: {
|
|
8
|
+
contentType: 'text',
|
|
9
|
+
trianglePos: 'center',
|
|
10
|
+
active: true,
|
|
11
|
+
},
|
|
12
|
+
} as ComponentMeta<typeof Tooltip>;
|
|
13
|
+
|
|
14
|
+
const Template: ComponentStory<typeof Tooltip> = args => <Tooltip {...args} />;
|
|
15
|
+
|
|
16
|
+
export const Standard = Template.bind({});
|
|
17
|
+
Standard.args = {
|
|
18
|
+
contentType: 'text',
|
|
19
|
+
text: 'Usá esta Base Imponible para tu declaración de Bienes Personales 2020',
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const Example1 = Template.bind({});
|
|
23
|
+
Example1.args = {
|
|
24
|
+
contentType: 'calendar',
|
|
25
|
+
date: '14 de Julio',
|
|
26
|
+
sub_title: 'CUIT terminado en 8 y 9',
|
|
27
|
+
text: 'CONTRIBUYENTES DEL IMPUESTO SOBRE LOS INGRESOS BRUTOS – DECLARACIÓN JURADA MENSUAL',
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export const Example2 = Template.bind({});
|
|
31
|
+
Example2.args = {
|
|
32
|
+
contentType: 'taxes',
|
|
33
|
+
principal_item: {label: 'Impuesto inicial', value: '$ 8.700,50'},
|
|
34
|
+
sections: [
|
|
35
|
+
{
|
|
36
|
+
title: 'Descuentos',
|
|
37
|
+
labels: [
|
|
38
|
+
{label: '30% por estar al día', value: '- $ 1.400,00'},
|
|
39
|
+
{label: '15% por cuota única', value: '- $ 660,00'},
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
total: {label: 'Total a pagar', value: '$ 5.900,50'},
|
|
44
|
+
notification: 'Ahorrá 5% extra pagando online.',
|
|
45
|
+
doubleStates: [
|
|
46
|
+
{label: 'Planes', sub_label: 'No apta plan'},
|
|
47
|
+
{label: 'Estado', sub_label: 'A vencer', type: 'state', colorStatus: '#22c55e'},
|
|
48
|
+
],
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export const Example3 = Template.bind({});
|
|
52
|
+
if (Example1.args.sections) {
|
|
53
|
+
Example3.args = {
|
|
54
|
+
...Example2.args,
|
|
55
|
+
sections: [
|
|
56
|
+
...Example1.args.sections,
|
|
57
|
+
{
|
|
58
|
+
title: 'Extras',
|
|
59
|
+
labels: [{label: 'Municipalidad Anisacate', value: '+ $ 740,00'}],
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
};
|
|
63
|
+
} else {
|
|
64
|
+
Example3.args = {
|
|
65
|
+
...Example2.args,
|
|
66
|
+
sections: [
|
|
67
|
+
{
|
|
68
|
+
title: 'Extras',
|
|
69
|
+
labels: [{label: 'Municipalidad Anisacate', value: '+ $ 740,00'}],
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export const Example4 = Template.bind({});
|
|
76
|
+
Example4.args = {
|
|
77
|
+
...Example2.args,
|
|
78
|
+
principal_item: {label: 'Impuesto inicial', value: '$ 38.700,50'},
|
|
79
|
+
sections: [
|
|
80
|
+
{
|
|
81
|
+
title: 'Descuentos',
|
|
82
|
+
labels: [
|
|
83
|
+
{label: '30% por estar al día', value: '- $ 11.400,00'},
|
|
84
|
+
{label: '15% por cuota única', value: '- $ 3.400,00'},
|
|
85
|
+
{label: 'Cupón de crédito 2020', value: '- $ 3.012,00'},
|
|
86
|
+
{label: 'Tope por ley', value: '- $ 3.000,00'},
|
|
87
|
+
{label: 'Tope por ley 2', value: '- $ 4.000,00'},
|
|
88
|
+
],
|
|
89
|
+
},
|
|
90
|
+
],
|
|
91
|
+
total: {label: 'Total a pagar', value: '$ 21.093,50'},
|
|
92
|
+
notification: 'Sin el 5% de descuento extra de las buenas prácticas agropecuarias.',
|
|
93
|
+
alert: {
|
|
94
|
+
icon: 'fa-solid fa-circle-info',
|
|
95
|
+
label: 'El Tope en el Aumento 2021 es el valor que limita los incrementos en tu Impuesto Inmobiliario.',
|
|
96
|
+
},
|
|
97
|
+
tripleStates: [
|
|
98
|
+
{label: 'Anulado', sub_label: 'No'},
|
|
99
|
+
{label: 'Inscripto', sub_label: 'No'},
|
|
100
|
+
{label: 'Registro', sub_label: 'Duplicado', sub_label_color: '#FAC300'},
|
|
101
|
+
],
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
export const Example5 = Template.bind({});
|
|
105
|
+
Example5.args = {
|
|
106
|
+
contentType: 'taxes',
|
|
107
|
+
sections: [
|
|
108
|
+
{
|
|
109
|
+
labels: [
|
|
110
|
+
{label: 'Imponible', value: '$ 103.795,00'},
|
|
111
|
+
{label: 'Alícuota', value: '$ 2,00'},
|
|
112
|
+
],
|
|
113
|
+
},
|
|
114
|
+
],
|
|
115
|
+
amount: {label: 'Importe', value: '$ 2.071,90'},
|
|
116
|
+
doubleStates: [
|
|
117
|
+
{label: 'Factura', sub_label: 'Error', sub_label_color: '#DA1414'},
|
|
118
|
+
{label: 'Fecha', sub_label: 'Periodo Incorrecto', sub_label_color: '#DA1414'},
|
|
119
|
+
],
|
|
120
|
+
tripleStates: [
|
|
121
|
+
{label: 'Anulado', sub_label: 'No'},
|
|
122
|
+
{label: 'Inscripto', sub_label: 'Si'},
|
|
123
|
+
{label: 'Registro', sub_label: 'Duplicado', sub_label_color: '#FAC300'},
|
|
124
|
+
],
|
|
125
|
+
};
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './Tooltip.scss';
|
|
3
|
+
import {Icon} from '../../Elements/Icon/Icon';
|
|
4
|
+
|
|
5
|
+
export interface ITooltip extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
|
|
6
|
+
// base
|
|
7
|
+
contentType: 'calendar' | 'text' | 'taxes';
|
|
8
|
+
trianglePos?: 'none' | 'right' | 'center' | 'left' | 'top-right' | 'top-center' | 'top-left';
|
|
9
|
+
|
|
10
|
+
// boolean
|
|
11
|
+
active?: boolean;
|
|
12
|
+
|
|
13
|
+
// react
|
|
14
|
+
className?: string;
|
|
15
|
+
|
|
16
|
+
// ALL TYPES
|
|
17
|
+
text?: string;
|
|
18
|
+
|
|
19
|
+
// CALENDAR
|
|
20
|
+
date?: string;
|
|
21
|
+
sub_title?: string;
|
|
22
|
+
|
|
23
|
+
// TAXES base
|
|
24
|
+
principal_item?: {label: string; value: string};
|
|
25
|
+
sections?: {title?: string; labels: {label: string; value: string}[]}[];
|
|
26
|
+
total?: {label: string; value: string};
|
|
27
|
+
amount?: {label: string; value: string};
|
|
28
|
+
import?: {label: string; value: string};
|
|
29
|
+
notification?: string;
|
|
30
|
+
|
|
31
|
+
doubleStates?: {label?: string; sub_label?: string; sub_label_color?: string; type?: 'default' | 'state'; colorStatus?: string}[];
|
|
32
|
+
tripleStates?: {label?: string; sub_label?: string; sub_label_color?: string; type?: 'default' | 'state'; colorStatus?: string}[];
|
|
33
|
+
|
|
34
|
+
alert?: {icon?: string; label: string};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export const Tooltip = ({
|
|
38
|
+
contentType,
|
|
39
|
+
trianglePos,
|
|
40
|
+
className,
|
|
41
|
+
active,
|
|
42
|
+
text,
|
|
43
|
+
date,
|
|
44
|
+
sub_title,
|
|
45
|
+
principal_item,
|
|
46
|
+
sections,
|
|
47
|
+
total,
|
|
48
|
+
amount,
|
|
49
|
+
notification,
|
|
50
|
+
doubleStates,
|
|
51
|
+
tripleStates,
|
|
52
|
+
alert,
|
|
53
|
+
...props
|
|
54
|
+
}: ITooltip) => {
|
|
55
|
+
return (
|
|
56
|
+
<>
|
|
57
|
+
{active ? (
|
|
58
|
+
<div className="elv-component elv-tooltip" {...props}>
|
|
59
|
+
<div className={`tooltip ${className ? className : ''}`}>
|
|
60
|
+
<div
|
|
61
|
+
className={`tooltip__content ${contentType && 'tooltip__content--' + contentType} ${
|
|
62
|
+
trianglePos !== 'none' && 'tp tp--' + trianglePos
|
|
63
|
+
}`}
|
|
64
|
+
>
|
|
65
|
+
<div className={`labels is-flex flex-column`}>
|
|
66
|
+
{/* ================ CALENDAR ================ */}
|
|
67
|
+
{contentType === 'calendar' && (
|
|
68
|
+
<>
|
|
69
|
+
<p className="labels__date">{date}</p>
|
|
70
|
+
<p className="labels__text">{text}</p>
|
|
71
|
+
<p className="labels__sub_title">{sub_title}</p>
|
|
72
|
+
</>
|
|
73
|
+
)}
|
|
74
|
+
|
|
75
|
+
{/* ================ TEXT ================ */}
|
|
76
|
+
{contentType === 'text' && <>{text && <p className="labels__text">{text}</p>}</>}
|
|
77
|
+
|
|
78
|
+
{/* ================ TAXES ================ */}
|
|
79
|
+
{contentType === 'taxes' && (
|
|
80
|
+
<>
|
|
81
|
+
{principal_item && (
|
|
82
|
+
<div className="principal-item is-flex is-justify-content-space-between">
|
|
83
|
+
<p className="principal-item__label">{principal_item?.label}</p>
|
|
84
|
+
<p className="principal-item__value">{principal_item?.value}</p>
|
|
85
|
+
</div>
|
|
86
|
+
)}
|
|
87
|
+
|
|
88
|
+
{sections && (
|
|
89
|
+
<div className="tax-sections">
|
|
90
|
+
{sections?.map(sec => (
|
|
91
|
+
<div key={sec.title} className="tax-sections__sec">
|
|
92
|
+
{sec.title && <div className="sec-title">{sec.title}</div>}
|
|
93
|
+
{sec.labels.map(item => (
|
|
94
|
+
<div key={item.label} className="sec-label is-flex is-justify-content-space-between">
|
|
95
|
+
<p className="sec-label__label">{item.label}</p>
|
|
96
|
+
<p className="sec-label__value">{item.value}</p>
|
|
97
|
+
</div>
|
|
98
|
+
))}
|
|
99
|
+
</div>
|
|
100
|
+
))}
|
|
101
|
+
</div>
|
|
102
|
+
)}
|
|
103
|
+
|
|
104
|
+
{total && (
|
|
105
|
+
<div className="total is-flex is-justify-content-space-between">
|
|
106
|
+
<p className="total__label">{total?.label}</p>
|
|
107
|
+
<p className="total__value">{total?.value}</p>
|
|
108
|
+
</div>
|
|
109
|
+
)}
|
|
110
|
+
|
|
111
|
+
{amount && (
|
|
112
|
+
<div className="amount is-flex is-justify-content-space-between">
|
|
113
|
+
<p className="amount__label">{amount?.label}</p>
|
|
114
|
+
<p className="amount__value">{amount?.value}</p>
|
|
115
|
+
</div>
|
|
116
|
+
)}
|
|
117
|
+
|
|
118
|
+
{notification && <div className="tax-notification">{notification}</div>}
|
|
119
|
+
|
|
120
|
+
{doubleStates && (
|
|
121
|
+
<div className="double-state columns is-mobile">
|
|
122
|
+
<div className="double-state__state column is-6">
|
|
123
|
+
<p className="state-label">{doubleStates[0]?.label}</p>
|
|
124
|
+
{doubleStates[0].type === 'state' ? (
|
|
125
|
+
<div className="state-status" style={{color: doubleStates[0]?.colorStatus}}>
|
|
126
|
+
<Icon icon="fa-solid fa-circle"></Icon>{' '}
|
|
127
|
+
<p className="state-status__text" style={{color: doubleStates[0]?.sub_label_color}}>
|
|
128
|
+
{doubleStates[0]?.sub_label}
|
|
129
|
+
</p>
|
|
130
|
+
</div>
|
|
131
|
+
) : (
|
|
132
|
+
<p className="state-sub_label" style={{color: doubleStates[0]?.sub_label_color}}>
|
|
133
|
+
{doubleStates[0]?.sub_label}
|
|
134
|
+
</p>
|
|
135
|
+
)}
|
|
136
|
+
</div>
|
|
137
|
+
<div className="double-state__state column is-6">
|
|
138
|
+
<p className="state-label">{doubleStates[1]?.label}</p>
|
|
139
|
+
{doubleStates[1].type === 'state' ? (
|
|
140
|
+
<div className="state-status" style={{color: doubleStates[1]?.colorStatus}}>
|
|
141
|
+
<Icon icon="fa-solid fa-circle"></Icon>{' '}
|
|
142
|
+
<p className="state-status__text" style={{color: doubleStates[1]?.sub_label_color}}>
|
|
143
|
+
{doubleStates[1]?.sub_label}
|
|
144
|
+
</p>
|
|
145
|
+
</div>
|
|
146
|
+
) : (
|
|
147
|
+
<p className="state-sub_label" style={{color: doubleStates[1]?.sub_label_color}}>
|
|
148
|
+
{doubleStates[1]?.sub_label}
|
|
149
|
+
</p>
|
|
150
|
+
)}
|
|
151
|
+
</div>
|
|
152
|
+
</div>
|
|
153
|
+
)}
|
|
154
|
+
|
|
155
|
+
{tripleStates && (
|
|
156
|
+
<div className="triple-state columns is-mobile">
|
|
157
|
+
<div className="triple-state__state column is-4">
|
|
158
|
+
<p className="state-label">{tripleStates[0]?.label}</p>
|
|
159
|
+
{tripleStates[0].type === 'state' ? (
|
|
160
|
+
<div className="state-status" style={{color: tripleStates[0]?.colorStatus}}>
|
|
161
|
+
<Icon icon="fa-solid fa-circle"></Icon>{' '}
|
|
162
|
+
<p className="state-status__text" style={{color: tripleStates[0]?.sub_label_color}}>
|
|
163
|
+
{tripleStates[0]?.sub_label}
|
|
164
|
+
</p>
|
|
165
|
+
</div>
|
|
166
|
+
) : (
|
|
167
|
+
<p className="state-sub_label" style={{color: tripleStates[0]?.sub_label_color}}>
|
|
168
|
+
{tripleStates[0]?.sub_label}
|
|
169
|
+
</p>
|
|
170
|
+
)}
|
|
171
|
+
</div>
|
|
172
|
+
<div className="triple-state__state column is-4">
|
|
173
|
+
<p className="state-label">{tripleStates[1]?.label}</p>
|
|
174
|
+
{tripleStates[1].type === 'state' ? (
|
|
175
|
+
<div className="state-status" style={{color: tripleStates[1]?.colorStatus}}>
|
|
176
|
+
<Icon icon="fa-solid fa-circle"></Icon>{' '}
|
|
177
|
+
<p className="state-status__text" style={{color: tripleStates[1]?.sub_label_color}}>
|
|
178
|
+
{tripleStates[1]?.sub_label}
|
|
179
|
+
</p>
|
|
180
|
+
</div>
|
|
181
|
+
) : (
|
|
182
|
+
<p className="state-sub_label" style={{color: tripleStates[1]?.sub_label_color}}>
|
|
183
|
+
{tripleStates[1]?.sub_label}
|
|
184
|
+
</p>
|
|
185
|
+
)}
|
|
186
|
+
</div>
|
|
187
|
+
<div className="triple-state__state column is-4">
|
|
188
|
+
<p className="state-label">{tripleStates[2]?.label}</p>
|
|
189
|
+
{tripleStates[2].type === 'state' ? (
|
|
190
|
+
<div className="state-status" style={{color: tripleStates[2]?.colorStatus}}>
|
|
191
|
+
<Icon icon="fa-solid fa-circle"></Icon>{' '}
|
|
192
|
+
<p className="state-status__text" style={{color: tripleStates[2]?.sub_label_color}}>
|
|
193
|
+
{tripleStates[2]?.sub_label}
|
|
194
|
+
</p>
|
|
195
|
+
</div>
|
|
196
|
+
) : (
|
|
197
|
+
<p className="state-sub_label" style={{color: tripleStates[2]?.sub_label_color}}>
|
|
198
|
+
{tripleStates[2]?.sub_label}
|
|
199
|
+
</p>
|
|
200
|
+
)}
|
|
201
|
+
</div>
|
|
202
|
+
</div>
|
|
203
|
+
)}
|
|
204
|
+
|
|
205
|
+
{alert && (
|
|
206
|
+
<div className="tax-alert is-flex">
|
|
207
|
+
{alert?.icon && <Icon icon={alert?.icon}></Icon>}
|
|
208
|
+
<p className="tax-alert__label">{alert?.label}</p>
|
|
209
|
+
</div>
|
|
210
|
+
)}
|
|
211
|
+
</>
|
|
212
|
+
)}
|
|
213
|
+
</div>
|
|
214
|
+
</div>
|
|
215
|
+
</div>
|
|
216
|
+
</div>
|
|
217
|
+
) : (
|
|
218
|
+
<></>
|
|
219
|
+
)}
|
|
220
|
+
</>
|
|
221
|
+
);
|
|
222
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import {ComponentStory, ComponentMeta} from '@storybook/react';
|
|
2
|
+
import {Alert} from './Alert';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Elements/Alert',
|
|
6
|
+
component: Alert,
|
|
7
|
+
args: {
|
|
8
|
+
type: 'info',
|
|
9
|
+
fill: 'solid',
|
|
10
|
+
accent: 'none',
|
|
11
|
+
icon: {control: 'text'},
|
|
12
|
+
isButton: false,
|
|
13
|
+
button: [
|
|
14
|
+
{
|
|
15
|
+
type: 'button',
|
|
16
|
+
size: 'small',
|
|
17
|
+
fill: 'solid',
|
|
18
|
+
loading: false,
|
|
19
|
+
disabled: false,
|
|
20
|
+
label: 'Ver Todo',
|
|
21
|
+
trailingIcon: true,
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
labelTitle: {control: 'text'},
|
|
25
|
+
label: {control: 'text'},
|
|
26
|
+
},
|
|
27
|
+
} as ComponentMeta<typeof Alert>;
|
|
28
|
+
|
|
29
|
+
const Template: ComponentStory<typeof Alert> = args => <Alert {...args} />;
|
|
30
|
+
|
|
31
|
+
export const Info = Template.bind({});
|
|
32
|
+
Info.args = {
|
|
33
|
+
type: 'info',
|
|
34
|
+
fill: 'solid',
|
|
35
|
+
icon: 'fa-solid fa-circle-info',
|
|
36
|
+
labelTitle: 'Prueba título con <a href="https://www.google.com">link</a> en el medio.',
|
|
37
|
+
label: 'Prueba título con <a href="https://www.google.com">link</a> en el medio.',
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export const Success = Template.bind({});
|
|
41
|
+
Success.args = {
|
|
42
|
+
type: 'success',
|
|
43
|
+
fill: 'solid',
|
|
44
|
+
icon: 'fa-solid fa-circle-check',
|
|
45
|
+
labelTitle: 'Prueba título con <a href="https://www.google.com">link</a> en el medio.',
|
|
46
|
+
label: 'Prueba título con <a href="https://www.google.com">link</a> en el medio.',
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export const Warning = Template.bind({});
|
|
50
|
+
Warning.args = {
|
|
51
|
+
type: 'warning',
|
|
52
|
+
fill: 'solid',
|
|
53
|
+
icon: 'fa-solid fa-circle-exclamation',
|
|
54
|
+
labelTitle: 'Prueba título con <a href="https://www.google.com">link</a> en el medio.',
|
|
55
|
+
label: 'Prueba título con <a href="https://www.google.com">link</a> en el medio.',
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export const Error = Template.bind({});
|
|
59
|
+
Error.args = {
|
|
60
|
+
type: 'error',
|
|
61
|
+
fill: 'solid',
|
|
62
|
+
icon: 'fa-solid fa-triangle-exclamation',
|
|
63
|
+
labelTitle: 'Prueba título con <a href="https://www.google.com">link</a> en el medio.',
|
|
64
|
+
label: 'Prueba título con <a href="https://www.google.com">link</a> en el medio.',
|
|
65
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {Button, IButton} from '../Button/Button';
|
|
3
|
+
import './alert.scss';
|
|
4
|
+
|
|
5
|
+
export interface IAlert extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
|
|
6
|
+
// base
|
|
7
|
+
type: 'info' | 'success' | 'error' | 'warning';
|
|
8
|
+
fill: 'solid' | 'outline' | 'outline-light';
|
|
9
|
+
accent: 'none' | 'left' | 'top';
|
|
10
|
+
icon?: any;
|
|
11
|
+
labelTitle?: any;
|
|
12
|
+
label: any;
|
|
13
|
+
|
|
14
|
+
// boolean
|
|
15
|
+
isButton: boolean;
|
|
16
|
+
button?: IButton[];
|
|
17
|
+
|
|
18
|
+
// react
|
|
19
|
+
className?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export const Alert = ({type, className, fill, accent, icon, labelTitle, label, isButton, button, ...props}: IAlert) => {
|
|
23
|
+
return (
|
|
24
|
+
<div className="elv-component elv-notification" {...props}>
|
|
25
|
+
<div className={`notification --type-${type} --fill-${fill} --accent-${accent} ${className ? className : ''}`}>
|
|
26
|
+
{icon && (
|
|
27
|
+
<div className="notification__icon">
|
|
28
|
+
<i className={`__icon ${icon}`}></i>
|
|
29
|
+
</div>
|
|
30
|
+
)}
|
|
31
|
+
<div className="notification__text">
|
|
32
|
+
{labelTitle !== undefined && (
|
|
33
|
+
<p className="__title">
|
|
34
|
+
<div dangerouslySetInnerHTML={{__html: labelTitle}} />
|
|
35
|
+
</p>
|
|
36
|
+
)}
|
|
37
|
+
<p className="__label">
|
|
38
|
+
<div dangerouslySetInnerHTML={{__html: label}} />
|
|
39
|
+
</p>
|
|
40
|
+
{isButton && button !== undefined && (
|
|
41
|
+
<div className="notification__button">
|
|
42
|
+
<Button {...button[0]} />
|
|
43
|
+
</div>
|
|
44
|
+
)}
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
);
|
|
49
|
+
};
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
@import '/src/sass/utilities/variables';
|
|
2
|
+
|
|
3
|
+
.notification {
|
|
4
|
+
display: flex;
|
|
5
|
+
padding: 0px;
|
|
6
|
+
word-wrap: break-word;
|
|
7
|
+
font-size: 16px;
|
|
8
|
+
font-weight: 500;
|
|
9
|
+
line-height: 24px;
|
|
10
|
+
|
|
11
|
+
&.--type- {
|
|
12
|
+
&info {
|
|
13
|
+
&.--fill- {
|
|
14
|
+
&solid {
|
|
15
|
+
background-color: $info-700;
|
|
16
|
+
color: $text-50;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&outline {
|
|
20
|
+
background-color: white;
|
|
21
|
+
border: 1px solid $info-700;
|
|
22
|
+
|
|
23
|
+
.__icon {
|
|
24
|
+
color: $info-700;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&outline-light {
|
|
29
|
+
background-color: $info-200;
|
|
30
|
+
|
|
31
|
+
.__icon {
|
|
32
|
+
color: $info-700;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&.--accent- {
|
|
36
|
+
&left {
|
|
37
|
+
border-left: 4px solid $info-700;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&top {
|
|
41
|
+
border-top: 4px solid $info-700;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&success {
|
|
49
|
+
&.--fill- {
|
|
50
|
+
&solid {
|
|
51
|
+
background-color: $success-700;
|
|
52
|
+
color: $text-50;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&outline {
|
|
56
|
+
background-color: white;
|
|
57
|
+
border: 1px solid $success-700;
|
|
58
|
+
|
|
59
|
+
.__icon {
|
|
60
|
+
color: $success-700;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&outline-light {
|
|
65
|
+
background-color: $success-200;
|
|
66
|
+
|
|
67
|
+
.__icon {
|
|
68
|
+
color: $success-700;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&.--accent- {
|
|
72
|
+
&left {
|
|
73
|
+
border-left: 4px solid $success-700;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
&top {
|
|
77
|
+
border-top: 4px solid $success-700;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&warning {
|
|
85
|
+
&.--fill- {
|
|
86
|
+
&solid {
|
|
87
|
+
background-color: $warning-700;
|
|
88
|
+
color: $text-50;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&outline {
|
|
92
|
+
background-color: white;
|
|
93
|
+
border: 1px solid $warning-700;
|
|
94
|
+
|
|
95
|
+
.__icon {
|
|
96
|
+
color: $warning-600;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&outline-light {
|
|
101
|
+
background-color: $warning-200;
|
|
102
|
+
|
|
103
|
+
.__icon {
|
|
104
|
+
color: $warning-700;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&.--accent- {
|
|
108
|
+
&left {
|
|
109
|
+
border-left: 4px solid $warning-700;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&top {
|
|
113
|
+
border-top: 4px solid $warning-700;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
&error {
|
|
121
|
+
&.--fill- {
|
|
122
|
+
&solid {
|
|
123
|
+
background-color: $error-700;
|
|
124
|
+
color: $text-50;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
&outline {
|
|
128
|
+
background-color: white;
|
|
129
|
+
border: 1px solid $error-700;
|
|
130
|
+
|
|
131
|
+
.__icon {
|
|
132
|
+
color: $error-600;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
&outline-light {
|
|
137
|
+
background-color: $error-200;
|
|
138
|
+
|
|
139
|
+
.__icon {
|
|
140
|
+
color: $error-700;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
&.--accent- {
|
|
144
|
+
&left {
|
|
145
|
+
border-left: 4px solid $error-700;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
&top {
|
|
149
|
+
border-top: 4px solid $error-700;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
&__icon {
|
|
158
|
+
width: 20px;
|
|
159
|
+
display: block;
|
|
160
|
+
padding-left: 13px;
|
|
161
|
+
padding-top: 17px;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
&__text {
|
|
165
|
+
padding-left: 9px;
|
|
166
|
+
margin-top: 13px;
|
|
167
|
+
margin-bottom: 13px;
|
|
168
|
+
width: auto;
|
|
169
|
+
|
|
170
|
+
.__title {
|
|
171
|
+
font-weight: $fw-semibold;
|
|
172
|
+
margin-top: 3px;
|
|
173
|
+
margin-bottom: 0px;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.__label {
|
|
177
|
+
margin-top: 4px;
|
|
178
|
+
margin-bottom: 4px;
|
|
179
|
+
font-weight: 400;
|
|
180
|
+
font-size: 14px;
|
|
181
|
+
line-height: 21px;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
&__button {
|
|
186
|
+
width: 100%;
|
|
187
|
+
margin: 10px 0px 3px 0px;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {ComponentStory, ComponentMeta} from '@storybook/react';
|
|
2
|
+
import {Badge} from './Badge';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Elements/Badge',
|
|
6
|
+
component: Badge,
|
|
7
|
+
args: {
|
|
8
|
+
color: 'primary',
|
|
9
|
+
text: 'Badge',
|
|
10
|
+
},
|
|
11
|
+
} as ComponentMeta<typeof Badge>;
|
|
12
|
+
|
|
13
|
+
const Template: ComponentStory<typeof Badge> = args => <Badge {...args} />;
|
|
14
|
+
|
|
15
|
+
export const Solid = Template.bind({});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import './badge.scss';
|
|
2
|
+
|
|
3
|
+
export interface BadgeProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
|
|
4
|
+
// base
|
|
5
|
+
color: string;
|
|
6
|
+
text: string;
|
|
7
|
+
colorText?: string;
|
|
8
|
+
|
|
9
|
+
// react
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const Badge = ({color, className, text, colorText, ...props}: BadgeProps) => {
|
|
14
|
+
return (
|
|
15
|
+
<div className="elv-component elv-badge" {...props}>
|
|
16
|
+
<span style={{backgroundColor: color, color: colorText}} className={`badge badge--${color} ${className ? className : ''}`}>
|
|
17
|
+
{text}
|
|
18
|
+
</span>
|
|
19
|
+
</div>
|
|
20
|
+
);
|
|
21
|
+
};
|