@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,62 +0,0 @@
1
- import { Meta, Title, Description, Primary, Controls, Stories } from '@storybook/blocks';
2
- import * as StoriesData from './radio.stories';
3
-
4
- <Meta of={StoriesData} />
5
-
6
- # ITRadioGroup
7
-
8
- Radio button group for selecting a single option from a set. Supports horizontal and vertical layouts, disabled state, and an options-array API for declarative rendering.
9
-
10
- ## Props
11
-
12
- | Prop | Type | Default | Description |
13
- |------|------|---------|-------------|
14
- | `name` | `string` | — | Name attribute for the radio input group. Used for form accessibility. |
15
- | `value` | `string` | — | Currently selected value (controlled). |
16
- | `onChange` | `(value: string) => void` | — | Callback fired when a radio option is selected. |
17
- | `options` | `ITRadioOption[]` | — | Array of radio options: `{ value: string, label: ReactNode }`. |
18
- | `disabled` | `boolean` | `false` | Whether the entire radio group is disabled. |
19
- | `direction` | `"row" \| "column"` | `"column"` | Layout direction of the radio options. |
20
- | `className` | `string` | — | Additional CSS classes for the container. |
21
-
22
- ## Usage
23
-
24
- ```tsx
25
- import { ITRadioGroup } from '@axzydev/axzy_ui_system';
26
-
27
- <ITRadioGroup
28
- name="size"
29
- value={selected}
30
- onChange={setSelected}
31
- options={[
32
- { value: "sm", label: "Small" },
33
- { value: "md", label: "Medium" },
34
- { value: "lg", label: "Large" },
35
- ]}
36
- />
37
-
38
- <ITRadioGroup
39
- name="layout"
40
- value={selected}
41
- onChange={setSelected}
42
- direction="row"
43
- options={[
44
- { value: "option1", label: "Option 1" },
45
- { value: "option2", label: "Option 2" },
46
- ]}
47
- />
48
- ```
49
-
50
- ## Notes
51
-
52
- - Fully controlled component: `value` and `onChange` must be provided.
53
- - `direction="column"` stacks options vertically; `direction="row"` lays them out horizontally.
54
- - `disabled` disables all radio inputs in the group at once.
55
- - Label accepts `ReactNode`, allowing rich content like icons or custom markup.
56
- - Group uses a shared `name` attribute, ensuring mutual exclusivity across options.
57
-
58
- ## Stories
59
-
60
- <Primary />
61
- <Controls />
62
- <Stories />
@@ -1,48 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import { useState } from "react";
3
- import ITRadioGroup from "@/components/atoms/radio/radio";
4
-
5
- const meta: Meta<typeof ITRadioGroup> = {
6
- title: "Components/Inputs/ITRadioGroup",
7
- component: ITRadioGroup,
8
- };
9
-
10
- export default meta;
11
- type Story = StoryObj<typeof ITRadioGroup>;
12
-
13
- export const Default: Story = {
14
- render: () => {
15
- const [val, setVal] = useState("option1");
16
- return (
17
- <ITRadioGroup
18
- name="example"
19
- value={val}
20
- onChange={setVal}
21
- options={[
22
- { value: "option1", label: "Opción 1" },
23
- { value: "option2", label: "Opción 2" },
24
- { value: "option3", label: "Opción 3" },
25
- ]}
26
- />
27
- );
28
- },
29
- };
30
-
31
- export const Row: Story = {
32
- render: () => {
33
- const [val, setVal] = useState("sm");
34
- return (
35
- <ITRadioGroup
36
- name="size"
37
- value={val}
38
- onChange={setVal}
39
- direction="row"
40
- options={[
41
- { value: "sm", label: "Chico" },
42
- { value: "md", label: "Mediano" },
43
- { value: "lg", label: "Grande" },
44
- ]}
45
- />
46
- );
47
- },
48
- };
@@ -1,60 +0,0 @@
1
- import { Meta, Title, Description, Primary, Controls, Stories } from '@storybook/blocks';
2
- import * as StoriesData from './segmented-control.stories';
3
-
4
- <Meta of={StoriesData} />
5
-
6
- # ITSegmentedControl
7
-
8
- iOS-style segmented toggle for mutually exclusive options with optional icons. Supports two sizes and a disabled state. Ideal for filter and view switching.
9
-
10
- ## Props
11
-
12
- | Prop | Type | Default | Description |
13
- |------|------|---------|-------------|
14
- | `options` | `ISegmentedOption[]` | — | Array of mutually exclusive options: `{ value: string, label: string, icon?: ReactNode }`. |
15
- | `value` | `string` | — | Currently selected value (controlled). |
16
- | `onChange` | `(value: string) => void` | — | Callback fired when the user selects a different option. |
17
- | `size` | `"sm" \| "md"` | `"md"` | Control size. |
18
- | `className` | `string` | — | Additional CSS classes on the container. |
19
- | `disabled` | `boolean` | `false` | Whether the entire control is disabled. |
20
-
21
- ## Usage
22
-
23
- ```tsx
24
- import { ITSegmentedControl } from '@axzydev/axzy_ui_system';
25
-
26
- <ITSegmentedControl
27
- options={[
28
- { value: "day", label: "Day" },
29
- { value: "week", label: "Week" },
30
- { value: "month", label: "Month" },
31
- ]}
32
- value={selected}
33
- onChange={setSelected}
34
- />
35
-
36
- <ITSegmentedControl
37
- size="sm"
38
- options={[
39
- { value: "list", label: "List", icon: <FaList /> },
40
- { value: "grid", label: "Grid", icon: <FaTh /> },
41
- ]}
42
- value={view}
43
- onChange={setView}
44
- />
45
- ```
46
-
47
- ## Notes
48
-
49
- - Only one option can be selected at a time — mutually exclusive by design.
50
- - Each option may include an optional `icon` rendered alongside the label.
51
- - Two sizes available: `sm` (compact) and `md` (default).
52
- - `disabled` applies to all segments simultaneously.
53
- - Commonly used for view toggling (list/grid), date range selection (day/week/month), and filter switching.
54
- - Fully controlled component: `value` and `onChange` are required.
55
-
56
- ## Stories
57
-
58
- <Primary />
59
- <Controls />
60
- <Stories />
@@ -1,62 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import { useState } from "react";
3
- import { FaList, FaTh } from "react-icons/fa";
4
- import ITSegmentedControl from "@/components/atoms/segmented-control/segmented-control";
5
-
6
- const meta: Meta<typeof ITSegmentedControl> = {
7
- title: "Components/Inputs/ITSegmentedControl",
8
- component: ITSegmentedControl,
9
- };
10
-
11
- export default meta;
12
- type Story = StoryObj<typeof ITSegmentedControl>;
13
-
14
- export const Default: Story = {
15
- render: () => {
16
- const [val, setVal] = useState("day");
17
- return (
18
- <ITSegmentedControl
19
- options={[
20
- { value: "day", label: "Día" },
21
- { value: "week", label: "Semana" },
22
- { value: "month", label: "Mes" },
23
- ]}
24
- value={val}
25
- onChange={setVal}
26
- />
27
- );
28
- },
29
- };
30
-
31
- export const WithIcons: Story = {
32
- render: () => {
33
- const [val, setVal] = useState("list");
34
- return (
35
- <ITSegmentedControl
36
- options={[
37
- { value: "list", label: "Lista", icon: <FaList size={10} /> },
38
- { value: "grid", label: "Grid", icon: <FaTh size={10} /> },
39
- ]}
40
- value={val}
41
- onChange={setVal}
42
- />
43
- );
44
- },
45
- };
46
-
47
- export const Small: Story = {
48
- render: () => {
49
- const [val, setVal] = useState("sm");
50
- return (
51
- <ITSegmentedControl
52
- size="sm"
53
- options={[
54
- { value: "sm", label: "Chico" },
55
- { value: "md", label: "Mediano" },
56
- ]}
57
- value={val}
58
- onChange={setVal}
59
- />
60
- );
61
- },
62
- };
@@ -1,43 +0,0 @@
1
- import { Meta, Title, Description, Primary, Controls, Stories } from '@storybook/blocks';
2
- import * as StoriesData from './skeleton.stories';
3
-
4
- <Meta of={StoriesData} />
5
-
6
- # ITSkeleton
7
-
8
- Content placeholder loaders used during data loading to indicate upcoming content.
9
-
10
- ## Props
11
-
12
- | Prop | Type | Default | Description |
13
- |------|------|---------|-------------|
14
- | `variant` | `'text' \| 'circular' \| 'rectangular' \| 'rounded'` | `'text'` | Shape of the skeleton placeholder |
15
- | `animation` | `'pulse' \| 'wave' \| 'none'` | `'pulse'` | Animation style |
16
- | `width` | `number \| string` | — | Width of the skeleton |
17
- | `height` | `number \| string` | — | Height of the skeleton |
18
- | `count` | `number` | `1` | Number of skeleton items to render |
19
-
20
- ## Usage
21
-
22
- ```tsx
23
- import { ITSkeleton } from '@axzydev/axzy_ui_system';
24
-
25
- <ITSkeleton />
26
- <ITSkeleton variant="circular" width={40} height={40} />
27
- <ITSkeleton variant="rectangular" width="100%" height={200} animation="wave" />
28
- <ITSkeleton variant="text" count={3} />
29
- ```
30
-
31
- ## Notes
32
-
33
- - Use during data loading to reduce perceived wait time
34
- - `count` prop repeats the skeleton for placeholder lists or paragraphs
35
- - `rectangular` variant suits image or card placeholders
36
- - `circular` variant suits avatar or icon placeholders
37
- - Set `animation="none"` for static placeholders
38
-
39
- ## Stories
40
-
41
- <Primary />
42
- <Controls />
43
- <Stories />
@@ -1,29 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import ITSkeleton from "@/components/atoms/skeleton/skeleton";
3
- import ITStack from "@/components/atoms/stack/stack";
4
-
5
- const meta: Meta<typeof ITSkeleton> = {
6
- title: "Components/Feedback/ITSkeleton",
7
- component: ITSkeleton,
8
- };
9
-
10
- export default meta;
11
- type Story = StoryObj<typeof ITSkeleton>;
12
-
13
- export const Text: Story = {
14
- render: () => (
15
- <ITStack spacing={2}>
16
- <ITSkeleton variant="text" width="60%" />
17
- <ITSkeleton variant="text" />
18
- <ITSkeleton variant="text" width="80%" />
19
- </ITStack>
20
- ),
21
- };
22
-
23
- export const Circular: Story = {
24
- args: { variant: "circular", width: 48, height: 48 },
25
- };
26
-
27
- export const Rectangular: Story = {
28
- args: { variant: "rectangular", width: "100%", height: 160 },
29
- };
@@ -1,46 +0,0 @@
1
- import { Meta, Title, Description, Primary, Controls, Stories } from '@storybook/blocks';
2
- import * as StoriesData from './slide.stories';
3
-
4
- <Meta of={StoriesData} />
5
-
6
- # ITSlideToggle
7
-
8
- iOS-style toggle switch for boolean settings. Supports controlled and uncontrolled modes.
9
-
10
- ## Props
11
-
12
- | Prop | Type | Default | Description |
13
- |------|------|---------|-------------|
14
- | `checked` | `boolean` | — | Controlled checked state |
15
- | `defaultChecked` | `boolean` | `false` | Uncontrolled default state |
16
- | `onChange` | `(checked: boolean) => void` | — | Change handler |
17
- | `label` | `string` | — | Label text |
18
- | `labelPosition` | `'left' \| 'right'` | `'right'` | Label placement |
19
- | `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | Toggle size |
20
- | `color` | `'primary' \| 'secondary' \| 'success' \| 'warning' \| 'danger' \| 'info' \| 'neutral'` | `'primary'` | Color theme when checked |
21
- | `disabled` | `boolean` | `false` | Disables the toggle |
22
-
23
- ## Usage
24
-
25
- ```tsx
26
- import { ITSlideToggle } from '@axzydev/axzy_ui_system';
27
-
28
- <ITSlideToggle />
29
- <ITSlideToggle label="Enable notifications" defaultChecked />
30
- <ITSlideToggle label="Dark mode" labelPosition="left" size="sm" color="success" />
31
- <ITSlideToggle disabled label="Locked" />
32
- ```
33
-
34
- ## Notes
35
-
36
- - Controlled mode via `checked` + `onChange`
37
- - Uncontrolled mode via `defaultChecked`
38
- - Label renders alongside the toggle with configurable position
39
- - Seven semantic color themes available
40
- - Three sizes: sm (small), md (medium), lg (large)
41
-
42
- ## Stories
43
-
44
- <Primary />
45
- <Controls />
46
- <Stories />
@@ -1,120 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import ITSlideToggle from "@/components/atoms/slide/slide";
3
- import { useState } from "react";
4
-
5
- const meta: Meta<typeof ITSlideToggle> = {
6
- title: "Components/Form Elements/ITSlideToggle",
7
- component: ITSlideToggle,
8
- parameters: {
9
- layout: "centered",
10
- },
11
- argTypes: {
12
- activeColor: {
13
- control: "select",
14
- options: ["primary", "secondary", "success", "danger", "warning", "info", "purple"],
15
- },
16
- size: {
17
- control: "select",
18
- options: ["sm", "md", "lg"],
19
- },
20
- disabled: {
21
- control: "boolean",
22
- },
23
- isOn: {
24
- control: "boolean",
25
- },
26
- initialState: {
27
- control: "boolean",
28
- },
29
- },
30
- };
31
-
32
- export default meta;
33
- type Story = StoryObj<typeof ITSlideToggle>;
34
-
35
- export const Default: Story = {
36
- args: {
37
- activeColor: "success",
38
- size: "md",
39
- },
40
- };
41
-
42
- export const CheckedUncontrolled: Story = {
43
- args: {
44
- initialState: true,
45
- activeColor: "primary",
46
- },
47
- };
48
-
49
- const ControlledSlideWrapper = (args: any) => {
50
- const [isOn, setIsOn] = useState(false);
51
- return (
52
- <div className="flex flex-col gap-4 items-center">
53
- <ITSlideToggle {...args} isOn={isOn} onToggle={setIsOn} />
54
- <span className="text-sm font-medium text-gray-500">
55
- External State: {isOn ? "ON" : "OFF"}
56
- </span>
57
- </div>
58
- );
59
- };
60
-
61
- export const Controlled: Story = {
62
- render: (args) => <ControlledSlideWrapper {...args} />,
63
- args: {
64
- activeColor: "info",
65
- size: "lg",
66
- },
67
- };
68
-
69
- export const Sizes: Story = {
70
- render: (args) => (
71
- <div className="flex flex-col gap-6 items-center">
72
- <div className="flex items-center gap-4">
73
- <span className="w-16 text-sm text-gray-500 font-bold">Small</span>
74
- <ITSlideToggle {...args} size="sm" initialState={true} />
75
- </div>
76
- <div className="flex items-center gap-4">
77
- <span className="w-16 text-sm text-gray-500 font-bold">Medium</span>
78
- <ITSlideToggle {...args} size="md" initialState={true} />
79
- </div>
80
- <div className="flex items-center gap-4">
81
- <span className="w-16 text-sm text-gray-500 font-bold">Large</span>
82
- <ITSlideToggle {...args} size="lg" initialState={true} />
83
- </div>
84
- </div>
85
- ),
86
- args: {
87
- activeColor: "primary"
88
- }
89
- };
90
-
91
- export const Disabled: Story = {
92
- render: (args) => (
93
- <div className="flex gap-8">
94
- <div className="flex flex-col gap-2 items-center">
95
- <span className="text-sm text-gray-500">Off</span>
96
- <ITSlideToggle {...args} initialState={false} />
97
- </div>
98
- <div className="flex flex-col gap-2 items-center">
99
- <span className="text-sm text-gray-500">On</span>
100
- <ITSlideToggle {...args} initialState={true} />
101
- </div>
102
- </div>
103
- ),
104
- args: {
105
- disabled: true,
106
- },
107
- };
108
-
109
- export const Colors: Story = {
110
- render: (args) => (
111
- <div className="flex flex-col gap-4">
112
- {(['primary', 'secondary', 'success', 'danger', 'warning', 'info', 'purple'] as const).map((col) => (
113
- <div key={col} className="flex items-center gap-4">
114
- <span className="w-24 text-sm text-gray-500 font-bold capitalize">{col}</span>
115
- <ITSlideToggle {...args} activeColor={col} initialState={true} />
116
- </div>
117
- ))}
118
- </div>
119
- ),
120
- };
@@ -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 />