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.
Files changed (254) hide show
  1. package/.nvmrc +1 -0
  2. package/.prettierrc.cjs +8 -0
  3. package/.storybook/main.cjs +11 -0
  4. package/.storybook/manager-head.html +2 -0
  5. package/.storybook/manager.cjs +6 -0
  6. package/.storybook/preview-head.html +3 -0
  7. package/.storybook/preview.cjs +11 -0
  8. package/.storybook/themes.cjs +14 -0
  9. package/README.md +21 -0
  10. package/StoryBook.txt +19 -0
  11. package/dist-config.cjs +57 -0
  12. package/index.html +13 -0
  13. package/package.json +60 -0
  14. package/public/elevation.ico +0 -0
  15. package/public/elevationImage.png +0 -0
  16. package/public/vite.svg +1 -0
  17. package/src/App.scss +36 -0
  18. package/src/App.tsx +34 -0
  19. package/src/assets/react.svg +1 -0
  20. package/src/index.js +70 -0
  21. package/src/index.scss +63 -0
  22. package/src/index.ts +108 -0
  23. package/src/main.tsx +11 -0
  24. package/src/sass/base/_base.scss +50 -0
  25. package/src/sass/base/_controls.scss +90 -0
  26. package/src/sass/base/_datepicker.scss +114 -0
  27. package/src/sass/base/_typo.scss +71 -0
  28. package/src/sass/base/fonts/SFUIText-Bold.ttf +0 -0
  29. package/src/sass/base/fonts/SFUIText-BoldItalic.ttf +0 -0
  30. package/src/sass/base/fonts/SFUIText-Heavy.ttf +0 -0
  31. package/src/sass/base/fonts/SFUIText-HeavyItalic.ttf +0 -0
  32. package/src/sass/base/fonts/SFUIText-Light.ttf +0 -0
  33. package/src/sass/base/fonts/SFUIText-LightItalic.ttf +0 -0
  34. package/src/sass/base/fonts/SFUIText-Medium.ttf +0 -0
  35. package/src/sass/base/fonts/SFUIText-MediumItalic.ttf +0 -0
  36. package/src/sass/base/fonts/SFUIText-Regular.ttf +0 -0
  37. package/src/sass/base/fonts/SFUIText-RegularItalic.ttf +0 -0
  38. package/src/sass/base/fonts/SFUIText-Semibold.ttf +0 -0
  39. package/src/sass/base/fonts/SFUIText-SemiboldItalic.ttf +0 -0
  40. package/src/sass/bulma/bulma-changes.scss +19 -0
  41. package/src/sass/bulma/extensions/extensions.sass +1 -0
  42. package/src/sass/bulma/extensions/steps/bulma-steps.sass +3 -0
  43. package/src/sass/bulma/extensions/steps/index.sass +421 -0
  44. package/src/sass/bulma/variables/_variables-bulma.sass +16 -0
  45. package/src/sass/bulma/variables/components/card.sass +20 -0
  46. package/src/sass/bulma/variables/components/navbar.sass +50 -0
  47. package/src/sass/bulma/variables/components/tabs.sass +28 -0
  48. package/src/sass/bulma/variables/elements/button.sass +46 -0
  49. package/src/sass/bulma/variables/elements/notification.sass +8 -0
  50. package/src/sass/bulma/variables/elements/title.sass +20 -0
  51. package/src/sass/bulma/variables/grid/column.sass +2 -0
  52. package/src/sass/main.sass +16 -0
  53. package/src/sass/utilities/_bulma-variables.sass +20 -0
  54. package/src/sass/utilities/_derived-variables.scss +68 -0
  55. package/src/sass/utilities/_helpers.scss +70 -0
  56. package/src/sass/utilities/_variables.scss +147 -0
  57. package/src/stories/Changelog.stories.tsx +73 -0
  58. package/src/stories/Components/AssistanceDiary/AssistanceDiary.scss +19 -0
  59. package/src/stories/Components/AssistanceDiary/AssistanceDiary.stories.tsx +25 -0
  60. package/src/stories/Components/AssistanceDiary/AssistanceDiary.tsx +57 -0
  61. package/src/stories/Components/AverageAttended/AverageAttended.scss +39 -0
  62. package/src/stories/Components/AverageAttended/AverageAttended.stories.tsx +71 -0
  63. package/src/stories/Components/AverageAttended/AverageAttended.tsx +311 -0
  64. package/src/stories/Components/Breadcrumb/Breadcrumb.stories.tsx +45 -0
  65. package/src/stories/Components/Breadcrumb/Breadcrumb.tsx +68 -0
  66. package/src/stories/Components/Breadcrumb/breadcrumb.scss +82 -0
  67. package/src/stories/Components/CTA/CTA.scss +76 -0
  68. package/src/stories/Components/CTA/CTA.stories.tsx +46 -0
  69. package/src/stories/Components/CTA/CTA.tsx +70 -0
  70. package/src/stories/Components/Cards/Card CTA/CardCta.stories.tsx +34 -0
  71. package/src/stories/Components/Cards/Card CTA/CardCta.tsx +81 -0
  72. package/src/stories/Components/Cards/Card CTA/cardCta.scss +71 -0
  73. package/src/stories/Components/Cards/Card Expiration/cardExpiration.scss +105 -0
  74. package/src/stories/Components/Cards/Card Expiration/cardExpiration.stories.tsx +40 -0
  75. package/src/stories/Components/Cards/Card Expiration/cardExpiration.tsx +95 -0
  76. package/src/stories/Components/Cards/Card Vertical/CardVertical.stories.tsx +43 -0
  77. package/src/stories/Components/Cards/Card Vertical/CardVertical.tsx +106 -0
  78. package/src/stories/Components/Cards/Card Vertical/cardVertical.scss +130 -0
  79. package/src/stories/Components/Cards/CardActivity/cardActivity.scss +31 -0
  80. package/src/stories/Components/Cards/CardActivity/cardActivity.stories.tsx +20 -0
  81. package/src/stories/Components/Cards/CardActivity/cardActivity.tsx +48 -0
  82. package/src/stories/Components/Cards/CardHorizontal/CardHorizontal.stories.tsx +96 -0
  83. package/src/stories/Components/Cards/CardHorizontal/CardHorizontal.tsx +94 -0
  84. package/src/stories/Components/Cards/CardHorizontal/cardHorizontal.scss +65 -0
  85. package/src/stories/Components/Cards/CardUser/CardUser.stories.tsx +135 -0
  86. package/src/stories/Components/Cards/CardUser/CardUser.tsx +122 -0
  87. package/src/stories/Components/Cards/CardUser/cardUser.scss +115 -0
  88. package/src/stories/Components/Cart/Cart.scss +279 -0
  89. package/src/stories/Components/Cart/Cart.stories.tsx +350 -0
  90. package/src/stories/Components/Cart/Cart.tsx +277 -0
  91. package/src/stories/Components/Collapse/Collapse.scss +339 -0
  92. package/src/stories/Components/Collapse/Collapse.stories.tsx +766 -0
  93. package/src/stories/Components/Collapse/Collapse.tsx +451 -0
  94. package/src/stories/Components/CollapseEdit/CollapseEdit.scss +128 -0
  95. package/src/stories/Components/CollapseEdit/CollapseEdit.stories.tsx +29 -0
  96. package/src/stories/Components/CollapseEdit/CollapseEdit.tsx +185 -0
  97. package/src/stories/Components/CompleteDiary/CompleteDiary.scss +165 -0
  98. package/src/stories/Components/CompleteDiary/CompleteDiary.stories.tsx +219 -0
  99. package/src/stories/Components/CompleteDiary/CompleteDiary.tsx +394 -0
  100. package/src/stories/Components/Dropdown/Dropdown.scss +60 -0
  101. package/src/stories/Components/Dropdown/Dropdown.stories.tsx +19 -0
  102. package/src/stories/Components/Dropdown/Dropdown.tsx +99 -0
  103. package/src/stories/Components/EmptyState/EmptyState.stories.tsx +46 -0
  104. package/src/stories/Components/EmptyState/EmptyState.tsx +44 -0
  105. package/src/stories/Components/EmptyState/emptyState.scss +75 -0
  106. package/src/stories/Components/ErrorPage/ErrorPage.scss +65 -0
  107. package/src/stories/Components/ErrorPage/ErrorPage.stories.tsx +164 -0
  108. package/src/stories/Components/ErrorPage/ErrorPage.tsx +107 -0
  109. package/src/stories/Components/IncomingCall/IncomingCall.scss +27 -0
  110. package/src/stories/Components/IncomingCall/IncomingCall.stories.tsx +43 -0
  111. package/src/stories/Components/IncomingCall/IncomingCall.tsx +76 -0
  112. package/src/stories/Components/ModalConfirm/ModalConfirm.scss +30 -0
  113. package/src/stories/Components/ModalConfirm/ModalConfirm.stories.tsx +21 -0
  114. package/src/stories/Components/ModalConfirm/ModalConfirm.tsx +118 -0
  115. package/src/stories/Components/Pagination/Pagination.scss +42 -0
  116. package/src/stories/Components/Pagination/Pagination.stories.tsx +25 -0
  117. package/src/stories/Components/Pagination/Pagination.tsx +143 -0
  118. package/src/stories/Components/PerformanceAssessment/PerformanceAssessment.scss +26 -0
  119. package/src/stories/Components/PerformanceAssessment/PerformanceAssessment.stories.tsx +27 -0
  120. package/src/stories/Components/PerformanceAssessment/PerformanceAssessment.tsx +108 -0
  121. package/src/stories/Components/ShiftDiary/ShiftDiary.scss +45 -0
  122. package/src/stories/Components/ShiftDiary/ShiftDiary.stories.tsx +32 -0
  123. package/src/stories/Components/ShiftDiary/ShiftDiary.tsx +92 -0
  124. package/src/stories/Components/Stepper/Stepper.stories.tsx +26 -0
  125. package/src/stories/Components/Stepper/Stepper.tsx +102 -0
  126. package/src/stories/Components/Stepper/stepper.scss +59 -0
  127. package/src/stories/Components/Tabs/Tabs.stories.tsx +76 -0
  128. package/src/stories/Components/Tabs/Tabs.tsx +111 -0
  129. package/src/stories/Components/Tabs/tabs.scss +118 -0
  130. package/src/stories/Components/Tooltip/Tooltip.scss +235 -0
  131. package/src/stories/Components/Tooltip/Tooltip.stories.tsx +125 -0
  132. package/src/stories/Components/Tooltip/Tooltip.tsx +222 -0
  133. package/src/stories/Elements/Alert/Alert.stories.tsx +65 -0
  134. package/src/stories/Elements/Alert/Alert.tsx +49 -0
  135. package/src/stories/Elements/Alert/alert.scss +189 -0
  136. package/src/stories/Elements/Badge/Badge.stories.tsx +15 -0
  137. package/src/stories/Elements/Badge/Badge.tsx +21 -0
  138. package/src/stories/Elements/Badge/badge.scss +24 -0
  139. package/src/stories/Elements/Button/Button.stories.tsx +54 -0
  140. package/src/stories/Elements/Button/Button.tsx +118 -0
  141. package/src/stories/Elements/Button/button.scss +102 -0
  142. package/src/stories/Elements/Icon/Icon.stories.tsx +33 -0
  143. package/src/stories/Elements/Icon/Icon.tsx +57 -0
  144. package/src/stories/Elements/Icon/icon.scss +15 -0
  145. package/src/stories/Elements/Icon/icono.svg +1 -0
  146. package/src/stories/Elements/ProgressBar/ProgressBar.scss +26 -0
  147. package/src/stories/Elements/ProgressBar/ProgressBar.stories.tsx +19 -0
  148. package/src/stories/Elements/ProgressBar/ProgressBar.tsx +35 -0
  149. package/src/stories/Form/Autocomplete/Autocomplete.stories.tsx +55 -0
  150. package/src/stories/Form/Autocomplete/Autocomplete.tsx +160 -0
  151. package/src/stories/Form/Autocomplete/autocomplete.scss +311 -0
  152. package/src/stories/Form/Autocomplete-Prueba/Autocomplete.stories.tsx +50 -0
  153. package/src/stories/Form/Autocomplete-Prueba/AutocompletePrueba.tsx +83 -0
  154. package/src/stories/Form/Checkbox/Checkbox.stories.tsx +26 -0
  155. package/src/stories/Form/Checkbox/Checkbox.tsx +89 -0
  156. package/src/stories/Form/Checkbox/checkbox.scss +41 -0
  157. package/src/stories/Form/DatePicker/DatePickerExample.stories.tsx +27 -0
  158. package/src/stories/Form/DatePicker/DatePickerExample.tsx +65 -0
  159. package/src/stories/Form/DatePickerComponent/DatePickerComponent.scss +116 -0
  160. package/src/stories/Form/DatePickerComponent/DatePickerComponent.stories.tsx +37 -0
  161. package/src/stories/Form/DatePickerComponent/DatePickerComponent.tsx +97 -0
  162. package/src/stories/Form/Filters/Filters.stories.tsx +84 -0
  163. package/src/stories/Form/Filters/Filters.tsx +230 -0
  164. package/src/stories/Form/Filters/filters.scss +261 -0
  165. package/src/stories/Form/Input/Input.stories.tsx +25 -0
  166. package/src/stories/Form/Input/Input.tsx +86 -0
  167. package/src/stories/Form/Input/InputVar.sass +26 -0
  168. package/src/stories/Form/Input/input.scss +19 -0
  169. package/src/stories/Form/InputFormControl/Input-form-control.stories.tsx +26 -0
  170. package/src/stories/Form/InputFormControl/Input-form-control.tsx +48 -0
  171. package/src/stories/Form/InputFormControl/input-form-control.scss +34 -0
  172. package/src/stories/Form/Radio/Radio.stories.tsx +19 -0
  173. package/src/stories/Form/Radio/Radio.tsx +84 -0
  174. package/src/stories/Form/Radio/radio.scss +19 -0
  175. package/src/stories/Form/Search/Search.scss +50 -0
  176. package/src/stories/Form/Search/Search.stories.tsx +26 -0
  177. package/src/stories/Form/Search/Search.tsx +84 -0
  178. package/src/stories/Form/Select/Select.stories.tsx +55 -0
  179. package/src/stories/Form/Select/Select.tsx +121 -0
  180. package/src/stories/Form/Select/select.scss +303 -0
  181. package/src/stories/Form/Switch/Switch.stories.tsx +17 -0
  182. package/src/stories/Form/Switch/Switch.tsx +36 -0
  183. package/src/stories/Form/Switch/switch.scss +123 -0
  184. package/src/stories/Form/Textarea/Textarea.stories.tsx +19 -0
  185. package/src/stories/Form/Textarea/Textarea.tsx +52 -0
  186. package/src/stories/Form/Textarea/textarea.scss +25 -0
  187. package/src/stories/Form/UploadFileItem/UploadFileItem.scss +49 -0
  188. package/src/stories/Form/UploadFileItem/UploadFileItem.stories.tsx +18 -0
  189. package/src/stories/Form/UploadFileItem/UploadFileItem.tsx +89 -0
  190. package/src/stories/Form/UploadFiles/UploadFiles.scss +17 -0
  191. package/src/stories/Form/UploadFiles/UploadFiles.stories.tsx +32 -0
  192. package/src/stories/Form/UploadFiles/UploadFiles.tsx +177 -0
  193. package/src/stories/Layout/Footer/Footer.scss +129 -0
  194. package/src/stories/Layout/Footer/Footer.stories.tsx +101 -0
  195. package/src/stories/Layout/Footer/Footer.tsx +81 -0
  196. package/src/stories/Layout/Header/Header.scss +190 -0
  197. package/src/stories/Layout/Header/Header.stories.tsx +223 -0
  198. package/src/stories/Layout/Header/Header.tsx +278 -0
  199. package/src/stories/Layout/HeaderTable/HeaderTable.scss +21 -0
  200. package/src/stories/Layout/HeaderTable/HeaderTable.stories.tsx +112 -0
  201. package/src/stories/Layout/HeaderTable/HeaderTable.tsx +72 -0
  202. package/src/stories/Layout/Sidebar/Sidebar.scss +50 -0
  203. package/src/stories/Layout/Sidebar/Sidebar.stories.tsx +744 -0
  204. package/src/stories/Layout/Sidebar/Sidebar.tsx +129 -0
  205. package/src/stories/Layout/SidebarEmpty/SidebarEmpty.scss +64 -0
  206. package/src/stories/Layout/SidebarEmpty/SidebarEmpty.stories.tsx +26 -0
  207. package/src/stories/Layout/SidebarEmpty/SidebarEmpty.tsx +100 -0
  208. package/src/stories/Layout/Subtitle/Subtitle.scss +88 -0
  209. package/src/stories/Layout/Subtitle/Subtitle.stories.tsx +46 -0
  210. package/src/stories/Layout/Subtitle/Subtitle.tsx +108 -0
  211. package/src/stories/Layout/Title/Title.scss +79 -0
  212. package/src/stories/Layout/Title/Title.stories.tsx +86 -0
  213. package/src/stories/Layout/Title/Title.tsx +96 -0
  214. package/src/stories/Welcome.stories.tsx +111 -0
  215. package/src/stories/assets/404 Page Not Found _Two Color (1).png +0 -0
  216. package/src/stories/assets/404 Page Not Found _Two Color.png +0 -0
  217. package/src/stories/assets/Empty Inbox _Two Color.png +0 -0
  218. package/src/stories/assets/Loading _Two Color.png +0 -0
  219. package/src/stories/assets/Notifications_Two Color 1.png +0 -0
  220. package/src/stories/assets/Online protection_Two Color.png +0 -0
  221. package/src/stories/assets/Under Constructions _Two Color.png +0 -0
  222. package/src/stories/assets/bulma.png +0 -0
  223. package/src/stories/assets/burger.svg +5 -0
  224. package/src/stories/assets/code-brackets.svg +1 -0
  225. package/src/stories/assets/colors.svg +1 -0
  226. package/src/stories/assets/comments.svg +1 -0
  227. package/src/stories/assets/decor-bg.png +0 -0
  228. package/src/stories/assets/direction.svg +1 -0
  229. package/src/stories/assets/e-isologo.svg +4 -0
  230. package/src/stories/assets/e-isotype.svg +4 -0
  231. package/src/stories/assets/e-logo_negative.svg +14 -0
  232. package/src/stories/assets/e-logotype.svg +14 -0
  233. package/src/stories/assets/flow.svg +1 -0
  234. package/src/stories/assets/logo_gobierno_corrientes.svg +9 -0
  235. package/src/stories/assets/logo_rentas_corrientes.svg +10 -0
  236. package/src/stories/assets/logo_rentas_corrientes_compacto.svg +10 -0
  237. package/src/stories/assets/plugin.svg +1 -0
  238. package/src/stories/assets/repo.svg +1 -0
  239. package/src/stories/assets/stackalt.svg +1 -0
  240. package/src/stories/assets/storybook.svg +13 -0
  241. package/src/stories/assets/thumbnail-black.jpg +0 -0
  242. package/src/stories/assets/thumbnail-black[2].jpg +0 -0
  243. package/src/stories/assets/thumbnail.jpg +0 -0
  244. package/src/stories/assets/thumbnail[2].jpg +0 -0
  245. package/src/stories/changelog.ts +389 -0
  246. package/src/utils/functions.ts +57 -0
  247. package/src/vite-env.d.ts +2 -0
  248. package/static/e-isologo-192.jpg +0 -0
  249. package/static/e-isologo.svg +4 -0
  250. package/static/e-logotype.svg +14 -0
  251. package/static/favicon.ico +0 -0
  252. package/tsconfig.json +22 -0
  253. package/tsconfig.node.json +9 -0
  254. package/vite.config.ts +22 -0
@@ -0,0 +1,350 @@
1
+ import {ComponentStory, ComponentMeta} from '@storybook/react';
2
+ import {Cart} from './Cart';
3
+
4
+ export default {
5
+ title: 'Components/Cart',
6
+ component: Cart,
7
+ args: {},
8
+ } as ComponentMeta<typeof Cart>;
9
+
10
+ const Template: ComponentStory<typeof Cart> = args => <Cart {...args} />;
11
+
12
+ export const Standard = Template.bind({});
13
+ Standard.args = {
14
+ contentType: 'perception',
15
+ footerType: 'button',
16
+ wallet: 'none',
17
+ title: 'Percepción',
18
+ button: [
19
+ {
20
+ type: 'button',
21
+ color: 'primary',
22
+ size: 'normal',
23
+ fill: 'solid',
24
+ loading: false,
25
+ disabled: false,
26
+ label: 'Pagar',
27
+ trailingIcon: true,
28
+ onClick: () => console.log('Button Clicked'),
29
+ },
30
+ ],
31
+ optionButton: {
32
+ type: 'button',
33
+ color: 'primary',
34
+ size: 'normal',
35
+ fill: 'unstyled',
36
+ loading: false,
37
+ disabled: false,
38
+ isOnlyIcon: true,
39
+ icon: 'fa-solid fa-ellipsis-vertical',
40
+ onClick: () => console.log('OptionButton Clicked'),
41
+ },
42
+ list: [
43
+ {
44
+ label: 'Cantidad no anuladas',
45
+ sub_label: 'sub_label 1',
46
+ value: '$ 300',
47
+ },
48
+ {
49
+ label: 'Cantidad no anuladas',
50
+ sub_label: 'sub_label 2',
51
+ value: '$ 300',
52
+ },
53
+ {
54
+ label: 'Cantidad no anuladas',
55
+ sub_label: 'sub_label 3',
56
+ value: '$ 300',
57
+ },
58
+ ],
59
+ total: {label: 'Total a pagar', values: [{value: '$ 5.900'}]},
60
+ };
61
+
62
+ export const Example1 = Template.bind({});
63
+ Example1.args = {
64
+ contentType: 'perception',
65
+ footerType: 'button',
66
+ wallet: 'none',
67
+ title: 'Percepción',
68
+ button: [
69
+ {
70
+ type: 'button',
71
+ color: 'primary',
72
+ size: 'normal',
73
+ fill: 'solid',
74
+ loading: false,
75
+ disabled: false,
76
+ label: 'Pagar',
77
+ trailingIcon: true,
78
+ onClick: () => console.log('Button Clicked'),
79
+ },
80
+ ],
81
+ optionButton: {
82
+ type: 'button',
83
+ color: 'primary',
84
+ size: 'normal',
85
+ fill: 'unstyled',
86
+ loading: false,
87
+ disabled: false,
88
+ isOnlyIcon: true,
89
+ icon: 'fa-solid fa-ellipsis-vertical',
90
+ trailingIcon: true,
91
+ onClick: () => console.log('OptionButton Clicked'),
92
+ },
93
+ list: [
94
+ {
95
+ label: 'Cantidad no anuladas',
96
+ sub_label: 'sub_label 1',
97
+ value: '$ 300',
98
+ },
99
+ {
100
+ label: 'Cantidad no anuladas',
101
+ sub_label: 'sub_label 2',
102
+ value: '$ 300',
103
+ },
104
+ {
105
+ label: 'Cantidad no anuladas',
106
+ sub_label: 'sub_label 3',
107
+ value: '$ 300',
108
+ },
109
+ ],
110
+ sub_list: [
111
+ {
112
+ label: 'Importe Actualizado',
113
+ color: '#09101D',
114
+ value: '$ 54.000',
115
+ },
116
+ {
117
+ label: 'Subtotales',
118
+ color: '#124596',
119
+ value: '$ 46.661',
120
+ },
121
+ {
122
+ label: 'Diferencia',
123
+ color: '#124596',
124
+ value: '$ 46.661',
125
+ },
126
+ ],
127
+ total: {label: 'Total a pagar', label_color: 'red', values: [{value: '$ 5.900', value_color: 'red'}]},
128
+ };
129
+
130
+ export const Example2 = Template.bind({});
131
+ Example2.args = {
132
+ contentType: 'bonds',
133
+ footerType: 'button',
134
+ wallet: 'icon',
135
+ button: [
136
+ {
137
+ type: 'button',
138
+ color: 'primary',
139
+ size: 'normal',
140
+ fill: 'solid',
141
+ loading: false,
142
+ disabled: false,
143
+ label: 'Pagar',
144
+ trailingIcon: true,
145
+ onClick: () => console.log('Button Clicked'),
146
+ },
147
+ ],
148
+ list: [
149
+ {
150
+ label: 'DÓLAR',
151
+ sub_label: 'Compra',
152
+ value: '$ 172,50',
153
+ },
154
+ {
155
+ label: 'DÓLAR',
156
+ sub_label: 'Venta',
157
+ value: '$ 180,50',
158
+ },
159
+ ],
160
+ interLabel: 'DOL 1 = ARS 1',
161
+ isInterLabelCenter: true,
162
+ total: {label: 'Total a pagar', values: [{value: '$ 1.118.586'}]},
163
+ };
164
+
165
+ // export const BondsMobile = Template.bind({});
166
+ // BondsMobile.args = {
167
+ // contentType: 'bonds',
168
+ // footerType: 'total-button',
169
+ // wallet: 'dropdownButton',
170
+ // button: [
171
+ // {
172
+ // type: 'button',
173
+ // color: 'primary',
174
+ // fill: 'solid',
175
+ // loading: false,
176
+ // disabled: false,
177
+ // label: 'Pagar',
178
+ // trailingIcon: true,
179
+ // onClick: () => console.log('Button Clicked'),
180
+ // },
181
+ // ],
182
+ // optionButton: {
183
+ // type: 'button',
184
+ // color: 'primary',
185
+ // fill: 'unstyled',
186
+ // loading: false,
187
+ // disabled: false,
188
+ // label: '',
189
+ // icon: 'fa-solid fa-chevron-down',
190
+ // trailingIcon: true,
191
+ // onClick: () => console.log('OptionButton Clicked'),
192
+ // },
193
+ // list: [
194
+ // {
195
+ // label: 'DÓLAR',
196
+ // sub_label: 'Compra',
197
+ // value: '$ 172,50',
198
+ // },
199
+ // {
200
+ // label: 'DÓLAR',
201
+ // sub_label: 'Venta',
202
+ // value: '$ 180,50',
203
+ // },
204
+ // ],
205
+ // interLabel: 'DOL 1 = ARS 1',
206
+ // isInterLabelCenter: true,
207
+ // total: {label: 'Total a pagar', values: [{value: '$ 1.118.586'}]},
208
+ // };
209
+
210
+ export const Example3 = Template.bind({});
211
+ Example3.args = {
212
+ contentType: 'bonds',
213
+ footerType: 'big-total-button',
214
+ wallet: 'icon',
215
+ button: [
216
+ {
217
+ type: 'button',
218
+ color: 'primary',
219
+ size: 'normal',
220
+ fill: 'solid',
221
+ loading: false,
222
+ disabled: false,
223
+ label: 'Pagar',
224
+ trailingIcon: true,
225
+ onClick: () => console.log('Button Clicked'),
226
+ },
227
+ ],
228
+ list: [
229
+ {
230
+ label: 'DÓLAR',
231
+ sub_label: 'Compra',
232
+ value: '$ 172,50',
233
+ },
234
+ {
235
+ label: 'DÓLAR',
236
+ sub_label: 'Venta',
237
+ value: '$ 180,50',
238
+ },
239
+ ],
240
+ interLabel: 'DOL 1 = ARS 1',
241
+ isInterLabelCenter: true,
242
+ total: {label: 'Total a pagar', values: [{value: '$ 1.118.586'}]},
243
+ };
244
+
245
+ export const Example4 = Template.bind({});
246
+ Example4.args = {
247
+ contentType: 'none',
248
+ footerType: 'big-total-button-sub',
249
+ wallet: 'icon',
250
+ button: [
251
+ {
252
+ type: 'button',
253
+ color: 'primary',
254
+ size: 'normal',
255
+ fill: 'solid',
256
+ loading: false,
257
+ disabled: false,
258
+ label: 'Pagar',
259
+ trailingIcon: true,
260
+ onClick: () => console.log('Button Clicked'),
261
+ },
262
+ ],
263
+ total: {label: 'Total a pagar', sub_label: 'de 11 obligaciones seleccionadas', values: [{value: '$ 1.118.586', sub_value: '$ 837,35'}]},
264
+ };
265
+
266
+ export const Example5 = Template.bind({});
267
+ Example5.args = {
268
+ contentType: 'none',
269
+ footerType: 'big-total-button-sub',
270
+ wallet: 'icon',
271
+ button: [
272
+ {
273
+ type: 'button',
274
+ color: 'primary',
275
+ size: 'normal',
276
+ fill: 'solid',
277
+ loading: false,
278
+ disabled: false,
279
+ label: 'Pagar',
280
+ trailingIcon: true,
281
+ onClick: () => console.log('Button Clicked'),
282
+ },
283
+ ],
284
+ total: {
285
+ label: 'Total a pagar',
286
+ sub_label: 'de 0 créditos seleccionadas',
287
+ values: [{value: '$ 0,00', value_color: '#16A34A', sub_desc: 'COMPENSACIÓN A UTILIZAR'}],
288
+ },
289
+ };
290
+
291
+ export const Example6 = Template.bind({});
292
+ Example6.args = {
293
+ contentType: 'none',
294
+ footerType: 'big-total-button-sub',
295
+ wallet: 'icon',
296
+ button: [
297
+ {
298
+ type: 'button',
299
+ color: 'primary',
300
+ size: 'normal',
301
+ fill: 'solid',
302
+ loading: false,
303
+ disabled: false,
304
+ label: 'Pagar',
305
+ trailingIcon: true,
306
+ onClick: () => console.log('Button Clicked'),
307
+ },
308
+ {
309
+ type: 'button',
310
+ color: 'primary',
311
+ size: 'normal',
312
+ fill: 'unstyled',
313
+ loading: false,
314
+ disabled: false,
315
+ label: 'Volver',
316
+ trailingIcon: true,
317
+ onClick: () => console.log('Button Clicked'),
318
+ },
319
+ ],
320
+ total: {
321
+ label: 'Total a pagar',
322
+ sub_label: 'de 0 créditos seleccionadas',
323
+ values: [
324
+ {value: '$ 8.230,23', value_color: '#16A34A', sub_desc: 'COMPENSACIÓN A UTILIZAR'},
325
+ {value: '$ 0,00', value_color: '#124596', sub_desc: 'COMPENSACIÓN RESTANTE'},
326
+ {value: '$ 9.322,63', value_color: '#DC2626', sub_desc: 'MONTO SELECCIONADO'},
327
+ ],
328
+ value_description: 'El monto seleccionado supera el monto del crédito por lo que hay obligaciones que se cubrirán parcialmente.',
329
+ },
330
+ };
331
+
332
+ // export const DefaultMobile = Template.bind({});
333
+ // DefaultMobile.args = {
334
+ // contentType: 'none',
335
+ // footerType: 'total-button-sub-mobile',
336
+ // wallet: 'none',
337
+ // button: [
338
+ // {
339
+ // type: 'button',
340
+ // color: 'primary',
341
+ // fill: 'solid',
342
+ // loading: false,
343
+ // disabled: false,
344
+ // label: 'Pagar',
345
+ // trailingIcon: true,
346
+ // onClick: () => console.log('Button Clicked'),
347
+ // },
348
+ // ],
349
+ // total: {label: 'Total a pagar', sub_label: 'de 11 obligaciones seleccionadas', values: [{value: '$ 1.118.586', sub_value: '$ 837,35'}]},
350
+ // };
@@ -0,0 +1,277 @@
1
+ import React from 'react';
2
+ import {Button, IButton} from '../../Elements/Button/Button';
3
+ import './Cart.scss';
4
+ import {generateRandomKey, shortenText} from '../../../utils/functions';
5
+ import {Icon} from '../../Elements/Icon/Icon';
6
+
7
+ export interface ICart extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
8
+ contentType: 'perception' | 'bonds' | 'none';
9
+ footerType?: 'button' | 'total-button' | 'big-total-button' | 'big-total-button-sub' | 'total-button-sub-mobile';
10
+ button?: IButton[];
11
+ className?: string;
12
+
13
+ // WALLET TOP
14
+ wallet?: 'none' | 'icon' | 'dropdownButton';
15
+ walletIcon?: string;
16
+ walletSVG?: string;
17
+
18
+ //ALL TYPES
19
+ list?: {
20
+ label: string;
21
+ sub_label?: string;
22
+ value: string;
23
+ }[];
24
+ total?: {
25
+ label: string;
26
+ label_color?: string;
27
+
28
+ sub_label?: string;
29
+ sub_label_color?: string;
30
+
31
+ values: {
32
+ value: string;
33
+ value_color?: string;
34
+ sub_desc?: string;
35
+ sub_desc_color?: string;
36
+ sub_value?: string;
37
+ sub_value_color?: string;
38
+ }[];
39
+
40
+ value_description?: string;
41
+ };
42
+
43
+ // PERCEPTION
44
+ title?: string;
45
+ optionButton?: IButton;
46
+ sub_list?: {label: string; value: string; color?: string}[];
47
+
48
+ // BONDS
49
+ interLabel?: string;
50
+ isInterLabelCenter?: boolean;
51
+ }
52
+
53
+ export const Cart = ({
54
+ button,
55
+ title,
56
+ optionButton,
57
+ sub_list,
58
+ wallet,
59
+ walletIcon,
60
+ walletSVG,
61
+ contentType,
62
+ footerType,
63
+ interLabel,
64
+ isInterLabelCenter,
65
+ list,
66
+ total,
67
+ className,
68
+ ...props
69
+ }: ICart) => {
70
+ return (
71
+ <div className="elv-component elv-cart" {...props}>
72
+ <div className={`cart ${className ? className : ''}`}>
73
+ {/* ============================================================================================================================== */}
74
+ {/* ======================= WALLET TYPES ======================= */}
75
+ {wallet === 'icon' && (
76
+ <div className="cart__wallet--icon is-flex is-align-items-center is-justify-content-center">
77
+ {walletSVG ? (
78
+ <Icon type="svg_icon" icon={walletSVG}></Icon>
79
+ ) : (
80
+ <Icon icon={walletIcon ? walletIcon : 'fa-solid fa-wallet'}></Icon>
81
+ )}
82
+ </div>
83
+ )}
84
+ {wallet === 'dropdownButton' && (
85
+ <div className="cart__wallet--dropdownButton is-flex is-justify-content-end">
86
+ {optionButton && (
87
+ <Button
88
+ type={optionButton.type}
89
+ size={optionButton.size}
90
+ fill={optionButton.fill}
91
+ loading={false}
92
+ disabled={optionButton.disabled}
93
+ icon={optionButton.icon}
94
+ label={optionButton.label !== undefined ? shortenText(optionButton.label, 25) : ''}
95
+ trailingIcon={optionButton.trailingIcon}
96
+ onClick={optionButton.onClick}
97
+ />
98
+ )}
99
+ </div>
100
+ )}
101
+
102
+ {/* ============================================================================================================================== */}
103
+ {/* ======================= CONTENT TYPES ======================= */}
104
+ <div className={`cart__content`}>
105
+ {contentType === 'perception' && (
106
+ <div className="perception is-flex is-flex-direction-column">
107
+ <div className="perception__title is-flex is-justify-content-space-between">
108
+ <p className="title is-5">{title}</p>
109
+ {optionButton && (
110
+ <Button
111
+ type={optionButton.type}
112
+ size={optionButton.size}
113
+ fill={optionButton.fill}
114
+ loading={false}
115
+ disabled={optionButton.disabled}
116
+ icon={optionButton.icon}
117
+ label={optionButton.label !== undefined ? shortenText(optionButton.label, 25) : ''}
118
+ trailingIcon={optionButton.trailingIcon}
119
+ onClick={optionButton.onClick}
120
+ />
121
+ )}
122
+ </div>
123
+ <div className="perception__labels">
124
+ {list?.map(item => (
125
+ <div key={generateRandomKey()} className="item is-flex is-justify-content-space-between">
126
+ <p className="item__label">{item.label}</p>
127
+ <p className="item__value">{item.value}</p>
128
+ </div>
129
+ ))}
130
+ </div>
131
+ {sub_list && (
132
+ <div className="perception__sub-list">
133
+ {sub_list?.map(item => (
134
+ <div key={generateRandomKey()} className="item is-flex is-justify-content-space-between" style={{color: item.color}}>
135
+ <p className="item__label">{item.label}</p>
136
+ <p className="item__value">{item.value}</p>
137
+ </div>
138
+ ))}
139
+ </div>
140
+ )}
141
+ <div className="perception__total is-flex is-justify-content-space-between">
142
+ <p className="total-label" style={total?.label_color ? {color: total.label_color} : {}}>
143
+ {total?.label}
144
+ </p>
145
+ <p className="total-value" style={total?.values[0].value_color ? {color: total.values[0].value_color} : {}}>
146
+ {total?.values[0].value}
147
+ </p>
148
+ </div>
149
+ </div>
150
+ )}
151
+ {contentType === 'bonds' && (
152
+ <div className="bods is-flex is-flex-direction-column">
153
+ {list && (
154
+ <div className="bonds__labels">
155
+ <div className="item is-flex is-justify-content-space-between is-align-items-center">
156
+ <div className="item__label">
157
+ <p className="micro-label is-4">{list[0].label}</p>
158
+ <p className="micro-sub_label">{list[0].sub_label}</p>
159
+ </div>
160
+ <p className="item__value">{list[0].value}</p>
161
+ </div>
162
+ <div className={`inter-label is-flex ${isInterLabelCenter ? 'is-justify-content-center' : ''}`}>
163
+ <p>{interLabel}</p>
164
+ </div>
165
+ <div className="item is-flex is-justify-content-space-between is-align-items-center">
166
+ <div className="item__label">
167
+ <p className="micro-label">{list[1].label}</p>
168
+ <p className="micro-sub_label">{list[1].sub_label}</p>
169
+ </div>
170
+ <p className="item__value">{list[1].value}</p>
171
+ </div>
172
+ </div>
173
+ )}
174
+ </div>
175
+ )}
176
+
177
+ {/* ============================================================================================================================== */}
178
+ {/* ====================== FOOTER TYPES ====================== */}
179
+ {footerType === 'button' && (
180
+ <div className="footer--button">
181
+ {button && (
182
+ <div className="button-list is-flex is-flex-direction-column">
183
+ {button[0] && <Button {...button[0]} />}
184
+ {button[1] && <Button {...button[1]} />}
185
+ </div>
186
+ )}
187
+ </div>
188
+ )}
189
+ {footerType === 'total-button' && (
190
+ <div className="footer--total-button is-flex is-justify-content-space-between is-align-items-center">
191
+ {total && (
192
+ <div className="total">
193
+ <p className="total__label">{shortenText(total.label, 25)}</p>
194
+ <p className="total__value">{shortenText(total.values[0].value, 25)}</p>
195
+ </div>
196
+ )}
197
+ {button && <Button {...button[0]} />}
198
+ </div>
199
+ )}
200
+ {footerType === 'big-total-button' && (
201
+ <div className="footer--big-total-button is-flex is-flex-direction-column is-justify-content-center is-align-items-center">
202
+ {total && (
203
+ <>
204
+ <p className="total__label">{shortenText(total.label, 25)}</p>
205
+ <p className="total__value">{shortenText(total.values[0].value, 25)}</p>
206
+ </>
207
+ )}
208
+ {button && (
209
+ <div className="button-list is-flex is-flex-direction-column">
210
+ {button[0] && <Button {...button[0]} />}
211
+ {button[1] && <Button {...button[1]} />}
212
+ </div>
213
+ )}
214
+ </div>
215
+ )}
216
+ {footerType === 'big-total-button-sub' && (
217
+ <div className="footer--big-total-button-sub is-flex is-flex-direction-column is-justify-content-center is-align-items-center">
218
+ {total && (
219
+ <>
220
+ <p className="total__label">{shortenText(total.label, 35)}</p>
221
+ {total.sub_label && (
222
+ <p className="total__sub_label" style={total?.label_color ? {color: total.label_color} : {}}>
223
+ {shortenText(total.sub_label, 35)}
224
+ </p>
225
+ )}
226
+ {total.values[0].sub_value && (
227
+ <p className="total__sub_value" style={total?.values[0].value_color ? {color: total.values[0].value_color} : {}}>
228
+ {shortenText(total.values[0].sub_value, 35)}
229
+ </p>
230
+ )}
231
+
232
+ {total.values.map(item => (
233
+ <>
234
+ {item.sub_desc && (
235
+ <p
236
+ key={generateRandomKey()}
237
+ className="total__sub_desc"
238
+ style={item.sub_desc_color ? {color: item.sub_desc_color} : {}}
239
+ >
240
+ {shortenText(item.sub_desc, 35)}
241
+ </p>
242
+ )}
243
+ <p className="total__value" style={item.value_color ? {color: item.value_color} : {}}>
244
+ {shortenText(item.value, 35)}
245
+ </p>
246
+ </>
247
+ ))}
248
+
249
+ {total.value_description && <p className="total__description">{total.value_description}</p>}
250
+ </>
251
+ )}
252
+ {button && (
253
+ <div className="button-list is-flex is-flex-direction-column">
254
+ {button[0] && <Button {...button[0]} />}
255
+ {button[1] && <Button {...button[1]} />}
256
+ </div>
257
+ )}
258
+ </div>
259
+ )}
260
+ {footerType === 'total-button-sub-mobile' && (
261
+ <div className="footer--total-button-sub-mobile is-flex is-justify-content-space-between is-align-items-center">
262
+ {total && (
263
+ <div className="total">
264
+ <p className="total__label">{shortenText(total.label, 18)}</p>
265
+ {total.sub_label && <p className="total__sub_label">{shortenText(total.sub_label, 50)}</p>}
266
+ {total.values[0].sub_value && <p className="total__sub_value">{shortenText(total.values[0].sub_value, 21)}</p>}
267
+ <p className="total__value">{shortenText(total.values[0].value, 16)}</p>
268
+ </div>
269
+ )}
270
+ {button && <Button {...button[0]} />}
271
+ </div>
272
+ )}
273
+ </div>
274
+ </div>
275
+ </div>
276
+ );
277
+ };