@axzydev/axzy_ui_system 1.2.7 → 1.2.8

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 (184) hide show
  1. package/dist/index.cjs +576 -398
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +1 -1
  4. package/dist/index.css.map +1 -1
  5. package/dist/index.d.cts +1463 -86
  6. package/dist/index.d.ts +1463 -86
  7. package/dist/index.js +597 -417
  8. package/dist/index.js.map +1 -1
  9. package/package.json +1 -1
  10. package/src/App.tsx +19 -54
  11. package/src/components/alert/alert.doc.mdx +48 -0
  12. package/src/components/alert/alert.props.ts +7 -0
  13. package/src/components/alert/alert.tsx +8 -0
  14. package/src/components/avatar/avatar.doc.mdx +48 -0
  15. package/src/components/avatar/avatar.props.ts +8 -0
  16. package/src/components/avatar/avatar.tsx +25 -5
  17. package/src/components/badget/badget.doc.mdx +46 -0
  18. package/src/components/badget/badget.props.ts +6 -0
  19. package/src/components/badget/badget.tsx +11 -0
  20. package/src/components/breadcrumbs/breadcrumbs.doc.mdx +57 -0
  21. package/src/components/breadcrumbs/breadcrumbs.props.ts +6 -0
  22. package/src/components/breadcrumbs/breadcrumbs.tsx +12 -0
  23. package/src/components/button/button.doc.mdx +59 -0
  24. package/src/components/button/button.props.ts +12 -0
  25. package/src/components/button/button.tsx +11 -0
  26. package/src/components/calendar/calendar.doc.mdx +75 -0
  27. package/src/components/calendar/calendar.props.ts +27 -7
  28. package/src/components/calendar/calendar.tsx +13 -0
  29. package/src/components/card/card.doc.mdx +54 -0
  30. package/src/components/card/card.props.ts +11 -0
  31. package/src/components/card/card.tsx +13 -0
  32. package/src/components/checkbox/checkbox.doc.mdx +54 -0
  33. package/src/components/checkbox/checkbox.props.ts +7 -0
  34. package/src/components/checkbox/checkbox.tsx +9 -0
  35. package/src/components/confirm-dialog/confirm-dialog.doc.mdx +60 -0
  36. package/src/components/confirm-dialog/confirm-dialog.props.ts +9 -0
  37. package/src/components/confirm-dialog/confirm-dialog.tsx +19 -0
  38. package/src/components/data-table/ITDataTable.doc.mdx +59 -0
  39. package/src/components/data-table/dataTable.props.ts +15 -0
  40. package/src/components/data-table/dataTable.tsx +178 -73
  41. package/src/components/date-picker/date-picker.doc.mdx +65 -0
  42. package/src/components/date-picker/date-picker.props.ts +17 -0
  43. package/src/components/date-picker/datePicker.tsx +31 -1
  44. package/src/components/dialog/dialog.doc.mdx +54 -0
  45. package/src/components/dialog/dialog.props.ts +7 -0
  46. package/src/components/dialog/dialog.tsx +26 -0
  47. package/src/components/divider/divider.doc.mdx +42 -0
  48. package/src/components/divider/divider.props.ts +5 -0
  49. package/src/components/divider/divider.tsx +16 -0
  50. package/src/components/drawer/drawer.doc.mdx +59 -0
  51. package/src/components/drawer/drawer.props.ts +9 -0
  52. package/src/components/drawer/drawer.tsx +20 -0
  53. package/src/components/dropfile/dropfile.doc.mdx +59 -0
  54. package/src/components/dropfile/dropfile.props.ts +41 -0
  55. package/src/components/dropfile/dropfile.tsx +21 -33
  56. package/src/components/empty-state/empty-state.doc.mdx +50 -0
  57. package/src/components/empty-state/empty-state.props.ts +5 -0
  58. package/src/components/empty-state/empty-state.tsx +16 -0
  59. package/src/components/flex/flex.doc.mdx +59 -0
  60. package/src/components/flex/flex.props.ts +13 -0
  61. package/src/components/flex/flex.tsx +15 -0
  62. package/src/components/form-builder/fieldRenderer.tsx +52 -2
  63. package/src/components/form-builder/formBuilder.doc.mdx +124 -0
  64. package/src/components/form-builder/formBuilder.props.ts +12 -2
  65. package/src/components/form-builder/formBuilder.tsx +31 -0
  66. package/src/components/form-header/form-header.doc.mdx +38 -0
  67. package/src/components/form-header/form-header.props.ts +3 -0
  68. package/src/components/form-header/form-header.stories.tsx +53 -0
  69. package/src/components/form-header/form-header.tsx +11 -0
  70. package/src/components/grid/grid.doc.mdx +54 -0
  71. package/src/components/grid/grid.props.ts +13 -0
  72. package/src/components/grid/grid.tsx +19 -0
  73. package/src/components/image/image.doc.mdx +44 -0
  74. package/src/components/image/image.props.ts +5 -0
  75. package/src/components/image/image.stories.tsx +49 -0
  76. package/src/components/image/image.tsx +19 -0
  77. package/src/components/input/input.doc.mdx +70 -0
  78. package/src/components/input/input.props.ts +34 -2
  79. package/src/components/input/input.tsx +29 -0
  80. package/src/components/layout/layout.doc.mdx +51 -0
  81. package/src/components/layout/layout.props.ts +5 -0
  82. package/src/components/layout/layout.tsx +29 -2
  83. package/src/components/loader/loader.doc.mdx +43 -0
  84. package/src/components/loader/loader.props.ts +4 -0
  85. package/src/components/loader/loader.tsx +17 -0
  86. package/src/components/navbar/navbar.doc.mdx +77 -0
  87. package/src/components/navbar/navbar.props.ts +37 -1
  88. package/src/components/navbar/navbar.stories.tsx +84 -0
  89. package/src/components/navbar/navbar.tsx +27 -0
  90. package/src/components/page/page.doc.mdx +80 -0
  91. package/src/components/page/page.props.ts +21 -0
  92. package/src/components/page/page.tsx +18 -0
  93. package/src/components/page-header/page-header.doc.mdx +54 -0
  94. package/src/components/page-header/page-header.props.ts +9 -0
  95. package/src/components/page-header/page-header.tsx +15 -0
  96. package/src/components/pagination/pagination.doc.mdx +62 -0
  97. package/src/components/pagination/pagination.props.ts +11 -32
  98. package/src/components/pagination/pagination.tsx +17 -0
  99. package/src/components/popover/popover.doc.mdx +53 -0
  100. package/src/components/popover/popover.props.ts +8 -0
  101. package/src/components/popover/popover.tsx +13 -0
  102. package/src/components/progress/progress.doc.mdx +48 -0
  103. package/src/components/progress/progress.props.ts +8 -0
  104. package/src/components/progress/progress.tsx +9 -0
  105. package/src/components/radio/radio.doc.mdx +62 -0
  106. package/src/components/radio/radio.props.ts +11 -0
  107. package/src/components/radio/radio.tsx +18 -0
  108. package/src/components/search-select/search-select.doc.mdx +72 -0
  109. package/src/components/search-select/search-select.props.ts +23 -18
  110. package/src/components/search-select/search-select.tsx +27 -2
  111. package/src/components/searchTable/searchTable.doc.mdx +79 -0
  112. package/src/components/searchTable/searchTable.props.ts +42 -3
  113. package/src/components/searchTable/searchTable.stories.tsx +74 -0
  114. package/src/components/searchTable/searchTable.tsx +23 -0
  115. package/src/components/segmented-control/segmented-control.doc.mdx +60 -0
  116. package/src/components/segmented-control/segmented-control.props.ts +12 -0
  117. package/src/components/segmented-control/segmented-control.tsx +15 -0
  118. package/src/components/select/select.doc.mdx +75 -0
  119. package/src/components/select/select.props.ts +22 -0
  120. package/src/components/select/select.tsx +2 -5
  121. package/src/components/sidebar/sidebar.doc.mdx +86 -0
  122. package/src/components/sidebar/sidebar.props.ts +22 -0
  123. package/src/components/sidebar/sidebar.tsx +22 -0
  124. package/src/components/skeleton/skeleton.doc.mdx +43 -0
  125. package/src/components/skeleton/skeleton.props.ts +8 -0
  126. package/src/components/skeleton/skeleton.tsx +10 -0
  127. package/src/components/slide/slide.doc.mdx +46 -0
  128. package/src/components/slide/slide.props.ts +11 -24
  129. package/src/components/slide/slide.tsx +10 -1
  130. package/src/components/slider/slider.doc.mdx +49 -0
  131. package/src/components/slider/slider.props.ts +9 -0
  132. package/src/components/slider/slider.tsx +15 -0
  133. package/src/components/stack/stack.doc.mdx +126 -0
  134. package/src/components/stack/stack.props.ts +18 -0
  135. package/src/components/stack/stack.stories.tsx +221 -16
  136. package/src/components/stack/stack.tsx +21 -0
  137. package/src/components/stat-card/stat-card.doc.mdx +48 -0
  138. package/src/components/stat-card/stat-card.props.ts +9 -0
  139. package/src/components/stat-card/stat-card.tsx +10 -0
  140. package/src/components/stepper/stepper.doc.mdx +54 -0
  141. package/src/components/stepper/stepper.props.ts +11 -1
  142. package/src/components/stepper/stepper.tsx +15 -0
  143. package/src/components/table/table.doc.mdx +58 -0
  144. package/src/components/table/table.props.ts +17 -0
  145. package/src/components/table/table.tsx +199 -84
  146. package/src/components/tabs/tabs.doc.mdx +52 -0
  147. package/src/components/tabs/tabs.props.ts +11 -0
  148. package/src/components/tabs/tabs.tsx +14 -0
  149. package/src/components/text/text.doc.mdx +41 -0
  150. package/src/components/text/text.props.ts +5 -0
  151. package/src/components/text/text.stories.tsx +67 -0
  152. package/src/components/text/text.tsx +10 -0
  153. package/src/components/textarea/textarea.doc.mdx +64 -0
  154. package/src/components/textarea/textarea.props.ts +11 -0
  155. package/src/components/textarea/textarea.tsx +16 -0
  156. package/src/components/theme-provider/themeProvider.doc.mdx +75 -0
  157. package/src/components/theme-provider/themeProvider.props.ts +3 -0
  158. package/src/components/theme-provider/themeProvider.stories.tsx +59 -0
  159. package/src/components/theme-provider/themeProvider.tsx +14 -0
  160. package/src/components/time-picker/timePicker.doc.mdx +68 -0
  161. package/src/components/time-picker/timePicker.props.ts +14 -0
  162. package/src/components/time-picker/timePicker.tsx +22 -1
  163. package/src/components/toast/toast.doc.mdx +50 -0
  164. package/src/components/toast/toast.props.ts +5 -0
  165. package/src/components/toast/toast.tsx +21 -0
  166. package/src/components/tooltip/tooltip.doc.mdx +47 -0
  167. package/src/components/tooltip/tooltip.props.ts +6 -0
  168. package/src/components/tooltip/tooltip.tsx +19 -0
  169. package/src/components/topbar/topbar.doc.mdx +69 -0
  170. package/src/components/topbar/topbar.props.ts +15 -0
  171. package/src/components/topbar/topbar.tsx +38 -0
  172. package/src/components/triple-filter/tripleFilter.doc.mdx +62 -0
  173. package/src/components/triple-filter/tripleFilter.props.ts +7 -0
  174. package/src/components/triple-filter/tripleFilter.tsx +32 -0
  175. package/src/index.css +2 -0
  176. package/src/showcases/DataShowcases.tsx +529 -45
  177. package/src/showcases/FormShowcases.tsx +399 -29
  178. package/src/showcases/HomeShowcase.tsx +252 -272
  179. package/src/showcases/LayoutPrimitivesShowcases.tsx +1224 -248
  180. package/src/showcases/PageShowcases.tsx +688 -391
  181. package/src/showcases/ShowcaseLayout.tsx +237 -73
  182. package/src/showcases/StructureShowcases.tsx +846 -73
  183. package/src/types/table.types.ts +1 -1
  184. package/src/utils/styles.ts +2 -1
@@ -0,0 +1,75 @@
1
+ import { Meta, Title, Description, Primary, Controls, Stories } from '@storybook/blocks';
2
+ import * as Stories from './calendar.stories';
3
+
4
+ <Meta of={Stories} />
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 month/year header to switch to a year selection view (12-year grid).
65
+ - Uses `date-fns` with Spanish locale (`es`) for month and weekday names.
66
+ - Month view supports `minDate`/`maxDate` boundaries — out-of-range dates are disabled and dimmed.
67
+ - Events render as colored bars in week/day views with customizable `color` prop.
68
+ - Week/day views show the current time as a red indicator line when viewing today.
69
+ - Drag-to-select time ranges is enabled when `onSelectRange` is provided.
70
+
71
+ ## Stories
72
+
73
+ <Primary />
74
+ <Controls />
75
+ <Stories />
@@ -1,33 +1,53 @@
1
1
  import { ColorsTypes } from "@/types/colors.types";
2
2
 
3
3
  export interface CalendarEvent {
4
+ /** Unique identifier for the event. */
4
5
  id: string;
6
+ /** Event display title. */
5
7
  title: string;
6
- start: Date | string; // Date object or ISO string
8
+ /** Event start date/time. Accepts a `Date` object or ISO 8601 string. */
9
+ start: Date | string;
10
+ /** Event end date/time. Accepts a `Date` object or ISO 8601 string. */
7
11
  end: Date | string;
8
- color?: string; // Hex or tailwind class
9
- data?: any; // Extra data for callbacks
12
+ /** Event indicator color. Accepts a hex code or CSS color value. */
13
+ color?: string;
14
+ /** Arbitrary extra data passed through to event callbacks. */
15
+ data?: any;
10
16
  }
11
17
 
12
18
  export interface ITCalendarProps {
13
- // Scheduler Props
19
+ /** Array of calendar events to display in the scheduler view. */
14
20
  events?: CalendarEvent[];
15
- mode?: 'week' | 'day' | 'month'; // 'month' for picker
21
+ /** Display mode. Valid values: `"week"`, `"day"`, `"month"`. Auto-detected as `"month"` when `onChange` is provided. */
22
+ mode?: 'week' | 'day' | 'month';
23
+ /** Callback fired when an event is clicked. */
16
24
  onEventClick?: (event: CalendarEvent) => void;
25
+ /** Callback fired when an empty time slot is clicked. */
17
26
  onSlotClick?: (date: Date) => void;
27
+ /** Callback fired when the mouse enters a time slot. */
18
28
  onSlotHover?: (date: Date) => void;
29
+ /** Callback fired when a time range is selected via drag. */
19
30
  onSelectRange?: (start: Date, end: Date) => void;
20
-
21
- // Picker Props (Legacy/DatePicker support)
31
+
32
+ /** Currently selected date (date picker mode). */
22
33
  value?: Date;
34
+ /** Callback fired when a date is selected in picker mode. */
23
35
  onChange?: (date: Date) => void;
36
+ /** Selection mode for the date picker. Valid values: `"single"`, `"range"`. @default "single" */
24
37
  selectionMode?: 'single' | 'range';
38
+ /** Start date for range selection. */
25
39
  startDate?: Date;
40
+ /** End date for range selection. */
26
41
  endDate?: Date;
42
+ /** Minimum selectable date (dates before this are disabled). */
27
43
  minDate?: Date;
44
+ /** Maximum selectable date (dates after this are disabled). */
28
45
  maxDate?: Date;
29
46
 
47
+ /** Additional CSS class names for the calendar container. */
30
48
  className?: string;
49
+ /** Whether the calendar is in a disabled state. @default false */
31
50
  disabled?: boolean;
51
+ /** Accent color theme for selection highlights. Uses semantic color keys. @default "primary" */
32
52
  variant?: ColorsTypes;
33
53
  }
@@ -44,6 +44,19 @@ const TIME_SLOTS = Array.from({ length: HOURS_COUNT + 1 }, (_, i) => START_HOUR
44
44
  // Component
45
45
  // ----------------------------------------------------------------------
46
46
 
47
+ /**
48
+ * Full-featured calendar and date picker with week/day/month views, event display, range selection, and drag-to-select.
49
+ *
50
+ * @example
51
+ * <ITCalendar mode="month" onChange={(date) => console.log(date)} variant="primary" />
52
+ *
53
+ * @example
54
+ * <ITCalendar
55
+ * mode="week"
56
+ * events={[{ id: "1", title: "Meeting", start: new Date(), end: new Date() }]}
57
+ * onEventClick={(evt) => console.log(evt)}
58
+ * />
59
+ */
47
60
  export const ITCalendar: React.FC<ITCalendarProps> = ({
48
61
  events = [],
49
62
  mode: modeProp,
@@ -0,0 +1,54 @@
1
+ import { Meta, Title, Description, Primary, Controls, Stories } from '@storybook/blocks';
2
+ import * as Stories from './card.stories';
3
+
4
+ <Meta of={Stories} />
5
+
6
+ # ITCard
7
+
8
+ A versatile container component for grouping related content and actions. Supports an optional header image, title, body content, and a footer action area. Cards become interactive with hover shadow animation when an `onClick` handler is provided.
9
+
10
+ ## Props
11
+
12
+ | Prop | Type | Default | Description |
13
+ |------|------|---------|-------------|
14
+ | `onClick` | `() => void` | — | Click handler. When provided, the card becomes interactive with hover shadow effect. |
15
+ | `title` | `string` | — | Card title displayed in the header area. |
16
+ | `image` | `string` | — | Image source URL displayed at the top of the card. |
17
+ | `alt` | `string` | `"Card Image"` | Alt text for the card image. |
18
+ | `children` | `ReactNode` | — | Card body content, rendered below the title. |
19
+ | `actions` | `ReactNode` | — | Action elements rendered in a footer section separated by a border. |
20
+ | `className` | `string` | — | Additional CSS class names for the card container. |
21
+ | `imageClassName` | `string` | — | Additional CSS class names for the image element. |
22
+ | `titleClassName` | `string` | — | Additional CSS class names for the title element. |
23
+ | `contentClassName` | `string` | — | Additional CSS class names for the content wrapper. |
24
+ | `actionClassName` | `string` | — | Additional CSS class names for the actions footer. |
25
+
26
+ ## Usage
27
+
28
+ ```tsx
29
+ import { ITCard } from '@axzydev/axzy_ui_system';
30
+
31
+ <ITCard title="Bienvenido" image="/hero.jpg" actions={<ITButton label="Ver más" />}>
32
+ Contenido de la tarjeta.
33
+ </ITCard>
34
+
35
+ <ITCard onClick={() => navigate("/details")} className="max-w-sm">
36
+ Tarjeta interactiva con sombra al hover.
37
+ </ITCard>
38
+ ```
39
+
40
+ ## Variants / Notes
41
+
42
+ - **Default** — Clean container with theme-driven background, border, and border-radius via CSS custom properties.
43
+ - **Interactive** — When `onClick` is provided, the card gains a subtle base shadow, a stronger shadow on hover, a pointer cursor, and smooth transition animation.
44
+ - **With image** — The `image` prop renders a full-width image at the top with `object-cover` and a fixed height.
45
+ - **With actions** — The `actions` prop renders a footer section with a top border, perfect for button groups.
46
+ - Styling is driven by CSS custom properties (`--card-bg`, `--card-border`, `--card-radius`) for easy theming.
47
+ - All style class names are customizable via the dedicated `*ClassName` props.
48
+ - Card contents are wrapped with `ITText` for consistent typography.
49
+
50
+ ## Stories
51
+
52
+ <Primary />
53
+ <Controls />
54
+ <Stories />
@@ -1,13 +1,24 @@
1
1
  export interface ITCardProps {
2
+ /** Click handler. When provided, the card becomes interactive with hover shadow effect. */
2
3
  onClick?: () => void;
4
+ /** Card title displayed in the header area. */
3
5
  title?: string;
6
+ /** Image source URL displayed at the top of the card. */
4
7
  image?: string;
8
+ /** Alt text for the card image. @default "Card Image" */
5
9
  alt?: string;
10
+ /** Card body content. Rendered below the title. */
6
11
  children?: React.ReactNode;
12
+ /** Action elements rendered in a footer section separated by a border. */
7
13
  actions?: React.ReactNode;
14
+ /** Additional CSS class names for the card container. */
8
15
  className?: string;
16
+ /** Additional CSS class names for the image element. */
9
17
  imageClassName?: string;
18
+ /** Additional CSS class names for the title element. */
10
19
  titleClassName?: string;
20
+ /** Additional CSS class names for the content wrapper. */
11
21
  contentClassName?: string;
22
+ /** Additional CSS class names for the actions footer. */
12
23
  actionClassName?: string;
13
24
  }
@@ -3,6 +3,19 @@ import { ITCardProps } from "./card.props";
3
3
  import { useState } from "react";
4
4
  import ITText from "@/components/text/text";
5
5
 
6
+ /**
7
+ * Versatile card container with optional image, title, body content, and action footer. Supports interactive hover states.
8
+ *
9
+ * @example
10
+ * <ITCard title="Welcome" image="/hero.jpg" actions={<ITButton label="Learn more" />}>
11
+ * This is the card content.
12
+ * </ITCard>
13
+ *
14
+ * @example
15
+ * <ITCard onClick={() => {}} className="max-w-sm">
16
+ * Clickable card with hover shadow.
17
+ * </ITCard>
18
+ */
6
19
  export default function ITCard({
7
20
  title,
8
21
  image,
@@ -0,0 +1,54 @@
1
+ import { Meta, Title, Description, Primary, Controls, Stories } from '@storybook/blocks';
2
+ import * as Stories from './checkbox.stories';
3
+
4
+ <Meta of={Stories} />
5
+
6
+ # ITCheckbox
7
+
8
+ A checkbox input component with a custom visual style and a visually hidden native `<input>` for full accessibility. Supports checked, unchecked, and indeterminate states with an optional label. The disabled state reduces opacity and prevents interaction.
9
+
10
+ ## Props
11
+
12
+ | Prop | Type | Default | Description |
13
+ |------|------|---------|-------------|
14
+ | `checked` | `boolean` | `false` | Controlled checked state. |
15
+ | `onChange` | `(checked: boolean) => void` | — | Callback fired when the checkbox value changes. |
16
+ | `label` | `ReactNode` | — | Label text or element rendered next to the checkbox. |
17
+ | `disabled` | `boolean` | `false` | Disables interaction and applies reduced opacity. |
18
+ | `indeterminate` | `boolean` | `false` | Renders a dash indicator for partial selection. No effect when `checked` is `true`. |
19
+ | `className` | `string` | — | Additional CSS class names for the label wrapper. |
20
+ | `name` | `string` | — | HTML name attribute for the native `<input>` element. |
21
+
22
+ ## Usage
23
+
24
+ ```tsx
25
+ import { ITCheckbox } from '@axzydev/axzy_ui_system';
26
+
27
+ <ITCheckbox
28
+ checked={agreed}
29
+ onChange={setAgreed}
30
+ label="Acepto los términos y condiciones"
31
+ />
32
+
33
+ <ITCheckbox
34
+ indeterminate={someChecked && !allChecked}
35
+ onChange={toggleAll}
36
+ label="Seleccionar todo"
37
+ />
38
+ ```
39
+
40
+ ## Variants / Notes
41
+
42
+ - **Checked** — Blue filled square with a white checkmark SVG icon.
43
+ - **Unchecked** — White background with a slate gray border.
44
+ - **Indeterminate** — A horizontal dash line rendered when `indeterminate` is `true` and `checked` is `false`. Useful for "select all" parent checkboxes.
45
+ - The native `<input>` is visually hidden (`sr-only`) but remains interactive via the parent `<label>`, ensuring keyboard navigation and screen reader support.
46
+ - When disabled, the entire label wrapper gets `opacity-50` and `cursor-not-allowed`.
47
+ - Renders a focus ring (`ring-2 ring-primary-200`) on the custom visual element when the input is focused (unless disabled).
48
+ - Uses a `ref` callback to set `indeterminate` on the underlying DOM input for compliance with the HTML spec.
49
+
50
+ ## Stories
51
+
52
+ <Primary />
53
+ <Controls />
54
+ <Stories />
@@ -1,11 +1,18 @@
1
1
  import { ReactNode } from "react";
2
2
 
3
3
  export interface ITCheckboxProps {
4
+ /** Controlled checked state. @default false */
4
5
  checked?: boolean;
6
+ /** Callback fired when the checkbox value changes. Receives the new checked state. */
5
7
  onChange?: (checked: boolean) => void;
8
+ /** Label text or element rendered next to the checkbox. */
6
9
  label?: ReactNode;
10
+ /** Disables the checkbox interaction and applies reduced opacity. @default false */
7
11
  disabled?: boolean;
12
+ /** Renders the checkbox in an indeterminate (dash) state. Has no effect when `checked` is `true`. @default false */
8
13
  indeterminate?: boolean;
14
+ /** Additional CSS class names for the label wrapper. */
9
15
  className?: string;
16
+ /** HTML name attribute for the native `<input>` element. */
10
17
  name?: string;
11
18
  }
@@ -2,6 +2,15 @@ import clsx from "clsx";
2
2
  import { ITCheckboxProps } from "./checkbox.props";
3
3
  import ITText from "@/components/text/text";
4
4
 
5
+ /**
6
+ * Checkbox component with label, indeterminate state, and disabled support. Uses a visually hidden native input for accessibility.
7
+ *
8
+ * @example
9
+ * <ITCheckbox label="Accept terms" checked={agreed} onChange={setAgreed} />
10
+ *
11
+ * @example
12
+ * <ITCheckbox label="Select all" indeterminate={someChecked && !allChecked} onChange={toggleAll} />
13
+ */
5
14
  export default function ITCheckbox({
6
15
  checked = false,
7
16
  onChange,
@@ -0,0 +1,60 @@
1
+ import { Meta, Title, Description, Primary, Controls, Stories } from '@storybook/blocks';
2
+ import * as Stories from './confirm-dialog.stories';
3
+
4
+ <Meta of={Stories} />
5
+
6
+ # ITConfirmDialog
7
+
8
+ Confirmation modal dialog for destructive or critical actions. Renders a centered overlay with a warning icon, title, message body, and confirm/cancel buttons. Supports loading state and configurable button colors.
9
+
10
+ ## Props
11
+
12
+ | Prop | Type | Default | Description |
13
+ |------|------|---------|-------------|
14
+ | `isOpen` | `boolean` | — | Controls whether the confirmation dialog is visible. |
15
+ | `onClose` | `() => void` | — | Callback fired when the user cancels or closes the dialog (overlay click or cancel button). |
16
+ | `onConfirm` | `() => void` | — | Callback fired when the user confirms the action. |
17
+ | `title` | `string` | `"Confirmar acción"` | Heading text displayed at the top of the dialog. |
18
+ | `message` | `ReactNode` | `"¿Estás seguro de que deseas continuar?"` | Body content — accepts plain strings or React nodes. |
19
+ | `confirmLabel` | `string` | `"Confirmar"` | Label for the confirm button. |
20
+ | `cancelLabel` | `string` | `"Cancelar"` | Label for the cancel button. |
21
+ | `variant` | `ColorsTypes` | `"primary"` | Color variant applied to the confirm button. Accepts `primary`, `danger`, `warning`, `info`, etc. |
22
+ | `loading` | `boolean` | `false` | Disables all buttons and signals a loading state. |
23
+
24
+ ## Usage
25
+
26
+ ```tsx
27
+ import { ITConfirmDialog } from '@axzydev/axzy_ui_system';
28
+ import { useState } from 'react';
29
+
30
+ const [open, setOpen] = useState(false);
31
+
32
+ <ITButton label="Eliminar" color="danger" onClick={() => setOpen(true)} />
33
+
34
+ <ITConfirmDialog
35
+ isOpen={open}
36
+ onClose={() => setOpen(false)}
37
+ onConfirm={() => { handleDelete(); setOpen(false); }}
38
+ title="Eliminar usuario"
39
+ message="Esta acción no se puede deshacer. ¿Deseas eliminar este usuario?"
40
+ confirmLabel="Eliminar"
41
+ variant="danger"
42
+ loading={isDeleting}
43
+ />
44
+ ```
45
+
46
+ ## Notes
47
+
48
+ - The dialog renders `null` when `isOpen` is `false`, so it does not remain in the DOM.
49
+ - A semi-transparent **backdrop** (`bg-black/40 backdrop-blur-sm`) covers the screen; clicking it triggers `onClose`.
50
+ - The dialog card has rounded corners (`rounded-2xl`), a light border, and a subtle shadow.
51
+ - A warning icon (`FaExclamationTriangle` in amber) is always displayed alongside the title and message.
52
+ - **variant** controls the confirm button color via the `color` prop on `ITButton`; the cancel button always uses the `outlined` variant.
53
+ - **loading** disables both buttons to prevent double-submission during async operations.
54
+ - By default, spans and text use dark mode–aware colors (`dark:text-white`, `dark:text-slate-400`).
55
+
56
+ ## Stories
57
+
58
+ <Primary />
59
+ <Controls />
60
+ <Stories />
@@ -2,13 +2,22 @@ import { ReactNode } from "react";
2
2
  import { ColorsTypes } from "@/types/colors.types";
3
3
 
4
4
  export interface ITConfirmDialogProps {
5
+ /** Controls whether the confirmation dialog is visible. */
5
6
  isOpen: boolean;
7
+ /** Callback fired when the user cancels or closes the dialog. */
6
8
  onClose: () => void;
9
+ /** Callback fired when the user confirms the destructive action. */
7
10
  onConfirm: () => void;
11
+ /** Heading text displayed at the top of the dialog. @default "Confirmar acción" */
8
12
  title?: string;
13
+ /** Body content — accepts plain strings or React nodes. @default "¿Estás seguro de que deseas continuar?" */
9
14
  message?: ReactNode;
15
+ /** Label for the confirm button. @default "Confirmar" */
10
16
  confirmLabel?: string;
17
+ /** Label for the cancel button. @default "Cancelar" */
11
18
  cancelLabel?: string;
19
+ /** Color variant applied to the confirm button. Accepts any ColorsTypes value (e.g. "primary", "danger", "warning", "info"). @default "primary" */
12
20
  variant?: ColorsTypes;
21
+ /** Disables all buttons and signals a loading state. @default false */
13
22
  loading?: boolean;
14
23
  }
@@ -4,6 +4,25 @@ import ITButton from "../button/button";
4
4
  import { FaExclamationTriangle } from "react-icons/fa";
5
5
  import ITText from "@/components/text/text";
6
6
 
7
+ /**
8
+ * Confirmation modal dialog for destructive or critical actions.
9
+ *
10
+ * Renders a centered overlay with a warning icon, title, message body, and
11
+ * confirm/cancel buttons. The dialog auto-hides when `isOpen` is false.
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * <ITConfirmDialog
16
+ * isOpen={showConfirm}
17
+ * onClose={() => setShowConfirm(false)}
18
+ * onConfirm={handleDelete}
19
+ * title="Delete record"
20
+ * message="This action is permanent and cannot be undone."
21
+ * variant="danger"
22
+ * loading={isDeleting}
23
+ * />
24
+ * ```
25
+ */
7
26
  export default function ITConfirmDialog({
8
27
  isOpen,
9
28
  onClose,
@@ -0,0 +1,59 @@
1
+ import { Meta, Title, Description, Primary, Controls, Stories } from '@storybook/blocks';
2
+ import * as Stories from './ITDataTable.stories';
3
+
4
+ <Meta of={Stories} />
5
+
6
+ # ITDataTable
7
+
8
+ Advanced server-side data table with automatic pagination, column sorting, and filtering. Communicates via a `fetchData` callback that receives page, limit, filters, and sort parameters, and returns paginated data with a total count. Built on top of the internal table hooks for cohesive state management.
9
+
10
+ ## Props
11
+
12
+ | Prop | Type | Default | Description |
13
+ |------|------|---------|-------------|
14
+ | `columns` | `Column<T>[]` | — | Column definitions with key, label, type, sortable, filter, render, and width. |
15
+ | `fetchData` | `(params: ITDataTableFetchParams) => Promise<ITDataTableResponse<T>>` | — | Async callback triggered on pagination, filter, or sort change. Must return `{ data, total }`. |
16
+ | `debounceMs` | `number` | `500` | Delay in ms before firing fetch after filter state changes. |
17
+ | `externalFilters` | `Record<string, string \| number \| boolean \| Date>` | `{}` | Filters managed outside the table (e.g., date pickers) merged with internal column filters. |
18
+ | `loadingIndicator` | `ReactNode` | `<FaSpinner />` | Custom element shown while loading. |
19
+ | `fetchOnMount` | `boolean` | `true` | Whether to fetch data on initial mount. |
20
+ | `reloadTrigger` | `number \| string \| boolean` | — | Changing this value forces a re-fetch. Use after mutations. |
21
+ | `containerClassName` | `string` | — | CSS classes for the outer wrapper. |
22
+ | `className` | `string` | — | CSS classes applied to the `<table>` element. |
23
+ | `variant` | `"default" \| "striped" \| "bordered" \| "minimal"` | `"default"` | Visual style variant. |
24
+ | `size` | `"sm" \| "md" \| "lg"` | `"md"` | Row density preset. |
25
+ | `itemsPerPageOptions` | `number[]` | `[5, 10, 20]` | Selectable page-size options. |
26
+ | `defaultItemsPerPage` | `number` | `10` | Initial rows per page. |
27
+ | `title` | `string \| ReactNode` | — | Heading displayed above the table. |
28
+
29
+ ## Usage
30
+
31
+ ```tsx
32
+ import { ITDataTable } from '@axzydev/axzy_ui_system';
33
+
34
+ <ITDataTable
35
+ title="Users"
36
+ columns={[
37
+ { key: 'id', label: 'ID', type: 'number', sortable: true },
38
+ { key: 'name', label: 'Name', type: 'string', sortable: true, filter: true },
39
+ { key: 'role', label: 'Role', type: 'string', filter: 'catalog', catalogOptions: { data: roles } },
40
+ { key: 'active', label: 'Status', type: 'boolean', filter: true, sortable: true },
41
+ ]}
42
+ fetchData={async (params) => api.fetchItems(params)}
43
+ variant="bordered"
44
+ />
45
+ ```
46
+
47
+ ## Notes
48
+
49
+ - Column filters support `"catalog"` (dropdown), `true` (text input), and `boolean` (tri-state toggle).
50
+ - The `externalFilters` prop allows integrating external filter controls like date pickers without building filter UI into the table itself.
51
+ - Debounce prevents excessive API calls while the user types in filter inputs.
52
+ - A loading skeleton overlay covers the table body while fetching, keeping the header visible.
53
+ - Empty state is shown automatically when no results match the current filters.
54
+
55
+ ## Stories
56
+
57
+ <Primary />
58
+ <Controls />
59
+ <Stories />
@@ -59,11 +59,26 @@ export interface ITDataTableProps<T extends Record<string, unknown>> {
59
59
  reloadTrigger?: number | string | boolean;
60
60
 
61
61
  // Visual Inherited Props from ITTable
62
+ /** Additional CSS classes for the outer wrapper element. */
62
63
  containerClassName?: string;
64
+ /** Additional CSS classes applied directly to the `<table>` element. */
63
65
  className?: string;
66
+ /** Visual style variant: "default" | "striped" | "bordered" | "minimal". @default "default" */
64
67
  variant?: "default" | "striped" | "bordered" | "minimal";
68
+ /** Row density preset: "sm" | "md" | "lg". @default "md" */
65
69
  size?: "sm" | "md" | "lg";
70
+ /** Selectable page-size options for the paginator. @default [5, 10, 20] */
66
71
  itemsPerPageOptions?: number[];
72
+ /** Initial number of rows per page. @default 10 */
67
73
  defaultItemsPerPage?: number;
74
+ /** Optional heading displayed above the table. */
68
75
  title?: string | ReactNode;
76
+ /** Custom card renderer for mobile/tablet responsive view. Receives the row data. */
77
+ renderCard?: (row: T) => React.ReactNode;
78
+ /** Initial view mode. Defaults to "table". */
79
+ defaultView?: "table" | "cards";
80
+ /** Whether to show vertical borders between columns. Defaults to true. */
81
+ showVerticalBorder?: boolean;
82
+ /** Custom class for vertical borders (overrides the default subtle gray). */
83
+ verticalBorderClassname?: string;
69
84
  }