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,118 @@
|
|
|
1
|
+
import './ModalConfirm.scss';
|
|
2
|
+
import {Icon} from '../../Elements/Icon/Icon';
|
|
3
|
+
import {Button, IButton} from '../../Elements/Button/Button';
|
|
4
|
+
import {useEffect, useState} from 'react';
|
|
5
|
+
import SweetAlert2 from 'react-sweetalert2';
|
|
6
|
+
|
|
7
|
+
export interface IModalConfirm extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
|
|
8
|
+
// BASE
|
|
9
|
+
title: string;
|
|
10
|
+
button: IButton;
|
|
11
|
+
description: string;
|
|
12
|
+
Paragraph: string;
|
|
13
|
+
show?: boolean;
|
|
14
|
+
|
|
15
|
+
// IS-OPTIONS
|
|
16
|
+
|
|
17
|
+
// EVENTS
|
|
18
|
+
onCloseClick?: () => void;
|
|
19
|
+
onCancelClick?: () => void;
|
|
20
|
+
onConfirmClick?: () => void;
|
|
21
|
+
|
|
22
|
+
// GENERIC
|
|
23
|
+
className?: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export const ModalConfirm = ({
|
|
27
|
+
className,
|
|
28
|
+
title,
|
|
29
|
+
button,
|
|
30
|
+
description,
|
|
31
|
+
Paragraph,
|
|
32
|
+
show,
|
|
33
|
+
onCloseClick,
|
|
34
|
+
onCancelClick,
|
|
35
|
+
onConfirmClick,
|
|
36
|
+
...props
|
|
37
|
+
}: IModalConfirm) => {
|
|
38
|
+
const [swalProps, setSwalProps] = useState({});
|
|
39
|
+
|
|
40
|
+
const mostrarAlerta = () => {
|
|
41
|
+
setSwalProps({
|
|
42
|
+
show: true,
|
|
43
|
+
showConfirmButton: false,
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
useEffect(() => {
|
|
48
|
+
setSwalProps({
|
|
49
|
+
show: show,
|
|
50
|
+
showConfirmButton: false,
|
|
51
|
+
});
|
|
52
|
+
}, [show]);
|
|
53
|
+
|
|
54
|
+
return (
|
|
55
|
+
<div className="elv-component elv-modal-confirm" {...props}>
|
|
56
|
+
<div className={['modal-confirm', `${className ? ' ' + className : ''}`].join('')}>
|
|
57
|
+
{button && <Button {...button} onClick={mostrarAlerta} />}
|
|
58
|
+
<SweetAlert2 {...swalProps}>
|
|
59
|
+
<div className="elv-component elv-modal-confirm">
|
|
60
|
+
<div className="modal-confirm is-relative px-5 py-5">
|
|
61
|
+
<div className="is-flex is-gap-5">
|
|
62
|
+
<div className="modal-confirm__icon is-flex is-justify-content-center py-0 px-4 mt-1">
|
|
63
|
+
<Icon icon="fa-solid fa-circle-info" className="modal-confirm__color is-size-4 has-text-grey-dark" />
|
|
64
|
+
</div>
|
|
65
|
+
<div>
|
|
66
|
+
<div className="mb-2">
|
|
67
|
+
<p className="is-size-5 has-text-grey-dark has-text-left">{title}</p>
|
|
68
|
+
</div>
|
|
69
|
+
<div className="is-size-6">
|
|
70
|
+
<p className="has-text-grey has-text-left">{description}</p>{' '}
|
|
71
|
+
<p className="has-text-grey-dark has-text-left">{Paragraph}</p>
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
<div className="is-flex mt-5 is-gap-4 is-justify-content-center is-fullw">
|
|
76
|
+
{
|
|
77
|
+
<Button
|
|
78
|
+
label="Cancelar"
|
|
79
|
+
fill="outline"
|
|
80
|
+
color="secondary"
|
|
81
|
+
isFullWidth={true}
|
|
82
|
+
onClick={() => {
|
|
83
|
+
onCancelClick && onCancelClick();
|
|
84
|
+
}}
|
|
85
|
+
/>
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
{
|
|
89
|
+
<Button
|
|
90
|
+
label="Aceptar"
|
|
91
|
+
fill="solid"
|
|
92
|
+
isFullWidth={true}
|
|
93
|
+
onClick={() => {
|
|
94
|
+
onConfirmClick && onConfirmClick();
|
|
95
|
+
}}
|
|
96
|
+
/>
|
|
97
|
+
}
|
|
98
|
+
</div>
|
|
99
|
+
{
|
|
100
|
+
<div
|
|
101
|
+
onClick={() => {
|
|
102
|
+
onCloseClick && onCloseClick();
|
|
103
|
+
setSwalProps({
|
|
104
|
+
show: false,
|
|
105
|
+
});
|
|
106
|
+
}}
|
|
107
|
+
className="modal-confirm__close m-2 is-absolute is-flex is-justify-content-center is-align-items-center"
|
|
108
|
+
>
|
|
109
|
+
<Icon icon="fa-solid fa-xmark" />
|
|
110
|
+
</div>
|
|
111
|
+
}
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
</SweetAlert2>
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
117
|
+
);
|
|
118
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
@import '/src/sass/utilities/variables';
|
|
2
|
+
|
|
3
|
+
.elv-pagination {
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
min-width: min-content;
|
|
6
|
+
white-space: nowrap;
|
|
7
|
+
|
|
8
|
+
.pagination-container {
|
|
9
|
+
gap: 10px;
|
|
10
|
+
|
|
11
|
+
&__per-page {
|
|
12
|
+
font-size: 12px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
&__pageButtons-Chevron {
|
|
16
|
+
gap: 5px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&__pageButtons {
|
|
20
|
+
padding-left: 10px;
|
|
21
|
+
&.moreThan9 {
|
|
22
|
+
width: 200px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.elv-button {
|
|
26
|
+
.button {
|
|
27
|
+
padding: 1px 7px 0px 7px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.is-unstyled {
|
|
31
|
+
color: $blueGray-500;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&__totals {
|
|
37
|
+
font-size: 12px;
|
|
38
|
+
padding-left: 5px;
|
|
39
|
+
font-weight: $fw-semibold;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {ComponentStory, ComponentMeta} from '@storybook/react';
|
|
3
|
+
|
|
4
|
+
import {Pagination} from './Pagination';
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title: 'Components/Pagination',
|
|
8
|
+
component: Pagination,
|
|
9
|
+
args: {
|
|
10
|
+
totalItems: 120,
|
|
11
|
+
onChangePage: page => {
|
|
12
|
+
console.log('Page selected: ' + page);
|
|
13
|
+
},
|
|
14
|
+
onChangeShowedItems: showedItems => {
|
|
15
|
+
console.log('ShowedItems: ' + showedItems);
|
|
16
|
+
},
|
|
17
|
+
showSelect: true,
|
|
18
|
+
showTotals: true,
|
|
19
|
+
},
|
|
20
|
+
} as ComponentMeta<typeof Pagination>;
|
|
21
|
+
|
|
22
|
+
const Template: ComponentStory<typeof Pagination> = args => <Pagination {...args} />;
|
|
23
|
+
|
|
24
|
+
export const Standard = Template.bind({});
|
|
25
|
+
Standard.args = {};
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import React, {useEffect, useState} from 'react';
|
|
2
|
+
import {Select} from '../../Form/Select/Select';
|
|
3
|
+
import './Pagination.scss';
|
|
4
|
+
import {Button} from '../../Elements/Button/Button';
|
|
5
|
+
import {generateRandomKey} from '../../../utils/functions';
|
|
6
|
+
|
|
7
|
+
export interface IPagination extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
|
|
8
|
+
// base
|
|
9
|
+
totalItems: number;
|
|
10
|
+
minItemsPerPage: number;
|
|
11
|
+
|
|
12
|
+
// boolean
|
|
13
|
+
showPages?: boolean;
|
|
14
|
+
showTotals?: boolean;
|
|
15
|
+
showSelect?: boolean;
|
|
16
|
+
isColumn?: boolean;
|
|
17
|
+
|
|
18
|
+
// events
|
|
19
|
+
onChangePage?: (page: number) => void;
|
|
20
|
+
onChangeShowedItems?: (showedItems: string) => void;
|
|
21
|
+
|
|
22
|
+
// react
|
|
23
|
+
className?: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export const Pagination = ({
|
|
27
|
+
totalItems,
|
|
28
|
+
minItemsPerPage = 10,
|
|
29
|
+
showTotals,
|
|
30
|
+
showSelect,
|
|
31
|
+
isColumn,
|
|
32
|
+
onChangePage,
|
|
33
|
+
onChangeShowedItems,
|
|
34
|
+
className,
|
|
35
|
+
...props
|
|
36
|
+
}: IPagination) => {
|
|
37
|
+
const [showedItems, setShowedItems] = useState(minItemsPerPage);
|
|
38
|
+
const [pages, setPages] = useState(Math.ceil(totalItems / showedItems));
|
|
39
|
+
const [currentPage, setCurrentPage] = useState(1);
|
|
40
|
+
|
|
41
|
+
const handlePageChange = (pageNumber: number) => {
|
|
42
|
+
setCurrentPage(pageNumber);
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
useEffect(() => {
|
|
46
|
+
onChangePage && onChangePage(currentPage);
|
|
47
|
+
}, [currentPage]);
|
|
48
|
+
|
|
49
|
+
useEffect(() => {
|
|
50
|
+
onChangeShowedItems && onChangeShowedItems(showedItems.toString());
|
|
51
|
+
setPages(Math.ceil(totalItems / showedItems));
|
|
52
|
+
}, [showedItems, totalItems]);
|
|
53
|
+
|
|
54
|
+
const selectOptions = () => {
|
|
55
|
+
const options = [];
|
|
56
|
+
const startValue = minItemsPerPage;
|
|
57
|
+
const endValue = minItemsPerPage * 20;
|
|
58
|
+
const stepValue = minItemsPerPage * 5;
|
|
59
|
+
for (let value = startValue; value <= endValue; value += stepValue) {
|
|
60
|
+
options.push({
|
|
61
|
+
label: `Mostrar ${value}`,
|
|
62
|
+
value: `${value}`,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
return options;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
return (
|
|
69
|
+
<div className={`elv-component elv-pagination ${className ? className : ''}`} {...props}>
|
|
70
|
+
<div className={`pagination-container is-flex is-align-items-center ${isColumn && 'is-flex-direction-column'}`}>
|
|
71
|
+
{showSelect && (
|
|
72
|
+
<>
|
|
73
|
+
<Select
|
|
74
|
+
fill="unstyled"
|
|
75
|
+
onChangeSelect={value => {
|
|
76
|
+
setShowedItems && setShowedItems(parseInt(value));
|
|
77
|
+
}}
|
|
78
|
+
options={selectOptions()}
|
|
79
|
+
defaultValue={minItemsPerPage?.toString() ? minItemsPerPage.toString() : '10'}
|
|
80
|
+
size="sm"
|
|
81
|
+
minWidth="100px"
|
|
82
|
+
/>
|
|
83
|
+
<p className="pagination-container__per-page">por página</p>
|
|
84
|
+
</>
|
|
85
|
+
)}
|
|
86
|
+
<div className="pagination-container__pageButtons-Chevron is-flex is-justify-content-space-between">
|
|
87
|
+
<Button
|
|
88
|
+
size="small"
|
|
89
|
+
fill="unstyled"
|
|
90
|
+
icon="fa-solid fa-chevron-left"
|
|
91
|
+
isOnlyIcon
|
|
92
|
+
onClick={() => currentPage - 1 >= 1 && setCurrentPage(currentPage - 1)}
|
|
93
|
+
></Button>
|
|
94
|
+
<div className={`pagination-container__pageButtons is-flex is-justify-content-space-between ${pages >= 9 && 'moreThan9'}`}>
|
|
95
|
+
{pages > 8 ? (
|
|
96
|
+
<>
|
|
97
|
+
{Array.from({length: pages}, (_, i) => i + 1).map(
|
|
98
|
+
page =>
|
|
99
|
+
((page === 1 || page === pages || (page > currentPage - 3 && page < currentPage + 3)) && (
|
|
100
|
+
<span key={generateRandomKey()}>
|
|
101
|
+
<Button
|
|
102
|
+
size="small"
|
|
103
|
+
fill={page === currentPage ? 'solid' : 'unstyled'}
|
|
104
|
+
onClick={() => handlePageChange(page)}
|
|
105
|
+
label={page.toString()}
|
|
106
|
+
isRounded={true}
|
|
107
|
+
/>
|
|
108
|
+
</span>
|
|
109
|
+
)) ||
|
|
110
|
+
(((page === currentPage - 3 && currentPage > 3) || (page === currentPage + 3 && currentPage < pages - 3)) && (
|
|
111
|
+
<p key={generateRandomKey()}>...</p>
|
|
112
|
+
)),
|
|
113
|
+
)}
|
|
114
|
+
</>
|
|
115
|
+
) : (
|
|
116
|
+
<>
|
|
117
|
+
{Array.from({length: pages}, (_, i) => i + 1).map(page => (
|
|
118
|
+
<span key={generateRandomKey()}>
|
|
119
|
+
<Button
|
|
120
|
+
size="small"
|
|
121
|
+
fill={page === currentPage ? 'solid' : 'unstyled'}
|
|
122
|
+
onClick={() => handlePageChange(page)}
|
|
123
|
+
label={page.toString()}
|
|
124
|
+
isRounded={true}
|
|
125
|
+
/>
|
|
126
|
+
</span>
|
|
127
|
+
))}
|
|
128
|
+
</>
|
|
129
|
+
)}
|
|
130
|
+
</div>
|
|
131
|
+
<Button
|
|
132
|
+
size="small"
|
|
133
|
+
fill="unstyled"
|
|
134
|
+
icon="fa-solid fa-chevron-right"
|
|
135
|
+
isOnlyIcon
|
|
136
|
+
onClick={() => currentPage + 1 <= pages && setCurrentPage(currentPage + 1)}
|
|
137
|
+
></Button>
|
|
138
|
+
</div>
|
|
139
|
+
{showTotals && <p className="pagination-container__totals">{totalItems} registros totales</p>}
|
|
140
|
+
</div>
|
|
141
|
+
</div>
|
|
142
|
+
);
|
|
143
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
@import '/src/sass/utilities/variables';
|
|
2
|
+
|
|
3
|
+
.elv-performanceAssessment{
|
|
4
|
+
.performanceAssessment{
|
|
5
|
+
border-radius: 16px;
|
|
6
|
+
background-color: $truegray-50;
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
&__date{
|
|
10
|
+
color: $truegray-600;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.progressCircular{
|
|
14
|
+
border-radius: 50%;
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
&__desc{
|
|
18
|
+
max-width: 90px;
|
|
19
|
+
line-height: 13px;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
.iconStar{
|
|
23
|
+
cursor: pointer;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import {ComponentStory, ComponentMeta} from '@storybook/react';
|
|
2
|
+
import {PerformanceAssessment} from './PerformanceAssessment';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Components/PerformanceAssessment',
|
|
6
|
+
component: PerformanceAssessment,
|
|
7
|
+
args: {
|
|
8
|
+
labelPerformance: 'Valoración de desempeño',
|
|
9
|
+
dataTime: [{date: 'Abril 2023'}],
|
|
10
|
+
percentage: 30,
|
|
11
|
+
description: 'de crecimiento este mes',
|
|
12
|
+
qualification: 'de calificación',
|
|
13
|
+
star: [
|
|
14
|
+
{star: 'fa-solid fa-star', starStroke: 'fa-solid fa-star-half-stroke'},
|
|
15
|
+
{star: 'fa-solid fa-star', starStroke: 'fa-solid fa-star-half-stroke'},
|
|
16
|
+
{star: 'fa-solid fa-star', starStroke: 'fa-solid fa-star-half-stroke'},
|
|
17
|
+
{star: 'fa-solid fa-star', starStroke: 'fa-solid fa-star-half-stroke'},
|
|
18
|
+
{star: 'fa-solid fa-star', starStroke: 'fa-solid fa-star-half-stroke'},
|
|
19
|
+
],
|
|
20
|
+
rating: 3,
|
|
21
|
+
},
|
|
22
|
+
} as ComponentMeta<typeof PerformanceAssessment>;
|
|
23
|
+
|
|
24
|
+
const Template: ComponentStory<typeof PerformanceAssessment> = args => <PerformanceAssessment {...args} />;
|
|
25
|
+
|
|
26
|
+
export const Standard = Template.bind({});
|
|
27
|
+
Standard.args = {};
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import './PerformanceAssessment.scss';
|
|
2
|
+
import 'react-circular-progressbar/dist/styles.css';
|
|
3
|
+
import {CircularProgressbar, CircularProgressbarWithChildren, buildStyles} from 'react-circular-progressbar';
|
|
4
|
+
import {Icon} from '../../Elements/Icon/Icon';
|
|
5
|
+
import {useState} from 'react';
|
|
6
|
+
|
|
7
|
+
export interface IPerformanceAssessment {
|
|
8
|
+
// BASE
|
|
9
|
+
labelPerformance?: string;
|
|
10
|
+
dataTime?: IDataTime[];
|
|
11
|
+
percentage: number;
|
|
12
|
+
description?: string;
|
|
13
|
+
star?: IStars[];
|
|
14
|
+
qualification?: string;
|
|
15
|
+
rating: number;
|
|
16
|
+
// IS-OPTIONS
|
|
17
|
+
|
|
18
|
+
// EVENTS
|
|
19
|
+
|
|
20
|
+
// GENERIC
|
|
21
|
+
className?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface IDataTime {
|
|
24
|
+
date?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface IStars {
|
|
27
|
+
star: string;
|
|
28
|
+
starStroke: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export const PerformanceAssessment = ({
|
|
32
|
+
labelPerformance,
|
|
33
|
+
dataTime,
|
|
34
|
+
percentage,
|
|
35
|
+
description,
|
|
36
|
+
star,
|
|
37
|
+
qualification,
|
|
38
|
+
rating,
|
|
39
|
+
className,
|
|
40
|
+
}: IPerformanceAssessment) => {
|
|
41
|
+
const roundedRating = Math.round(rating * 2) / 2;
|
|
42
|
+
|
|
43
|
+
return (
|
|
44
|
+
<div className="elv-component elv-performanceAssessment">
|
|
45
|
+
<div
|
|
46
|
+
className={[
|
|
47
|
+
'performanceAssessment box is-flex is-flex-direction-column p-5 is-gap-6 is-align-items-center',
|
|
48
|
+
`${className ? ' ' + className : ''}`,
|
|
49
|
+
].join('')}
|
|
50
|
+
>
|
|
51
|
+
<div className="is-flex is-flex-direction-column is-gap-3">
|
|
52
|
+
<div className="has-text-weight-bold has-text-grey-dark">{labelPerformance}</div>
|
|
53
|
+
<div>
|
|
54
|
+
{dataTime?.map(data => (
|
|
55
|
+
<div className="performanceAssessment__date is-size-14px has-text-weight-medium">{data.date}</div>
|
|
56
|
+
))}
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
<div style={{maxWidth: '214.277px'}} className="progressCircular">
|
|
60
|
+
<CircularProgressbarWithChildren
|
|
61
|
+
value={percentage}
|
|
62
|
+
text={''}
|
|
63
|
+
strokeWidth={15}
|
|
64
|
+
background
|
|
65
|
+
backgroundPadding={10}
|
|
66
|
+
styles={buildStyles({
|
|
67
|
+
backgroundColor: '#FFFFFF',
|
|
68
|
+
pathColor: '#7DAFFF',
|
|
69
|
+
trailColor: '#CED4DA4D',
|
|
70
|
+
strokeLinecap: 'butt',
|
|
71
|
+
})}
|
|
72
|
+
>
|
|
73
|
+
<div className="is-size-4">
|
|
74
|
+
<strong>{`${percentage}%`}</strong>
|
|
75
|
+
</div>
|
|
76
|
+
<div className="progressCircular__desc is-size-7 has-text-centered">{description}</div>
|
|
77
|
+
</CircularProgressbarWithChildren>
|
|
78
|
+
</div>
|
|
79
|
+
<div className="mt-2">
|
|
80
|
+
<div className="is-flex">
|
|
81
|
+
{star?.map((item, index) => {
|
|
82
|
+
const isHalfStar = roundedRating - index === 0.5;
|
|
83
|
+
return (
|
|
84
|
+
<div key={index}>
|
|
85
|
+
{!isHalfStar && (
|
|
86
|
+
<Icon icon={item.star} className="iconStar mr-3 is-size-5" color={index < roundedRating ? '#16A34A' : '#CED4DA'} />
|
|
87
|
+
)}
|
|
88
|
+
|
|
89
|
+
{isHalfStar && (
|
|
90
|
+
<Icon
|
|
91
|
+
icon={item.starStroke} // Reemplaza esto con el ícono o clase que represente media estrella
|
|
92
|
+
className="iconStar mr-3 is-size-5"
|
|
93
|
+
color="#16A34A"
|
|
94
|
+
/>
|
|
95
|
+
)}
|
|
96
|
+
</div>
|
|
97
|
+
);
|
|
98
|
+
})}
|
|
99
|
+
</div>
|
|
100
|
+
<p className="has-text-grey is-size-14px mt-3">
|
|
101
|
+
{' '}
|
|
102
|
+
{rating} {qualification}
|
|
103
|
+
</p>
|
|
104
|
+
</div>
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
);
|
|
108
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
@import '/src/sass/utilities/variables';
|
|
2
|
+
|
|
3
|
+
.elv-shiftdiary{
|
|
4
|
+
.shiftdiary{
|
|
5
|
+
border-radius: 16px;
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
|
|
8
|
+
&__button{
|
|
9
|
+
color: $primary-600;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
&__status{
|
|
13
|
+
min-width: 96px;
|
|
14
|
+
padding: 3px 10px;
|
|
15
|
+
border-radius: 100px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&__present{
|
|
19
|
+
background-color: $tertiary-600;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&__assigned{
|
|
23
|
+
background-color:$primary-600;
|
|
24
|
+
}
|
|
25
|
+
.radius{
|
|
26
|
+
border-radius: 12px;
|
|
27
|
+
}
|
|
28
|
+
.icon{
|
|
29
|
+
color: #34D399;
|
|
30
|
+
}
|
|
31
|
+
.icon2{
|
|
32
|
+
color: $primary-400;
|
|
33
|
+
}
|
|
34
|
+
.item{
|
|
35
|
+
flex: 1
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&__boxdiary{
|
|
39
|
+
@media screen and (max-width: 768px){
|
|
40
|
+
flex-direction: column;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import {ComponentStory, ComponentMeta} from '@storybook/react';
|
|
2
|
+
import {ShiftDiary} from './ShiftDiary';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Components/ShiftDiary',
|
|
6
|
+
component: ShiftDiary,
|
|
7
|
+
args: {
|
|
8
|
+
title: 'Agenda de turnos',
|
|
9
|
+
labelQuantity: 'Presentes',
|
|
10
|
+
totalNumber: 3,
|
|
11
|
+
labelAssigned: 'Asignados',
|
|
12
|
+
numberAssigned: 52,
|
|
13
|
+
option: [
|
|
14
|
+
{
|
|
15
|
+
time: '11:20 h',
|
|
16
|
+
name: 'Castro, Julietas',
|
|
17
|
+
age: '26 años',
|
|
18
|
+
colorContains: '#059669',
|
|
19
|
+
colorIcon: '#34D399',
|
|
20
|
+
state: 'Presente',
|
|
21
|
+
},
|
|
22
|
+
{time: '11:20 h', name: 'Castro, Julieta', age: '26 años', colorContains: '#059669', colorIcon: '#34D399', state: 'Presente'},
|
|
23
|
+
{time: '11:20 h', name: 'Castro, Julieta', age: '26 años', colorContains: '#124596', colorIcon: '#2B71DF', state: 'Presente'},
|
|
24
|
+
],
|
|
25
|
+
onSeeMore: () => console.log('Clicked Button'),
|
|
26
|
+
},
|
|
27
|
+
} as ComponentMeta<typeof ShiftDiary>;
|
|
28
|
+
|
|
29
|
+
const Template: ComponentStory<typeof ShiftDiary> = args => <ShiftDiary {...args} />;
|
|
30
|
+
|
|
31
|
+
export const Standard = Template.bind({});
|
|
32
|
+
Standard.args = {};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import {Button} from '../../Elements/Button/Button';
|
|
2
|
+
import {Icon} from '../../Elements/Icon/Icon';
|
|
3
|
+
import './ShiftDiary.scss';
|
|
4
|
+
|
|
5
|
+
export interface IShiftDiary {
|
|
6
|
+
// BASE
|
|
7
|
+
title?: string;
|
|
8
|
+
option?: IOptions[];
|
|
9
|
+
labelQuantity?: string;
|
|
10
|
+
totalNumber?: number;
|
|
11
|
+
labelAssigned?: string;
|
|
12
|
+
numberAssigned?: number;
|
|
13
|
+
|
|
14
|
+
// IS-OPTIONS
|
|
15
|
+
|
|
16
|
+
// EVENTS
|
|
17
|
+
onSeeMore: () => void;
|
|
18
|
+
|
|
19
|
+
// GENERIC
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface IOptions {
|
|
23
|
+
time?: string;
|
|
24
|
+
name?: string;
|
|
25
|
+
age?: string;
|
|
26
|
+
colorIcon?: string;
|
|
27
|
+
colorContains?: string;
|
|
28
|
+
state?: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export const ShiftDiary = ({
|
|
32
|
+
title,
|
|
33
|
+
option,
|
|
34
|
+
labelQuantity,
|
|
35
|
+
totalNumber,
|
|
36
|
+
labelAssigned,
|
|
37
|
+
numberAssigned,
|
|
38
|
+
onSeeMore,
|
|
39
|
+
className,
|
|
40
|
+
}: IShiftDiary) => {
|
|
41
|
+
return (
|
|
42
|
+
<div className="elv-component elv-shiftdiary">
|
|
43
|
+
<div className={['shiftdiary box is-flex is-flex-direction-column p-5 is-gap-5', `${className ? ' ' + className : ''}`].join('')}>
|
|
44
|
+
<div className="is-flex is-justify-content-space-between is-align-items-center">
|
|
45
|
+
<p className="is-size-4 has-text-weight-bold has-text-grey-dark">{title}</p>
|
|
46
|
+
<Button
|
|
47
|
+
label="Ver más"
|
|
48
|
+
fill="unstyled"
|
|
49
|
+
color="primary"
|
|
50
|
+
className="shiftdiary__button is-size-10px has-text-weight-medium"
|
|
51
|
+
onClick={() => onSeeMore && onSeeMore()}
|
|
52
|
+
/>
|
|
53
|
+
</div>
|
|
54
|
+
<div className=" shiftdiary__boxdiary is-flex is-gap-5">
|
|
55
|
+
<div className="item is-flex is-flex-direction-column is-gap-4">
|
|
56
|
+
{option?.map(item => (
|
|
57
|
+
<div className="is-flex is-flex-direction-column is-gap-4">
|
|
58
|
+
<div className="has-text-grey-dark">{item.time}</div>
|
|
59
|
+
<div className="is-flex is-align-items-center py-4 is-justify-content-space-between">
|
|
60
|
+
<div className="is-flex is-gap-4">
|
|
61
|
+
<div className="has-text-weight-semibold has-text-grey-dark">{item.name}</div>
|
|
62
|
+
<div className="has-text-grey-dark">{item.age}</div>
|
|
63
|
+
</div>
|
|
64
|
+
<div className="shiftdiary__status is-flex" style={{backgroundColor: item.colorContains}}>
|
|
65
|
+
<Icon icon="fa-solid fa-circle" color={item.colorIcon} className="mr-2" />
|
|
66
|
+
<p className="has-text-light is-size-7">{item.state}</p>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
))}
|
|
71
|
+
</div>
|
|
72
|
+
<div className="item is-flex is-flex-direction-column is-align-items-start is-gap-4">
|
|
73
|
+
<div className="shiftdiary__present radius is-flex p-4 is-align-items-center is-justify-content-space-between is-fullw">
|
|
74
|
+
<div className="is-flex">
|
|
75
|
+
<Icon icon="fa-regular fa-circle-check" className="icon mr-2" size="24px" />
|
|
76
|
+
<div className="has-text-light is-size-5 has-text-weight-bold">{labelQuantity}</div>
|
|
77
|
+
</div>
|
|
78
|
+
<div className="has-text-light is-size-5 has-text-weight-bold">{totalNumber}</div>
|
|
79
|
+
</div>
|
|
80
|
+
<div className="shiftdiary__assigned radius is-flex p-4 is-align-items-center is-fullw is-justify-content-space-between">
|
|
81
|
+
<div className="is-flex">
|
|
82
|
+
<Icon icon="fa-regular fa-calendar" className="icon2 mr-2" size="24px" />
|
|
83
|
+
<div className="has-text-light is-size-5 has-text-weight-bold">{labelAssigned}</div>
|
|
84
|
+
</div>
|
|
85
|
+
<div className="has-text-light is-size-5 has-text-weight-bold">{numberAssigned}</div>
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
);
|
|
92
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import {ComponentStory, ComponentMeta} from '@storybook/react';
|
|
2
|
+
import {Stepper} from './Stepper';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Components/Stepper',
|
|
6
|
+
component: Stepper,
|
|
7
|
+
argsTypes: {
|
|
8
|
+
items: {control: 'object'},
|
|
9
|
+
},
|
|
10
|
+
args: {
|
|
11
|
+
activeLabel: 'Step 3',
|
|
12
|
+
},
|
|
13
|
+
} as ComponentMeta<typeof Stepper>;
|
|
14
|
+
|
|
15
|
+
const Template: ComponentStory<typeof Stepper> = args => <Stepper {...args} />;
|
|
16
|
+
|
|
17
|
+
export const Standard = Template.bind({});
|
|
18
|
+
Standard.args = {
|
|
19
|
+
items: [
|
|
20
|
+
{label: 'Step 1', icon: 'fa fa-check', onClick: () => console.log('Step 1 Clicked')},
|
|
21
|
+
{label: 'Step 2', icon: 'fa fa-check', onClick: () => console.log('Step 2 Clicked')},
|
|
22
|
+
{label: 'Step 3', icon: 'fa fa-check', onClick: () => console.log('Step 3 Clicked')},
|
|
23
|
+
{label: 'Step 4', icon: 'fa fa-check', onClick: () => console.log('Step 4 Clicked')},
|
|
24
|
+
{label: 'Step 5', icon: 'fa fa-check', onClick: () => console.log('Step 5 Clicked')},
|
|
25
|
+
],
|
|
26
|
+
};
|