@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,49 +0,0 @@
1
- import { Meta, Title, Description, Primary, Controls, Stories } from '@storybook/blocks';
2
- import * as StoriesData from './slider.stories';
3
-
4
- <Meta of={StoriesData} />
5
-
6
- # ITSlider
7
-
8
- Range slider with configurable min, max, and step values. Displays the current value.
9
-
10
- ## Props
11
-
12
- | Prop | Type | Default | Description |
13
- |------|------|---------|-------------|
14
- | `value` | `number` | — | Current slider value |
15
- | `defaultValue` | `number` | — | Default uncontrolled value |
16
- | `min` | `number` | `0` | Minimum value |
17
- | `max` | `number` | `100` | Maximum value |
18
- | `step` | `number` | `1` | Step increment |
19
- | `orientation` | `'horizontal' \| 'vertical'` | `'horizontal'` | Slider orientation |
20
- | `showValue` | `boolean` | `true` | Show current value label |
21
- | `ticks` | `boolean` | `false` | Show tick marks |
22
- | `tickLabels` | `string[]` | — | Custom labels for tick marks |
23
- | `color` | `string` | `'primary'` | Semantic color theme |
24
- | `disabled` | `boolean` | `false` | Disables the slider |
25
-
26
- ## Usage
27
-
28
- ```tsx
29
- import { ITSlider } from '@axzydev/axzy_ui_system';
30
-
31
- <ITSlider />
32
- <ITSlider min={0} max={100} step={10} defaultValue={50} />
33
- <ITSlider orientation="vertical" showValue ticks color="success" />
34
- <ITSlider tickLabels={['Low', 'Mid', 'High']} step={50} max={100} />
35
- ```
36
-
37
- ## Notes
38
-
39
- - Current value displayed by default; set `showValue={false}` to hide
40
- - `ticks` renders tick marks at each step interval
41
- - `tickLabels` provides custom string labels for tick positions
42
- - Orientation supports horizontal and vertical layouts
43
- - All semantic color themes supported
44
-
45
- ## Stories
46
-
47
- <Primary />
48
- <Controls />
49
- <Stories />
@@ -1,29 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import ITSlider from "@/components/atoms/slider/slider";
3
- import { useState } from "react";
4
-
5
- const meta: Meta<typeof ITSlider> = {
6
- title: "Components/Inputs/ITSlider",
7
- component: ITSlider,
8
- };
9
-
10
- export default meta;
11
- type Story = StoryObj<typeof ITSlider>;
12
-
13
- export const Default: Story = {
14
- render: () => {
15
- const [val, setVal] = useState(50);
16
- return <ITSlider value={val} onChange={setVal} min={0} max={100} label="Volume" />;
17
- },
18
- };
19
-
20
- export const WithRange: Story = {
21
- render: () => {
22
- const [val, setVal] = useState(3);
23
- return <ITSlider value={val} onChange={setVal} min={1} max={10} step={1} label="Items per page" />;
24
- },
25
- };
26
-
27
- export const Disabled: Story = {
28
- render: () => <ITSlider value={40} onChange={() => {}} disabled label="Disabled" />,
29
- };
@@ -1,126 +0,0 @@
1
- import { Meta, Title, Description, Primary, Controls, Stories } from '@storybook/blocks';
2
- import * as StoriesData from './stack.stories';
3
-
4
- <Meta of={StoriesData} />
5
-
6
- # ITStack
7
-
8
- ITStack is a simplified flexbox layout primitive for consistent spacing and alignment. It controls direction, gap, cross-axis alignment, main-axis justification, and flex wrapping in a single component, with optional dividers between children.
9
-
10
- ITStack powers most internal layouts across the AXZY UI System — from button toolbars and form rows to card lists and centered hero sections.
11
-
12
- ## Props
13
-
14
- | Prop | Type | Default | Description |
15
- |------|------|---------|-------------|
16
- | `children` | `ReactNode` | — | Stack children elements. |
17
- | `direction` | `"column" \| "row" \| "row-reverse" \| "column-reverse"` | `"column"` | Flex direction. |
18
- | `spacing` | `number` (0–12) | `0` | Gap between children in `0.25rem` units. `spacing={4}` = `1rem` gap. |
19
- | `alignItems` | `"start" \| "end" \| "center" \| "stretch" \| "baseline"` | — | Cross-axis alignment: vertical in row, horizontal in column. |
20
- | `justifyContent` | `"start" \| "end" \| "center" \| "between" \| "around" \| "evenly"` | — | Main-axis distribution of children. |
21
- | `flexWrap` | `"nowrap" \| "wrap" \| "wrap-reverse"` | — | Whether children wrap to the next line. |
22
- | `divider` | `ReactNode` | — | Optional element rendered between each pair of children via `cloneElement`. |
23
- | `className` | `string` | — | Additional CSS classes on the container. |
24
- | `style` | `CSSProperties` | — | Inline styles on the container. |
25
- | `as` | `ElementType` | `"div"` | HTML element to render as — `"section"`, `"nav"`, `"ul"`, `"form"`, etc. |
26
-
27
- ## Usage
28
-
29
- ```tsx
30
- import { ITStack } from '@axzydev/axzy_ui_system';
31
-
32
- // ── Vertical (default) ──
33
- <ITStack spacing={4}>
34
- <h2>Section Title</h2>
35
- <p>Section content goes here.</p>
36
- </ITStack>
37
-
38
- // ── Horizontal toolbar ──
39
- <ITStack direction="row" spacing={2} alignItems="center" justifyContent="between">
40
- <ITButton>Cancel</ITButton>
41
- <ITButton color="primary">Save</ITButton>
42
- </ITStack>
43
-
44
- // ── Form row with wrap ──
45
- <ITStack direction="row" spacing={3} flexWrap="wrap">
46
- <ITInput name="first" label="First Name" />
47
- <ITInput name="last" label="Last Name" />
48
- <ITInput name="email" label="Email" />
49
- </ITStack>
50
-
51
- // ── Card list with dividers ──
52
- <ITStack spacing={0} divider={<hr />}>
53
- <div>Item 1</div>
54
- <div>Item 2</div>
55
- <div>Item 3</div>
56
- </ITStack>
57
-
58
- // ── Tag cloud ──
59
- <ITStack direction="row" spacing={1} flexWrap="wrap">
60
- {tags.map((t) => <ITBadget key={t} label={t} />)}
61
- </ITStack>
62
-
63
- // ── Centered hero ──
64
- <ITStack spacing={4} alignItems="center" justifyContent="center" className="h-64">
65
- <h1>Hero Title</h1>
66
- <p>Subtitle text</p>
67
- <ITButton label="CTA" />
68
- </ITStack>
69
-
70
- // ── Semantic list (as="ul") ──
71
- <ITStack as="ul" spacing={2}>
72
- <li>First item</li>
73
- <li>Second item</li>
74
- </ITStack>
75
- ```
76
-
77
- ## Variants & Patterns
78
-
79
- ### Direction
80
- - **column** — default; stacks children vertically.
81
- - **row** — stacks children horizontally (toolbars, button groups).
82
- - **row-reverse** / **column-reverse** — reverse the visual order.
83
-
84
- ### Spacing
85
- - Measured in 0.25rem units (Tailwind spacing scale).
86
- - `spacing={0}` = no gap (compact).
87
- - `spacing={4}` = 1rem (comfortable).
88
- - `spacing={8}` = 2rem (breathing room).
89
-
90
- ### Justify Content (main axis)
91
- - **start** — children packed at the start.
92
- - **center** — children centered.
93
- - **end** — children packed at the end.
94
- - **between** — first/last at edges, others spaced evenly.
95
- - **around** — equal space around each child.
96
- - **evenly** — equal space between all items and edges.
97
-
98
- ### Align Items (cross axis)
99
- - **start** — align to the start of the cross axis.
100
- - **center** — center on the cross axis.
101
- - **end** — align to the end.
102
- - **stretch** — stretch to fill (default CSS flex behavior).
103
- - **baseline** — align text baselines.
104
-
105
- ### Wrap
106
- - **nowrap** — default; overflow if needed.
107
- - **wrap** — children wrap to the next line when out of space (great for tags, chips).
108
- - **wrap-reverse** — wrap in reverse order.
109
-
110
- ### Divider
111
- - Takes a single React element, cloned between each pair of children.
112
- - Common dividers: `<hr />`, `<div className="h-px bg-slate-200" />`, vertical bars for row direction.
113
-
114
- ## Notes
115
-
116
- - ITStack is **always** `display: flex` — use `direction` to switch between vertical/horizontal.
117
- - For complex multi-axis layouts (direction + wrap + alignment simultaneously), prefer **ITFlex**.
118
- - For CSS Grid layouts (columns), use **ITGrid**.
119
- - Spacing is applied via the CSS `gap` property, cleanly separating layout from children.
120
- - Set `as="ul"` and wrap children in `<li>` for semantic list rendering.
121
-
122
- ## Stories
123
-
124
- <Primary />
125
- <Controls />
126
- <Stories />
@@ -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 />