@axzydev/axzy_ui_system 1.2.6 → 1.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (185) hide show
  1. package/dist/index.cjs +777 -535
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.css +1 -1
  4. package/dist/index.css.map +1 -1
  5. package/dist/index.d.cts +1470 -87
  6. package/dist/index.d.ts +1470 -87
  7. package/dist/index.js +799 -555
  8. package/dist/index.js.map +1 -1
  9. package/package.json +1 -1
  10. package/src/App.tsx +19 -54
  11. package/src/components/alert/alert.doc.mdx +48 -0
  12. package/src/components/alert/alert.props.ts +7 -0
  13. package/src/components/alert/alert.tsx +8 -0
  14. package/src/components/avatar/avatar.doc.mdx +48 -0
  15. package/src/components/avatar/avatar.props.ts +8 -0
  16. package/src/components/avatar/avatar.tsx +25 -5
  17. package/src/components/badget/badget.doc.mdx +46 -0
  18. package/src/components/badget/badget.props.ts +6 -0
  19. package/src/components/badget/badget.tsx +11 -0
  20. package/src/components/breadcrumbs/breadcrumbs.doc.mdx +57 -0
  21. package/src/components/breadcrumbs/breadcrumbs.props.ts +6 -0
  22. package/src/components/breadcrumbs/breadcrumbs.tsx +12 -0
  23. package/src/components/button/button.doc.mdx +59 -0
  24. package/src/components/button/button.props.ts +12 -0
  25. package/src/components/button/button.tsx +11 -0
  26. package/src/components/calendar/calendar.doc.mdx +75 -0
  27. package/src/components/calendar/calendar.props.ts +27 -7
  28. package/src/components/calendar/calendar.tsx +13 -0
  29. package/src/components/card/card.doc.mdx +54 -0
  30. package/src/components/card/card.props.ts +11 -0
  31. package/src/components/card/card.tsx +13 -0
  32. package/src/components/checkbox/checkbox.doc.mdx +54 -0
  33. package/src/components/checkbox/checkbox.props.ts +7 -0
  34. package/src/components/checkbox/checkbox.tsx +9 -0
  35. package/src/components/confirm-dialog/confirm-dialog.doc.mdx +60 -0
  36. package/src/components/confirm-dialog/confirm-dialog.props.ts +9 -0
  37. package/src/components/confirm-dialog/confirm-dialog.tsx +19 -0
  38. package/src/components/data-table/ITDataTable.doc.mdx +59 -0
  39. package/src/components/data-table/dataTable.props.ts +15 -0
  40. package/src/components/data-table/dataTable.tsx +178 -73
  41. package/src/components/date-picker/date-picker.doc.mdx +65 -0
  42. package/src/components/date-picker/date-picker.props.ts +17 -0
  43. package/src/components/date-picker/datePicker.tsx +31 -1
  44. package/src/components/dialog/dialog.doc.mdx +54 -0
  45. package/src/components/dialog/dialog.props.ts +7 -0
  46. package/src/components/dialog/dialog.tsx +26 -0
  47. package/src/components/divider/divider.doc.mdx +42 -0
  48. package/src/components/divider/divider.props.ts +5 -0
  49. package/src/components/divider/divider.tsx +16 -0
  50. package/src/components/drawer/drawer.doc.mdx +59 -0
  51. package/src/components/drawer/drawer.props.ts +9 -0
  52. package/src/components/drawer/drawer.tsx +20 -0
  53. package/src/components/dropfile/dropfile.doc.mdx +59 -0
  54. package/src/components/dropfile/dropfile.props.ts +41 -0
  55. package/src/components/dropfile/dropfile.tsx +21 -33
  56. package/src/components/empty-state/empty-state.doc.mdx +50 -0
  57. package/src/components/empty-state/empty-state.props.ts +5 -0
  58. package/src/components/empty-state/empty-state.tsx +16 -0
  59. package/src/components/flex/flex.doc.mdx +59 -0
  60. package/src/components/flex/flex.props.ts +13 -0
  61. package/src/components/flex/flex.tsx +15 -0
  62. package/src/components/form-builder/fieldRenderer.tsx +52 -2
  63. package/src/components/form-builder/formBuilder.doc.mdx +124 -0
  64. package/src/components/form-builder/formBuilder.props.ts +12 -2
  65. package/src/components/form-builder/formBuilder.tsx +31 -0
  66. package/src/components/form-header/form-header.doc.mdx +38 -0
  67. package/src/components/form-header/form-header.props.ts +3 -0
  68. package/src/components/form-header/form-header.stories.tsx +53 -0
  69. package/src/components/form-header/form-header.tsx +11 -0
  70. package/src/components/grid/grid.doc.mdx +54 -0
  71. package/src/components/grid/grid.props.ts +13 -0
  72. package/src/components/grid/grid.tsx +26 -2
  73. package/src/components/image/image.doc.mdx +44 -0
  74. package/src/components/image/image.props.ts +5 -0
  75. package/src/components/image/image.stories.tsx +49 -0
  76. package/src/components/image/image.tsx +19 -0
  77. package/src/components/input/input.doc.mdx +70 -0
  78. package/src/components/input/input.props.ts +34 -2
  79. package/src/components/input/input.tsx +29 -0
  80. package/src/components/layout/layout.doc.mdx +51 -0
  81. package/src/components/layout/layout.props.ts +5 -0
  82. package/src/components/layout/layout.tsx +41 -17
  83. package/src/components/loader/loader.doc.mdx +43 -0
  84. package/src/components/loader/loader.props.ts +4 -0
  85. package/src/components/loader/loader.tsx +17 -0
  86. package/src/components/navbar/navbar.doc.mdx +77 -0
  87. package/src/components/navbar/navbar.props.ts +37 -1
  88. package/src/components/navbar/navbar.stories.tsx +84 -0
  89. package/src/components/navbar/navbar.tsx +78 -46
  90. package/src/components/page/page.doc.mdx +80 -0
  91. package/src/components/page/page.props.ts +25 -0
  92. package/src/components/page/page.tsx +35 -7
  93. package/src/components/page-header/page-header.doc.mdx +54 -0
  94. package/src/components/page-header/page-header.props.ts +11 -0
  95. package/src/components/page-header/page-header.stories.tsx +14 -0
  96. package/src/components/page-header/page-header.tsx +50 -15
  97. package/src/components/pagination/pagination.doc.mdx +62 -0
  98. package/src/components/pagination/pagination.props.ts +11 -32
  99. package/src/components/pagination/pagination.tsx +17 -0
  100. package/src/components/popover/popover.doc.mdx +53 -0
  101. package/src/components/popover/popover.props.ts +8 -0
  102. package/src/components/popover/popover.tsx +13 -0
  103. package/src/components/progress/progress.doc.mdx +48 -0
  104. package/src/components/progress/progress.props.ts +8 -0
  105. package/src/components/progress/progress.tsx +9 -0
  106. package/src/components/radio/radio.doc.mdx +62 -0
  107. package/src/components/radio/radio.props.ts +11 -0
  108. package/src/components/radio/radio.tsx +18 -0
  109. package/src/components/search-select/search-select.doc.mdx +72 -0
  110. package/src/components/search-select/search-select.props.ts +23 -18
  111. package/src/components/search-select/search-select.tsx +27 -2
  112. package/src/components/searchTable/searchTable.doc.mdx +79 -0
  113. package/src/components/searchTable/searchTable.props.ts +42 -3
  114. package/src/components/searchTable/searchTable.stories.tsx +74 -0
  115. package/src/components/searchTable/searchTable.tsx +23 -0
  116. package/src/components/segmented-control/segmented-control.doc.mdx +60 -0
  117. package/src/components/segmented-control/segmented-control.props.ts +12 -0
  118. package/src/components/segmented-control/segmented-control.tsx +15 -0
  119. package/src/components/select/select.doc.mdx +75 -0
  120. package/src/components/select/select.props.ts +22 -0
  121. package/src/components/select/select.tsx +2 -5
  122. package/src/components/sidebar/sidebar.doc.mdx +86 -0
  123. package/src/components/sidebar/sidebar.props.ts +22 -0
  124. package/src/components/sidebar/sidebar.tsx +22 -0
  125. package/src/components/skeleton/skeleton.doc.mdx +43 -0
  126. package/src/components/skeleton/skeleton.props.ts +8 -0
  127. package/src/components/skeleton/skeleton.tsx +10 -0
  128. package/src/components/slide/slide.doc.mdx +46 -0
  129. package/src/components/slide/slide.props.ts +11 -24
  130. package/src/components/slide/slide.tsx +10 -1
  131. package/src/components/slider/slider.doc.mdx +49 -0
  132. package/src/components/slider/slider.props.ts +9 -0
  133. package/src/components/slider/slider.tsx +15 -0
  134. package/src/components/stack/stack.doc.mdx +126 -0
  135. package/src/components/stack/stack.props.ts +18 -0
  136. package/src/components/stack/stack.stories.tsx +221 -16
  137. package/src/components/stack/stack.tsx +21 -0
  138. package/src/components/stat-card/stat-card.doc.mdx +48 -0
  139. package/src/components/stat-card/stat-card.props.ts +9 -0
  140. package/src/components/stat-card/stat-card.tsx +10 -0
  141. package/src/components/stepper/stepper.doc.mdx +54 -0
  142. package/src/components/stepper/stepper.props.ts +11 -1
  143. package/src/components/stepper/stepper.tsx +15 -0
  144. package/src/components/table/table.doc.mdx +58 -0
  145. package/src/components/table/table.props.ts +17 -0
  146. package/src/components/table/table.tsx +199 -84
  147. package/src/components/tabs/tabs.doc.mdx +52 -0
  148. package/src/components/tabs/tabs.props.ts +11 -0
  149. package/src/components/tabs/tabs.tsx +14 -0
  150. package/src/components/text/text.doc.mdx +41 -0
  151. package/src/components/text/text.props.ts +5 -0
  152. package/src/components/text/text.stories.tsx +67 -0
  153. package/src/components/text/text.tsx +10 -0
  154. package/src/components/textarea/textarea.doc.mdx +64 -0
  155. package/src/components/textarea/textarea.props.ts +11 -0
  156. package/src/components/textarea/textarea.tsx +16 -0
  157. package/src/components/theme-provider/themeProvider.doc.mdx +75 -0
  158. package/src/components/theme-provider/themeProvider.props.ts +3 -0
  159. package/src/components/theme-provider/themeProvider.stories.tsx +59 -0
  160. package/src/components/theme-provider/themeProvider.tsx +14 -0
  161. package/src/components/time-picker/timePicker.doc.mdx +68 -0
  162. package/src/components/time-picker/timePicker.props.ts +14 -0
  163. package/src/components/time-picker/timePicker.tsx +22 -1
  164. package/src/components/toast/toast.doc.mdx +50 -0
  165. package/src/components/toast/toast.props.ts +5 -0
  166. package/src/components/toast/toast.tsx +21 -0
  167. package/src/components/tooltip/tooltip.doc.mdx +47 -0
  168. package/src/components/tooltip/tooltip.props.ts +6 -0
  169. package/src/components/tooltip/tooltip.tsx +19 -0
  170. package/src/components/topbar/topbar.doc.mdx +69 -0
  171. package/src/components/topbar/topbar.props.ts +15 -0
  172. package/src/components/topbar/topbar.tsx +38 -0
  173. package/src/components/triple-filter/tripleFilter.doc.mdx +62 -0
  174. package/src/components/triple-filter/tripleFilter.props.ts +7 -0
  175. package/src/components/triple-filter/tripleFilter.tsx +32 -0
  176. package/src/index.css +17 -0
  177. package/src/showcases/DataShowcases.tsx +529 -45
  178. package/src/showcases/FormShowcases.tsx +399 -29
  179. package/src/showcases/HomeShowcase.tsx +252 -272
  180. package/src/showcases/LayoutPrimitivesShowcases.tsx +1224 -248
  181. package/src/showcases/PageShowcases.tsx +868 -151
  182. package/src/showcases/ShowcaseLayout.tsx +237 -73
  183. package/src/showcases/StructureShowcases.tsx +1039 -97
  184. package/src/types/table.types.ts +1 -1
  185. package/src/utils/styles.ts +2 -1
@@ -0,0 +1,86 @@
1
+ import { Meta, Title, Description, Primary, Controls, Stories } from '@storybook/blocks';
2
+ import * as Stories from './sidebar.stories';
3
+
4
+ <Meta of={Stories} />
5
+
6
+ # ITSidebar
7
+
8
+ Vertical navigation sidebar with collapsible submenus, tooltips when collapsed, active item highlighting, badge support, and themed glassmorphism styling. Designed for admin panels and dashboard layouts.
9
+
10
+ ## Props
11
+
12
+ | Prop | Type | Default | Description |
13
+ |------|------|---------|-------------|
14
+ | `navigationItems` | `ITNavigationItem[]` | — | Navigation structure: top-level items with optional sub-items. |
15
+ | `isCollapsed` | `boolean` | `false` | Whether the sidebar is collapsed to icon-only mode. |
16
+ | `onToggleCollapse` | `() => void` | — | Callback when the user toggles collapse via the toggle button. |
17
+ | `visibleOnMobile` | `boolean` | `false` | Force sidebar visible on mobile breakpoints. |
18
+ | `onItemClick` | `(item: ITNavigationItem) => void` | — | Callback when a top-level navigation item is clicked. |
19
+ | `onSubItemClick` | `(subitem: ITNavigationSubItem) => void` | — | Callback when a sub-navigation item is clicked. |
20
+ | `subitemConnector` | `"dot" \| "\|" \| "none"` | `"dot"` | Visual connector style for sub-items. |
21
+ | `className` | `string` | — | Additional CSS classes on the sidebar `<aside>`. |
22
+
23
+ ### ITNavigationItem
24
+
25
+ | Prop | Type | Description |
26
+ |------|------|-------------|
27
+ | `id` | `string` | Unique identifier. |
28
+ | `label` | `string` | Display label. |
29
+ | `icon` | `ReactNode` | Icon rendered left of the label. |
30
+ | `action` | `() => void` | Click handler for top-level items without submenus. |
31
+ | `isActive` | `boolean` | Whether this item is active/highlighted. |
32
+ | `subitems` | `ITNavigationSubItem[]` | Nested sub-navigation items. |
33
+ | `badge` | `string` | Badge text (e.g. notification count). |
34
+
35
+ ### ITNavigationSubItem
36
+
37
+ | Prop | Type | Description |
38
+ |------|------|-------------|
39
+ | `id` | `string` | Unique identifier. |
40
+ | `label` | `string` | Display label. |
41
+ | `action` | `() => void` | Click handler. |
42
+ | `isActive` | `boolean` | Whether this sub-item is active/highlighted. |
43
+
44
+ ## Usage
45
+
46
+ ```tsx
47
+ import { ITSidebar } from '@axzydev/axzy_ui_system';
48
+ import { FaHome, FaUsers, FaCog } from 'react-icons/fa';
49
+
50
+ const items = [
51
+ { id: 'dashboard', label: 'Dashboard', icon: <FaHome />, isActive: true, action: () => {} },
52
+ {
53
+ id: 'users',
54
+ label: 'Users',
55
+ icon: <FaUsers />,
56
+ badge: '3',
57
+ subitems: [
58
+ { id: 'users-list', label: 'User List', action: () => {} },
59
+ { id: 'users-roles', label: 'Roles', action: () => {}, isActive: true },
60
+ ],
61
+ },
62
+ ];
63
+
64
+ <ITSidebar
65
+ navigationItems={items}
66
+ isCollapsed={false}
67
+ onToggleCollapse={toggleCollapse}
68
+ subitemConnector="dot"
69
+ />
70
+ ```
71
+
72
+ ## Notes
73
+
74
+ - Collapsed mode shrinks to icon-only; tooltips show labels on hover with glassmorphism style.
75
+ - Submenus expand/collapse with smooth transitions when a parent item is clicked.
76
+ - Active item highlighting uses a colored left-border accent and subtle background tint.
77
+ - Badge support renders a notification-style counter on the item.
78
+ - `subitemConnector` styles the visual link between parent and sub-items: `dot` (default), `|` (vertical bar), or `none`.
79
+ - `visibleOnMobile` forces sidebar visibility on smaller screens for responsive layouts.
80
+ - Themed via CSS variables for consistent colors, shadows, and glassmorphism effects across light and dark modes.
81
+
82
+ ## Stories
83
+
84
+ <Primary />
85
+ <Controls />
86
+ <Stories />
@@ -1,28 +1,50 @@
1
+ /** A sub-navigation item nested under a parent menu. */
1
2
  export interface ITNavigationSubItem {
3
+ /** Unique identifier for the sub-item. */
2
4
  id: string;
5
+ /** Display label. */
3
6
  label: string;
7
+ /** Click handler. */
4
8
  action?: () => void;
9
+ /** Whether this sub-item is currently active/highlighted. */
5
10
  isActive?: boolean;
6
11
  }
7
12
 
13
+ /** A top-level navigation item, optionally with sub-items. */
8
14
  export interface ITNavigationItem {
15
+ /** Unique identifier. */
9
16
  id: string;
17
+ /** Display label. */
10
18
  label: string;
19
+ /** Icon component rendered left of the label. */
11
20
  icon?: React.ReactNode;
21
+ /** Click handler for top-level items without submenus. */
12
22
  action?: () => void;
23
+ /** Whether this item is currently active/highlighted. */
13
24
  isActive?: boolean;
25
+ /** Nested sub-navigation items (renders as expandable submenu). */
14
26
  subitems?: ITNavigationSubItem[];
27
+ /** Badge text displayed on the item (e.g. notification count). */
15
28
  badge?: string;
16
29
  }
17
30
 
31
+ /** Props for the ITSidebar vertical navigation component. */
18
32
  export interface ITSidebarProps {
33
+ /** Navigation structure: top-level items with optional sub-items. */
19
34
  navigationItems: ITNavigationItem[];
35
+ /** Whether the sidebar is collapsed to icon-only mode. */
20
36
  isCollapsed?: boolean;
37
+ /** Callback when the user toggles collapse via the toggle button. */
21
38
  onToggleCollapse?: () => void;
39
+ /** Force sidebar visible on mobile breakpoints. */
22
40
  visibleOnMobile?: boolean;
41
+ /** Callback when a top-level navigation item is clicked. Receives the item. */
23
42
  onItemClick?: (item: ITNavigationItem) => void;
43
+ /** Callback when a sub-navigation item is clicked. Receives the sub-item. */
24
44
  onSubItemClick?: (subitem: ITNavigationSubItem) => void;
45
+ /** Visual connector style for sub-items: "dot" | "|" | "none". Default: "dot". */
25
46
  subitemConnector?: 'dot' | '|' | 'none';
47
+ /** Additional CSS classes on the sidebar `<aside>`. */
26
48
  className?: string;
27
49
  }
28
50
 
@@ -3,6 +3,28 @@ import { FaChevronDown } from "react-icons/fa";
3
3
  import { ITNavigationItem, ITSidebarProps } from "./sidebar.props";
4
4
  import ITText from "@/components/text/text";
5
5
 
6
+ /**
7
+ * Vertical navigation sidebar with submenu expand/collapse, hover tooltips in collapsed mode,
8
+ * and glassmorphism styling.
9
+ *
10
+ * @example
11
+ * ```tsx
12
+ * <ITSidebar
13
+ * navigationItems={[
14
+ * { id: "dashboard", label: "Dashboard", icon: <FaHome />, isActive: true },
15
+ * {
16
+ * id: "settings", label: "Settings", icon: <FaCog />,
17
+ * subitems: [
18
+ * { id: "profile", label: "Profile", action: () => navigate("/profile") },
19
+ * { id: "billing", label: "Billing", isActive: true },
20
+ * ],
21
+ * },
22
+ * ]}
23
+ * isCollapsed={collapsed}
24
+ * onToggleCollapse={() => setCollapsed(!collapsed)}
25
+ * />
26
+ * ```
27
+ */
6
28
  export default function ITSidebar({
7
29
  navigationItems = [],
8
30
  isCollapsed = false,
@@ -0,0 +1,43 @@
1
+ import { Meta, Title, Description, Primary, Controls, Stories } from '@storybook/blocks';
2
+ import * as Stories from './skeleton.stories';
3
+
4
+ <Meta of={Stories} />
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,12 +1,20 @@
1
1
  import { CSSProperties } from "react";
2
2
 
3
+ /** Skeleton shape variant: "text" (line) | "circular" (avatar/icon) | "rectangular" (card/image). */
3
4
  export type SkeletonVariant = "text" | "circular" | "rectangular";
4
5
 
6
+ /** Props for the ITSkeleton content placeholder loader component. */
5
7
  export interface ITSkeletonProps {
8
+ /** Skeleton shape: "text" | "circular" | "rectangular". Default: "text". */
6
9
  variant?: SkeletonVariant;
10
+ /** Explicit width (CSS value or number in px). Text variant defaults to random 60%-90%. */
7
11
  width?: string | number;
12
+ /** Explicit height (CSS value or number in px). */
8
13
  height?: string | number;
14
+ /** Number of skeleton items to render. Default: 1. */
9
15
  count?: number;
16
+ /** Additional CSS classes on each skeleton item. */
10
17
  className?: string;
18
+ /** Inline style object applied to each skeleton item. */
11
19
  style?: CSSProperties;
12
20
  }
@@ -7,6 +7,16 @@ const variantClasses: Record<SkeletonVariant, string> = {
7
7
  rectangular: "rounded-lg",
8
8
  };
9
9
 
10
+ /**
11
+ * Content placeholder loader with pulse animation for text, circles, and rectangles.
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * <ITSkeleton variant="circular" width={40} height={40} />
16
+ * <ITSkeleton variant="text" count={3} />
17
+ * <ITSkeleton variant="rectangular" width="100%" height={200} />
18
+ * ```
19
+ */
10
20
  export default function ITSkeleton({
11
21
  variant = "text",
12
22
  width,
@@ -0,0 +1,46 @@
1
+ import { Meta, Title, Description, Primary, Controls, Stories } from '@storybook/blocks';
2
+ import * as Stories from './slide.stories';
3
+
4
+ <Meta of={Stories} />
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,45 +1,32 @@
1
+ /** Props for the ITSlideToggle iOS-style toggle switch. */
1
2
  export interface ITSlideToggleProps {
2
- /**
3
- * Callback executed when the switch is toggled. Receives the new state.
4
- */
3
+ /** Callback executed when the switch is toggled. Receives the new boolean state. */
5
4
  onToggle?: (value: boolean) => void;
6
5
 
7
- /**
8
- * Controlled state. Use this to completely control the component externally.
9
- */
6
+ /** Controlled state. Use this to fully control the component externally. */
10
7
  isOn?: boolean;
11
8
 
12
- /**
13
- * Initial state for uncontrolled usage.
14
- * Default: false
15
- */
9
+ /** Initial state for uncontrolled usage. Default: false. */
16
10
  initialState?: boolean;
17
11
 
18
12
  /**
19
- * Semantic theme color when activated (e.g., 'primary', 'success').
20
- * Default: 'success'
13
+ * Semantic theme color when activated (e.g. "primary", "success", "danger").
14
+ * Can also be a hex value. Default: "success".
21
15
  */
22
16
  activeColor?: string;
23
17
 
24
18
  /**
25
- * Semantic theme color or hex when deactivated.
26
- * Default: '#9ca3af' (gray-400)
19
+ * Semantic theme color or hex value when deactivated.
20
+ * Default: '#9ca3af' (gray-400).
27
21
  */
28
22
  inactiveColor?: string;
29
23
 
30
- /**
31
- * Whether the switch is disabled.
32
- */
24
+ /** Whether the switch is disabled. */
33
25
  disabled?: boolean;
34
26
 
35
- /**
36
- * Size of the switch: sm, md, lg.
37
- * Default: md
38
- */
27
+ /** Size of the switch: "sm" | "md" | "lg". Default: "md". */
39
28
  size?: "sm" | "md" | "lg";
40
29
 
41
- /**
42
- * Additional container classes.
43
- */
30
+ /** Additional CSS classes on the container. */
44
31
  className?: string;
45
32
  }
@@ -4,8 +4,17 @@ import { ITSlideToggleProps } from "./slide.props";
4
4
  import { theme } from "@/theme/theme";
5
5
 
6
6
  /**
7
- * Slide toggle switch component.
7
+ * iOS-style toggle switch with theme color support.
8
8
  * Supports fully controlled (`isOn`) or uncontrolled (`initialState`) modes.
9
+ *
10
+ * @example
11
+ * ```tsx
12
+ * // Controlled
13
+ * <ITSlideToggle isOn={enabled} onToggle={setEnabled} activeColor="primary" />
14
+ *
15
+ * // Uncontrolled with initial state
16
+ * <ITSlideToggle initialState onToggle={(v) => console.log(v)} />
17
+ * ```
9
18
  */
10
19
  export default function ITSlideToggle({
11
20
  onToggle,
@@ -0,0 +1,49 @@
1
+ import { Meta, Title, Description, Primary, Controls, Stories } from '@storybook/blocks';
2
+ import * as Stories from './slider.stories';
3
+
4
+ <Meta of={Stories} />
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,10 +1,19 @@
1
+ /** Props for the ITSlider range slider component. */
1
2
  export interface ITSliderProps {
3
+ /** Current slider value (controlled). */
2
4
  value: number;
5
+ /** Callback fired when the value changes. Receives the new numeric value. */
3
6
  onChange: (value: number) => void;
7
+ /** Minimum allowed value. Default: 0. */
4
8
  min?: number;
9
+ /** Maximum allowed value. Default: 100. */
5
10
  max?: number;
11
+ /** Step increment. Default: 1. */
6
12
  step?: number;
13
+ /** Label displayed above the slider. Also shows the current value. */
7
14
  label?: string;
15
+ /** Whether the slider is disabled. */
8
16
  disabled?: boolean;
17
+ /** Additional CSS classes on the container. */
9
18
  className?: string;
10
19
  }
@@ -2,6 +2,21 @@ import clsx from "clsx";
2
2
  import { ITSliderProps } from "./slider.props";
3
3
  import ITText from "@/components/text/text";
4
4
 
5
+ /**
6
+ * Range slider control with min/max/step and optional label displaying the current value.
7
+ *
8
+ * @example
9
+ * ```tsx
10
+ * <ITSlider
11
+ * label="Volume"
12
+ * value={volume}
13
+ * onChange={setVolume}
14
+ * min={0}
15
+ * max={100}
16
+ * step={5}
17
+ * />
18
+ * ```
19
+ */
5
20
  export default function ITSlider({
6
21
  value,
7
22
  onChange,
@@ -0,0 +1,126 @@
1
+ import { Meta, Title, Description, Primary, Controls, Stories } from '@storybook/blocks';
2
+ import * as Stories from './stack.stories';
3
+
4
+ <Meta of={Stories} />
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,19 +1,37 @@
1
1
  import { ReactNode, CSSProperties, ElementType } from "react";
2
2
 
3
+ /** Flex direction: "row" | "column" | "row-reverse" | "column-reverse". */
3
4
  export type StackDirection = "row" | "column" | "row-reverse" | "column-reverse";
5
+
6
+ /** Cross-axis alignment: "start" | "end" | "center" | "stretch" | "baseline". */
4
7
  export type StackAlignment = "start" | "end" | "center" | "stretch" | "baseline";
8
+
9
+ /** Main-axis justification: "start" | "end" | "center" | "between" | "around" | "evenly". */
5
10
  export type StackJustify = "start" | "end" | "center" | "between" | "around" | "evenly";
11
+
12
+ /** Flex wrap behaviour: "nowrap" | "wrap" | "wrap-reverse". */
6
13
  export type StackWrap = "nowrap" | "wrap" | "wrap-reverse";
7
14
 
15
+ /** Props for the ITStack flex layout component. */
8
16
  export interface ITStackProps {
17
+ /** Stack children elements. */
9
18
  children?: ReactNode;
19
+ /** Flex direction. Default: "column". */
10
20
  direction?: StackDirection;
21
+ /** Spacing between children in 0.25rem units (0–12). Default: 0. */
11
22
  spacing?: number;
23
+ /** Cross-axis alignment. */
12
24
  alignItems?: StackAlignment;
25
+ /** Main-axis justification. */
13
26
  justifyContent?: StackJustify;
27
+ /** Whether children should wrap. */
14
28
  flexWrap?: StackWrap;
29
+ /** Optional divider element inserted between children. */
15
30
  divider?: ReactNode;
31
+ /** Additional CSS classes on the container. */
16
32
  className?: string;
33
+ /** Inline styles on the container. */
17
34
  style?: CSSProperties;
35
+ /** HTML element type to render as. Default: "div". */
18
36
  as?: ElementType;
19
37
  }