@axzydev/axzy_ui_system 1.4.8 → 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 (223) hide show
  1. package/README.md +2 -11
  2. package/dist/index.cjs +1826 -1351
  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 +115 -14
  7. package/dist/index.d.ts +115 -14
  8. package/dist/index.js +1481 -1010
  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.tsx +30 -28
  39. package/src/components/molecules/time-picker/timePicker.tsx +8 -6
  40. package/src/components/molecules/wysiwyg/wysiwyg.tsx +23 -12
  41. package/src/components/organisms/confirm-dialog/confirm-dialog.props.ts +4 -4
  42. package/src/components/organisms/confirm-dialog/confirm-dialog.tsx +16 -8
  43. package/src/components/organisms/data-table/dataTable.tsx +31 -25
  44. package/src/components/organisms/dialog/dialog.tsx +3 -0
  45. package/src/components/organisms/drawer/drawer.tsx +3 -0
  46. package/src/components/organisms/dropfile/dropfile.tsx +19 -17
  47. package/src/components/organisms/form-builder/fieldRenderer.tsx +4 -2
  48. package/src/components/organisms/navbar/navbar.tsx +4 -2
  49. package/src/components/organisms/page-header/page-header.tsx +3 -1
  50. package/src/components/organisms/searchTable/components/PaginationControls.tsx +8 -6
  51. package/src/components/organisms/searchTable/components/PaginationInfo.tsx +3 -1
  52. package/src/components/organisms/searchTable/components/SearchAndSortBar.tsx +7 -5
  53. package/src/components/organisms/searchTable/components/SearchInput.tsx +4 -2
  54. package/src/components/organisms/searchTable/components/SortButton.tsx +13 -11
  55. package/src/components/organisms/searchTable/components/TableEmptyState.tsx +4 -2
  56. package/src/components/organisms/searchTable/components/TableRow.tsx +6 -4
  57. package/src/components/organisms/searchTable/searchTable.tsx +4 -2
  58. package/src/components/organisms/sidebar/sidebar.props.ts +1 -1
  59. package/src/components/organisms/sidebar/sidebar.tsx +9 -4
  60. package/src/components/organisms/toast/toast.tsx +3 -1
  61. package/src/components/organisms/topbar/topbar.tsx +4 -2
  62. package/src/components/templates/page/page.props.ts +4 -4
  63. package/src/components/templates/page/page.tsx +6 -4
  64. package/src/components/theme-provider/themeProvider.tsx +28 -17
  65. package/src/dev.css +77 -2
  66. package/src/global.d.ts +10 -0
  67. package/src/i18n/context.ts +9 -0
  68. package/src/i18n/index.ts +22 -0
  69. package/src/i18n/locales/en.ts +163 -0
  70. package/src/i18n/locales/es.ts +165 -0
  71. package/src/i18n/provider.tsx +44 -0
  72. package/src/i18n/translator.ts +82 -0
  73. package/src/i18n/types.ts +54 -0
  74. package/src/i18n/useITTranslation.ts +20 -0
  75. package/src/index.css +0 -1
  76. package/src/index.ts +7 -1
  77. package/src/sandbox/LandingShowcase.tsx +224 -580
  78. package/src/sandbox/NotFoundShowcase.tsx +51 -36
  79. package/src/sandbox/TopbarSearch.tsx +6 -4
  80. package/src/sandbox/controls.tsx +180 -0
  81. package/src/sandbox/i18n.ts +1929 -0
  82. package/src/sandbox/icons.tsx +25 -0
  83. package/src/sandbox/locale.tsx +72 -0
  84. package/src/sandbox/ui.tsx +377 -0
  85. package/src/sandbox/useHashRoute.ts +46 -10
  86. package/src/showcases/DataShowcases.tsx +103 -87
  87. package/src/showcases/FeedbackShowcases.tsx +37 -30
  88. package/src/showcases/FormShowcases.tsx +302 -214
  89. package/src/showcases/GettingStartedShowcase.tsx +151 -145
  90. package/src/showcases/HelpShowcase.tsx +126 -128
  91. package/src/showcases/HomeShowcase.tsx +678 -482
  92. package/src/showcases/LayoutPrimitivesShowcases.tsx +129 -114
  93. package/src/showcases/NavigationShowcases.tsx +45 -37
  94. package/src/showcases/PageShowcases.tsx +171 -152
  95. package/src/showcases/ProductoDetalle.tsx +272 -129
  96. package/src/showcases/ShowcaseLayout.tsx +270 -216
  97. package/src/showcases/SizesShowcase.tsx +123 -64
  98. package/src/showcases/StructureShowcases.tsx +157 -131
  99. package/src/showcases/portfolioUi.tsx +153 -0
  100. package/src/showcases/techIcons.ts +3 -0
  101. package/src/utils/table.utils.ts +10 -2
  102. package/src/components/atoms/avatar/avatar.doc.mdx +0 -48
  103. package/src/components/atoms/avatar/avatar.stories.tsx +0 -64
  104. package/src/components/atoms/badget/badget.doc.mdx +0 -46
  105. package/src/components/atoms/badget/badget.stories.tsx +0 -75
  106. package/src/components/atoms/button/button.doc.mdx +0 -59
  107. package/src/components/atoms/button/button.stories.tsx +0 -173
  108. package/src/components/atoms/checkbox/checkbox.doc.mdx +0 -54
  109. package/src/components/atoms/checkbox/checkbox.stories.tsx +0 -53
  110. package/src/components/atoms/chip/chip.doc.mdx +0 -47
  111. package/src/components/atoms/chip/chip.stories.tsx +0 -64
  112. package/src/components/atoms/divider/divider.doc.mdx +0 -42
  113. package/src/components/atoms/divider/divider.stories.tsx +0 -33
  114. package/src/components/atoms/flex/flex.doc.mdx +0 -59
  115. package/src/components/atoms/flex/flex.stories.tsx +0 -70
  116. package/src/components/atoms/grid/grid.doc.mdx +0 -54
  117. package/src/components/atoms/grid/grid.stories.tsx +0 -71
  118. package/src/components/atoms/image/image.doc.mdx +0 -44
  119. package/src/components/atoms/image/image.stories.tsx +0 -48
  120. package/src/components/atoms/input/input.doc.mdx +0 -70
  121. package/src/components/atoms/input/input.stories.tsx +0 -113
  122. package/src/components/atoms/input-number/input-number.doc.mdx +0 -74
  123. package/src/components/atoms/input-number/input-number.stories.tsx +0 -111
  124. package/src/components/atoms/loader/loader.doc.mdx +0 -43
  125. package/src/components/atoms/loader/loader.stories.tsx +0 -104
  126. package/src/components/atoms/popover/popover.doc.mdx +0 -53
  127. package/src/components/atoms/popover/popover.stories.tsx +0 -24
  128. package/src/components/atoms/progress/progress.doc.mdx +0 -48
  129. package/src/components/atoms/progress/progress.stories.tsx +0 -39
  130. package/src/components/atoms/radio/radio.doc.mdx +0 -62
  131. package/src/components/atoms/radio/radio.stories.tsx +0 -48
  132. package/src/components/atoms/segmented-control/segmented-control.doc.mdx +0 -60
  133. package/src/components/atoms/segmented-control/segmented-control.stories.tsx +0 -62
  134. package/src/components/atoms/skeleton/skeleton.doc.mdx +0 -43
  135. package/src/components/atoms/skeleton/skeleton.stories.tsx +0 -29
  136. package/src/components/atoms/slide/slide.doc.mdx +0 -46
  137. package/src/components/atoms/slide/slide.stories.tsx +0 -120
  138. package/src/components/atoms/slider/slider.doc.mdx +0 -49
  139. package/src/components/atoms/slider/slider.stories.tsx +0 -29
  140. package/src/components/atoms/stack/stack.doc.mdx +0 -126
  141. package/src/components/atoms/stack/stack.stories.tsx +0 -283
  142. package/src/components/atoms/text/text.doc.mdx +0 -41
  143. package/src/components/atoms/text/text.stories.tsx +0 -66
  144. package/src/components/atoms/textarea/textarea.doc.mdx +0 -64
  145. package/src/components/atoms/textarea/textarea.stories.tsx +0 -26
  146. package/src/components/atoms/tooltip/tooltip.doc.mdx +0 -47
  147. package/src/components/atoms/tooltip/tooltip.stories.tsx +0 -19
  148. package/src/components/isolation/isolation.stories.tsx +0 -202
  149. package/src/components/molecules/accordion/accordion.doc.mdx +0 -47
  150. package/src/components/molecules/accordion/accordion.stories.tsx +0 -68
  151. package/src/components/molecules/alert/alert.doc.mdx +0 -48
  152. package/src/components/molecules/alert/alert.stories.tsx +0 -40
  153. package/src/components/molecules/breadcrumbs/breadcrumbs.doc.mdx +0 -57
  154. package/src/components/molecules/breadcrumbs/breadcrumbs.stories.tsx +0 -20
  155. package/src/components/molecules/calendar/calendar.doc.mdx +0 -76
  156. package/src/components/molecules/calendar/calendar.stories.tsx +0 -90
  157. package/src/components/molecules/card/card.doc.mdx +0 -54
  158. package/src/components/molecules/card/card.stories.tsx +0 -57
  159. package/src/components/molecules/chip-input/chip-input.doc.mdx +0 -44
  160. package/src/components/molecules/chip-input/chip-input.stories.tsx +0 -52
  161. package/src/components/molecules/date-picker/date-picker.doc.mdx +0 -65
  162. package/src/components/molecules/date-picker/date-picker.stories.tsx +0 -88
  163. package/src/components/molecules/dropdown-menu/dropdown-menu.doc.mdx +0 -46
  164. package/src/components/molecules/dropdown-menu/dropdown-menu.stories.tsx +0 -41
  165. package/src/components/molecules/empty-state/empty-state.doc.mdx +0 -50
  166. package/src/components/molecules/empty-state/empty-state.stories.tsx +0 -19
  167. package/src/components/molecules/field/field.doc.mdx +0 -43
  168. package/src/components/molecules/field/field.stories.tsx +0 -42
  169. package/src/components/molecules/form-header/form-header.doc.mdx +0 -38
  170. package/src/components/molecules/form-header/form-header.stories.tsx +0 -52
  171. package/src/components/molecules/masked-input/masked-input.doc.mdx +0 -78
  172. package/src/components/molecules/masked-input/masked-input.stories.tsx +0 -126
  173. package/src/components/molecules/multi-select/multi-select.doc.mdx +0 -55
  174. package/src/components/molecules/multi-select/multi-select.stories.tsx +0 -59
  175. package/src/components/molecules/pagination/pagination.doc.mdx +0 -62
  176. package/src/components/molecules/pagination/pagination.stories.tsx +0 -110
  177. package/src/components/molecules/search-select/search-select.doc.mdx +0 -77
  178. package/src/components/molecules/search-select/search-select.stories.tsx +0 -146
  179. package/src/components/molecules/select/select.doc.mdx +0 -75
  180. package/src/components/molecules/select/select.stories.tsx +0 -85
  181. package/src/components/molecules/stat-card/stat-card.doc.mdx +0 -48
  182. package/src/components/molecules/stat-card/stat-card.stories.tsx +0 -40
  183. package/src/components/molecules/stepper/stepper.doc.mdx +0 -54
  184. package/src/components/molecules/stepper/stepper.stories.tsx +0 -154
  185. package/src/components/molecules/table/table.doc.mdx +0 -140
  186. package/src/components/molecules/table/table.stories.tsx +0 -402
  187. package/src/components/molecules/tabs/tabs.doc.mdx +0 -52
  188. package/src/components/molecules/tabs/tabs.stories.tsx +0 -31
  189. package/src/components/molecules/time-picker/timePicker.doc.mdx +0 -68
  190. package/src/components/molecules/time-picker/timePicker.stories.tsx +0 -130
  191. package/src/components/molecules/wysiwyg/wysiwyg.stories.tsx +0 -95
  192. package/src/components/organisms/confirm-dialog/confirm-dialog.doc.mdx +0 -60
  193. package/src/components/organisms/confirm-dialog/confirm-dialog.stories.tsx +0 -32
  194. package/src/components/organisms/data-table/ITDataTable.doc.mdx +0 -132
  195. package/src/components/organisms/data-table/ITDataTable.stories.tsx +0 -353
  196. package/src/components/organisms/dialog/dialog.doc.mdx +0 -54
  197. package/src/components/organisms/dialog/dialog.stories.tsx +0 -126
  198. package/src/components/organisms/drawer/drawer.doc.mdx +0 -59
  199. package/src/components/organisms/drawer/drawer.stories.tsx +0 -40
  200. package/src/components/organisms/dropfile/dropfile.doc.mdx +0 -74
  201. package/src/components/organisms/dropfile/dropfile.stories.tsx +0 -93
  202. package/src/components/organisms/form-builder/formBuilder.doc.mdx +0 -251
  203. package/src/components/organisms/form-builder/formBuilder.stories.tsx +0 -914
  204. package/src/components/organisms/navbar/navbar.doc.mdx +0 -77
  205. package/src/components/organisms/navbar/navbar.stories.tsx +0 -83
  206. package/src/components/organisms/page-header/page-header.doc.mdx +0 -54
  207. package/src/components/organisms/page-header/page-header.stories.tsx +0 -74
  208. package/src/components/organisms/searchTable/searchTable.doc.mdx +0 -79
  209. package/src/components/organisms/searchTable/searchTable.stories.tsx +0 -73
  210. package/src/components/organisms/sidebar/sidebar.doc.mdx +0 -176
  211. package/src/components/organisms/sidebar/sidebar.stories.tsx +0 -234
  212. package/src/components/organisms/toast/toast.doc.mdx +0 -50
  213. package/src/components/organisms/toast/toast.stories.tsx +0 -137
  214. package/src/components/organisms/topbar/topbar.doc.mdx +0 -72
  215. package/src/components/organisms/topbar/topbar.stories.tsx +0 -79
  216. package/src/components/organisms/triple-filter/tripleFilter.doc.mdx +0 -62
  217. package/src/components/organisms/triple-filter/tripleFilter.stories.tsx +0 -31
  218. package/src/components/templates/layout/layout.doc.mdx +0 -53
  219. package/src/components/templates/layout/layout.stories.tsx +0 -113
  220. package/src/components/templates/page/page.doc.mdx +0 -86
  221. package/src/components/templates/page/page.stories.tsx +0 -97
  222. package/src/components/theme-provider/themeProvider.doc.mdx +0 -85
  223. package/src/components/theme-provider/themeProvider.stories.tsx +0 -58
@@ -1,283 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import { useState } from "react";
3
- import ITStack from "@/components/atoms/stack/stack";
4
-
5
- const meta: Meta<typeof ITStack> = {
6
- title: "Layout/ITStack",
7
- component: ITStack,
8
- argTypes: {
9
- direction: {
10
- control: "select",
11
- options: ["row", "column", "row-reverse", "column-reverse"],
12
- description: "Flex direction. Default: column.",
13
- },
14
- spacing: {
15
- control: { type: "range", min: 0, max: 16, step: 1 },
16
- description: "Gap between children in 0.25rem units. Default: 0.",
17
- },
18
- alignItems: {
19
- control: "select",
20
- options: [undefined, "start", "end", "center", "stretch", "baseline"],
21
- description: "Cross-axis alignment.",
22
- },
23
- justifyContent: {
24
- control: "select",
25
- options: [undefined, "start", "end", "center", "between", "around", "evenly"],
26
- description: "Main-axis justification.",
27
- },
28
- flexWrap: {
29
- control: "select",
30
- options: [undefined, "nowrap", "wrap", "wrap-reverse"],
31
- description: "Flex wrap behavior.",
32
- },
33
- as: {
34
- control: "select",
35
- options: ["div", "section", "nav", "ul", "ol", "main", "article", "header", "footer", "aside", "form"],
36
- description: "HTML element to render.",
37
- },
38
- },
39
- };
40
-
41
- export default meta;
42
- type Story = StoryObj<typeof ITStack>;
43
-
44
- const Box = ({ children, className = "" }: { children: string; className?: string }) => (
45
- <div className={`bg-primary-100 text-primary-800 rounded-lg p-4 text-center font-medium ${className}`}>
46
- {children}
47
- </div>
48
- );
49
-
50
- // ── Basic direction examples ──
51
-
52
- export const Vertical: Story = {
53
- args: { direction: "column", spacing: 2 },
54
- render: (args) => (
55
- <ITStack {...args}>
56
- <Box>Item 1</Box>
57
- <Box>Item 2</Box>
58
- <Box>Item 3</Box>
59
- </ITStack>
60
- ),
61
- };
62
-
63
- export const Horizontal: Story = {
64
- args: { direction: "row", spacing: 2 },
65
- render: (args) => (
66
- <ITStack {...args}>
67
- <Box>Item 1</Box>
68
- <Box>Item 2</Box>
69
- <Box>Item 3</Box>
70
- </ITStack>
71
- ),
72
- };
73
-
74
- // ── All direction variants ──
75
-
76
- export const AllDirections: Story = {
77
- render: () => (
78
- <ITStack spacing={6}>
79
- {(["column", "row", "column-reverse", "row-reverse"] as const).map((dir) => (
80
- <div key={dir}>
81
- <p className="text-xs font-semibold text-slate-400 mb-1.5 uppercase tracking-wider">{dir}</p>
82
- <div className="bg-slate-50 dark:bg-slate-900/50 rounded-xl p-4 border border-dashed border-slate-200 dark:border-slate-700">
83
- <ITStack direction={dir} spacing={2}>
84
- <Box>First</Box>
85
- <Box>Second</Box>
86
- <Box>Third</Box>
87
- </ITStack>
88
- </div>
89
- </div>
90
- ))}
91
- </ITStack>
92
- ),
93
- };
94
-
95
- // ── Spacing variants ──
96
-
97
- export const SpacingVariants: Story = {
98
- render: () => (
99
- <ITStack spacing={4}>
100
- {[0, 1, 2, 4, 6, 8, 10, 12].map((gap) => (
101
- <div key={gap}>
102
- <p className="text-xs font-semibold text-slate-400 mb-1.5">spacing={gap} — {gap * 0.25}rem</p>
103
- <div className="bg-slate-50 dark:bg-slate-900/50 rounded-xl p-4">
104
- <ITStack direction="row" spacing={gap}>
105
- <Box>Item 1</Box>
106
- <Box>Item 2</Box>
107
- <Box>Item 3</Box>
108
- </ITStack>
109
- </div>
110
- </div>
111
- ))}
112
- </ITStack>
113
- ),
114
- };
115
-
116
- // ── Justify Content showcase ──
117
-
118
- export const JustifyContent: Story = {
119
- render: () => (
120
- <ITStack spacing={2}>
121
- {(["start", "center", "end", "between", "around", "evenly"] as const).map((j) => (
122
- <div key={j}>
123
- <p className="text-xs font-semibold text-slate-400 mb-1.5">{j}</p>
124
- <div className="bg-slate-50 dark:bg-slate-900/50 rounded-xl p-4">
125
- <ITStack direction="row" spacing={2} justifyContent={j} className="w-full">
126
- <div className="w-10 h-10 rounded-lg bg-primary-400/60" />
127
- <div className="w-10 h-10 rounded-lg bg-cyan-400/60" />
128
- <div className="w-10 h-10 rounded-lg bg-violet-400/60" />
129
- </ITStack>
130
- </div>
131
- </div>
132
- ))}
133
- </ITStack>
134
- ),
135
- };
136
-
137
- // ── Align Items showcase ──
138
-
139
- export const AlignItems: Story = {
140
- render: () => (
141
- <ITStack spacing={2}>
142
- {(["start", "center", "end", "stretch", "baseline"] as const).map((a) => (
143
- <div key={a}>
144
- <p className="text-xs font-semibold text-slate-400 mb-1.5">{a}</p>
145
- <div className="bg-slate-50 dark:bg-slate-900/50 rounded-xl p-4">
146
- <ITStack direction="row" spacing={2} alignItems={a} className="h-20 border border-dashed border-slate-300 dark:border-slate-600 rounded-lg">
147
- <div className="w-10 h-6 rounded bg-primary-400/60" />
148
- <div className="w-10 h-12 rounded bg-cyan-400/60" />
149
- <div className="w-10 h-8 rounded bg-violet-400/60" />
150
- </ITStack>
151
- </div>
152
- </div>
153
- ))}
154
- </ITStack>
155
- ),
156
- };
157
-
158
- // ── With interactive controls ──
159
-
160
- export const Playground: Story = {
161
- render: function PlaygroundStory() {
162
- const [direction, setDirection] = useState<"row" | "column">("column");
163
- const [spacing, setSpacing] = useState(3);
164
- const [showDivider, setShowDivider] = useState(false);
165
-
166
- return (
167
- <ITStack spacing={6}>
168
- <ITStack direction="row" spacing={3} flexWrap="wrap">
169
- <label className="flex items-center gap-2 text-sm">
170
- <span className="text-slate-500">Direction:</span>
171
- <select value={direction} onChange={(e) => setDirection(e.target.value as any)} className="rounded border px-2 py-1 text-sm bg-white dark:bg-slate-800">
172
- <option value="column">Column</option>
173
- <option value="row">Row</option>
174
- </select>
175
- </label>
176
- <label className="flex items-center gap-2 text-sm">
177
- <span className="text-slate-500">Spacing:</span>
178
- <input type="range" min={0} max={12} value={spacing} onChange={(e) => setSpacing(Number(e.target.value))} className="w-24" />
179
- <span className="text-xs font-mono">{spacing}</span>
180
- </label>
181
- <label className="flex items-center gap-2 text-sm">
182
- <input type="checkbox" checked={showDivider} onChange={(e) => setShowDivider(e.target.checked)} />
183
- <span className="text-slate-500">Divider</span>
184
- </label>
185
- </ITStack>
186
- <div className="bg-slate-50 dark:bg-slate-900/50 rounded-xl p-6 border border-dashed border-slate-200 dark:border-slate-700">
187
- <ITStack
188
- direction={direction}
189
- spacing={spacing}
190
- divider={showDivider ? <div className={`${direction === "row" ? "w-px h-8" : "h-px w-full"} bg-slate-300 dark:bg-slate-600 self-center`} /> : undefined}
191
- >
192
- <Box>Item 1</Box>
193
- <Box>Item 2</Box>
194
- <Box>Item 3</Box>
195
- </ITStack>
196
- </div>
197
- <pre className="text-xs bg-slate-950 text-slate-200 rounded-lg p-3 overflow-x-auto">
198
- {`<ITStack direction="${direction}" spacing={${spacing}}${showDivider ? `\n divider={${direction === "row" ? '<div className="w-px h-8" />' : '<div className="h-px w-full" />'}}` : ""}>
199
- <Box>Item 1</Box>
200
- <Box>Item 2</Box>
201
- <Box>Item 3</Box>
202
- </ITStack>`}
203
- </pre>
204
- </ITStack>
205
- );
206
- },
207
- };
208
-
209
- // ── Real-world examples ──
210
-
211
- export const ToolbarExample: Story = {
212
- render: () => (
213
- <div className="bg-white dark:bg-slate-800 rounded-xl border border-slate-200 dark:border-slate-700 p-4 w-full max-w-lg">
214
- <ITStack direction="row" spacing={2} justifyContent="between" alignItems="center">
215
- <ITStack direction="row" spacing={1} alignItems="center">
216
- <p className="text-sm font-bold text-slate-700 dark:text-slate-200">Document</p>
217
- <span className="text-xs text-slate-400">• Saved</span>
218
- </ITStack>
219
- <ITStack direction="row" spacing={1}>
220
- <div className="px-3 py-1.5 rounded-md bg-primary-500 text-white text-xs font-medium cursor-pointer">Save</div>
221
- <div className="px-3 py-1.5 rounded-md bg-slate-100 dark:bg-slate-700 text-slate-600 dark:text-slate-300 text-xs cursor-pointer">Cancel</div>
222
- </ITStack>
223
- </ITStack>
224
- </div>
225
- ),
226
- };
227
-
228
- export const FormRowExample: Story = {
229
- render: () => (
230
- <div className="bg-white dark:bg-slate-800 rounded-xl border border-slate-200 dark:border-slate-700 p-4 w-full max-w-xl">
231
- <ITStack direction="row" spacing={3} flexWrap="wrap">
232
- {["First Name", "Last Name", "Email"].map((label) => (
233
- <div key={label} className="flex-1 min-w-[140px]">
234
- <p className="text-xs font-semibold text-slate-500 mb-1">{label}</p>
235
- <input className="w-full h-9 rounded-md border border-slate-200 dark:border-slate-600 bg-slate-50 dark:bg-slate-800/50 px-3 text-sm" placeholder={label} readOnly />
236
- </div>
237
- ))}
238
- </ITStack>
239
- </div>
240
- ),
241
- };
242
-
243
- export const TagCloudExample: Story = {
244
- render: () => {
245
- const tags = ["React", "TypeScript", "Tailwind CSS", "Vite", "Storybook", "CSS Variables", "Flexbox", "Accessibility", "Dark Mode", "Theming", "Responsive"];
246
- return (
247
- <div className="bg-white dark:bg-slate-800 rounded-xl border border-slate-200 dark:border-slate-700 p-4 w-full max-w-lg">
248
- <ITStack direction="row" spacing={1} flexWrap="wrap">
249
- {tags.map((tag) => (
250
- <span key={tag} className="px-2.5 py-1 rounded-full text-xs font-medium bg-primary-50 text-primary-700 dark:bg-primary-900/30 dark:text-primary-400 border border-primary-200 dark:border-primary-800">
251
- {tag}
252
- </span>
253
- ))}
254
- </ITStack>
255
- </div>
256
- );
257
- },
258
- };
259
-
260
- export const SectionWithDividers: Story = {
261
- render: () => (
262
- <div className="bg-white dark:bg-slate-800 rounded-xl border border-slate-200 dark:border-slate-700 w-full max-w-sm">
263
- <ITStack spacing={0} divider={<div className="h-px bg-slate-100 dark:bg-slate-700" />}>
264
- {["Profile Settings", "Security & Privacy", "Notifications", "Billing & Plans", "API Keys"].map((item) => (
265
- <div key={item} className="flex items-center justify-between py-3 px-4 hover:bg-slate-50 dark:hover:bg-slate-800/50 cursor-pointer transition-colors">
266
- <span className="text-sm text-slate-700 dark:text-slate-200">{item}</span>
267
- <span className="text-slate-300 dark:text-slate-600">→</span>
268
- </div>
269
- ))}
270
- </ITStack>
271
- </div>
272
- ),
273
- };
274
-
275
- export const CenteredHero: Story = {
276
- render: () => (
277
- <ITStack spacing={4} alignItems="center" justifyContent="center" className="h-64 bg-slate-50 dark:bg-slate-900/50 rounded-xl border border-dashed border-slate-200 dark:border-slate-700">
278
- <h2 className="text-2xl font-bold text-slate-800 dark:text-white">Welcome back</h2>
279
- <p className="text-slate-500 dark:text-slate-400 text-sm">Select a workspace to continue</p>
280
- <div className="px-4 py-2 rounded-lg bg-primary-500 text-white text-sm font-medium cursor-pointer">Get Started</div>
281
- </ITStack>
282
- ),
283
- };
@@ -1,41 +0,0 @@
1
- import { Meta, Title, Description, Primary, Controls, Stories } from '@storybook/blocks';
2
- import * as StoriesData from './text.stories';
3
-
4
- <Meta of={StoriesData} />
5
-
6
- # ITText
7
-
8
- Semantic typography wrapper rendering any HTML text element. Foundation for all text in the system.
9
-
10
- ## Props
11
-
12
- | Prop | Type | Default | Description |
13
- |------|------|---------|-------------|
14
- | `as` | `'p' \| 'span' \| 'h1' \| 'h2' \| 'h3' \| 'h4' \| 'h5' \| 'h6' \| 'small' \| 'label' \| 'strong' \| 'em'` | `'p'` | HTML element to render |
15
- | `muted` | `boolean` | `false` | Apply muted style via CSS variable |
16
- | `children` | `ReactNode` | — | Text content |
17
-
18
- ## Usage
19
-
20
- ```tsx
21
- import { ITText } from '@axzydev/axzy_ui_system';
22
-
23
- <ITText>Default paragraph text</ITText>
24
- <ITText as="h1">Heading level 1</ITText>
25
- <ITText as="span" muted>Muted secondary text</ITText>
26
- <ITText as="small">Small print</ITText>
27
- <ITText as="strong">Bold emphasis</ITText>
28
- ```
29
-
30
- ## Notes
31
-
32
- - Polymorphic `as` prop renders any HTML text-level element
33
- - `muted` toggles a CSS variable for reduced-importance text
34
- - Used as the foundational text component throughout the system
35
- - Renders default paragraph (`<p>`) when no `as` specified
36
-
37
- ## Stories
38
-
39
- <Primary />
40
- <Controls />
41
- <Stories />
@@ -1,66 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import ITText from '@/components/atoms/text/text';
3
-
4
- const meta = {
5
- title: 'Components/Layout & Navigation/ITText',
6
- component: ITText,
7
- parameters: { layout: 'centered' },
8
- argTypes: {
9
- as: {
10
- control: 'select',
11
- options: ['p', 'span', 'div', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'small', 'strong', 'em', 'label'],
12
- description: 'HTML element to render',
13
- },
14
- children: { control: 'text', description: 'Text content' },
15
- muted: { control: 'boolean', description: 'Apply muted text color' },
16
- className: { control: 'text', description: 'Additional CSS classes' },
17
- },
18
- } satisfies Meta<typeof ITText>;
19
-
20
- export default meta;
21
- type Story = StoryObj<typeof meta>;
22
-
23
- export const Paragraph: Story = {
24
- args: {
25
- as: 'p',
26
- children: 'This is a paragraph of text rendered via ITText.',
27
- className: 'text-base',
28
- },
29
- };
30
-
31
- export const Headings: Story = {
32
- render: () => (
33
- <div className="space-y-3">
34
- <ITText as="h1" className="text-4xl font-bold">Heading 1</ITText>
35
- <ITText as="h2" className="text-3xl font-bold">Heading 2</ITText>
36
- <ITText as="h3" className="text-2xl font-semibold">Heading 3</ITText>
37
- <ITText as="h4" className="text-xl font-semibold">Heading 4</ITText>
38
- <ITText as="h5" className="text-lg font-medium">Heading 5</ITText>
39
- <ITText as="h6" className="text-base font-medium">Heading 6</ITText>
40
- </div>
41
- ),
42
- };
43
-
44
- export const Muted: Story = {
45
- args: {
46
- as: 'p',
47
- children: 'This text appears muted / secondary.',
48
- muted: true,
49
- className: 'text-sm',
50
- },
51
- };
52
-
53
- export const InlineElements: Story = {
54
- render: () => (
55
- <div className="space-y-2">
56
- <ITText as="p">
57
- This is <ITText as="strong" className="font-bold">bold</ITText>,{' '}
58
- <ITText as="em" className="italic">italic</ITText>, and{' '}
59
- <ITText as="small" className="text-xs">small</ITText> text.
60
- </ITText>
61
- <ITText as="p">
62
- A <ITText as="span" className="text-primary-600 font-mono">span</ITText> can be used for inline styling.
63
- </ITText>
64
- </div>
65
- ),
66
- };
@@ -1,64 +0,0 @@
1
- import { Meta, Title, Description, Primary, Controls, Stories } from '@storybook/blocks';
2
- import * as StoriesData from './textarea.stories';
3
-
4
- <Meta of={StoriesData} />
5
-
6
- # ITTextarea
7
-
8
- Multi-line text input with label, validation error display, character limit, and configurable resize behavior. Built on native `<textarea>` with consistent styling and focus ring effects.
9
-
10
- ## Props
11
-
12
- | Prop | Type | Default | Description |
13
- |------|------|---------|-------------|
14
- | `value` | `string` | — | Controlled value of the textarea. |
15
- | `onChange` | `(value: string) => void` | — | Callback fired when the value changes, receiving the new string. |
16
- | `label` | `string` | — | Label text rendered above the textarea. |
17
- | `placeholder` | `string` | — | Placeholder text shown when the textarea is empty. |
18
- | `rows` | `number` | `4` | Number of visible text rows. |
19
- | `disabled` | `boolean` | `false` | Disables the textarea when true. |
20
- | `error` | `string` | — | Validation error message displayed below the textarea. |
21
- | `className` | `string` | — | Additional CSS classes for the wrapper. |
22
- | `name` | `string` | — | Name attribute for form submission and label association via `htmlFor`. |
23
- | `maxLength` | `number` | — | Maximum number of characters allowed. |
24
- | `resize` | `"none" \| "vertical" \| "horizontal" \| "both"` | `"vertical"` | Resize behavior of the textarea. |
25
-
26
- ## Usage
27
-
28
- ```tsx
29
- import { ITTextarea } from '@axzydev/axzy_ui_system';
30
-
31
- <ITTextarea
32
- name="bio"
33
- label="Biography"
34
- value={bio}
35
- onChange={setBio}
36
- maxLength={500}
37
- rows={6}
38
- resize="vertical"
39
- error={bio.length > 500 ? "Max 500 characters" : undefined}
40
- />
41
-
42
- <ITTextarea
43
- name="comments"
44
- label="Comments"
45
- placeholder="Write your feedback..."
46
- rows={3}
47
- resize="none"
48
- disabled
49
- />
50
- ```
51
-
52
- ## Notes
53
-
54
- - **resize** controls the native CSS resize property: `none` (no resize handle), `vertical` (height only), `horizontal` (width only), or `both`.
55
- - **error** renders a red error message below the textarea and applies red border/ring styling.
56
- - **maxLength** enforces a hard character limit via the native `maxLength` attribute — no visual counter included.
57
- - **rows** only sets the initial visible height; combined with `resize`, the user can adjust as needed.
58
- - Disabled state applies `opacity-50` and `cursor-not-allowed` with a gray background.
59
-
60
- ## Stories
61
-
62
- <Primary />
63
- <Controls />
64
- <Stories />
@@ -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
- };