@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,173 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import ITButton from '@/components/atoms/button/button';
3
-
4
- const meta = {
5
- title: 'Components/Actions/ITButton',
6
- component: ITButton,
7
- parameters: {
8
- layout: 'centered',
9
- },
10
- argTypes: {
11
- color: {
12
- control: 'select',
13
- options: ['primary', 'secondary', 'success', 'danger', 'warning', 'purple', 'info'],
14
- description: 'The semantic color of the button',
15
- },
16
- variant: {
17
- control: 'select',
18
- options: ['filled', 'outlined', 'raised', 'rounded', 'text', 'raised-text', 'icon-only', 'link'],
19
- description: 'The visual style variant',
20
- },
21
- size: {
22
- control: 'select',
23
- options: ['small', 'medium', 'large'],
24
- description: 'Button size (padding/font)',
25
- },
26
- label: { control: 'text' },
27
- disabled: { control: 'boolean' },
28
- },
29
- } satisfies Meta<typeof ITButton>;
30
-
31
- export default meta;
32
- type Story = StoryObj<typeof meta>;
33
-
34
- // 1. Filled (Default)
35
- export const Filled: Story = {
36
- args: {
37
- label: 'Filled Button',
38
- color: 'primary',
39
- variant: 'filled',
40
- },
41
- };
42
-
43
- // 2. Outlined
44
- export const Outlined: Story = {
45
- args: {
46
- label: 'Outlined Button',
47
- color: 'primary',
48
- variant: 'outlined',
49
- },
50
- };
51
-
52
- // 3. Raised (Shadow)
53
- export const Raised: Story = {
54
- args: {
55
- label: 'Raised Button',
56
- color: 'primary',
57
- variant: 'raised',
58
- },
59
- };
60
-
61
- // 4. Rounded (Pill)
62
- export const Rounded: Story = {
63
- args: {
64
- label: 'Rounded Button',
65
- color: 'success',
66
- variant: 'rounded',
67
- },
68
- };
69
-
70
- // 5. Text (Ghost)
71
- export const Text: Story = {
72
- args: {
73
- label: 'Text Button',
74
- color: 'info',
75
- variant: 'text',
76
- },
77
- };
78
-
79
- // 6. Raised Text (Elevated White)
80
- export const RaisedText: Story = {
81
- args: {
82
- label: 'Raised Text',
83
- color: 'warning',
84
- variant: 'raised-text',
85
- },
86
- };
87
-
88
- // 7. With Icon (icon prop + label)
89
- export const WithIcon: Story = {
90
- args: {
91
- label: 'Guardar',
92
- color: 'primary',
93
- variant: 'filled',
94
- icon: <span style={{ fontSize: '1em' }}>💾</span>,
95
- },
96
- };
97
-
98
- // 8. Icon Only
99
- export const IconOnly: Story = {
100
- args: {
101
- color: 'danger',
102
- variant: 'icon-only',
103
- children: <span style={{ fontSize: '1.2em' }}>★</span>,
104
- ariaLabel: 'Favorite',
105
- },
106
- };
107
-
108
- // 8. Link
109
- export const Link: Story = {
110
- args: {
111
- label: 'Link Button',
112
- color: 'primary',
113
- variant: 'link',
114
- },
115
- };
116
-
117
- // 9. All Colors Showcase (Kitchen Sink for colors)
118
- export const AllColors: Story = {
119
- render: (args) => (
120
- <div className="flex flex-wrap gap-4">
121
- {['primary', 'secondary', 'success', 'danger', 'warning', 'purple', 'info'].map((color) => (
122
- <ITButton key={color} {...args} color={color as any} label={color.charAt(0).toUpperCase() + color.slice(1)} />
123
- ))}
124
- </div>
125
- ),
126
- args: {
127
- variant: 'filled',
128
- },
129
- };
130
-
131
- // 9. Disabled
132
- export const Disabled: Story = {
133
- args: {
134
- label: 'Disabled Button',
135
- disabled: true,
136
- color: 'primary',
137
- variant: 'filled',
138
- },
139
- };
140
-
141
- // 10. All Combinations (Matrix)
142
- export const AllCombinations: Story = {
143
- render: (args) => {
144
- const colors = ['primary', 'secondary', 'success', 'danger', 'warning', 'purple', 'info'];
145
- const variants = ['filled', 'outlined', 'raised', 'rounded', 'text', 'raised-text', 'icon-only', 'link'];
146
-
147
- return (
148
- <div className="flex flex-col gap-8">
149
- {variants.map((variant) => (
150
- <div key={variant} className="flex flex-col gap-2">
151
- <h3 className="text-sm font-bold uppercase text-gray-400">{variant}</h3>
152
- <div className="flex flex-wrap gap-4 items-center">
153
- {colors.map((color) => (
154
- <ITButton
155
- key={`${variant}-${color}`}
156
- {...args}
157
- color={color as any}
158
- variant={variant as any}
159
- label={variant === 'icon-only' ? undefined : (color.charAt(0).toUpperCase() + color.slice(1))}
160
- ariaLabel={variant === 'icon-only' ? color : undefined}
161
- >
162
- {variant === 'icon-only' ? <span style={{ fontSize: '1.2em' }}>★</span> : undefined}
163
- </ITButton>
164
- ))}
165
- </div>
166
- </div>
167
- ))}
168
- </div>
169
- );
170
- },
171
- args: {},
172
- };
173
-
@@ -1,54 +0,0 @@
1
- import { Meta, Title, Description, Primary, Controls, Stories } from '@storybook/blocks';
2
- import * as StoriesData from './checkbox.stories';
3
-
4
- <Meta of={StoriesData} />
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,53 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import { useState } from "react";
3
- import ITCheckbox from "@/components/atoms/checkbox/checkbox";
4
- import ITStack from "@/components/atoms/stack/stack";
5
-
6
- const meta: Meta<typeof ITCheckbox> = {
7
- title: "Components/Inputs/ITCheckbox",
8
- component: ITCheckbox,
9
- };
10
-
11
- export default meta;
12
- type Story = StoryObj<typeof ITCheckbox>;
13
-
14
- export const Default: Story = {
15
- render: () => {
16
- const [val, setVal] = useState(false);
17
- return <ITCheckbox checked={val} onChange={setVal} label="Acepto términos" />;
18
- },
19
- };
20
-
21
- export const Indeterminate: Story = {
22
- args: { indeterminate: true, label: "Selección parcial" },
23
- };
24
-
25
- export const Disabled: Story = {
26
- args: { checked: true, disabled: true, label: "Opción bloqueada" },
27
- };
28
-
29
- export const Group: Story = {
30
- render: () => {
31
- const [vals, setVals] = useState<Record<string, boolean>>({ a: true, b: false, c: false });
32
- const all = Object.values(vals).every(Boolean);
33
- const some = Object.values(vals).some(Boolean) && !all;
34
- return (
35
- <ITStack spacing={2}>
36
- <ITCheckbox
37
- checked={all}
38
- indeterminate={some}
39
- onChange={(v) => setVals({ a: v, b: v, c: v })}
40
- label="Seleccionar todo"
41
- />
42
- {Object.entries(vals).map(([k, v]) => (
43
- <ITCheckbox
44
- key={k}
45
- checked={v}
46
- onChange={(val) => setVals(p => ({ ...p, [k]: val }))}
47
- label={`Opción ${k.toUpperCase()}`}
48
- />
49
- ))}
50
- </ITStack>
51
- );
52
- },
53
- };
@@ -1,47 +0,0 @@
1
- import { Meta, Title, Description, Primary, Controls, Stories } from '@storybook/blocks';
2
- import * as StoriesData from './chip.stories';
3
-
4
- <Meta of={StoriesData} />
5
-
6
- # ITChip
7
-
8
- Compact tag / pill for labels, active filters, and multi-value selections.
9
-
10
- ## Props
11
-
12
- | Prop | Type | Default | Description |
13
- |------|------|---------|-------------|
14
- | `label` | `string` | — | Text label. Overridden by `children`. |
15
- | `children` | `ReactNode` | — | Custom content inside the chip. |
16
- | `color` | semantic color key | `"secondary"` | Palette color. |
17
- | `size` | `"sm" \| "md" \| "lg"` | `"md"` | Chip size. |
18
- | `variant` | `"soft" \| "filled" \| "outlined"` | `"soft"` | Visual style. |
19
- | `icon` | `ReactNode` | — | Icon before the label. |
20
- | `removable` | `boolean` | `false` | Shows an (X) button. |
21
- | `onRemove` | `() => void` | — | Fired when the remove button is pressed. |
22
- | `onClick` | `() => void` | — | Makes the chip clickable (filter/toggle). |
23
- | `selected` | `boolean` | `false` | Highlights the chip as selected. |
24
- | `disabled` | `boolean` | `false` | Disables interactions. |
25
- | `className` | `string` | — | Extra CSS classes. |
26
-
27
- ## Usage
28
-
29
- ```tsx
30
- import { ITChip } from '@axzydev/axzy_ui_system';
31
-
32
- <ITChip label="React" color="primary" />
33
- <ITChip label="México" color="success" variant="outlined" removable onRemove={remove} />
34
- <ITChip label="Activos" selected onClick={toggle} />
35
- ```
36
-
37
- ## Notes
38
-
39
- - Colors come from `theme.colors`, so they follow the active theme/dark mode.
40
- - Interactive chips (`onClick`) expose `role="button"` and keyboard support (Enter/Space).
41
- - The remove button is a nested `<button>`; keep `onClick` on the chip for selection toggles.
42
-
43
- ## Stories
44
-
45
- <Primary />
46
- <Controls />
47
- <Stories />
@@ -1,64 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import ITChip from "@/components/atoms/chip/chip";
3
-
4
- const meta: Meta<typeof ITChip> = {
5
- title: "Components/Data Display/ITChip",
6
- component: ITChip,
7
- parameters: { layout: "centered" },
8
- argTypes: {
9
- color: {
10
- control: "select",
11
- options: ["primary", "secondary", "success", "danger", "warning", "info", "purple"],
12
- },
13
- size: { control: "select", options: ["sm", "md", "lg"] },
14
- variant: { control: "select", options: ["soft", "filled", "outlined"] },
15
- selected: { control: "boolean" },
16
- disabled: { control: "boolean" },
17
- removable: { control: "boolean" },
18
- },
19
- };
20
-
21
- export default meta;
22
- type Story = StoryObj<typeof ITChip>;
23
-
24
- export const Default: Story = {
25
- args: { label: "React", color: "primary" },
26
- };
27
-
28
- export const Variants: Story = {
29
- render: () => (
30
- <div className="flex flex-wrap items-center gap-3">
31
- <ITChip label="Soft" variant="soft" color="primary" />
32
- <ITChip label="Filled" variant="filled" color="primary" />
33
- <ITChip label="Outlined" variant="outlined" color="primary" />
34
- </div>
35
- ),
36
- };
37
-
38
- export const Colors: Story = {
39
- render: () => (
40
- <div className="flex flex-wrap items-center gap-3">
41
- {["primary", "secondary", "success", "danger", "warning", "info", "purple"].map((c) => (
42
- <ITChip key={c} label={c} color={c as never} />
43
- ))}
44
- </div>
45
- ),
46
- };
47
-
48
- export const Sizes: Story = {
49
- render: () => (
50
- <div className="flex flex-wrap items-center gap-3">
51
- <ITChip label="Small" size="sm" />
52
- <ITChip label="Medium" size="md" />
53
- <ITChip label="Large" size="lg" />
54
- </div>
55
- ),
56
- };
57
-
58
- export const Removable: Story = {
59
- args: { label: "México", color: "success", removable: true },
60
- };
61
-
62
- export const Selected: Story = {
63
- args: { label: "Activos", color: "primary", selected: true, onClick: () => {} },
64
- };
@@ -1,42 +0,0 @@
1
- import { Meta, Title, Description, Primary, Controls, Stories } from '@storybook/blocks';
2
- import * as StoriesData from './divider.stories';
3
-
4
- <Meta of={StoriesData} />
5
-
6
- # ITDivider
7
-
8
- A thin horizontal or vertical separator line for visually dividing content sections. Supports custom color and thickness via Tailwind utility classes.
9
-
10
- ## Props
11
-
12
- | Prop | Type | Default | Description |
13
- |------|------|---------|-------------|
14
- | `orientation` | `"horizontal" \| "vertical"` | `"horizontal"` | Direction the divider flows. |
15
- | `className` | `string` | — | Additional CSS classes. |
16
- | `color` | `string` | `"bg-slate-200 dark:bg-slate-700"` | Tailwind background color class(es). |
17
- | `thickness` | `string` | `"h-px"` (horizontal) / `"w-px"` (vertical) | Tailwind width/height utility. |
18
-
19
- ## Usage
20
-
21
- ```tsx
22
- import { ITDivider } from '@axzydev/axzy_ui_system';
23
-
24
- <ITDivider />
25
-
26
- <ITDivider orientation="vertical" color="bg-red-500" thickness="w-1" />
27
-
28
- <ITDivider color="bg-primary-300" thickness="h-0.5" />
29
- ```
30
-
31
- ## Notes
32
-
33
- - Horizontal divider is full-width by default; vertical divider is full-height of its parent.
34
- - Use in combination with ITStack or ITFlex for consistent layout spacing between sections.
35
- - Auto-detects orientation for default thickness: `h-px` for horizontal, `w-px` for vertical.
36
- - The `color` prop accepts any valid Tailwind background color class, including dark mode variants.
37
-
38
- ## Stories
39
-
40
- <Primary />
41
- <Controls />
42
- <Stories />
@@ -1,33 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import ITDivider from "@/components/atoms/divider/divider";
3
- import ITStack from "@/components/atoms/stack/stack";
4
- import ITFlex from "@/components/atoms/flex/flex";
5
-
6
- const meta: Meta<typeof ITDivider> = {
7
- title: "Components/Layout/ITDivider",
8
- component: ITDivider,
9
- };
10
-
11
- export default meta;
12
- type Story = StoryObj<typeof ITDivider>;
13
-
14
- export const Horizontal: Story = {
15
- args: { orientation: "horizontal" },
16
- };
17
-
18
- export const Vertical: Story = {
19
- decorators: [(Story) => <ITFlex gap={3} className="h-12"><span>Left</span><Story /><span>Right</span></ITFlex>],
20
- args: { orientation: "vertical" },
21
- };
22
-
23
- export const InStack: Story = {
24
- render: () => (
25
- <ITStack spacing={3}>
26
- <div className="p-3 bg-slate-50 rounded-lg text-sm">Sección 1</div>
27
- <ITDivider />
28
- <div className="p-3 bg-slate-50 rounded-lg text-sm">Sección 2</div>
29
- <ITDivider />
30
- <div className="p-3 bg-slate-50 rounded-lg text-sm">Sección 3</div>
31
- </ITStack>
32
- ),
33
- };
@@ -1,59 +0,0 @@
1
- import { Meta, Title, Description, Primary, Controls, Stories } from '@storybook/blocks';
2
- import * as StoriesData from './flex.stories';
3
-
4
- <Meta of={StoriesData} />
5
-
6
- # ITFlex
7
-
8
- A complete flexbox layout container exposing the full CSS Flexbox API through React props. Supports direction, wrap, alignment, justification, gap, grow, shrink, basis, and custom element rendering.
9
-
10
- ## Props
11
-
12
- | Prop | Type | Default | Description |
13
- |------|------|---------|-------------|
14
- | `children` | `ReactNode` | — | Child elements inside the flex container. |
15
- | `direction` | `"row" \| "column" \| "row-reverse" \| "column-reverse"` | — | Main axis direction. |
16
- | `align` | `"start" \| "end" \| "center" \| "stretch" \| "baseline"` | — | Cross-axis alignment. |
17
- | `justify` | `"start" \| "end" \| "center" \| "between" \| "around" \| "evenly"` | — | Main-axis justification. |
18
- | `wrap` | `"nowrap" \| "wrap" \| "wrap-reverse"` | — | Wrapping behavior. |
19
- | `gap` | `number` | — | Gap between children in units of `0.25rem`. |
20
- | `grow` | `boolean \| number` | — | Flex grow factor. `true` = 1, `false` = 0, or pass a number. |
21
- | `shrink` | `boolean \| number` | — | Flex shrink factor. Works like `grow`. |
22
- | `basis` | `string \| number` | — | Flex basis value. Numbers multiplied by `0.25rem`; strings used as-is. |
23
- | `className` | `string` | — | Additional CSS classes. |
24
- | `style` | `CSSProperties` | — | Inline styles. |
25
- | `as` | `ElementType` | `"div"` | Custom HTML element type to render. |
26
- | `onClick` | `(e: React.MouseEvent) => void` | — | Click handler. |
27
-
28
- ## Usage
29
-
30
- ```tsx
31
- import { ITFlex } from '@axzydev/axzy_ui_system';
32
-
33
- <ITFlex direction="row" gap={3} justify="between" align="center">
34
- <div>Left</div>
35
- <div>Center</div>
36
- <div>Right</div>
37
- </ITFlex>
38
-
39
- <ITFlex direction="column" gap={2} className="h-60">
40
- <ITFlex grow className="bg-primary-100 rounded-lg p-4">
41
- <span>Grow (flex: 1)</span>
42
- </ITFlex>
43
- <div className="w-full">Fixed height</div>
44
- </ITFlex>
45
- ```
46
-
47
- ## Notes
48
-
49
- - `gap` accepts an integer where `1` = `0.25rem` (4px), `4` = `1rem` (16px), etc., matching Tailwind's spacing scale.
50
- - The `as` prop allows rendering as a `<section>`, `<nav>`, `<form>`, or any other semantic HTML element.
51
- - `grow` and `shrink` accept `boolean` for quick on/off or `number` for precise flex factor control.
52
- - Combine `basis`, `grow`, and `shrink` for complete flex item control on the container itself.
53
- - All flex props are optional — the component renders as a standard `div` when no layout props are set.
54
-
55
- ## Stories
56
-
57
- <Primary />
58
- <Controls />
59
- <Stories />
@@ -1,70 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import ITFlex from "@/components/atoms/flex/flex";
3
-
4
- const meta: Meta<typeof ITFlex> = {
5
- title: "Layout/ITFlex",
6
- component: ITFlex,
7
- argTypes: {
8
- direction: {
9
- control: "select",
10
- options: ["row", "column", "row-reverse", "column-reverse"],
11
- },
12
- align: {
13
- control: "select",
14
- options: [undefined, "start", "end", "center", "stretch", "baseline"],
15
- },
16
- justify: {
17
- control: "select",
18
- options: [undefined, "start", "end", "center", "between", "around", "evenly"],
19
- },
20
- wrap: {
21
- control: "select",
22
- options: [undefined, "nowrap", "wrap", "wrap-reverse"],
23
- },
24
- gap: { control: { type: "range", min: 0, max: 16, step: 1 } },
25
- grow: { control: "boolean" },
26
- },
27
- };
28
-
29
- export default meta;
30
- type Story = StoryObj<typeof ITFlex>;
31
-
32
- const Box = ({ children, className = "" }: { children: string; className?: string }) => (
33
- <div className={`bg-primary-100 text-primary-800 rounded-lg p-4 text-center font-medium ${className}`}>
34
- {children}
35
- </div>
36
- );
37
-
38
- export const Row: Story = {
39
- args: { direction: "row", gap: 3 },
40
- render: (args) => (
41
- <ITFlex {...args}>
42
- <Box>Flex 1</Box>
43
- <Box>Flex 2</Box>
44
- <Box>Flex 3</Box>
45
- </ITFlex>
46
- ),
47
- };
48
-
49
- export const SpaceBetween: Story = {
50
- args: { justify: "between", align: "center", className: "w-full" },
51
- render: (args) => (
52
- <ITFlex {...args}>
53
- <Box>Left</Box>
54
- <Box>Center</Box>
55
- <Box>Right</Box>
56
- </ITFlex>
57
- ),
58
- };
59
-
60
- export const ColumnGrow: Story = {
61
- args: { direction: "column", gap: 2, className: "h-60" },
62
- render: (args) => (
63
- <ITFlex {...args}>
64
- <ITFlex grow className="bg-primary-100 rounded-lg p-4">
65
- <Box>Grow (flex: 1)</Box>
66
- </ITFlex>
67
- <Box className="w-full">Fixed height</Box>
68
- </ITFlex>
69
- ),
70
- };
@@ -1,54 +0,0 @@
1
- import { Meta, Title, Description, Primary, Controls, Stories } from '@storybook/blocks';
2
- import * as StoriesData from './grid.stories';
3
-
4
- <Meta of={StoriesData} />
5
-
6
- # ITGrid
7
-
8
- A responsive 12-column CSS grid system for building flexible layouts. Supports grid container and item modes, configurable column spans per breakpoint, and customizable gap spacing.
9
-
10
- ## Props
11
-
12
- | Prop | Type | Default | Description |
13
- |------|------|---------|-------------|
14
- | `children` | `ReactNode` | `undefined` | Child elements rendered inside the grid. |
15
- | `container` | `boolean` | `false` | When true, renders as a CSS grid parent. |
16
- | `item` | `boolean` | `false` | When true, renders as a CSS grid child with column span. |
17
- | `spacing` | `number` | `undefined` | Gap between children in units of 0.25rem. Container only. |
18
- | `columns` | `number` | `12` | Number of grid columns (1-12). Container only. |
19
- | `xs` | `number` | `undefined` | Column span at base breakpoint (mobile). Falls back to `sm`. |
20
- | `sm` | `number` | `undefined` | Column span at the `sm` breakpoint. |
21
- | `md` | `number` | `undefined` | Column span at the `md` breakpoint. |
22
- | `lg` | `number` | `undefined` | Column span at the `lg` breakpoint. |
23
- | `xl` | `number` | `undefined` | Column span at the `xl` breakpoint. |
24
- | `className` | `string` | `undefined` | Additional CSS classes. |
25
- | `style` | `CSSProperties` | `undefined` | Inline styles. |
26
- | `as` | `ElementType` | `'div'` | Custom HTML element type to render instead of div. |
27
-
28
- ## Usage
29
-
30
- ```tsx
31
- import { ITGrid } from '@axzydev/axzy_ui_system';
32
-
33
- <ITGrid container spacing={3}>
34
- <ITGrid item xs={12} md={8}>
35
- <div>Main content</div>
36
- </ITGrid>
37
- <ITGrid item xs={12} md={4}>
38
- <div>Sidebar</div>
39
- </ITGrid>
40
- </ITGrid>
41
- ```
42
-
43
- ## Notes
44
-
45
- - Uses CSS Grid under the hood with responsive breakpoint classes.
46
- - Omitting both `container` and `item` renders a plain `div` with no grid behavior.
47
- - Breakpoint spans cascade down: if `lg` is not set, it inherits `md`, then `sm`, then `xs`.
48
- - `spacing` multiplies by 0.25rem internally (spacing={2} = 0.5rem gap).
49
-
50
- ## Stories
51
-
52
- <Primary />
53
- <Controls />
54
- <Stories />