@axzydev/axzy_ui_system 1.4.7 → 1.5.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 (226) hide show
  1. package/README.md +2 -11
  2. package/dist/index.cjs +2174 -1570
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.css +1 -1
  5. package/dist/index.css.map +1 -1
  6. package/dist/index.d.cts +232 -19
  7. package/dist/index.d.ts +232 -19
  8. package/dist/index.js +1838 -1238
  9. package/dist/index.js.map +1 -1
  10. package/dist/layered.css +1 -1
  11. package/package.json +3 -16
  12. package/src/App.tsx +90 -73
  13. package/src/components/atoms/badget/badget.tsx +23 -5
  14. package/src/components/atoms/chip/chip.tsx +3 -1
  15. package/src/components/atoms/image/image.tsx +3 -1
  16. package/src/components/atoms/input/input.tsx +8 -5
  17. package/src/components/atoms/loader/loader.tsx +3 -1
  18. package/src/components/atoms/slide/slide.props.ts +12 -0
  19. package/src/components/atoms/slide/slide.tsx +3 -0
  20. package/src/components/molecules/alert/alert.tsx +3 -1
  21. package/src/components/molecules/breadcrumbs/breadcrumbs.tsx +3 -1
  22. package/src/components/molecules/calendar/calendar.tsx +9 -6
  23. package/src/components/molecules/card/card.tsx +5 -2
  24. package/src/components/molecules/chip-input/chip-input.tsx +9 -7
  25. package/src/components/molecules/date-picker/datePicker.tsx +9 -9
  26. package/src/components/molecules/dropdown-menu/dropdown-menu.props.ts +1 -1
  27. package/src/components/molecules/dropdown-menu/dropdown-menu.tsx +6 -3
  28. package/src/components/molecules/field/field.tsx +3 -1
  29. package/src/components/molecules/form-header/form-header.tsx +3 -1
  30. package/src/components/molecules/line-bar-chart/line-bar-chart.props.ts +2 -2
  31. package/src/components/molecules/line-bar-chart/line-bar-chart.tsx +20 -15
  32. package/src/components/molecules/masked-input/masked-input.tsx +3 -1
  33. package/src/components/molecules/multi-select/multi-select.tsx +12 -9
  34. package/src/components/molecules/pagination/pagination.tsx +11 -5
  35. package/src/components/molecules/search-select/search-select.tsx +11 -9
  36. package/src/components/molecules/select/select.tsx +6 -4
  37. package/src/components/molecules/stepper/stepper.tsx +6 -4
  38. package/src/components/molecules/table/table.props.ts +10 -2
  39. package/src/components/molecules/table/table.tsx +163 -114
  40. package/src/components/molecules/time-picker/timePicker.tsx +8 -6
  41. package/src/components/molecules/wysiwyg/wysiwyg.tsx +23 -12
  42. package/src/components/organisms/confirm-dialog/confirm-dialog.props.ts +4 -4
  43. package/src/components/organisms/confirm-dialog/confirm-dialog.tsx +16 -8
  44. package/src/components/organisms/data-table/dataTable.props.ts +3 -2
  45. package/src/components/organisms/data-table/dataTable.tsx +149 -81
  46. package/src/components/organisms/dialog/dialog.tsx +3 -0
  47. package/src/components/organisms/drawer/drawer.tsx +3 -0
  48. package/src/components/organisms/dropfile/dropfile.tsx +19 -17
  49. package/src/components/organisms/form-builder/fieldRenderer.tsx +4 -2
  50. package/src/components/organisms/navbar/navbar.tsx +4 -2
  51. package/src/components/organisms/page-header/page-header.tsx +3 -1
  52. package/src/components/organisms/searchTable/components/PaginationControls.tsx +8 -6
  53. package/src/components/organisms/searchTable/components/PaginationInfo.tsx +3 -1
  54. package/src/components/organisms/searchTable/components/SearchAndSortBar.tsx +7 -5
  55. package/src/components/organisms/searchTable/components/SearchInput.tsx +4 -2
  56. package/src/components/organisms/searchTable/components/SortButton.tsx +13 -11
  57. package/src/components/organisms/searchTable/components/TableEmptyState.tsx +4 -2
  58. package/src/components/organisms/searchTable/components/TableRow.tsx +6 -4
  59. package/src/components/organisms/searchTable/searchTable.tsx +4 -2
  60. package/src/components/organisms/sidebar/sidebar.props.ts +1 -1
  61. package/src/components/organisms/sidebar/sidebar.tsx +9 -4
  62. package/src/components/organisms/toast/toast.tsx +3 -1
  63. package/src/components/organisms/topbar/topbar.tsx +4 -2
  64. package/src/components/templates/page/page.props.ts +4 -4
  65. package/src/components/templates/page/page.tsx +6 -4
  66. package/src/components/theme-provider/themeProvider.tsx +28 -17
  67. package/src/dev.css +77 -2
  68. package/src/global.d.ts +10 -0
  69. package/src/i18n/context.ts +9 -0
  70. package/src/i18n/index.ts +22 -0
  71. package/src/i18n/locales/en.ts +163 -0
  72. package/src/i18n/locales/es.ts +165 -0
  73. package/src/i18n/provider.tsx +44 -0
  74. package/src/i18n/translator.ts +82 -0
  75. package/src/i18n/types.ts +54 -0
  76. package/src/i18n/useITTranslation.ts +20 -0
  77. package/src/index.css +0 -1
  78. package/src/index.ts +9 -3
  79. package/src/sandbox/LandingShowcase.tsx +224 -580
  80. package/src/sandbox/NotFoundShowcase.tsx +51 -36
  81. package/src/sandbox/TopbarSearch.tsx +6 -4
  82. package/src/sandbox/controls.tsx +180 -0
  83. package/src/sandbox/i18n.ts +1929 -0
  84. package/src/sandbox/icons.tsx +25 -0
  85. package/src/sandbox/locale.tsx +72 -0
  86. package/src/sandbox/ui.tsx +377 -0
  87. package/src/sandbox/useHashRoute.ts +46 -10
  88. package/src/showcases/DataShowcases.tsx +201 -80
  89. package/src/showcases/FeedbackShowcases.tsx +37 -30
  90. package/src/showcases/FormShowcases.tsx +302 -214
  91. package/src/showcases/GettingStartedShowcase.tsx +151 -145
  92. package/src/showcases/HelpShowcase.tsx +126 -128
  93. package/src/showcases/HomeShowcase.tsx +678 -482
  94. package/src/showcases/LayoutPrimitivesShowcases.tsx +129 -114
  95. package/src/showcases/NavigationShowcases.tsx +45 -37
  96. package/src/showcases/PageShowcases.tsx +171 -152
  97. package/src/showcases/ProductoDetalle.tsx +272 -129
  98. package/src/showcases/ShowcaseLayout.tsx +270 -216
  99. package/src/showcases/SizesShowcase.tsx +123 -64
  100. package/src/showcases/StructureShowcases.tsx +157 -131
  101. package/src/showcases/portfolioUi.tsx +153 -0
  102. package/src/showcases/techIcons.ts +3 -0
  103. package/src/types/table.types.ts +110 -0
  104. package/src/utils/table.utils.ts +10 -2
  105. package/src/components/atoms/avatar/avatar.doc.mdx +0 -48
  106. package/src/components/atoms/avatar/avatar.stories.tsx +0 -64
  107. package/src/components/atoms/badget/badget.doc.mdx +0 -46
  108. package/src/components/atoms/badget/badget.stories.tsx +0 -75
  109. package/src/components/atoms/button/button.doc.mdx +0 -59
  110. package/src/components/atoms/button/button.stories.tsx +0 -173
  111. package/src/components/atoms/checkbox/checkbox.doc.mdx +0 -54
  112. package/src/components/atoms/checkbox/checkbox.stories.tsx +0 -53
  113. package/src/components/atoms/chip/chip.doc.mdx +0 -47
  114. package/src/components/atoms/chip/chip.stories.tsx +0 -64
  115. package/src/components/atoms/divider/divider.doc.mdx +0 -42
  116. package/src/components/atoms/divider/divider.stories.tsx +0 -33
  117. package/src/components/atoms/flex/flex.doc.mdx +0 -59
  118. package/src/components/atoms/flex/flex.stories.tsx +0 -70
  119. package/src/components/atoms/grid/grid.doc.mdx +0 -54
  120. package/src/components/atoms/grid/grid.stories.tsx +0 -71
  121. package/src/components/atoms/image/image.doc.mdx +0 -44
  122. package/src/components/atoms/image/image.stories.tsx +0 -48
  123. package/src/components/atoms/input/input.doc.mdx +0 -70
  124. package/src/components/atoms/input/input.stories.tsx +0 -113
  125. package/src/components/atoms/input-number/input-number.doc.mdx +0 -74
  126. package/src/components/atoms/input-number/input-number.stories.tsx +0 -111
  127. package/src/components/atoms/loader/loader.doc.mdx +0 -43
  128. package/src/components/atoms/loader/loader.stories.tsx +0 -104
  129. package/src/components/atoms/popover/popover.doc.mdx +0 -53
  130. package/src/components/atoms/popover/popover.stories.tsx +0 -24
  131. package/src/components/atoms/progress/progress.doc.mdx +0 -48
  132. package/src/components/atoms/progress/progress.stories.tsx +0 -39
  133. package/src/components/atoms/radio/radio.doc.mdx +0 -62
  134. package/src/components/atoms/radio/radio.stories.tsx +0 -48
  135. package/src/components/atoms/segmented-control/segmented-control.doc.mdx +0 -60
  136. package/src/components/atoms/segmented-control/segmented-control.stories.tsx +0 -62
  137. package/src/components/atoms/skeleton/skeleton.doc.mdx +0 -43
  138. package/src/components/atoms/skeleton/skeleton.stories.tsx +0 -29
  139. package/src/components/atoms/slide/slide.doc.mdx +0 -46
  140. package/src/components/atoms/slide/slide.stories.tsx +0 -120
  141. package/src/components/atoms/slider/slider.doc.mdx +0 -49
  142. package/src/components/atoms/slider/slider.stories.tsx +0 -29
  143. package/src/components/atoms/stack/stack.doc.mdx +0 -126
  144. package/src/components/atoms/stack/stack.stories.tsx +0 -283
  145. package/src/components/atoms/text/text.doc.mdx +0 -41
  146. package/src/components/atoms/text/text.stories.tsx +0 -66
  147. package/src/components/atoms/textarea/textarea.doc.mdx +0 -64
  148. package/src/components/atoms/textarea/textarea.stories.tsx +0 -26
  149. package/src/components/atoms/tooltip/tooltip.doc.mdx +0 -47
  150. package/src/components/atoms/tooltip/tooltip.stories.tsx +0 -19
  151. package/src/components/isolation/isolation.stories.tsx +0 -202
  152. package/src/components/molecules/accordion/accordion.doc.mdx +0 -47
  153. package/src/components/molecules/accordion/accordion.stories.tsx +0 -68
  154. package/src/components/molecules/alert/alert.doc.mdx +0 -48
  155. package/src/components/molecules/alert/alert.stories.tsx +0 -40
  156. package/src/components/molecules/breadcrumbs/breadcrumbs.doc.mdx +0 -57
  157. package/src/components/molecules/breadcrumbs/breadcrumbs.stories.tsx +0 -20
  158. package/src/components/molecules/calendar/calendar.doc.mdx +0 -76
  159. package/src/components/molecules/calendar/calendar.stories.tsx +0 -90
  160. package/src/components/molecules/card/card.doc.mdx +0 -54
  161. package/src/components/molecules/card/card.stories.tsx +0 -57
  162. package/src/components/molecules/chip-input/chip-input.doc.mdx +0 -44
  163. package/src/components/molecules/chip-input/chip-input.stories.tsx +0 -52
  164. package/src/components/molecules/date-picker/date-picker.doc.mdx +0 -65
  165. package/src/components/molecules/date-picker/date-picker.stories.tsx +0 -88
  166. package/src/components/molecules/dropdown-menu/dropdown-menu.doc.mdx +0 -46
  167. package/src/components/molecules/dropdown-menu/dropdown-menu.stories.tsx +0 -41
  168. package/src/components/molecules/empty-state/empty-state.doc.mdx +0 -50
  169. package/src/components/molecules/empty-state/empty-state.stories.tsx +0 -19
  170. package/src/components/molecules/field/field.doc.mdx +0 -43
  171. package/src/components/molecules/field/field.stories.tsx +0 -42
  172. package/src/components/molecules/form-header/form-header.doc.mdx +0 -38
  173. package/src/components/molecules/form-header/form-header.stories.tsx +0 -52
  174. package/src/components/molecules/masked-input/masked-input.doc.mdx +0 -78
  175. package/src/components/molecules/masked-input/masked-input.stories.tsx +0 -126
  176. package/src/components/molecules/multi-select/multi-select.doc.mdx +0 -55
  177. package/src/components/molecules/multi-select/multi-select.stories.tsx +0 -59
  178. package/src/components/molecules/pagination/pagination.doc.mdx +0 -62
  179. package/src/components/molecules/pagination/pagination.stories.tsx +0 -110
  180. package/src/components/molecules/search-select/search-select.doc.mdx +0 -77
  181. package/src/components/molecules/search-select/search-select.stories.tsx +0 -146
  182. package/src/components/molecules/select/select.doc.mdx +0 -75
  183. package/src/components/molecules/select/select.stories.tsx +0 -85
  184. package/src/components/molecules/stat-card/stat-card.doc.mdx +0 -48
  185. package/src/components/molecules/stat-card/stat-card.stories.tsx +0 -40
  186. package/src/components/molecules/stepper/stepper.doc.mdx +0 -54
  187. package/src/components/molecules/stepper/stepper.stories.tsx +0 -154
  188. package/src/components/molecules/table/table.doc.mdx +0 -123
  189. package/src/components/molecules/table/table.stories.tsx +0 -402
  190. package/src/components/molecules/tabs/tabs.doc.mdx +0 -52
  191. package/src/components/molecules/tabs/tabs.stories.tsx +0 -31
  192. package/src/components/molecules/time-picker/timePicker.doc.mdx +0 -68
  193. package/src/components/molecules/time-picker/timePicker.stories.tsx +0 -130
  194. package/src/components/molecules/wysiwyg/wysiwyg.stories.tsx +0 -95
  195. package/src/components/organisms/confirm-dialog/confirm-dialog.doc.mdx +0 -60
  196. package/src/components/organisms/confirm-dialog/confirm-dialog.stories.tsx +0 -32
  197. package/src/components/organisms/data-table/ITDataTable.doc.mdx +0 -115
  198. package/src/components/organisms/data-table/ITDataTable.stories.tsx +0 -353
  199. package/src/components/organisms/dialog/dialog.doc.mdx +0 -54
  200. package/src/components/organisms/dialog/dialog.stories.tsx +0 -126
  201. package/src/components/organisms/drawer/drawer.doc.mdx +0 -59
  202. package/src/components/organisms/drawer/drawer.stories.tsx +0 -40
  203. package/src/components/organisms/dropfile/dropfile.doc.mdx +0 -74
  204. package/src/components/organisms/dropfile/dropfile.stories.tsx +0 -93
  205. package/src/components/organisms/form-builder/formBuilder.doc.mdx +0 -251
  206. package/src/components/organisms/form-builder/formBuilder.stories.tsx +0 -914
  207. package/src/components/organisms/navbar/navbar.doc.mdx +0 -77
  208. package/src/components/organisms/navbar/navbar.stories.tsx +0 -83
  209. package/src/components/organisms/page-header/page-header.doc.mdx +0 -54
  210. package/src/components/organisms/page-header/page-header.stories.tsx +0 -74
  211. package/src/components/organisms/searchTable/searchTable.doc.mdx +0 -79
  212. package/src/components/organisms/searchTable/searchTable.stories.tsx +0 -73
  213. package/src/components/organisms/sidebar/sidebar.doc.mdx +0 -176
  214. package/src/components/organisms/sidebar/sidebar.stories.tsx +0 -234
  215. package/src/components/organisms/toast/toast.doc.mdx +0 -50
  216. package/src/components/organisms/toast/toast.stories.tsx +0 -137
  217. package/src/components/organisms/topbar/topbar.doc.mdx +0 -72
  218. package/src/components/organisms/topbar/topbar.stories.tsx +0 -79
  219. package/src/components/organisms/triple-filter/tripleFilter.doc.mdx +0 -62
  220. package/src/components/organisms/triple-filter/tripleFilter.stories.tsx +0 -31
  221. package/src/components/templates/layout/layout.doc.mdx +0 -53
  222. package/src/components/templates/layout/layout.stories.tsx +0 -113
  223. package/src/components/templates/page/page.doc.mdx +0 -86
  224. package/src/components/templates/page/page.stories.tsx +0 -97
  225. package/src/components/theme-provider/themeProvider.doc.mdx +0 -85
  226. package/src/components/theme-provider/themeProvider.stories.tsx +0 -58
@@ -0,0 +1,153 @@
1
+ /**
2
+ * Piezas propias del portafolio (`HomeShowcase` / `ProductoDetalle`).
3
+ *
4
+ * El kit base (tipografía de metadatos, superficies, CTA, etiquetas y controles
5
+ * de cabecera) vive en `src/sandbox/ui.tsx` y `src/sandbox/controls.tsx`, porque
6
+ * lo comparten el sandbox y el portafolio; aquí solo queda lo que es chrome de la
7
+ * hoja: progreso de lectura, salto al contenido y volver arriba.
8
+ *
9
+ * Vive en `src/showcases/` a propósito: es dev-only, nunca entra en `dist/`.
10
+ */
11
+
12
+ import { useEffect, useState } from "react";
13
+ import { FaArrowUp } from "react-icons/fa";
14
+ import { useITTranslation } from "@/i18n";
15
+
16
+ /**
17
+ * Se reexporta el kit compartido para que las páginas del portafolio tengan un
18
+ * único punto de importación (`./portfolioUi`).
19
+ */
20
+ export {
21
+ BotonAccion,
22
+ CARD,
23
+ CARD_HOVER,
24
+ CHIP,
25
+ EnlaceBoton,
26
+ Etiqueta,
27
+ EYEBROW,
28
+ FILETE,
29
+ SectionHeading,
30
+ VARIANTE_CTA,
31
+ } from "@/sandbox/ui";
32
+ export type {
33
+ BotonAccionProps,
34
+ EnlaceBotonProps,
35
+ EtiquetaProps,
36
+ TamanoCta,
37
+ VarianteCta,
38
+ } from "@/sandbox/ui";
39
+ export { ControlesPortafolio, ControlSegmentado } from "@/sandbox/controls";
40
+
41
+ /** Nombres antiguos del tamaño/variante de CTA, por compatibilidad. */
42
+ export type { TamanoCta as TamanoEnlace, VarianteCta as VarianteEnlace } from "@/sandbox/ui";
43
+
44
+ /**
45
+ * Línea de progreso de lectura: 2px de acento al pie de la cabecera sticky.
46
+ * Es chrome del portafolio, no un componente de la librería: `ITProgress` mide
47
+ * 4px y redondea, demasiado grueso para una regla de cabecera.
48
+ *
49
+ * @example
50
+ * ```tsx
51
+ * <header className="relative sticky top-0 …">
52
+ * <PortfolioNav />
53
+ * <BarraProgreso />
54
+ * </header>
55
+ * ```
56
+ */
57
+ export const BarraProgreso = () => {
58
+ const [pct, setPct] = useState(0);
59
+
60
+ useEffect(() => {
61
+ const onScroll = () => {
62
+ const max = document.documentElement.scrollHeight - window.innerHeight;
63
+ setPct(max > 0 ? Math.min(100, Math.max(0, (window.scrollY / max) * 100)) : 0);
64
+ };
65
+ onScroll();
66
+ window.addEventListener("scroll", onScroll, { passive: true });
67
+ window.addEventListener("resize", onScroll);
68
+ return () => {
69
+ window.removeEventListener("scroll", onScroll);
70
+ window.removeEventListener("resize", onScroll);
71
+ };
72
+ }, []);
73
+
74
+ return (
75
+ <div aria-hidden className="absolute inset-x-0 bottom-0 h-[2px] overflow-hidden">
76
+ <div
77
+ className="h-full bg-primary-700 transition-[width] duration-150 ease-out dark:bg-primary-500"
78
+ style={{ width: `${pct}%` }}
79
+ />
80
+ </div>
81
+ );
82
+ };
83
+
84
+ /** Props de `SaltarContenido`. */
85
+ export interface SaltarContenidoProps {
86
+ /** Id (con `#`) del bloque principal. @default "#contenido" */
87
+ destino?: string;
88
+ }
89
+
90
+ /**
91
+ * Enlace de salto para teclado (WCAG 2.4.1): invisible hasta que recibe foco y
92
+ * entonces aparece sobre la cabecera sticky.
93
+ *
94
+ * @example
95
+ * ```tsx
96
+ * <SaltarContenido />
97
+ * <main id="contenido">…</main>
98
+ * ```
99
+ */
100
+ export const SaltarContenido = ({ destino = "#contenido" }: SaltarContenidoProps) => {
101
+ const { t } = useITTranslation();
102
+
103
+ return (
104
+ <a
105
+ href={destino}
106
+ className="sr-only focus:not-sr-only focus:fixed focus:left-4 focus:top-4 focus:z-[300] focus:rounded-[10px] focus:bg-primary-700 focus:px-4 focus:py-2 focus:text-sm focus:font-semibold focus:text-white focus:shadow-lg"
107
+ >
108
+ {t("showcase.home.skipToContent")}
109
+ </a>
110
+ );
111
+ };
112
+
113
+ /**
114
+ * Botón flotante «volver arriba»: aparece tras desplazarse una pantalla y sube
115
+ * con scroll suave (o instantáneo si el sistema pide movimiento reducido).
116
+ * Mono y con borde de 1px, como el resto de los metadatos del portafolio.
117
+ *
118
+ * @example
119
+ * ```tsx
120
+ * <VolverArriba />
121
+ * ```
122
+ */
123
+ export const VolverArriba = () => {
124
+ const { t } = useITTranslation();
125
+ const [visible, setVisible] = useState(false);
126
+
127
+ useEffect(() => {
128
+ const onScroll = () => setVisible(window.scrollY > 560);
129
+ onScroll();
130
+ window.addEventListener("scroll", onScroll, { passive: true });
131
+ return () => window.removeEventListener("scroll", onScroll);
132
+ }, []);
133
+
134
+ const subir = () => {
135
+ const reducido = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
136
+ window.scrollTo({ top: 0, behavior: reducido ? "auto" : "smooth" });
137
+ };
138
+
139
+ return (
140
+ <button
141
+ type="button"
142
+ onClick={subir}
143
+ tabIndex={visible ? 0 : -1}
144
+ aria-hidden={visible ? undefined : true}
145
+ className={`fixed bottom-6 right-6 z-[200] inline-flex items-center gap-2 rounded-[10px] border border-slate-200 bg-white/90 px-3.5 py-2 font-mono text-[11px] font-medium uppercase tracking-[0.12em] text-slate-600 backdrop-blur-md transition-all duration-200 hover:-translate-y-0.5 hover:border-primary-400 hover:text-primary-700 dark:border-slate-800 dark:bg-slate-900/90 dark:text-slate-300 dark:hover:border-primary-500 dark:hover:text-primary-500 ${
146
+ visible ? "opacity-100" : "pointer-events-none translate-y-2 opacity-0"
147
+ }`}
148
+ >
149
+ <FaArrowUp size={11} aria-hidden />
150
+ {t("showcase.home.backToTop")}
151
+ </button>
152
+ );
153
+ };
@@ -40,6 +40,7 @@ const ICONS = {
40
40
  nodejs: { src: "/tech-icons/nodejs.svg" },
41
41
  flutter: { src: "/tech-icons/flutter.svg" },
42
42
  express: { src: "/tech-icons/express.svg", mono: true },
43
+ springboot: { src: "/tech-icons/springboot.svg" },
43
44
  electron: { src: "/tech-icons/electron.svg" },
44
45
  redux: { src: "/tech-icons/redux.svg" },
45
46
  // Markup, styles & data
@@ -48,8 +49,10 @@ const ICONS = {
48
49
  sass: { src: "/tech-icons/sass.svg" },
49
50
  mongodb: { src: "/tech-icons/mongodb.svg" },
50
51
  mysql: { src: "/tech-icons/mysql.svg" },
52
+ postgresql: { src: "/tech-icons/postgresql.svg" },
51
53
  // Mobile & platform
52
54
  android: { src: "/tech-icons/android.svg" },
55
+ appium: { src: "/tech-icons/appium.svg" },
53
56
  // Tooling & DevOps
54
57
  docker: { src: "/tech-icons/docker.svg" },
55
58
  git: { src: "/tech-icons/git.svg" },
@@ -1,5 +1,115 @@
1
+ import type { CSSProperties } from "react";
2
+
1
3
  export type TableVariants = "default" | "striped" | "bordered";
2
4
 
5
+ /**
6
+ * A single, optional style slot for one region of a table. Both fields are
7
+ * merged *after* the component's built-in values.
8
+ */
9
+ export interface TableDesignSlot {
10
+ /**
11
+ * Extra CSS classes merged after the built-in ones. Note that Tailwind
12
+ * resolves conflicts by utility order (not class order), so use inline
13
+ * `style` (or `!` modifiers) when a value must always win.
14
+ */
15
+ className?: string;
16
+ /** Inline CSS merged after the built-in values; wins over classes unless the global theme forces a value with `!important`. */
17
+ style?: CSSProperties;
18
+ }
19
+
20
+ /**
21
+ * Per-instance visual overrides for a table. Every region is optional and, when
22
+ * present, is applied on top of the built-in styles. The global
23
+ * `ITThemeProvider` colors (`--color-table-*`) still apply underneath, so use
24
+ * `TableColors` for this-instance color changes instead of `style`.
25
+ */
26
+ export interface TableDesign {
27
+ /** Outermost wrapper (`space-y-4 w-full`). Prefer `containerClassName` for width/spacing. */
28
+ container?: TableDesignSlot;
29
+ /** The rounded card surface that wraps the toolbar, table and footer (border, radius, shadow, background). */
30
+ card?: TableDesignSlot;
31
+ /** Toolbar strip holding the title and/or the Table|Cards toggle. */
32
+ toolbar?: TableDesignSlot;
33
+ /** The `<thead>` row that carries the column titles. */
34
+ header?: TableDesignSlot;
35
+ /** Every `<th>` header cell. */
36
+ headerCell?: TableDesignSlot;
37
+ /** Every body `<tr>`. */
38
+ row?: TableDesignSlot;
39
+ /** Every body `<td>`. */
40
+ cell?: TableDesignSlot;
41
+ /** Scroll wrapper of the cards view (the responsive card list). */
42
+ cards?: TableDesignSlot;
43
+ /** Pagination footer strip. */
44
+ footer?: TableDesignSlot;
45
+ }
46
+
47
+ /**
48
+ * Per-instance color overrides. They are written as local `--color-table-*`
49
+ * variables on the table wrapper, so they beat the global theme for this
50
+ * instance only, without touching `ITThemeProvider`.
51
+ */
52
+ export interface TableColors {
53
+ /** Header row background. Overrides the theme's `table.headerBg` for this instance. */
54
+ headerBg?: string;
55
+ /** Header text color. Overrides the theme's `table.headerText` for this instance. */
56
+ headerText?: string;
57
+ /** Body row background. Overrides the theme's `table.rowBg` for this instance. */
58
+ rowBg?: string;
59
+ /** Body text color. Overrides the theme's `table.rowText` for this instance. */
60
+ rowText?: string;
61
+ /** Body row hover background. Overrides the theme's `table.rowHover` for this instance. */
62
+ rowHover?: string;
63
+ }
64
+
65
+ /**
66
+ * Shared design props for ITTable and ITDataTable. `design` exposes every
67
+ * region as an object; the flat `*ClassName` / `*Style` shortcuts are merged
68
+ * after it, so the flat prop wins when both are provided.
69
+ */
70
+ export interface TableDesignProps {
71
+ /** Whether to render the Table|Cards view switcher in the toolbar. Hiding it still honors `defaultView` and `autoCardBreakpoint`. @default true */
72
+ showViewToggle?: boolean;
73
+ /** Per-region visual overrides (classes + inline styles). */
74
+ design?: TableDesign;
75
+ /** Per-instance color overrides for header and rows, beating the global theme. */
76
+ colors?: TableColors;
77
+ /** Inline styles for the outermost wrapper. */
78
+ containerStyle?: CSSProperties;
79
+ /** Extra classes for the card surface (the rounded container). */
80
+ cardClassName?: string;
81
+ /** Inline styles for the card surface. */
82
+ cardStyle?: CSSProperties;
83
+ /** Extra classes for the toolbar strip (title + view toggle). */
84
+ toolbarClassName?: string;
85
+ /** Inline styles for the toolbar strip. */
86
+ toolbarStyle?: CSSProperties;
87
+ /** Extra classes for the header row. */
88
+ headerClassName?: string;
89
+ /** Inline styles for the header row. */
90
+ headerStyle?: CSSProperties;
91
+ /** Extra classes for every header cell. */
92
+ headerCellClassName?: string;
93
+ /** Inline styles for every header cell. */
94
+ headerCellStyle?: CSSProperties;
95
+ /** Extra classes for every body row. */
96
+ rowClassName?: string;
97
+ /** Inline styles for every body row. */
98
+ rowStyle?: CSSProperties;
99
+ /** Extra classes for every body cell. */
100
+ cellClassName?: string;
101
+ /** Inline styles for every body cell. */
102
+ cellStyle?: CSSProperties;
103
+ /** Extra classes for the cards-view scroll wrapper. */
104
+ cardsClassName?: string;
105
+ /** Inline styles for the cards-view scroll wrapper. */
106
+ cardsStyle?: CSSProperties;
107
+ /** Extra classes for the pagination footer strip. */
108
+ footerClassName?: string;
109
+ /** Inline styles for the pagination footer strip. */
110
+ footerStyle?: CSSProperties;
111
+ }
112
+
3
113
  /**
4
114
  * Value stored for a single column filter.
5
115
  *
@@ -1,5 +1,13 @@
1
- export const formatCurrencyMX = (value: number) => {
2
- return value.toLocaleString("es-MX", {
1
+ /**
2
+ * Formatea un número como moneda MXN.
3
+ *
4
+ * @param value - Importe a formatear.
5
+ * @param locale - Locale BCP-47 para `Intl.NumberFormat`. Por defecto `"es-MX"`
6
+ * para mantener el comportamiento histórico; los componentes pasan la locale
7
+ * activa del provider (`toIntlLocale(locale)`).
8
+ */
9
+ export const formatCurrencyMX = (value: number, locale: string = "es-MX") => {
10
+ return value.toLocaleString(locale, {
3
11
  style: "currency",
4
12
  currency: "MXN",
5
13
  });
@@ -1,48 +0,0 @@
1
- import { Meta, Title, Description, Primary, Controls, Stories } from '@storybook/blocks';
2
- import * as StoriesData from './avatar.stories';
3
-
4
- <Meta of={StoriesData} />
5
-
6
- # ITAvatar
7
-
8
- Circular avatar component for displaying user profile pictures, initials, or generic placeholder content. Falls back to displaying initials when the image fails to load or is not provided. Supports five sizes and an optional badge overlay for status indicators.
9
-
10
- ## Props
11
-
12
- | Prop | Type | Default | Description |
13
- |------|------|---------|-------------|
14
- | `src` | `string` | — | Image source URL for the avatar. |
15
- | `alt` | `string` | — | Alt text for the image. Also used as fallback initial when no `initials` or `src` is provided. |
16
- | `initials` | `string` | — | Initials to display when no image is available (max 2 characters recommended). |
17
- | `size` | `"xs" \| "sm" \| "md" \| "lg" \| "xl"` | `"md"` | Avatar dimensions. |
18
- | `color` | `string` | `"bg-primary-500"` | Background color class for the initials fallback. |
19
- | `className` | `string` | — | Additional CSS class names for the avatar container. |
20
- | `badge` | `ReactNode` | — | React node rendered as a badge overlay at the bottom-right corner. |
21
- | `onClick` | `() => void` | — | Click handler. When provided, the avatar becomes interactive (`role="button"`). |
22
-
23
- ## Usage
24
-
25
- ```tsx
26
- import { ITAvatar } from '@axzydev/axzy_ui_system';
27
-
28
- <ITAvatar src="https://i.pravatar.cc/150" alt="User" size="md" />
29
-
30
- <ITAvatar initials="JD" size="lg" badge={<FaCircle className="text-emerald-500" />} />
31
- ```
32
-
33
- ## Variants / Notes
34
-
35
- - **xs** — Extra small (ideal for inline lists or compact UIs).
36
- - **sm** — Small (useful in table rows or sidebars).
37
- - **md** — Medium, the default size suitable for most use cases.
38
- - **lg** — Large (prominent display or profile pages).
39
- - **xl** — Extra large (hero sections or standalone profile views).
40
- - Shows initials text fallback when `src` is missing or the image fails (`onError`).
41
- - Badge slot positioned at bottom-right using absolute positioning.
42
- - Becomes interactive with click handler and hover cursor when `onClick` is provided.
43
-
44
- ## Stories
45
-
46
- <Primary />
47
- <Controls />
48
- <Stories />
@@ -1,64 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import ITAvatar from "@/components/atoms/avatar/avatar";
3
- import { FaCircle } from "react-icons/fa";
4
-
5
- const meta: Meta<typeof ITAvatar> = {
6
- title: "Components/Data Display/ITAvatar",
7
- component: ITAvatar,
8
- };
9
-
10
- export default meta;
11
- type Story = StoryObj<typeof ITAvatar>;
12
-
13
- export const WithImage: Story = {
14
- args: {
15
- src: "https://i.pravatar.cc/150?u=test",
16
- alt: "User",
17
- size: "md",
18
- },
19
- };
20
-
21
- export const WithInitials: Story = {
22
- args: {
23
- initials: "JD",
24
- size: "md",
25
- color: "bg-primary-500",
26
- },
27
- };
28
-
29
- export const WithBadge: Story = {
30
- args: {
31
- initials: "AG",
32
- size: "lg",
33
- badge: <FaCircle className="text-emerald-500 text-[10px]" />,
34
- },
35
- };
36
-
37
- export const Sizes: Story = {
38
- render: () => (
39
- <div className="flex items-end gap-4">
40
- {(["xs", "sm", "md", "lg", "xl"] as const).map((s) => (
41
- <ITAvatar key={s} initials="A" size={s} />
42
- ))}
43
- </div>
44
- ),
45
- };
46
-
47
- export const WithRawColor: Story = {
48
- name: "Con color calculado en runtime",
49
- parameters: {
50
- docs: {
51
- description: {
52
- story:
53
- "Cuando el color se calcula dinámicamente (por ejemplo, un hash por usuario o etiqueta), pasa un valor de color real en vez de una clase de Tailwind. Una clase de Tailwind arbitraria solo se ve si ya existe en el CSS pre-compilado de esta librería; un color inline siempre se aplica.",
54
- },
55
- },
56
- },
57
- render: () => (
58
- <div className="flex items-center gap-4">
59
- {["#3b82f6", "#a855f7", "#059669", "#f59e0b", "#ec4899"].map((hex) => (
60
- <ITAvatar key={hex} initials="JD" size="md" color={hex} />
61
- ))}
62
- </div>
63
- ),
64
- };
@@ -1,46 +0,0 @@
1
- import { Meta, Title, Description, Primary, Controls, Stories } from '@storybook/blocks';
2
- import * as StoriesData from './badget.stories';
3
-
4
- <Meta of={StoriesData} />
5
-
6
- # ITBadget
7
-
8
- Small status tags and labels for highlighting metadata, categories, or states. Offers filled and outlined visual variants across all semantic color themes. Accepts either a simple label string or custom React children for complex content.
9
-
10
- ## Props
11
-
12
- | Prop | Type | Default | Description |
13
- |------|------|---------|-------------|
14
- | `label` | `string` | — | Text label displayed inside the badge. Overridden if `children` is provided. |
15
- | `children` | `ReactNode` | — | Custom content rendered inside the badge. Takes precedence over `label`. |
16
- | `color` | `ColorsTypes` | `"primary"` | Color theme key (`"primary"`, `"secondary"`, `"success"`, `"danger"`, `"warning"`, `"purple"`, `"info"`). |
17
- | `size` | `SizesTypes` | `"md"` | Badge size (`"sm"`, `"md"`, `"lg"`). |
18
- | `variant` | `"filled" \| "outlined"` | `"filled"` | Visual style — solid background or transparent with colored border. |
19
- | `className` | `string` | — | Additional CSS class names for the badge element. |
20
-
21
- ## Usage
22
-
23
- ```tsx
24
- import { ITBadget } from '@axzydev/axzy_ui_system';
25
-
26
- <ITBadget label="Active" color="success" variant="filled" />
27
-
28
- <ITBadget color="danger" variant="outlined" size="sm">
29
- <span className="flex items-center gap-1">3 new</span>
30
- </ITBadget>
31
- ```
32
-
33
- ## Variants / Notes
34
-
35
- - **filled** — Solid background with contrasting text (default for most theme colors).
36
- - **outlined** — Transparent background with a colored border and darker text.
37
- - Colors include `primary`, `secondary`, `success`, `danger`, `warning`, `purple`, and `info`.
38
- - Border radius defaults to fully rounded (`borderRadius: 9999px`), giving a pill shape.
39
- - Styles are fully theme-driven via the centralized theme configuration.
40
- - Custom children override the `label` prop entirely.
41
-
42
- ## Stories
43
-
44
- <Primary />
45
- <Controls />
46
- <Stories />
@@ -1,75 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import ITBadget from '@/components/atoms/badget/badget';
3
-
4
- const meta = {
5
- title: 'Components/Data Display/ITBadge',
6
- component: ITBadget,
7
- parameters: {
8
- layout: 'centered',
9
- },
10
- argTypes: {
11
- color: {
12
- control: 'select',
13
- options: ['primary', 'secondary', 'success', 'danger', 'warning', 'purple', 'info'],
14
- },
15
- variant: {
16
- control: 'select',
17
- options: ['filled', 'outlined'],
18
- },
19
- size: {
20
- control: 'select',
21
- options: ['small', 'medium', 'large'],
22
- },
23
- },
24
- } satisfies Meta<typeof ITBadget>;
25
-
26
- export default meta;
27
- type Story = StoryObj<typeof meta>;
28
-
29
- // 1. Filled (Default)
30
- export const Filled: Story = {
31
- args: {
32
- label: 'Filled Badge',
33
- color: 'primary',
34
- variant: 'filled',
35
- },
36
- };
37
-
38
- // 2. Outlined
39
- export const Outlined: Story = {
40
- args: {
41
- label: 'Outlined Badge',
42
- color: 'primary',
43
- variant: 'outlined',
44
- },
45
- };
46
-
47
- // 3. All Combinations (Matrix)
48
- export const AllCombinations: Story = {
49
- render: (args) => {
50
- const colors = ['primary', 'secondary', 'success', 'danger', 'warning', 'purple', 'info'];
51
- const variants = ['filled', 'outlined'];
52
-
53
- return (
54
- <div className="flex flex-col gap-8">
55
- {variants.map((variant) => (
56
- <div key={variant} className="flex flex-col gap-2">
57
- <h3 className="text-sm font-bold uppercase text-gray-400">{variant}</h3>
58
- <div className="flex flex-wrap gap-4 items-center">
59
- {colors.map((color) => (
60
- <ITBadget
61
- key={`${variant}-${color}`}
62
- {...args}
63
- color={color as any}
64
- variant={variant as any}
65
- label={color.charAt(0).toUpperCase() + color.slice(1)}
66
- />
67
- ))}
68
- </div>
69
- </div>
70
- ))}
71
- </div>
72
- );
73
- },
74
- args: {},
75
- };
@@ -1,59 +0,0 @@
1
- import { Meta, Title, Description, Primary, Controls, Stories } from '@storybook/blocks';
2
- import * as StoriesData from './button.stories';
3
-
4
- <Meta of={StoriesData} />
5
-
6
- # ITButton
7
-
8
- The primary action component for triggering user interactions. Supports 8 distinct visual variants, 7 semantic color themes, and 3 sizes. Can render with an icon alongside a label, as an icon-only control, as a text link, or with custom children for flexible content.
9
-
10
- ## Props
11
-
12
- | Prop | Type | Default | Description |
13
- |------|------|---------|-------------|
14
- | `label` | `string` | — | Button text label. Overridden if `children` is provided. |
15
- | `children` | `ReactNode` | — | Custom content rendered inside the button. Takes precedence over `label`. |
16
- | `icon` | `ReactNode` | — | Icon element rendered before the label. |
17
- | `onClick` | `() => void` | — | Click handler for the button. |
18
- | `color` | `ColorsTypes` | `"primary"` | Color theme key (`"primary"`, `"secondary"`, `"success"`, `"danger"`, `"warning"`, `"purple"`, `"info"`). |
19
- | `size` | `SizesTypes` | `"md"` | Button size (`"sm"`, `"md"`, `"lg"`). |
20
- | `variant` | `"filled" \| "outlined" \| "raised" \| "rounded" \| "text" \| "raised-text" \| "icon-only" \| "link"` | `"filled"` | Visual style variant. |
21
- | `disabled` | `boolean` | `false` | Disables interaction and applies reduced opacity. |
22
- | `className` | `string` | — | Additional CSS class names for the button element. |
23
- | `type` | `"submit" \| "reset" \| "button"` | `"button"` | HTML button type attribute. |
24
- | `ariaLabel` | `string` | — | Accessible label for screen readers. Falls back to `label`. |
25
- | `title` | `string` | — | HTML title attribute for native tooltip. |
26
-
27
- ## Usage
28
-
29
- ```tsx
30
- import { ITButton } from '@axzydev/axzy_ui_system';
31
-
32
- <ITButton label="Guardar" color="primary" variant="filled" />
33
-
34
- <ITButton label="Descargar" color="success" variant="outlined" icon={<FaDownload />} />
35
-
36
- <ITButton color="danger" variant="icon-only" ariaLabel="Eliminar">
37
- <FaTrash />
38
- </ITButton>
39
- ```
40
-
41
- ## Variants / Notes
42
-
43
- - **filled** — Solid background with shadow, the default and most prominent variant.
44
- - **outlined** — Transparent background with a colored border.
45
- - **raised** — Solid background with a pronounced box shadow for depth.
46
- - **rounded** — Like filled but with fully rounded (`rounded-full`) corners.
47
- - **text** — Minimal transparent background with hover highlight, suitable for toolbars.
48
- - **raised-text** — White background with subtle border and shadow, elevated appearance.
49
- - **icon-only** — Square aspect ratio with centered icon, no text label.
50
- - **link** — Renders as an inline text link with underline on hover.
51
- - Seven color themes: `primary`, `secondary`, `success`, `danger`, `warning`, `purple`, `info`.
52
- - When `disabled`, the button becomes non-interactive with reduced opacity.
53
- - Set `type="submit"` for form submission behavior.
54
-
55
- ## Stories
56
-
57
- <Primary />
58
- <Controls />
59
- <Stories />