@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
@@ -1,26 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import { useState } from "react";
3
- import ITTextarea from "@/components/atoms/textarea/textarea";
4
-
5
- const meta: Meta<typeof ITTextarea> = {
6
- title: "Components/Inputs/ITTextarea",
7
- component: ITTextarea,
8
- };
9
-
10
- export default meta;
11
- type Story = StoryObj<typeof ITTextarea>;
12
-
13
- export const Default: Story = {
14
- render: () => {
15
- const [val, setVal] = useState("");
16
- return <ITTextarea value={val} onChange={setVal} label="Descripción" placeholder="Escribe aquí..." />;
17
- },
18
- };
19
-
20
- export const WithError: Story = {
21
- args: { label: "Comentarios", value: "Mal", error: "Debe tener al menos 10 caracteres" },
22
- };
23
-
24
- export const Disabled: Story = {
25
- args: { label: "Bloqueado", value: "No editable", disabled: true },
26
- };
@@ -1,47 +0,0 @@
1
- import { Meta, Title, Description, Primary, Controls, Stories } from '@storybook/blocks';
2
- import * as StoriesData from './tooltip.stories';
3
-
4
- <Meta of={StoriesData} />
5
-
6
- # ITTooltip
7
-
8
- Hover and focus tooltip that wraps a trigger element and displays contextual information in a small popup. Supports four placement positions with a triangular arrow pointing toward the trigger, configurable show delay, and customizable max-width.
9
-
10
- ## Props
11
-
12
- | Prop | Type | Default | Description |
13
- |------|------|---------|-------------|
14
- | `content` | `ReactNode` | — | The tooltip content to display on hover/focus. Accepts text or any ReactNode. |
15
- | `children` | `ReactNode` | — | The trigger element that reveals the tooltip on interaction. |
16
- | `position` | `"top" \| "bottom" \| "left" \| "right"` | `"top"` | Placement relative to children. |
17
- | `delay` | `number` | `200` | Delay in milliseconds before the tooltip becomes visible. |
18
- | `className` | `string` | — | Additional CSS classes applied to the wrapper element. |
19
-
20
- ## Usage
21
-
22
- ```tsx
23
- import { ITTooltip } from '@axzydev/axzy_ui_system';
24
-
25
- <ITTooltip content="Click to save" position="bottom">
26
- <button>Save</button>
27
- </ITTooltip>
28
-
29
- <ITTooltip content={<span>Delete this item?</span>} position="top" delay={500}>
30
- <IconButton icon={TrashIcon} />
31
- </ITTooltip>
32
- ```
33
-
34
- ## Notes
35
-
36
- - The tooltip appears after a **delay** (default 200ms) once the mouse enters the trigger, and disappears immediately on mouse leave.
37
- - **position** controls both the popup placement and the arrow direction: `top` (tooltip above, arrow pointing down), `bottom` (below, arrow up), `left` (to the left, arrow right), `right` (to the right, arrow left).
38
- - An optional triangular **arrow** is always rendered, styled with CSS borders pointing toward the trigger.
39
- - Tooltip body uses dark slate (`slate-800`) background with white text and rounded corners.
40
- - The wrapper is `inline-flex` by default, so it only takes as much width as the trigger — add `className` to constrain max-width on the tooltip content.
41
- - Supports keyboard focus: the tooltip also appears when the trigger element receives focus.
42
-
43
- ## Stories
44
-
45
- <Primary />
46
- <Controls />
47
- <Stories />
@@ -1,19 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import ITTooltip from "@/components/atoms/tooltip/tooltip";
3
- import ITButton from "@/components/atoms/button/button";
4
-
5
- const meta: Meta<typeof ITTooltip> = {
6
- title: "Components/Overlay/ITTooltip",
7
- component: ITTooltip,
8
- };
9
-
10
- export default meta;
11
- type Story = StoryObj<typeof ITTooltip>;
12
-
13
- export const Top: Story = {
14
- args: { content: "Tooltip arriba", position: "top", children: <ITButton label="Hover me" /> },
15
- };
16
-
17
- export const Bottom: Story = {
18
- args: { content: "Tooltip abajo", position: "bottom", children: <ITButton label="Hover me" /> },
19
- };
@@ -1,202 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import { useState } from "react";
3
- import ITCard from "@/components/molecules/card/card";
4
- import ITDatePicker from "@/components/molecules/date-picker/datePicker";
5
- import ITInput from "@/components/atoms/input/input";
6
- import ITTextarea from "@/components/atoms/textarea/textarea";
7
- import ITSelect from "@/components/molecules/select/select";
8
- import ITButton from "@/components/atoms/button/button";
9
- import ITTable from "@/components/molecules/table/table";
10
- import ITDialog from "@/components/organisms/dialog/dialog";
11
- import ITText from "@/components/atoms/text/text";
12
-
13
- /**
14
- * Stories de validación de AISLAMIENTO CSS.
15
- *
16
- * Verifican que anidar componentes (p.ej. ITDatePicker dentro de ITCard) no
17
- * produzca interferencia de estilos entre padre e hijo. La arquitectura
18
- * garantiza esto porque cada componente estila SOLO su propio subárbol con
19
- * clases/utilities propias, nunca con selectores de ancestro genéricos.
20
- */
21
- const meta = {
22
- title: "Isolation/CSS Encapsulation",
23
- parameters: {
24
- layout: "padded",
25
- docs: {
26
- description: {
27
- component:
28
- "Validación de aislamiento: un componente hijo (ITDatePicker) dentro de un contenedor (ITCard) no debe heredar ni colisionar estilos del padre, y viceversa.",
29
- },
30
- },
31
- },
32
- } satisfies Meta;
33
-
34
- export default meta;
35
- type Story = StoryObj;
36
-
37
- const DatePickerWrapper = () => {
38
- const [date, setDate] = useState<Date>(new Date());
39
- return (
40
- <ITDatePicker
41
- name="inside-card-date"
42
- label="Fecha"
43
- value={date}
44
- onChange={(e: any) => setDate(e.target.value)}
45
- />
46
- );
47
- };
48
-
49
- const InputWrapper = () => {
50
- const [value, setValue] = useState("");
51
- return (
52
- <ITInput
53
- name="name"
54
- label="Nombre"
55
- placeholder="Escribe tu nombre"
56
- value={value}
57
- onChange={(e: any) => setValue(e.target.value)}
58
- />
59
- );
60
- };
61
-
62
- const TextareaWrapper = () => {
63
- const [value, setValue] = useState("");
64
- return (
65
- <ITTextarea
66
- name="notes"
67
- label="Notas"
68
- placeholder="Detalles..."
69
- value={value}
70
- onChange={(e: any) => setValue(e.target.value)}
71
- />
72
- );
73
- };
74
-
75
- const SelectWrapper = () => {
76
- const [value, setValue] = useState("");
77
- return (
78
- <ITSelect
79
- name="country"
80
- label="País"
81
- placeholder="Selecciona"
82
- value={value}
83
- options={[
84
- { value: "mx", label: "México" },
85
- { value: "us", label: "Estados Unidos" },
86
- { value: "es", label: "España" },
87
- ]}
88
- onChange={(e: any) => setValue(e.target.value)}
89
- />
90
- );
91
- };
92
-
93
- export const ITDatePickerInsideCard: Story = {
94
- render: () => (
95
- <div className="grid grid-cols-1 md:grid-cols-2 gap-6">
96
- <ITCard title="Card A">
97
- <p className="mb-4 text-secondary-600">
98
- Un ITDatePicker dentro de un ITCard. Sus estilos son independientes:
99
- el popover del calendario, el input y el label no se ven afectados por
100
- la tipografía/color del card.
101
- </p>
102
- <DatePickerWrapper />
103
- </ITCard>
104
- <ITCard title="Card B" onClick={() => {}}>
105
- <p className="mb-4 text-secondary-600">
106
- Card interactivo (hover). El date picker hermano debe seguir
107
- comportándose igual, sin contaminación visual entre ambos cards.
108
- </p>
109
- <DatePickerWrapper />
110
- </ITCard>
111
- </div>
112
- ),
113
- };
114
-
115
- export const FormControlsInsideCard: Story = {
116
- render: () => (
117
- <ITCard title="Formulario en Card">
118
- <div className="grid grid-cols-1 md:grid-cols-2 gap-4">
119
- <InputWrapper />
120
- <SelectWrapper />
121
- <DatePickerWrapper />
122
- <TextareaWrapper />
123
- </div>
124
- <div className="mt-4 flex justify-end gap-2">
125
- <ITButton variant="outlined" color="secondary" label="Cancelar" />
126
- <ITButton variant="filled" color="primary" label="Guardar" />
127
- </div>
128
- </ITCard>
129
- ),
130
- };
131
-
132
- export const ITDialogInsideCard: Story = {
133
- render: () => {
134
- const [open, setOpen] = useState(false);
135
- return (
136
- <ITCard title="Card con Diálogo">
137
- <p className="mb-4 text-secondary-600">
138
- Un ITDialog (fixed overlay) lanzado desde un ITCard. El overlay y su
139
- contenido usan su propio stacking context y estilos.
140
- </p>
141
- <ITButton
142
- variant="filled"
143
- color="primary"
144
- label="Abrir diálogo"
145
- onClick={() => setOpen(true)}
146
- />
147
- <ITDialog
148
- isOpen={open}
149
- onClose={() => setOpen(false)}
150
- title="Diálogo desde Card"
151
- >
152
- <p className="text-secondary-700">
153
- Contenido del diálogo. Estilos propios, sin interferencia del card.
154
- </p>
155
- <div className="mt-4 flex justify-end">
156
- <ITButton
157
- variant="outlined"
158
- color="secondary"
159
- label="Cerrar"
160
- onClick={() => setOpen(false)}
161
- />
162
- </div>
163
- </ITDialog>
164
- </ITCard>
165
- );
166
- },
167
- };
168
-
169
- export const ITTableInsideCard: Story = {
170
- render: () => (
171
- <ITCard title="Tabla en Card">
172
- <ITTable
173
- data={[
174
- { id: 1, name: "Juan Pérez", city: "CDMX" },
175
- { id: 2, name: "Ana García", city: "Guadalajara" },
176
- { id: 3, name: "Luis Martínez", city: "Monterrey" },
177
- ]}
178
- columns={[
179
- { key: "id", label: "ID", type: "number" },
180
- { key: "name", label: "Nombre", type: "string" },
181
- { key: "city", label: "Ciudad", type: "string" },
182
- ]}
183
- />
184
- <ITText as="p" className="mt-3 text-sm text-secondary-500">
185
- La tabla ocupa todo el ancho del card y conserva su propio estilo.
186
- </ITText>
187
- </ITCard>
188
- ),
189
- };
190
-
191
- export const NestedCards: Story = {
192
- render: () => (
193
- <ITCard title="Card externo">
194
- <p className="mb-4 text-secondary-600">
195
- Cards anidados: el interno (interactivo) no altera el externo.
196
- </p>
197
- <ITCard title="Card interno" onClick={() => {}}>
198
- <DatePickerWrapper />
199
- </ITCard>
200
- </ITCard>
201
- ),
202
- };
@@ -1,47 +0,0 @@
1
- import { Meta, Title, Description, Primary, Controls, Stories } from '@storybook/blocks';
2
- import * as StoriesData from './accordion.stories';
3
-
4
- <Meta of={StoriesData} />
5
-
6
- # ITAccordion
7
-
8
- Collapsible sections for FAQs, settings panels, and long content.
9
-
10
- ## Props
11
-
12
- | Prop | Type | Default | Description |
13
- |------|------|---------|-------------|
14
- | `items` | `ITAccordionItem[]` | — | Sections to render: `{ id, title, content, icon?, disabled? }`. |
15
- | `allowMultiple` | `boolean` | `false` | Allows several sections open at once. |
16
- | `defaultOpenIds` | `string[]` | `[]` | Open ids on first render (uncontrolled). |
17
- | `openIds` | `string[]` | — | Controlled open ids. |
18
- | `onChange` | `(openIds: string[]) => void` | — | Fired with the next open ids. |
19
- | `variant` | `"default" \| "separated" \| "bordered"` | `"separated"` | Visual style. |
20
- | `className` | `string` | — | Extra CSS classes for the wrapper. |
21
- | `itemClassName` | `string` | — | Extra CSS classes per item. |
22
-
23
- ## Usage
24
-
25
- ```tsx
26
- import { ITAccordion } from '@axzydev/axzy_ui_system';
27
-
28
- <ITAccordion
29
- items={[
30
- { id: "a", title: "¿Qué es AXZY?", content: "Un sistema de componentes." },
31
- { id: "b", title: "¿Cómo instalo?", content: "pnpm add @axzydev/axzy_ui_system" },
32
- ]}
33
- defaultOpenIds={["a"]}
34
- />
35
- ```
36
-
37
- ## Notes
38
-
39
- - Controlled via `openIds` + `onChange`; uncontrolled via `defaultOpenIds`.
40
- - Single-open by default; pass `allowMultiple` to open several.
41
- - Header buttons expose `aria-expanded` / `aria-controls`; the body is a labelled `region`.
42
-
43
- ## Stories
44
-
45
- <Primary />
46
- <Controls />
47
- <Stories />
@@ -1,68 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import ITAccordion from "@/components/molecules/accordion/accordion";
3
- import ITBadget from "@/components/atoms/badget/badget";
4
-
5
- const meta: Meta<typeof ITAccordion> = {
6
- title: "Components/Structure/ITAccordion",
7
- component: ITAccordion,
8
- parameters: { layout: "centered" },
9
- };
10
-
11
- export default meta;
12
- type Story = StoryObj<typeof ITAccordion>;
13
-
14
- const items = [
15
- {
16
- id: "what",
17
- title: "¿Qué es AXZY UI System?",
18
- content: "Una librería de componentes React + TypeScript con Tailwind CSS v4.",
19
- },
20
- {
21
- id: "install",
22
- title: "¿Cómo lo instalo?",
23
- content: "pnpm add @axzydev/axzy_ui_system",
24
- },
25
- {
26
- id: "theme",
27
- title: "¿Puedo personalizar el tema?",
28
- content: "Sí, usa ITThemeProvider para definir la paleta y tokens.",
29
- },
30
- ];
31
-
32
- export const Default: Story = {
33
- render: () => (
34
- <div className="w-[520px]">
35
- <ITAccordion items={items} defaultOpenIds={["what"]} />
36
- </div>
37
- ),
38
- };
39
-
40
- export const AllowMultiple: Story = {
41
- render: () => (
42
- <div className="w-[520px]">
43
- <ITAccordion items={items} allowMultiple defaultOpenIds={["what", "install"]} />
44
- </div>
45
- ),
46
- };
47
-
48
- export const Bordered: Story = {
49
- render: () => (
50
- <div className="w-[520px]">
51
- <ITAccordion items={items} variant="bordered" defaultOpenIds={["install"]} />
52
- </div>
53
- ),
54
- };
55
-
56
- export const WithIconAndBadge: Story = {
57
- render: () => (
58
- <div className="w-[520px]">
59
- <ITAccordion
60
- items={[
61
- { id: "1", title: "Novedades", icon: <span>✨</span>, content: "3 componentes nuevos." },
62
- { id: "2", title: "Pendientes", content: <ITBadget label="2" color="warning" size="sm" /> },
63
- ]}
64
- defaultOpenIds={["1"]}
65
- />
66
- </div>
67
- ),
68
- };
@@ -1,48 +0,0 @@
1
- import { Meta, Title, Description, Primary, Controls, Stories } from '@storybook/blocks';
2
- import * as StoriesData from './alert.stories';
3
-
4
- <Meta of={StoriesData} />
5
-
6
- # ITAlert
7
-
8
- Dismissible alert banners that provide contextual feedback messages to users. Supports four semantic variants — info, success, warning, and error — each with a distinct icon and color scheme. Alerts can optionally include a bold title, a custom icon override, and a dismiss button for user-dismissible notifications.
9
-
10
- ## Props
11
-
12
- | Prop | Type | Default | Description |
13
- |------|------|---------|-------------|
14
- | `variant` | `"info" \| "success" \| "warning" \| "error"` | `"info"` | Visual style with corresponding icon and color scheme. |
15
- | `title` | `string` | — | Bold heading text displayed above the message. |
16
- | `children` | `ReactNode` | — | Alert message content. |
17
- | `dismissible` | `boolean` | `false` | Whether the alert can be dismissed by the user. |
18
- | `onDismiss` | `() => void` | — | Callback fired when the dismiss button is clicked. |
19
- | `icon` | `ReactNode` | — | Custom icon element that overrides the default variant icon. |
20
- | `className` | `string` | — | Additional CSS class names for the alert container. |
21
-
22
- ## Usage
23
-
24
- ```tsx
25
- import { ITAlert } from '@axzydev/axzy_ui_system';
26
-
27
- <ITAlert variant="success" title="Guardado" dismissible onDismiss={() => {}}>
28
- Los cambios se guardaron correctamente.
29
- </ITAlert>
30
-
31
- <ITAlert variant="error">Ocurrió un error inesperado.</ITAlert>
32
- ```
33
-
34
- ## Variants / Notes
35
-
36
- - **info** — Neutral blue style for general informational messages.
37
- - **success** — Green style for positive confirmation and completion messages.
38
- - **warning** — Amber/yellow style for cautionary messages.
39
- - **error** — Red style for critical errors and failures.
40
- - All variants render with `role="alert"` for accessibility.
41
- - Supports dark mode with appropriate color adjustments.
42
- - The dismiss button only renders when both `dismissible` and `onDismiss` are set.
43
-
44
- ## Stories
45
-
46
- <Primary />
47
- <Controls />
48
- <Stories />
@@ -1,40 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import { useState } from "react";
3
- import ITAlert from "@/components/molecules/alert/alert";
4
-
5
- const meta: Meta<typeof ITAlert> = {
6
- title: "Components/Feedback/ITAlert",
7
- component: ITAlert,
8
- };
9
-
10
- export default meta;
11
- type Story = StoryObj<typeof ITAlert>;
12
-
13
- export const Info: Story = {
14
- args: { variant: "info", title: "Información", children: "Esto es un mensaje informativo." },
15
- };
16
-
17
- export const Success: Story = {
18
- args: { variant: "success", title: "Operación exitosa", children: "Los cambios se guardaron correctamente." },
19
- };
20
-
21
- export const Warning: Story = {
22
- args: { variant: "warning", title: "Advertencia", children: "Esta acción no se puede deshacer." },
23
- };
24
-
25
- export const Error: Story = {
26
- args: { variant: "error", title: "Error", children: "Ocurrió un error inesperado." },
27
- };
28
-
29
- export const Dismissible: Story = {
30
- render: () => {
31
- const [visible, setVisible] = useState(true);
32
- return visible ? (
33
- <ITAlert variant="info" title="Cerrar" dismissible onDismiss={() => setVisible(false)}>
34
- Puedes cerrar esta alerta.
35
- </ITAlert>
36
- ) : (
37
- <p className="text-xs text-slate-400">Alerta cerrada.</p>
38
- );
39
- },
40
- };
@@ -1,57 +0,0 @@
1
- import { Meta, Title, Description, Primary, Controls, Stories } from '@storybook/blocks';
2
- import * as StoriesData from './breadcrumbs.stories';
3
-
4
- <Meta of={StoriesData} />
5
-
6
- # ITBreadcrumbs
7
-
8
- Navigation breadcrumb trail component that displays the user's current location within a site hierarchy. Each item can be a link (`href`) or a button (`onClick`), with the last item automatically rendered as plain inactive text. Supports a custom separator between segments.
9
-
10
- ## Props
11
-
12
- | Prop | Type | Default | Description |
13
- |------|------|---------|-------------|
14
- | `items` | `ITBreadcrumbItem[]` | required | Ordered array of breadcrumb segments. The last item is rendered as plain text. |
15
- | `separator` | `ReactNode` | `<FaChevronRight size={10} />` | Custom separator element rendered between items. |
16
- | `className` | `string` | — | Additional CSS class names for the `<nav>` container. |
17
-
18
- ### ITBreadcrumbItem
19
-
20
- | Prop | Type | Default | Description |
21
- |------|------|---------|-------------|
22
- | `label` | `string` | required | Display text for the breadcrumb segment. |
23
- | `href` | `string` | — | URL for the breadcrumb link. Renders an `<a>` tag. |
24
- | `onClick` | `() => void` | — | Click handler. Renders a `<button>` when no `href` is set. |
25
-
26
- ## Usage
27
-
28
- ```tsx
29
- import { ITBreadcrumbs } from '@axzydev/axzy_ui_system';
30
-
31
- <ITBreadcrumbs
32
- items={[
33
- { label: "Inicio", href: "#" },
34
- { label: "Usuarios", href: "#" },
35
- { label: "Editar Perfil" },
36
- ]}
37
- />
38
-
39
- <ITBreadcrumbs
40
- items={[...]}
41
- separator={<FaArrowRight size={10} />}
42
- />
43
- ```
44
-
45
- ## Variants / Notes
46
-
47
- - The last item in the `items` array is always rendered as plain, non-interactive text representing the current page.
48
- - Items with an `href` render as anchor tags (`<a>`), while items with only `onClick` render as buttons (`<button>`).
49
- - Default separator is a chevron-right icon from FontAwesome (`FaChevronRight`).
50
- - Wrapped in a semantic `<nav>` element for accessibility.
51
- - The component is purely presentational — routing/navigation logic is handled by `href` or `onClick` props.
52
-
53
- ## Stories
54
-
55
- <Primary />
56
- <Controls />
57
- <Stories />
@@ -1,20 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import ITBreadcrumbs from "@/components/molecules/breadcrumbs/breadcrumbs";
3
-
4
- const meta: Meta<typeof ITBreadcrumbs> = {
5
- title: "Components/Navigation/ITBreadcrumbs",
6
- component: ITBreadcrumbs,
7
- };
8
-
9
- export default meta;
10
- type Story = StoryObj<typeof ITBreadcrumbs>;
11
-
12
- export const Default: Story = {
13
- args: {
14
- items: [
15
- { label: "Inicio", href: "#" },
16
- { label: "Usuarios", href: "#" },
17
- { label: "Editar Perfil" },
18
- ],
19
- },
20
- };
@@ -1,76 +0,0 @@
1
- import { Meta, Title, Description, Primary, Controls, Stories } from '@storybook/blocks';
2
- import * as StoriesData from './calendar.stories';
3
-
4
- <Meta of={StoriesData} />
5
-
6
- # ITCalendar
7
-
8
- A full-featured calendar and date picker component with week, day, and month views. Supports event display with colored indicators, date selection (single and range modes), drag-to-select time ranges, and min/max date boundaries with month/year navigation.
9
-
10
- ## Props
11
-
12
- | Prop | Type | Default | Description |
13
- |------|------|---------|-------------|
14
- | `events` | `CalendarEvent[]` | `[]` | Array of calendar events to display in the scheduler view. |
15
- | `mode` | `"week" \| "day" \| "month"` | auto | Display mode. Auto-detected as `"month"` when `onChange` is provided. |
16
- | `onEventClick` | `(event: CalendarEvent) => void` | — | Callback fired when an event is clicked. |
17
- | `onSlotClick` | `(date: Date) => void` | — | Callback fired when an empty time slot is clicked. |
18
- | `onSlotHover` | `(date: Date) => void` | — | Callback fired when the mouse enters a time slot. |
19
- | `onSelectRange` | `(start: Date, end: Date) => void` | — | Callback fired when a time range is selected via drag. |
20
- | `value` | `Date` | — | Currently selected date (picker mode). |
21
- | `onChange` | `(date: Date) => void` | — | Callback fired when a date is selected in picker mode. |
22
- | `selectionMode` | `"single" \| "range"` | `"single"` | Selection mode for the date picker. |
23
- | `startDate` | `Date` | — | Start date for range selection. |
24
- | `endDate` | `Date` | — | End date for range selection. |
25
- | `minDate` | `Date` | — | Minimum selectable date (dates before are disabled). |
26
- | `maxDate` | `Date` | — | Maximum selectable date (dates after are disabled). |
27
- | `className` | `string` | — | Additional CSS class names for the calendar container. |
28
- | `disabled` | `boolean` | `false` | Whether the calendar is in a disabled state. |
29
- | `variant` | `ColorsTypes` | `"primary"` | Accent color theme for selection highlights. |
30
-
31
- ### CalendarEvent
32
-
33
- | Prop | Type | Default | Description |
34
- |------|------|---------|-------------|
35
- | `id` | `string` | required | Unique identifier for the event. |
36
- | `title` | `string` | required | Event display title. |
37
- | `start` | `Date \| string` | required | Event start date/time. |
38
- | `end` | `Date \| string` | required | Event end date/time. |
39
- | `color` | `string` | — | Event indicator color (hex or CSS value). |
40
- | `data` | `any` | — | Arbitrary extra data passed through to event callbacks. |
41
-
42
- ## Usage
43
-
44
- ```tsx
45
- import { ITCalendar } from '@axzydev/axzy_ui_system';
46
-
47
- <ITCalendar mode="month" onChange={(date) => console.log(date)} variant="primary" />
48
-
49
- <ITCalendar
50
- mode="week"
51
- events={[
52
- { id: "1", title: "Reunión", start: new Date(), end: new Date(), color: "#3b82f6" }
53
- ]}
54
- onEventClick={(evt) => console.log(evt)}
55
- className="h-[600px]"
56
- />
57
- ```
58
-
59
- ## Variants / Notes
60
-
61
- - **month** — Traditional month grid with date picker, single and range selection modes.
62
- - **week** — 7-column time grid from 6 AM to 10 PM with event overlays and drag-to-select range.
63
- - **day** — Single-column time grid for focused daily scheduling.
64
- - **years** — Click the year in the header to switch to a year selection view (12-year grid).
65
- - **months** — Click the month name in the header (or pick a year) to switch to a month selection view (12-month grid, same style as the year grid). Flow: header → year → month → days.
66
- - Uses `date-fns` with Spanish locale (`es`) for month and weekday names.
67
- - Month view supports `minDate`/`maxDate` boundaries — out-of-range dates are disabled and dimmed.
68
- - Events render as colored bars in week/day views with customizable `color` prop.
69
- - Week/day views show the current time as a red indicator line when viewing today.
70
- - Drag-to-select time ranges is enabled when `onSelectRange` is provided.
71
-
72
- ## Stories
73
-
74
- <Primary />
75
- <Controls />
76
- <Stories />