@councilbox/councilbox-ui 2.0.59 → 2.0.61

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 (107) hide show
  1. package/SafeHtml.js +3 -0
  2. package/dist/HOCs/overlayA11yStack.js +1 -1
  3. package/dist/HOCs/useDynamicStyles.js +39 -4
  4. package/dist/build-index.js +14 -0
  5. package/dist/components/Accordion/Accordion.css +7 -1
  6. package/dist/components/Accordion/Accordion.js +2 -2
  7. package/dist/components/Button/Button.js +79 -87
  8. package/dist/components/Button/button.css +171 -16
  9. package/dist/components/DatePicker/Calendar.js +3 -5
  10. package/dist/components/DatePicker/DatePicker.css +1 -1
  11. package/dist/components/DateRangePicker/RangeCalendar.js +2 -4
  12. package/dist/components/IconButton/IconButton.js +1 -1
  13. package/dist/components/Modal/Modal.js +13 -3
  14. package/dist/components/RichTextInput/RichTextInput.js +28 -7
  15. package/dist/components/SafeHtml/SafeHtml.js +82 -0
  16. package/dist/components/SelectInput/SelectInput.js +1 -0
  17. package/dist/components/Stepper/Stepper.css +6 -1
  18. package/dist/components/Tabs/Tabs.js +1 -0
  19. package/dist/components/TextInput/TextInput.css +164 -1
  20. package/dist/components/TextInput/TextInput.js +171 -167
  21. package/dist/components/ThemeProvider/Colors.js +1 -1
  22. package/dist/components/ThemeProvider/ThemeProvider.js +1 -7
  23. package/dist/components/Toast/toastStore.js +1 -0
  24. package/dist/styles/colorConsts.css +1 -1
  25. package/dist/styles/stylesheet.js +2 -50
  26. package/dist/testing/TestAutocomplete.js +1 -105
  27. package/dist/utils/sanitizeHtml.js +199 -0
  28. package/package.json +17 -31
  29. package/dist/__snapshots__/storybook.test.js.snap +0 -104
  30. package/dist/components/1.Introduction.stories.mdx +0 -579
  31. package/dist/components/2.Changelog.stories.mdx +0 -1392
  32. package/dist/components/3.Guide.stories.mdx +0 -589
  33. package/dist/components/Accordion/Accordion.stories.js +0 -95
  34. package/dist/components/Accordion/DesignAccordion.stories.js +0 -27
  35. package/dist/components/Alert/Alert.stories.js +0 -101
  36. package/dist/components/Avatar/Avatar.stories.js +0 -159
  37. package/dist/components/Avatar/DesignAvatar.stories.js +0 -64
  38. package/dist/components/Avatar/DesignAvatarText.stories.js +0 -123
  39. package/dist/components/AvatarGroup/AvatarGroup.stories.js +0 -72
  40. package/dist/components/AvatarGroup/DesignAvatarGroup.stories.js +0 -118
  41. package/dist/components/Block/Block.stories.js +0 -66
  42. package/dist/components/Block/DesignBlock.stories.js +0 -35
  43. package/dist/components/Button/Button.stories.js +0 -98
  44. package/dist/components/ButtonBasic/ButtonBasic.stories.js +0 -161
  45. package/dist/components/Checkbox/Checkbox.stories.js +0 -110
  46. package/dist/components/DatePicker/DatePicker.stories.js +0 -180
  47. package/dist/components/DateRangePicker/DateRangePicker.stories.js +0 -147
  48. package/dist/components/DateTimePicker/DateTimePicker.stories.js +0 -144
  49. package/dist/components/DragDrop/DragDrop.stories.js +0 -155
  50. package/dist/components/DrawerPanel/DrawerPanel.stories.js +0 -277
  51. package/dist/components/DropDown/DesignDropDown.stories.js +0 -216
  52. package/dist/components/DropDown/DropDown.stories.js +0 -240
  53. package/dist/components/EnhancedTable/DesignEnhancedTable.stories.js +0 -128
  54. package/dist/components/EnhancedTable/EnhancedTable.stories.js +0 -259
  55. package/dist/components/FabButton/DesignFabButton.stories.js +0 -40
  56. package/dist/components/FabButton/FabButton.stories.js +0 -147
  57. package/dist/components/Grid/DesignGrid.stories.js +0 -45
  58. package/dist/components/Grid/Grid.stories.js +0 -211
  59. package/dist/components/Header/DesignHeader.stories.js +0 -65
  60. package/dist/components/Header/Header.stories.js +0 -674
  61. package/dist/components/IconButton/DesignIconButton.stories.js +0 -113
  62. package/dist/components/IconButton/IconButton.stories.js +0 -205
  63. package/dist/components/IconButtonSquare/DesignIconButtonSquare.stories.js +0 -21
  64. package/dist/components/IconButtonSquare/IconButtonSquare.stories.js +0 -209
  65. package/dist/components/InputAutocomplete/InputAutocomplete.stories.js +0 -433
  66. package/dist/components/InputPassword/InputPassword.stories.js +0 -185
  67. package/dist/components/InputText/InputText.stories.js +0 -261
  68. package/dist/components/InputTextArea/DesignInputTextArea.stories.js +0 -116
  69. package/dist/components/InputTextArea/InputTextArea.stories.js +0 -146
  70. package/dist/components/LoadingSection/LoadingSection.stories.js +0 -84
  71. package/dist/components/MenuItem/DesignMenuItem.stories.js +0 -54
  72. package/dist/components/MenuItem/MenuItem.stories.js +0 -138
  73. package/dist/components/MenuLateralLeft/MenuLateralLeft.stories.js +0 -243
  74. package/dist/components/MenuLateralRight/MenuLateralRight.stories.js +0 -228
  75. package/dist/components/Modal/DesignModal.stories.js +0 -39
  76. package/dist/components/Modal/Modal.stories.js +0 -229
  77. package/dist/components/PaginationFooter/DesignPaginationFooter.stories.js +0 -22
  78. package/dist/components/PaginationFooter/PaginationFooter.stories.js +0 -191
  79. package/dist/components/RadioButton/Radio.stories.js +0 -157
  80. package/dist/components/RichTextInput/DesignRichTextInput.stories.js +0 -119
  81. package/dist/components/RichTextInput/RichTextInput.stories.js +0 -38
  82. package/dist/components/Ripple/Ripple.stories.js +0 -107
  83. package/dist/components/Scrollbar/Scrollbar.stories.js +0 -42
  84. package/dist/components/ScrollbarOld/ScrollbarOld.stories.js +0 -140
  85. package/dist/components/SelectInput/SelectInput.stories.js +0 -212
  86. package/dist/components/Slider/Slider.stories.js +0 -128
  87. package/dist/components/Spacing/Spacing.stories.js +0 -37
  88. package/dist/components/Stars/Stars.stories.js +0 -138
  89. package/dist/components/Stepper/DesignStepper.stories.js +0 -130
  90. package/dist/components/Stepper/Stepper.stories.js +0 -131
  91. package/dist/components/Table/DesignTable.stories.js +0 -614
  92. package/dist/components/Table/Table.stories.js +0 -215
  93. package/dist/components/Tabs/Tabs.stories.js +0 -163
  94. package/dist/components/Tag/DesignTags.stories.js +0 -81
  95. package/dist/components/Tag/Tag.stories.js +0 -148
  96. package/dist/components/TextInput/TextInput.stories.js +0 -148
  97. package/dist/components/TimePicker/TimePicker.stories.js +0 -132
  98. package/dist/components/Timeline/DesignTimeline.stories.js +0 -19
  99. package/dist/components/Timeline/Timeline.stories.js +0 -128
  100. package/dist/components/Toast/DesignToast.stories.js +0 -174
  101. package/dist/components/Toast/Toast.stories.js +0 -39
  102. package/dist/components/Toggle/Toggle.stories.js +0 -118
  103. package/dist/components/Tooltip/DesignTooltip.stories.js +0 -45
  104. package/dist/components/Tooltip/Tooltip.stories.js +0 -135
  105. package/dist/components/Typography/Typography.stories.js +0 -114
  106. package/dist/reportWebVitals.js +0 -28
  107. package/dist/storybook.test.js +0 -5
@@ -1,579 +0,0 @@
1
- import { Meta, Source } from '@storybook/addon-docs';
2
- import LinkTo from '@storybook/addon-links/react';
3
- import pkg from '../../package.json';
4
- import cbxLogoInv from '../assets/img/cbxLogoInv.svg';
5
-
6
- <Meta title="Inicio/Introducción" parameters={{ previewTabs: { canvas: { hidden: true } }, viewMode: 'docs' }} />
7
-
8
- <style>{`
9
- #docs-root {
10
- overflow-x: auto;
11
- height: 100%;
12
- }
13
- .sbdocs-wrapper {
14
- padding: 0 !important;
15
- }
16
- .sbdocs-content {
17
- max-width: 1120px !important;
18
- }
19
- .cbx-intro {
20
- font-family: var(--font-primary), 'Lato', sans-serif;
21
- color: var(--gray5);
22
- padding: 0 2rem 4rem;
23
- }
24
- .cbx-intro h2, .cbx-intro h3 {
25
- font-family: var(--font-secondary), 'Montserrat', sans-serif;
26
- border: 0 !important;
27
- margin: 0;
28
- padding: 0;
29
- }
30
- .cbx-intro-hero {
31
- position: relative;
32
- overflow: hidden;
33
- margin: 0 -2rem 3rem;
34
- padding: 3.5rem 2rem 3rem;
35
- background: linear-gradient(135deg, var(--primary) 0%, #26276a 60%, #1b1c4f 100%);
36
- color: var(--white);
37
- }
38
- .cbx-intro-hero::after {
39
- content: '';
40
- position: absolute;
41
- right: -6rem;
42
- top: -6rem;
43
- width: 22rem;
44
- height: 22rem;
45
- border-radius: 50%;
46
- background: radial-gradient(circle, rgba(107, 234, 242, 0.35) 0%, rgba(107, 234, 242, 0) 70%);
47
- pointer-events: none;
48
- }
49
- .cbx-intro-hero-logo {
50
- height: 2rem;
51
- margin-bottom: 2rem;
52
- display: block;
53
- }
54
- .cbx-intro-hero h1 {
55
- font-family: var(--font-secondary), 'Montserrat', sans-serif;
56
- font-size: 2.5rem;
57
- line-height: 1.2;
58
- font-weight: 700;
59
- margin: 0 0 0.75rem;
60
- color: var(--white);
61
- border: 0;
62
- }
63
- .cbx-intro-hero h1 span {
64
- display: block;
65
- font-size: inherit !important;
66
- line-height: inherit !important;
67
- color: var(--accent);
68
- }
69
- .cbx-intro-hero p {
70
- font-size: 1.125rem;
71
- line-height: 1.6;
72
- max-width: 40rem;
73
- margin: 0 0 1.5rem;
74
- color: rgba(255, 255, 255, 0.85);
75
- }
76
- .cbx-intro-badges {
77
- display: flex;
78
- flex-wrap: wrap;
79
- gap: 0.5rem;
80
- margin-bottom: 2rem;
81
- }
82
- .cbx-intro-badge {
83
- display: inline-flex;
84
- align-items: center;
85
- gap: 0.375rem;
86
- padding: 0.25rem 0.75rem;
87
- border-radius: 999px;
88
- font-size: 0.8125rem;
89
- font-weight: 700;
90
- background: rgba(255, 255, 255, 0.12);
91
- border: 1px solid rgba(255, 255, 255, 0.25);
92
- color: var(--white);
93
- }
94
- .cbx-intro-badge-accent {
95
- background: var(--accent);
96
- border-color: var(--accent);
97
- color: var(--primary);
98
- }
99
- .cbx-intro-actions {
100
- display: flex;
101
- flex-wrap: wrap;
102
- gap: 0.75rem;
103
- }
104
- .cbx-intro-action {
105
- font-family: inherit;
106
- cursor: pointer;
107
- border: 0;
108
- display: inline-flex;
109
- align-items: center;
110
- gap: 0.5rem;
111
- padding: 0.625rem 1.25rem;
112
- border-radius: 4px;
113
- font-weight: 700;
114
- font-size: 0.9375rem;
115
- text-decoration: none !important;
116
- transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
117
- }
118
- .cbx-intro-action:focus-visible {
119
- outline: 3px solid var(--accent);
120
- outline-offset: 2px;
121
- }
122
- .cbx-intro-action-primary {
123
- background: var(--accent);
124
- color: var(--primary) !important;
125
- }
126
- .cbx-intro-action-primary:hover {
127
- transform: translateY(-1px);
128
- box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
129
- }
130
- .cbx-intro-action-secondary {
131
- background: transparent;
132
- color: var(--white) !important;
133
- border: 1px solid rgba(255, 255, 255, 0.5);
134
- }
135
- .cbx-intro-action-secondary:hover {
136
- background: rgba(255, 255, 255, 0.1);
137
- }
138
- .cbx-intro-stats {
139
- display: grid;
140
- grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
141
- gap: 1rem;
142
- margin-bottom: 3.5rem;
143
- }
144
- .cbx-intro-stat {
145
- padding: 1.25rem;
146
- border-radius: 8px;
147
- background: var(--primary10);
148
- }
149
- .cbx-intro-stat strong {
150
- display: block;
151
- font-family: var(--font-secondary), 'Montserrat', sans-serif;
152
- font-size: 1.75rem;
153
- color: var(--primary);
154
- line-height: 1.2;
155
- }
156
- .cbx-intro-stat span {
157
- font-size: 0.875rem;
158
- color: var(--gray4);
159
- }
160
- .cbx-intro-section {
161
- margin-bottom: 3.5rem;
162
- }
163
- .cbx-intro-section-header {
164
- display: flex;
165
- align-items: baseline;
166
- justify-content: space-between;
167
- gap: 1rem;
168
- margin-bottom: 1.25rem;
169
- padding-bottom: 0.75rem;
170
- border-bottom: 2px solid var(--primary10);
171
- }
172
- .cbx-intro-section-header h2 {
173
- font-size: 1.5rem !important;
174
- color: var(--primary);
175
- }
176
- .cbx-intro-section-header p {
177
- margin: 0;
178
- color: var(--gray4);
179
- font-size: 0.9375rem;
180
- }
181
- .cbx-intro-steps {
182
- display: flex;
183
- flex-direction: column;
184
- gap: 1.25rem;
185
- }
186
- .cbx-intro-step {
187
- display: grid;
188
- grid-template-columns: 17rem minmax(0, 1fr);
189
- gap: 1.5rem;
190
- align-items: center;
191
- padding: 1.25rem;
192
- border-radius: 8px;
193
- border: 1px solid var(--gray1);
194
- }
195
- .cbx-intro-step .docblock-source {
196
- margin: 0 !important;
197
- }
198
- @media (max-width: 800px) {
199
- .cbx-intro-step {
200
- grid-template-columns: 1fr;
201
- }
202
- }
203
- .cbx-intro-step h3 {
204
- display: flex;
205
- align-items: center;
206
- gap: 0.5rem;
207
- font-size: 1rem !important;
208
- color: var(--gray5);
209
- margin-bottom: 0.5rem !important;
210
- }
211
- .cbx-intro-step-number {
212
- display: inline-flex;
213
- align-items: center;
214
- justify-content: center;
215
- width: 1.5rem;
216
- height: 1.5rem;
217
- border-radius: 50%;
218
- background: var(--primary);
219
- color: var(--white);
220
- font-size: 0.8125rem;
221
- }
222
- .cbx-intro-step p {
223
- margin: 0 0 0.75rem;
224
- font-size: 0.9375rem;
225
- color: var(--gray4);
226
- }
227
- .cbx-intro-principles {
228
- display: grid;
229
- grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
230
- gap: 1rem;
231
- }
232
- .cbx-intro-principle {
233
- padding: 1.5rem;
234
- border-radius: 8px;
235
- border: 1px solid var(--gray1);
236
- background: var(--white);
237
- }
238
- .cbx-intro-principle i {
239
- display: inline-flex;
240
- align-items: center;
241
- justify-content: center;
242
- width: 2.5rem;
243
- height: 2.5rem;
244
- border-radius: 8px;
245
- background: var(--accent25);
246
- color: var(--primary);
247
- font-size: 1.25rem;
248
- margin-bottom: 1rem;
249
- }
250
- .cbx-intro-principle h3 {
251
- font-size: 1rem !important;
252
- margin-bottom: 0.375rem !important;
253
- color: var(--gray5);
254
- }
255
- .cbx-intro-principle p {
256
- margin: 0;
257
- font-size: 0.875rem;
258
- line-height: 1.5;
259
- color: var(--gray4);
260
- }
261
- .cbx-intro-category {
262
- margin-bottom: 2rem;
263
- }
264
- .cbx-intro-category h3 {
265
- display: flex;
266
- align-items: center;
267
- gap: 0.5rem;
268
- font-size: 0.8125rem !important;
269
- text-transform: uppercase;
270
- letter-spacing: 0.06em;
271
- color: var(--gray4);
272
- margin-bottom: 0.875rem !important;
273
- }
274
- .cbx-intro-category h3 i {
275
- color: var(--primary);
276
- font-size: 1rem;
277
- }
278
- .cbx-intro-category h3 span {
279
- font-weight: 400;
280
- color: var(--gray3);
281
- }
282
- .cbx-intro-grid {
283
- display: grid;
284
- grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
285
- gap: 0.75rem;
286
- }
287
- .cbx-intro-card {
288
- display: flex;
289
- align-items: flex-start;
290
- gap: 0.875rem;
291
- padding: 1rem;
292
- border-radius: 8px;
293
- border: 1px solid var(--gray1);
294
- background: var(--white);
295
- text-decoration: none !important;
296
- color: inherit !important;
297
- transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
298
- }
299
- .cbx-intro-card:hover {
300
- border-color: var(--primary50);
301
- box-shadow: 0 4px 14px rgba(56, 57, 140, 0.12);
302
- transform: translateY(-1px);
303
- }
304
- .cbx-intro-card:focus-visible {
305
- outline: 3px solid var(--primary);
306
- outline-offset: 2px;
307
- }
308
- .cbx-intro-card-icon {
309
- flex-shrink: 0;
310
- display: inline-flex;
311
- align-items: center;
312
- justify-content: center;
313
- width: 2.25rem;
314
- height: 2.25rem;
315
- border-radius: 6px;
316
- background: var(--primary10);
317
- color: var(--primary);
318
- font-size: 1.125rem;
319
- }
320
- .cbx-intro-card strong {
321
- display: block;
322
- font-size: 0.9375rem;
323
- color: var(--gray5);
324
- margin-bottom: 0.125rem;
325
- }
326
- .cbx-intro-card span {
327
- display: block;
328
- font-size: 0.8125rem;
329
- line-height: 1.4;
330
- color: var(--gray4);
331
- }
332
- .cbx-intro-footer {
333
- display: grid;
334
- grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
335
- gap: 1rem;
336
- }
337
- .cbx-intro-footer-card {
338
- display: flex;
339
- align-items: center;
340
- gap: 1rem;
341
- padding: 1.5rem;
342
- border-radius: 8px;
343
- background: var(--primary);
344
- color: var(--white) !important;
345
- text-decoration: none !important;
346
- transition: background 0.15s;
347
- }
348
- .cbx-intro-footer-card:hover {
349
- background: #2d2e75;
350
- }
351
- .cbx-intro-footer-card:focus-visible {
352
- outline: 3px solid var(--accent);
353
- outline-offset: 2px;
354
- }
355
- .cbx-intro-footer-card i {
356
- font-size: 1.75rem;
357
- color: var(--accent);
358
- }
359
- .cbx-intro-footer-card strong {
360
- display: block;
361
- font-size: 1rem;
362
- }
363
- .cbx-intro-footer-card span {
364
- font-size: 0.875rem;
365
- color: rgba(255, 255, 255, 0.8);
366
- }
367
- `}</style>
368
-
369
- export const CATEGORIES = [
370
- {
371
- name: 'Botones y acciones',
372
- icon: 'ri-cursor-line',
373
- items: [
374
- { name: 'ButtonBasic', kind: 'Components/ButtonBasic', story: 'Default', icon: 'ri-checkbox-blank-line', description: 'Botón principal con variantes, iconos y estados de carga.' },
375
- { name: 'Button', kind: 'Components/Button', story: 'Default', icon: 'ri-arrow-right-circle-line', description: 'Botón con variantes de color y flecha animada.' },
376
- { name: 'IconButton', kind: 'Components/IconButton', story: 'Playground', icon: 'ri-pencil-line', description: 'Botón de solo icono con tooltip, badge y progreso.' },
377
- { name: 'IconButtonSquare', kind: 'Components/IconButtonSquare', story: 'Playground', icon: 'ri-checkbox-blank-fill', description: 'Variante cuadrada de IconButton.' },
378
- { name: 'FabButton', kind: 'Components/FabButton', story: 'Playground', icon: 'ri-add-circle-line', description: 'Botón flotante con menú de acciones.' },
379
- { name: 'DropDown', kind: 'Components/DropDown', story: 'Playground', icon: 'ri-arrow-down-s-line', description: 'Menú desplegable con navegación por teclado.' },
380
- { name: 'MenuItem', kind: 'Components/MenuItem', story: 'Default', icon: 'ri-list-check', description: 'Opción de menú con icono, badge y submenú.' },
381
- { name: 'Ripple', kind: 'Components/Ripple', story: 'Playground', icon: 'ri-focus-3-line', description: 'Efecto de onda al pulsar (hook useRipple).' },
382
- ],
383
- },
384
- {
385
- name: 'Formularios',
386
- icon: 'ri-input-method-line',
387
- items: [
388
- { name: 'InputText', kind: 'Components/InputText', story: 'Default', icon: 'ri-text', description: 'Campo de texto con etiqueta, ayuda, error y adornos.' },
389
- { name: 'TextInput', kind: 'Components/TextInput', story: 'Default', icon: 'ri-edit-line', description: 'Campo de texto simple con subrayado.' },
390
- { name: 'InputPassword', kind: 'Components/Input Password', story: 'Default', icon: 'ri-lock-password-line', description: 'Contraseña con mostrar/ocultar y barra de seguridad.' },
391
- { name: 'InputTextArea', kind: 'Components/InputTextArea', story: 'Playground', icon: 'ri-file-text-line', description: 'Texto multilínea con contador de caracteres.' },
392
- { name: 'InputAutocomplete', kind: 'Components/Input Autocomplete', story: 'Default', icon: 'ri-search-line', description: 'Campo con sugerencias, selección simple o múltiple.' },
393
- { name: 'SelectInput', kind: 'Components/SelectInput', story: 'Default', icon: 'ri-list-unordered', description: 'Desplegable para elegir una o varias opciones.' },
394
- { name: 'RichTextInput', kind: 'Components/RichTextInput', story: 'Design Rich Text Input Template', icon: 'ri-text-wrap', description: 'Editor de texto enriquecido sin dependencias.' },
395
- { name: 'Checkbox', kind: 'Components/Checkbox', story: 'Default', icon: 'ri-checkbox-line', description: 'Casilla de verificación con estado indeterminado.' },
396
- { name: 'Radio', kind: 'Components/Radio', story: 'Default', icon: 'ri-radio-button-line', description: 'Opción única dentro de un grupo.' },
397
- { name: 'Toggle', kind: 'Components/Toggle', story: 'Default', icon: 'ri-toggle-line', description: 'Interruptor de activado / desactivado.' },
398
- { name: 'Slider', kind: 'Components/Slider', story: 'Playground', icon: 'ri-equalizer-line', description: 'Selección de un valor dentro de un rango.' },
399
- { name: 'Stars', kind: 'Components/Stars', story: 'Playground', icon: 'ri-star-line', description: 'Valoración por estrellas.' },
400
- { name: 'DragDrop', kind: 'Components/DragDrop', story: 'Default', icon: 'ri-upload-cloud-2-line', description: 'Zona para subir archivos arrastrando o con clic.' },
401
- ],
402
- },
403
- {
404
- name: 'Fechas y horas',
405
- icon: 'ri-calendar-line',
406
- items: [
407
- { name: 'DatePicker', kind: 'Components/DatePicker', story: 'Default', icon: 'ri-calendar-2-line', description: 'Selector de fecha localizado con Intl.' },
408
- { name: 'DateRangePicker', kind: 'Components/DateRangePicker', story: 'Default', icon: 'ri-calendar-todo-line', description: 'Selector de rango de fechas.' },
409
- { name: 'DateTimePicker', kind: 'Components/DateTimePicker', story: 'Default', icon: 'ri-calendar-event-line', description: 'Selector de fecha y hora.' },
410
- { name: 'TimePicker', kind: 'Components/TimePicker', story: 'Default', icon: 'ri-time-line', description: 'Selector de hora en 12h o 24h.' },
411
- ],
412
- },
413
- {
414
- name: 'Feedback y superposiciones',
415
- icon: 'ri-notification-3-line',
416
- items: [
417
- { name: 'Modal', kind: 'Components/Modal', story: 'Default', icon: 'ri-window-line', description: 'Diálogo con gestión de foco y fondo inerte.' },
418
- { name: 'DrawerPanel', kind: 'Components/DrawerPanel', story: 'Playground', icon: 'ri-layout-right-line', description: 'Panel lateral con pestañas y acciones.' },
419
- { name: 'Toast', kind: 'Components/Toast', story: 'Design Toast Template', icon: 'ri-chat-check-line', description: 'Notificaciones temporales sin provider.' },
420
- { name: 'Alert', kind: 'Components/Alert', story: 'Default', icon: 'ri-information-line', description: 'Mensaje de información, éxito o error.' },
421
- { name: 'Tooltip', kind: 'Components/Tooltip', story: 'Playground', icon: 'ri-chat-1-line', description: 'Texto de ayuda al pasar el ratón o enfocar.' },
422
- { name: 'LoadingSection', kind: 'Components/LoadingSection', story: 'Default', icon: 'ri-loader-4-line', description: 'Indicador de carga circular.' },
423
- ],
424
- },
425
- {
426
- name: 'Navegación',
427
- icon: 'ri-compass-3-line',
428
- items: [
429
- { name: 'Header', kind: 'Components/Header', story: 'Header All Buttons', icon: 'ri-layout-top-line', description: 'Cabecera de la aplicación con logo y menús.' },
430
- { name: 'MenuLateralLeft', kind: 'Components/MenuLateralLeft', story: 'Playground', icon: 'ri-layout-left-line', description: 'Navegación principal lateral.' },
431
- { name: 'MenuLateralRight', kind: 'Components/MenuLateralRight', story: 'Playground', icon: 'ri-layout-right-2-line', description: 'Menú de acciones lateral derecho.' },
432
- { name: 'Tabs', kind: 'Components/Tabs', story: 'Playground', icon: 'ri-folders-line', description: 'Pestañas con navegación por flechas.' },
433
- { name: 'Stepper', kind: 'Components/Stepper', story: 'Playground', icon: 'ri-git-commit-line', description: 'Pasos de un proceso o asistente.' },
434
- { name: 'Accordion', kind: 'Components/Accordion', story: 'Default', icon: 'ri-arrow-up-down-line', description: 'Sección desplegable.' },
435
- { name: 'PaginationFooter', kind: 'Components/PaginationFooter', story: 'Playground', icon: 'ri-pages-line', description: 'Paginación de tablas y listados.' },
436
- ],
437
- },
438
- {
439
- name: 'Datos y visualización',
440
- icon: 'ri-table-line',
441
- items: [
442
- { name: 'Table', kind: 'Components/Table', story: 'Playground', icon: 'ri-table-2', description: 'Tabla nativa con ordenación y filas clicables.' },
443
- { name: 'EnhancedTable', kind: 'Components/EnhancedTable', story: 'Playground', icon: 'ri-database-2-line', description: 'Tabla con ordenación, paginación y carga.' },
444
- { name: 'Avatar', kind: 'Components/Avatar', story: 'Default', icon: 'ri-user-3-line', description: 'Imagen o iniciales de una persona.' },
445
- { name: 'AvatarGroup', kind: 'Components/AvatarGroup', story: 'Playground', icon: 'ri-group-line', description: 'Grupo de avatares solapados.' },
446
- { name: 'Tag', kind: 'Components/Tag', story: 'Playground', icon: 'ri-price-tag-3-line', description: 'Etiqueta de estado, categoría o filtro.' },
447
- { name: 'Timeline', kind: 'Components/Timeline', story: 'Playground', icon: 'ri-time-line', description: 'Línea de tiempo vertical.' },
448
- { name: 'Typography', kind: 'Components/Typography', story: 'Default', icon: 'ri-font-size', description: 'Escala tipográfica y encabezados.' },
449
- ],
450
- },
451
- {
452
- name: 'Estructura y estilos',
453
- icon: 'ri-layout-grid-line',
454
- items: [
455
- { name: 'Grid', kind: 'Components/Grid', story: 'Playground', icon: 'ri-layout-grid-line', description: 'Rejilla responsive de 12 columnas.' },
456
- { name: 'Block', kind: 'Components/Block', story: 'Playground', icon: 'ri-layout-masonry-line', description: 'Contenedor con variantes de fondo.' },
457
- { name: 'Scrollbar', kind: 'Components/Scrollbar', story: 'Design Scrollbar Template', icon: 'ri-arrow-up-down-fill', description: 'Scroll con barra personalizada.' },
458
- { name: 'Spacing', kind: 'Components/Spacing', story: 'Default', icon: 'ri-space', description: 'Escala de espaciados de la librería.' },
459
- { name: 'IconFont', kind: 'Fonts/IconFont', story: 'Default', icon: 'ri-remixicon-line', description: 'Catálogo de iconos disponibles.' },
460
- ],
461
- },
462
- ];
463
-
464
- export const TOTAL_COMPONENTS = CATEGORIES.reduce((total, category) => total + category.items.length, 0);
465
-
466
- export const PRINCIPLES = [
467
- { icon: 'ri-eye-line', title: 'Accesible por defecto', text: 'Roles ARIA, gestión del foco y navegación por teclado según WCAG 2.1 AA. useA11yGuard avisa de los nombres accesibles que faltan.' },
468
- { icon: 'ri-plug-line', title: 'Sin dependencias de UI', text: 'Componentes propios, sin MUI ni librerías externas de interfaz: control total sobre el comportamiento y el peso.' },
469
- { icon: 'ri-palette-line', title: 'Theming', text: 'Colores, tipografías y espaciados como variables CSS, personalizables por cliente con ThemeProvider.' },
470
- { icon: 'ri-stack-line', title: 'Consistente', text: 'Mismos tokens, estados y patrones en todas las aplicaciones de Councilbox.' },
471
- ];
472
-
473
- export const ComponentCard = ({ item }) => (
474
- <LinkTo kind={item.kind} story={item.story} className="cbx-intro-card">
475
- <i className={`cbx-intro-card-icon ${item.icon}`} aria-hidden="true" />
476
- <div>
477
- <strong>{item.name}</strong>
478
- <span>{item.description}</span>
479
- </div>
480
- </LinkTo>
481
- );
482
-
483
- <div className="cbx-intro">
484
- <header className="cbx-intro-hero">
485
- <img className="cbx-intro-hero-logo" src={cbxLogoInv} alt="Councilbox" />
486
- <h1>Librería de componentes <span>Councilbox UI</span></h1>
487
- <p>Componentes React accesibles, consistentes y personalizables para construir todas las aplicaciones de Councilbox con la misma experiencia.</p>
488
- <div className="cbx-intro-badges">
489
- <span className="cbx-intro-badge cbx-intro-badge-accent"><i className="ri-price-tag-3-line" aria-hidden="true" />v{pkg.version}</span>
490
- <span className="cbx-intro-badge"><i className="ri-reactjs-line" aria-hidden="true" />React</span>
491
- <span className="cbx-intro-badge"><i className="ri-eye-line" aria-hidden="true" />WCAG 2.1 AA</span>
492
- <span className="cbx-intro-badge"><i className="ri-plug-line" aria-hidden="true" />Sin dependencias de UI</span>
493
- </div>
494
- <nav className="cbx-intro-actions" aria-label="Accesos rápidos">
495
- <button type="button" className="cbx-intro-action cbx-intro-action-primary" onClick={() => document.getElementById('componentes').scrollIntoView({ behavior: 'smooth' })}><i className="ri-apps-2-line" aria-hidden="true" />Ver componentes</button>
496
- <LinkTo kind="Inicio/Guía de uso" story="Page" className="cbx-intro-action cbx-intro-action-secondary"><i className="ri-book-open-line" aria-hidden="true" />Guía de uso</LinkTo>
497
- <LinkTo kind="Inicio/Changelog" story="Page" className="cbx-intro-action cbx-intro-action-secondary"><i className="ri-history-line" aria-hidden="true" />Changelog</LinkTo>
498
- </nav>
499
- </header>
500
- <div className="cbx-intro-stats">
501
- <div className="cbx-intro-stat"><strong>{TOTAL_COMPONENTS}</strong><span>componentes</span></div>
502
- <div className="cbx-intro-stat"><strong>{CATEGORIES.length}</strong><span>categorías</span></div>
503
- <div className="cbx-intro-stat"><strong>AA</strong><span>nivel WCAG 2.1</span></div>
504
- <div className="cbx-intro-stat"><strong>v{pkg.version}</strong><span>versión actual</span></div>
505
- </div>
506
- <section className="cbx-intro-section" aria-labelledby="intro-start">
507
- <div className="cbx-intro-section-header">
508
- <h2 id="intro-start">Empezar</h2>
509
- <p>Tres pasos para usar la librería en una aplicación.</p>
510
- </div>
511
- <div className="cbx-intro-steps">
512
- <div className="cbx-intro-step">
513
- <div>
514
- <h3><span className="cbx-intro-step-number">1</span>Instalar</h3>
515
- <p>Añade el paquete al proyecto.</p>
516
- </div>
517
- <Source language="bash" dark code="yarn add @councilbox/councilbox-ui" />
518
- </div>
519
- <div className="cbx-intro-step">
520
- <div>
521
- <h3><span className="cbx-intro-step-number">2</span>Envolver la aplicación</h3>
522
- <p>ThemeProvider aplica los colores de la marca y las opciones de accesibilidad.</p>
523
- </div>
524
- <Source language="jsx" dark code={`import ThemeProvider from '@councilbox/councilbox-ui/ThemeProvider';\n\n<ThemeProvider colors={{ primary: '#38398C' }}>\n\t<App />\n</ThemeProvider>`} />
525
- </div>
526
- <div className="cbx-intro-step">
527
- <div>
528
- <h3><span className="cbx-intro-step-number">3</span>Usar los componentes</h3>
529
- <p>Importa cada componente por separado para cargar solo lo necesario.</p>
530
- </div>
531
- <Source language="jsx" dark code={`import ButtonBasic from '@councilbox/councilbox-ui/ButtonBasic';\n\n<ButtonBasic text="Guardar" onClick={save} />`} />
532
- </div>
533
- </div>
534
- </section>
535
- <section className="cbx-intro-section" aria-labelledby="intro-principles">
536
- <div className="cbx-intro-section-header">
537
- <h2 id="intro-principles">Principios</h2>
538
- <p>Lo que guía el diseño de cada componente.</p>
539
- </div>
540
- <div className="cbx-intro-principles">
541
- {PRINCIPLES.map(principle => (
542
- <div className="cbx-intro-principle" key={principle.title}>
543
- <i className={principle.icon} aria-hidden="true" />
544
- <h3>{principle.title}</h3>
545
- <p>{principle.text}</p>
546
- </div>
547
- ))}
548
- </div>
549
- </section>
550
- <section className="cbx-intro-section" id="componentes" aria-labelledby="intro-components">
551
- <div className="cbx-intro-section-header">
552
- <h2 id="intro-components">Componentes</h2>
553
- <p>{TOTAL_COMPONENTS} componentes organizados por uso. Pulsa en cualquiera para ver su documentación.</p>
554
- </div>
555
- {CATEGORIES.map(category => (
556
- <div className="cbx-intro-category" key={category.name}>
557
- <h3><i className={category.icon} aria-hidden="true" />{category.name}<span>· {category.items.length}</span></h3>
558
- <div className="cbx-intro-grid">
559
- {category.items.map(item => <ComponentCard item={item} key={item.name} />)}
560
- </div>
561
- </div>
562
- ))}
563
- </section>
564
- <section className="cbx-intro-section" aria-labelledby="intro-more">
565
- <div className="cbx-intro-section-header">
566
- <h2 id="intro-more">Más recursos</h2>
567
- </div>
568
- <div className="cbx-intro-footer">
569
- <LinkTo kind="Inicio/Guía de uso" story="Page" className="cbx-intro-footer-card">
570
- <i className="ri-book-open-line" aria-hidden="true" />
571
- <div><strong>Guía de uso</strong><span>Colores, tipografía y buenas prácticas.</span></div>
572
- </LinkTo>
573
- <LinkTo kind="Inicio/Changelog" story="Page" className="cbx-intro-footer-card">
574
- <i className="ri-history-line" aria-hidden="true" />
575
- <div><strong>Changelog</strong><span>Novedades y correcciones de cada versión.</span></div>
576
- </LinkTo>
577
- </div>
578
- </section>
579
- </div>