@m4l/components 7.2.2 → 8.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 (98) hide show
  1. package/@types/types.d.ts +8 -0
  2. package/components/DynamicFilter/slots/dynamicFilterSlots.d.ts +1 -1
  3. package/components/DynamicSort/slots/DynamicSortSlots.d.ts +1 -1
  4. package/components/GridLayout/subcomponents/withSizeProvider/index.d.ts +4 -0
  5. package/components/GridLayout/subcomponents/withSizeProvider/index.js +1 -1
  6. package/components/HelperError/HelperError.js +2 -3
  7. package/components/HelperError/types.d.ts +1 -1
  8. package/components/Label/Label.js +9 -1
  9. package/components/Label/Label.styles.js +1 -1
  10. package/components/Label/slots/LabelSlots.d.ts +1 -1
  11. package/components/MFLoader/MFLoader.js +1 -1
  12. package/components/NavLink/NavLink.js +2 -3
  13. package/components/NavLink/types.d.ts +1 -1
  14. package/components/Period/Period.js +2 -2
  15. package/components/PropertyValue/classes/index.d.ts +1 -1
  16. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavListSub/subcomponents/NavItemSub/styles.d.ts +1 -1
  17. package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/subcomponents/NavListSub/subcomponents/NavItemSub/subcomponents/NavItemSubContent/styles.d.ts +1 -1
  18. package/components/areas/components/AreasViewer/classes/index.d.ts +4 -0
  19. package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/PanelWindows/index.d.ts +5 -0
  20. package/components/areas/contexts/AreasContext/store.js +2 -2
  21. package/components/extended/react-resizable/Resizable/slots/ResizableSlots.d.ts +1 -1
  22. package/components/extended/react-resizable/ResizableBox/slots/ResizableBoxSlots.d.ts +1 -1
  23. package/components/hook-form/RHFAutocompleteAsync/subcomponents/ComponentTypeImage/index.js +1 -1
  24. package/components/hook-form/RHFAutocompleteAsync/subcomponents/ComponentTypeText/index.js +1 -1
  25. package/components/hook-form/RHFCheckbox/styles.d.ts +1 -1
  26. package/components/hook-form/RHFInputNumberSpinner/slots/RHFInputNumberSpinnerSlots.d.ts +1 -1
  27. package/components/hook-form/RHFInputNumberSpinner/useRHFInputNumberSpinner.d.ts +2 -2
  28. package/components/hook-form/RHFTextField/slots/RHFTextFieldSlots.d.ts +1 -1
  29. package/components/hook-form/RHFUpload/RHFUploadImage/subcomponents/UploadImage/index.d.ts +4 -0
  30. package/components/hook-form/RHFUpload/RHFUploadImage/subcomponents/UploadImage/index.js +1 -1
  31. package/components/hook-form/RHFormContext/classes/index.d.ts +1 -1
  32. package/components/maps/components/Map/contexts/MapContext/store.d.ts +5 -0
  33. package/components/maps/components/Map/contexts/MapContext/store.js +246 -2
  34. package/components/maps/components/Map/hooks/useAutoFocus/index.d.ts +3 -0
  35. package/components/maps/components/Map/hooks/useAutoFocus/index.js +1 -1
  36. package/components/maps/components/Map/pluginLayers/PolylineWithArrows/index.d.ts +4 -0
  37. package/components/maps/components/Map/subcomponents/LayersContainer/subcomponents/MyLayer/index.d.ts +1 -1
  38. package/components/mui_extended/Accordion/Accordion.js +0 -2
  39. package/components/mui_extended/Badge/slots/BadgeSlots.d.ts +1 -1
  40. package/components/mui_extended/Button/styles.d.ts +1 -1
  41. package/components/mui_extended/IconButton/IconButton.d.ts +4 -3
  42. package/components/mui_extended/IconButton/slots/IconButtonSlots.d.ts +2 -2
  43. package/components/mui_extended/LoadingButton/index.js +1 -1
  44. package/components/mui_extended/LoadingButton/types.d.ts +1 -2
  45. package/components/mui_extended/MenuActions/slots/MenuActionsSlots.d.ts +1 -1
  46. package/components/mui_extended/Pager/subcomponents/CustomTablePagination/types.d.ts +3 -2
  47. package/components/mui_extended/Skeleton/Slots/skeletonSlots.d.ts +1 -1
  48. package/components/mui_extended/Skeleton/Slots/skeletonSlots.js +2 -2
  49. package/components/mui_extended/Skeleton/skeleton.styles.d.ts +1 -1
  50. package/components/mui_extended/Skeleton/skeleton.styles.js +2 -2
  51. package/components/mui_extended/Tabs/styles.d.ts +1 -1
  52. package/components/mui_extended/Typography/Typography.d.ts +17 -1
  53. package/components/mui_extended/Typography/Typography.js +34 -13
  54. package/components/mui_extended/Typography/constants.d.ts +9 -0
  55. package/components/mui_extended/Typography/constants.js +6 -0
  56. package/components/mui_extended/Typography/slots/typographyEnum.d.ts +7 -0
  57. package/components/mui_extended/Typography/slots/typographyEnum.js +8 -0
  58. package/components/mui_extended/Typography/slots/typographySlots.d.ts +14 -0
  59. package/components/mui_extended/Typography/slots/typographySlots.js +18 -0
  60. package/components/mui_extended/Typography/types.d.ts +53 -4
  61. package/components/mui_extended/Typography/typography.styles.d.ts +2 -0
  62. package/components/mui_extended/Typography/typography.styles.js +332 -0
  63. package/components/popups/components/PopupsProvider/contexts/PopupsContext/store.d.ts +5 -0
  64. package/components/popups/components/PopupsProvider/contexts/PopupsContext/store.js +37 -1
  65. package/contexts/RealTimeContext/store.d.ts +5 -0
  66. package/contexts/RealTimeContext/store.js +14 -2
  67. package/hooks/useSizeContainer/index.d.ts +4 -0
  68. package/hooks/useSizeContainer/index.js +1 -1
  69. package/package.json +9 -27
  70. package/storybook/components/extended/mui/Skeleton/Colors/Default/Variants/Circular/skeleton.defaultCircular.stories.d.ts +14 -0
  71. package/storybook/components/extended/mui/Skeleton/Colors/Default/Variants/Rectangular/skeleton.defaultRectangular.stories.d.ts +14 -0
  72. package/storybook/components/extended/mui/Skeleton/Colors/Default/Variants/Rounded/skeleton.defaultRounded.stories.d.ts +15 -0
  73. package/storybook/components/extended/mui/Skeleton/Colors/Default/Variants/Text/skeleton.defaultText.stories.d.ts +15 -0
  74. package/storybook/components/extended/mui/Typography/PaletteColor/text.primary/Variantes/body/Estados/typography.body.estados.stories.d.ts +23 -0
  75. package/storybook/components/extended/mui/Typography/PaletteColor/text.primary/Variantes/bodyDens/Estados/typography.bodyDens.estados.stories.d.ts +23 -0
  76. package/storybook/components/extended/mui/Typography/PaletteColor/text.primary/Variantes/h1/Estados/typography.h1.estados.stories.d.ts +23 -0
  77. package/storybook/components/extended/mui/Typography/PaletteColor/text.primary/Variantes/h2/Estados/typography.h2.estados.stories.d.ts +23 -0
  78. package/storybook/components/extended/mui/Typography/PaletteColor/text.primary/Variantes/h3/Estados/typography.h3.estados.stories.d.ts +23 -0
  79. package/storybook/components/extended/mui/Typography/PaletteColor/text.primary/Variantes/h5/Estados/typography.h5.estados.stories.d.ts +23 -0
  80. package/storybook/components/extended/mui/Typography/PaletteColor/text.primary/Variantes/paragraph/Estados/typography.paragraph.estados.stories.d.ts +23 -0
  81. package/storybook/components/extended/mui/Typography/PaletteColor/text.primary/Variantes/paragraphDens/Estados/typography.paragraphDens.estados.stories.d.ts +23 -0
  82. package/storybook/components/extended/mui/Typography/PaletteColor/text.primary/Variantes/subtitle/Estados/typography.subtitle.estados.stories.d.ts +23 -0
  83. package/storybook/components/extended/mui/Typography/PaletteColor/text.primary/Variantes/subtitleDens/Estados/typography.subtitleDens.estados.stories.d.ts +23 -0
  84. package/test/mocks.d.ts +7 -7
  85. package/utils/index.d.ts +1 -1
  86. package/components/mui_extended/Typography/styles.d.ts +0 -1
  87. package/components/mui_extended/Typography/styles.js +0 -7
  88. package/components/mui_extended/Typography/subcomponents/index.d.ts +0 -5
  89. package/components/mui_extended/Typography/subcomponents/index.js +0 -9
  90. package/components/mui_extended/Typography/subcomponents/types.d.ts +0 -2
  91. package/components/mui_extended/Typography/tests/constants.d.ts +0 -1
  92. package/components/mui_extended/Typography/tests/constants.js +0 -4
  93. package/components/mui_extended/Typography/tests/index.test.d.ts +0 -1
  94. package/components/mui_extended/Typography/tests/utils.d.ts +0 -2
  95. package/components/mui_extended/Typography/tests/utils.js +0 -7
  96. package/components/mui_extended/Typography/utils/Clases/index.d.ts +0 -9
  97. package/components/mui_extended/Typography/utils/Clases/index.js +0 -22
  98. package/components/mui_extended/Typography/utils/Clases/types.d.ts +0 -4
@@ -0,0 +1,332 @@
1
+ const typographyStyles = {
2
+ /**
3
+ * Slot: root
4
+ * Componente extendido de MUI Typography, que permite personalizar los estilos del componente.
5
+ */
6
+ root: ({ ownerState, theme }) => ({
7
+ "&.M4lclassCssSpecificity": {
8
+ // Estilos generales 🌐
9
+ // skeleton spacing when multiple rows 🦴
10
+ fontFamily: theme.typography.fontFamily,
11
+ ...ownerState.typographyskeletonRows && ownerState.typographyskeletonRows > 1 && {
12
+ display: "flex",
13
+ flexDirection: "column"
14
+ },
15
+ // Override de estilos generales de MUI 🚫
16
+ // color text.primary 🎨
17
+ ...ownerState.typographyColor === "text.primary" && {
18
+ color: theme.vars.palette.text.primary
19
+ },
20
+ // color text.secondary 🎨
21
+ ...ownerState.typographyColor === "text.secondary" && {
22
+ color: theme.vars.palette.text.secondary
23
+ },
24
+ // color text.disabled 🎨
25
+ ...ownerState.typographyColor === "text.disabled" && {
26
+ color: theme.vars.palette.text.disabled
27
+ },
28
+ // Dispositivo »mobile 📱
29
+ ...theme.generalSettings.isMobile === true && {
30
+ // mobile - »small
31
+ ...ownerState.typographySize === "small" && {
32
+ // mobile - »small - »variant (h1) 💅
33
+ ...ownerState.typographyVariant === "h1" && {
34
+ fontSize: theme.vars.size.typography.mobile.small.h1.fontSize,
35
+ fontWeight: theme.vars.size.typography.mobile.small.h1.weight,
36
+ lineHeight: theme.vars.size.typography.mobile.small.h1.lineHeight,
37
+ letterSpacing: theme.vars.size.typography.mobile.small.h1.letterSpacing
38
+ },
39
+ // mobile - »small - »variant (h2) 💅
40
+ ...ownerState.typographyVariant === "h2" && {
41
+ fontSize: theme.vars.size.typography.mobile.small.h2.fontSize,
42
+ fontWeight: theme.vars.size.typography.mobile.small.h2.weight,
43
+ lineHeight: theme.vars.size.typography.mobile.small.h2.lineHeight,
44
+ letterSpacing: theme.vars.size.typography.mobile.small.h2.letterSpacing
45
+ },
46
+ // mobile - »small - »variant (h3) 💅
47
+ ...ownerState.typographyVariant === "h3" && {
48
+ fontSize: theme.vars.size.typography.mobile.small.h3.fontSize,
49
+ fontWeight: theme.vars.size.typography.mobile.small.h3.weight,
50
+ lineHeight: theme.vars.size.typography.mobile.small.h3.lineHeight,
51
+ letterSpacing: theme.vars.size.typography.mobile.small.h3.letterSpacing
52
+ },
53
+ // mobile - »small - »variant(h5) 💅
54
+ ...ownerState.typographyVariant === "h5" && {
55
+ fontSize: theme.vars.size.typography.mobile.small.h5.fontSize,
56
+ fontWeight: theme.vars.size.typography.mobile.small.h5.weight,
57
+ lineHeight: theme.vars.size.typography.mobile.small.h5.lineHeight,
58
+ letterSpacing: theme.vars.size.typography.mobile.small.h5.letterSpacing
59
+ },
60
+ // mobile - »small - »variant (subtitle) 💅
61
+ ...ownerState.typographyVariant === "subtitle" && {
62
+ fontSize: theme.vars.size.typography.mobile.small.subtitle.fontSize,
63
+ fontWeight: theme.vars.size.typography.mobile.small.subtitle.weight,
64
+ lineHeight: theme.vars.size.typography.mobile.small.subtitle.lineHeight,
65
+ letterSpacing: theme.vars.size.typography.mobile.small.subtitle.letterSpacing
66
+ },
67
+ // mobile - »small - »variant (subtitleDens) 💅
68
+ ...ownerState.typographyVariant === "subtitleDens" && {
69
+ fontSize: theme.vars.size.typography.mobile.small.subtitleDens.fontSize,
70
+ fontWeight: theme.vars.size.typography.mobile.small.subtitleDens.weight,
71
+ lineHeight: theme.vars.size.typography.mobile.small.subtitleDens.lineHeight,
72
+ letterSpacing: theme.vars.size.typography.mobile.small.subtitleDens.letterSpacing
73
+ },
74
+ // mobile - »small - »variant (paragraph) 💅
75
+ ...ownerState.typographyVariant === "paragraph" && {
76
+ fontSize: theme.vars.size.typography.mobile.small.paragraph.fontSize,
77
+ fontWeight: theme.vars.size.typography.mobile.small.paragraph.weight,
78
+ lineHeight: theme.vars.size.typography.mobile.small.paragraph.lineHeight,
79
+ letterSpacing: theme.vars.size.typography.mobile.small.paragraph.letterSpacing
80
+ },
81
+ // mobile - »small - »variant (paragraphDens) 💅
82
+ ...ownerState.typographyVariant === "paragraphDens" && {
83
+ fontSize: theme.vars.size.typography.mobile.small.paragraphDens.fontSize,
84
+ fontWeight: theme.vars.size.typography.mobile.small.paragraphDens.weight,
85
+ lineHeight: theme.vars.size.typography.mobile.small.paragraphDens.lineHeight,
86
+ letterSpacing: theme.vars.size.typography.mobile.small.paragraphDens.letterSpacing
87
+ },
88
+ // mobile - »small - »variant (body) 💅
89
+ ...ownerState.typographyVariant === "body" && {
90
+ fontSize: theme.vars.size.typography.mobile.small.body.fontSize,
91
+ fontWeight: theme.vars.size.typography.mobile.small.body.weight,
92
+ lineHeight: theme.vars.size.typography.mobile.small.body.lineHeight,
93
+ letterSpacing: theme.vars.size.typography.mobile.small.body.letterSpacing
94
+ },
95
+ // mobile - »small - »variant (bodyDens) 💅
96
+ ...ownerState.typographyVariant === "body" && {
97
+ fontSize: theme.vars.size.typography.mobile.small.bodyDens.fontSize,
98
+ fontWeight: theme.vars.size.typography.mobile.small.bodyDens.weight,
99
+ lineHeight: theme.vars.size.typography.mobile.small.bodyDens.lineHeight,
100
+ letterSpacing: theme.vars.size.typography.mobile.small.bodyDens.letterSpacing
101
+ }
102
+ },
103
+ // mobile - »medium - 👑 Predeterminado
104
+ ...ownerState.typographySize === "medium" && {
105
+ // mobile - medium - »variant (h1) 💅
106
+ ...ownerState.typographyVariant === "h1" && {
107
+ fontSize: theme.vars.size.typography.mobile.medium.h1.fontSize,
108
+ fontWeight: theme.vars.size.typography.mobile.medium.h1.weight,
109
+ lineHeight: theme.vars.size.typography.mobile.medium.h1.lineHeight,
110
+ letterSpacing: theme.vars.size.typography.mobile.medium.h1.letterSpacing
111
+ },
112
+ // mobile - medium - »variant (h2) 💅
113
+ ...ownerState.typographyVariant === "h2" && {
114
+ fontSize: theme.vars.size.typography.mobile.medium.h2.fontSize,
115
+ fontWeight: theme.vars.size.typography.mobile.medium.h2.weight,
116
+ lineHeight: theme.vars.size.typography.mobile.medium.h2.lineHeight,
117
+ letterSpacing: theme.vars.size.typography.mobile.medium.h2.letterSpacing
118
+ },
119
+ // mobile - medium - »variant (h3) 💅
120
+ ...ownerState.typographyVariant === "h3" && {
121
+ fontSize: theme.vars.size.typography.mobile.medium.h3.fontSize,
122
+ fontWeight: theme.vars.size.typography.mobile.medium.h3.weight,
123
+ lineHeight: theme.vars.size.typography.mobile.medium.h3.lineHeight,
124
+ letterSpacing: theme.vars.size.typography.mobile.medium.h3.letterSpacing
125
+ },
126
+ // mobile - medium - »variant(h5) 💅
127
+ ...ownerState.typographyVariant === "h5" && {
128
+ fontSize: theme.vars.size.typography.mobile.medium.h5.fontSize,
129
+ fontWeight: theme.vars.size.typography.mobile.medium.h5.weight,
130
+ lineHeight: theme.vars.size.typography.mobile.medium.h5.lineHeight,
131
+ letterSpacing: theme.vars.size.typography.mobile.medium.h5.letterSpacing
132
+ },
133
+ // mobile - medium - »variant (subtitle) 💅
134
+ ...ownerState.typographyVariant === "subtitle" && {
135
+ fontSize: theme.vars.size.typography.mobile.medium.subtitle.fontSize,
136
+ fontWeight: theme.vars.size.typography.mobile.medium.subtitle.weight,
137
+ lineHeight: theme.vars.size.typography.mobile.medium.subtitle.lineHeight,
138
+ letterSpacing: theme.vars.size.typography.mobile.medium.subtitle.letterSpacing
139
+ },
140
+ // mobile - medium - »variant (subtitleDens) 💅
141
+ ...ownerState.typographyVariant === "subtitleDens" && {
142
+ fontSize: theme.vars.size.typography.mobile.medium.subtitleDens.fontSize,
143
+ fontWeight: theme.vars.size.typography.mobile.medium.subtitleDens.weight,
144
+ lineHeight: theme.vars.size.typography.mobile.medium.subtitleDens.lineHeight,
145
+ letterSpacing: theme.vars.size.typography.mobile.medium.subtitleDens.letterSpacing
146
+ },
147
+ // mobile - medium - »variant (paragraph) 💅
148
+ ...ownerState.typographyVariant === "paragraph" && {
149
+ fontSize: theme.vars.size.typography.mobile.medium.paragraph.fontSize,
150
+ fontWeight: theme.vars.size.typography.mobile.medium.paragraph.weight,
151
+ lineHeight: theme.vars.size.typography.mobile.medium.paragraph.lineHeight,
152
+ letterSpacing: theme.vars.size.typography.mobile.medium.paragraph.letterSpacing
153
+ },
154
+ // mobile - medium - »variant (paragraphDens) 💅
155
+ ...ownerState.typographyVariant === "paragraphDens" && {
156
+ fontSize: theme.vars.size.typography.mobile.medium.paragraphDens.fontSize,
157
+ fontWeight: theme.vars.size.typography.mobile.medium.paragraphDens.weight,
158
+ lineHeight: theme.vars.size.typography.mobile.medium.paragraphDens.lineHeight,
159
+ letterSpacing: theme.vars.size.typography.mobile.medium.paragraphDens.letterSpacing
160
+ },
161
+ // mobile - medium - »variant (body) 💅
162
+ ...ownerState.typographyVariant === "body" && {
163
+ fontSize: theme.vars.size.typography.mobile.medium.body.fontSize,
164
+ fontWeight: theme.vars.size.typography.mobile.medium.body.weight,
165
+ lineHeight: theme.vars.size.typography.mobile.medium.body.lineHeight,
166
+ letterSpacing: theme.vars.size.typography.mobile.medium.body.letterSpacing
167
+ },
168
+ // mobile - medium - »variant (bodyDens) 💅
169
+ ...ownerState.typographyVariant === "body" && {
170
+ fontSize: theme.vars.size.typography.mobile.medium.bodyDens.fontSize,
171
+ fontWeight: theme.vars.size.typography.mobile.medium.bodyDens.weight,
172
+ lineHeight: theme.vars.size.typography.mobile.medium.bodyDens.lineHeight,
173
+ letterSpacing: theme.vars.size.typography.mobile.medium.bodyDens.letterSpacing
174
+ }
175
+ }
176
+ },
177
+ // Dispositivo »desktop 💻
178
+ ...theme.generalSettings.isMobile === false && {
179
+ // desktop - »small
180
+ ...ownerState.typographySize === "small" && {
181
+ // desktop - »small - »variant (h1) 💅
182
+ ...ownerState.typographyVariant === "h1" && {
183
+ fontSize: theme.vars.size.typography.desktop.small.h1.fontSize,
184
+ fontWeight: theme.vars.size.typography.desktop.small.h1.weight,
185
+ lineHeight: theme.vars.size.typography.desktop.small.h1.lineHeight,
186
+ letterSpacing: theme.vars.size.typography.desktop.small.h1.letterSpacing
187
+ },
188
+ // desktop - »small - »variant (h2) 💅
189
+ ...ownerState.typographyVariant === "h2" && {
190
+ fontSize: theme.vars.size.typography.desktop.small.h2.fontSize,
191
+ fontWeight: theme.vars.size.typography.desktop.small.h2.weight,
192
+ lineHeight: theme.vars.size.typography.desktop.small.h2.lineHeight,
193
+ letterSpacing: theme.vars.size.typography.desktop.small.h2.letterSpacing
194
+ },
195
+ // desktop - »small - »variant (h3) 💅
196
+ ...ownerState.typographyVariant === "h3" && {
197
+ fontSize: theme.vars.size.typography.desktop.small.h3.fontSize,
198
+ fontWeight: theme.vars.size.typography.desktop.small.h3.weight,
199
+ lineHeight: theme.vars.size.typography.desktop.small.h3.lineHeight,
200
+ letterSpacing: theme.vars.size.typography.desktop.small.h3.letterSpacing
201
+ },
202
+ // desktop - »small - »variant(h5) 💅
203
+ ...ownerState.typographyVariant === "h5" && {
204
+ fontSize: theme.vars.size.typography.desktop.small.h5.fontSize,
205
+ fontWeight: theme.vars.size.typography.desktop.small.h5.weight,
206
+ lineHeight: theme.vars.size.typography.desktop.small.h5.lineHeight,
207
+ letterSpacing: theme.vars.size.typography.desktop.small.h5.letterSpacing
208
+ },
209
+ // desktop - »small - »variant (subtitle) 💅
210
+ ...ownerState.typographyVariant === "subtitle" && {
211
+ fontSize: theme.vars.size.typography.desktop.small.subtitle.fontSize,
212
+ fontWeight: theme.vars.size.typography.desktop.small.subtitle.weight,
213
+ lineHeight: theme.vars.size.typography.desktop.small.subtitle.lineHeight,
214
+ letterSpacing: theme.vars.size.typography.desktop.small.subtitle.letterSpacing
215
+ },
216
+ // desktop - »small - »variant (subtitleDens) 💅
217
+ ...ownerState.typographyVariant === "subtitleDens" && {
218
+ fontSize: theme.vars.size.typography.desktop.small.subtitleDens.fontSize,
219
+ fontWeight: theme.vars.size.typography.desktop.small.subtitleDens.weight,
220
+ lineHeight: theme.vars.size.typography.desktop.small.subtitleDens.lineHeight,
221
+ letterSpacing: theme.vars.size.typography.desktop.small.subtitleDens.letterSpacing
222
+ },
223
+ // desktop - »small - »variant (paragraph) 💅
224
+ ...ownerState.typographyVariant === "paragraph" && {
225
+ fontSize: theme.vars.size.typography.desktop.small.paragraph.fontSize,
226
+ fontWeight: theme.vars.size.typography.desktop.small.paragraph.weight,
227
+ lineHeight: theme.vars.size.typography.desktop.small.paragraph.lineHeight,
228
+ letterSpacing: theme.vars.size.typography.desktop.small.paragraph.letterSpacing
229
+ },
230
+ // desktop - »small - »variant (paragraphDens) 💅
231
+ ...ownerState.typographyVariant === "paragraphDens" && {
232
+ fontSize: theme.vars.size.typography.desktop.small.paragraphDens.fontSize,
233
+ fontWeight: theme.vars.size.typography.desktop.small.paragraphDens.weight,
234
+ lineHeight: theme.vars.size.typography.desktop.small.paragraphDens.lineHeight,
235
+ letterSpacing: theme.vars.size.typography.desktop.small.paragraphDens.letterSpacing
236
+ },
237
+ // desktop - »small - »variant (body) 💅
238
+ ...ownerState.typographyVariant === "body" && {
239
+ fontSize: theme.vars.size.typography.desktop.small.body.fontSize,
240
+ fontWeight: theme.vars.size.typography.desktop.small.body.weight,
241
+ lineHeight: theme.vars.size.typography.desktop.small.body.lineHeight,
242
+ letterSpacing: theme.vars.size.typography.desktop.small.body.letterSpacing
243
+ },
244
+ // desktop - »small - »variant (bodyDens) 💅
245
+ ...ownerState.typographyVariant === "bodyDens" && {
246
+ fontSize: theme.vars.size.typography.desktop.small.bodyDens.fontSize,
247
+ fontWeight: theme.vars.size.typography.desktop.small.bodyDens.weight,
248
+ lineHeight: theme.vars.size.typography.desktop.small.bodyDens.lineHeight,
249
+ letterSpacing: theme.vars.size.typography.desktop.small.bodyDens.letterSpacing
250
+ }
251
+ },
252
+ // desktop - »medium - 👑 Predeterminado
253
+ ...ownerState.typographySize === "medium" && {
254
+ // desktop - medium - »variant (h1) 💅
255
+ ...ownerState.typographyVariant === "h1" && {
256
+ fontSize: theme.vars.size.typography.desktop.medium.h1.fontSize,
257
+ fontWeight: theme.vars.size.typography.desktop.medium.h1.weight,
258
+ lineHeight: theme.vars.size.typography.desktop.medium.h1.lineHeight,
259
+ letterSpacing: theme.vars.size.typography.desktop.medium.h1.letterSpacing
260
+ },
261
+ // desktop - medium - »variant (h2) 💅
262
+ ...ownerState.typographyVariant === "h2" && {
263
+ fontSize: theme.vars.size.typography.desktop.medium.h2.fontSize,
264
+ fontWeight: theme.vars.size.typography.desktop.medium.h2.weight,
265
+ lineHeight: theme.vars.size.typography.desktop.medium.h2.lineHeight,
266
+ letterSpacing: theme.vars.size.typography.desktop.medium.h2.letterSpacing
267
+ },
268
+ // desktop - medium - »variant (h3) 💅
269
+ ...ownerState.typographyVariant === "h3" && {
270
+ fontSize: theme.vars.size.typography.desktop.medium.h3.fontSize,
271
+ fontWeight: theme.vars.size.typography.desktop.medium.h3.weight,
272
+ lineHeight: theme.vars.size.typography.desktop.medium.h3.lineHeight,
273
+ letterSpacing: theme.vars.size.typography.desktop.medium.h3.letterSpacing
274
+ },
275
+ // desktop - medium - »variant(h5) 💅
276
+ ...ownerState.typographyVariant === "h5" && {
277
+ fontSize: theme.vars.size.typography.desktop.medium.h5.fontSize,
278
+ fontWeight: theme.vars.size.typography.desktop.medium.h5.weight,
279
+ lineHeight: theme.vars.size.typography.desktop.medium.h5.lineHeight,
280
+ letterSpacing: theme.vars.size.typography.desktop.medium.h5.letterSpacing
281
+ },
282
+ // desktop - medium - »variant (subtitle) 💅
283
+ ...ownerState.typographyVariant === "subtitle" && {
284
+ fontSize: theme.vars.size.typography.desktop.medium.subtitle.fontSize,
285
+ fontWeight: theme.vars.size.typography.desktop.medium.subtitle.weight,
286
+ lineHeight: theme.vars.size.typography.desktop.medium.subtitle.lineHeight,
287
+ letterSpacing: theme.vars.size.typography.desktop.medium.subtitle.letterSpacing
288
+ },
289
+ // desktop - medium - »variant (subtitleDens) 💅
290
+ ...ownerState.typographyVariant === "subtitleDens" && {
291
+ fontSize: theme.vars.size.typography.desktop.medium.subtitleDens.fontSize,
292
+ fontWeight: theme.vars.size.typography.desktop.medium.subtitleDens.weight,
293
+ lineHeight: theme.vars.size.typography.desktop.medium.subtitleDens.lineHeight,
294
+ letterSpacing: theme.vars.size.typography.desktop.medium.subtitleDens.letterSpacing
295
+ },
296
+ // desktop - medium - »variant (paragraph) 💅
297
+ ...ownerState.typographyVariant === "paragraph" && {
298
+ fontSize: theme.vars.size.typography.desktop.medium.paragraph.fontSize,
299
+ fontWeight: theme.vars.size.typography.desktop.medium.paragraph.weight,
300
+ lineHeight: theme.vars.size.typography.desktop.medium.paragraph.lineHeight,
301
+ letterSpacing: theme.vars.size.typography.desktop.medium.paragraph.letterSpacing
302
+ },
303
+ // desktop - medium - »variant (paragraphDens) 💅
304
+ ...ownerState.typographyVariant === "paragraphDens" && {
305
+ fontSize: theme.vars.size.typography.desktop.medium.paragraphDens.fontSize,
306
+ fontWeight: theme.vars.size.typography.desktop.medium.paragraphDens.weight,
307
+ lineHeight: theme.vars.size.typography.desktop.medium.paragraphDens.lineHeight,
308
+ letterSpacing: theme.vars.size.typography.desktop.medium.paragraphDens.letterSpacing
309
+ },
310
+ // desktop - medium - »variant (body) 💅
311
+ ...ownerState.typographyVariant === "body" && {
312
+ fontSize: theme.vars.size.typography.desktop.medium.body.fontSize,
313
+ fontWeight: theme.vars.size.typography.desktop.medium.body.weight,
314
+ lineHeight: theme.vars.size.typography.desktop.medium.body.lineHeight,
315
+ letterSpacing: theme.vars.size.typography.desktop.medium.body.letterSpacing
316
+ },
317
+ // desktop - medium - »variant (bodyDens) 💅
318
+ ...ownerState.typographyVariant === "bodyDens" && {
319
+ fontSize: theme.vars.size.typography.desktop.medium.bodyDens.fontSize,
320
+ fontWeight: theme.vars.size.typography.desktop.medium.bodyDens.weight,
321
+ lineHeight: theme.vars.size.typography.desktop.medium.bodyDens.lineHeight,
322
+ letterSpacing: theme.vars.size.typography.desktop.medium.bodyDens.letterSpacing
323
+ }
324
+ }
325
+ }
326
+ }
327
+ }),
328
+ skeleton: {}
329
+ };
330
+ export {
331
+ typographyStyles as t
332
+ };
@@ -3,9 +3,14 @@ import { PopupsStateWithActions, InitialPopupsStoreProps } from './types';
3
3
  * Crea el Store, por defecto inicia en estado 'init'
4
4
  * @param initProps propiedades iniciales del store
5
5
  * @returns
6
+ * @createdAt 2024-10-15 17:33:28 - automatic
6
7
  */
7
8
  /**
8
9
  * Crea el store de los popups
10
+ * @author Juan Escobar - automatic
11
+ * @updatedAt 2024-10-15 18:01:45 - automatic
12
+ * @updatedUser Juan Escobar - automatic
13
+ * @createdAt 2024-10-15 17:33:28 - automatic
9
14
  */
10
15
  export declare const createPopupsStore: (initProps: InitialPopupsStoreProps) => Omit<Omit<import('zustand').StoreApi<PopupsStateWithActions>, "setState"> & {
11
16
  setState<A extends string | {
@@ -1,7 +1,7 @@
1
1
  import { createStore } from "zustand";
2
2
  import { devtools } from "zustand/middleware";
3
3
  import { immer } from "zustand/middleware/immer";
4
- import cloneDeep from "lodash.clonedeep";
4
+ import cloneDeep from "lodash-es/cloneDeep";
5
5
  const createPopupsStore = (initProps) => {
6
6
  const startProps = {
7
7
  currentZindex: initProps.baseZindex,
@@ -17,6 +17,42 @@ const createPopupsStore = (initProps) => {
17
17
  popupsActions: {
18
18
  /**
19
19
  * TODO: Documentar
20
+ * @updatedUser Juan Escobar - automatic
21
+ * @updatedUser Juan Escobar - automatic
22
+ * @updatedUser Juan Escobar - automatic
23
+ * @updatedUser Juan Escobar - automatic
24
+ * @updatedUser Juan Escobar - automatic
25
+ * @updatedUser Juan Escobar - automatic
26
+ * @updatedUser Juan Escobar - automatic
27
+ * @updatedUser Juan Escobar - automatic
28
+ * @updatedAt 2024-10-15 18:01:45 - automatic
29
+ * @updatedAt 2024-10-15 18:01:45 - automatic
30
+ * @updatedAt 2024-10-15 18:01:45 - automatic
31
+ * @updatedAt 2024-10-15 18:01:45 - automatic
32
+ * @updatedAt 2024-10-15 18:01:45 - automatic
33
+ * @updatedAt 2024-10-15 18:01:45 - automatic
34
+ * @updatedAt 2024-10-15 18:01:45 - automatic
35
+ * @updatedAt 2024-10-15 18:01:45 - automatic
36
+ * @createdAt 2024-10-15 18:01:45 - automatic
37
+ * @createdAt 2024-10-15 18:01:45 - automatic
38
+ * @createdAt 2024-10-15 18:01:45 - automatic
39
+ * @createdAt 2024-10-15 18:01:45 - automatic
40
+ * @createdAt 2024-10-15 18:01:45 - automatic
41
+ * @createdAt 2024-10-15 18:01:45 - automatic
42
+ * @createdAt 2024-10-15 18:01:45 - automatic
43
+ * @createdAt 2024-10-15 18:01:45 - automatic
44
+ * @author Juan Escobar - automatic
45
+ * @author Juan Escobar - automatic
46
+ * @author Juan Escobar - automatic
47
+ * @author Juan Escobar - automatic
48
+ * @author Juan Escobar - automatic
49
+ * @author Juan Escobar - automatic
50
+ * @author Juan Escobar - automatic
51
+ * @author Juan Escobar - automatic
52
+ * @author Juan Escobar - automatic
53
+ * @updatedAt 2024-10-15 18:01:45 - automatic
54
+ * @updatedUser Juan Escobar - automatic
55
+ * @createdAt 2024-10-15 17:33:28 - automatic
20
56
  */
21
57
  init: (initialPopups) => {
22
58
  set((state) => {
@@ -3,9 +3,14 @@ import { RealTimeStateWithActions, InitialRealTimeStoreProps } from './types';
3
3
  * Crea el Store, por defecto inicia en estado 'init'
4
4
  * @param initProps propiedades iniciales del store
5
5
  * @returns
6
+ * @createdAt 2024-10-15 17:33:28 - automatic
6
7
  */
7
8
  /**
8
9
  * TODO: Documentar
10
+ * @author Juan Escobar - automatic
11
+ * @updatedAt 2024-10-15 18:01:45 - automatic
12
+ * @updatedUser Juan Escobar - automatic
13
+ * @createdAt 2024-10-15 17:33:28 - automatic
9
14
  */
10
15
  export declare function createRealTimeStore(initProps: InitialRealTimeStoreProps): Omit<Omit<import('zustand').StoreApi<RealTimeStateWithActions>, "setState"> & {
11
16
  setState<A extends string | {
@@ -1,8 +1,8 @@
1
1
  import { createStore } from "zustand";
2
2
  import { devtools } from "zustand/middleware";
3
3
  import { immer } from "zustand/middleware/immer";
4
- import cloneDeep from "lodash.clonedeep";
5
- import merge from "lodash.merge";
4
+ import cloneDeep from "lodash-es/cloneDeep";
5
+ import merge from "lodash-es/merge";
6
6
  function createRealTimeStore(initProps) {
7
7
  const startProps = {
8
8
  status: "init",
@@ -15,6 +15,18 @@ function createRealTimeStore(initProps) {
15
15
  realTimeActions: {
16
16
  /**
17
17
  * TODO: Documentar
18
+ * @updatedUser Juan Escobar - automatic
19
+ * @updatedUser Juan Escobar - automatic
20
+ * @updatedAt 2024-10-15 18:01:45 - automatic
21
+ * @updatedAt 2024-10-15 18:01:45 - automatic
22
+ * @createdAt 2024-10-15 18:01:45 - automatic
23
+ * @createdAt 2024-10-15 18:01:45 - automatic
24
+ * @author Juan Escobar - automatic
25
+ * @author Juan Escobar - automatic
26
+ * @author Juan Escobar - automatic
27
+ * @updatedAt 2024-10-15 18:01:45 - automatic
28
+ * @updatedUser Juan Escobar - automatic
29
+ * @createdAt 2024-10-15 17:33:28 - automatic
18
30
  */
19
31
  init: () => {
20
32
  set((state) => {
@@ -4,5 +4,9 @@ import { ContainerSize } from '../../utils/types';
4
4
  * TODO: Usar throttle para evitar llamadas innecesarias
5
5
  * @param containerElement
6
6
  * @returns un objeto con el ancho y alto del contenedor
7
+ * @author Juan Escobar - automatic
8
+ * @updatedAt 2024-10-15 17:33:28 - automatic
9
+ * @updatedUser Juan Escobar - automatic
10
+ * @createdAt 2024-10-15 17:33:28 - automatic
7
11
  */
8
12
  export declare function useSizeContainer(containerElement?: HTMLElement | undefined | null): ContainerSize | undefined;
@@ -1,6 +1,6 @@
1
1
  import { useState, useEffect } from "react";
2
2
  import { T as THROTTLE_RESIZE_TIMEOUT } from "./contants.js";
3
- import throttle from "lodash.throttle";
3
+ import throttle from "lodash-es/throttle";
4
4
  function useSizeContainer(containerElement) {
5
5
  const [currentState, setCurrentState] = useState();
6
6
  useEffect(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m4l/components",
3
- "version": "7.2.2",
3
+ "version": "8.0.0",
4
4
  "license": "UNLICENSED",
5
5
  "lint-staged": {
6
6
  "*.{js,ts,tsx}": "eslint --fix --max-warnings 0"
@@ -24,6 +24,7 @@
24
24
  "leaflet": "^1.9.4",
25
25
  "leaflet-polylinedecorator": "^1.6.0",
26
26
  "leaflet.markercluster": "^1.5.3",
27
+ "lodash-es": "^4.0.0",
27
28
  "nprogress": "^0.2.0",
28
29
  "qrcode.react": "^3.1.0",
29
30
  "qs": "^6.0.0",
@@ -36,7 +37,7 @@
36
37
  "react-dom": "^18.0.0",
37
38
  "react-draggable": "^4.4.5",
38
39
  "react-dropzone": "^14.2.2",
39
- "react-helmet-async": "^1.3.0",
40
+ "react-helmet-async": "^2.0.5",
40
41
  "react-hook-form": "^7.33.1",
41
42
  "react-intersection-observer": "^9.4.0",
42
43
  "react-leaflet": "^4.2.1",
@@ -51,40 +52,20 @@
51
52
  "zustand": "4.3.6"
52
53
  },
53
54
  "peerDependencies": {
54
- "@m4l/core": "^2.0.10",
55
+ "@m4l/core": "^2.0.12",
55
56
  "@m4l/graphics": "^7.0.2",
56
57
  "@m4l/styles": "^7.0.1",
57
58
  "@mui/lab": "5.0.0-alpha.173",
58
59
  "@mui/material": "^5.15.19",
59
- "@mui/x-date-pickers": "^6.11.1",
60
- "lodash.clonedeep": "^4.0.0",
61
- "lodash.debounce": "^4.0.0",
62
- "lodash.isstring": "^4.0.0",
63
- "lodash.merge": "^4.0.0",
64
- "lodash.throttle": "^4.0.0"
65
- },
66
- "peerDependenciesMeta": {
67
- "lodash.clonedeep": {
68
- "optional": true
69
- },
70
- "lodash.debounce": {
71
- "optional": true
72
- },
73
- "lodash.isstring": {
74
- "optional": true
75
- },
76
- "lodash.merge": {
77
- "optional": true
78
- },
79
- "lodash.throttle": {
80
- "optional": true
81
- }
60
+ "@mui/x-date-pickers": "^6.11.1"
82
61
  },
83
62
  "resolutions": {
84
63
  "react": "^18.0.0",
85
64
  "@types/react": "^18.0.0",
86
65
  "@types/react-dom": "^18.0.0",
87
66
  "react-dom": "^18.0.0",
67
+ "storybook": "^8.3.4",
68
+ "attr-accept": "2.2.2",
88
69
  "@vitejs/plugin-react": "^4.0.0"
89
70
  },
90
71
  "overrides": {
@@ -93,7 +74,8 @@
93
74
  "react": "^18.0.0",
94
75
  "@types/react": "^18.0.0",
95
76
  "@types/react-dom": "^18.0.0",
96
- "react-dom": "^18.0.0"
77
+ "react-dom": "^18.0.0",
78
+ "attr-accept": "2.2.2"
97
79
  },
98
80
  "files": [
99
81
  "*"
@@ -0,0 +1,14 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { Skeleton } from '../../../../../../../../../src/components/mui_extended/Skeleton';
3
+ /**
4
+ *
5
+ */
6
+ declare const meta: Meta<typeof Skeleton>;
7
+ export default meta;
8
+ type Story = StoryObj<typeof Skeleton>;
9
+ /**
10
+ * El componente Skeleton de Material UI en su variante circular se utiliza para mostrar un marcador de posición redondo,
11
+ * ideal para elementos con formas circulares, como avatares, iconos o imágenes de perfil, mientras se cargan los datos reales.
12
+ * Esta variante ofrece una forma circular perfecta que se adapta a componentes que tienen proporciones iguales de altura y ancho.
13
+ */
14
+ export declare const Base: Story;
@@ -0,0 +1,14 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { Skeleton } from '../../../../../../../../../src/components/mui_extended/Skeleton';
3
+ /**
4
+ *
5
+ */
6
+ declare const meta: Meta<typeof Skeleton>;
7
+ export default meta;
8
+ type Story = StoryObj<typeof Skeleton>;
9
+ /**
10
+ * El componente Skeleton de Material UI en su variante rectangular se utiliza para mostrar un marcador de posición con forma de rectángulo,
11
+ * ideal para simular la carga de elementos como contenedores, tarjetas, imágenes o cualquier contenido con proporciones rectangulares.
12
+ * Es una de las variantes más comunes para representar áreas de contenido mientras se carga la información.
13
+ */
14
+ export declare const Base: Story;
@@ -0,0 +1,15 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { Skeleton } from '../../../../../../../../../src/components/mui_extended/Skeleton';
3
+ /**
4
+ *
5
+ */
6
+ declare const meta: Meta<typeof Skeleton>;
7
+ export default meta;
8
+ type Story = StoryObj<typeof Skeleton>;
9
+ /**
10
+ * El componente Skeleton en Material UI se utiliza para mostrar un marcador de posición mientras se
11
+ * cargan los datos reales. Es ideal para mejorar la percepción de rendimiento al proporcionar una interfaz
12
+ * visible y estructurada durante la carga de contenido. La variante rounded agrega un borde suavemente redondeado al esqueleto,
13
+ * lo que lo hace más acorde con las interfaces modernas y suaves.
14
+ */
15
+ export declare const Base: Story;
@@ -0,0 +1,15 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { Skeleton } from '../../../../../../../../../src/components/mui_extended/Skeleton';
3
+ /**
4
+ *
5
+ */
6
+ declare const meta: Meta<typeof Skeleton>;
7
+ export default meta;
8
+ type Story = StoryObj<typeof Skeleton>;
9
+ /**
10
+ * El componente Skeleton de Material UI en su variante text se utiliza para simular la carga de texto,
11
+ * imitando líneas de texto o párrafos mientras los datos reales se están recuperando.
12
+ * Esta variante es ideal para mantener la estructura visual de bloques de texto, como encabezados, párrafos o listas,
13
+ * durante el tiempo de carga.
14
+ */
15
+ export declare const Base: Story;
@@ -0,0 +1,23 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { Typography } from '../../../../../../../../../../src/components/mui_extended/Typography';
3
+ /**
4
+ * La variante body en typography establece estilos predeterminados para los textos del cuerpo,
5
+ * incluyendo el tamaño de fuente, peso, espaciado de letra y márgenes, optimizados para resaltar títulos
6
+ * importantes en la interfaz. Es personalizable según los requisitos del tema para adaptarse a diferentes
7
+ * diseños y dispositivos.
8
+ */
9
+ declare const meta: Meta<typeof Typography>;
10
+ export default meta;
11
+ type Story = StoryObj<typeof Typography>;
12
+ /**
13
+ * Estado enabled del componente Typography con la variante body.
14
+ */
15
+ export declare const Base: Story;
16
+ /**
17
+ * Estado skeleton de una sola linea del componente Typography con la variante body.
18
+ */
19
+ export declare const Skeleton: Story;
20
+ /**
21
+ * Estado skeleton de varias líneas del componente Typography con la variante body.
22
+ */
23
+ export declare const skeletonRows: Story;
@@ -0,0 +1,23 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { Typography } from '../../../../../../../../../../src/components/mui_extended/Typography';
3
+ /**
4
+ * La variante bodyDens en typography establece estilos predeterminados para los textos del cuerpo densos,
5
+ * incluyendo el tamaño de fuente, peso, espaciado de letra y márgenes, optimizados para resaltar títulos
6
+ * importantes en la interfaz. Es personalizable según los requisitos del tema para adaptarse a diferentes
7
+ * diseños y dispositivos.
8
+ */
9
+ declare const meta: Meta<typeof Typography>;
10
+ export default meta;
11
+ type Story = StoryObj<typeof Typography>;
12
+ /**
13
+ * Estado enabled del componente Typography con la variante bodyDens.
14
+ */
15
+ export declare const Base: Story;
16
+ /**
17
+ * Estado skeleton de una sola linea del componente Typography con la variante bodyDens.
18
+ */
19
+ export declare const Skeleton: Story;
20
+ /**
21
+ * Estado skeleton de varias líneas del componente Typography con la variante bodyDens.
22
+ */
23
+ export declare const skeletonRows: Story;